OSDN Git Service

d759b6a500849836915972d61c6aa56762d09a55
[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-03-22 01:05+0900\n"
10 "PO-Revision-Date: 2013-03-24 01:24+0900\n"
11 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
12 "Language-Team: LANGUAGE <LL@li.org>\n"
13 "Language: \n"
14 "MIME-Version: 1.0\n"
15 "Content-Type: text/plain; charset=UTF-8\n"
16 "Content-Transfer-Encoding: 8bit\n"
17
18 #. type: TH
19 #: build/C/man2/alloc_hugepages.2:25
20 #, no-wrap
21 msgid "ALLOC_HUGEPAGES"
22 msgstr "ALLOC_HUGEPAGES"
23
24 #. type: TH
25 #: build/C/man2/alloc_hugepages.2:25
26 #, no-wrap
27 msgid "2007-05-31"
28 msgstr "2007-05-31"
29
30 #. type: TH
31 #: build/C/man2/alloc_hugepages.2:25 build/C/man2/cacheflush.2:25
32 #: build/C/man2/fallocate.2:11 build/C/man2/madvise.2:35
33 #: build/C/man3/mallinfo.3:26 build/C/man3/malloc_stats.3:26
34 #: build/C/man3/malloc_trim.3:26 build/C/man3/mallopt.3:26
35 #: build/C/man2/mlock.2:26 build/C/man2/mmap.2:40 build/C/man2/mmap2.2:29
36 #: build/C/man2/mprotect.2:38 build/C/man2/mremap.2:30 build/C/man2/msync.2:25
37 #: build/C/man2/posix_fadvise.2:28 build/C/man2/readahead.2:28
38 #: build/C/man2/remap_file_pages.2:28 build/C/man3/shm_open.3:26
39 #: build/C/man7/shm_overview.7:27 build/C/man2/shmctl.2:45
40 #: build/C/man2/shmget.2:38 build/C/man2/shmop.2:41
41 #: build/C/man2/subpage_prot.2:30 build/C/man2/sync_file_range.2:30
42 #, no-wrap
43 msgid "Linux"
44 msgstr "Linux"
45
46 #. type: TH
47 #: build/C/man2/alloc_hugepages.2:25 build/C/man3/alloca.3:43
48 #: build/C/man2/cacheflush.2:25 build/C/man2/fallocate.2:11
49 #: build/C/man2/madvise.2:35 build/C/man3/mallinfo.3:26
50 #: build/C/man3/malloc_get_state.3:25 build/C/man3/malloc_hook.3:10
51 #: build/C/man3/malloc_info.3:25 build/C/man3/malloc_stats.3:26
52 #: build/C/man3/malloc_trim.3:26 build/C/man3/malloc_usable_size.3:25
53 #: build/C/man3/mallopt.3:26 build/C/man3/mcheck.3:25 build/C/man2/mlock.2:26
54 #: build/C/man2/mmap.2:40 build/C/man2/mmap2.2:29 build/C/man2/mprotect.2:38
55 #: build/C/man2/mremap.2:30 build/C/man2/msync.2:25 build/C/man3/mtrace.3:25
56 #: build/C/man2/posix_fadvise.2:28 build/C/man3/posix_fallocate.3:25
57 #: build/C/man3/posix_memalign.3:29 build/C/man2/readahead.2:28
58 #: build/C/man2/remap_file_pages.2:28 build/C/man3/shm_open.3:26
59 #: build/C/man7/shm_overview.7:27 build/C/man2/shmctl.2:45
60 #: build/C/man2/shmget.2:38 build/C/man2/shmop.2:41
61 #: build/C/man2/subpage_prot.2:30 build/C/man2/sync_file_range.2:30
62 #, no-wrap
63 msgid "Linux Programmer's Manual"
64 msgstr "Linux Programmer's Manual"
65
66 #. type: SH
67 #: build/C/man2/alloc_hugepages.2:26 build/C/man3/alloca.3:44
68 #: build/C/man2/cacheflush.2:26 build/C/man2/fallocate.2:12
69 #: build/C/man2/madvise.2:36 build/C/man3/mallinfo.3:27
70 #: build/C/man3/malloc_get_state.3:26 build/C/man3/malloc_hook.3:11
71 #: build/C/man3/malloc_info.3:26 build/C/man3/malloc_stats.3:27
72 #: build/C/man3/malloc_trim.3:27 build/C/man3/malloc_usable_size.3:26
73 #: build/C/man3/mallopt.3:27 build/C/man3/mcheck.3:26 build/C/man2/mlock.2:27
74 #: build/C/man2/mmap.2:41 build/C/man2/mmap2.2:30 build/C/man2/mprotect.2:39
75 #: build/C/man2/mremap.2:31 build/C/man2/msync.2:26 build/C/man3/mtrace.3:26
76 #: build/C/man2/posix_fadvise.2:29 build/C/man3/posix_fallocate.3:26
77 #: build/C/man3/posix_memalign.3:30 build/C/man2/readahead.2:29
78 #: build/C/man2/remap_file_pages.2:29 build/C/man3/shm_open.3:27
79 #: build/C/man7/shm_overview.7:28 build/C/man2/shmctl.2:46
80 #: build/C/man2/shmget.2:39 build/C/man2/shmop.2:42
81 #: build/C/man2/subpage_prot.2:31 build/C/man2/sync_file_range.2:31
82 #, no-wrap
83 msgid "NAME"
84 msgstr "名前"
85
86 #. type: Plain text
87 #: build/C/man2/alloc_hugepages.2:28
88 msgid "alloc_hugepages, free_hugepages - allocate or free huge pages"
89 msgstr ""
90 "alloc_hugepages, free_hugepages - 大きなサイズのページの割り当てと解放を行う"
91
92 #. type: SH
93 #: build/C/man2/alloc_hugepages.2:28 build/C/man3/alloca.3:46
94 #: build/C/man2/cacheflush.2:28 build/C/man2/fallocate.2:14
95 #: build/C/man2/madvise.2:38 build/C/man3/mallinfo.3:29
96 #: build/C/man3/malloc_get_state.3:28 build/C/man3/malloc_hook.3:15
97 #: build/C/man3/malloc_info.3:28 build/C/man3/malloc_stats.3:29
98 #: build/C/man3/malloc_trim.3:29 build/C/man3/malloc_usable_size.3:28
99 #: build/C/man3/mallopt.3:29 build/C/man3/mcheck.3:28 build/C/man2/mlock.2:29
100 #: build/C/man2/mmap.2:43 build/C/man2/mmap2.2:32 build/C/man2/mprotect.2:41
101 #: build/C/man2/mremap.2:33 build/C/man2/msync.2:28 build/C/man3/mtrace.3:28
102 #: build/C/man2/posix_fadvise.2:31 build/C/man3/posix_fallocate.3:28
103 #: build/C/man3/posix_memalign.3:32 build/C/man2/readahead.2:31
104 #: build/C/man2/remap_file_pages.2:31 build/C/man3/shm_open.3:29
105 #: build/C/man2/shmctl.2:48 build/C/man2/shmget.2:41 build/C/man2/shmop.2:44
106 #: build/C/man2/subpage_prot.2:33 build/C/man2/sync_file_range.2:33
107 #, no-wrap
108 msgid "SYNOPSIS"
109 msgstr "書式"
110
111 #.  asmlinkage unsigned long sys_alloc_hugepages(int key, unsigned long addr,
112 #.  unsigned long len, int prot, int flag);
113 #. type: Plain text
114 #: build/C/man2/alloc_hugepages.2:34
115 #, no-wrap
116 msgid ""
117 "B<void *alloc_hugepages(int >I<key>B<, void *>I<addr>B<, size_t >I<len>B<,>\n"
118 "B<                      int >I<prot>B<, int >I<flag>B<);>\n"
119 msgstr ""
120 "B<void *alloc_hugepages(int >I<key>B<, void *>I<addr>B<, size_t >I<len>B<,>\n"
121 "B<                      int >I<prot>B<, int >I<flag>B<);>\n"
122
123 #.  asmlinkage int sys_free_hugepages(unsigned long addr);
124 #. type: Plain text
125 #: build/C/man2/alloc_hugepages.2:37
126 #, no-wrap
127 msgid "B<int free_hugepages(void *>I<addr>B<);>\n"
128 msgstr "B<int free_hugepages(void *>I<addr>B<);>\n"
129
130 #. type: SH
131 #: build/C/man2/alloc_hugepages.2:38 build/C/man3/alloca.3:50
132 #: build/C/man2/cacheflush.2:34 build/C/man2/fallocate.2:22
133 #: build/C/man2/madvise.2:50 build/C/man3/mallinfo.3:33
134 #: build/C/man3/malloc_get_state.3:36 build/C/man3/malloc_hook.3:33
135 #: build/C/man3/malloc_info.3:34 build/C/man3/malloc_stats.3:33
136 #: build/C/man3/malloc_trim.3:33 build/C/man3/malloc_usable_size.3:32
137 #: build/C/man3/mallopt.3:33 build/C/man3/mcheck.3:40 build/C/man2/mlock.2:39
138 #: build/C/man2/mmap.2:54 build/C/man2/mmap2.2:39 build/C/man2/mprotect.2:47
139 #: build/C/man2/mremap.2:42 build/C/man2/msync.2:32 build/C/man3/mtrace.3:34
140 #: build/C/man2/posix_fadvise.2:50 build/C/man3/posix_fallocate.3:46
141 #: build/C/man3/posix_memalign.3:84 build/C/man2/readahead.2:38
142 #: build/C/man2/remap_file_pages.2:39 build/C/man3/shm_open.3:41
143 #: build/C/man7/shm_overview.7:30 build/C/man2/shmctl.2:56
144 #: build/C/man2/shmget.2:49 build/C/man2/shmop.2:53
145 #: build/C/man2/subpage_prot.2:41 build/C/man2/sync_file_range.2:41
146 #, no-wrap
147 msgid "DESCRIPTION"
148 msgstr "説明"
149
150 #. type: Plain text
151 #: build/C/man2/alloc_hugepages.2:49
152 msgid ""
153 "The system calls B<alloc_hugepages>()  and B<free_hugepages>()  were "
154 "introduced in Linux 2.5.36 and removed again in 2.5.54.  They existed only "
155 "on i386 and ia64 (when built with B<CONFIG_HUGETLB_PAGE>).  In Linux 2.4.20 "
156 "the syscall numbers exist, but the calls fail with the error B<ENOSYS>."
157 msgstr ""
158 "システムコール B<alloc_hugepages>()  と B<free_hugepages>()  は Linux 2.5.36 "
159 "で導入され、2.5.54 で再び削除された。 これらのシステムコールは i386 と ia64 "
160 "のみで (かつ B<CONFIG_HUGETLB_PAGE> を指定してビルドされた場合に) 存在する。 "
161 "Linux 2.4.20 では syscall 番号が存在するが、 呼び出すとエラー B<ENOSYS> で失"
162 "敗する。"
163
164 #. type: Plain text
165 #: build/C/man2/alloc_hugepages.2:57
166 msgid ""
167 "On i386 the memory management hardware knows about ordinary pages (4 KiB)  "
168 "and huge pages (2 or 4 MiB).  Similarly ia64 knows about huge pages of "
169 "several sizes.  These system calls serve to map huge pages into the "
170 "process's memory or to free them again.  Huge pages are locked into memory, "
171 "and are not swapped."
172 msgstr ""
173 "i386 では、メモリ管理ハードウェアは通常のページ (4 KiB) と 大きなサイズのペー"
174 "ジ (以下、ヒュージページ; 2MiB または 4 MiB) を 扱うことができる。 同様に、"
175 "ia64 もいくつかのサイズのヒュージページを扱うことができる。 これらのシステム"
176 "コールは、ヒュージページをプロセスのメモリにマップしたり、 再び解放したりす"
177 "る。 ヒュージページはメモリ内にロックされ、スワップされない。"
178
179 #. type: Plain text
180 #: build/C/man2/alloc_hugepages.2:66
181 msgid ""
182 "The I<key> argument is an identifier.  When zero the pages are private, and "
183 "not inherited by children.  When positive the pages are shared with other "
184 "applications using the same I<key>, and inherited by child processes."
185 msgstr ""
186 "I<key> 引き数は識別子である。 0 の場合、ページは非公開になり、子プロセスに継"
187 "承されない。 正の場合、ページは同じ I<key> を使う他のアプリケーションと共有さ"
188 "れ、子プロセスに継承される。"
189
190 #. type: Plain text
191 #: build/C/man2/alloc_hugepages.2:81
192 msgid ""
193 "The I<addr> argument of B<free_hugepages>()  tells which page is being "
194 "freed: it was the return value of a call to B<alloc_hugepages>().  (The "
195 "memory is first actually freed when all users have released it.)  The "
196 "I<addr> argument of B<alloc_hugepages>()  is a hint, that the kernel may or "
197 "may not follow.  Addresses must be properly aligned."
198 msgstr ""
199 "B<free_hugepages>()  の I<addr> 引き数は、どのページを解放するかを指定する: "
200 "I<addr> は B<alloc_hugepages>()  の呼び出しの返り値である (全てのユーザがメモ"
201 "リを解放したときに、 そのメモリは初めて実際に解放される)。 B<alloc_hugepages>"
202 "()  の I<addr> 引き数はヒントであり、カーネルはそれに従うかもしれないし、 従"
203 "わないかもしれない。 アドレスは正しく配置されなければならない。"
204
205 #. type: Plain text
206 #: build/C/man2/alloc_hugepages.2:86
207 msgid ""
208 "The I<len> argument is the length of the required segment.  It must be a "
209 "multiple of the huge page size."
210 msgstr ""
211 "I<len> 引き数は要求されたセグメントの長さである。 これはヒュージページのサイ"
212 "ズの倍数にしなければならない。"
213
214 #. type: Plain text
215 #: build/C/man2/alloc_hugepages.2:94
216 msgid ""
217 "The I<prot> argument specifies the memory protection of the segment.  It is "
218 "one of B<PROT_READ>, B<PROT_WRITE>, B<PROT_EXEC>."
219 msgstr ""
220 "I<prot> 引き数はセグメントのメモリ保護を指定する。 これは B<PROT_READ>, "
221 "B<PROT_WRITE>, B<PROT_EXEC> のいずれかである。"
222
223 #. type: Plain text
224 #: build/C/man2/alloc_hugepages.2:109
225 msgid ""
226 "The I<flag> argument is ignored, unless I<key> is positive.  In that case, "
227 "if I<flag> is B<IPC_CREAT>, then a new huge page segment is created when "
228 "none with the given key existed.  If this flag is not set, then B<ENOENT> is "
229 "returned when no segment with the given key exists."
230 msgstr ""
231 "I<key> が正でない限り、 I<flag> 引き数は無視される。 I<key> が正で、かつ "
232 "I<flag> が B<IPC_CREAT> であり、かつ指定された I<key> で (セグメントが) 何も"
233 "存在しない場合、 新しいヒュージページセグメントが作成される。 I<flag> が設定"
234 "されておらず、かつ指定された I<key> のセグメントが存在しない場合、 B<ENOENT> "
235 "が返される。"
236
237 #. type: SH
238 #: build/C/man2/alloc_hugepages.2:109 build/C/man3/alloca.3:60
239 #: build/C/man2/cacheflush.2:53 build/C/man2/fallocate.2:112
240 #: build/C/man2/madvise.2:268 build/C/man3/malloc_get_state.3:61
241 #: build/C/man3/malloc_info.3:48 build/C/man3/malloc_trim.3:51
242 #: build/C/man3/malloc_usable_size.3:40 build/C/man3/mallopt.3:379
243 #: build/C/man3/mcheck.3:129 build/C/man2/mlock.2:116 build/C/man2/mmap.2:375
244 #: build/C/man2/mmap2.2:54 build/C/man2/mprotect.2:78
245 #: build/C/man2/mremap.2:127 build/C/man2/msync.2:68
246 #: build/C/man2/posix_fadvise.2:87 build/C/man3/posix_fallocate.3:66
247 #: build/C/man3/posix_memalign.3:141 build/C/man2/readahead.2:65
248 #: build/C/man2/remap_file_pages.2:124 build/C/man3/shm_open.3:169
249 #: build/C/man2/shmctl.2:274 build/C/man2/shmget.2:180
250 #: build/C/man2/shmop.2:171 build/C/man2/subpage_prot.2:66
251 #: build/C/man2/sync_file_range.2:141
252 #, no-wrap
253 msgid "RETURN VALUE"
254 msgstr "返り値"
255
256 #. type: Plain text
257 #: build/C/man2/alloc_hugepages.2:118
258 msgid ""
259 "On success, B<alloc_hugepages>()  returns the allocated virtual address, and "
260 "B<free_hugepages>()  returns zero.  On error, -1 is returned, and I<errno> "
261 "is set appropriately."
262 msgstr ""
263 "成功した場合、 B<alloc_hugepages>()  は割り当てられた仮想アドレスを返し、 "
264 "B<free_hugepages>()  は 0 を返す。 失敗した場合、-1 を返し、 I<errno> が適切"
265 "に設定される。"
266
267 #. type: SH
268 #: build/C/man2/alloc_hugepages.2:118 build/C/man2/cacheflush.2:59
269 #: build/C/man2/fallocate.2:115 build/C/man2/madvise.2:275
270 #: build/C/man3/malloc_info.3:53 build/C/man3/malloc_trim.3:56
271 #: build/C/man3/mallopt.3:384 build/C/man2/mlock.2:122 build/C/man2/mmap.2:392
272 #: build/C/man2/mmap2.2:61 build/C/man2/mprotect.2:85
273 #: build/C/man2/mremap.2:135 build/C/man2/msync.2:73
274 #: build/C/man2/posix_fadvise.2:90 build/C/man3/posix_fallocate.3:72
275 #: build/C/man3/posix_memalign.3:155 build/C/man2/readahead.2:71
276 #: build/C/man2/remap_file_pages.2:131 build/C/man3/shm_open.3:178
277 #: build/C/man2/shmctl.2:296 build/C/man2/shmget.2:184
278 #: build/C/man2/shmop.2:185 build/C/man2/subpage_prot.2:71
279 #: build/C/man2/sync_file_range.2:147
280 #, no-wrap
281 msgid "ERRORS"
282 msgstr "エラー"
283
284 #. type: TP
285 #: build/C/man2/alloc_hugepages.2:119 build/C/man2/fallocate.2:154
286 #, no-wrap
287 msgid "B<ENOSYS>"
288 msgstr "B<ENOSYS>"
289
290 #. type: Plain text
291 #: build/C/man2/alloc_hugepages.2:122
292 msgid "The system call is not supported on this kernel."
293 msgstr "このシステムコールはカーネルでサポートされていない。"
294
295 #. type: SH
296 #: build/C/man2/alloc_hugepages.2:122
297 #, no-wrap
298 msgid "FILES"
299 msgstr "ファイル"
300
301 #. type: Plain text
302 #: build/C/man2/alloc_hugepages.2:126
303 msgid ""
304 "I</proc/sys/vm/nr_hugepages> Number of configured hugetlb pages.  This can "
305 "be read and written."
306 msgstr ""
307 "I</proc/sys/vm/nr_hugepages> 設定された hugetlb ページの数。 このファイルは読"
308 "み書きできる。"
309
310 #. type: Plain text
311 #: build/C/man2/alloc_hugepages.2:130
312 msgid ""
313 "I</proc/meminfo> Gives info on the number of configured hugetlb pages and on "
314 "their size in the three variables HugePages_Total, HugePages_Free, "
315 "Hugepagesize."
316 msgstr ""
317 "I</proc/meminfo> 設定された hugetlb ページの数と、 3 つの変数 "
318 "HugePages_Total, HugePages_Free, Hugepagesize の サイズについての情報を提供す"
319 "る。"
320
321 #. type: SH
322 #: build/C/man2/alloc_hugepages.2:130 build/C/man3/alloca.3:65
323 #: build/C/man2/cacheflush.2:75 build/C/man2/fallocate.2:195
324 #: build/C/man2/madvise.2:325 build/C/man3/mallinfo.3:110
325 #: build/C/man3/malloc_get_state.3:86 build/C/man3/malloc_hook.3:80
326 #: build/C/man3/malloc_info.3:61 build/C/man3/malloc_stats.3:55
327 #: build/C/man3/malloc_trim.3:60 build/C/man3/malloc_usable_size.3:48
328 #: build/C/man3/mallopt.3:392 build/C/man3/mcheck.3:145
329 #: build/C/man2/mlock.2:186 build/C/man2/mmap.2:497 build/C/man2/mmap2.2:77
330 #: build/C/man2/mprotect.2:113 build/C/man2/mremap.2:185
331 #: build/C/man2/msync.2:96 build/C/man3/mtrace.3:78
332 #: build/C/man2/posix_fadvise.2:112 build/C/man3/posix_fallocate.3:103
333 #: build/C/man3/posix_memalign.3:180 build/C/man2/readahead.2:87
334 #: build/C/man2/remap_file_pages.2:153 build/C/man3/shm_open.3:249
335 #: build/C/man7/shm_overview.7:101 build/C/man2/shmctl.2:368
336 #: build/C/man2/shmget.2:231 build/C/man2/shmop.2:231
337 #: build/C/man2/subpage_prot.2:96 build/C/man2/sync_file_range.2:180
338 #, no-wrap
339 msgid "CONFORMING TO"
340 msgstr "準拠"
341
342 #. type: Plain text
343 #: build/C/man2/alloc_hugepages.2:133
344 msgid ""
345 "These calls are specific to Linux on Intel processors, and should not be "
346 "used in programs intended to be portable."
347 msgstr ""
348 "このシステムコールは Intel プロセッサ上の Linux に固有のものであり、 移植性が"
349 "必要なプログラムで使うべきでない。"
350
351 #. type: SH
352 #: build/C/man2/alloc_hugepages.2:133 build/C/man3/alloca.3:73
353 #: build/C/man2/madvise.2:346 build/C/man3/malloc_get_state.3:88
354 #: build/C/man3/malloc_hook.3:82 build/C/man3/malloc_info.3:63
355 #: build/C/man3/malloc_stats.3:57 build/C/man3/malloc_trim.3:62
356 #: build/C/man3/malloc_usable_size.3:50 build/C/man3/mcheck.3:147
357 #: build/C/man2/mlock.2:213 build/C/man2/mmap.2:515 build/C/man2/mmap2.2:79
358 #: build/C/man2/mprotect.2:122 build/C/man2/mremap.2:191
359 #: build/C/man3/mtrace.3:80 build/C/man2/posix_fadvise.2:121
360 #: build/C/man3/posix_memalign.3:219 build/C/man3/shm_open.3:255
361 #: build/C/man7/shm_overview.7:103 build/C/man2/shmctl.2:373
362 #: build/C/man2/shmget.2:237 build/C/man2/shmop.2:250
363 #: build/C/man2/subpage_prot.2:98 build/C/man2/sync_file_range.2:183
364 #, no-wrap
365 msgid "NOTES"
366 msgstr "注意"
367
368 #. type: Plain text
369 #: build/C/man2/alloc_hugepages.2:141
370 msgid ""
371 "These system calls are gone; they existed only in Linux 2.5.36 through to "
372 "2.5.54.  Now the hugetlbfs file system can be used instead.  Memory backed "
373 "by huge pages (if the CPU supports them) is obtained by using B<mmap>(2)  to "
374 "map files in this virtual file system."
375 msgstr ""
376 "これらのシステムコールはなくなった。 これらは Linux 2.5.36 から 2.5.54 にのみ"
377 "存在する。 代わりに今は hugetlbfs ファイルシステムを使うことができる。 (CPU "
378 "がサポートしている場合) ヒュージページを持つメモリは、 B<mmap>(2)  を使ってこ"
379 "の仮想ファイルシステムでファイルをマップすることで取得できる。"
380
381 #. type: Plain text
382 #: build/C/man2/alloc_hugepages.2:145
383 msgid ""
384 "The maximal number of huge pages can be specified using the B<hugepages=> "
385 "boot parameter."
386 msgstr ""
387 "ヒュージページの最大数は、 B<hugepages=> 起動パラメータを使って指定できる。"
388
389 #. type: SH
390 #: build/C/man2/alloc_hugepages.2:150 build/C/man3/alloca.3:155
391 #: build/C/man2/cacheflush.2:89 build/C/man2/fallocate.2:203
392 #: build/C/man2/madvise.2:379 build/C/man3/mallinfo.3:279
393 #: build/C/man3/malloc_get_state.3:114 build/C/man3/malloc_hook.3:142
394 #: build/C/man3/malloc_info.3:260 build/C/man3/malloc_stats.3:67
395 #: build/C/man3/malloc_trim.3:82 build/C/man3/malloc_usable_size.3:64
396 #: build/C/man3/mallopt.3:580 build/C/man3/mcheck.3:208
397 #: build/C/man2/mlock.2:336 build/C/man2/mmap.2:730 build/C/man2/mmap2.2:98
398 #: build/C/man2/mprotect.2:229 build/C/man2/mremap.2:214
399 #: build/C/man2/msync.2:122 build/C/man3/mtrace.3:172
400 #: build/C/man2/posix_fadvise.2:189 build/C/man3/posix_fallocate.3:133
401 #: build/C/man3/posix_memalign.3:275 build/C/man2/readahead.2:98
402 #: build/C/man2/remap_file_pages.2:164 build/C/man3/shm_open.3:280
403 #: build/C/man7/shm_overview.7:127 build/C/man2/shmctl.2:425
404 #: build/C/man2/shmget.2:313 build/C/man2/shmop.2:295
405 #: build/C/man2/subpage_prot.2:134 build/C/man2/sync_file_range.2:222
406 #, no-wrap
407 msgid "COLOPHON"
408 msgstr "この文書について"
409
410 #. type: Plain text
411 #: build/C/man2/alloc_hugepages.2:157 build/C/man3/alloca.3:162
412 #: build/C/man2/cacheflush.2:96 build/C/man2/fallocate.2:210
413 #: build/C/man2/madvise.2:386 build/C/man3/mallinfo.3:286
414 #: build/C/man3/malloc_get_state.3:121 build/C/man3/malloc_hook.3:149
415 #: build/C/man3/malloc_info.3:267 build/C/man3/malloc_stats.3:74
416 #: build/C/man3/malloc_trim.3:89 build/C/man3/malloc_usable_size.3:71
417 #: build/C/man3/mallopt.3:587 build/C/man3/mcheck.3:215
418 #: build/C/man2/mlock.2:343 build/C/man2/mmap.2:737 build/C/man2/mmap2.2:105
419 #: build/C/man2/mprotect.2:236 build/C/man2/mremap.2:221
420 #: build/C/man2/msync.2:129 build/C/man3/mtrace.3:179
421 #: build/C/man2/posix_fadvise.2:196 build/C/man3/posix_fallocate.3:140
422 #: build/C/man3/posix_memalign.3:282 build/C/man2/readahead.2:105
423 #: build/C/man2/remap_file_pages.2:171 build/C/man3/shm_open.3:287
424 #: build/C/man7/shm_overview.7:134 build/C/man2/shmctl.2:432
425 #: build/C/man2/shmget.2:320 build/C/man2/shmop.2:302
426 #: build/C/man2/subpage_prot.2:141 build/C/man2/sync_file_range.2:229
427 msgid ""
428 "This page is part of release 3.50 of the Linux I<man-pages> project.  A "
429 "description of the project, and information about reporting bugs, can be "
430 "found at http://www.kernel.org/doc/man-pages/."
431 msgstr ""
432 "この man ページは Linux I<man-pages> プロジェクトのリリース 3.50 の一部\n"
433 "である。プロジェクトの説明とバグ報告に関する情報は\n"
434 "http://www.kernel.org/doc/man-pages/ に書かれている。"
435
436 #. type: TH
437 #: build/C/man3/alloca.3:43
438 #, no-wrap
439 msgid "ALLOCA"
440 msgstr "ALLOCA"
441
442 #. type: TH
443 #: build/C/man3/alloca.3:43
444 #, no-wrap
445 msgid "2008-01-24"
446 msgstr "2008-01-24"
447
448 #. type: TH
449 #: build/C/man3/alloca.3:43 build/C/man3/malloc_get_state.3:25
450 #: build/C/man3/malloc_hook.3:10 build/C/man3/malloc_info.3:25
451 #: build/C/man3/malloc_usable_size.3:25 build/C/man3/mcheck.3:25
452 #: build/C/man3/mtrace.3:25 build/C/man3/posix_fallocate.3:25
453 #: build/C/man3/posix_memalign.3:29
454 #, no-wrap
455 msgid "GNU"
456 msgstr "GNU"
457
458 #. type: Plain text
459 #: build/C/man3/alloca.3:46
460 msgid "alloca - allocate memory that is automatically freed"
461 msgstr "alloca - 自動的に解放されるメモリを割り当てる"
462
463 #. type: Plain text
464 #: build/C/man3/alloca.3:48
465 msgid "B<#include E<lt>alloca.hE<gt>>"
466 msgstr "B<#include E<lt>alloca.hE<gt>>"
467
468 #. type: Plain text
469 #: build/C/man3/alloca.3:50
470 msgid "B<void *alloca(size_t >I<size>B<);>"
471 msgstr "B<void *alloca(size_t >I<size>B<);>"
472
473 #. type: Plain text
474 #: build/C/man3/alloca.3:60
475 msgid ""
476 "The B<alloca>()  function allocates I<size> bytes of space in the stack "
477 "frame of the caller.  This temporary space is automatically freed when the "
478 "function that called B<alloca>()  returns to its caller."
479 msgstr ""
480 "B<alloca>()  関数は、 I<size> バイトの領域を呼出元のスタック・フレームに割り"
481 "付ける。 この一時的な領域は、 B<alloca>()  を呼び出した関数が呼出元に返るとき"
482 "に自動的に解放される。"
483
484 #. type: Plain text
485 #: build/C/man3/alloca.3:65
486 msgid ""
487 "The B<alloca>()  function returns a pointer to the beginning of the "
488 "allocated space.  If the allocation causes stack overflow, program behavior "
489 "is undefined."
490 msgstr ""
491 "B<alloca>()  関数は、割り付けた領域の始まりを指すポインタを返す。 割り付けに"
492 "よってスタックオーバーフローが起った場合の プログラムの動作は定義されていな"
493 "い。"
494
495 #. type: Plain text
496 #: build/C/man3/alloca.3:67
497 msgid "This function is not in POSIX.1-2001."
498 msgstr "この関数は POSIX.1-2001 にはない。"
499
500 #. type: Plain text
501 #: build/C/man3/alloca.3:73
502 msgid ""
503 "There is evidence that the B<alloca>()  function appeared in 32V, PWB, "
504 "PWB.2, 3BSD, and 4BSD.  There is a man page for it in 4.3BSD.  Linux uses "
505 "the GNU version."
506 msgstr ""
507 "32V, PWB, PWB.2, 3BSD, 4BSD に B<alloca>()  関数が登場した証拠がある。 "
508 "4.3BSD には、マニュアルページがある。 Linux は、GNU 版を使っている。 この関数"
509 "は POSIX.1-2001 にはない。"
510
511 #. type: Plain text
512 #: build/C/man3/alloca.3:88
513 msgid ""
514 "The B<alloca>()  function is machine- and compiler-dependent.  For certain "
515 "applications, its use can improve efficiency compared to the use of B<malloc>"
516 "(3)  plus B<free>(3).  In certain cases, it can also simplify memory "
517 "deallocation in applications that use B<longjmp>(3)  or B<siglongjmp>(3).  "
518 "Otherwise, its use is discouraged."
519 msgstr ""
520 "B<alloca>()  関数は、機種とコンパイラに依存する。 特定のアプリケーションで"
521 "は、この関数を使うと B<malloc>(3)  と B<free>(3)  を組み合わせて使った場合に"
522 "比べて効率を改善することができる。 特定の場合では、この関数を使うことで、 "
523 "B<longjmp>(3)  や B<siglongjmp>(3)  を使うアプリケーションでのメモリの開放を"
524 "簡単にすることができる。 それ以外の場合では、この関数の使用は推奨されない。"
525
526 #. type: Plain text
527 #: build/C/man3/alloca.3:97
528 msgid ""
529 "Because the space allocated by B<alloca>()  is allocated within the stack "
530 "frame, that space is automatically freed if the function return is jumped "
531 "over by a call to B<longjmp>(3)  or B<siglongjmp>(3)."
532 msgstr ""
533 "B<alloca>()  により割り当てられる空間はスタックフレームから割り当てらるの"
534 "で、 関数の戻り先が B<longjmp>(3)  や B<siglongjmp>(3)  の呼び出しによりジャ"
535 "ンプした場合には、 割り当てられた空間は自動的に解放される。"
536
537 #. type: Plain text
538 #: build/C/man3/alloca.3:102
539 msgid "Do not attempt to B<free>(3)  space allocated by B<alloca>()!"
540 msgstr ""
541 "B<alloca>()  で割り当てられた空間を B<free>(3)  しようとすることのないよう"
542 "に!"
543
544 #. type: SS
545 #: build/C/man3/alloca.3:102
546 #, fuzzy, no-wrap
547 #| msgid "Notes on the GNU Version"
548 msgid "Notes on the GNU version"
549 msgstr "GNU 版についての注意"
550
551 #. type: Plain text
552 #: build/C/man3/alloca.3:124
553 msgid ""
554 "Normally, B<gcc>(1)  translates calls to B<alloca>()  with inlined code.  "
555 "This is not done when either the I<-ansi>, I<-std=c89>, I<-std=c99>, or the "
556 "I<-fno-builtin> option is given (and the header I<E<lt>alloca.hE<gt>> is not "
557 "included).  But beware! By default the glibc version of I<E<lt>stdlib."
558 "hE<gt>> includes I<E<lt>alloca.hE<gt>> and that contains the line:"
559 msgstr ""
560 "通常 B<gcc>(1)  は B<alloca>()  の呼び出しをインラインコードに変換する。 I<-"
561 "ansi>, I<-std=c89>, I<-std=c99>, I<-fno-builtin> のいずれかのオプションが指定"
562 "された場合、この変換は行われない (また I<E<lt>alloca.hE<gt>> のインクルードも"
563 "行われない)。 だだし、デフォルトでは glibc 版の I<E<lt>stdlib.hE<gt>> は "
564 "I<E<lt>alloca.hE<gt>> をインクルードしており、これには以下の行が含まれている"
565 "ので注意すること。"
566
567 #. type: Plain text
568 #: build/C/man3/alloca.3:127
569 #, no-wrap
570 msgid "    #define alloca(size)   __builtin_alloca (size)\n"
571 msgstr "    #define alloca(size)   __builtin_alloca (size)\n"
572
573 #. type: Plain text
574 #: build/C/man3/alloca.3:130
575 msgid "with messy consequences if one has a private version of this function."
576 msgstr "独自版の __builtin_alloca (size) 関数があると厄介な結果になる。"
577
578 #. type: Plain text
579 #: build/C/man3/alloca.3:134
580 msgid ""
581 "The fact that the code is inlined means that it is impossible to take the "
582 "address of this function, or to change its behavior by linking with a "
583 "different library."
584 msgstr ""
585 "このコードはインライン化されているので、 この関数のアドレスを取得したり、 他"
586 "のライブラリをリンクして動作を変更することはできない。"
587
588 #. type: Plain text
589 #: build/C/man3/alloca.3:138
590 msgid ""
591 "The inlined code often consists of a single instruction adjusting the stack "
592 "pointer, and does not check for stack overflow.  Thus, there is no NULL "
593 "error return."
594 msgstr ""
595 "通常このインラインコードはスタックポインタを移動する 1 つの命令 "
596 "(instruction) から構成されており、 スタックオーバーフローをチェックしない。 "
597 "よって NULL エラーが返されることはない。"
598
599 #. type: SH
600 #: build/C/man3/alloca.3:138 build/C/man2/cacheflush.2:82
601 #: build/C/man3/mallinfo.3:114 build/C/man3/mallopt.3:406
602 #: build/C/man2/mlock.2:304 build/C/man2/mmap.2:587 build/C/man3/mtrace.3:102
603 #: build/C/man2/posix_fadvise.2:178 build/C/man2/shmget.2:299
604 #, no-wrap
605 msgid "BUGS"
606 msgstr "バグ"
607
608 #. type: Plain text
609 #: build/C/man3/alloca.3:143
610 msgid ""
611 "There is no error indication if the stack frame cannot be extended.  "
612 "(However, after a failed allocation, the program is likely to receive a "
613 "B<SIGSEGV> signal if it attempts to access the unallocated space.)"
614 msgstr ""
615 "スタックフレームが拡張できなかった場合、エラー通知は行われない。 (しかしなが"
616 "ら、割り当てに失敗した後で、プログラムが割り当てられなかった 空間にアクセスし"
617 "ようとした場合に B<SIGSEGV> シグナルを受信することだろう。)"
618
619 #. type: Plain text
620 #: build/C/man3/alloca.3:151
621 msgid ""
622 "On many systems B<alloca>()  cannot be used inside the list of arguments of "
623 "a function call, because the stack space reserved by B<alloca>()  would "
624 "appear on the stack in the middle of the space for the function arguments."
625 msgstr ""
626 "多くのシステムにおいて、関数コールの引き数のリスト内では B<alloca>()  が使え"
627 "ない。 これは、 B<alloca>()  によって予約されるスタック領域が、 関数引き数に"
628 "使われるスタック領域の中に現れてしまうためである。"
629
630 #. type: SH
631 #: build/C/man3/alloca.3:151 build/C/man2/fallocate.2:198
632 #: build/C/man2/madvise.2:371 build/C/man3/mallinfo.3:270
633 #: build/C/man3/malloc_get_state.3:111 build/C/man3/malloc_hook.3:137
634 #: build/C/man3/malloc_info.3:254 build/C/man3/malloc_stats.3:61
635 #: build/C/man3/malloc_trim.3:78 build/C/man3/malloc_usable_size.3:62
636 #: build/C/man3/mallopt.3:566 build/C/man3/mcheck.3:204
637 #: build/C/man2/mlock.2:329 build/C/man2/mmap.2:712 build/C/man2/mmap2.2:92
638 #: build/C/man2/mprotect.2:226 build/C/man2/mremap.2:199
639 #: build/C/man2/msync.2:118 build/C/man3/mtrace.3:167
640 #: build/C/man2/posix_fadvise.2:183 build/C/man3/posix_fallocate.3:128
641 #: build/C/man3/posix_memalign.3:270 build/C/man2/readahead.2:92
642 #: build/C/man2/remap_file_pages.2:157 build/C/man3/shm_open.3:269
643 #: build/C/man7/shm_overview.7:114 build/C/man2/shmctl.2:418
644 #: build/C/man2/shmget.2:305 build/C/man2/shmop.2:287
645 #: build/C/man2/subpage_prot.2:128 build/C/man2/sync_file_range.2:217
646 #, no-wrap
647 msgid "SEE ALSO"
648 msgstr "関連項目"
649
650 #. type: Plain text
651 #: build/C/man3/alloca.3:155
652 msgid "B<brk>(2), B<longjmp>(3), B<malloc>(3)"
653 msgstr "B<brk>(2), B<longjmp>(3), B<malloc>(3)"
654
655 #. type: TH
656 #: build/C/man2/cacheflush.2:25
657 #, no-wrap
658 msgid "CACHEFLUSH"
659 msgstr "CACHEFLUSH"
660
661 #. type: TH
662 #: build/C/man2/cacheflush.2:25
663 #, no-wrap
664 msgid "2007-05-26"
665 msgstr "2007-05-26"
666
667 #. type: Plain text
668 #: build/C/man2/cacheflush.2:28
669 msgid "cacheflush - flush contents of instruction and/or data cache"
670 msgstr "cacheflush - 命令キャッシュやデータキャッシュの内容をフラッシュする"
671
672 #. type: Plain text
673 #: build/C/man2/cacheflush.2:31
674 #, no-wrap
675 msgid "B<#include E<lt>asm/cachectl.hE<gt>>\n"
676 msgstr "B<#include E<lt>asm/cachectl.hE<gt>>\n"
677
678 #. type: Plain text
679 #: build/C/man2/cacheflush.2:33
680 #, no-wrap
681 msgid "B<int cacheflush(char *>I<addr>B<, int >I<nbytes>B<, int >I<cache>B<);>\n"
682 msgstr "B<int cacheflush(char *>I<addr>B<, int >I<nbytes>B<, int >I<cache>B<);>\n"
683
684 #. type: Plain text
685 #: build/C/man2/cacheflush.2:43
686 msgid ""
687 "B<cacheflush>()  flushes the contents of the indicated cache(s) for the user "
688 "addresses in the range I<addr> to I<(addr+nbytes-1)>.  I<cache> may be one "
689 "of:"
690 msgstr ""
691 "B<cacheflush>()  は I<addr> から I<(addr+nbytes-1)> の範囲のユーザアドレスに"
692 "対応する 指定されたキャッシュをフラッシュする。 I<cache> には以下のいずれかを"
693 "指定する:"
694
695 #. type: TP
696 #: build/C/man2/cacheflush.2:43
697 #, no-wrap
698 msgid "B<ICACHE>"
699 msgstr "B<ICACHE>"
700
701 #. type: Plain text
702 #: build/C/man2/cacheflush.2:46
703 msgid "Flush the instruction cache."
704 msgstr "命令 (instruction) キャッシュをフラッシュする。"
705
706 #. type: TP
707 #: build/C/man2/cacheflush.2:46
708 #, no-wrap
709 msgid "B<DCACHE>"
710 msgstr "B<DCACHE>"
711
712 #. type: Plain text
713 #: build/C/man2/cacheflush.2:49
714 msgid "Write back to memory and invalidate the affected valid cache lines."
715 msgstr "変更があったキャッシュラインをメモリに書き戻し、無効にする。"
716
717 #. type: TP
718 #: build/C/man2/cacheflush.2:49
719 #, no-wrap
720 msgid "B<BCACHE>"
721 msgstr "B<BCACHE>"
722
723 #. type: Plain text
724 #: build/C/man2/cacheflush.2:53
725 msgid "Same as B<(ICACHE|DCACHE)>."
726 msgstr "B<(ICACHE|DCACHE)> と同じ。"
727
728 #. type: Plain text
729 #: build/C/man2/cacheflush.2:59
730 msgid ""
731 "B<cacheflush>()  returns 0 on success or -1 on error.  If errors are "
732 "detected, I<errno> will indicate the error."
733 msgstr ""
734 "B<cacheflush>()  は成功した場合は 0 を、失敗した場合は -1 を返す。エラーが検"
735 "出された場合は I<errno> にエラーが指示される。"
736
737 #. type: TP
738 #: build/C/man2/cacheflush.2:60 build/C/man2/mmap2.2:62
739 #: build/C/man2/mremap.2:142 build/C/man2/shmctl.2:305
740 #: build/C/man2/subpage_prot.2:72
741 #, no-wrap
742 msgid "B<EFAULT>"
743 msgstr "B<EFAULT>"
744
745 #. type: Plain text
746 #: build/C/man2/cacheflush.2:67
747 msgid ""
748 "Some or all of the address range I<addr> to I<(addr+nbytes-1)> is not "
749 "accessible."
750 msgstr ""
751 "I<addr> から I<(addr+nbytes-1)> の範囲のアドレスの全てまたは一部が アクセス可"
752 "能ではない。"
753
754 #. type: TP
755 #: build/C/man2/cacheflush.2:67 build/C/man2/fallocate.2:127
756 #: build/C/man2/madvise.2:282 build/C/man3/malloc_info.3:54
757 #: build/C/man2/mlock.2:157 build/C/man2/mlock.2:164 build/C/man2/mlock.2:176
758 #: build/C/man2/mmap.2:423 build/C/man2/mmap.2:431 build/C/man2/mmap.2:436
759 #: build/C/man2/mmap2.2:65 build/C/man2/mprotect.2:95
760 #: build/C/man2/mremap.2:151 build/C/man2/msync.2:80
761 #: build/C/man2/posix_fadvise.2:94 build/C/man3/posix_fallocate.3:81
762 #: build/C/man3/posix_memalign.3:156 build/C/man2/readahead.2:76
763 #: build/C/man2/remap_file_pages.2:132 build/C/man2/remap_file_pages.2:139
764 #: build/C/man3/shm_open.3:211 build/C/man2/shmctl.2:319
765 #: build/C/man2/shmget.2:198 build/C/man2/shmop.2:200 build/C/man2/shmop.2:223
766 #: build/C/man2/subpage_prot.2:77 build/C/man2/sync_file_range.2:152
767 #, no-wrap
768 msgid "B<EINVAL>"
769 msgstr "B<EINVAL>"
770
771 #. type: Plain text
772 #: build/C/man2/cacheflush.2:75
773 msgid "I<cache> is not one of B<ICACHE>, B<DCACHE>, or B<BCACHE>."
774 msgstr "I<cache> パラメータが B<ICACHE>, B<DCACHE>, B<BCACHE> のどれでもない。"
775
776 #.  FIXME This system call was only on MIPS back in 1.2 days, but
777 #.  by now it is on a number of other architectures (but not i386).
778 #.  Investigate the details and update this page.
779 #.  Irix 6.5 appears to have a cacheflush() syscall -- mtk
780 #. type: Plain text
781 #: build/C/man2/cacheflush.2:82
782 msgid ""
783 "This Linux-specific system call is only available on MIPS-based systems.  It "
784 "should not be used in programs intended to be portable."
785 msgstr ""
786 "この Linux 特有のシステムコールは MIPS ベースのシステムでのみ有効である。 移"
787 "植を意図したプログラムで使用すべきではない。"
788
789 #. type: Plain text
790 #: build/C/man2/cacheflush.2:89
791 msgid ""
792 "The current implementation ignores the I<addr> and I<nbytes> arguments.  "
793 "Therefore, the whole cache is always flushed."
794 msgstr ""
795 "現在の実装では、引き数 I<addr> と I<nbytes> は無視される。そのため、 常に全て"
796 "のキャッシュがフラッシュされる。"
797
798 #. type: TH
799 #: build/C/man2/fallocate.2:11
800 #, no-wrap
801 msgid "FALLOCATE"
802 msgstr "FALLOCATE"
803
804 #. type: TH
805 #: build/C/man2/fallocate.2:11 build/C/man3/posix_fallocate.3:25
806 #: build/C/man2/shmop.2:41
807 #, fuzzy, no-wrap
808 #| msgid "2009-02-25"
809 msgid "2013-02-12"
810 msgstr "2009-02-25"
811
812 #. type: Plain text
813 #: build/C/man2/fallocate.2:14
814 msgid "fallocate - manipulate file space"
815 msgstr "fallocate - ファイル空間の操作"
816
817 #. type: Plain text
818 #: build/C/man2/fallocate.2:18 build/C/man2/readahead.2:35
819 #, no-wrap
820 msgid ""
821 "B<#define _GNU_SOURCE>             /* See feature_test_macros(7) */\n"
822 "B<#include E<lt>fcntl.hE<gt>>\n"
823 msgstr ""
824 "B<#define _GNU_SOURCE>             /* feature_test_macros(7) 参照 */\n"
825 "B<#include E<lt>fcntl.hE<gt>>\n"
826
827 #. type: Plain text
828 #: build/C/man2/fallocate.2:21
829 #, no-wrap
830 msgid "B<int fallocate(int >I<fd>B<, int >I<mode>B<, off_t >I<offset>B<, off_t >I<len>B<);>\n"
831 msgstr "B<int fallocate(int >I<fd>B<, int >I<mode>B<, off_t >I<offset>B<, off_t >I<len>B<);>\n"
832
833 #. type: Plain text
834 #: build/C/man2/fallocate.2:27
835 msgid ""
836 "This is a nonportable, Linux-specific system call.  For the portable, "
837 "POSIX.1-specified method of ensuring that space is allocated for a file, see "
838 "B<posix_fallocate>(3)."
839 msgstr ""
840 "このシステムコールは、移植性のない、Linux 固有のシステムコールである。 移植性"
841 "が必要な場合は、ファイルに対してディスク空間を確実に確保するために、 POSIX.1 "
842 "で規定された方法である B<posix_fallocate>(3)  を使うこと。"
843
844 #. type: Plain text
845 #: build/C/man2/fallocate.2:37
846 msgid ""
847 "B<fallocate>()  allows the caller to directly manipulate the allocated disk "
848 "space for the file referred to by I<fd> for the byte range starting at "
849 "I<offset> and continuing for I<len> bytes."
850 msgstr ""
851 "B<fallocate>()  を使うと、 I<fd> が参照するファイルに割り当てられたディスク空"
852 "間を直接操作できる。 操作対象は、 I<offset> から始まる長さ I<len> バイトの領"
853 "域である。"
854
855 #. type: Plain text
856 #: build/C/man2/fallocate.2:42
857 msgid ""
858 "The I<mode> argument determines the operation to be performed on the given "
859 "range.  Details of the supported operations are given in the subsections "
860 "below."
861 msgstr ""
862 "I<mode> 引き数は、指定された領域に対して実行する操作を指定する。\n"
863 "サポートされている操作の詳細は以下のサブセクションで説明する。"
864
865 #. type: SS
866 #: build/C/man2/fallocate.2:42
867 #, no-wrap
868 msgid "Allocating disk space"
869 msgstr "ディスク領域の割り当て"
870
871 #. type: Plain text
872 #: build/C/man2/fallocate.2:61
873 msgid ""
874 "The default operation (i.e., I<mode> is zero) of B<fallocate>()  allocates "
875 "and initializes to zero the disk space within the range specified by "
876 "I<offset> and I<len>.  The file size (as reported by B<stat>(2))  will be "
877 "changed if I<offset>+I<len> is greater than the file size.  This default "
878 "behavior closely resembles the behavior of the B<posix_fallocate>(3)  "
879 "library function, and is intended as a method of optimally implementing that "
880 "function."
881 msgstr ""
882 "B<fallocate>() のデフォルトの動作 (つまり I<mode> が 0 の場合) は、\n"
883 "I<offset> と I<len> で指定された範囲のディスク領域の割り当てと初期化を行"
884 "う。\n"
885 "I<offset>+I<len> がファイルサイズよりも大きかった場合、\n"
886 "(B<stat>(2) で報告される) ファイルサイズが変更される。このデフォルトの動作"
887 "は、\n"
888 "ライブラリ関数 B<posix_fallocate>(3) の動作と非常に似ている。これは、\n"
889 "このシステムコールが B<posix_fallocate>(3) を最適に実装する手段を提供する\n"
890 "ことを目的としているからである。"
891
892 #. type: Plain text
893 #: build/C/man2/fallocate.2:67
894 msgid ""
895 "After a successful call, subsequent writes into the range specified by "
896 "I<offset> and I<len> are guaranteed not to fail because of lack of disk "
897 "space."
898 msgstr ""
899 "呼び出しが成功した場合、\n"
900 "I<offset> と I<len> で指定された範囲へのそれ以降の書き込みでは、\n"
901 "ディスクの領域不足での書き込み失敗が起こらないことが保証される。"
902
903 #. type: Plain text
904 #: build/C/man2/fallocate.2:78
905 msgid ""
906 "If the B<FALLOC_FL_KEEP_SIZE> flag is specified in I<mode>, the behavior of "
907 "the call is similar, but the file size will not be changed even if I<offset>"
908 "+I<len> is greater than the file size.  Preallocating zeroed blocks beyond "
909 "the end of the file in this manner is useful for optimizing append workloads."
910 msgstr ""
911 "B<FALLOC_FL_KEEP_SIZE> フラグが I<mode> に指定された場合、このシステムコー"
912 "ル\n"
913 "の動作は似ているが、 I<offset>+I<len> がファイルサイズよりも大きい場合で\n"
914 "あってもファイルサイズは変更されない点が異なる。この場合のファイルの末尾\n"
915 "よりも後ろの前もって割り当てられた 0 で埋められたブロックは、ファイルへの\n"
916 "追記を最適化したい場合に役に立つ。"
917
918 #. type: Plain text
919 #: build/C/man2/fallocate.2:82
920 msgid ""
921 "Because allocation is done in block size chunks, B<fallocate>()  may "
922 "allocate a larger range of disk space than was specified."
923 msgstr ""
924 "割り当てはブロックサイズ単位で行われるため、 B<fallocate>() は指定されたよ"
925 "り\n"
926 "も大きなディスク領域を割り当てることがある。"
927
928 #. type: SS
929 #: build/C/man2/fallocate.2:82
930 #, no-wrap
931 msgid "Deallocating file space"
932 msgstr "ファイル空間の割り当て解除"
933
934 #. type: Plain text
935 #: build/C/man2/fallocate.2:97
936 msgid ""
937 "Specifying the B<FALLOC_FL_PUNCH_HOLE> flag (available since Linux 2.6.38) "
938 "in I<mode> deallocates space (i.e., creates a hole)  in the byte range "
939 "starting at I<offset> and continuing for I<len> bytes.  Within the specified "
940 "range, partial file system blocks are zeroed, and whole file system blocks "
941 "are removed from the file.  After a successful call, subsequent reads from "
942 "this range will return zeroes."
943 msgstr ""
944
945 #. type: Plain text
946 #: build/C/man2/fallocate.2:108
947 msgid ""
948 "The B<FALLOC_FL_PUNCH_HOLE> flag must be ORed with B<FALLOC_FL_KEEP_SIZE> in "
949 "I<mode>; in other words, even when punching off the end of the file, the "
950 "file size (as reported by B<stat>(2))  does not change."
951 msgstr ""
952
953 #. type: Plain text
954 #: build/C/man2/fallocate.2:112
955 msgid ""
956 "Not all file systems support B<FALLOC_FL_PUNCH_HOLE>; if a file system "
957 "doesn't support the operation, an error is returned."
958 msgstr ""
959
960 #. type: Plain text
961 #: build/C/man2/fallocate.2:115
962 msgid "B<fallocate>()  returns zero on success, and -1 on failure."
963 msgstr "B<fallocate>()  は成功すると 0 を返し、エラーの場合は -1 を返す。"
964
965 #. type: TP
966 #: build/C/man2/fallocate.2:116 build/C/man2/madvise.2:279
967 #: build/C/man2/mmap.2:417 build/C/man2/posix_fadvise.2:91
968 #: build/C/man3/posix_fallocate.3:73 build/C/man2/readahead.2:72
969 #: build/C/man2/sync_file_range.2:148
970 #, no-wrap
971 msgid "B<EBADF>"
972 msgstr "B<EBADF>"
973
974 #. type: Plain text
975 #: build/C/man2/fallocate.2:120 build/C/man3/posix_fallocate.3:77
976 msgid "I<fd> is not a valid file descriptor, or is not opened for writing."
977 msgstr ""
978 "I<fd> が有効なファイルディスクリプタでないか、 書き込み用としてオープンされて"
979 "いない。"
980
981 #. type: TP
982 #: build/C/man2/fallocate.2:120 build/C/man3/posix_fallocate.3:77
983 #, no-wrap
984 msgid "B<EFBIG>"
985 msgstr "B<EFBIG>"
986
987 #. type: Plain text
988 #: build/C/man2/fallocate.2:124
989 msgid "I<offset>+I<len> exceeds the maximum file size."
990 msgstr "I<offset + len> がファイルサイズの最大値よりも大きい。"
991
992 #. type: TP
993 #: build/C/man2/fallocate.2:124
994 #, no-wrap
995 msgid "B<EINTR>"
996 msgstr "B<EINTR>"
997
998 #. type: Plain text
999 #: build/C/man2/fallocate.2:127
1000 msgid "A signal was caught during execution."
1001 msgstr "実行中にシグナルが捕捉された。"
1002
1003 #. type: Plain text
1004 #: build/C/man2/fallocate.2:139 build/C/man3/posix_fallocate.3:87
1005 msgid "I<offset> was less than 0, or I<len> was less than or equal to 0."
1006 msgstr "I<offset> が 0 未満だったか、 I<len> が 0 以下だった。"
1007
1008 #. type: TP
1009 #: build/C/man2/fallocate.2:139 build/C/man2/madvise.2:310
1010 #: build/C/man2/sync_file_range.2:160
1011 #, no-wrap
1012 msgid "B<EIO>"
1013 msgstr "B<EIO>"
1014
1015 #. type: Plain text
1016 #: build/C/man2/fallocate.2:142
1017 msgid "An I/O error occurred while reading from or writing to a file system."
1018 msgstr "ファイルシステムとの読み書き中に入出力エラーが発生した。"
1019
1020 #. type: TP
1021 #: build/C/man2/fallocate.2:142 build/C/man2/mmap.2:452
1022 #: build/C/man3/posix_fallocate.3:87
1023 #, no-wrap
1024 msgid "B<ENODEV>"
1025 msgstr "B<ENODEV>"
1026
1027 #. type: Plain text
1028 #: build/C/man2/fallocate.2:149
1029 msgid ""
1030 "I<fd> does not refer to a regular file or a directory.  (If I<fd> is a pipe "
1031 "or FIFO, a different error results.)"
1032 msgstr ""
1033 "I<fd> が通常のファイルかディレクトリを参照していない (I<fd> がパイプや FIFO "
1034 "を参照している場合、別のエラーが発生する)。"
1035
1036 #. type: TP
1037 #: build/C/man2/fallocate.2:149 build/C/man3/posix_fallocate.3:91
1038 #: build/C/man2/shmget.2:216 build/C/man2/sync_file_range.2:166
1039 #, no-wrap
1040 msgid "B<ENOSPC>"
1041 msgstr "B<ENOSPC>"
1042
1043 #. type: Plain text
1044 #: build/C/man2/fallocate.2:154 build/C/man3/posix_fallocate.3:96
1045 msgid ""
1046 "There is not enough space left on the device containing the file referred to "
1047 "by I<fd>."
1048 msgstr "I<fd> が参照するファイルを含むデバイスに十分な空き領域がない。"
1049
1050 #. type: Plain text
1051 #: build/C/man2/fallocate.2:158
1052 msgid "This kernel does not implement B<fallocate>()."
1053 msgstr "このカーネルでは B<fallocate>() は実装されていない。"
1054
1055 #. type: TP
1056 #: build/C/man2/fallocate.2:158
1057 #, no-wrap
1058 msgid "B<EOPNOTSUPP>"
1059 msgstr "B<EOPNOTSUPP>"
1060
1061 #. type: Plain text
1062 #: build/C/man2/fallocate.2:167
1063 msgid ""
1064 "The file system containing the file referred to by I<fd> does not support "
1065 "this operation; or the I<mode> is not supported by the file system "
1066 "containing the file referred to by I<fd>."
1067 msgstr ""
1068 "I<fd> が参照するファイルを含むファイルシステムが 指定された操作を\n"
1069 "サポートしていない。 I<fd> が参照するファイルを含むファイルシステムが\n"
1070 "I<mode> をサポートしていない。"
1071
1072 #. type: TP
1073 #: build/C/man2/fallocate.2:167 build/C/man2/mlock.2:143
1074 #: build/C/man2/mlock.2:182 build/C/man2/mmap.2:460 build/C/man2/shmctl.2:344
1075 #: build/C/man2/shmget.2:224
1076 #, no-wrap
1077 msgid "B<EPERM>"
1078 msgstr "B<EPERM>"
1079
1080 #. type: Plain text
1081 #: build/C/man2/fallocate.2:183
1082 msgid ""
1083 "The file referred to by I<fd> is marked immutable (see B<chattr>(1)).  Or: "
1084 "I<mode> specifies B<FALLOC_FL_PUNCH_HOLE> and the file referred to by I<fd> "
1085 "is marked append-only (see B<chattr>(1))."
1086 msgstr ""
1087
1088 #. type: TP
1089 #: build/C/man2/fallocate.2:183 build/C/man2/posix_fadvise.2:97
1090 #: build/C/man3/posix_fallocate.3:96 build/C/man2/sync_file_range.2:169
1091 #, no-wrap
1092 msgid "B<ESPIPE>"
1093 msgstr "B<ESPIPE>"
1094
1095 #. type: Plain text
1096 #: build/C/man2/fallocate.2:187
1097 msgid "I<fd> refers to a pipe or FIFO."
1098 msgstr "I<fd> がパイプか FIFO を参照している。"
1099
1100 #. type: SH
1101 #: build/C/man2/fallocate.2:187 build/C/man3/malloc_info.3:58
1102 #: build/C/man3/mcheck.3:134 build/C/man2/mmap2.2:74
1103 #: build/C/man2/posix_fadvise.2:104 build/C/man3/posix_fallocate.3:100
1104 #: build/C/man3/posix_memalign.3:165 build/C/man2/readahead.2:82
1105 #: build/C/man2/remap_file_pages.2:148 build/C/man3/shm_open.3:247
1106 #: build/C/man2/subpage_prot.2:90 build/C/man2/sync_file_range.2:177
1107 #, no-wrap
1108 msgid "VERSIONS"
1109 msgstr "バージョン"
1110
1111 #.  See http://sourceware.org/bugzilla/show_bug.cgi?id=14964
1112 #. type: Plain text
1113 #: build/C/man2/fallocate.2:195
1114 #, fuzzy
1115 #| msgid ""
1116 #| "B<fallocate>()  is available on Linux since kernel 2.6.23.  Support is "
1117 #| "provided by glibc since version 2.10."
1118 msgid ""
1119 "B<fallocate>()  is available on Linux since kernel 2.6.23.  Support is "
1120 "provided by glibc since version 2.10.  The B<FALLOC_FL_*> flags are defined "
1121 "in glibc headers only since version 2.18."
1122 msgstr ""
1123 "B<fallocate>()  はカーネル 2.6.23 以降の Linux で利用可能である。 glibc での"
1124 "対応はバージョン 3.10 以降で行われている。"
1125
1126 #. type: Plain text
1127 #: build/C/man2/fallocate.2:198
1128 msgid "B<fallocate>()  is Linux-specific."
1129 msgstr "B<fallocate>()  は Linux 固有である。"
1130
1131 #. type: Plain text
1132 #: build/C/man2/fallocate.2:203
1133 #, fuzzy
1134 #| msgid "B<ftruncate>(2), B<posix_fadvise>(3), B<posix_fallocate>(3)"
1135 msgid ""
1136 "B<fallocate>(1), B<ftruncate>(2), B<posix_fadvise>(3), B<posix_fallocate>(3)"
1137 msgstr "B<ftruncate>(2), B<posix_fadvise>(3), B<posix_fallocate>(3)"
1138
1139 #. type: TH
1140 #: build/C/man2/madvise.2:35
1141 #, no-wrap
1142 msgid "MADVISE"
1143 msgstr "MADVISE"
1144
1145 #. type: TH
1146 #: build/C/man2/madvise.2:35 build/C/man3/malloc_info.3:25
1147 #, no-wrap
1148 msgid "2012-04-28"
1149 msgstr "2012-04-28"
1150
1151 #. type: Plain text
1152 #: build/C/man2/madvise.2:38
1153 msgid "madvise - give advice about use of memory"
1154 msgstr "madvise - メモリ利用に関するアドバイスを与える"
1155
1156 #. type: Plain text
1157 #: build/C/man2/madvise.2:40 build/C/man2/msync.2:30
1158 #: build/C/man3/shm_open.3:31
1159 msgid "B<#include E<lt>sys/mman.hE<gt>>"
1160 msgstr "B<#include E<lt>sys/mman.hE<gt>>"
1161
1162 #. type: Plain text
1163 #: build/C/man2/madvise.2:42
1164 msgid ""
1165 "B<int madvise(void *>I<addr>B<, size_t >I<length>B<, int >I<advice>B<);>"
1166 msgstr ""
1167 "B<int madvise(void *>I<addr>B<, size_t >I<length>B<, int >I<advice>B<);>"
1168
1169 #. type: Plain text
1170 #: build/C/man2/madvise.2:46 build/C/man2/posix_fadvise.2:43
1171 #: build/C/man3/posix_fallocate.3:39 build/C/man3/posix_memalign.3:49
1172 msgid ""
1173 "Feature Test Macro Requirements for glibc (see B<feature_test_macros>(7)):"
1174 msgstr "glibc 向けの機能検査マクロの要件 (B<feature_test_macros>(7)  参照):"
1175
1176 #. type: Plain text
1177 #: build/C/man2/madvise.2:50
1178 msgid "B<madvise>(): _BSD_SOURCE"
1179 msgstr "B<madvise>(): _BSD_SOURCE"
1180
1181 #. type: Plain text
1182 #: build/C/man2/madvise.2:68
1183 msgid ""
1184 "The B<madvise>()  system call advises the kernel about how to handle paging "
1185 "input/output in the address range beginning at address I<addr> and with size "
1186 "I<length> bytes.  It allows an application to tell the kernel how it expects "
1187 "to use some mapped or shared memory areas, so that the kernel can choose "
1188 "appropriate read-ahead and caching techniques.  This call does not influence "
1189 "the semantics of the application (except in the case of B<MADV_DONTNEED>), "
1190 "but may influence its performance.  The kernel is free to ignore the advice."
1191 msgstr ""
1192 "B<madvise>()  システムコールは、アドレス I<addr> からはじまる I<length> バイ"
1193 "トのメモリブロックのページング入出力をどう扱えば良いか、 カーネルにアドバイス"
1194 "する。 これを用いると、 アプリケーションからカーネルに、 マップされたメモリや"
1195 "共有メモリをどのように扱ってほしいか伝えることができ、 カーネルはそれに応じて"
1196 "先読みやキャッシュなどの適切な手法を選択できる。 このコールはアプリケーション"
1197 "の動作そのものには影響しない (B<MADV_DONTNEED> の場合は別) が、 性能には影響"
1198 "しうる。 なおこのアドバイスを受け入れるかどうかはカーネルに任される。"
1199
1200 #. type: Plain text
1201 #: build/C/man2/madvise.2:72
1202 msgid "The advice is indicated in the I<advice> argument which can be"
1203 msgstr ""
1204 "アドバイスは引き数 I<advice> によって与える。以下のいずれかを指定できる。"
1205
1206 #. type: TP
1207 #: build/C/man2/madvise.2:72
1208 #, no-wrap
1209 msgid "B<MADV_NORMAL>"
1210 msgstr "B<MADV_NORMAL>"
1211
1212 #. type: Plain text
1213 #: build/C/man2/madvise.2:76
1214 msgid "No special treatment.  This is the default."
1215 msgstr "特別な扱いは行わない。これがデフォルトである。"
1216
1217 #. type: TP
1218 #: build/C/man2/madvise.2:76
1219 #, no-wrap
1220 msgid "B<MADV_RANDOM>"
1221 msgstr "B<MADV_RANDOM>"
1222
1223 #. type: Plain text
1224 #: build/C/man2/madvise.2:80
1225 msgid ""
1226 "Expect page references in random order.  (Hence, read ahead may be less "
1227 "useful than normally.)"
1228 msgstr ""
1229 "ページ参照はランダムな順序で行われそうだ。 (したがって、先読みはあまり効果が"
1230 "なさそうだ。)"
1231
1232 #. type: TP
1233 #: build/C/man2/madvise.2:80
1234 #, no-wrap
1235 msgid "B<MADV_SEQUENTIAL>"
1236 msgstr "B<MADV_SEQUENTIAL>"
1237
1238 #. type: Plain text
1239 #: build/C/man2/madvise.2:85
1240 msgid ""
1241 "Expect page references in sequential order.  (Hence, pages in the given "
1242 "range can be aggressively read ahead, and may be freed soon after they are "
1243 "accessed.)"
1244 msgstr ""
1245 "ページ参照はシーケンシャルな順序で行われそうだ。 (したがって与えた範囲のペー"
1246 "ジは積極的に先読みしておくと良いだろう。 またアクセスが終わったら速やかに解放"
1247 "して良い。)"
1248
1249 #. type: TP
1250 #: build/C/man2/madvise.2:85
1251 #, no-wrap
1252 msgid "B<MADV_WILLNEED>"
1253 msgstr "B<MADV_WILLNEED>"
1254
1255 #. type: Plain text
1256 #: build/C/man2/madvise.2:89
1257 msgid ""
1258 "Expect access in the near future.  (Hence, it might be a good idea to read "
1259 "some pages ahead.)"
1260 msgstr ""
1261 "近い将来にアクセスされそうだ。 (したがってこれらのページを今のうちに先読みし"
1262 "ておくといいだろう。)"
1263
1264 #. type: TP
1265 #: build/C/man2/madvise.2:89
1266 #, no-wrap
1267 msgid "B<MADV_DONTNEED>"
1268 msgstr "B<MADV_DONTNEED>"
1269
1270 #. type: Plain text
1271 #: build/C/man2/madvise.2:100
1272 msgid ""
1273 "Do not expect access in the near future.  (For the time being, the "
1274 "application is finished with the given range, so the kernel can free "
1275 "resources associated with it.)  Subsequent accesses of pages in this range "
1276 "will succeed, but will result either in reloading of the memory contents "
1277 "from the underlying mapped file (see B<mmap>(2))  or zero-fill-on-demand "
1278 "pages for mappings without an underlying file."
1279 msgstr ""
1280 "しばらくアクセスはなさそうだ。 (現時点でアプリケーションは与えた範囲の処理を"
1281 "終えている。 したがってカーネルはこれに関連するリソースを解放して良い。)  こ"
1282 "れ以降この範囲のページへのアクセスがあると、 成功はするが、メモリの内容をマッ"
1283 "プ元のファイルからロードし直すことになる (B<mmap>(2)  を見よ) か、 または元"
1284 "ファイルがないマップページでは アクセスがあったときに 0 埋めが行われることに"
1285 "なる。"
1286
1287 #. type: TP
1288 #: build/C/man2/madvise.2:100
1289 #, no-wrap
1290 msgid "B<MADV_REMOVE> (Since Linux 2.6.16)"
1291 msgstr "B<MADV_REMOVE> (Linux 2.6.16 以降)"
1292
1293 #.  2.6.18-rc5
1294 #.  Databases want to use this feature to drop a section of their
1295 #.  bufferpool (shared memory segments) - without writing back to
1296 #.  disk/swap space.  This feature is also useful for supporting
1297 #.  hot-plug memory on UML.
1298 #. type: Plain text
1299 #: build/C/man2/madvise.2:113
1300 msgid ""
1301 "Free up a given range of pages and its associated backing store.  Currently, "
1302 "only shmfs/tmpfs supports this; other file systems return with the error "
1303 "B<ENOSYS>."
1304 msgstr ""
1305 "指定された範囲のページと関連するバッキングストアを解放する。 現在のところ、 "
1306 "shmfs/tmpfs だけがこれに対応している。 他のファイルシステムでは B<ENOSYS> が"
1307 "返される。"
1308
1309 #. type: TP
1310 #: build/C/man2/madvise.2:113
1311 #, no-wrap
1312 msgid "B<MADV_DONTFORK> (Since Linux 2.6.16)"
1313 msgstr "B<MADV_DONTFORK> (Linux 2.6.16 以降)"
1314
1315 #.  See http://lwn.net/Articles/171941/
1316 #.  [PATCH] madvise MADV_DONTFORK/MADV_DOFORK
1317 #.  Currently, copy-on-write may change the physical address of
1318 #.  a page even if the user requested that the page is pinned in
1319 #.  memory (either by mlock or by get_user_pages).  This happens
1320 #.  if the process forks meanwhile, and the parent writes to that
1321 #.  page.  As a result, the page is orphaned: in case of
1322 #.  get_user_pages, the application will never see any data hardware
1323 #.  DMA's into this page after the COW.  In case of mlock'd memory,
1324 #.  the parent is not getting the realtime/security benefits of mlock.
1325 #.  In particular, this affects the Infiniband modules which do DMA from
1326 #.  and into user pages all the time.
1327 #.  This patch adds madvise options to control whether memory range is
1328 #.  inherited across fork. Useful e.g. for when hardware is doing DMA
1329 #.  from/into these pages.  Could also be useful to an application
1330 #.  wanting to speed up its forks by cutting large areas out of
1331 #.  consideration.
1332 #.  SEE ALSO: http://lwn.net/Articles/171941/
1333 #.  "Tweaks to madvise() and posix_fadvise()", 14 Feb 2006
1334 #. type: Plain text
1335 #: build/C/man2/madvise.2:144
1336 msgid ""
1337 "Do not make the pages in this range available to the child after a B<fork>"
1338 "(2).  This is useful to prevent copy-on-write semantics from changing the "
1339 "physical location of a page(s) if the parent writes to it after a B<fork>"
1340 "(2).  (Such page relocations cause problems for hardware that DMAs into the "
1341 "page(s).)"
1342 msgstr ""
1343 "B<fork>(2)  が行われた後、指定された範囲のページを子プロセスが利用できないよ"
1344 "うにする。 この機能は、書き込み時コピー (copy-on-write) 方式で、 B<fork>(2)  "
1345 "の後で親プロセスがページに書き込みを行った場合に ページの物理位置が変化しない"
1346 "ようにするのに有効である (ページの再配置はハードウェアがそのページに DMA 転送"
1347 "を行うような場合に 問題を起こすことがある)。"
1348
1349 #. type: TP
1350 #: build/C/man2/madvise.2:144
1351 #, no-wrap
1352 msgid "B<MADV_DOFORK> (Since Linux 2.6.16)"
1353 msgstr "B<MADV_DOFORK> (Linux 2.6.16 以降)"
1354
1355 #. type: Plain text
1356 #: build/C/man2/madvise.2:150
1357 msgid ""
1358 "Undo the effect of B<MADV_DONTFORK>, restoring the default behavior, whereby "
1359 "a mapping is inherited across B<fork>(2)."
1360 msgstr ""
1361 "B<MADV_DONTFORK> の影響を取り消し、デフォルトの動作に戻す。 つまり、 B<fork>"
1362 "(2)  の前後でマッピングは継承されるようになる。"
1363
1364 #. type: TP
1365 #: build/C/man2/madvise.2:150
1366 #, no-wrap
1367 msgid "B<MADV_HWPOISON> (Since Linux 2.6.32)"
1368 msgstr "B<MADV_HWPOISON> (Linux 2.6.32 以降)"
1369
1370 #. type: Plain text
1371 #: build/C/man2/madvise.2:162
1372 msgid ""
1373 "Poison a page and handle it like a hardware memory corruption.  This "
1374 "operation is only available for privileged (B<CAP_SYS_ADMIN>)  processes.  "
1375 "This operation may result in the calling process receiving a B<SIGBUS> and "
1376 "the page being unmapped.  This feature is intended for testing of memory "
1377 "error-handling code; it is only available if the kernel was configured with "
1378 "B<CONFIG_MEMORY_FAILURE>."
1379 msgstr ""
1380
1381 #. type: TP
1382 #: build/C/man2/madvise.2:162
1383 #, no-wrap
1384 msgid "B<MADV_SOFT_OFFLINE> (Since Linux 2.6.33)"
1385 msgstr "B<MADV_SOFT_OFFLINE> (Linux 2.6.33 以降)"
1386
1387 #. type: Plain text
1388 #: build/C/man2/madvise.2:180
1389 msgid ""
1390 "Soft offline the pages in the range specified by I<addr> and I<length>.  The "
1391 "memory of each page in the specified range is preserved (i.e., when next "
1392 "accessed, the same content will be visible, but in a new physical page "
1393 "frame), and the original page is offlined (i.e., no longer used, and taken "
1394 "out of normal memory management).  The effect of the B<MADV_SOFT_OFFLINE> "
1395 "operation is invisible to (i.e., does not change the semantics of)  the "
1396 "calling process.  This feature is intended for testing of memory error-"
1397 "handling code; it is only available if the kernel was configured with "
1398 "B<CONFIG_MEMORY_FAILURE>."
1399 msgstr ""
1400
1401 #. type: TP
1402 #: build/C/man2/madvise.2:180
1403 #, no-wrap
1404 msgid "B<MADV_MERGEABLE> (since Linux 2.6.32)"
1405 msgstr "B<MADV_MERGEABLE> (Linux 2.6.32 以降)"
1406
1407 #. type: Plain text
1408 #: build/C/man2/madvise.2:205
1409 msgid ""
1410 "Enable Kernel Samepage Merging (KSM) for the pages in the range specified by "
1411 "I<addr> and I<length>.  The kernel regularly scans those areas of user "
1412 "memory that have been marked as mergeable, looking for pages with identical "
1413 "content.  These are replaced by a single write-protected page (which is "
1414 "automatically copied if a process later wants to update the content of the "
1415 "page).  KSM only merges private anonymous pages (see B<mmap>(2)).  The KSM "
1416 "feature is intended for applications that generate many instances of the "
1417 "same data (e.g., virtualization systems such as KVM).  It can consume a lot "
1418 "of processing power; use with care.  See the Linux kernel source file "
1419 "I<Documentation/vm/ksm.txt> for more details.  The B<MADV_MERGEABLE> and "
1420 "B<MADV_UNMERGEABLE> operations are only available if the kernel was "
1421 "configured with B<CONFIG_KSM>."
1422 msgstr ""
1423
1424 #. type: TP
1425 #: build/C/man2/madvise.2:205
1426 #, no-wrap
1427 msgid "B<MADV_UNMERGEABLE> (since Linux 2.6.32)"
1428 msgstr "B<MADV_UNMERGEABLE> (Linux 2.6.32 以降)"
1429
1430 #. type: Plain text
1431 #: build/C/man2/madvise.2:214
1432 msgid ""
1433 "Undo the effect of an earlier B<MADV_MERGEABLE> operation on the specified "
1434 "address range; KSM unmerges whatever pages it had merged in the address "
1435 "range specified by I<addr> and I<length>."
1436 msgstr ""
1437
1438 #. type: TP
1439 #: build/C/man2/madvise.2:214
1440 #, no-wrap
1441 msgid "B<MADV_HUGEPAGE> (since Linux 2.6.38)"
1442 msgstr "B<MADV_HUGEPAGE> (Linux 2.6.38 以降)"
1443
1444 #.  http://lwn.net/Articles/358904/
1445 #.  https://lwn.net/Articles/423584/
1446 #. type: Plain text
1447 #: build/C/man2/madvise.2:243
1448 msgid ""
1449 "Enables Transparent Huge Pages (THP) for pages in the range specified by "
1450 "I<addr> and I<length>.  Currently, Transparent Huge Pages only work with "
1451 "private anonymous pages (see B<mmap>(2)).  The kernel will regularly scan "
1452 "the areas marked as huge page candidates to replace them with huge pages.  "
1453 "The kernel will also allocate huge pages directly when the region is "
1454 "naturally aligned to the huge page size (see B<posix_memalign>(2)).  This "
1455 "feature is primarily aimed at applications that use large mappings of data "
1456 "and access large regions of that memory at a time (e.g., virtualization "
1457 "systems such as QEMU).  It can very easily waste memory (e.g., a 2MB mapping "
1458 "that only ever accesses 1 byte will result in 2MB of wired memory instead of "
1459 "one 4KB page).  See the Linux kernel source file I<Documentation/vm/"
1460 "transhuge.txt> for more details.  The B<MADV_HUGEPAGE> and "
1461 "B<MADV_NOHUGEPAGE> operations are only available if the kernel was "
1462 "configured with B<CONFIG_TRANSPARENT_HUGEPAGE>."
1463 msgstr ""
1464
1465 #. type: TP
1466 #: build/C/man2/madvise.2:243
1467 #, no-wrap
1468 msgid "B<MADV_NOHUGEPAGE> (since Linux 2.6.38)"
1469 msgstr "B<MADV_NOHUGEPAGE> (Linux 2.6.38 以降)"
1470
1471 #. type: Plain text
1472 #: build/C/man2/madvise.2:250
1473 msgid ""
1474 "Ensures that memory in the address range specified by I<addr> and I<length> "
1475 "will not be collapsed into huge pages."
1476 msgstr ""
1477
1478 #. type: TP
1479 #: build/C/man2/madvise.2:250
1480 #, no-wrap
1481 msgid "B<MADV_DONTDUMP> (since Linux 3.4)"
1482 msgstr "B<MADV_DONTDUMP> (Linux 3.4 以降)"
1483
1484 #. type: Plain text
1485 #: build/C/man2/madvise.2:264
1486 msgid ""
1487 "Exclude from a core dump those pages in the range specified by I<addr> and "
1488 "I<length>.  This is useful in applications that have large areas of memory "
1489 "that are known not to be useful in a core dump.  The effect of "
1490 "B<MADV_DONTDUMP> takes precedence over the bit mask that is set via the I</"
1491 "proc/PID/coredump_filter> file (see B<core>(5))."
1492 msgstr ""
1493
1494 #. type: TP
1495 #: build/C/man2/madvise.2:264
1496 #, no-wrap
1497 msgid "B<MADV_DODUMP> (since Linux 3.4)"
1498 msgstr "B<MADV_DODUMP> (Linux 3.4 以降)"
1499
1500 #. type: Plain text
1501 #: build/C/man2/madvise.2:268
1502 msgid "Undo the effect of an earlier B<MADV_DONTDUMP>."
1503 msgstr ""
1504
1505 #. type: Plain text
1506 #: build/C/man2/madvise.2:275
1507 msgid ""
1508 "On success B<madvise>()  returns zero.  On error, it returns -1 and I<errno> "
1509 "is set appropriately."
1510 msgstr ""
1511 "B<madvise>()  は成功すると 0 を返す。 エラーが起こると -1 を返し、 I<errno> "
1512 "を適切な値に設定する。"
1513
1514 #. type: TP
1515 #: build/C/man2/madvise.2:276 build/C/man2/mlock.2:154 build/C/man2/mmap.2:413
1516 #: build/C/man2/mremap.2:136
1517 #, no-wrap
1518 msgid "B<EAGAIN>"
1519 msgstr "B<EAGAIN>"
1520
1521 #. type: Plain text
1522 #: build/C/man2/madvise.2:279
1523 msgid "A kernel resource was temporarily unavailable."
1524 msgstr "何らかのカーネルリソースが一時的に利用できなかった。"
1525
1526 #. type: Plain text
1527 #: build/C/man2/madvise.2:282
1528 msgid "The map exists, but the area maps something that isn't a file."
1529 msgstr "指定したマップは存在するが、ファイルではないところをマップしている。"
1530
1531 #. type: Plain text
1532 #: build/C/man2/madvise.2:285
1533 msgid "This error can occur for the following reasons:"
1534 msgstr ""
1535
1536 #. type: IP
1537 #: build/C/man2/madvise.2:286 build/C/man2/madvise.2:292
1538 #: build/C/man2/madvise.2:295 build/C/man2/madvise.2:298
1539 #: build/C/man2/madvise.2:301 build/C/man3/mallopt.3:235
1540 #: build/C/man3/mallopt.3:241
1541 #, no-wrap
1542 msgid "*"
1543 msgstr "*"
1544
1545 #.  .I len
1546 #.  is zero,
1547 #. type: Plain text
1548 #: build/C/man2/madvise.2:292
1549 msgid "The value I<len> is negative."
1550 msgstr "I<len> が負の値である。"
1551
1552 #. type: Plain text
1553 #: build/C/man2/madvise.2:295
1554 msgid "I<addr> is not page-aligned."
1555 msgstr ""
1556
1557 #. type: Plain text
1558 #: build/C/man2/madvise.2:298
1559 msgid "I<advice> is not a valid value"
1560 msgstr "I<advice> が有効な値でない。"
1561
1562 #. type: Plain text
1563 #: build/C/man2/madvise.2:301
1564 msgid ""
1565 "The application is attempting to release locked or shared pages (with "
1566 "B<MADV_DONTNEED>)."
1567 msgstr ""
1568 "アプリケーションがロックされたページや共有ページを (B<MADV_DONTNEED> で) 解"
1569 "放\n"
1570 "しようとしている。"
1571
1572 #. type: Plain text
1573 #: build/C/man2/madvise.2:309
1574 msgid ""
1575 "B<MADV_MERGEABLE> or B<MADV_UNMERGEABLE> was specified in I<advice>, but the "
1576 "kernel was not configured with B<CONFIG_KSM>."
1577 msgstr ""
1578
1579 #. type: Plain text
1580 #: build/C/man2/madvise.2:316
1581 msgid ""
1582 "(for B<MADV_WILLNEED>)  Paging in this area would exceed the process's "
1583 "maximum resident set size."
1584 msgstr ""
1585 "(B<MADV_WILLNEED> の場合) この範囲のページングを行うと、 プロセスの RSS "
1586 "(resident set size) の最大値を越えてしまう。"
1587
1588 #. type: TP
1589 #: build/C/man2/madvise.2:316 build/C/man2/madvise.2:321
1590 #: build/C/man2/mlock.2:123 build/C/man2/mlock.2:131 build/C/man2/mlock.2:169
1591 #: build/C/man2/mmap.2:456 build/C/man2/mprotect.2:100
1592 #: build/C/man2/mprotect.2:103 build/C/man2/mremap.2:179
1593 #: build/C/man2/msync.2:93 build/C/man3/posix_memalign.3:162
1594 #: build/C/man2/shmctl.2:328 build/C/man2/shmget.2:213
1595 #: build/C/man2/shmop.2:214 build/C/man2/subpage_prot.2:87
1596 #: build/C/man2/sync_file_range.2:163
1597 #, no-wrap
1598 msgid "B<ENOMEM>"
1599 msgstr "B<ENOMEM>"
1600
1601 #. type: Plain text
1602 #: build/C/man2/madvise.2:321
1603 msgid "(for B<MADV_WILLNEED>)  Not enough memory: paging in failed."
1604 msgstr "(B<MADV_WILLNEED> の場合) メモリが足りず、ページングに失敗した。"
1605
1606 #. type: Plain text
1607 #: build/C/man2/madvise.2:325
1608 msgid ""
1609 "Addresses in the specified range are not currently mapped, or are outside "
1610 "the address space of the process."
1611 msgstr ""
1612 "指定した範囲のアドレスが、現在マップされていない。 あるいはプロセスのアドレス"
1613 "空間の内部にない。"
1614
1615 #.  FIXME . Write a posix_madvise(3) page.
1616 #. type: Plain text
1617 #: build/C/man2/madvise.2:337
1618 msgid ""
1619 "POSIX.1b.  POSIX.1-2001 describes B<posix_madvise>(3)  with constants "
1620 "B<POSIX_MADV_NORMAL>, etc., with a behavior close to that described here.  "
1621 "There is a similar B<posix_fadvise>(2)  for file access."
1622 msgstr ""
1623 "POSIX.1b.  POSIX.1-2001 では、 B<posix_madvise>(3)  を B<POSIX_MADV_NORMAL> "
1624 "などの定数とともに記述していた (それぞれの振る舞いはここで述べたものに近"
1625 "い)。 ファイルアクセスに対しても B<posix_fadvise>(2)  という類似の関数が存在"
1626 "する。"
1627
1628 #. type: Plain text
1629 #: build/C/man2/madvise.2:346
1630 msgid ""
1631 "B<MADV_REMOVE>, B<MADV_DONTFORK>, B<MADV_DOFORK>, B<MADV_HWPOISON>, "
1632 "B<MADV_MERGEABLE>, and B<MADV_UNMERGEABLE> are Linux-specific."
1633 msgstr ""
1634 "B<MADV_REMOVE>, B<MADV_DONTFORK>, B<MADV_DOFORK>, B<MADV_HWPOISON>,\n"
1635 "B<MADV_MERGEABLE>, B<MADV_UNMERGEABLE> は Linux 固有である。"
1636
1637 #. type: SS
1638 #: build/C/man2/madvise.2:347 build/C/man2/mlock.2:267
1639 #: build/C/man2/shmget.2:293
1640 #, fuzzy, no-wrap
1641 #| msgid "Linux Notes"
1642 msgid "Linux notes"
1643 msgstr "Linux での注意"
1644
1645 #. type: Plain text
1646 #: build/C/man2/madvise.2:355
1647 msgid ""
1648 "The current Linux implementation (2.4.0) views this system call more as a "
1649 "command than as advice and hence may return an error when it cannot do what "
1650 "it usually would do in response to this advice.  (See the ERRORS description "
1651 "above.)  This is nonstandard behavior."
1652 msgstr ""
1653 "現在の Linux の実装 (2.4.0) では、 このシステムコールをアドバイスというよりは"
1654 "命令と見ている。 したがってこのアドバイスに対して通常行われる動作が不可能な場"
1655 "合は、 エラーを返すことがある (上記の エラー の記述を参照)。 この振舞いは標準"
1656 "とは異なる。"
1657
1658 #.  .SH HISTORY
1659 #.  The
1660 #.  .BR madvise ()
1661 #.  function first appeared in 4.4BSD.
1662 #. type: Plain text
1663 #: build/C/man2/madvise.2:371
1664 msgid ""
1665 "The Linux implementation requires that the address I<addr> be page-aligned, "
1666 "and allows I<length> to be zero.  If there are some parts of the specified "
1667 "address range that are not mapped, the Linux version of B<madvise>()  "
1668 "ignores them and applies the call to the rest (but returns B<ENOMEM> from "
1669 "the system call, as it should)."
1670 msgstr ""
1671 "Linux の実装では I<addr> のアドレスはページ境界の値でなければならない。また "
1672 "I<length> は 0 であっても構わない。 また Linux 版の B<madvise>()  では、指定"
1673 "されたアドレス範囲にマップされていない部分があると、 これらを無視して残りの部"
1674 "分にアドバイスを適用する (しかしシステムコールに対してはちゃんと B<ENOMEM> を"
1675 "返す)。"
1676
1677 #. type: Plain text
1678 #: build/C/man2/madvise.2:379
1679 msgid ""
1680 "B<getrlimit>(2), B<mincore>(2), B<mmap>(2), B<mprotect>(2), B<msync>(2), "
1681 "B<munmap>(2), B<core>(5)"
1682 msgstr ""
1683 "B<getrlimit>(2), B<mincore>(2), B<mmap>(2), B<mprotect>(2), B<msync>(2), "
1684 "B<munmap>(2), B<core>(5)"
1685
1686 #. type: TH
1687 #: build/C/man3/mallinfo.3:26
1688 #, no-wrap
1689 msgid "MALLINFO"
1690 msgstr "MALLINFO"
1691
1692 #. type: TH
1693 #: build/C/man3/mallinfo.3:26 build/C/man3/malloc_stats.3:26
1694 #, no-wrap
1695 msgid "2012-05-06"
1696 msgstr "2012-05-06"
1697
1698 #. type: Plain text
1699 #: build/C/man3/mallinfo.3:29
1700 msgid "mallinfo - obtain memory allocation information"
1701 msgstr "mallinfo - メモリ割り当て情報を取得する"
1702
1703 #. type: Plain text
1704 #: build/C/man3/mallinfo.3:31 build/C/man3/malloc_stats.3:31
1705 #: build/C/man3/malloc_trim.3:31 build/C/man3/malloc_usable_size.3:30
1706 #: build/C/man3/mallopt.3:31
1707 msgid "B<#include E<lt>malloc.hE<gt>>"
1708 msgstr "B<#include E<lt>malloc.hE<gt>>"
1709
1710 #. type: Plain text
1711 #: build/C/man3/mallinfo.3:33
1712 msgid "B<struct mallinfo mallinfo(void);>"
1713 msgstr "B<struct mallinfo mallinfo(void);>"
1714
1715 #. type: Plain text
1716 #: build/C/man3/mallinfo.3:41
1717 msgid ""
1718 "The B<mallinfo>()  function returns a copy of a structure containing "
1719 "information about memory allocations performed by B<malloc>(3)  and related "
1720 "functions.  This structure is defined as follows:"
1721 msgstr ""
1722 "B<mallinfo>() 関数は、 B<malloc>(3) や一連の関数により実行されたメモリ\n"
1723 "割り当てに関する情報を格納した構造体のコピーを返す。\n"
1724 "この構造体は以下のように定義されている。"
1725
1726 #. type: Plain text
1727 #: build/C/man3/mallinfo.3:56
1728 #, no-wrap
1729 msgid ""
1730 "struct mallinfo {\n"
1731 "    int arena;     /* Non-mmapped space allocated (bytes) */\n"
1732 "    int ordblks;   /* Number of free chunks */\n"
1733 "    int smblks;    /* Number of free fastbin blocks */\n"
1734 "    int hblks;     /* Number of mmapped regions */\n"
1735 "    int hblkhd;    /* Space allocated in mmapped regions (bytes) */\n"
1736 "    int usmblks;   /* Maximum total allocated space (bytes) */\n"
1737 "    int fsmblks;   /* Space in freed fastbin blocks (bytes) */\n"
1738 "    int uordblks;  /* Total allocated space (bytes) */\n"
1739 "    int fordblks;  /* Total free space (bytes) */\n"
1740 "    int keepcost;  /* Top-most, releasable space (bytes) */\n"
1741 "};\n"
1742 msgstr ""
1743 "struct mallinfo {\n"
1744 "    int arena;     /* Non-mmapped space allocated (bytes) */\n"
1745 "    int ordblks;   /* Number of free chunks */\n"
1746 "    int smblks;    /* Number of free fastbin blocks */\n"
1747 "    int hblks;     /* Number of mmapped regions */\n"
1748 "    int hblkhd;    /* Space allocated in mmapped regions (bytes) */\n"
1749 "    int usmblks;   /* Maximum total allocated space (bytes) */\n"
1750 "    int fsmblks;   /* Space in freed fastbin blocks (bytes) */\n"
1751 "    int uordblks;  /* Total allocated space (bytes) */\n"
1752 "    int fordblks;  /* Total free space (bytes) */\n"
1753 "    int keepcost;  /* Top-most, releasable space (bytes) */\n"
1754 "};\n"
1755
1756 #. type: Plain text
1757 #: build/C/man3/mallinfo.3:62
1758 msgid ""
1759 "The fields of the I<mallinfo> structure contain the following information:"
1760 msgstr "I<mallinfo> 構造体の各フィールドには以下の情報が格納される。"
1761
1762 #. type: TP
1763 #: build/C/man3/mallinfo.3:62
1764 #, no-wrap
1765 msgid "I<arena>"
1766 msgstr "I<arena>"
1767
1768 #. type: Plain text
1769 #: build/C/man3/mallinfo.3:68
1770 msgid ""
1771 "The total amount of memory allocated by means other than B<mmap>(2)  (i.e., "
1772 "memory allocated on the heap).  This figure includes both in-use blocks and "
1773 "blocks on the free list."
1774 msgstr ""
1775
1776 #. type: TP
1777 #: build/C/man3/mallinfo.3:68
1778 #, no-wrap
1779 msgid "I<ordblks>"
1780 msgstr "I<ordblks>"
1781
1782 #. type: Plain text
1783 #: build/C/man3/mallinfo.3:71
1784 msgid "The number of ordinary (i.e., non-fastbin) free blocks."
1785 msgstr ""
1786
1787 #. type: TP
1788 #: build/C/man3/mallinfo.3:71
1789 #, no-wrap
1790 msgid "I<smblks>"
1791 msgstr "I<smblks>"
1792
1793 #. type: Plain text
1794 #: build/C/man3/mallinfo.3:75
1795 msgid "The number of fastbin free blocks (see B<mallopt>(3))."
1796 msgstr ""
1797
1798 #. type: TP
1799 #: build/C/man3/mallinfo.3:75
1800 #, no-wrap
1801 msgid "I<hblks>"
1802 msgstr "I<hblks>"
1803
1804 #. type: Plain text
1805 #: build/C/man3/mallinfo.3:83
1806 msgid ""
1807 "The number of blocks currently allocated using B<mmap>(2).  (See the "
1808 "discussion of B<M_MMAP_THRESHOLD> in B<mallopt>(3).)"
1809 msgstr ""
1810
1811 #. type: TP
1812 #: build/C/man3/mallinfo.3:83
1813 #, no-wrap
1814 msgid "I<hblkhd>"
1815 msgstr "I<hblkhd>"
1816
1817 #. type: Plain text
1818 #: build/C/man3/mallinfo.3:87
1819 msgid "The number of bytes in blocks currently allocated using B<mmap>(2)."
1820 msgstr ""
1821
1822 #. type: TP
1823 #: build/C/man3/mallinfo.3:87
1824 #, no-wrap
1825 msgid "I<usmblks>"
1826 msgstr "I<usmblks>"
1827
1828 #. type: Plain text
1829 #: build/C/man3/mallinfo.3:92
1830 msgid ""
1831 "The \"highwater mark\" for allocated space\\(emthat is, the maximum amount "
1832 "of space that was ever allocated.  This field is maintained only in "
1833 "nonthreading environments."
1834 msgstr ""
1835
1836 #. type: TP
1837 #: build/C/man3/mallinfo.3:92
1838 #, no-wrap
1839 msgid "I<fsmblks>"
1840 msgstr "I<fsmblks>"
1841
1842 #. type: Plain text
1843 #: build/C/man3/mallinfo.3:95
1844 msgid "The total number of bytes in fastbin free blocks."
1845 msgstr ""
1846
1847 #. type: TP
1848 #: build/C/man3/mallinfo.3:95
1849 #, no-wrap
1850 msgid "I<uordblks>"
1851 msgstr "I<uordblks>"
1852
1853 #. type: Plain text
1854 #: build/C/man3/mallinfo.3:98
1855 msgid "The total number of bytes used by in-use allocations."
1856 msgstr ""
1857
1858 #. type: TP
1859 #: build/C/man3/mallinfo.3:98
1860 #, no-wrap
1861 msgid "I<fordblks>"
1862 msgstr "I<fordblks>"
1863
1864 #. type: Plain text
1865 #: build/C/man3/mallinfo.3:101
1866 msgid "The total number of bytes in free blocks."
1867 msgstr ""
1868
1869 #. type: TP
1870 #: build/C/man3/mallinfo.3:101
1871 #, no-wrap
1872 msgid "I<keepcost>"
1873 msgstr "I<keepcost>"
1874
1875 #.  .SH VERSIONS
1876 #.  Available already in glibc 2.0, possibly earlier
1877 #. type: Plain text
1878 #: build/C/man3/mallinfo.3:110
1879 msgid ""
1880 "The total amount of releasable free space at the top of the heap.  This is "
1881 "the maximum number of bytes that could ideally (i.e., ignoring page "
1882 "alignment restrictions, and so on) be released by B<malloc_trim>(3)."
1883 msgstr ""
1884
1885 #. type: Plain text
1886 #: build/C/man3/mallinfo.3:114
1887 msgid ""
1888 "This function is not specified by POSIX or the C standards.  A similar "
1889 "function exists on many System V derivatives, and was specified in the SVID."
1890 msgstr ""
1891
1892 #.  FIXME http://sourceware.org/bugzilla/show_bug.cgi?id=208
1893 #.  See the 24 Aug 2011 mail by Paul Pluzhnikov:
1894 #.      "[patch] Fix mallinfo() to accumulate results for all arenas"
1895 #.  on libc-alpha@sourceware.org
1896 #. type: Plain text
1897 #: build/C/man3/mallinfo.3:126
1898 msgid ""
1899 "B<Information is returned for only the main memory allocation area.> "
1900 "Allocations in other arenas are excluded.  See B<malloc_stats>(3)  and "
1901 "B<malloc_info>(3)  for alternatives that include information about other "
1902 "arenas."
1903 msgstr ""
1904
1905 #. type: Plain text
1906 #: build/C/man3/mallinfo.3:134
1907 msgid ""
1908 "The fields of the I<mallinfo> structure are typed as I<int>.  However, "
1909 "because some internal bookkeeping values may be of type I<long>, the "
1910 "reported values may wrap around zero and thus be inaccurate."
1911 msgstr ""
1912
1913 #. type: SH
1914 #: build/C/man3/mallinfo.3:134 build/C/man3/malloc_hook.3:89
1915 #: build/C/man3/malloc_info.3:82 build/C/man3/mallopt.3:466
1916 #: build/C/man3/mcheck.3:159 build/C/man2/mmap.2:630
1917 #: build/C/man2/mprotect.2:148 build/C/man3/mtrace.3:108
1918 #, no-wrap
1919 msgid "EXAMPLE"
1920 msgstr "例"
1921
1922 #. type: Plain text
1923 #: build/C/man3/mallinfo.3:140
1924 msgid ""
1925 "The program below employs B<mallinfo>()  to retrieve memory allocation "
1926 "statistics before and after allocating and freeing some blocks of memory.  "
1927 "The statistics are displayed on standard output."
1928 msgstr ""
1929
1930 #. type: Plain text
1931 #: build/C/man3/mallinfo.3:144
1932 msgid ""
1933 "The first two command-line arguments specify the number and size of blocks "
1934 "to be allocated with B<malloc>(3)."
1935 msgstr ""
1936
1937 #. type: Plain text
1938 #: build/C/man3/mallinfo.3:158
1939 msgid ""
1940 "The remaining three arguments specify which of the allocated blocks should "
1941 "be freed with B<free>(3).  These three arguments are optional, and specify "
1942 "(in order): the step size to be used in the loop that frees blocks (the "
1943 "default is 1, meaning free all blocks in the range); the ordinal position of "
1944 "the first block to be freed (default 0, meaning the first allocated block); "
1945 "and a number one greater than the ordinal position of the last block to be "
1946 "freed (default is one greater than the maximum block number).  If these "
1947 "three arguments are omitted, then the defaults cause all allocated blocks to "
1948 "be freed."
1949 msgstr ""
1950
1951 #. type: Plain text
1952 #: build/C/man3/mallinfo.3:162
1953 msgid ""
1954 "In the following example run of the program, 1000 allocations of 100 bytes "
1955 "are performed, and then every second allocated block is freed:"
1956 msgstr ""
1957
1958 #. type: Plain text
1959 #: build/C/man3/mallinfo.3:177
1960 #, no-wrap
1961 msgid ""
1962 "$ B<./a.out 1000 100 2>\n"
1963 "============== Before allocating blocks ==============\n"
1964 "Total non-mmapped bytes (arena):       0\n"
1965 "# of free chunks (ordblks):            1\n"
1966 "# of free fastbin blocks (smblks):     0\n"
1967 "# of mapped regions (hblks):           0\n"
1968 "Bytes in mapped regions (hblkhd):      0\n"
1969 "Max. total allocated space (usmblks):  0\n"
1970 "Free bytes held in fastbins (fsmblks): 0\n"
1971 "Total allocated space (uordblks):      0\n"
1972 "Total free space (fordblks):           0\n"
1973 "Topmost releasable block (keepcost):   0\n"
1974 msgstr ""
1975 "$ B<./a.out 1000 100 2>\n"
1976 "============== Before allocating blocks ==============\n"
1977 "Total non-mmapped bytes (arena):       0\n"
1978 "# of free chunks (ordblks):            1\n"
1979 "# of free fastbin blocks (smblks):     0\n"
1980 "# of mapped regions (hblks):           0\n"
1981 "Bytes in mapped regions (hblkhd):      0\n"
1982 "Max. total allocated space (usmblks):  0\n"
1983 "Free bytes held in fastbins (fsmblks): 0\n"
1984 "Total allocated space (uordblks):      0\n"
1985 "Total free space (fordblks):           0\n"
1986 "Topmost releasable block (keepcost):   0\n"
1987
1988 #. type: Plain text
1989 #: build/C/man3/mallinfo.3:189
1990 #, no-wrap
1991 msgid ""
1992 "============== After allocating blocks ==============\n"
1993 "Total non-mmapped bytes (arena):       135168\n"
1994 "# of free chunks (ordblks):            1\n"
1995 "# of free fastbin blocks (smblks):     0\n"
1996 "# of mapped regions (hblks):           0\n"
1997 "Bytes in mapped regions (hblkhd):      0\n"
1998 "Max. total allocated space (usmblks):  0\n"
1999 "Free bytes held in fastbins (fsmblks): 0\n"
2000 "Total allocated space (uordblks):      104000\n"
2001 "Total free space (fordblks):           31168\n"
2002 "Topmost releasable block (keepcost):   31168\n"
2003 msgstr ""
2004 "============== After allocating blocks ==============\n"
2005 "Total non-mmapped bytes (arena):       135168\n"
2006 "# of free chunks (ordblks):            1\n"
2007 "# of free fastbin blocks (smblks):     0\n"
2008 "# of mapped regions (hblks):           0\n"
2009 "Bytes in mapped regions (hblkhd):      0\n"
2010 "Max. total allocated space (usmblks):  0\n"
2011 "Free bytes held in fastbins (fsmblks): 0\n"
2012 "Total allocated space (uordblks):      104000\n"
2013 "Total free space (fordblks):           31168\n"
2014 "Topmost releasable block (keepcost):   31168\n"
2015
2016 #. type: Plain text
2017 #: build/C/man3/mallinfo.3:201
2018 #, no-wrap
2019 msgid ""
2020 "============== After freeing blocks ==============\n"
2021 "Total non-mmapped bytes (arena):       135168\n"
2022 "# of free chunks (ordblks):            501\n"
2023 "# of free fastbin blocks (smblks):     0\n"
2024 "# of mapped regions (hblks):           0\n"
2025 "Bytes in mapped regions (hblkhd):      0\n"
2026 "Max. total allocated space (usmblks):  0\n"
2027 "Free bytes held in fastbins (fsmblks): 0\n"
2028 "Total allocated space (uordblks):      52000\n"
2029 "Total free space (fordblks):           83168\n"
2030 "Topmost releasable block (keepcost):   31168\n"
2031 msgstr ""
2032 "============== After freeing blocks ==============\n"
2033 "Total non-mmapped bytes (arena):       135168\n"
2034 "# of free chunks (ordblks):            501\n"
2035 "# of free fastbin blocks (smblks):     0\n"
2036 "# of mapped regions (hblks):           0\n"
2037 "Bytes in mapped regions (hblkhd):      0\n"
2038 "Max. total allocated space (usmblks):  0\n"
2039 "Free bytes held in fastbins (fsmblks): 0\n"
2040 "Total allocated space (uordblks):      52000\n"
2041 "Total free space (fordblks):           83168\n"
2042 "Topmost releasable block (keepcost):   31168\n"
2043
2044 #. type: SS
2045 #: build/C/man3/mallinfo.3:203 build/C/man3/malloc_info.3:165
2046 #: build/C/man3/mallopt.3:532 build/C/man3/mcheck.3:176
2047 #: build/C/man2/mprotect.2:165
2048 #, no-wrap
2049 msgid "Program source"
2050 msgstr "プログラムのソース"
2051
2052 #. type: Plain text
2053 #: build/C/man3/mallinfo.3:208
2054 #, no-wrap
2055 msgid ""
2056 "#include E<lt>malloc.hE<gt>\n"
2057 "#include \"tlpi_hdr.h\"\n"
2058 msgstr ""
2059 "#include E<lt>malloc.hE<gt>\n"
2060 "#include \"tlpi_hdr.h\"\n"
2061
2062 #. type: Plain text
2063 #: build/C/man3/mallinfo.3:213
2064 #, no-wrap
2065 msgid ""
2066 "static void\n"
2067 "display_mallinfo(void)\n"
2068 "{\n"
2069 "    struct mallinfo mi;\n"
2070 msgstr ""
2071 "static void\n"
2072 "display_mallinfo(void)\n"
2073 "{\n"
2074 "    struct mallinfo mi;\n"
2075
2076 #. type: Plain text
2077 #: build/C/man3/mallinfo.3:215
2078 #, no-wrap
2079 msgid "    mi = mallinfo();\n"
2080 msgstr "    mi = mallinfo();\n"
2081
2082 #. type: Plain text
2083 #: build/C/man3/mallinfo.3:227
2084 #, no-wrap
2085 msgid ""
2086 "    printf(\"Total non-mmapped bytes (arena):       %d\\en\", mi.arena);\n"
2087 "    printf(\"# of free chunks (ordblks):            %d\\en\", mi.ordblks);\n"
2088 "    printf(\"# of free fastbin blocks (smblks):     %d\\en\", mi.smblks);\n"
2089 "    printf(\"# of mapped regions (hblks):           %d\\en\", mi.hblks);\n"
2090 "    printf(\"Bytes in mapped regions (hblkhd):      %d\\en\", mi.hblkhd);\n"
2091 "    printf(\"Max. total allocated space (usmblks):  %d\\en\", mi.usmblks);\n"
2092 "    printf(\"Free bytes held in fastbins (fsmblks): %d\\en\", mi.fsmblks);\n"
2093 "    printf(\"Total allocated space (uordblks):      %d\\en\", mi.uordblks);\n"
2094 "    printf(\"Total free space (fordblks):           %d\\en\", mi.fordblks);\n"
2095 "    printf(\"Topmost releasable block (keepcost):   %d\\en\", mi.keepcost);\n"
2096 "}\n"
2097 msgstr ""
2098 "    printf(\"Total non-mmapped bytes (arena):       %d\\en\", mi.arena);\n"
2099 "    printf(\"# of free chunks (ordblks):            %d\\en\", mi.ordblks);\n"
2100 "    printf(\"# of free fastbin blocks (smblks):     %d\\en\", mi.smblks);\n"
2101 "    printf(\"# of mapped regions (hblks):           %d\\en\", mi.hblks);\n"
2102 "    printf(\"Bytes in mapped regions (hblkhd):      %d\\en\", mi.hblkhd);\n"
2103 "    printf(\"Max. total allocated space (usmblks):  %d\\en\", mi.usmblks);\n"
2104 "    printf(\"Free bytes held in fastbins (fsmblks): %d\\en\", mi.fsmblks);\n"
2105 "    printf(\"Total allocated space (uordblks):      %d\\en\", mi.uordblks);\n"
2106 "    printf(\"Total free space (fordblks):           %d\\en\", mi.fordblks);\n"
2107 "    printf(\"Topmost releasable block (keepcost):   %d\\en\", mi.keepcost);\n"
2108 "}\n"
2109
2110 #. type: Plain text
2111 #: build/C/man3/mallinfo.3:235
2112 #, no-wrap
2113 msgid ""
2114 "int\n"
2115 "main(int argc, char *argv[])\n"
2116 "{\n"
2117 "#define MAX_ALLOCS 2000000\n"
2118 "    char *alloc[MAX_ALLOCS];\n"
2119 "    int numBlocks, j, freeBegin, freeEnd, freeStep;\n"
2120 "    size_t blockSize;\n"
2121 msgstr ""
2122 "int\n"
2123 "main(int argc, char *argv[])\n"
2124 "{\n"
2125 "#define MAX_ALLOCS 2000000\n"
2126 "    char *alloc[MAX_ALLOCS];\n"
2127 "    int numBlocks, j, freeBegin, freeEnd, freeStep;\n"
2128 "    size_t blockSize;\n"
2129
2130 #. type: Plain text
2131 #: build/C/man3/mallinfo.3:239
2132 #, no-wrap
2133 msgid ""
2134 "    if (argc E<lt> 3 || strcmp(argv[1], \"--help\") == 0)\n"
2135 "        usageErr(\"%s num-blocks block-size [free-step [start-free \"\n"
2136 "                \"[end-free]]]\\en\", argv[0]);\n"
2137 msgstr ""
2138 "    if (argc E<lt> 3 || strcmp(argv[1], \"--help\") == 0)\n"
2139 "        usageErr(\"%s num-blocks block-size [free-step [start-free \"\n"
2140 "                \"[end-free]]]\\en\", argv[0]);\n"
2141
2142 #. type: Plain text
2143 #: build/C/man3/mallinfo.3:245
2144 #, no-wrap
2145 msgid ""
2146 "    numBlocks = atoi(argv[1]);\n"
2147 "    blockSize = atoi(argv[2]);\n"
2148 "    freeStep = (argc E<gt> 3) ? atoi(argv[3]) : 1;\n"
2149 "    freeBegin = (argc E<gt> 4) ? atoi(argv[4]) : 0;\n"
2150 "    freeEnd = (argc E<gt> 5) ? atoi(argv[5]) : numBlocks;\n"
2151 msgstr ""
2152 "    numBlocks = atoi(argv[1]);\n"
2153 "    blockSize = atoi(argv[2]);\n"
2154 "    freeStep = (argc E<gt> 3) ? atoi(argv[3]) : 1;\n"
2155 "    freeBegin = (argc E<gt> 4) ? atoi(argv[4]) : 0;\n"
2156 "    freeEnd = (argc E<gt> 5) ? atoi(argv[5]) : numBlocks;\n"
2157
2158 #. type: Plain text
2159 #: build/C/man3/mallinfo.3:248
2160 #, no-wrap
2161 msgid ""
2162 "    printf(\"============== Before allocating blocks ==============\\en\");\n"
2163 "    display_mallinfo();\n"
2164 msgstr ""
2165 "    printf(\"============== Before allocating blocks ==============\\en\");\n"
2166 "    display_mallinfo();\n"
2167
2168 #. type: Plain text
2169 #: build/C/man3/mallinfo.3:252
2170 #, no-wrap
2171 msgid ""
2172 "    for (j = 0; j E<lt> numBlocks; j++) {\n"
2173 "        if (numBlocks E<gt>= MAX_ALLOCS)\n"
2174 "            fatal(\"Too many allocations\");\n"
2175 msgstr ""
2176 "    for (j = 0; j E<lt> numBlocks; j++) {\n"
2177 "        if (numBlocks E<gt>= MAX_ALLOCS)\n"
2178 "            fatal(\"Too many allocations\");\n"
2179
2180 #. type: Plain text
2181 #: build/C/man3/mallinfo.3:257
2182 #, no-wrap
2183 msgid ""
2184 "        alloc[j] = malloc(blockSize);\n"
2185 "        if (alloc[j] == NULL)\n"
2186 "            errExit(\"malloc\");\n"
2187 "    }\n"
2188 msgstr ""
2189 "        alloc[j] = malloc(blockSize);\n"
2190 "        if (alloc[j] == NULL)\n"
2191 "            errExit(\"malloc\");\n"
2192 "    }\n"
2193
2194 #. type: Plain text
2195 #: build/C/man3/mallinfo.3:260
2196 #, no-wrap
2197 msgid ""
2198 "    printf(\"\\en============== After allocating blocks ==============\\en\");\n"
2199 "    display_mallinfo();\n"
2200 msgstr ""
2201 "    printf(\"\\en============== After allocating blocks ==============\\en\");\n"
2202 "    display_mallinfo();\n"
2203
2204 #. type: Plain text
2205 #: build/C/man3/mallinfo.3:263
2206 #, no-wrap
2207 msgid ""
2208 "    for (j = freeBegin; j E<lt> freeEnd; j += freeStep)\n"
2209 "        free(alloc[j]);\n"
2210 msgstr ""
2211 "    for (j = freeBegin; j E<lt> freeEnd; j += freeStep)\n"
2212 "        free(alloc[j]);\n"
2213
2214 #. type: Plain text
2215 #: build/C/man3/mallinfo.3:266
2216 #, no-wrap
2217 msgid ""
2218 "    printf(\"\\en============== After freeing blocks ==============\\en\");\n"
2219 "    display_mallinfo();\n"
2220 msgstr ""
2221 "    printf(\"\\en============== After freeing blocks ==============\\en\");\n"
2222 "    display_mallinfo();\n"
2223
2224 #. type: Plain text
2225 #: build/C/man3/mallinfo.3:269 build/C/man3/malloc_info.3:253
2226 #: build/C/man3/mallopt.3:565 build/C/man3/mcheck.3:203
2227 #: build/C/man2/mmap.2:711
2228 #, no-wrap
2229 msgid ""
2230 "    exit(EXIT_SUCCESS);\n"
2231 "}\n"
2232 msgstr ""
2233 "    exit(EXIT_SUCCESS);\n"
2234 "}\n"
2235
2236 #. type: Plain text
2237 #: build/C/man3/mallinfo.3:279
2238 msgid ""
2239 "B<mmap>(2), B<malloc>(3), B<malloc_info>(3), B<malloc_stats>(3), "
2240 "B<malloc_trim>(3), B<mallopt>(3)"
2241 msgstr ""
2242 "B<mmap>(2), B<malloc>(3), B<malloc_info>(3), B<malloc_stats>(3), "
2243 "B<malloc_trim>(3), B<mallopt>(3)"
2244
2245 #. type: TH
2246 #: build/C/man3/malloc_get_state.3:25
2247 #, no-wrap
2248 msgid "MALLOC_GET_STATE"
2249 msgstr "MALLOC_GET_STATE"
2250
2251 #. type: TH
2252 #: build/C/man3/malloc_get_state.3:25
2253 #, no-wrap
2254 msgid "2012-05-04"
2255 msgstr "2012-05-04"
2256
2257 #. type: Plain text
2258 #: build/C/man3/malloc_get_state.3:28
2259 msgid ""
2260 "malloc_get_state, malloc_set_state - record and restore state of malloc "
2261 "implementation"
2262 msgstr ""
2263
2264 #. type: Plain text
2265 #: build/C/man3/malloc_get_state.3:31 build/C/man3/posix_memalign.3:35
2266 #, no-wrap
2267 msgid "B<#include E<lt>stdlib.hE<gt>>\n"
2268 msgstr "B<#include E<lt>stdlib.hE<gt>>\n"
2269
2270 #. type: Plain text
2271 #: build/C/man3/malloc_get_state.3:33
2272 #, no-wrap
2273 msgid "B<void* malloc_get_state(void);>\n"
2274 msgstr "B<void* malloc_get_state(void);>\n"
2275
2276 #. type: Plain text
2277 #: build/C/man3/malloc_get_state.3:35
2278 #, no-wrap
2279 msgid "B<int malloc_set_state(void *>I<state>B<);>\n"
2280 msgstr "B<int malloc_set_state(void *>I<state>B<);>\n"
2281
2282 #. type: Plain text
2283 #: build/C/man3/malloc_get_state.3:53
2284 msgid ""
2285 "The B<malloc_get_state>()  function records the current state of all "
2286 "B<malloc>(3)  internal bookkeeping variables (but not the actual contents of "
2287 "the heap or the state of B<malloc_hook>(3)  functions pointers).  The state "
2288 "is recorded in a system-dependent opaque data structure dynamically "
2289 "allocated via B<malloc>(3), and a pointer to that data structure is returned "
2290 "as the function result.  (It is the caller's responsibility to B<free>(3)  "
2291 "this memory.)"
2292 msgstr ""
2293
2294 #. type: Plain text
2295 #: build/C/man3/malloc_get_state.3:61
2296 msgid ""
2297 "The B<malloc_set_state>()  function restores the state of all B<malloc>(3)  "
2298 "internal bookkeeping variables to the values recorded in the opaque data "
2299 "structure pointed to by I<state>."
2300 msgstr ""
2301
2302 #. type: Plain text
2303 #: build/C/man3/malloc_get_state.3:68
2304 msgid ""
2305 "On success, B<malloc_get_state>()  returns a pointer to a newly allocated "
2306 "opaque data structure.  On error (for example, memory could not be allocated "
2307 "for the data structure), B<malloc_get_state>()  returns NULL."
2308 msgstr ""
2309
2310 #.  if(ms->magic != MALLOC_STATE_MAGIC) return -1;
2311 #.  /* Must fail if the major version is too high. */
2312 #.  if((ms->version & ~0xffl) > (MALLOC_STATE_VERSION & ~0xffl)) return -2;
2313 #. type: Plain text
2314 #: build/C/man3/malloc_get_state.3:86
2315 msgid ""
2316 "On success, B<malloc_set_state>()  returns 0.  If the implementation detects "
2317 "that I<state> does not point to a correctly formed data structure, "
2318 "B<malloc_set_state>()  returns -1.  If the implementation detects that the "
2319 "version of the data structure referred to by I<state> is a more recent "
2320 "version than this implementation knows about, B<malloc_set_state>()  returns "
2321 "-2."
2322 msgstr ""
2323
2324 #. type: Plain text
2325 #: build/C/man3/malloc_get_state.3:88 build/C/man3/malloc_hook.3:82
2326 #: build/C/man3/mcheck.3:147 build/C/man3/mtrace.3:80
2327 msgid "These functions are GNU extensions."
2328 msgstr "これらの関数は GNU による拡張である。"
2329
2330 #. type: Plain text
2331 #: build/C/man3/malloc_get_state.3:94
2332 msgid ""
2333 "These functions are especially useful when using this B<malloc>(3)  "
2334 "implementation as part of a shared library, and the heap contents are saved/"
2335 "restored via some other method.  This technique is used by the GNU Emacs to "
2336 "implement its \"dumping\" function."
2337 msgstr ""
2338
2339 #.  i.e., calls __malloc_check_init()
2340 #.  i.e., malloc checking is not already in use
2341 #.  and the caller requested malloc checking
2342 #. type: Plain text
2343 #: build/C/man3/malloc_get_state.3:111
2344 msgid ""
2345 "Hook function pointers are never saved or restored by these functions, with "
2346 "two exceptions: if malloc checking (see B<mallopt>(3))  was in use when "
2347 "B<malloc_get_state>()  was called, then B<malloc_set_state>()  resets malloc "
2348 "checking hooks if possible; if malloc checking was not in use in the "
2349 "recorded state, but the caller has requested malloc checking, then the hooks "
2350 "are reset to 0."
2351 msgstr ""
2352
2353 #. type: Plain text
2354 #: build/C/man3/malloc_get_state.3:114
2355 msgid "B<malloc>(3), B<mallopt>(3)"
2356 msgstr "B<malloc>(3), B<mallopt>(3)"
2357
2358 #. type: TH
2359 #: build/C/man3/malloc_hook.3:10
2360 #, no-wrap
2361 msgid "MALLOC_HOOK"
2362 msgstr "MALLOC_HOOK"
2363
2364 #. type: TH
2365 #: build/C/man3/malloc_hook.3:10
2366 #, no-wrap
2367 msgid "2010-10-13"
2368 msgstr "2010-10-13"
2369
2370 #. type: Plain text
2371 #: build/C/man3/malloc_hook.3:15
2372 msgid ""
2373 "__malloc_hook, __malloc_initialize_hook, __memalign_hook, __free_hook, "
2374 "__realloc_hook, __after_morecore_hook - malloc debugging variables"
2375 msgstr ""
2376 "__malloc_hook, __malloc_initialize_hook, __memalign_hook, __free_hook, "
2377 "__realloc_hook, __after_morecore_hook - malloc デバッグ用の変数"
2378
2379 #. type: Plain text
2380 #: build/C/man3/malloc_hook.3:18 build/C/man3/malloc_info.3:31
2381 #: build/C/man3/posix_memalign.3:41
2382 #, no-wrap
2383 msgid "B<#include E<lt>malloc.hE<gt>>\n"
2384 msgstr "B<#include E<lt>malloc.hE<gt>>\n"
2385
2386 #. type: Plain text
2387 #: build/C/man3/malloc_hook.3:20
2388 #, no-wrap
2389 msgid "B<void *(*__malloc_hook)(size_t >I<size>B<, const void *>I<caller>B<);>\n"
2390 msgstr "B<void *(*__malloc_hook)(size_t >I<size>B<, const void *>I<caller>B<);>\n"
2391
2392 #. type: Plain text
2393 #: build/C/man3/malloc_hook.3:23
2394 #, no-wrap
2395 msgid "B<void *(*__realloc_hook)(void *>I<ptr>B<, size_t >I<size>B<, const void *>I<caller>B<);>\n"
2396 msgstr "B<void *(*__realloc_hook)(void *>I<ptr>B<, size_t >I<size>B<, const void *>I<caller>B<);>\n"
2397
2398 #. type: Plain text
2399 #: build/C/man3/malloc_hook.3:26
2400 #, no-wrap
2401 msgid ""
2402 "B<void *(*__memalign_hook)(size_t >I<alignment>B<, size_t >I<size>B<,>\n"
2403 "B<                         const void *>I<caller>B<);>\n"
2404 msgstr ""
2405 "B<void *(*__memalign_hook)(size_t >I<alignment>B<, size_t >I<size>B<,>\n"
2406 "B<                         const void *>I<caller>B<);>\n"
2407
2408 #. type: Plain text
2409 #: build/C/man3/malloc_hook.3:28
2410 #, no-wrap
2411 msgid "B<void (*__free_hook)(void *>I<ptr>B<, const void *>I<caller>B<);>\n"
2412 msgstr "B<void (*__free_hook)(void *>I<ptr>B<, const void *>I<caller>B<);>\n"
2413
2414 #. type: Plain text
2415 #: build/C/man3/malloc_hook.3:30
2416 #, no-wrap
2417 msgid "B<void (*__malloc_initialize_hook)(void);>\n"
2418 msgstr "B<void (*__malloc_initialize_hook)(void);>\n"
2419
2420 #. type: Plain text
2421 #: build/C/man3/malloc_hook.3:32
2422 #, no-wrap
2423 msgid "B<void (*__after_morecore_hook)(void);>\n"
2424 msgstr "B<void (*__after_morecore_hook)(void);>\n"
2425
2426 #. type: Plain text
2427 #: build/C/man3/malloc_hook.3:43
2428 msgid ""
2429 "The GNU C library lets you modify the behavior of B<malloc>(3), B<realloc>"
2430 "(3), and B<free>(3)  by specifying appropriate hook functions.  You can use "
2431 "these hooks to help you debug programs that use dynamic memory allocation, "
2432 "for example."
2433 msgstr ""
2434 "GNU C ライブラリでは、適切なフック関数 (hook function) を指定することで "
2435 "B<malloc>(3), B<realloc>(3), B<free>(3)  の動作を変更することができる。例え"
2436 "ば、動的にメモリ割り当てを行う プログラムのデバッグにこれらのフックを使うこと"
2437 "ができる。"
2438
2439 #. type: Plain text
2440 #: build/C/man3/malloc_hook.3:50
2441 msgid ""
2442 "The variable B<__malloc_initialize_hook> points at a function that is called "
2443 "once when the malloc implementation is initialized.  This is a weak "
2444 "variable, so it can be overridden in the application with a definition like "
2445 "the following:"
2446 msgstr ""
2447 "変数 B<__malloc_initialize_hook> は malloc の実装が初期化される際に一度だけ呼"
2448 "ばれる関数へのポインタである。 この変数は書き換え可能 (weak) であり、アプリ"
2449 "ケーション内で 以下のような定義で上書きできる:"
2450
2451 #. type: Plain text
2452 #: build/C/man3/malloc_hook.3:53
2453 #, no-wrap
2454 msgid "    void (*__malloc_initialize_hook)(void) = my_init_hook;\n"
2455 msgstr "    void (*__malloc_initialize_hook)(void) = my_init_hook;\n"
2456
2457 #. type: Plain text
2458 #: build/C/man3/malloc_hook.3:58
2459 msgid ""
2460 "Now the function I<my_init_hook>()  can do the initialization of all hooks."
2461 msgstr ""
2462 "なお、関数 I<my_init_hook>()  で全てのフックの初期化をすることができる。"
2463
2464 #. type: Plain text
2465 #: build/C/man3/malloc_hook.3:74
2466 msgid ""
2467 "The four functions pointed to by B<__malloc_hook>, B<__realloc_hook>, "
2468 "B<__memalign_hook>, B<__free_hook> have a prototype like the functions "
2469 "B<malloc>(3), B<realloc>(3), B<memalign>(3), B<free>(3), respectively, "
2470 "except that they have a final argument I<caller> that gives the address of "
2471 "the caller of B<malloc>(3), etc."
2472 msgstr ""
2473 "B<__malloc_hook>, B<__realloc_hook>, B<__memalign_hook>, B<__free_hook> で指"
2474 "される 4 つの関数は、各々 B<malloc>(3), B<realloc>(3), B<memalign>(3), "
2475 "B<free>(3)  とよく似たプロトタイプを持っているが、 一番最後の引き数 "
2476 "I<caller> をとる点が異なる。 引き数 I<caller> には、 B<malloc>(3)  などの呼び"
2477 "出し元 (caller) のアドレスが格納される。"
2478
2479 #. type: Plain text
2480 #: build/C/man3/malloc_hook.3:80
2481 msgid ""
2482 "The variable B<__after_morecore_hook> points at a function that is called "
2483 "each time after B<sbrk>(2)  was asked for more memory."
2484 msgstr ""
2485 "変数 B<__after_morecore_hook> は、領域の追加要求があり B<sbrk>(2)  が呼ばれた"
2486 "後で毎回呼び出される関数へのポインタである。"
2487
2488 #.  https://bugzilla.redhat.com/show_bug.cgi?id=450187
2489 #.  http://sourceware.org/bugzilla/show_bug.cgi?id=9957
2490 #. type: Plain text
2491 #: build/C/man3/malloc_hook.3:89
2492 msgid ""
2493 "The use of these hook functions is not safe in multithreaded programs, and "
2494 "they are now deprecated.  Programmers should instead preempt calls to the "
2495 "relevant functions by defining and exporting functions such as \"malloc\" "
2496 "and \"free\"."
2497 msgstr ""
2498
2499 #. type: Plain text
2500 #: build/C/man3/malloc_hook.3:91
2501 msgid "Here is a short example of how to use these variables."
2502 msgstr "これらの変数の使い方の簡単な例を以下に示す。"
2503
2504 #. type: Plain text
2505 #: build/C/man3/malloc_hook.3:95
2506 #, no-wrap
2507 msgid ""
2508 "#include E<lt>stdio.hE<gt>\n"
2509 "#include E<lt>malloc.hE<gt>\n"
2510 msgstr ""
2511 "#include E<lt>stdio.hE<gt>\n"
2512 "#include E<lt>malloc.hE<gt>\n"
2513
2514 #. type: Plain text
2515 #: build/C/man3/malloc_hook.3:99
2516 #, no-wrap
2517 msgid ""
2518 "/* Prototypes for our hooks.  */\n"
2519 "static void my_init_hook(void);\n"
2520 "static void *my_malloc_hook(size_t, const void *);\n"
2521 msgstr ""
2522 "/* 使おうとするフックのプロトタイプ宣言 */\n"
2523 "static void my_init_hook(void);\n"
2524 "static void *my_malloc_hook(size_t, const void *);\n"
2525
2526 #. type: Plain text
2527 #: build/C/man3/malloc_hook.3:102
2528 #, no-wrap
2529 msgid ""
2530 "/* Variables to save original hooks. */\n"
2531 "static void *(*old_malloc_hook)(size_t, const void *);\n"
2532 msgstr ""
2533 "/* 元々のフックを保存するための変数 */\n"
2534 "static void *(*old_malloc_hook)(size_t, const void *);\n"
2535
2536 #. type: Plain text
2537 #: build/C/man3/malloc_hook.3:105
2538 #, no-wrap
2539 msgid ""
2540 "/* Override initializing hook from the C library. */\n"
2541 "void (*__malloc_initialize_hook) (void) = my_init_hook;\n"
2542 msgstr ""
2543 "/* C ライブラリから呼ばれる初期化フックを上書きする */\n"
2544 "void (*__malloc_initialize_hook) (void) = my_init_hook;\n"
2545
2546 #. type: Plain text
2547 #: build/C/man3/malloc_hook.3:112
2548 #, no-wrap
2549 msgid ""
2550 "static void\n"
2551 "my_init_hook(void)\n"
2552 "{\n"
2553 "    old_malloc_hook = __malloc_hook;\n"
2554 "    __malloc_hook = my_malloc_hook;\n"
2555 "}\n"
2556 msgstr ""
2557 "static void\n"
2558 "my_init_hook(void)\n"
2559 "{\n"
2560 "    old_malloc_hook = __malloc_hook;\n"
2561 "    __malloc_hook = my_malloc_hook;\n"
2562 "}\n"
2563
2564 #. type: Plain text
2565 #: build/C/man3/malloc_hook.3:117
2566 #, no-wrap
2567 msgid ""
2568 "static void *\n"
2569 "my_malloc_hook(size_t size, const void *caller)\n"
2570 "{\n"
2571 "    void *result;\n"
2572 msgstr ""
2573 "static void *\n"
2574 "my_malloc_hook(size_t size, const void *caller)\n"
2575 "{\n"
2576 "    void *result;\n"
2577
2578 #. type: Plain text
2579 #: build/C/man3/malloc_hook.3:120
2580 #, no-wrap
2581 msgid ""
2582 "    /* Restore all old hooks */\n"
2583 "    __malloc_hook = old_malloc_hook;\n"
2584 msgstr ""
2585 "    /* 元々のフックを全て戻す */\n"
2586 "    __malloc_hook = old_malloc_hook;\n"
2587
2588 #. type: Plain text
2589 #: build/C/man3/malloc_hook.3:123
2590 #, no-wrap
2591 msgid ""
2592 "    /* Call recursively */\n"
2593 "    result = malloc(size);\n"
2594 msgstr ""
2595 "    /* malloc の再帰的呼び出し */\n"
2596 "    result = malloc(size);\n"
2597
2598 #. type: Plain text
2599 #: build/C/man3/malloc_hook.3:126
2600 #, no-wrap
2601 msgid ""
2602 "    /* Save underlying hooks */\n"
2603 "    old_malloc_hook = __malloc_hook;\n"
2604 msgstr ""
2605 "    /* 現在設定されているフック (underlying hook) を保存する */\n"
2606 "    old_malloc_hook = __malloc_hook;\n"
2607
2608 #. type: Plain text
2609 #: build/C/man3/malloc_hook.3:130
2610 #, no-wrap
2611 msgid ""
2612 "    /* printf() might call malloc(), so protect it too. */\n"
2613 "    printf(\"malloc(%u) called from %p returns %p\\en\",\n"
2614 "            (unsigned int) size, caller, result);\n"
2615 msgstr ""
2616 "    /* printf() は malloc() を呼び出す可能性があるので\n"
2617 "        ここでもガードを行う (元々のフックのままにしておく) */\n"
2618 "    printf(\"malloc(%u) called from %p returns %p\\en\",\n"
2619 "            (unsigned int) size, caller, result);\n"
2620
2621 #. type: Plain text
2622 #: build/C/man3/malloc_hook.3:133
2623 #, no-wrap
2624 msgid ""
2625 "    /* Restore our own hooks */\n"
2626 "    __malloc_hook = my_malloc_hook;\n"
2627 msgstr ""
2628 "    /* ユーザが使おうとするフックを再設定する */\n"
2629 "    __malloc_hook = my_malloc_hook;\n"
2630
2631 #. type: Plain text
2632 #: build/C/man3/malloc_hook.3:136
2633 #, no-wrap
2634 msgid ""
2635 "    return result;\n"
2636 "}\n"
2637 msgstr ""
2638 "    return result;\n"
2639 "}\n"
2640
2641 #. type: Plain text
2642 #: build/C/man3/malloc_hook.3:142
2643 msgid "B<mallinfo>(3), B<malloc>(3), B<mcheck>(3), B<mtrace>(3)"
2644 msgstr "B<mallinfo>(3), B<malloc>(3), B<mcheck>(3), B<mtrace>(3)"
2645
2646 #. type: TH
2647 #: build/C/man3/malloc_info.3:25
2648 #, no-wrap
2649 msgid "MALLOC_INFO"
2650 msgstr "MALLOC_INFO"
2651
2652 #. type: Plain text
2653 #: build/C/man3/malloc_info.3:28
2654 msgid "malloc_info - export malloc state to a stream"
2655 msgstr ""
2656
2657 #. type: Plain text
2658 #: build/C/man3/malloc_info.3:33
2659 #, no-wrap
2660 msgid "B<int malloc_info(int >I<options>B<, FILE *>I<fp>B<);>\n"
2661 msgstr "B<int malloc_info(int >I<options>B<, FILE *>I<fp>B<);>\n"
2662
2663 #. type: Plain text
2664 #: build/C/man3/malloc_info.3:44
2665 msgid ""
2666 "The B<malloc_info>()  function exports an XML string that describes the "
2667 "current state of the memory-allocation implementation in the caller.  The "
2668 "string is printed on the file stream I<fp>.  The exported string includes "
2669 "information about all arenas (see B<malloc>(3))."
2670 msgstr ""
2671
2672 #. type: Plain text
2673 #: build/C/man3/malloc_info.3:48
2674 msgid "As currently implemented, I<options> must be zero."
2675 msgstr ""
2676
2677 #. type: Plain text
2678 #: build/C/man3/malloc_info.3:53
2679 msgid "On success, B<malloc_info>()  returns 0; on error, it returns -1."
2680 msgstr "B<malloc_info>() は成功すると 0 を返す。エラーの場合は -1 を返す。"
2681
2682 #. type: Plain text
2683 #: build/C/man3/malloc_info.3:58
2684 msgid "I<options> was nonzero."
2685 msgstr ""
2686
2687 #. type: Plain text
2688 #: build/C/man3/malloc_info.3:61
2689 #, fuzzy
2690 #| msgid "B<malloc_info>(3)  was added to glibc in version 2.10."
2691 msgid "B<malloc_info>()  was added to glibc in version 2.10."
2692 msgstr "B<malloc_info>(3) は glibc バージョン 2.10 で追加された。"
2693
2694 #. type: Plain text
2695 #: build/C/man3/malloc_info.3:63 build/C/man3/malloc_stats.3:57
2696 #: build/C/man3/malloc_trim.3:62 build/C/man3/malloc_usable_size.3:50
2697 msgid "This function is a GNU extension."
2698 msgstr "この関数は GNU による拡張である。"
2699
2700 #. type: Plain text
2701 #: build/C/man3/malloc_info.3:69
2702 msgid ""
2703 "The memory-allocation information is provided as an XML string (rather than "
2704 "a C structure)  because the information may change over time (according to "
2705 "changes in the underlying implementation).  The output XML string includes a "
2706 "version field."
2707 msgstr ""
2708
2709 #. type: Plain text
2710 #: build/C/man3/malloc_info.3:75
2711 msgid ""
2712 "The B<open_memstream>(3)  function can be used to send the output of "
2713 "B<malloc_info>()  directly into a buffer in memory, rather than to a file."
2714 msgstr ""
2715
2716 #. type: Plain text
2717 #: build/C/man3/malloc_info.3:82
2718 msgid ""
2719 "The B<malloc_info>()  function is designed to address deficiencies in "
2720 "B<malloc_stats>(3)  and B<mallinfo>(3)."
2721 msgstr ""
2722
2723 #. type: Plain text
2724 #: build/C/man3/malloc_info.3:93
2725 msgid ""
2726 "The program below takes up to four command-line arguments, of which the "
2727 "first three are mandatory.  The first argument specifies the number of "
2728 "threads that the program should create.  All of the threads, including the "
2729 "main thread, allocate the number of blocks of memory specified by the second "
2730 "argument.  The third argument controls the size of the blocks to be "
2731 "allocated.  The main thread creates blocks of this size, the second thread "
2732 "created by the program allocates blocks of twice this size, the third thread "
2733 "allocates blocks of three times this size, and so on."
2734 msgstr ""
2735
2736 #. type: Plain text
2737 #: build/C/man3/malloc_info.3:100
2738 msgid ""
2739 "The program calls B<malloc_info>()  twice to display the memory-allocation "
2740 "state.  The first call takes place before any threads are created or memory "
2741 "allocated.  The second call is performed after all threads have allocated "
2742 "memory."
2743 msgstr ""
2744
2745 #. type: Plain text
2746 #: build/C/man3/malloc_info.3:108
2747 msgid ""
2748 "In the following example, the command-line arguments specify the creation of "
2749 "one additional thread, and both the main thread and the additional thread "
2750 "allocate 10000 blocks of memory.  After the blocks of memory have been "
2751 "allocated, B<malloc_info>()  shows the state of two allocation arenas."
2752 msgstr ""
2753
2754 #. type: Plain text
2755 #: build/C/man3/malloc_info.3:133
2756 #, no-wrap
2757 msgid ""
2758 "$ B<getconf GNU_LIBC_VERSION>\n"
2759 "glibc 2.13\n"
2760 "$ B<./a.out 1 10000 100>\n"
2761 "============ Before allocating blocks ============\n"
2762 "E<lt>malloc version=\"1\"E<gt>\n"
2763 "E<lt>heap nr=\"0\"E<gt>\n"
2764 "E<lt>sizesE<gt>\n"
2765 "E<lt>/sizesE<gt>\n"
2766 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
2767 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
2768 "E<lt>system type=\"current\" size=\"135168\"/E<gt>\n"
2769 "E<lt>system type=\"max\" size=\"135168\"/E<gt>\n"
2770 "E<lt>aspace type=\"total\" size=\"135168\"/E<gt>\n"
2771 "E<lt>aspace type=\"mprotect\" size=\"135168\"/E<gt>\n"
2772 "E<lt>/heapE<gt>\n"
2773 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
2774 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
2775 "E<lt>system type=\"current\" size=\"135168\"/E<gt>\n"
2776 "E<lt>system type=\"max\" size=\"135168\"/E<gt>\n"
2777 "E<lt>aspace type=\"total\" size=\"135168\"/E<gt>\n"
2778 "E<lt>aspace type=\"mprotect\" size=\"135168\"/E<gt>\n"
2779 "E<lt>/mallocE<gt>\n"
2780 msgstr ""
2781
2782 #. type: Plain text
2783 #: build/C/man3/malloc_info.3:163
2784 #, no-wrap
2785 msgid ""
2786 "============ After allocating blocks ============\n"
2787 "E<lt>malloc version=\"1\"E<gt>\n"
2788 "E<lt>heap nr=\"0\"E<gt>\n"
2789 "E<lt>sizesE<gt>\n"
2790 "E<lt>/sizesE<gt>\n"
2791 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
2792 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
2793 "E<lt>system type=\"current\" size=\"1081344\"/E<gt>\n"
2794 "E<lt>system type=\"max\" size=\"1081344\"/E<gt>\n"
2795 "E<lt>aspace type=\"total\" size=\"1081344\"/E<gt>\n"
2796 "E<lt>aspace type=\"mprotect\" size=\"1081344\"/E<gt>\n"
2797 "E<lt>/heapE<gt>\n"
2798 "E<lt>heap nr=\"1\"E<gt>\n"
2799 "E<lt>sizesE<gt>\n"
2800 "E<lt>/sizesE<gt>\n"
2801 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
2802 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
2803 "E<lt>system type=\"current\" size=\"1032192\"/E<gt>\n"
2804 "E<lt>system type=\"max\" size=\"1032192\"/E<gt>\n"
2805 "E<lt>aspace type=\"total\" size=\"1032192\"/E<gt>\n"
2806 "E<lt>aspace type=\"mprotect\" size=\"1032192\"/E<gt>\n"
2807 "E<lt>/heapE<gt>\n"
2808 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
2809 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
2810 "E<lt>system type=\"current\" size=\"2113536\"/E<gt>\n"
2811 "E<lt>system type=\"max\" size=\"2113536\"/E<gt>\n"
2812 "E<lt>aspace type=\"total\" size=\"2113536\"/E<gt>\n"
2813 "E<lt>aspace type=\"mprotect\" size=\"2113536\"/E<gt>\n"
2814 "E<lt>/mallocE<gt>\n"
2815 msgstr ""
2816
2817 #. type: Plain text
2818 #: build/C/man3/malloc_info.3:173
2819 #, no-wrap
2820 msgid ""
2821 "#include E<lt>unistd.hE<gt>\n"
2822 "#include E<lt>stdlib.hE<gt>\n"
2823 "#include E<lt>pthread.hE<gt>\n"
2824 "#include E<lt>malloc.hE<gt>\n"
2825 "#include E<lt>errno.hE<gt>\n"
2826 msgstr ""
2827 "#include E<lt>unistd.hE<gt>\n"
2828 "#include E<lt>stdlib.hE<gt>\n"
2829 "#include E<lt>pthread.hE<gt>\n"
2830 "#include E<lt>malloc.hE<gt>\n"
2831 "#include E<lt>errno.hE<gt>\n"
2832
2833 #. type: Plain text
2834 #: build/C/man3/malloc_info.3:176
2835 #, no-wrap
2836 msgid ""
2837 "static size_t blockSize;\n"
2838 "static int numThreads, numBlocks;\n"
2839 msgstr ""
2840
2841 #. type: Plain text
2842 #: build/C/man3/malloc_info.3:179
2843 #, no-wrap
2844 msgid ""
2845 "#define errExit(msg)    do { perror(msg); exit(EXIT_FAILURE); \\e\n"
2846 "                        } while (0)\n"
2847 msgstr ""
2848 "#define errExit(msg)    do { perror(msg); exit(EXIT_FAILURE); \\e\n"
2849 "                        } while (0)\n"
2850
2851 #. type: Plain text
2852 #: build/C/man3/malloc_info.3:185
2853 #, no-wrap
2854 msgid ""
2855 "static void *\n"
2856 "thread_func(void *arg)\n"
2857 "{\n"
2858 "    int j;\n"
2859 "    int tn = (int) arg;\n"
2860 msgstr ""
2861
2862 #. type: Plain text
2863 #: build/C/man3/malloc_info.3:188
2864 #, no-wrap
2865 msgid ""
2866 "    /* The multiplier \\(aq(2 + tn)\\(aq ensures that each thread (including\n"
2867 "       the main thread) allocates a different amount of memory */\n"
2868 msgstr ""
2869
2870 #. type: Plain text
2871 #: build/C/man3/malloc_info.3:192
2872 #, no-wrap
2873 msgid ""
2874 "    for (j = 0; j E<lt> numBlocks; j++)\n"
2875 "        if (malloc(blockSize * (2 + tn)) == NULL)\n"
2876 "            errExit(\"malloc-thread\");\n"
2877 msgstr ""
2878 "    for (j = 0; j E<lt> numBlocks; j++)\n"
2879 "        if (malloc(blockSize * (2 + tn)) == NULL)\n"
2880 "            errExit(\"malloc-thread\");\n"
2881
2882 #. type: Plain text
2883 #: build/C/man3/malloc_info.3:196
2884 #, no-wrap
2885 msgid ""
2886 "    sleep(100);         /* Sleep until main thread terminates */\n"
2887 "    return NULL;\n"
2888 "}\n"
2889 msgstr ""
2890
2891 #. type: Plain text
2892 #: build/C/man3/malloc_info.3:202
2893 #, no-wrap
2894 msgid ""
2895 "int\n"
2896 "main(int argc, char *argv[])\n"
2897 "{\n"
2898 "    int j, tn, sleepTime;\n"
2899 "    pthread_t *thr;\n"
2900 msgstr ""
2901 "int\n"
2902 "main(int argc, char *argv[])\n"
2903 "{\n"
2904 "    int j, tn, sleepTime;\n"
2905 "    pthread_t *thr;\n"
2906
2907 #. type: Plain text
2908 #: build/C/man3/malloc_info.3:209
2909 #, no-wrap
2910 msgid ""
2911 "    if (argc E<lt> 4) {\n"
2912 "        fprintf(stderr,\n"
2913 "                \"%s num-threads num-blocks block-size [sleep-time]\\en\",\n"
2914 "                argv[0]);\n"
2915 "        exit(EXIT_FAILURE);\n"
2916 "    }\n"
2917 msgstr ""
2918 "    if (argc E<lt> 4) {\n"
2919 "        fprintf(stderr,\n"
2920 "                \"%s num-threads num-blocks block-size [sleep-time]\\en\",\n"
2921 "                argv[0]);\n"
2922 "        exit(EXIT_FAILURE);\n"
2923 "    }\n"
2924
2925 #. type: Plain text
2926 #: build/C/man3/malloc_info.3:214
2927 #, no-wrap
2928 msgid ""
2929 "    numThreads = atoi(argv[1]);\n"
2930 "    numBlocks = atoi(argv[2]);\n"
2931 "    blockSize = atoi(argv[3]);\n"
2932 "    sleepTime = (argc E<gt> 4) ? atoi(argv[4]) : 0;\n"
2933 msgstr ""
2934
2935 #. type: Plain text
2936 #: build/C/man3/malloc_info.3:218
2937 #, no-wrap
2938 msgid ""
2939 "    thr = calloc(numThreads, sizeof(pthread_t));\n"
2940 "    if (thr == NULL)\n"
2941 "        errExit(\"calloc\");\n"
2942 msgstr ""
2943
2944 #. type: Plain text
2945 #: build/C/man3/malloc_info.3:221
2946 #, no-wrap
2947 msgid ""
2948 "    printf(\"============ Before allocating blocks ============\\en\");\n"
2949 "    malloc_info(0, stdout);\n"
2950 msgstr ""
2951
2952 #. type: Plain text
2953 #: build/C/man3/malloc_info.3:223
2954 #, no-wrap
2955 msgid "    /* Create threads that allocate different amounts of memory */\n"
2956 msgstr ""
2957
2958 #. type: Plain text
2959 #: build/C/man3/malloc_info.3:229
2960 #, no-wrap
2961 msgid ""
2962 "    for (tn = 0; tn E<lt> numThreads; tn++) {\n"
2963 "        errno = pthread_create(&thr[tn], NULL, thread_func,\n"
2964 "                               (void *) tn);\n"
2965 "        if (errno != 0)\n"
2966 "            errExit(\"pthread_create\");\n"
2967 msgstr ""
2968
2969 #. type: Plain text
2970 #: build/C/man3/malloc_info.3:234
2971 #, no-wrap
2972 msgid ""
2973 "        /* If we add a sleep interval after the start-up of each\n"
2974 "           thread, the threads likely won\\(aqt contend for malloc\n"
2975 "           mutexes, and therefore additional arenas won\\(aqt be\n"
2976 "           allocated (see malloc(3)). */\n"
2977 msgstr ""
2978
2979 #. type: Plain text
2980 #: build/C/man3/malloc_info.3:238
2981 #, no-wrap
2982 msgid ""
2983 "        if (sleepTime E<gt> 0)\n"
2984 "            sleep(sleepTime);\n"
2985 "    }\n"
2986 msgstr ""
2987
2988 #. type: Plain text
2989 #: build/C/man3/malloc_info.3:240
2990 #, no-wrap
2991 msgid "    /* The main thread also allocates some memory */\n"
2992 msgstr ""
2993
2994 #. type: Plain text
2995 #: build/C/man3/malloc_info.3:244
2996 #, no-wrap
2997 msgid ""
2998 "    for (j = 0; j E<lt> numBlocks; j++)\n"
2999 "        if (malloc(blockSize) == NULL)\n"
3000 "            errExit(\"malloc\");\n"
3001 msgstr ""
3002 "    for (j = 0; j E<lt> numBlocks; j++)\n"
3003 "        if (malloc(blockSize) == NULL)\n"
3004 "            errExit(\"malloc\");\n"
3005
3006 #. type: Plain text
3007 #: build/C/man3/malloc_info.3:247
3008 #, no-wrap
3009 msgid ""
3010 "    sleep(2);           /* Give all threads a chance to\n"
3011 "                           complete allocations */\n"
3012 msgstr ""
3013
3014 #. type: Plain text
3015 #: build/C/man3/malloc_info.3:250
3016 #, no-wrap
3017 msgid ""
3018 "    printf(\"\\en============ After allocating blocks ============\\en\");\n"
3019 "    malloc_info(0, stdout);\n"
3020 msgstr ""
3021
3022 #. type: Plain text
3023 #: build/C/man3/malloc_info.3:260
3024 msgid ""
3025 "B<mallinfo>(3), B<malloc>(3), B<malloc_stats>(3), B<mallopt>(3), "
3026 "B<open_memstream>(3)"
3027 msgstr ""
3028 "B<mallinfo>(3), B<malloc>(3), B<malloc_stats>(3), B<mallopt>(3), "
3029 "B<open_memstream>(3)"
3030
3031 #. type: TH
3032 #: build/C/man3/malloc_stats.3:26
3033 #, no-wrap
3034 msgid "MALLOC_STATS"
3035 msgstr "MALLOC_STATS"
3036
3037 #. type: Plain text
3038 #: build/C/man3/malloc_stats.3:29
3039 msgid "malloc_stats - print memory allocation statistics"
3040 msgstr "malloc_stats - メモリ割り当ての統計を表示する"
3041
3042 #. type: Plain text
3043 #: build/C/man3/malloc_stats.3:33
3044 msgid "B<void malloc_stats(void);>"
3045 msgstr "B<void malloc_stats(void);>"
3046
3047 #.  .SH VERSIONS
3048 #.  Available already in glibc 2.0, possibly earlier
3049 #. type: Plain text
3050 #: build/C/man3/malloc_stats.3:55
3051 msgid ""
3052 "The B<malloc_stats>()  function prints (on standard error) statistics about "
3053 "memory allocated by B<malloc>(3)  and related functions.  For each arena "
3054 "(allocation area), this function prints the total amount of memory allocated "
3055 "and the total number of bytes consumed by in-use allocations.  (These two "
3056 "values correspond to the I<arena> and I<uordblks> fields retrieved by "
3057 "B<mallinfo>(3).)  In addition, the function prints the sum of these two "
3058 "statistics for all arenas, and the maximum number of blocks and bytes that "
3059 "were ever simultaneously allocated using B<mmap>(2)."
3060 msgstr ""
3061
3062 #. type: Plain text
3063 #: build/C/man3/malloc_stats.3:61
3064 msgid ""
3065 "More detailed information about memory allocations in the main arena can be "
3066 "obtained using B<mallinfo>(3)."
3067 msgstr ""
3068
3069 #. type: Plain text
3070 #: build/C/man3/malloc_stats.3:67
3071 msgid ""
3072 "B<mmap>(2), B<mallinfo>(3), B<malloc>(3), B<malloc_info>(3), B<mallopt>(3)"
3073 msgstr ""
3074 "B<mmap>(2), B<mallinfo>(3), B<malloc>(3), B<malloc_info>(3), B<mallopt>(3)"
3075
3076 #. type: TH
3077 #: build/C/man3/malloc_trim.3:26
3078 #, no-wrap
3079 msgid "MALLOC_TRIM"
3080 msgstr "MALLOC_TRIM"
3081
3082 #. type: TH
3083 #: build/C/man3/malloc_trim.3:26 build/C/man3/malloc_usable_size.3:25
3084 #, no-wrap
3085 msgid "2012-03-29"
3086 msgstr "2012-03-29"
3087
3088 #. type: Plain text
3089 #: build/C/man3/malloc_trim.3:29
3090 msgid "malloc_trim - release free memory from the top of the heap"
3091 msgstr ""
3092
3093 #. type: Plain text
3094 #: build/C/man3/malloc_trim.3:33
3095 msgid "B<void malloc_trim(size_t >I<pad>B<);>"
3096 msgstr "B<void malloc_trim(size_t >I<pad>B<);>"
3097
3098 #. type: Plain text
3099 #: build/C/man3/malloc_trim.3:40
3100 msgid ""
3101 "The B<malloc_trim>()  function attempts to release free memory at the top of "
3102 "the heap (by calling B<sbrk>(2)  with a suitable argument)."
3103 msgstr ""
3104
3105 #. type: Plain text
3106 #: build/C/man3/malloc_trim.3:51
3107 msgid ""
3108 "The I<pad> argument specifies the amount of free space to leave untrimmed at "
3109 "the top of the heap.  If this argument is 0, only the minimum amount of "
3110 "memory is maintained at the top of the heap (i.e., one page or less).  A "
3111 "nonzero argument can be used to maintain some trailing space at the top of "
3112 "the heap in order to allow future allocations to be made without having to "
3113 "extend the heap with B<sbrk>(2)."
3114 msgstr ""
3115
3116 #. type: Plain text
3117 #: build/C/man3/malloc_trim.3:56
3118 msgid ""
3119 "The B<malloc_trim>()  function returns 1 if memory was actually released "
3120 "back to the system, or 0 if it was not possible to release any memory."
3121 msgstr ""
3122
3123 #.  .SH VERSIONS
3124 #.  Available already in glibc 2.0, possibly earlier
3125 #. type: Plain text
3126 #: build/C/man3/malloc_trim.3:60
3127 msgid "No errors are defined."
3128 msgstr ""
3129
3130 #. type: Plain text
3131 #: build/C/man3/malloc_trim.3:71
3132 msgid ""
3133 "This function is automatically called by B<free>(3)  in certain "
3134 "circumstances; see the discussion of B<M_TOP_PAD> and B<M_TRIM_THRESHOLD> in "
3135 "B<mallopt>(3)."
3136 msgstr ""
3137
3138 #. type: Plain text
3139 #: build/C/man3/malloc_trim.3:74
3140 msgid ""
3141 "This function cannot release free memory located at places other than the "
3142 "top of the heap."
3143 msgstr ""
3144
3145 #.  malloc/malloc.c::mTRIm():
3146 #.      return result | (av == &main_arena ? sYSTRIm (pad, av) : 0);
3147 #. type: Plain text
3148 #: build/C/man3/malloc_trim.3:78
3149 msgid "This function releases only memory in the main arena."
3150 msgstr ""
3151
3152 #. type: Plain text
3153 #: build/C/man3/malloc_trim.3:82
3154 msgid "B<sbrk>(2), B<malloc>(3), B<mallopt>(3)"
3155 msgstr "B<sbrk>(2), B<malloc>(3), B<mallopt>(3)"
3156
3157 #. type: TH
3158 #: build/C/man3/malloc_usable_size.3:25
3159 #, no-wrap
3160 msgid "MALLOC_USABLE_SIZE"
3161 msgstr "MALLOC_USABLE_SIZE"
3162
3163 #. type: Plain text
3164 #: build/C/man3/malloc_usable_size.3:28
3165 msgid "malloc_usable_size - obtain size of block of memory allocated from heap"
3166 msgstr ""
3167
3168 #. type: Plain text
3169 #: build/C/man3/malloc_usable_size.3:32
3170 msgid "B<size_t malloc_usable_size (void *>I<ptr>B<);>"
3171 msgstr "B<size_t malloc_usable_size (void *>I<ptr>B<);>"
3172
3173 #. type: Plain text
3174 #: build/C/man3/malloc_usable_size.3:40
3175 msgid ""
3176 "The B<malloc_usable_size>()  function returns the number of usable bytes in "
3177 "the block pointed to by I<ptr>, a pointer to a block of memory allocated by "
3178 "B<malloc>(3)  or a related function."
3179 msgstr ""
3180
3181 #. type: Plain text
3182 #: build/C/man3/malloc_usable_size.3:48
3183 msgid ""
3184 "B<malloc_usable_size>()  returns the number of usable bytes in the block of "
3185 "allocated memory pointed to by I<ptr>.  If I<ptr> is NULL, 0 is returned."
3186 msgstr ""
3187
3188 #. type: Plain text
3189 #: build/C/man3/malloc_usable_size.3:60
3190 msgid ""
3191 "The value returned by B<malloc_usable_size>()  may be greater than the "
3192 "requested size of the allocation because of alignment and minimum size "
3193 "constraints.  Although the excess bytes can be overwritten by the "
3194 "application without ill effects, this is not good programming practice: the "
3195 "number of excess bytes in an allocation depends on the underlying "
3196 "implementation."
3197 msgstr ""
3198
3199 #. type: Plain text
3200 #: build/C/man3/malloc_usable_size.3:62
3201 msgid "The main use of this function is for debugging and introspection."
3202 msgstr ""
3203
3204 #. type: Plain text
3205 #: build/C/man3/malloc_usable_size.3:64
3206 msgid "B<malloc>(3)"
3207 msgstr "B<malloc>(3)"
3208
3209 #. type: TH
3210 #: build/C/man3/mallopt.3:26
3211 #, no-wrap
3212 msgid "MALLOPT"
3213 msgstr "MALLOPT"
3214
3215 #. type: TH
3216 #: build/C/man3/mallopt.3:26
3217 #, no-wrap
3218 msgid "2012-04-30"
3219 msgstr "2012-04-30"
3220
3221 #. type: Plain text
3222 #: build/C/man3/mallopt.3:29
3223 msgid "mallopt - set memory allocation parameters"
3224 msgstr "mallopt - メモリ割り当てパラメータを設定する"
3225
3226 #. type: Plain text
3227 #: build/C/man3/mallopt.3:33
3228 msgid "B<int mallopt(int >I<param>B<, int >I<value>B<);>"
3229 msgstr "B<int mallopt(int >I<param>B<, int >I<value>B<);>"
3230
3231 #. type: Plain text
3232 #: build/C/man3/mallopt.3:44
3233 msgid ""
3234 "The B<mallopt>()  function adjusts parameters that control the behavior of "
3235 "the memory-allocation functions (see B<malloc>(3)).  The I<param> argument "
3236 "specifies the parameter to be modified, and I<value> specifies the new value "
3237 "for that parameter."
3238 msgstr ""
3239 "B<mallopt>() 関数は、メモリ割り当て関数 (B<malloc>(3) を参照) の動作を\n"
3240 "制御するパラメータの調整を行う。\n"
3241 "I<param> 引き数で変更するパラメータを指定し、\n"
3242 "I<value> 引き数でそのパラメータの新しい値を指定する。"
3243
3244 #. type: Plain text
3245 #: build/C/man3/mallopt.3:47
3246 msgid "The following values can be specified for I<param>:"
3247 msgstr "I<param> には以下の値を指定することができる。"
3248
3249 #. type: TP
3250 #: build/C/man3/mallopt.3:47
3251 #, no-wrap
3252 msgid "B<M_CHECK_ACTION>"
3253 msgstr "B<M_CHECK_ACTION>"
3254
3255 #. type: Plain text
3256 #: build/C/man3/mallopt.3:53
3257 msgid ""
3258 "Setting this parameter controls how glibc responds when various kinds of "
3259 "programming errors are detected (e.g., freeing the same pointer twice).  The "
3260 "3 least significant bits (2, 1, and 0) of the value assigned to this "
3261 "parameter determine the glibc behavior, as follows:"
3262 msgstr ""
3263
3264 #. type: TP
3265 #: build/C/man3/mallopt.3:54
3266 #, no-wrap
3267 msgid "Bit 0"
3268 msgstr "Bit 0"
3269
3270 #. type: Plain text
3271 #: build/C/man3/mallopt.3:64
3272 msgid ""
3273 "If this bit is set, then print a one-line message on I<stderr> that provides "
3274 "details about the error.  The message starts with the string \"***\\ glibc "
3275 "detected\\ ***\", followed by the program name, the name of the memory-"
3276 "allocation function in which the error was detected, a brief description of "
3277 "the error, and the memory address where the error was detected."
3278 msgstr ""
3279
3280 #. type: TP
3281 #: build/C/man3/mallopt.3:64
3282 #, no-wrap
3283 msgid "Bit 1"
3284 msgstr "Bit 1"
3285
3286 #. type: Plain text
3287 #: build/C/man3/mallopt.3:79
3288 msgid ""
3289 "If this bit is set, then, after printing any error message specified by bit "
3290 "0, the program is terminated by calling B<abort>(3).  In glibc versions "
3291 "since 2.4, if bit 0 is also set, then, between printing the error message "
3292 "and aborting, the program also prints a stack trace in the manner of "
3293 "B<backtrace>(3), and prints the process's memory mapping in the style of I</"
3294 "proc/[pid]/maps> (see B<proc>(5))."
3295 msgstr ""
3296
3297 #. type: TP
3298 #: build/C/man3/mallopt.3:79
3299 #, no-wrap
3300 msgid "Bit 2 (since glibc 2.4)"
3301 msgstr "Bit 2 (glibc 2.4 以降)"
3302
3303 #. type: Plain text
3304 #: build/C/man3/mallopt.3:86
3305 msgid ""
3306 "This bit has an effect only if bit 0 is also set.  If this bit is set, then "
3307 "the one-line message describing the error is simplified to contain just the "
3308 "name of the function where the error was detected and the brief description "
3309 "of the error."
3310 msgstr ""
3311
3312 #. type: Plain text
3313 #: build/C/man3/mallopt.3:91
3314 msgid "The remaining bits in I<value> are ignored."
3315 msgstr ""
3316
3317 #. type: Plain text
3318 #: build/C/man3/mallopt.3:95
3319 msgid ""
3320 "Combining the above details, the following numeric values are meaningful for "
3321 "B<M_CHECK_ACTION>:"
3322 msgstr ""
3323
3324 #. type: IP
3325 #: build/C/man3/mallopt.3:96
3326 #, no-wrap
3327 msgid "0"
3328 msgstr "0"
3329
3330 #. type: Plain text
3331 #: build/C/man3/mallopt.3:98
3332 msgid "Ignore error conditions; continue execution (with undefined results)."
3333 msgstr ""
3334
3335 #. type: IP
3336 #: build/C/man3/mallopt.3:98
3337 #, no-wrap
3338 msgid "1"
3339 msgstr "1"
3340
3341 #. type: Plain text
3342 #: build/C/man3/mallopt.3:100
3343 msgid "Print a detailed error message and continue execution."
3344 msgstr ""
3345
3346 #. type: IP
3347 #: build/C/man3/mallopt.3:100
3348 #, no-wrap
3349 msgid "2"
3350 msgstr "2"
3351
3352 #. type: Plain text
3353 #: build/C/man3/mallopt.3:102
3354 msgid "Abort the program."
3355 msgstr ""
3356
3357 #. type: IP
3358 #: build/C/man3/mallopt.3:102
3359 #, no-wrap
3360 msgid "3"
3361 msgstr "3"
3362
3363 #. type: Plain text
3364 #: build/C/man3/mallopt.3:105
3365 msgid ""
3366 "Print detailed error message, stack trace, and memory mappings, and abort "
3367 "the program."
3368 msgstr ""
3369
3370 #. type: IP
3371 #: build/C/man3/mallopt.3:105
3372 #, no-wrap
3373 msgid "5"
3374 msgstr "5"
3375
3376 #. type: Plain text
3377 #: build/C/man3/mallopt.3:107
3378 msgid "Print a simple error message and continue execution."
3379 msgstr ""
3380
3381 #. type: IP
3382 #: build/C/man3/mallopt.3:107
3383 #, no-wrap
3384 msgid "7"
3385 msgstr "7"
3386
3387 #. type: Plain text
3388 #: build/C/man3/mallopt.3:110
3389 msgid ""
3390 "Print simple error message, stack trace, and memory mappings, and abort the "
3391 "program."
3392 msgstr ""
3393
3394 #. type: Plain text
3395 #: build/C/man3/mallopt.3:116
3396 msgid ""
3397 "Since glibc 2.3.4, the default value for the B<M_CHECK_ACTION> parameter is "
3398 "3.  In glibc version 2.3.3 and earlier, the default value is 1."
3399 msgstr ""
3400
3401 #. type: Plain text
3402 #: build/C/man3/mallopt.3:121
3403 msgid ""
3404 "Using a nonzero B<M_CHECK_ACTION> value can be useful because otherwise a "
3405 "crash may happen much later, and the true cause of the problem is then very "
3406 "hard to track down."
3407 msgstr ""
3408
3409 #. type: TP
3410 #: build/C/man3/mallopt.3:121
3411 #, no-wrap
3412 msgid "B<M_MMAP_MAX>"
3413 msgstr "B<M_MMAP_MAX>"
3414
3415 #.  The following text adapted from comments in the glibc source:
3416 #. type: Plain text
3417 #: build/C/man3/mallopt.3:131
3418 msgid ""
3419 "This parameter specifies the maximum number of allocation requests that may "
3420 "be simultaneously serviced using B<mmap>(2).  This parameter exists because "
3421 "some systems have a limited number of internal tables for use by B<mmap>(2), "
3422 "and using more than a few of them may degrade performance."
3423 msgstr ""
3424
3425 #. type: Plain text
3426 #: build/C/man3/mallopt.3:138
3427 msgid ""
3428 "The default value is 65,536, a value which has no special significance and "
3429 "which servers only as a safeguard.  Setting this parameter to 0 disables the "
3430 "use of B<mmap>(2)  for servicing large allocation requests."
3431 msgstr ""
3432
3433 #. type: TP
3434 #: build/C/man3/mallopt.3:138
3435 #, no-wrap
3436 msgid "B<M_MMAP_THRESHOLD>"
3437 msgstr "B<M_MMAP_THRESHOLD>"
3438
3439 #. type: Plain text
3440 #: build/C/man3/mallopt.3:147
3441 msgid ""
3442 "For allocations greater than or equal to the limit specified (in bytes) by "
3443 "B<M_MMAP_THRESHOLD> that can't be satisfied from the free list, the memory-"
3444 "allocation functions employ B<mmap>(2)  instead of increasing the program "
3445 "break using B<sbrk>(2)."
3446 msgstr ""
3447
3448 #. type: Plain text
3449 #: build/C/man3/mallopt.3:167
3450 msgid ""
3451 "Allocating memory using B<mmap>(2)  has the significant advantage that the "
3452 "allocated memory blocks can always be independently released back to the "
3453 "system.  (By contrast, the heap can be trimmed only if memory is freed at "
3454 "the top end.)  On the other hand, there are some disadvantages to the use of "
3455 "B<mmap>(2): deallocated space is not placed on the free list for reuse by "
3456 "later allocations; memory may be wasted because B<mmap>(2)  allocations must "
3457 "be page-aligned; and the kernel must perform the expensive task of zeroing "
3458 "out memory allocated via B<mmap>(2).  Balancing these factors leads to a "
3459 "default setting of 128*1024 for the B<M_MMAP_THRESHOLD> parameter."
3460 msgstr ""
3461
3462 #. type: Plain text
3463 #: build/C/man3/mallopt.3:174
3464 msgid ""
3465 "The lower limit for this parameter is 0.  The upper limit is "
3466 "B<DEFAULT_MMAP_THRESHOLD_MAX>: 512*1024 on 32-bit systems or "
3467 "I<4*1024*1024*sizeof(long)> on 64-bit systems."
3468 msgstr ""
3469
3470 #. type: Plain text
3471 #: build/C/man3/mallopt.3:192
3472 msgid ""
3473 "I<Note:> Nowadays, glibc uses a dynamic mmap threshold by default.  The "
3474 "initial value of the threshold is 128*1024, but when blocks larger than the "
3475 "current threshold and less than or equal to B<DEFAULT_MMAP_THRESHOLD_MAX> "
3476 "are freed, the threshold is adjusted upwards to the size of the freed "
3477 "block.  When dynamic mmap thresholding is in effect, the threshold for "
3478 "trimming the heap is also dynamically adjusted to be twice the dynamic mmap "
3479 "threshold.  Dynamic adjustment of the mmap threshold is disabled if any of "
3480 "the B<M_TRIM_THRESHOLD>, B<M_TOP_PAD>, B<M_MMAP_THRESHOLD>, or B<M_MMAP_MAX> "
3481 "parameters is set."
3482 msgstr ""
3483
3484 #. type: TP
3485 #: build/C/man3/mallopt.3:192
3486 #, no-wrap
3487 msgid "B<M_MXFAST> (since glibc 2.3)"
3488 msgstr "B<M_MXFAST> (glibc 2.3 以降)"
3489
3490 #.  The following text adapted from comments in the glibc sources:
3491 #. type: Plain text
3492 #: build/C/man3/mallopt.3:212
3493 msgid ""
3494 "Set the upper limit for memory allocation requests that are satisfied using "
3495 "\"fastbins\".  (The measurement unit for this parameter is bytes.)  Fastbins "
3496 "are storage areas that hold deallocated blocks of memory of the same size "
3497 "without merging adjacent free blocks.  Subsequent reallocation of blocks of "
3498 "the same size can be handled very quickly by allocating from the fastbin, "
3499 "although memory fragmentation and the overall memory footprint of the "
3500 "program can increase.  The default value for this parameter is I<64*sizeof"
3501 "(size_t)/4> (i.e., 64 on 32-bit architectures).  The range for this "
3502 "parameter is 0 to I<80*sizeof(size_t)/4>.  Setting B<M_MXFAST> to 0 disables "
3503 "the use of fastbins."
3504 msgstr ""
3505
3506 #. type: TP
3507 #: build/C/man3/mallopt.3:212
3508 #, no-wrap
3509 msgid "B<M_PERTURB> (since glibc 2.4)"
3510 msgstr "B<M_PERTURB> (glibc 2.4 以降)"
3511
3512 #. type: Plain text
3513 #: build/C/man3/mallopt.3:227
3514 msgid ""
3515 "If this parameter is set to a nonzero value, then bytes of allocated memory "
3516 "(other than allocations via B<calloc>(3))  are initialized to the complement "
3517 "of the value in the least significant byte of I<value>, and when allocated "
3518 "memory is released using B<free>(3), the freed bytes are set to the least "
3519 "significant byte of I<value>.  This can be useful for detecting errors where "
3520 "programs incorrectly rely on allocated memory being initialized to zero, or "
3521 "reuse values in memory that has already been freed."
3522 msgstr ""
3523
3524 #. type: TP
3525 #: build/C/man3/mallopt.3:227
3526 #, no-wrap
3527 msgid "B<M_TOP_PAD>"
3528 msgstr "B<M_TOP_PAD>"
3529
3530 #. type: Plain text
3531 #: build/C/man3/mallopt.3:234
3532 msgid ""
3533 "This parameter defines the amount of padding to employ when calling B<sbrk>"
3534 "(2)  to modify the program break.  (The measurement unit for this parameter "
3535 "is bytes.)  This parameter has an effect in the following circumstances:"
3536 msgstr ""
3537
3538 #. type: Plain text
3539 #: build/C/man3/mallopt.3:241
3540 msgid ""
3541 "When the program break is increased, then B<M_TOP_PAD> bytes are added to "
3542 "the B<sbrk>(2)  request."
3543 msgstr ""
3544
3545 #. type: Plain text
3546 #: build/C/man3/mallopt.3:247
3547 msgid ""
3548 "When the heap is trimmed as a consequence of calling B<free>(3)  (see the "
3549 "discussion of B<M_TRIM_THRESHOLD>)  this much free space is preserved at the "
3550 "top of the heap."
3551 msgstr ""
3552
3553 #. type: Plain text
3554 #: build/C/man3/mallopt.3:251
3555 msgid ""
3556 "In either case, the amount of padding is always rounded to a system page "
3557 "boundary."
3558 msgstr ""
3559
3560 #. type: Plain text
3561 #: build/C/man3/mallopt.3:258
3562 msgid ""
3563 "Modifying B<M_TOP_PAD> is a trade-off between increasing the number of "
3564 "system calls (when the parameter is set low)  and wasting unused memory at "
3565 "the top of the heap (when the parameter is set high)."
3566 msgstr ""
3567
3568 #.  DEFAULT_TOP_PAD in glibc source
3569 #. type: Plain text
3570 #: build/C/man3/mallopt.3:261
3571 msgid "The default value for this parameter is 128*1024."
3572 msgstr ""
3573
3574 #. type: TP
3575 #: build/C/man3/mallopt.3:261
3576 #, no-wrap
3577 msgid "B<M_TRIM_THRESHOLD>"
3578 msgstr "B<M_TRIM_THRESHOLD>"
3579
3580 #. type: Plain text
3581 #: build/C/man3/mallopt.3:277
3582 msgid ""
3583 "When the amount of contiguous free memory at the top of the heap grows "
3584 "sufficiently large, B<free>(3)  employs B<sbrk>(2)  to release this memory "
3585 "back to the system.  (This can be useful in programs that continue to "
3586 "execute for a long period after freeing a significant amount of memory.)  "
3587 "The B<M_TRIM_THRESHOLD> parameter specifies the minimum size (in bytes) that "
3588 "this block of memory must reach before B<sbrk>(2)  is used to trim the heap."
3589 msgstr ""
3590
3591 #. type: Plain text
3592 #: build/C/man3/mallopt.3:282
3593 msgid ""
3594 "The default value for this parameter is 128*1024.  Setting "
3595 "B<M_TRIM_THRESHOLD> to -1 disables trimming completely."
3596 msgstr ""
3597
3598 #
3599 #
3600 #
3601 #.  FIXME Do the arena parameters need to be documented?
3602 #.  .TP
3603 #.  .BR M_ARENA_TEST " (since glibc 2.10)"
3604 #.  .TP
3605 #.  .BR M_ARENA_MAX " (since glibc 2.10)"
3606 #.  Environment variables
3607 #.      MALLOC_ARENA_MAX_
3608 #.      MALLOC_ARENA_TEST_
3609 #.  http://udrepper.livejournal.com/20948.html describes some details
3610 #.      of the MALLOC_ARENA_* environment variables.
3611 #.  These macros aren't enabled in production releases until 2.15?
3612 #.  (see glibc malloc/Makefile)
3613 #. type: Plain text
3614 #: build/C/man3/mallopt.3:305
3615 msgid ""
3616 "Modifying B<M_TRIM_THRESHOLD> is a trade-off between increasing the number "
3617 "of system calls (when the parameter is set low)  and wasting unused memory "
3618 "at the top of the heap (when the parameter is set high)."
3619 msgstr ""
3620
3621 #. type: SS
3622 #: build/C/man3/mallopt.3:305
3623 #, fuzzy, no-wrap
3624 #| msgid "Environment Variables"
3625 msgid "Environment variables"
3626 msgstr "環境変数"
3627
3628 #. type: Plain text
3629 #: build/C/man3/mallopt.3:320
3630 msgid ""
3631 "A number of environment variables can be defined to modify some of the same "
3632 "parameters as are controlled by B<mallopt>().  Using these variables has the "
3633 "advantage that the source code of the program need not be changed.  To be "
3634 "effective, these variables must be defined before the first call to a memory-"
3635 "allocation function.  (If the same parameters are adjusted via B<mallopt>()  "
3636 "then the B<mallopt>()  settings take precedence.)  For security reasons, "
3637 "these variables are ignored in set-user-ID and set-group-ID programs."
3638 msgstr ""
3639
3640 #. type: Plain text
3641 #: build/C/man3/mallopt.3:323
3642 msgid ""
3643 "The environment variables are as follows (note the trailing underscore at "
3644 "the end of the name of each variable):"
3645 msgstr ""
3646
3647 #. type: TP
3648 #: build/C/man3/mallopt.3:323
3649 #, no-wrap
3650 msgid "B<MALLOC_CHECK_>"
3651 msgstr "B<MALLOC_CHECK_>"
3652
3653 #.  On glibc 2.12/x86, a simple malloc()+free() loop is about 70% slower
3654 #.  when MALLOC_CHECK_ was set.
3655 #. type: Plain text
3656 #: build/C/man3/mallopt.3:340
3657 msgid ""
3658 "This environment variable controls the same parameter as B<mallopt>()  "
3659 "B<M_CHECK_ACTION>.  If this variable is set to a nonzero value, then a "
3660 "special implementation of the memory-allocation functions is used.  (This is "
3661 "accomplished using the B<malloc_hook>(3)  feature.)  This implementation "
3662 "performs additional error checking, but is slower than the standard set of "
3663 "memory-allocation functions.  (This implementation does not detect all "
3664 "possible errors; memory leaks can still occur.)"
3665 msgstr ""
3666
3667 #. type: Plain text
3668 #: build/C/man3/mallopt.3:345
3669 msgid ""
3670 "The value assigned to this environment variable should be a single digit, "
3671 "whose meaning is as described for B<M_CHECK_ACTION>.  Any characters beyond "
3672 "the initial digit are ignored."
3673 msgstr ""
3674
3675 #. type: Plain text
3676 #: build/C/man3/mallopt.3:354
3677 msgid ""
3678 "For security reasons, the effect of B<MALLOC_CHECK_> is disabled by default "
3679 "for set-user-ID and set-group-ID programs.  However, if the file I</etc/suid-"
3680 "debug> exists (the content of the file is irrelevant), then B<MALLOC_CHECK_> "
3681 "also has an effect for set-user-ID and set-group-ID programs."
3682 msgstr ""
3683
3684 #. type: TP
3685 #: build/C/man3/mallopt.3:354
3686 #, no-wrap
3687 msgid "B<MALLOC_MMAP_MAX_>"
3688 msgstr "B<MALLOC_MMAP_MAX_>"
3689
3690 #. type: Plain text
3691 #: build/C/man3/mallopt.3:359
3692 msgid "Controls the same parameter as B<mallopt>()  B<M_MMAP_MAX>."
3693 msgstr ""
3694
3695 #. type: TP
3696 #: build/C/man3/mallopt.3:359
3697 #, no-wrap
3698 msgid "B<MALLOC_MMAP_THRESHOLD_>"
3699 msgstr "B<MALLOC_MMAP_THRESHOLD_>"
3700
3701 #. type: Plain text
3702 #: build/C/man3/mallopt.3:364
3703 msgid "Controls the same parameter as B<mallopt>()  B<M_MMAP_THRESHOLD>."
3704 msgstr ""
3705
3706 #. type: TP
3707 #: build/C/man3/mallopt.3:364
3708 #, no-wrap
3709 msgid "B<MALLOC_PERTURB_>"
3710 msgstr "B<MALLOC_PERTURB_>"
3711
3712 #. type: Plain text
3713 #: build/C/man3/mallopt.3:369
3714 msgid "Controls the same parameter as B<mallopt>()  B<M_PERTURB>."
3715 msgstr ""
3716
3717 #. type: TP
3718 #: build/C/man3/mallopt.3:369
3719 #, no-wrap
3720 msgid "B<MALLOC_TRIM_THRESHOLD_>"
3721 msgstr "B<MALLOC_TRIM_THRESHOLD_>"
3722
3723 #. type: Plain text
3724 #: build/C/man3/mallopt.3:374
3725 msgid "Controls the same parameter as B<mallopt>()  B<M_TRIM_THRESHOLD>."
3726 msgstr ""
3727
3728 #. type: TP
3729 #: build/C/man3/mallopt.3:374
3730 #, no-wrap
3731 msgid "B<MALLOC_TOP_PAD_>"
3732 msgstr "B<MALLOC_TOP_PAD_>"
3733
3734 #. type: Plain text
3735 #: build/C/man3/mallopt.3:379
3736 msgid "Controls the same parameter as B<mallopt>()  B<M_TOP_PAD>."
3737 msgstr ""
3738
3739 #. type: Plain text
3740 #: build/C/man3/mallopt.3:384
3741 msgid "On success, B<mallopt>()  returns 1.  On error, it returns 0."
3742 msgstr "B<mallopt>()  は成功すると 1 を返す。エラーの場合は 0 を返す。"
3743
3744 #.  .SH VERSIONS
3745 #.  Available already in glibc 2.0, possibly earlier
3746 #. type: Plain text
3747 #: build/C/man3/mallopt.3:392
3748 msgid "On error, I<errno> is I<not> set."
3749 msgstr "エラーの場合、I<errno> は設定I<されない>。"
3750
3751 #.  .SH NOTES
3752 #. type: Plain text
3753 #: build/C/man3/mallopt.3:406
3754 msgid ""
3755 "This function is not specified by POSIX or the C standards.  A similar "
3756 "function exists on many System V derivatives, but the range of values for "
3757 "I<param> varies across systems.  The SVID defined options B<M_MXFAST>, "
3758 "B<M_NLBLKS>, B<M_GRAIN>, and B<M_KEEP>, but only the first of these is "
3759 "implemented in glibc."
3760 msgstr ""
3761
3762 #. type: Plain text
3763 #: build/C/man3/mallopt.3:410
3764 msgid "Specifying an invalid value for I<param> does not generate an error."
3765 msgstr ""
3766
3767 #.  FIXME This looks buggy:
3768 #.  setting the M_MXFAST limit rounds up:    (s + SIZE_SZ) & ~MALLOC_ALIGN_MASK)
3769 #.  malloc requests are rounded up:
3770 #.     (req) + SIZE_SZ + MALLOC_ALIGN_MASK) & ~MALLOC_ALIGN_MASK
3771 #.  http://sources.redhat.com/bugzilla/show_bug.cgi?id=12129
3772 #. type: Plain text
3773 #: build/C/man3/mallopt.3:418
3774 msgid ""
3775 "A calculation error within the glibc implementation means that a call of the "
3776 "form:"
3777 msgstr ""
3778
3779 #. type: Plain text
3780 #: build/C/man3/mallopt.3:421
3781 #, no-wrap
3782 msgid "    mallopt(M_MXFAST, n)\n"
3783 msgstr "    mallopt(M_MXFAST, n)\n"
3784
3785 #.  Bins are multiples of 2 * sizeof(size_t) + sizeof(size_t)
3786 #. type: Plain text
3787 #: build/C/man3/mallopt.3:433
3788 msgid ""
3789 "does not result in fastbins being employed for all allocations of size up to "
3790 "I<n>.  To ensure desired results, I<n> should be rounded up to the next "
3791 "multiple greater than or equal to I<(2k+1)*sizeof(size_t)>, where I<k> is an "
3792 "integer."
3793 msgstr ""
3794
3795 #.  FIXME MALLOC_MMAP_THRESHOLD_ and MALLOC_MMAP_MAX_
3796 #.  do have an effect for set-user-ID programs (but not
3797 #.  set-group-ID programs).
3798 #.  http://sources.redhat.com/bugzilla/show_bug.cgi?id=12155
3799 #. type: Plain text
3800 #: build/C/man3/mallopt.3:445
3801 msgid ""
3802 "The B<MALLOC_MMAP_THRESHOLD_> and B<MALLOC_MMAP_MAX_> variables are I<not> "
3803 "ignored in set-group-ID programs."
3804 msgstr ""
3805
3806 #.  FIXME http://sources.redhat.com/bugzilla/show_bug.cgi?id=12140
3807 #. type: Plain text
3808 #: build/C/man3/mallopt.3:466
3809 msgid ""
3810 "If B<mallopt>()  is used to set B<M_PERTURB>, then, as expected, the bytes "
3811 "of allocated memory are initialized to the complement of the byte in "
3812 "I<value>, and when that memory is freed, the bytes of the region are "
3813 "initialized to the byte specified in I<value>.  However, there is an off-by-"
3814 "I<sizeof(size_t)> error in the implementation: instead of initializing "
3815 "precisely the block of memory being freed by the call I<free(p)>, the block "
3816 "starting at I<p+sizeof(size_t)> is initialized."
3817 msgstr ""
3818
3819 #. type: Plain text
3820 #: build/C/man3/mallopt.3:475
3821 msgid ""
3822 "The program below demonstrates the use of B<M_CHECK_ACTION>.  If the program "
3823 "is supplied with an (integer) command-line argument, then that argument is "
3824 "used to set the B<M_CHECK_ACTION> parameter.  The program then allocates a "
3825 "block of memory, and frees it twice (an error)."
3826 msgstr ""
3827
3828 #. type: Plain text
3829 #: build/C/man3/mallopt.3:479
3830 msgid ""
3831 "The following shell session shows what happens when we run this program "
3832 "under glibc, with the default value for B<M_CHECK_ACTION>:"
3833 msgstr ""
3834
3835 #. type: Plain text
3836 #: build/C/man3/mallopt.3:499
3837 #, no-wrap
3838 msgid ""
3839 "$ B<./a.out>\n"
3840 "main(): returned from first free() call\n"
3841 "*** glibc detected *** ./a.out: double free or corruption (top): 0x09d30008 ***\n"
3842 "======= Backtrace: =========\n"
3843 "/lib/libc.so.6(+0x6c501)[0x523501]\n"
3844 "/lib/libc.so.6(+0x6dd70)[0x524d70]\n"
3845 "/lib/libc.so.6(cfree+0x6d)[0x527e5d]\n"
3846 "\\&./a.out[0x80485db]\n"
3847 "/lib/libc.so.6(__libc_start_main+0xe7)[0x4cdce7]\n"
3848 "\\&./a.out[0x8048471]\n"
3849 "======= Memory map: ========\n"
3850 "001e4000-001fe000 r-xp 00000000 08:06 1083555    /lib/libgcc_s.so.1\n"
3851 "001fe000-001ff000 r--p 00019000 08:06 1083555    /lib/libgcc_s.so.1\n"
3852 "[some lines omitted]\n"
3853 "b7814000-b7817000 rw-p 00000000 00:00 0\n"
3854 "bff53000-bff74000 rw-p 00000000 00:00 0          [stack]\n"
3855 "Aborted (core dumped)\n"
3856 msgstr ""
3857 "$ B<./a.out>\n"
3858 "main(): returned from first free() call\n"
3859 "*** glibc detected *** ./a.out: double free or corruption (top): 0x09d30008 ***\n"
3860 "======= Backtrace: =========\n"
3861 "/lib/libc.so.6(+0x6c501)[0x523501]\n"
3862 "/lib/libc.so.6(+0x6dd70)[0x524d70]\n"
3863 "/lib/libc.so.6(cfree+0x6d)[0x527e5d]\n"
3864 "\\&./a.out[0x80485db]\n"
3865 "/lib/libc.so.6(__libc_start_main+0xe7)[0x4cdce7]\n"
3866 "\\&./a.out[0x8048471]\n"
3867 "======= Memory map: ========\n"
3868 "001e4000-001fe000 r-xp 00000000 08:06 1083555    /lib/libgcc_s.so.1\n"
3869 "001fe000-001ff000 r--p 00019000 08:06 1083555    /lib/libgcc_s.so.1\n"
3870 "[some lines omitted]\n"
3871 "b7814000-b7817000 rw-p 00000000 00:00 0\n"
3872 "bff53000-bff74000 rw-p 00000000 00:00 0          [stack]\n"
3873 "Aborted (core dumped)\n"
3874
3875 #. type: Plain text
3876 #: build/C/man3/mallopt.3:504
3877 msgid ""
3878 "The following runs show the results when employing other values for "
3879 "B<M_CHECK_ACTION>:"
3880 msgstr ""
3881
3882 #. type: Plain text
3883 #: build/C/man3/mallopt.3:517
3884 #, no-wrap
3885 msgid ""
3886 "$ B<./a.out 1>             # Diagnose error and continue\n"
3887 "main(): returned from first free() call\n"
3888 "*** glibc detected *** ./a.out: double free or corruption (top): 0x09cbe008 ***\n"
3889 "main(): returned from second free() call\n"
3890 "$ B<./a.out 2>             # Abort without error message\n"
3891 "main(): returned from first free() call\n"
3892 "Aborted (core dumped)\n"
3893 "$ B<./a.out 0>             # Ignore error and continue\n"
3894 "main(): returned from first free() call\n"
3895 "main(): returned from second free() call\n"
3896 msgstr ""
3897 "$ B<./a.out 1>             # Diagnose error and continue\n"
3898 "main(): returned from first free() call\n"
3899 "*** glibc detected *** ./a.out: double free or corruption (top): 0x09cbe008 ***\n"
3900 "main(): returned from second free() call\n"
3901 "$ B<./a.out 2>             # Abort without error message\n"
3902 "main(): returned from first free() call\n"
3903 "Aborted (core dumped)\n"
3904 "$ B<./a.out 0>             # Ignore error and continue\n"
3905 "main(): returned from first free() call\n"
3906 "main(): returned from second free() call\n"
3907
3908 #. type: Plain text
3909 #: build/C/man3/mallopt.3:523
3910 msgid ""
3911 "The next run shows how to set the same parameter using the B<MALLOC_CHECK_> "
3912 "environment variable:"
3913 msgstr ""
3914
3915 #. type: Plain text
3916 #: build/C/man3/mallopt.3:530
3917 #, no-wrap
3918 msgid ""
3919 "$ B<MALLOC_CHECK_=1 ./a.out>\n"
3920 "main(): returned from first free() call\n"
3921 "*** glibc detected *** ./a.out: free(): invalid pointer: 0x092c2008 ***\n"
3922 "main(): returned from second free() call\n"
3923 msgstr ""
3924 "$ B<MALLOC_CHECK_=1 ./a.out>\n"
3925 "main(): returned from first free() call\n"
3926 "*** glibc detected *** ./a.out: free(): invalid pointer: 0x092c2008 ***\n"
3927 "main(): returned from second free() call\n"
3928
3929 #. type: Plain text
3930 #: build/C/man3/mallopt.3:538
3931 #, no-wrap
3932 msgid ""
3933 "#include E<lt>malloc.hE<gt>\n"
3934 "#include E<lt>stdio.hE<gt>\n"
3935 "#include E<lt>stdlib.hE<gt>\n"
3936 msgstr ""
3937 "#include E<lt>malloc.hE<gt>\n"
3938 "#include E<lt>stdio.hE<gt>\n"
3939 "#include E<lt>stdlib.hE<gt>\n"
3940
3941 #. type: Plain text
3942 #: build/C/man3/mallopt.3:543 build/C/man3/mcheck.3:187
3943 #, no-wrap
3944 msgid ""
3945 "int\n"
3946 "main(int argc, char *argv[])\n"
3947 "{\n"
3948 "    char *p;\n"
3949 msgstr ""
3950 "int\n"
3951 "main(int argc, char *argv[])\n"
3952 "{\n"
3953 "    char *p;\n"
3954
3955 #. type: Plain text
3956 #: build/C/man3/mallopt.3:550
3957 #, no-wrap
3958 msgid ""
3959 "    if (argc E<gt> 1) {\n"
3960 "        if (mallopt(M_CHECK_ACTION, atoi(argv[1])) != 1) {\n"
3961 "            fprintf(stderr, \"mallopt() failed\");\n"
3962 "            exit(EXIT_FAILURE);\n"
3963 "        }\n"
3964 "    }\n"
3965 msgstr ""
3966 "    if (argc E<gt> 1) {\n"
3967 "        if (mallopt(M_CHECK_ACTION, atoi(argv[1])) != 1) {\n"
3968 "            fprintf(stderr, \"mallopt() failed\");\n"
3969 "            exit(EXIT_FAILURE);\n"
3970 "        }\n"
3971 "    }\n"
3972
3973 #. type: Plain text
3974 #: build/C/man3/mallopt.3:556
3975 #, no-wrap
3976 msgid ""
3977 "    p = malloc(1000);\n"
3978 "    if (p == NULL) {\n"
3979 "        fprintf(stderr, \"malloc() failed\");\n"
3980 "        exit(EXIT_FAILURE);\n"
3981 "    }\n"
3982 msgstr ""
3983 "    p = malloc(1000);\n"
3984 "    if (p == NULL) {\n"
3985 "        fprintf(stderr, \"malloc() failed\");\n"
3986 "        exit(EXIT_FAILURE);\n"
3987 "    }\n"
3988
3989 #. type: Plain text
3990 #: build/C/man3/mallopt.3:559
3991 #, no-wrap
3992 msgid ""
3993 "    free(p);\n"
3994 "    printf(\"main(): returned from first free() call\\en\");\n"
3995 msgstr ""
3996 "    free(p);\n"
3997 "    printf(\"main(): returned from first free() call\\en\");\n"
3998
3999 #. type: Plain text
4000 #: build/C/man3/mallopt.3:562
4001 #, no-wrap
4002 msgid ""
4003 "    free(p);\n"
4004 "    printf(\"main(): returned from second free() call\\en\");\n"
4005 msgstr ""
4006 "    free(p);\n"
4007 "    printf(\"main(): returned from second free() call\\en\");\n"
4008
4009 #. type: Plain text
4010 #: build/C/man3/mallopt.3:580
4011 #, fuzzy
4012 #| msgid ""
4013 #| "B<mmap>(2)  B<sbrk>(2), B<mallinfo>(3), B<malloc>(3), B<malloc_hook>(3), "
4014 #| "B<malloc_info>(3), B<malloc_stats>(3), B<malloc_trim>(3), B<mcheck>(3), "
4015 #| "B<mtrace>(3), B<posix_memalign>(3)"
4016 msgid ""
4017 "B<mmap>(2), B<sbrk>(2), B<mallinfo>(3), B<malloc>(3), B<malloc_hook>(3), "
4018 "B<malloc_info>(3), B<malloc_stats>(3), B<malloc_trim>(3), B<mcheck>(3), "
4019 "B<mtrace>(3), B<posix_memalign>(3)"
4020 msgstr ""
4021 "B<mmap>(2)  B<sbrk>(2), B<mallinfo>(3), B<malloc>(3), B<malloc_hook>(3), "
4022 "B<malloc_info>(3), B<malloc_stats>(3), B<malloc_trim>(3), B<mcheck>(3), "
4023 "B<mtrace>(3), B<posix_memalign>(3)"
4024
4025 #. type: TH
4026 #: build/C/man3/mcheck.3:25
4027 #, no-wrap
4028 msgid "MCHECK"
4029 msgstr ""
4030
4031 #. type: TH
4032 #: build/C/man3/mcheck.3:25 build/C/man3/mtrace.3:25
4033 #, no-wrap
4034 msgid "2012-04-18"
4035 msgstr "2012-04-18"
4036
4037 #. type: Plain text
4038 #: build/C/man3/mcheck.3:28
4039 msgid ""
4040 "mcheck, mcheck_check_all, mcheck_pedantic, mprobe - heap consistency checking"
4041 msgstr ""
4042
4043 #. type: Plain text
4044 #: build/C/man3/mcheck.3:31
4045 #, no-wrap
4046 msgid "B<#include E<lt>mcheck.hE<gt>>\n"
4047 msgstr "B<#include E<lt>mcheck.hE<gt>>\n"
4048
4049 #. type: Plain text
4050 #: build/C/man3/mcheck.3:33
4051 #, no-wrap
4052 msgid "B<int mcheck(void (*>I<abortfunc>B<)(enum mcheck_status >I<mstatus>B<));>\n"
4053 msgstr ""
4054
4055 #. type: Plain text
4056 #: build/C/man3/mcheck.3:35
4057 #, no-wrap
4058 msgid "B<int mcheck_pedantic(void (*>I<abortfunc>B<)(enum mcheck_status >I<mstatus>B<));>\n"
4059 msgstr ""
4060
4061 #. type: Plain text
4062 #: build/C/man3/mcheck.3:37
4063 #, no-wrap
4064 msgid "B<void mcheck_check_all(void);>\n"
4065 msgstr "B<void mcheck_check_all(void);>\n"
4066
4067 #. type: Plain text
4068 #: build/C/man3/mcheck.3:39
4069 #, no-wrap
4070 msgid "B<enum mcheck_status mprobe(void *>I<ptr>B<);>\n"
4071 msgstr "B<enum mcheck_status mprobe(void *>I<ptr>B<);>\n"
4072
4073 #. type: Plain text
4074 #: build/C/man3/mcheck.3:51
4075 msgid ""
4076 "The B<mcheck>()  function installs a set of debugging hooks for the B<malloc>"
4077 "(3)  family of memory-allocation functions.  These hooks cause certain "
4078 "consistency checks to be performed on the state of the heap.  The checks can "
4079 "detect application errors such as freeing a block of memory more than once "
4080 "or corrupting the bookkeeping data structures that immediately precede a "
4081 "block of allocated memory."
4082 msgstr ""
4083
4084 #. type: Plain text
4085 #: build/C/man3/mcheck.3:63
4086 msgid ""
4087 "To be effective, the B<mcheck>()  function must be called before the first "
4088 "call to B<malloc>(3)  or a related function.  In cases where this is "
4089 "difficult to ensure, linking the program with I<-mcheck> inserts an implicit "
4090 "call to B<mcheck>()  (with a NULL argument)  before the first call to a "
4091 "memory-allocation function."
4092 msgstr ""
4093
4094 #. type: Plain text
4095 #: build/C/man3/mcheck.3:71
4096 msgid ""
4097 "The B<mcheck_pedantic>()  function is similar to B<mcheck>(), but performs "
4098 "checks on all allocated blocks whenever one of the memory-allocation "
4099 "functions is called.  This can be very slow!"
4100 msgstr ""
4101
4102 #. type: Plain text
4103 #: build/C/man3/mcheck.3:78
4104 msgid ""
4105 "The B<mcheck_check_all>()  function causes an immediate check on all "
4106 "allocated blocks.  This call is only effective if B<mcheck>()  is called "
4107 "beforehand."
4108 msgstr ""
4109
4110 #. type: Plain text
4111 #: build/C/man3/mcheck.3:91
4112 msgid ""
4113 "If the system detects an inconsistency in the heap, the caller-supplied "
4114 "function pointed to by I<abortfunc> is invoked with a single argument "
4115 "argument, I<mstatus>, that indicates what type of inconsistency was "
4116 "detected.  If I<abortfunc> is NULL, a default function prints an error "
4117 "message on I<stderr> and calls B<abort>(3)."
4118 msgstr ""
4119
4120 #. type: Plain text
4121 #: build/C/man3/mcheck.3:103
4122 msgid ""
4123 "The B<mprobe>()  function performs a consistency check on the block of "
4124 "allocated memory pointed to by I<ptr>.  The B<mcheck>()  function should be "
4125 "called beforehand (otherwise B<mprobe>()  returns B<MCHECK_DISABLED>)."
4126 msgstr ""
4127
4128 #. type: Plain text
4129 #: build/C/man3/mcheck.3:111
4130 msgid ""
4131 "The following list describes the values returned by B<mprobe>()  or passed "
4132 "as the I<mstatus> argument when I<abortfunc> is invoked:"
4133 msgstr ""
4134
4135 #. type: TP
4136 #: build/C/man3/mcheck.3:111
4137 #, no-wrap
4138 msgid "B<MCHECK_DISABLED> (B<mprobe>() only)"
4139 msgstr ""
4140
4141 #. type: Plain text
4142 #: build/C/man3/mcheck.3:116
4143 msgid ""
4144 "B<mcheck>()  was not called before the first memory allocation function was "
4145 "called.  Consistency checking is not possible."
4146 msgstr ""
4147
4148 #. type: TP
4149 #: build/C/man3/mcheck.3:116
4150 #, no-wrap
4151 msgid "B<MCHECK_OK> (B<mprobe>() only)"
4152 msgstr ""
4153
4154 #. type: Plain text
4155 #: build/C/man3/mcheck.3:119
4156 msgid "No inconsistency detected."
4157 msgstr ""
4158
4159 #. type: TP
4160 #: build/C/man3/mcheck.3:119
4161 #, no-wrap
4162 msgid "B<MCHECK_HEAD>"
4163 msgstr "B<MCHECK_HEAD>"
4164
4165 #. type: Plain text
4166 #: build/C/man3/mcheck.3:122
4167 msgid "Memory preceding an allocated block was clobbered."
4168 msgstr ""
4169
4170 #. type: TP
4171 #: build/C/man3/mcheck.3:122
4172 #, no-wrap
4173 msgid "B<MCHECK_TAIL>"
4174 msgstr "B<MCHECK_TAIL>"
4175
4176 #. type: Plain text
4177 #: build/C/man3/mcheck.3:125
4178 msgid "Memory following an allocated block was clobbered."
4179 msgstr ""
4180
4181 #. type: TP
4182 #: build/C/man3/mcheck.3:125
4183 #, no-wrap
4184 msgid "B<MCHECK_FREE>"
4185 msgstr "B<MCHECK_FREE>"
4186
4187 #. type: Plain text
4188 #: build/C/man3/mcheck.3:129
4189 msgid "A block of memory was freed twice."
4190 msgstr ""
4191
4192 #. type: Plain text
4193 #: build/C/man3/mcheck.3:134
4194 msgid ""
4195 "B<mcheck>()  and B<mcheck_pedantic>()  return 0 on success, or -1 on error."
4196 msgstr ""
4197
4198 #. type: Plain text
4199 #: build/C/man3/mcheck.3:145
4200 msgid ""
4201 "The B<mcheck_pedantic>()  and B<mcheck_check_all>()  functions are available "
4202 "since glibc 2.2.  The B<mcheck>()  and B<mprobe>()  functions are present "
4203 "since at least glibc 2.0"
4204 msgstr ""
4205
4206 #.  But is MALLOC_CHECK_ slower?
4207 #. type: Plain text
4208 #: build/C/man3/mcheck.3:159
4209 msgid ""
4210 "Linking a program with I<-lmcheck> and using the B<MALLOC_CHECK_> "
4211 "environment variable (described in B<mallopt>(3))  cause the same kinds of "
4212 "errors to be detected.  But, using B<MALLOC_CHECK_> does not require the "
4213 "application to be relinked."
4214 msgstr ""
4215
4216 #. type: Plain text
4217 #: build/C/man3/mcheck.3:165
4218 msgid ""
4219 "The program below calls B<mcheck>()  with a NULL argument and then frees the "
4220 "same block of memory twice.  The following shell session demonstrates what "
4221 "happens when running the program:"
4222 msgstr ""
4223
4224 #. type: Plain text
4225 #: build/C/man3/mcheck.3:170
4226 #, no-wrap
4227 msgid ""
4228 "$B< ./a.out>\n"
4229 "About to free\n"
4230 msgstr ""
4231
4232 #. type: Plain text
4233 #: build/C/man3/mcheck.3:174
4234 #, no-wrap
4235 msgid ""
4236 "About to free a second time\n"
4237 "block freed twice\n"
4238 "Aborted (core dumped)\n"
4239 msgstr ""
4240
4241 #. type: Plain text
4242 #: build/C/man3/mcheck.3:182
4243 #, no-wrap
4244 msgid ""
4245 "#include E<lt>stdlib.hE<gt>\n"
4246 "#include E<lt>stdio.hE<gt>\n"
4247 "#include E<lt>mcheck.hE<gt>\n"
4248 msgstr ""
4249 "#include E<lt>stdlib.hE<gt>\n"
4250 "#include E<lt>stdio.hE<gt>\n"
4251 "#include E<lt>mcheck.hE<gt>\n"
4252
4253 #. type: Plain text
4254 #: build/C/man3/mcheck.3:190
4255 #, no-wrap
4256 msgid ""
4257 "    if (mcheck(NULL) != 0) {\n"
4258 "        fprintf(stderr, \"mcheck() failed\\en\");\n"
4259 msgstr ""
4260
4261 #. type: Plain text
4262 #: build/C/man3/mcheck.3:193
4263 #, no-wrap
4264 msgid ""
4265 "        exit(EXIT_FAILURE);\n"
4266 "    }\n"
4267 msgstr ""
4268 "        exit(EXIT_FAILURE);\n"
4269 "    }\n"
4270
4271 #. type: Plain text
4272 #: build/C/man3/mcheck.3:195
4273 #, no-wrap
4274 msgid "    p = malloc(1000);\n"
4275 msgstr "    p = malloc(1000);\n"
4276
4277 #. type: Plain text
4278 #: build/C/man3/mcheck.3:200
4279 #, no-wrap
4280 msgid ""
4281 "    fprintf(stderr, \"About to free\\en\");\n"
4282 "    free(p);\n"
4283 "    fprintf(stderr, \"\\enAbout to free a second time\\en\");\n"
4284 "    free(p);\n"
4285 msgstr ""
4286
4287 #. type: Plain text
4288 #: build/C/man3/mcheck.3:208
4289 msgid "B<malloc>(3), B<mallopt>(3), B<mtrace>(3)"
4290 msgstr "B<malloc>(3), B<mallopt>(3), B<mtrace>(3)"
4291
4292 #. type: TH
4293 #: build/C/man2/mlock.2:26
4294 #, no-wrap
4295 msgid "MLOCK"
4296 msgstr "MLOCK"
4297
4298 #. type: TH
4299 #: build/C/man2/mlock.2:26
4300 #, no-wrap
4301 msgid "2011-09-14"
4302 msgstr "2011-09-14"
4303
4304 #. type: Plain text
4305 #: build/C/man2/mlock.2:29
4306 msgid "mlock, munlock, mlockall, munlockall - lock and unlock memory"
4307 msgstr "mlock - メモリのロックとロック解除を行う"
4308
4309 #. type: Plain text
4310 #: build/C/man2/mlock.2:32 build/C/man2/mmap.2:46 build/C/man2/mmap2.2:35
4311 #: build/C/man2/mprotect.2:44 build/C/man2/mremap.2:38
4312 #, no-wrap
4313 msgid "B<#include E<lt>sys/mman.hE<gt>>\n"
4314 msgstr "B<#include E<lt>sys/mman.hE<gt>>\n"
4315
4316 #. type: Plain text
4317 #: build/C/man2/mlock.2:35
4318 #, no-wrap
4319 msgid ""
4320 "B<int mlock(const void *>I<addr>B<, size_t >I<len>B<);>\n"
4321 "B<int munlock(const void *>I<addr>B<, size_t >I<len>B<);>\n"
4322 msgstr ""
4323 "B<int mlock(const void *>I<addr>B<, size_t >I<len>B<);>\n"
4324 "B<int munlock(const void *>I<addr>B<, size_t >I<len>B<);>\n"
4325
4326 #. type: Plain text
4327 #: build/C/man2/mlock.2:38
4328 #, no-wrap
4329 msgid ""
4330 "B<int mlockall(int >I<flags>B<);>\n"
4331 "B<int munlockall(void);>\n"
4332 msgstr ""
4333 "B<int mlockall(int >I<flags>B<);>\n"
4334 "B<int munlockall(void);>\n"
4335
4336 #. type: Plain text
4337 #: build/C/man2/mlock.2:54
4338 msgid ""
4339 "B<mlock>()  and B<mlockall>()  respectively lock part or all of the calling "
4340 "process's virtual address space into RAM, preventing that memory from being "
4341 "paged to the swap area.  B<munlock>()  and B<munlockall>()  perform the "
4342 "converse operation, respectively unlocking part or all of the calling "
4343 "process's virtual address space, so that pages in the specified virtual "
4344 "address range may once more to be swapped out if required by the kernel "
4345 "memory manager.  Memory locking and unlocking are performed in units of "
4346 "whole pages."
4347 msgstr ""
4348 "B<mlock>()  と B<mlockall>()  はそれぞれ、呼び出し元プロセスの仮想アドレス空"
4349 "間の一部または全部を RAM 上にロックし、メモリがスワップエリアにページングされ"
4350 "るのを防ぐ。 B<munlock>()  と B<munlockall>()  は逆の操作で、それぞれ呼び出し"
4351 "元プロセスの仮想アドレス空間の一部または全部を ロック解除する。つまり、指定さ"
4352 "れた仮想アドレス範囲のページは カーネルメモリマネージャーから要求されればス"
4353 "ワップアウトするようになる。 メモリのロックとロック解除はページ単位で行われ"
4354 "る。"
4355
4356 #. type: SS
4357 #: build/C/man2/mlock.2:54
4358 #, no-wrap
4359 msgid "mlock() and munlock()"
4360 msgstr "mlock() と munlock()"
4361
4362 #. type: Plain text
4363 #: build/C/man2/mlock.2:64
4364 msgid ""
4365 "B<mlock>()  locks pages in the address range starting at I<addr> and "
4366 "continuing for I<len> bytes.  All pages that contain a part of the specified "
4367 "address range are guaranteed to be resident in RAM when the call returns "
4368 "successfully; the pages are guaranteed to stay in RAM until later unlocked."
4369 msgstr ""
4370 "B<mlock>()  は I<addr> から始まる長さ I<len> バイトのアドレス範囲のページを"
4371 "ロックする。 呼び出しが成功した場合には、 指定されたアドレス範囲を含む全ての"
4372 "ページは RAM に残り続けることが保証される。 これらのページは後でロック解除さ"
4373 "れるまで RAM に残り続けることが保証される。"
4374
4375 #. type: Plain text
4376 #: build/C/man2/mlock.2:73
4377 msgid ""
4378 "B<munlock>()  unlocks pages in the address range starting at I<addr> and "
4379 "continuing for I<len> bytes.  After this call, all pages that contain a part "
4380 "of the specified memory range can be moved to external swap space again by "
4381 "the kernel."
4382 msgstr ""
4383 "B<munlock>()  は、 I<addr> から始まる長さ I<len> バイトのアドレス範囲のページ"
4384 "のロックを解除する。 この呼び出しを行った後は、カーネルが、指定されたメモリ範"
4385 "囲を含む 全てのページを外部のスワップ空間に移動できるようになる。"
4386
4387 #. type: SS
4388 #: build/C/man2/mlock.2:73
4389 #, no-wrap
4390 msgid "mlockall() and munlockall()"
4391 msgstr "mlockall() と munlockall()"
4392
4393 #. type: Plain text
4394 #: build/C/man2/mlock.2:83
4395 msgid ""
4396 "B<mlockall>()  locks all pages mapped into the address space of the calling "
4397 "process.  This includes the pages of the code, data and stack segment, as "
4398 "well as shared libraries, user space kernel data, shared memory, and memory-"
4399 "mapped files.  All mapped pages are guaranteed to be resident in RAM when "
4400 "the call returns successfully; the pages are guaranteed to stay in RAM until "
4401 "later unlocked."
4402 msgstr ""
4403 "B<mlockall>()  は呼び出し元プロセスのアドレス空間にマップされている全てのペー"
4404 "ジを ロックする。これにはコード、データ、スタックの 各セグメント、共有ライブ"
4405 "ラリ、カーネルのユーザー空間データ、 共有メモリ、メモリ・マップされたファイル"
4406 "が含まれる。 システム・コールが成功した場合には全てのマップされたページは "
4407 "RAM に 残ることを保証される。 これらのページは後でロック解除されるまで RAM に"
4408 "残り続けることが保証される。"
4409
4410 #. type: Plain text
4411 #: build/C/man2/mlock.2:88
4412 msgid ""
4413 "The I<flags> argument is constructed as the bitwise OR of one or more of the "
4414 "following constants:"
4415 msgstr "I<flags> 引数は以下の内容の一つまたは複数のビット OR から構成される:"
4416
4417 #. type: TP
4418 #: build/C/man2/mlock.2:88
4419 #, no-wrap
4420 msgid "B<MCL_CURRENT>"
4421 msgstr "B<MCL_CURRENT>"
4422
4423 #. type: Plain text
4424 #: build/C/man2/mlock.2:92
4425 msgid ""
4426 "Lock all pages which are currently mapped into the address space of the "
4427 "process."
4428 msgstr ""
4429 "現在、プロセスのアドレス空間にマップされている全てのページをロックする。"
4430
4431 #. type: TP
4432 #: build/C/man2/mlock.2:92
4433 #, no-wrap
4434 msgid "B<MCL_FUTURE>"
4435 msgstr "B<MCL_FUTURE>"
4436
4437 #. type: Plain text
4438 #: build/C/man2/mlock.2:99
4439 msgid ""
4440 "Lock all pages which will become mapped into the address space of the "
4441 "process in the future.  These could be for instance new pages required by a "
4442 "growing heap and stack as well as new memory mapped files or shared memory "
4443 "regions."
4444 msgstr ""
4445 "将来、プロセスのアドレス空間にマップされる全てのページをロックする。 例えば、"
4446 "ヒープ (heap) やスタックの成長により新しく必要になったページだけで なく、新し"
4447 "くメモリマップされたファイルや共有メモリ領域もロックされる。"
4448
4449 #. type: Plain text
4450 #: build/C/man2/mlock.2:112
4451 msgid ""
4452 "If B<MCL_FUTURE> has been specified, then a later system call (e.g., B<mmap>"
4453 "(2), B<sbrk>(2), B<malloc>(3)), may fail if it would cause the number of "
4454 "locked bytes to exceed the permitted maximum (see below).  In the same "
4455 "circumstances, stack growth may likewise fail: the kernel will deny stack "
4456 "expansion and deliver a B<SIGSEGV> signal to the process."
4457 msgstr ""
4458 "B<MCL_FUTURE> が指定されていると、以後のシステムコール (例えば、 B<mmap>(2), "
4459 "B<sbrk>(2), B<malloc>(3))  は、ロックするバイト数が許可された最大値 (下記参"
4460 "照) を超えた場合に 失敗する可能性がある。 同様に、スタックの成長も失敗する可"
4461 "能性がある。 その場合、カーネルはスタックの拡張を拒否し、 B<SIGSEGV> をプロセ"
4462 "スに送る。"
4463
4464 #. type: Plain text
4465 #: build/C/man2/mlock.2:116
4466 msgid ""
4467 "B<munlockall>()  unlocks all pages mapped into the address space of the "
4468 "calling process."
4469 msgstr ""
4470 "B<munlockall>()  は、呼び出し元プロセスのアドレス空間にマッピングされている "
4471 "全てのページをロック解除する。"
4472
4473 #. type: Plain text
4474 #: build/C/man2/mlock.2:122
4475 msgid ""
4476 "On success these system calls return 0.  On error, -1 is returned, I<errno> "
4477 "is set appropriately, and no changes are made to any locks in the address "
4478 "space of the process."
4479 msgstr ""
4480 "成功した場合は、これらのシステムコールはゼロを返す。 エラーの場合は -1 が返さ"
4481 "れ、 I<errno> が適切に設定され、プロセスのアドレス空間におけるロックは変更さ"
4482 "れない。"
4483
4484 #. type: Plain text
4485 #: build/C/man2/mlock.2:131
4486 msgid ""
4487 "(Linux 2.6.9 and later) the caller had a nonzero B<RLIMIT_MEMLOCK> soft "
4488 "resource limit, but tried to lock more memory than the limit permitted.  "
4489 "This limit is not enforced if the process is privileged (B<CAP_IPC_LOCK>)."
4490 msgstr ""
4491 "(Linux 2.6.9 以降) 呼び出し元は非ゼロの ソフト資源制限 B<RLIMIT_MEMLOCK> を持"
4492 "つが、制限が許可している以上のメモリをロックしようとした。 この制限は、プロセ"
4493 "スが特権 (B<CAP_IPC_LOCK>)  を持っている場合は適用されない。"
4494
4495 #.  In the case of mlock(), this check is somewhat buggy: it doesn't
4496 #.  take into account whether the to-be-locked range overlaps with
4497 #.  already locked pages.  Thus, suppose we allocate
4498 #.  (num_physpages / 4 + 1) of memory, and lock those pages once using
4499 #.  mlock(), and then lock the *same* page range a second time.
4500 #.  In the case, the second mlock() call will fail, since the check
4501 #.  calculates that the process is trying to lock (num_physpages / 2 + 2)
4502 #.  pages, which of course is not true.  (MTK, Nov 04, kernel 2.4.28)
4503 #. type: Plain text
4504 #: build/C/man2/mlock.2:143
4505 msgid ""
4506 "(Linux 2.4 and earlier) the calling process tried to lock more than half of "
4507 "RAM."
4508 msgstr ""
4509 "(Linux 2.4 以前) 呼び出し元プロセスが RAM の半分以上をロックしようとした。"
4510
4511 #. SVr4 documents an additional EAGAIN error code.
4512 #. type: Plain text
4513 #: build/C/man2/mlock.2:149
4514 msgid ""
4515 "The caller is not privileged, but needs privilege (B<CAP_IPC_LOCK>)  to "
4516 "perform the requested operation."
4517 msgstr ""
4518 "呼び出し側が特権を持っていないが、\n"
4519 "要求された操作を実行するには特権 (B<CAP_IPC_LOCK>) が必要である。"
4520
4521 #. type: Plain text
4522 #: build/C/man2/mlock.2:154
4523 msgid "For B<mlock>()  and B<munlock>():"
4524 msgstr "B<mlock>()  と B<munlock>()  用として:"
4525
4526 #. type: Plain text
4527 #: build/C/man2/mlock.2:157
4528 msgid "Some or all of the specified address range could not be locked."
4529 msgstr "指定されたアドレス範囲の一部または全てをロックすることができなかった。"
4530
4531 #. type: Plain text
4532 #: build/C/man2/mlock.2:164
4533 msgid ""
4534 "The result of the addition I<start>+I<len> was less than I<start> (e.g., the "
4535 "addition may have resulted in an overflow)."
4536 msgstr ""
4537 "I<start>+I<len> の加算の結果が I<start> よりも小さかった\n"
4538 "(例えば、加算でオーバーフローが発生したなど)。"
4539
4540 #. type: Plain text
4541 #: build/C/man2/mlock.2:169
4542 msgid "(Not on Linux)  I<addr> was not a multiple of the page size."
4543 msgstr ""
4544 "(Linux ではこの意味で使われない)  I<addr> がページサイズの倍数ではない。"
4545
4546 #. type: Plain text
4547 #: build/C/man2/mlock.2:173
4548 msgid ""
4549 "Some of the specified address range does not correspond to mapped pages in "
4550 "the address space of the process."
4551 msgstr ""
4552 "指定されたアドレス範囲がプロセスのアドレス空間にマップされたページと 一致しな"
4553 "い。"
4554
4555 #. type: Plain text
4556 #: build/C/man2/mlock.2:176
4557 msgid "For B<mlockall>():"
4558 msgstr "B<mlockall>()  用として:"
4559
4560 #. type: Plain text
4561 #: build/C/man2/mlock.2:179
4562 msgid "Unknown I<flags> were specified."
4563 msgstr "未知の I<flags> が指定された。"
4564
4565 #. type: Plain text
4566 #: build/C/man2/mlock.2:182
4567 msgid "For B<munlockall>():"
4568 msgstr "B<munlockall>()  用として:"
4569
4570 #. type: Plain text
4571 #: build/C/man2/mlock.2:186
4572 msgid ""
4573 "(Linux 2.6.8 and earlier) The caller was not privileged (B<CAP_IPC_LOCK>)."
4574 msgstr ""
4575 "(Linux 2.6.8 以前) 呼び出し元が権限 (B<CAP_IPC_LOCK>)  を持っていない。"
4576
4577 #. type: Plain text
4578 #: build/C/man2/mlock.2:188
4579 msgid "POSIX.1-2001, SVr4."
4580 msgstr "POSIX.1-2001, SVr4."
4581
4582 #. type: SH
4583 #: build/C/man2/mlock.2:188 build/C/man2/mmap.2:501 build/C/man2/msync.2:105
4584 #, no-wrap
4585 msgid "AVAILABILITY"
4586 msgstr "可用性"
4587
4588 #. type: Plain text
4589 #: build/C/man2/mlock.2:200
4590 msgid ""
4591 "On POSIX systems on which B<mlock>()  and B<munlock>()  are available, "
4592 "B<_POSIX_MEMLOCK_RANGE> is defined in I<E<lt>unistd.hE<gt>> and the number "
4593 "of bytes in a page can be determined from the constant B<PAGESIZE> (if "
4594 "defined) in I<E<lt>limits.hE<gt>> or by calling I<sysconf(_SC_PAGESIZE)>."
4595 msgstr ""
4596 "B<mlock>()  と B<munlock>()  が使用可能な POSIX システムでは "
4597 "B<_POSIX_MEMLOCK_RANGE> が I<E<lt>unistd.hE<gt>> で定義されている。 また、"
4598 "ページあたりのバイト数は、 I<E<lt>limits.hE<gt>> で定義される定数 "
4599 "B<PAGESIZE> から (定義されている場合)、もしくは I<sysconf(_SC_PAGESIZE)> を呼"
4600 "び出すことで決定できる。"
4601
4602 #.  POSIX.1-2001: It shall be defined to -1 or 0 or 200112L.
4603 #.  -1: unavailable, 0: ask using sysconf().
4604 #.  glibc defines it to 1.
4605 #. type: Plain text
4606 #: build/C/man2/mlock.2:213
4607 msgid ""
4608 "On POSIX systems on which B<mlockall>()  and B<munlockall>()  are available, "
4609 "B<_POSIX_MEMLOCK> is defined in I<E<lt>unistd.hE<gt>> to a value greater "
4610 "than 0.  (See also B<sysconf>(3).)"
4611 msgstr ""
4612 "B<mlockall>()  と B<munlockall>()  が利用可能な POSIX システムでは、 "
4613 "B<_POSIX_MEMLOCK> は I<E<lt>unistd.hE<gt>> で 0 より大きい値に定義されている "
4614 "(B<sysconf>(3)  も参照のこと)。"
4615
4616 #. type: Plain text
4617 #: build/C/man2/mlock.2:231
4618 msgid ""
4619 "Memory locking has two main applications: real-time algorithms and high-"
4620 "security data processing.  Real-time applications require deterministic "
4621 "timing, and, like scheduling, paging is one major cause of unexpected "
4622 "program execution delays.  Real-time applications will usually also switch "
4623 "to a real-time scheduler with B<sched_setscheduler>(2).  Cryptographic "
4624 "security software often handles critical bytes like passwords or secret keys "
4625 "as data structures.  As a result of paging, these secrets could be "
4626 "transferred onto a persistent swap store medium, where they might be "
4627 "accessible to the enemy long after the security software has erased the "
4628 "secrets in RAM and terminated.  (But be aware that the suspend mode on "
4629 "laptops and some desktop computers will save a copy of the system's RAM to "
4630 "disk, regardless of memory locks.)"
4631 msgstr ""
4632 "メモリのロックの用途としては主に二つある: リアルタイム アルゴリズムと高いセ"
4633 "キュリティの必要なデータ処理である。リアルタイムの アプリケーションは決定的な"
4634 "タイミングやスケジューリングを必要とするが、 ページングは予期しないプログラム"
4635 "の実行遅延をもたらす主要な要因となる。 リアルタイムのアプリケーションはたいて"
4636 "いは B<sched_setscheduler>(2)  でリアルタイムスケジューラに変更される。 暗号"
4637 "やセキュリティのソフトウェアはしばしばパスワードや秘密鍵のデータの ような重要"
4638 "なバイト列を扱う。ページングの結果、これらの秘密が スワップ用の固定媒体に転送"
4639 "されるかもしれない。そして、セキュリティ・ ソフトウェアが RAM 上の秘密を削除"
4640 "して終了したずっと後になっても、 このスワップされたデータには敵がアクセスでき"
4641 "る可能性がある (しかし、ラップトップといくつかのデスクトップコンピュータの サ"
4642 "スペンドモードはシステムの RAM の内容をメモリのロックに関わらず ディスクに保"
4643 "存することに注意)。"
4644
4645 #. type: Plain text
4646 #: build/C/man2/mlock.2:244
4647 msgid ""
4648 "Real-time processes that are using B<mlockall>()  to prevent delays on page "
4649 "faults should reserve enough locked stack pages before entering the time-"
4650 "critical section, so that no page fault can be caused by function calls.  "
4651 "This can be achieved by calling a function that allocates a sufficiently "
4652 "large automatic variable (an array) and writes to the memory occupied by "
4653 "this array in order to touch these stack pages.  This way, enough pages will "
4654 "be mapped for the stack and can be locked into RAM.  The dummy writes ensure "
4655 "that not even copy-on-write page faults can occur in the critical section."
4656 msgstr ""
4657 "リアルタイムプロセスが B<mlockall>()  を使ってページフォールトによる遅延を防"
4658 "ごうとする場合、 関数呼び出しによってページフォールトが発生しないように、 時"
4659 "間制限の厳しい部分 (time-critical section) に入る前に 十分な量のロックされた"
4660 "スタックを確保しておく必要がある。 これを実現するには、十分な大きさの自動変"
4661 "数 (の配列) を確保し、 これらのスタック用のページがメモリ上に確保されるように"
4662 "この配列に 書き込みを行う関数を用意し、これを呼び出せばよい。こうすること"
4663 "で、 十分な量のページがスタックにマッピングされ、RAM にロックされる。 ダミー"
4664 "の書き込みを行うことによって、 時間制限の厳しい部分 (critical section) 内では"
4665 "書き込み時コピーによる ページフォールトさえも発生しないことが保証される。"
4666
4667 #. type: Plain text
4668 #: build/C/man2/mlock.2:250
4669 msgid ""
4670 "Memory locks are not inherited by a child created via B<fork>(2)  and are "
4671 "automatically removed (unlocked) during an B<execve>(2)  or when the process "
4672 "terminates."
4673 msgstr ""
4674 "メモリロックは B<fork>(2)  で作成された子プロセスには継承されず、 B<execve>"
4675 "(2)  が呼ばれたり、プロセスが終了した場合は 自動的に削除される (ロック解除さ"
4676 "れる)。"
4677
4678 #. type: Plain text
4679 #: build/C/man2/mlock.2:254
4680 msgid ""
4681 "The memory lock on an address range is automatically removed if the address "
4682 "range is unmapped via B<munmap>(2)."
4683 msgstr ""
4684 "あるアドレス範囲に対するメモリロックは、そのアドレス範囲が B<munmap>(2)  に"
4685 "よってアンマップされた場合は削除される。"
4686
4687 #. type: Plain text
4688 #: build/C/man2/mlock.2:267
4689 msgid ""
4690 "Memory locks do not stack, that is, pages which have been locked several "
4691 "times by calls to B<mlock>()  or B<mlockall>()  will be unlocked by a single "
4692 "call to B<munlock>()  for the corresponding range or by B<munlockall>().  "
4693 "Pages which are mapped to several locations or by several processes stay "
4694 "locked into RAM as long as they are locked at least at one location or by at "
4695 "least one process."
4696 msgstr ""
4697 "メモリのロックは累積しない。 すなわち複数回 B<mlock>()  や B<mlockall>()  を"
4698 "呼び出してロックされたページでも、 対応する範囲に対して B<munlock>()  を 1 回"
4699 "呼び出したり B<munlockall>()  を呼び出したりするだけでロック解除される。 複数"
4700 "の場所や複数のプロセスにマップされているページは、少なくとも一つの場所、 一つ"
4701 "のプロセスでロックされている限りは RAM に残り続ける。"
4702
4703 #. type: Plain text
4704 #: build/C/man2/mlock.2:278
4705 msgid ""
4706 "Under Linux, B<mlock>()  and B<munlock>()  automatically round I<addr> down "
4707 "to the nearest page boundary.  However, POSIX.1-2001 allows an "
4708 "implementation to require that I<addr> is page aligned, so portable "
4709 "applications should ensure this."
4710 msgstr ""
4711 "Linux では、 B<mlock>()  と B<munlock>()  は自動的に I<addr> を端数切り捨てに"
4712 "より一番近いページ境界へと丸める。 しかし POSIX.1-2001 は I<addr> がページ境"
4713 "界に合っていることを要求する実装も許している。 そのため移植性を意図したアプリ"
4714 "ケーションではきちんと境界に合わせた方が良い。"
4715
4716 #. type: Plain text
4717 #: build/C/man2/mlock.2:291
4718 msgid ""
4719 "The I<VmLck> field of the Linux-specific I</proc/PID/status> file shows how "
4720 "many kilobytes of memory the process with ID I<PID> has locked using B<mlock>"
4721 "(), B<mlockall>(), and B<mmap>(2)  B<MAP_LOCKED>."
4722 msgstr ""
4723 "Linux 固有の I</proc/PID/status> ファイルの I<VmLck> フィールドには、\n"
4724 "B<mlock>(), B<mlockall>() および B<mmap>(2) B<MAP_LOCKED> を使って、\n"
4725 "ID が I<PID> のプロセスがロックしているメモリ量 (キロバイト単位) が\n"
4726 "表示される。"
4727
4728 #. type: SS
4729 #: build/C/man2/mlock.2:291
4730 #, no-wrap
4731 msgid "Limits and permissions"
4732 msgstr "制限と権限"
4733
4734 #. type: Plain text
4735 #: build/C/man2/mlock.2:298
4736 msgid ""
4737 "In Linux 2.6.8 and earlier, a process must be privileged (B<CAP_IPC_LOCK>)  "
4738 "in order to lock memory and the B<RLIMIT_MEMLOCK> soft resource limit "
4739 "defines a limit on how much memory the process may lock."
4740 msgstr ""
4741 "Linux 2.6.8 以前では、メモリをロックするためには特権 (B<CAP_IPC_LOCK>)  が必"
4742 "要で、 ソフト資源制限 B<RLIMIT_MEMLOCK> はプロセスがどれだけのメモリをロック"
4743 "できるかの制限を定義する。"
4744
4745 #. type: Plain text
4746 #: build/C/man2/mlock.2:304
4747 msgid ""
4748 "Since Linux 2.6.9, no limits are placed on the amount of memory that a "
4749 "privileged process can lock and the B<RLIMIT_MEMLOCK> soft resource limit "
4750 "instead defines a limit on how much memory an unprivileged process may lock."
4751 msgstr ""
4752 "Linux 2.6.9 以降では、特権を持つプロセスがロックできるメモリ量は無制限とな"
4753 "り、 代わりにソフト資源制限 B<RLIMIT_MEMLOCK> は特権を持たないプロセスがロッ"
4754 "クできるメモリ量の制限を定義する。"
4755
4756 #. type: Plain text
4757 #: build/C/man2/mlock.2:312
4758 msgid ""
4759 "In the 2.4 series Linux kernels up to and including 2.4.17, a bug caused the "
4760 "B<mlockall>()  B<MCL_FUTURE> flag to be inherited across a B<fork>(2).  This "
4761 "was rectified in kernel 2.4.18."
4762 msgstr ""
4763 "2.4.17 までの 2.4 シリーズの Linux カーネルには、 B<mlockall>()  "
4764 "B<MCL_FUTURE> フラグが B<fork>(2)  で継承されると言うバグがある。 これはカー"
4765 "ネル 2.4.18 で修正された。"
4766
4767 #.  See the following LKML thread:
4768 #.  http://marc.theaimsgroup.com/?l=linux-kernel&m=113801392825023&w=2
4769 #.  "Rationale for RLIMIT_MEMLOCK"
4770 #.  23 Jan 2006
4771 #. type: Plain text
4772 #: build/C/man2/mlock.2:329
4773 msgid ""
4774 "Since kernel 2.6.9, if a privileged process calls I<mlockall(MCL_FUTURE)> "
4775 "and later drops privileges (loses the B<CAP_IPC_LOCK> capability by, for "
4776 "example, setting its effective UID to a nonzero value), then subsequent "
4777 "memory allocations (e.g., B<mmap>(2), B<brk>(2))  will fail if the "
4778 "B<RLIMIT_MEMLOCK> resource limit is encountered."
4779 msgstr ""
4780 "カーネル 2.6.9 以降では、特権を持ったプロセスが I<mlockall(MCL_FUTURE)> を呼"
4781 "び出した後で、特権をなくした場合 (例えば、 実効 UID を 0 以外の値に変更するな"
4782 "どにより、 B<CAP_IPC_LOCK> ケーパビリティを失った場合)、リソース上限 "
4783 "B<RLIMIT_MEMLOCK> に達すると、それ以降のメモリ割り当て (例えば B<mmap>(2), "
4784 "B<brk>(2))  は失敗する。"
4785
4786 #. type: Plain text
4787 #: build/C/man2/mlock.2:336
4788 msgid ""
4789 "B<mmap>(2), B<setrlimit>(2), B<shmctl>(2), B<sysconf>(3), B<proc>(5), "
4790 "B<capabilities>(7)"
4791 msgstr ""
4792 "B<mmap>(2), B<setrlimit>(2), B<shmctl>(2), B<sysconf>(3), B<proc>(5),\n"
4793 "B<capabilities>(7)"
4794
4795 #. type: TH
4796 #: build/C/man2/mmap.2:40
4797 #, no-wrap
4798 msgid "MMAP"
4799 msgstr "MMAP"
4800
4801 #. type: TH
4802 #: build/C/man2/mmap.2:40
4803 #, fuzzy, no-wrap
4804 #| msgid "2009-02-25"
4805 msgid "2013-02-25"
4806 msgstr "2009-02-25"
4807
4808 #. type: Plain text
4809 #: build/C/man2/mmap.2:43
4810 msgid "mmap, munmap - map or unmap files or devices into memory"
4811 msgstr "mmap, munmap - ファイルやデバイスをメモリにマップ/アンマップする"
4812
4813 #. type: Plain text
4814 #: build/C/man2/mmap.2:51
4815 #, no-wrap
4816 msgid ""
4817 "B<void *mmap(void *>I<addr>B<, size_t >I<length>B<, int >I<prot>B<, int >I<flags>B<,>\n"
4818 "B<           int >I<fd>B<, off_t >I<offset>B<);>\n"
4819 "B<int munmap(void *>I<addr>B<, size_t >I<length>B<);>\n"
4820 msgstr ""
4821 "B<void *mmap(void *>I<addr>B<, size_t >I<length>B<, int >I<prot>B<, int >I<flags>B<,>\n"
4822 "B<           int >I<fd>B<, off_t >I<offset>B<);>\n"
4823 "B<int munmap(void *>I<addr>B<, size_t >I<length>B<);>\n"
4824
4825 #. type: Plain text
4826 #: build/C/man2/mmap.2:54
4827 msgid "See NOTES for information on feature test macro requirements."
4828 msgstr ""
4829
4830 #. type: Plain text
4831 #: build/C/man2/mmap.2:63
4832 msgid ""
4833 "B<mmap>()  creates a new mapping in the virtual address space of the calling "
4834 "process.  The starting address for the new mapping is specified in I<addr>.  "
4835 "The I<length> argument specifies the length of the mapping."
4836 msgstr ""
4837 "B<mmap>()  は、新しいマッピングを呼び出し元プロセスの仮想アドレス空間に作成す"
4838 "る。 新しいマッピングの開始アドレスは I<addr> で指定される。マッピングの長さ"
4839 "は I<length> 引き数で指定される。"
4840
4841 #.  Before Linux 2.6.24, the address was rounded up to the next page
4842 #.  boundary; since 2.6.24, it is rounded down!
4843 #. type: Plain text
4844 #: build/C/man2/mmap.2:77
4845 msgid ""
4846 "If I<addr> is NULL, then the kernel chooses the address at which to create "
4847 "the mapping; this is the most portable method of creating a new mapping.  If "
4848 "I<addr> is not NULL, then the kernel takes it as a hint about where to place "
4849 "the mapping; on Linux, the mapping will be created at a nearby page "
4850 "boundary.  The address of the new mapping is returned as the result of the "
4851 "call."
4852 msgstr ""
4853 "I<addr> が NULL の場合、カーネルがマッピングを作成するアドレスを選択する。 こ"
4854 "の方法は最も移植性のある新しいマッピングの作成方法である。 I<addr> が NULL で"
4855 "ない場合、カーネルはマッピングをどこに配置するかのヒントとして I<addr> を使用"
4856 "する。Linux では、マッピングはすぐ近くのページ境界に作成される。 新しいマッピ"
4857 "ングのアドレスは、呼び出しの返り値として返される。"
4858
4859 #. type: Plain text
4860 #: build/C/man2/mmap.2:89
4861 msgid ""
4862 "The contents of a file mapping (as opposed to an anonymous mapping; see "
4863 "B<MAP_ANONYMOUS> below), are initialized using I<length> bytes starting at "
4864 "offset I<offset> in the file (or other object) referred to by the file "
4865 "descriptor I<fd>.  I<offset> must be a multiple of the page size as returned "
4866 "by I<sysconf(_SC_PAGE_SIZE)>."
4867 msgstr ""
4868 "ファイルマッピングの内容は、 ファイルディスクリプタ I<fd> で参照されるファイ"
4869 "ル (もしくは他のオブジェクト) のオフセット I<offset> から開始される "
4870 "I<length> バイトのデータで初期化される (ファイルマッピングは無名マッピングの"
4871 "反対語である。 B<MAP_ANONYMOUS> を参照)。 I<offset> は I<sysconf"
4872 "(_SC_PAGE_SIZE)> が返すページサイズの倍数でなければならない。"
4873
4874 #. type: Plain text
4875 #: build/C/man2/mmap.2:97
4876 msgid ""
4877 "The I<prot> argument describes the desired memory protection of the mapping "
4878 "(and must not conflict with the open mode of the file).  It is either "
4879 "B<PROT_NONE> or the bitwise OR of one or more of the following flags:"
4880 msgstr ""
4881 "引き数 I<prot> には、マッピングのメモリ保護をどのように行なうかを指定する "
4882 "(ファイルのオープンモードと矛盾してはいけない)。 I<prot> には、 B<PROT_NONE> "
4883 "か、以下のフラグをひとつ以上ビット毎の論理和 (OR) をとったものを 指定できる。"
4884
4885 #. type: TP
4886 #: build/C/man2/mmap.2:97 build/C/man2/mprotect.2:73
4887 #, no-wrap
4888 msgid "B<PROT_EXEC>"
4889 msgstr "B<PROT_EXEC>"
4890
4891 #. type: Plain text
4892 #: build/C/man2/mmap.2:100
4893 msgid "Pages may be executed."
4894 msgstr "ページは実行可能である。"
4895
4896 #. type: TP
4897 #: build/C/man2/mmap.2:100 build/C/man2/mprotect.2:67
4898 #, no-wrap
4899 msgid "B<PROT_READ>"
4900 msgstr "B<PROT_READ>"
4901
4902 #. type: Plain text
4903 #: build/C/man2/mmap.2:103
4904 msgid "Pages may be read."
4905 msgstr "ページは読み込み可能である。"
4906
4907 #. type: TP
4908 #: build/C/man2/mmap.2:103 build/C/man2/mprotect.2:70
4909 #, no-wrap
4910 msgid "B<PROT_WRITE>"
4911 msgstr "B<PROT_WRITE>"
4912
4913 #. type: Plain text
4914 #: build/C/man2/mmap.2:106
4915 msgid "Pages may be written."
4916 msgstr "ページに書き込み可能である。"
4917
4918 #. type: TP
4919 #: build/C/man2/mmap.2:106 build/C/man2/mprotect.2:64
4920 #, no-wrap
4921 msgid "B<PROT_NONE>"
4922 msgstr "B<PROT_NONE>"
4923
4924 #. type: Plain text
4925 #: build/C/man2/mmap.2:109
4926 msgid "Pages may not be accessed."
4927 msgstr "ページにはアクセスできない。"
4928
4929 #. type: Plain text
4930 #: build/C/man2/mmap.2:118
4931 msgid ""
4932 "The I<flags> argument determines whether updates to the mapping are visible "
4933 "to other processes mapping the same region, and whether updates are carried "
4934 "through to the underlying file.  This behavior is determined by including "
4935 "exactly one of the following values in I<flags>:"
4936 msgstr ""
4937 "I<flags> 引き数により、マッピングに対する更新が同じ領域をマッピングしている "
4938 "他のプロセスに見えるか、更新がマッピング元のファイルを通じて 伝えられるか、が"
4939 "決定される。この動作は、以下の値のいずれか一つだけ (複数は指定できない) を "
4940 "I<flags> に含めることで指定する。"
4941
4942 #. type: TP
4943 #: build/C/man2/mmap.2:118
4944 #, no-wrap
4945 msgid "B<MAP_SHARED>"
4946 msgstr "B<MAP_SHARED>"
4947
4948 #. type: Plain text
4949 #: build/C/man2/mmap.2:128
4950 msgid ""
4951 "Share this mapping.  Updates to the mapping are visible to other processes "
4952 "that map this file, and are carried through to the underlying file.  The "
4953 "file may not actually be updated until B<msync>(2)  or B<munmap>()  is "
4954 "called."
4955 msgstr ""
4956 "このマッピングを共有する。 マッピングに対する更新はこのファイルをマッピングし"
4957 "ている他のプロセス から見える。更新はマッピング元のファイルを通じて伝えられ"
4958 "る。 ただし、ファイルの実際の更新は B<msync>(2)  または B<munmap>()  が呼ばれ"
4959 "るまで行われないこともある。"
4960
4961 #. type: TP
4962 #: build/C/man2/mmap.2:128
4963 #, no-wrap
4964 msgid "B<MAP_PRIVATE>"
4965 msgstr "B<MAP_PRIVATE>"
4966
4967 #. type: Plain text
4968 #: build/C/man2/mmap.2:137
4969 msgid ""
4970 "Create a private copy-on-write mapping.  Updates to the mapping are not "
4971 "visible to other processes mapping the same file, and are not carried "
4972 "through to the underlying file.  It is unspecified whether changes made to "
4973 "the file after the B<mmap>()  call are visible in the mapped region."
4974 msgstr ""
4975 "プライベートな copy-on-write (書き込み時コピー) マップを生成する。 マッピング"
4976 "に対する更新は同じファイルをマッピングしている他のプロセス には見えず、更新が"
4977 "マッピング元のファイルを通じて伝えられることもない。 B<mmap>()  の呼び出し後"
4978 "にマッピング元のファイルに対して行われた変更が、 マップ領域に反映されるかどう"
4979 "かは規定されていない。"
4980
4981 #. type: Plain text
4982 #: build/C/man2/mmap.2:139
4983 msgid "Both of these flags are described in POSIX.1-2001."
4984 msgstr "上記の二つのフラグは POSIX.1-2001 で規定されている。"
4985
4986 #. type: Plain text
4987 #: build/C/man2/mmap.2:142
4988 msgid ""
4989 "In addition, zero or more of the following values can be ORed in I<flags>:"
4990 msgstr ""
4991 "さらに、以下の値のうち 0 個以上をビット毎の論理和 (OR) で I<flags> に指定する"
4992 "ことができる。"
4993
4994 #. type: TP
4995 #: build/C/man2/mmap.2:142
4996 #, no-wrap
4997 msgid "B<MAP_32BIT> (since Linux 2.4.20, 2.6)"
4998 msgstr "B<MAP_32BIT> (Linux 2.4.20, 2.6 以降)"
4999
5000 #.  See http://lwn.net/Articles/294642 "Tangled up in threads", 19 Aug 08
5001 #. type: Plain text
5002 #: build/C/man2/mmap.2:158
5003 msgid ""
5004 "Put the mapping into the first 2 Gigabytes of the process address space.  "
5005 "This flag is only supported on x86-64, for 64-bit programs.  It was added to "
5006 "allow thread stacks to be allocated somewhere in the first 2GB of memory, so "
5007 "as to improve context-switch performance on some early 64-bit processors.  "
5008 "Modern x86-64 processors no longer have this performance problem, so use of "
5009 "this flag is not required on those systems.  The B<MAP_32BIT> flag is "
5010 "ignored when B<MAP_FIXED> is set."
5011 msgstr ""
5012 "マッピングをプロセスのアドレス空間の先頭 2 ギガバイト以内に配置する。 このフ"
5013 "ラグがサポートされているのは x86-64 アーキテクチャ上の 64 ビットプログラムの"
5014 "みである。 このフラグが追加されたのは、スレッドのスタックをメモリの先頭 2GB "
5015 "以内の どこかに割り当てることで、初期のいくつかの 64 ビットプロセッサにおけ"
5016 "る コンテキストスイッチの性能問題を改善するためである。 最近の x86-64 プロ"
5017 "セッサではこの性能問題はもはや存在せず、 そのようなシステムではこのフラグを使"
5018 "用する必要はない。 B<MAP_FIXED> がセットされている場合は、 B<MAP_32BIT> フラ"
5019 "グは無視される。"
5020
5021 #. type: TP
5022 #: build/C/man2/mmap.2:158
5023 #, no-wrap
5024 msgid "B<MAP_ANON>"
5025 msgstr "B<MAP_ANON>"
5026
5027 #. type: Plain text
5028 #: build/C/man2/mmap.2:163
5029 msgid "Synonym for B<MAP_ANONYMOUS>.  Deprecated."
5030 msgstr "B<MAP_ANONYMOUS> の同義語。非推奨。"
5031
5032 #. type: TP
5033 #: build/C/man2/mmap.2:163
5034 #, no-wrap
5035 msgid "B<MAP_ANONYMOUS>"
5036 msgstr "B<MAP_ANONYMOUS>"
5037
5038 #. type: Plain text
5039 #: build/C/man2/mmap.2:185
5040 msgid ""
5041 "The mapping is not backed by any file; its contents are initialized to "
5042 "zero.  The I<fd> and I<offset> arguments are ignored; however, some "
5043 "implementations require I<fd> to be -1 if B<MAP_ANONYMOUS> (or B<MAP_ANON>)  "
5044 "is specified, and portable applications should ensure this.  The use of "
5045 "B<MAP_ANONYMOUS> in conjunction with B<MAP_SHARED> is only supported on "
5046 "Linux since kernel 2.4."
5047 msgstr ""
5048 "マッピングはどのファイルとも関連付けされない。 マッピングの内容は 0 で初期化"
5049 "される。 引き数 I<fd> と I<offset> は無視される。 ただし、実装によっては "
5050 "B<MAP_ANONYMOUS> (もしくは B<MAP_ANON>)  が指定された場合、 I<fd> を -1 にす"
5051 "る必要があり、 移植性が必要なアプリケーションでは必ず I<fd> を -1 にすべきで"
5052 "ある。 B<MAP_ANONYMOUS> と B<MAP_SHARED> を組み合わせての利用は カーネル 2.4 "
5053 "以降の Linux でのみサポートされている。"
5054
5055 #. type: TP
5056 #: build/C/man2/mmap.2:185
5057 #, no-wrap
5058 msgid "B<MAP_DENYWRITE>"
5059 msgstr "B<MAP_DENYWRITE>"
5060
5061 #.  Introduced in 1.1.36, removed in 1.3.24.
5062 #. type: Plain text
5063 #: build/C/man2/mmap.2:193
5064 msgid ""
5065 "This flag is ignored.  (Long ago, it signaled that attempts to write to the "
5066 "underlying file should fail with B<ETXTBUSY>.  But this was a source of "
5067 "denial-of-service attacks.)"
5068 msgstr ""
5069 "このフラグは無視される (ずっと前は、マップ元のファイルへの書き込みを行おうと"
5070 "すると、エラー B<ETXTBUSY> で失敗するようにシグナルが設定されていたが、これ"
5071 "は denial-of-service (サービス拒否) 攻撃の原因となった)。"
5072
5073 #. type: TP
5074 #: build/C/man2/mmap.2:193
5075 #, no-wrap
5076 msgid "B<MAP_EXECUTABLE>"
5077 msgstr "B<MAP_EXECUTABLE>"
5078
5079 #.  Introduced in 1.1.38, removed in 1.3.24. Flag tested in proc_follow_link.
5080 #.  (Long ago, it signaled that the underlying file is an executable.
5081 #.  However, that information was not really used anywhere.)
5082 #.  Linus talked about DOS related to MAP_EXECUTABLE, but he was thinking of
5083 #.  MAP_DENYWRITE?
5084 #. type: Plain text
5085 #: build/C/man2/mmap.2:201
5086 msgid "This flag is ignored."
5087 msgstr "このフラグは無視される。"
5088
5089 #. type: TP
5090 #: build/C/man2/mmap.2:201
5091 #, no-wrap
5092 msgid "B<MAP_FILE>"
5093 msgstr "B<MAP_FILE>"
5094
5095 #.  On some systems, this was required as the opposite of
5096 #.  MAP_ANONYMOUS -- mtk, 1 May 2007
5097 #. type: Plain text
5098 #: build/C/man2/mmap.2:207
5099 msgid "Compatibility flag.  Ignored."
5100 msgstr "互換性のためのフラグ。無視される。"
5101
5102 #. type: TP
5103 #: build/C/man2/mmap.2:207
5104 #, no-wrap
5105 msgid "B<MAP_FIXED>"
5106 msgstr "B<MAP_FIXED>"
5107
5108 #. type: Plain text
5109 #: build/C/man2/mmap.2:225
5110 msgid ""
5111 "Don't interpret I<addr> as a hint: place the mapping at exactly that "
5112 "address.  I<addr> must be a multiple of the page size.  If the memory region "
5113 "specified by I<addr> and I<len> overlaps pages of any existing mapping(s), "
5114 "then the overlapped part of the existing mapping(s) will be discarded.  If "
5115 "the specified address cannot be used, B<mmap>()  will fail.  Because "
5116 "requiring a fixed address for a mapping is less portable, the use of this "
5117 "option is discouraged."
5118 msgstr ""
5119 "I<addr> をアドレスのヒントとして使用するのではなく、 I<addr> で指定されたアド"
5120 "レスをそのまま使用してマッピングを配置する。 I<addr> はページサイズの倍数でな"
5121 "ければならない。 I<addr> と I<len> で指定されたメモリ領域が既存のマッピングの"
5122 "ページと重なる場合、 既存のマッピングの重なった部分は捨てられる。 もし指定さ"
5123 "れたアドレスが使用できない場合、 B<mmap>()  は失敗する。 マッピングに対して固"
5124 "定アドレスを要求するのは移植性の面で劣るので、 このオプションは使用しないこと"
5125 "を推奨する。"
5126
5127 #. type: TP
5128 #: build/C/man2/mmap.2:225
5129 #, no-wrap
5130 msgid "B<MAP_GROWSDOWN>"
5131 msgstr "B<MAP_GROWSDOWN>"
5132
5133 #. type: Plain text
5134 #: build/C/man2/mmap.2:230
5135 msgid ""
5136 "Used for stacks.  Indicates to the kernel virtual memory system that the "
5137 "mapping should extend downward in memory."
5138 msgstr ""
5139 "スタック用に使用される。マッピングをメモリ内で逆向きに行うことを カーネル仮想"
5140 "メモリシステムに指示する。 (訳注:マッピングは通常はメモリ・アドレスが増加す"
5141 "る向きに行うが、 このオプションを指定すると逆向きにマッピングを行う)"
5142
5143 #. type: TP
5144 #: build/C/man2/mmap.2:230
5145 #, no-wrap
5146 msgid "B<MAP_HUGETLB> (since Linux 2.6.32)"
5147 msgstr "B<MAP_HUGETLB> (Linux 2.6.32 以降)"
5148
5149 #. type: Plain text
5150 #: build/C/man2/mmap.2:236
5151 #, fuzzy
5152 #| msgid ""
5153 #| "Allocate the mapping using \"huge pages.\" See the kernel source file "
5154 #| "I<Documentation/vm/hugetlbpage.txt> for further information."
5155 msgid ""
5156 "Allocate the mapping using \"huge pages.\" See the Linux kernel source file "
5157 "I<Documentation/vm/hugetlbpage.txt> for further information."
5158 msgstr ""
5159 "\"huge page\" を使ってマッピングを割り当てる。 詳しい情報は、カーネル・ソース"
5160 "の I<Documentation/vm/hugetlbpage.txt> を参照。"
5161
5162 #. type: TP
5163 #: build/C/man2/mmap.2:236
5164 #, no-wrap
5165 msgid "B<MAP_LOCKED> (since Linux 2.5.37)"
5166 msgstr "B<MAP_LOCKED> (Linux 2.5.37 以降)"
5167
5168 #.  If set, the mapped pages will not be swapped out.
5169 #. type: Plain text
5170 #: build/C/man2/mmap.2:242
5171 msgid ""
5172 "Lock the pages of the mapped region into memory in the manner of B<mlock>"
5173 "(2).  This flag is ignored in older kernels."
5174 msgstr ""
5175 "マップされた領域のページを B<mlock>(2)  の方法でメモリ内にロックする。 それ以"
5176 "前のカーネルでは、このフラグは無視される。"
5177
5178 #. type: TP
5179 #: build/C/man2/mmap.2:242
5180 #, no-wrap
5181 msgid "B<MAP_NONBLOCK> (since Linux 2.5.46)"
5182 msgstr "B<MAP_NONBLOCK> (Linux 2.5.46 以降)"
5183
5184 #. type: Plain text
5185 #: build/C/man2/mmap.2:257
5186 msgid ""
5187 "Only meaningful in conjunction with B<MAP_POPULATE>.  Don't perform read-"
5188 "ahead: only create page tables entries for pages that are already present in "
5189 "RAM.  Since Linux 2.6.23, this flag causes B<MAP_POPULATE> to do nothing.  "
5190 "One day the combination of B<MAP_POPULATE> and B<MAP_NONBLOCK> may be "
5191 "reimplemented."
5192 msgstr ""
5193 "B<MAP_POPULATE> と組み合わせた場合のみ意味を持つ。 read-ahead (前もって読み込"
5194 "むこと) を実行しない。 単に、すでに RAM 上に存在するページに対して ページテー"
5195 "ブルエントリを作成するだけである。 Linux 2.6.23 以降では、このフラグは "
5196 "B<MAP_POPULATE> に何の影響も与えない。 いつか B<MAP_POPULATE> と "
5197 "B<MAP_NONBLOCK> を組み合わせた場合の動作は実装し直されるかもしれない。"
5198
5199 #. type: TP
5200 #: build/C/man2/mmap.2:257
5201 #, no-wrap
5202 msgid "B<MAP_NORESERVE>"
5203 msgstr "B<MAP_NORESERVE>"
5204
5205 #. type: Plain text
5206 #: build/C/man2/mmap.2:272
5207 msgid ""
5208 "Do not reserve swap space for this mapping.  When swap space is reserved, "
5209 "one has the guarantee that it is possible to modify the mapping.  When swap "
5210 "space is not reserved one might get B<SIGSEGV> upon a write if no physical "
5211 "memory is available.  See also the discussion of the file I</proc/sys/vm/"
5212 "overcommit_memory> in B<proc>(5).  In kernels before 2.6, this flag only had "
5213 "effect for private writable mappings."
5214 msgstr ""
5215 "このマッピングに対するスワップ空間の予約を行わない。 スワップ空間を予約した場"
5216 "合は、このマッピングの変更が必ず可能なことが 保証される。予約を行わなかった場"
5217 "合、物理メモリに空きがないと 書き込み時に B<SIGSEGV> エラーを受け取ることがあ"
5218 "る。 B<proc>(5)  の I</proc/sys/vm/overcommit_memory> ファイルについての議論"
5219 "も参照。 バージョン 2.6 より前のカーネルでは、このフラグは書き込み可能な プラ"
5220 "イベート・マッピングについてのみ効果があった。"
5221
5222 #. type: TP
5223 #: build/C/man2/mmap.2:272
5224 #, no-wrap
5225 msgid "B<MAP_POPULATE> (since Linux 2.5.46)"
5226 msgstr "B<MAP_POPULATE> (Linux 2.5.46 以降)"
5227
5228 #. type: Plain text
5229 #: build/C/man2/mmap.2:279
5230 msgid ""
5231 "Populate (prefault) page tables for a mapping.  For a file mapping, this "
5232 "causes read-ahead on the file.  Later accesses to the mapping will not be "
5233 "blocked by page faults.  B<MAP_POPULATE> is only supported for private "
5234 "mappings since Linux 2.6.23."
5235 msgstr ""
5236 "マッピング用のページテーブルを配置 (populate) する ファイルマッピングの場合に"
5237 "は、これによりファイルが先読み (read-ahead)  が行われる。この以後は、マッピン"
5238 "グに対するアクセスがページフォールトで ブロックされることがなくなる。 "
5239 "B<MAP_POPULATE> は Linux 2.6.23 以降でプライベート・マッピングについてのみ サ"
5240 "ポートされている。"
5241
5242 #. type: TP
5243 #: build/C/man2/mmap.2:279
5244 #, no-wrap
5245 msgid "B<MAP_STACK> (since Linux 2.6.27)"
5246 msgstr "B<MAP_STACK> (Linux 2.6.27 以降)"
5247
5248 #.  See http://lwn.net/Articles/294642 "Tangled up in threads", 19 Aug 08
5249 #.  commit cd98a04a59e2f94fa64d5bf1e26498d27427d5e7
5250 #.  http://thread.gmane.org/gmane.linux.kernel/720412
5251 #.  "pthread_create() slow for many threads; also time to revisit 64b
5252 #.   context switch optimization?"
5253 #. type: Plain text
5254 #: build/C/man2/mmap.2:292
5255 msgid ""
5256 "Allocate the mapping at an address suitable for a process or thread stack.  "
5257 "This flag is currently a no-op, but is used in the glibc threading "
5258 "implementation so that if some architectures require special treatment for "
5259 "stack allocations, support can later be transparently implemented for glibc."
5260 msgstr ""
5261 "プロセスやスレッドのスタックに適したアドレスにマッピングを割り当てる。 現在の"
5262 "ところ、このフラグは何もしないが、 glibc のスレッド実装では使用されている。 "
5263 "これは、いくつかのアーキテクチャではスタックの割り当てに関して特別な扱い が必"
5264 "要な場合に、glibc にそのサポートを後で透過的に実装できるようにする ためであ"
5265 "る。"
5266
5267 #. type: TP
5268 #: build/C/man2/mmap.2:292
5269 #, no-wrap
5270 msgid "B<MAP_UNINITIALIZED> (since Linux 2.6.33)"
5271 msgstr "B<MAP_UNINITIALIZED> (Linux 2.6.33 以降)"
5272
5273 #. type: Plain text
5274 #: build/C/man2/mmap.2:302
5275 msgid ""
5276 "Don't clear anonymous pages.  This flag is intended to improve performance "
5277 "on embedded devices.  This flag is only honored if the kernel was configured "
5278 "with the B<CONFIG_MMAP_ALLOW_UNINITIALIZED> option.  Because of the security "
5279 "implications, that option is normally enabled only on embedded devices (i."
5280 "e., devices where one has complete control of the contents of user memory)."
5281 msgstr ""
5282 "無名ページ (anonymous page) のクリアを行わない。このフラグは組み込みデバイ"
5283 "ス\n"
5284 "での性能向上を目的に作られてものである。カーネルの設定で\n"
5285 "B<CONFIG_MMAP_ALLOW_UNINITIALIZED> オプションが有効になっている場合のみ、\n"
5286 "このフラグは効果を持つ。\n"
5287 "セキュリティ面の考慮から、このオプションは通常組み込みデバイス (すなわち、\n"
5288 "ユーザメモリの内容を完全に制御化におけるデバイス) においてのみ有効にされる。"
5289
5290 #. type: Plain text
5291 #: build/C/man2/mmap.2:310
5292 msgid ""
5293 "Of the above flags, only B<MAP_FIXED> is specified in POSIX.1-2001.  "
5294 "However, most systems also support B<MAP_ANONYMOUS> (or its synonym "
5295 "B<MAP_ANON>)."
5296 msgstr ""
5297 "上記のフラグの中では、 B<MAP_FIXED> だけが POSIX.1-2001 で規定されている。 し"
5298 "かしながら、ほとんどのシステムで B<MAP_ANONYMOUS> (またはその同義語である "
5299 "B<MAP_ANON>)  もサポートされている。"
5300
5301 #. type: Plain text
5302 #: build/C/man2/mmap.2:317
5303 msgid ""
5304 "Some systems document the additional flags B<MAP_AUTOGROW>, "
5305 "B<MAP_AUTORESRV>, B<MAP_COPY>, and B<MAP_LOCAL>."
5306 msgstr ""
5307 "いくつかのシステムでは、上記以外にフラグとして B<MAP_AUTOGROW>, "
5308 "B<MAP_AUTORESRV>, B<MAP_COPY>, B<MAP_LOCAL> が規定されている。"
5309
5310 #. type: Plain text
5311 #: build/C/man2/mmap.2:323
5312 msgid ""
5313 "Memory mapped by B<mmap>()  is preserved across B<fork>(2), with the same "
5314 "attributes."
5315 msgstr ""
5316 "B<mmap>()  によってマップされたメモリの属性は B<fork>(2)  の際に継承される。"
5317
5318 #. type: Plain text
5319 #: build/C/man2/mmap.2:331
5320 msgid ""
5321 "A file is mapped in multiples of the page size.  For a file that is not a "
5322 "multiple of the page size, the remaining memory is zeroed when mapped, and "
5323 "writes to that region are not written out to the file.  The effect of "
5324 "changing the size of the underlying file of a mapping on the pages that "
5325 "correspond to added or removed regions of the file is unspecified."
5326 msgstr ""
5327 "ファイルはページサイズの整数倍の領域にマップされる。サイズがページサイズの 整"
5328 "数倍でないファイルの場合、マップ時に残りの領域は 0 で埋められ、この領域へ 書"
5329 "きこみを行ってもファイルに書き出されることはない。マッピングを行った元 ファイ"
5330 "ルのサイズを変更した場合、元ファイルの追加されたり削除された領域に対応 する"
5331 "マップされたページに対してどのような影響があるかは規定されていない。"
5332
5333 #. type: SS
5334 #: build/C/man2/mmap.2:331
5335 #, no-wrap
5336 msgid "munmap()"
5337 msgstr "munmap()"
5338
5339 #. type: Plain text
5340 #: build/C/man2/mmap.2:341
5341 msgid ""
5342 "The B<munmap>()  system call deletes the mappings for the specified address "
5343 "range, and causes further references to addresses within the range to "
5344 "generate invalid memory references.  The region is also automatically "
5345 "unmapped when the process is terminated.  On the other hand, closing the "
5346 "file descriptor does not unmap the region."
5347 msgstr ""
5348 "システムコール B<munmap>()  は指定されたアドレス範囲のマップを消去し、 これ以"
5349 "降のその範囲内へのメモリ参照は不正となる。 この領域は、プロセスが終了したとき"
5350 "にも自動的にアンマップされる。 一方、ファイル記述子をクローズしても、この領域"
5351 "はアンマップされない。"
5352
5353 #. type: Plain text
5354 #: build/C/man2/mmap.2:351
5355 msgid ""
5356 "The address I<addr> must be a multiple of the page size.  All pages "
5357 "containing a part of the indicated range are unmapped, and subsequent "
5358 "references to these pages will generate B<SIGSEGV>.  It is not an error if "
5359 "the indicated range does not contain any mapped pages."
5360 msgstr ""
5361 "I<addr> アドレスはページサイズの整数倍でなければならない。指定された範囲の一"
5362 "部分を 含む全てのページはアンマップされ、これ以降にこれらのページへの参照があ"
5363 "ると B<SIGSEGV> が発生する。 指定した範囲内にマップされたページが一つも含まれ"
5364 "ていない場合でも エラーにならない。"
5365
5366 #. type: SS
5367 #: build/C/man2/mmap.2:351
5368 #, no-wrap
5369 msgid "Timestamps changes for file-backed mappings"
5370 msgstr "ファイルと関連付けられたマッピングに対するタイムスタンプの更新"
5371
5372 #. type: Plain text
5373 #: build/C/man2/mmap.2:358
5374 msgid ""
5375 "For file-backed mappings, the I<st_atime> field for the mapped file may be "
5376 "updated at any time between the B<mmap>()  and the corresponding unmapping; "
5377 "the first reference to a mapped page will update the field if it has not "
5378 "been already."
5379 msgstr ""
5380 "ファイルと関連付けられたマッピングの場合、マッピングされたファイルの "
5381 "I<st_atime> フィールドは、 B<mmap>()  されてからアンマップ (unmap) されるまで"
5382 "の間に更新されることがある。 それまでに更新が行われていなければ、マップされた"
5383 "ページへの最初の参照があった 際に更新される。"
5384
5385 #. type: Plain text
5386 #: build/C/man2/mmap.2:375
5387 msgid ""
5388 "The I<st_ctime> and I<st_mtime> field for a file mapped with B<PROT_WRITE> "
5389 "and B<MAP_SHARED> will be updated after a write to the mapped region, and "
5390 "before a subsequent B<msync>(2)  with the B<MS_SYNC> or B<MS_ASYNC> flag, if "
5391 "one occurs."
5392 msgstr ""
5393 "B<PROT_WRITE> と B<MAP_SHARED> の両方を指定してマップされたファイルの場合、書"
5394 "き込みがあると、 I<st_ctime> と I<st_mtime> の両フィールドは、マップされた領"
5395 "域への書き込みより後で、 B<MS_SYNC> または B<MS_ASYNC> フラグを指定して "
5396 "B<msync>(2)  が呼ばれる前までに更新される。"
5397
5398 #. type: Plain text
5399 #: build/C/man2/mmap.2:392
5400 msgid ""
5401 "On success, B<mmap>()  returns a pointer to the mapped area.  On error, the "
5402 "value B<MAP_FAILED> (that is, I<(void\\ *)\\ -1>)  is returned, and I<errno> "
5403 "is set appropriately.  On success, B<munmap>()  returns 0, on failure -1, "
5404 "and I<errno> is set (probably to B<EINVAL>)."
5405 msgstr ""
5406 "B<mmap>()  は成功するとマップされた領域へのポインタを返す。 失敗すると値 "
5407 "B<MAP_FAILED> (つまり I<(void\\ *)\\ -1>)  を返し、 I<errno> がエラーの内容に"
5408 "したがってセットされる。 B<munmap>()  は成功すると 0 を返す。失敗すると -1 を"
5409 "返し、 I<errno> がセットされる (多くの場合 B<EINVAL> になるだろう)。"
5410
5411 #. type: TP
5412 #: build/C/man2/mmap.2:393 build/C/man2/mprotect.2:86
5413 #: build/C/man3/shm_open.3:185 build/C/man3/shm_open.3:190
5414 #: build/C/man2/shmctl.2:297 build/C/man2/shmget.2:188
5415 #: build/C/man2/shmop.2:191
5416 #, no-wrap
5417 msgid "B<EACCES>"
5418 msgstr "B<EACCES>"
5419
5420 #. type: Plain text
5421 #: build/C/man2/mmap.2:413
5422 msgid ""
5423 "A file descriptor refers to a non-regular file.  Or B<MAP_PRIVATE> was "
5424 "requested, but I<fd> is not open for reading.  Or B<MAP_SHARED> was "
5425 "requested and B<PROT_WRITE> is set, but I<fd> is not open in read/write "
5426 "(B<O_RDWR>)  mode.  Or B<PROT_WRITE> is set, but the file is append-only."
5427 msgstr ""
5428 "以下のいずれかの場合。 ファイル記述子の参照先が通常のファイルではない (non-"
5429 "regular file) 。 B<MAP_PRIVATE> を要求したが I<fd> は読み込み用にオープンされ"
5430 "ていない。 B<MAP_SHARED> を要求して B<PROT_WRITE> をセットしたが I<fd> は読み"
5431 "書きモード (B<O_RDWR>)  でオープンされていない、 B<PROT_WRITE> をセットした"
5432 "が、ファイルは追加 (append) 専用である。"
5433
5434 #. type: Plain text
5435 #: build/C/man2/mmap.2:417
5436 msgid ""
5437 "The file has been locked, or too much memory has been locked (see "
5438 "B<setrlimit>(2))."
5439 msgstr ""
5440 "ファイルがロックされている。またはロックされているメモリが多すぎる "
5441 "(B<setrlimit>(2)  を参照)。"
5442
5443 #. type: Plain text
5444 #: build/C/man2/mmap.2:423
5445 msgid ""
5446 "I<fd> is not a valid file descriptor (and B<MAP_ANONYMOUS> was not set)."
5447 msgstr ""
5448 "I<fd> が有効なファイル記述子 (file descriptor) ではない (かつ "
5449 "B<MAP_ANONYMOUS> がセットされていない)。"
5450
5451 #. type: Plain text
5452 #: build/C/man2/mmap.2:431
5453 msgid ""
5454 "We don't like I<addr>, I<length>, or I<offset> (e.g., they are too large, or "
5455 "not aligned on a page boundary)."
5456 msgstr ""
5457 "I<addr> か I<length> か I<offset> が適切でない (例えば、大きすぎるとか、ペー"
5458 "ジ境界にアラインメントされていない)。"
5459
5460 #. type: Plain text
5461 #: build/C/man2/mmap.2:436
5462 msgid "(since Linux 2.6.12)  I<length> was 0."
5463 msgstr "(Linux 2.6.12 以降)  I<length> が 0 であった。"
5464
5465 #. type: Plain text
5466 #: build/C/man2/mmap.2:444
5467 msgid ""
5468 "I<flags> contained neither B<MAP_PRIVATE> or B<MAP_SHARED>, or contained "
5469 "both of these values."
5470 msgstr ""
5471 "I<flags> に B<MAP_PRIVATE> と B<MAP_SHARED> のどちらも含まれていなかった、も"
5472 "しくは その両方が含まれていた。"
5473
5474 #. type: TP
5475 #: build/C/man2/mmap.2:444 build/C/man3/shm_open.3:227
5476 #: build/C/man2/shmget.2:204
5477 #, no-wrap
5478 msgid "B<ENFILE>"
5479 msgstr "B<ENFILE>"
5480
5481 #.  [2.6.7] shmem_zero_setup()-->shmem_file_setup()-->get_empty_filp()
5482 #. type: Plain text
5483 #: build/C/man2/mmap.2:452 build/C/man2/shmget.2:208
5484 msgid "The system limit on the total number of open files has been reached."
5485 msgstr "システム全体でオープンされているファイルの総数が上限に達した。"
5486
5487 #. type: Plain text
5488 #: build/C/man2/mmap.2:456
5489 msgid ""
5490 "The underlying file system of the specified file does not support memory "
5491 "mapping."
5492 msgstr ""
5493 "指定されたファイルが置かれているファイルシステムがメモリマッピングをサポート "
5494 "していない。"
5495
5496 #. type: Plain text
5497 #: build/C/man2/mmap.2:460
5498 msgid ""
5499 "No memory is available, or the process's maximum number of mappings would "
5500 "have been exceeded."
5501 msgstr ""
5502 "メモリに空きがない、または処理中のプロセスのマッピング数が最大数を超過した。"
5503
5504 #.  (Since 2.4.25 / 2.6.0.)
5505 #. type: Plain text
5506 #: build/C/man2/mmap.2:469
5507 msgid ""
5508 "The I<prot> argument asks for B<PROT_EXEC> but the mapped area belongs to a "
5509 "file on a file system that was mounted no-exec."
5510 msgstr ""
5511 "I<prot> 引き数は B<PROT_EXEC> を行うように指定されているが、 no-exec でマウン"
5512 "トされたファイルシステム上のファイルに マップ領域が対応している。"
5513
5514 #. type: TP
5515 #: build/C/man2/mmap.2:469
5516 #, no-wrap
5517 msgid "B<ETXTBSY>"
5518 msgstr "B<ETXTBSY>"
5519
5520 #. type: Plain text
5521 #: build/C/man2/mmap.2:475
5522 msgid ""
5523 "B<MAP_DENYWRITE> was set but the object specified by I<fd> is open for "
5524 "writing."
5525 msgstr ""
5526 "B<MAP_DENYWRITE> がセットされているが I<fd> で指定されているオブジェクトは書"
5527 "き込み用に開かれている。"
5528
5529 #. type: TP
5530 #: build/C/man2/mmap.2:475 build/C/man2/shmctl.2:339
5531 #, no-wrap
5532 msgid "B<EOVERFLOW>"
5533 msgstr "B<EOVERFLOW>"
5534
5535 #. type: Plain text
5536 #: build/C/man2/mmap.2:487
5537 msgid ""
5538 "On 32-bit architecture together with the large file extension (i.e., using "
5539 "64-bit I<off_t>): the number of pages used for I<length> plus number of "
5540 "pages used for I<offset> would overflow I<unsigned long> (32 bits)."
5541 msgstr ""
5542
5543 #. type: Plain text
5544 #: build/C/man2/mmap.2:489
5545 msgid "Use of a mapped region can result in these signals:"
5546 msgstr "マップ領域を利用する際に、以下のシグナルが発生することがある:"
5547
5548 #. type: TP
5549 #: build/C/man2/mmap.2:489
5550 #, no-wrap
5551 msgid "B<SIGSEGV>"
5552 msgstr "B<SIGSEGV>"
5553
5554 #. type: Plain text
5555 #: build/C/man2/mmap.2:492
5556 msgid "Attempted write into a region mapped as read-only."
5557 msgstr "読み込み専用で mmap された領域へ書き込みを行おうとした。"
5558
5559 #. type: TP
5560 #: build/C/man2/mmap.2:492
5561 #, no-wrap
5562 msgid "B<SIGBUS>"
5563 msgstr "B<SIGBUS>"
5564
5565 #. type: Plain text
5566 #: build/C/man2/mmap.2:497
5567 msgid ""
5568 "Attempted access to a portion of the buffer that does not correspond to the "
5569 "file (for example, beyond the end of the file, including the case where "
5570 "another process has truncated the file)."
5571 msgstr ""
5572 "バッファのうち、ファイルに関連づけられていない部分 (例えばファイル末尾を越え"
5573 "た部分など。これには 他のプロセスがファイルを切り詰めた場合なども含まれる)  "
5574 "にアクセスしようとした。"
5575
5576 #.  SVr4 documents additional error codes ENXIO and ENODEV.
5577 #.  SUSv2 documents additional error codes EMFILE and EOVERFLOW.
5578 #. type: Plain text
5579 #: build/C/man2/mmap.2:501
5580 msgid "SVr4, 4.4BSD, POSIX.1-2001."
5581 msgstr "SVr4, 4.4BSD, POSIX.1-2001."
5582
5583 #.  POSIX.1-2001: It shall be defined to -1 or 0 or 200112L.
5584 #.  -1: unavailable, 0: ask using sysconf().
5585 #.  glibc defines it to 1.
5586 #. type: Plain text
5587 #: build/C/man2/mmap.2:515
5588 msgid ""
5589 "On POSIX systems on which B<mmap>(), B<msync>(2)  and B<munmap>()  are "
5590 "available, B<_POSIX_MAPPED_FILES> is defined in I<E<lt>unistd.hE<gt>> to a "
5591 "value greater than 0.  (See also B<sysconf>(3).)"
5592 msgstr ""
5593 "B<mmap>(), B<msync>(2)  B<munmap>()  が利用可能な POSIX システムでは、 "
5594 "B<_POSIX_MAPPED_FILES> は E<lt>unistd.hE<gt> で 0 より大きな値に定義される "
5595 "(B<sysconf>(3)  も参照のこと)。"
5596
5597 #.  Since around glibc 2.1/2.2, depending on the platform.
5598 #. type: Plain text
5599 #: build/C/man2/mmap.2:530
5600 msgid ""
5601 "This page describes the interface provided by the glibc B<mmap>()  wrapper "
5602 "function.  Originally, this function invoked a system call of the same "
5603 "name.  Since kernel 2.4, that system call has been superseded by B<mmap2>"
5604 "(2), and nowadays the glibc B<mmap>()  wrapper function invokes B<mmap2>(2)  "
5605 "with a suitably adjusted value for I<offset>."
5606 msgstr ""
5607 "このページでは glibc の B<mmap>() のラッパー関数が提供するインターフェース"
5608 "に\n"
5609 "ついて説明している。元々は、この関数は同じ名前のシステムコールを起動してい"
5610 "た。\n"
5611 "カーネル 2.4 以降、このシステムコールは B<mmap2>(2) に取って代わられ、現在\n"
5612 "では、 glibc の B<mmap>() のラッパー関数は I<offset> を適切に調整してから\n"
5613 "B<mmap2>(2) を起動する。"
5614
5615 #. type: Plain text
5616 #: build/C/man2/mmap.2:543
5617 msgid ""
5618 "On some hardware architectures (e.g., i386), B<PROT_WRITE> implies "
5619 "B<PROT_READ>.  It is architecture dependent whether B<PROT_READ> implies "
5620 "B<PROT_EXEC> or not.  Portable programs should always set B<PROT_EXEC> if "
5621 "they intend to execute code in the new mapping."
5622 msgstr ""
5623 "(i386 などの) いくつかのアーキテクチャでは、 B<PROT_WRITE> をセットすると、暗"
5624 "黙のうちに B<PROT_READ> がセットされる。 B<PROT_READ> をセットした際に暗黙の"
5625 "うちに B<PROT_EXEC> がセットされるかどうかは、アーキテクチャ依存である。 移植"
5626 "性を考慮したプログラムでは、 新規にマップした領域でコードを実行したい場合は、"
5627 "常に B<PROT_EXEC> をセットすべきである。"
5628
5629 #. type: Plain text
5630 #: build/C/man2/mmap.2:558
5631 msgid ""
5632 "The portable way to create a mapping is to specify I<addr> as 0 (NULL), and "
5633 "omit B<MAP_FIXED> from I<flags>.  In this case, the system chooses the "
5634 "address for the mapping; the address is chosen so as not to conflict with "
5635 "any existing mapping, and will not be 0.  If the B<MAP_FIXED> flag is "
5636 "specified, and I<addr> is 0 (NULL), then the mapped address will be 0 (NULL)."
5637 msgstr ""
5638 "マッピングを作成する移植性のある方法は、 I<addr> に 0 (NULL) を指定し、 "
5639 "I<flags> から B<MAP_FIXED> を外すことである。 この場合、システムがマッピング"
5640 "用のアドレスの選択を行う。 アドレスは既存のマッピングと衝突しないように、 か"
5641 "つ 0 にならないように選択される。 B<MAP_FIXED> フラグが指定され、かつ "
5642 "I<addr> が 0 (NULL)  の場合には、マップされるアドレスが 0 (NULL) になる。"
5643
5644 #. type: Plain text
5645 #: build/C/man2/mmap.2:587
5646 msgid ""
5647 "Certain I<flags> constants are defined only if either B<_BSD_SOURCE> or "
5648 "B<_SVID_SOURCE> is defined.  (Requiring B<_GNU_SOURCE> also suffices, and "
5649 "requiring that macro specifically would have been more logical, since these "
5650 "flags are all Linux specific.)  The relevant flags are: B<MAP_32BIT>, "
5651 "B<MAP_ANONYMOUS> (and the synonym B<MAP_ANON>), B<MAP_DENYWRITE>, "
5652 "B<MAP_EXECUTABLE>, B<MAP_FILE>, B<MAP_GROWSDOWN>, B<MAP_HUGETLB>, "
5653 "B<MAP_LOCKED>, B<MAP_NONBLOCK>, B<MAP_NORESERVE>, B<MAP_POPULATE>, and "
5654 "B<MAP_STACK>."
5655 msgstr ""
5656
5657 #. type: Plain text
5658 #: build/C/man2/mmap.2:592
5659 msgid ""
5660 "On Linux there are no guarantees like those suggested above under "
5661 "B<MAP_NORESERVE>.  By default, any process can be killed at any moment when "
5662 "the system runs out of memory."
5663 msgstr ""
5664 "Linux においては、上記の B<MAP_NORESERVE> で述べられているような保証はない。 "
5665 "デフォルトでは、システムがメモリを使い切った場合には、 どのプロセスがいつ強制"
5666 "終了されるか分からないからである。"
5667
5668 #. type: Plain text
5669 #: build/C/man2/mmap.2:599
5670 msgid ""
5671 "In kernels before 2.6.7, the B<MAP_POPULATE> flag only has effect if I<prot> "
5672 "is specified as B<PROT_NONE>."
5673 msgstr ""
5674 "2.6.7 より前のカーネルでは、 I<prot> に B<PROT_NONE> が指定された場合にの"
5675 "み、 B<MAP_POPULATE> フラグが効力を持つ。"
5676
5677 #. type: Plain text
5678 #: build/C/man2/mmap.2:614
5679 msgid ""
5680 "SUSv3 specifies that B<mmap>()  should fail if I<length> is 0.  However, in "
5681 "kernels before 2.6.12, B<mmap>()  succeeded in this case: no mapping was "
5682 "created and the call returned I<addr>.  Since kernel 2.6.12, B<mmap>()  "
5683 "fails with the error B<EINVAL> for this case."
5684 msgstr ""
5685 "SUSv3 では、 I<length> が 0 の場合、 B<mmap>()  は失敗すると規定されている。"
5686 "しかしながら、2.6.12 より前のカーネルでは、 この場合に B<mmap>()  は成功して"
5687 "いた (マッピングは作成されず、 I<addr> が返されていた)。 カーネル 2.6.12 以降"
5688 "では、 B<mmap>()  はエラー B<EINVAL> で失敗する。"
5689
5690 #. type: Plain text
5691 #: build/C/man2/mmap.2:630
5692 msgid ""
5693 "POSIX specifies that the system shall always zero fill any partial page at "
5694 "the end of the object and that system will never write any modification of "
5695 "the object beyond its end.  On Linux, when you write data to such partial "
5696 "page after the end of the object, the data stays in the page cache even "
5697 "after the file is closed and unmapped and even though the data is never "
5698 "written to the file itself, subsequent mappings may see the modified "
5699 "content.  In some cases, this could be fixed by calling B<msync>(2)  before "
5700 "the unmap takes place; however, this doesn't work on tmpfs (for example, "
5701 "when using POSIX shared memory interface documented in B<shm_overview>(7))."
5702 msgstr ""
5703
5704 #. type: Plain text
5705 #: build/C/man2/mmap.2:642
5706 msgid ""
5707 "The following program prints part of the file specified in its first command-"
5708 "line argument to standard output.  The range of bytes to be printed is "
5709 "specified via offset and length values in the second and third command-line "
5710 "arguments.  The program creates a memory mapping of the required pages of "
5711 "the file and then uses B<write>(2)  to output the desired bytes."
5712 msgstr ""
5713 "以下のプログラムは、一番目のコマンドライン引き数で指定された ファイルの一部を"
5714 "標準出力に表示する。 表示する範囲は、二番目、三番目のコマンドライン引き数で渡"
5715 "される オフセットと長さで指定される。 このプログラムは、指定されたファイルの"
5716 "必要なページのメモリ・ マッピングを作成し、 B<write>(2)  を使って所望のバイト"
5717 "を出力する。"
5718
5719 #. type: Plain text
5720 #: build/C/man2/mmap.2:650
5721 #, no-wrap
5722 msgid ""
5723 "#include E<lt>sys/mman.hE<gt>\n"
5724 "#include E<lt>sys/stat.hE<gt>\n"
5725 "#include E<lt>fcntl.hE<gt>\n"
5726 "#include E<lt>stdio.hE<gt>\n"
5727 "#include E<lt>stdlib.hE<gt>\n"
5728 "#include E<lt>unistd.hE<gt>\n"
5729 msgstr ""
5730 "#include E<lt>sys/mman.hE<gt>\n"
5731 "#include E<lt>sys/stat.hE<gt>\n"
5732 "#include E<lt>fcntl.hE<gt>\n"
5733 "#include E<lt>stdio.hE<gt>\n"
5734 "#include E<lt>stdlib.hE<gt>\n"
5735 "#include E<lt>unistd.hE<gt>\n"
5736
5737 #. type: Plain text
5738 #: build/C/man2/mmap.2:653 build/C/man2/mprotect.2:178
5739 #, no-wrap
5740 msgid ""
5741 "#define handle_error(msg) \\e\n"
5742 "    do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
5743 msgstr ""
5744 "#define handle_error(msg) \\e\n"
5745 "    do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
5746
5747 #. type: Plain text
5748 #: build/C/man2/mmap.2:663
5749 #, no-wrap
5750 msgid ""
5751 "int\n"
5752 "main(int argc, char *argv[])\n"
5753 "{\n"
5754 "    char *addr;\n"
5755 "    int fd;\n"
5756 "    struct stat sb;\n"
5757 "    off_t offset, pa_offset;\n"
5758 "    size_t length;\n"
5759 "    ssize_t s;\n"
5760 msgstr ""
5761 "int\n"
5762 "main(int argc, char *argv[])\n"
5763 "{\n"
5764 "    char *addr;\n"
5765 "    int fd;\n"
5766 "    struct stat sb;\n"
5767 "    off_t offset, pa_offset;\n"
5768 "    size_t length;\n"
5769 "    ssize_t s;\n"
5770
5771 #. type: Plain text
5772 #: build/C/man2/mmap.2:668
5773 #, no-wrap
5774 msgid ""
5775 "    if (argc E<lt> 3 || argc E<gt> 4) {\n"
5776 "        fprintf(stderr, \"%s file offset [length]\\en\", argv[0]);\n"
5777 "        exit(EXIT_FAILURE);\n"
5778 "    }\n"
5779 msgstr ""
5780 "    if (argc E<lt> 3 || argc E<gt> 4) {\n"
5781 "        fprintf(stderr, \"%s file offset [length]\\en\", argv[0]);\n"
5782 "        exit(EXIT_FAILURE);\n"
5783 "    }\n"
5784
5785 #. type: Plain text
5786 #: build/C/man2/mmap.2:672
5787 #, no-wrap
5788 msgid ""
5789 "    fd = open(argv[1], O_RDONLY);\n"
5790 "    if (fd == -1)\n"
5791 "        handle_error(\"open\");\n"
5792 msgstr ""
5793 "    fd = open(argv[1], O_RDONLY);\n"
5794 "    if (fd == -1)\n"
5795 "        handle_error(\"open\");\n"
5796
5797 #. type: Plain text
5798 #: build/C/man2/mmap.2:675
5799 #, no-wrap
5800 msgid ""
5801 "    if (fstat(fd, &sb) == -1)           /* To obtain file size */\n"
5802 "        handle_error(\"fstat\");\n"
5803 msgstr ""
5804 "    if (fstat(fd, &sb) == -1)           /* To obtain file size */\n"
5805 "        handle_error(\"fstat\");\n"
5806
5807 #. type: Plain text
5808 #: build/C/man2/mmap.2:679
5809 #, no-wrap
5810 msgid ""
5811 "    offset = atoi(argv[2]);\n"
5812 "    pa_offset = offset & ~(sysconf(_SC_PAGE_SIZE) - 1);\n"
5813 "        /* offset for mmap() must be page aligned */\n"
5814 msgstr ""
5815 "    offset = atoi(argv[2]);\n"
5816 "    pa_offset = offset & ~(sysconf(_SC_PAGE_SIZE) - 1);\n"
5817 "        /* offset for mmap() must be page aligned */\n"
5818
5819 #. type: Plain text
5820 #: build/C/man2/mmap.2:684
5821 #, no-wrap
5822 msgid ""
5823 "    if (offset E<gt>= sb.st_size) {\n"
5824 "        fprintf(stderr, \"offset is past end of file\\en\");\n"
5825 "        exit(EXIT_FAILURE);\n"
5826 "    }\n"
5827 msgstr ""
5828 "    if (offset E<gt>= sb.st_size) {\n"
5829 "        fprintf(stderr, \"offset is past end of file\\en\");\n"
5830 "        exit(EXIT_FAILURE);\n"
5831 "    }\n"
5832
5833 #. type: Plain text
5834 #: build/C/man2/mmap.2:690
5835 #, no-wrap
5836 msgid ""
5837 "    if (argc == 4) {\n"
5838 "        length = atoi(argv[3]);\n"
5839 "        if (offset + length E<gt> sb.st_size)\n"
5840 "            length = sb.st_size - offset;\n"
5841 "                /* Can\\(aqt display bytes past end of file */\n"
5842 msgstr ""
5843 "    if (argc == 4) {\n"
5844 "        length = atoi(argv[3]);\n"
5845 "        if (offset + length E<gt> sb.st_size)\n"
5846 "            length = sb.st_size - offset;\n"
5847 "                /* Can\\(aqt display bytes past end of file */\n"
5848
5849 #. type: Plain text
5850 #: build/C/man2/mmap.2:694
5851 #, no-wrap
5852 msgid ""
5853 "    } else {    /* No length arg ==E<gt> display to end of file */\n"
5854 "        length = sb.st_size - offset;\n"
5855 "    }\n"
5856 msgstr ""
5857 "    } else {    /* No length arg ==E<gt> display to end of file */\n"
5858 "        length = sb.st_size - offset;\n"
5859 "    }\n"
5860
5861 #. type: Plain text
5862 #: build/C/man2/mmap.2:699
5863 #, no-wrap
5864 msgid ""
5865 "    addr = mmap(NULL, length + offset - pa_offset, PROT_READ,\n"
5866 "                MAP_PRIVATE, fd, pa_offset);\n"
5867 "    if (addr == MAP_FAILED)\n"
5868 "        handle_error(\"mmap\");\n"
5869 msgstr ""
5870 "    addr = mmap(NULL, length + offset - pa_offset, PROT_READ,\n"
5871 "                MAP_PRIVATE, fd, pa_offset);\n"
5872 "    if (addr == MAP_FAILED)\n"
5873 "        handle_error(\"mmap\");\n"
5874
5875 #. type: Plain text
5876 #: build/C/man2/mmap.2:704
5877 #, no-wrap
5878 msgid ""
5879 "    s = write(STDOUT_FILENO, addr + offset - pa_offset, length);\n"
5880 "    if (s != length) {\n"
5881 "        if (s == -1)\n"
5882 "            handle_error(\"write\");\n"
5883 msgstr ""
5884 "    s = write(STDOUT_FILENO, addr + offset - pa_offset, length);\n"
5885 "    if (s != length) {\n"
5886 "        if (s == -1)\n"
5887 "            handle_error(\"write\");\n"
5888
5889 #. type: Plain text
5890 #: build/C/man2/mmap.2:708
5891 #, no-wrap
5892 msgid ""
5893 "        fprintf(stderr, \"partial write\");\n"
5894 "        exit(EXIT_FAILURE);\n"
5895 "    }\n"
5896 msgstr ""
5897 "        fprintf(stderr, \"partial write\");\n"
5898 "        exit(EXIT_FAILURE);\n"
5899 "    }\n"
5900
5901 #. type: Plain text
5902 #: build/C/man2/mmap.2:725
5903 msgid ""
5904 "B<getpagesize>(2), B<mincore>(2), B<mlock>(2), B<mmap2>(2), B<mprotect>(2), "
5905 "B<mremap>(2), B<msync>(2), B<remap_file_pages>(2), B<setrlimit>(2), B<shmat>"
5906 "(2), B<shm_open>(3), B<shm_overview>(7)"
5907 msgstr ""
5908 "B<getpagesize>(2), B<mincore>(2), B<mlock>(2), B<mmap2>(2), B<mprotect>(2), "
5909 "B<mremap>(2), B<msync>(2), B<remap_file_pages>(2), B<setrlimit>(2), B<shmat>"
5910 "(2), B<shm_open>(3), B<shm_overview>(7)"
5911
5912 #. type: Plain text
5913 #: build/C/man2/mmap.2:730 build/C/man2/msync.2:122
5914 msgid "B.O. Gallmeister, POSIX.4, O'Reilly, pp. 128-129 and 389-391."
5915 msgstr "B.O. Gallmeister, POSIX.4, O'Reilly, pp. 128-129 and 389-391."
5916
5917 #. type: TH
5918 #: build/C/man2/mmap2.2:29
5919 #, no-wrap
5920 msgid "MMAP2"
5921 msgstr "MMAP2"
5922
5923 #. type: TH
5924 #: build/C/man2/mmap2.2:29
5925 #, no-wrap
5926 msgid "2012-04-16"
5927 msgstr "2012-04-16"
5928
5929 #. type: Plain text
5930 #: build/C/man2/mmap2.2:32
5931 msgid "mmap2 - map files or devices into memory"
5932 msgstr "mmap2 - ファイルやデバイスをメモリにマップする"
5933
5934 #. type: Plain text
5935 #: build/C/man2/mmap2.2:38
5936 #, no-wrap
5937 msgid ""
5938 "B<void *mmap2(void *>I<addr>B<, size_t >I<length>B<, int >I<prot>B<,>\n"
5939 "B<             int >I<flags>B<, int >I<fd>B<, off_t >I<pgoffset>B<);>\n"
5940 msgstr ""
5941 "B<void *mmap2(void *>I<addr>B<, size_t >I<length>B<, int >I<prot>B<,>\n"
5942 "B<            int >I<flags>B<, int >I<fd>B<, off_t >I<pgoffset>B<);>\n"
5943
5944 #. type: Plain text
5945 #: build/C/man2/mmap2.2:43
5946 msgid ""
5947 "This is probably not the system call you are interested; instead, see B<mmap>"
5948 "(2), which describes the glibc wrapper function that invokes this system "
5949 "call."
5950 msgstr ""
5951 "これはおそらくあなたが興味のあるシステムコールではないだろう。代わりに\n"
5952 "B<mmap>(2) を見るとよい。そのページにはこのシステムコールを起動する glibc "
5953 "の\n"
5954 "ラッパー関数についての説明がある。"
5955
5956 #. type: Plain text
5957 #: build/C/man2/mmap2.2:54
5958 msgid ""
5959 "The B<mmap2>()  system call provides the same interface as B<mmap>(2), "
5960 "except that the final argument specifies the offset into the file in 4096-"
5961 "byte units (instead of bytes, as is done by B<mmap>(2)).  This enables "
5962 "applications that use a 32-bit I<off_t> to map large files (up to 2^44 "
5963 "bytes)."
5964 msgstr ""
5965 "B<mmap2>() システムコールは B<mmap>(2) と同じインターフェースを提供する。た"
5966 "だ\n"
5967 "し、最後の引き数には、ファイルのオフセットを (B<mmap>(2) が行っている、バイ"
5968 "ト\n"
5969 "単位ではなく) 4096 バイトを単位として指定する。 これにより、32 ビットの\n"
5970 "I<off_t> を使うアプリケーションで (2^44 バイトまでの) 大きなファイルをマッ"
5971 "プ\n"
5972 "できるようになる。"
5973
5974 #. type: Plain text
5975 #: build/C/man2/mmap2.2:61
5976 msgid ""
5977 "On success, B<mmap2>()  returns a pointer to the mapped area.  On error -1 "
5978 "is returned and I<errno> is set appropriately."
5979 msgstr ""
5980 "成功した場合、 B<mmap2>()  はマップされた領域へのポインタを返す。 エラーの場"
5981 "合は -1 が返されて、 I<errno> が適切に設定される。"
5982
5983 #. type: Plain text
5984 #: build/C/man2/mmap2.2:65
5985 #, fuzzy
5986 #| msgid "Problem with getting the data from userspace."
5987 msgid "Problem with getting the data from user space."
5988 msgstr "ユーザ空間からデータを取得するときに問題があった。"
5989
5990 #. type: Plain text
5991 #: build/C/man2/mmap2.2:70
5992 msgid ""
5993 "(Various platforms where the page size is not 4096 bytes.)  I<offset * 4096> "
5994 "is not a multiple of the system page size."
5995 msgstr ""
5996 "(ページサイズが 4096 バイトでないプラットフォームにおいて)  I<offset * 4096> "
5997 "がシステムのページサイズの倍数ではない。"
5998
5999 #. type: Plain text
6000 #: build/C/man2/mmap2.2:74
6001 msgid "B<mmap2>()  can also return any of the errors described in B<mmap>(2)."
6002 msgstr "B<mmap2>() は B<mmap>(2) に載っているエラーを返すこともある。"
6003
6004 #. type: Plain text
6005 #: build/C/man2/mmap2.2:77
6006 msgid "B<mmap2>()  is available since Linux 2.3.31."
6007 msgstr "B<mmap2>()  は、Linux 2.3.31 以降で使用可能である。"
6008
6009 #. type: Plain text
6010 #: build/C/man2/mmap2.2:79 build/C/man2/subpage_prot.2:98
6011 msgid "This system call is Linux-specific."
6012 msgstr "このシステムコールは Linux 独自である。"
6013
6014 #. type: Plain text
6015 #: build/C/man2/mmap2.2:85
6016 msgid ""
6017 "Nowadays, the glibc B<mmap>()  wrapper function invokes this system call "
6018 "rather than the B<mmap>(2)  system call."
6019 msgstr ""
6020 "現在では、glibc の B<mmap>()  のラッパー関数は、 B<mmap>(2)  システムコールで"
6021 "はなく、このシステムコール (B<mmap2>(2))  を起動する。"
6022
6023 #.  ia64 can have page sizes ranging from 4kB to 64kB.
6024 #.  On cris, it looks like the unit might also be the page size,
6025 #.  which is 8192 bytes. -- mtk, June 2007
6026 #. type: Plain text
6027 #: build/C/man2/mmap2.2:92
6028 msgid ""
6029 "On ia64, the unit for I<offset> is actually the system page size, rather "
6030 "than 4096 bytes."
6031 msgstr ""
6032 "ia64 では、 I<offset> の単位は、実際にはシステムのページサイズであり、 4096 "
6033 "バイトではない。"
6034
6035 #. type: Plain text
6036 #: build/C/man2/mmap2.2:98
6037 msgid ""
6038 "B<getpagesize>(2), B<mmap>(2), B<mremap>(2), B<msync>(2), B<shm_open>(3)"
6039 msgstr ""
6040 "B<getpagesize>(2), B<mmap>(2), B<mremap>(2), B<msync>(2), B<shm_open>(3)"
6041
6042 #. type: TH
6043 #: build/C/man2/mprotect.2:38
6044 #, no-wrap
6045 msgid "MPROTECT"
6046 msgstr "MPROTECT"
6047
6048 #. type: TH
6049 #: build/C/man2/mprotect.2:38
6050 #, fuzzy, no-wrap
6051 #| msgid "2012-05-04"
6052 msgid "2012-08-14"
6053 msgstr "2012-05-04"
6054
6055 #. type: Plain text
6056 #: build/C/man2/mprotect.2:41
6057 msgid "mprotect - set protection on a region of memory"
6058 msgstr "mprotect - メモリ領域の保護を設定する"
6059
6060 #. type: Plain text
6061 #: build/C/man2/mprotect.2:46
6062 #, fuzzy, no-wrap
6063 #| msgid "B<int mprotect(const void *>I<addr>B<, size_t >I<len>B<, int >I<prot>B<);>\n"
6064 msgid "B<int mprotect(void *>I<addr>B<, size_t >I<len>B<, int >I<prot>B<);>\n"
6065 msgstr "B<int mprotect(const void *>I<addr>B<, size_t >I<len>B<, int >I<prot>B<);>\n"
6066
6067 #. type: Plain text
6068 #: build/C/man2/mprotect.2:54
6069 msgid ""
6070 "B<mprotect>()  changes protection for the calling process's memory page(s)  "
6071 "containing any part of the address range in the interval [I<addr>,\\ I<addr>"
6072 "+I<len>-1].  I<addr> must be aligned to a page boundary."
6073 msgstr ""
6074 "B<mprotect>()  は、区間 [I<addr>,\\ I<addr>+I<len>-1] のアドレス範囲を含む 呼"
6075 "び出し元のプロセスのメモリページのアクセス保護を変更する。 I<addr> はページ境"
6076 "界に一致していなければならない。"
6077
6078 #. type: Plain text
6079 #: build/C/man2/mprotect.2:59
6080 msgid ""
6081 "If the calling process tries to access memory in a manner that violates the "
6082 "protection, then the kernel generates a B<SIGSEGV> signal for the process."
6083 msgstr ""
6084 "呼び出し元のプロセスがアクセス保護に違反するようなメモリアクセスを 行おうとす"
6085 "ると、カーネルはシグナル B<SIGSEGV> をそのプロセスに対して生成する。"
6086
6087 #. type: Plain text
6088 #: build/C/man2/mprotect.2:64
6089 msgid ""
6090 "I<prot> is either B<PROT_NONE> or a bitwise-or of the other values in the "
6091 "following list:"
6092 msgstr ""
6093 "I<prot> には、 B<PROT_NONE> か、以下のリストの B<PROT_NONE> 以外の値をビット"
6094 "毎の論理和 (bitwize-or) で指定する:"
6095
6096 #. type: Plain text
6097 #: build/C/man2/mprotect.2:67
6098 msgid "The memory cannot be accessed at all."
6099 msgstr "そのメモリには全くアクセスできない。"
6100
6101 #. type: Plain text
6102 #: build/C/man2/mprotect.2:70
6103 msgid "The memory can be read."
6104 msgstr "そのメモリを読み取ることができる。"
6105
6106 #. type: Plain text
6107 #: build/C/man2/mprotect.2:73
6108 msgid "The memory can be modified."
6109 msgstr "そのメモリを変更できる。"
6110
6111 #.  FIXME
6112 #.  Document PROT_GROWSUP and PROT_GROWSDOWN
6113 #. type: Plain text
6114 #: build/C/man2/mprotect.2:78
6115 msgid "The memory can be executed."
6116 msgstr "そのメモリは実行可能である。"
6117
6118 #. type: Plain text
6119 #: build/C/man2/mprotect.2:85
6120 msgid ""
6121 "On success, B<mprotect>()  returns zero.  On error, -1 is returned, and "
6122 "I<errno> is set appropriately."
6123 msgstr ""
6124 "成功した場合、 B<mprotect>()  は 0 を返す。エラーの場合は -1 が返り、 "
6125 "I<errno> が適切に設定される。"
6126
6127 #. type: Plain text
6128 #: build/C/man2/mprotect.2:95
6129 msgid ""
6130 "The memory cannot be given the specified access.  This can happen, for "
6131 "example, if you B<mmap>(2)  a file to which you have read-only access, then "
6132 "ask B<mprotect>()  to mark it B<PROT_WRITE>."
6133 msgstr ""
6134 "指定されたアクセスをメモリに設定することができない。 これは、例えば ファイル"
6135 "を読み取り専用で B<mmap>(2)  しており、その領域に対して B<mprotect>()  を呼び"
6136 "出して B<PROT_WRITE> に設定しようとした場合に発生する。"
6137
6138 #.  Or: both PROT_GROWSUP and PROT_GROWSDOWN were specified in 'prot'.
6139 #. type: Plain text
6140 #: build/C/man2/mprotect.2:100
6141 msgid ""
6142 "I<addr> is not a valid pointer, or not a multiple of the system page size."
6143 msgstr ""
6144 "I<addr> が有効なポインタでないか、 システムのページサイズの倍数でない。"
6145
6146 #. type: Plain text
6147 #: build/C/man2/mprotect.2:103
6148 msgid "Internal kernel structures could not be allocated."
6149 msgstr "カーネル内部の構造体を割り当てることができなかった。"
6150
6151 #. type: Plain text
6152 #: build/C/man2/mprotect.2:113
6153 msgid ""
6154 "Addresses in the range [I<addr>, I<addr>+I<len>-1] are invalid for the "
6155 "address space of the process, or specify one or more pages that are not "
6156 "mapped.  (Before kernel 2.4.19, the error B<EFAULT> was incorrectly produced "
6157 "for these cases.)"
6158 msgstr ""
6159 "[I<addr>, I<addr>+I<len>-1] という範囲のアドレスがプロセスのアドレス空間とし"
6160 "て不正であるか、 その範囲のアドレスがマップされていない 1 つ以上のページを指"
6161 "している (カーネル 2.4.19 より前では、この状況でエラー B<EFAULT> が間違って生"
6162 "成されていた)。"
6163
6164 #.  SVr4 defines an additional error
6165 #.  code EAGAIN. The SVr4 error conditions don't map neatly onto Linux's.
6166 #. type: Plain text
6167 #: build/C/man2/mprotect.2:122
6168 msgid ""
6169 "SVr4, POSIX.1-2001.  POSIX says that the behavior of B<mprotect>()  is "
6170 "unspecified if it is applied to a region of memory that was not obtained via "
6171 "B<mmap>(2)."
6172 msgstr ""
6173 "SVr4, POSIX.1-2001.  POSIX では、 B<mmap>(2)  経由で獲得していないメモリ領域"
6174 "に対して B<mprotect>()  を行った場合の B<mprotect>()  の動作は未定義であると"
6175 "されている。"
6176
6177 #. type: Plain text
6178 #: build/C/man2/mprotect.2:129
6179 msgid ""
6180 "On Linux it is always permissible to call B<mprotect>()  on any address in a "
6181 "process's address space (except for the kernel vsyscall area).  In "
6182 "particular it can be used to change existing code mappings to be writable."
6183 msgstr ""
6184 "Linux では、(カーネル vsyscall 領域以外の)  任意のプロセスアドレス空間に対し"
6185 "て B<mprotect>()  を呼び出すことが、常に許されている。 これは特に既存のコード"
6186 "マッピングを書き込み可能にするために使われる。"
6187
6188 #. type: Plain text
6189 #: build/C/man2/mprotect.2:139
6190 msgid ""
6191 "Whether B<PROT_EXEC> has any effect different from B<PROT_READ> is "
6192 "architecture- and kernel version-dependent.  On some hardware architectures "
6193 "(e.g., i386), B<PROT_WRITE> implies B<PROT_READ>."
6194 msgstr ""
6195 "B<PROT_EXEC> が B<PROT_READ> と異なる影響を持つか否かは、アーキテクチャとカー"
6196 "ネルのバージョンに依存する。 (i386 などの) いくつかのアーキテクチャでは、 "
6197 "B<PROT_WRITE> をセットすると、暗黙のうちに B<PROT_READ> がセットされる。"
6198
6199 #. type: Plain text
6200 #: build/C/man2/mprotect.2:148
6201 msgid ""
6202 "POSIX.1-2001 says that an implementation may permit access other than that "
6203 "specified in I<prot>, but at a minimum can only allow write access if "
6204 "B<PROT_WRITE> has been set, and must not allow any access if B<PROT_NONE> "
6205 "has been set."
6206 msgstr ""
6207 "POSIX.1-2001 では、 I<prot> で指定されていないアクセスを許可する実装を認めて"
6208 "いる。 ただし、最低限、 B<PROT_WRITE> がセットされている場合にのみ書き込みア"
6209 "クセスが許可され、 B<PROT_NONE> がセットされている場合にはアクセスは許可され"
6210 "ない点だけは 満たす必要がある。"
6211
6212 #. type: Plain text
6213 #: build/C/man2/mprotect.2:154
6214 msgid ""
6215 "The program below allocates four pages of memory, makes the third of these "
6216 "pages read-only, and then executes a loop that walks upward through the "
6217 "allocated region modifying bytes."
6218 msgstr ""
6219 "以下のプログラムは、メモリページを 4つ確保し、そのうち 3番目のページを 読み込"
6220 "み専用に設定する。その後で、確保した領域のアドレスの小さい方から 大きな方に向"
6221 "かって順番にバイト値を変更するループを実行する。"
6222
6223 #. type: Plain text
6224 #: build/C/man2/mprotect.2:157
6225 msgid ""
6226 "An example of what we might see when running the program is the following:"
6227 msgstr "プログラムを実行した場合の一例を以下に示す。"
6228
6229 #. type: Plain text
6230 #: build/C/man2/mprotect.2:163
6231 #, no-wrap
6232 msgid ""
6233 "$B< ./a.out>\n"
6234 "Start of region:        0x804c000\n"
6235 "Got SIGSEGV at address: 0x804e000\n"
6236 msgstr ""
6237 "$B< ./a.out>\n"
6238 "Start of region:        0x804c000\n"
6239 "Got SIGSEGV at address: 0x804e000\n"
6240
6241 #. type: Plain text
6242 #: build/C/man2/mprotect.2:175
6243 #, no-wrap
6244 msgid ""
6245 "#include E<lt>unistd.hE<gt>\n"
6246 "#include E<lt>signal.hE<gt>\n"
6247 "#include E<lt>stdio.hE<gt>\n"
6248 "#include E<lt>malloc.hE<gt>\n"
6249 "#include E<lt>stdlib.hE<gt>\n"
6250 "#include E<lt>errno.hE<gt>\n"
6251 "#include E<lt>sys/mman.hE<gt>\n"
6252 msgstr ""
6253 "#include E<lt>unistd.hE<gt>\n"
6254 "#include E<lt>signal.hE<gt>\n"
6255 "#include E<lt>stdio.hE<gt>\n"
6256 "#include E<lt>malloc.hE<gt>\n"
6257 "#include E<lt>stdlib.hE<gt>\n"
6258 "#include E<lt>errno.hE<gt>\n"
6259 "#include E<lt>sys/mman.hE<gt>\n"
6260
6261 #. type: Plain text
6262 #: build/C/man2/mprotect.2:180
6263 #, no-wrap
6264 msgid "char *buffer;\n"
6265 msgstr "char *buffer;\n"
6266
6267 #. type: Plain text
6268 #: build/C/man2/mprotect.2:188
6269 #, no-wrap
6270 msgid ""
6271 "static void\n"
6272 "handler(int sig, siginfo_t *si, void *unused)\n"
6273 "{\n"
6274 "    printf(\"Got SIGSEGV at address: 0x%lx\\en\",\n"
6275 "            (long) si-E<gt>si_addr);\n"
6276 "    exit(EXIT_FAILURE);\n"
6277 "}\n"
6278 msgstr ""
6279 "static void\n"
6280 "handler(int sig, siginfo_t *si, void *unused)\n"
6281 "{\n"
6282 "    printf(\"Got SIGSEGV at address: 0x%lx\\en\",\n"
6283 "            (long) si-E<gt>si_addr);\n"
6284 "    exit(EXIT_FAILURE);\n"
6285 "}\n"
6286
6287 #. type: Plain text
6288 #: build/C/man2/mprotect.2:195
6289 #, no-wrap
6290 msgid ""
6291 "int\n"
6292 "main(int argc, char *argv[])\n"
6293 "{\n"
6294 "    char *p;\n"
6295 "    int pagesize;\n"
6296 "    struct sigaction sa;\n"
6297 msgstr ""
6298 "int\n"
6299 "main(void)\n"
6300 "{\n"
6301 "    char *p;\n"
6302 "    int pagesize;\n"
6303 "    struct sigaction sa;\n"
6304
6305 #. type: Plain text
6306 #: build/C/man2/mprotect.2:201
6307 #, no-wrap
6308 msgid ""
6309 "    sa.sa_flags = SA_SIGINFO;\n"
6310 "    sigemptyset(&sa.sa_mask);\n"
6311 "    sa.sa_sigaction = handler;\n"
6312 "    if (sigaction(SIGSEGV, &sa, NULL) == -1)\n"
6313 "        handle_error(\"sigaction\");\n"
6314 msgstr ""
6315 "    sa.sa_flags = SA_SIGINFO;\n"
6316 "    sigemptyset(&sa.sa_mask);\n"
6317 "    sa.sa_sigaction = handler;\n"
6318 "    if (sigaction(SIGSEGV, &sa, NULL) == -1)\n"
6319 "        handle_error(\"sigaction\");\n"
6320
6321 #. type: Plain text
6322 #: build/C/man2/mprotect.2:205
6323 #, no-wrap
6324 msgid ""
6325 "    pagesize = sysconf(_SC_PAGE_SIZE);\n"
6326 "    if (pagesize == -1)\n"
6327 "        handle_error(\"sysconf\");\n"
6328 msgstr ""
6329 "    pagesize = sysconf(_SC_PAGE_SIZE);\n"
6330 "    if (pagesize == -1)\n"
6331 "        handle_error(\"sysconf\");\n"
6332
6333 #. type: Plain text
6334 #: build/C/man2/mprotect.2:208
6335 #, no-wrap
6336 msgid ""
6337 "    /* Allocate a buffer aligned on a page boundary;\n"
6338 "       initial protection is PROT_READ | PROT_WRITE */\n"
6339 msgstr ""
6340 "    /* Allocate a buffer aligned on a page boundary;\n"
6341 "       initial protection is PROT_READ | PROT_WRITE */\n"
6342
6343 #. type: Plain text
6344 #: build/C/man2/mprotect.2:212
6345 #, no-wrap
6346 msgid ""
6347 "    buffer = memalign(pagesize, 4 * pagesize);\n"
6348 "    if (buffer == NULL)\n"
6349 "        handle_error(\"memalign\");\n"
6350 msgstr ""
6351 "    buffer = memalign(pagesize, 4 * pagesize);\n"
6352 "    if (buffer == NULL)\n"
6353 "        handle_error(\"memalign\");\n"
6354
6355 #. type: Plain text
6356 #: build/C/man2/mprotect.2:214
6357 #, no-wrap
6358 msgid "    printf(\"Start of region:        0x%lx\\en\", (long) buffer);\n"
6359 msgstr "    printf(\"Start of region:        0x%lx\\en\", (long) buffer);\n"
6360
6361 #. type: Plain text
6362 #: build/C/man2/mprotect.2:218
6363 #, no-wrap
6364 msgid ""
6365 "    if (mprotect(buffer + pagesize * 2, pagesize,\n"
6366 "                PROT_READ) == -1)\n"
6367 "        handle_error(\"mprotect\");\n"
6368 msgstr ""
6369 "    if (mprotect(buffer + pagesize * 2, pagesize,\n"
6370 "                PROT_READ) == -1)\n"
6371 "        handle_error(\"mprotect\");\n"
6372
6373 #. type: Plain text
6374 #: build/C/man2/mprotect.2:221
6375 #, no-wrap
6376 msgid ""
6377 "    for (p = buffer ; ; )\n"
6378 "        *(p++) = \\(aqa\\(aq;\n"
6379 msgstr ""
6380 "    for (p = buffer ; ; )\n"
6381 "        *(p++) = \\(aqa\\(aq;\n"
6382
6383 #. type: Plain text
6384 #: build/C/man2/mprotect.2:225
6385 #, no-wrap
6386 msgid ""
6387 "    printf(\"Loop completed\\en\");     /* Should never happen */\n"
6388 "    exit(EXIT_SUCCESS);\n"
6389 "}\n"
6390 msgstr ""
6391 "    printf(\"Loop completed\\en\");     /* Should never happen */\n"
6392 "    exit(EXIT_SUCCESS);\n"
6393 "}\n"
6394
6395 #. type: Plain text
6396 #: build/C/man2/mprotect.2:229
6397 msgid "B<mmap>(2), B<sysconf>(3)"
6398 msgstr "B<mmap>(2), B<sysconf>(3)"
6399
6400 #. type: TH
6401 #: build/C/man2/mremap.2:30
6402 #, no-wrap
6403 msgid "MREMAP"
6404 msgstr "MREMAP"
6405
6406 #. type: TH
6407 #: build/C/man2/mremap.2:30
6408 #, no-wrap
6409 msgid "2010-06-10"
6410 msgstr "2010-06-10"
6411
6412 #. type: Plain text
6413 #: build/C/man2/mremap.2:33
6414 msgid "mremap - remap a virtual memory address"
6415 msgstr "mremap - 仮想メモリ・アドレスを再マッピングする"
6416
6417 #. type: Plain text
6418 #: build/C/man2/mremap.2:36
6419 #, no-wrap
6420 msgid "B<#define _GNU_SOURCE>         /* See feature_test_macros(7) */\n"
6421 msgstr "B<#define _GNU_SOURCE>         /* feature_test_macros(7) 参照 */\n"
6422
6423 #. type: Plain text
6424 #: build/C/man2/mremap.2:41
6425 #, no-wrap
6426 msgid ""
6427 "B<void *mremap(void *>I<old_address>B<, size_t >I<old_size>B<,>\n"
6428 "B<             size_t >I<new_size>B<, int >I<flags>B<, ... /* void *>I<new_address>B< */);>\n"
6429 msgstr ""
6430 "B<void *mremap(void *>I<old_address>B<, size_t >I<old_size>B<,>\n"
6431 "B<             size_t >I<new_size>B<, int >I<flags>B<, ... /* void *>I<new_address>B< */);>\n"
6432
6433 #. type: Plain text
6434 #: build/C/man2/mremap.2:47
6435 msgid ""
6436 "B<mremap>()  expands (or shrinks) an existing memory mapping, potentially "
6437 "moving it at the same time (controlled by the I<flags> argument and the "
6438 "available virtual address space)."
6439 msgstr ""
6440 "B<mremap>()  は既存のメモリ・マッピングの拡張 (または縮小) を行う。 同時に移"
6441 "動されることもある (I<flags> 引き数と利用可能な仮想アドレス空間によって決ま"
6442 "る)。"
6443
6444 #. type: Plain text
6445 #: build/C/man2/mremap.2:61
6446 msgid ""
6447 "I<old_address> is the old address of the virtual memory block that you want "
6448 "to expand (or shrink).  Note that I<old_address> has to be page aligned.  "
6449 "I<old_size> is the old size of the virtual memory block.  I<new_size> is the "
6450 "requested size of the virtual memory block after the resize.  An optional "
6451 "fifth argument, I<new_address>, may be provided; see the description of "
6452 "B<MREMAP_FIXED> below."
6453 msgstr ""
6454 "I<old_address> は拡張 (または縮小) しようとする仮想メモリ・ブロック の元のア"
6455 "ドレスである。I<old_address> はページ境界に合っていなければ ならない点に注意"
6456 "すること。I<old_size> は元の仮想メモリ・ブロックの サイズである。 "
6457 "I<new_size> は要求する変更後の仮想メモリ・ブロックのサイズである。 5 番目の引"
6458 "き数として I<new_address> を指定することができる。下記の B<MREMAP_FIXED> の説"
6459 "明を参照のこと。"
6460
6461 #. type: Plain text
6462 #: build/C/man2/mremap.2:73
6463 msgid ""
6464 "In Linux the memory is divided into pages.  A user process has (one or)  "
6465 "several linear virtual memory segments.  Each virtual memory segment has one "
6466 "or more mappings to real memory pages (in the page table).  Each virtual "
6467 "memory segment has its own protection (access rights), which may cause a "
6468 "segmentation violation if the memory is accessed incorrectly (e.g., writing "
6469 "to a read-only segment).  Accessing virtual memory outside of the segments "
6470 "will also cause a segmentation violation."
6471 msgstr ""
6472 "Linux ではメモリはページに分割される。ユーザー・プロセスは (一つまたは)  複数"
6473 "のリニアな仮想メモリセグメントを持つ。 それぞれの仮想メモリセグメントは一つ以"
6474 "上の実メモリ・ページ にマッピングされている (マッピング情報はページ・テーブル"
6475 "で管理される)。 仮想メモリセグメントにはセグメント毎の保護 (アクセス権) が設"
6476 "定されており、 メモリが不正にアクセスされた場合 (例えば読み込み専用のセグメン"
6477 "トに 書き込んだ場合)、セグメンテーション侵害 (segmentation violation) を 引き"
6478 "起こす。また、セグメント外の仮想メモリにアクセスした場合にも セグメンテーショ"
6479 "ン侵害が発生する。"
6480
6481 #. type: Plain text
6482 #: build/C/man2/mremap.2:81
6483 msgid ""
6484 "B<mremap>()  uses the Linux page table scheme.  B<mremap>()  changes the "
6485 "mapping between virtual addresses and memory pages.  This can be used to "
6486 "implement a very efficient B<realloc>(3)."
6487 msgstr ""
6488 "B<mremap>()  は Linux のページ・テーブル方式を使用する。 B<mremap>()  は仮想"
6489 "アドレスとメモリ・ページのマッピングを変更する。これは非常に効率的な "
6490 "B<realloc>(3)  を実装するのに使用されている。"
6491
6492 #. type: Plain text
6493 #: build/C/man2/mremap.2:83
6494 msgid "The I<flags> bit-mask argument may be 0, or include the following flag:"
6495 msgstr "I<flags> ビットマスク引数は 0 または以下のフラグを含む:"
6496
6497 #. type: TP
6498 #: build/C/man2/mremap.2:83
6499 #, no-wrap
6500 msgid "B<MREMAP_MAYMOVE>"
6501 msgstr "B<MREMAP_MAYMOVE>"
6502
6503 #. type: Plain text
6504 #: build/C/man2/mremap.2:95
6505 msgid ""
6506 "By default, if there is not sufficient space to expand a mapping at its "
6507 "current location, then B<mremap>()  fails.  If this flag is specified, then "
6508 "the kernel is permitted to relocate the mapping to a new virtual address, if "
6509 "necessary.  If the mapping is relocated, then absolute pointers into the old "
6510 "mapping location become invalid (offsets relative to the starting address of "
6511 "the mapping should be employed)."
6512 msgstr ""
6513 "デフォルトでは、現在の位置にマッピングを拡張するための 十分な空きがなければ "
6514 "B<mremap>()  は失敗する。 このフラグが指定されると、カーネルは必要があれば"
6515 "マッピングを 新しい仮想アドレスに再配置することができる マッピングが再配置さ"
6516 "れると、古いマッピング位置への絶対ポインタは 無効になる (マッピングの開始アド"
6517 "レスからの相対オフセットは有効のままである)。"
6518
6519 #. type: TP
6520 #: build/C/man2/mremap.2:95
6521 #, no-wrap
6522 msgid "B<MREMAP_FIXED> (since Linux 2.3.31)"
6523 msgstr "B<MREMAP_FIXED> (Linux 2.3.31 以降)"
6524
6525 #. type: Plain text
6526 #: build/C/man2/mremap.2:117
6527 msgid ""
6528 "This flag serves a similar purpose to the B<MAP_FIXED> flag of B<mmap>(2).  "
6529 "If this flag is specified, then B<mremap>()  accepts a fifth argument, "
6530 "I<void *new_address>, which specifies a page-aligned address to which the "
6531 "mapping must be moved.  Any previous mapping at the address range specified "
6532 "by I<new_address> and I<new_size> is unmapped.  If B<MREMAP_FIXED> is "
6533 "specified, then B<MREMAP_MAYMOVE> must also be specified."
6534 msgstr ""
6535 "このフラグは B<mmap>(2)  の B<MAP_FIXED> フラグと似たような目的で用いられ"
6536 "る。 このフラグが指定されると、 B<mremap>()  は 5 番目の引き数 I<void "
6537 "*new_address> を受け取り、この引数はマッピングが移動されるべきアドレスを指定"
6538 "する。 このアドレスはページ境界に合っていなければならない。 I<new_address> "
6539 "と I<new_size> で指定されるアドレス範囲に過去のマッピングがあった場合、 その"
6540 "マッピングはアンマップされる (unmapped)。 B<MREMAP_FIXED> を指定した場合は、 "
6541 "B<MREMAP_MAYMOVE> も指定しなければならない。"
6542
6543 #. type: Plain text
6544 #: build/C/man2/mremap.2:127
6545 msgid ""
6546 "If the memory segment specified by I<old_address> and I<old_size> is locked "
6547 "(using B<mlock>(2)  or similar), then this lock is maintained when the "
6548 "segment is resized and/or relocated.  As a consequence, the amount of memory "
6549 "locked by the process may change."
6550 msgstr ""
6551 "I<old_address> と I<old_size> で指定されるメモリセグメントが (B<mlock>(2)  や"
6552 "同様のもので) ロックされている場合、セグメントのサイズが変わったり 再配置され"
6553 "たりした時にロックも維持される。 その結果、プロセスによってロックされるメモリ"
6554 "の量は変化する。"
6555
6556 #. type: Plain text
6557 #: build/C/man2/mremap.2:135
6558 msgid ""
6559 "On success B<mremap>()  returns a pointer to the new virtual memory area.  "
6560 "On error, the value B<MAP_FAILED> (that is, I<(void\\ *)\\ -1>) is returned, "
6561 "and I<errno> is set appropriately."
6562 msgstr ""
6563 "成功した場合は B<mremap>()  は新しい仮想メモリ領域へのポインタを返す。 エラー"
6564 "の場合は B<MAP_FAILED> (すなわち I<(void\\ *)\\ -1>) が返され、 I<errno> が適"
6565 "切に設定される。"
6566
6567 #. type: Plain text
6568 #: build/C/man2/mremap.2:142
6569 msgid ""
6570 "The caller tried to expand a memory segment that is locked, but this was not "
6571 "possible without exceeding the B<RLIMIT_MEMLOCK> resource limit."
6572 msgstr ""
6573 "呼び出し元がロックされているメモリセグメントを拡張しようとしたが、 "
6574 "B<RLIMIT_MEMLOCK> リソース制限を越えずにこれを行うことができない。"
6575
6576 #. type: Plain text
6577 #: build/C/man2/mremap.2:151
6578 msgid ""
6579 "\"Segmentation fault.\" Some address in the range I<old_address> to "
6580 "I<old_address>+I<old_size> is an invalid virtual memory address for this "
6581 "process.  You can also get B<EFAULT> even if there exist mappings that cover "
6582 "the whole address space requested, but those mappings are of different types."
6583 msgstr ""
6584 "「セグメンテーション違反(segmentation fault)」 I<old_address> から "
6585 "I<old_address>+I<old_size> の 範囲のアドレスのどれかがこのプロセスにおいて不"
6586 "正な仮想メモリ・アドレスである。 たとえ要求したアドレス空間全体を含むような"
6587 "マッピングがあったとしても、 それらのマッピングが異なった型ならば B<EFAULT> "
6588 "を受け取るだろう。"
6589
6590 #. type: Plain text
6591 #: build/C/man2/mremap.2:179
6592 msgid ""
6593 "An invalid argument was given.  Possible causes are: I<old_address> was not "
6594 "page aligned; a value other than B<MREMAP_MAYMOVE> or B<MREMAP_FIXED> was "
6595 "specified in I<flags>; I<new_size> was zero; I<new_size> or I<new_address> "
6596 "was invalid; or the new address range specified by I<new_address> and "
6597 "I<new_size> overlapped the old address range specified by I<old_address> and "
6598 "I<old_size>; or B<MREMAP_FIXED> was specified without also specifying "
6599 "B<MREMAP_MAYMOVE>."
6600 msgstr ""
6601 "不正な引き数が与えられた。 可能性のある原因は以下の通りである: たいていは "
6602 "I<old_address> がページ境界に 合ってない; I<flags> に B<MREMAP_MAYMOVE> また"
6603 "は B<MREMAP_FIXED> 以外の値が指定されている; I<new_size> がゼロ; I<new_size> "
6604 "または I<new_address> の値が不正; I<new_address> と I<new_size> で指定される"
6605 "新しいアドレス範囲が I<old_address> と I<old_size> で指定される古いアドレス範"
6606 "囲と重なっている; B<MREMAP_FIXED> が指定されているが B<MREMAP_MAYMOVE> が指定"
6607 "されていない。"
6608
6609 #. type: Plain text
6610 #: build/C/man2/mremap.2:185
6611 msgid ""
6612 "The memory area cannot be expanded at the current virtual address, and the "
6613 "B<MREMAP_MAYMOVE> flag is not set in I<flags>.  Or, there is not enough "
6614 "(virtual) memory available."
6615 msgstr ""
6616 "現在の仮想アドレスではメモリ領域が拡張できず、 B<MREMAP_MAYMOVE> フラグが "
6617 "I<flags> に設定されていない。 または十分な (仮想) メモリが存在しない。"
6618
6619 #.  4.2BSD had a (never actually implemented)
6620 #.  .BR mremap (2)
6621 #.  call with completely different semantics.
6622 #. type: Plain text
6623 #: build/C/man2/mremap.2:191
6624 msgid ""
6625 "This call is Linux-specific, and should not be used in programs intended to "
6626 "be portable."
6627 msgstr ""
6628 "このコールは Linux 特有であり、移植を意図したプログラムで 使用すべきではな"
6629 "い。"
6630
6631 #. type: Plain text
6632 #: build/C/man2/mremap.2:199
6633 msgid ""
6634 "Prior to version 2.4, glibc did not expose the definition of "
6635 "B<MREMAP_FIXED>, and the prototype for B<mremap>()  did not allow for the "
6636 "I<new_address> argument."
6637 msgstr ""
6638 "バージョン 2.4 より前の glibc では、 B<MREMAP_FIXED> の定義は公開されておら"
6639 "ず、 B<mremap>()  のプロトタイプは I<new_address> 引き数を取らなかった。"
6640
6641 #. type: Plain text
6642 #: build/C/man2/mremap.2:208
6643 msgid ""
6644 "B<brk>(2), B<getpagesize>(2), B<getrlimit>(2), B<mlock>(2), B<mmap>(2), "
6645 "B<sbrk>(2), B<malloc>(3), B<realloc>(3)"
6646 msgstr ""
6647 "B<brk>(2), B<getpagesize>(2), B<getrlimit>(2), B<mlock>(2), B<mmap>(2), "
6648 "B<sbrk>(2), B<realloc>(3), B<malloc>(3)"
6649
6650 #. type: Plain text
6651 #: build/C/man2/mremap.2:214
6652 #, fuzzy
6653 #| msgid ""
6654 #| "Your favorite OS text book for more information on paged memory.  "
6655 #| "(I<Modern Operating Systems> by Andrew S. Tanenbaum, I<Inside Linux> by "
6656 #| "Randolf Bentson, I<The Design of the UNIX Operating System> by Maurice J. "
6657 #| "Bach.)"
6658 msgid ""
6659 "Your favorite text book on operating systems for more information on paged "
6660 "memory (e.g., I<Modern Operating Systems> by Andrew S. Tanenbaum, I<Inside "
6661 "Linux> by Randolf Bentson, I<The Design of the UNIX Operating System> by "
6662 "Maurice J. Bach)"
6663 msgstr ""
6664 "ページ分割されたメモリについてもっと詳しく知りたいならば あなたの好みの OS "
6665 "の\n"
6666 "教科書を参照すること。 (I<Modern Operating Systems> by Andrew S. Tanenbaum,\n"
6667 "I<Inside Linux> by Randolf Bentson, I<The Design of the UNIX Operating\n"
6668 "System> by Maurice J. Bach.)"
6669
6670 #. type: TH
6671 #: build/C/man2/msync.2:25
6672 #, no-wrap
6673 msgid "MSYNC"
6674 msgstr "MSYNC"
6675
6676 #. type: TH
6677 #: build/C/man2/msync.2:25 build/C/man2/remap_file_pages.2:28
6678 #, no-wrap
6679 msgid "2008-04-22"
6680 msgstr "2008-04-22"
6681
6682 #. type: Plain text
6683 #: build/C/man2/msync.2:28
6684 msgid "msync - synchronize a file with a memory map"
6685 msgstr "msync - ファイルをマップしたメモリと同期させる"
6686
6687 #. type: Plain text
6688 #: build/C/man2/msync.2:32
6689 msgid "B<int msync(void *>I<addr>B<, size_t >I<length>B<, int >I<flags>B<);>"
6690 msgstr "B<int msync(void *>I<addr>B<, size_t >I<length>B<, int >I<flags>B<);>"
6691
6692 #. type: Plain text
6693 #: build/C/man2/msync.2:48
6694 msgid ""
6695 "B<msync>()  flushes changes made to the in-core copy of a file that was "
6696 "mapped into memory using B<mmap>(2)  back to disk.  Without use of this call "
6697 "there is no guarantee that changes are written back before B<munmap>(2)  is "
6698 "called.  To be more precise, the part of the file that corresponds to the "
6699 "memory area starting at I<addr> and having length I<length> is updated."
6700 msgstr ""
6701 "B<msync>()  は B<mmap>(2)  を使ってメモリにマップされたファイルの、 メモリ上"
6702 "のコピーになされた変更をディスクに反映させる。 この関数を使用しないと、 "
6703 "B<munmap>(2)  が呼び出されるまで変更が書き戻される保証はない。 より正確には、"
6704 "ファイルのうち I<addr> から始まり長さ I<length> のメモリ領域に対応する部分が"
6705 "更新される。"
6706
6707 #. type: Plain text
6708 #: build/C/man2/msync.2:68
6709 msgid ""
6710 "The I<flags> argument may have the bits B<MS_ASYNC>, B<MS_SYNC>, and "
6711 "B<MS_INVALIDATE> set, but not both B<MS_ASYNC> and B<MS_SYNC>.  B<MS_ASYNC> "
6712 "specifies that an update be scheduled, but the call returns immediately.  "
6713 "B<MS_SYNC> asks for an update and waits for it to complete.  "
6714 "B<MS_INVALIDATE> asks to invalidate other mappings of the same file (so that "
6715 "they can be updated with the fresh values just written)."
6716 msgstr ""
6717 "I<flags> 引数にはビット B<MS_ASYNC>, B<MS_SYNC>, B<MS_INVALIDATE> を設定する"
6718 "ことができるが、 B<MS_ASYNC> と B<MS_SYNC> を同時に指定することはできない。 "
6719 "B<MS_ASYNC> は更新を予定に組み込むことを表し、呼び出しは直ちに返る。 "
6720 "B<MS_SYNC> は更新を要求し、更新が完了するまで待つ。 B<MS_INVALIDATE> は(たっ"
6721 "た今書き込んだ新しい値でマッピングを更新することができるように)  同じファイル"
6722 "に対する他のマッピングを無効にすることを要求する。"
6723
6724 #. type: Plain text
6725 #: build/C/man2/msync.2:73
6726 msgid ""
6727 "On success, zero is returned.  On error, -1 is returned, and I<errno> is set "
6728 "appropriately."
6729 msgstr ""
6730 "成功した場合、 0 が返る。エラーの場合、 -1 が返り、 I<errno> が適切に設定され"
6731 "る。"
6732
6733 #. type: TP
6734 #: build/C/man2/msync.2:74
6735 #, no-wrap
6736 msgid "B<EBUSY>"
6737 msgstr "B<EBUSY>"
6738
6739 #. type: Plain text
6740 #: build/C/man2/msync.2:80
6741 msgid ""
6742 "B<MS_INVALIDATE> was specified in I<flags>, and a memory lock exists for the "
6743 "specified address range."
6744 msgstr ""
6745 "I flags に B<MS_INVALIDATE> が指定されたが、指定されたアドレス範囲にロックが"
6746 "存在する。"
6747
6748 #. type: Plain text
6749 #: build/C/man2/msync.2:93
6750 msgid ""
6751 "I<addr> is not a multiple of PAGESIZE; or any bit other than B<MS_ASYNC> | "
6752 "B<MS_INVALIDATE> | B<MS_SYNC> is set in I<flags>; or both B<MS_SYNC> and "
6753 "B<MS_ASYNC> are set in I<flags>."
6754 msgstr ""
6755 "I<addr> が PAGESIZE の倍数でない。または、 I<flags> に B<MS_ASYNC>、"
6756 "B<MS_INVALIDATE>、B<MS_SYNC> 以外のビットが設定された。 または、 I<flags> に "
6757 "B<MS_SYNC> と B<MS_ASYNC> の両方が設定された。"
6758
6759 #. type: Plain text
6760 #: build/C/man2/msync.2:96
6761 msgid "The indicated memory (or part of it) was not mapped."
6762 msgstr "指定されたメモリ (またはその一部) がマップされていない。"
6763
6764 #. type: Plain text
6765 #: build/C/man2/msync.2:98 build/C/man3/posix_fallocate.3:105
6766 #: build/C/man3/shm_open.3:251 build/C/man7/shm_overview.7:103
6767 msgid "POSIX.1-2001."
6768 msgstr "POSIX.1-2001."
6769
6770 #. type: Plain text
6771 #: build/C/man2/msync.2:105
6772 msgid ""
6773 "This call was introduced in Linux 1.3.21, and then used B<EFAULT> instead of "
6774 "B<ENOMEM>.  In Linux 2.4.19 this was changed to the POSIX value B<ENOMEM>."
6775 msgstr ""
6776 "この関数は Linux 1.3.21 で導入されたが、 B<ENOMEM> ではなく B<EFAULT> が使わ"
6777 "れていた。 これは Linux 2.4.19 で POSIX における値 B<ENOMEM> に変更された。"
6778
6779 #.  POSIX.1-2001: It shall be defined to -1 or 0 or 200112L.
6780 #.  -1: unavailable, 0: ask using sysconf().
6781 #.  glibc defines them to 1.
6782 #. type: Plain text
6783 #: build/C/man2/msync.2:118
6784 msgid ""
6785 "On POSIX systems on which B<msync>()  is available, both "
6786 "B<_POSIX_MAPPED_FILES> and B<_POSIX_SYNCHRONIZED_IO> are defined in "
6787 "I<E<lt>unistd.hE<gt>> to a value greater than 0.  (See also B<sysconf>(3).)"
6788 msgstr ""
6789 "B<msync>()  が使用可能な POSIX システムでは B<_POSIX_MAPPED_FILES> と "
6790 "B<_POSIX_SYNCHRONIZED_IO> の両方が I<E<lt>unistd.hE<gt>> で 0 より大きい値に"
6791 "定義される。 (B<sysconf>(3)  を参照すること。 )"
6792
6793 #. type: TP
6794 #: build/C/man2/msync.2:120 build/C/man7/shm_overview.7:46
6795 #, no-wrap
6796 msgid "B<mmap>(2)"
6797 msgstr "B<mmap>(2)"
6798
6799 #. type: TH
6800 #: build/C/man3/mtrace.3:25
6801 #, no-wrap
6802 msgid "MTRACE"
6803 msgstr "MTRACE"
6804
6805 #. type: Plain text
6806 #: build/C/man3/mtrace.3:28
6807 msgid "mtrace, muntrace - malloc tracing"
6808 msgstr "mtrace, muntrace - malloc のトレース"
6809
6810 #. type: Plain text
6811 #: build/C/man3/mtrace.3:30
6812 msgid "B<#include E<lt>mcheck.hE<gt>>"
6813 msgstr "B<#include E<lt>mcheck.hE<gt>>"
6814
6815 #. type: Plain text
6816 #: build/C/man3/mtrace.3:32
6817 msgid "B<void mtrace(void);>"
6818 msgstr "B<void mtrace(void);>"
6819
6820 #. type: Plain text
6821 #: build/C/man3/mtrace.3:34
6822 msgid "B<void muntrace(void);>"
6823 msgstr "B<void muntrace(void);>"
6824
6825 #. type: Plain text
6826 #: build/C/man3/mtrace.3:46
6827 msgid ""
6828 "The B<mtrace>()  function installs hook functions for the memory-allocation "
6829 "functions (B<malloc>(3), B<realloc>(3)  B<memalign>(3), B<free>(3)).  These "
6830 "hook functions record tracing information about memory allocation and "
6831 "deallocation.  The tracing information can be used to discover memory leaks "
6832 "and attempts to free nonallocated memory in a program."
6833 msgstr ""
6834
6835 #. type: Plain text
6836 #: build/C/man3/mtrace.3:57
6837 msgid ""
6838 "The B<muntrace>()  function disables the hook functions installed by "
6839 "B<mtrace>(), so that tracing information is no longer recorded for the "
6840 "memory-allocation functions.  If no hook functions were successfully "
6841 "installed by B<mtrace>(), B<muntrace>()  does nothing."
6842 msgstr ""
6843
6844 #. type: Plain text
6845 #: build/C/man3/mtrace.3:65
6846 msgid ""
6847 "When B<mtrace>()  is called, it checks the value of the environment variable "
6848 "B<MALLOC_TRACE>, which should contain the pathname of a file in which the "
6849 "tracing information is to be recorded.  If the pathname is successfully "
6850 "opened, it is truncated to zero length."
6851 msgstr ""
6852
6853 #. type: Plain text
6854 #: build/C/man3/mtrace.3:78
6855 msgid ""
6856 "If B<MALLOC_TRACE> is not set, or the pathname it specifies is invalid or "
6857 "not writable, then no hook functions are installed, and B<mtrace>()  has no "
6858 "effect.  In set-user-ID and set-group-ID programs, B<MALLOC_TRACE> is "
6859 "ignored, and B<mtrace>()  has no effect."
6860 msgstr ""
6861
6862 #. type: Plain text
6863 #: build/C/man3/mtrace.3:86
6864 msgid ""
6865 "In normal usage, B<mtrace>()  is called once at the start of execution of a "
6866 "program, and B<muntrace>()  is never called."
6867 msgstr ""
6868
6869 #. type: Plain text
6870 #: build/C/man3/mtrace.3:96
6871 msgid ""
6872 "The tracing output produced after a call to B<mtrace>()  is textual, but not "
6873 "designed to be human readable.  The GNU C library provides a Perl script, "
6874 "B<mtrace>(1), that interprets the trace log and produces human-readable "
6875 "output.  For best results, the traced program should be compiled with "
6876 "debugging enabled, so that line-number information is recorded in the "
6877 "executable."
6878 msgstr ""
6879
6880 #. type: Plain text
6881 #: build/C/man3/mtrace.3:102
6882 msgid ""
6883 "The tracing performed by B<mtrace>()  incurs a performance penalty (if "
6884 "B<MALLOC_TRACE> points to a valid, writable pathname)."
6885 msgstr ""
6886
6887 #. type: Plain text
6888 #: build/C/man3/mtrace.3:108
6889 msgid ""
6890 "The line-number information produced by B<mtrace>(1)  is not always precise: "
6891 "the line number references may refer to the previous or following (non-"
6892 "blank)  line of the source code."
6893 msgstr ""
6894
6895 #. type: Plain text
6896 #: build/C/man3/mtrace.3:115
6897 msgid ""
6898 "The shell session below demonstrates the use of the B<mtrace>()  function "
6899 "and the B<mtrace>(1)  command in a program that has memory leaks at two "
6900 "different locations.  The demonstration uses the following program:"
6901 msgstr ""
6902
6903 #. type: Plain text
6904 #: build/C/man3/mtrace.3:122
6905 #, no-wrap
6906 msgid ""
6907 "$ B<cat t_mtrace.c>\n"
6908 "#include E<lt>mcheck.hE<gt>\n"
6909 "#include E<lt>stdlib.hE<gt>\n"
6910 "#include E<lt>stdio.hE<gt>\n"
6911 msgstr ""
6912 "$ B<cat t_mtrace.c>\n"
6913 "#include E<lt>mcheck.hE<gt>\n"
6914 "#include E<lt>stdlib.hE<gt>\n"
6915 "#include E<lt>stdio.hE<gt>\n"
6916
6917 #. type: Plain text
6918 #: build/C/man3/mtrace.3:127
6919 #, no-wrap
6920 msgid ""
6921 "int\n"
6922 "main(int argc, char *argv[])\n"
6923 "{\n"
6924 "    int j;\n"
6925 msgstr ""
6926 "int\n"
6927 "main(int argc, char *argv[])\n"
6928 "{\n"
6929 "    int j;\n"
6930
6931 #. type: Plain text
6932 #: build/C/man3/mtrace.3:129
6933 #, no-wrap
6934 msgid "    mtrace();\n"
6935 msgstr "    mtrace();\n"
6936
6937 #. type: Plain text
6938 #: build/C/man3/mtrace.3:132
6939 #, no-wrap
6940 msgid ""
6941 "    for (j = 0; j E<lt> 2; j++)\n"
6942 "        malloc(100);            /* Never freed--a memory leak */\n"
6943 msgstr ""
6944 "    for (j = 0; j E<lt> 2; j++)\n"
6945 "        malloc(100);            /* Never freed--a memory leak */\n"
6946
6947 #. type: Plain text
6948 #: build/C/man3/mtrace.3:136
6949 #, no-wrap
6950 msgid ""
6951 "    calloc(16, 16);             /* Never freed--a memory leak */\n"
6952 "    exit(EXIT_SUCCESS);\n"
6953 "}\n"
6954 msgstr ""
6955 "    calloc(16, 16);             /* Never freed--a memory leak */\n"
6956 "    exit(EXIT_SUCCESS);\n"
6957 "}\n"
6958
6959 #. type: Plain text
6960 #: build/C/man3/mtrace.3:142
6961 msgid ""
6962 "When we run the program as follows, we see that B<mtrace>()  diagnosed "
6963 "memory leaks at two different locations in the program:"
6964 msgstr ""
6965
6966 #. type: Plain text
6967 #: build/C/man3/mtrace.3:155
6968 #, no-wrap
6969 msgid ""
6970 "$ B<cc -g t_mtrace.c -o t_mtrace>\n"
6971 "$ B<export MALLOC_TRACE=/tmp/t>\n"
6972 "$ B<./t_mtrace>\n"
6973 "$ B<mtrace ./t_mtrace $MALLOC_TRACE>\n"
6974 "Memory not freed:\n"
6975 "-----------------\n"
6976 "   Address     Size     Caller\n"
6977 "0x084c9378     0x64  at /home/cecilia/t_mtrace.c:12\n"
6978 "0x084c93e0     0x64  at /home/cecilia/t_mtrace.c:12\n"
6979 "0x084c9448    0x100  at /home/cecilia/t_mtrace.c:16\n"
6980 msgstr ""
6981 "$ B<cc -g t_mtrace.c -o t_mtrace>\n"
6982 "$ B<export MALLOC_TRACE=/tmp/t>\n"
6983 "$ B<./t_mtrace>\n"
6984 "$ B<mtrace ./t_mtrace $MALLOC_TRACE>\n"
6985 "Memory not freed:\n"
6986 "-----------------\n"
6987 "   Address     Size     Caller\n"
6988 "0x084c9378     0x64  at /home/cecilia/t_mtrace.c:12\n"
6989 "0x084c93e0     0x64  at /home/cecilia/t_mtrace.c:12\n"
6990 "0x084c9448    0x100  at /home/cecilia/t_mtrace.c:16\n"
6991
6992 #. type: Plain text
6993 #: build/C/man3/mtrace.3:167
6994 msgid ""
6995 "The first two messages about unfreed memory correspond to the two B<malloc>"
6996 "(3)  calls inside the I<for> loop.  The final message corresponds to the "
6997 "call to B<calloc>(3)  (which in turn calls B<malloc>(3))."
6998 msgstr ""
6999
7000 #. type: Plain text
7001 #: build/C/man3/mtrace.3:172
7002 msgid "B<mtrace>(1), B<malloc>(3), B<malloc_hook>(3), B<mcheck>(3)"
7003 msgstr "B<mtrace>(1), B<malloc>(3), B<malloc_hook>(3), B<mcheck>(3)"
7004
7005 #. type: TH
7006 #: build/C/man2/posix_fadvise.2:28
7007 #, no-wrap
7008 msgid "POSIX_FADVISE"
7009 msgstr "POSIX_FADVISE"
7010
7011 #. type: TH
7012 #: build/C/man2/posix_fadvise.2:28 build/C/man2/sync_file_range.2:30
7013 #, no-wrap
7014 msgid "2010-10-09"
7015 msgstr "2010-10-09"
7016
7017 #. type: Plain text
7018 #: build/C/man2/posix_fadvise.2:31
7019 msgid "posix_fadvise - predeclare an access pattern for file data"
7020 msgstr "posix_fadvise - ファイルデータのアクセスパターンをあらかじめ宣言する"
7021
7022 #. type: Plain text
7023 #: build/C/man2/posix_fadvise.2:34 build/C/man3/posix_fallocate.3:31
7024 #, no-wrap
7025 msgid "B<#include E<lt>fcntl.hE<gt>>\n"
7026 msgstr "B<#include E<lt>fcntl.hE<gt>>\n"
7027
7028 #. type: Plain text
7029 #: build/C/man2/posix_fadvise.2:37
7030 #, no-wrap
7031 msgid "B<int posix_fadvise(int >I<fd>B<, off_t >I<offset>B<, off_t >I<len>B<, int >I<advice>B<);>\n"
7032 msgstr "B<int posix_fadvise(int >I<fd>B<, off_t >I<offset>B<, off_t >I<len>B<, int >I<advice>B<);>\n"
7033
7034 #. type: Plain text
7035 #: build/C/man2/posix_fadvise.2:46
7036 msgid "B<posix_fadvise>():"
7037 msgstr "B<posix_fadvise>():"
7038
7039 #. type: Plain text
7040 #: build/C/man2/posix_fadvise.2:48 build/C/man3/posix_fallocate.3:44
7041 msgid "_XOPEN_SOURCE\\ E<gt>=\\ 600 || _POSIX_C_SOURCE\\ E<gt>=\\ 200112L"
7042 msgstr "_XOPEN_SOURCE\\ E<gt>=\\ 600 || _POSIX_C_SOURCE\\ E<gt>=\\ 200112L"
7043
7044 #. type: Plain text
7045 #: build/C/man2/posix_fadvise.2:56
7046 msgid ""
7047 "Programs can use B<posix_fadvise>()  to announce an intention to access file "
7048 "data in a specific pattern in the future, thus allowing the kernel to "
7049 "perform appropriate optimizations."
7050 msgstr ""
7051 "プログラムは、将来特定のパターンでファイルデータに アクセスする意思を伝えるた"
7052 "めに B<posix_fadvise>()  を使うことができる。 これにより、カーネルが適切な最"
7053 "適化を実行することが可能になる。"
7054
7055 #. type: Plain text
7056 #: build/C/man2/posix_fadvise.2:63
7057 msgid ""
7058 "The I<advice> applies to a (not necessarily existent) region starting at "
7059 "I<offset> and extending for I<len> bytes (or until the end of the file if "
7060 "I<len> is 0) within the file referred to by I<fd>.  The I<advice> is not "
7061 "binding; it merely constitutes an expectation on behalf of the application."
7062 msgstr ""
7063 "I<advice> は I<fd> が参照しているファイルの I<offset> から始まる I<len> バ"
7064 "イ\n"
7065 "トの範囲内 (I<len> が 0 の場合はファイルの終りまで) の (必ずしも存在しない)\n"
7066 "領域に適用される。 I<advice> は義務づけではない。 I<advice> は単にアプリ"
7067 "ケー\n"
7068 "ションのために可能性を構成するだけである。"
7069
7070 #. type: Plain text
7071 #: build/C/man2/posix_fadvise.2:65
7072 msgid "Permissible values for I<advice> include:"
7073 msgstr "I<advice> に許される値には、以下のものが含まれる:"
7074
7075 #. type: TP
7076 #: build/C/man2/posix_fadvise.2:65
7077 #, no-wrap
7078 msgid "B<POSIX_FADV_NORMAL>"
7079 msgstr "B<POSIX_FADV_NORMAL>"
7080
7081 #. type: Plain text
7082 #: build/C/man2/posix_fadvise.2:71
7083 msgid ""
7084 "Indicates that the application has no advice to give about its access "
7085 "pattern for the specified data.  If no advice is given for an open file, "
7086 "this is the default assumption."
7087 msgstr ""
7088 "指定されたデータのアクセスパターンを指示するアドバイスを アプリケーションが何"
7089 "も持っていないことを示す。 オープンされたファイルにアドバイスが指定されない場"
7090 "合、 これがデフォルトで仮定される。"
7091
7092 #. type: TP
7093 #: build/C/man2/posix_fadvise.2:71
7094 #, no-wrap
7095 msgid "B<POSIX_FADV_SEQUENTIAL>"
7096 msgstr "B<POSIX_FADV_SEQUENTIAL>"
7097
7098 #. type: Plain text
7099 #: build/C/man2/posix_fadvise.2:75
7100 msgid ""
7101 "The application expects to access the specified data sequentially (with "
7102 "lower offsets read before higher ones)."
7103 msgstr ""
7104 "アプリケーションは指定されたデータがシーケンシャルに (大きなオフセットの前に"
7105 "小さなオフセットのデータを読むように)  アクセスされることを期待する。"
7106
7107 #. type: TP
7108 #: build/C/man2/posix_fadvise.2:75
7109 #, no-wrap
7110 msgid "B<POSIX_FADV_RANDOM>"
7111 msgstr "B<POSIX_FADV_RANDOM>"
7112
7113 #. type: Plain text
7114 #: build/C/man2/posix_fadvise.2:78
7115 msgid "The specified data will be accessed in random order."
7116 msgstr "指定されたデータがランダムな順番でアクセスされる。"
7117
7118 #. type: TP
7119 #: build/C/man2/posix_fadvise.2:78
7120 #, no-wrap
7121 msgid "B<POSIX_FADV_NOREUSE>"
7122 msgstr "B<POSIX_FADV_NOREUSE>"
7123
7124 #. type: Plain text
7125 #: build/C/man2/posix_fadvise.2:81
7126 msgid "The specified data will be accessed only once."
7127 msgstr "指定されたデータは 1 度しかアクセスされない。"
7128
7129 #. type: TP
7130 #: build/C/man2/posix_fadvise.2:81
7131 #, no-wrap
7132 msgid "B<POSIX_FADV_WILLNEED>"
7133 msgstr "B<POSIX_FADV_WILLNEED>"
7134
7135 #. type: Plain text
7136 #: build/C/man2/posix_fadvise.2:84
7137 msgid "The specified data will be accessed in the near future."
7138 msgstr "指定されたデータは近い将来アクセスされる。"
7139
7140 #. type: TP
7141 #: build/C/man2/posix_fadvise.2:84
7142 #, no-wrap
7143 msgid "B<POSIX_FADV_DONTNEED>"
7144 msgstr "B<POSIX_FADV_DONTNEED>"
7145
7146 #. type: Plain text
7147 #: build/C/man2/posix_fadvise.2:87
7148 msgid "The specified data will not be accessed in the near future."
7149 msgstr "指定されたデータは近い将来アクセスされない。"
7150
7151 #. type: Plain text
7152 #: build/C/man2/posix_fadvise.2:90
7153 msgid "On success, zero is returned.  On error, an error number is returned."
7154 msgstr "成功した場合は 0 が返される。 失敗した場合はエラー番号が返される。"
7155
7156 #. type: Plain text
7157 #: build/C/man2/posix_fadvise.2:94
7158 msgid "The I<fd> argument was not a valid file descriptor."
7159 msgstr "I<fd> 引き数が有効なファイルディスクリプタでない。"
7160
7161 #. type: Plain text
7162 #: build/C/man2/posix_fadvise.2:97
7163 msgid "An invalid value was specified for I<advice>."
7164 msgstr "無効な値が I<advice> に指定された。"
7165
7166 #. type: Plain text
7167 #: build/C/man2/posix_fadvise.2:104
7168 msgid ""
7169 "The specified file descriptor refers to a pipe or FIFO.  (Linux actually "
7170 "returns B<EINVAL> in this case.)"
7171 msgstr ""
7172 "指定されたファイルディスクリプタがパイプまたは FIFO を参照している (この場"
7173 "合、Linux は実際には B<EINVAL> を返す)。"
7174
7175 #.  of fadvise64_64()
7176 #. type: Plain text
7177 #: build/C/man2/posix_fadvise.2:112
7178 msgid ""
7179 "Kernel support first appeared in Linux 2.5.60; the underlying system call is "
7180 "called B<fadvise64>().  Library support has been provided since glibc "
7181 "version 2.2, via the wrapper function B<posix_fadvise>()."
7182 msgstr ""
7183 "カーネルによるサポートは Linux 2.5.60 で最初に登場し、\n"
7184 "対応するシステムコールは B<fadvise64>() という名前である。\n"
7185 "ライブラリによるサポートは glibc バージョン 2.2 以降で提供されており、\n"
7186 "ラッパー関数は B<posix_fadvise>() という名前である。"
7187
7188 #. type: Plain text
7189 #: build/C/man2/posix_fadvise.2:121
7190 msgid ""
7191 "POSIX.1-2001.  Note that the type of the I<len> argument was changed from "
7192 "I<size_t> to I<off_t> in POSIX.1-2003 TC1."
7193 msgstr ""
7194 "POSIX.1-2001.  I<len> 引き数の型が POSIX.1-2003 TC1 において I<size_t> から "
7195 "I<off_t> に変更された点に注意すること。"
7196
7197 #. type: Plain text
7198 #: build/C/man2/posix_fadvise.2:127
7199 msgid ""
7200 "Under Linux, B<POSIX_FADV_NORMAL> sets the readahead window to the default "
7201 "size for the backing device; B<POSIX_FADV_SEQUENTIAL> doubles this size, and "
7202 "B<POSIX_FADV_RANDOM> disables file readahead entirely.  These changes affect "
7203 "the entire file, not just the specified region (but other open file handles "
7204 "to the same file are unaffected)."
7205 msgstr ""
7206 "Linux では、B<POSIX_FADV_NORMAL> はバッキングデバイスの デフォルトサイズに先"
7207 "読み (readahead) ウインドウを設定する。 B<POSIX_FADV_SEQUENTIAL> はこのサイズ"
7208 "を 2 倍し、 B<POSIX_FADV_RANDOM> は先読みを全く無効にする。 これらの変更は"
7209 "ファイル全体に影響し、指定された領域のみに影響するわけではない (しかし同じ"
7210 "ファイルに対する他のオープンファイルハンドルは影響を受けない)。"
7211
7212 #. type: Plain text
7213 #: build/C/man2/posix_fadvise.2:134
7214 msgid ""
7215 "B<POSIX_FADV_WILLNEED> initiates a nonblocking read of the specified region "
7216 "into the page cache.  The amount of data read may be decreased by the kernel "
7217 "depending on virtual memory load.  (A few megabytes will usually be fully "
7218 "satisfied, and more is rarely useful.)"
7219 msgstr ""
7220 "B<POSIX_FADV_WILLNEED> は、 ページキャッシュに指定領域のブロックされない読み"
7221 "込みを開始する。 読み込まれるデータの総量は、 仮想メモリの負荷に依ってカーネ"
7222 "ルが減らすかもしれない (数メガバイトであれば通常は全く十分であり、 それより多"
7223 "くてもめったに役に立たない)。"
7224
7225 #. type: Plain text
7226 #: build/C/man2/posix_fadvise.2:138
7227 msgid ""
7228 "In kernels before 2.6.18, B<POSIX_FADV_NOREUSE> had the same semantics as "
7229 "B<POSIX_FADV_WILLNEED>.  This was probably a bug; since kernel 2.6.18, this "
7230 "flag is a no-op."
7231 msgstr ""
7232 "2.6.18 より前のカーネルでは、B<POSIX_FADV_NOREUSE> は B<POSIX_FADV_WILLNEED> "
7233 "と同じ意味であった。 これは多分バグであった。 カーネル 2.6.18 以降では、この"
7234 "フラグは何も行わない。"
7235
7236 #. type: Plain text
7237 #: build/C/man2/posix_fadvise.2:146
7238 msgid ""
7239 "B<POSIX_FADV_DONTNEED> attempts to free cached pages associated with the "
7240 "specified region.  This is useful, for example, while streaming large "
7241 "files.  A program may periodically request the kernel to free cached data "
7242 "that has already been used, so that more useful cached pages are not "
7243 "discarded instead."
7244 msgstr ""
7245 "B<POSIX_FADV_DONTNEED> は指定された領域に関連付けられた キャッシュページを解"
7246 "放しようとする。 例えば、これは大きなファイルをストリーミングするときに役立"
7247 "つ。 プログラムは、使用済みのキャッシュされたデータを解放するように、 定期的"
7248 "にカーネルに要求するかもしれない。 そうすることにより、さらに有効なキャッシュ"
7249 "されたページが、 代わりに破棄されることはない。"
7250
7251 #. type: Plain text
7252 #: build/C/man2/posix_fadvise.2:154
7253 msgid ""
7254 "Pages that have not yet been written out will be unaffected, so if the "
7255 "application wishes to guarantee that pages will be released, it should call "
7256 "B<fsync>(2)  or B<fdatasync>(2)  first."
7257 msgstr ""
7258 "まだ書き出されていないページは影響を受けないので、 そのページの解放が保証され"
7259 "ることをアプリケーションが望んでいるなら、 最初に B<fsync>(2)  または "
7260 "B<fdatasync>(2)  を呼ぶべきである。"
7261
7262 #. type: SS
7263 #: build/C/man2/posix_fadvise.2:154
7264 #, no-wrap
7265 msgid "arm_fadvise()"
7266 msgstr "arm_fadvise()"
7267
7268 #. type: Plain text
7269 #: build/C/man2/posix_fadvise.2:166
7270 msgid ""
7271 "The ARM architecture needs 64-bit arguments to be aligned in a suitable pair "
7272 "of registers.  On this architecture, the call signature of B<posix_fadvise>"
7273 "()  is flawed, since it forces a register to be wasted as padding between "
7274 "the I<fd> and I<len> arguments.  Therefore, since Linux 2.6.14, ARM defines "
7275 "a different system call that orders the arguments suitably:"
7276 msgstr ""
7277 "ARM アーキテクチャでは、64 ビットの引き数は適切なレジスタの組に割り当て\n"
7278 "る必要がある。このアーキテクチャでは、B<posix_fadvise>() の呼び出し方に\n"
7279 "は欠陥があり、それはこのシステムコールでは引き数 I<fd> と I<len> の間の\n"
7280 "パディング (詰めもの) でレジスタが一つ消費されてしまうというものである。\n"
7281 "そのため、Linux 2.6.14 以降では、ARM では引き数が適切な順序になった別の\n"
7282 "システムコールが定義されている。"
7283
7284 #. type: Plain text
7285 #: build/C/man2/posix_fadvise.2:171
7286 #, no-wrap
7287 msgid ""
7288 "B<long arm_fadvise64_64(int >I<fd>B<, int >I<advice>B<,>\n"
7289 "B<                      loff_t >I<offset>B<, loff_t >I<len>B<);>\n"
7290 msgstr ""
7291 "B<long arm_fadvise64_64(int >I<fd>B<, int >I<advice>B<,>\n"
7292 "B<                      loff_t >I<offset>B<, loff_t >I<len>B<);>\n"
7293
7294 #.  No ARM support in glibc.
7295 #. type: Plain text
7296 #: build/C/man2/posix_fadvise.2:178
7297 msgid ""
7298 "The behavior of this system call is otherwise exactly the same as "
7299 "B<posix_fadvise>().  No library support is provided for this system call in "
7300 "glibc."
7301 msgstr ""
7302 "上記の点以外は、このシステムコールの動作は B<posix_fadvise>() と全く\n"
7303 "同じである。このシステムコールに対するライブラリによるサポートは glibc\n"
7304 "では提供されていない。"
7305
7306 #. type: Plain text
7307 #: build/C/man2/posix_fadvise.2:183
7308 msgid ""
7309 "In kernels before 2.6.6, if I<len> was specified as 0, then this was "
7310 "interpreted literally as \"zero bytes\", rather than as meaning \"all bytes "
7311 "through to the end of the file\"."
7312 msgstr ""
7313 "2.6.6 より前のカーネルでは、 I<len> に 0 が指定された場合、 「ファイルの終り"
7314 "までの全てのバイト」という意味ではなく、 文字通り「0 バイト」として解釈されて"
7315 "いた。"
7316
7317 #.  FIXME . Write a posix_fadvise(3) page.
7318 #. type: Plain text
7319 #: build/C/man2/posix_fadvise.2:189
7320 msgid ""
7321 "B<readahead>(2), B<sync_file_range>(2), B<posix_fallocate>(3), "
7322 "B<posix_madvise>(3)"
7323 msgstr ""
7324 "B<readahead>(2), B<sync_file_range>(2), B<posix_fallocate>(3),\n"
7325 "B<posix_madvise>(3)"
7326
7327 #. type: TH
7328 #: build/C/man3/posix_fallocate.3:25
7329 #, no-wrap
7330 msgid "POSIX_FALLOCATE"
7331 msgstr "POSIX_FALLOCATE"
7332
7333 #. type: Plain text
7334 #: build/C/man3/posix_fallocate.3:28
7335 msgid "posix_fallocate - allocate file space"
7336 msgstr "posix_fallocate - ファイルのスペースを確保する"
7337
7338 #. type: Plain text
7339 #: build/C/man3/posix_fallocate.3:33
7340 #, no-wrap
7341 msgid "B<int posix_fallocate(int >I<fd>B<, off_t >I<offset>B<, off_t >I<len>B<);>\n"
7342 msgstr "B<int posix_fallocate(int >I<fd>B<, off_t >I<offset>B<, off_t >I<len>B<);>\n"
7343
7344 #. type: Plain text
7345 #: build/C/man3/posix_fallocate.3:42
7346 msgid "B<posix_fallocate>():"
7347 msgstr "B<posix_fallocate>():"
7348
7349 #. type: Plain text
7350 #: build/C/man3/posix_fallocate.3:61
7351 msgid ""
7352 "The function B<posix_fallocate>()  ensures that disk space is allocated for "
7353 "the file referred to by the descriptor I<fd> for the bytes in the range "
7354 "starting at I<offset> and continuing for I<len> bytes.  After a successful "
7355 "call to B<posix_fallocate>(), subsequent writes to bytes in the specified "
7356 "range are guaranteed not to fail because of lack of disk space."
7357 msgstr ""
7358 "関数 B<posix_fallocate>()  は、ディスクリプタ I<fd> で参照されるファイルに対"
7359 "して、ディスクスペースを確実に確保する。 ディスクスペースは I<offset> から始"
7360 "まる I<len> バイトの範囲のバイトである。 B<posix_fallocate>()  の呼び出しが成"
7361 "功した後、指定された範囲のバイトに対する書き込みは、 ディスクスペースの不足で"
7362 "失敗しないことが保証される。"
7363
7364 #. type: Plain text
7365 #: build/C/man3/posix_fallocate.3:66
7366 msgid ""
7367 "If the size of the file is less than I<offset>+I<len>, then the file is "
7368 "increased to this size; otherwise the file size is left unchanged."
7369 msgstr ""
7370 "ファイルのサイズが I<offset>+I<len> より小さい場合、ファイルはこのサイズにな"
7371 "るように拡大される。 それ以外の場合、ファイルサイズは変わらない。"
7372
7373 #. type: Plain text
7374 #: build/C/man3/posix_fallocate.3:72
7375 msgid ""
7376 "B<posix_fallocate>()  returns zero on success, or an error number on "
7377 "failure.  Note that I<errno> is not set."
7378 msgstr ""
7379 "B<posix_fallocate>()  は成功した場合、0 を返す。 失敗した場合、エラー番号を返"
7380 "す。 I<errno> が設定されない点に注意すること。"
7381
7382 #. type: Plain text
7383 #: build/C/man3/posix_fallocate.3:81
7384 msgid "I<offset+len> exceeds the maximum file size."
7385 msgstr "I<offset+len> が最大ファイルサイズを超えている。"
7386
7387 #. type: Plain text
7388 #: build/C/man3/posix_fallocate.3:91
7389 msgid "I<fd> does not refer to a regular file."
7390 msgstr "I<fd> が通常のファイルとして参照されていない。"
7391
7392 #. type: Plain text
7393 #: build/C/man3/posix_fallocate.3:100
7394 msgid "I<fd> refers to a pipe."
7395 msgstr "I<fd> がパイプを参照している。"
7396
7397 #. type: Plain text
7398 #: build/C/man3/posix_fallocate.3:103
7399 msgid "B<posix_fallocate>()  is available since glibc 2.1.94."
7400 msgstr "B<posix_fallocate>()  は glibc 2.1.94 以降で利用可能である。"
7401
7402 #. type: Plain text
7403 #: build/C/man3/posix_fallocate.3:128
7404 msgid ""
7405 "POSIX.1-2008 says that an implementation I<shall> give the B<EINVAL> error "
7406 "if I<len> was 0, or I<offset> was less than 0.  POSIX.1-2001 says that an "
7407 "implementation I<shall> give the B<EINVAL> error if I<len> is less than 0, "
7408 "or I<offset> was less than 0, and I<may> give the error if I<len> equals "
7409 "zero."
7410 msgstr ""
7411 "POSIX.1-2008 では、 I<len> が 0 の場合、もしくは I<offset> が 0 未満の場合、 "
7412 "B<EINVAL> エラーを返すものとされている。 POSIX.1-2001 では、 I<len> が 0 未満"
7413 "の場合、もしくは I<offset> が 0 未満の場合、 B<EINVAL> エラーを返すものとされ"
7414 "ている。また、 I<len> が 0 の場合、 B<EINVAL> エラーを返してもよいとされてい"
7415 "る。"
7416
7417 #. type: Plain text
7418 #: build/C/man3/posix_fallocate.3:133
7419 #, fuzzy
7420 #| msgid "B<fallocate>(2), B<lseek>(2), B<posix_fadvise>(2)"
7421 msgid "B<fallocate>(1), B<fallocate>(2), B<lseek>(2), B<posix_fadvise>(2)"
7422 msgstr "B<fallocate>(2), B<lseek>(2), B<posix_fadvise>(2)"
7423
7424 #. type: TH
7425 #: build/C/man3/posix_memalign.3:29
7426 #, no-wrap
7427 msgid "POSIX_MEMALIGN"
7428 msgstr "POSIX_MEMALIGN"
7429
7430 #. type: TH
7431 #: build/C/man3/posix_memalign.3:29
7432 #, no-wrap
7433 msgid "2012-03-23"
7434 msgstr "2012-03-23"
7435
7436 #. type: Plain text
7437 #: build/C/man3/posix_memalign.3:32
7438 #, fuzzy
7439 #| msgid ""
7440 #| "posix_memalign, aligned_alloc, memalign, valloc, pvalloc - Allocate "
7441 #| "aligned memory"
7442 msgid ""
7443 "posix_memalign, aligned_alloc, memalign, valloc, pvalloc - allocate aligned "
7444 "memory"
7445 msgstr ""
7446 "posix_memalign, aligned_alloc, memalign, valloc, pvalloc - アラインメント\n"
7447 "されたメモリの割り当てを行う"
7448
7449 #. type: Plain text
7450 #: build/C/man3/posix_memalign.3:39
7451 #, no-wrap
7452 msgid ""
7453 "B<int posix_memalign(void **>I<memptr>B<, size_t >I<alignment>B<, size_t >I<size>B<);>\n"
7454 "B<void *aligned_alloc(size_t >I<alignment>B<, size_t >I<size>B<);>\n"
7455 "B<void *valloc(size_t >I<size>B<);>\n"
7456 msgstr ""
7457 "B<int posix_memalign(void **>I<memptr>B<, size_t >I<alignment>B<, size_t >I<size>B<);>\n"
7458 "B<void *aligned_alloc(size_t >I<alignment>B<, size_t >I<size>B<);>\n"
7459 "B<void *valloc(size_t >I<size>B<);>\n"
7460
7461 #. type: Plain text
7462 #: build/C/man3/posix_memalign.3:44
7463 #, no-wrap
7464 msgid ""
7465 "B<void *memalign(size_t >I<alignment>B<, size_t >I<size>B<);>\n"
7466 "B<void *pvalloc(size_t >I<size>B<);>\n"
7467 msgstr ""
7468 "B<void *memalign(size_t >I<alignment>B<, size_t >I<size>B<);>\n"
7469 "B<void *pvalloc(size_t >I<size>B<);>\n"
7470
7471 #. type: Plain text
7472 #: build/C/man3/posix_memalign.3:54
7473 msgid ""
7474 "B<posix_memalign>(): _POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ "
7475 "E<gt>=\\ 600"
7476 msgstr ""
7477 "B<posix_memalign>(): _POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ "
7478 "E<gt>=\\ 600"
7479
7480 #. type: Plain text
7481 #: build/C/man3/posix_memalign.3:57
7482 msgid "B<aligned_alloc>(): _ISOC11_SOURCE"
7483 msgstr "B<aligned_alloc>(): _ISOC11_SOURCE"
7484
7485 #. type: Plain text
7486 #: build/C/man3/posix_memalign.3:59
7487 msgid "B<valloc>():"
7488 msgstr "B<valloc>():"
7489
7490 #. type: TP
7491 #: build/C/man3/posix_memalign.3:62
7492 #, no-wrap
7493 msgid "Since glibc 2.12:"
7494 msgstr "glibc 2.12 以降:"
7495
7496 #. type: Plain text
7497 #: build/C/man3/posix_memalign.3:69
7498 #, no-wrap
7499 msgid ""
7500 "_BSD_SOURCE ||\n"
7501 "    (_XOPEN_SOURCE\\ E<gt>=\\ 500 ||\n"
7502 "        _XOPEN_SOURCE\\ &&\\ _XOPEN_SOURCE_EXTENDED) &&\n"
7503 "    !(_POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ E<gt>=\\ 600)\n"
7504 msgstr ""
7505 "_BSD_SOURCE ||\n"
7506 "    (_XOPEN_SOURCE\\ E<gt>=\\ 500 ||\n"
7507 "        _XOPEN_SOURCE\\ &&\\ _XOPEN_SOURCE_EXTENDED) &&\n"
7508 "    !(_POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ E<gt>=\\ 600)\n"
7509
7510 #. type: TP
7511 #: build/C/man3/posix_memalign.3:71
7512 #, no-wrap
7513 msgid "Before glibc 2.12:"
7514 msgstr "glibc 2.12 より前:"
7515
7516 #. type: Plain text
7517 #: build/C/man3/posix_memalign.3:75
7518 msgid ""
7519 "_BSD_SOURCE || _XOPEN_SOURCE\\ E<gt>=\\ 500 || _XOPEN_SOURCE\\ &&\\ "
7520 "_XOPEN_SOURCE_EXTENDED"
7521 msgstr ""
7522 "_BSD_SOURCE || _XOPEN_SOURCE\\ E<gt>=\\ 500 || _XOPEN_SOURCE\\ &&\\ "
7523 "_XOPEN_SOURCE_EXTENDED"
7524
7525 #. type: Plain text
7526 #: build/C/man3/posix_memalign.3:82
7527 msgid ""
7528 "(The (nonstandard) header file I<E<lt>malloc.hE<gt>> also exposes the "
7529 "declaration of B<valloc>(); no feature test macros are required.)"
7530 msgstr ""
7531 "((非標準の) ヘッダファイル I<E<lt>malloc.hE<gt>> も\n"
7532 "B<valloc>() の宣言も公開する。機能検査マクロは不要である。"
7533
7534 #.  glibc does this:
7535 #. type: Plain text
7536 #: build/C/man3/posix_memalign.3:103
7537 msgid ""
7538 "The function B<posix_memalign>()  allocates I<size> bytes and places the "
7539 "address of the allocated memory in I<*memptr>.  The address of the allocated "
7540 "memory will be a multiple of I<alignment>, which must be a power of two and "
7541 "a multiple of I<sizeof(void *)>.  If I<size> is 0, then B<posix_memalign>()  "
7542 "returns either NULL, or a unique pointer value that can later be "
7543 "successfully passed to B<free>(3)."
7544 msgstr ""
7545 "関数 B<posix_memalign>()  は、 I<size> バイトのメモリを割り当て、割り当てられ"
7546 "たメモリのアドレスを I<*memptr> に設定する。 割り当てられたメモリのアドレス"
7547 "は I<alignment> の倍数になっているはずである。 I<alignment> は 2 のべき乗で、"
7548 "かつ I<sizeof(void *)> の倍数でなければならない。 I<size> が 0 の場合、 "
7549 "B<posix_memalign>()  は NULL か一意なポインタ値を返す。 このポインタ値は、後"
7550 "で B<free>(3)  に問題なく渡すことができる。"
7551
7552 #.  The behavior of memalign() for size==0 is as for posix_memalign()
7553 #.  but no standards govern this.
7554 #. type: Plain text
7555 #: build/C/man3/posix_memalign.3:114
7556 msgid ""
7557 "The obsolete function B<memalign>()  allocates I<size> bytes and returns a "
7558 "pointer to the allocated memory.  The memory address will be a multiple of "
7559 "I<alignment>, which must be a power of two."
7560 msgstr ""
7561 "廃止された関数である B<memalign>() は、 I<size> バイトのメモリを割り当て、\n"
7562 "割り当てられたメモリへのポインタを返す。 メモリのアドレスは I<alignment> \n"
7563 "の倍数になっているはずである。 I<alignment> は 2 のべき乗でなければならない。"
7564
7565 #. type: Plain text
7566 #: build/C/man3/posix_memalign.3:123
7567 msgid ""
7568 "The function B<aligned_alloc>()  is the same as B<memalign>(), except for "
7569 "the added restriction that I<size> should be a multiple of I<alignment>."
7570 msgstr ""
7571 "関数 B<aligned_alloc>() は B<memalign>() と同じだが、I<size> が "
7572 "I<alignment>\n"
7573 "の倍数でなければならないという追加の制限がある点が異なる。"
7574
7575 #. type: Plain text
7576 #: build/C/man3/posix_memalign.3:132
7577 msgid ""
7578 "The obsolete function B<valloc>()  allocates I<size> bytes and returns a "
7579 "pointer to the allocated memory.  The memory address will be a multiple of "
7580 "the page size.  It is equivalent to I<memalign(sysconf(_SC_PAGESIZE),size)>."
7581 msgstr ""
7582 "廃止された関数である B<valloc>()  は I<size> バイトのメモリを割り当て、割り当"
7583 "てられたメモリへのポインタを返す。 メモリのアドレスはページサイズの倍数になっ"
7584 "ているはずである。 これは I<memalign(sysconf(_SC_PAGESIZE),size)> と等価であ"
7585 "る。"
7586
7587 #. type: Plain text
7588 #: build/C/man3/posix_memalign.3:139
7589 msgid ""
7590 "The obsolete function B<pvalloc>()  is similar to B<valloc>(), but rounds "
7591 "the size of the allocation up to the next multiple of the system page size."
7592 msgstr ""
7593 "廃止された関数 B<pvalloc>() は B<valloc>() と同様だが、\n"
7594 "割り当てられるサイズがシステムのページサイズの倍数に切り上げられる。"
7595
7596 #. type: Plain text
7597 #: build/C/man3/posix_memalign.3:141
7598 msgid "For all of these functions, the memory is not zeroed."
7599 msgstr "これらの関数はいずれもメモリのゼロクリアを行わない。"
7600
7601 #. type: Plain text
7602 #: build/C/man3/posix_memalign.3:148
7603 msgid ""
7604 "B<aligned_alloc>(), B<memalign>(), B<valloc>(), and B<pvalloc>()  return a "
7605 "pointer to the allocated memory, or NULL if the request fails."
7606 msgstr ""
7607 "B<aligned_alloc>(), B<memalign>(), B<valloc>(), B<pvalloc>() は割り当てられ"
7608 "た\n"
7609 "メモリへのポインタを返す。 割り当てに失敗した場合は NULL を返す。"
7610
7611 #. type: Plain text
7612 #: build/C/man3/posix_memalign.3:155
7613 msgid ""
7614 "B<posix_memalign>()  returns zero on success, or one of the error values "
7615 "listed in the next section on failure.  Note that I<errno> is not set."
7616 msgstr ""
7617 "B<posix_memalign>()  は成功した場合は 0 を返し、 失敗した場合は次のセクション"
7618 "に記載されたエラー値のいずれかを返す。 I<errno> はセットされないことに注意す"
7619 "ること。"
7620
7621 #. type: Plain text
7622 #: build/C/man3/posix_memalign.3:162
7623 msgid ""
7624 "The I<alignment> argument was not a power of two, or was not a multiple of "
7625 "I<sizeof(void *)>."
7626 msgstr ""
7627 "I<alignment> 引き数が 2 のべき乗でなかったか、 I<sizeof(void *)> の倍数でな"
7628 "かった。"
7629
7630 #. type: Plain text
7631 #: build/C/man3/posix_memalign.3:165
7632 msgid "There was insufficient memory to fulfill the allocation request."
7633 msgstr "割り当て要求を満たすのに十分なメモリがなかった。"
7634
7635 #. type: Plain text
7636 #: build/C/man3/posix_memalign.3:172
7637 msgid ""
7638 "The functions B<memalign>(), B<valloc>(), and B<pvalloc>()  have been "
7639 "available in all Linux libc libraries."
7640 msgstr ""
7641 "関数 B<memalign>(), B<valloc>(), B<pvalloc>() は\n"
7642 "すべての Linux libc ライブラリで使用可能である。"
7643
7644 #. type: Plain text
7645 #: build/C/man3/posix_memalign.3:176
7646 msgid "The function B<aligned_alloc>()  was added to glibc in version 2.16."
7647 msgstr "関数 B<aligned_alloc>() は glibc バージョン 2.16 で追加された。"
7648
7649 #. type: Plain text
7650 #: build/C/man3/posix_memalign.3:180
7651 msgid "The function B<posix_memalign>()  is available since glibc 2.1.91."
7652 msgstr "関数 B<posix_fallocate>() は glibc 2.1.91 以降で利用可能である。"
7653
7654 #. type: Plain text
7655 #: build/C/man3/posix_memalign.3:187
7656 msgid ""
7657 "The function B<valloc>()  appeared in 3.0BSD.  It is documented as being "
7658 "obsolete in 4.3BSD, and as legacy in SUSv2.  It does not appear in "
7659 "POSIX.1-2001."
7660 msgstr ""
7661 "関数 B<valloc>() は 3.0BSD で登場した。4.3BSD では廃止されたと記載されてお"
7662 "り、\n"
7663 "SUSv2 では過去の名残だと記載されている。 POSIX.1-2001 には存在しない。"
7664
7665 #. type: Plain text
7666 #: build/C/man3/posix_memalign.3:191
7667 msgid "The function B<pvalloc>()  is a GNU extension."
7668 msgstr "関数 B<pvalloc>() は GNU による拡張である。"
7669
7670 #. type: Plain text
7671 #: build/C/man3/posix_memalign.3:195
7672 msgid "The function B<memalign>()  appears in SunOS 4.1.3 but not in 4.4BSD."
7673 msgstr "関数 B<memalign>() は SunOS 4.1.3 で登場したが、4.4BSD にはない。"
7674
7675 #. type: Plain text
7676 #: build/C/man3/posix_memalign.3:199
7677 msgid "The function B<posix_memalign>()  comes from POSIX.1d."
7678 msgstr "関数 B<posix_memalign>() は POSIX.1d に由来する。"
7679
7680 #. type: Plain text
7681 #: build/C/man3/posix_memalign.3:204
7682 msgid "The function B<aligned_alloc>()  is specified in the C11 standard."
7683 msgstr "関数 I<aligned_alloc>() は C11 標準で規定されている。"
7684
7685 #. type: SS
7686 #: build/C/man3/posix_memalign.3:204
7687 #, no-wrap
7688 msgid "Headers"
7689 msgstr "ヘッダ"
7690
7691 #. type: Plain text
7692 #: build/C/man3/posix_memalign.3:208
7693 msgid ""
7694 "Everybody agrees that B<posix_memalign>()  is declared in I<E<lt>stdlib."
7695 "hE<gt>>."
7696 msgstr ""
7697 "B<posix_memalign>()  の宣言を I<E<lt>stdlib.hE<gt>> で行うことに関しては、 皆"
7698 "の意見が一致している。"
7699
7700 #. type: Plain text
7701 #: build/C/man3/posix_memalign.3:212
7702 msgid ""
7703 "On some systems B<memalign>()  is declared in I<E<lt>stdlib.hE<gt>> instead "
7704 "of I<E<lt>malloc.hE<gt>>."
7705 msgstr ""
7706 "いくつかのシステムでは、 B<memalign>()  は I<E<lt>malloc.hE<gt>> ではなく "
7707 "I<E<lt>stdlib.hE<gt>> で宣言されている。"
7708
7709 #. type: Plain text
7710 #: build/C/man3/posix_memalign.3:219
7711 msgid ""
7712 "According to SUSv2, B<valloc>()  is declared in I<E<lt>stdlib.hE<gt>>.  "
7713 "Libc4,5 and glibc declare it in I<E<lt>malloc.hE<gt>>, and also in "
7714 "I<E<lt>stdlib.hE<gt>> if suitable feature test macros are defined (see "
7715 "above)."
7716 msgstr ""
7717 "SUSv2 によると、 B<valloc>() は I<E<lt>stdlib.hE<gt>> で宣言される。 "
7718 "libc4,5\n"
7719 "や glibc では I<E<lt>malloc.hE<gt>> で宣言されており、 さらに適切な機能検査\n"
7720 "マクロが定義された場合には I<E<lt>stdlib.hE<gt>> でも宣言される(上記を参照)。"
7721
7722 #. type: Plain text
7723 #: build/C/man3/posix_memalign.3:228
7724 msgid ""
7725 "On many systems there are alignment restrictions, for example, on buffers "
7726 "used for direct block device I/O.  POSIX specifies the I<pathconf(path,"
7727 "_PC_REC_XFER_ALIGN)> call that tells what alignment is needed.  Now one can "
7728 "use B<posix_memalign>()  to satisfy this requirement."
7729 msgstr ""
7730 "多くのシステムでは、アラインメントに関して制限がある。例えば、 ブロックデバイ"
7731 "スに対するダイレクト I/O に使用するバッファには アラインメントに関する制限が"
7732 "ある。 POSIX では、どんなアラインメントが必要かを知るために I<pathconf(path,"
7733 "_PC_REC_XFER_ALIGN)> コールを規定している。ここで B<posix_memalign>()  を使う"
7734 "と、この必要条件を満たすことができる。"
7735
7736 #. type: Plain text
7737 #: build/C/man3/posix_memalign.3:237
7738 msgid ""
7739 "B<posix_memalign>()  verifies that I<alignment> matches the requirements "
7740 "detailed above.  B<memalign>()  may not check that the I<alignment> argument "
7741 "is correct."
7742 msgstr ""
7743 "B<posix_memalign>() は I<alignment> が上で詳細に述べた必要条件を満たすか\n"
7744 "どうかを確かめる。 B<memalign>() は I<alignment> 引き数が正しいかどうかの\n"
7745 "確認を行わないかもしれない。"
7746
7747 #.  Other systems allow passing the result of
7748 #.  .IR valloc ()
7749 #.  to
7750 #.  .IR free (3),
7751 #.  but not to
7752 #.  .IR realloc (3).
7753 #. type: Plain text
7754 #: build/C/man3/posix_memalign.3:265
7755 msgid ""
7756 "POSIX requires that memory obtained from B<posix_memalign>()  can be freed "
7757 "using B<free>(3).  Some systems provide no way to reclaim memory allocated "
7758 "with B<memalign>()  or B<valloc>()  (because one can only pass to B<free>"
7759 "(3)  a pointer gotten from B<malloc>(3), while, for example, B<memalign>()  "
7760 "would call B<malloc>(3)  and then align the obtained value).  The glibc "
7761 "implementation allows memory obtained from any of these functions to be "
7762 "reclaimed with B<free>(3)."
7763 msgstr ""
7764 "POSIX では B<posix_memalign>() によって獲得したメモリは B<free>(3) を\n"
7765 "使って解放することができる必要がある。 いくつかのシステムでは\n"
7766 "B<memalign>() やB<valloc>() で割り当てられたメモリを再利用する手段が\n"
7767 "提供されていない(なぜなら B<free>(3) に渡すことができるのは\n"
7768 "B<malloc>(3) から受け取ったポインタだけだが、例えば B<memalign>() は\n"
7769 "B<malloc>(3) を呼び出し、得た値をアラインメントしてしまうからである)。\n"
7770 "glibc の実装では、 ここに述べた関数のいずれで獲得したメモリも\n"
7771 "B<free>(3) で再利用することができる。"
7772
7773 #. type: Plain text
7774 #: build/C/man3/posix_memalign.3:270
7775 msgid ""
7776 "The glibc B<malloc>(3)  always returns 8-byte aligned memory addresses, so "
7777 "these functions are only needed if you require larger alignment values."
7778 msgstr ""
7779 "glibc の B<malloc>(3) は常に 8 バイトにアラインメントされたメモリアドレスを\n"
7780 "返すので、ここで述べた関数が必要になるのは 8 バイトよりも大きなアラインメン"
7781 "ト\n"
7782 "が必要な場合だけである。"
7783
7784 #. type: Plain text
7785 #: build/C/man3/posix_memalign.3:275
7786 msgid "B<brk>(2), B<getpagesize>(2), B<free>(3), B<malloc>(3)"
7787 msgstr "B<brk>(2), B<getpagesize>(2), B<free>(3), B<malloc>(3)"
7788
7789 #. type: TH
7790 #: build/C/man2/readahead.2:28
7791 #, no-wrap
7792 msgid "READAHEAD"
7793 msgstr "READAHEAD"
7794
7795 #. type: TH
7796 #: build/C/man2/readahead.2:28 build/C/man7/shm_overview.7:27
7797 #, no-wrap
7798 msgid "2010-09-10"
7799 msgstr "2010-09-10"
7800
7801 #. type: Plain text
7802 #: build/C/man2/readahead.2:31
7803 msgid "readahead - perform file readahead into page cache"
7804 msgstr "readahead - 前もってファイルをページ・キャッシュに読み込む"
7805
7806 #. type: Plain text
7807 #: build/C/man2/readahead.2:37
7808 #, no-wrap
7809 msgid "B<ssize_t readahead(int >I<fd>B<, off64_t >I<offset>B<, size_t >I<count>B<);>\n"
7810 msgstr "B<ssize_t readahead(int >I<fd>B<, off64_t >I<offset>B<, size_t >I<count>B<);>\n"
7811
7812 #. type: Plain text
7813 #: build/C/man2/readahead.2:65
7814 msgid ""
7815 "B<readahead>()  populates the page cache with data from a file so that "
7816 "subsequent reads from that file will not block on disk I/O.  The I<fd> "
7817 "argument is a file descriptor identifying the file which is to be read.  The "
7818 "I<offset> argument specifies the starting point from which data is to be "
7819 "read and I<count> specifies the number of bytes to be read.  I/O is "
7820 "performed in whole pages, so that I<offset> is effectively rounded down to a "
7821 "page boundary and bytes are read up to the next page boundary greater than "
7822 "or equal to I<(offset+count)>.  B<readahead>()  does not read beyond the end "
7823 "of the file.  B<readahead>()  blocks until the specified data has been "
7824 "read.  The current file offset of the open file referred to by I<fd> is left "
7825 "unchanged."
7826 msgstr ""
7827 "B<readahead>()  は、この後の同じファイルからのデータ読み込み時にディスク I/O "
7828 "で 動作が停止 (block) しないように、前もってファイルの内容を ページ・キャッ"
7829 "シュに読み込む。 I<fd> 引き数は読み込みを行うファイルを識別するファイル・ディ"
7830 "スクリプタである。 I<offset> 引き数はデータの読み込み開始位置を指定し、 "
7831 "I<count> は読み込むデータのバイト数を指定する。 ディスク I/O はページ単位で実"
7832 "行されるので、 実際には I<offset> はページ境界に切り下げられ、読み込みバイト"
7833 "数は I<(offset+count)> より小さくない次のページ境界まで切り上げられる。 "
7834 "B<readahead>()  はファイルの末尾を越えた範囲まで読み出しを行うことはない。ま"
7835 "た、 B<readahead>()  は指定したデータの読み込みが終わるまで停止 (block) す"
7836 "る。 I<fd> で参照されたオープン済のファイルのファイルオフセットの現在値は 変"
7837 "更されない。"
7838
7839 #. type: Plain text
7840 #: build/C/man2/readahead.2:71
7841 msgid ""
7842 "On success, B<readahead>()  returns 0; on failure, -1 is returned, with "
7843 "I<errno> set to indicate the cause of the error."
7844 msgstr ""
7845 "B<readahead>()  は成功すると 0 を返す。失敗した場合 -1 を返し、 I<errno> にエ"
7846 "ラーの原因を示す値を設定する。"
7847
7848 #. type: Plain text
7849 #: build/C/man2/readahead.2:76
7850 msgid "I<fd> is not a valid file descriptor or is not open for reading."
7851 msgstr ""
7852 "I<fd> が有効なファイル・ディスクリプタでない、または 読み込み用にオープンされ"
7853 "ていない。"
7854
7855 #. type: Plain text
7856 #: build/C/man2/readahead.2:82
7857 msgid ""
7858 "I<fd> does not refer to a file type to which B<readahead>()  can be applied."
7859 msgstr ""
7860 "I<fd> が参照しているファイルが、 B<readahead>()  を行うことができないタイプの"
7861 "ファイルであった。"
7862
7863 #. type: Plain text
7864 #: build/C/man2/readahead.2:87
7865 msgid ""
7866 "The B<readahead>()  system call appeared in Linux 2.4.13; glibc support has "
7867 "been provided since version 2.3."
7868 msgstr ""
7869 "B<readahead>()  システムコールは Linux 2.4.13 で登場した。 glibc でのサポート"
7870 "は glibc バージョン 2.3 以降で行われている。"
7871
7872 #. type: Plain text
7873 #: build/C/man2/readahead.2:92
7874 msgid ""
7875 "The B<readahead>()  system call is Linux-specific, and its use should be "
7876 "avoided in portable applications."
7877 msgstr ""
7878 "B<readahead>()  システムコールは Linux 固有であり、移植を考慮したプログラムで"
7879 "は 使用を避けるべきである。"
7880
7881 #. type: Plain text
7882 #: build/C/man2/readahead.2:98
7883 msgid "B<lseek>(2), B<madvise>(2), B<mmap>(2), B<posix_fadvise>(2), B<read>(2)"
7884 msgstr ""
7885 "B<lseek>(2), B<madvise>(2), B<mmap>(2), B<posix_fadvise>(2), B<read>(2)"
7886
7887 #. type: TH
7888 #: build/C/man2/remap_file_pages.2:28
7889 #, no-wrap
7890 msgid "REMAP_FILE_PAGES"
7891 msgstr "REMAP_FILE_PAGES"
7892
7893 #. type: Plain text
7894 #: build/C/man2/remap_file_pages.2:31
7895 msgid "remap_file_pages - create a nonlinear file mapping"
7896 msgstr "remap_file_pages - 非線形ファイルマッピングを作成する。"
7897
7898 #. type: Plain text
7899 #: build/C/man2/remap_file_pages.2:35
7900 #, no-wrap
7901 msgid ""
7902 "B<#define _GNU_SOURCE>         /* See feature_test_macros(7) */\n"
7903 "B<#include E<lt>sys/mman.hE<gt>>\n"
7904 msgstr ""
7905 "B<#define _GNU_SOURCE>         /* feature_test_macros(7) 参照 */\n"
7906 "B<#include E<lt>sys/mman.hE<gt>>\n"
7907
7908 #. type: Plain text
7909 #: build/C/man2/remap_file_pages.2:38
7910 #, no-wrap
7911 msgid ""
7912 "B<int remap_file_pages(void *>I<addr>B<, size_t >I<size>B<, int >I<prot>B<,>\n"
7913 "B<                     ssize_t >I<pgoff>B<, int >I<flags>B<);>\n"
7914 msgstr ""
7915 "B<int remap_file_pages(void *>I<addr>B<, size_t >I<size>B<, int >I<prot>B<,>\n"
7916 "B<                     ssize_t >I<pgoff>B<, int >I<flags>B<);>\n"
7917
7918 #. type: Plain text
7919 #: build/C/man2/remap_file_pages.2:51
7920 msgid ""
7921 "The B<remap_file_pages>()  system call is used to create a nonlinear "
7922 "mapping, that is, a mapping in which the pages of the file are mapped into a "
7923 "nonsequential order in memory.  The advantage of using B<remap_file_pages>"
7924 "()  over using repeated calls to B<mmap>(2)  is that the former approach "
7925 "does not require the kernel to create additional VMA (Virtual Memory Area) "
7926 "data structures."
7927 msgstr ""
7928 "B<remap_file_pages>()  システムコールは非線形なマッピング、 つまりファイルの"
7929 "ページがメモリ上で連続しない順番でマップされる マッピングを作成するために使わ"
7930 "れる。 B<remap_file_pages>()  を使う方が B<mmap>(2)  を繰り返して使うより優れ"
7931 "ている点は、 前者の方法ではカーネルが VMA (Virtual Memory Area, 仮想メモリ領"
7932 "域)  データ構造体を追加で作成する必要がないことである。"
7933
7934 #. type: Plain text
7935 #: build/C/man2/remap_file_pages.2:53
7936 msgid "To create a nonlinear mapping we perform the following steps:"
7937 msgstr "非線形マッピングを作成するためには、 以下のようなステップを実行する:"
7938
7939 #. type: TP
7940 #: build/C/man2/remap_file_pages.2:53
7941 #, no-wrap
7942 msgid "1."
7943 msgstr "1."
7944
7945 #. type: Plain text
7946 #: build/C/man2/remap_file_pages.2:61
7947 msgid ""
7948 "Use B<mmap>(2)  to create a mapping (which is initially linear).  This "
7949 "mapping must be created with the B<MAP_SHARED> flag."
7950 msgstr ""
7951 "B<mmap>(2)  を使い、マッピングを作成する (このマッピングは最初は線形であ"
7952 "る)。 このマッピングは B<MAP_SHARED> フラグを指定して作成されなければならな"
7953 "い。"
7954
7955 #. type: TP
7956 #: build/C/man2/remap_file_pages.2:61
7957 #, no-wrap
7958 msgid "2."
7959 msgstr "2."
7960
7961 #. type: Plain text
7962 #: build/C/man2/remap_file_pages.2:69
7963 msgid ""
7964 "Use one or more calls to B<remap_file_pages>()  to rearrange the "
7965 "correspondence between the pages of the mapping and the pages of the file.  "
7966 "It is possible to map the same page of a file into multiple locations within "
7967 "the mapped region."
7968 msgstr ""
7969 "B<remap_file_pages>()  を 1 回以上呼び出して、 マッピングのページとファイルの"
7970 "ページの対応関係を再構成する。 ファイルの同じページをマッピング領域の複数の場"
7971 "所に マップすることが可能である。"
7972
7973 #. type: Plain text
7974 #: build/C/man2/remap_file_pages.2:80
7975 msgid ""
7976 "The I<pgoff> and I<size> arguments specify the region of the file that is to "
7977 "be relocated within the mapping: I<pgoff> is a file offset in units of the "
7978 "system page size; I<size> is the length of the region in bytes."
7979 msgstr ""
7980 "I<pgoff> と I<size> 引き数は、マッピング内で再配置されるファイルの領域を指定"
7981 "する。 I<pgoff> はファイルオフセットであり、単位はシステムのページサイズであ"
7982 "る。 I<size> は領域の長さであり、単位はバイトである。"
7983
7984 #. type: Plain text
7985 #: build/C/man2/remap_file_pages.2:98
7986 msgid ""
7987 "The I<addr> argument serves two purposes.  First, it identifies the mapping "
7988 "whose pages we want to rearrange.  Thus, I<addr> must be an address that "
7989 "falls within a region previously mapped by a call to B<mmap>(2).  Second, "
7990 "I<addr> specifies the address at which the file pages identified by I<pgoff> "
7991 "and I<size> will be placed."
7992 msgstr ""
7993 "I<addr> 引き数は 2 つの目的で使われる。 第 1 の目的は、この引き数によって再編"
7994 "成したいページの マッピングを識別することである。 よって I<addr> は B<mmap>"
7995 "(2)  の呼び出しで過去にマップされた領域内のアドレスでなければならない。 第 2 "
7996 "の目的は、 I<pgoff> と I<size> で識別されるファイルページが置かれる予定のアド"
7997 "レスを、 I<addr> によって指定することである。"
7998
7999 #.  This rounding is weird, and not consistent with the treatment of
8000 #.  the analogous arguments for munmap()/mprotect() and for mlock().
8001 #.  MTK, 14 Sep 2005
8002 #. type: Plain text
8003 #: build/C/man2/remap_file_pages.2:112
8004 msgid ""
8005 "The values specified in I<addr> and I<size> should be multiples of the "
8006 "system page size.  If they are not, then the kernel rounds I<both> values "
8007 "I<down> to the nearest multiple of the page size."
8008 msgstr ""
8009 "I<addr> と I<size> に指定する値は、システムのページサイズの倍数とすべきであ"
8010 "る。 それ以外の場合、カーネルは「両方」の値を 最も近いページサイズの倍数へ"
8011 "「切り下げる」。"
8012
8013 #. type: Plain text
8014 #: build/C/man2/remap_file_pages.2:116
8015 msgid "The I<prot> argument must be specified as 0."
8016 msgstr "I<prot> 引き数は 0 に指定されなければならない。"
8017
8018 #. type: Plain text
8019 #: build/C/man2/remap_file_pages.2:124
8020 msgid ""
8021 "The I<flags> argument has the same meaning as for B<mmap>(2), but all flags "
8022 "other than B<MAP_NONBLOCK> are ignored."
8023 msgstr ""
8024 "I<flags> 引き数は B<mmap>(2)  のものと同じ意味であるが、 B<MAP_NONBLOCK> 以外"
8025 "の全てのフラグは無視される。"
8026
8027 #. type: Plain text
8028 #: build/C/man2/remap_file_pages.2:131
8029 msgid ""
8030 "On success, B<remap_file_pages>()  returns 0.  On error, -1 is returned, and "
8031 "I<errno> is set appropriately."
8032 msgstr ""
8033 "成功した場合、 B<remap_file_pages>()  は 0 を返す。 エラーの場合、-1 が返さ"
8034 "れ、 I<errno> が適切に設定される。"
8035
8036 #. type: Plain text
8037 #: build/C/man2/remap_file_pages.2:139
8038 msgid ""
8039 "I<addr> does not refer to a valid mapping created with the B<MAP_SHARED> "
8040 "flag."
8041 msgstr ""
8042 "I<addr> が B<MAP_SHARED> フラグを指定して作成された有効なマッピングを参照して"
8043 "いない。"
8044
8045 #.  And possibly others from vma->vm_ops->populate()
8046 #. type: Plain text
8047 #: build/C/man2/remap_file_pages.2:148
8048 msgid "I<addr>, I<size>, I<prot>, or I<pgoff> is invalid."
8049 msgstr "I<addr>, I<size>, I<prot>, I<pgoff> のいずれかが不正である。"
8050
8051 #. type: Plain text
8052 #: build/C/man2/remap_file_pages.2:153
8053 msgid ""
8054 "The B<remap_file_pages>()  system call appeared in Linux 2.5.46; glibc "
8055 "support was added in version 2.3.3."
8056 msgstr ""
8057 "B<remap_file_pages>()  システムコールは Linux 2.5.46 で登場した。 glibc での"
8058 "サポートは glibc バージョン 2.3.3 で追加された。"
8059
8060 #. type: Plain text
8061 #: build/C/man2/remap_file_pages.2:157
8062 msgid "The B<remap_file_pages>()  system call is Linux-specific."
8063 msgstr "B<remap_file_pages>()  システムコールは Linux 固有のものである。"
8064
8065 #. type: Plain text
8066 #: build/C/man2/remap_file_pages.2:164
8067 msgid ""
8068 "B<getpagesize>(2), B<mmap>(2), B<mmap2>(2), B<mprotect>(2), B<mremap>(2), "
8069 "B<msync>(2)"
8070 msgstr ""
8071 "B<getpagesize>(2), B<mmap>(2), B<mmap2>(2), B<mprotect>(2), B<mremap>(2), "
8072 "B<msync>(2)"
8073
8074 #. type: TH
8075 #: build/C/man3/shm_open.3:26
8076 #, no-wrap
8077 msgid "SHM_OPEN"
8078 msgstr "SHM_OPEN"
8079
8080 #. type: TH
8081 #: build/C/man3/shm_open.3:26
8082 #, no-wrap
8083 msgid "2009-02-25"
8084 msgstr "2009-02-25"
8085
8086 #. type: Plain text
8087 #: build/C/man3/shm_open.3:29
8088 #, fuzzy
8089 #| msgid ""
8090 #| "shm_open, shm_unlink - Create/open or unlink POSIX shared memory objects"
8091 msgid ""
8092 "shm_open, shm_unlink - create/open or unlink POSIX shared memory objects"
8093 msgstr ""
8094 "shm_open, shm_unlink - POSIX 共有メモリ・オブジェクトの作成/オープン、 削除を"
8095 "行う"
8096
8097 #. type: Plain text
8098 #: build/C/man3/shm_open.3:33
8099 msgid "B<#include E<lt>sys/stat.hE<gt>> /* For mode constants */"
8100 msgstr "B<#include E<lt>sys/stat.hE<gt>> /* mode 定数用 */"
8101
8102 #. type: Plain text
8103 #: build/C/man3/shm_open.3:35
8104 msgid "B<#include E<lt>fcntl.hE<gt>> /* For O_* constants */"
8105 msgstr "B<#include E<lt>fcntl.hE<gt>> /* O_* 定数の定義用 */"
8106
8107 #. type: Plain text
8108 #: build/C/man3/shm_open.3:37
8109 msgid ""
8110 "B<int shm_open(const char *>I<name>B<, int >I<oflag>B<, mode_t >I<mode>B<);>"
8111 msgstr ""
8112 "B<int shm_open(const char *>I<name>B<, int >I<oflag>B<, mode_t >I<mode>B<);>"
8113
8114 #. type: Plain text
8115 #: build/C/man3/shm_open.3:39
8116 msgid "B<int shm_unlink(const char *>I<name>B<);>"
8117 msgstr "B<int shm_unlink(const char *>I<name>B<);>"
8118
8119 #. type: Plain text
8120 #: build/C/man3/shm_open.3:41
8121 msgid "Link with I<-lrt>."
8122 msgstr "I<-lrt> でリンクする。"
8123
8124 #. type: Plain text
8125 #: build/C/man3/shm_open.3:53
8126 msgid ""
8127 "B<shm_open>()  creates and opens a new, or opens an existing, POSIX shared "
8128 "memory object.  A POSIX shared memory object is in effect a handle which can "
8129 "be used by unrelated processes to B<mmap>(2)  the same region of shared "
8130 "memory.  The B<shm_unlink>()  function performs the converse operation, "
8131 "removing an object previously created by B<shm_open>()."
8132 msgstr ""
8133 "B<shm_open>()  は、POSIX 共有メモリ・オブジェクトを新規に作成/オープンした"
8134 "り、 すでに存在するオブジェクトをオープンしたりする。 POSIX 共有メモリ・オブ"
8135 "ジェクトは、実際には、関係のないプロセスが 共有メモリの同じ領域を B<mmap>"
8136 "(2)  するために使用することができる手段である。 B<shm_unlink>()  は、逆の操"
8137 "作、つまり以前に B<shm_open>()  で作成されたオブジェクトの削除を行う。"
8138
8139 #.  glibc allows the initial slash to be omitted, and makes
8140 #.  multiple initial slashes equivalent to a single slash.
8141 #.  This differs from the implementation of POSIX message queues.
8142 #.  glibc allows subdirectory components in the name, in which
8143 #.  case the subdirectory must exist under /dev/shm, and allow the
8144 #.  required permissions if a user wants to create a shared memory
8145 #.  object in that subdirectory.
8146 #. type: Plain text
8147 #: build/C/man3/shm_open.3:74
8148 msgid ""
8149 "The operation of B<shm_open>()  is analogous to that of B<open>(2).  I<name> "
8150 "specifies the shared memory object to be created or opened.  For portable "
8151 "use, a shared memory object should be identified by a name of the form I</"
8152 "somename>; that is, a null-terminated string of up to B<NAME_MAX> (i.e., "
8153 "255) characters consisting of an initial slash, followed by one or more "
8154 "characters, none of which are slashes."
8155 msgstr ""
8156 "B<shm_open>()  の動作は B<open>(2)  とよく似ている。 I<name> で作成したりオー"
8157 "プンしたりする共有メモリ・オブジェクトを指定する。 移植性を持たせるためには、"
8158 "共有メモリ・オブジェクトは I</somename> という形式の名前で識別し、 その名前"
8159 "は、最大で B<NAME_MAX> (すなわち 255) 文字の NULL 終端された文字列で、 スラッ"
8160 "シュで始まり、スラッシュ以外の文字が 1 文字以上続く形式 にすべきである。"
8161
8162 #. type: Plain text
8163 #: build/C/man3/shm_open.3:81
8164 msgid ""
8165 "I<oflag> is a bit mask created by ORing together exactly one of B<O_RDONLY> "
8166 "or B<O_RDWR> and any of the other flags listed here:"
8167 msgstr ""
8168 "I<oflag> はビットマスクで、 B<O_RDONLY> と B<O_RDWR> のいずれか一方と、以下に"
8169 "述べる他のフラグの論理和をとったもの を指定する。"
8170
8171 #. type: TP
8172 #: build/C/man3/shm_open.3:81
8173 #, no-wrap
8174 msgid "B<O_RDONLY>"
8175 msgstr "B<O_RDONLY>"
8176
8177 #. type: Plain text
8178 #: build/C/man3/shm_open.3:87
8179 msgid ""
8180 "Open the object for read access.  A shared memory object opened in this way "
8181 "can only be B<mmap>(2)ed for read (B<PROT_READ>) access."
8182 msgstr ""
8183 "読み出しアクセス用にオブジェクトをオープンする。 このフラグを指定してオープン"
8184 "された共有メモリ・オブジェクトは、 読み出し (B<PROT_READ>) アクセスでのみ "
8185 "B<mmap>(2)  することができる。"
8186
8187 #. type: TP
8188 #: build/C/man3/shm_open.3:87
8189 #, no-wrap
8190 msgid "B<O_RDWR>"
8191 msgstr "B<O_RDWR>"
8192
8193 #. type: Plain text
8194 #: build/C/man3/shm_open.3:90
8195 msgid "Open the object for read-write access."
8196 msgstr "読み書きアクセス用にオブジェクトをオープンする。"
8197
8198 #. type: TP
8199 #: build/C/man3/shm_open.3:90
8200 #, no-wrap
8201 msgid "B<O_CREAT>"
8202 msgstr "B<O_CREAT>"
8203
8204 #.  In truth it is actually the file system IDs on Linux, but these
8205 #.  are nearly always the same as the effective IDs.  (MTK, Jul 05)
8206 #. type: Plain text
8207 #: build/C/man3/shm_open.3:110
8208 msgid ""
8209 "Create the shared memory object if it does not exist.  The user and group "
8210 "ownership of the object are taken from the corresponding effective IDs of "
8211 "the calling process, and the object's permission bits are set according to "
8212 "the low-order 9 bits of I<mode>, except that those bits set in the process "
8213 "file mode creation mask (see B<umask>(2))  are cleared for the new object.  "
8214 "A set of macro constants which can be used to define I<mode> is listed in "
8215 "B<open>(2).  (Symbolic definitions of these constants can be obtained by "
8216 "including I<E<lt>sys/stat.hE<gt>>.)"
8217 msgstr ""
8218 "存在しない場合、共有メモリ・オブジェクトを作成する。 オブジェクトのユーザとグ"
8219 "ループの所有権は、 呼び出し元プロセスの対応する実効 ID が使われ、 オブジェク"
8220 "トの許可ビットは I<mode> の下位 9 ビットに基づいて設定される。ただし、 ファイ"
8221 "ルモード作成マスク (B<umask>(2)  参照) に設定されている値は、新規オブジェクト"
8222 "に関してはクリアされる。 I<mode> を定義するために使用できるマクロ定数(群)は "
8223 "B<open>(2)  に記載されている (これらの定数のシンボル定義は I<E<lt>sys/stat."
8224 "hE<gt>> のインクルードにより得られる)。"
8225
8226 #. type: Plain text
8227 #: build/C/man3/shm_open.3:116
8228 msgid ""
8229 "A new shared memory object initially has zero length\\(emthe size of the "
8230 "object can be set using B<ftruncate>(2).  The newly allocated bytes of a "
8231 "shared memory object are automatically initialized to 0."
8232 msgstr ""
8233 "新規に作成された共有メモリ・オブジェクトは長さ 0 で初期化される。 オブジェク"
8234 "トの大きさは B<ftruncate>(2)  を使って設定できる。 共有メモリ・オブジェクトと"
8235 "して新規に確保されたバイトは自動的に 0 に初期化される。"
8236
8237 #. type: TP
8238 #: build/C/man3/shm_open.3:116
8239 #, no-wrap
8240 msgid "B<O_EXCL>"
8241 msgstr "B<O_EXCL>"
8242
8243 #. type: Plain text
8244 #: build/C/man3/shm_open.3:125
8245 msgid ""
8246 "If B<O_CREAT> was also specified, and a shared memory object with the given "
8247 "I<name> already exists, return an error.  The check for the existence of the "
8248 "object, and its creation if it does not exist, are performed atomically."
8249 msgstr ""
8250 "B<O_CREAT> が一緒に指定されており、 I<name> で指定された共有メモリ・オブジェ"
8251 "クトが既に存在した場合、 エラーを返す。 オブジェクトの存在確認と、存在しな"
8252 "かった場合のオブジェクト作成は、 必ず一連の操作として実行される (performed "
8253 "atomically)。"
8254
8255 #. type: TP
8256 #: build/C/man3/shm_open.3:125
8257 #, no-wrap
8258 msgid "B<O_TRUNC>"
8259 msgstr "B<O_TRUNC>"
8260
8261 #. type: Plain text
8262 #: build/C/man3/shm_open.3:128
8263 msgid "If the shared memory object already exists, truncate it to zero bytes."
8264 msgstr ""
8265 "共有メモリ・オブジェクトがすでに存在した場合、 そのオブジェクトを 0 バイトに"
8266 "切り詰める。"
8267
8268 #. type: Plain text
8269 #: build/C/man3/shm_open.3:131
8270 msgid ""
8271 "Definitions of these flag values can be obtained by including I<E<lt>fcntl."
8272 "hE<gt>>."
8273 msgstr ""
8274 "これらのフラグ値の定義は I<E<lt>fcntl.hE<gt>> のインクルードにより得られる。"
8275
8276 #. type: Plain text
8277 #: build/C/man3/shm_open.3:142
8278 msgid ""
8279 "On successful completion B<shm_open>()  returns a new file descriptor "
8280 "referring to the shared memory object.  This file descriptor is guaranteed "
8281 "to be the lowest-numbered file descriptor not previously opened within the "
8282 "process.  The B<FD_CLOEXEC> flag (see B<fcntl>(2))  is set for the file "
8283 "descriptor."
8284 msgstr ""
8285 "成功して完了した場合、 B<shm_open>()  は共有メモリ・オブジェクトを参照する新"
8286 "しいファイル・ディスクリプタを返す。 このファイル・ディスクリプタは、そのプロ"
8287 "セス内で過去にオープンされていない ファイル・ディスクリプタの中で最も小さな数"
8288 "になることが保証される。 B<FD_CLOEXEC> フラグ (B<fcntl>(2)  を参照) が、この"
8289 "ファイル・ディスクリプタに設定される。"
8290
8291 #. type: Plain text
8292 #: build/C/man3/shm_open.3:151
8293 msgid ""
8294 "The file descriptor is normally used in subsequent calls to B<ftruncate>(2)  "
8295 "(for a newly created object) and B<mmap>(2).  After a call to B<mmap>(2)  "
8296 "the file descriptor may be closed without affecting the memory mapping."
8297 msgstr ""
8298 "通常、これらのファイル・ディスクリプタは、この後続けて実行される B<ftruncate>"
8299 "(2)  (新規に作成されたオブジェクトの場合のみ) と B<mmap>(2)  の呼び出しに使用"
8300 "される。 B<mmap>(2)  を呼び出した後は、ファイル・ディスクリプタをクローズして"
8301 "もよく、 クローズしてもメモリ・マッピングに影響を与えることはない。"
8302
8303 #. type: Plain text
8304 #: build/C/man3/shm_open.3:169
8305 msgid ""
8306 "The operation of B<shm_unlink>()  is analogous to B<unlink>(2): it removes a "
8307 "shared memory object name, and, once all processes have unmapped the object, "
8308 "de-allocates and destroys the contents of the associated memory region.  "
8309 "After a successful B<shm_unlink>(), attempts to B<shm_open>()  an object "
8310 "with the same I<name> will fail (unless B<O_CREAT> was specified, in which "
8311 "case a new, distinct object is created)."
8312 msgstr ""
8313 "B<shm_unlink>()  の動作は B<unlink>(2)  とよく似ている: 共有メモリ・オブジェ"
8314 "クト名を削除し、すべてのプロセスが処理対象の オブジェクトをアンマップした時点"
8315 "でオブジェクトの割り当てを解除し、 対応するメモリ領域の内容を破棄する。 "
8316 "B<shm_unlink>()  が成功した後で、同じ I<name> を持つオブジェクトに対して "
8317 "B<shm_open>()  を行うと、 (B<O_CREAT> が指定されていない場合) 失敗する。 "
8318 "(B<O_CREAT> が指定されている場合、新しく別のオブジェクトが作成される)。"
8319
8320 #. type: Plain text
8321 #: build/C/man3/shm_open.3:178
8322 msgid ""
8323 "On success, B<shm_open>()  returns a nonnegative file descriptor.  On "
8324 "failure, B<shm_open>()  returns -1.  B<shm_unlink>()  returns 0 on success, "
8325 "or -1 on error."
8326 msgstr ""
8327 "成功した場合、 B<shm_open>()  は非負のファイル・ディスクリプタを返す。 失敗し"
8328 "た場合、 B<shm_open>()  は -1 を返す。 B<shm_unlink>()  は、成功した場合 0 "
8329 "を、エラーが起こった場合 -1 を返す。"
8330
8331 #. type: Plain text
8332 #: build/C/man3/shm_open.3:185
8333 msgid ""
8334 "On failure, I<errno> is set to indicate the cause of the error.  Values "
8335 "which may appear in I<errno> include the following:"
8336 msgstr ""
8337 "失敗した場合、エラーの原因を示すため I<errno> が設定される。 I<errno> に設定"
8338 "される値は以下の通りである:"
8339
8340 #. type: Plain text
8341 #: build/C/man3/shm_open.3:190
8342 msgid "Permission to B<shm_unlink>()  the shared memory object was denied."
8343 msgstr "共有メモリオブジェクトを B<shm_unlink>()  する権限がなかった。"
8344
8345 #. type: Plain text
8346 #: build/C/man3/shm_open.3:200
8347 msgid ""
8348 "Permission was denied to B<shm_open>()  I<name> in the specified I<mode>, or "
8349 "B<O_TRUNC> was specified and the caller does not have write permission on "
8350 "the object."
8351 msgstr ""
8352 "指定された I<mode> で I<name> を B<shm_open>()  する権限がなかった。もしく"
8353 "は、 B<O_TRUNC> が指定されたが、呼び出し元にはそのオブジェクトに対する書き込"
8354 "み権限が なかった。"
8355
8356 #. type: TP
8357 #: build/C/man3/shm_open.3:200 build/C/man2/shmget.2:194
8358 #, no-wrap
8359 msgid "B<EEXIST>"
8360 msgstr "B<EEXIST>"
8361
8362 #. type: Plain text
8363 #: build/C/man3/shm_open.3:211
8364 msgid ""
8365 "Both B<O_CREAT> and B<O_EXCL> were specified to B<shm_open>()  and the "
8366 "shared memory object specified by I<name> already exists."
8367 msgstr ""
8368 "B<O_CREAT> と B<O_EXCL> の両方が B<shm_open>()  に指定されたが、 I<name> で指"
8369 "定された共有メモリ・オブジェクトが既に存在した。"
8370
8371 #. type: Plain text
8372 #: build/C/man3/shm_open.3:218
8373 msgid "The I<name> argument to B<shm_open>()  was invalid."
8374 msgstr "B<shm_open>()  に与えられた I<name> 引き数が不正であった。"
8375
8376 #. type: TP
8377 #: build/C/man3/shm_open.3:218
8378 #, no-wrap
8379 msgid "B<EMFILE>"
8380 msgstr "B<EMFILE>"
8381
8382 #. type: Plain text
8383 #: build/C/man3/shm_open.3:221
8384 msgid "The process already has the maximum number of files open."
8385 msgstr "プロセスがオープン可能なファイル数の上限にすでに達していた。"
8386
8387 #. type: TP
8388 #: build/C/man3/shm_open.3:221
8389 #, no-wrap
8390 msgid "B<ENAMETOOLONG>"
8391 msgstr "B<ENAMETOOLONG>"
8392
8393 #. type: Plain text
8394 #: build/C/man3/shm_open.3:227
8395 msgid "The length of I<name> exceeds B<PATH_MAX>."
8396 msgstr "I<name> の長さが B<PATH_MAX> を越えている。"
8397
8398 #. type: Plain text
8399 #: build/C/man3/shm_open.3:231
8400 msgid ""
8401 "The limit on the total number of files open on the system has been reached."
8402 msgstr "ファイルシステムでオープンできるファイル数の上限に達した。"
8403
8404 #. type: TP
8405 #: build/C/man3/shm_open.3:231 build/C/man3/shm_open.3:240
8406 #: build/C/man2/shmget.2:208
8407 #, no-wrap
8408 msgid "B<ENOENT>"
8409 msgstr "B<ENOENT>"
8410
8411 #. type: Plain text
8412 #: build/C/man3/shm_open.3:240
8413 msgid ""
8414 "An attempt was made to B<shm_open>()  a I<name> that did not exist, and "
8415 "B<O_CREAT> was not specified."
8416 msgstr ""
8417 "存在していない I<name> のオブジェクトを B<shm_open>()  しようとしたが、 "
8418 "B<O_CREAT> が指定されていなかった。"
8419
8420 #. type: Plain text
8421 #: build/C/man3/shm_open.3:247
8422 msgid ""
8423 "An attempt was to made to B<shm_unlink>()  a I<name> that does not exist."
8424 msgstr "存在しない I<name> のオブジェクトを B<shm_unlink>()  しようとした。"
8425
8426 #. type: Plain text
8427 #: build/C/man3/shm_open.3:249
8428 msgid "These functions are provided in glibc 2.2 and later."
8429 msgstr "これらの関数は glibc 2.2 以降で提供されている。"
8430
8431 #. type: Plain text
8432 #: build/C/man3/shm_open.3:255
8433 msgid ""
8434 "POSIX.1-2001 says that the group ownership of a newly created shared memory "
8435 "object is set to either the calling process's effective group ID or \"a "
8436 "system default group ID\"."
8437 msgstr ""
8438 "POSIX.1-2001 には、新規に作成される共有メモリオブジェクトのグループ所有権"
8439 "は、 呼び出し元プロセスの実効グループ ID か 「システムのデフォルトのグループ "
8440 "ID」 のどちらかに設定される、と書かれている。"
8441
8442 #. type: Plain text
8443 #: build/C/man3/shm_open.3:264
8444 msgid ""
8445 "POSIX leaves the behavior of the combination of B<O_RDONLY> and B<O_TRUNC> "
8446 "unspecified.  On Linux, this will successfully truncate an existing shared "
8447 "memory object\\(emthis may not be so on other UNIX systems."
8448 msgstr ""
8449 "POSIX は B<O_RDONLY> と B<O_TRUNC> が一緒に指定された場合の動作を未定義にして"
8450 "いる。Linux では、 既存の共有メモリ・オブジェクトに対する切り詰め (truncate) "
8451 "は成功する。 しかし、他の UNIX システムでも同じであるとは限らない。"
8452
8453 #. type: Plain text
8454 #: build/C/man3/shm_open.3:269
8455 msgid ""
8456 "The POSIX shared memory object implementation on Linux 2.4 makes use of a "
8457 "dedicated file system, which is normally mounted under I</dev/shm>."
8458 msgstr ""
8459 "Linux 2.4 における POSIX 共有メモリ・オブジェクトの実装は 専用のファイルシス"
8460 "テムを使用する。そのファイルシステムは通常 I</dev/shm> にマウントされる。"
8461
8462 #. type: Plain text
8463 #: build/C/man3/shm_open.3:280
8464 msgid ""
8465 "B<close>(2), B<fchmod>(2), B<fchown>(2), B<fcntl>(2), B<fstat>(2), "
8466 "B<ftruncate>(2), B<mmap>(2), B<open>(2), B<umask>(2), B<shm_overview>(7)"
8467 msgstr ""
8468 "B<close>(2), B<fchmod>(2), B<fchown>(2), B<fcntl>(2), B<fstat>(2), "
8469 "B<ftruncate>(2), B<mmap>(2), B<open>(2), B<umask>(2), B<shm_overview>(7)"
8470
8471 #. type: TH
8472 #: build/C/man7/shm_overview.7:27
8473 #, no-wrap
8474 msgid "SHM_OVERVIEW"
8475 msgstr "SHM_OVERVIEW"
8476
8477 #. type: Plain text
8478 #: build/C/man7/shm_overview.7:30
8479 #, fuzzy
8480 #| msgid "shm_overview - Overview of POSIX shared memory"
8481 msgid "shm_overview - overview of POSIX shared memory"
8482 msgstr "shm_overview - POSIX 共有メモリの概要"
8483
8484 #. type: Plain text
8485 #: build/C/man7/shm_overview.7:33
8486 msgid ""
8487 "The POSIX shared memory API allows processes to communicate information by "
8488 "sharing a region of memory."
8489 msgstr ""
8490 "POSIX 共有メモリ API を使用すると、メモリのある領域を共有して、 プロセス間で"
8491 "情報をやり取りすることができる。"
8492
8493 #. type: Plain text
8494 #: build/C/man7/shm_overview.7:35
8495 msgid "The interfaces employed in the API are:"
8496 msgstr "この API では以下のインターフェースが採用されている。"
8497
8498 #. type: TP
8499 #: build/C/man7/shm_overview.7:35
8500 #, no-wrap
8501 msgid "B<shm_open>(3)"
8502 msgstr "B<shm_open>(3)"
8503
8504 #. type: Plain text
8505 #: build/C/man7/shm_overview.7:42
8506 msgid ""
8507 "Create and open a new object, or open an existing object.  This is analogous "
8508 "to B<open>(2).  The call returns a file descriptor for use by the other "
8509 "interfaces listed below."
8510 msgstr ""
8511 "新しいオブジェクトを生成しオープンする、もしくは 既存のオブジェクトをオープン"
8512 "する。これは B<open>(2)  と同じである。下記にある他のインターフェースで使用す"
8513 "る ファイルディスクリプタを返す。"
8514
8515 #. type: TP
8516 #: build/C/man7/shm_overview.7:42
8517 #, no-wrap
8518 msgid "B<ftruncate>(2)"
8519 msgstr "B<ftruncate>(2)"
8520
8521 #. type: Plain text
8522 #: build/C/man7/shm_overview.7:46
8523 msgid ""
8524 "Set the size of the shared memory object.  (A newly created shared memory "
8525 "object has a length of zero.)"
8526 msgstr "共有メモリオブジェクトの大きさを設定する。"
8527
8528 #. type: Plain text
8529 #: build/C/man7/shm_overview.7:50
8530 msgid ""
8531 "Map the shared memory object into the virtual address space of the calling "
8532 "process."
8533 msgstr ""
8534 "呼び出したプロセスの仮想アドレス空間に共有メモリオブジェクトを マップする。"
8535
8536 #. type: TP
8537 #: build/C/man7/shm_overview.7:50
8538 #, no-wrap
8539 msgid "B<munmap>(2)"
8540 msgstr "B<munmap>(2)"
8541
8542 #. type: Plain text
8543 #: build/C/man7/shm_overview.7:54
8544 msgid ""
8545 "Unmap the shared memory object from the virtual address space of the calling "
8546 "process."
8547 msgstr ""
8548 "呼び出したプロセスの仮想アドレス空間から 共有メモリオブジェクトをアンマップす"
8549 "る。"
8550
8551 #. type: TP
8552 #: build/C/man7/shm_overview.7:54
8553 #, no-wrap
8554 msgid "B<shm_unlink>(3)"
8555 msgstr "B<shm_unlink>(3)"
8556
8557 #. type: Plain text
8558 #: build/C/man7/shm_overview.7:57
8559 msgid "Remove a shared memory object name."
8560 msgstr "共有メモリオブジェクト名を削除する。"
8561
8562 #. type: TP
8563 #: build/C/man7/shm_overview.7:57
8564 #, no-wrap
8565 msgid "B<close>(2)"
8566 msgstr "B<close>(2)"
8567
8568 #. type: Plain text
8569 #: build/C/man7/shm_overview.7:62
8570 msgid ""
8571 "Close the file descriptor allocated by B<shm_open>(3)  when it is no longer "
8572 "needed."
8573 msgstr ""
8574 "B<shm_open>(3)  で割り当てられたファイルディスクリプタが不要になった際に、 そ"
8575 "のファイルディスクリプタをクローズする。"
8576
8577 #. type: TP
8578 #: build/C/man7/shm_overview.7:62
8579 #, no-wrap
8580 msgid "B<fstat>(2)"
8581 msgstr "B<fstat>(2)"
8582
8583 #. type: Plain text
8584 #: build/C/man7/shm_overview.7:76
8585 msgid ""
8586 "Obtain a I<stat> structure that describes the shared memory object.  Among "
8587 "the information returned by this call are the object's size (I<st_size>), "
8588 "permissions (I<st_mode>), owner (I<st_uid>), and group (I<st_gid>)."
8589 msgstr ""
8590 "その共有メモリオブジェクトについての情報が入った I<stat> 構造体を取得する。 "
8591 "このシステムコールが返す情報には、オブジェクトのサイズ (I<st_size>)、 許可属"
8592 "性 (I<st_mode>)、 所有者 (I<st_uid>)、 グループ (I<st_gid>)  がある。"
8593
8594 #. type: TP
8595 #: build/C/man7/shm_overview.7:76
8596 #, no-wrap
8597 msgid "B<fchown>(2)"
8598 msgstr "B<fchown>(2)"
8599
8600 #. type: Plain text
8601 #: build/C/man7/shm_overview.7:79
8602 msgid "To change the ownership of a shared memory object."
8603 msgstr "共有メモリオブジェクトの所有権を変更する。"
8604
8605 #. type: TP
8606 #: build/C/man7/shm_overview.7:79
8607 #, no-wrap
8608 msgid "B<fchmod>(2)"
8609 msgstr "B<fchmod>(2)"
8610
8611 #. type: Plain text
8612 #: build/C/man7/shm_overview.7:82
8613 msgid "To change the permissions of a shared memory object."
8614 msgstr "共有メモリオブジェクトの許可属性を変更する。"
8615
8616 #. type: SS
8617 #: build/C/man7/shm_overview.7:82
8618 #, no-wrap
8619 msgid "Versions"
8620 msgstr "Versions"
8621
8622 #. type: Plain text
8623 #: build/C/man7/shm_overview.7:84
8624 msgid "POSIX shared memory is supported since Linux 2.4 and glibc 2.2."
8625 msgstr "POSIX 共有メモリは Linux 2.4 と glibc 2.2 以降でサポートされている。"
8626
8627 #. type: SS
8628 #: build/C/man7/shm_overview.7:84
8629 #, no-wrap
8630 msgid "Persistence"
8631 msgstr "持続性"
8632
8633 #. type: Plain text
8634 #: build/C/man7/shm_overview.7:89
8635 msgid ""
8636 "POSIX shared memory objects have kernel persistence: a shared memory object "
8637 "will exist until the system is shut down, or until all processes have "
8638 "unmapped the object and it has been deleted with B<shm_unlink>(3)"
8639 msgstr ""
8640 "POSIX 共有メモリオブジェクトはカーネル内で保持される。 共有メモリオブジェクト"
8641 "は、システムがシャットダウンされるか、 全てのプロセスがそのオブジェクトをアン"
8642 "マップし、 B<shm_unlink>(3)  で削除されるまで、存在し続ける。"
8643
8644 #. type: SS
8645 #: build/C/man7/shm_overview.7:89
8646 #, no-wrap
8647 msgid "Linking"
8648 msgstr "リンク"
8649
8650 #. type: Plain text
8651 #: build/C/man7/shm_overview.7:94
8652 msgid ""
8653 "Programs using the POSIX shared memory API must be compiled with I<cc -lrt> "
8654 "to link against the real-time library, I<librt>."
8655 msgstr ""
8656 "POSIX 共有メモリ API を使用したプログラムは I<cc -lrt> でコンパイルし、リアル"
8657 "タイムライブラリ I<librt> とリンクしなければならない。"
8658
8659 #. type: SS
8660 #: build/C/man7/shm_overview.7:94
8661 #, no-wrap
8662 msgid "Accessing shared memory objects via the file system"
8663 msgstr "ファイルシステム経由での共有メモリオブジェクトへのアクセス"
8664
8665 #. type: Plain text
8666 #: build/C/man7/shm_overview.7:101
8667 msgid ""
8668 "On Linux, shared memory objects are created in a (I<tmpfs>)  virtual file "
8669 "system, normally mounted under I</dev/shm>.  Since kernel 2.6.19, Linux "
8670 "supports the use of access control lists (ACLs)  to control the permissions "
8671 "of objects in the virtual file system."
8672 msgstr ""
8673 "Linux では、共有メモリオブジェクトは通常 I</dev/shm> 以下にマウントされる仮想"
8674 "ファイルシステム (I<tmpfs>)  内に作成される。 カーネル 2.6.19 以降の Linux で"
8675 "は、 仮想ファイルシステム内のオブジェクトの許可属性の制御に、 アクセス制御リ"
8676 "スト (ACL; access control lists) を使うことができる。"
8677
8678 #. type: Plain text
8679 #: build/C/man7/shm_overview.7:106
8680 msgid ""
8681 "Typically, processes must synchronize their access to a shared memory "
8682 "object, using, for example, POSIX semaphores."
8683 msgstr ""
8684 "通常は、共有メモリオブジェクトにアクセスするプロセスは、 POSIX セマフォなどを"
8685 "使ってプロセス間で同期をとらなければならない。"
8686
8687 #. type: Plain text
8688 #: build/C/man7/shm_overview.7:114
8689 msgid ""
8690 "System V shared memory (B<shmget>(2), B<shmop>(2), etc.) is an older shared "
8691 "memory API.  POSIX shared memory provides a simpler, and better designed "
8692 "interface; on the other hand POSIX shared memory is somewhat less widely "
8693 "available (especially on older systems) than System V shared memory."
8694 msgstr ""
8695 "System V 共有メモリ (B<shmget>(2), B<shmop>(2)  など) は古い共有メモリ API で"
8696 "ある。 POSIX 共有メモリは、より簡単で、うまく設計されたインタフェースを提供し"
8697 "ている。 一方で、POSIX 共有メモリは System V 共有メモリと比べると 利用できる"
8698 "システムが少ない (特に、古いシステムでは少ない)。"
8699
8700 #. type: Plain text
8701 #: build/C/man7/shm_overview.7:127
8702 msgid ""
8703 "B<fchmod>(2), B<fchown>(2), B<fstat>(2), B<ftruncate>(2), B<mmap>(2), "
8704 "B<mprotect>(2), B<munmap>(2), B<shmget>(2), B<shmop>(2), B<shm_open>(3), "
8705 "B<shm_unlink>(3), B<sem_overview>(7)"
8706 msgstr ""
8707 "B<fchmod>(2), B<fchown>(2), B<fstat>(2), B<ftruncate>(2), B<mmap>(2), "
8708 "B<mprotect>(2), B<munmap>(2), B<shmget>(2), B<shmop>(2), B<shm_open>(3), "
8709 "B<shm_unlink>(3), B<sem_overview>(7)"
8710
8711 #. type: TH
8712 #: build/C/man2/shmctl.2:45
8713 #, no-wrap
8714 msgid "SHMCTL"
8715 msgstr "SHMCTL"
8716
8717 #. type: TH
8718 #: build/C/man2/shmctl.2:45 build/C/man2/shmget.2:38
8719 #, fuzzy, no-wrap
8720 #| msgid "2012-05-06"
8721 msgid "2012-05-31"
8722 msgstr "2012-05-06"
8723
8724 #. type: Plain text
8725 #: build/C/man2/shmctl.2:48
8726 msgid "shmctl - shared memory control"
8727 msgstr "shmctl - 共有メモリ (shared memory) を制御する"
8728
8729 #. type: Plain text
8730 #: build/C/man2/shmctl.2:51 build/C/man2/shmget.2:44
8731 msgid "B<#include E<lt>sys/ipc.hE<gt>>"
8732 msgstr "B<#include E<lt>sys/ipc.hE<gt>>"
8733
8734 #. type: Plain text
8735 #: build/C/man2/shmctl.2:53 build/C/man2/shmget.2:46
8736 msgid "B<#include E<lt>sys/shm.hE<gt>>"
8737 msgstr "B<#include E<lt>sys/shm.hE<gt>>"
8738
8739 #. type: Plain text
8740 #: build/C/man2/shmctl.2:55
8741 msgid ""
8742 "B<int shmctl(int >I<shmid>B<, int >I<cmd>B<, struct shmid_ds *>I<buf>B<);>"
8743 msgstr ""
8744 "B<int shmctl(int >I<shmid>B<, int >I<cmd>B<, struct shmid_ds *>I<buf>B<);>"
8745
8746 #. type: Plain text
8747 #: build/C/man2/shmctl.2:62
8748 msgid ""
8749 "B<shmctl>()  performs the control operation specified by I<cmd> on the "
8750 "shared memory segment whose identifier is given in I<shmid>."
8751 msgstr ""
8752 "B<shmctl>()  は、識別子が I<shmid> の共有メモリ・セグメントに対して I<cmd> で"
8753 "指示した制御命令を実行する。"
8754
8755 #. type: Plain text
8756 #: build/C/man2/shmctl.2:67
8757 msgid ""
8758 "The I<buf> argument is a pointer to a I<shmid_ds> structure, defined in "
8759 "I<E<lt>sys/shm.hE<gt>> as follows:"
8760 msgstr ""
8761 "I<buf> 引き数は、 I<shmid_ds> 構造体へのポインタである。 この構造体は "
8762 "I<E<lt>sys/shm.hE<gt>> で以下のように定義されている"
8763
8764 #. type: Plain text
8765 #: build/C/man2/shmctl.2:81
8766 #, no-wrap
8767 msgid ""
8768 "struct shmid_ds {\n"
8769 "    struct ipc_perm shm_perm;    /* Ownership and permissions */\n"
8770 "    size_t          shm_segsz;   /* Size of segment (bytes) */\n"
8771 "    time_t          shm_atime;   /* Last attach time */\n"
8772 "    time_t          shm_dtime;   /* Last detach time */\n"
8773 "    time_t          shm_ctime;   /* Last change time */\n"
8774 "    pid_t           shm_cpid;    /* PID of creator */\n"
8775 "    pid_t           shm_lpid;    /* PID of last shmat(2)/shmdt(2) */\n"
8776 "    shmatt_t        shm_nattch;  /* No. of current attaches */\n"
8777 "    ...\n"
8778 "};\n"
8779 msgstr ""
8780 "struct shmid_ds {\n"
8781 "    struct ipc_perm shm_perm;    /* 所有権と許可 */\n"
8782 "    size_t          shm_segsz;   /* セグメントのサイズ (バイト) */\n"
8783 "    time_t          shm_atime;   /* 最後の付加 (attach) の時刻 */\n"
8784 "    time_t          shm_dtime;   /* 最後の分離 (detach) の時刻 */\n"
8785 "    time_t          shm_ctime;   /* 最後に変更が行われた時刻 */\n"
8786 "    pid_t           shm_cpid;    /* 作成者 (creator) の PID */\n"
8787 "    pid_t           shm_lpid;    /* 最後の shmat(2)/shmdt(2) の PID */\n"
8788 "    shmatt_t        shm_nattch;  /* 現在付加されている数 */\n"
8789 "    ...\n"
8790 "};\n"
8791
8792 #. type: Plain text
8793 #: build/C/man2/shmctl.2:89
8794 #, fuzzy
8795 #| msgid ""
8796 #| "The I<ipc_perm> structure is defined in I<E<lt>sys/ipc.hE<gt>> as follows "
8797 #| "(the highlighted fields are settable using B<IPC_SET>):"
8798 msgid ""
8799 "The I<ipc_perm> structure is defined as follows (the highlighted fields are "
8800 "settable using B<IPC_SET>):"
8801 msgstr ""
8802 "I<ipc_perm> 構造体は I<E<lt>sys/ipc.hE<gt>> で以下のように定義されている (強"
8803 "調されたフィールドは B<IPC_SET> を使って設定可能である):"
8804
8805 #. type: Plain text
8806 #: build/C/man2/shmctl.2:102
8807 #, no-wrap
8808 msgid ""
8809 "struct ipc_perm {\n"
8810 "    key_t          __key;    /* Key supplied to shmget(2) */\n"
8811 "    uid_t          B<uid>;      /* Effective UID of owner */\n"
8812 "    gid_t          B<gid>;      /* Effective GID of owner */\n"
8813 "    uid_t          cuid;     /* Effective UID of creator */\n"
8814 "    gid_t          cgid;     /* Effective GID of creator */\n"
8815 "    unsigned short B<mode>;     /* B<Permissions> + SHM_DEST and\n"
8816 "                                SHM_LOCKED flags */\n"
8817 "    unsigned short __seq;    /* Sequence number */\n"
8818 "};\n"
8819 msgstr ""
8820 "struct ipc_perm {\n"
8821 "    key_t          __key;    /* shmget(2) に与えられるキー */\n"
8822 "    uid_t          B<uid>;      /* 所有者の実効 UID */\n"
8823 "    gid_t          B<gid>;      /* 所有者の実効 GID */\n"
8824 "    uid_t          cuid;     /* 作成者の実効 UID */\n"
8825 "    gid_t          cgid;     /* 作成者の実効 GID */\n"
8826 "    unsigned short B<mode>;     /* B<許可> + SHM_DEST と\n"
8827 "                                SHM_LOCKED フラグ */\n"
8828 "    unsigned short __seq;    /* シーケンス番号 */\n"
8829 "};\n"
8830
8831 #. type: Plain text
8832 #: build/C/man2/shmctl.2:108
8833 msgid "Valid values for I<cmd> are:"
8834 msgstr "I<cmd> として有効な値は以下の通り:"
8835
8836 #. type: TP
8837 #: build/C/man2/shmctl.2:109
8838 #, no-wrap
8839 msgid "B<IPC_STAT>"
8840 msgstr "B<IPC_STAT>"
8841
8842 #. type: Plain text
8843 #: build/C/man2/shmctl.2:118
8844 msgid ""
8845 "Copy information from the kernel data structure associated with I<shmid> "
8846 "into the I<shmid_ds> structure pointed to by I<buf>.  The caller must have "
8847 "read permission on the shared memory segment."
8848 msgstr ""
8849 "I<shmid> に関連づけられたカーネルデータ構造体の情報を I<buf> で指された "
8850 "I<shmid_ds> 構造体にコピーする。 呼び出し元は共有メモリ・セグメントに対する "
8851 "読み込み許可を持たなければならない。"
8852
8853 #. type: TP
8854 #: build/C/man2/shmctl.2:118
8855 #, no-wrap
8856 msgid "B<IPC_SET>"
8857 msgstr "B<IPC_SET>"
8858
8859 #. type: Plain text
8860 #: build/C/man2/shmctl.2:136
8861 msgid ""
8862 "Write the values of some members of the I<shmid_ds> structure pointed to by "
8863 "I<buf> to the kernel data structure associated with this shared memory "
8864 "segment, updating also its I<shm_ctime> member.  The following fields can be "
8865 "changed: I<shm_perm.uid>, I<shm_perm.gid>, and (the least significant 9 bits "
8866 "of) I<shm_perm.mode>.  The effective UID of the calling process must match "
8867 "the owner (I<shm_perm.uid>)  or creator (I<shm_perm.cuid>)  of the shared "
8868 "memory segment, or the caller must be privileged."
8869 msgstr ""
8870 "I<buf> によって指される I<shmid_ds> 構造体のいくつかのメンバーの値を、 この共"
8871 "有メモリ・セグメントに関連づけられたカーネルデータ構造体に書き込み、 "
8872 "I<shm_ctime> メンバーも更新する。 以下のフィールドは変更できる。 I<shm_perm."
8873 "uid>, I<shm_perm.gid>, I<shm_perm.mode> (の最下位 9 ビット)。 呼び出したプロ"
8874 "セスの実効 UID が所有者 (I<shm_perm.uid>)  または作成者 (I<shm_perm.cuid>)  "
8875 "と一致するか、呼び出し元が特権を持たなければならない。"
8876
8877 #. type: TP
8878 #: build/C/man2/shmctl.2:136
8879 #, no-wrap
8880 msgid "B<IPC_RMID>"
8881 msgstr "B<IPC_RMID>"
8882
8883 #. type: Plain text
8884 #: build/C/man2/shmctl.2:153
8885 msgid ""
8886 "Mark the segment to be destroyed.  The segment will only actually be "
8887 "destroyed after the last process detaches it (i.e., when the I<shm_nattch> "
8888 "member of the associated structure I<shmid_ds> is zero).  The caller must be "
8889 "the owner or creator, or be privileged.  If a segment has been marked for "
8890 "destruction, then the (nonstandard)  B<SHM_DEST> flag of the I<shm_perm."
8891 "mode> field in the associated data structure retrieved by B<IPC_STAT> will "
8892 "be set."
8893 msgstr ""
8894 "セグメントに破棄済みのマークを付ける。 セグメントは、実際には最後プロセスがセ"
8895 "グメントを分離した (関連する I<shmid_ds> 構造体の I<shm_nattch> メンバーが 0 "
8896 "になった) 後でのみ破棄される。 呼び出し元は所有者か作成者であるか、特権を持た"
8897 "なければならない。 セグメントに破棄のマークが付けられると、 関連するデータ構"
8898 "造体において I<shm_perm.mode> フィールドの (標準ではない)  B<SHM_DEST> フラグ"
8899 "が設定される。 このデータ構造体は B<IPC_STAT> で取得される。"
8900
8901 #. type: Plain text
8902 #: build/C/man2/shmctl.2:156
8903 msgid ""
8904 "The caller I<must> ensure that a segment is eventually destroyed; otherwise "
8905 "its pages that were faulted in will remain in memory or swap."
8906 msgstr ""
8907 "呼び出し元は最終的にはセグメントを忘れずに破棄I<しなければならない>。 そうで"
8908 "なれば、フォールト (fault) されたページは メモリかスワップ (swap) に残り続け"
8909 "る。"
8910
8911 #. type: TP
8912 #: build/C/man2/shmctl.2:156
8913 #, no-wrap
8914 msgid "B<IPC_INFO> (Linux-specific)"
8915 msgstr "B<IPC_INFO> (Linux 固有)"
8916
8917 #. type: Plain text
8918 #: build/C/man2/shmctl.2:169
8919 msgid ""
8920 "Returns information about system-wide shared memory limits and parameters in "
8921 "the structure pointed to by I<buf>.  This structure is of type I<shminfo> "
8922 "(thus, a cast is required), defined in I<E<lt>sys/shm.hE<gt>> if the "
8923 "B<_GNU_SOURCE> feature test macro is defined:"
8924 msgstr ""
8925 "システム全体での共有メモリの制限とパラメータに関する情報を、 I<buf> が指す構"
8926 "造体に入れて返す。 この構造体は I<shminfo> 型である (そのためキャストが必要で"
8927 "ある)。 I<shminfo> は B<_GNU_SOURCE> 機能検査マクロが定義された場合に "
8928 "I<E<lt>sys/shm.hE<gt>> で以下のように定義される:"
8929
8930 #. type: Plain text
8931 #: build/C/man2/shmctl.2:183
8932 #, no-wrap
8933 msgid ""
8934 "struct  shminfo {\n"
8935 "    unsigned long shmmax; /* Maximum segment size */\n"
8936 "    unsigned long shmmin; /* Minimum segment size;\n"
8937 "                             always 1 */\n"
8938 "    unsigned long shmmni; /* Maximum number of segments */\n"
8939 "    unsigned long shmseg; /* Maximum number of segments\n"
8940 "                             that a process can attach;\n"
8941 "                             unused within kernel */\n"
8942 "    unsigned long shmall; /* Maximum number of pages of\n"
8943 "                             shared memory, system-wide */\n"
8944 "};\n"
8945 msgstr ""
8946 "struct  shminfo {\n"
8947 "    unsigned long shmmax; /* 最大セグメントサイズ */\n"
8948 "    unsigned long shmmin; /* 最小セグメントサイズ。\n"
8949 "                             常に 1 */\n"
8950 "    unsigned long shmmni; /* 最大セグメント数 */\n"
8951 "    unsigned long shmseg; /* プロセスが付加できる\n"
8952 "                             セグメントの最大数。\n"
8953 "                             カーネル内では未使用 */\n"
8954 "    unsigned long shmall; /* 共有メモリの最大ページ数。\n"
8955 "                             システム全体での値 */\n"
8956 "};\n"
8957
8958 #. type: Plain text
8959 #: build/C/man2/shmctl.2:196
8960 msgid ""
8961 "The I<shmmni>, I<shmmax>, and I<shmall> settings can be changed via I</proc> "
8962 "files of the same name; see B<proc>(5)  for details."
8963 msgstr ""
8964 "設定 I<shmmni>, I<shmmax>, I<shmall> は I</proc> にある同じ名前のファイル経由"
8965 "で変更可能である。 詳しくは B<proc>(5)  を参照。"
8966
8967 #. type: TP
8968 #: build/C/man2/shmctl.2:196
8969 #, no-wrap
8970 msgid "B<SHM_INFO> (Linux-specific)"
8971 msgstr "B<SHM_INFO> (Linux 固有)"
8972
8973 #. type: Plain text
8974 #: build/C/man2/shmctl.2:207
8975 msgid ""
8976 "Returns a I<shm_info> structure whose fields contain information about "
8977 "system resources consumed by shared memory.  This structure is defined in "
8978 "I<E<lt>sys/shm.hE<gt>> if the B<_GNU_SOURCE> feature test macro is defined:"
8979 msgstr ""
8980 "共有メモリが消費しているシステム資源に関する情報を 格納した I<shm_info> 構造"
8981 "体を返す。 この構造体は、 B<_GNU_SOURCE> 機能検査マクロが定義された場合に "
8982 "I<E<lt>sys/shm.hE<gt>> で以下のように定義される:"
8983
8984 #. type: Plain text
8985 #: build/C/man2/shmctl.2:224
8986 #, no-wrap
8987 msgid ""
8988 "struct shm_info {\n"
8989 "    int           used_ids; /* # of currently existing\n"
8990 "                               segments */\n"
8991 "    unsigned long shm_tot;  /* Total number of shared\n"
8992 "                               memory pages */\n"
8993 "    unsigned long shm_rss;  /* # of resident shared\n"
8994 "                               memory pages */\n"
8995 "    unsigned long shm_swp;  /* # of swapped shared\n"
8996 "                               memory pages */\n"
8997 "    unsigned long swap_attempts;\n"
8998 "                            /* Unused since Linux 2.4 */\n"
8999 "    unsigned long swap_successes;\n"
9000 "                            /* Unused since Linux 2.4 */\n"
9001 "};\n"
9002 msgstr ""
9003 "struct shm_info {\n"
9004 "    int           used_ids; /* 現在存在するセグメント数 */\n"
9005 "    unsigned long shm_tot;  /* 共有メモリのページ総数 */\n"
9006 "    unsigned long shm_rss;  /* メモリ上にある (スワップされて\n"
9007 "                               いない) 共有メモリページ数 */\n"
9008 "    unsigned long shm_swp;  /* スワップされている共有メモリ\n"
9009 "                               ページ数 */\n"
9010 "    unsigned long swap_attempts;\n"
9011 "                            /* Linux 2.4 以降では未使用 */\n"
9012 "    unsigned long swap_successes;\n"
9013 "                            /* Linux 2.4 以降では未使用 */\n"
9014 "};\n"
9015
9016 #. type: TP
9017 #: build/C/man2/shmctl.2:226
9018 #, no-wrap
9019 msgid "B<SHM_STAT> (Linux-specific)"
9020 msgstr "B<SHM_STAT> (Linux 固有)"
9021
9022 #. type: Plain text
9023 #: build/C/man2/shmctl.2:237
9024 msgid ""
9025 "Returns a I<shmid_ds> structure as for B<IPC_STAT>.  However, the I<shmid> "
9026 "argument is not a segment identifier, but instead an index into the kernel's "
9027 "internal array that maintains information about all shared memory segments "
9028 "on the system."
9029 msgstr ""
9030 "B<IPC_STAT> と同じく I<shmid_ds> 構造体を返す。 但し、 I<shmid> 引き数は、セ"
9031 "グメント識別子ではなく、システム上の全ての共有メモリ セグメントに関する情報を"
9032 "管理するカーネルの内部配列へのインデックス である。"
9033
9034 #. type: Plain text
9035 #: build/C/man2/shmctl.2:240
9036 msgid ""
9037 "The caller can prevent or allow swapping of a shared memory segment with the "
9038 "following I<cmd> values:"
9039 msgstr ""
9040 "呼び出し元は、I<cmd> に以下の値を指定することで、共有メモリ・セグメントが ス"
9041 "ワップされることを防止したり、許可したりできる:"
9042
9043 #. type: TP
9044 #: build/C/man2/shmctl.2:241
9045 #, no-wrap
9046 msgid "B<SHM_LOCK> (Linux-specific)"
9047 msgstr "B<SHM_LOCK> (Linux 固有)"
9048
9049 #. type: Plain text
9050 #: build/C/man2/shmctl.2:253
9051 msgid ""
9052 "Prevent swapping of the shared memory segment.  The caller must fault in any "
9053 "pages that are required to be present after locking is enabled.  If a "
9054 "segment has been locked, then the (nonstandard)  B<SHM_LOCKED> flag of the "
9055 "I<shm_perm.mode> field in the associated data structure retrieved by "
9056 "B<IPC_STAT> will be set."
9057 msgstr ""
9058 "共有メモリ・セグメントをスワップすることを防止する。 ロックが有効になった後、"
9059 "呼び出し元は、 存在することが要求された全てのページをフォールトさせなければな"
9060 "らない。 セグメントがロックされると、 関連するデータ構造体において "
9061 "I<shm_perm.mode> フィールドの (標準的ではない)  B<SHM_LOCKED> フラグが設定さ"
9062 "れる。 このデータ構造体は B<IPC_STAT> で取得される。"
9063
9064 #. type: TP
9065 #: build/C/man2/shmctl.2:253
9066 #, no-wrap
9067 msgid "B<SHM_UNLOCK> (Linux-specific)"
9068 msgstr "B<SHM_UNLOCK> (Linux 固有)"
9069
9070 #. type: Plain text
9071 #: build/C/man2/shmctl.2:256
9072 msgid "Unlock the segment, allowing it to be swapped out."
9073 msgstr "セグメントのロックを解除し、スワップ・アウトすることを可能にする。"
9074
9075 #.  There was some weirdness in 2.6.9: SHM_LOCK and SHM_UNLOCK could
9076 #.  be applied to a segment, regardless of ownership of the segment.
9077 #.  This was a botch-up in the move to RLIMIT_MEMLOCK, and was fixed
9078 #.  in 2.6.10.  MTK, May 2005
9079 #. type: Plain text
9080 #: build/C/man2/shmctl.2:274
9081 msgid ""
9082 "In kernels before 2.6.10, only a privileged process could employ B<SHM_LOCK> "
9083 "and B<SHM_UNLOCK>.  Since kernel 2.6.10, an unprivileged process can employ "
9084 "these operations if its effective UID matches the owner or creator UID of "
9085 "the segment, and (for B<SHM_LOCK>)  the amount of memory to be locked falls "
9086 "within the B<RLIMIT_MEMLOCK> resource limit (see B<setrlimit>(2))."
9087 msgstr ""
9088 "2.6.10 より前のカーネルでは、特権プロセスだけが B<SHM_LOCK> と B<SHM_UNLOCK> "
9089 "を利用することができた。 2.6.10 以降のカーネルでは、非特権プロセスであっても"
9090 "次の条件を満たせば これらの操作を利用することができる。その条件とは、プロセス"
9091 "の実効 UID がそのセグメントの所有者もしくは作成者の UID と一致し、 "
9092 "(B<SHM_LOCK> の場合には) ロックするメモリの合計が B<RLIMIT_MEMLOCK> リソース"
9093 "上限 (B<setrlimit>(2)  参照) の範囲内に入っていることである。"
9094
9095 #. type: Plain text
9096 #: build/C/man2/shmctl.2:292
9097 msgid ""
9098 "A successful B<IPC_INFO> or B<SHM_INFO> operation returns the index of the "
9099 "highest used entry in the kernel's internal array recording information "
9100 "about all shared memory segments.  (This information can be used with "
9101 "repeated B<SHM_STAT> operations to obtain information about all shared "
9102 "memory segments on the system.)  A successful B<SHM_STAT> operation returns "
9103 "the identifier of the shared memory segment whose index was given in "
9104 "I<shmid>.  Other operations return 0 on success."
9105 msgstr ""
9106 "B<IPC_INFO> と B<SHM_INFO> 操作は、成功すると、全ての共有メモリセグメントに関"
9107 "する情報を 管理しているカーネルの内部配列の使用中エントリのインデックスの う"
9108 "ち最大値を返す (この情報は、システムの全ての共有メモリセグメントに関する情報"
9109 "を 取得するために、 B<SHM_STAT> 操作を繰り返し実行する際に使用できる)。 "
9110 "B<SHM_STAT> 操作は、成功すると、 I<shmid> で指定されたインデックスを持つ共有"
9111 "メモリセグメントの識別子を返す。 他の操作は、成功の場合 0 を返す。"
9112
9113 #. type: Plain text
9114 #: build/C/man2/shmctl.2:296
9115 msgid "On error, -1 is returned, and I<errno> is set appropriately."
9116 msgstr "エラーの場合は -1 を返し、 I<errno> を適切に設定する。"
9117
9118 #. type: Plain text
9119 #: build/C/man2/shmctl.2:305
9120 msgid ""
9121 "B<IPC_STAT> or B<SHM_STAT> is requested and I<shm_perm.mode> does not allow "
9122 "read access for I<shmid>, and the calling process does not have the "
9123 "B<CAP_IPC_OWNER> capability."
9124 msgstr ""
9125 "B<IPC_STAT> または B<SHM_STAT> が要求され、 I<shm_perm.mode> が I<shmid> への"
9126 "読み込みアクセスを許しておらず、 かつ呼び出したプロセスが B<CAP_IPC_OWNER> "
9127 "ケーパビリティ (capability) を持っていない。"
9128
9129 #. type: Plain text
9130 #: build/C/man2/shmctl.2:316
9131 msgid ""
9132 "The argument I<cmd> has value B<IPC_SET> or B<IPC_STAT> but the address "
9133 "pointed to by I<buf> isn't accessible."
9134 msgstr ""
9135 "I<cmd> 引き数に B<IPC_SET> か B<IPC_STAT> が指定されたが I<buf> で指されてい"
9136 "るアドレスにアクセスできない。"
9137
9138 #. type: TP
9139 #: build/C/man2/shmctl.2:316 build/C/man2/shmop.2:197
9140 #, no-wrap
9141 msgid "B<EIDRM>"
9142 msgstr "B<EIDRM>"
9143
9144 #. type: Plain text
9145 #: build/C/man2/shmctl.2:319 build/C/man2/shmop.2:200
9146 msgid "I<shmid> points to a removed identifier."
9147 msgstr "I<shmid> が削除 (remove) された識別子 (identifier) を指している。"
9148
9149 #. type: Plain text
9150 #: build/C/man2/shmctl.2:328
9151 msgid ""
9152 "I<shmid> is not a valid identifier, or I<cmd> is not a valid command.  Or: "
9153 "for a B<SHM_STAT> operation, the index value specified in I<shmid> referred "
9154 "to an array slot that is currently unused."
9155 msgstr ""
9156 "I<shmid> が有効な識別子でないか、 I<cmd> が有効なコマンドでない。 もしくは、 "
9157 "B<SHM_STAT> 操作の場合に、 I<shmid> で指定されたインデックス値が現在未使用の"
9158 "配列のスロットを参照していた。"
9159
9160 #. type: Plain text
9161 #: build/C/man2/shmctl.2:339
9162 msgid ""
9163 "(In kernels since 2.6.9), B<SHM_LOCK> was specified and the size of the to-"
9164 "be-locked segment would mean that the total bytes in locked shared memory "
9165 "segments would exceed the limit for the real user ID of the calling "
9166 "process.  This limit is defined by the B<RLIMIT_MEMLOCK> soft resource limit "
9167 "(see B<setrlimit>(2))."
9168 msgstr ""
9169 "(2.6.9 以降のカーネルにおいて)  B<SHM_LOCK> が指定され、 ロックされる予定のセ"
9170 "グメントのサイズ (ロックされる共有メモリ・セグメントの合計バイト数) が、 呼び"
9171 "出したプロセスの実ユーザー ID についての制限を超えた。 この制限は "
9172 "B<RLIMIT_MEMLOCK> ソフト資源制限で定義される (B<setrlimit>(2)  を参照)。"
9173
9174 #. type: Plain text
9175 #: build/C/man2/shmctl.2:344
9176 msgid ""
9177 "B<IPC_STAT> is attempted, and the GID or UID value is too large to be stored "
9178 "in the structure pointed to by I<buf>."
9179 msgstr ""
9180 "B<IPC_STAT> が試みられ、GID や UID の値が I<buf> で指示される構造体に格納する"
9181 "には大き過ぎる。"
9182
9183 #. type: Plain text
9184 #: build/C/man2/shmctl.2:356
9185 msgid ""
9186 "B<IPC_SET> or B<IPC_RMID> is attempted, and the effective user ID of the "
9187 "calling process is not that of the creator (found in I<shm_perm.cuid>), or "
9188 "the owner (found in I<shm_perm.uid>), and the process was not privileged "
9189 "(Linux: did not have the B<CAP_SYS_ADMIN> capability)."
9190 msgstr ""
9191 "B<IPC_SET> か B<IPC_RMID> が試みられ、 呼び出したプロセスの実効ユーザー ID が"
9192 "作成者 (I<shm_perm.cuid>)  でも所有者 (I<shm_perm.uid>)  でもなく、プロセスが"
9193 "特権を持たない (Linux では B<CAP_SYS_ADMIN> ケーパビリティを持たない)。"
9194
9195 #. type: Plain text
9196 #: build/C/man2/shmctl.2:368
9197 msgid ""
9198 "Or (in kernels before 2.6.9), B<SHM_LOCK> or B<SHM_UNLOCK> was specified, "
9199 "but the process was not privileged (Linux: did not have the B<CAP_IPC_LOCK> "
9200 "capability).  (Since Linux 2.6.9, this error can also occur if the "
9201 "B<RLIMIT_MEMLOCK> is 0 and the caller is not privileged.)"
9202 msgstr ""
9203 "または (2.6.9 より前のカーネルで)  B<SHM_LOCK> または B<SHM_UNLOCK> が指定さ"
9204 "れているが、プロセスが特権を持たない (Linux では B<CAP_IPC_LOCK> ケーパビリ"
9205 "ティを持たない)。 (Linux 2.6.9 以降では、 B<RLIMIT_MEMLOCK> が 0 で呼び出し元"
9206 "が特権を持たない場合にも、このエラーが起こる。)"
9207
9208 #.  SVr4 documents an additional error condition EMFILE.
9209 #. type: Plain text
9210 #: build/C/man2/shmctl.2:373 build/C/man2/shmget.2:234
9211 #: build/C/man2/shmop.2:234
9212 msgid "SVr4, POSIX.1-2001."
9213 msgstr "SVr4, POSIX.1-2001."
9214
9215 #.  Like Linux, the FreeBSD man pages still document
9216 #.  the inclusion of these header files.
9217 #. type: Plain text
9218 #: build/C/man2/shmctl.2:386 build/C/man2/shmget.2:250
9219 msgid ""
9220 "The inclusion of I<E<lt>sys/types.hE<gt>> and I<E<lt>sys/ipc.hE<gt>> isn't "
9221 "required on Linux or by any version of POSIX.  However, some old "
9222 "implementations required the inclusion of these header files, and the SVID "
9223 "also documented their inclusion.  Applications intended to be portable to "
9224 "such old systems may need to include these header files."
9225 msgstr ""
9226
9227 #. type: Plain text
9228 #: build/C/man2/shmctl.2:397
9229 msgid ""
9230 "The B<IPC_INFO>, B<SHM_STAT> and B<SHM_INFO> operations are used by the "
9231 "B<ipcs>(1)  program to provide information on allocated resources.  In the "
9232 "future these may modified or moved to a /proc file system interface."
9233 msgstr ""
9234 "B<IPC_INFO>, B<SHM_STAT>, B<SHM_INFO> 操作は、 B<ipcs>(1)  プログラムで割り当"
9235 "て済の資源に関する情報を提供するために 使用されている。将来、これらの操作は変"
9236 "更されたり、 /proc ファイルシステムのインタフェースに移動されるかもしれない。"
9237
9238 #. type: Plain text
9239 #: build/C/man2/shmctl.2:405
9240 msgid ""
9241 "Linux permits a process to attach (B<shmat>(2))  a shared memory segment "
9242 "that has already been marked for deletion using I<shmctl(IPC_RMID)>.  This "
9243 "feature is not available on other UNIX implementations; portable "
9244 "applications should avoid relying on it."
9245 msgstr ""
9246 "Linux では、 I<shmctl(IPC_RMID)> を使ってすでに削除マークがつけられている共有"
9247 "メモリ・セグメントを あるプロセスが付加 (attach)  (B<shmat>(2))  することを許"
9248 "可している。 この機能は他の UNIX の実装では利用できない。 移植性を考慮したア"
9249 "プリケーションではこれに依存しないようにすべきである。"
9250
9251 #. type: Plain text
9252 #: build/C/man2/shmctl.2:418
9253 msgid ""
9254 "Various fields in a I<struct shmid_ds> were typed as I<short> under Linux "
9255 "2.2 and have become I<long> under Linux 2.4.  To take advantage of this, a "
9256 "recompilation under glibc-2.1.91 or later should suffice.  (The kernel "
9257 "distinguishes old and new calls by an B<IPC_64> flag in I<cmd>.)"
9258 msgstr ""
9259 "I<構造体 shmid_ds> 内の多くのフィールドは、 Linux 2.2 では I<short> 型だった"
9260 "が、Linux 2.4 では I<long> 型になった。 この利点を生かすには、glibc-2.1.91 以"
9261 "降の環境下で 再コンパイルすれば十分である。 カーネルは新しい形式の呼び出しと"
9262 "古い形式の呼び出しを I<cmd> 内の B<IPC_64> フラグで区別する。"
9263
9264 #. type: Plain text
9265 #: build/C/man2/shmctl.2:425
9266 msgid ""
9267 "B<mlock>(2), B<setrlimit>(2), B<shmget>(2), B<shmop>(2), B<capabilities>(7), "
9268 "B<svipc>(7)"
9269 msgstr ""
9270 "B<mlock>(2), B<setrlimit>(2), B<shmget>(2), B<shmop>(2), B<capabilities>(7), "
9271 "B<shm_overview>(7), B<svipc>(7)"
9272
9273 #. type: TH
9274 #: build/C/man2/shmget.2:38
9275 #, no-wrap
9276 msgid "SHMGET"
9277 msgstr "SHMGET"
9278
9279 #. type: Plain text
9280 #: build/C/man2/shmget.2:41
9281 msgid "shmget - allocates a shared memory segment"
9282 msgstr "shmget - 共有メモリ・セグメントを割り当てる"
9283
9284 #. type: Plain text
9285 #: build/C/man2/shmget.2:48
9286 msgid "B<int shmget(key_t >I<key>B<, size_t >I<size>B<, int >I<shmflg>B<);>"
9287 msgstr "B<int shmget(key_t >I<key>B<, size_t >I<size>B<, int >I<shmflg>B<);>"
9288
9289 #. type: Plain text
9290 #: build/C/man2/shmget.2:72
9291 msgid ""
9292 "B<shmget>()  returns the identifier of the shared memory segment associated "
9293 "with the value of the argument I<key>.  A new shared memory segment, with "
9294 "size equal to the value of I<size> rounded up to a multiple of B<PAGE_SIZE>, "
9295 "is created if I<key> has the value B<IPC_PRIVATE> or I<key> isn't "
9296 "B<IPC_PRIVATE>, no shared memory segment corresponding to I<key> exists, and "
9297 "B<IPC_CREAT> is specified in I<shmflg>."
9298 msgstr ""
9299 "B<shmget>()  は I<key> 引き数に対応する共有メモリ・セグメントの識別子を返"
9300 "す。 I<key> の値が B<IPC_PRIVATE> の場合、もしくは I<key> に対応する共有メモ"
9301 "リ・セグメントが存在せず、 I<shmflg> に B<IPC_CREAT> が指定されていた場合、 "
9302 "新しい共有メモリ・セグメントを作成する。 作成される共有メモリ・セグメント"
9303 "は、 I<size> 引き数の値を B<PAGE_SIZE> の倍数へと切り上げた (round up) 大きさ"
9304 "となる。"
9305
9306 #. type: Plain text
9307 #: build/C/man2/shmget.2:91
9308 msgid ""
9309 "If I<shmflg> specifies both B<IPC_CREAT> and B<IPC_EXCL> and a shared memory "
9310 "segment already exists for I<key>, then B<shmget>()  fails with I<errno> set "
9311 "to B<EEXIST>.  (This is analogous to the effect of the combination B<O_CREAT "
9312 "| O_EXCL> for B<open>(2).)"
9313 msgstr ""
9314 "I<shmflg> に B<IPC_CREAT> と B<IPC_EXCL> の両方が指定された場合、 I<key> に対"
9315 "応する共有メモリ・セグメントが既に存在すると、 B<shmget>()  は失敗し、 "
9316 "I<errno> に B<EEXIST> が設定される (これは B<open>(2)  に B<O_CREAT | "
9317 "O_EXCL> を指定した場合の動作と同じである)。"
9318
9319 #. type: Plain text
9320 #: build/C/man2/shmget.2:95
9321 msgid "The value I<shmflg> is composed of:"
9322 msgstr "I<shmflg> は以下の内容から構成される:"
9323
9324 #. type: TP
9325 #: build/C/man2/shmget.2:95
9326 #, no-wrap
9327 msgid "B<IPC_CREAT>"
9328 msgstr "B<IPC_CREAT>"
9329
9330 #. type: Plain text
9331 #: build/C/man2/shmget.2:102
9332 msgid ""
9333 "to create a new segment.  If this flag is not used, then B<shmget>()  will "
9334 "find the segment associated with I<key> and check to see if the user has "
9335 "permission to access the segment."
9336 msgstr ""
9337 "新しいセグメントを作成する。このフラグが指定されなかった場合、 B<shmget>()  "
9338 "は I<key> に対応するセグメントを探し、 ユーザがそのセグメントにアクセスする許"
9339 "可があるかどうかをチェックする。"
9340
9341 #. type: TP
9342 #: build/C/man2/shmget.2:102
9343 #, no-wrap
9344 msgid "B<IPC_EXCL>"
9345 msgstr "B<IPC_EXCL>"
9346
9347 #. type: Plain text
9348 #: build/C/man2/shmget.2:105
9349 msgid "used with B<IPC_CREAT> to ensure failure if the segment already exists."
9350 msgstr ""
9351 "B<IPC_CREAT> と共に使用し、セグメントが既に存在した場合には 失敗することを保"
9352 "証する。"
9353
9354 #. type: TP
9355 #: build/C/man2/shmget.2:105
9356 #, no-wrap
9357 msgid "I<mode_flags>"
9358 msgstr "I<mode_flags>"
9359
9360 #. type: Plain text
9361 #: build/C/man2/shmget.2:115
9362 msgid ""
9363 "(least significant 9 bits)  specifying the permissions granted to the owner, "
9364 "group, and world.  These bits have the same format, and the same meaning, as "
9365 "the I<mode> argument of B<open>(2).  Presently, the execute permissions are "
9366 "not used by the system."
9367 msgstr ""
9368 "(下位 9 ビット)  所有者、グループ、他人 (world) への許可を指定する。 これらの"
9369 "ビットは B<open>(2)  の I<mode> 引き数と同じ形式で同じ意味を持つ。 今のとこ"
9370 "ろ、システムは実行 (execute) 許可を参照しない。"
9371
9372 #. type: TP
9373 #: build/C/man2/shmget.2:115
9374 #, no-wrap
9375 msgid "B<SHM_HUGETLB> (since Linux 2.6)"
9376 msgstr "B<SHM_HUGETLB> (Linux 2.6 以降)"
9377
9378 #. type: Plain text
9379 #: build/C/man2/shmget.2:121
9380 #, fuzzy
9381 #| msgid ""
9382 #| "Allocate the segment using \"huge pages.\" See the kernel source file "
9383 #| "I<Documentation/vm/hugetlbpage.txt> for further information."
9384 msgid ""
9385 "Allocate the segment using \"huge pages.\" See the Linux kernel source file "
9386 "I<Documentation/vm/hugetlbpage.txt> for further information."
9387 msgstr ""
9388 "\"ヒュージページ (huge page)\" を使うセグメントを割り当てる。 詳細な情報は、"
9389 "カーネル・ソースのファイル I<Documentation/vm/hugetlbpage.txt> を参照。"
9390
9391 #. type: TP
9392 #: build/C/man2/shmget.2:121
9393 #, no-wrap
9394 msgid "B<SHM_NORESERVE> (since Linux 2.6.15)"
9395 msgstr "B<SHM_NORESERVE> (Linux 2.6.15 以降)"
9396
9397 #.  As at 2.6.17-rc2, this flag has no effect if SHM_HUGETLB was also
9398 #.  specified.
9399 #. type: Plain text
9400 #: build/C/man2/shmget.2:140
9401 msgid ""
9402 "This flag serves the same purpose as the B<mmap>(2)  B<MAP_NORESERVE> flag.  "
9403 "Do not reserve swap space for this segment.  When swap space is reserved, "
9404 "one has the guarantee that it is possible to modify the segment.  When swap "
9405 "space is not reserved one might get B<SIGSEGV> upon a write if no physical "
9406 "memory is available.  See also the discussion of the file I</proc/sys/vm/"
9407 "overcommit_memory> in B<proc>(5)."
9408 msgstr ""
9409 "このフラグは、 B<mmap>(2)  の B<MAP_NORESERVE> フラグと同じ役割を果たす。 こ"
9410 "のセグメントに対するスワップ空間の予約を行わない。 スワップ空間を予約した場合"
9411 "は、そのセグメントの変更が必ず成功することが 保証される。スワップ空間の予約を"
9412 "行わなかった場合は、物理メモリに空きが ないと書き込み時に B<SIGSEGV> を受け取"
9413 "る可能性がある。 B<proc>(5)  にある I</proc/sys/vm/overcommit_memory> ファイ"
9414 "ルに関する議論も参照のこと。"
9415
9416 #. type: Plain text
9417 #: build/C/man2/shmget.2:148
9418 msgid ""
9419 "When a new shared memory segment is created, its contents are initialized to "
9420 "zero values, and its associated data structure, I<shmid_ds> (see B<shmctl>"
9421 "(2)), is initialized as follows:"
9422 msgstr ""
9423 "共有メモリ・セグメントが新たに作成される際、 共有メモリ・セグメントの内容は "
9424 "0 で初期化され、 関連情報を保持するデータ構造体 I<shmid_ds> は以下のように初"
9425 "期化される。"
9426
9427 #. type: Plain text
9428 #: build/C/man2/shmget.2:153
9429 msgid ""
9430 "I<shm_perm.cuid> and I<shm_perm.uid> are set to the effective user ID of the "
9431 "calling process."
9432 msgstr ""
9433 "I<shm_perm.cuid> と I<shm_perm.uid> に呼び出し元プロセスの実効 (effective) "
9434 "ユーザーID を設定する。"
9435
9436 #. type: Plain text
9437 #: build/C/man2/shmget.2:158
9438 msgid ""
9439 "I<shm_perm.cgid> and I<shm_perm.gid> are set to the effective group ID of "
9440 "the calling process."
9441 msgstr ""
9442 "I<shm_perm.cgid> と I<shm_perm.gid> に呼び出し元プロセスの実効グループID を設"
9443 "定する。"
9444
9445 #. type: Plain text
9446 #: build/C/man2/shmget.2:163
9447 msgid ""
9448 "The least significant 9 bits of I<shm_perm.mode> are set to the least "
9449 "significant 9 bit of I<shmflg>."
9450 msgstr ""
9451 "I<shm_perm.mode> の下位 9 ビットに I<shmflg> の下位 9 ビットを設定する。"
9452
9453 #. type: Plain text
9454 #: build/C/man2/shmget.2:167
9455 msgid "I<shm_segsz> is set to the value of I<size>."
9456 msgstr "I<shm_segsz> に I<size> の値を設定する。"
9457
9458 #. type: Plain text
9459 #: build/C/man2/shmget.2:174
9460 msgid "I<shm_lpid>, I<shm_nattch>, I<shm_atime> and I<shm_dtime> are set to 0."
9461 msgstr ""
9462 "I<shm_lpid>, I<shm_nattch>, I<shm_atime>, I<shm_dtime> に 0 を設定する。"
9463
9464 #. type: Plain text
9465 #: build/C/man2/shmget.2:177
9466 msgid "I<shm_ctime> is set to the current time."
9467 msgstr "I<shm_ctime> に現在の時刻を設定する。"
9468
9469 #. type: Plain text
9470 #: build/C/man2/shmget.2:180
9471 msgid ""
9472 "If the shared memory segment already exists, the permissions are verified, "
9473 "and a check is made to see if it is marked for destruction."
9474 msgstr ""
9475 "共有メモリ・セグメントが既に存在する場合、アクセス許可の検査と、 破壊 "
9476 "(destruction) マークがつけられていないかのチェックが行われる。"
9477
9478 #. type: Plain text
9479 #: build/C/man2/shmget.2:184
9480 msgid ""
9481 "A valid segment identifier, I<shmid>, is returned on success, -1 on error."
9482 msgstr ""
9483 "成功した場合、有効なセグメント識別子 I<shmid> が返される。エラーの場合、 -1 "
9484 "が返される。"
9485
9486 #. type: Plain text
9487 #: build/C/man2/shmget.2:188
9488 msgid "On failure, I<errno> is set to one of the following:"
9489 msgstr "失敗した場合は I<errno> が以下のどれかに設定される:"
9490
9491 #. type: Plain text
9492 #: build/C/man2/shmget.2:194
9493 msgid ""
9494 "The user does not have permission to access the shared memory segment, and "
9495 "does not have the B<CAP_IPC_OWNER> capability."
9496 msgstr ""
9497 "ユーザーはその共有メモリ・セグメントへのアクセス許可を持たず、 "
9498 "B<CAP_IPC_OWNER> ケーパビリティも持っていない。"
9499
9500 #. type: Plain text
9501 #: build/C/man2/shmget.2:198
9502 msgid "B<IPC_CREAT | IPC_EXCL> was specified and the segment exists."
9503 msgstr ""
9504 "B<IPC_CREAT | IPC_EXCL> が指定されていたが、そのセグメントが既に存在する。"
9505
9506 #. type: Plain text
9507 #: build/C/man2/shmget.2:204
9508 msgid ""
9509 "A new segment was to be created and I<size> E<lt> B<SHMMIN> or I<size> E<gt> "
9510 "B<SHMMAX>, or no new segment was to be created, a segment with given key "
9511 "existed, but I<size> is greater than the size of that segment."
9512 msgstr ""
9513 "新しいセグメントを作成しようとした際に I<size> E<lt> B<SHMMIN> または "
9514 "I<size> E<gt> B<SHMMAX> であった。 もしくは、指定されたキーに対応するセグメン"
9515 "トが既に存在して、新しい セグメントを作成しようとはしなかったが、I<size> が存"
9516 "在するセグメントの サイズよりも大きかった。"
9517
9518 #. type: Plain text
9519 #: build/C/man2/shmget.2:213
9520 msgid ""
9521 "No segment exists for the given I<key>, and B<IPC_CREAT> was not specified."
9522 msgstr ""
9523 "指定された I<key> に対応するセグメントが存在せず、 B<IPC_CREAT> も指定されて"
9524 "いなかった。"
9525
9526 #. type: Plain text
9527 #: build/C/man2/shmget.2:216
9528 msgid "No memory could be allocated for segment overhead."
9529 msgstr "セグメントの管理情報 (overhead) に割り当てるメモリがなかった。"
9530
9531 #. type: Plain text
9532 #: build/C/man2/shmget.2:224
9533 msgid ""
9534 "All possible shared memory IDs have been taken (B<SHMMNI>), or allocating a "
9535 "segment of the requested I<size> would cause the system to exceed the system-"
9536 "wide limit on shared memory (B<SHMALL>)."
9537 msgstr ""
9538 "システム全体の共有メモリ・セグメント数の制限 (B<SHMMNI>)  に達した、または要"
9539 "求された I<size> のセグメントの割り当てが システム全体の共有メモリサイズの制"
9540 "限 (B<SHMALL>)  を超過した。"
9541
9542 #. type: Plain text
9543 #: build/C/man2/shmget.2:231
9544 msgid ""
9545 "The B<SHM_HUGETLB> flag was specified, but the caller was not privileged "
9546 "(did not have the B<CAP_IPC_LOCK> capability)."
9547 msgstr ""
9548 "B<SHM_HUGETLB> フラグが指定されたが、呼び出し元には権限がなかった "
9549 "(B<CAP_IPC_LOCK> ケーパビリティを持っていなかった)。"
9550
9551 #. type: Plain text
9552 #: build/C/man2/shmget.2:237
9553 msgid "B<SHM_HUGETLB> is a nonportable Linux extension."
9554 msgstr "B<SHM_HUGETLB> は Linux での拡張であり、移植性はない。"
9555
9556 #. type: Plain text
9557 #: build/C/man2/shmget.2:260
9558 msgid ""
9559 "B<IPC_PRIVATE> isn't a flag field but a I<key_t> type.  If this special "
9560 "value is used for I<key>, the system call ignores everything but the least "
9561 "significant 9 bits of I<shmflg> and creates a new shared memory segment (on "
9562 "success)."
9563 msgstr ""
9564 "B<IPC_PRIVATE> はフラグではなく I<key_t> 型である。 この特別な値が I<key> に"
9565 "使用された場合は、 B<shmget>()  は I<shmflg> の下位 9 ビットを除いた全てを無"
9566 "視し、 (成功すれば) 新しい共有メモリ・セグメントを作成する。"
9567
9568 #. type: Plain text
9569 #: build/C/man2/shmget.2:264
9570 msgid ""
9571 "The following limits on shared memory segment resources affect the B<shmget>"
9572 "()  call:"
9573 msgstr ""
9574 "B<shmget>()  コールに影響する共有メモリ・セグメント資源の制限は以下の通りであ"
9575 "る:"
9576
9577 #. type: TP
9578 #: build/C/man2/shmget.2:264
9579 #, no-wrap
9580 msgid "B<SHMALL>"
9581 msgstr "B<SHMALL>"
9582
9583 #. type: Plain text
9584 #: build/C/man2/shmget.2:269
9585 msgid ""
9586 "System wide maximum of shared memory pages (on Linux, this limit can be read "
9587 "and modified via I</proc/sys/kernel/shmall>)."
9588 msgstr ""
9589 "システム全体の共有メモリ・ページの最大数 (Linux では、この上限値は I</proc/"
9590 "sys/kernel/shmall> 経由で参照したり、変更したりできる)。"
9591
9592 #. type: TP
9593 #: build/C/man2/shmget.2:269
9594 #, no-wrap
9595 msgid "B<SHMMAX>"
9596 msgstr "B<SHMMAX>"
9597
9598 #. type: Plain text
9599 #: build/C/man2/shmget.2:274
9600 msgid ""
9601 "Maximum size in bytes for a shared memory segment: policy dependent (on "
9602 "Linux, this limit can be read and modified via I</proc/sys/kernel/shmmax>)."
9603 msgstr ""
9604 "共有メモリ・セグメントのバイト単位の大きさの上限: 方針依存 (Linux では、この"
9605 "上限値は I</proc/sys/kernel/shmmax> 経由で参照したり、変更したりできる)。"
9606
9607 #. type: TP
9608 #: build/C/man2/shmget.2:274
9609 #, no-wrap
9610 msgid "B<SHMMIN>"
9611 msgstr "B<SHMMIN>"
9612
9613 #. type: Plain text
9614 #: build/C/man2/shmget.2:280
9615 msgid ""
9616 "Minimum size in bytes for a shared memory segment: implementation dependent "
9617 "(currently 1 byte, though B<PAGE_SIZE> is the effective minimum size)."
9618 msgstr ""
9619 "共有メモリ・セグメントのバイト単位の大きさの下限: 実装依存 (現在は 1 バイトだ"
9620 "が、実質的な最小サイズは B<PAGE_SIZE> である)。"
9621
9622 #. type: TP
9623 #: build/C/man2/shmget.2:280
9624 #, no-wrap
9625 msgid "B<SHMMNI>"
9626 msgstr "B<SHMMNI>"
9627
9628 #.  Kernels between 2.4.x and 2.6.8 had an off-by-one error that meant
9629 #.  that we could create one more segment than SHMMNI -- MTK
9630 #.  This /proc file is not available in Linux 2.2 and earlier -- MTK
9631 #. type: Plain text
9632 #: build/C/man2/shmget.2:289
9633 msgid ""
9634 "System wide maximum number of shared memory segments: implementation "
9635 "dependent (currently 4096, was 128 before Linux 2.3.99; on Linux, this limit "
9636 "can be read and modified via I</proc/sys/kernel/shmmni>)."
9637 msgstr ""
9638 "システム全体の共有メモリーの数の上限: 実装依存 (現在は 4096。Linux 2.3.99 よ"
9639 "り前では 128。 Linux では、この上限値は I</proc/sys/kernel/shmmni> 経由で参照"
9640 "したり、変更したりできる)。"
9641
9642 #. type: Plain text
9643 #: build/C/man2/shmget.2:293
9644 msgid ""
9645 "The implementation has no specific limits for the per-process maximum number "
9646 "of shared memory segments (B<SHMSEG>)."
9647 msgstr ""
9648 "プロセス当りの共有メモリ・セグメントの個数の最大値 (B<SHMSEG>)  に関する実装"
9649 "上の制限はない。"
9650
9651 #. type: Plain text
9652 #: build/C/man2/shmget.2:299
9653 msgid ""
9654 "Until version 2.3.30 Linux would return B<EIDRM> for a B<shmget>()  on a "
9655 "shared memory segment scheduled for deletion."
9656 msgstr ""
9657 "バージョン 2.3.30 までは、Linux は 削除が予定されている共有メモリ・セグメント"
9658 "に対して B<shmget>()  が行われると B<EIDRM> を返していた。"
9659
9660 #. type: Plain text
9661 #: build/C/man2/shmget.2:305
9662 msgid ""
9663 "The name choice B<IPC_PRIVATE> was perhaps unfortunate, B<IPC_NEW> would "
9664 "more clearly show its function."
9665 msgstr ""
9666 "B<IPC_PRIVATE> という名前を選んだのはおそらく失敗であろう。 B<IPC_NEW> の方が"
9667 "より明確にその機能を表しているだろう。"
9668
9669 #. type: Plain text
9670 #: build/C/man2/shmget.2:313
9671 msgid ""
9672 "B<shmat>(2), B<shmctl>(2), B<shmdt>(2), B<ftok>(3), B<capabilities>(7), "
9673 "B<shm_overview>(7), B<svipc>(7)"
9674 msgstr ""
9675 "B<shmat>(2), B<shmctl>(2), B<shmdt>(2), B<ftok>(3), B<capabilities>(7), "
9676 "B<shm_overview>(7), B<svipc>(7)"
9677
9678 #. type: TH
9679 #: build/C/man2/shmop.2:41
9680 #, no-wrap
9681 msgid "SHMOP"
9682 msgstr "SHMOP"
9683
9684 #. type: Plain text
9685 #: build/C/man2/shmop.2:44
9686 msgid "shmat, shmdt - shared memory operations"
9687 msgstr "shmat, shmdt - 共有メモリ (shared memory) の操作"
9688
9689 #. type: Plain text
9690 #: build/C/man2/shmop.2:48
9691 #, no-wrap
9692 msgid ""
9693 "B<#include E<lt>sys/types.hE<gt>>\n"
9694 "B<#include E<lt>sys/shm.hE<gt>>\n"
9695 msgstr ""
9696 "B<#include E<lt>sys/types.hE<gt>>\n"
9697 "B<#include E<lt>sys/shm.hE<gt>>\n"
9698
9699 #. type: Plain text
9700 #: build/C/man2/shmop.2:50
9701 #, no-wrap
9702 msgid "B<void *shmat(int >I<shmid>B<, const void *>I<shmaddr>B<, int >I<shmflg>B<);>\n"
9703 msgstr "B<void *shmat(int >I<shmid>B<, const void *>I<shmaddr>B<, int >I<shmflg>B<);>\n"
9704
9705 #. type: Plain text
9706 #: build/C/man2/shmop.2:52
9707 #, no-wrap
9708 msgid "B<int shmdt(const void *>I<shmaddr>B<);>\n"
9709 msgstr "B<int shmdt(const void *>I<shmaddr>B<);>\n"
9710
9711 #. type: Plain text
9712 #: build/C/man2/shmop.2:61
9713 msgid ""
9714 "B<shmat>()  attaches the shared memory segment identified by I<shmid> to the "
9715 "address space of the calling process.  The attaching address is specified by "
9716 "I<shmaddr> with one of the following criteria:"
9717 msgstr ""
9718 "B<shmat>()  は I<shmid> で指定された共有メモリ・セグメント (shared memory "
9719 "segment) を コールしたプロセスのアドレス空間に付加 (attach) する。 付加するア"
9720 "ドレスは I<shmaddr> に以下のどれかの形式で指定する:"
9721
9722 #. type: Plain text
9723 #: build/C/man2/shmop.2:67
9724 msgid ""
9725 "If I<shmaddr> is NULL, the system chooses a suitable (unused) address at "
9726 "which to attach the segment."
9727 msgstr ""
9728 "I<shmaddr> が NULL ならば、システムはセグメントを付加するための 適切な (使用"
9729 "されていない) アドレスを選択する。"
9730
9731 #. type: Plain text
9732 #: build/C/man2/shmop.2:82
9733 msgid ""
9734 "If I<shmaddr> isn't NULL and B<SHM_RND> is specified in I<shmflg>, the "
9735 "attach occurs at the address equal to I<shmaddr> rounded down to the nearest "
9736 "multiple of B<SHMLBA>.  Otherwise I<shmaddr> must be a page-aligned address "
9737 "at which the attach occurs."
9738 msgstr ""
9739 "I<shmaddr> が NULL でなく B<SHM_RND> が I<shmflg> に指定されている場合は、 "
9740 "I<shmaddr> を B<SHMLBA> の倍数へと切り捨てた (rounding down) のと等しいアドレ"
9741 "スへ付加する。 その他の場合は I<shmaddr> は付加を行なうアドレスで、ページ境界"
9742 "を指している必要がある。"
9743
9744 #. type: Plain text
9745 #: build/C/man2/shmop.2:92
9746 msgid ""
9747 "If B<SHM_RDONLY> is specified in I<shmflg>, the segment is attached for "
9748 "reading and the process must have read permission for the segment.  "
9749 "Otherwise the segment is attached for read and write and the process must "
9750 "have read and write permission for the segment.  There is no notion of a "
9751 "write-only shared memory segment."
9752 msgstr ""
9753 "B<SHM_RDONLY> が I<shmflg> に指定されていた場合は、 セグメントは読み込み専用"
9754 "に付加され、プロセスはそのセグメントへの 読み込み許可を持たなければならな"
9755 "い。 そうでなければそのセグメントは読み込みと書き込みのために付加され、 プロ"
9756 "セスはそのセグメントに読み込みと書き込みの許可を持つ必要がある。 書き込み専用"
9757 "の共有メモリ・セグメントという概念は存在しない。"
9758
9759 #. type: Plain text
9760 #: build/C/man2/shmop.2:107
9761 msgid ""
9762 "The (Linux-specific)  B<SHM_REMAP> flag may be specified in I<shmflg> to "
9763 "indicate that the mapping of the segment should replace any existing mapping "
9764 "in the range starting at I<shmaddr> and continuing for the size of the "
9765 "segment.  (Normally an B<EINVAL> error would result if a mapping already "
9766 "exists in this address range.)  In this case, I<shmaddr> must not be NULL."
9767 msgstr ""
9768 "(Linux 特有の)  B<SHM_REMAP> フラグが I<shmflg> に指定された場合は、 セグメン"
9769 "トのマッピングを既存のマッピングに置き換える。 マッピングの範囲は、 "
9770 "I<shmaddr> から始まりセグメントのサイズ分だけある (通常 B<EINVAL> エラーは、"
9771 "このアドレス範囲にマッピングが既に存在するために起る)。 このフラグを指定する"
9772 "場合は、 I<shmaddr> が NULL であってはならない。"
9773
9774 #. type: Plain text
9775 #: build/C/man2/shmop.2:114
9776 msgid ""
9777 "The B<brk>(2)  value of the calling process is not altered by the attach.  "
9778 "The segment will automatically be detached at process exit.  The same "
9779 "segment may be attached as a read and as a read-write one, and more than "
9780 "once, in the process's address space."
9781 msgstr ""
9782 "呼び出したプロセスの B<brk>(2)  の値は付加によって変化しない。 そのセグメント"
9783 "はプロセスが終了 (exit) したら自動的に分離 (detach) される。 同じセグメントを"
9784 "プロセスのアドレス空間に、読み込み専用および読み書き両用 として付加でき、また"
9785 "複数回付加することもできる。"
9786
9787 #. type: Plain text
9788 #: build/C/man2/shmop.2:122
9789 msgid ""
9790 "A successful B<shmat>()  call updates the members of the I<shmid_ds> "
9791 "structure (see B<shmctl>(2))  associated with the shared memory segment as "
9792 "follows:"
9793 msgstr ""
9794 "成功した B<shmat>()  コールは共有メモリ・セグメントに関連する I<shmid_ds> 構"
9795 "造体 (B<shmctl>(2)  を参照) のメンバーを以下のように更新する:"
9796
9797 #. type: Plain text
9798 #: build/C/man2/shmop.2:125
9799 msgid "I<shm_atime> is set to the current time."
9800 msgstr "I<shm_atime> には現在の時刻を設定する。"
9801
9802 #. type: Plain text
9803 #: build/C/man2/shmop.2:128 build/C/man2/shmop.2:154
9804 msgid "I<shm_lpid> is set to the process-ID of the calling process."
9805 msgstr "I<shm_lpid> には呼び出したプロセスのプロセス ID が設定される。"
9806
9807 #. type: Plain text
9808 #: build/C/man2/shmop.2:131
9809 msgid "I<shm_nattch> is incremented by one."
9810 msgstr "I<shm_nattch> を 1 増加させる。"
9811
9812 #. type: Plain text
9813 #: build/C/man2/shmop.2:142
9814 msgid ""
9815 "B<shmdt>()  detaches the shared memory segment located at the address "
9816 "specified by I<shmaddr> from the address space of the calling process.  The "
9817 "to-be-detached segment must be currently attached with I<shmaddr> equal to "
9818 "the value returned by the attaching B<shmat>()  call."
9819 msgstr ""
9820 "B<shmdt>()  は呼び出したプロセスのアドレス空間から I<shmaddr> で指定されたア"
9821 "ドレスに配置された共有メモリ・セグメントを分離 (detach) する。 分離する共有メ"
9822 "モリ・セグメントは、現在 I<shmaddr> に付加されているものでなければならない。 "
9823 "I<shmaddr> は、それを付加した時に B<shmat>()  が返した値に等しくなければなら"
9824 "ない。"
9825
9826 #. type: Plain text
9827 #: build/C/man2/shmop.2:148
9828 msgid ""
9829 "On a successful B<shmdt>()  call the system updates the members of the "
9830 "I<shmid_ds> structure associated with the shared memory segment as follows:"
9831 msgstr ""
9832 "成功した B<shmdt>()  コールはその共有メモリ・セグメントに関連する "
9833 "I<shmid_ds> 構造体のメンバーを以下のように更新する:"
9834
9835 #. type: Plain text
9836 #: build/C/man2/shmop.2:151
9837 msgid "I<shm_dtime> is set to the current time."
9838 msgstr "I<shm_dtime> には現在の時刻が設定される。"
9839
9840 #. type: Plain text
9841 #: build/C/man2/shmop.2:159
9842 msgid ""
9843 "I<shm_nattch> is decremented by one.  If it becomes 0 and the segment is "
9844 "marked for deletion, the segment is deleted."
9845 msgstr ""
9846 "I<shm_nattch> を 1 減少させる。 もし 0 になり、削除マークがあった場合は その"
9847 "セグメントは削除される。"
9848
9849 #. type: Plain text
9850 #: build/C/man2/shmop.2:163
9851 msgid ""
9852 "After a B<fork>(2)  the child inherits the attached shared memory segments."
9853 msgstr ""
9854 "B<fork>(2)  した後、子プロセスは付加された共有メモリ・セグメントを継承する。"
9855
9856 #. type: Plain text
9857 #: build/C/man2/shmop.2:167
9858 msgid ""
9859 "After an B<execve>(2)  all attached shared memory segments are detached from "
9860 "the process."
9861 msgstr ""
9862 "B<exec>(2)  した後、全ての付加された共有メモリ・セグメントはプロセスから分離"
9863 "される。"
9864
9865 #. type: Plain text
9866 #: build/C/man2/shmop.2:171
9867 msgid ""
9868 "Upon B<_exit>(2)  all attached shared memory segments are detached from the "
9869 "process."
9870 msgstr ""
9871 "B<exit>(2)  において、全ての付加された共有メモリ・セグメントはプロセスから分"
9872 "離される。"
9873
9874 #. type: Plain text
9875 #: build/C/man2/shmop.2:179
9876 msgid ""
9877 "On success B<shmat>()  returns the address of the attached shared memory "
9878 "segment; on error I<(void\\ *)\\ -1> is returned, and I<errno> is set to "
9879 "indicate the cause of the error."
9880 msgstr ""
9881 "B<shmat>()  は、成功した場合、 付加された共有メモリ・セグメントのアドレスを返"
9882 "す。 エラーの場合、 I<(void\\ *)\\ -1> を返し、 I<errno> にエラーの原因を示す"
9883 "値を設定する。"
9884
9885 #. type: Plain text
9886 #: build/C/man2/shmop.2:185
9887 msgid ""
9888 "On success B<shmdt>()  returns 0; on error -1 is returned, and I<errno> is "
9889 "set to indicate the cause of the error."
9890 msgstr ""
9891 "B<shmdt>()  は、成功すると 0 を返す。 エラーの場合、-1 を返し、 I<errno> にエ"
9892 "ラーの原因を示す値を設定する。"
9893
9894 #. type: Plain text
9895 #: build/C/man2/shmop.2:191
9896 msgid "When B<shmat>()  fails, I<errno> is set to one of the following:"
9897 msgstr ""
9898 "B<shmat>()  が失敗した場合、 I<errno> に以下の値のどれかを設定して返す:"
9899
9900 #. type: Plain text
9901 #: build/C/man2/shmop.2:197
9902 msgid ""
9903 "The calling process does not have the required permissions for the requested "
9904 "attach type, and does not have the B<CAP_IPC_OWNER> capability."
9905 msgstr ""
9906 "呼び出したプロセスに要求された種類の付加に必要な許可がなく、 "
9907 "B<CAP_IPC_OWNER> ケーパビリティ (capability) がない。"
9908
9909 #. type: Plain text
9910 #: build/C/man2/shmop.2:214
9911 msgid ""
9912 "Invalid I<shmid> value, unaligned (i.e., not page-aligned and B<SHM_RND> was "
9913 "not specified) or invalid I<shmaddr> value, or can't attach segment at "
9914 "I<shmaddr>, or B<SHM_REMAP> was specified and I<shmaddr> was NULL."
9915 msgstr ""
9916 "I<shmid> の値が不正である。 I<shmaddr> の値が境界違反 (unaligned) (つまり、"
9917 "ページ境界に合っておらず、 B<SHM_RND> が指定されていない) または が不正であ"
9918 "る。 I<shmaddr> へのセグメントの付加に失敗した。 または B<SHM_REMAP> が指定さ"
9919 "れているが、 I<shmaddr> が NULL であった。"
9920
9921 #. type: Plain text
9922 #: build/C/man2/shmop.2:217
9923 msgid "Could not allocate memory for the descriptor or for the page tables."
9924 msgstr ""
9925 "ディスクリプター (descriptor) やページ・テーブルのためのメモリを 割り当てるこ"
9926 "とができない。"
9927
9928 #. type: Plain text
9929 #: build/C/man2/shmop.2:223
9930 msgid "When B<shmdt>()  fails, I<errno> is set as follows:"
9931 msgstr "B<shmdt>()  が失敗した場合、 B<EINVAL> は以下のようにセットされる:"
9932
9933 #.  The following since 2.6.17-rc1:
9934 #. type: Plain text
9935 #: build/C/man2/shmop.2:231
9936 msgid ""
9937 "There is no shared memory segment attached at I<shmaddr>; or, I<shmaddr> is "
9938 "not aligned on a page boundary."
9939 msgstr ""
9940 "I<shmaddr> に付加された共有メモリ・セグメントが存在しない。 もしくは、 "
9941 "I<shmaddr> がページ境界に合っていない。"
9942
9943 #. type: Plain text
9944 #: build/C/man2/shmop.2:250
9945 msgid ""
9946 "In SVID 3 (or perhaps earlier)  the type of the I<shmaddr> argument was "
9947 "changed from I<char *> into I<const void *>, and the returned type of "
9948 "B<shmat>()  from I<char *> into I<void *>.  (Linux libc4 and libc5 have the "
9949 "I<char *> prototypes; glibc2 has I<void *>.)"
9950 msgstr ""
9951 "SVID 3 で (たぶんそれより前だと思うが)  I<shmaddr> 引き数の型は I<char *> か"
9952 "ら I<const void *> に、I<shmat>() の返り値の型は I<char *> から I<void *> に"
9953 "変更された (Linux では libc4 と libc5 のプロトタイプは I<char *> であり、"
9954 "glibc2 のプロトタイプは I<void *> である)。"
9955
9956 #. type: Plain text
9957 #: build/C/man2/shmop.2:262
9958 msgid ""
9959 "Using B<shmat>()  with I<shmaddr> equal to NULL is the preferred, portable "
9960 "way of attaching a shared memory segment.  Be aware that the shared memory "
9961 "segment attached in this way may be attached at different addresses in "
9962 "different processes.  Therefore, any pointers maintained within the shared "
9963 "memory must be made relative (typically to the starting address of the "
9964 "segment), rather than absolute."
9965 msgstr ""
9966 "共有メモリセグメントを付加する場合の移植性の高い方法としては、 I<shmaddr> を "
9967 "NULL にして B<shmat>()  を使用するのがよい。 このような方法で付加される共有メ"
9968 "モリセグメントは、 プロセスが異なれば別のアドレスに付加される、という点に注意"
9969 "すること。 よって共有メモリ内で管理されるポインタは、 絶対アドレスではなく、 "
9970 "(一般的にはセグメントの開始アドレスからの)  相対アドレスで作成するべきであ"
9971 "る。"
9972
9973 #. type: Plain text
9974 #: build/C/man2/shmop.2:267
9975 msgid ""
9976 "On Linux, it is possible to attach a shared memory segment even if it is "
9977 "already marked to be deleted.  However, POSIX.1-2001 does not specify this "
9978 "behavior and many other implementations do not support it."
9979 msgstr ""
9980 "Linux では共有メモリセグメントに既に削除マークが付けられていても、 その共有メ"
9981 "モリセグメントを付加することができる。 しかし POSIX.1-2001 ではこのような動作"
9982 "を指定しておらず、 他の多くの実装もこれをサポートしていない。"
9983
9984 #. type: Plain text
9985 #: build/C/man2/shmop.2:270
9986 msgid "The following system parameter affects B<shmat>():"
9987 msgstr "以下のシステム・パラメーターは、 B<shmat>()  に影響する:"
9988
9989 #.  FIXME A good explanation of the rationale for the existence
9990 #.  of SHMLBA would be useful here
9991 #. type: TP
9992 #: build/C/man2/shmop.2:270
9993 #, no-wrap
9994 msgid "B<SHMLBA>"
9995 msgstr "B<SHMLBA>"
9996
9997 #.  FIXME That last sentence isn't true for all Linux
9998 #.  architectures (i.e., SHMLBA != PAGE_SIZE for some architectures)
9999 #.  -- MTK, Nov 04
10000 #. type: Plain text
10001 #: build/C/man2/shmop.2:283
10002 msgid ""
10003 "Segment low boundary address multiple.  Must be page aligned.  For the "
10004 "current implementation the B<SHMLBA> value is B<PAGE_SIZE>."
10005 msgstr ""
10006 "セグメントの境界アドレスの最小倍数。ページ境界に合ってなければならない。 現在"
10007 "の実装では B<SHMLBA> の値は B<PAGE_SIZE> である。"
10008
10009 #. type: Plain text
10010 #: build/C/man2/shmop.2:287
10011 msgid ""
10012 "The implementation places no intrinsic limit on the per-process maximum "
10013 "number of shared memory segments (B<SHMSEG>)."
10014 msgstr ""
10015 "現在の実装では、プロセスごとの 共有メモリ・セグメントの最大数 (B<SHMSEG>)  に"
10016 "関する実装依存の制限はない。"
10017
10018 #. type: Plain text
10019 #: build/C/man2/shmop.2:295
10020 msgid ""
10021 "B<brk>(2), B<mmap>(2), B<shmctl>(2), B<shmget>(2), B<capabilities>(7), "
10022 "B<shm_overview>(7), B<svipc>(7)"
10023 msgstr ""
10024 "B<brk>(2), B<mmap>(2), B<shmctl>(2), B<shmget>(2), B<capabilities>(7), "
10025 "B<shm_overview>(7), B<svipc>(7)"
10026
10027 #. type: TH
10028 #: build/C/man2/subpage_prot.2:30
10029 #, no-wrap
10030 msgid "SUBPAGE_PROT"
10031 msgstr "SUBPAGE_PROT"
10032
10033 #. type: TH
10034 #: build/C/man2/subpage_prot.2:30
10035 #, fuzzy, no-wrap
10036 #| msgid "2012-04-23"
10037 msgid "2012-07-13"
10038 msgstr "2012-04-23"
10039
10040 #. type: Plain text
10041 #: build/C/man2/subpage_prot.2:33
10042 msgid "subpage_prot - define a subpage protection for an address range"
10043 msgstr ""
10044
10045 #. type: Plain text
10046 #: build/C/man2/subpage_prot.2:37
10047 #, no-wrap
10048 msgid ""
10049 "B<long subpage_prot(unsigned long >I<addr>B<, unsigned long >I<len>B<,>\n"
10050 "B<                  uint32_t *>I<map>B<);>\n"
10051 msgstr ""
10052 "B<long subpage_prot(unsigned long >I<addr>B<, unsigned long >I<len>B<,>\n"
10053 "B<                  uint32_t *>I<map>B<);>\n"
10054
10055 #. type: Plain text
10056 #: build/C/man2/subpage_prot.2:41
10057 msgid "I<Note>: There is no glibc wrapper for this system call; see NOTES."
10058 msgstr ""
10059
10060 #. type: Plain text
10061 #: build/C/man2/subpage_prot.2:47
10062 msgid ""
10063 "The PowerPC-specific B<subpage_prot>()  system call provides the facility to "
10064 "control the access permissions on individual 4kB subpages on systems "
10065 "configured with a page size of 64kB."
10066 msgstr ""
10067
10068 #. type: Plain text
10069 #: build/C/man2/subpage_prot.2:54
10070 msgid ""
10071 "The protection map is applied to the memory pages in the region starting at "
10072 "I<addr> and continuing for I<len> bytes.  Both of these arguments must be "
10073 "aligned to a 64-kB boundary."
10074 msgstr ""
10075
10076 #. type: Plain text
10077 #: build/C/man2/subpage_prot.2:66
10078 msgid ""
10079 "The protection map is specified in the buffer pointed to by I<map>.  The map "
10080 "has 2 bits per 4kB subpage; thus each 32-bit word specifies the protections "
10081 "of 16 4kB subpages inside a 64kB page (so, the number of 32-bit words "
10082 "pointed to by I<map> should equate to the number of 64-kB pages specified by "
10083 "I<len>).  Each 2-bit field in the protection map is either 0 to allow any "
10084 "access, 1 to prevent writes, or 2 or 3 to prevent all accesses."
10085 msgstr ""
10086
10087 #. type: Plain text
10088 #: build/C/man2/subpage_prot.2:71
10089 msgid ""
10090 "On success, B<subpage_prot>()  returns 0.  Otherwise, one of the error codes "
10091 "specified below is returned."
10092 msgstr ""
10093
10094 #. type: Plain text
10095 #: build/C/man2/subpage_prot.2:77
10096 msgid "The buffer referred to by I<map> is not accessible."
10097 msgstr ""
10098
10099 #. type: Plain text
10100 #: build/C/man2/subpage_prot.2:87
10101 msgid ""
10102 "The I<addr> or I<len> arguments are incorrect.  Both of these arguments must "
10103 "be aligned to a multiple of the system page size, and they must not refer to "
10104 "a region outside of the address space of the process or to a region that "
10105 "consists of huge pages."
10106 msgstr ""
10107
10108 #. type: Plain text
10109 #: build/C/man2/subpage_prot.2:90 build/C/man2/sync_file_range.2:166
10110 msgid "Out of memory."
10111 msgstr "メモリ不足である。"
10112
10113 #. type: Plain text
10114 #: build/C/man2/subpage_prot.2:96
10115 msgid ""
10116 "This system call is provided on the PowerPC architecture since Linux "
10117 "2.6.25.  The system call is provided only if the kernel is configured with "
10118 "B<CONFIG_PPC_64K_PAGES>.  No library support is provided."
10119 msgstr ""
10120
10121 #. type: Plain text
10122 #: build/C/man2/subpage_prot.2:101
10123 msgid ""
10124 "Glibc does not provide a wrapper for this system call; call it using "
10125 "B<syscall>(2)."
10126 msgstr ""
10127
10128 #. type: Plain text
10129 #: build/C/man2/subpage_prot.2:106
10130 msgid ""
10131 "Normal page protections (at the 64-kB page level) also apply; the subpage "
10132 "protection mechanism is an additional constraint, so putting 0 in a 2-bit "
10133 "field won't allow writes to a page that is otherwise write-protected."
10134 msgstr ""
10135
10136 #. type: SS
10137 #: build/C/man2/subpage_prot.2:106
10138 #, no-wrap
10139 msgid "Rationale"
10140 msgstr ""
10141
10142 #.  In the initial implementation, it was the case that:
10143 #.      In fact the whole process is switched to use 4k hardware pages when the
10144 #.      subpage_prot system call is used, but this could be improved in future
10145 #.      to switch only the affected segments.
10146 #.  But Paul Mackerass says (Oct 2010): I'm pretty sure we now only switch
10147 #.  the affected segment, not the whole process.
10148 #. type: Plain text
10149 #: build/C/man2/subpage_prot.2:128
10150 msgid ""
10151 "This system call is provided to assist writing emulators that operate using "
10152 "64-kB pages on PowerPC systems.  When emulating systems such as x86, which "
10153 "uses a smaller page size, the emulator can no longer use the memory-"
10154 "management unit (MMU)  and normal system calls for controlling page "
10155 "protections.  (The emulator could emulate the MMU by checking and possibly "
10156 "remapping the address for each memory access in software, but that is "
10157 "slow.)  The idea is that the emulator supplies an array of protection masks "
10158 "to apply to a specified range of virtual addresses.  These masks are applied "
10159 "at the level where hardware page-table entries (PTEs)  are inserted into the "
10160 "hardware page table based on the Linux PTEs, so the Linux PTEs are not "
10161 "affected.  Implicit in this is that the regions of the address space that "
10162 "are protected are switched to use 4-kB hardware pages rather than 64-kB "
10163 "hardware pages (on machines with hardware 64-kB page support)."
10164 msgstr ""
10165
10166 #. type: Plain text
10167 #: build/C/man2/subpage_prot.2:131
10168 #, fuzzy
10169 #| msgid "B<mprotect>(2), B<syscall>(2);"
10170 msgid "B<mprotect>(2), B<syscall>(2)"
10171 msgstr "B<mprotect>(2), B<syscall>(2);"
10172
10173 #. type: Plain text
10174 #: build/C/man2/subpage_prot.2:134
10175 msgid "I<Documentation/vm/hugetlbpage.txt> in the Linux kernel source tree"
10176 msgstr ""
10177
10178 #. type: TH
10179 #: build/C/man2/sync_file_range.2:30
10180 #, no-wrap
10181 msgid "SYNC_FILE_RANGE"
10182 msgstr "SYNC_FILE_RANGE"
10183
10184 #. type: Plain text
10185 #: build/C/man2/sync_file_range.2:33
10186 msgid "sync_file_range - sync a file segment with disk"
10187 msgstr "sync_file_range - ファイルセグメントをディスクと同期する"
10188
10189 #. type: Plain text
10190 #: build/C/man2/sync_file_range.2:37
10191 #, no-wrap
10192 msgid ""
10193 "B<#define _GNU_SOURCE>         /* See feature_test_macros(7) */\n"
10194 "B<#include E<lt>fcntl.hE<gt>>\n"
10195 msgstr ""
10196 "B<#define _GNU_SOURCE>         /* feature_test_macros(7) 参照 */\n"
10197 "B<#include E<lt>fcntl.hE<gt>>\n"
10198
10199 #. type: Plain text
10200 #: build/C/man2/sync_file_range.2:40
10201 #, no-wrap
10202 msgid ""
10203 "B<int sync_file_range(int >I<fd>B<, off64_t >I<offset>B<, off64_t >I<nbytes>B<,>\n"
10204 "B<                    unsigned int >I<flags>B<);>\n"
10205 msgstr ""
10206 "B<int sync_file_range(int >I<fd>B<, off64_t >I<offset>B<, off64_t >I<nbytes>B<,>\n"
10207 "B<                    unsigned int >I<flags>B<);>\n"
10208
10209 #. type: Plain text
10210 #: build/C/man2/sync_file_range.2:47
10211 msgid ""
10212 "B<sync_file_range>()  permits fine control when synchronizing the open file "
10213 "referred to by the file descriptor I<fd> with disk."
10214 msgstr ""
10215 "B<sync_file_range>()  を使うと、ファイルディスクリプタ I<fd> で参照されるオー"
10216 "プンされたファイルのディスクとの同期に関して、 きめ細かな制御が可能となる。"
10217
10218 #. type: Plain text
10219 #: build/C/man2/sync_file_range.2:61
10220 msgid ""
10221 "I<offset> is the starting byte of the file range to be synchronized.  "
10222 "I<nbytes> specifies the length of the range to be synchronized, in bytes; if "
10223 "I<nbytes> is zero, then all bytes from I<offset> through to the end of file "
10224 "are synchronized.  Synchronization is in units of the system page size: "
10225 "I<offset> is rounded down to a page boundary; I<(offset+nbytes-1)> is "
10226 "rounded up to a page boundary."
10227 msgstr ""
10228 "I<offset> は、同期を行うファイルの領域の開始バイトである。 I<nbytes> には同期"
10229 "を行う領域の長さをバイト単位で指定する。 I<nbytes> が 0 の場合は、 I<offset> "
10230 "からファイル末尾までの全バイトを同期する。 同期はシステムのページサイズの単位"
10231 "で行われる。 I<offset> はページ境界にあわせて切り下げられ、 I<(offset"
10232 "+nbytes-1)> はページ境界にあわせて切り上げられる。"
10233
10234 #. type: Plain text
10235 #: build/C/man2/sync_file_range.2:65
10236 msgid "The I<flags> bit-mask argument can include any of the following values:"
10237 msgstr "ビットマスク引き数 I<flags> には以下の値を指定することができる:"
10238
10239 #. type: TP
10240 #: build/C/man2/sync_file_range.2:65
10241 #, no-wrap
10242 msgid "B<SYNC_FILE_RANGE_WAIT_BEFORE>"
10243 msgstr "B<SYNC_FILE_RANGE_WAIT_BEFORE>"
10244
10245 #. type: Plain text
10246 #: build/C/man2/sync_file_range.2:70
10247 msgid ""
10248 "Wait upon write-out of all pages in the specified range that have already "
10249 "been submitted to the device driver for write-out before performing any "
10250 "write."
10251 msgstr ""
10252 "何らかの書き込みを行う前に、指定された領域のページで 書き出しを行うようにデバ"
10253 "イスドライバにすでに要求が発行されている ページの書き出しが全て完了するのを待"
10254 "つ。"
10255
10256 #. type: TP
10257 #: build/C/man2/sync_file_range.2:70 build/C/man2/sync_file_range.2:120
10258 #, no-wrap
10259 msgid "B<SYNC_FILE_RANGE_WRITE>"
10260 msgstr "B<SYNC_FILE_RANGE_WRITE>"
10261
10262 #. type: Plain text
10263 #: build/C/man2/sync_file_range.2:76
10264 msgid ""
10265 "Initiate write-out of all dirty pages in the specified range which are not "
10266 "presently submitted write-out.  Note that even this may block if you attempt "
10267 "to write more than request queue size."
10268 msgstr ""
10269 "指定された領域のページで、書き出し要求が発行されていない 全ての dirty (キャッ"
10270 "シュだけが変更されている) ページの 書き出しを開始する。 リクエストキューの大"
10271 "きさより多く書き込もうとした場合には、 この処理は停止 (block) する可能性があ"
10272 "る点に注意すること。"
10273
10274 #. type: TP
10275 #: build/C/man2/sync_file_range.2:76
10276 #, no-wrap
10277 msgid "B<SYNC_FILE_RANGE_WAIT_AFTER>"
10278 msgstr "B<SYNC_FILE_RANGE_WAIT_AFTER>"
10279
10280 #. type: Plain text
10281 #: build/C/man2/sync_file_range.2:80
10282 msgid ""
10283 "Wait upon write-out of all pages in the range after performing any write."
10284 msgstr ""
10285 "何らかの書き込み後に、指定された領域の全てのページの 書き出しが行われるのを待"
10286 "つ。"
10287
10288 #. type: Plain text
10289 #: build/C/man2/sync_file_range.2:84
10290 msgid "Specifying I<flags> as 0 is permitted, as a no-op."
10291 msgstr "I<flags> に 0 を指定した場合、何もしないことを表す。"
10292
10293 #. type: SS
10294 #: build/C/man2/sync_file_range.2:84
10295 #, no-wrap
10296 msgid "Warning"
10297 msgstr "警告"
10298
10299 #. type: Plain text
10300 #: build/C/man2/sync_file_range.2:100
10301 msgid ""
10302 "This system call is extremely dangerous and should not be used in portable "
10303 "programs.  None of these operations writes out the file's metadata.  "
10304 "Therefore, unless the application is strictly performing overwrites of "
10305 "already-instantiated disk blocks, there are no guarantees that the data will "
10306 "be available after a crash.  There is no user interface to know if a write "
10307 "is purely an overwrite.  On file systems using copy-on-write semantics (e."
10308 "g., I<btrfs>)  an overwrite of existing allocated blocks is impossible.  "
10309 "When writing into preallocated space, many file systems also require calls "
10310 "into the block allocator, which this system call does not sync out to disk.  "
10311 "This system call does not flush disk write caches and thus does not provide "
10312 "any data integrity on systems with volatile disk write caches."
10313 msgstr ""
10314 "このシステムコールは非常に危険であり、 移植性が必要なプログラムで使用すべきで"
10315 "はない。 これらの操作ではどれもファイルのメタデータの書き出しを行わない。 し"
10316 "たがって、アプリケーションにより作成済みのディスクブロックの 上書きの実行が確"
10317 "実に行われない限り、クラッシュの後でもデータが 利用できる保証はない。 書き込"
10318 "みが上書きだけであるかを知るためのユーザインタフェースは存在しない。 "
10319 "(I<btrfs> などの) copy-on-write 動作を使ったファイルシステムでは、 既存の割り"
10320 "当て済みのブロックに対する上書き自体ができない。 前もって割り当てられた領域に"
10321 "書き込みを行う場合、 多くのファイルシステムでは block allocator への書き込み"
10322 "も必要となるが、 このシステムコールは block allocator のディスクへの同期を行"
10323 "わない。 このシステムコールはディスク書き込みキャッシュのフラッシュを 行わな"
10324 "いので、揮発性のディスク書き込みキャッシュを使ったシステムでは このシステム"
10325 "コールではデータの一貫性を確保できないことになる。"
10326
10327 #. type: SS
10328 #: build/C/man2/sync_file_range.2:100
10329 #, no-wrap
10330 msgid "Some details"
10331 msgstr "詳細"
10332
10333 #. type: Plain text
10334 #: build/C/man2/sync_file_range.2:108
10335 msgid ""
10336 "B<SYNC_FILE_RANGE_WAIT_BEFORE> and B<SYNC_FILE_RANGE_WAIT_AFTER> will detect "
10337 "any I/O errors or B<ENOSPC> conditions and will return these to the caller."
10338 msgstr ""
10339 "B<SYNC_FILE_RANGE_WAIT_BEFORE> と B<SYNC_FILE_RANGE_WAIT_AFTER> は I/O エラー"
10340 "や B<ENOSPC> 状態を検出し、呼び出し元にこれらの情報を返す。"
10341
10342 #. type: Plain text
10343 #: build/C/man2/sync_file_range.2:112
10344 msgid "Useful combinations of the I<flags> bits are:"
10345 msgstr "I<flags> の役に立つビットの組み合わせを以下に示す:"
10346
10347 #. type: TP
10348 #: build/C/man2/sync_file_range.2:112
10349 #, no-wrap
10350 msgid "B<SYNC_FILE_RANGE_WAIT_BEFORE | SYNC_FILE_RANGE_WRITE>"
10351 msgstr "B<SYNC_FILE_RANGE_WAIT_BEFORE | SYNC_FILE_RANGE_WRITE>"
10352
10353 #. type: Plain text
10354 #: build/C/man2/sync_file_range.2:120
10355 msgid ""
10356 "Ensures that all pages in the specified range which were dirty when "
10357 "B<sync_file_range>()  was called are placed under write-out.  This is a "
10358 "start-write-for-data-integrity operation."
10359 msgstr ""
10360 "指定された範囲内のページで、 B<sync_file_range>()  が呼び出された際に dirty "
10361 "であった全てのページが、 確実に書き出し対象となるようにする。 これは、start-"
10362 "write-for-data-integrity 操作 (データ完全性確保のための書き込み開始の操作) で"
10363 "ある。"
10364
10365 #. type: Plain text
10366 #: build/C/man2/sync_file_range.2:127
10367 msgid ""
10368 "Start write-out of all dirty pages in the specified range which are not "
10369 "presently under write-out.  This is an asynchronous flush-to-disk "
10370 "operation.  This is not suitable for data integrity operations."
10371 msgstr ""
10372 "指定された範囲内のページで、現在書き出し中でない全ての dirty ページの 書き出"
10373 "しを開始する。これは非同期のディスクへのフラッシュ (flush-to-disk)  操作であ"
10374 "る。データ完全性確保が必要な操作としては適切ではない。"
10375
10376 #. type: TP
10377 #: build/C/man2/sync_file_range.2:127
10378 #, no-wrap
10379 msgid "B<SYNC_FILE_RANGE_WAIT_BEFORE> (or B<SYNC_FILE_RANGE_WAIT_AFTER>)"
10380 msgstr "B<SYNC_FILE_RANGE_WAIT_BEFORE> (or B<SYNC_FILE_RANGE_WAIT_AFTER>)"
10381
10382 #. type: Plain text
10383 #: build/C/man2/sync_file_range.2:134
10384 msgid ""
10385 "Wait for completion of write-out of all pages in the specified range.  This "
10386 "can be used after an earlier B<SYNC_FILE_RANGE_WAIT_BEFORE | "
10387 "SYNC_FILE_RANGE_WRITE> operation to wait for completion of that operation, "
10388 "and obtain its result."
10389 msgstr ""
10390 "指定された範囲内の全てのページの書き出しの完了を待つ。 このフラグは、前に行わ"
10391 "れた操作 B<SYNC_FILE_RANGE_WAIT_BEFORE | SYNC_FILE_RANGE_WRITE> の後に使用で"
10392 "き、この操作の完了を待ち、結果を取得することができる。"
10393
10394 #. type: TP
10395 #: build/C/man2/sync_file_range.2:134
10396 #, no-wrap
10397 msgid "B<SYNC_FILE_RANGE_WAIT_BEFORE | SYNC_FILE_RANGE_WRITE | SYNC_FILE_RANGE_WAIT_AFTER>"
10398 msgstr "B<SYNC_FILE_RANGE_WAIT_BEFORE | SYNC_FILE_RANGE_WRITE | SYNC_FILE_RANGE_WAIT_AFTER>"
10399
10400 #. type: Plain text
10401 #: build/C/man2/sync_file_range.2:141
10402 msgid ""
10403 "This is a write-for-data-integrity operation that will ensure that all pages "
10404 "in the specified range which were dirty when B<sync_file_range>()  was "
10405 "called are committed to disk."
10406 msgstr ""
10407 "これは write-for-data-integrity 操作 (データ完全性確保のための書き込み) であ"
10408 "り、指定された範囲内の、 B<sync_file_range>()  が呼ばれた時点で dirty な全て"
10409 "のページが ディスクに格納されることが保証される。"
10410
10411 #. type: Plain text
10412 #: build/C/man2/sync_file_range.2:147
10413 msgid ""
10414 "On success, B<sync_file_range>()  returns 0; on failure -1 is returned and "
10415 "I<errno> is set to indicate the error."
10416 msgstr ""
10417 "成功の場合、 B<sync_file_range>()  は 0 を返す。失敗の場合、-1 を返し、 "
10418 "I<error> にエラーを示す値を設定する。"
10419
10420 #. type: Plain text
10421 #: build/C/man2/sync_file_range.2:152
10422 msgid "I<fd> is not a valid file descriptor."
10423 msgstr "I<fd> が有効なファイルディスクリプタではない。"
10424
10425 #. type: Plain text
10426 #: build/C/man2/sync_file_range.2:160
10427 msgid ""
10428 "I<flags> specifies an invalid bit; or I<offset> or I<nbytes> is invalid."
10429 msgstr ""
10430 "I<flags> に不正なビットが指定されている。または I<offset> か I<nbytes> が不正"
10431 "である。"
10432
10433 #. type: Plain text
10434 #: build/C/man2/sync_file_range.2:163
10435 msgid "I/O error."
10436 msgstr "I/O エラー。"
10437
10438 #. type: Plain text
10439 #: build/C/man2/sync_file_range.2:169
10440 msgid "Out of disk space."
10441 msgstr "ディスク領域不足である。"
10442
10443 #.  FIXME . (bug?) Actually, how can 'fd' refer to a symbolic link (S_ISLNK)?
10444 #.  (In user space at least) it isn't possible to obtain a file descriptor
10445 #.  for a symbolic link.
10446 #. type: Plain text
10447 #: build/C/man2/sync_file_range.2:177
10448 msgid ""
10449 "I<fd> refers to something other than a regular file, a block device, a "
10450 "directory, or a symbolic link."
10451 msgstr ""
10452 "I<fd> が、通常のファイル、ブロックデバイス、ディレクトリ、シンボリックリンク "
10453 "以外のものを指している。"
10454
10455 #. type: Plain text
10456 #: build/C/man2/sync_file_range.2:180
10457 msgid "B<sync_file_range>()  appeared on Linux in kernel 2.6.17."
10458 msgstr "B<sync_file_range>()  はカーネル 2.6.17 で Linux に登場した。"
10459
10460 #. type: Plain text
10461 #: build/C/man2/sync_file_range.2:183
10462 msgid ""
10463 "This system call is Linux-specific, and should be avoided in portable "
10464 "programs."
10465 msgstr ""
10466 "このシステムコールは Linux 独自であり、 移植性が必要なプログラムでは使用を避"
10467 "けるべきである。"
10468
10469 #.  See kernel commit edd5cd4a9424f22b0fa08bef5e299d41befd5622
10470 #. type: Plain text
10471 #: build/C/man2/sync_file_range.2:196
10472 msgid ""
10473 "Some architectures (e.g., PowerPC, ARM)  need 64-bit arguments to be aligned "
10474 "in a suitable pair of registers.  On such architectures, the call signature "
10475 "of B<sync_file_range>()  is flawed, since it forces a register to be wasted "
10476 "as padding between the I<fd> and I<offset> arguments.  Therefore, these "
10477 "architectures define a different system call that orders the arguments "
10478 "suitably:"
10479 msgstr ""
10480 "いくつかのアーキテクチャ (例えば、 PowerPC や ARM) では、 64 ビットの\n"
10481 "引き数は適切なレジスタの組に割り当てる必要がある。このようなアーキテク\n"
10482 "チャでは、 B<sync_file_range>() の呼び出し方には欠陥があり、それはこの\n"
10483 "システムコールでは引き数 I<fd> と I<offset> の間のパディング (詰めもの)\n"
10484 "でレジスタが一つ消費されてしまうというものである。そのため、これらの\n"
10485 "アーキテクチャでは引き数が適切な順序になった別のシステムコールが定義\n"
10486 "されている。"
10487
10488 #. type: Plain text
10489 #: build/C/man2/sync_file_range.2:201
10490 #, no-wrap
10491 msgid ""
10492 "B<int sync_file_range2(int >I<fd>B<, unsigned int >I<flags>B<,>\n"
10493 "B<                     off64_t >I<offset>B<, off64_t >I<nbytes>B<);>\n"
10494 msgstr ""
10495 "B<int sync_file_range2(int >I<fd>B<, unsigned int >I<flags>B<,>\n"
10496 "B<                     off64_t >I<offset>B<, off64_t >I<nbytes>B<);>\n"
10497
10498 #. type: Plain text
10499 #: build/C/man2/sync_file_range.2:206
10500 msgid ""
10501 "The behavior of this system call is otherwise exactly the same as "
10502 "B<sync_file_range>()."
10503 msgstr ""
10504 "上記の点以外は、このシステムコールの動作は B<sync_file_range>() と\n"
10505 "全く同じである。このシステムコールに対するライブラリによるサポートは\n"
10506 "glibc では提供されていない。"
10507
10508 #. type: Plain text
10509 #: build/C/man2/sync_file_range.2:217
10510 msgid ""
10511 "A system call with this signature first appeared on the ARM architecture in "
10512 "Linux 2.6.20, with the name B<arm_sync_file_range>().  It was renamed in "
10513 "Linux 2.6.22, when the analogous system call was added for PowerPC.  On "
10514 "architectures where glibc support is provided, glibc transparently wraps "
10515 "B<sync_file_range2>()  under the name B<sync_file_range>()."
10516 msgstr ""
10517 "このバージョンのシステムコールは、Linux 2.6.20 で ARM アーキテクチャで\n"
10518 "初めて登場し、 B<arm_sync_file_range>() という名前であった。\n"
10519 "Linux 2.6.22 で、同様のシステムコールが PowerPC 用に追加された際に、\n"
10520 "システムコールの名前が変更された。\n"
10521 "glibc によるサポートが提供されているアーキテクチャでは、\n"
10522 "glibc のラッパー関数は B<sync_file_range>() という名前で\n"
10523 "B<sync_file_range2>() を適切に使用するようになっている。"
10524
10525 #. type: Plain text
10526 #: build/C/man2/sync_file_range.2:222
10527 msgid "B<fdatasync>(2), B<fsync>(2), B<msync>(2), B<sync>(2)"
10528 msgstr "B<fdatasync>(2), B<fsync>(2), B<msync>(2), B<sync>(2)"
10529
10530 #~ msgid "2011-09-08"
10531 #~ msgstr "2011-09-08"
10532
10533 #~ msgid "2010-09-20"
10534 #~ msgstr "2010-09-20"
10535
10536 #~ msgid "2008-08-07"
10537 #~ msgstr "2008-08-07"
10538
10539 #~ msgid "2006-05-02"
10540 #~ msgstr "2006-05-02"
10541
10542 #~ msgid "2008-06-03"
10543 #~ msgstr "2008-06-03"
10544
10545 #~ msgid "2010-10-30"
10546 #~ msgstr "2010-10-30"
10547
10548 #~ msgid "the kernel source file I<Documentation/vm/hugetlbpage.txt>."
10549 #~ msgstr "カーネルソースファイルの I<Documentation/vm/hugetlbpage.txt>"
10550
10551 #~ msgid ""
10552 #~ "The I<mode> is not supported by the file system containing the file "
10553 #~ "referred to by I<fd>."
10554 #~ msgstr ""
10555 #~ "I<fd> が参照するファイルを含むファイルシステムが I<mode> をサポートしてい"
10556 #~ "ない。"
10557
10558 #~ msgid ""
10559 #~ "The function B<mtrace>()  installs handlers for B<malloc>(3), B<realloc>"
10560 #~ "(3)  and B<free>(3).  The function B<muntrace>()  disables these handlers."
10561 #~ msgstr ""
10562 #~ "関数 B<mtrace>()  は、 B<malloc>(3), B<realloc>(3), B<free>(3)  のハンドラ"
10563 #~ "を組み込む。 関数 B<muntrace>()  はこれらのハンドラを解除する。"
10564
10565 #~ msgid ""
10566 #~ "The environment variable B<MALLOC_TRACE> defines a file where B<mtrace>"
10567 #~ "()  writes its output.  This file must be writable to the user or "
10568 #~ "B<mtrace>()  will do nothing.  If the file is not empty it will be "
10569 #~ "truncated."
10570 #~ msgstr ""
10571 #~ "環境変数 B<MALLOC_TRACE> は B<mtrace>()  が出力を書き出すファイルを指定す"
10572 #~ "る。 ユーザが書き込み権限を持つファイルを指定しなければならない。 書き込み"
10573 #~ "権限がない場合、 B<mtrace>()  は何もしない。 ファイルが空でない場合、ファ"
10574 #~ "イルの元の内容を上書きする。"
10575
10576 #~ msgid "These are GNU extensions."
10577 #~ msgstr "この関数は GNU 拡張である。"
10578
10579 #~ msgid ""
10580 #~ "The output of B<mtrace>()  will be ASCII but not in a friendly format.  "
10581 #~ "So glibc comes with a perl-script called mtrace to make sense of it."
10582 #~ msgstr ""
10583 #~ "B<mtrace>()  の出力は ASCII 形式だが、人が読みやすいフォーマットではな"
10584 #~ "い。 そこで、glibc には mtrace 出力を分かりやすい形式に変換する perl スク"
10585 #~ "リプトが付属している。"
10586
10587 #~ msgid ""
10588 #~ "This flag allocates and initializes to zero the disk space within the "
10589 #~ "range specified by I<offset> and I<len>.  After a successful call, "
10590 #~ "subsequent writes into this range are guaranteed not to fail because of "
10591 #~ "lack of disk space.  Preallocating zeroed blocks beyond the end of the "
10592 #~ "file is useful for optimizing append workloads.  Preallocating blocks "
10593 #~ "does not change the file size (as reported by B<stat>(2))  even if it is "
10594 #~ "less than I<offset>+I<len>."
10595 #~ msgstr ""
10596 #~ "このフラグは、 I<offset> と I<len> で指定された領域のディスク空間を割り当"
10597 #~ "て、その空間を 0 で初期化する。 呼び出しが成功すると、それに続いてこの領域"
10598 #~ "への書き込みが行われるが、 ディスク空間の不足による書き込み失敗が発生しな"
10599 #~ "いことが保証される。 ファイル末尾より後ろの領域について 0 で埋めたブロック"
10600 #~ "を前もって 割り当てておくことは、追記 (append) の作業負荷を最適化するのに "
10601 #~ "有用である。 ファイルサイズが I<offset>+I<len> よりも小さい場合であって"
10602 #~ "も、ブロックの前もっての割り当てにより (B<stat>(2)  が返す) ファイルサイズ"
10603 #~ "は変更されることはない。"
10604
10605 #~ msgid ""
10606 #~ "(Linux 2.6.9 and later) the caller was not privileged (B<CAP_IPC_LOCK>)  "
10607 #~ "and its B<RLIMIT_MEMLOCK> soft resource limit was 0."
10608 #~ msgstr ""
10609 #~ "(Linux 2.6.9 以降) 呼び出し元は特権 (B<CAP_IPC_LOCK>)  を持たず、ソフト資"
10610 #~ "源制限 B<RLIMIT_MEMLOCK> が 0 である。"
10611
10612 #~ msgid ""
10613 #~ "(Linux 2.6.8 and earlier)  The calling process has insufficient privilege "
10614 #~ "to call B<munlockall>().  Under Linux the B<CAP_IPC_LOCK> capability is "
10615 #~ "required."
10616 #~ msgstr ""
10617 #~ "(Linux 2.6.8 以前)  呼び出し元プロセスが B<munlockall>()  を呼び出すのに必"
10618 #~ "要な特権を所有していなかった。 Linux では、 B<CAP_IPC_LOCK> ケーパビリティ"
10619 #~ "が必要である。"
10620
10621 #~ msgid ""
10622 #~ "B<posix_fadvise>()  appeared in kernel 2.5.60.  Glibc support has been "
10623 #~ "provided since version 2.2."
10624 #~ msgstr ""
10625 #~ "B<posix_fadvise>()  はカーネル 2.5.60 で登場した。 glibc でのサポートは "
10626 #~ "glibc バージョン 2.2 以降で行われている。"