OSDN Git Service

(split) LDP: Update POT and ja.po to LDP v3.50.
[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-11 13:46+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 #, fuzzy
428 #| msgid ""
429 #| "This page is part of release 3.41 of the Linux I<man-pages> project.  A "
430 #| "description of the project, and information about reporting bugs, can be "
431 #| "found at http://www.kernel.org/doc/man-pages/."
432 msgid ""
433 "This page is part of release 3.50 of the Linux I<man-pages> project.  A "
434 "description of the project, and information about reporting bugs, can be "
435 "found at http://www.kernel.org/doc/man-pages/."
436 msgstr ""
437 "この man ページは Linux I<man-pages> プロジェクトのリリース 3.41 の一部\n"
438 "である。プロジェクトの説明とバグ報告に関する情報は\n"
439 "http://www.kernel.org/doc/man-pages/ に書かれている。"
440
441 #. type: TH
442 #: build/C/man3/alloca.3:43
443 #, no-wrap
444 msgid "ALLOCA"
445 msgstr "ALLOCA"
446
447 #. type: TH
448 #: build/C/man3/alloca.3:43
449 #, no-wrap
450 msgid "2008-01-24"
451 msgstr "2008-01-24"
452
453 #. type: TH
454 #: build/C/man3/alloca.3:43 build/C/man3/malloc_get_state.3:25
455 #: build/C/man3/malloc_hook.3:10 build/C/man3/malloc_info.3:25
456 #: build/C/man3/malloc_usable_size.3:25 build/C/man3/mcheck.3:25
457 #: build/C/man3/mtrace.3:25 build/C/man3/posix_fallocate.3:25
458 #: build/C/man3/posix_memalign.3:29
459 #, no-wrap
460 msgid "GNU"
461 msgstr "GNU"
462
463 #. type: Plain text
464 #: build/C/man3/alloca.3:46
465 msgid "alloca - allocate memory that is automatically freed"
466 msgstr "alloca - 自動的に解放されるメモリを割り当てる"
467
468 #. type: Plain text
469 #: build/C/man3/alloca.3:48
470 msgid "B<#include E<lt>alloca.hE<gt>>"
471 msgstr "B<#include E<lt>alloca.hE<gt>>"
472
473 #. type: Plain text
474 #: build/C/man3/alloca.3:50
475 msgid "B<void *alloca(size_t >I<size>B<);>"
476 msgstr "B<void *alloca(size_t >I<size>B<);>"
477
478 #. type: Plain text
479 #: build/C/man3/alloca.3:60
480 msgid ""
481 "The B<alloca>()  function allocates I<size> bytes of space in the stack "
482 "frame of the caller.  This temporary space is automatically freed when the "
483 "function that called B<alloca>()  returns to its caller."
484 msgstr ""
485 "B<alloca>()  関数は、 I<size> バイトの領域を呼出元のスタック・フレームに割り"
486 "付ける。 この一時的な領域は、 B<alloca>()  を呼び出した関数が呼出元に返るとき"
487 "に自動的に解放される。"
488
489 #. type: Plain text
490 #: build/C/man3/alloca.3:65
491 msgid ""
492 "The B<alloca>()  function returns a pointer to the beginning of the "
493 "allocated space.  If the allocation causes stack overflow, program behavior "
494 "is undefined."
495 msgstr ""
496 "B<alloca>()  関数は、割り付けた領域の始まりを指すポインタを返す。 割り付けに"
497 "よってスタックオーバーフローが起った場合の プログラムの動作は定義されていな"
498 "い。"
499
500 #. type: Plain text
501 #: build/C/man3/alloca.3:67
502 msgid "This function is not in POSIX.1-2001."
503 msgstr "この関数は POSIX.1-2001 にはない。"
504
505 #. type: Plain text
506 #: build/C/man3/alloca.3:73
507 msgid ""
508 "There is evidence that the B<alloca>()  function appeared in 32V, PWB, "
509 "PWB.2, 3BSD, and 4BSD.  There is a man page for it in 4.3BSD.  Linux uses "
510 "the GNU version."
511 msgstr ""
512 "32V, PWB, PWB.2, 3BSD, 4BSD に B<alloca>()  関数が登場した証拠がある。 "
513 "4.3BSD には、マニュアルページがある。 Linux は、GNU 版を使っている。 この関数"
514 "は POSIX.1-2001 にはない。"
515
516 #. type: Plain text
517 #: build/C/man3/alloca.3:88
518 msgid ""
519 "The B<alloca>()  function is machine- and compiler-dependent.  For certain "
520 "applications, its use can improve efficiency compared to the use of B<malloc>"
521 "(3)  plus B<free>(3).  In certain cases, it can also simplify memory "
522 "deallocation in applications that use B<longjmp>(3)  or B<siglongjmp>(3).  "
523 "Otherwise, its use is discouraged."
524 msgstr ""
525 "B<alloca>()  関数は、機種とコンパイラに依存する。 特定のアプリケーションで"
526 "は、この関数を使うと B<malloc>(3)  と B<free>(3)  を組み合わせて使った場合に"
527 "比べて効率を改善することができる。 特定の場合では、この関数を使うことで、 "
528 "B<longjmp>(3)  や B<siglongjmp>(3)  を使うアプリケーションでのメモリの開放を"
529 "簡単にすることができる。 それ以外の場合では、この関数の使用は推奨されない。"
530
531 #. type: Plain text
532 #: build/C/man3/alloca.3:97
533 msgid ""
534 "Because the space allocated by B<alloca>()  is allocated within the stack "
535 "frame, that space is automatically freed if the function return is jumped "
536 "over by a call to B<longjmp>(3)  or B<siglongjmp>(3)."
537 msgstr ""
538 "B<alloca>()  により割り当てられる空間はスタックフレームから割り当てらるの"
539 "で、 関数の戻り先が B<longjmp>(3)  や B<siglongjmp>(3)  の呼び出しによりジャ"
540 "ンプした場合には、 割り当てられた空間は自動的に解放される。"
541
542 #. type: Plain text
543 #: build/C/man3/alloca.3:102
544 msgid "Do not attempt to B<free>(3)  space allocated by B<alloca>()!"
545 msgstr ""
546 "B<alloca>()  で割り当てられた空間を B<free>(3)  しようとすることのないよう"
547 "に!"
548
549 #. type: SS
550 #: build/C/man3/alloca.3:102
551 #, fuzzy, no-wrap
552 #| msgid "Notes on the GNU Version"
553 msgid "Notes on the GNU version"
554 msgstr "GNU 版についての注意"
555
556 #. type: Plain text
557 #: build/C/man3/alloca.3:124
558 msgid ""
559 "Normally, B<gcc>(1)  translates calls to B<alloca>()  with inlined code.  "
560 "This is not done when either the I<-ansi>, I<-std=c89>, I<-std=c99>, or the "
561 "I<-fno-builtin> option is given (and the header I<E<lt>alloca.hE<gt>> is not "
562 "included).  But beware! By default the glibc version of I<E<lt>stdlib."
563 "hE<gt>> includes I<E<lt>alloca.hE<gt>> and that contains the line:"
564 msgstr ""
565 "通常 B<gcc>(1)  は B<alloca>()  の呼び出しをインラインコードに変換する。 I<-"
566 "ansi>, I<-std=c89>, I<-std=c99>, I<-fno-builtin> のいずれかのオプションが指定"
567 "された場合、この変換は行われない (また I<E<lt>alloca.hE<gt>> のインクルードも"
568 "行われない)。 だだし、デフォルトでは glibc 版の I<E<lt>stdlib.hE<gt>> は "
569 "I<E<lt>alloca.hE<gt>> をインクルードしており、これには以下の行が含まれている"
570 "ので注意すること。"
571
572 #. type: Plain text
573 #: build/C/man3/alloca.3:127
574 #, no-wrap
575 msgid "    #define alloca(size)   __builtin_alloca (size)\n"
576 msgstr "    #define alloca(size)   __builtin_alloca (size)\n"
577
578 #. type: Plain text
579 #: build/C/man3/alloca.3:130
580 msgid "with messy consequences if one has a private version of this function."
581 msgstr "独自版の __builtin_alloca (size) 関数があると厄介な結果になる。"
582
583 #. type: Plain text
584 #: build/C/man3/alloca.3:134
585 msgid ""
586 "The fact that the code is inlined means that it is impossible to take the "
587 "address of this function, or to change its behavior by linking with a "
588 "different library."
589 msgstr ""
590 "このコードはインライン化されているので、 この関数のアドレスを取得したり、 他"
591 "のライブラリをリンクして動作を変更することはできない。"
592
593 #. type: Plain text
594 #: build/C/man3/alloca.3:138
595 msgid ""
596 "The inlined code often consists of a single instruction adjusting the stack "
597 "pointer, and does not check for stack overflow.  Thus, there is no NULL "
598 "error return."
599 msgstr ""
600 "通常このインラインコードはスタックポインタを移動する 1 つの命令 "
601 "(instruction) から構成されており、 スタックオーバーフローをチェックしない。 "
602 "よって NULL エラーが返されることはない。"
603
604 #. type: SH
605 #: build/C/man3/alloca.3:138 build/C/man2/cacheflush.2:82
606 #: build/C/man3/mallinfo.3:114 build/C/man3/mallopt.3:406
607 #: build/C/man2/mlock.2:304 build/C/man2/mmap.2:587 build/C/man3/mtrace.3:102
608 #: build/C/man2/posix_fadvise.2:178 build/C/man2/shmget.2:299
609 #, no-wrap
610 msgid "BUGS"
611 msgstr "バグ"
612
613 #. type: Plain text
614 #: build/C/man3/alloca.3:143
615 msgid ""
616 "There is no error indication if the stack frame cannot be extended.  "
617 "(However, after a failed allocation, the program is likely to receive a "
618 "B<SIGSEGV> signal if it attempts to access the unallocated space.)"
619 msgstr ""
620 "スタックフレームが拡張できなかった場合、エラー通知は行われない。 (しかしなが"
621 "ら、割り当てに失敗した後で、プログラムが割り当てられなかった 空間にアクセスし"
622 "ようとした場合に B<SIGSEGV> シグナルを受信することだろう。)"
623
624 #. type: Plain text
625 #: build/C/man3/alloca.3:151
626 msgid ""
627 "On many systems B<alloca>()  cannot be used inside the list of arguments of "
628 "a function call, because the stack space reserved by B<alloca>()  would "
629 "appear on the stack in the middle of the space for the function arguments."
630 msgstr ""
631 "多くのシステムにおいて、関数コールの引き数のリスト内では B<alloca>()  が使え"
632 "ない。 これは、 B<alloca>()  によって予約されるスタック領域が、 関数引き数に"
633 "使われるスタック領域の中に現れてしまうためである。"
634
635 #. type: SH
636 #: build/C/man3/alloca.3:151 build/C/man2/fallocate.2:198
637 #: build/C/man2/madvise.2:371 build/C/man3/mallinfo.3:270
638 #: build/C/man3/malloc_get_state.3:111 build/C/man3/malloc_hook.3:137
639 #: build/C/man3/malloc_info.3:254 build/C/man3/malloc_stats.3:61
640 #: build/C/man3/malloc_trim.3:78 build/C/man3/malloc_usable_size.3:62
641 #: build/C/man3/mallopt.3:566 build/C/man3/mcheck.3:204
642 #: build/C/man2/mlock.2:329 build/C/man2/mmap.2:712 build/C/man2/mmap2.2:92
643 #: build/C/man2/mprotect.2:226 build/C/man2/mremap.2:199
644 #: build/C/man2/msync.2:118 build/C/man3/mtrace.3:167
645 #: build/C/man2/posix_fadvise.2:183 build/C/man3/posix_fallocate.3:128
646 #: build/C/man3/posix_memalign.3:270 build/C/man2/readahead.2:92
647 #: build/C/man2/remap_file_pages.2:157 build/C/man3/shm_open.3:269
648 #: build/C/man7/shm_overview.7:114 build/C/man2/shmctl.2:418
649 #: build/C/man2/shmget.2:305 build/C/man2/shmop.2:287
650 #: build/C/man2/subpage_prot.2:128 build/C/man2/sync_file_range.2:217
651 #, no-wrap
652 msgid "SEE ALSO"
653 msgstr "関連項目"
654
655 #. type: Plain text
656 #: build/C/man3/alloca.3:155
657 msgid "B<brk>(2), B<longjmp>(3), B<malloc>(3)"
658 msgstr "B<brk>(2), B<longjmp>(3), B<malloc>(3)"
659
660 #. type: TH
661 #: build/C/man2/cacheflush.2:25
662 #, no-wrap
663 msgid "CACHEFLUSH"
664 msgstr "CACHEFLUSH"
665
666 #. type: TH
667 #: build/C/man2/cacheflush.2:25
668 #, no-wrap
669 msgid "2007-05-26"
670 msgstr "2007-05-26"
671
672 #. type: Plain text
673 #: build/C/man2/cacheflush.2:28
674 msgid "cacheflush - flush contents of instruction and/or data cache"
675 msgstr "cacheflush - 命令キャッシュやデータキャッシュの内容をフラッシュする"
676
677 #. type: Plain text
678 #: build/C/man2/cacheflush.2:31
679 #, no-wrap
680 msgid "B<#include E<lt>asm/cachectl.hE<gt>>\n"
681 msgstr "B<#include E<lt>asm/cachectl.hE<gt>>\n"
682
683 #. type: Plain text
684 #: build/C/man2/cacheflush.2:33
685 #, no-wrap
686 msgid "B<int cacheflush(char *>I<addr>B<, int >I<nbytes>B<, int >I<cache>B<);>\n"
687 msgstr "B<int cacheflush(char *>I<addr>B<, int >I<nbytes>B<, int >I<cache>B<);>\n"
688
689 #. type: Plain text
690 #: build/C/man2/cacheflush.2:43
691 msgid ""
692 "B<cacheflush>()  flushes the contents of the indicated cache(s) for the user "
693 "addresses in the range I<addr> to I<(addr+nbytes-1)>.  I<cache> may be one "
694 "of:"
695 msgstr ""
696 "B<cacheflush>()  は I<addr> から I<(addr+nbytes-1)> の範囲のユーザアドレスに"
697 "対応する 指定されたキャッシュをフラッシュする。 I<cache> には以下のいずれかを"
698 "指定する:"
699
700 #. type: TP
701 #: build/C/man2/cacheflush.2:43
702 #, no-wrap
703 msgid "B<ICACHE>"
704 msgstr "B<ICACHE>"
705
706 #. type: Plain text
707 #: build/C/man2/cacheflush.2:46
708 msgid "Flush the instruction cache."
709 msgstr "命令 (instruction) キャッシュをフラッシュする。"
710
711 #. type: TP
712 #: build/C/man2/cacheflush.2:46
713 #, no-wrap
714 msgid "B<DCACHE>"
715 msgstr "B<DCACHE>"
716
717 #. type: Plain text
718 #: build/C/man2/cacheflush.2:49
719 msgid "Write back to memory and invalidate the affected valid cache lines."
720 msgstr "変更があったキャッシュラインをメモリに書き戻し、無効にする。"
721
722 #. type: TP
723 #: build/C/man2/cacheflush.2:49
724 #, no-wrap
725 msgid "B<BCACHE>"
726 msgstr "B<BCACHE>"
727
728 #. type: Plain text
729 #: build/C/man2/cacheflush.2:53
730 msgid "Same as B<(ICACHE|DCACHE)>."
731 msgstr "B<(ICACHE|DCACHE)> と同じ。"
732
733 #. type: Plain text
734 #: build/C/man2/cacheflush.2:59
735 msgid ""
736 "B<cacheflush>()  returns 0 on success or -1 on error.  If errors are "
737 "detected, I<errno> will indicate the error."
738 msgstr ""
739 "B<cacheflush>()  は成功した場合は 0 を、失敗した場合は -1 を返す。エラーが検"
740 "出された場合は I<errno> にエラーが指示される。"
741
742 #. type: TP
743 #: build/C/man2/cacheflush.2:60 build/C/man2/mmap2.2:62
744 #: build/C/man2/mremap.2:142 build/C/man2/shmctl.2:305
745 #: build/C/man2/subpage_prot.2:72
746 #, no-wrap
747 msgid "B<EFAULT>"
748 msgstr "B<EFAULT>"
749
750 #. type: Plain text
751 #: build/C/man2/cacheflush.2:67
752 msgid ""
753 "Some or all of the address range I<addr> to I<(addr+nbytes-1)> is not "
754 "accessible."
755 msgstr ""
756 "I<addr> から I<(addr+nbytes-1)> の範囲のアドレスの全てまたは一部が アクセス可"
757 "能ではない。"
758
759 #. type: TP
760 #: build/C/man2/cacheflush.2:67 build/C/man2/fallocate.2:127
761 #: build/C/man2/madvise.2:282 build/C/man3/malloc_info.3:54
762 #: build/C/man2/mlock.2:157 build/C/man2/mlock.2:164 build/C/man2/mlock.2:176
763 #: build/C/man2/mmap.2:423 build/C/man2/mmap.2:431 build/C/man2/mmap.2:436
764 #: build/C/man2/mmap2.2:65 build/C/man2/mprotect.2:95
765 #: build/C/man2/mremap.2:151 build/C/man2/msync.2:80
766 #: build/C/man2/posix_fadvise.2:94 build/C/man3/posix_fallocate.3:81
767 #: build/C/man3/posix_memalign.3:156 build/C/man2/readahead.2:76
768 #: build/C/man2/remap_file_pages.2:132 build/C/man2/remap_file_pages.2:139
769 #: build/C/man3/shm_open.3:211 build/C/man2/shmctl.2:319
770 #: build/C/man2/shmget.2:198 build/C/man2/shmop.2:200 build/C/man2/shmop.2:223
771 #: build/C/man2/subpage_prot.2:77 build/C/man2/sync_file_range.2:152
772 #, no-wrap
773 msgid "B<EINVAL>"
774 msgstr "B<EINVAL>"
775
776 #. type: Plain text
777 #: build/C/man2/cacheflush.2:75
778 msgid "I<cache> is not one of B<ICACHE>, B<DCACHE>, or B<BCACHE>."
779 msgstr "I<cache> パラメータが B<ICACHE>, B<DCACHE>, B<BCACHE> のどれでもない。"
780
781 #.  FIXME This system call was only on MIPS back in 1.2 days, but
782 #.  by now it is on a number of other architectures (but not i386).
783 #.  Investigate the details and update this page.
784 #.  Irix 6.5 appears to have a cacheflush() syscall -- mtk
785 #. type: Plain text
786 #: build/C/man2/cacheflush.2:82
787 msgid ""
788 "This Linux-specific system call is only available on MIPS-based systems.  It "
789 "should not be used in programs intended to be portable."
790 msgstr ""
791 "この Linux 特有のシステムコールは MIPS ベースのシステムでのみ有効である。 移"
792 "植を意図したプログラムで使用すべきではない。"
793
794 #. type: Plain text
795 #: build/C/man2/cacheflush.2:89
796 msgid ""
797 "The current implementation ignores the I<addr> and I<nbytes> arguments.  "
798 "Therefore, the whole cache is always flushed."
799 msgstr ""
800 "現在の実装では、引き数 I<addr> と I<nbytes> は無視される。そのため、 常に全て"
801 "のキャッシュがフラッシュされる。"
802
803 #. type: TH
804 #: build/C/man2/fallocate.2:11
805 #, no-wrap
806 msgid "FALLOCATE"
807 msgstr "FALLOCATE"
808
809 #. type: TH
810 #: build/C/man2/fallocate.2:11 build/C/man3/posix_fallocate.3:25
811 #: build/C/man2/shmop.2:41
812 #, fuzzy, no-wrap
813 #| msgid "2009-02-25"
814 msgid "2013-02-12"
815 msgstr "2009-02-25"
816
817 #. type: Plain text
818 #: build/C/man2/fallocate.2:14
819 msgid "fallocate - manipulate file space"
820 msgstr "fallocate - ファイル空間の操作"
821
822 #. type: Plain text
823 #: build/C/man2/fallocate.2:18 build/C/man2/readahead.2:35
824 #, no-wrap
825 msgid ""
826 "B<#define _GNU_SOURCE>             /* See feature_test_macros(7) */\n"
827 "B<#include E<lt>fcntl.hE<gt>>\n"
828 msgstr ""
829 "B<#define _GNU_SOURCE>             /* feature_test_macros(7) 参照 */\n"
830 "B<#include E<lt>fcntl.hE<gt>>\n"
831
832 #. type: Plain text
833 #: build/C/man2/fallocate.2:21
834 #, no-wrap
835 msgid "B<int fallocate(int >I<fd>B<, int >I<mode>B<, off_t >I<offset>B<, off_t >I<len>B<);>\n"
836 msgstr "B<int fallocate(int >I<fd>B<, int >I<mode>B<, off_t >I<offset>B<, off_t >I<len>B<);>\n"
837
838 #. type: Plain text
839 #: build/C/man2/fallocate.2:27
840 msgid ""
841 "This is a nonportable, Linux-specific system call.  For the portable, "
842 "POSIX.1-specified method of ensuring that space is allocated for a file, see "
843 "B<posix_fallocate>(3)."
844 msgstr ""
845 "このシステムコールは、移植性のない、Linux 固有のシステムコールである。 移植性"
846 "が必要な場合は、ファイルに対してディスク空間を確実に確保するために、 POSIX.1 "
847 "で規定された方法である B<posix_fallocate>(3)  を使うこと。"
848
849 #. type: Plain text
850 #: build/C/man2/fallocate.2:37
851 msgid ""
852 "B<fallocate>()  allows the caller to directly manipulate the allocated disk "
853 "space for the file referred to by I<fd> for the byte range starting at "
854 "I<offset> and continuing for I<len> bytes."
855 msgstr ""
856 "B<fallocate>()  を使うと、 I<fd> が参照するファイルに割り当てられたディスク空"
857 "間を直接操作できる。 操作対象は、 I<offset> から始まる長さ I<len> バイトの領"
858 "域である。"
859
860 #. type: Plain text
861 #: build/C/man2/fallocate.2:42
862 msgid ""
863 "The I<mode> argument determines the operation to be performed on the given "
864 "range.  Details of the supported operations are given in the subsections "
865 "below."
866 msgstr ""
867 "I<mode> 引き数は、指定された領域に対して実行する操作を指定する。\n"
868 "サポートされている操作の詳細は以下のサブセクションで説明する。"
869
870 #. type: SS
871 #: build/C/man2/fallocate.2:42
872 #, no-wrap
873 msgid "Allocating disk space"
874 msgstr "ディスク領域の割り当て"
875
876 #. type: Plain text
877 #: build/C/man2/fallocate.2:61
878 msgid ""
879 "The default operation (i.e., I<mode> is zero) of B<fallocate>()  allocates "
880 "and initializes to zero the disk space within the range specified by "
881 "I<offset> and I<len>.  The file size (as reported by B<stat>(2))  will be "
882 "changed if I<offset>+I<len> is greater than the file size.  This default "
883 "behavior closely resembles the behavior of the B<posix_fallocate>(3)  "
884 "library function, and is intended as a method of optimally implementing that "
885 "function."
886 msgstr ""
887 "B<fallocate>() のデフォルトの動作 (つまり I<mode> が 0 の場合) は、\n"
888 "I<offset> と I<len> で指定された範囲のディスク領域の割り当てと初期化を行"
889 "う。\n"
890 "I<offset>+I<len> がファイルサイズよりも大きかった場合、\n"
891 "(B<stat>(2) で報告される) ファイルサイズが変更される。このデフォルトの動作"
892 "は、\n"
893 "ライブラリ関数 B<posix_fallocate>(3) の動作と非常に似ている。これは、\n"
894 "このシステムコールが B<posix_fallocate>(3) を最適に実装する手段を提供する\n"
895 "ことを目的としているからである。"
896
897 #. type: Plain text
898 #: build/C/man2/fallocate.2:67
899 msgid ""
900 "After a successful call, subsequent writes into the range specified by "
901 "I<offset> and I<len> are guaranteed not to fail because of lack of disk "
902 "space."
903 msgstr ""
904 "呼び出しが成功した場合、\n"
905 "I<offset> と I<len> で指定された範囲へのそれ以降の書き込みでは、\n"
906 "ディスクの領域不足での書き込み失敗が起こらないことが保証される。"
907
908 #. type: Plain text
909 #: build/C/man2/fallocate.2:78
910 msgid ""
911 "If the B<FALLOC_FL_KEEP_SIZE> flag is specified in I<mode>, the behavior of "
912 "the call is similar, but the file size will not be changed even if I<offset>"
913 "+I<len> is greater than the file size.  Preallocating zeroed blocks beyond "
914 "the end of the file in this manner is useful for optimizing append workloads."
915 msgstr ""
916 "B<FALLOC_FL_KEEP_SIZE> フラグが I<mode> に指定された場合、このシステムコー"
917 "ル\n"
918 "の動作は似ているが、 I<offset>+I<len> がファイルサイズよりも大きい場合で\n"
919 "あってもファイルサイズは変更されない点が異なる。この場合のファイルの末尾\n"
920 "よりも後ろの前もって割り当てられた 0 で埋められたブロックは、ファイルへの\n"
921 "追記を最適化したい場合に役に立つ。"
922
923 #. type: Plain text
924 #: build/C/man2/fallocate.2:82
925 msgid ""
926 "Because allocation is done in block size chunks, B<fallocate>()  may "
927 "allocate a larger range of disk space than was specified."
928 msgstr ""
929 "割り当てはブロックサイズ単位で行われるため、 B<fallocate>() は指定されたよ"
930 "り\n"
931 "も大きなディスク領域を割り当てることがある。"
932
933 #. type: SS
934 #: build/C/man2/fallocate.2:82
935 #, no-wrap
936 msgid "Deallocating file space"
937 msgstr "ファイル空間の割り当て解除"
938
939 #. type: Plain text
940 #: build/C/man2/fallocate.2:97
941 msgid ""
942 "Specifying the B<FALLOC_FL_PUNCH_HOLE> flag (available since Linux 2.6.38) "
943 "in I<mode> deallocates space (i.e., creates a hole)  in the byte range "
944 "starting at I<offset> and continuing for I<len> bytes.  Within the specified "
945 "range, partial file system blocks are zeroed, and whole file system blocks "
946 "are removed from the file.  After a successful call, subsequent reads from "
947 "this range will return zeroes."
948 msgstr ""
949
950 #. type: Plain text
951 #: build/C/man2/fallocate.2:108
952 msgid ""
953 "The B<FALLOC_FL_PUNCH_HOLE> flag must be ORed with B<FALLOC_FL_KEEP_SIZE> in "
954 "I<mode>; in other words, even when punching off the end of the file, the "
955 "file size (as reported by B<stat>(2))  does not change."
956 msgstr ""
957
958 #. type: Plain text
959 #: build/C/man2/fallocate.2:112
960 msgid ""
961 "Not all file systems support B<FALLOC_FL_PUNCH_HOLE>; if a file system "
962 "doesn't support the operation, an error is returned."
963 msgstr ""
964
965 #. type: Plain text
966 #: build/C/man2/fallocate.2:115
967 msgid "B<fallocate>()  returns zero on success, and -1 on failure."
968 msgstr "B<fallocate>()  は成功すると 0 を返し、エラーの場合は -1 を返す。"
969
970 #. type: TP
971 #: build/C/man2/fallocate.2:116 build/C/man2/madvise.2:279
972 #: build/C/man2/mmap.2:417 build/C/man2/posix_fadvise.2:91
973 #: build/C/man3/posix_fallocate.3:73 build/C/man2/readahead.2:72
974 #: build/C/man2/sync_file_range.2:148
975 #, no-wrap
976 msgid "B<EBADF>"
977 msgstr "B<EBADF>"
978
979 #. type: Plain text
980 #: build/C/man2/fallocate.2:120 build/C/man3/posix_fallocate.3:77
981 msgid "I<fd> is not a valid file descriptor, or is not opened for writing."
982 msgstr ""
983 "I<fd> が有効なファイルディスクリプタでないか、 書き込み用としてオープンされて"
984 "いない。"
985
986 #. type: TP
987 #: build/C/man2/fallocate.2:120 build/C/man3/posix_fallocate.3:77
988 #, no-wrap
989 msgid "B<EFBIG>"
990 msgstr "B<EFBIG>"
991
992 #. type: Plain text
993 #: build/C/man2/fallocate.2:124
994 msgid "I<offset>+I<len> exceeds the maximum file size."
995 msgstr "I<offset + len> がファイルサイズの最大値よりも大きい。"
996
997 #. type: TP
998 #: build/C/man2/fallocate.2:124
999 #, no-wrap
1000 msgid "B<EINTR>"
1001 msgstr "B<EINTR>"
1002
1003 #. type: Plain text
1004 #: build/C/man2/fallocate.2:127
1005 msgid "A signal was caught during execution."
1006 msgstr "実行中にシグナルが捕捉された。"
1007
1008 #. type: Plain text
1009 #: build/C/man2/fallocate.2:139 build/C/man3/posix_fallocate.3:87
1010 msgid "I<offset> was less than 0, or I<len> was less than or equal to 0."
1011 msgstr "I<offset> が 0 未満だったか、 I<len> が 0 以下だった。"
1012
1013 #. type: TP
1014 #: build/C/man2/fallocate.2:139 build/C/man2/madvise.2:310
1015 #: build/C/man2/sync_file_range.2:160
1016 #, no-wrap
1017 msgid "B<EIO>"
1018 msgstr "B<EIO>"
1019
1020 #. type: Plain text
1021 #: build/C/man2/fallocate.2:142
1022 msgid "An I/O error occurred while reading from or writing to a file system."
1023 msgstr "ファイルシステムとの読み書き中に入出力エラーが発生した。"
1024
1025 #. type: TP
1026 #: build/C/man2/fallocate.2:142 build/C/man2/mmap.2:452
1027 #: build/C/man3/posix_fallocate.3:87
1028 #, no-wrap
1029 msgid "B<ENODEV>"
1030 msgstr "B<ENODEV>"
1031
1032 #. type: Plain text
1033 #: build/C/man2/fallocate.2:149
1034 msgid ""
1035 "I<fd> does not refer to a regular file or a directory.  (If I<fd> is a pipe "
1036 "or FIFO, a different error results.)"
1037 msgstr ""
1038 "I<fd> が通常のファイルかディレクトリを参照していない (I<fd> がパイプや FIFO "
1039 "を参照している場合、別のエラーが発生する)。"
1040
1041 #. type: TP
1042 #: build/C/man2/fallocate.2:149 build/C/man3/posix_fallocate.3:91
1043 #: build/C/man2/shmget.2:216 build/C/man2/sync_file_range.2:166
1044 #, no-wrap
1045 msgid "B<ENOSPC>"
1046 msgstr "B<ENOSPC>"
1047
1048 #. type: Plain text
1049 #: build/C/man2/fallocate.2:154 build/C/man3/posix_fallocate.3:96
1050 msgid ""
1051 "There is not enough space left on the device containing the file referred to "
1052 "by I<fd>."
1053 msgstr "I<fd> が参照するファイルを含むデバイスに十分な空き領域がない。"
1054
1055 #. type: Plain text
1056 #: build/C/man2/fallocate.2:158
1057 msgid "This kernel does not implement B<fallocate>()."
1058 msgstr "このカーネルでは B<fallocate>() は実装されていない。"
1059
1060 #. type: TP
1061 #: build/C/man2/fallocate.2:158
1062 #, no-wrap
1063 msgid "B<EOPNOTSUPP>"
1064 msgstr "B<EOPNOTSUPP>"
1065
1066 #. type: Plain text
1067 #: build/C/man2/fallocate.2:167
1068 msgid ""
1069 "The file system containing the file referred to by I<fd> does not support "
1070 "this operation; or the I<mode> is not supported by the file system "
1071 "containing the file referred to by I<fd>."
1072 msgstr ""
1073 "I<fd> が参照するファイルを含むファイルシステムが 指定された操作を\n"
1074 "サポートしていない。 I<fd> が参照するファイルを含むファイルシステムが\n"
1075 "I<mode> をサポートしていない。"
1076
1077 #. type: TP
1078 #: build/C/man2/fallocate.2:167 build/C/man2/mlock.2:143
1079 #: build/C/man2/mlock.2:182 build/C/man2/mmap.2:460 build/C/man2/shmctl.2:344
1080 #: build/C/man2/shmget.2:224
1081 #, no-wrap
1082 msgid "B<EPERM>"
1083 msgstr "B<EPERM>"
1084
1085 #. type: Plain text
1086 #: build/C/man2/fallocate.2:183
1087 msgid ""
1088 "The file referred to by I<fd> is marked immutable (see B<chattr>(1)).  Or: "
1089 "I<mode> specifies B<FALLOC_FL_PUNCH_HOLE> and the file referred to by I<fd> "
1090 "is marked append-only (see B<chattr>(1))."
1091 msgstr ""
1092
1093 #. type: TP
1094 #: build/C/man2/fallocate.2:183 build/C/man2/posix_fadvise.2:97
1095 #: build/C/man3/posix_fallocate.3:96 build/C/man2/sync_file_range.2:169
1096 #, no-wrap
1097 msgid "B<ESPIPE>"
1098 msgstr "B<ESPIPE>"
1099
1100 #. type: Plain text
1101 #: build/C/man2/fallocate.2:187
1102 msgid "I<fd> refers to a pipe or FIFO."
1103 msgstr "I<fd> がパイプか FIFO を参照している。"
1104
1105 #. type: SH
1106 #: build/C/man2/fallocate.2:187 build/C/man3/malloc_info.3:58
1107 #: build/C/man3/mcheck.3:134 build/C/man2/mmap2.2:74
1108 #: build/C/man2/posix_fadvise.2:104 build/C/man3/posix_fallocate.3:100
1109 #: build/C/man3/posix_memalign.3:165 build/C/man2/readahead.2:82
1110 #: build/C/man2/remap_file_pages.2:148 build/C/man3/shm_open.3:247
1111 #: build/C/man2/subpage_prot.2:90 build/C/man2/sync_file_range.2:177
1112 #, no-wrap
1113 msgid "VERSIONS"
1114 msgstr "バージョン"
1115
1116 #.  See http://sourceware.org/bugzilla/show_bug.cgi?id=14964
1117 #. type: Plain text
1118 #: build/C/man2/fallocate.2:195
1119 #, fuzzy
1120 #| msgid ""
1121 #| "B<fallocate>()  is available on Linux since kernel 2.6.23.  Support is "
1122 #| "provided by glibc since version 2.10."
1123 msgid ""
1124 "B<fallocate>()  is available on Linux since kernel 2.6.23.  Support is "
1125 "provided by glibc since version 2.10.  The B<FALLOC_FL_*> flags are defined "
1126 "in glibc headers only since version 2.18."
1127 msgstr ""
1128 "B<fallocate>()  はカーネル 2.6.23 以降の Linux で利用可能である。 glibc での"
1129 "対応はバージョン 3.10 以降で行われている。"
1130
1131 #. type: Plain text
1132 #: build/C/man2/fallocate.2:198
1133 msgid "B<fallocate>()  is Linux-specific."
1134 msgstr "B<fallocate>()  は Linux 固有である。"
1135
1136 #. type: Plain text
1137 #: build/C/man2/fallocate.2:203
1138 #, fuzzy
1139 #| msgid "B<ftruncate>(2), B<posix_fadvise>(3), B<posix_fallocate>(3)"
1140 msgid ""
1141 "B<fallocate>(1), B<ftruncate>(2), B<posix_fadvise>(3), B<posix_fallocate>(3)"
1142 msgstr "B<ftruncate>(2), B<posix_fadvise>(3), B<posix_fallocate>(3)"
1143
1144 #. type: TH
1145 #: build/C/man2/madvise.2:35
1146 #, no-wrap
1147 msgid "MADVISE"
1148 msgstr "MADVISE"
1149
1150 #. type: TH
1151 #: build/C/man2/madvise.2:35 build/C/man3/malloc_info.3:25
1152 #, no-wrap
1153 msgid "2012-04-28"
1154 msgstr "2012-04-28"
1155
1156 #. type: Plain text
1157 #: build/C/man2/madvise.2:38
1158 msgid "madvise - give advice about use of memory"
1159 msgstr "madvise - メモリ利用に関するアドバイスを与える"
1160
1161 #. type: Plain text
1162 #: build/C/man2/madvise.2:40 build/C/man2/msync.2:30
1163 #: build/C/man3/shm_open.3:31
1164 msgid "B<#include E<lt>sys/mman.hE<gt>>"
1165 msgstr "B<#include E<lt>sys/mman.hE<gt>>"
1166
1167 #. type: Plain text
1168 #: build/C/man2/madvise.2:42
1169 msgid ""
1170 "B<int madvise(void *>I<addr>B<, size_t >I<length>B<, int >I<advice>B<);>"
1171 msgstr ""
1172 "B<int madvise(void *>I<addr>B<, size_t >I<length>B<, int >I<advice>B<);>"
1173
1174 #. type: Plain text
1175 #: build/C/man2/madvise.2:46 build/C/man2/posix_fadvise.2:43
1176 #: build/C/man3/posix_fallocate.3:39 build/C/man3/posix_memalign.3:49
1177 msgid ""
1178 "Feature Test Macro Requirements for glibc (see B<feature_test_macros>(7)):"
1179 msgstr "glibc 向けの機能検査マクロの要件 (B<feature_test_macros>(7)  参照):"
1180
1181 #. type: Plain text
1182 #: build/C/man2/madvise.2:50
1183 msgid "B<madvise>(): _BSD_SOURCE"
1184 msgstr "B<madvise>(): _BSD_SOURCE"
1185
1186 #. type: Plain text
1187 #: build/C/man2/madvise.2:68
1188 msgid ""
1189 "The B<madvise>()  system call advises the kernel about how to handle paging "
1190 "input/output in the address range beginning at address I<addr> and with size "
1191 "I<length> bytes.  It allows an application to tell the kernel how it expects "
1192 "to use some mapped or shared memory areas, so that the kernel can choose "
1193 "appropriate read-ahead and caching techniques.  This call does not influence "
1194 "the semantics of the application (except in the case of B<MADV_DONTNEED>), "
1195 "but may influence its performance.  The kernel is free to ignore the advice."
1196 msgstr ""
1197 "B<madvise>()  システムコールは、アドレス I<addr> からはじまる I<length> バイ"
1198 "トのメモリブロックのページング入出力をどう扱えば良いか、 カーネルにアドバイス"
1199 "する。 これを用いると、 アプリケーションからカーネルに、 マップされたメモリや"
1200 "共有メモリをどのように扱ってほしいか伝えることができ、 カーネルはそれに応じて"
1201 "先読みやキャッシュなどの適切な手法を選択できる。 このコールはアプリケーション"
1202 "の動作そのものには影響しない (B<MADV_DONTNEED> の場合は別) が、 性能には影響"
1203 "しうる。 なおこのアドバイスを受け入れるかどうかはカーネルに任される。"
1204
1205 #. type: Plain text
1206 #: build/C/man2/madvise.2:72
1207 msgid "The advice is indicated in the I<advice> argument which can be"
1208 msgstr ""
1209 "アドバイスは引き数 I<advice> によって与える。以下のいずれかを指定できる。"
1210
1211 #. type: TP
1212 #: build/C/man2/madvise.2:72
1213 #, no-wrap
1214 msgid "B<MADV_NORMAL>"
1215 msgstr "B<MADV_NORMAL>"
1216
1217 #. type: Plain text
1218 #: build/C/man2/madvise.2:76
1219 msgid "No special treatment.  This is the default."
1220 msgstr "特別な扱いは行わない。これがデフォルトである。"
1221
1222 #. type: TP
1223 #: build/C/man2/madvise.2:76
1224 #, no-wrap
1225 msgid "B<MADV_RANDOM>"
1226 msgstr "B<MADV_RANDOM>"
1227
1228 #. type: Plain text
1229 #: build/C/man2/madvise.2:80
1230 msgid ""
1231 "Expect page references in random order.  (Hence, read ahead may be less "
1232 "useful than normally.)"
1233 msgstr ""
1234 "ページ参照はランダムな順序で行われそうだ。 (したがって、先読みはあまり効果が"
1235 "なさそうだ。)"
1236
1237 #. type: TP
1238 #: build/C/man2/madvise.2:80
1239 #, no-wrap
1240 msgid "B<MADV_SEQUENTIAL>"
1241 msgstr "B<MADV_SEQUENTIAL>"
1242
1243 #. type: Plain text
1244 #: build/C/man2/madvise.2:85
1245 msgid ""
1246 "Expect page references in sequential order.  (Hence, pages in the given "
1247 "range can be aggressively read ahead, and may be freed soon after they are "
1248 "accessed.)"
1249 msgstr ""
1250 "ページ参照はシーケンシャルな順序で行われそうだ。 (したがって与えた範囲のペー"
1251 "ジは積極的に先読みしておくと良いだろう。 またアクセスが終わったら速やかに解放"
1252 "して良い。)"
1253
1254 #. type: TP
1255 #: build/C/man2/madvise.2:85
1256 #, no-wrap
1257 msgid "B<MADV_WILLNEED>"
1258 msgstr "B<MADV_WILLNEED>"
1259
1260 #. type: Plain text
1261 #: build/C/man2/madvise.2:89
1262 msgid ""
1263 "Expect access in the near future.  (Hence, it might be a good idea to read "
1264 "some pages ahead.)"
1265 msgstr ""
1266 "近い将来にアクセスされそうだ。 (したがってこれらのページを今のうちに先読みし"
1267 "ておくといいだろう。)"
1268
1269 #. type: TP
1270 #: build/C/man2/madvise.2:89
1271 #, no-wrap
1272 msgid "B<MADV_DONTNEED>"
1273 msgstr "B<MADV_DONTNEED>"
1274
1275 #. type: Plain text
1276 #: build/C/man2/madvise.2:100
1277 msgid ""
1278 "Do not expect access in the near future.  (For the time being, the "
1279 "application is finished with the given range, so the kernel can free "
1280 "resources associated with it.)  Subsequent accesses of pages in this range "
1281 "will succeed, but will result either in reloading of the memory contents "
1282 "from the underlying mapped file (see B<mmap>(2))  or zero-fill-on-demand "
1283 "pages for mappings without an underlying file."
1284 msgstr ""
1285 "しばらくアクセスはなさそうだ。 (現時点でアプリケーションは与えた範囲の処理を"
1286 "終えている。 したがってカーネルはこれに関連するリソースを解放して良い。)  こ"
1287 "れ以降この範囲のページへのアクセスがあると、 成功はするが、メモリの内容をマッ"
1288 "プ元のファイルからロードし直すことになる (B<mmap>(2)  を見よ) か、 または元"
1289 "ファイルがないマップページでは アクセスがあったときに 0 埋めが行われることに"
1290 "なる。"
1291
1292 #. type: TP
1293 #: build/C/man2/madvise.2:100
1294 #, no-wrap
1295 msgid "B<MADV_REMOVE> (Since Linux 2.6.16)"
1296 msgstr "B<MADV_REMOVE> (Linux 2.6.16 以降)"
1297
1298 #.  2.6.18-rc5
1299 #.  Databases want to use this feature to drop a section of their
1300 #.  bufferpool (shared memory segments) - without writing back to
1301 #.  disk/swap space.  This feature is also useful for supporting
1302 #.  hot-plug memory on UML.
1303 #. type: Plain text
1304 #: build/C/man2/madvise.2:113
1305 msgid ""
1306 "Free up a given range of pages and its associated backing store.  Currently, "
1307 "only shmfs/tmpfs supports this; other file systems return with the error "
1308 "B<ENOSYS>."
1309 msgstr ""
1310 "指定された範囲のページと関連するバッキングストアを解放する。 現在のところ、 "
1311 "shmfs/tmpfs だけがこれに対応している。 他のファイルシステムでは B<ENOSYS> が"
1312 "返される。"
1313
1314 #. type: TP
1315 #: build/C/man2/madvise.2:113
1316 #, no-wrap
1317 msgid "B<MADV_DONTFORK> (Since Linux 2.6.16)"
1318 msgstr "B<MADV_DONTFORK> (Linux 2.6.16 以降)"
1319
1320 #.  See http://lwn.net/Articles/171941/
1321 #.  [PATCH] madvise MADV_DONTFORK/MADV_DOFORK
1322 #.  Currently, copy-on-write may change the physical address of
1323 #.  a page even if the user requested that the page is pinned in
1324 #.  memory (either by mlock or by get_user_pages).  This happens
1325 #.  if the process forks meanwhile, and the parent writes to that
1326 #.  page.  As a result, the page is orphaned: in case of
1327 #.  get_user_pages, the application will never see any data hardware
1328 #.  DMA's into this page after the COW.  In case of mlock'd memory,
1329 #.  the parent is not getting the realtime/security benefits of mlock.
1330 #.  In particular, this affects the Infiniband modules which do DMA from
1331 #.  and into user pages all the time.
1332 #.  This patch adds madvise options to control whether memory range is
1333 #.  inherited across fork. Useful e.g. for when hardware is doing DMA
1334 #.  from/into these pages.  Could also be useful to an application
1335 #.  wanting to speed up its forks by cutting large areas out of
1336 #.  consideration.
1337 #.  SEE ALSO: http://lwn.net/Articles/171941/
1338 #.  "Tweaks to madvise() and posix_fadvise()", 14 Feb 2006
1339 #. type: Plain text
1340 #: build/C/man2/madvise.2:144
1341 msgid ""
1342 "Do not make the pages in this range available to the child after a B<fork>"
1343 "(2).  This is useful to prevent copy-on-write semantics from changing the "
1344 "physical location of a page(s) if the parent writes to it after a B<fork>"
1345 "(2).  (Such page relocations cause problems for hardware that DMAs into the "
1346 "page(s).)"
1347 msgstr ""
1348 "B<fork>(2)  が行われた後、指定された範囲のページを子プロセスが利用できないよ"
1349 "うにする。 この機能は、書き込み時コピー (copy-on-write) 方式で、 B<fork>(2)  "
1350 "の後で親プロセスがページに書き込みを行った場合に ページの物理位置が変化しない"
1351 "ようにするのに有効である (ページの再配置はハードウェアがそのページに DMA 転送"
1352 "を行うような場合に 問題を起こすことがある)。"
1353
1354 #. type: TP
1355 #: build/C/man2/madvise.2:144
1356 #, no-wrap
1357 msgid "B<MADV_DOFORK> (Since Linux 2.6.16)"
1358 msgstr "B<MADV_DOFORK> (Linux 2.6.16 以降)"
1359
1360 #. type: Plain text
1361 #: build/C/man2/madvise.2:150
1362 msgid ""
1363 "Undo the effect of B<MADV_DONTFORK>, restoring the default behavior, whereby "
1364 "a mapping is inherited across B<fork>(2)."
1365 msgstr ""
1366 "B<MADV_DONTFORK> の影響を取り消し、デフォルトの動作に戻す。 つまり、 B<fork>"
1367 "(2)  の前後でマッピングは継承されるようになる。"
1368
1369 #. type: TP
1370 #: build/C/man2/madvise.2:150
1371 #, no-wrap
1372 msgid "B<MADV_HWPOISON> (Since Linux 2.6.32)"
1373 msgstr "B<MADV_HWPOISON> (Linux 2.6.32 以降)"
1374
1375 #. type: Plain text
1376 #: build/C/man2/madvise.2:162
1377 msgid ""
1378 "Poison a page and handle it like a hardware memory corruption.  This "
1379 "operation is only available for privileged (B<CAP_SYS_ADMIN>)  processes.  "
1380 "This operation may result in the calling process receiving a B<SIGBUS> and "
1381 "the page being unmapped.  This feature is intended for testing of memory "
1382 "error-handling code; it is only available if the kernel was configured with "
1383 "B<CONFIG_MEMORY_FAILURE>."
1384 msgstr ""
1385
1386 #. type: TP
1387 #: build/C/man2/madvise.2:162
1388 #, no-wrap
1389 msgid "B<MADV_SOFT_OFFLINE> (Since Linux 2.6.33)"
1390 msgstr "B<MADV_SOFT_OFFLINE> (Linux 2.6.33 以降)"
1391
1392 #. type: Plain text
1393 #: build/C/man2/madvise.2:180
1394 msgid ""
1395 "Soft offline the pages in the range specified by I<addr> and I<length>.  The "
1396 "memory of each page in the specified range is preserved (i.e., when next "
1397 "accessed, the same content will be visible, but in a new physical page "
1398 "frame), and the original page is offlined (i.e., no longer used, and taken "
1399 "out of normal memory management).  The effect of the B<MADV_SOFT_OFFLINE> "
1400 "operation is invisible to (i.e., does not change the semantics of)  the "
1401 "calling process.  This feature is intended for testing of memory error-"
1402 "handling code; it is only available if the kernel was configured with "
1403 "B<CONFIG_MEMORY_FAILURE>."
1404 msgstr ""
1405
1406 #. type: TP
1407 #: build/C/man2/madvise.2:180
1408 #, no-wrap
1409 msgid "B<MADV_MERGEABLE> (since Linux 2.6.32)"
1410 msgstr "B<MADV_MERGEABLE> (Linux 2.6.32 以降)"
1411
1412 #. type: Plain text
1413 #: build/C/man2/madvise.2:205
1414 msgid ""
1415 "Enable Kernel Samepage Merging (KSM) for the pages in the range specified by "
1416 "I<addr> and I<length>.  The kernel regularly scans those areas of user "
1417 "memory that have been marked as mergeable, looking for pages with identical "
1418 "content.  These are replaced by a single write-protected page (which is "
1419 "automatically copied if a process later wants to update the content of the "
1420 "page).  KSM only merges private anonymous pages (see B<mmap>(2)).  The KSM "
1421 "feature is intended for applications that generate many instances of the "
1422 "same data (e.g., virtualization systems such as KVM).  It can consume a lot "
1423 "of processing power; use with care.  See the Linux kernel source file "
1424 "I<Documentation/vm/ksm.txt> for more details.  The B<MADV_MERGEABLE> and "
1425 "B<MADV_UNMERGEABLE> operations are only available if the kernel was "
1426 "configured with B<CONFIG_KSM>."
1427 msgstr ""
1428
1429 #. type: TP
1430 #: build/C/man2/madvise.2:205
1431 #, no-wrap
1432 msgid "B<MADV_UNMERGEABLE> (since Linux 2.6.32)"
1433 msgstr "B<MADV_UNMERGEABLE> (Linux 2.6.32 以降)"
1434
1435 #. type: Plain text
1436 #: build/C/man2/madvise.2:214
1437 msgid ""
1438 "Undo the effect of an earlier B<MADV_MERGEABLE> operation on the specified "
1439 "address range; KSM unmerges whatever pages it had merged in the address "
1440 "range specified by I<addr> and I<length>."
1441 msgstr ""
1442
1443 #. type: TP
1444 #: build/C/man2/madvise.2:214
1445 #, no-wrap
1446 msgid "B<MADV_HUGEPAGE> (since Linux 2.6.38)"
1447 msgstr "B<MADV_HUGEPAGE> (Linux 2.6.38 以降)"
1448
1449 #.  http://lwn.net/Articles/358904/
1450 #.  https://lwn.net/Articles/423584/
1451 #. type: Plain text
1452 #: build/C/man2/madvise.2:243
1453 msgid ""
1454 "Enables Transparent Huge Pages (THP) for pages in the range specified by "
1455 "I<addr> and I<length>.  Currently, Transparent Huge Pages only work with "
1456 "private anonymous pages (see B<mmap>(2)).  The kernel will regularly scan "
1457 "the areas marked as huge page candidates to replace them with huge pages.  "
1458 "The kernel will also allocate huge pages directly when the region is "
1459 "naturally aligned to the huge page size (see B<posix_memalign>(2)).  This "
1460 "feature is primarily aimed at applications that use large mappings of data "
1461 "and access large regions of that memory at a time (e.g., virtualization "
1462 "systems such as QEMU).  It can very easily waste memory (e.g., a 2MB mapping "
1463 "that only ever accesses 1 byte will result in 2MB of wired memory instead of "
1464 "one 4KB page).  See the Linux kernel source file I<Documentation/vm/"
1465 "transhuge.txt> for more details.  The B<MADV_HUGEPAGE> and "
1466 "B<MADV_NOHUGEPAGE> operations are only available if the kernel was "
1467 "configured with B<CONFIG_TRANSPARENT_HUGEPAGE>."
1468 msgstr ""
1469
1470 #. type: TP
1471 #: build/C/man2/madvise.2:243
1472 #, no-wrap
1473 msgid "B<MADV_NOHUGEPAGE> (since Linux 2.6.38)"
1474 msgstr "B<MADV_NOHUGEPAGE> (Linux 2.6.38 以降)"
1475
1476 #. type: Plain text
1477 #: build/C/man2/madvise.2:250
1478 msgid ""
1479 "Ensures that memory in the address range specified by I<addr> and I<length> "
1480 "will not be collapsed into huge pages."
1481 msgstr ""
1482
1483 #. type: TP
1484 #: build/C/man2/madvise.2:250
1485 #, no-wrap
1486 msgid "B<MADV_DONTDUMP> (since Linux 3.4)"
1487 msgstr "B<MADV_DONTDUMP> (Linux 3.4 以降)"
1488
1489 #. type: Plain text
1490 #: build/C/man2/madvise.2:264
1491 msgid ""
1492 "Exclude from a core dump those pages in the range specified by I<addr> and "
1493 "I<length>.  This is useful in applications that have large areas of memory "
1494 "that are known not to be useful in a core dump.  The effect of "
1495 "B<MADV_DONTDUMP> takes precedence over the bit mask that is set via the I</"
1496 "proc/PID/coredump_filter> file (see B<core>(5))."
1497 msgstr ""
1498
1499 #. type: TP
1500 #: build/C/man2/madvise.2:264
1501 #, no-wrap
1502 msgid "B<MADV_DODUMP> (since Linux 3.4)"
1503 msgstr "B<MADV_DODUMP> (Linux 3.4 以降)"
1504
1505 #. type: Plain text
1506 #: build/C/man2/madvise.2:268
1507 msgid "Undo the effect of an earlier B<MADV_DONTDUMP>."
1508 msgstr ""
1509
1510 #. type: Plain text
1511 #: build/C/man2/madvise.2:275
1512 msgid ""
1513 "On success B<madvise>()  returns zero.  On error, it returns -1 and I<errno> "
1514 "is set appropriately."
1515 msgstr ""
1516 "B<madvise>()  は成功すると 0 を返す。 エラーが起こると -1 を返し、 I<errno> "
1517 "を適切な値に設定する。"
1518
1519 #. type: TP
1520 #: build/C/man2/madvise.2:276 build/C/man2/mlock.2:154 build/C/man2/mmap.2:413
1521 #: build/C/man2/mremap.2:136
1522 #, no-wrap
1523 msgid "B<EAGAIN>"
1524 msgstr "B<EAGAIN>"
1525
1526 #. type: Plain text
1527 #: build/C/man2/madvise.2:279
1528 msgid "A kernel resource was temporarily unavailable."
1529 msgstr "何らかのカーネルリソースが一時的に利用できなかった。"
1530
1531 #. type: Plain text
1532 #: build/C/man2/madvise.2:282
1533 msgid "The map exists, but the area maps something that isn't a file."
1534 msgstr "指定したマップは存在するが、ファイルではないところをマップしている。"
1535
1536 #. type: Plain text
1537 #: build/C/man2/madvise.2:285
1538 msgid "This error can occur for the following reasons:"
1539 msgstr ""
1540
1541 #. type: IP
1542 #: build/C/man2/madvise.2:286 build/C/man2/madvise.2:292
1543 #: build/C/man2/madvise.2:295 build/C/man2/madvise.2:298
1544 #: build/C/man2/madvise.2:301 build/C/man3/mallopt.3:235
1545 #: build/C/man3/mallopt.3:241
1546 #, no-wrap
1547 msgid "*"
1548 msgstr "*"
1549
1550 #.  .I len
1551 #.  is zero,
1552 #. type: Plain text
1553 #: build/C/man2/madvise.2:292
1554 msgid "The value I<len> is negative."
1555 msgstr "I<len> が負の値である。"
1556
1557 #. type: Plain text
1558 #: build/C/man2/madvise.2:295
1559 msgid "I<addr> is not page-aligned."
1560 msgstr ""
1561
1562 #. type: Plain text
1563 #: build/C/man2/madvise.2:298
1564 msgid "I<advice> is not a valid value"
1565 msgstr "I<advice> が有効な値でない。"
1566
1567 #. type: Plain text
1568 #: build/C/man2/madvise.2:301
1569 msgid ""
1570 "The application is attempting to release locked or shared pages (with "
1571 "B<MADV_DONTNEED>)."
1572 msgstr ""
1573 "アプリケーションがロックされたページや共有ページを (B<MADV_DONTNEED> で) 解"
1574 "放\n"
1575 "しようとしている。"
1576
1577 #. type: Plain text
1578 #: build/C/man2/madvise.2:309
1579 msgid ""
1580 "B<MADV_MERGEABLE> or B<MADV_UNMERGEABLE> was specified in I<advice>, but the "
1581 "kernel was not configured with B<CONFIG_KSM>."
1582 msgstr ""
1583
1584 #. type: Plain text
1585 #: build/C/man2/madvise.2:316
1586 msgid ""
1587 "(for B<MADV_WILLNEED>)  Paging in this area would exceed the process's "
1588 "maximum resident set size."
1589 msgstr ""
1590 "(B<MADV_WILLNEED> の場合) この範囲のページングを行うと、 プロセスの RSS "
1591 "(resident set size) の最大値を越えてしまう。"
1592
1593 #. type: TP
1594 #: build/C/man2/madvise.2:316 build/C/man2/madvise.2:321
1595 #: build/C/man2/mlock.2:123 build/C/man2/mlock.2:131 build/C/man2/mlock.2:169
1596 #: build/C/man2/mmap.2:456 build/C/man2/mprotect.2:100
1597 #: build/C/man2/mprotect.2:103 build/C/man2/mremap.2:179
1598 #: build/C/man2/msync.2:93 build/C/man3/posix_memalign.3:162
1599 #: build/C/man2/shmctl.2:328 build/C/man2/shmget.2:213
1600 #: build/C/man2/shmop.2:214 build/C/man2/subpage_prot.2:87
1601 #: build/C/man2/sync_file_range.2:163
1602 #, no-wrap
1603 msgid "B<ENOMEM>"
1604 msgstr "B<ENOMEM>"
1605
1606 #. type: Plain text
1607 #: build/C/man2/madvise.2:321
1608 msgid "(for B<MADV_WILLNEED>)  Not enough memory: paging in failed."
1609 msgstr "(B<MADV_WILLNEED> の場合) メモリが足りず、ページングに失敗した。"
1610
1611 #. type: Plain text
1612 #: build/C/man2/madvise.2:325
1613 msgid ""
1614 "Addresses in the specified range are not currently mapped, or are outside "
1615 "the address space of the process."
1616 msgstr ""
1617 "指定した範囲のアドレスが、現在マップされていない。 あるいはプロセスのアドレス"
1618 "空間の内部にない。"
1619
1620 #.  FIXME . Write a posix_madvise(3) page.
1621 #. type: Plain text
1622 #: build/C/man2/madvise.2:337
1623 msgid ""
1624 "POSIX.1b.  POSIX.1-2001 describes B<posix_madvise>(3)  with constants "
1625 "B<POSIX_MADV_NORMAL>, etc., with a behavior close to that described here.  "
1626 "There is a similar B<posix_fadvise>(2)  for file access."
1627 msgstr ""
1628 "POSIX.1b.  POSIX.1-2001 では、 B<posix_madvise>(3)  を B<POSIX_MADV_NORMAL> "
1629 "などの定数とともに記述していた (それぞれの振る舞いはここで述べたものに近"
1630 "い)。 ファイルアクセスに対しても B<posix_fadvise>(2)  という類似の関数が存在"
1631 "する。"
1632
1633 #. type: Plain text
1634 #: build/C/man2/madvise.2:346
1635 msgid ""
1636 "B<MADV_REMOVE>, B<MADV_DONTFORK>, B<MADV_DOFORK>, B<MADV_HWPOISON>, "
1637 "B<MADV_MERGEABLE>, and B<MADV_UNMERGEABLE> are Linux-specific."
1638 msgstr ""
1639 "B<MADV_REMOVE>, B<MADV_DONTFORK>, B<MADV_DOFORK>, B<MADV_HWPOISON>,\n"
1640 "B<MADV_MERGEABLE>, B<MADV_UNMERGEABLE> は Linux 固有である。"
1641
1642 #. type: SS
1643 #: build/C/man2/madvise.2:347 build/C/man2/mlock.2:267
1644 #: build/C/man2/shmget.2:293
1645 #, fuzzy, no-wrap
1646 #| msgid "Linux Notes"
1647 msgid "Linux notes"
1648 msgstr "Linux での注意"
1649
1650 #. type: Plain text
1651 #: build/C/man2/madvise.2:355
1652 msgid ""
1653 "The current Linux implementation (2.4.0) views this system call more as a "
1654 "command than as advice and hence may return an error when it cannot do what "
1655 "it usually would do in response to this advice.  (See the ERRORS description "
1656 "above.)  This is nonstandard behavior."
1657 msgstr ""
1658 "現在の Linux の実装 (2.4.0) では、 このシステムコールをアドバイスというよりは"
1659 "命令と見ている。 したがってこのアドバイスに対して通常行われる動作が不可能な場"
1660 "合は、 エラーを返すことがある (上記の エラー の記述を参照)。 この振舞いは標準"
1661 "とは異なる。"
1662
1663 #.  .SH HISTORY
1664 #.  The
1665 #.  .BR madvise ()
1666 #.  function first appeared in 4.4BSD.
1667 #. type: Plain text
1668 #: build/C/man2/madvise.2:371
1669 msgid ""
1670 "The Linux implementation requires that the address I<addr> be page-aligned, "
1671 "and allows I<length> to be zero.  If there are some parts of the specified "
1672 "address range that are not mapped, the Linux version of B<madvise>()  "
1673 "ignores them and applies the call to the rest (but returns B<ENOMEM> from "
1674 "the system call, as it should)."
1675 msgstr ""
1676 "Linux の実装では I<addr> のアドレスはページ境界の値でなければならない。また "
1677 "I<length> は 0 であっても構わない。 また Linux 版の B<madvise>()  では、指定"
1678 "されたアドレス範囲にマップされていない部分があると、 これらを無視して残りの部"
1679 "分にアドバイスを適用する (しかしシステムコールに対してはちゃんと B<ENOMEM> を"
1680 "返す)。"
1681
1682 #. type: Plain text
1683 #: build/C/man2/madvise.2:379
1684 msgid ""
1685 "B<getrlimit>(2), B<mincore>(2), B<mmap>(2), B<mprotect>(2), B<msync>(2), "
1686 "B<munmap>(2), B<core>(5)"
1687 msgstr ""
1688 "B<getrlimit>(2), B<mincore>(2), B<mmap>(2), B<mprotect>(2), B<msync>(2), "
1689 "B<munmap>(2), B<core>(5)"
1690
1691 #. type: TH
1692 #: build/C/man3/mallinfo.3:26
1693 #, no-wrap
1694 msgid "MALLINFO"
1695 msgstr "MALLINFO"
1696
1697 #. type: TH
1698 #: build/C/man3/mallinfo.3:26 build/C/man3/malloc_stats.3:26
1699 #, no-wrap
1700 msgid "2012-05-06"
1701 msgstr "2012-05-06"
1702
1703 #. type: Plain text
1704 #: build/C/man3/mallinfo.3:29
1705 msgid "mallinfo - obtain memory allocation information"
1706 msgstr "mallinfo - メモリ割り当て情報を取得する"
1707
1708 #. type: Plain text
1709 #: build/C/man3/mallinfo.3:31 build/C/man3/malloc_stats.3:31
1710 #: build/C/man3/malloc_trim.3:31 build/C/man3/malloc_usable_size.3:30
1711 #: build/C/man3/mallopt.3:31
1712 msgid "B<#include E<lt>malloc.hE<gt>>"
1713 msgstr "B<#include E<lt>malloc.hE<gt>>"
1714
1715 #. type: Plain text
1716 #: build/C/man3/mallinfo.3:33
1717 msgid "B<struct mallinfo mallinfo(void);>"
1718 msgstr "B<struct mallinfo mallinfo(void);>"
1719
1720 #. type: Plain text
1721 #: build/C/man3/mallinfo.3:41
1722 msgid ""
1723 "The B<mallinfo>()  function returns a copy of a structure containing "
1724 "information about memory allocations performed by B<malloc>(3)  and related "
1725 "functions.  This structure is defined as follows:"
1726 msgstr ""
1727 "B<mallinfo>() 関数は、 B<malloc>(3) や一連の関数により実行されたメモリ\n"
1728 "割り当てに関する情報を格納した構造体のコピーを返す。\n"
1729 "この構造体は以下のように定義されている。"
1730
1731 #. type: Plain text
1732 #: build/C/man3/mallinfo.3:56
1733 #, no-wrap
1734 msgid ""
1735 "struct mallinfo {\n"
1736 "    int arena;     /* Non-mmapped space allocated (bytes) */\n"
1737 "    int ordblks;   /* Number of free chunks */\n"
1738 "    int smblks;    /* Number of free fastbin blocks */\n"
1739 "    int hblks;     /* Number of mmapped regions */\n"
1740 "    int hblkhd;    /* Space allocated in mmapped regions (bytes) */\n"
1741 "    int usmblks;   /* Maximum total allocated space (bytes) */\n"
1742 "    int fsmblks;   /* Space in freed fastbin blocks (bytes) */\n"
1743 "    int uordblks;  /* Total allocated space (bytes) */\n"
1744 "    int fordblks;  /* Total free space (bytes) */\n"
1745 "    int keepcost;  /* Top-most, releasable space (bytes) */\n"
1746 "};\n"
1747 msgstr ""
1748 "struct mallinfo {\n"
1749 "    int arena;     /* Non-mmapped space allocated (bytes) */\n"
1750 "    int ordblks;   /* Number of free chunks */\n"
1751 "    int smblks;    /* Number of free fastbin blocks */\n"
1752 "    int hblks;     /* Number of mmapped regions */\n"
1753 "    int hblkhd;    /* Space allocated in mmapped regions (bytes) */\n"
1754 "    int usmblks;   /* Maximum total allocated space (bytes) */\n"
1755 "    int fsmblks;   /* Space in freed fastbin blocks (bytes) */\n"
1756 "    int uordblks;  /* Total allocated space (bytes) */\n"
1757 "    int fordblks;  /* Total free space (bytes) */\n"
1758 "    int keepcost;  /* Top-most, releasable space (bytes) */\n"
1759 "};\n"
1760
1761 #. type: Plain text
1762 #: build/C/man3/mallinfo.3:62
1763 msgid ""
1764 "The fields of the I<mallinfo> structure contain the following information:"
1765 msgstr "I<mallinfo> 構造体の各フィールドには以下の情報が格納される。"
1766
1767 #. type: TP
1768 #: build/C/man3/mallinfo.3:62
1769 #, no-wrap
1770 msgid "I<arena>"
1771 msgstr "I<arena>"
1772
1773 #. type: Plain text
1774 #: build/C/man3/mallinfo.3:68
1775 msgid ""
1776 "The total amount of memory allocated by means other than B<mmap>(2)  (i.e., "
1777 "memory allocated on the heap).  This figure includes both in-use blocks and "
1778 "blocks on the free list."
1779 msgstr ""
1780
1781 #. type: TP
1782 #: build/C/man3/mallinfo.3:68
1783 #, no-wrap
1784 msgid "I<ordblks>"
1785 msgstr "I<ordblks>"
1786
1787 #. type: Plain text
1788 #: build/C/man3/mallinfo.3:71
1789 msgid "The number of ordinary (i.e., non-fastbin) free blocks."
1790 msgstr ""
1791
1792 #. type: TP
1793 #: build/C/man3/mallinfo.3:71
1794 #, no-wrap
1795 msgid "I<smblks>"
1796 msgstr "I<smblks>"
1797
1798 #. type: Plain text
1799 #: build/C/man3/mallinfo.3:75
1800 msgid "The number of fastbin free blocks (see B<mallopt>(3))."
1801 msgstr ""
1802
1803 #. type: TP
1804 #: build/C/man3/mallinfo.3:75
1805 #, no-wrap
1806 msgid "I<hblks>"
1807 msgstr "I<hblks>"
1808
1809 #. type: Plain text
1810 #: build/C/man3/mallinfo.3:83
1811 msgid ""
1812 "The number of blocks currently allocated using B<mmap>(2).  (See the "
1813 "discussion of B<M_MMAP_THRESHOLD> in B<mallopt>(3).)"
1814 msgstr ""
1815
1816 #. type: TP
1817 #: build/C/man3/mallinfo.3:83
1818 #, no-wrap
1819 msgid "I<hblkhd>"
1820 msgstr "I<hblkhd>"
1821
1822 #. type: Plain text
1823 #: build/C/man3/mallinfo.3:87
1824 msgid "The number of bytes in blocks currently allocated using B<mmap>(2)."
1825 msgstr ""
1826
1827 #. type: TP
1828 #: build/C/man3/mallinfo.3:87
1829 #, no-wrap
1830 msgid "I<usmblks>"
1831 msgstr "I<usmblks>"
1832
1833 #. type: Plain text
1834 #: build/C/man3/mallinfo.3:92
1835 msgid ""
1836 "The \"highwater mark\" for allocated space\\(emthat is, the maximum amount "
1837 "of space that was ever allocated.  This field is maintained only in "
1838 "nonthreading environments."
1839 msgstr ""
1840
1841 #. type: TP
1842 #: build/C/man3/mallinfo.3:92
1843 #, no-wrap
1844 msgid "I<fsmblks>"
1845 msgstr "I<fsmblks>"
1846
1847 #. type: Plain text
1848 #: build/C/man3/mallinfo.3:95
1849 msgid "The total number of bytes in fastbin free blocks."
1850 msgstr ""
1851
1852 #. type: TP
1853 #: build/C/man3/mallinfo.3:95
1854 #, no-wrap
1855 msgid "I<uordblks>"
1856 msgstr "I<uordblks>"
1857
1858 #. type: Plain text
1859 #: build/C/man3/mallinfo.3:98
1860 msgid "The total number of bytes used by in-use allocations."
1861 msgstr ""
1862
1863 #. type: TP
1864 #: build/C/man3/mallinfo.3:98
1865 #, no-wrap
1866 msgid "I<fordblks>"
1867 msgstr "I<fordblks>"
1868
1869 #. type: Plain text
1870 #: build/C/man3/mallinfo.3:101
1871 msgid "The total number of bytes in free blocks."
1872 msgstr ""
1873
1874 #. type: TP
1875 #: build/C/man3/mallinfo.3:101
1876 #, no-wrap
1877 msgid "I<keepcost>"
1878 msgstr "I<keepcost>"
1879
1880 #.  .SH VERSIONS
1881 #.  Available already in glibc 2.0, possibly earlier
1882 #. type: Plain text
1883 #: build/C/man3/mallinfo.3:110
1884 msgid ""
1885 "The total amount of releasable free space at the top of the heap.  This is "
1886 "the maximum number of bytes that could ideally (i.e., ignoring page "
1887 "alignment restrictions, and so on) be released by B<malloc_trim>(3)."
1888 msgstr ""
1889
1890 #. type: Plain text
1891 #: build/C/man3/mallinfo.3:114
1892 msgid ""
1893 "This function is not specified by POSIX or the C standards.  A similar "
1894 "function exists on many System V derivatives, and was specified in the SVID."
1895 msgstr ""
1896
1897 #.  FIXME http://sourceware.org/bugzilla/show_bug.cgi?id=208
1898 #.  See the 24 Aug 2011 mail by Paul Pluzhnikov:
1899 #.      "[patch] Fix mallinfo() to accumulate results for all arenas"
1900 #.  on libc-alpha@sourceware.org
1901 #. type: Plain text
1902 #: build/C/man3/mallinfo.3:126
1903 msgid ""
1904 "B<Information is returned for only the main memory allocation area.> "
1905 "Allocations in other arenas are excluded.  See B<malloc_stats>(3)  and "
1906 "B<malloc_info>(3)  for alternatives that include information about other "
1907 "arenas."
1908 msgstr ""
1909
1910 #. type: Plain text
1911 #: build/C/man3/mallinfo.3:134
1912 msgid ""
1913 "The fields of the I<mallinfo> structure are typed as I<int>.  However, "
1914 "because some internal bookkeeping values may be of type I<long>, the "
1915 "reported values may wrap around zero and thus be inaccurate."
1916 msgstr ""
1917
1918 #. type: SH
1919 #: build/C/man3/mallinfo.3:134 build/C/man3/malloc_hook.3:89
1920 #: build/C/man3/malloc_info.3:82 build/C/man3/mallopt.3:466
1921 #: build/C/man3/mcheck.3:159 build/C/man2/mmap.2:630
1922 #: build/C/man2/mprotect.2:148 build/C/man3/mtrace.3:108
1923 #, no-wrap
1924 msgid "EXAMPLE"
1925 msgstr "例"
1926
1927 #. type: Plain text
1928 #: build/C/man3/mallinfo.3:140
1929 msgid ""
1930 "The program below employs B<mallinfo>()  to retrieve memory allocation "
1931 "statistics before and after allocating and freeing some blocks of memory.  "
1932 "The statistics are displayed on standard output."
1933 msgstr ""
1934
1935 #. type: Plain text
1936 #: build/C/man3/mallinfo.3:144
1937 msgid ""
1938 "The first two command-line arguments specify the number and size of blocks "
1939 "to be allocated with B<malloc>(3)."
1940 msgstr ""
1941
1942 #. type: Plain text
1943 #: build/C/man3/mallinfo.3:158
1944 msgid ""
1945 "The remaining three arguments specify which of the allocated blocks should "
1946 "be freed with B<free>(3).  These three arguments are optional, and specify "
1947 "(in order): the step size to be used in the loop that frees blocks (the "
1948 "default is 1, meaning free all blocks in the range); the ordinal position of "
1949 "the first block to be freed (default 0, meaning the first allocated block); "
1950 "and a number one greater than the ordinal position of the last block to be "
1951 "freed (default is one greater than the maximum block number).  If these "
1952 "three arguments are omitted, then the defaults cause all allocated blocks to "
1953 "be freed."
1954 msgstr ""
1955
1956 #. type: Plain text
1957 #: build/C/man3/mallinfo.3:162
1958 msgid ""
1959 "In the following example run of the program, 1000 allocations of 100 bytes "
1960 "are performed, and then every second allocated block is freed:"
1961 msgstr ""
1962
1963 #. type: Plain text
1964 #: build/C/man3/mallinfo.3:177
1965 #, no-wrap
1966 msgid ""
1967 "$ B<./a.out 1000 100 2>\n"
1968 "============== Before allocating blocks ==============\n"
1969 "Total non-mmapped bytes (arena):       0\n"
1970 "# of free chunks (ordblks):            1\n"
1971 "# of free fastbin blocks (smblks):     0\n"
1972 "# of mapped regions (hblks):           0\n"
1973 "Bytes in mapped regions (hblkhd):      0\n"
1974 "Max. total allocated space (usmblks):  0\n"
1975 "Free bytes held in fastbins (fsmblks): 0\n"
1976 "Total allocated space (uordblks):      0\n"
1977 "Total free space (fordblks):           0\n"
1978 "Topmost releasable block (keepcost):   0\n"
1979 msgstr ""
1980 "$ B<./a.out 1000 100 2>\n"
1981 "============== Before allocating blocks ==============\n"
1982 "Total non-mmapped bytes (arena):       0\n"
1983 "# of free chunks (ordblks):            1\n"
1984 "# of free fastbin blocks (smblks):     0\n"
1985 "# of mapped regions (hblks):           0\n"
1986 "Bytes in mapped regions (hblkhd):      0\n"
1987 "Max. total allocated space (usmblks):  0\n"
1988 "Free bytes held in fastbins (fsmblks): 0\n"
1989 "Total allocated space (uordblks):      0\n"
1990 "Total free space (fordblks):           0\n"
1991 "Topmost releasable block (keepcost):   0\n"
1992
1993 #. type: Plain text
1994 #: build/C/man3/mallinfo.3:189
1995 #, no-wrap
1996 msgid ""
1997 "============== After allocating blocks ==============\n"
1998 "Total non-mmapped bytes (arena):       135168\n"
1999 "# of free chunks (ordblks):            1\n"
2000 "# of free fastbin blocks (smblks):     0\n"
2001 "# of mapped regions (hblks):           0\n"
2002 "Bytes in mapped regions (hblkhd):      0\n"
2003 "Max. total allocated space (usmblks):  0\n"
2004 "Free bytes held in fastbins (fsmblks): 0\n"
2005 "Total allocated space (uordblks):      104000\n"
2006 "Total free space (fordblks):           31168\n"
2007 "Topmost releasable block (keepcost):   31168\n"
2008 msgstr ""
2009 "============== After allocating blocks ==============\n"
2010 "Total non-mmapped bytes (arena):       135168\n"
2011 "# of free chunks (ordblks):            1\n"
2012 "# of free fastbin blocks (smblks):     0\n"
2013 "# of mapped regions (hblks):           0\n"
2014 "Bytes in mapped regions (hblkhd):      0\n"
2015 "Max. total allocated space (usmblks):  0\n"
2016 "Free bytes held in fastbins (fsmblks): 0\n"
2017 "Total allocated space (uordblks):      104000\n"
2018 "Total free space (fordblks):           31168\n"
2019 "Topmost releasable block (keepcost):   31168\n"
2020
2021 #. type: Plain text
2022 #: build/C/man3/mallinfo.3:201
2023 #, no-wrap
2024 msgid ""
2025 "============== After freeing blocks ==============\n"
2026 "Total non-mmapped bytes (arena):       135168\n"
2027 "# of free chunks (ordblks):            501\n"
2028 "# of free fastbin blocks (smblks):     0\n"
2029 "# of mapped regions (hblks):           0\n"
2030 "Bytes in mapped regions (hblkhd):      0\n"
2031 "Max. total allocated space (usmblks):  0\n"
2032 "Free bytes held in fastbins (fsmblks): 0\n"
2033 "Total allocated space (uordblks):      52000\n"
2034 "Total free space (fordblks):           83168\n"
2035 "Topmost releasable block (keepcost):   31168\n"
2036 msgstr ""
2037 "============== After freeing blocks ==============\n"
2038 "Total non-mmapped bytes (arena):       135168\n"
2039 "# of free chunks (ordblks):            501\n"
2040 "# of free fastbin blocks (smblks):     0\n"
2041 "# of mapped regions (hblks):           0\n"
2042 "Bytes in mapped regions (hblkhd):      0\n"
2043 "Max. total allocated space (usmblks):  0\n"
2044 "Free bytes held in fastbins (fsmblks): 0\n"
2045 "Total allocated space (uordblks):      52000\n"
2046 "Total free space (fordblks):           83168\n"
2047 "Topmost releasable block (keepcost):   31168\n"
2048
2049 #. type: SS
2050 #: build/C/man3/mallinfo.3:203 build/C/man3/malloc_info.3:165
2051 #: build/C/man3/mallopt.3:532 build/C/man3/mcheck.3:176
2052 #: build/C/man2/mprotect.2:165
2053 #, no-wrap
2054 msgid "Program source"
2055 msgstr "プログラムのソース"
2056
2057 #. type: Plain text
2058 #: build/C/man3/mallinfo.3:208
2059 #, no-wrap
2060 msgid ""
2061 "#include E<lt>malloc.hE<gt>\n"
2062 "#include \"tlpi_hdr.h\"\n"
2063 msgstr ""
2064 "#include E<lt>malloc.hE<gt>\n"
2065 "#include \"tlpi_hdr.h\"\n"
2066
2067 #. type: Plain text
2068 #: build/C/man3/mallinfo.3:213
2069 #, no-wrap
2070 msgid ""
2071 "static void\n"
2072 "display_mallinfo(void)\n"
2073 "{\n"
2074 "    struct mallinfo mi;\n"
2075 msgstr ""
2076 "static void\n"
2077 "display_mallinfo(void)\n"
2078 "{\n"
2079 "    struct mallinfo mi;\n"
2080
2081 #. type: Plain text
2082 #: build/C/man3/mallinfo.3:215
2083 #, no-wrap
2084 msgid "    mi = mallinfo();\n"
2085 msgstr "    mi = mallinfo();\n"
2086
2087 #. type: Plain text
2088 #: build/C/man3/mallinfo.3:227
2089 #, no-wrap
2090 msgid ""
2091 "    printf(\"Total non-mmapped bytes (arena):       %d\\en\", mi.arena);\n"
2092 "    printf(\"# of free chunks (ordblks):            %d\\en\", mi.ordblks);\n"
2093 "    printf(\"# of free fastbin blocks (smblks):     %d\\en\", mi.smblks);\n"
2094 "    printf(\"# of mapped regions (hblks):           %d\\en\", mi.hblks);\n"
2095 "    printf(\"Bytes in mapped regions (hblkhd):      %d\\en\", mi.hblkhd);\n"
2096 "    printf(\"Max. total allocated space (usmblks):  %d\\en\", mi.usmblks);\n"
2097 "    printf(\"Free bytes held in fastbins (fsmblks): %d\\en\", mi.fsmblks);\n"
2098 "    printf(\"Total allocated space (uordblks):      %d\\en\", mi.uordblks);\n"
2099 "    printf(\"Total free space (fordblks):           %d\\en\", mi.fordblks);\n"
2100 "    printf(\"Topmost releasable block (keepcost):   %d\\en\", mi.keepcost);\n"
2101 "}\n"
2102 msgstr ""
2103 "    printf(\"Total non-mmapped bytes (arena):       %d\\en\", mi.arena);\n"
2104 "    printf(\"# of free chunks (ordblks):            %d\\en\", mi.ordblks);\n"
2105 "    printf(\"# of free fastbin blocks (smblks):     %d\\en\", mi.smblks);\n"
2106 "    printf(\"# of mapped regions (hblks):           %d\\en\", mi.hblks);\n"
2107 "    printf(\"Bytes in mapped regions (hblkhd):      %d\\en\", mi.hblkhd);\n"
2108 "    printf(\"Max. total allocated space (usmblks):  %d\\en\", mi.usmblks);\n"
2109 "    printf(\"Free bytes held in fastbins (fsmblks): %d\\en\", mi.fsmblks);\n"
2110 "    printf(\"Total allocated space (uordblks):      %d\\en\", mi.uordblks);\n"
2111 "    printf(\"Total free space (fordblks):           %d\\en\", mi.fordblks);\n"
2112 "    printf(\"Topmost releasable block (keepcost):   %d\\en\", mi.keepcost);\n"
2113 "}\n"
2114
2115 #. type: Plain text
2116 #: build/C/man3/mallinfo.3:235
2117 #, no-wrap
2118 msgid ""
2119 "int\n"
2120 "main(int argc, char *argv[])\n"
2121 "{\n"
2122 "#define MAX_ALLOCS 2000000\n"
2123 "    char *alloc[MAX_ALLOCS];\n"
2124 "    int numBlocks, j, freeBegin, freeEnd, freeStep;\n"
2125 "    size_t blockSize;\n"
2126 msgstr ""
2127 "int\n"
2128 "main(int argc, char *argv[])\n"
2129 "{\n"
2130 "#define MAX_ALLOCS 2000000\n"
2131 "    char *alloc[MAX_ALLOCS];\n"
2132 "    int numBlocks, j, freeBegin, freeEnd, freeStep;\n"
2133 "    size_t blockSize;\n"
2134
2135 #. type: Plain text
2136 #: build/C/man3/mallinfo.3:239
2137 #, no-wrap
2138 msgid ""
2139 "    if (argc E<lt> 3 || strcmp(argv[1], \"--help\") == 0)\n"
2140 "        usageErr(\"%s num-blocks block-size [free-step [start-free \"\n"
2141 "                \"[end-free]]]\\en\", argv[0]);\n"
2142 msgstr ""
2143 "    if (argc E<lt> 3 || strcmp(argv[1], \"--help\") == 0)\n"
2144 "        usageErr(\"%s num-blocks block-size [free-step [start-free \"\n"
2145 "                \"[end-free]]]\\en\", argv[0]);\n"
2146
2147 #. type: Plain text
2148 #: build/C/man3/mallinfo.3:245
2149 #, no-wrap
2150 msgid ""
2151 "    numBlocks = atoi(argv[1]);\n"
2152 "    blockSize = atoi(argv[2]);\n"
2153 "    freeStep = (argc E<gt> 3) ? atoi(argv[3]) : 1;\n"
2154 "    freeBegin = (argc E<gt> 4) ? atoi(argv[4]) : 0;\n"
2155 "    freeEnd = (argc E<gt> 5) ? atoi(argv[5]) : numBlocks;\n"
2156 msgstr ""
2157 "    numBlocks = atoi(argv[1]);\n"
2158 "    blockSize = atoi(argv[2]);\n"
2159 "    freeStep = (argc E<gt> 3) ? atoi(argv[3]) : 1;\n"
2160 "    freeBegin = (argc E<gt> 4) ? atoi(argv[4]) : 0;\n"
2161 "    freeEnd = (argc E<gt> 5) ? atoi(argv[5]) : numBlocks;\n"
2162
2163 #. type: Plain text
2164 #: build/C/man3/mallinfo.3:248
2165 #, no-wrap
2166 msgid ""
2167 "    printf(\"============== Before allocating blocks ==============\\en\");\n"
2168 "    display_mallinfo();\n"
2169 msgstr ""
2170 "    printf(\"============== Before allocating blocks ==============\\en\");\n"
2171 "    display_mallinfo();\n"
2172
2173 #. type: Plain text
2174 #: build/C/man3/mallinfo.3:252
2175 #, no-wrap
2176 msgid ""
2177 "    for (j = 0; j E<lt> numBlocks; j++) {\n"
2178 "        if (numBlocks E<gt>= MAX_ALLOCS)\n"
2179 "            fatal(\"Too many allocations\");\n"
2180 msgstr ""
2181 "    for (j = 0; j E<lt> numBlocks; j++) {\n"
2182 "        if (numBlocks E<gt>= MAX_ALLOCS)\n"
2183 "            fatal(\"Too many allocations\");\n"
2184
2185 #. type: Plain text
2186 #: build/C/man3/mallinfo.3:257
2187 #, no-wrap
2188 msgid ""
2189 "        alloc[j] = malloc(blockSize);\n"
2190 "        if (alloc[j] == NULL)\n"
2191 "            errExit(\"malloc\");\n"
2192 "    }\n"
2193 msgstr ""
2194 "        alloc[j] = malloc(blockSize);\n"
2195 "        if (alloc[j] == NULL)\n"
2196 "            errExit(\"malloc\");\n"
2197 "    }\n"
2198
2199 #. type: Plain text
2200 #: build/C/man3/mallinfo.3:260
2201 #, no-wrap
2202 msgid ""
2203 "    printf(\"\\en============== After allocating blocks ==============\\en\");\n"
2204 "    display_mallinfo();\n"
2205 msgstr ""
2206 "    printf(\"\\en============== After allocating blocks ==============\\en\");\n"
2207 "    display_mallinfo();\n"
2208
2209 #. type: Plain text
2210 #: build/C/man3/mallinfo.3:263
2211 #, no-wrap
2212 msgid ""
2213 "    for (j = freeBegin; j E<lt> freeEnd; j += freeStep)\n"
2214 "        free(alloc[j]);\n"
2215 msgstr ""
2216 "    for (j = freeBegin; j E<lt> freeEnd; j += freeStep)\n"
2217 "        free(alloc[j]);\n"
2218
2219 #. type: Plain text
2220 #: build/C/man3/mallinfo.3:266
2221 #, no-wrap
2222 msgid ""
2223 "    printf(\"\\en============== After freeing blocks ==============\\en\");\n"
2224 "    display_mallinfo();\n"
2225 msgstr ""
2226 "    printf(\"\\en============== After freeing blocks ==============\\en\");\n"
2227 "    display_mallinfo();\n"
2228
2229 #. type: Plain text
2230 #: build/C/man3/mallinfo.3:269 build/C/man3/malloc_info.3:253
2231 #: build/C/man3/mallopt.3:565 build/C/man3/mcheck.3:203
2232 #: build/C/man2/mmap.2:711
2233 #, no-wrap
2234 msgid ""
2235 "    exit(EXIT_SUCCESS);\n"
2236 "}\n"
2237 msgstr ""
2238 "    exit(EXIT_SUCCESS);\n"
2239 "}\n"
2240
2241 #. type: Plain text
2242 #: build/C/man3/mallinfo.3:279
2243 msgid ""
2244 "B<mmap>(2), B<malloc>(3), B<malloc_info>(3), B<malloc_stats>(3), "
2245 "B<malloc_trim>(3), B<mallopt>(3)"
2246 msgstr ""
2247 "B<mmap>(2), B<malloc>(3), B<malloc_info>(3), B<malloc_stats>(3), "
2248 "B<malloc_trim>(3), B<mallopt>(3)"
2249
2250 #. type: TH
2251 #: build/C/man3/malloc_get_state.3:25
2252 #, no-wrap
2253 msgid "MALLOC_GET_STATE"
2254 msgstr "MALLOC_GET_STATE"
2255
2256 #. type: TH
2257 #: build/C/man3/malloc_get_state.3:25
2258 #, no-wrap
2259 msgid "2012-05-04"
2260 msgstr "2012-05-04"
2261
2262 #. type: Plain text
2263 #: build/C/man3/malloc_get_state.3:28
2264 msgid ""
2265 "malloc_get_state, malloc_set_state - record and restore state of malloc "
2266 "implementation"
2267 msgstr ""
2268
2269 #. type: Plain text
2270 #: build/C/man3/malloc_get_state.3:31 build/C/man3/posix_memalign.3:35
2271 #, no-wrap
2272 msgid "B<#include E<lt>stdlib.hE<gt>>\n"
2273 msgstr "B<#include E<lt>stdlib.hE<gt>>\n"
2274
2275 #. type: Plain text
2276 #: build/C/man3/malloc_get_state.3:33
2277 #, no-wrap
2278 msgid "B<void* malloc_get_state(void);>\n"
2279 msgstr "B<void* malloc_get_state(void);>\n"
2280
2281 #. type: Plain text
2282 #: build/C/man3/malloc_get_state.3:35
2283 #, no-wrap
2284 msgid "B<int malloc_set_state(void *>I<state>B<);>\n"
2285 msgstr "B<int malloc_set_state(void *>I<state>B<);>\n"
2286
2287 #. type: Plain text
2288 #: build/C/man3/malloc_get_state.3:53
2289 msgid ""
2290 "The B<malloc_get_state>()  function records the current state of all "
2291 "B<malloc>(3)  internal bookkeeping variables (but not the actual contents of "
2292 "the heap or the state of B<malloc_hook>(3)  functions pointers).  The state "
2293 "is recorded in a system-dependent opaque data structure dynamically "
2294 "allocated via B<malloc>(3), and a pointer to that data structure is returned "
2295 "as the function result.  (It is the caller's responsibility to B<free>(3)  "
2296 "this memory.)"
2297 msgstr ""
2298
2299 #. type: Plain text
2300 #: build/C/man3/malloc_get_state.3:61
2301 msgid ""
2302 "The B<malloc_set_state>()  function restores the state of all B<malloc>(3)  "
2303 "internal bookkeeping variables to the values recorded in the opaque data "
2304 "structure pointed to by I<state>."
2305 msgstr ""
2306
2307 #. type: Plain text
2308 #: build/C/man3/malloc_get_state.3:68
2309 msgid ""
2310 "On success, B<malloc_get_state>()  returns a pointer to a newly allocated "
2311 "opaque data structure.  On error (for example, memory could not be allocated "
2312 "for the data structure), B<malloc_get_state>()  returns NULL."
2313 msgstr ""
2314
2315 #.  if(ms->magic != MALLOC_STATE_MAGIC) return -1;
2316 #.  /* Must fail if the major version is too high. */
2317 #.  if((ms->version & ~0xffl) > (MALLOC_STATE_VERSION & ~0xffl)) return -2;
2318 #. type: Plain text
2319 #: build/C/man3/malloc_get_state.3:86
2320 msgid ""
2321 "On success, B<malloc_set_state>()  returns 0.  If the implementation detects "
2322 "that I<state> does not point to a correctly formed data structure, "
2323 "B<malloc_set_state>()  returns -1.  If the implementation detects that the "
2324 "version of the data structure referred to by I<state> is a more recent "
2325 "version than this implementation knows about, B<malloc_set_state>()  returns "
2326 "-2."
2327 msgstr ""
2328
2329 #. type: Plain text
2330 #: build/C/man3/malloc_get_state.3:88 build/C/man3/malloc_hook.3:82
2331 #: build/C/man3/mcheck.3:147 build/C/man3/mtrace.3:80
2332 msgid "These functions are GNU extensions."
2333 msgstr "これらの関数は GNU による拡張である。"
2334
2335 #. type: Plain text
2336 #: build/C/man3/malloc_get_state.3:94
2337 msgid ""
2338 "These functions are especially useful when using this B<malloc>(3)  "
2339 "implementation as part of a shared library, and the heap contents are saved/"
2340 "restored via some other method.  This technique is used by the GNU Emacs to "
2341 "implement its \"dumping\" function."
2342 msgstr ""
2343
2344 #.  i.e., calls __malloc_check_init()
2345 #.  i.e., malloc checking is not already in use
2346 #.  and the caller requested malloc checking
2347 #. type: Plain text
2348 #: build/C/man3/malloc_get_state.3:111
2349 msgid ""
2350 "Hook function pointers are never saved or restored by these functions, with "
2351 "two exceptions: if malloc checking (see B<mallopt>(3))  was in use when "
2352 "B<malloc_get_state>()  was called, then B<malloc_set_state>()  resets malloc "
2353 "checking hooks if possible; if malloc checking was not in use in the "
2354 "recorded state, but the caller has requested malloc checking, then the hooks "
2355 "are reset to 0."
2356 msgstr ""
2357
2358 #. type: Plain text
2359 #: build/C/man3/malloc_get_state.3:114
2360 msgid "B<malloc>(3), B<mallopt>(3)"
2361 msgstr "B<malloc>(3), B<mallopt>(3)"
2362
2363 #. type: TH
2364 #: build/C/man3/malloc_hook.3:10
2365 #, no-wrap
2366 msgid "MALLOC_HOOK"
2367 msgstr "MALLOC_HOOK"
2368
2369 #. type: TH
2370 #: build/C/man3/malloc_hook.3:10
2371 #, no-wrap
2372 msgid "2010-10-13"
2373 msgstr "2010-10-13"
2374
2375 #. type: Plain text
2376 #: build/C/man3/malloc_hook.3:15
2377 msgid ""
2378 "__malloc_hook, __malloc_initialize_hook, __memalign_hook, __free_hook, "
2379 "__realloc_hook, __after_morecore_hook - malloc debugging variables"
2380 msgstr ""
2381 "__malloc_hook, __malloc_initialize_hook, __memalign_hook, __free_hook, "
2382 "__realloc_hook, __after_morecore_hook - malloc デバッグ用の変数"
2383
2384 #. type: Plain text
2385 #: build/C/man3/malloc_hook.3:18 build/C/man3/malloc_info.3:31
2386 #: build/C/man3/posix_memalign.3:41
2387 #, no-wrap
2388 msgid "B<#include E<lt>malloc.hE<gt>>\n"
2389 msgstr "B<#include E<lt>malloc.hE<gt>>\n"
2390
2391 #. type: Plain text
2392 #: build/C/man3/malloc_hook.3:20
2393 #, no-wrap
2394 msgid "B<void *(*__malloc_hook)(size_t >I<size>B<, const void *>I<caller>B<);>\n"
2395 msgstr "B<void *(*__malloc_hook)(size_t >I<size>B<, const void *>I<caller>B<);>\n"
2396
2397 #. type: Plain text
2398 #: build/C/man3/malloc_hook.3:23
2399 #, no-wrap
2400 msgid "B<void *(*__realloc_hook)(void *>I<ptr>B<, size_t >I<size>B<, const void *>I<caller>B<);>\n"
2401 msgstr "B<void *(*__realloc_hook)(void *>I<ptr>B<, size_t >I<size>B<, const void *>I<caller>B<);>\n"
2402
2403 #. type: Plain text
2404 #: build/C/man3/malloc_hook.3:26
2405 #, no-wrap
2406 msgid ""
2407 "B<void *(*__memalign_hook)(size_t >I<alignment>B<, size_t >I<size>B<,>\n"
2408 "B<                         const void *>I<caller>B<);>\n"
2409 msgstr ""
2410 "B<void *(*__memalign_hook)(size_t >I<alignment>B<, size_t >I<size>B<,>\n"
2411 "B<                         const void *>I<caller>B<);>\n"
2412
2413 #. type: Plain text
2414 #: build/C/man3/malloc_hook.3:28
2415 #, no-wrap
2416 msgid "B<void (*__free_hook)(void *>I<ptr>B<, const void *>I<caller>B<);>\n"
2417 msgstr "B<void (*__free_hook)(void *>I<ptr>B<, const void *>I<caller>B<);>\n"
2418
2419 #. type: Plain text
2420 #: build/C/man3/malloc_hook.3:30
2421 #, no-wrap
2422 msgid "B<void (*__malloc_initialize_hook)(void);>\n"
2423 msgstr "B<void (*__malloc_initialize_hook)(void);>\n"
2424
2425 #. type: Plain text
2426 #: build/C/man3/malloc_hook.3:32
2427 #, no-wrap
2428 msgid "B<void (*__after_morecore_hook)(void);>\n"
2429 msgstr "B<void (*__after_morecore_hook)(void);>\n"
2430
2431 #. type: Plain text
2432 #: build/C/man3/malloc_hook.3:43
2433 msgid ""
2434 "The GNU C library lets you modify the behavior of B<malloc>(3), B<realloc>"
2435 "(3), and B<free>(3)  by specifying appropriate hook functions.  You can use "
2436 "these hooks to help you debug programs that use dynamic memory allocation, "
2437 "for example."
2438 msgstr ""
2439 "GNU C ライブラリでは、適切なフック関数 (hook function) を指定することで "
2440 "B<malloc>(3), B<realloc>(3), B<free>(3)  の動作を変更することができる。例え"
2441 "ば、動的にメモリ割り当てを行う プログラムのデバッグにこれらのフックを使うこと"
2442 "ができる。"
2443
2444 #. type: Plain text
2445 #: build/C/man3/malloc_hook.3:50
2446 msgid ""
2447 "The variable B<__malloc_initialize_hook> points at a function that is called "
2448 "once when the malloc implementation is initialized.  This is a weak "
2449 "variable, so it can be overridden in the application with a definition like "
2450 "the following:"
2451 msgstr ""
2452 "変数 B<__malloc_initialize_hook> は malloc の実装が初期化される際に一度だけ呼"
2453 "ばれる関数へのポインタである。 この変数は書き換え可能 (weak) であり、アプリ"
2454 "ケーション内で 以下のような定義で上書きできる:"
2455
2456 #. type: Plain text
2457 #: build/C/man3/malloc_hook.3:53
2458 #, no-wrap
2459 msgid "    void (*__malloc_initialize_hook)(void) = my_init_hook;\n"
2460 msgstr "    void (*__malloc_initialize_hook)(void) = my_init_hook;\n"
2461
2462 #. type: Plain text
2463 #: build/C/man3/malloc_hook.3:58
2464 msgid ""
2465 "Now the function I<my_init_hook>()  can do the initialization of all hooks."
2466 msgstr ""
2467 "なお、関数 I<my_init_hook>()  で全てのフックの初期化をすることができる。"
2468
2469 #. type: Plain text
2470 #: build/C/man3/malloc_hook.3:74
2471 msgid ""
2472 "The four functions pointed to by B<__malloc_hook>, B<__realloc_hook>, "
2473 "B<__memalign_hook>, B<__free_hook> have a prototype like the functions "
2474 "B<malloc>(3), B<realloc>(3), B<memalign>(3), B<free>(3), respectively, "
2475 "except that they have a final argument I<caller> that gives the address of "
2476 "the caller of B<malloc>(3), etc."
2477 msgstr ""
2478 "B<__malloc_hook>, B<__realloc_hook>, B<__memalign_hook>, B<__free_hook> で指"
2479 "される 4 つの関数は、各々 B<malloc>(3), B<realloc>(3), B<memalign>(3), "
2480 "B<free>(3)  とよく似たプロトタイプを持っているが、 一番最後の引き数 "
2481 "I<caller> をとる点が異なる。 引き数 I<caller> には、 B<malloc>(3)  などの呼び"
2482 "出し元 (caller) のアドレスが格納される。"
2483
2484 #. type: Plain text
2485 #: build/C/man3/malloc_hook.3:80
2486 msgid ""
2487 "The variable B<__after_morecore_hook> points at a function that is called "
2488 "each time after B<sbrk>(2)  was asked for more memory."
2489 msgstr ""
2490 "変数 B<__after_morecore_hook> は、領域の追加要求があり B<sbrk>(2)  が呼ばれた"
2491 "後で毎回呼び出される関数へのポインタである。"
2492
2493 #.  https://bugzilla.redhat.com/show_bug.cgi?id=450187
2494 #.  http://sourceware.org/bugzilla/show_bug.cgi?id=9957
2495 #. type: Plain text
2496 #: build/C/man3/malloc_hook.3:89
2497 msgid ""
2498 "The use of these hook functions is not safe in multithreaded programs, and "
2499 "they are now deprecated.  Programmers should instead preempt calls to the "
2500 "relevant functions by defining and exporting functions such as \"malloc\" "
2501 "and \"free\"."
2502 msgstr ""
2503
2504 #. type: Plain text
2505 #: build/C/man3/malloc_hook.3:91
2506 msgid "Here is a short example of how to use these variables."
2507 msgstr "これらの変数の使い方の簡単な例を以下に示す。"
2508
2509 #. type: Plain text
2510 #: build/C/man3/malloc_hook.3:95
2511 #, no-wrap
2512 msgid ""
2513 "#include E<lt>stdio.hE<gt>\n"
2514 "#include E<lt>malloc.hE<gt>\n"
2515 msgstr ""
2516 "#include E<lt>stdio.hE<gt>\n"
2517 "#include E<lt>malloc.hE<gt>\n"
2518
2519 #. type: Plain text
2520 #: build/C/man3/malloc_hook.3:99
2521 #, no-wrap
2522 msgid ""
2523 "/* Prototypes for our hooks.  */\n"
2524 "static void my_init_hook(void);\n"
2525 "static void *my_malloc_hook(size_t, const void *);\n"
2526 msgstr ""
2527 "/* 使おうとするフックのプロトタイプ宣言 */\n"
2528 "static void my_init_hook(void);\n"
2529 "static void *my_malloc_hook(size_t, const void *);\n"
2530
2531 #. type: Plain text
2532 #: build/C/man3/malloc_hook.3:102
2533 #, no-wrap
2534 msgid ""
2535 "/* Variables to save original hooks. */\n"
2536 "static void *(*old_malloc_hook)(size_t, const void *);\n"
2537 msgstr ""
2538 "/* 元々のフックを保存するための変数 */\n"
2539 "static void *(*old_malloc_hook)(size_t, const void *);\n"
2540
2541 #. type: Plain text
2542 #: build/C/man3/malloc_hook.3:105
2543 #, no-wrap
2544 msgid ""
2545 "/* Override initializing hook from the C library. */\n"
2546 "void (*__malloc_initialize_hook) (void) = my_init_hook;\n"
2547 msgstr ""
2548 "/* C ライブラリから呼ばれる初期化フックを上書きする */\n"
2549 "void (*__malloc_initialize_hook) (void) = my_init_hook;\n"
2550
2551 #. type: Plain text
2552 #: build/C/man3/malloc_hook.3:112
2553 #, no-wrap
2554 msgid ""
2555 "static void\n"
2556 "my_init_hook(void)\n"
2557 "{\n"
2558 "    old_malloc_hook = __malloc_hook;\n"
2559 "    __malloc_hook = my_malloc_hook;\n"
2560 "}\n"
2561 msgstr ""
2562 "static void\n"
2563 "my_init_hook(void)\n"
2564 "{\n"
2565 "    old_malloc_hook = __malloc_hook;\n"
2566 "    __malloc_hook = my_malloc_hook;\n"
2567 "}\n"
2568
2569 #. type: Plain text
2570 #: build/C/man3/malloc_hook.3:117
2571 #, no-wrap
2572 msgid ""
2573 "static void *\n"
2574 "my_malloc_hook(size_t size, const void *caller)\n"
2575 "{\n"
2576 "    void *result;\n"
2577 msgstr ""
2578 "static void *\n"
2579 "my_malloc_hook(size_t size, const void *caller)\n"
2580 "{\n"
2581 "    void *result;\n"
2582
2583 #. type: Plain text
2584 #: build/C/man3/malloc_hook.3:120
2585 #, no-wrap
2586 msgid ""
2587 "    /* Restore all old hooks */\n"
2588 "    __malloc_hook = old_malloc_hook;\n"
2589 msgstr ""
2590 "    /* 元々のフックを全て戻す */\n"
2591 "    __malloc_hook = old_malloc_hook;\n"
2592
2593 #. type: Plain text
2594 #: build/C/man3/malloc_hook.3:123
2595 #, no-wrap
2596 msgid ""
2597 "    /* Call recursively */\n"
2598 "    result = malloc(size);\n"
2599 msgstr ""
2600 "    /* malloc の再帰的呼び出し */\n"
2601 "    result = malloc(size);\n"
2602
2603 #. type: Plain text
2604 #: build/C/man3/malloc_hook.3:126
2605 #, no-wrap
2606 msgid ""
2607 "    /* Save underlying hooks */\n"
2608 "    old_malloc_hook = __malloc_hook;\n"
2609 msgstr ""
2610 "    /* 現在設定されているフック (underlying hook) を保存する */\n"
2611 "    old_malloc_hook = __malloc_hook;\n"
2612
2613 #. type: Plain text
2614 #: build/C/man3/malloc_hook.3:130
2615 #, no-wrap
2616 msgid ""
2617 "    /* printf() might call malloc(), so protect it too. */\n"
2618 "    printf(\"malloc(%u) called from %p returns %p\\en\",\n"
2619 "            (unsigned int) size, caller, result);\n"
2620 msgstr ""
2621 "    /* printf() は malloc() を呼び出す可能性があるので\n"
2622 "        ここでもガードを行う (元々のフックのままにしておく) */\n"
2623 "    printf(\"malloc(%u) called from %p returns %p\\en\",\n"
2624 "            (unsigned int) size, caller, result);\n"
2625
2626 #. type: Plain text
2627 #: build/C/man3/malloc_hook.3:133
2628 #, no-wrap
2629 msgid ""
2630 "    /* Restore our own hooks */\n"
2631 "    __malloc_hook = my_malloc_hook;\n"
2632 msgstr ""
2633 "    /* ユーザが使おうとするフックを再設定する */\n"
2634 "    __malloc_hook = my_malloc_hook;\n"
2635
2636 #. type: Plain text
2637 #: build/C/man3/malloc_hook.3:136
2638 #, no-wrap
2639 msgid ""
2640 "    return result;\n"
2641 "}\n"
2642 msgstr ""
2643 "    return result;\n"
2644 "}\n"
2645
2646 #. type: Plain text
2647 #: build/C/man3/malloc_hook.3:142
2648 msgid "B<mallinfo>(3), B<malloc>(3), B<mcheck>(3), B<mtrace>(3)"
2649 msgstr "B<mallinfo>(3), B<malloc>(3), B<mcheck>(3), B<mtrace>(3)"
2650
2651 #. type: TH
2652 #: build/C/man3/malloc_info.3:25
2653 #, no-wrap
2654 msgid "MALLOC_INFO"
2655 msgstr "MALLOC_INFO"
2656
2657 #. type: Plain text
2658 #: build/C/man3/malloc_info.3:28
2659 msgid "malloc_info - export malloc state to a stream"
2660 msgstr ""
2661
2662 #. type: Plain text
2663 #: build/C/man3/malloc_info.3:33
2664 #, no-wrap
2665 msgid "B<int malloc_info(int >I<options>B<, FILE *>I<fp>B<);>\n"
2666 msgstr "B<int malloc_info(int >I<options>B<, FILE *>I<fp>B<);>\n"
2667
2668 #. type: Plain text
2669 #: build/C/man3/malloc_info.3:44
2670 msgid ""
2671 "The B<malloc_info>()  function exports an XML string that describes the "
2672 "current state of the memory-allocation implementation in the caller.  The "
2673 "string is printed on the file stream I<fp>.  The exported string includes "
2674 "information about all arenas (see B<malloc>(3))."
2675 msgstr ""
2676
2677 #. type: Plain text
2678 #: build/C/man3/malloc_info.3:48
2679 msgid "As currently implemented, I<options> must be zero."
2680 msgstr ""
2681
2682 #. type: Plain text
2683 #: build/C/man3/malloc_info.3:53
2684 msgid "On success, B<malloc_info>()  returns 0; on error, it returns -1."
2685 msgstr "B<malloc_info>() は成功すると 0 を返す。エラーの場合は -1 を返す。"
2686
2687 #. type: Plain text
2688 #: build/C/man3/malloc_info.3:58
2689 msgid "I<options> was nonzero."
2690 msgstr ""
2691
2692 #. type: Plain text
2693 #: build/C/man3/malloc_info.3:61
2694 #, fuzzy
2695 #| msgid "B<malloc_info>(3)  was added to glibc in version 2.10."
2696 msgid "B<malloc_info>()  was added to glibc in version 2.10."
2697 msgstr "B<malloc_info>(3) は glibc バージョン 2.10 で追加された。"
2698
2699 #. type: Plain text
2700 #: build/C/man3/malloc_info.3:63 build/C/man3/malloc_stats.3:57
2701 #: build/C/man3/malloc_trim.3:62 build/C/man3/malloc_usable_size.3:50
2702 msgid "This function is a GNU extension."
2703 msgstr "この関数は GNU による拡張である。"
2704
2705 #. type: Plain text
2706 #: build/C/man3/malloc_info.3:69
2707 msgid ""
2708 "The memory-allocation information is provided as an XML string (rather than "
2709 "a C structure)  because the information may change over time (according to "
2710 "changes in the underlying implementation).  The output XML string includes a "
2711 "version field."
2712 msgstr ""
2713
2714 #. type: Plain text
2715 #: build/C/man3/malloc_info.3:75
2716 msgid ""
2717 "The B<open_memstream>(3)  function can be used to send the output of "
2718 "B<malloc_info>()  directly into a buffer in memory, rather than to a file."
2719 msgstr ""
2720
2721 #. type: Plain text
2722 #: build/C/man3/malloc_info.3:82
2723 msgid ""
2724 "The B<malloc_info>()  function is designed to address deficiencies in "
2725 "B<malloc_stats>(3)  and B<mallinfo>(3)."
2726 msgstr ""
2727
2728 #. type: Plain text
2729 #: build/C/man3/malloc_info.3:93
2730 msgid ""
2731 "The program below takes up to four command-line arguments, of which the "
2732 "first three are mandatory.  The first argument specifies the number of "
2733 "threads that the program should create.  All of the threads, including the "
2734 "main thread, allocate the number of blocks of memory specified by the second "
2735 "argument.  The third argument controls the size of the blocks to be "
2736 "allocated.  The main thread creates blocks of this size, the second thread "
2737 "created by the program allocates blocks of twice this size, the third thread "
2738 "allocates blocks of three times this size, and so on."
2739 msgstr ""
2740
2741 #. type: Plain text
2742 #: build/C/man3/malloc_info.3:100
2743 msgid ""
2744 "The program calls B<malloc_info>()  twice to display the memory-allocation "
2745 "state.  The first call takes place before any threads are created or memory "
2746 "allocated.  The second call is performed after all threads have allocated "
2747 "memory."
2748 msgstr ""
2749
2750 #. type: Plain text
2751 #: build/C/man3/malloc_info.3:108
2752 msgid ""
2753 "In the following example, the command-line arguments specify the creation of "
2754 "one additional thread, and both the main thread and the additional thread "
2755 "allocate 10000 blocks of memory.  After the blocks of memory have been "
2756 "allocated, B<malloc_info>()  shows the state of two allocation arenas."
2757 msgstr ""
2758
2759 #. type: Plain text
2760 #: build/C/man3/malloc_info.3:133
2761 #, no-wrap
2762 msgid ""
2763 "$ B<getconf GNU_LIBC_VERSION>\n"
2764 "glibc 2.13\n"
2765 "$ B<./a.out 1 10000 100>\n"
2766 "============ Before allocating blocks ============\n"
2767 "E<lt>malloc version=\"1\"E<gt>\n"
2768 "E<lt>heap nr=\"0\"E<gt>\n"
2769 "E<lt>sizesE<gt>\n"
2770 "E<lt>/sizesE<gt>\n"
2771 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
2772 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
2773 "E<lt>system type=\"current\" size=\"135168\"/E<gt>\n"
2774 "E<lt>system type=\"max\" size=\"135168\"/E<gt>\n"
2775 "E<lt>aspace type=\"total\" size=\"135168\"/E<gt>\n"
2776 "E<lt>aspace type=\"mprotect\" size=\"135168\"/E<gt>\n"
2777 "E<lt>/heapE<gt>\n"
2778 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
2779 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
2780 "E<lt>system type=\"current\" size=\"135168\"/E<gt>\n"
2781 "E<lt>system type=\"max\" size=\"135168\"/E<gt>\n"
2782 "E<lt>aspace type=\"total\" size=\"135168\"/E<gt>\n"
2783 "E<lt>aspace type=\"mprotect\" size=\"135168\"/E<gt>\n"
2784 "E<lt>/mallocE<gt>\n"
2785 msgstr ""
2786
2787 #. type: Plain text
2788 #: build/C/man3/malloc_info.3:163
2789 #, no-wrap
2790 msgid ""
2791 "============ After allocating blocks ============\n"
2792 "E<lt>malloc version=\"1\"E<gt>\n"
2793 "E<lt>heap nr=\"0\"E<gt>\n"
2794 "E<lt>sizesE<gt>\n"
2795 "E<lt>/sizesE<gt>\n"
2796 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
2797 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
2798 "E<lt>system type=\"current\" size=\"1081344\"/E<gt>\n"
2799 "E<lt>system type=\"max\" size=\"1081344\"/E<gt>\n"
2800 "E<lt>aspace type=\"total\" size=\"1081344\"/E<gt>\n"
2801 "E<lt>aspace type=\"mprotect\" size=\"1081344\"/E<gt>\n"
2802 "E<lt>/heapE<gt>\n"
2803 "E<lt>heap nr=\"1\"E<gt>\n"
2804 "E<lt>sizesE<gt>\n"
2805 "E<lt>/sizesE<gt>\n"
2806 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
2807 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
2808 "E<lt>system type=\"current\" size=\"1032192\"/E<gt>\n"
2809 "E<lt>system type=\"max\" size=\"1032192\"/E<gt>\n"
2810 "E<lt>aspace type=\"total\" size=\"1032192\"/E<gt>\n"
2811 "E<lt>aspace type=\"mprotect\" size=\"1032192\"/E<gt>\n"
2812 "E<lt>/heapE<gt>\n"
2813 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
2814 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
2815 "E<lt>system type=\"current\" size=\"2113536\"/E<gt>\n"
2816 "E<lt>system type=\"max\" size=\"2113536\"/E<gt>\n"
2817 "E<lt>aspace type=\"total\" size=\"2113536\"/E<gt>\n"
2818 "E<lt>aspace type=\"mprotect\" size=\"2113536\"/E<gt>\n"
2819 "E<lt>/mallocE<gt>\n"
2820 msgstr ""
2821
2822 #. type: Plain text
2823 #: build/C/man3/malloc_info.3:173
2824 #, no-wrap
2825 msgid ""
2826 "#include E<lt>unistd.hE<gt>\n"
2827 "#include E<lt>stdlib.hE<gt>\n"
2828 "#include E<lt>pthread.hE<gt>\n"
2829 "#include E<lt>malloc.hE<gt>\n"
2830 "#include E<lt>errno.hE<gt>\n"
2831 msgstr ""
2832 "#include E<lt>unistd.hE<gt>\n"
2833 "#include E<lt>stdlib.hE<gt>\n"
2834 "#include E<lt>pthread.hE<gt>\n"
2835 "#include E<lt>malloc.hE<gt>\n"
2836 "#include E<lt>errno.hE<gt>\n"
2837
2838 #. type: Plain text
2839 #: build/C/man3/malloc_info.3:176
2840 #, no-wrap
2841 msgid ""
2842 "static size_t blockSize;\n"
2843 "static int numThreads, numBlocks;\n"
2844 msgstr ""
2845
2846 #. type: Plain text
2847 #: build/C/man3/malloc_info.3:179
2848 #, no-wrap
2849 msgid ""
2850 "#define errExit(msg)    do { perror(msg); exit(EXIT_FAILURE); \\e\n"
2851 "                        } while (0)\n"
2852 msgstr ""
2853 "#define errExit(msg)    do { perror(msg); exit(EXIT_FAILURE); \\e\n"
2854 "                        } while (0)\n"
2855
2856 #. type: Plain text
2857 #: build/C/man3/malloc_info.3:185
2858 #, no-wrap
2859 msgid ""
2860 "static void *\n"
2861 "thread_func(void *arg)\n"
2862 "{\n"
2863 "    int j;\n"
2864 "    int tn = (int) arg;\n"
2865 msgstr ""
2866
2867 #. type: Plain text
2868 #: build/C/man3/malloc_info.3:188
2869 #, no-wrap
2870 msgid ""
2871 "    /* The multiplier \\(aq(2 + tn)\\(aq ensures that each thread (including\n"
2872 "       the main thread) allocates a different amount of memory */\n"
2873 msgstr ""
2874
2875 #. type: Plain text
2876 #: build/C/man3/malloc_info.3:192
2877 #, no-wrap
2878 msgid ""
2879 "    for (j = 0; j E<lt> numBlocks; j++)\n"
2880 "        if (malloc(blockSize * (2 + tn)) == NULL)\n"
2881 "            errExit(\"malloc-thread\");\n"
2882 msgstr ""
2883 "    for (j = 0; j E<lt> numBlocks; j++)\n"
2884 "        if (malloc(blockSize * (2 + tn)) == NULL)\n"
2885 "            errExit(\"malloc-thread\");\n"
2886
2887 #. type: Plain text
2888 #: build/C/man3/malloc_info.3:196
2889 #, no-wrap
2890 msgid ""
2891 "    sleep(100);         /* Sleep until main thread terminates */\n"
2892 "    return NULL;\n"
2893 "}\n"
2894 msgstr ""
2895
2896 #. type: Plain text
2897 #: build/C/man3/malloc_info.3:202
2898 #, no-wrap
2899 msgid ""
2900 "int\n"
2901 "main(int argc, char *argv[])\n"
2902 "{\n"
2903 "    int j, tn, sleepTime;\n"
2904 "    pthread_t *thr;\n"
2905 msgstr ""
2906 "int\n"
2907 "main(int argc, char *argv[])\n"
2908 "{\n"
2909 "    int j, tn, sleepTime;\n"
2910 "    pthread_t *thr;\n"
2911
2912 #. type: Plain text
2913 #: build/C/man3/malloc_info.3:209
2914 #, no-wrap
2915 msgid ""
2916 "    if (argc E<lt> 4) {\n"
2917 "        fprintf(stderr,\n"
2918 "                \"%s num-threads num-blocks block-size [sleep-time]\\en\",\n"
2919 "                argv[0]);\n"
2920 "        exit(EXIT_FAILURE);\n"
2921 "    }\n"
2922 msgstr ""
2923 "    if (argc E<lt> 4) {\n"
2924 "        fprintf(stderr,\n"
2925 "                \"%s num-threads num-blocks block-size [sleep-time]\\en\",\n"
2926 "                argv[0]);\n"
2927 "        exit(EXIT_FAILURE);\n"
2928 "    }\n"
2929
2930 #. type: Plain text
2931 #: build/C/man3/malloc_info.3:214
2932 #, no-wrap
2933 msgid ""
2934 "    numThreads = atoi(argv[1]);\n"
2935 "    numBlocks = atoi(argv[2]);\n"
2936 "    blockSize = atoi(argv[3]);\n"
2937 "    sleepTime = (argc E<gt> 4) ? atoi(argv[4]) : 0;\n"
2938 msgstr ""
2939
2940 #. type: Plain text
2941 #: build/C/man3/malloc_info.3:218
2942 #, no-wrap
2943 msgid ""
2944 "    thr = calloc(numThreads, sizeof(pthread_t));\n"
2945 "    if (thr == NULL)\n"
2946 "        errExit(\"calloc\");\n"
2947 msgstr ""
2948
2949 #. type: Plain text
2950 #: build/C/man3/malloc_info.3:221
2951 #, no-wrap
2952 msgid ""
2953 "    printf(\"============ Before allocating blocks ============\\en\");\n"
2954 "    malloc_info(0, stdout);\n"
2955 msgstr ""
2956
2957 #. type: Plain text
2958 #: build/C/man3/malloc_info.3:223
2959 #, no-wrap
2960 msgid "    /* Create threads that allocate different amounts of memory */\n"
2961 msgstr ""
2962
2963 #. type: Plain text
2964 #: build/C/man3/malloc_info.3:229
2965 #, no-wrap
2966 msgid ""
2967 "    for (tn = 0; tn E<lt> numThreads; tn++) {\n"
2968 "        errno = pthread_create(&thr[tn], NULL, thread_func,\n"
2969 "                               (void *) tn);\n"
2970 "        if (errno != 0)\n"
2971 "            errExit(\"pthread_create\");\n"
2972 msgstr ""
2973
2974 #. type: Plain text
2975 #: build/C/man3/malloc_info.3:234
2976 #, no-wrap
2977 msgid ""
2978 "        /* If we add a sleep interval after the start-up of each\n"
2979 "           thread, the threads likely won\\(aqt contend for malloc\n"
2980 "           mutexes, and therefore additional arenas won\\(aqt be\n"
2981 "           allocated (see malloc(3)). */\n"
2982 msgstr ""
2983
2984 #. type: Plain text
2985 #: build/C/man3/malloc_info.3:238
2986 #, no-wrap
2987 msgid ""
2988 "        if (sleepTime E<gt> 0)\n"
2989 "            sleep(sleepTime);\n"
2990 "    }\n"
2991 msgstr ""
2992
2993 #. type: Plain text
2994 #: build/C/man3/malloc_info.3:240
2995 #, no-wrap
2996 msgid "    /* The main thread also allocates some memory */\n"
2997 msgstr ""
2998
2999 #. type: Plain text
3000 #: build/C/man3/malloc_info.3:244
3001 #, no-wrap
3002 msgid ""
3003 "    for (j = 0; j E<lt> numBlocks; j++)\n"
3004 "        if (malloc(blockSize) == NULL)\n"
3005 "            errExit(\"malloc\");\n"
3006 msgstr ""
3007 "    for (j = 0; j E<lt> numBlocks; j++)\n"
3008 "        if (malloc(blockSize) == NULL)\n"
3009 "            errExit(\"malloc\");\n"
3010
3011 #. type: Plain text
3012 #: build/C/man3/malloc_info.3:247
3013 #, no-wrap
3014 msgid ""
3015 "    sleep(2);           /* Give all threads a chance to\n"
3016 "                           complete allocations */\n"
3017 msgstr ""
3018
3019 #. type: Plain text
3020 #: build/C/man3/malloc_info.3:250
3021 #, no-wrap
3022 msgid ""
3023 "    printf(\"\\en============ After allocating blocks ============\\en\");\n"
3024 "    malloc_info(0, stdout);\n"
3025 msgstr ""
3026
3027 #. type: Plain text
3028 #: build/C/man3/malloc_info.3:260
3029 msgid ""
3030 "B<mallinfo>(3), B<malloc>(3), B<malloc_stats>(3), B<mallopt>(3), "
3031 "B<open_memstream>(3)"
3032 msgstr ""
3033 "B<mallinfo>(3), B<malloc>(3), B<malloc_stats>(3), B<mallopt>(3), "
3034 "B<open_memstream>(3)"
3035
3036 #. type: TH
3037 #: build/C/man3/malloc_stats.3:26
3038 #, no-wrap
3039 msgid "MALLOC_STATS"
3040 msgstr "MALLOC_STATS"
3041
3042 #. type: Plain text
3043 #: build/C/man3/malloc_stats.3:29
3044 msgid "malloc_stats - print memory allocation statistics"
3045 msgstr "malloc_stats - メモリ割り当ての統計を表示する"
3046
3047 #. type: Plain text
3048 #: build/C/man3/malloc_stats.3:33
3049 msgid "B<void malloc_stats(void);>"
3050 msgstr "B<void malloc_stats(void);>"
3051
3052 #.  .SH VERSIONS
3053 #.  Available already in glibc 2.0, possibly earlier
3054 #. type: Plain text
3055 #: build/C/man3/malloc_stats.3:55
3056 msgid ""
3057 "The B<malloc_stats>()  function prints (on standard error) statistics about "
3058 "memory allocated by B<malloc>(3)  and related functions.  For each arena "
3059 "(allocation area), this function prints the total amount of memory allocated "
3060 "and the total number of bytes consumed by in-use allocations.  (These two "
3061 "values correspond to the I<arena> and I<uordblks> fields retrieved by "
3062 "B<mallinfo>(3).)  In addition, the function prints the sum of these two "
3063 "statistics for all arenas, and the maximum number of blocks and bytes that "
3064 "were ever simultaneously allocated using B<mmap>(2)."
3065 msgstr ""
3066
3067 #. type: Plain text
3068 #: build/C/man3/malloc_stats.3:61
3069 msgid ""
3070 "More detailed information about memory allocations in the main arena can be "
3071 "obtained using B<mallinfo>(3)."
3072 msgstr ""
3073
3074 #. type: Plain text
3075 #: build/C/man3/malloc_stats.3:67
3076 msgid ""
3077 "B<mmap>(2), B<mallinfo>(3), B<malloc>(3), B<malloc_info>(3), B<mallopt>(3)"
3078 msgstr ""
3079 "B<mmap>(2), B<mallinfo>(3), B<malloc>(3), B<malloc_info>(3), B<mallopt>(3)"
3080
3081 #. type: TH
3082 #: build/C/man3/malloc_trim.3:26
3083 #, no-wrap
3084 msgid "MALLOC_TRIM"
3085 msgstr "MALLOC_TRIM"
3086
3087 #. type: TH
3088 #: build/C/man3/malloc_trim.3:26 build/C/man3/malloc_usable_size.3:25
3089 #, no-wrap
3090 msgid "2012-03-29"
3091 msgstr "2012-03-29"
3092
3093 #. type: Plain text
3094 #: build/C/man3/malloc_trim.3:29
3095 msgid "malloc_trim - release free memory from the top of the heap"
3096 msgstr ""
3097
3098 #. type: Plain text
3099 #: build/C/man3/malloc_trim.3:33
3100 msgid "B<void malloc_trim(size_t >I<pad>B<);>"
3101 msgstr "B<void malloc_trim(size_t >I<pad>B<);>"
3102
3103 #. type: Plain text
3104 #: build/C/man3/malloc_trim.3:40
3105 msgid ""
3106 "The B<malloc_trim>()  function attempts to release free memory at the top of "
3107 "the heap (by calling B<sbrk>(2)  with a suitable argument)."
3108 msgstr ""
3109
3110 #. type: Plain text
3111 #: build/C/man3/malloc_trim.3:51
3112 msgid ""
3113 "The I<pad> argument specifies the amount of free space to leave untrimmed at "
3114 "the top of the heap.  If this argument is 0, only the minimum amount of "
3115 "memory is maintained at the top of the heap (i.e., one page or less).  A "
3116 "nonzero argument can be used to maintain some trailing space at the top of "
3117 "the heap in order to allow future allocations to be made without having to "
3118 "extend the heap with B<sbrk>(2)."
3119 msgstr ""
3120
3121 #. type: Plain text
3122 #: build/C/man3/malloc_trim.3:56
3123 msgid ""
3124 "The B<malloc_trim>()  function returns 1 if memory was actually released "
3125 "back to the system, or 0 if it was not possible to release any memory."
3126 msgstr ""
3127
3128 #.  .SH VERSIONS
3129 #.  Available already in glibc 2.0, possibly earlier
3130 #. type: Plain text
3131 #: build/C/man3/malloc_trim.3:60
3132 msgid "No errors are defined."
3133 msgstr ""
3134
3135 #. type: Plain text
3136 #: build/C/man3/malloc_trim.3:71
3137 msgid ""
3138 "This function is automatically called by B<free>(3)  in certain "
3139 "circumstances; see the discussion of B<M_TOP_PAD> and B<M_TRIM_THRESHOLD> in "
3140 "B<mallopt>(3)."
3141 msgstr ""
3142
3143 #. type: Plain text
3144 #: build/C/man3/malloc_trim.3:74
3145 msgid ""
3146 "This function cannot release free memory located at places other than the "
3147 "top of the heap."
3148 msgstr ""
3149
3150 #.  malloc/malloc.c::mTRIm():
3151 #.      return result | (av == &main_arena ? sYSTRIm (pad, av) : 0);
3152 #. type: Plain text
3153 #: build/C/man3/malloc_trim.3:78
3154 msgid "This function releases only memory in the main arena."
3155 msgstr ""
3156
3157 #. type: Plain text
3158 #: build/C/man3/malloc_trim.3:82
3159 msgid "B<sbrk>(2), B<malloc>(3), B<mallopt>(3)"
3160 msgstr "B<sbrk>(2), B<malloc>(3), B<mallopt>(3)"
3161
3162 #. type: TH
3163 #: build/C/man3/malloc_usable_size.3:25
3164 #, no-wrap
3165 msgid "MALLOC_USABLE_SIZE"
3166 msgstr "MALLOC_USABLE_SIZE"
3167
3168 #. type: Plain text
3169 #: build/C/man3/malloc_usable_size.3:28
3170 msgid "malloc_usable_size - obtain size of block of memory allocated from heap"
3171 msgstr ""
3172
3173 #. type: Plain text
3174 #: build/C/man3/malloc_usable_size.3:32
3175 msgid "B<size_t malloc_usable_size (void *>I<ptr>B<);>"
3176 msgstr "B<size_t malloc_usable_size (void *>I<ptr>B<);>"
3177
3178 #. type: Plain text
3179 #: build/C/man3/malloc_usable_size.3:40
3180 msgid ""
3181 "The B<malloc_usable_size>()  function returns the number of usable bytes in "
3182 "the block pointed to by I<ptr>, a pointer to a block of memory allocated by "
3183 "B<malloc>(3)  or a related function."
3184 msgstr ""
3185
3186 #. type: Plain text
3187 #: build/C/man3/malloc_usable_size.3:48
3188 msgid ""
3189 "B<malloc_usable_size>()  returns the number of usable bytes in the block of "
3190 "allocated memory pointed to by I<ptr>.  If I<ptr> is NULL, 0 is returned."
3191 msgstr ""
3192
3193 #. type: Plain text
3194 #: build/C/man3/malloc_usable_size.3:60
3195 msgid ""
3196 "The value returned by B<malloc_usable_size>()  may be greater than the "
3197 "requested size of the allocation because of alignment and minimum size "
3198 "constraints.  Although the excess bytes can be overwritten by the "
3199 "application without ill effects, this is not good programming practice: the "
3200 "number of excess bytes in an allocation depends on the underlying "
3201 "implementation."
3202 msgstr ""
3203
3204 #. type: Plain text
3205 #: build/C/man3/malloc_usable_size.3:62
3206 msgid "The main use of this function is for debugging and introspection."
3207 msgstr ""
3208
3209 #. type: Plain text
3210 #: build/C/man3/malloc_usable_size.3:64
3211 msgid "B<malloc>(3)"
3212 msgstr "B<malloc>(3)"
3213
3214 #. type: TH
3215 #: build/C/man3/mallopt.3:26
3216 #, no-wrap
3217 msgid "MALLOPT"
3218 msgstr "MALLOPT"
3219
3220 #. type: TH
3221 #: build/C/man3/mallopt.3:26
3222 #, no-wrap
3223 msgid "2012-04-30"
3224 msgstr "2012-04-30"
3225
3226 #. type: Plain text
3227 #: build/C/man3/mallopt.3:29
3228 msgid "mallopt - set memory allocation parameters"
3229 msgstr "mallopt - メモリ割り当てパラメータを設定する"
3230
3231 #. type: Plain text
3232 #: build/C/man3/mallopt.3:33
3233 msgid "B<int mallopt(int >I<param>B<, int >I<value>B<);>"
3234 msgstr "B<int mallopt(int >I<param>B<, int >I<value>B<);>"
3235
3236 #. type: Plain text
3237 #: build/C/man3/mallopt.3:44
3238 msgid ""
3239 "The B<mallopt>()  function adjusts parameters that control the behavior of "
3240 "the memory-allocation functions (see B<malloc>(3)).  The I<param> argument "
3241 "specifies the parameter to be modified, and I<value> specifies the new value "
3242 "for that parameter."
3243 msgstr ""
3244 "B<mallopt>() 関数は、メモリ割り当て関数 (B<malloc>(3) を参照) の動作を\n"
3245 "制御するパラメータの調整を行う。\n"
3246 "I<param> 引き数で変更するパラメータを指定し、\n"
3247 "I<value> 引き数でそのパラメータの新しい値を指定する。"
3248
3249 #. type: Plain text
3250 #: build/C/man3/mallopt.3:47
3251 msgid "The following values can be specified for I<param>:"
3252 msgstr "I<param> には以下の値を指定することができる。"
3253
3254 #. type: TP
3255 #: build/C/man3/mallopt.3:47
3256 #, no-wrap
3257 msgid "B<M_CHECK_ACTION>"
3258 msgstr "B<M_CHECK_ACTION>"
3259
3260 #. type: Plain text
3261 #: build/C/man3/mallopt.3:53
3262 msgid ""
3263 "Setting this parameter controls how glibc responds when various kinds of "
3264 "programming errors are detected (e.g., freeing the same pointer twice).  The "
3265 "3 least significant bits (2, 1, and 0) of the value assigned to this "
3266 "parameter determine the glibc behavior, as follows:"
3267 msgstr ""
3268
3269 #. type: TP
3270 #: build/C/man3/mallopt.3:54
3271 #, no-wrap
3272 msgid "Bit 0"
3273 msgstr "Bit 0"
3274
3275 #. type: Plain text
3276 #: build/C/man3/mallopt.3:64
3277 msgid ""
3278 "If this bit is set, then print a one-line message on I<stderr> that provides "
3279 "details about the error.  The message starts with the string \"***\\ glibc "
3280 "detected\\ ***\", followed by the program name, the name of the memory-"
3281 "allocation function in which the error was detected, a brief description of "
3282 "the error, and the memory address where the error was detected."
3283 msgstr ""
3284
3285 #. type: TP
3286 #: build/C/man3/mallopt.3:64
3287 #, no-wrap
3288 msgid "Bit 1"
3289 msgstr "Bit 1"
3290
3291 #. type: Plain text
3292 #: build/C/man3/mallopt.3:79
3293 msgid ""
3294 "If this bit is set, then, after printing any error message specified by bit "
3295 "0, the program is terminated by calling B<abort>(3).  In glibc versions "
3296 "since 2.4, if bit 0 is also set, then, between printing the error message "
3297 "and aborting, the program also prints a stack trace in the manner of "
3298 "B<backtrace>(3), and prints the process's memory mapping in the style of I</"
3299 "proc/[pid]/maps> (see B<proc>(5))."
3300 msgstr ""
3301
3302 #. type: TP
3303 #: build/C/man3/mallopt.3:79
3304 #, no-wrap
3305 msgid "Bit 2 (since glibc 2.4)"
3306 msgstr "Bit 2 (glibc 2.4 以降)"
3307
3308 #. type: Plain text
3309 #: build/C/man3/mallopt.3:86
3310 msgid ""
3311 "This bit has an effect only if bit 0 is also set.  If this bit is set, then "
3312 "the one-line message describing the error is simplified to contain just the "
3313 "name of the function where the error was detected and the brief description "
3314 "of the error."
3315 msgstr ""
3316
3317 #. type: Plain text
3318 #: build/C/man3/mallopt.3:91
3319 msgid "The remaining bits in I<value> are ignored."
3320 msgstr ""
3321
3322 #. type: Plain text
3323 #: build/C/man3/mallopt.3:95
3324 msgid ""
3325 "Combining the above details, the following numeric values are meaningful for "
3326 "B<M_CHECK_ACTION>:"
3327 msgstr ""
3328
3329 #. type: IP
3330 #: build/C/man3/mallopt.3:96
3331 #, no-wrap
3332 msgid "0"
3333 msgstr "0"
3334
3335 #. type: Plain text
3336 #: build/C/man3/mallopt.3:98
3337 msgid "Ignore error conditions; continue execution (with undefined results)."
3338 msgstr ""
3339
3340 #. type: IP
3341 #: build/C/man3/mallopt.3:98
3342 #, no-wrap
3343 msgid "1"
3344 msgstr "1"
3345
3346 #. type: Plain text
3347 #: build/C/man3/mallopt.3:100
3348 msgid "Print a detailed error message and continue execution."
3349 msgstr ""
3350
3351 #. type: IP
3352 #: build/C/man3/mallopt.3:100
3353 #, no-wrap
3354 msgid "2"
3355 msgstr "2"
3356
3357 #. type: Plain text
3358 #: build/C/man3/mallopt.3:102
3359 msgid "Abort the program."
3360 msgstr ""
3361
3362 #. type: IP
3363 #: build/C/man3/mallopt.3:102
3364 #, no-wrap
3365 msgid "3"
3366 msgstr "3"
3367
3368 #. type: Plain text
3369 #: build/C/man3/mallopt.3:105
3370 msgid ""
3371 "Print detailed error message, stack trace, and memory mappings, and abort "
3372 "the program."
3373 msgstr ""
3374
3375 #. type: IP
3376 #: build/C/man3/mallopt.3:105
3377 #, no-wrap
3378 msgid "5"
3379 msgstr "5"
3380
3381 #. type: Plain text
3382 #: build/C/man3/mallopt.3:107
3383 msgid "Print a simple error message and continue execution."
3384 msgstr ""
3385
3386 #. type: IP
3387 #: build/C/man3/mallopt.3:107
3388 #, no-wrap
3389 msgid "7"
3390 msgstr "7"
3391
3392 #. type: Plain text
3393 #: build/C/man3/mallopt.3:110
3394 msgid ""
3395 "Print simple error message, stack trace, and memory mappings, and abort the "
3396 "program."
3397 msgstr ""
3398
3399 #. type: Plain text
3400 #: build/C/man3/mallopt.3:116
3401 msgid ""
3402 "Since glibc 2.3.4, the default value for the B<M_CHECK_ACTION> parameter is "
3403 "3.  In glibc version 2.3.3 and earlier, the default value is 1."
3404 msgstr ""
3405
3406 #. type: Plain text
3407 #: build/C/man3/mallopt.3:121
3408 msgid ""
3409 "Using a nonzero B<M_CHECK_ACTION> value can be useful because otherwise a "
3410 "crash may happen much later, and the true cause of the problem is then very "
3411 "hard to track down."
3412 msgstr ""
3413
3414 #. type: TP
3415 #: build/C/man3/mallopt.3:121
3416 #, no-wrap
3417 msgid "B<M_MMAP_MAX>"
3418 msgstr "B<M_MMAP_MAX>"
3419
3420 #.  The following text adapted from comments in the glibc source:
3421 #. type: Plain text
3422 #: build/C/man3/mallopt.3:131
3423 msgid ""
3424 "This parameter specifies the maximum number of allocation requests that may "
3425 "be simultaneously serviced using B<mmap>(2).  This parameter exists because "
3426 "some systems have a limited number of internal tables for use by B<mmap>(2), "
3427 "and using more than a few of them may degrade performance."
3428 msgstr ""
3429
3430 #. type: Plain text
3431 #: build/C/man3/mallopt.3:138
3432 msgid ""
3433 "The default value is 65,536, a value which has no special significance and "
3434 "which servers only as a safeguard.  Setting this parameter to 0 disables the "
3435 "use of B<mmap>(2)  for servicing large allocation requests."
3436 msgstr ""
3437
3438 #. type: TP
3439 #: build/C/man3/mallopt.3:138
3440 #, no-wrap
3441 msgid "B<M_MMAP_THRESHOLD>"
3442 msgstr "B<M_MMAP_THRESHOLD>"
3443
3444 #. type: Plain text
3445 #: build/C/man3/mallopt.3:147
3446 msgid ""
3447 "For allocations greater than or equal to the limit specified (in bytes) by "
3448 "B<M_MMAP_THRESHOLD> that can't be satisfied from the free list, the memory-"
3449 "allocation functions employ B<mmap>(2)  instead of increasing the program "
3450 "break using B<sbrk>(2)."
3451 msgstr ""
3452
3453 #. type: Plain text
3454 #: build/C/man3/mallopt.3:167
3455 msgid ""
3456 "Allocating memory using B<mmap>(2)  has the significant advantage that the "
3457 "allocated memory blocks can always be independently released back to the "
3458 "system.  (By contrast, the heap can be trimmed only if memory is freed at "
3459 "the top end.)  On the other hand, there are some disadvantages to the use of "
3460 "B<mmap>(2): deallocated space is not placed on the free list for reuse by "
3461 "later allocations; memory may be wasted because B<mmap>(2)  allocations must "
3462 "be page-aligned; and the kernel must perform the expensive task of zeroing "
3463 "out memory allocated via B<mmap>(2).  Balancing these factors leads to a "
3464 "default setting of 128*1024 for the B<M_MMAP_THRESHOLD> parameter."
3465 msgstr ""
3466
3467 #. type: Plain text
3468 #: build/C/man3/mallopt.3:174
3469 msgid ""
3470 "The lower limit for this parameter is 0.  The upper limit is "
3471 "B<DEFAULT_MMAP_THRESHOLD_MAX>: 512*1024 on 32-bit systems or "
3472 "I<4*1024*1024*sizeof(long)> on 64-bit systems."
3473 msgstr ""
3474
3475 #. type: Plain text
3476 #: build/C/man3/mallopt.3:192
3477 msgid ""
3478 "I<Note:> Nowadays, glibc uses a dynamic mmap threshold by default.  The "
3479 "initial value of the threshold is 128*1024, but when blocks larger than the "
3480 "current threshold and less than or equal to B<DEFAULT_MMAP_THRESHOLD_MAX> "
3481 "are freed, the threshold is adjusted upwards to the size of the freed "
3482 "block.  When dynamic mmap thresholding is in effect, the threshold for "
3483 "trimming the heap is also dynamically adjusted to be twice the dynamic mmap "
3484 "threshold.  Dynamic adjustment of the mmap threshold is disabled if any of "
3485 "the B<M_TRIM_THRESHOLD>, B<M_TOP_PAD>, B<M_MMAP_THRESHOLD>, or B<M_MMAP_MAX> "
3486 "parameters is set."
3487 msgstr ""
3488
3489 #. type: TP
3490 #: build/C/man3/mallopt.3:192
3491 #, no-wrap
3492 msgid "B<M_MXFAST> (since glibc 2.3)"
3493 msgstr "B<M_MXFAST> (glibc 2.3 以降)"
3494
3495 #.  The following text adapted from comments in the glibc sources:
3496 #. type: Plain text
3497 #: build/C/man3/mallopt.3:212
3498 msgid ""
3499 "Set the upper limit for memory allocation requests that are satisfied using "
3500 "\"fastbins\".  (The measurement unit for this parameter is bytes.)  Fastbins "
3501 "are storage areas that hold deallocated blocks of memory of the same size "
3502 "without merging adjacent free blocks.  Subsequent reallocation of blocks of "
3503 "the same size can be handled very quickly by allocating from the fastbin, "
3504 "although memory fragmentation and the overall memory footprint of the "
3505 "program can increase.  The default value for this parameter is I<64*sizeof"
3506 "(size_t)/4> (i.e., 64 on 32-bit architectures).  The range for this "
3507 "parameter is 0 to I<80*sizeof(size_t)/4>.  Setting B<M_MXFAST> to 0 disables "
3508 "the use of fastbins."
3509 msgstr ""
3510
3511 #. type: TP
3512 #: build/C/man3/mallopt.3:212
3513 #, no-wrap
3514 msgid "B<M_PERTURB> (since glibc 2.4)"
3515 msgstr "B<M_PERTURB> (glibc 2.4 以降)"
3516
3517 #. type: Plain text
3518 #: build/C/man3/mallopt.3:227
3519 msgid ""
3520 "If this parameter is set to a nonzero value, then bytes of allocated memory "
3521 "(other than allocations via B<calloc>(3))  are initialized to the complement "
3522 "of the value in the least significant byte of I<value>, and when allocated "
3523 "memory is released using B<free>(3), the freed bytes are set to the least "
3524 "significant byte of I<value>.  This can be useful for detecting errors where "
3525 "programs incorrectly rely on allocated memory being initialized to zero, or "
3526 "reuse values in memory that has already been freed."
3527 msgstr ""
3528
3529 #. type: TP
3530 #: build/C/man3/mallopt.3:227
3531 #, no-wrap
3532 msgid "B<M_TOP_PAD>"
3533 msgstr "B<M_TOP_PAD>"
3534
3535 #. type: Plain text
3536 #: build/C/man3/mallopt.3:234
3537 msgid ""
3538 "This parameter defines the amount of padding to employ when calling B<sbrk>"
3539 "(2)  to modify the program break.  (The measurement unit for this parameter "
3540 "is bytes.)  This parameter has an effect in the following circumstances:"
3541 msgstr ""
3542
3543 #. type: Plain text
3544 #: build/C/man3/mallopt.3:241
3545 msgid ""
3546 "When the program break is increased, then B<M_TOP_PAD> bytes are added to "
3547 "the B<sbrk>(2)  request."
3548 msgstr ""
3549
3550 #. type: Plain text
3551 #: build/C/man3/mallopt.3:247
3552 msgid ""
3553 "When the heap is trimmed as a consequence of calling B<free>(3)  (see the "
3554 "discussion of B<M_TRIM_THRESHOLD>)  this much free space is preserved at the "
3555 "top of the heap."
3556 msgstr ""
3557
3558 #. type: Plain text
3559 #: build/C/man3/mallopt.3:251
3560 msgid ""
3561 "In either case, the amount of padding is always rounded to a system page "
3562 "boundary."
3563 msgstr ""
3564
3565 #. type: Plain text
3566 #: build/C/man3/mallopt.3:258
3567 msgid ""
3568 "Modifying B<M_TOP_PAD> is a trade-off between increasing the number of "
3569 "system calls (when the parameter is set low)  and wasting unused memory at "
3570 "the top of the heap (when the parameter is set high)."
3571 msgstr ""
3572
3573 #.  DEFAULT_TOP_PAD in glibc source
3574 #. type: Plain text
3575 #: build/C/man3/mallopt.3:261
3576 msgid "The default value for this parameter is 128*1024."
3577 msgstr ""
3578
3579 #. type: TP
3580 #: build/C/man3/mallopt.3:261
3581 #, no-wrap
3582 msgid "B<M_TRIM_THRESHOLD>"
3583 msgstr "B<M_TRIM_THRESHOLD>"
3584
3585 #. type: Plain text
3586 #: build/C/man3/mallopt.3:277
3587 msgid ""
3588 "When the amount of contiguous free memory at the top of the heap grows "
3589 "sufficiently large, B<free>(3)  employs B<sbrk>(2)  to release this memory "
3590 "back to the system.  (This can be useful in programs that continue to "
3591 "execute for a long period after freeing a significant amount of memory.)  "
3592 "The B<M_TRIM_THRESHOLD> parameter specifies the minimum size (in bytes) that "
3593 "this block of memory must reach before B<sbrk>(2)  is used to trim the heap."
3594 msgstr ""
3595
3596 #. type: Plain text
3597 #: build/C/man3/mallopt.3:282
3598 msgid ""
3599 "The default value for this parameter is 128*1024.  Setting "
3600 "B<M_TRIM_THRESHOLD> to -1 disables trimming completely."
3601 msgstr ""
3602
3603 #
3604 #
3605 #
3606 #.  FIXME Do the arena parameters need to be documented?
3607 #.  .TP
3608 #.  .BR M_ARENA_TEST " (since glibc 2.10)"
3609 #.  .TP
3610 #.  .BR M_ARENA_MAX " (since glibc 2.10)"
3611 #.  Environment variables
3612 #.      MALLOC_ARENA_MAX_
3613 #.      MALLOC_ARENA_TEST_
3614 #.  http://udrepper.livejournal.com/20948.html describes some details
3615 #.      of the MALLOC_ARENA_* environment variables.
3616 #.  These macros aren't enabled in production releases until 2.15?
3617 #.  (see glibc malloc/Makefile)
3618 #. type: Plain text
3619 #: build/C/man3/mallopt.3:305
3620 msgid ""
3621 "Modifying B<M_TRIM_THRESHOLD> is a trade-off between increasing the number "
3622 "of system calls (when the parameter is set low)  and wasting unused memory "
3623 "at the top of the heap (when the parameter is set high)."
3624 msgstr ""
3625
3626 #. type: SS
3627 #: build/C/man3/mallopt.3:305
3628 #, fuzzy, no-wrap
3629 #| msgid "Environment Variables"
3630 msgid "Environment variables"
3631 msgstr "環境変数"
3632
3633 #. type: Plain text
3634 #: build/C/man3/mallopt.3:320
3635 msgid ""
3636 "A number of environment variables can be defined to modify some of the same "
3637 "parameters as are controlled by B<mallopt>().  Using these variables has the "
3638 "advantage that the source code of the program need not be changed.  To be "
3639 "effective, these variables must be defined before the first call to a memory-"
3640 "allocation function.  (If the same parameters are adjusted via B<mallopt>()  "
3641 "then the B<mallopt>()  settings take precedence.)  For security reasons, "
3642 "these variables are ignored in set-user-ID and set-group-ID programs."
3643 msgstr ""
3644
3645 #. type: Plain text
3646 #: build/C/man3/mallopt.3:323
3647 msgid ""
3648 "The environment variables are as follows (note the trailing underscore at "
3649 "the end of the name of each variable):"
3650 msgstr ""
3651
3652 #. type: TP
3653 #: build/C/man3/mallopt.3:323
3654 #, no-wrap
3655 msgid "B<MALLOC_CHECK_>"
3656 msgstr "B<MALLOC_CHECK_>"
3657
3658 #.  On glibc 2.12/x86, a simple malloc()+free() loop is about 70% slower
3659 #.  when MALLOC_CHECK_ was set.
3660 #. type: Plain text
3661 #: build/C/man3/mallopt.3:340
3662 msgid ""
3663 "This environment variable controls the same parameter as B<mallopt>()  "
3664 "B<M_CHECK_ACTION>.  If this variable is set to a nonzero value, then a "
3665 "special implementation of the memory-allocation functions is used.  (This is "
3666 "accomplished using the B<malloc_hook>(3)  feature.)  This implementation "
3667 "performs additional error checking, but is slower than the standard set of "
3668 "memory-allocation functions.  (This implementation does not detect all "
3669 "possible errors; memory leaks can still occur.)"
3670 msgstr ""
3671
3672 #. type: Plain text
3673 #: build/C/man3/mallopt.3:345
3674 msgid ""
3675 "The value assigned to this environment variable should be a single digit, "
3676 "whose meaning is as described for B<M_CHECK_ACTION>.  Any characters beyond "
3677 "the initial digit are ignored."
3678 msgstr ""
3679
3680 #. type: Plain text
3681 #: build/C/man3/mallopt.3:354
3682 msgid ""
3683 "For security reasons, the effect of B<MALLOC_CHECK_> is disabled by default "
3684 "for set-user-ID and set-group-ID programs.  However, if the file I</etc/suid-"
3685 "debug> exists (the content of the file is irrelevant), then B<MALLOC_CHECK_> "
3686 "also has an effect for set-user-ID and set-group-ID programs."
3687 msgstr ""
3688
3689 #. type: TP
3690 #: build/C/man3/mallopt.3:354
3691 #, no-wrap
3692 msgid "B<MALLOC_MMAP_MAX_>"
3693 msgstr "B<MALLOC_MMAP_MAX_>"
3694
3695 #. type: Plain text
3696 #: build/C/man3/mallopt.3:359
3697 msgid "Controls the same parameter as B<mallopt>()  B<M_MMAP_MAX>."
3698 msgstr ""
3699
3700 #. type: TP
3701 #: build/C/man3/mallopt.3:359
3702 #, no-wrap
3703 msgid "B<MALLOC_MMAP_THRESHOLD_>"
3704 msgstr "B<MALLOC_MMAP_THRESHOLD_>"
3705
3706 #. type: Plain text
3707 #: build/C/man3/mallopt.3:364
3708 msgid "Controls the same parameter as B<mallopt>()  B<M_MMAP_THRESHOLD>."
3709 msgstr ""
3710
3711 #. type: TP
3712 #: build/C/man3/mallopt.3:364
3713 #, no-wrap
3714 msgid "B<MALLOC_PERTURB_>"
3715 msgstr "B<MALLOC_PERTURB_>"
3716
3717 #. type: Plain text
3718 #: build/C/man3/mallopt.3:369
3719 msgid "Controls the same parameter as B<mallopt>()  B<M_PERTURB>."
3720 msgstr ""
3721
3722 #. type: TP
3723 #: build/C/man3/mallopt.3:369
3724 #, no-wrap
3725 msgid "B<MALLOC_TRIM_THRESHOLD_>"
3726 msgstr "B<MALLOC_TRIM_THRESHOLD_>"
3727
3728 #. type: Plain text
3729 #: build/C/man3/mallopt.3:374
3730 msgid "Controls the same parameter as B<mallopt>()  B<M_TRIM_THRESHOLD>."
3731 msgstr ""
3732
3733 #. type: TP
3734 #: build/C/man3/mallopt.3:374
3735 #, no-wrap
3736 msgid "B<MALLOC_TOP_PAD_>"
3737 msgstr "B<MALLOC_TOP_PAD_>"
3738
3739 #. type: Plain text
3740 #: build/C/man3/mallopt.3:379
3741 msgid "Controls the same parameter as B<mallopt>()  B<M_TOP_PAD>."
3742 msgstr ""
3743
3744 #. type: Plain text
3745 #: build/C/man3/mallopt.3:384
3746 msgid "On success, B<mallopt>()  returns 1.  On error, it returns 0."
3747 msgstr "B<mallopt>()  は成功すると 1 を返す。エラーの場合は 0 を返す。"
3748
3749 #.  .SH VERSIONS
3750 #.  Available already in glibc 2.0, possibly earlier
3751 #. type: Plain text
3752 #: build/C/man3/mallopt.3:392
3753 msgid "On error, I<errno> is I<not> set."
3754 msgstr "エラーの場合、I<errno> は設定I<されない>。"
3755
3756 #.  .SH NOTES
3757 #. type: Plain text
3758 #: build/C/man3/mallopt.3:406
3759 msgid ""
3760 "This function is not specified by POSIX or the C standards.  A similar "
3761 "function exists on many System V derivatives, but the range of values for "
3762 "I<param> varies across systems.  The SVID defined options B<M_MXFAST>, "
3763 "B<M_NLBLKS>, B<M_GRAIN>, and B<M_KEEP>, but only the first of these is "
3764 "implemented in glibc."
3765 msgstr ""
3766
3767 #. type: Plain text
3768 #: build/C/man3/mallopt.3:410
3769 msgid "Specifying an invalid value for I<param> does not generate an error."
3770 msgstr ""
3771
3772 #.  FIXME This looks buggy:
3773 #.  setting the M_MXFAST limit rounds up:    (s + SIZE_SZ) & ~MALLOC_ALIGN_MASK)
3774 #.  malloc requests are rounded up:
3775 #.     (req) + SIZE_SZ + MALLOC_ALIGN_MASK) & ~MALLOC_ALIGN_MASK
3776 #.  http://sources.redhat.com/bugzilla/show_bug.cgi?id=12129
3777 #. type: Plain text
3778 #: build/C/man3/mallopt.3:418
3779 msgid ""
3780 "A calculation error within the glibc implementation means that a call of the "
3781 "form:"
3782 msgstr ""
3783
3784 #. type: Plain text
3785 #: build/C/man3/mallopt.3:421
3786 #, no-wrap
3787 msgid "    mallopt(M_MXFAST, n)\n"
3788 msgstr "    mallopt(M_MXFAST, n)\n"
3789
3790 #.  Bins are multiples of 2 * sizeof(size_t) + sizeof(size_t)
3791 #. type: Plain text
3792 #: build/C/man3/mallopt.3:433
3793 msgid ""
3794 "does not result in fastbins being employed for all allocations of size up to "
3795 "I<n>.  To ensure desired results, I<n> should be rounded up to the next "
3796 "multiple greater than or equal to I<(2k+1)*sizeof(size_t)>, where I<k> is an "
3797 "integer."
3798 msgstr ""
3799
3800 #.  FIXME MALLOC_MMAP_THRESHOLD_ and MALLOC_MMAP_MAX_
3801 #.  do have an effect for set-user-ID programs (but not
3802 #.  set-group-ID programs).
3803 #.  http://sources.redhat.com/bugzilla/show_bug.cgi?id=12155
3804 #. type: Plain text
3805 #: build/C/man3/mallopt.3:445
3806 msgid ""
3807 "The B<MALLOC_MMAP_THRESHOLD_> and B<MALLOC_MMAP_MAX_> variables are I<not> "
3808 "ignored in set-group-ID programs."
3809 msgstr ""
3810
3811 #.  FIXME http://sources.redhat.com/bugzilla/show_bug.cgi?id=12140
3812 #. type: Plain text
3813 #: build/C/man3/mallopt.3:466
3814 msgid ""
3815 "If B<mallopt>()  is used to set B<M_PERTURB>, then, as expected, the bytes "
3816 "of allocated memory are initialized to the complement of the byte in "
3817 "I<value>, and when that memory is freed, the bytes of the region are "
3818 "initialized to the byte specified in I<value>.  However, there is an off-by-"
3819 "I<sizeof(size_t)> error in the implementation: instead of initializing "
3820 "precisely the block of memory being freed by the call I<free(p)>, the block "
3821 "starting at I<p+sizeof(size_t)> is initialized."
3822 msgstr ""
3823
3824 #. type: Plain text
3825 #: build/C/man3/mallopt.3:475
3826 msgid ""
3827 "The program below demonstrates the use of B<M_CHECK_ACTION>.  If the program "
3828 "is supplied with an (integer) command-line argument, then that argument is "
3829 "used to set the B<M_CHECK_ACTION> parameter.  The program then allocates a "
3830 "block of memory, and frees it twice (an error)."
3831 msgstr ""
3832
3833 #. type: Plain text
3834 #: build/C/man3/mallopt.3:479
3835 msgid ""
3836 "The following shell session shows what happens when we run this program "
3837 "under glibc, with the default value for B<M_CHECK_ACTION>:"
3838 msgstr ""
3839
3840 #. type: Plain text
3841 #: build/C/man3/mallopt.3:499
3842 #, no-wrap
3843 msgid ""
3844 "$ B<./a.out>\n"
3845 "main(): returned from first free() call\n"
3846 "*** glibc detected *** ./a.out: double free or corruption (top): 0x09d30008 ***\n"
3847 "======= Backtrace: =========\n"
3848 "/lib/libc.so.6(+0x6c501)[0x523501]\n"
3849 "/lib/libc.so.6(+0x6dd70)[0x524d70]\n"
3850 "/lib/libc.so.6(cfree+0x6d)[0x527e5d]\n"
3851 "\\&./a.out[0x80485db]\n"
3852 "/lib/libc.so.6(__libc_start_main+0xe7)[0x4cdce7]\n"
3853 "\\&./a.out[0x8048471]\n"
3854 "======= Memory map: ========\n"
3855 "001e4000-001fe000 r-xp 00000000 08:06 1083555    /lib/libgcc_s.so.1\n"
3856 "001fe000-001ff000 r--p 00019000 08:06 1083555    /lib/libgcc_s.so.1\n"
3857 "[some lines omitted]\n"
3858 "b7814000-b7817000 rw-p 00000000 00:00 0\n"
3859 "bff53000-bff74000 rw-p 00000000 00:00 0          [stack]\n"
3860 "Aborted (core dumped)\n"
3861 msgstr ""
3862 "$ B<./a.out>\n"
3863 "main(): returned from first free() call\n"
3864 "*** glibc detected *** ./a.out: double free or corruption (top): 0x09d30008 ***\n"
3865 "======= Backtrace: =========\n"
3866 "/lib/libc.so.6(+0x6c501)[0x523501]\n"
3867 "/lib/libc.so.6(+0x6dd70)[0x524d70]\n"
3868 "/lib/libc.so.6(cfree+0x6d)[0x527e5d]\n"
3869 "\\&./a.out[0x80485db]\n"
3870 "/lib/libc.so.6(__libc_start_main+0xe7)[0x4cdce7]\n"
3871 "\\&./a.out[0x8048471]\n"
3872 "======= Memory map: ========\n"
3873 "001e4000-001fe000 r-xp 00000000 08:06 1083555    /lib/libgcc_s.so.1\n"
3874 "001fe000-001ff000 r--p 00019000 08:06 1083555    /lib/libgcc_s.so.1\n"
3875 "[some lines omitted]\n"
3876 "b7814000-b7817000 rw-p 00000000 00:00 0\n"
3877 "bff53000-bff74000 rw-p 00000000 00:00 0          [stack]\n"
3878 "Aborted (core dumped)\n"
3879
3880 #. type: Plain text
3881 #: build/C/man3/mallopt.3:504
3882 msgid ""
3883 "The following runs show the results when employing other values for "
3884 "B<M_CHECK_ACTION>:"
3885 msgstr ""
3886
3887 #. type: Plain text
3888 #: build/C/man3/mallopt.3:517
3889 #, no-wrap
3890 msgid ""
3891 "$ B<./a.out 1>             # Diagnose error and continue\n"
3892 "main(): returned from first free() call\n"
3893 "*** glibc detected *** ./a.out: double free or corruption (top): 0x09cbe008 ***\n"
3894 "main(): returned from second free() call\n"
3895 "$ B<./a.out 2>             # Abort without error message\n"
3896 "main(): returned from first free() call\n"
3897 "Aborted (core dumped)\n"
3898 "$ B<./a.out 0>             # Ignore error and continue\n"
3899 "main(): returned from first free() call\n"
3900 "main(): returned from second free() call\n"
3901 msgstr ""
3902 "$ B<./a.out 1>             # Diagnose error and continue\n"
3903 "main(): returned from first free() call\n"
3904 "*** glibc detected *** ./a.out: double free or corruption (top): 0x09cbe008 ***\n"
3905 "main(): returned from second free() call\n"
3906 "$ B<./a.out 2>             # Abort without error message\n"
3907 "main(): returned from first free() call\n"
3908 "Aborted (core dumped)\n"
3909 "$ B<./a.out 0>             # Ignore error and continue\n"
3910 "main(): returned from first free() call\n"
3911 "main(): returned from second free() call\n"
3912
3913 #. type: Plain text
3914 #: build/C/man3/mallopt.3:523
3915 msgid ""
3916 "The next run shows how to set the same parameter using the B<MALLOC_CHECK_> "
3917 "environment variable:"
3918 msgstr ""
3919
3920 #. type: Plain text
3921 #: build/C/man3/mallopt.3:530
3922 #, no-wrap
3923 msgid ""
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 msgstr ""
3929 "$ B<MALLOC_CHECK_=1 ./a.out>\n"
3930 "main(): returned from first free() call\n"
3931 "*** glibc detected *** ./a.out: free(): invalid pointer: 0x092c2008 ***\n"
3932 "main(): returned from second free() call\n"
3933
3934 #. type: Plain text
3935 #: build/C/man3/mallopt.3:538
3936 #, no-wrap
3937 msgid ""
3938 "#include E<lt>malloc.hE<gt>\n"
3939 "#include E<lt>stdio.hE<gt>\n"
3940 "#include E<lt>stdlib.hE<gt>\n"
3941 msgstr ""
3942 "#include E<lt>malloc.hE<gt>\n"
3943 "#include E<lt>stdio.hE<gt>\n"
3944 "#include E<lt>stdlib.hE<gt>\n"
3945
3946 #. type: Plain text
3947 #: build/C/man3/mallopt.3:543 build/C/man3/mcheck.3:187
3948 #, no-wrap
3949 msgid ""
3950 "int\n"
3951 "main(int argc, char *argv[])\n"
3952 "{\n"
3953 "    char *p;\n"
3954 msgstr ""
3955 "int\n"
3956 "main(int argc, char *argv[])\n"
3957 "{\n"
3958 "    char *p;\n"
3959
3960 #. type: Plain text
3961 #: build/C/man3/mallopt.3:550
3962 #, no-wrap
3963 msgid ""
3964 "    if (argc E<gt> 1) {\n"
3965 "        if (mallopt(M_CHECK_ACTION, atoi(argv[1])) != 1) {\n"
3966 "            fprintf(stderr, \"mallopt() failed\");\n"
3967 "            exit(EXIT_FAILURE);\n"
3968 "        }\n"
3969 "    }\n"
3970 msgstr ""
3971 "    if (argc E<gt> 1) {\n"
3972 "        if (mallopt(M_CHECK_ACTION, atoi(argv[1])) != 1) {\n"
3973 "            fprintf(stderr, \"mallopt() failed\");\n"
3974 "            exit(EXIT_FAILURE);\n"
3975 "        }\n"
3976 "    }\n"
3977
3978 #. type: Plain text
3979 #: build/C/man3/mallopt.3:556
3980 #, no-wrap
3981 msgid ""
3982 "    p = malloc(1000);\n"
3983 "    if (p == NULL) {\n"
3984 "        fprintf(stderr, \"malloc() failed\");\n"
3985 "        exit(EXIT_FAILURE);\n"
3986 "    }\n"
3987 msgstr ""
3988 "    p = malloc(1000);\n"
3989 "    if (p == NULL) {\n"
3990 "        fprintf(stderr, \"malloc() failed\");\n"
3991 "        exit(EXIT_FAILURE);\n"
3992 "    }\n"
3993
3994 #. type: Plain text
3995 #: build/C/man3/mallopt.3:559
3996 #, no-wrap
3997 msgid ""
3998 "    free(p);\n"
3999 "    printf(\"main(): returned from first free() call\\en\");\n"
4000 msgstr ""
4001 "    free(p);\n"
4002 "    printf(\"main(): returned from first free() call\\en\");\n"
4003
4004 #. type: Plain text
4005 #: build/C/man3/mallopt.3:562
4006 #, no-wrap
4007 msgid ""
4008 "    free(p);\n"
4009 "    printf(\"main(): returned from second free() call\\en\");\n"
4010 msgstr ""
4011 "    free(p);\n"
4012 "    printf(\"main(): returned from second free() call\\en\");\n"
4013
4014 #. type: Plain text
4015 #: build/C/man3/mallopt.3:580
4016 #, fuzzy
4017 #| msgid ""
4018 #| "B<mmap>(2)  B<sbrk>(2), B<mallinfo>(3), B<malloc>(3), B<malloc_hook>(3), "
4019 #| "B<malloc_info>(3), B<malloc_stats>(3), B<malloc_trim>(3), B<mcheck>(3), "
4020 #| "B<mtrace>(3), B<posix_memalign>(3)"
4021 msgid ""
4022 "B<mmap>(2), B<sbrk>(2), B<mallinfo>(3), B<malloc>(3), B<malloc_hook>(3), "
4023 "B<malloc_info>(3), B<malloc_stats>(3), B<malloc_trim>(3), B<mcheck>(3), "
4024 "B<mtrace>(3), B<posix_memalign>(3)"
4025 msgstr ""
4026 "B<mmap>(2)  B<sbrk>(2), B<mallinfo>(3), B<malloc>(3), B<malloc_hook>(3), "
4027 "B<malloc_info>(3), B<malloc_stats>(3), B<malloc_trim>(3), B<mcheck>(3), "
4028 "B<mtrace>(3), B<posix_memalign>(3)"
4029
4030 #. type: TH
4031 #: build/C/man3/mcheck.3:25
4032 #, no-wrap
4033 msgid "MCHECK"
4034 msgstr ""
4035
4036 #. type: TH
4037 #: build/C/man3/mcheck.3:25 build/C/man3/mtrace.3:25
4038 #, no-wrap
4039 msgid "2012-04-18"
4040 msgstr "2012-04-18"
4041
4042 #. type: Plain text
4043 #: build/C/man3/mcheck.3:28
4044 msgid ""
4045 "mcheck, mcheck_check_all, mcheck_pedantic, mprobe - heap consistency checking"
4046 msgstr ""
4047
4048 #. type: Plain text
4049 #: build/C/man3/mcheck.3:31
4050 #, no-wrap
4051 msgid "B<#include E<lt>mcheck.hE<gt>>\n"
4052 msgstr "B<#include E<lt>mcheck.hE<gt>>\n"
4053
4054 #. type: Plain text
4055 #: build/C/man3/mcheck.3:33
4056 #, no-wrap
4057 msgid "B<int mcheck(void (*>I<abortfunc>B<)(enum mcheck_status >I<mstatus>B<));>\n"
4058 msgstr ""
4059
4060 #. type: Plain text
4061 #: build/C/man3/mcheck.3:35
4062 #, no-wrap
4063 msgid "B<int mcheck_pedantic(void (*>I<abortfunc>B<)(enum mcheck_status >I<mstatus>B<));>\n"
4064 msgstr ""
4065
4066 #. type: Plain text
4067 #: build/C/man3/mcheck.3:37
4068 #, no-wrap
4069 msgid "B<void mcheck_check_all(void);>\n"
4070 msgstr "B<void mcheck_check_all(void);>\n"
4071
4072 #. type: Plain text
4073 #: build/C/man3/mcheck.3:39
4074 #, no-wrap
4075 msgid "B<enum mcheck_status mprobe(void *>I<ptr>B<);>\n"
4076 msgstr "B<enum mcheck_status mprobe(void *>I<ptr>B<);>\n"
4077
4078 #. type: Plain text
4079 #: build/C/man3/mcheck.3:51
4080 msgid ""
4081 "The B<mcheck>()  function installs a set of debugging hooks for the B<malloc>"
4082 "(3)  family of memory-allocation functions.  These hooks cause certain "
4083 "consistency checks to be performed on the state of the heap.  The checks can "
4084 "detect application errors such as freeing a block of memory more than once "
4085 "or corrupting the bookkeeping data structures that immediately precede a "
4086 "block of allocated memory."
4087 msgstr ""
4088
4089 #. type: Plain text
4090 #: build/C/man3/mcheck.3:63
4091 msgid ""
4092 "To be effective, the B<mcheck>()  function must be called before the first "
4093 "call to B<malloc>(3)  or a related function.  In cases where this is "
4094 "difficult to ensure, linking the program with I<-mcheck> inserts an implicit "
4095 "call to B<mcheck>()  (with a NULL argument)  before the first call to a "
4096 "memory-allocation function."
4097 msgstr ""
4098
4099 #. type: Plain text
4100 #: build/C/man3/mcheck.3:71
4101 msgid ""
4102 "The B<mcheck_pedantic>()  function is similar to B<mcheck>(), but performs "
4103 "checks on all allocated blocks whenever one of the memory-allocation "
4104 "functions is called.  This can be very slow!"
4105 msgstr ""
4106
4107 #. type: Plain text
4108 #: build/C/man3/mcheck.3:78
4109 msgid ""
4110 "The B<mcheck_check_all>()  function causes an immediate check on all "
4111 "allocated blocks.  This call is only effective if B<mcheck>()  is called "
4112 "beforehand."
4113 msgstr ""
4114
4115 #. type: Plain text
4116 #: build/C/man3/mcheck.3:91
4117 msgid ""
4118 "If the system detects an inconsistency in the heap, the caller-supplied "
4119 "function pointed to by I<abortfunc> is invoked with a single argument "
4120 "argument, I<mstatus>, that indicates what type of inconsistency was "
4121 "detected.  If I<abortfunc> is NULL, a default function prints an error "
4122 "message on I<stderr> and calls B<abort>(3)."
4123 msgstr ""
4124
4125 #. type: Plain text
4126 #: build/C/man3/mcheck.3:103
4127 msgid ""
4128 "The B<mprobe>()  function performs a consistency check on the block of "
4129 "allocated memory pointed to by I<ptr>.  The B<mcheck>()  function should be "
4130 "called beforehand (otherwise B<mprobe>()  returns B<MCHECK_DISABLED>)."
4131 msgstr ""
4132
4133 #. type: Plain text
4134 #: build/C/man3/mcheck.3:111
4135 msgid ""
4136 "The following list describes the values returned by B<mprobe>()  or passed "
4137 "as the I<mstatus> argument when I<abortfunc> is invoked:"
4138 msgstr ""
4139
4140 #. type: TP
4141 #: build/C/man3/mcheck.3:111
4142 #, no-wrap
4143 msgid "B<MCHECK_DISABLED> (B<mprobe>() only)"
4144 msgstr ""
4145
4146 #. type: Plain text
4147 #: build/C/man3/mcheck.3:116
4148 msgid ""
4149 "B<mcheck>()  was not called before the first memory allocation function was "
4150 "called.  Consistency checking is not possible."
4151 msgstr ""
4152
4153 #. type: TP
4154 #: build/C/man3/mcheck.3:116
4155 #, no-wrap
4156 msgid "B<MCHECK_OK> (B<mprobe>() only)"
4157 msgstr ""
4158
4159 #. type: Plain text
4160 #: build/C/man3/mcheck.3:119
4161 msgid "No inconsistency detected."
4162 msgstr ""
4163
4164 #. type: TP
4165 #: build/C/man3/mcheck.3:119
4166 #, no-wrap
4167 msgid "B<MCHECK_HEAD>"
4168 msgstr "B<MCHECK_HEAD>"
4169
4170 #. type: Plain text
4171 #: build/C/man3/mcheck.3:122
4172 msgid "Memory preceding an allocated block was clobbered."
4173 msgstr ""
4174
4175 #. type: TP
4176 #: build/C/man3/mcheck.3:122
4177 #, no-wrap
4178 msgid "B<MCHECK_TAIL>"
4179 msgstr "B<MCHECK_TAIL>"
4180
4181 #. type: Plain text
4182 #: build/C/man3/mcheck.3:125
4183 msgid "Memory following an allocated block was clobbered."
4184 msgstr ""
4185
4186 #. type: TP
4187 #: build/C/man3/mcheck.3:125
4188 #, no-wrap
4189 msgid "B<MCHECK_FREE>"
4190 msgstr "B<MCHECK_FREE>"
4191
4192 #. type: Plain text
4193 #: build/C/man3/mcheck.3:129
4194 msgid "A block of memory was freed twice."
4195 msgstr ""
4196
4197 #. type: Plain text
4198 #: build/C/man3/mcheck.3:134
4199 msgid ""
4200 "B<mcheck>()  and B<mcheck_pedantic>()  return 0 on success, or -1 on error."
4201 msgstr ""
4202
4203 #. type: Plain text
4204 #: build/C/man3/mcheck.3:145
4205 msgid ""
4206 "The B<mcheck_pedantic>()  and B<mcheck_check_all>()  functions are available "
4207 "since glibc 2.2.  The B<mcheck>()  and B<mprobe>()  functions are present "
4208 "since at least glibc 2.0"
4209 msgstr ""
4210
4211 #.  But is MALLOC_CHECK_ slower?
4212 #. type: Plain text
4213 #: build/C/man3/mcheck.3:159
4214 msgid ""
4215 "Linking a program with I<-lmcheck> and using the B<MALLOC_CHECK_> "
4216 "environment variable (described in B<mallopt>(3))  cause the same kinds of "
4217 "errors to be detected.  But, using B<MALLOC_CHECK_> does not require the "
4218 "application to be relinked."
4219 msgstr ""
4220
4221 #. type: Plain text
4222 #: build/C/man3/mcheck.3:165
4223 msgid ""
4224 "The program below calls B<mcheck>()  with a NULL argument and then frees the "
4225 "same block of memory twice.  The following shell session demonstrates what "
4226 "happens when running the program:"
4227 msgstr ""
4228
4229 #. type: Plain text
4230 #: build/C/man3/mcheck.3:170
4231 #, no-wrap
4232 msgid ""
4233 "$B< ./a.out>\n"
4234 "About to free\n"
4235 msgstr ""
4236
4237 #. type: Plain text
4238 #: build/C/man3/mcheck.3:174
4239 #, no-wrap
4240 msgid ""
4241 "About to free a second time\n"
4242 "block freed twice\n"
4243 "Aborted (core dumped)\n"
4244 msgstr ""
4245
4246 #. type: Plain text
4247 #: build/C/man3/mcheck.3:182
4248 #, no-wrap
4249 msgid ""
4250 "#include E<lt>stdlib.hE<gt>\n"
4251 "#include E<lt>stdio.hE<gt>\n"
4252 "#include E<lt>mcheck.hE<gt>\n"
4253 msgstr ""
4254 "#include E<lt>stdlib.hE<gt>\n"
4255 "#include E<lt>stdio.hE<gt>\n"
4256 "#include E<lt>mcheck.hE<gt>\n"
4257
4258 #. type: Plain text
4259 #: build/C/man3/mcheck.3:190
4260 #, no-wrap
4261 msgid ""
4262 "    if (mcheck(NULL) != 0) {\n"
4263 "        fprintf(stderr, \"mcheck() failed\\en\");\n"
4264 msgstr ""
4265
4266 #. type: Plain text
4267 #: build/C/man3/mcheck.3:193
4268 #, no-wrap
4269 msgid ""
4270 "        exit(EXIT_FAILURE);\n"
4271 "    }\n"
4272 msgstr ""
4273 "        exit(EXIT_FAILURE);\n"
4274 "    }\n"
4275
4276 #. type: Plain text
4277 #: build/C/man3/mcheck.3:195
4278 #, no-wrap
4279 msgid "    p = malloc(1000);\n"
4280 msgstr "    p = malloc(1000);\n"
4281
4282 #. type: Plain text
4283 #: build/C/man3/mcheck.3:200
4284 #, no-wrap
4285 msgid ""
4286 "    fprintf(stderr, \"About to free\\en\");\n"
4287 "    free(p);\n"
4288 "    fprintf(stderr, \"\\enAbout to free a second time\\en\");\n"
4289 "    free(p);\n"
4290 msgstr ""
4291
4292 #. type: Plain text
4293 #: build/C/man3/mcheck.3:208
4294 msgid "B<malloc>(3), B<mallopt>(3), B<mtrace>(3)"
4295 msgstr "B<malloc>(3), B<mallopt>(3), B<mtrace>(3)"
4296
4297 #. type: TH
4298 #: build/C/man2/mlock.2:26
4299 #, no-wrap
4300 msgid "MLOCK"
4301 msgstr "MLOCK"
4302
4303 #. type: TH
4304 #: build/C/man2/mlock.2:26
4305 #, no-wrap
4306 msgid "2011-09-14"
4307 msgstr "2011-09-14"
4308
4309 #. type: Plain text
4310 #: build/C/man2/mlock.2:29
4311 msgid "mlock, munlock, mlockall, munlockall - lock and unlock memory"
4312 msgstr "mlock - メモリのロックとロック解除を行う"
4313
4314 #. type: Plain text
4315 #: build/C/man2/mlock.2:32 build/C/man2/mmap.2:46 build/C/man2/mmap2.2:35
4316 #: build/C/man2/mprotect.2:44 build/C/man2/mremap.2:38
4317 #, no-wrap
4318 msgid "B<#include E<lt>sys/mman.hE<gt>>\n"
4319 msgstr "B<#include E<lt>sys/mman.hE<gt>>\n"
4320
4321 #. type: Plain text
4322 #: build/C/man2/mlock.2:35
4323 #, no-wrap
4324 msgid ""
4325 "B<int mlock(const void *>I<addr>B<, size_t >I<len>B<);>\n"
4326 "B<int munlock(const void *>I<addr>B<, size_t >I<len>B<);>\n"
4327 msgstr ""
4328 "B<int mlock(const void *>I<addr>B<, size_t >I<len>B<);>\n"
4329 "B<int munlock(const void *>I<addr>B<, size_t >I<len>B<);>\n"
4330
4331 #. type: Plain text
4332 #: build/C/man2/mlock.2:38
4333 #, no-wrap
4334 msgid ""
4335 "B<int mlockall(int >I<flags>B<);>\n"
4336 "B<int munlockall(void);>\n"
4337 msgstr ""
4338 "B<int mlockall(int >I<flags>B<);>\n"
4339 "B<int munlockall(void);>\n"
4340
4341 #. type: Plain text
4342 #: build/C/man2/mlock.2:54
4343 msgid ""
4344 "B<mlock>()  and B<mlockall>()  respectively lock part or all of the calling "
4345 "process's virtual address space into RAM, preventing that memory from being "
4346 "paged to the swap area.  B<munlock>()  and B<munlockall>()  perform the "
4347 "converse operation, respectively unlocking part or all of the calling "
4348 "process's virtual address space, so that pages in the specified virtual "
4349 "address range may once more to be swapped out if required by the kernel "
4350 "memory manager.  Memory locking and unlocking are performed in units of "
4351 "whole pages."
4352 msgstr ""
4353 "B<mlock>()  と B<mlockall>()  はそれぞれ、呼び出し元プロセスの仮想アドレス空"
4354 "間の一部または全部を RAM 上にロックし、メモリがスワップエリアにページングされ"
4355 "るのを防ぐ。 B<munlock>()  と B<munlockall>()  は逆の操作で、それぞれ呼び出し"
4356 "元プロセスの仮想アドレス空間の一部または全部を ロック解除する。つまり、指定さ"
4357 "れた仮想アドレス範囲のページは カーネルメモリマネージャーから要求されればス"
4358 "ワップアウトするようになる。 メモリのロックとロック解除はページ単位で行われ"
4359 "る。"
4360
4361 #. type: SS
4362 #: build/C/man2/mlock.2:54
4363 #, no-wrap
4364 msgid "mlock() and munlock()"
4365 msgstr "mlock() と munlock()"
4366
4367 #. type: Plain text
4368 #: build/C/man2/mlock.2:64
4369 msgid ""
4370 "B<mlock>()  locks pages in the address range starting at I<addr> and "
4371 "continuing for I<len> bytes.  All pages that contain a part of the specified "
4372 "address range are guaranteed to be resident in RAM when the call returns "
4373 "successfully; the pages are guaranteed to stay in RAM until later unlocked."
4374 msgstr ""
4375 "B<mlock>()  は I<addr> から始まる長さ I<len> バイトのアドレス範囲のページを"
4376 "ロックする。 呼び出しが成功した場合には、 指定されたアドレス範囲を含む全ての"
4377 "ページは RAM に残り続けることが保証される。 これらのページは後でロック解除さ"
4378 "れるまで RAM に残り続けることが保証される。"
4379
4380 #. type: Plain text
4381 #: build/C/man2/mlock.2:73
4382 msgid ""
4383 "B<munlock>()  unlocks pages in the address range starting at I<addr> and "
4384 "continuing for I<len> bytes.  After this call, all pages that contain a part "
4385 "of the specified memory range can be moved to external swap space again by "
4386 "the kernel."
4387 msgstr ""
4388 "B<munlock>()  は、 I<addr> から始まる長さ I<len> バイトのアドレス範囲のページ"
4389 "のロックを解除する。 この呼び出しを行った後は、カーネルが、指定されたメモリ範"
4390 "囲を含む 全てのページを外部のスワップ空間に移動できるようになる。"
4391
4392 #. type: SS
4393 #: build/C/man2/mlock.2:73
4394 #, no-wrap
4395 msgid "mlockall() and munlockall()"
4396 msgstr "mlockall() と munlockall()"
4397
4398 #. type: Plain text
4399 #: build/C/man2/mlock.2:83
4400 msgid ""
4401 "B<mlockall>()  locks all pages mapped into the address space of the calling "
4402 "process.  This includes the pages of the code, data and stack segment, as "
4403 "well as shared libraries, user space kernel data, shared memory, and memory-"
4404 "mapped files.  All mapped pages are guaranteed to be resident in RAM when "
4405 "the call returns successfully; the pages are guaranteed to stay in RAM until "
4406 "later unlocked."
4407 msgstr ""
4408 "B<mlockall>()  は呼び出し元プロセスのアドレス空間にマップされている全てのペー"
4409 "ジを ロックする。これにはコード、データ、スタックの 各セグメント、共有ライブ"
4410 "ラリ、カーネルのユーザー空間データ、 共有メモリ、メモリ・マップされたファイル"
4411 "が含まれる。 システム・コールが成功した場合には全てのマップされたページは "
4412 "RAM に 残ることを保証される。 これらのページは後でロック解除されるまで RAM に"
4413 "残り続けることが保証される。"
4414
4415 #. type: Plain text
4416 #: build/C/man2/mlock.2:88
4417 msgid ""
4418 "The I<flags> argument is constructed as the bitwise OR of one or more of the "
4419 "following constants:"
4420 msgstr "I<flags> 引数は以下の内容の一つまたは複数のビット OR から構成される:"
4421
4422 #. type: TP
4423 #: build/C/man2/mlock.2:88
4424 #, no-wrap
4425 msgid "B<MCL_CURRENT>"
4426 msgstr "B<MCL_CURRENT>"
4427
4428 #. type: Plain text
4429 #: build/C/man2/mlock.2:92
4430 msgid ""
4431 "Lock all pages which are currently mapped into the address space of the "
4432 "process."
4433 msgstr ""
4434 "現在、プロセスのアドレス空間にマップされている全てのページをロックする。"
4435
4436 #. type: TP
4437 #: build/C/man2/mlock.2:92
4438 #, no-wrap
4439 msgid "B<MCL_FUTURE>"
4440 msgstr "B<MCL_FUTURE>"
4441
4442 #. type: Plain text
4443 #: build/C/man2/mlock.2:99
4444 msgid ""
4445 "Lock all pages which will become mapped into the address space of the "
4446 "process in the future.  These could be for instance new pages required by a "
4447 "growing heap and stack as well as new memory mapped files or shared memory "
4448 "regions."
4449 msgstr ""
4450 "将来、プロセスのアドレス空間にマップされる全てのページをロックする。 例えば、"
4451 "ヒープ (heap) やスタックの成長により新しく必要になったページだけで なく、新し"
4452 "くメモリマップされたファイルや共有メモリ領域もロックされる。"
4453
4454 #. type: Plain text
4455 #: build/C/man2/mlock.2:112
4456 msgid ""
4457 "If B<MCL_FUTURE> has been specified, then a later system call (e.g., B<mmap>"
4458 "(2), B<sbrk>(2), B<malloc>(3)), may fail if it would cause the number of "
4459 "locked bytes to exceed the permitted maximum (see below).  In the same "
4460 "circumstances, stack growth may likewise fail: the kernel will deny stack "
4461 "expansion and deliver a B<SIGSEGV> signal to the process."
4462 msgstr ""
4463 "B<MCL_FUTURE> が指定されていると、以後のシステムコール (例えば、 B<mmap>(2), "
4464 "B<sbrk>(2), B<malloc>(3))  は、ロックするバイト数が許可された最大値 (下記参"
4465 "照) を超えた場合に 失敗する可能性がある。 同様に、スタックの成長も失敗する可"
4466 "能性がある。 その場合、カーネルはスタックの拡張を拒否し、 B<SIGSEGV> をプロセ"
4467 "スに送る。"
4468
4469 #. type: Plain text
4470 #: build/C/man2/mlock.2:116
4471 msgid ""
4472 "B<munlockall>()  unlocks all pages mapped into the address space of the "
4473 "calling process."
4474 msgstr ""
4475 "B<munlockall>()  は、呼び出し元プロセスのアドレス空間にマッピングされている "
4476 "全てのページをロック解除する。"
4477
4478 #. type: Plain text
4479 #: build/C/man2/mlock.2:122
4480 msgid ""
4481 "On success these system calls return 0.  On error, -1 is returned, I<errno> "
4482 "is set appropriately, and no changes are made to any locks in the address "
4483 "space of the process."
4484 msgstr ""
4485 "成功した場合は、これらのシステムコールはゼロを返す。 エラーの場合は -1 が返さ"
4486 "れ、 I<errno> が適切に設定され、プロセスのアドレス空間におけるロックは変更さ"
4487 "れない。"
4488
4489 #. type: Plain text
4490 #: build/C/man2/mlock.2:131
4491 msgid ""
4492 "(Linux 2.6.9 and later) the caller had a nonzero B<RLIMIT_MEMLOCK> soft "
4493 "resource limit, but tried to lock more memory than the limit permitted.  "
4494 "This limit is not enforced if the process is privileged (B<CAP_IPC_LOCK>)."
4495 msgstr ""
4496 "(Linux 2.6.9 以降) 呼び出し元は非ゼロの ソフト資源制限 B<RLIMIT_MEMLOCK> を持"
4497 "つが、制限が許可している以上のメモリをロックしようとした。 この制限は、プロセ"
4498 "スが特権 (B<CAP_IPC_LOCK>)  を持っている場合は適用されない。"
4499
4500 #.  In the case of mlock(), this check is somewhat buggy: it doesn't
4501 #.  take into account whether the to-be-locked range overlaps with
4502 #.  already locked pages.  Thus, suppose we allocate
4503 #.  (num_physpages / 4 + 1) of memory, and lock those pages once using
4504 #.  mlock(), and then lock the *same* page range a second time.
4505 #.  In the case, the second mlock() call will fail, since the check
4506 #.  calculates that the process is trying to lock (num_physpages / 2 + 2)
4507 #.  pages, which of course is not true.  (MTK, Nov 04, kernel 2.4.28)
4508 #. type: Plain text
4509 #: build/C/man2/mlock.2:143
4510 msgid ""
4511 "(Linux 2.4 and earlier) the calling process tried to lock more than half of "
4512 "RAM."
4513 msgstr ""
4514 "(Linux 2.4 以前) 呼び出し元プロセスが RAM の半分以上をロックしようとした。"
4515
4516 #. SVr4 documents an additional EAGAIN error code.
4517 #. type: Plain text
4518 #: build/C/man2/mlock.2:149
4519 msgid ""
4520 "The caller is not privileged, but needs privilege (B<CAP_IPC_LOCK>)  to "
4521 "perform the requested operation."
4522 msgstr ""
4523 "呼び出し側が特権を持っていないが、\n"
4524 "要求された操作を実行するには特権 (B<CAP_IPC_LOCK>) が必要である。"
4525
4526 #. type: Plain text
4527 #: build/C/man2/mlock.2:154
4528 msgid "For B<mlock>()  and B<munlock>():"
4529 msgstr "B<mlock>()  と B<munlock>()  用として:"
4530
4531 #. type: Plain text
4532 #: build/C/man2/mlock.2:157
4533 msgid "Some or all of the specified address range could not be locked."
4534 msgstr "指定されたアドレス範囲の一部または全てをロックすることができなかった。"
4535
4536 #. type: Plain text
4537 #: build/C/man2/mlock.2:164
4538 msgid ""
4539 "The result of the addition I<start>+I<len> was less than I<start> (e.g., the "
4540 "addition may have resulted in an overflow)."
4541 msgstr ""
4542 "I<start>+I<len> の加算の結果が I<start> よりも小さかった\n"
4543 "(例えば、加算でオーバーフローが発生したなど)。"
4544
4545 #. type: Plain text
4546 #: build/C/man2/mlock.2:169
4547 msgid "(Not on Linux)  I<addr> was not a multiple of the page size."
4548 msgstr ""
4549 "(Linux ではこの意味で使われない)  I<addr> がページサイズの倍数ではない。"
4550
4551 #. type: Plain text
4552 #: build/C/man2/mlock.2:173
4553 msgid ""
4554 "Some of the specified address range does not correspond to mapped pages in "
4555 "the address space of the process."
4556 msgstr ""
4557 "指定されたアドレス範囲がプロセスのアドレス空間にマップされたページと 一致しな"
4558 "い。"
4559
4560 #. type: Plain text
4561 #: build/C/man2/mlock.2:176
4562 msgid "For B<mlockall>():"
4563 msgstr "B<mlockall>()  用として:"
4564
4565 #. type: Plain text
4566 #: build/C/man2/mlock.2:179
4567 msgid "Unknown I<flags> were specified."
4568 msgstr "未知の I<flags> が指定された。"
4569
4570 #. type: Plain text
4571 #: build/C/man2/mlock.2:182
4572 msgid "For B<munlockall>():"
4573 msgstr "B<munlockall>()  用として:"
4574
4575 #. type: Plain text
4576 #: build/C/man2/mlock.2:186
4577 msgid ""
4578 "(Linux 2.6.8 and earlier) The caller was not privileged (B<CAP_IPC_LOCK>)."
4579 msgstr ""
4580 "(Linux 2.6.8 以前) 呼び出し元が権限 (B<CAP_IPC_LOCK>)  を持っていない。"
4581
4582 #. type: Plain text
4583 #: build/C/man2/mlock.2:188
4584 msgid "POSIX.1-2001, SVr4."
4585 msgstr "POSIX.1-2001, SVr4."
4586
4587 #. type: SH
4588 #: build/C/man2/mlock.2:188 build/C/man2/mmap.2:501 build/C/man2/msync.2:105
4589 #, no-wrap
4590 msgid "AVAILABILITY"
4591 msgstr "可用性"
4592
4593 #. type: Plain text
4594 #: build/C/man2/mlock.2:200
4595 msgid ""
4596 "On POSIX systems on which B<mlock>()  and B<munlock>()  are available, "
4597 "B<_POSIX_MEMLOCK_RANGE> is defined in I<E<lt>unistd.hE<gt>> and the number "
4598 "of bytes in a page can be determined from the constant B<PAGESIZE> (if "
4599 "defined) in I<E<lt>limits.hE<gt>> or by calling I<sysconf(_SC_PAGESIZE)>."
4600 msgstr ""
4601 "B<mlock>()  と B<munlock>()  が使用可能な POSIX システムでは "
4602 "B<_POSIX_MEMLOCK_RANGE> が I<E<lt>unistd.hE<gt>> で定義されている。 また、"
4603 "ページあたりのバイト数は、 I<E<lt>limits.hE<gt>> で定義される定数 "
4604 "B<PAGESIZE> から (定義されている場合)、もしくは I<sysconf(_SC_PAGESIZE)> を呼"
4605 "び出すことで決定できる。"
4606
4607 #.  POSIX.1-2001: It shall be defined to -1 or 0 or 200112L.
4608 #.  -1: unavailable, 0: ask using sysconf().
4609 #.  glibc defines it to 1.
4610 #. type: Plain text
4611 #: build/C/man2/mlock.2:213
4612 msgid ""
4613 "On POSIX systems on which B<mlockall>()  and B<munlockall>()  are available, "
4614 "B<_POSIX_MEMLOCK> is defined in I<E<lt>unistd.hE<gt>> to a value greater "
4615 "than 0.  (See also B<sysconf>(3).)"
4616 msgstr ""
4617 "B<mlockall>()  と B<munlockall>()  が利用可能な POSIX システムでは、 "
4618 "B<_POSIX_MEMLOCK> は I<E<lt>unistd.hE<gt>> で 0 より大きい値に定義されている "
4619 "(B<sysconf>(3)  も参照のこと)。"
4620
4621 #. type: Plain text
4622 #: build/C/man2/mlock.2:231
4623 msgid ""
4624 "Memory locking has two main applications: real-time algorithms and high-"
4625 "security data processing.  Real-time applications require deterministic "
4626 "timing, and, like scheduling, paging is one major cause of unexpected "
4627 "program execution delays.  Real-time applications will usually also switch "
4628 "to a real-time scheduler with B<sched_setscheduler>(2).  Cryptographic "
4629 "security software often handles critical bytes like passwords or secret keys "
4630 "as data structures.  As a result of paging, these secrets could be "
4631 "transferred onto a persistent swap store medium, where they might be "
4632 "accessible to the enemy long after the security software has erased the "
4633 "secrets in RAM and terminated.  (But be aware that the suspend mode on "
4634 "laptops and some desktop computers will save a copy of the system's RAM to "
4635 "disk, regardless of memory locks.)"
4636 msgstr ""
4637 "メモリのロックの用途としては主に二つある: リアルタイム アルゴリズムと高いセ"
4638 "キュリティの必要なデータ処理である。リアルタイムの アプリケーションは決定的な"
4639 "タイミングやスケジューリングを必要とするが、 ページングは予期しないプログラム"
4640 "の実行遅延をもたらす主要な要因となる。 リアルタイムのアプリケーションはたいて"
4641 "いは B<sched_setscheduler>(2)  でリアルタイムスケジューラに変更される。 暗号"
4642 "やセキュリティのソフトウェアはしばしばパスワードや秘密鍵のデータの ような重要"
4643 "なバイト列を扱う。ページングの結果、これらの秘密が スワップ用の固定媒体に転送"
4644 "されるかもしれない。そして、セキュリティ・ ソフトウェアが RAM 上の秘密を削除"
4645 "して終了したずっと後になっても、 このスワップされたデータには敵がアクセスでき"
4646 "る可能性がある (しかし、ラップトップといくつかのデスクトップコンピュータの サ"
4647 "スペンドモードはシステムの RAM の内容をメモリのロックに関わらず ディスクに保"
4648 "存することに注意)。"
4649
4650 #. type: Plain text
4651 #: build/C/man2/mlock.2:244
4652 msgid ""
4653 "Real-time processes that are using B<mlockall>()  to prevent delays on page "
4654 "faults should reserve enough locked stack pages before entering the time-"
4655 "critical section, so that no page fault can be caused by function calls.  "
4656 "This can be achieved by calling a function that allocates a sufficiently "
4657 "large automatic variable (an array) and writes to the memory occupied by "
4658 "this array in order to touch these stack pages.  This way, enough pages will "
4659 "be mapped for the stack and can be locked into RAM.  The dummy writes ensure "
4660 "that not even copy-on-write page faults can occur in the critical section."
4661 msgstr ""
4662 "リアルタイムプロセスが B<mlockall>()  を使ってページフォールトによる遅延を防"
4663 "ごうとする場合、 関数呼び出しによってページフォールトが発生しないように、 時"
4664 "間制限の厳しい部分 (time-critical section) に入る前に 十分な量のロックされた"
4665 "スタックを確保しておく必要がある。 これを実現するには、十分な大きさの自動変"
4666 "数 (の配列) を確保し、 これらのスタック用のページがメモリ上に確保されるように"
4667 "この配列に 書き込みを行う関数を用意し、これを呼び出せばよい。こうすること"
4668 "で、 十分な量のページがスタックにマッピングされ、RAM にロックされる。 ダミー"
4669 "の書き込みを行うことによって、 時間制限の厳しい部分 (critical section) 内では"
4670 "書き込み時コピーによる ページフォールトさえも発生しないことが保証される。"
4671
4672 #. type: Plain text
4673 #: build/C/man2/mlock.2:250
4674 msgid ""
4675 "Memory locks are not inherited by a child created via B<fork>(2)  and are "
4676 "automatically removed (unlocked) during an B<execve>(2)  or when the process "
4677 "terminates."
4678 msgstr ""
4679 "メモリロックは B<fork>(2)  で作成された子プロセスには継承されず、 B<execve>"
4680 "(2)  が呼ばれたり、プロセスが終了した場合は 自動的に削除される (ロック解除さ"
4681 "れる)。"
4682
4683 #. type: Plain text
4684 #: build/C/man2/mlock.2:254
4685 msgid ""
4686 "The memory lock on an address range is automatically removed if the address "
4687 "range is unmapped via B<munmap>(2)."
4688 msgstr ""
4689 "あるアドレス範囲に対するメモリロックは、そのアドレス範囲が B<munmap>(2)  に"
4690 "よってアンマップされた場合は削除される。"
4691
4692 #. type: Plain text
4693 #: build/C/man2/mlock.2:267
4694 msgid ""
4695 "Memory locks do not stack, that is, pages which have been locked several "
4696 "times by calls to B<mlock>()  or B<mlockall>()  will be unlocked by a single "
4697 "call to B<munlock>()  for the corresponding range or by B<munlockall>().  "
4698 "Pages which are mapped to several locations or by several processes stay "
4699 "locked into RAM as long as they are locked at least at one location or by at "
4700 "least one process."
4701 msgstr ""
4702 "メモリのロックは累積しない。 すなわち複数回 B<mlock>()  や B<mlockall>()  を"
4703 "呼び出してロックされたページでも、 対応する範囲に対して B<munlock>()  を 1 回"
4704 "呼び出したり B<munlockall>()  を呼び出したりするだけでロック解除される。 複数"
4705 "の場所や複数のプロセスにマップされているページは、少なくとも一つの場所、 一つ"
4706 "のプロセスでロックされている限りは RAM に残り続ける。"
4707
4708 #. type: Plain text
4709 #: build/C/man2/mlock.2:278
4710 msgid ""
4711 "Under Linux, B<mlock>()  and B<munlock>()  automatically round I<addr> down "
4712 "to the nearest page boundary.  However, POSIX.1-2001 allows an "
4713 "implementation to require that I<addr> is page aligned, so portable "
4714 "applications should ensure this."
4715 msgstr ""
4716 "Linux では、 B<mlock>()  と B<munlock>()  は自動的に I<addr> を端数切り捨てに"
4717 "より一番近いページ境界へと丸める。 しかし POSIX.1-2001 は I<addr> がページ境"
4718 "界に合っていることを要求する実装も許している。 そのため移植性を意図したアプリ"
4719 "ケーションではきちんと境界に合わせた方が良い。"
4720
4721 #. type: Plain text
4722 #: build/C/man2/mlock.2:291
4723 msgid ""
4724 "The I<VmLck> field of the Linux-specific I</proc/PID/status> file shows how "
4725 "many kilobytes of memory the process with ID I<PID> has locked using B<mlock>"
4726 "(), B<mlockall>(), and B<mmap>(2)  B<MAP_LOCKED>."
4727 msgstr ""
4728 "Linux 固有の I</proc/PID/status> ファイルの I<VmLck> フィールドには、\n"
4729 "B<mlock>(), B<mlockall>() および B<mmap>(2) B<MAP_LOCKED> を使って、\n"
4730 "ID が I<PID> のプロセスがロックしているメモリ量 (キロバイト単位) が\n"
4731 "表示される。"
4732
4733 #. type: SS
4734 #: build/C/man2/mlock.2:291
4735 #, no-wrap
4736 msgid "Limits and permissions"
4737 msgstr "制限と権限"
4738
4739 #. type: Plain text
4740 #: build/C/man2/mlock.2:298
4741 msgid ""
4742 "In Linux 2.6.8 and earlier, a process must be privileged (B<CAP_IPC_LOCK>)  "
4743 "in order to lock memory and the B<RLIMIT_MEMLOCK> soft resource limit "
4744 "defines a limit on how much memory the process may lock."
4745 msgstr ""
4746 "Linux 2.6.8 以前では、メモリをロックするためには特権 (B<CAP_IPC_LOCK>)  が必"
4747 "要で、 ソフト資源制限 B<RLIMIT_MEMLOCK> はプロセスがどれだけのメモリをロック"
4748 "できるかの制限を定義する。"
4749
4750 #. type: Plain text
4751 #: build/C/man2/mlock.2:304
4752 msgid ""
4753 "Since Linux 2.6.9, no limits are placed on the amount of memory that a "
4754 "privileged process can lock and the B<RLIMIT_MEMLOCK> soft resource limit "
4755 "instead defines a limit on how much memory an unprivileged process may lock."
4756 msgstr ""
4757 "Linux 2.6.9 以降では、特権を持つプロセスがロックできるメモリ量は無制限とな"
4758 "り、 代わりにソフト資源制限 B<RLIMIT_MEMLOCK> は特権を持たないプロセスがロッ"
4759 "クできるメモリ量の制限を定義する。"
4760
4761 #. type: Plain text
4762 #: build/C/man2/mlock.2:312
4763 msgid ""
4764 "In the 2.4 series Linux kernels up to and including 2.4.17, a bug caused the "
4765 "B<mlockall>()  B<MCL_FUTURE> flag to be inherited across a B<fork>(2).  This "
4766 "was rectified in kernel 2.4.18."
4767 msgstr ""
4768 "2.4.17 までの 2.4 シリーズの Linux カーネルには、 B<mlockall>()  "
4769 "B<MCL_FUTURE> フラグが B<fork>(2)  で継承されると言うバグがある。 これはカー"
4770 "ネル 2.4.18 で修正された。"
4771
4772 #.  See the following LKML thread:
4773 #.  http://marc.theaimsgroup.com/?l=linux-kernel&m=113801392825023&w=2
4774 #.  "Rationale for RLIMIT_MEMLOCK"
4775 #.  23 Jan 2006
4776 #. type: Plain text
4777 #: build/C/man2/mlock.2:329
4778 msgid ""
4779 "Since kernel 2.6.9, if a privileged process calls I<mlockall(MCL_FUTURE)> "
4780 "and later drops privileges (loses the B<CAP_IPC_LOCK> capability by, for "
4781 "example, setting its effective UID to a nonzero value), then subsequent "
4782 "memory allocations (e.g., B<mmap>(2), B<brk>(2))  will fail if the "
4783 "B<RLIMIT_MEMLOCK> resource limit is encountered."
4784 msgstr ""
4785 "カーネル 2.6.9 以降では、特権を持ったプロセスが I<mlockall(MCL_FUTURE)> を呼"
4786 "び出した後で、特権をなくした場合 (例えば、 実効 UID を 0 以外の値に変更するな"
4787 "どにより、 B<CAP_IPC_LOCK> ケーパビリティを失った場合)、リソース上限 "
4788 "B<RLIMIT_MEMLOCK> に達すると、それ以降のメモリ割り当て (例えば B<mmap>(2), "
4789 "B<brk>(2))  は失敗する。"
4790
4791 #. type: Plain text
4792 #: build/C/man2/mlock.2:336
4793 msgid ""
4794 "B<mmap>(2), B<setrlimit>(2), B<shmctl>(2), B<sysconf>(3), B<proc>(5), "
4795 "B<capabilities>(7)"
4796 msgstr ""
4797 "B<mmap>(2), B<setrlimit>(2), B<shmctl>(2), B<sysconf>(3), B<proc>(5),\n"
4798 "B<capabilities>(7)"
4799
4800 #. type: TH
4801 #: build/C/man2/mmap.2:40
4802 #, no-wrap
4803 msgid "MMAP"
4804 msgstr "MMAP"
4805
4806 #. type: TH
4807 #: build/C/man2/mmap.2:40
4808 #, fuzzy, no-wrap
4809 #| msgid "2009-02-25"
4810 msgid "2013-02-25"
4811 msgstr "2009-02-25"
4812
4813 #. type: Plain text
4814 #: build/C/man2/mmap.2:43
4815 msgid "mmap, munmap - map or unmap files or devices into memory"
4816 msgstr "mmap, munmap - ファイルやデバイスをメモリにマップ/アンマップする"
4817
4818 #. type: Plain text
4819 #: build/C/man2/mmap.2:51
4820 #, no-wrap
4821 msgid ""
4822 "B<void *mmap(void *>I<addr>B<, size_t >I<length>B<, int >I<prot>B<, int >I<flags>B<,>\n"
4823 "B<           int >I<fd>B<, off_t >I<offset>B<);>\n"
4824 "B<int munmap(void *>I<addr>B<, size_t >I<length>B<);>\n"
4825 msgstr ""
4826 "B<void *mmap(void *>I<addr>B<, size_t >I<length>B<, int >I<prot>B<, int >I<flags>B<,>\n"
4827 "B<           int >I<fd>B<, off_t >I<offset>B<);>\n"
4828 "B<int munmap(void *>I<addr>B<, size_t >I<length>B<);>\n"
4829
4830 #. type: Plain text
4831 #: build/C/man2/mmap.2:54
4832 msgid "See NOTES for information on feature test macro requirements."
4833 msgstr ""
4834
4835 #. type: Plain text
4836 #: build/C/man2/mmap.2:63
4837 msgid ""
4838 "B<mmap>()  creates a new mapping in the virtual address space of the calling "
4839 "process.  The starting address for the new mapping is specified in I<addr>.  "
4840 "The I<length> argument specifies the length of the mapping."
4841 msgstr ""
4842 "B<mmap>()  は、新しいマッピングを呼び出し元プロセスの仮想アドレス空間に作成す"
4843 "る。 新しいマッピングの開始アドレスは I<addr> で指定される。マッピングの長さ"
4844 "は I<length> 引き数で指定される。"
4845
4846 #.  Before Linux 2.6.24, the address was rounded up to the next page
4847 #.  boundary; since 2.6.24, it is rounded down!
4848 #. type: Plain text
4849 #: build/C/man2/mmap.2:77
4850 msgid ""
4851 "If I<addr> is NULL, then the kernel chooses the address at which to create "
4852 "the mapping; this is the most portable method of creating a new mapping.  If "
4853 "I<addr> is not NULL, then the kernel takes it as a hint about where to place "
4854 "the mapping; on Linux, the mapping will be created at a nearby page "
4855 "boundary.  The address of the new mapping is returned as the result of the "
4856 "call."
4857 msgstr ""
4858 "I<addr> が NULL の場合、カーネルがマッピングを作成するアドレスを選択する。 こ"
4859 "の方法は最も移植性のある新しいマッピングの作成方法である。 I<addr> が NULL で"
4860 "ない場合、カーネルはマッピングをどこに配置するかのヒントとして I<addr> を使用"
4861 "する。Linux では、マッピングはすぐ近くのページ境界に作成される。 新しいマッピ"
4862 "ングのアドレスは、呼び出しの返り値として返される。"
4863
4864 #. type: Plain text
4865 #: build/C/man2/mmap.2:89
4866 msgid ""
4867 "The contents of a file mapping (as opposed to an anonymous mapping; see "
4868 "B<MAP_ANONYMOUS> below), are initialized using I<length> bytes starting at "
4869 "offset I<offset> in the file (or other object) referred to by the file "
4870 "descriptor I<fd>.  I<offset> must be a multiple of the page size as returned "
4871 "by I<sysconf(_SC_PAGE_SIZE)>."
4872 msgstr ""
4873 "ファイルマッピングの内容は、 ファイルディスクリプタ I<fd> で参照されるファイ"
4874 "ル (もしくは他のオブジェクト) のオフセット I<offset> から開始される "
4875 "I<length> バイトのデータで初期化される (ファイルマッピングは無名マッピングの"
4876 "反対語である。 B<MAP_ANONYMOUS> を参照)。 I<offset> は I<sysconf"
4877 "(_SC_PAGE_SIZE)> が返すページサイズの倍数でなければならない。"
4878
4879 #. type: Plain text
4880 #: build/C/man2/mmap.2:97
4881 msgid ""
4882 "The I<prot> argument describes the desired memory protection of the mapping "
4883 "(and must not conflict with the open mode of the file).  It is either "
4884 "B<PROT_NONE> or the bitwise OR of one or more of the following flags:"
4885 msgstr ""
4886 "引き数 I<prot> には、マッピングのメモリ保護をどのように行なうかを指定する "
4887 "(ファイルのオープンモードと矛盾してはいけない)。 I<prot> には、 B<PROT_NONE> "
4888 "か、以下のフラグをひとつ以上ビット毎の論理和 (OR) をとったものを 指定できる。"
4889
4890 #. type: TP
4891 #: build/C/man2/mmap.2:97 build/C/man2/mprotect.2:73
4892 #, no-wrap
4893 msgid "B<PROT_EXEC>"
4894 msgstr "B<PROT_EXEC>"
4895
4896 #. type: Plain text
4897 #: build/C/man2/mmap.2:100
4898 msgid "Pages may be executed."
4899 msgstr "ページは実行可能である。"
4900
4901 #. type: TP
4902 #: build/C/man2/mmap.2:100 build/C/man2/mprotect.2:67
4903 #, no-wrap
4904 msgid "B<PROT_READ>"
4905 msgstr "B<PROT_READ>"
4906
4907 #. type: Plain text
4908 #: build/C/man2/mmap.2:103
4909 msgid "Pages may be read."
4910 msgstr "ページは読み込み可能である。"
4911
4912 #. type: TP
4913 #: build/C/man2/mmap.2:103 build/C/man2/mprotect.2:70
4914 #, no-wrap
4915 msgid "B<PROT_WRITE>"
4916 msgstr "B<PROT_WRITE>"
4917
4918 #. type: Plain text
4919 #: build/C/man2/mmap.2:106
4920 msgid "Pages may be written."
4921 msgstr "ページに書き込み可能である。"
4922
4923 #. type: TP
4924 #: build/C/man2/mmap.2:106 build/C/man2/mprotect.2:64
4925 #, no-wrap
4926 msgid "B<PROT_NONE>"
4927 msgstr "B<PROT_NONE>"
4928
4929 #. type: Plain text
4930 #: build/C/man2/mmap.2:109
4931 msgid "Pages may not be accessed."
4932 msgstr "ページにはアクセスできない。"
4933
4934 #. type: Plain text
4935 #: build/C/man2/mmap.2:118
4936 msgid ""
4937 "The I<flags> argument determines whether updates to the mapping are visible "
4938 "to other processes mapping the same region, and whether updates are carried "
4939 "through to the underlying file.  This behavior is determined by including "
4940 "exactly one of the following values in I<flags>:"
4941 msgstr ""
4942 "I<flags> 引き数により、マッピングに対する更新が同じ領域をマッピングしている "
4943 "他のプロセスに見えるか、更新がマッピング元のファイルを通じて 伝えられるか、が"
4944 "決定される。この動作は、以下の値のいずれか一つだけ (複数は指定できない) を "
4945 "I<flags> に含めることで指定する。"
4946
4947 #. type: TP
4948 #: build/C/man2/mmap.2:118
4949 #, no-wrap
4950 msgid "B<MAP_SHARED>"
4951 msgstr "B<MAP_SHARED>"
4952
4953 #. type: Plain text
4954 #: build/C/man2/mmap.2:128
4955 msgid ""
4956 "Share this mapping.  Updates to the mapping are visible to other processes "
4957 "that map this file, and are carried through to the underlying file.  The "
4958 "file may not actually be updated until B<msync>(2)  or B<munmap>()  is "
4959 "called."
4960 msgstr ""
4961 "このマッピングを共有する。 マッピングに対する更新はこのファイルをマッピングし"
4962 "ている他のプロセス から見える。更新はマッピング元のファイルを通じて伝えられ"
4963 "る。 ただし、ファイルの実際の更新は B<msync>(2)  または B<munmap>()  が呼ばれ"
4964 "るまで行われないこともある。"
4965
4966 #. type: TP
4967 #: build/C/man2/mmap.2:128
4968 #, no-wrap
4969 msgid "B<MAP_PRIVATE>"
4970 msgstr "B<MAP_PRIVATE>"
4971
4972 #. type: Plain text
4973 #: build/C/man2/mmap.2:137
4974 msgid ""
4975 "Create a private copy-on-write mapping.  Updates to the mapping are not "
4976 "visible to other processes mapping the same file, and are not carried "
4977 "through to the underlying file.  It is unspecified whether changes made to "
4978 "the file after the B<mmap>()  call are visible in the mapped region."
4979 msgstr ""
4980 "プライベートな copy-on-write (書き込み時コピー) マップを生成する。 マッピング"
4981 "に対する更新は同じファイルをマッピングしている他のプロセス には見えず、更新が"
4982 "マッピング元のファイルを通じて伝えられることもない。 B<mmap>()  の呼び出し後"
4983 "にマッピング元のファイルに対して行われた変更が、 マップ領域に反映されるかどう"
4984 "かは規定されていない。"
4985
4986 #. type: Plain text
4987 #: build/C/man2/mmap.2:139
4988 msgid "Both of these flags are described in POSIX.1-2001."
4989 msgstr "上記の二つのフラグは POSIX.1-2001 で規定されている。"
4990
4991 #. type: Plain text
4992 #: build/C/man2/mmap.2:142
4993 msgid ""
4994 "In addition, zero or more of the following values can be ORed in I<flags>:"
4995 msgstr ""
4996 "さらに、以下の値のうち 0 個以上をビット毎の論理和 (OR) で I<flags> に指定する"
4997 "ことができる。"
4998
4999 #. type: TP
5000 #: build/C/man2/mmap.2:142
5001 #, no-wrap
5002 msgid "B<MAP_32BIT> (since Linux 2.4.20, 2.6)"
5003 msgstr "B<MAP_32BIT> (Linux 2.4.20, 2.6 以降)"
5004
5005 #.  See http://lwn.net/Articles/294642 "Tangled up in threads", 19 Aug 08
5006 #. type: Plain text
5007 #: build/C/man2/mmap.2:158
5008 msgid ""
5009 "Put the mapping into the first 2 Gigabytes of the process address space.  "
5010 "This flag is only supported on x86-64, for 64-bit programs.  It was added to "
5011 "allow thread stacks to be allocated somewhere in the first 2GB of memory, so "
5012 "as to improve context-switch performance on some early 64-bit processors.  "
5013 "Modern x86-64 processors no longer have this performance problem, so use of "
5014 "this flag is not required on those systems.  The B<MAP_32BIT> flag is "
5015 "ignored when B<MAP_FIXED> is set."
5016 msgstr ""
5017 "マッピングをプロセスのアドレス空間の先頭 2 ギガバイト以内に配置する。 このフ"
5018 "ラグがサポートされているのは x86-64 アーキテクチャ上の 64 ビットプログラムの"
5019 "みである。 このフラグが追加されたのは、スレッドのスタックをメモリの先頭 2GB "
5020 "以内の どこかに割り当てることで、初期のいくつかの 64 ビットプロセッサにおけ"
5021 "る コンテキストスイッチの性能問題を改善するためである。 最近の x86-64 プロ"
5022 "セッサではこの性能問題はもはや存在せず、 そのようなシステムではこのフラグを使"
5023 "用する必要はない。 B<MAP_FIXED> がセットされている場合は、 B<MAP_32BIT> フラ"
5024 "グは無視される。"
5025
5026 #. type: TP
5027 #: build/C/man2/mmap.2:158
5028 #, no-wrap
5029 msgid "B<MAP_ANON>"
5030 msgstr "B<MAP_ANON>"
5031
5032 #. type: Plain text
5033 #: build/C/man2/mmap.2:163
5034 msgid "Synonym for B<MAP_ANONYMOUS>.  Deprecated."
5035 msgstr "B<MAP_ANONYMOUS> の同義語。非推奨。"
5036
5037 #. type: TP
5038 #: build/C/man2/mmap.2:163
5039 #, no-wrap
5040 msgid "B<MAP_ANONYMOUS>"
5041 msgstr "B<MAP_ANONYMOUS>"
5042
5043 #. type: Plain text
5044 #: build/C/man2/mmap.2:185
5045 msgid ""
5046 "The mapping is not backed by any file; its contents are initialized to "
5047 "zero.  The I<fd> and I<offset> arguments are ignored; however, some "
5048 "implementations require I<fd> to be -1 if B<MAP_ANONYMOUS> (or B<MAP_ANON>)  "
5049 "is specified, and portable applications should ensure this.  The use of "
5050 "B<MAP_ANONYMOUS> in conjunction with B<MAP_SHARED> is only supported on "
5051 "Linux since kernel 2.4."
5052 msgstr ""
5053 "マッピングはどのファイルとも関連付けされない。 マッピングの内容は 0 で初期化"
5054 "される。 引き数 I<fd> と I<offset> は無視される。 ただし、実装によっては "
5055 "B<MAP_ANONYMOUS> (もしくは B<MAP_ANON>)  が指定された場合、 I<fd> を -1 にす"
5056 "る必要があり、 移植性が必要なアプリケーションでは必ず I<fd> を -1 にすべきで"
5057 "ある。 B<MAP_ANONYMOUS> と B<MAP_SHARED> を組み合わせての利用は カーネル 2.4 "
5058 "以降の Linux でのみサポートされている。"
5059
5060 #. type: TP
5061 #: build/C/man2/mmap.2:185
5062 #, no-wrap
5063 msgid "B<MAP_DENYWRITE>"
5064 msgstr "B<MAP_DENYWRITE>"
5065
5066 #.  Introduced in 1.1.36, removed in 1.3.24.
5067 #. type: Plain text
5068 #: build/C/man2/mmap.2:193
5069 msgid ""
5070 "This flag is ignored.  (Long ago, it signaled that attempts to write to the "
5071 "underlying file should fail with B<ETXTBUSY>.  But this was a source of "
5072 "denial-of-service attacks.)"
5073 msgstr ""
5074 "このフラグは無視される (ずっと前は、マップ元のファイルへの書き込みを行おうと"
5075 "すると、エラー B<ETXTBUSY> で失敗するようにシグナルが設定されていたが、これ"
5076 "は denial-of-service (サービス拒否) 攻撃の原因となった)。"
5077
5078 #. type: TP
5079 #: build/C/man2/mmap.2:193
5080 #, no-wrap
5081 msgid "B<MAP_EXECUTABLE>"
5082 msgstr "B<MAP_EXECUTABLE>"
5083
5084 #.  Introduced in 1.1.38, removed in 1.3.24. Flag tested in proc_follow_link.
5085 #.  (Long ago, it signaled that the underlying file is an executable.
5086 #.  However, that information was not really used anywhere.)
5087 #.  Linus talked about DOS related to MAP_EXECUTABLE, but he was thinking of
5088 #.  MAP_DENYWRITE?
5089 #. type: Plain text
5090 #: build/C/man2/mmap.2:201
5091 msgid "This flag is ignored."
5092 msgstr "このフラグは無視される。"
5093
5094 #. type: TP
5095 #: build/C/man2/mmap.2:201
5096 #, no-wrap
5097 msgid "B<MAP_FILE>"
5098 msgstr "B<MAP_FILE>"
5099
5100 #.  On some systems, this was required as the opposite of
5101 #.  MAP_ANONYMOUS -- mtk, 1 May 2007
5102 #. type: Plain text
5103 #: build/C/man2/mmap.2:207
5104 msgid "Compatibility flag.  Ignored."
5105 msgstr "互換性のためのフラグ。無視される。"
5106
5107 #. type: TP
5108 #: build/C/man2/mmap.2:207
5109 #, no-wrap
5110 msgid "B<MAP_FIXED>"
5111 msgstr "B<MAP_FIXED>"
5112
5113 #. type: Plain text
5114 #: build/C/man2/mmap.2:225
5115 msgid ""
5116 "Don't interpret I<addr> as a hint: place the mapping at exactly that "
5117 "address.  I<addr> must be a multiple of the page size.  If the memory region "
5118 "specified by I<addr> and I<len> overlaps pages of any existing mapping(s), "
5119 "then the overlapped part of the existing mapping(s) will be discarded.  If "
5120 "the specified address cannot be used, B<mmap>()  will fail.  Because "
5121 "requiring a fixed address for a mapping is less portable, the use of this "
5122 "option is discouraged."
5123 msgstr ""
5124 "I<addr> をアドレスのヒントとして使用するのではなく、 I<addr> で指定されたアド"
5125 "レスをそのまま使用してマッピングを配置する。 I<addr> はページサイズの倍数でな"
5126 "ければならない。 I<addr> と I<len> で指定されたメモリ領域が既存のマッピングの"
5127 "ページと重なる場合、 既存のマッピングの重なった部分は捨てられる。 もし指定さ"
5128 "れたアドレスが使用できない場合、 B<mmap>()  は失敗する。 マッピングに対して固"
5129 "定アドレスを要求するのは移植性の面で劣るので、 このオプションは使用しないこと"
5130 "を推奨する。"
5131
5132 #. type: TP
5133 #: build/C/man2/mmap.2:225
5134 #, no-wrap
5135 msgid "B<MAP_GROWSDOWN>"
5136 msgstr "B<MAP_GROWSDOWN>"
5137
5138 #. type: Plain text
5139 #: build/C/man2/mmap.2:230
5140 msgid ""
5141 "Used for stacks.  Indicates to the kernel virtual memory system that the "
5142 "mapping should extend downward in memory."
5143 msgstr ""
5144 "スタック用に使用される。マッピングをメモリ内で逆向きに行うことを カーネル仮想"
5145 "メモリシステムに指示する。 (訳注:マッピングは通常はメモリ・アドレスが増加す"
5146 "る向きに行うが、 このオプションを指定すると逆向きにマッピングを行う)"
5147
5148 #. type: TP
5149 #: build/C/man2/mmap.2:230
5150 #, no-wrap
5151 msgid "B<MAP_HUGETLB> (since Linux 2.6.32)"
5152 msgstr "B<MAP_HUGETLB> (Linux 2.6.32 以降)"
5153
5154 #. type: Plain text
5155 #: build/C/man2/mmap.2:236
5156 #, fuzzy
5157 #| msgid ""
5158 #| "Allocate the mapping using \"huge pages.\" See the kernel source file "
5159 #| "I<Documentation/vm/hugetlbpage.txt> for further information."
5160 msgid ""
5161 "Allocate the mapping using \"huge pages.\" See the Linux kernel source file "
5162 "I<Documentation/vm/hugetlbpage.txt> for further information."
5163 msgstr ""
5164 "\"huge page\" を使ってマッピングを割り当てる。 詳しい情報は、カーネル・ソース"
5165 "の I<Documentation/vm/hugetlbpage.txt> を参照。"
5166
5167 #. type: TP
5168 #: build/C/man2/mmap.2:236
5169 #, no-wrap
5170 msgid "B<MAP_LOCKED> (since Linux 2.5.37)"
5171 msgstr "B<MAP_LOCKED> (Linux 2.5.37 以降)"
5172
5173 #.  If set, the mapped pages will not be swapped out.
5174 #. type: Plain text
5175 #: build/C/man2/mmap.2:242
5176 msgid ""
5177 "Lock the pages of the mapped region into memory in the manner of B<mlock>"
5178 "(2).  This flag is ignored in older kernels."
5179 msgstr ""
5180 "マップされた領域のページを B<mlock>(2)  の方法でメモリ内にロックする。 それ以"
5181 "前のカーネルでは、このフラグは無視される。"
5182
5183 #. type: TP
5184 #: build/C/man2/mmap.2:242
5185 #, no-wrap
5186 msgid "B<MAP_NONBLOCK> (since Linux 2.5.46)"
5187 msgstr "B<MAP_NONBLOCK> (Linux 2.5.46 以降)"
5188
5189 #. type: Plain text
5190 #: build/C/man2/mmap.2:257
5191 msgid ""
5192 "Only meaningful in conjunction with B<MAP_POPULATE>.  Don't perform read-"
5193 "ahead: only create page tables entries for pages that are already present in "
5194 "RAM.  Since Linux 2.6.23, this flag causes B<MAP_POPULATE> to do nothing.  "
5195 "One day the combination of B<MAP_POPULATE> and B<MAP_NONBLOCK> may be "
5196 "reimplemented."
5197 msgstr ""
5198 "B<MAP_POPULATE> と組み合わせた場合のみ意味を持つ。 read-ahead (前もって読み込"
5199 "むこと) を実行しない。 単に、すでに RAM 上に存在するページに対して ページテー"
5200 "ブルエントリを作成するだけである。 Linux 2.6.23 以降では、このフラグは "
5201 "B<MAP_POPULATE> に何の影響も与えない。 いつか B<MAP_POPULATE> と "
5202 "B<MAP_NONBLOCK> を組み合わせた場合の動作は実装し直されるかもしれない。"
5203
5204 #. type: TP
5205 #: build/C/man2/mmap.2:257
5206 #, no-wrap
5207 msgid "B<MAP_NORESERVE>"
5208 msgstr "B<MAP_NORESERVE>"
5209
5210 #. type: Plain text
5211 #: build/C/man2/mmap.2:272
5212 msgid ""
5213 "Do not reserve swap space for this mapping.  When swap space is reserved, "
5214 "one has the guarantee that it is possible to modify the mapping.  When swap "
5215 "space is not reserved one might get B<SIGSEGV> upon a write if no physical "
5216 "memory is available.  See also the discussion of the file I</proc/sys/vm/"
5217 "overcommit_memory> in B<proc>(5).  In kernels before 2.6, this flag only had "
5218 "effect for private writable mappings."
5219 msgstr ""
5220 "このマッピングに対するスワップ空間の予約を行わない。 スワップ空間を予約した場"
5221 "合は、このマッピングの変更が必ず可能なことが 保証される。予約を行わなかった場"
5222 "合、物理メモリに空きがないと 書き込み時に B<SIGSEGV> エラーを受け取ることがあ"
5223 "る。 B<proc>(5)  の I</proc/sys/vm/overcommit_memory> ファイルについての議論"
5224 "も参照。 バージョン 2.6 より前のカーネルでは、このフラグは書き込み可能な プラ"
5225 "イベート・マッピングについてのみ効果があった。"
5226
5227 #. type: TP
5228 #: build/C/man2/mmap.2:272
5229 #, no-wrap
5230 msgid "B<MAP_POPULATE> (since Linux 2.5.46)"
5231 msgstr "B<MAP_POPULATE> (Linux 2.5.46 以降)"
5232
5233 #. type: Plain text
5234 #: build/C/man2/mmap.2:279
5235 msgid ""
5236 "Populate (prefault) page tables for a mapping.  For a file mapping, this "
5237 "causes read-ahead on the file.  Later accesses to the mapping will not be "
5238 "blocked by page faults.  B<MAP_POPULATE> is only supported for private "
5239 "mappings since Linux 2.6.23."
5240 msgstr ""
5241 "マッピング用のページテーブルを配置 (populate) する ファイルマッピングの場合に"
5242 "は、これによりファイルが先読み (read-ahead)  が行われる。この以後は、マッピン"
5243 "グに対するアクセスがページフォールトで ブロックされることがなくなる。 "
5244 "B<MAP_POPULATE> は Linux 2.6.23 以降でプライベート・マッピングについてのみ サ"
5245 "ポートされている。"
5246
5247 #. type: TP
5248 #: build/C/man2/mmap.2:279
5249 #, no-wrap
5250 msgid "B<MAP_STACK> (since Linux 2.6.27)"
5251 msgstr "B<MAP_STACK> (Linux 2.6.27 以降)"
5252
5253 #.  See http://lwn.net/Articles/294642 "Tangled up in threads", 19 Aug 08
5254 #.  commit cd98a04a59e2f94fa64d5bf1e26498d27427d5e7
5255 #.  http://thread.gmane.org/gmane.linux.kernel/720412
5256 #.  "pthread_create() slow for many threads; also time to revisit 64b
5257 #.   context switch optimization?"
5258 #. type: Plain text
5259 #: build/C/man2/mmap.2:292
5260 msgid ""
5261 "Allocate the mapping at an address suitable for a process or thread stack.  "
5262 "This flag is currently a no-op, but is used in the glibc threading "
5263 "implementation so that if some architectures require special treatment for "
5264 "stack allocations, support can later be transparently implemented for glibc."
5265 msgstr ""
5266 "プロセスやスレッドのスタックに適したアドレスにマッピングを割り当てる。 現在の"
5267 "ところ、このフラグは何もしないが、 glibc のスレッド実装では使用されている。 "
5268 "これは、いくつかのアーキテクチャではスタックの割り当てに関して特別な扱い が必"
5269 "要な場合に、glibc にそのサポートを後で透過的に実装できるようにする ためであ"
5270 "る。"
5271
5272 #. type: TP
5273 #: build/C/man2/mmap.2:292
5274 #, no-wrap
5275 msgid "B<MAP_UNINITIALIZED> (since Linux 2.6.33)"
5276 msgstr "B<MAP_UNINITIALIZED> (Linux 2.6.33 以降)"
5277
5278 #. type: Plain text
5279 #: build/C/man2/mmap.2:302
5280 msgid ""
5281 "Don't clear anonymous pages.  This flag is intended to improve performance "
5282 "on embedded devices.  This flag is only honored if the kernel was configured "
5283 "with the B<CONFIG_MMAP_ALLOW_UNINITIALIZED> option.  Because of the security "
5284 "implications, that option is normally enabled only on embedded devices (i."
5285 "e., devices where one has complete control of the contents of user memory)."
5286 msgstr ""
5287 "無名ページ (anonymous page) のクリアを行わない。このフラグは組み込みデバイ"
5288 "ス\n"
5289 "での性能向上を目的に作られてものである。カーネルの設定で\n"
5290 "B<CONFIG_MMAP_ALLOW_UNINITIALIZED> オプションが有効になっている場合のみ、\n"
5291 "このフラグは効果を持つ。\n"
5292 "セキュリティ面の考慮から、このオプションは通常組み込みデバイス (すなわち、\n"
5293 "ユーザメモリの内容を完全に制御化におけるデバイス) においてのみ有効にされる。"
5294
5295 #. type: Plain text
5296 #: build/C/man2/mmap.2:310
5297 msgid ""
5298 "Of the above flags, only B<MAP_FIXED> is specified in POSIX.1-2001.  "
5299 "However, most systems also support B<MAP_ANONYMOUS> (or its synonym "
5300 "B<MAP_ANON>)."
5301 msgstr ""
5302 "上記のフラグの中では、 B<MAP_FIXED> だけが POSIX.1-2001 で規定されている。 し"
5303 "かしながら、ほとんどのシステムで B<MAP_ANONYMOUS> (またはその同義語である "
5304 "B<MAP_ANON>)  もサポートされている。"
5305
5306 #. type: Plain text
5307 #: build/C/man2/mmap.2:317
5308 msgid ""
5309 "Some systems document the additional flags B<MAP_AUTOGROW>, "
5310 "B<MAP_AUTORESRV>, B<MAP_COPY>, and B<MAP_LOCAL>."
5311 msgstr ""
5312 "いくつかのシステムでは、上記以外にフラグとして B<MAP_AUTOGROW>, "
5313 "B<MAP_AUTORESRV>, B<MAP_COPY>, B<MAP_LOCAL> が規定されている。"
5314
5315 #. type: Plain text
5316 #: build/C/man2/mmap.2:323
5317 msgid ""
5318 "Memory mapped by B<mmap>()  is preserved across B<fork>(2), with the same "
5319 "attributes."
5320 msgstr ""
5321 "B<mmap>()  によってマップされたメモリの属性は B<fork>(2)  の際に継承される。"
5322
5323 #. type: Plain text
5324 #: build/C/man2/mmap.2:331
5325 msgid ""
5326 "A file is mapped in multiples of the page size.  For a file that is not a "
5327 "multiple of the page size, the remaining memory is zeroed when mapped, and "
5328 "writes to that region are not written out to the file.  The effect of "
5329 "changing the size of the underlying file of a mapping on the pages that "
5330 "correspond to added or removed regions of the file is unspecified."
5331 msgstr ""
5332 "ファイルはページサイズの整数倍の領域にマップされる。サイズがページサイズの 整"
5333 "数倍でないファイルの場合、マップ時に残りの領域は 0 で埋められ、この領域へ 書"
5334 "きこみを行ってもファイルに書き出されることはない。マッピングを行った元 ファイ"
5335 "ルのサイズを変更した場合、元ファイルの追加されたり削除された領域に対応 する"
5336 "マップされたページに対してどのような影響があるかは規定されていない。"
5337
5338 #. type: SS
5339 #: build/C/man2/mmap.2:331
5340 #, no-wrap
5341 msgid "munmap()"
5342 msgstr "munmap()"
5343
5344 #. type: Plain text
5345 #: build/C/man2/mmap.2:341
5346 msgid ""
5347 "The B<munmap>()  system call deletes the mappings for the specified address "
5348 "range, and causes further references to addresses within the range to "
5349 "generate invalid memory references.  The region is also automatically "
5350 "unmapped when the process is terminated.  On the other hand, closing the "
5351 "file descriptor does not unmap the region."
5352 msgstr ""
5353 "システムコール B<munmap>()  は指定されたアドレス範囲のマップを消去し、 これ以"
5354 "降のその範囲内へのメモリ参照は不正となる。 この領域は、プロセスが終了したとき"
5355 "にも自動的にアンマップされる。 一方、ファイル記述子をクローズしても、この領域"
5356 "はアンマップされない。"
5357
5358 #. type: Plain text
5359 #: build/C/man2/mmap.2:351
5360 msgid ""
5361 "The address I<addr> must be a multiple of the page size.  All pages "
5362 "containing a part of the indicated range are unmapped, and subsequent "
5363 "references to these pages will generate B<SIGSEGV>.  It is not an error if "
5364 "the indicated range does not contain any mapped pages."
5365 msgstr ""
5366 "I<addr> アドレスはページサイズの整数倍でなければならない。指定された範囲の一"
5367 "部分を 含む全てのページはアンマップされ、これ以降にこれらのページへの参照があ"
5368 "ると B<SIGSEGV> が発生する。 指定した範囲内にマップされたページが一つも含まれ"
5369 "ていない場合でも エラーにならない。"
5370
5371 #. type: SS
5372 #: build/C/man2/mmap.2:351
5373 #, no-wrap
5374 msgid "Timestamps changes for file-backed mappings"
5375 msgstr "ファイルと関連付けられたマッピングに対するタイムスタンプの更新"
5376
5377 #. type: Plain text
5378 #: build/C/man2/mmap.2:358
5379 msgid ""
5380 "For file-backed mappings, the I<st_atime> field for the mapped file may be "
5381 "updated at any time between the B<mmap>()  and the corresponding unmapping; "
5382 "the first reference to a mapped page will update the field if it has not "
5383 "been already."
5384 msgstr ""
5385 "ファイルと関連付けられたマッピングの場合、マッピングされたファイルの "
5386 "I<st_atime> フィールドは、 B<mmap>()  されてからアンマップ (unmap) されるまで"
5387 "の間に更新されることがある。 それまでに更新が行われていなければ、マップされた"
5388 "ページへの最初の参照があった 際に更新される。"
5389
5390 #. type: Plain text
5391 #: build/C/man2/mmap.2:375
5392 msgid ""
5393 "The I<st_ctime> and I<st_mtime> field for a file mapped with B<PROT_WRITE> "
5394 "and B<MAP_SHARED> will be updated after a write to the mapped region, and "
5395 "before a subsequent B<msync>(2)  with the B<MS_SYNC> or B<MS_ASYNC> flag, if "
5396 "one occurs."
5397 msgstr ""
5398 "B<PROT_WRITE> と B<MAP_SHARED> の両方を指定してマップされたファイルの場合、書"
5399 "き込みがあると、 I<st_ctime> と I<st_mtime> の両フィールドは、マップされた領"
5400 "域への書き込みより後で、 B<MS_SYNC> または B<MS_ASYNC> フラグを指定して "
5401 "B<msync>(2)  が呼ばれる前までに更新される。"
5402
5403 #. type: Plain text
5404 #: build/C/man2/mmap.2:392
5405 msgid ""
5406 "On success, B<mmap>()  returns a pointer to the mapped area.  On error, the "
5407 "value B<MAP_FAILED> (that is, I<(void\\ *)\\ -1>)  is returned, and I<errno> "
5408 "is set appropriately.  On success, B<munmap>()  returns 0, on failure -1, "
5409 "and I<errno> is set (probably to B<EINVAL>)."
5410 msgstr ""
5411 "B<mmap>()  は成功するとマップされた領域へのポインタを返す。 失敗すると値 "
5412 "B<MAP_FAILED> (つまり I<(void\\ *)\\ -1>)  を返し、 I<errno> がエラーの内容に"
5413 "したがってセットされる。 B<munmap>()  は成功すると 0 を返す。失敗すると -1 を"
5414 "返し、 I<errno> がセットされる (多くの場合 B<EINVAL> になるだろう)。"
5415
5416 #. type: TP
5417 #: build/C/man2/mmap.2:393 build/C/man2/mprotect.2:86
5418 #: build/C/man3/shm_open.3:185 build/C/man3/shm_open.3:190
5419 #: build/C/man2/shmctl.2:297 build/C/man2/shmget.2:188
5420 #: build/C/man2/shmop.2:191
5421 #, no-wrap
5422 msgid "B<EACCES>"
5423 msgstr "B<EACCES>"
5424
5425 #. type: Plain text
5426 #: build/C/man2/mmap.2:413
5427 msgid ""
5428 "A file descriptor refers to a non-regular file.  Or B<MAP_PRIVATE> was "
5429 "requested, but I<fd> is not open for reading.  Or B<MAP_SHARED> was "
5430 "requested and B<PROT_WRITE> is set, but I<fd> is not open in read/write "
5431 "(B<O_RDWR>)  mode.  Or B<PROT_WRITE> is set, but the file is append-only."
5432 msgstr ""
5433 "以下のいずれかの場合。 ファイル記述子の参照先が通常のファイルではない (non-"
5434 "regular file) 。 B<MAP_PRIVATE> を要求したが I<fd> は読み込み用にオープンされ"
5435 "ていない。 B<MAP_SHARED> を要求して B<PROT_WRITE> をセットしたが I<fd> は読み"
5436 "書きモード (B<O_RDWR>)  でオープンされていない、 B<PROT_WRITE> をセットした"
5437 "が、ファイルは追加 (append) 専用である。"
5438
5439 #. type: Plain text
5440 #: build/C/man2/mmap.2:417
5441 msgid ""
5442 "The file has been locked, or too much memory has been locked (see "
5443 "B<setrlimit>(2))."
5444 msgstr ""
5445 "ファイルがロックされている。またはロックされているメモリが多すぎる "
5446 "(B<setrlimit>(2)  を参照)。"
5447
5448 #. type: Plain text
5449 #: build/C/man2/mmap.2:423
5450 msgid ""
5451 "I<fd> is not a valid file descriptor (and B<MAP_ANONYMOUS> was not set)."
5452 msgstr ""
5453 "I<fd> が有効なファイル記述子 (file descriptor) ではない (かつ "
5454 "B<MAP_ANONYMOUS> がセットされていない)。"
5455
5456 #. type: Plain text
5457 #: build/C/man2/mmap.2:431
5458 msgid ""
5459 "We don't like I<addr>, I<length>, or I<offset> (e.g., they are too large, or "
5460 "not aligned on a page boundary)."
5461 msgstr ""
5462 "I<addr> か I<length> か I<offset> が適切でない (例えば、大きすぎるとか、ペー"
5463 "ジ境界にアラインメントされていない)。"
5464
5465 #. type: Plain text
5466 #: build/C/man2/mmap.2:436
5467 msgid "(since Linux 2.6.12)  I<length> was 0."
5468 msgstr "(Linux 2.6.12 以降)  I<length> が 0 であった。"
5469
5470 #. type: Plain text
5471 #: build/C/man2/mmap.2:444
5472 msgid ""
5473 "I<flags> contained neither B<MAP_PRIVATE> or B<MAP_SHARED>, or contained "
5474 "both of these values."
5475 msgstr ""
5476 "I<flags> に B<MAP_PRIVATE> と B<MAP_SHARED> のどちらも含まれていなかった、も"
5477 "しくは その両方が含まれていた。"
5478
5479 #. type: TP
5480 #: build/C/man2/mmap.2:444 build/C/man3/shm_open.3:227
5481 #: build/C/man2/shmget.2:204
5482 #, no-wrap
5483 msgid "B<ENFILE>"
5484 msgstr "B<ENFILE>"
5485
5486 #.  [2.6.7] shmem_zero_setup()-->shmem_file_setup()-->get_empty_filp()
5487 #. type: Plain text
5488 #: build/C/man2/mmap.2:452 build/C/man2/shmget.2:208
5489 msgid "The system limit on the total number of open files has been reached."
5490 msgstr "システム全体でオープンされているファイルの総数が上限に達した。"
5491
5492 #. type: Plain text
5493 #: build/C/man2/mmap.2:456
5494 msgid ""
5495 "The underlying file system of the specified file does not support memory "
5496 "mapping."
5497 msgstr ""
5498 "指定されたファイルが置かれているファイルシステムがメモリマッピングをサポート "
5499 "していない。"
5500
5501 #. type: Plain text
5502 #: build/C/man2/mmap.2:460
5503 msgid ""
5504 "No memory is available, or the process's maximum number of mappings would "
5505 "have been exceeded."
5506 msgstr ""
5507 "メモリに空きがない、または処理中のプロセスのマッピング数が最大数を超過した。"
5508
5509 #.  (Since 2.4.25 / 2.6.0.)
5510 #. type: Plain text
5511 #: build/C/man2/mmap.2:469
5512 msgid ""
5513 "The I<prot> argument asks for B<PROT_EXEC> but the mapped area belongs to a "
5514 "file on a file system that was mounted no-exec."
5515 msgstr ""
5516 "I<prot> 引き数は B<PROT_EXEC> を行うように指定されているが、 no-exec でマウン"
5517 "トされたファイルシステム上のファイルに マップ領域が対応している。"
5518
5519 #. type: TP
5520 #: build/C/man2/mmap.2:469
5521 #, no-wrap
5522 msgid "B<ETXTBSY>"
5523 msgstr "B<ETXTBSY>"
5524
5525 #. type: Plain text
5526 #: build/C/man2/mmap.2:475
5527 msgid ""
5528 "B<MAP_DENYWRITE> was set but the object specified by I<fd> is open for "
5529 "writing."
5530 msgstr ""
5531 "B<MAP_DENYWRITE> がセットされているが I<fd> で指定されているオブジェクトは書"
5532 "き込み用に開かれている。"
5533
5534 #. type: TP
5535 #: build/C/man2/mmap.2:475 build/C/man2/shmctl.2:339
5536 #, no-wrap
5537 msgid "B<EOVERFLOW>"
5538 msgstr "B<EOVERFLOW>"
5539
5540 #. type: Plain text
5541 #: build/C/man2/mmap.2:487
5542 msgid ""
5543 "On 32-bit architecture together with the large file extension (i.e., using "
5544 "64-bit I<off_t>): the number of pages used for I<length> plus number of "
5545 "pages used for I<offset> would overflow I<unsigned long> (32 bits)."
5546 msgstr ""
5547
5548 #. type: Plain text
5549 #: build/C/man2/mmap.2:489
5550 msgid "Use of a mapped region can result in these signals:"
5551 msgstr "マップ領域を利用する際に、以下のシグナルが発生することがある:"
5552
5553 #. type: TP
5554 #: build/C/man2/mmap.2:489
5555 #, no-wrap
5556 msgid "B<SIGSEGV>"
5557 msgstr "B<SIGSEGV>"
5558
5559 #. type: Plain text
5560 #: build/C/man2/mmap.2:492
5561 msgid "Attempted write into a region mapped as read-only."
5562 msgstr "読み込み専用で mmap された領域へ書き込みを行おうとした。"
5563
5564 #. type: TP
5565 #: build/C/man2/mmap.2:492
5566 #, no-wrap
5567 msgid "B<SIGBUS>"
5568 msgstr "B<SIGBUS>"
5569
5570 #. type: Plain text
5571 #: build/C/man2/mmap.2:497
5572 msgid ""
5573 "Attempted access to a portion of the buffer that does not correspond to the "
5574 "file (for example, beyond the end of the file, including the case where "
5575 "another process has truncated the file)."
5576 msgstr ""
5577 "バッファのうち、ファイルに関連づけられていない部分 (例えばファイル末尾を越え"
5578 "た部分など。これには 他のプロセスがファイルを切り詰めた場合なども含まれる)  "
5579 "にアクセスしようとした。"
5580
5581 #.  SVr4 documents additional error codes ENXIO and ENODEV.
5582 #.  SUSv2 documents additional error codes EMFILE and EOVERFLOW.
5583 #. type: Plain text
5584 #: build/C/man2/mmap.2:501
5585 msgid "SVr4, 4.4BSD, POSIX.1-2001."
5586 msgstr "SVr4, 4.4BSD, POSIX.1-2001."
5587
5588 #.  POSIX.1-2001: It shall be defined to -1 or 0 or 200112L.
5589 #.  -1: unavailable, 0: ask using sysconf().
5590 #.  glibc defines it to 1.
5591 #. type: Plain text
5592 #: build/C/man2/mmap.2:515
5593 msgid ""
5594 "On POSIX systems on which B<mmap>(), B<msync>(2)  and B<munmap>()  are "
5595 "available, B<_POSIX_MAPPED_FILES> is defined in I<E<lt>unistd.hE<gt>> to a "
5596 "value greater than 0.  (See also B<sysconf>(3).)"
5597 msgstr ""
5598 "B<mmap>(), B<msync>(2)  B<munmap>()  が利用可能な POSIX システムでは、 "
5599 "B<_POSIX_MAPPED_FILES> は E<lt>unistd.hE<gt> で 0 より大きな値に定義される "
5600 "(B<sysconf>(3)  も参照のこと)。"
5601
5602 #.  Since around glibc 2.1/2.2, depending on the platform.
5603 #. type: Plain text
5604 #: build/C/man2/mmap.2:530
5605 msgid ""
5606 "This page describes the interface provided by the glibc B<mmap>()  wrapper "
5607 "function.  Originally, this function invoked a system call of the same "
5608 "name.  Since kernel 2.4, that system call has been superseded by B<mmap2>"
5609 "(2), and nowadays the glibc B<mmap>()  wrapper function invokes B<mmap2>(2)  "
5610 "with a suitably adjusted value for I<offset>."
5611 msgstr ""
5612 "このページでは glibc の B<mmap>() のラッパー関数が提供するインターフェース"
5613 "に\n"
5614 "ついて説明している。元々は、この関数は同じ名前のシステムコールを起動してい"
5615 "た。\n"
5616 "カーネル 2.4 以降、このシステムコールは B<mmap2>(2) に取って代わられ、現在\n"
5617 "では、 glibc の B<mmap>() のラッパー関数は I<offset> を適切に調整してから\n"
5618 "B<mmap2>(2) を起動する。"
5619
5620 #. type: Plain text
5621 #: build/C/man2/mmap.2:543
5622 msgid ""
5623 "On some hardware architectures (e.g., i386), B<PROT_WRITE> implies "
5624 "B<PROT_READ>.  It is architecture dependent whether B<PROT_READ> implies "
5625 "B<PROT_EXEC> or not.  Portable programs should always set B<PROT_EXEC> if "
5626 "they intend to execute code in the new mapping."
5627 msgstr ""
5628 "(i386 などの) いくつかのアーキテクチャでは、 B<PROT_WRITE> をセットすると、暗"
5629 "黙のうちに B<PROT_READ> がセットされる。 B<PROT_READ> をセットした際に暗黙の"
5630 "うちに B<PROT_EXEC> がセットされるかどうかは、アーキテクチャ依存である。 移植"
5631 "性を考慮したプログラムでは、 新規にマップした領域でコードを実行したい場合は、"
5632 "常に B<PROT_EXEC> をセットすべきである。"
5633
5634 #. type: Plain text
5635 #: build/C/man2/mmap.2:558
5636 msgid ""
5637 "The portable way to create a mapping is to specify I<addr> as 0 (NULL), and "
5638 "omit B<MAP_FIXED> from I<flags>.  In this case, the system chooses the "
5639 "address for the mapping; the address is chosen so as not to conflict with "
5640 "any existing mapping, and will not be 0.  If the B<MAP_FIXED> flag is "
5641 "specified, and I<addr> is 0 (NULL), then the mapped address will be 0 (NULL)."
5642 msgstr ""
5643 "マッピングを作成する移植性のある方法は、 I<addr> に 0 (NULL) を指定し、 "
5644 "I<flags> から B<MAP_FIXED> を外すことである。 この場合、システムがマッピング"
5645 "用のアドレスの選択を行う。 アドレスは既存のマッピングと衝突しないように、 か"
5646 "つ 0 にならないように選択される。 B<MAP_FIXED> フラグが指定され、かつ "
5647 "I<addr> が 0 (NULL)  の場合には、マップされるアドレスが 0 (NULL) になる。"
5648
5649 #. type: Plain text
5650 #: build/C/man2/mmap.2:587
5651 msgid ""
5652 "Certain I<flags> constants are defined only if either B<_BSD_SOURCE> or "
5653 "B<_SVID_SOURCE> is defined.  (Requiring B<_GNU_SOURCE> also suffices, and "
5654 "requiring that macro specifically would have been more logical, since these "
5655 "flags are all Linux specific.)  The relevant flags are: B<MAP_32BIT>, "
5656 "B<MAP_ANONYMOUS> (and the synonym B<MAP_ANON>), B<MAP_DENYWRITE>, "
5657 "B<MAP_EXECUTABLE>, B<MAP_FILE>, B<MAP_GROWSDOWN>, B<MAP_HUGETLB>, "
5658 "B<MAP_LOCKED>, B<MAP_NONBLOCK>, B<MAP_NORESERVE>, B<MAP_POPULATE>, and "
5659 "B<MAP_STACK>."
5660 msgstr ""
5661
5662 #. type: Plain text
5663 #: build/C/man2/mmap.2:592
5664 msgid ""
5665 "On Linux there are no guarantees like those suggested above under "
5666 "B<MAP_NORESERVE>.  By default, any process can be killed at any moment when "
5667 "the system runs out of memory."
5668 msgstr ""
5669 "Linux においては、上記の B<MAP_NORESERVE> で述べられているような保証はない。 "
5670 "デフォルトでは、システムがメモリを使い切った場合には、 どのプロセスがいつ強制"
5671 "終了されるか分からないからである。"
5672
5673 #. type: Plain text
5674 #: build/C/man2/mmap.2:599
5675 msgid ""
5676 "In kernels before 2.6.7, the B<MAP_POPULATE> flag only has effect if I<prot> "
5677 "is specified as B<PROT_NONE>."
5678 msgstr ""
5679 "2.6.7 より前のカーネルでは、 I<prot> に B<PROT_NONE> が指定された場合にの"
5680 "み、 B<MAP_POPULATE> フラグが効力を持つ。"
5681
5682 #. type: Plain text
5683 #: build/C/man2/mmap.2:614
5684 msgid ""
5685 "SUSv3 specifies that B<mmap>()  should fail if I<length> is 0.  However, in "
5686 "kernels before 2.6.12, B<mmap>()  succeeded in this case: no mapping was "
5687 "created and the call returned I<addr>.  Since kernel 2.6.12, B<mmap>()  "
5688 "fails with the error B<EINVAL> for this case."
5689 msgstr ""
5690 "SUSv3 では、 I<length> が 0 の場合、 B<mmap>()  は失敗すると規定されている。"
5691 "しかしながら、2.6.12 より前のカーネルでは、 この場合に B<mmap>()  は成功して"
5692 "いた (マッピングは作成されず、 I<addr> が返されていた)。 カーネル 2.6.12 以降"
5693 "では、 B<mmap>()  はエラー B<EINVAL> で失敗する。"
5694
5695 #. type: Plain text
5696 #: build/C/man2/mmap.2:630
5697 msgid ""
5698 "POSIX specifies that the system shall always zero fill any partial page at "
5699 "the end of the object and that system will never write any modification of "
5700 "the object beyond its end.  On Linux, when you write data to such partial "
5701 "page after the end of the object, the data stays in the page cache even "
5702 "after the file is closed and unmapped and even though the data is never "
5703 "written to the file itself, subsequent mappings may see the modified "
5704 "content.  In some cases, this could be fixed by calling B<msync>(2)  before "
5705 "the unmap takes place; however, this doesn't work on tmpfs (for example, "
5706 "when using POSIX shared memory interface documented in B<shm_overview>(7))."
5707 msgstr ""
5708
5709 #. type: Plain text
5710 #: build/C/man2/mmap.2:642
5711 msgid ""
5712 "The following program prints part of the file specified in its first command-"
5713 "line argument to standard output.  The range of bytes to be printed is "
5714 "specified via offset and length values in the second and third command-line "
5715 "arguments.  The program creates a memory mapping of the required pages of "
5716 "the file and then uses B<write>(2)  to output the desired bytes."
5717 msgstr ""
5718 "以下のプログラムは、一番目のコマンドライン引き数で指定された ファイルの一部を"
5719 "標準出力に表示する。 表示する範囲は、二番目、三番目のコマンドライン引き数で渡"
5720 "される オフセットと長さで指定される。 このプログラムは、指定されたファイルの"
5721 "必要なページのメモリ・ マッピングを作成し、 B<write>(2)  を使って所望のバイト"
5722 "を出力する。"
5723
5724 #. type: Plain text
5725 #: build/C/man2/mmap.2:650
5726 #, no-wrap
5727 msgid ""
5728 "#include E<lt>sys/mman.hE<gt>\n"
5729 "#include E<lt>sys/stat.hE<gt>\n"
5730 "#include E<lt>fcntl.hE<gt>\n"
5731 "#include E<lt>stdio.hE<gt>\n"
5732 "#include E<lt>stdlib.hE<gt>\n"
5733 "#include E<lt>unistd.hE<gt>\n"
5734 msgstr ""
5735 "#include E<lt>sys/mman.hE<gt>\n"
5736 "#include E<lt>sys/stat.hE<gt>\n"
5737 "#include E<lt>fcntl.hE<gt>\n"
5738 "#include E<lt>stdio.hE<gt>\n"
5739 "#include E<lt>stdlib.hE<gt>\n"
5740 "#include E<lt>unistd.hE<gt>\n"
5741
5742 #. type: Plain text
5743 #: build/C/man2/mmap.2:653 build/C/man2/mprotect.2:178
5744 #, no-wrap
5745 msgid ""
5746 "#define handle_error(msg) \\e\n"
5747 "    do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
5748 msgstr ""
5749 "#define handle_error(msg) \\e\n"
5750 "    do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
5751
5752 #. type: Plain text
5753 #: build/C/man2/mmap.2:663
5754 #, no-wrap
5755 msgid ""
5756 "int\n"
5757 "main(int argc, char *argv[])\n"
5758 "{\n"
5759 "    char *addr;\n"
5760 "    int fd;\n"
5761 "    struct stat sb;\n"
5762 "    off_t offset, pa_offset;\n"
5763 "    size_t length;\n"
5764 "    ssize_t s;\n"
5765 msgstr ""
5766 "int\n"
5767 "main(int argc, char *argv[])\n"
5768 "{\n"
5769 "    char *addr;\n"
5770 "    int fd;\n"
5771 "    struct stat sb;\n"
5772 "    off_t offset, pa_offset;\n"
5773 "    size_t length;\n"
5774 "    ssize_t s;\n"
5775
5776 #. type: Plain text
5777 #: build/C/man2/mmap.2:668
5778 #, no-wrap
5779 msgid ""
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 msgstr ""
5785 "    if (argc E<lt> 3 || argc E<gt> 4) {\n"
5786 "        fprintf(stderr, \"%s file offset [length]\\en\", argv[0]);\n"
5787 "        exit(EXIT_FAILURE);\n"
5788 "    }\n"
5789
5790 #. type: Plain text
5791 #: build/C/man2/mmap.2:672
5792 #, no-wrap
5793 msgid ""
5794 "    fd = open(argv[1], O_RDONLY);\n"
5795 "    if (fd == -1)\n"
5796 "        handle_error(\"open\");\n"
5797 msgstr ""
5798 "    fd = open(argv[1], O_RDONLY);\n"
5799 "    if (fd == -1)\n"
5800 "        handle_error(\"open\");\n"
5801
5802 #. type: Plain text
5803 #: build/C/man2/mmap.2:675
5804 #, no-wrap
5805 msgid ""
5806 "    if (fstat(fd, &sb) == -1)           /* To obtain file size */\n"
5807 "        handle_error(\"fstat\");\n"
5808 msgstr ""
5809 "    if (fstat(fd, &sb) == -1)           /* To obtain file size */\n"
5810 "        handle_error(\"fstat\");\n"
5811
5812 #. type: Plain text
5813 #: build/C/man2/mmap.2:679
5814 #, no-wrap
5815 msgid ""
5816 "    offset = atoi(argv[2]);\n"
5817 "    pa_offset = offset & ~(sysconf(_SC_PAGE_SIZE) - 1);\n"
5818 "        /* offset for mmap() must be page aligned */\n"
5819 msgstr ""
5820 "    offset = atoi(argv[2]);\n"
5821 "    pa_offset = offset & ~(sysconf(_SC_PAGE_SIZE) - 1);\n"
5822 "        /* offset for mmap() must be page aligned */\n"
5823
5824 #. type: Plain text
5825 #: build/C/man2/mmap.2:684
5826 #, no-wrap
5827 msgid ""
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 msgstr ""
5833 "    if (offset E<gt>= sb.st_size) {\n"
5834 "        fprintf(stderr, \"offset is past end of file\\en\");\n"
5835 "        exit(EXIT_FAILURE);\n"
5836 "    }\n"
5837
5838 #. type: Plain text
5839 #: build/C/man2/mmap.2:690
5840 #, no-wrap
5841 msgid ""
5842 "    if (argc == 4) {\n"
5843 "        length = atoi(argv[3]);\n"
5844 "        if (offset + length E<gt> sb.st_size)\n"
5845 "            length = sb.st_size - offset;\n"
5846 "                /* Can\\(aqt display bytes past end of file */\n"
5847 msgstr ""
5848 "    if (argc == 4) {\n"
5849 "        length = atoi(argv[3]);\n"
5850 "        if (offset + length E<gt> sb.st_size)\n"
5851 "            length = sb.st_size - offset;\n"
5852 "                /* Can\\(aqt display bytes past end of file */\n"
5853
5854 #. type: Plain text
5855 #: build/C/man2/mmap.2:694
5856 #, no-wrap
5857 msgid ""
5858 "    } else {    /* No length arg ==E<gt> display to end of file */\n"
5859 "        length = sb.st_size - offset;\n"
5860 "    }\n"
5861 msgstr ""
5862 "    } else {    /* No length arg ==E<gt> display to end of file */\n"
5863 "        length = sb.st_size - offset;\n"
5864 "    }\n"
5865
5866 #. type: Plain text
5867 #: build/C/man2/mmap.2:699
5868 #, no-wrap
5869 msgid ""
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 msgstr ""
5875 "    addr = mmap(NULL, length + offset - pa_offset, PROT_READ,\n"
5876 "                MAP_PRIVATE, fd, pa_offset);\n"
5877 "    if (addr == MAP_FAILED)\n"
5878 "        handle_error(\"mmap\");\n"
5879
5880 #. type: Plain text
5881 #: build/C/man2/mmap.2:704
5882 #, no-wrap
5883 msgid ""
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 msgstr ""
5889 "    s = write(STDOUT_FILENO, addr + offset - pa_offset, length);\n"
5890 "    if (s != length) {\n"
5891 "        if (s == -1)\n"
5892 "            handle_error(\"write\");\n"
5893
5894 #. type: Plain text
5895 #: build/C/man2/mmap.2:708
5896 #, no-wrap
5897 msgid ""
5898 "        fprintf(stderr, \"partial write\");\n"
5899 "        exit(EXIT_FAILURE);\n"
5900 "    }\n"
5901 msgstr ""
5902 "        fprintf(stderr, \"partial write\");\n"
5903 "        exit(EXIT_FAILURE);\n"
5904 "    }\n"
5905
5906 #. type: Plain text
5907 #: build/C/man2/mmap.2:725
5908 msgid ""
5909 "B<getpagesize>(2), B<mincore>(2), B<mlock>(2), B<mmap2>(2), B<mprotect>(2), "
5910 "B<mremap>(2), B<msync>(2), B<remap_file_pages>(2), B<setrlimit>(2), B<shmat>"
5911 "(2), B<shm_open>(3), B<shm_overview>(7)"
5912 msgstr ""
5913 "B<getpagesize>(2), B<mincore>(2), B<mlock>(2), B<mmap2>(2), B<mprotect>(2), "
5914 "B<mremap>(2), B<msync>(2), B<remap_file_pages>(2), B<setrlimit>(2), B<shmat>"
5915 "(2), B<shm_open>(3), B<shm_overview>(7)"
5916
5917 #. type: Plain text
5918 #: build/C/man2/mmap.2:730 build/C/man2/msync.2:122
5919 msgid "B.O. Gallmeister, POSIX.4, O'Reilly, pp. 128-129 and 389-391."
5920 msgstr "B.O. Gallmeister, POSIX.4, O'Reilly, pp. 128-129 and 389-391."
5921
5922 #. type: TH
5923 #: build/C/man2/mmap2.2:29
5924 #, no-wrap
5925 msgid "MMAP2"
5926 msgstr "MMAP2"
5927
5928 #. type: TH
5929 #: build/C/man2/mmap2.2:29
5930 #, no-wrap
5931 msgid "2012-04-16"
5932 msgstr "2012-04-16"
5933
5934 #. type: Plain text
5935 #: build/C/man2/mmap2.2:32
5936 msgid "mmap2 - map files or devices into memory"
5937 msgstr "mmap2 - ファイルやデバイスをメモリにマップする"
5938
5939 #. type: Plain text
5940 #: build/C/man2/mmap2.2:38
5941 #, no-wrap
5942 msgid ""
5943 "B<void *mmap2(void *>I<addr>B<, size_t >I<length>B<, int >I<prot>B<,>\n"
5944 "B<             int >I<flags>B<, int >I<fd>B<, off_t >I<pgoffset>B<);>\n"
5945 msgstr ""
5946 "B<void *mmap2(void *>I<addr>B<, size_t >I<length>B<, int >I<prot>B<,>\n"
5947 "B<            int >I<flags>B<, int >I<fd>B<, off_t >I<pgoffset>B<);>\n"
5948
5949 #. type: Plain text
5950 #: build/C/man2/mmap2.2:43
5951 msgid ""
5952 "This is probably not the system call you are interested; instead, see B<mmap>"
5953 "(2), which describes the glibc wrapper function that invokes this system "
5954 "call."
5955 msgstr ""
5956 "これはおそらくあなたが興味のあるシステムコールではないだろう。代わりに\n"
5957 "B<mmap>(2) を見るとよい。そのページにはこのシステムコールを起動する glibc "
5958 "の\n"
5959 "ラッパー関数についての説明がある。"
5960
5961 #. type: Plain text
5962 #: build/C/man2/mmap2.2:54
5963 msgid ""
5964 "The B<mmap2>()  system call provides the same interface as B<mmap>(2), "
5965 "except that the final argument specifies the offset into the file in 4096-"
5966 "byte units (instead of bytes, as is done by B<mmap>(2)).  This enables "
5967 "applications that use a 32-bit I<off_t> to map large files (up to 2^44 "
5968 "bytes)."
5969 msgstr ""
5970 "B<mmap2>() システムコールは B<mmap>(2) と同じインターフェースを提供する。た"
5971 "だ\n"
5972 "し、最後の引き数には、ファイルのオフセットを (B<mmap>(2) が行っている、バイ"
5973 "ト\n"
5974 "単位ではなく) 4096 バイトを単位として指定する。 これにより、32 ビットの\n"
5975 "I<off_t> を使うアプリケーションで (2^44 バイトまでの) 大きなファイルをマッ"
5976 "プ\n"
5977 "できるようになる。"
5978
5979 #. type: Plain text
5980 #: build/C/man2/mmap2.2:61
5981 msgid ""
5982 "On success, B<mmap2>()  returns a pointer to the mapped area.  On error -1 "
5983 "is returned and I<errno> is set appropriately."
5984 msgstr ""
5985 "成功した場合、 B<mmap2>()  はマップされた領域へのポインタを返す。 エラーの場"
5986 "合は -1 が返されて、 I<errno> が適切に設定される。"
5987
5988 #. type: Plain text
5989 #: build/C/man2/mmap2.2:65
5990 #, fuzzy
5991 #| msgid "Problem with getting the data from userspace."
5992 msgid "Problem with getting the data from user space."
5993 msgstr "ユーザ空間からデータを取得するときに問題があった。"
5994
5995 #. type: Plain text
5996 #: build/C/man2/mmap2.2:70
5997 msgid ""
5998 "(Various platforms where the page size is not 4096 bytes.)  I<offset * 4096> "
5999 "is not a multiple of the system page size."
6000 msgstr ""
6001 "(ページサイズが 4096 バイトでないプラットフォームにおいて)  I<offset * 4096> "
6002 "がシステムのページサイズの倍数ではない。"
6003
6004 #. type: Plain text
6005 #: build/C/man2/mmap2.2:74
6006 msgid "B<mmap2>()  can also return any of the errors described in B<mmap>(2)."
6007 msgstr "B<mmap2>() は B<mmap>(2) に載っているエラーを返すこともある。"
6008
6009 #. type: Plain text
6010 #: build/C/man2/mmap2.2:77
6011 msgid "B<mmap2>()  is available since Linux 2.3.31."
6012 msgstr "B<mmap2>()  は、Linux 2.3.31 以降で使用可能である。"
6013
6014 #. type: Plain text
6015 #: build/C/man2/mmap2.2:79 build/C/man2/subpage_prot.2:98
6016 msgid "This system call is Linux-specific."
6017 msgstr "このシステムコールは Linux 独自である。"
6018
6019 #. type: Plain text
6020 #: build/C/man2/mmap2.2:85
6021 msgid ""
6022 "Nowadays, the glibc B<mmap>()  wrapper function invokes this system call "
6023 "rather than the B<mmap>(2)  system call."
6024 msgstr ""
6025 "現在では、glibc の B<mmap>()  のラッパー関数は、 B<mmap>(2)  システムコールで"
6026 "はなく、このシステムコール (B<mmap2>(2))  を起動する。"
6027
6028 #.  ia64 can have page sizes ranging from 4kB to 64kB.
6029 #.  On cris, it looks like the unit might also be the page size,
6030 #.  which is 8192 bytes. -- mtk, June 2007
6031 #. type: Plain text
6032 #: build/C/man2/mmap2.2:92
6033 msgid ""
6034 "On ia64, the unit for I<offset> is actually the system page size, rather "
6035 "than 4096 bytes."
6036 msgstr ""
6037 "ia64 では、 I<offset> の単位は、実際にはシステムのページサイズであり、 4096 "
6038 "バイトではない。"
6039
6040 #. type: Plain text
6041 #: build/C/man2/mmap2.2:98
6042 msgid ""
6043 "B<getpagesize>(2), B<mmap>(2), B<mremap>(2), B<msync>(2), B<shm_open>(3)"
6044 msgstr ""
6045 "B<getpagesize>(2), B<mmap>(2), B<mremap>(2), B<msync>(2), B<shm_open>(3)"
6046
6047 #. type: TH
6048 #: build/C/man2/mprotect.2:38
6049 #, no-wrap
6050 msgid "MPROTECT"
6051 msgstr "MPROTECT"
6052
6053 #. type: TH
6054 #: build/C/man2/mprotect.2:38
6055 #, fuzzy, no-wrap
6056 #| msgid "2012-05-04"
6057 msgid "2012-08-14"
6058 msgstr "2012-05-04"
6059
6060 #. type: Plain text
6061 #: build/C/man2/mprotect.2:41
6062 msgid "mprotect - set protection on a region of memory"
6063 msgstr "mprotect - メモリ領域の保護を設定する"
6064
6065 #. type: Plain text
6066 #: build/C/man2/mprotect.2:46
6067 #, fuzzy, no-wrap
6068 #| msgid "B<int mprotect(const void *>I<addr>B<, size_t >I<len>B<, int >I<prot>B<);>\n"
6069 msgid "B<int mprotect(void *>I<addr>B<, size_t >I<len>B<, int >I<prot>B<);>\n"
6070 msgstr "B<int mprotect(const void *>I<addr>B<, size_t >I<len>B<, int >I<prot>B<);>\n"
6071
6072 #. type: Plain text
6073 #: build/C/man2/mprotect.2:54
6074 msgid ""
6075 "B<mprotect>()  changes protection for the calling process's memory page(s)  "
6076 "containing any part of the address range in the interval [I<addr>,\\ I<addr>"
6077 "+I<len>-1].  I<addr> must be aligned to a page boundary."
6078 msgstr ""
6079 "B<mprotect>()  は、区間 [I<addr>,\\ I<addr>+I<len>-1] のアドレス範囲を含む 呼"
6080 "び出し元のプロセスのメモリページのアクセス保護を変更する。 I<addr> はページ境"
6081 "界に一致していなければならない。"
6082
6083 #. type: Plain text
6084 #: build/C/man2/mprotect.2:59
6085 msgid ""
6086 "If the calling process tries to access memory in a manner that violates the "
6087 "protection, then the kernel generates a B<SIGSEGV> signal for the process."
6088 msgstr ""
6089 "呼び出し元のプロセスがアクセス保護に違反するようなメモリアクセスを 行おうとす"
6090 "ると、カーネルはシグナル B<SIGSEGV> をそのプロセスに対して生成する。"
6091
6092 #. type: Plain text
6093 #: build/C/man2/mprotect.2:64
6094 msgid ""
6095 "I<prot> is either B<PROT_NONE> or a bitwise-or of the other values in the "
6096 "following list:"
6097 msgstr ""
6098 "I<prot> には、 B<PROT_NONE> か、以下のリストの B<PROT_NONE> 以外の値をビット"
6099 "毎の論理和 (bitwize-or) で指定する:"
6100
6101 #. type: Plain text
6102 #: build/C/man2/mprotect.2:67
6103 msgid "The memory cannot be accessed at all."
6104 msgstr "そのメモリには全くアクセスできない。"
6105
6106 #. type: Plain text
6107 #: build/C/man2/mprotect.2:70
6108 msgid "The memory can be read."
6109 msgstr "そのメモリを読み取ることができる。"
6110
6111 #. type: Plain text
6112 #: build/C/man2/mprotect.2:73
6113 msgid "The memory can be modified."
6114 msgstr "そのメモリを変更できる。"
6115
6116 #.  FIXME
6117 #.  Document PROT_GROWSUP and PROT_GROWSDOWN
6118 #. type: Plain text
6119 #: build/C/man2/mprotect.2:78
6120 msgid "The memory can be executed."
6121 msgstr "そのメモリは実行可能である。"
6122
6123 #. type: Plain text
6124 #: build/C/man2/mprotect.2:85
6125 msgid ""
6126 "On success, B<mprotect>()  returns zero.  On error, -1 is returned, and "
6127 "I<errno> is set appropriately."
6128 msgstr ""
6129 "成功した場合、 B<mprotect>()  は 0 を返す。エラーの場合は -1 が返り、 "
6130 "I<errno> が適切に設定される。"
6131
6132 #. type: Plain text
6133 #: build/C/man2/mprotect.2:95
6134 msgid ""
6135 "The memory cannot be given the specified access.  This can happen, for "
6136 "example, if you B<mmap>(2)  a file to which you have read-only access, then "
6137 "ask B<mprotect>()  to mark it B<PROT_WRITE>."
6138 msgstr ""
6139 "指定されたアクセスをメモリに設定することができない。 これは、例えば ファイル"
6140 "を読み取り専用で B<mmap>(2)  しており、その領域に対して B<mprotect>()  を呼び"
6141 "出して B<PROT_WRITE> に設定しようとした場合に発生する。"
6142
6143 #.  Or: both PROT_GROWSUP and PROT_GROWSDOWN were specified in 'prot'.
6144 #. type: Plain text
6145 #: build/C/man2/mprotect.2:100
6146 msgid ""
6147 "I<addr> is not a valid pointer, or not a multiple of the system page size."
6148 msgstr ""
6149 "I<addr> が有効なポインタでないか、 システムのページサイズの倍数でない。"
6150
6151 #. type: Plain text
6152 #: build/C/man2/mprotect.2:103
6153 msgid "Internal kernel structures could not be allocated."
6154 msgstr "カーネル内部の構造体を割り当てることができなかった。"
6155
6156 #. type: Plain text
6157 #: build/C/man2/mprotect.2:113
6158 msgid ""
6159 "Addresses in the range [I<addr>, I<addr>+I<len>-1] are invalid for the "
6160 "address space of the process, or specify one or more pages that are not "
6161 "mapped.  (Before kernel 2.4.19, the error B<EFAULT> was incorrectly produced "
6162 "for these cases.)"
6163 msgstr ""
6164 "[I<addr>, I<addr>+I<len>-1] という範囲のアドレスがプロセスのアドレス空間とし"
6165 "て不正であるか、 その範囲のアドレスがマップされていない 1 つ以上のページを指"
6166 "している (カーネル 2.4.19 より前では、この状況でエラー B<EFAULT> が間違って生"
6167 "成されていた)。"
6168
6169 #.  SVr4 defines an additional error
6170 #.  code EAGAIN. The SVr4 error conditions don't map neatly onto Linux's.
6171 #. type: Plain text
6172 #: build/C/man2/mprotect.2:122
6173 msgid ""
6174 "SVr4, POSIX.1-2001.  POSIX says that the behavior of B<mprotect>()  is "
6175 "unspecified if it is applied to a region of memory that was not obtained via "
6176 "B<mmap>(2)."
6177 msgstr ""
6178 "SVr4, POSIX.1-2001.  POSIX では、 B<mmap>(2)  経由で獲得していないメモリ領域"
6179 "に対して B<mprotect>()  を行った場合の B<mprotect>()  の動作は未定義であると"
6180 "されている。"
6181
6182 #. type: Plain text
6183 #: build/C/man2/mprotect.2:129
6184 msgid ""
6185 "On Linux it is always permissible to call B<mprotect>()  on any address in a "
6186 "process's address space (except for the kernel vsyscall area).  In "
6187 "particular it can be used to change existing code mappings to be writable."
6188 msgstr ""
6189 "Linux では、(カーネル vsyscall 領域以外の)  任意のプロセスアドレス空間に対し"
6190 "て B<mprotect>()  を呼び出すことが、常に許されている。 これは特に既存のコード"
6191 "マッピングを書き込み可能にするために使われる。"
6192
6193 #. type: Plain text
6194 #: build/C/man2/mprotect.2:139
6195 msgid ""
6196 "Whether B<PROT_EXEC> has any effect different from B<PROT_READ> is "
6197 "architecture- and kernel version-dependent.  On some hardware architectures "
6198 "(e.g., i386), B<PROT_WRITE> implies B<PROT_READ>."
6199 msgstr ""
6200 "B<PROT_EXEC> が B<PROT_READ> と異なる影響を持つか否かは、アーキテクチャとカー"
6201 "ネルのバージョンに依存する。 (i386 などの) いくつかのアーキテクチャでは、 "
6202 "B<PROT_WRITE> をセットすると、暗黙のうちに B<PROT_READ> がセットされる。"
6203
6204 #. type: Plain text
6205 #: build/C/man2/mprotect.2:148
6206 msgid ""
6207 "POSIX.1-2001 says that an implementation may permit access other than that "
6208 "specified in I<prot>, but at a minimum can only allow write access if "
6209 "B<PROT_WRITE> has been set, and must not allow any access if B<PROT_NONE> "
6210 "has been set."
6211 msgstr ""
6212 "POSIX.1-2001 では、 I<prot> で指定されていないアクセスを許可する実装を認めて"
6213 "いる。 ただし、最低限、 B<PROT_WRITE> がセットされている場合にのみ書き込みア"
6214 "クセスが許可され、 B<PROT_NONE> がセットされている場合にはアクセスは許可され"
6215 "ない点だけは 満たす必要がある。"
6216
6217 #. type: Plain text
6218 #: build/C/man2/mprotect.2:154
6219 msgid ""
6220 "The program below allocates four pages of memory, makes the third of these "
6221 "pages read-only, and then executes a loop that walks upward through the "
6222 "allocated region modifying bytes."
6223 msgstr ""
6224 "以下のプログラムは、メモリページを 4つ確保し、そのうち 3番目のページを 読み込"
6225 "み専用に設定する。その後で、確保した領域のアドレスの小さい方から 大きな方に向"
6226 "かって順番にバイト値を変更するループを実行する。"
6227
6228 #. type: Plain text
6229 #: build/C/man2/mprotect.2:157
6230 msgid ""
6231 "An example of what we might see when running the program is the following:"
6232 msgstr "プログラムを実行した場合の一例を以下に示す。"
6233
6234 #. type: Plain text
6235 #: build/C/man2/mprotect.2:163
6236 #, no-wrap
6237 msgid ""
6238 "$B< ./a.out>\n"
6239 "Start of region:        0x804c000\n"
6240 "Got SIGSEGV at address: 0x804e000\n"
6241 msgstr ""
6242 "$B< ./a.out>\n"
6243 "Start of region:        0x804c000\n"
6244 "Got SIGSEGV at address: 0x804e000\n"
6245
6246 #. type: Plain text
6247 #: build/C/man2/mprotect.2:175
6248 #, no-wrap
6249 msgid ""
6250 "#include E<lt>unistd.hE<gt>\n"
6251 "#include E<lt>signal.hE<gt>\n"
6252 "#include E<lt>stdio.hE<gt>\n"
6253 "#include E<lt>malloc.hE<gt>\n"
6254 "#include E<lt>stdlib.hE<gt>\n"
6255 "#include E<lt>errno.hE<gt>\n"
6256 "#include E<lt>sys/mman.hE<gt>\n"
6257 msgstr ""
6258 "#include E<lt>unistd.hE<gt>\n"
6259 "#include E<lt>signal.hE<gt>\n"
6260 "#include E<lt>stdio.hE<gt>\n"
6261 "#include E<lt>malloc.hE<gt>\n"
6262 "#include E<lt>stdlib.hE<gt>\n"
6263 "#include E<lt>errno.hE<gt>\n"
6264 "#include E<lt>sys/mman.hE<gt>\n"
6265
6266 #. type: Plain text
6267 #: build/C/man2/mprotect.2:180
6268 #, no-wrap
6269 msgid "char *buffer;\n"
6270 msgstr "char *buffer;\n"
6271
6272 #. type: Plain text
6273 #: build/C/man2/mprotect.2:188
6274 #, no-wrap
6275 msgid ""
6276 "static void\n"
6277 "handler(int sig, siginfo_t *si, void *unused)\n"
6278 "{\n"
6279 "    printf(\"Got SIGSEGV at address: 0x%lx\\en\",\n"
6280 "            (long) si-E<gt>si_addr);\n"
6281 "    exit(EXIT_FAILURE);\n"
6282 "}\n"
6283 msgstr ""
6284 "static void\n"
6285 "handler(int sig, siginfo_t *si, void *unused)\n"
6286 "{\n"
6287 "    printf(\"Got SIGSEGV at address: 0x%lx\\en\",\n"
6288 "            (long) si-E<gt>si_addr);\n"
6289 "    exit(EXIT_FAILURE);\n"
6290 "}\n"
6291
6292 #. type: Plain text
6293 #: build/C/man2/mprotect.2:195
6294 #, no-wrap
6295 msgid ""
6296 "int\n"
6297 "main(int argc, char *argv[])\n"
6298 "{\n"
6299 "    char *p;\n"
6300 "    int pagesize;\n"
6301 "    struct sigaction sa;\n"
6302 msgstr ""
6303 "int\n"
6304 "main(void)\n"
6305 "{\n"
6306 "    char *p;\n"
6307 "    int pagesize;\n"
6308 "    struct sigaction sa;\n"
6309
6310 #. type: Plain text
6311 #: build/C/man2/mprotect.2:201
6312 #, no-wrap
6313 msgid ""
6314 "    sa.sa_flags = SA_SIGINFO;\n"
6315 "    sigemptyset(&sa.sa_mask);\n"
6316 "    sa.sa_sigaction = handler;\n"
6317 "    if (sigaction(SIGSEGV, &sa, NULL) == -1)\n"
6318 "        handle_error(\"sigaction\");\n"
6319 msgstr ""
6320 "    sa.sa_flags = SA_SIGINFO;\n"
6321 "    sigemptyset(&sa.sa_mask);\n"
6322 "    sa.sa_sigaction = handler;\n"
6323 "    if (sigaction(SIGSEGV, &sa, NULL) == -1)\n"
6324 "        handle_error(\"sigaction\");\n"
6325
6326 #. type: Plain text
6327 #: build/C/man2/mprotect.2:205
6328 #, no-wrap
6329 msgid ""
6330 "    pagesize = sysconf(_SC_PAGE_SIZE);\n"
6331 "    if (pagesize == -1)\n"
6332 "        handle_error(\"sysconf\");\n"
6333 msgstr ""
6334 "    pagesize = sysconf(_SC_PAGE_SIZE);\n"
6335 "    if (pagesize == -1)\n"
6336 "        handle_error(\"sysconf\");\n"
6337
6338 #. type: Plain text
6339 #: build/C/man2/mprotect.2:208
6340 #, no-wrap
6341 msgid ""
6342 "    /* Allocate a buffer aligned on a page boundary;\n"
6343 "       initial protection is PROT_READ | PROT_WRITE */\n"
6344 msgstr ""
6345 "    /* Allocate a buffer aligned on a page boundary;\n"
6346 "       initial protection is PROT_READ | PROT_WRITE */\n"
6347
6348 #. type: Plain text
6349 #: build/C/man2/mprotect.2:212
6350 #, no-wrap
6351 msgid ""
6352 "    buffer = memalign(pagesize, 4 * pagesize);\n"
6353 "    if (buffer == NULL)\n"
6354 "        handle_error(\"memalign\");\n"
6355 msgstr ""
6356 "    buffer = memalign(pagesize, 4 * pagesize);\n"
6357 "    if (buffer == NULL)\n"
6358 "        handle_error(\"memalign\");\n"
6359
6360 #. type: Plain text
6361 #: build/C/man2/mprotect.2:214
6362 #, no-wrap
6363 msgid "    printf(\"Start of region:        0x%lx\\en\", (long) buffer);\n"
6364 msgstr "    printf(\"Start of region:        0x%lx\\en\", (long) buffer);\n"
6365
6366 #. type: Plain text
6367 #: build/C/man2/mprotect.2:218
6368 #, no-wrap
6369 msgid ""
6370 "    if (mprotect(buffer + pagesize * 2, pagesize,\n"
6371 "                PROT_READ) == -1)\n"
6372 "        handle_error(\"mprotect\");\n"
6373 msgstr ""
6374 "    if (mprotect(buffer + pagesize * 2, pagesize,\n"
6375 "                PROT_READ) == -1)\n"
6376 "        handle_error(\"mprotect\");\n"
6377
6378 #. type: Plain text
6379 #: build/C/man2/mprotect.2:221
6380 #, no-wrap
6381 msgid ""
6382 "    for (p = buffer ; ; )\n"
6383 "        *(p++) = \\(aqa\\(aq;\n"
6384 msgstr ""
6385 "    for (p = buffer ; ; )\n"
6386 "        *(p++) = \\(aqa\\(aq;\n"
6387
6388 #. type: Plain text
6389 #: build/C/man2/mprotect.2:225
6390 #, no-wrap
6391 msgid ""
6392 "    printf(\"Loop completed\\en\");     /* Should never happen */\n"
6393 "    exit(EXIT_SUCCESS);\n"
6394 "}\n"
6395 msgstr ""
6396 "    printf(\"Loop completed\\en\");     /* Should never happen */\n"
6397 "    exit(EXIT_SUCCESS);\n"
6398 "}\n"
6399
6400 #. type: Plain text
6401 #: build/C/man2/mprotect.2:229
6402 msgid "B<mmap>(2), B<sysconf>(3)"
6403 msgstr "B<mmap>(2), B<sysconf>(3)"
6404
6405 #. type: TH
6406 #: build/C/man2/mremap.2:30
6407 #, no-wrap
6408 msgid "MREMAP"
6409 msgstr "MREMAP"
6410
6411 #. type: TH
6412 #: build/C/man2/mremap.2:30
6413 #, no-wrap
6414 msgid "2010-06-10"
6415 msgstr "2010-06-10"
6416
6417 #. type: Plain text
6418 #: build/C/man2/mremap.2:33
6419 msgid "mremap - remap a virtual memory address"
6420 msgstr "mremap - 仮想メモリ・アドレスを再マッピングする"
6421
6422 #. type: Plain text
6423 #: build/C/man2/mremap.2:36
6424 #, no-wrap
6425 msgid "B<#define _GNU_SOURCE>         /* See feature_test_macros(7) */\n"
6426 msgstr "B<#define _GNU_SOURCE>         /* feature_test_macros(7) 参照 */\n"
6427
6428 #. type: Plain text
6429 #: build/C/man2/mremap.2:41
6430 #, no-wrap
6431 msgid ""
6432 "B<void *mremap(void *>I<old_address>B<, size_t >I<old_size>B<,>\n"
6433 "B<             size_t >I<new_size>B<, int >I<flags>B<, ... /* void *>I<new_address>B< */);>\n"
6434 msgstr ""
6435 "B<void *mremap(void *>I<old_address>B<, size_t >I<old_size>B<,>\n"
6436 "B<             size_t >I<new_size>B<, int >I<flags>B<, ... /* void *>I<new_address>B< */);>\n"
6437
6438 #. type: Plain text
6439 #: build/C/man2/mremap.2:47
6440 msgid ""
6441 "B<mremap>()  expands (or shrinks) an existing memory mapping, potentially "
6442 "moving it at the same time (controlled by the I<flags> argument and the "
6443 "available virtual address space)."
6444 msgstr ""
6445 "B<mremap>()  は既存のメモリ・マッピングの拡張 (または縮小) を行う。 同時に移"
6446 "動されることもある (I<flags> 引き数と利用可能な仮想アドレス空間によって決ま"
6447 "る)。"
6448
6449 #. type: Plain text
6450 #: build/C/man2/mremap.2:61
6451 msgid ""
6452 "I<old_address> is the old address of the virtual memory block that you want "
6453 "to expand (or shrink).  Note that I<old_address> has to be page aligned.  "
6454 "I<old_size> is the old size of the virtual memory block.  I<new_size> is the "
6455 "requested size of the virtual memory block after the resize.  An optional "
6456 "fifth argument, I<new_address>, may be provided; see the description of "
6457 "B<MREMAP_FIXED> below."
6458 msgstr ""
6459 "I<old_address> は拡張 (または縮小) しようとする仮想メモリ・ブロック の元のア"
6460 "ドレスである。I<old_address> はページ境界に合っていなければ ならない点に注意"
6461 "すること。I<old_size> は元の仮想メモリ・ブロックの サイズである。 "
6462 "I<new_size> は要求する変更後の仮想メモリ・ブロックのサイズである。 5 番目の引"
6463 "き数として I<new_address> を指定することができる。下記の B<MREMAP_FIXED> の説"
6464 "明を参照のこと。"
6465
6466 #. type: Plain text
6467 #: build/C/man2/mremap.2:73
6468 msgid ""
6469 "In Linux the memory is divided into pages.  A user process has (one or)  "
6470 "several linear virtual memory segments.  Each virtual memory segment has one "
6471 "or more mappings to real memory pages (in the page table).  Each virtual "
6472 "memory segment has its own protection (access rights), which may cause a "
6473 "segmentation violation if the memory is accessed incorrectly (e.g., writing "
6474 "to a read-only segment).  Accessing virtual memory outside of the segments "
6475 "will also cause a segmentation violation."
6476 msgstr ""
6477 "Linux ではメモリはページに分割される。ユーザー・プロセスは (一つまたは)  複数"
6478 "のリニアな仮想メモリセグメントを持つ。 それぞれの仮想メモリセグメントは一つ以"
6479 "上の実メモリ・ページ にマッピングされている (マッピング情報はページ・テーブル"
6480 "で管理される)。 仮想メモリセグメントにはセグメント毎の保護 (アクセス権) が設"
6481 "定されており、 メモリが不正にアクセスされた場合 (例えば読み込み専用のセグメン"
6482 "トに 書き込んだ場合)、セグメンテーション侵害 (segmentation violation) を 引き"
6483 "起こす。また、セグメント外の仮想メモリにアクセスした場合にも セグメンテーショ"
6484 "ン侵害が発生する。"
6485
6486 #. type: Plain text
6487 #: build/C/man2/mremap.2:81
6488 msgid ""
6489 "B<mremap>()  uses the Linux page table scheme.  B<mremap>()  changes the "
6490 "mapping between virtual addresses and memory pages.  This can be used to "
6491 "implement a very efficient B<realloc>(3)."
6492 msgstr ""
6493 "B<mremap>()  は Linux のページ・テーブル方式を使用する。 B<mremap>()  は仮想"
6494 "アドレスとメモリ・ページのマッピングを変更する。これは非常に効率的な "
6495 "B<realloc>(3)  を実装するのに使用されている。"
6496
6497 #. type: Plain text
6498 #: build/C/man2/mremap.2:83
6499 msgid "The I<flags> bit-mask argument may be 0, or include the following flag:"
6500 msgstr "I<flags> ビットマスク引数は 0 または以下のフラグを含む:"
6501
6502 #. type: TP
6503 #: build/C/man2/mremap.2:83
6504 #, no-wrap
6505 msgid "B<MREMAP_MAYMOVE>"
6506 msgstr "B<MREMAP_MAYMOVE>"
6507
6508 #. type: Plain text
6509 #: build/C/man2/mremap.2:95
6510 msgid ""
6511 "By default, if there is not sufficient space to expand a mapping at its "
6512 "current location, then B<mremap>()  fails.  If this flag is specified, then "
6513 "the kernel is permitted to relocate the mapping to a new virtual address, if "
6514 "necessary.  If the mapping is relocated, then absolute pointers into the old "
6515 "mapping location become invalid (offsets relative to the starting address of "
6516 "the mapping should be employed)."
6517 msgstr ""
6518 "デフォルトでは、現在の位置にマッピングを拡張するための 十分な空きがなければ "
6519 "B<mremap>()  は失敗する。 このフラグが指定されると、カーネルは必要があれば"
6520 "マッピングを 新しい仮想アドレスに再配置することができる マッピングが再配置さ"
6521 "れると、古いマッピング位置への絶対ポインタは 無効になる (マッピングの開始アド"
6522 "レスからの相対オフセットは有効のままである)。"
6523
6524 #. type: TP
6525 #: build/C/man2/mremap.2:95
6526 #, no-wrap
6527 msgid "B<MREMAP_FIXED> (since Linux 2.3.31)"
6528 msgstr "B<MREMAP_FIXED> (Linux 2.3.31 以降)"
6529
6530 #. type: Plain text
6531 #: build/C/man2/mremap.2:117
6532 msgid ""
6533 "This flag serves a similar purpose to the B<MAP_FIXED> flag of B<mmap>(2).  "
6534 "If this flag is specified, then B<mremap>()  accepts a fifth argument, "
6535 "I<void *new_address>, which specifies a page-aligned address to which the "
6536 "mapping must be moved.  Any previous mapping at the address range specified "
6537 "by I<new_address> and I<new_size> is unmapped.  If B<MREMAP_FIXED> is "
6538 "specified, then B<MREMAP_MAYMOVE> must also be specified."
6539 msgstr ""
6540 "このフラグは B<mmap>(2)  の B<MAP_FIXED> フラグと似たような目的で用いられ"
6541 "る。 このフラグが指定されると、 B<mremap>()  は 5 番目の引き数 I<void "
6542 "*new_address> を受け取り、この引数はマッピングが移動されるべきアドレスを指定"
6543 "する。 このアドレスはページ境界に合っていなければならない。 I<new_address> "
6544 "と I<new_size> で指定されるアドレス範囲に過去のマッピングがあった場合、 その"
6545 "マッピングはアンマップされる (unmapped)。 B<MREMAP_FIXED> を指定した場合は、 "
6546 "B<MREMAP_MAYMOVE> も指定しなければならない。"
6547
6548 #. type: Plain text
6549 #: build/C/man2/mremap.2:127
6550 msgid ""
6551 "If the memory segment specified by I<old_address> and I<old_size> is locked "
6552 "(using B<mlock>(2)  or similar), then this lock is maintained when the "
6553 "segment is resized and/or relocated.  As a consequence, the amount of memory "
6554 "locked by the process may change."
6555 msgstr ""
6556 "I<old_address> と I<old_size> で指定されるメモリセグメントが (B<mlock>(2)  や"
6557 "同様のもので) ロックされている場合、セグメントのサイズが変わったり 再配置され"
6558 "たりした時にロックも維持される。 その結果、プロセスによってロックされるメモリ"
6559 "の量は変化する。"
6560
6561 #. type: Plain text
6562 #: build/C/man2/mremap.2:135
6563 msgid ""
6564 "On success B<mremap>()  returns a pointer to the new virtual memory area.  "
6565 "On error, the value B<MAP_FAILED> (that is, I<(void\\ *)\\ -1>) is returned, "
6566 "and I<errno> is set appropriately."
6567 msgstr ""
6568 "成功した場合は B<mremap>()  は新しい仮想メモリ領域へのポインタを返す。 エラー"
6569 "の場合は B<MAP_FAILED> (すなわち I<(void\\ *)\\ -1>) が返され、 I<errno> が適"
6570 "切に設定される。"
6571
6572 #. type: Plain text
6573 #: build/C/man2/mremap.2:142
6574 msgid ""
6575 "The caller tried to expand a memory segment that is locked, but this was not "
6576 "possible without exceeding the B<RLIMIT_MEMLOCK> resource limit."
6577 msgstr ""
6578 "呼び出し元がロックされているメモリセグメントを拡張しようとしたが、 "
6579 "B<RLIMIT_MEMLOCK> リソース制限を越えずにこれを行うことができない。"
6580
6581 #. type: Plain text
6582 #: build/C/man2/mremap.2:151
6583 msgid ""
6584 "\"Segmentation fault.\" Some address in the range I<old_address> to "
6585 "I<old_address>+I<old_size> is an invalid virtual memory address for this "
6586 "process.  You can also get B<EFAULT> even if there exist mappings that cover "
6587 "the whole address space requested, but those mappings are of different types."
6588 msgstr ""
6589 "「セグメンテーション違反(segmentation fault)」 I<old_address> から "
6590 "I<old_address>+I<old_size> の 範囲のアドレスのどれかがこのプロセスにおいて不"
6591 "正な仮想メモリ・アドレスである。 たとえ要求したアドレス空間全体を含むような"
6592 "マッピングがあったとしても、 それらのマッピングが異なった型ならば B<EFAULT> "
6593 "を受け取るだろう。"
6594
6595 #. type: Plain text
6596 #: build/C/man2/mremap.2:179
6597 msgid ""
6598 "An invalid argument was given.  Possible causes are: I<old_address> was not "
6599 "page aligned; a value other than B<MREMAP_MAYMOVE> or B<MREMAP_FIXED> was "
6600 "specified in I<flags>; I<new_size> was zero; I<new_size> or I<new_address> "
6601 "was invalid; or the new address range specified by I<new_address> and "
6602 "I<new_size> overlapped the old address range specified by I<old_address> and "
6603 "I<old_size>; or B<MREMAP_FIXED> was specified without also specifying "
6604 "B<MREMAP_MAYMOVE>."
6605 msgstr ""
6606 "不正な引き数が与えられた。 可能性のある原因は以下の通りである: たいていは "
6607 "I<old_address> がページ境界に 合ってない; I<flags> に B<MREMAP_MAYMOVE> また"
6608 "は B<MREMAP_FIXED> 以外の値が指定されている; I<new_size> がゼロ; I<new_size> "
6609 "または I<new_address> の値が不正; I<new_address> と I<new_size> で指定される"
6610 "新しいアドレス範囲が I<old_address> と I<old_size> で指定される古いアドレス範"
6611 "囲と重なっている; B<MREMAP_FIXED> が指定されているが B<MREMAP_MAYMOVE> が指定"
6612 "されていない。"
6613
6614 #. type: Plain text
6615 #: build/C/man2/mremap.2:185
6616 msgid ""
6617 "The memory area cannot be expanded at the current virtual address, and the "
6618 "B<MREMAP_MAYMOVE> flag is not set in I<flags>.  Or, there is not enough "
6619 "(virtual) memory available."
6620 msgstr ""
6621 "現在の仮想アドレスではメモリ領域が拡張できず、 B<MREMAP_MAYMOVE> フラグが "
6622 "I<flags> に設定されていない。 または十分な (仮想) メモリが存在しない。"
6623
6624 #.  4.2BSD had a (never actually implemented)
6625 #.  .BR mremap (2)
6626 #.  call with completely different semantics.
6627 #. type: Plain text
6628 #: build/C/man2/mremap.2:191
6629 msgid ""
6630 "This call is Linux-specific, and should not be used in programs intended to "
6631 "be portable."
6632 msgstr ""
6633 "このコールは Linux 特有であり、移植を意図したプログラムで 使用すべきではな"
6634 "い。"
6635
6636 #. type: Plain text
6637 #: build/C/man2/mremap.2:199
6638 msgid ""
6639 "Prior to version 2.4, glibc did not expose the definition of "
6640 "B<MREMAP_FIXED>, and the prototype for B<mremap>()  did not allow for the "
6641 "I<new_address> argument."
6642 msgstr ""
6643 "バージョン 2.4 より前の glibc では、 B<MREMAP_FIXED> の定義は公開されておら"
6644 "ず、 B<mremap>()  のプロトタイプは I<new_address> 引き数を取らなかった。"
6645
6646 #. type: Plain text
6647 #: build/C/man2/mremap.2:208
6648 msgid ""
6649 "B<brk>(2), B<getpagesize>(2), B<getrlimit>(2), B<mlock>(2), B<mmap>(2), "
6650 "B<sbrk>(2), B<malloc>(3), B<realloc>(3)"
6651 msgstr ""
6652 "B<brk>(2), B<getpagesize>(2), B<getrlimit>(2), B<mlock>(2), B<mmap>(2), "
6653 "B<sbrk>(2), B<realloc>(3), B<malloc>(3)"
6654
6655 #. type: Plain text
6656 #: build/C/man2/mremap.2:214
6657 #, fuzzy
6658 #| msgid ""
6659 #| "Your favorite OS text book for more information on paged memory.  "
6660 #| "(I<Modern Operating Systems> by Andrew S. Tanenbaum, I<Inside Linux> by "
6661 #| "Randolf Bentson, I<The Design of the UNIX Operating System> by Maurice J. "
6662 #| "Bach.)"
6663 msgid ""
6664 "Your favorite text book on operating systems for more information on paged "
6665 "memory (e.g., I<Modern Operating Systems> by Andrew S. Tanenbaum, I<Inside "
6666 "Linux> by Randolf Bentson, I<The Design of the UNIX Operating System> by "
6667 "Maurice J. Bach)"
6668 msgstr ""
6669 "ページ分割されたメモリについてもっと詳しく知りたいならば あなたの好みの OS "
6670 "の\n"
6671 "教科書を参照すること。 (I<Modern Operating Systems> by Andrew S. Tanenbaum,\n"
6672 "I<Inside Linux> by Randolf Bentson, I<The Design of the UNIX Operating\n"
6673 "System> by Maurice J. Bach.)"
6674
6675 #. type: TH
6676 #: build/C/man2/msync.2:25
6677 #, no-wrap
6678 msgid "MSYNC"
6679 msgstr "MSYNC"
6680
6681 #. type: TH
6682 #: build/C/man2/msync.2:25 build/C/man2/remap_file_pages.2:28
6683 #, no-wrap
6684 msgid "2008-04-22"
6685 msgstr "2008-04-22"
6686
6687 #. type: Plain text
6688 #: build/C/man2/msync.2:28
6689 msgid "msync - synchronize a file with a memory map"
6690 msgstr "msync - ファイルをマップしたメモリと同期させる"
6691
6692 #. type: Plain text
6693 #: build/C/man2/msync.2:32
6694 msgid "B<int msync(void *>I<addr>B<, size_t >I<length>B<, int >I<flags>B<);>"
6695 msgstr "B<int msync(void *>I<addr>B<, size_t >I<length>B<, int >I<flags>B<);>"
6696
6697 #. type: Plain text
6698 #: build/C/man2/msync.2:48
6699 msgid ""
6700 "B<msync>()  flushes changes made to the in-core copy of a file that was "
6701 "mapped into memory using B<mmap>(2)  back to disk.  Without use of this call "
6702 "there is no guarantee that changes are written back before B<munmap>(2)  is "
6703 "called.  To be more precise, the part of the file that corresponds to the "
6704 "memory area starting at I<addr> and having length I<length> is updated."
6705 msgstr ""
6706 "B<msync>()  は B<mmap>(2)  を使ってメモリにマップされたファイルの、 メモリ上"
6707 "のコピーになされた変更をディスクに反映させる。 この関数を使用しないと、 "
6708 "B<munmap>(2)  が呼び出されるまで変更が書き戻される保証はない。 より正確には、"
6709 "ファイルのうち I<addr> から始まり長さ I<length> のメモリ領域に対応する部分が"
6710 "更新される。"
6711
6712 #. type: Plain text
6713 #: build/C/man2/msync.2:68
6714 msgid ""
6715 "The I<flags> argument may have the bits B<MS_ASYNC>, B<MS_SYNC>, and "
6716 "B<MS_INVALIDATE> set, but not both B<MS_ASYNC> and B<MS_SYNC>.  B<MS_ASYNC> "
6717 "specifies that an update be scheduled, but the call returns immediately.  "
6718 "B<MS_SYNC> asks for an update and waits for it to complete.  "
6719 "B<MS_INVALIDATE> asks to invalidate other mappings of the same file (so that "
6720 "they can be updated with the fresh values just written)."
6721 msgstr ""
6722 "I<flags> 引数にはビット B<MS_ASYNC>, B<MS_SYNC>, B<MS_INVALIDATE> を設定する"
6723 "ことができるが、 B<MS_ASYNC> と B<MS_SYNC> を同時に指定することはできない。 "
6724 "B<MS_ASYNC> は更新を予定に組み込むことを表し、呼び出しは直ちに返る。 "
6725 "B<MS_SYNC> は更新を要求し、更新が完了するまで待つ。 B<MS_INVALIDATE> は(たっ"
6726 "た今書き込んだ新しい値でマッピングを更新することができるように)  同じファイル"
6727 "に対する他のマッピングを無効にすることを要求する。"
6728
6729 #. type: Plain text
6730 #: build/C/man2/msync.2:73
6731 msgid ""
6732 "On success, zero is returned.  On error, -1 is returned, and I<errno> is set "
6733 "appropriately."
6734 msgstr ""
6735 "成功した場合、 0 が返る。エラーの場合、 -1 が返り、 I<errno> が適切に設定され"
6736 "る。"
6737
6738 #. type: TP
6739 #: build/C/man2/msync.2:74
6740 #, no-wrap
6741 msgid "B<EBUSY>"
6742 msgstr "B<EBUSY>"
6743
6744 #. type: Plain text
6745 #: build/C/man2/msync.2:80
6746 msgid ""
6747 "B<MS_INVALIDATE> was specified in I<flags>, and a memory lock exists for the "
6748 "specified address range."
6749 msgstr ""
6750 "I flags に B<MS_INVALIDATE> が指定されたが、指定されたアドレス範囲にロックが"
6751 "存在する。"
6752
6753 #. type: Plain text
6754 #: build/C/man2/msync.2:93
6755 msgid ""
6756 "I<addr> is not a multiple of PAGESIZE; or any bit other than B<MS_ASYNC> | "
6757 "B<MS_INVALIDATE> | B<MS_SYNC> is set in I<flags>; or both B<MS_SYNC> and "
6758 "B<MS_ASYNC> are set in I<flags>."
6759 msgstr ""
6760 "I<addr> が PAGESIZE の倍数でない。または、 I<flags> に B<MS_ASYNC>、"
6761 "B<MS_INVALIDATE>、B<MS_SYNC> 以外のビットが設定された。 または、 I<flags> に "
6762 "B<MS_SYNC> と B<MS_ASYNC> の両方が設定された。"
6763
6764 #. type: Plain text
6765 #: build/C/man2/msync.2:96
6766 msgid "The indicated memory (or part of it) was not mapped."
6767 msgstr "指定されたメモリ (またはその一部) がマップされていない。"
6768
6769 #. type: Plain text
6770 #: build/C/man2/msync.2:98 build/C/man3/posix_fallocate.3:105
6771 #: build/C/man3/shm_open.3:251 build/C/man7/shm_overview.7:103
6772 msgid "POSIX.1-2001."
6773 msgstr "POSIX.1-2001."
6774
6775 #. type: Plain text
6776 #: build/C/man2/msync.2:105
6777 msgid ""
6778 "This call was introduced in Linux 1.3.21, and then used B<EFAULT> instead of "
6779 "B<ENOMEM>.  In Linux 2.4.19 this was changed to the POSIX value B<ENOMEM>."
6780 msgstr ""
6781 "この関数は Linux 1.3.21 で導入されたが、 B<ENOMEM> ではなく B<EFAULT> が使わ"
6782 "れていた。 これは Linux 2.4.19 で POSIX における値 B<ENOMEM> に変更された。"
6783
6784 #.  POSIX.1-2001: It shall be defined to -1 or 0 or 200112L.
6785 #.  -1: unavailable, 0: ask using sysconf().
6786 #.  glibc defines them to 1.
6787 #. type: Plain text
6788 #: build/C/man2/msync.2:118
6789 msgid ""
6790 "On POSIX systems on which B<msync>()  is available, both "
6791 "B<_POSIX_MAPPED_FILES> and B<_POSIX_SYNCHRONIZED_IO> are defined in "
6792 "I<E<lt>unistd.hE<gt>> to a value greater than 0.  (See also B<sysconf>(3).)"
6793 msgstr ""
6794 "B<msync>()  が使用可能な POSIX システムでは B<_POSIX_MAPPED_FILES> と "
6795 "B<_POSIX_SYNCHRONIZED_IO> の両方が I<E<lt>unistd.hE<gt>> で 0 より大きい値に"
6796 "定義される。 (B<sysconf>(3)  を参照すること。 )"
6797
6798 #. type: TP
6799 #: build/C/man2/msync.2:120 build/C/man7/shm_overview.7:46
6800 #, no-wrap
6801 msgid "B<mmap>(2)"
6802 msgstr "B<mmap>(2)"
6803
6804 #. type: TH
6805 #: build/C/man3/mtrace.3:25
6806 #, no-wrap
6807 msgid "MTRACE"
6808 msgstr "MTRACE"
6809
6810 #. type: Plain text
6811 #: build/C/man3/mtrace.3:28
6812 msgid "mtrace, muntrace - malloc tracing"
6813 msgstr "mtrace, muntrace - malloc のトレース"
6814
6815 #. type: Plain text
6816 #: build/C/man3/mtrace.3:30
6817 msgid "B<#include E<lt>mcheck.hE<gt>>"
6818 msgstr "B<#include E<lt>mcheck.hE<gt>>"
6819
6820 #. type: Plain text
6821 #: build/C/man3/mtrace.3:32
6822 msgid "B<void mtrace(void);>"
6823 msgstr "B<void mtrace(void);>"
6824
6825 #. type: Plain text
6826 #: build/C/man3/mtrace.3:34
6827 msgid "B<void muntrace(void);>"
6828 msgstr "B<void muntrace(void);>"
6829
6830 #. type: Plain text
6831 #: build/C/man3/mtrace.3:46
6832 msgid ""
6833 "The B<mtrace>()  function installs hook functions for the memory-allocation "
6834 "functions (B<malloc>(3), B<realloc>(3)  B<memalign>(3), B<free>(3)).  These "
6835 "hook functions record tracing information about memory allocation and "
6836 "deallocation.  The tracing information can be used to discover memory leaks "
6837 "and attempts to free nonallocated memory in a program."
6838 msgstr ""
6839
6840 #. type: Plain text
6841 #: build/C/man3/mtrace.3:57
6842 msgid ""
6843 "The B<muntrace>()  function disables the hook functions installed by "
6844 "B<mtrace>(), so that tracing information is no longer recorded for the "
6845 "memory-allocation functions.  If no hook functions were successfully "
6846 "installed by B<mtrace>(), B<muntrace>()  does nothing."
6847 msgstr ""
6848
6849 #. type: Plain text
6850 #: build/C/man3/mtrace.3:65
6851 msgid ""
6852 "When B<mtrace>()  is called, it checks the value of the environment variable "
6853 "B<MALLOC_TRACE>, which should contain the pathname of a file in which the "
6854 "tracing information is to be recorded.  If the pathname is successfully "
6855 "opened, it is truncated to zero length."
6856 msgstr ""
6857
6858 #. type: Plain text
6859 #: build/C/man3/mtrace.3:78
6860 msgid ""
6861 "If B<MALLOC_TRACE> is not set, or the pathname it specifies is invalid or "
6862 "not writable, then no hook functions are installed, and B<mtrace>()  has no "
6863 "effect.  In set-user-ID and set-group-ID programs, B<MALLOC_TRACE> is "
6864 "ignored, and B<mtrace>()  has no effect."
6865 msgstr ""
6866
6867 #. type: Plain text
6868 #: build/C/man3/mtrace.3:86
6869 msgid ""
6870 "In normal usage, B<mtrace>()  is called once at the start of execution of a "
6871 "program, and B<muntrace>()  is never called."
6872 msgstr ""
6873
6874 #. type: Plain text
6875 #: build/C/man3/mtrace.3:96
6876 msgid ""
6877 "The tracing output produced after a call to B<mtrace>()  is textual, but not "
6878 "designed to be human readable.  The GNU C library provides a Perl script, "
6879 "B<mtrace>(1), that interprets the trace log and produces human-readable "
6880 "output.  For best results, the traced program should be compiled with "
6881 "debugging enabled, so that line-number information is recorded in the "
6882 "executable."
6883 msgstr ""
6884
6885 #. type: Plain text
6886 #: build/C/man3/mtrace.3:102
6887 msgid ""
6888 "The tracing performed by B<mtrace>()  incurs a performance penalty (if "
6889 "B<MALLOC_TRACE> points to a valid, writable pathname)."
6890 msgstr ""
6891
6892 #. type: Plain text
6893 #: build/C/man3/mtrace.3:108
6894 msgid ""
6895 "The line-number information produced by B<mtrace>(1)  is not always precise: "
6896 "the line number references may refer to the previous or following (non-"
6897 "blank)  line of the source code."
6898 msgstr ""
6899
6900 #. type: Plain text
6901 #: build/C/man3/mtrace.3:115
6902 msgid ""
6903 "The shell session below demonstrates the use of the B<mtrace>()  function "
6904 "and the B<mtrace>(1)  command in a program that has memory leaks at two "
6905 "different locations.  The demonstration uses the following program:"
6906 msgstr ""
6907
6908 #. type: Plain text
6909 #: build/C/man3/mtrace.3:122
6910 #, no-wrap
6911 msgid ""
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 msgstr ""
6917 "$ B<cat t_mtrace.c>\n"
6918 "#include E<lt>mcheck.hE<gt>\n"
6919 "#include E<lt>stdlib.hE<gt>\n"
6920 "#include E<lt>stdio.hE<gt>\n"
6921
6922 #. type: Plain text
6923 #: build/C/man3/mtrace.3:127
6924 #, no-wrap
6925 msgid ""
6926 "int\n"
6927 "main(int argc, char *argv[])\n"
6928 "{\n"
6929 "    int j;\n"
6930 msgstr ""
6931 "int\n"
6932 "main(int argc, char *argv[])\n"
6933 "{\n"
6934 "    int j;\n"
6935
6936 #. type: Plain text
6937 #: build/C/man3/mtrace.3:129
6938 #, no-wrap
6939 msgid "    mtrace();\n"
6940 msgstr "    mtrace();\n"
6941
6942 #. type: Plain text
6943 #: build/C/man3/mtrace.3:132
6944 #, no-wrap
6945 msgid ""
6946 "    for (j = 0; j E<lt> 2; j++)\n"
6947 "        malloc(100);            /* Never freed--a memory leak */\n"
6948 msgstr ""
6949 "    for (j = 0; j E<lt> 2; j++)\n"
6950 "        malloc(100);            /* Never freed--a memory leak */\n"
6951
6952 #. type: Plain text
6953 #: build/C/man3/mtrace.3:136
6954 #, no-wrap
6955 msgid ""
6956 "    calloc(16, 16);             /* Never freed--a memory leak */\n"
6957 "    exit(EXIT_SUCCESS);\n"
6958 "}\n"
6959 msgstr ""
6960 "    calloc(16, 16);             /* Never freed--a memory leak */\n"
6961 "    exit(EXIT_SUCCESS);\n"
6962 "}\n"
6963
6964 #. type: Plain text
6965 #: build/C/man3/mtrace.3:142
6966 msgid ""
6967 "When we run the program as follows, we see that B<mtrace>()  diagnosed "
6968 "memory leaks at two different locations in the program:"
6969 msgstr ""
6970
6971 #. type: Plain text
6972 #: build/C/man3/mtrace.3:155
6973 #, no-wrap
6974 msgid ""
6975 "$ B<cc -g t_mtrace.c -o t_mtrace>\n"
6976 "$ B<export MALLOC_TRACE=/tmp/t>\n"
6977 "$ B<./t_mtrace>\n"
6978 "$ B<mtrace ./t_mtrace $MALLOC_TRACE>\n"
6979 "Memory not freed:\n"
6980 "-----------------\n"
6981 "   Address     Size     Caller\n"
6982 "0x084c9378     0x64  at /home/cecilia/t_mtrace.c:12\n"
6983 "0x084c93e0     0x64  at /home/cecilia/t_mtrace.c:12\n"
6984 "0x084c9448    0x100  at /home/cecilia/t_mtrace.c:16\n"
6985 msgstr ""
6986 "$ B<cc -g t_mtrace.c -o t_mtrace>\n"
6987 "$ B<export MALLOC_TRACE=/tmp/t>\n"
6988 "$ B<./t_mtrace>\n"
6989 "$ B<mtrace ./t_mtrace $MALLOC_TRACE>\n"
6990 "Memory not freed:\n"
6991 "-----------------\n"
6992 "   Address     Size     Caller\n"
6993 "0x084c9378     0x64  at /home/cecilia/t_mtrace.c:12\n"
6994 "0x084c93e0     0x64  at /home/cecilia/t_mtrace.c:12\n"
6995 "0x084c9448    0x100  at /home/cecilia/t_mtrace.c:16\n"
6996
6997 #. type: Plain text
6998 #: build/C/man3/mtrace.3:167
6999 msgid ""
7000 "The first two messages about unfreed memory correspond to the two B<malloc>"
7001 "(3)  calls inside the I<for> loop.  The final message corresponds to the "
7002 "call to B<calloc>(3)  (which in turn calls B<malloc>(3))."
7003 msgstr ""
7004
7005 #. type: Plain text
7006 #: build/C/man3/mtrace.3:172
7007 msgid "B<mtrace>(1), B<malloc>(3), B<malloc_hook>(3), B<mcheck>(3)"
7008 msgstr "B<mtrace>(1), B<malloc>(3), B<malloc_hook>(3), B<mcheck>(3)"
7009
7010 #. type: TH
7011 #: build/C/man2/posix_fadvise.2:28
7012 #, no-wrap
7013 msgid "POSIX_FADVISE"
7014 msgstr "POSIX_FADVISE"
7015
7016 #. type: TH
7017 #: build/C/man2/posix_fadvise.2:28 build/C/man2/sync_file_range.2:30
7018 #, no-wrap
7019 msgid "2010-10-09"
7020 msgstr "2010-10-09"
7021
7022 #. type: Plain text
7023 #: build/C/man2/posix_fadvise.2:31
7024 msgid "posix_fadvise - predeclare an access pattern for file data"
7025 msgstr "posix_fadvise - ファイルデータのアクセスパターンをあらかじめ宣言する"
7026
7027 #. type: Plain text
7028 #: build/C/man2/posix_fadvise.2:34 build/C/man3/posix_fallocate.3:31
7029 #, no-wrap
7030 msgid "B<#include E<lt>fcntl.hE<gt>>\n"
7031 msgstr "B<#include E<lt>fcntl.hE<gt>>\n"
7032
7033 #. type: Plain text
7034 #: build/C/man2/posix_fadvise.2:37
7035 #, no-wrap
7036 msgid "B<int posix_fadvise(int >I<fd>B<, off_t >I<offset>B<, off_t >I<len>B<, int >I<advice>B<);>\n"
7037 msgstr "B<int posix_fadvise(int >I<fd>B<, off_t >I<offset>B<, off_t >I<len>B<, int >I<advice>B<);>\n"
7038
7039 #. type: Plain text
7040 #: build/C/man2/posix_fadvise.2:46
7041 msgid "B<posix_fadvise>():"
7042 msgstr "B<posix_fadvise>():"
7043
7044 #. type: Plain text
7045 #: build/C/man2/posix_fadvise.2:48 build/C/man3/posix_fallocate.3:44
7046 msgid "_XOPEN_SOURCE\\ E<gt>=\\ 600 || _POSIX_C_SOURCE\\ E<gt>=\\ 200112L"
7047 msgstr "_XOPEN_SOURCE\\ E<gt>=\\ 600 || _POSIX_C_SOURCE\\ E<gt>=\\ 200112L"
7048
7049 #. type: Plain text
7050 #: build/C/man2/posix_fadvise.2:56
7051 msgid ""
7052 "Programs can use B<posix_fadvise>()  to announce an intention to access file "
7053 "data in a specific pattern in the future, thus allowing the kernel to "
7054 "perform appropriate optimizations."
7055 msgstr ""
7056 "プログラムは、将来特定のパターンでファイルデータに アクセスする意思を伝えるた"
7057 "めに B<posix_fadvise>()  を使うことができる。 これにより、カーネルが適切な最"
7058 "適化を実行することが可能になる。"
7059
7060 #. type: Plain text
7061 #: build/C/man2/posix_fadvise.2:63
7062 msgid ""
7063 "The I<advice> applies to a (not necessarily existent) region starting at "
7064 "I<offset> and extending for I<len> bytes (or until the end of the file if "
7065 "I<len> is 0) within the file referred to by I<fd>.  The I<advice> is not "
7066 "binding; it merely constitutes an expectation on behalf of the application."
7067 msgstr ""
7068 "I<advice> は I<fd> が参照しているファイルの I<offset> から始まる I<len> バ"
7069 "イ\n"
7070 "トの範囲内 (I<len> が 0 の場合はファイルの終りまで) の (必ずしも存在しない)\n"
7071 "領域に適用される。 I<advice> は義務づけではない。 I<advice> は単にアプリ"
7072 "ケー\n"
7073 "ションのために可能性を構成するだけである。"
7074
7075 #. type: Plain text
7076 #: build/C/man2/posix_fadvise.2:65
7077 msgid "Permissible values for I<advice> include:"
7078 msgstr "I<advice> に許される値には、以下のものが含まれる:"
7079
7080 #. type: TP
7081 #: build/C/man2/posix_fadvise.2:65
7082 #, no-wrap
7083 msgid "B<POSIX_FADV_NORMAL>"
7084 msgstr "B<POSIX_FADV_NORMAL>"
7085
7086 #. type: Plain text
7087 #: build/C/man2/posix_fadvise.2:71
7088 msgid ""
7089 "Indicates that the application has no advice to give about its access "
7090 "pattern for the specified data.  If no advice is given for an open file, "
7091 "this is the default assumption."
7092 msgstr ""
7093 "指定されたデータのアクセスパターンを指示するアドバイスを アプリケーションが何"
7094 "も持っていないことを示す。 オープンされたファイルにアドバイスが指定されない場"
7095 "合、 これがデフォルトで仮定される。"
7096
7097 #. type: TP
7098 #: build/C/man2/posix_fadvise.2:71
7099 #, no-wrap
7100 msgid "B<POSIX_FADV_SEQUENTIAL>"
7101 msgstr "B<POSIX_FADV_SEQUENTIAL>"
7102
7103 #. type: Plain text
7104 #: build/C/man2/posix_fadvise.2:75
7105 msgid ""
7106 "The application expects to access the specified data sequentially (with "
7107 "lower offsets read before higher ones)."
7108 msgstr ""
7109 "アプリケーションは指定されたデータがシーケンシャルに (大きなオフセットの前に"
7110 "小さなオフセットのデータを読むように)  アクセスされることを期待する。"
7111
7112 #. type: TP
7113 #: build/C/man2/posix_fadvise.2:75
7114 #, no-wrap
7115 msgid "B<POSIX_FADV_RANDOM>"
7116 msgstr "B<POSIX_FADV_RANDOM>"
7117
7118 #. type: Plain text
7119 #: build/C/man2/posix_fadvise.2:78
7120 msgid "The specified data will be accessed in random order."
7121 msgstr "指定されたデータがランダムな順番でアクセスされる。"
7122
7123 #. type: TP
7124 #: build/C/man2/posix_fadvise.2:78
7125 #, no-wrap
7126 msgid "B<POSIX_FADV_NOREUSE>"
7127 msgstr "B<POSIX_FADV_NOREUSE>"
7128
7129 #. type: Plain text
7130 #: build/C/man2/posix_fadvise.2:81
7131 msgid "The specified data will be accessed only once."
7132 msgstr "指定されたデータは 1 度しかアクセスされない。"
7133
7134 #. type: TP
7135 #: build/C/man2/posix_fadvise.2:81
7136 #, no-wrap
7137 msgid "B<POSIX_FADV_WILLNEED>"
7138 msgstr "B<POSIX_FADV_WILLNEED>"
7139
7140 #. type: Plain text
7141 #: build/C/man2/posix_fadvise.2:84
7142 msgid "The specified data will be accessed in the near future."
7143 msgstr "指定されたデータは近い将来アクセスされる。"
7144
7145 #. type: TP
7146 #: build/C/man2/posix_fadvise.2:84
7147 #, no-wrap
7148 msgid "B<POSIX_FADV_DONTNEED>"
7149 msgstr "B<POSIX_FADV_DONTNEED>"
7150
7151 #. type: Plain text
7152 #: build/C/man2/posix_fadvise.2:87
7153 msgid "The specified data will not be accessed in the near future."
7154 msgstr "指定されたデータは近い将来アクセスされない。"
7155
7156 #. type: Plain text
7157 #: build/C/man2/posix_fadvise.2:90
7158 msgid "On success, zero is returned.  On error, an error number is returned."
7159 msgstr "成功した場合は 0 が返される。 失敗した場合はエラー番号が返される。"
7160
7161 #. type: Plain text
7162 #: build/C/man2/posix_fadvise.2:94
7163 msgid "The I<fd> argument was not a valid file descriptor."
7164 msgstr "I<fd> 引き数が有効なファイルディスクリプタでない。"
7165
7166 #. type: Plain text
7167 #: build/C/man2/posix_fadvise.2:97
7168 msgid "An invalid value was specified for I<advice>."
7169 msgstr "無効な値が I<advice> に指定された。"
7170
7171 #. type: Plain text
7172 #: build/C/man2/posix_fadvise.2:104
7173 msgid ""
7174 "The specified file descriptor refers to a pipe or FIFO.  (Linux actually "
7175 "returns B<EINVAL> in this case.)"
7176 msgstr ""
7177 "指定されたファイルディスクリプタがパイプまたは FIFO を参照している (この場"
7178 "合、Linux は実際には B<EINVAL> を返す)。"
7179
7180 #.  of fadvise64_64()
7181 #. type: Plain text
7182 #: build/C/man2/posix_fadvise.2:112
7183 msgid ""
7184 "Kernel support first appeared in Linux 2.5.60; the underlying system call is "
7185 "called B<fadvise64>().  Library support has been provided since glibc "
7186 "version 2.2, via the wrapper function B<posix_fadvise>()."
7187 msgstr ""
7188 "カーネルによるサポートは Linux 2.5.60 で最初に登場し、\n"
7189 "対応するシステムコールは B<fadvise64>() という名前である。\n"
7190 "ライブラリによるサポートは glibc バージョン 2.2 以降で提供されており、\n"
7191 "ラッパー関数は B<posix_fadvise>() という名前である。"
7192
7193 #. type: Plain text
7194 #: build/C/man2/posix_fadvise.2:121
7195 msgid ""
7196 "POSIX.1-2001.  Note that the type of the I<len> argument was changed from "
7197 "I<size_t> to I<off_t> in POSIX.1-2003 TC1."
7198 msgstr ""
7199 "POSIX.1-2001.  I<len> 引き数の型が POSIX.1-2003 TC1 において I<size_t> から "
7200 "I<off_t> に変更された点に注意すること。"
7201
7202 #. type: Plain text
7203 #: build/C/man2/posix_fadvise.2:127
7204 msgid ""
7205 "Under Linux, B<POSIX_FADV_NORMAL> sets the readahead window to the default "
7206 "size for the backing device; B<POSIX_FADV_SEQUENTIAL> doubles this size, and "
7207 "B<POSIX_FADV_RANDOM> disables file readahead entirely.  These changes affect "
7208 "the entire file, not just the specified region (but other open file handles "
7209 "to the same file are unaffected)."
7210 msgstr ""
7211 "Linux では、B<POSIX_FADV_NORMAL> はバッキングデバイスの デフォルトサイズに先"
7212 "読み (readahead) ウインドウを設定する。 B<POSIX_FADV_SEQUENTIAL> はこのサイズ"
7213 "を 2 倍し、 B<POSIX_FADV_RANDOM> は先読みを全く無効にする。 これらの変更は"
7214 "ファイル全体に影響し、指定された領域のみに影響するわけではない (しかし同じ"
7215 "ファイルに対する他のオープンファイルハンドルは影響を受けない)。"
7216
7217 #. type: Plain text
7218 #: build/C/man2/posix_fadvise.2:134
7219 msgid ""
7220 "B<POSIX_FADV_WILLNEED> initiates a nonblocking read of the specified region "
7221 "into the page cache.  The amount of data read may be decreased by the kernel "
7222 "depending on virtual memory load.  (A few megabytes will usually be fully "
7223 "satisfied, and more is rarely useful.)"
7224 msgstr ""
7225 "B<POSIX_FADV_WILLNEED> は、 ページキャッシュに指定領域のブロックされない読み"
7226 "込みを開始する。 読み込まれるデータの総量は、 仮想メモリの負荷に依ってカーネ"
7227 "ルが減らすかもしれない (数メガバイトであれば通常は全く十分であり、 それより多"
7228 "くてもめったに役に立たない)。"
7229
7230 #. type: Plain text
7231 #: build/C/man2/posix_fadvise.2:138
7232 msgid ""
7233 "In kernels before 2.6.18, B<POSIX_FADV_NOREUSE> had the same semantics as "
7234 "B<POSIX_FADV_WILLNEED>.  This was probably a bug; since kernel 2.6.18, this "
7235 "flag is a no-op."
7236 msgstr ""
7237 "2.6.18 より前のカーネルでは、B<POSIX_FADV_NOREUSE> は B<POSIX_FADV_WILLNEED> "
7238 "と同じ意味であった。 これは多分バグであった。 カーネル 2.6.18 以降では、この"
7239 "フラグは何も行わない。"
7240
7241 #. type: Plain text
7242 #: build/C/man2/posix_fadvise.2:146
7243 msgid ""
7244 "B<POSIX_FADV_DONTNEED> attempts to free cached pages associated with the "
7245 "specified region.  This is useful, for example, while streaming large "
7246 "files.  A program may periodically request the kernel to free cached data "
7247 "that has already been used, so that more useful cached pages are not "
7248 "discarded instead."
7249 msgstr ""
7250 "B<POSIX_FADV_DONTNEED> は指定された領域に関連付けられた キャッシュページを解"
7251 "放しようとする。 例えば、これは大きなファイルをストリーミングするときに役立"
7252 "つ。 プログラムは、使用済みのキャッシュされたデータを解放するように、 定期的"
7253 "にカーネルに要求するかもしれない。 そうすることにより、さらに有効なキャッシュ"
7254 "されたページが、 代わりに破棄されることはない。"
7255
7256 #. type: Plain text
7257 #: build/C/man2/posix_fadvise.2:154
7258 msgid ""
7259 "Pages that have not yet been written out will be unaffected, so if the "
7260 "application wishes to guarantee that pages will be released, it should call "
7261 "B<fsync>(2)  or B<fdatasync>(2)  first."
7262 msgstr ""
7263 "まだ書き出されていないページは影響を受けないので、 そのページの解放が保証され"
7264 "ることをアプリケーションが望んでいるなら、 最初に B<fsync>(2)  または "
7265 "B<fdatasync>(2)  を呼ぶべきである。"
7266
7267 #. type: SS
7268 #: build/C/man2/posix_fadvise.2:154
7269 #, no-wrap
7270 msgid "arm_fadvise()"
7271 msgstr "arm_fadvise()"
7272
7273 #. type: Plain text
7274 #: build/C/man2/posix_fadvise.2:166
7275 msgid ""
7276 "The ARM architecture needs 64-bit arguments to be aligned in a suitable pair "
7277 "of registers.  On this architecture, the call signature of B<posix_fadvise>"
7278 "()  is flawed, since it forces a register to be wasted as padding between "
7279 "the I<fd> and I<len> arguments.  Therefore, since Linux 2.6.14, ARM defines "
7280 "a different system call that orders the arguments suitably:"
7281 msgstr ""
7282 "ARM アーキテクチャでは、64 ビットの引き数は適切なレジスタの組に割り当て\n"
7283 "る必要がある。このアーキテクチャでは、B<posix_fadvise>() の呼び出し方に\n"
7284 "は欠陥があり、それはこのシステムコールでは引き数 I<fd> と I<len> の間の\n"
7285 "パディング (詰めもの) でレジスタが一つ消費されてしまうというものである。\n"
7286 "そのため、Linux 2.6.14 以降では、ARM では引き数が適切な順序になった別の\n"
7287 "システムコールが定義されている。"
7288
7289 #. type: Plain text
7290 #: build/C/man2/posix_fadvise.2:171
7291 #, no-wrap
7292 msgid ""
7293 "B<long arm_fadvise64_64(int >I<fd>B<, int >I<advice>B<,>\n"
7294 "B<                      loff_t >I<offset>B<, loff_t >I<len>B<);>\n"
7295 msgstr ""
7296 "B<long arm_fadvise64_64(int >I<fd>B<, int >I<advice>B<,>\n"
7297 "B<                      loff_t >I<offset>B<, loff_t >I<len>B<);>\n"
7298
7299 #.  No ARM support in glibc.
7300 #. type: Plain text
7301 #: build/C/man2/posix_fadvise.2:178
7302 msgid ""
7303 "The behavior of this system call is otherwise exactly the same as "
7304 "B<posix_fadvise>().  No library support is provided for this system call in "
7305 "glibc."
7306 msgstr ""
7307 "上記の点以外は、このシステムコールの動作は B<posix_fadvise>() と全く\n"
7308 "同じである。このシステムコールに対するライブラリによるサポートは glibc\n"
7309 "では提供されていない。"
7310
7311 #. type: Plain text
7312 #: build/C/man2/posix_fadvise.2:183
7313 msgid ""
7314 "In kernels before 2.6.6, if I<len> was specified as 0, then this was "
7315 "interpreted literally as \"zero bytes\", rather than as meaning \"all bytes "
7316 "through to the end of the file\"."
7317 msgstr ""
7318 "2.6.6 より前のカーネルでは、 I<len> に 0 が指定された場合、 「ファイルの終り"
7319 "までの全てのバイト」という意味ではなく、 文字通り「0 バイト」として解釈されて"
7320 "いた。"
7321
7322 #.  FIXME . Write a posix_fadvise(3) page.
7323 #. type: Plain text
7324 #: build/C/man2/posix_fadvise.2:189
7325 msgid ""
7326 "B<readahead>(2), B<sync_file_range>(2), B<posix_fallocate>(3), "
7327 "B<posix_madvise>(3)"
7328 msgstr ""
7329 "B<readahead>(2), B<sync_file_range>(2), B<posix_fallocate>(3),\n"
7330 "B<posix_madvise>(3)"
7331
7332 #. type: TH
7333 #: build/C/man3/posix_fallocate.3:25
7334 #, no-wrap
7335 msgid "POSIX_FALLOCATE"
7336 msgstr "POSIX_FALLOCATE"
7337
7338 #. type: Plain text
7339 #: build/C/man3/posix_fallocate.3:28
7340 msgid "posix_fallocate - allocate file space"
7341 msgstr "posix_fallocate - ファイルのスペースを確保する"
7342
7343 #. type: Plain text
7344 #: build/C/man3/posix_fallocate.3:33
7345 #, no-wrap
7346 msgid "B<int posix_fallocate(int >I<fd>B<, off_t >I<offset>B<, off_t >I<len>B<);>\n"
7347 msgstr "B<int posix_fallocate(int >I<fd>B<, off_t >I<offset>B<, off_t >I<len>B<);>\n"
7348
7349 #. type: Plain text
7350 #: build/C/man3/posix_fallocate.3:42
7351 msgid "B<posix_fallocate>():"
7352 msgstr "B<posix_fallocate>():"
7353
7354 #. type: Plain text
7355 #: build/C/man3/posix_fallocate.3:61
7356 msgid ""
7357 "The function B<posix_fallocate>()  ensures that disk space is allocated for "
7358 "the file referred to by the descriptor I<fd> for the bytes in the range "
7359 "starting at I<offset> and continuing for I<len> bytes.  After a successful "
7360 "call to B<posix_fallocate>(), subsequent writes to bytes in the specified "
7361 "range are guaranteed not to fail because of lack of disk space."
7362 msgstr ""
7363 "関数 B<posix_fallocate>()  は、ディスクリプタ I<fd> で参照されるファイルに対"
7364 "して、ディスクスペースを確実に確保する。 ディスクスペースは I<offset> から始"
7365 "まる I<len> バイトの範囲のバイトである。 B<posix_fallocate>()  の呼び出しが成"
7366 "功した後、指定された範囲のバイトに対する書き込みは、 ディスクスペースの不足で"
7367 "失敗しないことが保証される。"
7368
7369 #. type: Plain text
7370 #: build/C/man3/posix_fallocate.3:66
7371 msgid ""
7372 "If the size of the file is less than I<offset>+I<len>, then the file is "
7373 "increased to this size; otherwise the file size is left unchanged."
7374 msgstr ""
7375 "ファイルのサイズが I<offset>+I<len> より小さい場合、ファイルはこのサイズにな"
7376 "るように拡大される。 それ以外の場合、ファイルサイズは変わらない。"
7377
7378 #. type: Plain text
7379 #: build/C/man3/posix_fallocate.3:72
7380 msgid ""
7381 "B<posix_fallocate>()  returns zero on success, or an error number on "
7382 "failure.  Note that I<errno> is not set."
7383 msgstr ""
7384 "B<posix_fallocate>()  は成功した場合、0 を返す。 失敗した場合、エラー番号を返"
7385 "す。 I<errno> が設定されない点に注意すること。"
7386
7387 #. type: Plain text
7388 #: build/C/man3/posix_fallocate.3:81
7389 msgid "I<offset+len> exceeds the maximum file size."
7390 msgstr "I<offset+len> が最大ファイルサイズを超えている。"
7391
7392 #. type: Plain text
7393 #: build/C/man3/posix_fallocate.3:91
7394 msgid "I<fd> does not refer to a regular file."
7395 msgstr "I<fd> が通常のファイルとして参照されていない。"
7396
7397 #. type: Plain text
7398 #: build/C/man3/posix_fallocate.3:100
7399 msgid "I<fd> refers to a pipe."
7400 msgstr "I<fd> がパイプを参照している。"
7401
7402 #. type: Plain text
7403 #: build/C/man3/posix_fallocate.3:103
7404 msgid "B<posix_fallocate>()  is available since glibc 2.1.94."
7405 msgstr "B<posix_fallocate>()  は glibc 2.1.94 以降で利用可能である。"
7406
7407 #. type: Plain text
7408 #: build/C/man3/posix_fallocate.3:128
7409 msgid ""
7410 "POSIX.1-2008 says that an implementation I<shall> give the B<EINVAL> error "
7411 "if I<len> was 0, or I<offset> was less than 0.  POSIX.1-2001 says that an "
7412 "implementation I<shall> give the B<EINVAL> error if I<len> is less than 0, "
7413 "or I<offset> was less than 0, and I<may> give the error if I<len> equals "
7414 "zero."
7415 msgstr ""
7416 "POSIX.1-2008 では、 I<len> が 0 の場合、もしくは I<offset> が 0 未満の場合、 "
7417 "B<EINVAL> エラーを返すものとされている。 POSIX.1-2001 では、 I<len> が 0 未満"
7418 "の場合、もしくは I<offset> が 0 未満の場合、 B<EINVAL> エラーを返すものとされ"
7419 "ている。また、 I<len> が 0 の場合、 B<EINVAL> エラーを返してもよいとされてい"
7420 "る。"
7421
7422 #. type: Plain text
7423 #: build/C/man3/posix_fallocate.3:133
7424 #, fuzzy
7425 #| msgid "B<fallocate>(2), B<lseek>(2), B<posix_fadvise>(2)"
7426 msgid "B<fallocate>(1), B<fallocate>(2), B<lseek>(2), B<posix_fadvise>(2)"
7427 msgstr "B<fallocate>(2), B<lseek>(2), B<posix_fadvise>(2)"
7428
7429 #. type: TH
7430 #: build/C/man3/posix_memalign.3:29
7431 #, no-wrap
7432 msgid "POSIX_MEMALIGN"
7433 msgstr "POSIX_MEMALIGN"
7434
7435 #. type: TH
7436 #: build/C/man3/posix_memalign.3:29
7437 #, no-wrap
7438 msgid "2012-03-23"
7439 msgstr "2012-03-23"
7440
7441 #. type: Plain text
7442 #: build/C/man3/posix_memalign.3:32
7443 #, fuzzy
7444 #| msgid ""
7445 #| "posix_memalign, aligned_alloc, memalign, valloc, pvalloc - Allocate "
7446 #| "aligned memory"
7447 msgid ""
7448 "posix_memalign, aligned_alloc, memalign, valloc, pvalloc - allocate aligned "
7449 "memory"
7450 msgstr ""
7451 "posix_memalign, aligned_alloc, memalign, valloc, pvalloc - アラインメント\n"
7452 "されたメモリの割り当てを行う"
7453
7454 #. type: Plain text
7455 #: build/C/man3/posix_memalign.3:39
7456 #, no-wrap
7457 msgid ""
7458 "B<int posix_memalign(void **>I<memptr>B<, size_t >I<alignment>B<, size_t >I<size>B<);>\n"
7459 "B<void *aligned_alloc(size_t >I<alignment>B<, size_t >I<size>B<);>\n"
7460 "B<void *valloc(size_t >I<size>B<);>\n"
7461 msgstr ""
7462 "B<int posix_memalign(void **>I<memptr>B<, size_t >I<alignment>B<, size_t >I<size>B<);>\n"
7463 "B<void *aligned_alloc(size_t >I<alignment>B<, size_t >I<size>B<);>\n"
7464 "B<void *valloc(size_t >I<size>B<);>\n"
7465
7466 #. type: Plain text
7467 #: build/C/man3/posix_memalign.3:44
7468 #, no-wrap
7469 msgid ""
7470 "B<void *memalign(size_t >I<alignment>B<, size_t >I<size>B<);>\n"
7471 "B<void *pvalloc(size_t >I<size>B<);>\n"
7472 msgstr ""
7473 "B<void *memalign(size_t >I<alignment>B<, size_t >I<size>B<);>\n"
7474 "B<void *pvalloc(size_t >I<size>B<);>\n"
7475
7476 #. type: Plain text
7477 #: build/C/man3/posix_memalign.3:54
7478 msgid ""
7479 "B<posix_memalign>(): _POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ "
7480 "E<gt>=\\ 600"
7481 msgstr ""
7482 "B<posix_memalign>(): _POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ "
7483 "E<gt>=\\ 600"
7484
7485 #. type: Plain text
7486 #: build/C/man3/posix_memalign.3:57
7487 msgid "B<aligned_alloc>(): _ISOC11_SOURCE"
7488 msgstr "B<aligned_alloc>(): _ISOC11_SOURCE"
7489
7490 #. type: Plain text
7491 #: build/C/man3/posix_memalign.3:59
7492 msgid "B<valloc>():"
7493 msgstr "B<valloc>():"
7494
7495 #. type: TP
7496 #: build/C/man3/posix_memalign.3:62
7497 #, no-wrap
7498 msgid "Since glibc 2.12:"
7499 msgstr "glibc 2.12 以降:"
7500
7501 #. type: Plain text
7502 #: build/C/man3/posix_memalign.3:69
7503 #, no-wrap
7504 msgid ""
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 msgstr ""
7510 "_BSD_SOURCE ||\n"
7511 "    (_XOPEN_SOURCE\\ E<gt>=\\ 500 ||\n"
7512 "        _XOPEN_SOURCE\\ &&\\ _XOPEN_SOURCE_EXTENDED) &&\n"
7513 "    !(_POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ E<gt>=\\ 600)\n"
7514
7515 #. type: TP
7516 #: build/C/man3/posix_memalign.3:71
7517 #, no-wrap
7518 msgid "Before glibc 2.12:"
7519 msgstr "glibc 2.12 より前:"
7520
7521 #. type: Plain text
7522 #: build/C/man3/posix_memalign.3:75
7523 msgid ""
7524 "_BSD_SOURCE || _XOPEN_SOURCE\\ E<gt>=\\ 500 || _XOPEN_SOURCE\\ &&\\ "
7525 "_XOPEN_SOURCE_EXTENDED"
7526 msgstr ""
7527 "_BSD_SOURCE || _XOPEN_SOURCE\\ E<gt>=\\ 500 || _XOPEN_SOURCE\\ &&\\ "
7528 "_XOPEN_SOURCE_EXTENDED"
7529
7530 #. type: Plain text
7531 #: build/C/man3/posix_memalign.3:82
7532 msgid ""
7533 "(The (nonstandard) header file I<E<lt>malloc.hE<gt>> also exposes the "
7534 "declaration of B<valloc>(); no feature test macros are required.)"
7535 msgstr ""
7536 "((非標準の) ヘッダファイル I<E<lt>malloc.hE<gt>> も\n"
7537 "B<valloc>() の宣言も公開する。機能検査マクロは不要である。"
7538
7539 #.  glibc does this:
7540 #. type: Plain text
7541 #: build/C/man3/posix_memalign.3:103
7542 msgid ""
7543 "The function B<posix_memalign>()  allocates I<size> bytes and places the "
7544 "address of the allocated memory in I<*memptr>.  The address of the allocated "
7545 "memory will be a multiple of I<alignment>, which must be a power of two and "
7546 "a multiple of I<sizeof(void *)>.  If I<size> is 0, then B<posix_memalign>()  "
7547 "returns either NULL, or a unique pointer value that can later be "
7548 "successfully passed to B<free>(3)."
7549 msgstr ""
7550 "関数 B<posix_memalign>()  は、 I<size> バイトのメモリを割り当て、割り当てられ"
7551 "たメモリのアドレスを I<*memptr> に設定する。 割り当てられたメモリのアドレス"
7552 "は I<alignment> の倍数になっているはずである。 I<alignment> は 2 のべき乗で、"
7553 "かつ I<sizeof(void *)> の倍数でなければならない。 I<size> が 0 の場合、 "
7554 "B<posix_memalign>()  は NULL か一意なポインタ値を返す。 このポインタ値は、後"
7555 "で B<free>(3)  に問題なく渡すことができる。"
7556
7557 #.  The behavior of memalign() for size==0 is as for posix_memalign()
7558 #.  but no standards govern this.
7559 #. type: Plain text
7560 #: build/C/man3/posix_memalign.3:114
7561 msgid ""
7562 "The obsolete function B<memalign>()  allocates I<size> bytes and returns a "
7563 "pointer to the allocated memory.  The memory address will be a multiple of "
7564 "I<alignment>, which must be a power of two."
7565 msgstr ""
7566 "廃止された関数である B<memalign>() は、 I<size> バイトのメモリを割り当て、\n"
7567 "割り当てられたメモリへのポインタを返す。 メモリのアドレスは I<alignment> \n"
7568 "の倍数になっているはずである。 I<alignment> は 2 のべき乗でなければならない。"
7569
7570 #. type: Plain text
7571 #: build/C/man3/posix_memalign.3:123
7572 msgid ""
7573 "The function B<aligned_alloc>()  is the same as B<memalign>(), except for "
7574 "the added restriction that I<size> should be a multiple of I<alignment>."
7575 msgstr ""
7576 "関数 B<aligned_alloc>() は B<memalign>() と同じだが、I<size> が "
7577 "I<alignment>\n"
7578 "の倍数でなければならないという追加の制限がある点が異なる。"
7579
7580 #. type: Plain text
7581 #: build/C/man3/posix_memalign.3:132
7582 msgid ""
7583 "The obsolete function B<valloc>()  allocates I<size> bytes and returns a "
7584 "pointer to the allocated memory.  The memory address will be a multiple of "
7585 "the page size.  It is equivalent to I<memalign(sysconf(_SC_PAGESIZE),size)>."
7586 msgstr ""
7587 "廃止された関数である B<valloc>()  は I<size> バイトのメモリを割り当て、割り当"
7588 "てられたメモリへのポインタを返す。 メモリのアドレスはページサイズの倍数になっ"
7589 "ているはずである。 これは I<memalign(sysconf(_SC_PAGESIZE),size)> と等価であ"
7590 "る。"
7591
7592 #. type: Plain text
7593 #: build/C/man3/posix_memalign.3:139
7594 msgid ""
7595 "The obsolete function B<pvalloc>()  is similar to B<valloc>(), but rounds "
7596 "the size of the allocation up to the next multiple of the system page size."
7597 msgstr ""
7598 "廃止された関数 B<pvalloc>() は B<valloc>() と同様だが、\n"
7599 "割り当てられるサイズがシステムのページサイズの倍数に切り上げられる。"
7600
7601 #. type: Plain text
7602 #: build/C/man3/posix_memalign.3:141
7603 msgid "For all of these functions, the memory is not zeroed."
7604 msgstr "これらの関数はいずれもメモリのゼロクリアを行わない。"
7605
7606 #. type: Plain text
7607 #: build/C/man3/posix_memalign.3:148
7608 msgid ""
7609 "B<aligned_alloc>(), B<memalign>(), B<valloc>(), and B<pvalloc>()  return a "
7610 "pointer to the allocated memory, or NULL if the request fails."
7611 msgstr ""
7612 "B<aligned_alloc>(), B<memalign>(), B<valloc>(), B<pvalloc>() は割り当てられ"
7613 "た\n"
7614 "メモリへのポインタを返す。 割り当てに失敗した場合は NULL を返す。"
7615
7616 #. type: Plain text
7617 #: build/C/man3/posix_memalign.3:155
7618 msgid ""
7619 "B<posix_memalign>()  returns zero on success, or one of the error values "
7620 "listed in the next section on failure.  Note that I<errno> is not set."
7621 msgstr ""
7622 "B<posix_memalign>()  は成功した場合は 0 を返し、 失敗した場合は次のセクション"
7623 "に記載されたエラー値のいずれかを返す。 I<errno> はセットされないことに注意す"
7624 "ること。"
7625
7626 #. type: Plain text
7627 #: build/C/man3/posix_memalign.3:162
7628 msgid ""
7629 "The I<alignment> argument was not a power of two, or was not a multiple of "
7630 "I<sizeof(void *)>."
7631 msgstr ""
7632 "I<alignment> 引き数が 2 のべき乗でなかったか、 I<sizeof(void *)> の倍数でな"
7633 "かった。"
7634
7635 #. type: Plain text
7636 #: build/C/man3/posix_memalign.3:165
7637 msgid "There was insufficient memory to fulfill the allocation request."
7638 msgstr "割り当て要求を満たすのに十分なメモリがなかった。"
7639
7640 #. type: Plain text
7641 #: build/C/man3/posix_memalign.3:172
7642 msgid ""
7643 "The functions B<memalign>(), B<valloc>(), and B<pvalloc>()  have been "
7644 "available in all Linux libc libraries."
7645 msgstr ""
7646 "関数 B<memalign>(), B<valloc>(), B<pvalloc>() は\n"
7647 "すべての Linux libc ライブラリで使用可能である。"
7648
7649 #. type: Plain text
7650 #: build/C/man3/posix_memalign.3:176
7651 msgid "The function B<aligned_alloc>()  was added to glibc in version 2.16."
7652 msgstr "関数 B<aligned_alloc>() は glibc バージョン 2.16 で追加された。"
7653
7654 #. type: Plain text
7655 #: build/C/man3/posix_memalign.3:180
7656 msgid "The function B<posix_memalign>()  is available since glibc 2.1.91."
7657 msgstr "関数 B<posix_fallocate>() は glibc 2.1.91 以降で利用可能である。"
7658
7659 #. type: Plain text
7660 #: build/C/man3/posix_memalign.3:187
7661 msgid ""
7662 "The function B<valloc>()  appeared in 3.0BSD.  It is documented as being "
7663 "obsolete in 4.3BSD, and as legacy in SUSv2.  It does not appear in "
7664 "POSIX.1-2001."
7665 msgstr ""
7666 "関数 B<valloc>() は 3.0BSD で登場した。4.3BSD では廃止されたと記載されてお"
7667 "り、\n"
7668 "SUSv2 では過去の名残だと記載されている。 POSIX.1-2001 には存在しない。"
7669
7670 #. type: Plain text
7671 #: build/C/man3/posix_memalign.3:191
7672 msgid "The function B<pvalloc>()  is a GNU extension."
7673 msgstr "関数 B<pvalloc>() は GNU による拡張である。"
7674
7675 #. type: Plain text
7676 #: build/C/man3/posix_memalign.3:195
7677 msgid "The function B<memalign>()  appears in SunOS 4.1.3 but not in 4.4BSD."
7678 msgstr "関数 B<memalign>() は SunOS 4.1.3 で登場したが、4.4BSD にはない。"
7679
7680 #. type: Plain text
7681 #: build/C/man3/posix_memalign.3:199
7682 msgid "The function B<posix_memalign>()  comes from POSIX.1d."
7683 msgstr "関数 B<posix_memalign>() は POSIX.1d に由来する。"
7684
7685 #. type: Plain text
7686 #: build/C/man3/posix_memalign.3:204
7687 msgid "The function B<aligned_alloc>()  is specified in the C11 standard."
7688 msgstr "関数 I<aligned_alloc>() は C11 標準で規定されている。"
7689
7690 #. type: SS
7691 #: build/C/man3/posix_memalign.3:204
7692 #, no-wrap
7693 msgid "Headers"
7694 msgstr "ヘッダ"
7695
7696 #. type: Plain text
7697 #: build/C/man3/posix_memalign.3:208
7698 msgid ""
7699 "Everybody agrees that B<posix_memalign>()  is declared in I<E<lt>stdlib."
7700 "hE<gt>>."
7701 msgstr ""
7702 "B<posix_memalign>()  の宣言を I<E<lt>stdlib.hE<gt>> で行うことに関しては、 皆"
7703 "の意見が一致している。"
7704
7705 #. type: Plain text
7706 #: build/C/man3/posix_memalign.3:212
7707 msgid ""
7708 "On some systems B<memalign>()  is declared in I<E<lt>stdlib.hE<gt>> instead "
7709 "of I<E<lt>malloc.hE<gt>>."
7710 msgstr ""
7711 "いくつかのシステムでは、 B<memalign>()  は I<E<lt>malloc.hE<gt>> ではなく "
7712 "I<E<lt>stdlib.hE<gt>> で宣言されている。"
7713
7714 #. type: Plain text
7715 #: build/C/man3/posix_memalign.3:219
7716 msgid ""
7717 "According to SUSv2, B<valloc>()  is declared in I<E<lt>stdlib.hE<gt>>.  "
7718 "Libc4,5 and glibc declare it in I<E<lt>malloc.hE<gt>>, and also in "
7719 "I<E<lt>stdlib.hE<gt>> if suitable feature test macros are defined (see "
7720 "above)."
7721 msgstr ""
7722 "SUSv2 によると、 B<valloc>() は I<E<lt>stdlib.hE<gt>> で宣言される。 "
7723 "libc4,5\n"
7724 "や glibc では I<E<lt>malloc.hE<gt>> で宣言されており、 さらに適切な機能検査\n"
7725 "マクロが定義された場合には I<E<lt>stdlib.hE<gt>> でも宣言される(上記を参照)。"
7726
7727 #. type: Plain text
7728 #: build/C/man3/posix_memalign.3:228
7729 msgid ""
7730 "On many systems there are alignment restrictions, for example, on buffers "
7731 "used for direct block device I/O.  POSIX specifies the I<pathconf(path,"
7732 "_PC_REC_XFER_ALIGN)> call that tells what alignment is needed.  Now one can "
7733 "use B<posix_memalign>()  to satisfy this requirement."
7734 msgstr ""
7735 "多くのシステムでは、アラインメントに関して制限がある。例えば、 ブロックデバイ"
7736 "スに対するダイレクト I/O に使用するバッファには アラインメントに関する制限が"
7737 "ある。 POSIX では、どんなアラインメントが必要かを知るために I<pathconf(path,"
7738 "_PC_REC_XFER_ALIGN)> コールを規定している。ここで B<posix_memalign>()  を使う"
7739 "と、この必要条件を満たすことができる。"
7740
7741 #. type: Plain text
7742 #: build/C/man3/posix_memalign.3:237
7743 msgid ""
7744 "B<posix_memalign>()  verifies that I<alignment> matches the requirements "
7745 "detailed above.  B<memalign>()  may not check that the I<alignment> argument "
7746 "is correct."
7747 msgstr ""
7748 "B<posix_memalign>() は I<alignment> が上で詳細に述べた必要条件を満たすか\n"
7749 "どうかを確かめる。 B<memalign>() は I<alignment> 引き数が正しいかどうかの\n"
7750 "確認を行わないかもしれない。"
7751
7752 #.  Other systems allow passing the result of
7753 #.  .IR valloc ()
7754 #.  to
7755 #.  .IR free (3),
7756 #.  but not to
7757 #.  .IR realloc (3).
7758 #. type: Plain text
7759 #: build/C/man3/posix_memalign.3:265
7760 msgid ""
7761 "POSIX requires that memory obtained from B<posix_memalign>()  can be freed "
7762 "using B<free>(3).  Some systems provide no way to reclaim memory allocated "
7763 "with B<memalign>()  or B<valloc>()  (because one can only pass to B<free>"
7764 "(3)  a pointer gotten from B<malloc>(3), while, for example, B<memalign>()  "
7765 "would call B<malloc>(3)  and then align the obtained value).  The glibc "
7766 "implementation allows memory obtained from any of these functions to be "
7767 "reclaimed with B<free>(3)."
7768 msgstr ""
7769 "POSIX では B<posix_memalign>() によって獲得したメモリは B<free>(3) を\n"
7770 "使って解放することができる必要がある。 いくつかのシステムでは\n"
7771 "B<memalign>() やB<valloc>() で割り当てられたメモリを再利用する手段が\n"
7772 "提供されていない(なぜなら B<free>(3) に渡すことができるのは\n"
7773 "B<malloc>(3) から受け取ったポインタだけだが、例えば B<memalign>() は\n"
7774 "B<malloc>(3) を呼び出し、得た値をアラインメントしてしまうからである)。\n"
7775 "glibc の実装では、 ここに述べた関数のいずれで獲得したメモリも\n"
7776 "B<free>(3) で再利用することができる。"
7777
7778 #. type: Plain text
7779 #: build/C/man3/posix_memalign.3:270
7780 msgid ""
7781 "The glibc B<malloc>(3)  always returns 8-byte aligned memory addresses, so "
7782 "these functions are only needed if you require larger alignment values."
7783 msgstr ""
7784 "glibc の B<malloc>(3) は常に 8 バイトにアラインメントされたメモリアドレスを\n"
7785 "返すので、ここで述べた関数が必要になるのは 8 バイトよりも大きなアラインメン"
7786 "ト\n"
7787 "が必要な場合だけである。"
7788
7789 #. type: Plain text
7790 #: build/C/man3/posix_memalign.3:275
7791 msgid "B<brk>(2), B<getpagesize>(2), B<free>(3), B<malloc>(3)"
7792 msgstr "B<brk>(2), B<getpagesize>(2), B<free>(3), B<malloc>(3)"
7793
7794 #. type: TH
7795 #: build/C/man2/readahead.2:28
7796 #, no-wrap
7797 msgid "READAHEAD"
7798 msgstr "READAHEAD"
7799
7800 #. type: TH
7801 #: build/C/man2/readahead.2:28 build/C/man7/shm_overview.7:27
7802 #, no-wrap
7803 msgid "2010-09-10"
7804 msgstr "2010-09-10"
7805
7806 #. type: Plain text
7807 #: build/C/man2/readahead.2:31
7808 msgid "readahead - perform file readahead into page cache"
7809 msgstr "readahead - 前もってファイルをページ・キャッシュに読み込む"
7810
7811 #. type: Plain text
7812 #: build/C/man2/readahead.2:37
7813 #, no-wrap
7814 msgid "B<ssize_t readahead(int >I<fd>B<, off64_t >I<offset>B<, size_t >I<count>B<);>\n"
7815 msgstr "B<ssize_t readahead(int >I<fd>B<, off64_t >I<offset>B<, size_t >I<count>B<);>\n"
7816
7817 #. type: Plain text
7818 #: build/C/man2/readahead.2:65
7819 msgid ""
7820 "B<readahead>()  populates the page cache with data from a file so that "
7821 "subsequent reads from that file will not block on disk I/O.  The I<fd> "
7822 "argument is a file descriptor identifying the file which is to be read.  The "
7823 "I<offset> argument specifies the starting point from which data is to be "
7824 "read and I<count> specifies the number of bytes to be read.  I/O is "
7825 "performed in whole pages, so that I<offset> is effectively rounded down to a "
7826 "page boundary and bytes are read up to the next page boundary greater than "
7827 "or equal to I<(offset+count)>.  B<readahead>()  does not read beyond the end "
7828 "of the file.  B<readahead>()  blocks until the specified data has been "
7829 "read.  The current file offset of the open file referred to by I<fd> is left "
7830 "unchanged."
7831 msgstr ""
7832 "B<readahead>()  は、この後の同じファイルからのデータ読み込み時にディスク I/O "
7833 "で 動作が停止 (block) しないように、前もってファイルの内容を ページ・キャッ"
7834 "シュに読み込む。 I<fd> 引き数は読み込みを行うファイルを識別するファイル・ディ"
7835 "スクリプタである。 I<offset> 引き数はデータの読み込み開始位置を指定し、 "
7836 "I<count> は読み込むデータのバイト数を指定する。 ディスク I/O はページ単位で実"
7837 "行されるので、 実際には I<offset> はページ境界に切り下げられ、読み込みバイト"
7838 "数は I<(offset+count)> より小さくない次のページ境界まで切り上げられる。 "
7839 "B<readahead>()  はファイルの末尾を越えた範囲まで読み出しを行うことはない。ま"
7840 "た、 B<readahead>()  は指定したデータの読み込みが終わるまで停止 (block) す"
7841 "る。 I<fd> で参照されたオープン済のファイルのファイルオフセットの現在値は 変"
7842 "更されない。"
7843
7844 #. type: Plain text
7845 #: build/C/man2/readahead.2:71
7846 msgid ""
7847 "On success, B<readahead>()  returns 0; on failure, -1 is returned, with "
7848 "I<errno> set to indicate the cause of the error."
7849 msgstr ""
7850 "B<readahead>()  は成功すると 0 を返す。失敗した場合 -1 を返し、 I<errno> にエ"
7851 "ラーの原因を示す値を設定する。"
7852
7853 #. type: Plain text
7854 #: build/C/man2/readahead.2:76
7855 msgid "I<fd> is not a valid file descriptor or is not open for reading."
7856 msgstr ""
7857 "I<fd> が有効なファイル・ディスクリプタでない、または 読み込み用にオープンされ"
7858 "ていない。"
7859
7860 #. type: Plain text
7861 #: build/C/man2/readahead.2:82
7862 msgid ""
7863 "I<fd> does not refer to a file type to which B<readahead>()  can be applied."
7864 msgstr ""
7865 "I<fd> が参照しているファイルが、 B<readahead>()  を行うことができないタイプの"
7866 "ファイルであった。"
7867
7868 #. type: Plain text
7869 #: build/C/man2/readahead.2:87
7870 msgid ""
7871 "The B<readahead>()  system call appeared in Linux 2.4.13; glibc support has "
7872 "been provided since version 2.3."
7873 msgstr ""
7874 "B<readahead>()  システムコールは Linux 2.4.13 で登場した。 glibc でのサポート"
7875 "は glibc バージョン 2.3 以降で行われている。"
7876
7877 #. type: Plain text
7878 #: build/C/man2/readahead.2:92
7879 msgid ""
7880 "The B<readahead>()  system call is Linux-specific, and its use should be "
7881 "avoided in portable applications."
7882 msgstr ""
7883 "B<readahead>()  システムコールは Linux 固有であり、移植を考慮したプログラムで"
7884 "は 使用を避けるべきである。"
7885
7886 #. type: Plain text
7887 #: build/C/man2/readahead.2:98
7888 msgid "B<lseek>(2), B<madvise>(2), B<mmap>(2), B<posix_fadvise>(2), B<read>(2)"
7889 msgstr ""
7890 "B<lseek>(2), B<madvise>(2), B<mmap>(2), B<posix_fadvise>(2), B<read>(2)"
7891
7892 #. type: TH
7893 #: build/C/man2/remap_file_pages.2:28
7894 #, no-wrap
7895 msgid "REMAP_FILE_PAGES"
7896 msgstr "REMAP_FILE_PAGES"
7897
7898 #. type: Plain text
7899 #: build/C/man2/remap_file_pages.2:31
7900 msgid "remap_file_pages - create a nonlinear file mapping"
7901 msgstr "remap_file_pages - 非線形ファイルマッピングを作成する。"
7902
7903 #. type: Plain text
7904 #: build/C/man2/remap_file_pages.2:35
7905 #, no-wrap
7906 msgid ""
7907 "B<#define _GNU_SOURCE>         /* See feature_test_macros(7) */\n"
7908 "B<#include E<lt>sys/mman.hE<gt>>\n"
7909 msgstr ""
7910 "B<#define _GNU_SOURCE>         /* feature_test_macros(7) 参照 */\n"
7911 "B<#include E<lt>sys/mman.hE<gt>>\n"
7912
7913 #. type: Plain text
7914 #: build/C/man2/remap_file_pages.2:38
7915 #, no-wrap
7916 msgid ""
7917 "B<int remap_file_pages(void *>I<addr>B<, size_t >I<size>B<, int >I<prot>B<,>\n"
7918 "B<                     ssize_t >I<pgoff>B<, int >I<flags>B<);>\n"
7919 msgstr ""
7920 "B<int remap_file_pages(void *>I<addr>B<, size_t >I<size>B<, int >I<prot>B<,>\n"
7921 "B<                     ssize_t >I<pgoff>B<, int >I<flags>B<);>\n"
7922
7923 #. type: Plain text
7924 #: build/C/man2/remap_file_pages.2:51
7925 msgid ""
7926 "The B<remap_file_pages>()  system call is used to create a nonlinear "
7927 "mapping, that is, a mapping in which the pages of the file are mapped into a "
7928 "nonsequential order in memory.  The advantage of using B<remap_file_pages>"
7929 "()  over using repeated calls to B<mmap>(2)  is that the former approach "
7930 "does not require the kernel to create additional VMA (Virtual Memory Area) "
7931 "data structures."
7932 msgstr ""
7933 "B<remap_file_pages>()  システムコールは非線形なマッピング、 つまりファイルの"
7934 "ページがメモリ上で連続しない順番でマップされる マッピングを作成するために使わ"
7935 "れる。 B<remap_file_pages>()  を使う方が B<mmap>(2)  を繰り返して使うより優れ"
7936 "ている点は、 前者の方法ではカーネルが VMA (Virtual Memory Area, 仮想メモリ領"
7937 "域)  データ構造体を追加で作成する必要がないことである。"
7938
7939 #. type: Plain text
7940 #: build/C/man2/remap_file_pages.2:53
7941 msgid "To create a nonlinear mapping we perform the following steps:"
7942 msgstr "非線形マッピングを作成するためには、 以下のようなステップを実行する:"
7943
7944 #. type: TP
7945 #: build/C/man2/remap_file_pages.2:53
7946 #, no-wrap
7947 msgid "1."
7948 msgstr "1."
7949
7950 #. type: Plain text
7951 #: build/C/man2/remap_file_pages.2:61
7952 msgid ""
7953 "Use B<mmap>(2)  to create a mapping (which is initially linear).  This "
7954 "mapping must be created with the B<MAP_SHARED> flag."
7955 msgstr ""
7956 "B<mmap>(2)  を使い、マッピングを作成する (このマッピングは最初は線形であ"
7957 "る)。 このマッピングは B<MAP_SHARED> フラグを指定して作成されなければならな"
7958 "い。"
7959
7960 #. type: TP
7961 #: build/C/man2/remap_file_pages.2:61
7962 #, no-wrap
7963 msgid "2."
7964 msgstr "2."
7965
7966 #. type: Plain text
7967 #: build/C/man2/remap_file_pages.2:69
7968 msgid ""
7969 "Use one or more calls to B<remap_file_pages>()  to rearrange the "
7970 "correspondence between the pages of the mapping and the pages of the file.  "
7971 "It is possible to map the same page of a file into multiple locations within "
7972 "the mapped region."
7973 msgstr ""
7974 "B<remap_file_pages>()  を 1 回以上呼び出して、 マッピングのページとファイルの"
7975 "ページの対応関係を再構成する。 ファイルの同じページをマッピング領域の複数の場"
7976 "所に マップすることが可能である。"
7977
7978 #. type: Plain text
7979 #: build/C/man2/remap_file_pages.2:80
7980 msgid ""
7981 "The I<pgoff> and I<size> arguments specify the region of the file that is to "
7982 "be relocated within the mapping: I<pgoff> is a file offset in units of the "
7983 "system page size; I<size> is the length of the region in bytes."
7984 msgstr ""
7985 "I<pgoff> と I<size> 引き数は、マッピング内で再配置されるファイルの領域を指定"
7986 "する。 I<pgoff> はファイルオフセットであり、単位はシステムのページサイズであ"
7987 "る。 I<size> は領域の長さであり、単位はバイトである。"
7988
7989 #. type: Plain text
7990 #: build/C/man2/remap_file_pages.2:98
7991 msgid ""
7992 "The I<addr> argument serves two purposes.  First, it identifies the mapping "
7993 "whose pages we want to rearrange.  Thus, I<addr> must be an address that "
7994 "falls within a region previously mapped by a call to B<mmap>(2).  Second, "
7995 "I<addr> specifies the address at which the file pages identified by I<pgoff> "
7996 "and I<size> will be placed."
7997 msgstr ""
7998 "I<addr> 引き数は 2 つの目的で使われる。 第 1 の目的は、この引き数によって再編"
7999 "成したいページの マッピングを識別することである。 よって I<addr> は B<mmap>"
8000 "(2)  の呼び出しで過去にマップされた領域内のアドレスでなければならない。 第 2 "
8001 "の目的は、 I<pgoff> と I<size> で識別されるファイルページが置かれる予定のアド"
8002 "レスを、 I<addr> によって指定することである。"
8003
8004 #.  This rounding is weird, and not consistent with the treatment of
8005 #.  the analogous arguments for munmap()/mprotect() and for mlock().
8006 #.  MTK, 14 Sep 2005
8007 #. type: Plain text
8008 #: build/C/man2/remap_file_pages.2:112
8009 msgid ""
8010 "The values specified in I<addr> and I<size> should be multiples of the "
8011 "system page size.  If they are not, then the kernel rounds I<both> values "
8012 "I<down> to the nearest multiple of the page size."
8013 msgstr ""
8014 "I<addr> と I<size> に指定する値は、システムのページサイズの倍数とすべきであ"
8015 "る。 それ以外の場合、カーネルは「両方」の値を 最も近いページサイズの倍数へ"
8016 "「切り下げる」。"
8017
8018 #. type: Plain text
8019 #: build/C/man2/remap_file_pages.2:116
8020 msgid "The I<prot> argument must be specified as 0."
8021 msgstr "I<prot> 引き数は 0 に指定されなければならない。"
8022
8023 #. type: Plain text
8024 #: build/C/man2/remap_file_pages.2:124
8025 msgid ""
8026 "The I<flags> argument has the same meaning as for B<mmap>(2), but all flags "
8027 "other than B<MAP_NONBLOCK> are ignored."
8028 msgstr ""
8029 "I<flags> 引き数は B<mmap>(2)  のものと同じ意味であるが、 B<MAP_NONBLOCK> 以外"
8030 "の全てのフラグは無視される。"
8031
8032 #. type: Plain text
8033 #: build/C/man2/remap_file_pages.2:131
8034 msgid ""
8035 "On success, B<remap_file_pages>()  returns 0.  On error, -1 is returned, and "
8036 "I<errno> is set appropriately."
8037 msgstr ""
8038 "成功した場合、 B<remap_file_pages>()  は 0 を返す。 エラーの場合、-1 が返さ"
8039 "れ、 I<errno> が適切に設定される。"
8040
8041 #. type: Plain text
8042 #: build/C/man2/remap_file_pages.2:139
8043 msgid ""
8044 "I<addr> does not refer to a valid mapping created with the B<MAP_SHARED> "
8045 "flag."
8046 msgstr ""
8047 "I<addr> が B<MAP_SHARED> フラグを指定して作成された有効なマッピングを参照して"
8048 "いない。"
8049
8050 #.  And possibly others from vma->vm_ops->populate()
8051 #. type: Plain text
8052 #: build/C/man2/remap_file_pages.2:148
8053 msgid "I<addr>, I<size>, I<prot>, or I<pgoff> is invalid."
8054 msgstr "I<addr>, I<size>, I<prot>, I<pgoff> のいずれかが不正である。"
8055
8056 #. type: Plain text
8057 #: build/C/man2/remap_file_pages.2:153
8058 msgid ""
8059 "The B<remap_file_pages>()  system call appeared in Linux 2.5.46; glibc "
8060 "support was added in version 2.3.3."
8061 msgstr ""
8062 "B<remap_file_pages>()  システムコールは Linux 2.5.46 で登場した。 glibc での"
8063 "サポートは glibc バージョン 2.3.3 で追加された。"
8064
8065 #. type: Plain text
8066 #: build/C/man2/remap_file_pages.2:157
8067 msgid "The B<remap_file_pages>()  system call is Linux-specific."
8068 msgstr "B<remap_file_pages>()  システムコールは Linux 固有のものである。"
8069
8070 #. type: Plain text
8071 #: build/C/man2/remap_file_pages.2:164
8072 msgid ""
8073 "B<getpagesize>(2), B<mmap>(2), B<mmap2>(2), B<mprotect>(2), B<mremap>(2), "
8074 "B<msync>(2)"
8075 msgstr ""
8076 "B<getpagesize>(2), B<mmap>(2), B<mmap2>(2), B<mprotect>(2), B<mremap>(2), "
8077 "B<msync>(2)"
8078
8079 #. type: TH
8080 #: build/C/man3/shm_open.3:26
8081 #, no-wrap
8082 msgid "SHM_OPEN"
8083 msgstr "SHM_OPEN"
8084
8085 #. type: TH
8086 #: build/C/man3/shm_open.3:26
8087 #, no-wrap
8088 msgid "2009-02-25"
8089 msgstr "2009-02-25"
8090
8091 #. type: Plain text
8092 #: build/C/man3/shm_open.3:29
8093 #, fuzzy
8094 #| msgid ""
8095 #| "shm_open, shm_unlink - Create/open or unlink POSIX shared memory objects"
8096 msgid ""
8097 "shm_open, shm_unlink - create/open or unlink POSIX shared memory objects"
8098 msgstr ""
8099 "shm_open, shm_unlink - POSIX 共有メモリ・オブジェクトの作成/オープン、 削除を"
8100 "行う"
8101
8102 #. type: Plain text
8103 #: build/C/man3/shm_open.3:33
8104 msgid "B<#include E<lt>sys/stat.hE<gt>> /* For mode constants */"
8105 msgstr "B<#include E<lt>sys/stat.hE<gt>> /* mode 定数用 */"
8106
8107 #. type: Plain text
8108 #: build/C/man3/shm_open.3:35
8109 msgid "B<#include E<lt>fcntl.hE<gt>> /* For O_* constants */"
8110 msgstr "B<#include E<lt>fcntl.hE<gt>> /* O_* 定数の定義用 */"
8111
8112 #. type: Plain text
8113 #: build/C/man3/shm_open.3:37
8114 msgid ""
8115 "B<int shm_open(const char *>I<name>B<, int >I<oflag>B<, mode_t >I<mode>B<);>"
8116 msgstr ""
8117 "B<int shm_open(const char *>I<name>B<, int >I<oflag>B<, mode_t >I<mode>B<);>"
8118
8119 #. type: Plain text
8120 #: build/C/man3/shm_open.3:39
8121 msgid "B<int shm_unlink(const char *>I<name>B<);>"
8122 msgstr "B<int shm_unlink(const char *>I<name>B<);>"
8123
8124 #. type: Plain text
8125 #: build/C/man3/shm_open.3:41
8126 msgid "Link with I<-lrt>."
8127 msgstr "I<-lrt> でリンクする。"
8128
8129 #. type: Plain text
8130 #: build/C/man3/shm_open.3:53
8131 msgid ""
8132 "B<shm_open>()  creates and opens a new, or opens an existing, POSIX shared "
8133 "memory object.  A POSIX shared memory object is in effect a handle which can "
8134 "be used by unrelated processes to B<mmap>(2)  the same region of shared "
8135 "memory.  The B<shm_unlink>()  function performs the converse operation, "
8136 "removing an object previously created by B<shm_open>()."
8137 msgstr ""
8138 "B<shm_open>()  は、POSIX 共有メモリ・オブジェクトを新規に作成/オープンした"
8139 "り、 すでに存在するオブジェクトをオープンしたりする。 POSIX 共有メモリ・オブ"
8140 "ジェクトは、実際には、関係のないプロセスが 共有メモリの同じ領域を B<mmap>"
8141 "(2)  するために使用することができる手段である。 B<shm_unlink>()  は、逆の操"
8142 "作、つまり以前に B<shm_open>()  で作成されたオブジェクトの削除を行う。"
8143
8144 #.  glibc allows the initial slash to be omitted, and makes
8145 #.  multiple initial slashes equivalent to a single slash.
8146 #.  This differs from the implementation of POSIX message queues.
8147 #.  glibc allows subdirectory components in the name, in which
8148 #.  case the subdirectory must exist under /dev/shm, and allow the
8149 #.  required permissions if a user wants to create a shared memory
8150 #.  object in that subdirectory.
8151 #. type: Plain text
8152 #: build/C/man3/shm_open.3:74
8153 msgid ""
8154 "The operation of B<shm_open>()  is analogous to that of B<open>(2).  I<name> "
8155 "specifies the shared memory object to be created or opened.  For portable "
8156 "use, a shared memory object should be identified by a name of the form I</"
8157 "somename>; that is, a null-terminated string of up to B<NAME_MAX> (i.e., "
8158 "255) characters consisting of an initial slash, followed by one or more "
8159 "characters, none of which are slashes."
8160 msgstr ""
8161 "B<shm_open>()  の動作は B<open>(2)  とよく似ている。 I<name> で作成したりオー"
8162 "プンしたりする共有メモリ・オブジェクトを指定する。 移植性を持たせるためには、"
8163 "共有メモリ・オブジェクトは I</somename> という形式の名前で識別し、 その名前"
8164 "は、最大で B<NAME_MAX> (すなわち 255) 文字の NULL 終端された文字列で、 スラッ"
8165 "シュで始まり、スラッシュ以外の文字が 1 文字以上続く形式 にすべきである。"
8166
8167 #. type: Plain text
8168 #: build/C/man3/shm_open.3:81
8169 msgid ""
8170 "I<oflag> is a bit mask created by ORing together exactly one of B<O_RDONLY> "
8171 "or B<O_RDWR> and any of the other flags listed here:"
8172 msgstr ""
8173 "I<oflag> はビットマスクで、 B<O_RDONLY> と B<O_RDWR> のいずれか一方と、以下に"
8174 "述べる他のフラグの論理和をとったもの を指定する。"
8175
8176 #. type: TP
8177 #: build/C/man3/shm_open.3:81
8178 #, no-wrap
8179 msgid "B<O_RDONLY>"
8180 msgstr "B<O_RDONLY>"
8181
8182 #. type: Plain text
8183 #: build/C/man3/shm_open.3:87
8184 msgid ""
8185 "Open the object for read access.  A shared memory object opened in this way "
8186 "can only be B<mmap>(2)ed for read (B<PROT_READ>) access."
8187 msgstr ""
8188 "読み出しアクセス用にオブジェクトをオープンする。 このフラグを指定してオープン"
8189 "された共有メモリ・オブジェクトは、 読み出し (B<PROT_READ>) アクセスでのみ "
8190 "B<mmap>(2)  することができる。"
8191
8192 #. type: TP
8193 #: build/C/man3/shm_open.3:87
8194 #, no-wrap
8195 msgid "B<O_RDWR>"
8196 msgstr "B<O_RDWR>"
8197
8198 #. type: Plain text
8199 #: build/C/man3/shm_open.3:90
8200 msgid "Open the object for read-write access."
8201 msgstr "読み書きアクセス用にオブジェクトをオープンする。"
8202
8203 #. type: TP
8204 #: build/C/man3/shm_open.3:90
8205 #, no-wrap
8206 msgid "B<O_CREAT>"
8207 msgstr "B<O_CREAT>"
8208
8209 #.  In truth it is actually the file system IDs on Linux, but these
8210 #.  are nearly always the same as the effective IDs.  (MTK, Jul 05)
8211 #. type: Plain text
8212 #: build/C/man3/shm_open.3:110
8213 msgid ""
8214 "Create the shared memory object if it does not exist.  The user and group "
8215 "ownership of the object are taken from the corresponding effective IDs of "
8216 "the calling process, and the object's permission bits are set according to "
8217 "the low-order 9 bits of I<mode>, except that those bits set in the process "
8218 "file mode creation mask (see B<umask>(2))  are cleared for the new object.  "
8219 "A set of macro constants which can be used to define I<mode> is listed in "
8220 "B<open>(2).  (Symbolic definitions of these constants can be obtained by "
8221 "including I<E<lt>sys/stat.hE<gt>>.)"
8222 msgstr ""
8223 "存在しない場合、共有メモリ・オブジェクトを作成する。 オブジェクトのユーザとグ"
8224 "ループの所有権は、 呼び出し元プロセスの対応する実効 ID が使われ、 オブジェク"
8225 "トの許可ビットは I<mode> の下位 9 ビットに基づいて設定される。ただし、 ファイ"
8226 "ルモード作成マスク (B<umask>(2)  参照) に設定されている値は、新規オブジェクト"
8227 "に関してはクリアされる。 I<mode> を定義するために使用できるマクロ定数(群)は "
8228 "B<open>(2)  に記載されている (これらの定数のシンボル定義は I<E<lt>sys/stat."
8229 "hE<gt>> のインクルードにより得られる)。"
8230
8231 #. type: Plain text
8232 #: build/C/man3/shm_open.3:116
8233 msgid ""
8234 "A new shared memory object initially has zero length\\(emthe size of the "
8235 "object can be set using B<ftruncate>(2).  The newly allocated bytes of a "
8236 "shared memory object are automatically initialized to 0."
8237 msgstr ""
8238 "新規に作成された共有メモリ・オブジェクトは長さ 0 で初期化される。 オブジェク"
8239 "トの大きさは B<ftruncate>(2)  を使って設定できる。 共有メモリ・オブジェクトと"
8240 "して新規に確保されたバイトは自動的に 0 に初期化される。"
8241
8242 #. type: TP
8243 #: build/C/man3/shm_open.3:116
8244 #, no-wrap
8245 msgid "B<O_EXCL>"
8246 msgstr "B<O_EXCL>"
8247
8248 #. type: Plain text
8249 #: build/C/man3/shm_open.3:125
8250 msgid ""
8251 "If B<O_CREAT> was also specified, and a shared memory object with the given "
8252 "I<name> already exists, return an error.  The check for the existence of the "
8253 "object, and its creation if it does not exist, are performed atomically."
8254 msgstr ""
8255 "B<O_CREAT> が一緒に指定されており、 I<name> で指定された共有メモリ・オブジェ"
8256 "クトが既に存在した場合、 エラーを返す。 オブジェクトの存在確認と、存在しな"
8257 "かった場合のオブジェクト作成は、 必ず一連の操作として実行される (performed "
8258 "atomically)。"
8259
8260 #. type: TP
8261 #: build/C/man3/shm_open.3:125
8262 #, no-wrap
8263 msgid "B<O_TRUNC>"
8264 msgstr "B<O_TRUNC>"
8265
8266 #. type: Plain text
8267 #: build/C/man3/shm_open.3:128
8268 msgid "If the shared memory object already exists, truncate it to zero bytes."
8269 msgstr ""
8270 "共有メモリ・オブジェクトがすでに存在した場合、 そのオブジェクトを 0 バイトに"
8271 "切り詰める。"
8272
8273 #. type: Plain text
8274 #: build/C/man3/shm_open.3:131
8275 msgid ""
8276 "Definitions of these flag values can be obtained by including I<E<lt>fcntl."
8277 "hE<gt>>."
8278 msgstr ""
8279 "これらのフラグ値の定義は I<E<lt>fcntl.hE<gt>> のインクルードにより得られる。"
8280
8281 #. type: Plain text
8282 #: build/C/man3/shm_open.3:142
8283 msgid ""
8284 "On successful completion B<shm_open>()  returns a new file descriptor "
8285 "referring to the shared memory object.  This file descriptor is guaranteed "
8286 "to be the lowest-numbered file descriptor not previously opened within the "
8287 "process.  The B<FD_CLOEXEC> flag (see B<fcntl>(2))  is set for the file "
8288 "descriptor."
8289 msgstr ""
8290 "成功して完了した場合、 B<shm_open>()  は共有メモリ・オブジェクトを参照する新"
8291 "しいファイル・ディスクリプタを返す。 このファイル・ディスクリプタは、そのプロ"
8292 "セス内で過去にオープンされていない ファイル・ディスクリプタの中で最も小さな数"
8293 "になることが保証される。 B<FD_CLOEXEC> フラグ (B<fcntl>(2)  を参照) が、この"
8294 "ファイル・ディスクリプタに設定される。"
8295
8296 #. type: Plain text
8297 #: build/C/man3/shm_open.3:151
8298 msgid ""
8299 "The file descriptor is normally used in subsequent calls to B<ftruncate>(2)  "
8300 "(for a newly created object) and B<mmap>(2).  After a call to B<mmap>(2)  "
8301 "the file descriptor may be closed without affecting the memory mapping."
8302 msgstr ""
8303 "通常、これらのファイル・ディスクリプタは、この後続けて実行される B<ftruncate>"
8304 "(2)  (新規に作成されたオブジェクトの場合のみ) と B<mmap>(2)  の呼び出しに使用"
8305 "される。 B<mmap>(2)  を呼び出した後は、ファイル・ディスクリプタをクローズして"
8306 "もよく、 クローズしてもメモリ・マッピングに影響を与えることはない。"
8307
8308 #. type: Plain text
8309 #: build/C/man3/shm_open.3:169
8310 msgid ""
8311 "The operation of B<shm_unlink>()  is analogous to B<unlink>(2): it removes a "
8312 "shared memory object name, and, once all processes have unmapped the object, "
8313 "de-allocates and destroys the contents of the associated memory region.  "
8314 "After a successful B<shm_unlink>(), attempts to B<shm_open>()  an object "
8315 "with the same I<name> will fail (unless B<O_CREAT> was specified, in which "
8316 "case a new, distinct object is created)."
8317 msgstr ""
8318 "B<shm_unlink>()  の動作は B<unlink>(2)  とよく似ている: 共有メモリ・オブジェ"
8319 "クト名を削除し、すべてのプロセスが処理対象の オブジェクトをアンマップした時点"
8320 "でオブジェクトの割り当てを解除し、 対応するメモリ領域の内容を破棄する。 "
8321 "B<shm_unlink>()  が成功した後で、同じ I<name> を持つオブジェクトに対して "
8322 "B<shm_open>()  を行うと、 (B<O_CREAT> が指定されていない場合) 失敗する。 "
8323 "(B<O_CREAT> が指定されている場合、新しく別のオブジェクトが作成される)。"
8324
8325 #. type: Plain text
8326 #: build/C/man3/shm_open.3:178
8327 msgid ""
8328 "On success, B<shm_open>()  returns a nonnegative file descriptor.  On "
8329 "failure, B<shm_open>()  returns -1.  B<shm_unlink>()  returns 0 on success, "
8330 "or -1 on error."
8331 msgstr ""
8332 "成功した場合、 B<shm_open>()  は非負のファイル・ディスクリプタを返す。 失敗し"
8333 "た場合、 B<shm_open>()  は -1 を返す。 B<shm_unlink>()  は、成功した場合 0 "
8334 "を、エラーが起こった場合 -1 を返す。"
8335
8336 #. type: Plain text
8337 #: build/C/man3/shm_open.3:185
8338 msgid ""
8339 "On failure, I<errno> is set to indicate the cause of the error.  Values "
8340 "which may appear in I<errno> include the following:"
8341 msgstr ""
8342 "失敗した場合、エラーの原因を示すため I<errno> が設定される。 I<errno> に設定"
8343 "される値は以下の通りである:"
8344
8345 #. type: Plain text
8346 #: build/C/man3/shm_open.3:190
8347 msgid "Permission to B<shm_unlink>()  the shared memory object was denied."
8348 msgstr "共有メモリオブジェクトを B<shm_unlink>()  する権限がなかった。"
8349
8350 #. type: Plain text
8351 #: build/C/man3/shm_open.3:200
8352 msgid ""
8353 "Permission was denied to B<shm_open>()  I<name> in the specified I<mode>, or "
8354 "B<O_TRUNC> was specified and the caller does not have write permission on "
8355 "the object."
8356 msgstr ""
8357 "指定された I<mode> で I<name> を B<shm_open>()  する権限がなかった。もしく"
8358 "は、 B<O_TRUNC> が指定されたが、呼び出し元にはそのオブジェクトに対する書き込"
8359 "み権限が なかった。"
8360
8361 #. type: TP
8362 #: build/C/man3/shm_open.3:200 build/C/man2/shmget.2:194
8363 #, no-wrap
8364 msgid "B<EEXIST>"
8365 msgstr "B<EEXIST>"
8366
8367 #. type: Plain text
8368 #: build/C/man3/shm_open.3:211
8369 msgid ""
8370 "Both B<O_CREAT> and B<O_EXCL> were specified to B<shm_open>()  and the "
8371 "shared memory object specified by I<name> already exists."
8372 msgstr ""
8373 "B<O_CREAT> と B<O_EXCL> の両方が B<shm_open>()  に指定されたが、 I<name> で指"
8374 "定された共有メモリ・オブジェクトが既に存在した。"
8375
8376 #. type: Plain text
8377 #: build/C/man3/shm_open.3:218
8378 msgid "The I<name> argument to B<shm_open>()  was invalid."
8379 msgstr "B<shm_open>()  に与えられた I<name> 引き数が不正であった。"
8380
8381 #. type: TP
8382 #: build/C/man3/shm_open.3:218
8383 #, no-wrap
8384 msgid "B<EMFILE>"
8385 msgstr "B<EMFILE>"
8386
8387 #. type: Plain text
8388 #: build/C/man3/shm_open.3:221
8389 msgid "The process already has the maximum number of files open."
8390 msgstr "プロセスがオープン可能なファイル数の上限にすでに達していた。"
8391
8392 #. type: TP
8393 #: build/C/man3/shm_open.3:221
8394 #, no-wrap
8395 msgid "B<ENAMETOOLONG>"
8396 msgstr "B<ENAMETOOLONG>"
8397
8398 #. type: Plain text
8399 #: build/C/man3/shm_open.3:227
8400 msgid "The length of I<name> exceeds B<PATH_MAX>."
8401 msgstr "I<name> の長さが B<PATH_MAX> を越えている。"
8402
8403 #. type: Plain text
8404 #: build/C/man3/shm_open.3:231
8405 msgid ""
8406 "The limit on the total number of files open on the system has been reached."
8407 msgstr "ファイルシステムでオープンできるファイル数の上限に達した。"
8408
8409 #. type: TP
8410 #: build/C/man3/shm_open.3:231 build/C/man3/shm_open.3:240
8411 #: build/C/man2/shmget.2:208
8412 #, no-wrap
8413 msgid "B<ENOENT>"
8414 msgstr "B<ENOENT>"
8415
8416 #. type: Plain text
8417 #: build/C/man3/shm_open.3:240
8418 msgid ""
8419 "An attempt was made to B<shm_open>()  a I<name> that did not exist, and "
8420 "B<O_CREAT> was not specified."
8421 msgstr ""
8422 "存在していない I<name> のオブジェクトを B<shm_open>()  しようとしたが、 "
8423 "B<O_CREAT> が指定されていなかった。"
8424
8425 #. type: Plain text
8426 #: build/C/man3/shm_open.3:247
8427 msgid ""
8428 "An attempt was to made to B<shm_unlink>()  a I<name> that does not exist."
8429 msgstr "存在しない I<name> のオブジェクトを B<shm_unlink>()  しようとした。"
8430
8431 #. type: Plain text
8432 #: build/C/man3/shm_open.3:249
8433 msgid "These functions are provided in glibc 2.2 and later."
8434 msgstr "これらの関数は glibc 2.2 以降で提供されている。"
8435
8436 #. type: Plain text
8437 #: build/C/man3/shm_open.3:255
8438 msgid ""
8439 "POSIX.1-2001 says that the group ownership of a newly created shared memory "
8440 "object is set to either the calling process's effective group ID or \"a "
8441 "system default group ID\"."
8442 msgstr ""
8443 "POSIX.1-2001 には、新規に作成される共有メモリオブジェクトのグループ所有権"
8444 "は、 呼び出し元プロセスの実効グループ ID か 「システムのデフォルトのグループ "
8445 "ID」 のどちらかに設定される、と書かれている。"
8446
8447 #. type: Plain text
8448 #: build/C/man3/shm_open.3:264
8449 msgid ""
8450 "POSIX leaves the behavior of the combination of B<O_RDONLY> and B<O_TRUNC> "
8451 "unspecified.  On Linux, this will successfully truncate an existing shared "
8452 "memory object\\(emthis may not be so on other UNIX systems."
8453 msgstr ""
8454 "POSIX は B<O_RDONLY> と B<O_TRUNC> が一緒に指定された場合の動作を未定義にして"
8455 "いる。Linux では、 既存の共有メモリ・オブジェクトに対する切り詰め (truncate) "
8456 "は成功する。 しかし、他の UNIX システムでも同じであるとは限らない。"
8457
8458 #. type: Plain text
8459 #: build/C/man3/shm_open.3:269
8460 msgid ""
8461 "The POSIX shared memory object implementation on Linux 2.4 makes use of a "
8462 "dedicated file system, which is normally mounted under I</dev/shm>."
8463 msgstr ""
8464 "Linux 2.4 における POSIX 共有メモリ・オブジェクトの実装は 専用のファイルシス"
8465 "テムを使用する。そのファイルシステムは通常 I</dev/shm> にマウントされる。"
8466
8467 #. type: Plain text
8468 #: build/C/man3/shm_open.3:280
8469 msgid ""
8470 "B<close>(2), B<fchmod>(2), B<fchown>(2), B<fcntl>(2), B<fstat>(2), "
8471 "B<ftruncate>(2), B<mmap>(2), B<open>(2), B<umask>(2), B<shm_overview>(7)"
8472 msgstr ""
8473 "B<close>(2), B<fchmod>(2), B<fchown>(2), B<fcntl>(2), B<fstat>(2), "
8474 "B<ftruncate>(2), B<mmap>(2), B<open>(2), B<umask>(2), B<shm_overview>(7)"
8475
8476 #. type: TH
8477 #: build/C/man7/shm_overview.7:27
8478 #, no-wrap
8479 msgid "SHM_OVERVIEW"
8480 msgstr "SHM_OVERVIEW"
8481
8482 #. type: Plain text
8483 #: build/C/man7/shm_overview.7:30
8484 #, fuzzy
8485 #| msgid "shm_overview - Overview of POSIX shared memory"
8486 msgid "shm_overview - overview of POSIX shared memory"
8487 msgstr "shm_overview - POSIX 共有メモリの概要"
8488
8489 #. type: Plain text
8490 #: build/C/man7/shm_overview.7:33
8491 msgid ""
8492 "The POSIX shared memory API allows processes to communicate information by "
8493 "sharing a region of memory."
8494 msgstr ""
8495 "POSIX 共有メモリ API を使用すると、メモリのある領域を共有して、 プロセス間で"
8496 "情報をやり取りすることができる。"
8497
8498 #. type: Plain text
8499 #: build/C/man7/shm_overview.7:35
8500 msgid "The interfaces employed in the API are:"
8501 msgstr "この API では以下のインターフェースが採用されている。"
8502
8503 #. type: TP
8504 #: build/C/man7/shm_overview.7:35
8505 #, no-wrap
8506 msgid "B<shm_open>(3)"
8507 msgstr "B<shm_open>(3)"
8508
8509 #. type: Plain text
8510 #: build/C/man7/shm_overview.7:42
8511 msgid ""
8512 "Create and open a new object, or open an existing object.  This is analogous "
8513 "to B<open>(2).  The call returns a file descriptor for use by the other "
8514 "interfaces listed below."
8515 msgstr ""
8516 "新しいオブジェクトを生成しオープンする、もしくは 既存のオブジェクトをオープン"
8517 "する。これは B<open>(2)  と同じである。下記にある他のインターフェースで使用す"
8518 "る ファイルディスクリプタを返す。"
8519
8520 #. type: TP
8521 #: build/C/man7/shm_overview.7:42
8522 #, no-wrap
8523 msgid "B<ftruncate>(2)"
8524 msgstr "B<ftruncate>(2)"
8525
8526 #. type: Plain text
8527 #: build/C/man7/shm_overview.7:46
8528 msgid ""
8529 "Set the size of the shared memory object.  (A newly created shared memory "
8530 "object has a length of zero.)"
8531 msgstr "共有メモリオブジェクトの大きさを設定する。"
8532
8533 #. type: Plain text
8534 #: build/C/man7/shm_overview.7:50
8535 msgid ""
8536 "Map the shared memory object into the virtual address space of the calling "
8537 "process."
8538 msgstr ""
8539 "呼び出したプロセスの仮想アドレス空間に共有メモリオブジェクトを マップする。"
8540
8541 #. type: TP
8542 #: build/C/man7/shm_overview.7:50
8543 #, no-wrap
8544 msgid "B<munmap>(2)"
8545 msgstr "B<munmap>(2)"
8546
8547 #. type: Plain text
8548 #: build/C/man7/shm_overview.7:54
8549 msgid ""
8550 "Unmap the shared memory object from the virtual address space of the calling "
8551 "process."
8552 msgstr ""
8553 "呼び出したプロセスの仮想アドレス空間から 共有メモリオブジェクトをアンマップす"
8554 "る。"
8555
8556 #. type: TP
8557 #: build/C/man7/shm_overview.7:54
8558 #, no-wrap
8559 msgid "B<shm_unlink>(3)"
8560 msgstr "B<shm_unlink>(3)"
8561
8562 #. type: Plain text
8563 #: build/C/man7/shm_overview.7:57
8564 msgid "Remove a shared memory object name."
8565 msgstr "共有メモリオブジェクト名を削除する。"
8566
8567 #. type: TP
8568 #: build/C/man7/shm_overview.7:57
8569 #, no-wrap
8570 msgid "B<close>(2)"
8571 msgstr "B<close>(2)"
8572
8573 #. type: Plain text
8574 #: build/C/man7/shm_overview.7:62
8575 msgid ""
8576 "Close the file descriptor allocated by B<shm_open>(3)  when it is no longer "
8577 "needed."
8578 msgstr ""
8579 "B<shm_open>(3)  で割り当てられたファイルディスクリプタが不要になった際に、 そ"
8580 "のファイルディスクリプタをクローズする。"
8581
8582 #. type: TP
8583 #: build/C/man7/shm_overview.7:62
8584 #, no-wrap
8585 msgid "B<fstat>(2)"
8586 msgstr "B<fstat>(2)"
8587
8588 #. type: Plain text
8589 #: build/C/man7/shm_overview.7:76
8590 msgid ""
8591 "Obtain a I<stat> structure that describes the shared memory object.  Among "
8592 "the information returned by this call are the object's size (I<st_size>), "
8593 "permissions (I<st_mode>), owner (I<st_uid>), and group (I<st_gid>)."
8594 msgstr ""
8595 "その共有メモリオブジェクトについての情報が入った I<stat> 構造体を取得する。 "
8596 "このシステムコールが返す情報には、オブジェクトのサイズ (I<st_size>)、 許可属"
8597 "性 (I<st_mode>)、 所有者 (I<st_uid>)、 グループ (I<st_gid>)  がある。"
8598
8599 #. type: TP
8600 #: build/C/man7/shm_overview.7:76
8601 #, no-wrap
8602 msgid "B<fchown>(2)"
8603 msgstr "B<fchown>(2)"
8604
8605 #. type: Plain text
8606 #: build/C/man7/shm_overview.7:79
8607 msgid "To change the ownership of a shared memory object."
8608 msgstr "共有メモリオブジェクトの所有権を変更する。"
8609
8610 #. type: TP
8611 #: build/C/man7/shm_overview.7:79
8612 #, no-wrap
8613 msgid "B<fchmod>(2)"
8614 msgstr "B<fchmod>(2)"
8615
8616 #. type: Plain text
8617 #: build/C/man7/shm_overview.7:82
8618 msgid "To change the permissions of a shared memory object."
8619 msgstr "共有メモリオブジェクトの許可属性を変更する。"
8620
8621 #. type: SS
8622 #: build/C/man7/shm_overview.7:82
8623 #, no-wrap
8624 msgid "Versions"
8625 msgstr "Versions"
8626
8627 #. type: Plain text
8628 #: build/C/man7/shm_overview.7:84
8629 msgid "POSIX shared memory is supported since Linux 2.4 and glibc 2.2."
8630 msgstr "POSIX 共有メモリは Linux 2.4 と glibc 2.2 以降でサポートされている。"
8631
8632 #. type: SS
8633 #: build/C/man7/shm_overview.7:84
8634 #, no-wrap
8635 msgid "Persistence"
8636 msgstr "持続性"
8637
8638 #. type: Plain text
8639 #: build/C/man7/shm_overview.7:89
8640 msgid ""
8641 "POSIX shared memory objects have kernel persistence: a shared memory object "
8642 "will exist until the system is shut down, or until all processes have "
8643 "unmapped the object and it has been deleted with B<shm_unlink>(3)"
8644 msgstr ""
8645 "POSIX 共有メモリオブジェクトはカーネル内で保持される。 共有メモリオブジェクト"
8646 "は、システムがシャットダウンされるか、 全てのプロセスがそのオブジェクトをアン"
8647 "マップし、 B<shm_unlink>(3)  で削除されるまで、存在し続ける。"
8648
8649 #. type: SS
8650 #: build/C/man7/shm_overview.7:89
8651 #, no-wrap
8652 msgid "Linking"
8653 msgstr "リンク"
8654
8655 #. type: Plain text
8656 #: build/C/man7/shm_overview.7:94
8657 msgid ""
8658 "Programs using the POSIX shared memory API must be compiled with I<cc -lrt> "
8659 "to link against the real-time library, I<librt>."
8660 msgstr ""
8661 "POSIX 共有メモリ API を使用したプログラムは I<cc -lrt> でコンパイルし、リアル"
8662 "タイムライブラリ I<librt> とリンクしなければならない。"
8663
8664 #. type: SS
8665 #: build/C/man7/shm_overview.7:94
8666 #, no-wrap
8667 msgid "Accessing shared memory objects via the file system"
8668 msgstr "ファイルシステム経由での共有メモリオブジェクトへのアクセス"
8669
8670 #. type: Plain text
8671 #: build/C/man7/shm_overview.7:101
8672 msgid ""
8673 "On Linux, shared memory objects are created in a (I<tmpfs>)  virtual file "
8674 "system, normally mounted under I</dev/shm>.  Since kernel 2.6.19, Linux "
8675 "supports the use of access control lists (ACLs)  to control the permissions "
8676 "of objects in the virtual file system."
8677 msgstr ""
8678 "Linux では、共有メモリオブジェクトは通常 I</dev/shm> 以下にマウントされる仮想"
8679 "ファイルシステム (I<tmpfs>)  内に作成される。 カーネル 2.6.19 以降の Linux で"
8680 "は、 仮想ファイルシステム内のオブジェクトの許可属性の制御に、 アクセス制御リ"
8681 "スト (ACL; access control lists) を使うことができる。"
8682
8683 #. type: Plain text
8684 #: build/C/man7/shm_overview.7:106
8685 msgid ""
8686 "Typically, processes must synchronize their access to a shared memory "
8687 "object, using, for example, POSIX semaphores."
8688 msgstr ""
8689 "通常は、共有メモリオブジェクトにアクセスするプロセスは、 POSIX セマフォなどを"
8690 "使ってプロセス間で同期をとらなければならない。"
8691
8692 #. type: Plain text
8693 #: build/C/man7/shm_overview.7:114
8694 msgid ""
8695 "System V shared memory (B<shmget>(2), B<shmop>(2), etc.) is an older shared "
8696 "memory API.  POSIX shared memory provides a simpler, and better designed "
8697 "interface; on the other hand POSIX shared memory is somewhat less widely "
8698 "available (especially on older systems) than System V shared memory."
8699 msgstr ""
8700 "System V 共有メモリ (B<shmget>(2), B<shmop>(2)  など) は古い共有メモリ API で"
8701 "ある。 POSIX 共有メモリは、より簡単で、うまく設計されたインタフェースを提供し"
8702 "ている。 一方で、POSIX 共有メモリは System V 共有メモリと比べると 利用できる"
8703 "システムが少ない (特に、古いシステムでは少ない)。"
8704
8705 #. type: Plain text
8706 #: build/C/man7/shm_overview.7:127
8707 msgid ""
8708 "B<fchmod>(2), B<fchown>(2), B<fstat>(2), B<ftruncate>(2), B<mmap>(2), "
8709 "B<mprotect>(2), B<munmap>(2), B<shmget>(2), B<shmop>(2), B<shm_open>(3), "
8710 "B<shm_unlink>(3), B<sem_overview>(7)"
8711 msgstr ""
8712 "B<fchmod>(2), B<fchown>(2), B<fstat>(2), B<ftruncate>(2), B<mmap>(2), "
8713 "B<mprotect>(2), B<munmap>(2), B<shmget>(2), B<shmop>(2), B<shm_open>(3), "
8714 "B<shm_unlink>(3), B<sem_overview>(7)"
8715
8716 #. type: TH
8717 #: build/C/man2/shmctl.2:45
8718 #, no-wrap
8719 msgid "SHMCTL"
8720 msgstr "SHMCTL"
8721
8722 #. type: TH
8723 #: build/C/man2/shmctl.2:45 build/C/man2/shmget.2:38
8724 #, fuzzy, no-wrap
8725 #| msgid "2012-05-06"
8726 msgid "2012-05-31"
8727 msgstr "2012-05-06"
8728
8729 #. type: Plain text
8730 #: build/C/man2/shmctl.2:48
8731 msgid "shmctl - shared memory control"
8732 msgstr "shmctl - 共有メモリ (shared memory) を制御する"
8733
8734 #. type: Plain text
8735 #: build/C/man2/shmctl.2:51 build/C/man2/shmget.2:44
8736 msgid "B<#include E<lt>sys/ipc.hE<gt>>"
8737 msgstr "B<#include E<lt>sys/ipc.hE<gt>>"
8738
8739 #. type: Plain text
8740 #: build/C/man2/shmctl.2:53 build/C/man2/shmget.2:46
8741 msgid "B<#include E<lt>sys/shm.hE<gt>>"
8742 msgstr "B<#include E<lt>sys/shm.hE<gt>>"
8743
8744 #. type: Plain text
8745 #: build/C/man2/shmctl.2:55
8746 msgid ""
8747 "B<int shmctl(int >I<shmid>B<, int >I<cmd>B<, struct shmid_ds *>I<buf>B<);>"
8748 msgstr ""
8749 "B<int shmctl(int >I<shmid>B<, int >I<cmd>B<, struct shmid_ds *>I<buf>B<);>"
8750
8751 #. type: Plain text
8752 #: build/C/man2/shmctl.2:62
8753 msgid ""
8754 "B<shmctl>()  performs the control operation specified by I<cmd> on the "
8755 "shared memory segment whose identifier is given in I<shmid>."
8756 msgstr ""
8757 "B<shmctl>()  は、識別子が I<shmid> の共有メモリ・セグメントに対して I<cmd> で"
8758 "指示した制御命令を実行する。"
8759
8760 #. type: Plain text
8761 #: build/C/man2/shmctl.2:67
8762 msgid ""
8763 "The I<buf> argument is a pointer to a I<shmid_ds> structure, defined in "
8764 "I<E<lt>sys/shm.hE<gt>> as follows:"
8765 msgstr ""
8766 "I<buf> 引き数は、 I<shmid_ds> 構造体へのポインタである。 この構造体は "
8767 "I<E<lt>sys/shm.hE<gt>> で以下のように定義されている"
8768
8769 #. type: Plain text
8770 #: build/C/man2/shmctl.2:81
8771 #, no-wrap
8772 msgid ""
8773 "struct shmid_ds {\n"
8774 "    struct ipc_perm shm_perm;    /* Ownership and permissions */\n"
8775 "    size_t          shm_segsz;   /* Size of segment (bytes) */\n"
8776 "    time_t          shm_atime;   /* Last attach time */\n"
8777 "    time_t          shm_dtime;   /* Last detach time */\n"
8778 "    time_t          shm_ctime;   /* Last change time */\n"
8779 "    pid_t           shm_cpid;    /* PID of creator */\n"
8780 "    pid_t           shm_lpid;    /* PID of last shmat(2)/shmdt(2) */\n"
8781 "    shmatt_t        shm_nattch;  /* No. of current attaches */\n"
8782 "    ...\n"
8783 "};\n"
8784 msgstr ""
8785 "struct shmid_ds {\n"
8786 "    struct ipc_perm shm_perm;    /* 所有権と許可 */\n"
8787 "    size_t          shm_segsz;   /* セグメントのサイズ (バイト) */\n"
8788 "    time_t          shm_atime;   /* 最後の付加 (attach) の時刻 */\n"
8789 "    time_t          shm_dtime;   /* 最後の分離 (detach) の時刻 */\n"
8790 "    time_t          shm_ctime;   /* 最後に変更が行われた時刻 */\n"
8791 "    pid_t           shm_cpid;    /* 作成者 (creator) の PID */\n"
8792 "    pid_t           shm_lpid;    /* 最後の shmat(2)/shmdt(2) の PID */\n"
8793 "    shmatt_t        shm_nattch;  /* 現在付加されている数 */\n"
8794 "    ...\n"
8795 "};\n"
8796
8797 #. type: Plain text
8798 #: build/C/man2/shmctl.2:89
8799 #, fuzzy
8800 #| msgid ""
8801 #| "The I<ipc_perm> structure is defined in I<E<lt>sys/ipc.hE<gt>> as follows "
8802 #| "(the highlighted fields are settable using B<IPC_SET>):"
8803 msgid ""
8804 "The I<ipc_perm> structure is defined as follows (the highlighted fields are "
8805 "settable using B<IPC_SET>):"
8806 msgstr ""
8807 "I<ipc_perm> 構造体は I<E<lt>sys/ipc.hE<gt>> で以下のように定義されている (強"
8808 "調されたフィールドは B<IPC_SET> を使って設定可能である):"
8809
8810 #. type: Plain text
8811 #: build/C/man2/shmctl.2:102
8812 #, no-wrap
8813 msgid ""
8814 "struct ipc_perm {\n"
8815 "    key_t          __key;    /* Key supplied to shmget(2) */\n"
8816 "    uid_t          B<uid>;      /* Effective UID of owner */\n"
8817 "    gid_t          B<gid>;      /* Effective GID of owner */\n"
8818 "    uid_t          cuid;     /* Effective UID of creator */\n"
8819 "    gid_t          cgid;     /* Effective GID of creator */\n"
8820 "    unsigned short B<mode>;     /* B<Permissions> + SHM_DEST and\n"
8821 "                                SHM_LOCKED flags */\n"
8822 "    unsigned short __seq;    /* Sequence number */\n"
8823 "};\n"
8824 msgstr ""
8825 "struct ipc_perm {\n"
8826 "    key_t          __key;    /* shmget(2) に与えられるキー */\n"
8827 "    uid_t          B<uid>;      /* 所有者の実効 UID */\n"
8828 "    gid_t          B<gid>;      /* 所有者の実効 GID */\n"
8829 "    uid_t          cuid;     /* 作成者の実効 UID */\n"
8830 "    gid_t          cgid;     /* 作成者の実効 GID */\n"
8831 "    unsigned short B<mode>;     /* B<許可> + SHM_DEST と\n"
8832 "                                SHM_LOCKED フラグ */\n"
8833 "    unsigned short __seq;    /* シーケンス番号 */\n"
8834 "};\n"
8835
8836 #. type: Plain text
8837 #: build/C/man2/shmctl.2:108
8838 msgid "Valid values for I<cmd> are:"
8839 msgstr "I<cmd> として有効な値は以下の通り:"
8840
8841 #. type: TP
8842 #: build/C/man2/shmctl.2:109
8843 #, no-wrap
8844 msgid "B<IPC_STAT>"
8845 msgstr "B<IPC_STAT>"
8846
8847 #. type: Plain text
8848 #: build/C/man2/shmctl.2:118
8849 msgid ""
8850 "Copy information from the kernel data structure associated with I<shmid> "
8851 "into the I<shmid_ds> structure pointed to by I<buf>.  The caller must have "
8852 "read permission on the shared memory segment."
8853 msgstr ""
8854 "I<shmid> に関連づけられたカーネルデータ構造体の情報を I<buf> で指された "
8855 "I<shmid_ds> 構造体にコピーする。 呼び出し元は共有メモリ・セグメントに対する "
8856 "読み込み許可を持たなければならない。"
8857
8858 #. type: TP
8859 #: build/C/man2/shmctl.2:118
8860 #, no-wrap
8861 msgid "B<IPC_SET>"
8862 msgstr "B<IPC_SET>"
8863
8864 #. type: Plain text
8865 #: build/C/man2/shmctl.2:136
8866 msgid ""
8867 "Write the values of some members of the I<shmid_ds> structure pointed to by "
8868 "I<buf> to the kernel data structure associated with this shared memory "
8869 "segment, updating also its I<shm_ctime> member.  The following fields can be "
8870 "changed: I<shm_perm.uid>, I<shm_perm.gid>, and (the least significant 9 bits "
8871 "of) I<shm_perm.mode>.  The effective UID of the calling process must match "
8872 "the owner (I<shm_perm.uid>)  or creator (I<shm_perm.cuid>)  of the shared "
8873 "memory segment, or the caller must be privileged."
8874 msgstr ""
8875 "I<buf> によって指される I<shmid_ds> 構造体のいくつかのメンバーの値を、 この共"
8876 "有メモリ・セグメントに関連づけられたカーネルデータ構造体に書き込み、 "
8877 "I<shm_ctime> メンバーも更新する。 以下のフィールドは変更できる。 I<shm_perm."
8878 "uid>, I<shm_perm.gid>, I<shm_perm.mode> (の最下位 9 ビット)。 呼び出したプロ"
8879 "セスの実効 UID が所有者 (I<shm_perm.uid>)  または作成者 (I<shm_perm.cuid>)  "
8880 "と一致するか、呼び出し元が特権を持たなければならない。"
8881
8882 #. type: TP
8883 #: build/C/man2/shmctl.2:136
8884 #, no-wrap
8885 msgid "B<IPC_RMID>"
8886 msgstr "B<IPC_RMID>"
8887
8888 #. type: Plain text
8889 #: build/C/man2/shmctl.2:153
8890 msgid ""
8891 "Mark the segment to be destroyed.  The segment will only actually be "
8892 "destroyed after the last process detaches it (i.e., when the I<shm_nattch> "
8893 "member of the associated structure I<shmid_ds> is zero).  The caller must be "
8894 "the owner or creator, or be privileged.  If a segment has been marked for "
8895 "destruction, then the (nonstandard)  B<SHM_DEST> flag of the I<shm_perm."
8896 "mode> field in the associated data structure retrieved by B<IPC_STAT> will "
8897 "be set."
8898 msgstr ""
8899 "セグメントに破棄済みのマークを付ける。 セグメントは、実際には最後プロセスがセ"
8900 "グメントを分離した (関連する I<shmid_ds> 構造体の I<shm_nattch> メンバーが 0 "
8901 "になった) 後でのみ破棄される。 呼び出し元は所有者か作成者であるか、特権を持た"
8902 "なければならない。 セグメントに破棄のマークが付けられると、 関連するデータ構"
8903 "造体において I<shm_perm.mode> フィールドの (標準ではない)  B<SHM_DEST> フラグ"
8904 "が設定される。 このデータ構造体は B<IPC_STAT> で取得される。"
8905
8906 #. type: Plain text
8907 #: build/C/man2/shmctl.2:156
8908 msgid ""
8909 "The caller I<must> ensure that a segment is eventually destroyed; otherwise "
8910 "its pages that were faulted in will remain in memory or swap."
8911 msgstr ""
8912 "呼び出し元は最終的にはセグメントを忘れずに破棄I<しなければならない>。 そうで"
8913 "なれば、フォールト (fault) されたページは メモリかスワップ (swap) に残り続け"
8914 "る。"
8915
8916 #. type: TP
8917 #: build/C/man2/shmctl.2:156
8918 #, no-wrap
8919 msgid "B<IPC_INFO> (Linux-specific)"
8920 msgstr "B<IPC_INFO> (Linux 固有)"
8921
8922 #. type: Plain text
8923 #: build/C/man2/shmctl.2:169
8924 msgid ""
8925 "Returns information about system-wide shared memory limits and parameters in "
8926 "the structure pointed to by I<buf>.  This structure is of type I<shminfo> "
8927 "(thus, a cast is required), defined in I<E<lt>sys/shm.hE<gt>> if the "
8928 "B<_GNU_SOURCE> feature test macro is defined:"
8929 msgstr ""
8930 "システム全体での共有メモリの制限とパラメータに関する情報を、 I<buf> が指す構"
8931 "造体に入れて返す。 この構造体は I<shminfo> 型である (そのためキャストが必要で"
8932 "ある)。 I<shminfo> は B<_GNU_SOURCE> 機能検査マクロが定義された場合に "
8933 "I<E<lt>sys/shm.hE<gt>> で以下のように定義される:"
8934
8935 #. type: Plain text
8936 #: build/C/man2/shmctl.2:183
8937 #, no-wrap
8938 msgid ""
8939 "struct  shminfo {\n"
8940 "    unsigned long shmmax; /* Maximum segment size */\n"
8941 "    unsigned long shmmin; /* Minimum segment size;\n"
8942 "                             always 1 */\n"
8943 "    unsigned long shmmni; /* Maximum number of segments */\n"
8944 "    unsigned long shmseg; /* Maximum number of segments\n"
8945 "                             that a process can attach;\n"
8946 "                             unused within kernel */\n"
8947 "    unsigned long shmall; /* Maximum number of pages of\n"
8948 "                             shared memory, system-wide */\n"
8949 "};\n"
8950 msgstr ""
8951 "struct  shminfo {\n"
8952 "    unsigned long shmmax; /* 最大セグメントサイズ */\n"
8953 "    unsigned long shmmin; /* 最小セグメントサイズ。\n"
8954 "                             常に 1 */\n"
8955 "    unsigned long shmmni; /* 最大セグメント数 */\n"
8956 "    unsigned long shmseg; /* プロセスが付加できる\n"
8957 "                             セグメントの最大数。\n"
8958 "                             カーネル内では未使用 */\n"
8959 "    unsigned long shmall; /* 共有メモリの最大ページ数。\n"
8960 "                             システム全体での値 */\n"
8961 "};\n"
8962
8963 #. type: Plain text
8964 #: build/C/man2/shmctl.2:196
8965 msgid ""
8966 "The I<shmmni>, I<shmmax>, and I<shmall> settings can be changed via I</proc> "
8967 "files of the same name; see B<proc>(5)  for details."
8968 msgstr ""
8969 "設定 I<shmmni>, I<shmmax>, I<shmall> は I</proc> にある同じ名前のファイル経由"
8970 "で変更可能である。 詳しくは B<proc>(5)  を参照。"
8971
8972 #. type: TP
8973 #: build/C/man2/shmctl.2:196
8974 #, no-wrap
8975 msgid "B<SHM_INFO> (Linux-specific)"
8976 msgstr "B<SHM_INFO> (Linux 固有)"
8977
8978 #. type: Plain text
8979 #: build/C/man2/shmctl.2:207
8980 msgid ""
8981 "Returns a I<shm_info> structure whose fields contain information about "
8982 "system resources consumed by shared memory.  This structure is defined in "
8983 "I<E<lt>sys/shm.hE<gt>> if the B<_GNU_SOURCE> feature test macro is defined:"
8984 msgstr ""
8985 "共有メモリが消費しているシステム資源に関する情報を 格納した I<shm_info> 構造"
8986 "体を返す。 この構造体は、 B<_GNU_SOURCE> 機能検査マクロが定義された場合に "
8987 "I<E<lt>sys/shm.hE<gt>> で以下のように定義される:"
8988
8989 #. type: Plain text
8990 #: build/C/man2/shmctl.2:224
8991 #, no-wrap
8992 msgid ""
8993 "struct shm_info {\n"
8994 "    int           used_ids; /* # of currently existing\n"
8995 "                               segments */\n"
8996 "    unsigned long shm_tot;  /* Total number of shared\n"
8997 "                               memory pages */\n"
8998 "    unsigned long shm_rss;  /* # of resident shared\n"
8999 "                               memory pages */\n"
9000 "    unsigned long shm_swp;  /* # of swapped shared\n"
9001 "                               memory pages */\n"
9002 "    unsigned long swap_attempts;\n"
9003 "                            /* Unused since Linux 2.4 */\n"
9004 "    unsigned long swap_successes;\n"
9005 "                            /* Unused since Linux 2.4 */\n"
9006 "};\n"
9007 msgstr ""
9008 "struct shm_info {\n"
9009 "    int           used_ids; /* 現在存在するセグメント数 */\n"
9010 "    unsigned long shm_tot;  /* 共有メモリのページ総数 */\n"
9011 "    unsigned long shm_rss;  /* メモリ上にある (スワップされて\n"
9012 "                               いない) 共有メモリページ数 */\n"
9013 "    unsigned long shm_swp;  /* スワップされている共有メモリ\n"
9014 "                               ページ数 */\n"
9015 "    unsigned long swap_attempts;\n"
9016 "                            /* Linux 2.4 以降では未使用 */\n"
9017 "    unsigned long swap_successes;\n"
9018 "                            /* Linux 2.4 以降では未使用 */\n"
9019 "};\n"
9020
9021 #. type: TP
9022 #: build/C/man2/shmctl.2:226
9023 #, no-wrap
9024 msgid "B<SHM_STAT> (Linux-specific)"
9025 msgstr "B<SHM_STAT> (Linux 固有)"
9026
9027 #. type: Plain text
9028 #: build/C/man2/shmctl.2:237
9029 msgid ""
9030 "Returns a I<shmid_ds> structure as for B<IPC_STAT>.  However, the I<shmid> "
9031 "argument is not a segment identifier, but instead an index into the kernel's "
9032 "internal array that maintains information about all shared memory segments "
9033 "on the system."
9034 msgstr ""
9035 "B<IPC_STAT> と同じく I<shmid_ds> 構造体を返す。 但し、 I<shmid> 引き数は、セ"
9036 "グメント識別子ではなく、システム上の全ての共有メモリ セグメントに関する情報を"
9037 "管理するカーネルの内部配列へのインデックス である。"
9038
9039 #. type: Plain text
9040 #: build/C/man2/shmctl.2:240
9041 msgid ""
9042 "The caller can prevent or allow swapping of a shared memory segment with the "
9043 "following I<cmd> values:"
9044 msgstr ""
9045 "呼び出し元は、I<cmd> に以下の値を指定することで、共有メモリ・セグメントが ス"
9046 "ワップされることを防止したり、許可したりできる:"
9047
9048 #. type: TP
9049 #: build/C/man2/shmctl.2:241
9050 #, no-wrap
9051 msgid "B<SHM_LOCK> (Linux-specific)"
9052 msgstr "B<SHM_LOCK> (Linux 固有)"
9053
9054 #. type: Plain text
9055 #: build/C/man2/shmctl.2:253
9056 msgid ""
9057 "Prevent swapping of the shared memory segment.  The caller must fault in any "
9058 "pages that are required to be present after locking is enabled.  If a "
9059 "segment has been locked, then the (nonstandard)  B<SHM_LOCKED> flag of the "
9060 "I<shm_perm.mode> field in the associated data structure retrieved by "
9061 "B<IPC_STAT> will be set."
9062 msgstr ""
9063 "共有メモリ・セグメントをスワップすることを防止する。 ロックが有効になった後、"
9064 "呼び出し元は、 存在することが要求された全てのページをフォールトさせなければな"
9065 "らない。 セグメントがロックされると、 関連するデータ構造体において "
9066 "I<shm_perm.mode> フィールドの (標準的ではない)  B<SHM_LOCKED> フラグが設定さ"
9067 "れる。 このデータ構造体は B<IPC_STAT> で取得される。"
9068
9069 #. type: TP
9070 #: build/C/man2/shmctl.2:253
9071 #, no-wrap
9072 msgid "B<SHM_UNLOCK> (Linux-specific)"
9073 msgstr "B<SHM_UNLOCK> (Linux 固有)"
9074
9075 #. type: Plain text
9076 #: build/C/man2/shmctl.2:256
9077 msgid "Unlock the segment, allowing it to be swapped out."
9078 msgstr "セグメントのロックを解除し、スワップ・アウトすることを可能にする。"
9079
9080 #.  There was some weirdness in 2.6.9: SHM_LOCK and SHM_UNLOCK could
9081 #.  be applied to a segment, regardless of ownership of the segment.
9082 #.  This was a botch-up in the move to RLIMIT_MEMLOCK, and was fixed
9083 #.  in 2.6.10.  MTK, May 2005
9084 #. type: Plain text
9085 #: build/C/man2/shmctl.2:274
9086 msgid ""
9087 "In kernels before 2.6.10, only a privileged process could employ B<SHM_LOCK> "
9088 "and B<SHM_UNLOCK>.  Since kernel 2.6.10, an unprivileged process can employ "
9089 "these operations if its effective UID matches the owner or creator UID of "
9090 "the segment, and (for B<SHM_LOCK>)  the amount of memory to be locked falls "
9091 "within the B<RLIMIT_MEMLOCK> resource limit (see B<setrlimit>(2))."
9092 msgstr ""
9093 "2.6.10 より前のカーネルでは、特権プロセスだけが B<SHM_LOCK> と B<SHM_UNLOCK> "
9094 "を利用することができた。 2.6.10 以降のカーネルでは、非特権プロセスであっても"
9095 "次の条件を満たせば これらの操作を利用することができる。その条件とは、プロセス"
9096 "の実効 UID がそのセグメントの所有者もしくは作成者の UID と一致し、 "
9097 "(B<SHM_LOCK> の場合には) ロックするメモリの合計が B<RLIMIT_MEMLOCK> リソース"
9098 "上限 (B<setrlimit>(2)  参照) の範囲内に入っていることである。"
9099
9100 #. type: Plain text
9101 #: build/C/man2/shmctl.2:292
9102 msgid ""
9103 "A successful B<IPC_INFO> or B<SHM_INFO> operation returns the index of the "
9104 "highest used entry in the kernel's internal array recording information "
9105 "about all shared memory segments.  (This information can be used with "
9106 "repeated B<SHM_STAT> operations to obtain information about all shared "
9107 "memory segments on the system.)  A successful B<SHM_STAT> operation returns "
9108 "the identifier of the shared memory segment whose index was given in "
9109 "I<shmid>.  Other operations return 0 on success."
9110 msgstr ""
9111 "B<IPC_INFO> と B<SHM_INFO> 操作は、成功すると、全ての共有メモリセグメントに関"
9112 "する情報を 管理しているカーネルの内部配列の使用中エントリのインデックスの う"
9113 "ち最大値を返す (この情報は、システムの全ての共有メモリセグメントに関する情報"
9114 "を 取得するために、 B<SHM_STAT> 操作を繰り返し実行する際に使用できる)。 "
9115 "B<SHM_STAT> 操作は、成功すると、 I<shmid> で指定されたインデックスを持つ共有"
9116 "メモリセグメントの識別子を返す。 他の操作は、成功の場合 0 を返す。"
9117
9118 #. type: Plain text
9119 #: build/C/man2/shmctl.2:296
9120 msgid "On error, -1 is returned, and I<errno> is set appropriately."
9121 msgstr "エラーの場合は -1 を返し、 I<errno> を適切に設定する。"
9122
9123 #. type: Plain text
9124 #: build/C/man2/shmctl.2:305
9125 msgid ""
9126 "B<IPC_STAT> or B<SHM_STAT> is requested and I<shm_perm.mode> does not allow "
9127 "read access for I<shmid>, and the calling process does not have the "
9128 "B<CAP_IPC_OWNER> capability."
9129 msgstr ""
9130 "B<IPC_STAT> または B<SHM_STAT> が要求され、 I<shm_perm.mode> が I<shmid> への"
9131 "読み込みアクセスを許しておらず、 かつ呼び出したプロセスが B<CAP_IPC_OWNER> "
9132 "ケーパビリティ (capability) を持っていない。"
9133
9134 #. type: Plain text
9135 #: build/C/man2/shmctl.2:316
9136 msgid ""
9137 "The argument I<cmd> has value B<IPC_SET> or B<IPC_STAT> but the address "
9138 "pointed to by I<buf> isn't accessible."
9139 msgstr ""
9140 "I<cmd> 引き数に B<IPC_SET> か B<IPC_STAT> が指定されたが I<buf> で指されてい"
9141 "るアドレスにアクセスできない。"
9142
9143 #. type: TP
9144 #: build/C/man2/shmctl.2:316 build/C/man2/shmop.2:197
9145 #, no-wrap
9146 msgid "B<EIDRM>"
9147 msgstr "B<EIDRM>"
9148
9149 #. type: Plain text
9150 #: build/C/man2/shmctl.2:319 build/C/man2/shmop.2:200
9151 msgid "I<shmid> points to a removed identifier."
9152 msgstr "I<shmid> が削除 (remove) された識別子 (identifier) を指している。"
9153
9154 #. type: Plain text
9155 #: build/C/man2/shmctl.2:328
9156 msgid ""
9157 "I<shmid> is not a valid identifier, or I<cmd> is not a valid command.  Or: "
9158 "for a B<SHM_STAT> operation, the index value specified in I<shmid> referred "
9159 "to an array slot that is currently unused."
9160 msgstr ""
9161 "I<shmid> が有効な識別子でないか、 I<cmd> が有効なコマンドでない。 もしくは、 "
9162 "B<SHM_STAT> 操作の場合に、 I<shmid> で指定されたインデックス値が現在未使用の"
9163 "配列のスロットを参照していた。"
9164
9165 #. type: Plain text
9166 #: build/C/man2/shmctl.2:339
9167 msgid ""
9168 "(In kernels since 2.6.9), B<SHM_LOCK> was specified and the size of the to-"
9169 "be-locked segment would mean that the total bytes in locked shared memory "
9170 "segments would exceed the limit for the real user ID of the calling "
9171 "process.  This limit is defined by the B<RLIMIT_MEMLOCK> soft resource limit "
9172 "(see B<setrlimit>(2))."
9173 msgstr ""
9174 "(2.6.9 以降のカーネルにおいて)  B<SHM_LOCK> が指定され、 ロックされる予定のセ"
9175 "グメントのサイズ (ロックされる共有メモリ・セグメントの合計バイト数) が、 呼び"
9176 "出したプロセスの実ユーザー ID についての制限を超えた。 この制限は "
9177 "B<RLIMIT_MEMLOCK> ソフト資源制限で定義される (B<setrlimit>(2)  を参照)。"
9178
9179 #. type: Plain text
9180 #: build/C/man2/shmctl.2:344
9181 msgid ""
9182 "B<IPC_STAT> is attempted, and the GID or UID value is too large to be stored "
9183 "in the structure pointed to by I<buf>."
9184 msgstr ""
9185 "B<IPC_STAT> が試みられ、GID や UID の値が I<buf> で指示される構造体に格納する"
9186 "には大き過ぎる。"
9187
9188 #. type: Plain text
9189 #: build/C/man2/shmctl.2:356
9190 msgid ""
9191 "B<IPC_SET> or B<IPC_RMID> is attempted, and the effective user ID of the "
9192 "calling process is not that of the creator (found in I<shm_perm.cuid>), or "
9193 "the owner (found in I<shm_perm.uid>), and the process was not privileged "
9194 "(Linux: did not have the B<CAP_SYS_ADMIN> capability)."
9195 msgstr ""
9196 "B<IPC_SET> か B<IPC_RMID> が試みられ、 呼び出したプロセスの実効ユーザー ID が"
9197 "作成者 (I<shm_perm.cuid>)  でも所有者 (I<shm_perm.uid>)  でもなく、プロセスが"
9198 "特権を持たない (Linux では B<CAP_SYS_ADMIN> ケーパビリティを持たない)。"
9199
9200 #. type: Plain text
9201 #: build/C/man2/shmctl.2:368
9202 msgid ""
9203 "Or (in kernels before 2.6.9), B<SHM_LOCK> or B<SHM_UNLOCK> was specified, "
9204 "but the process was not privileged (Linux: did not have the B<CAP_IPC_LOCK> "
9205 "capability).  (Since Linux 2.6.9, this error can also occur if the "
9206 "B<RLIMIT_MEMLOCK> is 0 and the caller is not privileged.)"
9207 msgstr ""
9208 "または (2.6.9 より前のカーネルで)  B<SHM_LOCK> または B<SHM_UNLOCK> が指定さ"
9209 "れているが、プロセスが特権を持たない (Linux では B<CAP_IPC_LOCK> ケーパビリ"
9210 "ティを持たない)。 (Linux 2.6.9 以降では、 B<RLIMIT_MEMLOCK> が 0 で呼び出し元"
9211 "が特権を持たない場合にも、このエラーが起こる。)"
9212
9213 #.  SVr4 documents an additional error condition EMFILE.
9214 #. type: Plain text
9215 #: build/C/man2/shmctl.2:373 build/C/man2/shmget.2:234
9216 #: build/C/man2/shmop.2:234
9217 msgid "SVr4, POSIX.1-2001."
9218 msgstr "SVr4, POSIX.1-2001."
9219
9220 #.  Like Linux, the FreeBSD man pages still document
9221 #.  the inclusion of these header files.
9222 #. type: Plain text
9223 #: build/C/man2/shmctl.2:386 build/C/man2/shmget.2:250
9224 msgid ""
9225 "The inclusion of I<E<lt>sys/types.hE<gt>> and I<E<lt>sys/ipc.hE<gt>> isn't "
9226 "required on Linux or by any version of POSIX.  However, some old "
9227 "implementations required the inclusion of these header files, and the SVID "
9228 "also documented their inclusion.  Applications intended to be portable to "
9229 "such old systems may need to include these header files."
9230 msgstr ""
9231
9232 #. type: Plain text
9233 #: build/C/man2/shmctl.2:397
9234 msgid ""
9235 "The B<IPC_INFO>, B<SHM_STAT> and B<SHM_INFO> operations are used by the "
9236 "B<ipcs>(1)  program to provide information on allocated resources.  In the "
9237 "future these may modified or moved to a /proc file system interface."
9238 msgstr ""
9239 "B<IPC_INFO>, B<SHM_STAT>, B<SHM_INFO> 操作は、 B<ipcs>(1)  プログラムで割り当"
9240 "て済の資源に関する情報を提供するために 使用されている。将来、これらの操作は変"
9241 "更されたり、 /proc ファイルシステムのインタフェースに移動されるかもしれない。"
9242
9243 #. type: Plain text
9244 #: build/C/man2/shmctl.2:405
9245 msgid ""
9246 "Linux permits a process to attach (B<shmat>(2))  a shared memory segment "
9247 "that has already been marked for deletion using I<shmctl(IPC_RMID)>.  This "
9248 "feature is not available on other UNIX implementations; portable "
9249 "applications should avoid relying on it."
9250 msgstr ""
9251 "Linux では、 I<shmctl(IPC_RMID)> を使ってすでに削除マークがつけられている共有"
9252 "メモリ・セグメントを あるプロセスが付加 (attach)  (B<shmat>(2))  することを許"
9253 "可している。 この機能は他の UNIX の実装では利用できない。 移植性を考慮したア"
9254 "プリケーションではこれに依存しないようにすべきである。"
9255
9256 #. type: Plain text
9257 #: build/C/man2/shmctl.2:418
9258 msgid ""
9259 "Various fields in a I<struct shmid_ds> were typed as I<short> under Linux "
9260 "2.2 and have become I<long> under Linux 2.4.  To take advantage of this, a "
9261 "recompilation under glibc-2.1.91 or later should suffice.  (The kernel "
9262 "distinguishes old and new calls by an B<IPC_64> flag in I<cmd>.)"
9263 msgstr ""
9264 "I<構造体 shmid_ds> 内の多くのフィールドは、 Linux 2.2 では I<short> 型だった"
9265 "が、Linux 2.4 では I<long> 型になった。 この利点を生かすには、glibc-2.1.91 以"
9266 "降の環境下で 再コンパイルすれば十分である。 カーネルは新しい形式の呼び出しと"
9267 "古い形式の呼び出しを I<cmd> 内の B<IPC_64> フラグで区別する。"
9268
9269 #. type: Plain text
9270 #: build/C/man2/shmctl.2:425
9271 msgid ""
9272 "B<mlock>(2), B<setrlimit>(2), B<shmget>(2), B<shmop>(2), B<capabilities>(7), "
9273 "B<svipc>(7)"
9274 msgstr ""
9275 "B<mlock>(2), B<setrlimit>(2), B<shmget>(2), B<shmop>(2), B<capabilities>(7), "
9276 "B<shm_overview>(7), B<svipc>(7)"
9277
9278 #. type: TH
9279 #: build/C/man2/shmget.2:38
9280 #, no-wrap
9281 msgid "SHMGET"
9282 msgstr "SHMGET"
9283
9284 #. type: Plain text
9285 #: build/C/man2/shmget.2:41
9286 msgid "shmget - allocates a shared memory segment"
9287 msgstr "shmget - 共有メモリ・セグメントを割り当てる"
9288
9289 #. type: Plain text
9290 #: build/C/man2/shmget.2:48
9291 msgid "B<int shmget(key_t >I<key>B<, size_t >I<size>B<, int >I<shmflg>B<);>"
9292 msgstr "B<int shmget(key_t >I<key>B<, size_t >I<size>B<, int >I<shmflg>B<);>"
9293
9294 #. type: Plain text
9295 #: build/C/man2/shmget.2:72
9296 msgid ""
9297 "B<shmget>()  returns the identifier of the shared memory segment associated "
9298 "with the value of the argument I<key>.  A new shared memory segment, with "
9299 "size equal to the value of I<size> rounded up to a multiple of B<PAGE_SIZE>, "
9300 "is created if I<key> has the value B<IPC_PRIVATE> or I<key> isn't "
9301 "B<IPC_PRIVATE>, no shared memory segment corresponding to I<key> exists, and "
9302 "B<IPC_CREAT> is specified in I<shmflg>."
9303 msgstr ""
9304 "B<shmget>()  は I<key> 引き数に対応する共有メモリ・セグメントの識別子を返"
9305 "す。 I<key> の値が B<IPC_PRIVATE> の場合、もしくは I<key> に対応する共有メモ"
9306 "リ・セグメントが存在せず、 I<shmflg> に B<IPC_CREAT> が指定されていた場合、 "
9307 "新しい共有メモリ・セグメントを作成する。 作成される共有メモリ・セグメント"
9308 "は、 I<size> 引き数の値を B<PAGE_SIZE> の倍数へと切り上げた (round up) 大きさ"
9309 "となる。"
9310
9311 #. type: Plain text
9312 #: build/C/man2/shmget.2:91
9313 msgid ""
9314 "If I<shmflg> specifies both B<IPC_CREAT> and B<IPC_EXCL> and a shared memory "
9315 "segment already exists for I<key>, then B<shmget>()  fails with I<errno> set "
9316 "to B<EEXIST>.  (This is analogous to the effect of the combination B<O_CREAT "
9317 "| O_EXCL> for B<open>(2).)"
9318 msgstr ""
9319 "I<shmflg> に B<IPC_CREAT> と B<IPC_EXCL> の両方が指定された場合、 I<key> に対"
9320 "応する共有メモリ・セグメントが既に存在すると、 B<shmget>()  は失敗し、 "
9321 "I<errno> に B<EEXIST> が設定される (これは B<open>(2)  に B<O_CREAT | "
9322 "O_EXCL> を指定した場合の動作と同じである)。"
9323
9324 #. type: Plain text
9325 #: build/C/man2/shmget.2:95
9326 msgid "The value I<shmflg> is composed of:"
9327 msgstr "I<shmflg> は以下の内容から構成される:"
9328
9329 #. type: TP
9330 #: build/C/man2/shmget.2:95
9331 #, no-wrap
9332 msgid "B<IPC_CREAT>"
9333 msgstr "B<IPC_CREAT>"
9334
9335 #. type: Plain text
9336 #: build/C/man2/shmget.2:102
9337 msgid ""
9338 "to create a new segment.  If this flag is not used, then B<shmget>()  will "
9339 "find the segment associated with I<key> and check to see if the user has "
9340 "permission to access the segment."
9341 msgstr ""
9342 "新しいセグメントを作成する。このフラグが指定されなかった場合、 B<shmget>()  "
9343 "は I<key> に対応するセグメントを探し、 ユーザがそのセグメントにアクセスする許"
9344 "可があるかどうかをチェックする。"
9345
9346 #. type: TP
9347 #: build/C/man2/shmget.2:102
9348 #, no-wrap
9349 msgid "B<IPC_EXCL>"
9350 msgstr "B<IPC_EXCL>"
9351
9352 #. type: Plain text
9353 #: build/C/man2/shmget.2:105
9354 msgid "used with B<IPC_CREAT> to ensure failure if the segment already exists."
9355 msgstr ""
9356 "B<IPC_CREAT> と共に使用し、セグメントが既に存在した場合には 失敗することを保"
9357 "証する。"
9358
9359 #. type: TP
9360 #: build/C/man2/shmget.2:105
9361 #, no-wrap
9362 msgid "I<mode_flags>"
9363 msgstr "I<mode_flags>"
9364
9365 #. type: Plain text
9366 #: build/C/man2/shmget.2:115
9367 msgid ""
9368 "(least significant 9 bits)  specifying the permissions granted to the owner, "
9369 "group, and world.  These bits have the same format, and the same meaning, as "
9370 "the I<mode> argument of B<open>(2).  Presently, the execute permissions are "
9371 "not used by the system."
9372 msgstr ""
9373 "(下位 9 ビット)  所有者、グループ、他人 (world) への許可を指定する。 これらの"
9374 "ビットは B<open>(2)  の I<mode> 引き数と同じ形式で同じ意味を持つ。 今のとこ"
9375 "ろ、システムは実行 (execute) 許可を参照しない。"
9376
9377 #. type: TP
9378 #: build/C/man2/shmget.2:115
9379 #, no-wrap
9380 msgid "B<SHM_HUGETLB> (since Linux 2.6)"
9381 msgstr "B<SHM_HUGETLB> (Linux 2.6 以降)"
9382
9383 #. type: Plain text
9384 #: build/C/man2/shmget.2:121
9385 #, fuzzy
9386 #| msgid ""
9387 #| "Allocate the segment using \"huge pages.\" See the kernel source file "
9388 #| "I<Documentation/vm/hugetlbpage.txt> for further information."
9389 msgid ""
9390 "Allocate the segment using \"huge pages.\" See the Linux kernel source file "
9391 "I<Documentation/vm/hugetlbpage.txt> for further information."
9392 msgstr ""
9393 "\"ヒュージページ (huge page)\" を使うセグメントを割り当てる。 詳細な情報は、"
9394 "カーネル・ソースのファイル I<Documentation/vm/hugetlbpage.txt> を参照。"
9395
9396 #. type: TP
9397 #: build/C/man2/shmget.2:121
9398 #, no-wrap
9399 msgid "B<SHM_NORESERVE> (since Linux 2.6.15)"
9400 msgstr "B<SHM_NORESERVE> (Linux 2.6.15 以降)"
9401
9402 #.  As at 2.6.17-rc2, this flag has no effect if SHM_HUGETLB was also
9403 #.  specified.
9404 #. type: Plain text
9405 #: build/C/man2/shmget.2:140
9406 msgid ""
9407 "This flag serves the same purpose as the B<mmap>(2)  B<MAP_NORESERVE> flag.  "
9408 "Do not reserve swap space for this segment.  When swap space is reserved, "
9409 "one has the guarantee that it is possible to modify the segment.  When swap "
9410 "space is not reserved one might get B<SIGSEGV> upon a write if no physical "
9411 "memory is available.  See also the discussion of the file I</proc/sys/vm/"
9412 "overcommit_memory> in B<proc>(5)."
9413 msgstr ""
9414 "このフラグは、 B<mmap>(2)  の B<MAP_NORESERVE> フラグと同じ役割を果たす。 こ"
9415 "のセグメントに対するスワップ空間の予約を行わない。 スワップ空間を予約した場合"
9416 "は、そのセグメントの変更が必ず成功することが 保証される。スワップ空間の予約を"
9417 "行わなかった場合は、物理メモリに空きが ないと書き込み時に B<SIGSEGV> を受け取"
9418 "る可能性がある。 B<proc>(5)  にある I</proc/sys/vm/overcommit_memory> ファイ"
9419 "ルに関する議論も参照のこと。"
9420
9421 #. type: Plain text
9422 #: build/C/man2/shmget.2:148
9423 msgid ""
9424 "When a new shared memory segment is created, its contents are initialized to "
9425 "zero values, and its associated data structure, I<shmid_ds> (see B<shmctl>"
9426 "(2)), is initialized as follows:"
9427 msgstr ""
9428 "共有メモリ・セグメントが新たに作成される際、 共有メモリ・セグメントの内容は "
9429 "0 で初期化され、 関連情報を保持するデータ構造体 I<shmid_ds> は以下のように初"
9430 "期化される。"
9431
9432 #. type: Plain text
9433 #: build/C/man2/shmget.2:153
9434 msgid ""
9435 "I<shm_perm.cuid> and I<shm_perm.uid> are set to the effective user ID of the "
9436 "calling process."
9437 msgstr ""
9438 "I<shm_perm.cuid> と I<shm_perm.uid> に呼び出し元プロセスの実効 (effective) "
9439 "ユーザーID を設定する。"
9440
9441 #. type: Plain text
9442 #: build/C/man2/shmget.2:158
9443 msgid ""
9444 "I<shm_perm.cgid> and I<shm_perm.gid> are set to the effective group ID of "
9445 "the calling process."
9446 msgstr ""
9447 "I<shm_perm.cgid> と I<shm_perm.gid> に呼び出し元プロセスの実効グループID を設"
9448 "定する。"
9449
9450 #. type: Plain text
9451 #: build/C/man2/shmget.2:163
9452 msgid ""
9453 "The least significant 9 bits of I<shm_perm.mode> are set to the least "
9454 "significant 9 bit of I<shmflg>."
9455 msgstr ""
9456 "I<shm_perm.mode> の下位 9 ビットに I<shmflg> の下位 9 ビットを設定する。"
9457
9458 #. type: Plain text
9459 #: build/C/man2/shmget.2:167
9460 msgid "I<shm_segsz> is set to the value of I<size>."
9461 msgstr "I<shm_segsz> に I<size> の値を設定する。"
9462
9463 #. type: Plain text
9464 #: build/C/man2/shmget.2:174
9465 msgid "I<shm_lpid>, I<shm_nattch>, I<shm_atime> and I<shm_dtime> are set to 0."
9466 msgstr ""
9467 "I<shm_lpid>, I<shm_nattch>, I<shm_atime>, I<shm_dtime> に 0 を設定する。"
9468
9469 #. type: Plain text
9470 #: build/C/man2/shmget.2:177
9471 msgid "I<shm_ctime> is set to the current time."
9472 msgstr "I<shm_ctime> に現在の時刻を設定する。"
9473
9474 #. type: Plain text
9475 #: build/C/man2/shmget.2:180
9476 msgid ""
9477 "If the shared memory segment already exists, the permissions are verified, "
9478 "and a check is made to see if it is marked for destruction."
9479 msgstr ""
9480 "共有メモリ・セグメントが既に存在する場合、アクセス許可の検査と、 破壊 "
9481 "(destruction) マークがつけられていないかのチェックが行われる。"
9482
9483 #. type: Plain text
9484 #: build/C/man2/shmget.2:184
9485 msgid ""
9486 "A valid segment identifier, I<shmid>, is returned on success, -1 on error."
9487 msgstr ""
9488 "成功した場合、有効なセグメント識別子 I<shmid> が返される。エラーの場合、 -1 "
9489 "が返される。"
9490
9491 #. type: Plain text
9492 #: build/C/man2/shmget.2:188
9493 msgid "On failure, I<errno> is set to one of the following:"
9494 msgstr "失敗した場合は I<errno> が以下のどれかに設定される:"
9495
9496 #. type: Plain text
9497 #: build/C/man2/shmget.2:194
9498 msgid ""
9499 "The user does not have permission to access the shared memory segment, and "
9500 "does not have the B<CAP_IPC_OWNER> capability."
9501 msgstr ""
9502 "ユーザーはその共有メモリ・セグメントへのアクセス許可を持たず、 "
9503 "B<CAP_IPC_OWNER> ケーパビリティも持っていない。"
9504
9505 #. type: Plain text
9506 #: build/C/man2/shmget.2:198
9507 msgid "B<IPC_CREAT | IPC_EXCL> was specified and the segment exists."
9508 msgstr ""
9509 "B<IPC_CREAT | IPC_EXCL> が指定されていたが、そのセグメントが既に存在する。"
9510
9511 #. type: Plain text
9512 #: build/C/man2/shmget.2:204
9513 msgid ""
9514 "A new segment was to be created and I<size> E<lt> B<SHMMIN> or I<size> E<gt> "
9515 "B<SHMMAX>, or no new segment was to be created, a segment with given key "
9516 "existed, but I<size> is greater than the size of that segment."
9517 msgstr ""
9518 "新しいセグメントを作成しようとした際に I<size> E<lt> B<SHMMIN> または "
9519 "I<size> E<gt> B<SHMMAX> であった。 もしくは、指定されたキーに対応するセグメン"
9520 "トが既に存在して、新しい セグメントを作成しようとはしなかったが、I<size> が存"
9521 "在するセグメントの サイズよりも大きかった。"
9522
9523 #. type: Plain text
9524 #: build/C/man2/shmget.2:213
9525 msgid ""
9526 "No segment exists for the given I<key>, and B<IPC_CREAT> was not specified."
9527 msgstr ""
9528 "指定された I<key> に対応するセグメントが存在せず、 B<IPC_CREAT> も指定されて"
9529 "いなかった。"
9530
9531 #. type: Plain text
9532 #: build/C/man2/shmget.2:216
9533 msgid "No memory could be allocated for segment overhead."
9534 msgstr "セグメントの管理情報 (overhead) に割り当てるメモリがなかった。"
9535
9536 #. type: Plain text
9537 #: build/C/man2/shmget.2:224
9538 msgid ""
9539 "All possible shared memory IDs have been taken (B<SHMMNI>), or allocating a "
9540 "segment of the requested I<size> would cause the system to exceed the system-"
9541 "wide limit on shared memory (B<SHMALL>)."
9542 msgstr ""
9543 "システム全体の共有メモリ・セグメント数の制限 (B<SHMMNI>)  に達した、または要"
9544 "求された I<size> のセグメントの割り当てが システム全体の共有メモリサイズの制"
9545 "限 (B<SHMALL>)  を超過した。"
9546
9547 #. type: Plain text
9548 #: build/C/man2/shmget.2:231
9549 msgid ""
9550 "The B<SHM_HUGETLB> flag was specified, but the caller was not privileged "
9551 "(did not have the B<CAP_IPC_LOCK> capability)."
9552 msgstr ""
9553 "B<SHM_HUGETLB> フラグが指定されたが、呼び出し元には権限がなかった "
9554 "(B<CAP_IPC_LOCK> ケーパビリティを持っていなかった)。"
9555
9556 #. type: Plain text
9557 #: build/C/man2/shmget.2:237
9558 msgid "B<SHM_HUGETLB> is a nonportable Linux extension."
9559 msgstr "B<SHM_HUGETLB> は Linux での拡張であり、移植性はない。"
9560
9561 #. type: Plain text
9562 #: build/C/man2/shmget.2:260
9563 msgid ""
9564 "B<IPC_PRIVATE> isn't a flag field but a I<key_t> type.  If this special "
9565 "value is used for I<key>, the system call ignores everything but the least "
9566 "significant 9 bits of I<shmflg> and creates a new shared memory segment (on "
9567 "success)."
9568 msgstr ""
9569 "B<IPC_PRIVATE> はフラグではなく I<key_t> 型である。 この特別な値が I<key> に"
9570 "使用された場合は、 B<shmget>()  は I<shmflg> の下位 9 ビットを除いた全てを無"
9571 "視し、 (成功すれば) 新しい共有メモリ・セグメントを作成する。"
9572
9573 #. type: Plain text
9574 #: build/C/man2/shmget.2:264
9575 msgid ""
9576 "The following limits on shared memory segment resources affect the B<shmget>"
9577 "()  call:"
9578 msgstr ""
9579 "B<shmget>()  コールに影響する共有メモリ・セグメント資源の制限は以下の通りであ"
9580 "る:"
9581
9582 #. type: TP
9583 #: build/C/man2/shmget.2:264
9584 #, no-wrap
9585 msgid "B<SHMALL>"
9586 msgstr "B<SHMALL>"
9587
9588 #. type: Plain text
9589 #: build/C/man2/shmget.2:269
9590 msgid ""
9591 "System wide maximum of shared memory pages (on Linux, this limit can be read "
9592 "and modified via I</proc/sys/kernel/shmall>)."
9593 msgstr ""
9594 "システム全体の共有メモリ・ページの最大数 (Linux では、この上限値は I</proc/"
9595 "sys/kernel/shmall> 経由で参照したり、変更したりできる)。"
9596
9597 #. type: TP
9598 #: build/C/man2/shmget.2:269
9599 #, no-wrap
9600 msgid "B<SHMMAX>"
9601 msgstr "B<SHMMAX>"
9602
9603 #. type: Plain text
9604 #: build/C/man2/shmget.2:274
9605 msgid ""
9606 "Maximum size in bytes for a shared memory segment: policy dependent (on "
9607 "Linux, this limit can be read and modified via I</proc/sys/kernel/shmmax>)."
9608 msgstr ""
9609 "共有メモリ・セグメントのバイト単位の大きさの上限: 方針依存 (Linux では、この"
9610 "上限値は I</proc/sys/kernel/shmmax> 経由で参照したり、変更したりできる)。"
9611
9612 #. type: TP
9613 #: build/C/man2/shmget.2:274
9614 #, no-wrap
9615 msgid "B<SHMMIN>"
9616 msgstr "B<SHMMIN>"
9617
9618 #. type: Plain text
9619 #: build/C/man2/shmget.2:280
9620 msgid ""
9621 "Minimum size in bytes for a shared memory segment: implementation dependent "
9622 "(currently 1 byte, though B<PAGE_SIZE> is the effective minimum size)."
9623 msgstr ""
9624 "共有メモリ・セグメントのバイト単位の大きさの下限: 実装依存 (現在は 1 バイトだ"
9625 "が、実質的な最小サイズは B<PAGE_SIZE> である)。"
9626
9627 #. type: TP
9628 #: build/C/man2/shmget.2:280
9629 #, no-wrap
9630 msgid "B<SHMMNI>"
9631 msgstr "B<SHMMNI>"
9632
9633 #.  Kernels between 2.4.x and 2.6.8 had an off-by-one error that meant
9634 #.  that we could create one more segment than SHMMNI -- MTK
9635 #.  This /proc file is not available in Linux 2.2 and earlier -- MTK
9636 #. type: Plain text
9637 #: build/C/man2/shmget.2:289
9638 msgid ""
9639 "System wide maximum number of shared memory segments: implementation "
9640 "dependent (currently 4096, was 128 before Linux 2.3.99; on Linux, this limit "
9641 "can be read and modified via I</proc/sys/kernel/shmmni>)."
9642 msgstr ""
9643 "システム全体の共有メモリーの数の上限: 実装依存 (現在は 4096。Linux 2.3.99 よ"
9644 "り前では 128。 Linux では、この上限値は I</proc/sys/kernel/shmmni> 経由で参照"
9645 "したり、変更したりできる)。"
9646
9647 #. type: Plain text
9648 #: build/C/man2/shmget.2:293
9649 msgid ""
9650 "The implementation has no specific limits for the per-process maximum number "
9651 "of shared memory segments (B<SHMSEG>)."
9652 msgstr ""
9653 "プロセス当りの共有メモリ・セグメントの個数の最大値 (B<SHMSEG>)  に関する実装"
9654 "上の制限はない。"
9655
9656 #. type: Plain text
9657 #: build/C/man2/shmget.2:299
9658 msgid ""
9659 "Until version 2.3.30 Linux would return B<EIDRM> for a B<shmget>()  on a "
9660 "shared memory segment scheduled for deletion."
9661 msgstr ""
9662 "バージョン 2.3.30 までは、Linux は 削除が予定されている共有メモリ・セグメント"
9663 "に対して B<shmget>()  が行われると B<EIDRM> を返していた。"
9664
9665 #. type: Plain text
9666 #: build/C/man2/shmget.2:305
9667 msgid ""
9668 "The name choice B<IPC_PRIVATE> was perhaps unfortunate, B<IPC_NEW> would "
9669 "more clearly show its function."
9670 msgstr ""
9671 "B<IPC_PRIVATE> という名前を選んだのはおそらく失敗であろう。 B<IPC_NEW> の方が"
9672 "より明確にその機能を表しているだろう。"
9673
9674 #. type: Plain text
9675 #: build/C/man2/shmget.2:313
9676 msgid ""
9677 "B<shmat>(2), B<shmctl>(2), B<shmdt>(2), B<ftok>(3), B<capabilities>(7), "
9678 "B<shm_overview>(7), B<svipc>(7)"
9679 msgstr ""
9680 "B<shmat>(2), B<shmctl>(2), B<shmdt>(2), B<ftok>(3), B<capabilities>(7), "
9681 "B<shm_overview>(7), B<svipc>(7)"
9682
9683 #. type: TH
9684 #: build/C/man2/shmop.2:41
9685 #, no-wrap
9686 msgid "SHMOP"
9687 msgstr "SHMOP"
9688
9689 #. type: Plain text
9690 #: build/C/man2/shmop.2:44
9691 msgid "shmat, shmdt - shared memory operations"
9692 msgstr "shmat, shmdt - 共有メモリ (shared memory) の操作"
9693
9694 #. type: Plain text
9695 #: build/C/man2/shmop.2:48
9696 #, no-wrap
9697 msgid ""
9698 "B<#include E<lt>sys/types.hE<gt>>\n"
9699 "B<#include E<lt>sys/shm.hE<gt>>\n"
9700 msgstr ""
9701 "B<#include E<lt>sys/types.hE<gt>>\n"
9702 "B<#include E<lt>sys/shm.hE<gt>>\n"
9703
9704 #. type: Plain text
9705 #: build/C/man2/shmop.2:50
9706 #, no-wrap
9707 msgid "B<void *shmat(int >I<shmid>B<, const void *>I<shmaddr>B<, int >I<shmflg>B<);>\n"
9708 msgstr "B<void *shmat(int >I<shmid>B<, const void *>I<shmaddr>B<, int >I<shmflg>B<);>\n"
9709
9710 #. type: Plain text
9711 #: build/C/man2/shmop.2:52
9712 #, no-wrap
9713 msgid "B<int shmdt(const void *>I<shmaddr>B<);>\n"
9714 msgstr "B<int shmdt(const void *>I<shmaddr>B<);>\n"
9715
9716 #. type: Plain text
9717 #: build/C/man2/shmop.2:61
9718 msgid ""
9719 "B<shmat>()  attaches the shared memory segment identified by I<shmid> to the "
9720 "address space of the calling process.  The attaching address is specified by "
9721 "I<shmaddr> with one of the following criteria:"
9722 msgstr ""
9723 "B<shmat>()  は I<shmid> で指定された共有メモリ・セグメント (shared memory "
9724 "segment) を コールしたプロセスのアドレス空間に付加 (attach) する。 付加するア"
9725 "ドレスは I<shmaddr> に以下のどれかの形式で指定する:"
9726
9727 #. type: Plain text
9728 #: build/C/man2/shmop.2:67
9729 msgid ""
9730 "If I<shmaddr> is NULL, the system chooses a suitable (unused) address at "
9731 "which to attach the segment."
9732 msgstr ""
9733 "I<shmaddr> が NULL ならば、システムはセグメントを付加するための 適切な (使用"
9734 "されていない) アドレスを選択する。"
9735
9736 #. type: Plain text
9737 #: build/C/man2/shmop.2:82
9738 msgid ""
9739 "If I<shmaddr> isn't NULL and B<SHM_RND> is specified in I<shmflg>, the "
9740 "attach occurs at the address equal to I<shmaddr> rounded down to the nearest "
9741 "multiple of B<SHMLBA>.  Otherwise I<shmaddr> must be a page-aligned address "
9742 "at which the attach occurs."
9743 msgstr ""
9744 "I<shmaddr> が NULL でなく B<SHM_RND> が I<shmflg> に指定されている場合は、 "
9745 "I<shmaddr> を B<SHMLBA> の倍数へと切り捨てた (rounding down) のと等しいアドレ"
9746 "スへ付加する。 その他の場合は I<shmaddr> は付加を行なうアドレスで、ページ境界"
9747 "を指している必要がある。"
9748
9749 #. type: Plain text
9750 #: build/C/man2/shmop.2:92
9751 msgid ""
9752 "If B<SHM_RDONLY> is specified in I<shmflg>, the segment is attached for "
9753 "reading and the process must have read permission for the segment.  "
9754 "Otherwise the segment is attached for read and write and the process must "
9755 "have read and write permission for the segment.  There is no notion of a "
9756 "write-only shared memory segment."
9757 msgstr ""
9758 "B<SHM_RDONLY> が I<shmflg> に指定されていた場合は、 セグメントは読み込み専用"
9759 "に付加され、プロセスはそのセグメントへの 読み込み許可を持たなければならな"
9760 "い。 そうでなければそのセグメントは読み込みと書き込みのために付加され、 プロ"
9761 "セスはそのセグメントに読み込みと書き込みの許可を持つ必要がある。 書き込み専用"
9762 "の共有メモリ・セグメントという概念は存在しない。"
9763
9764 #. type: Plain text
9765 #: build/C/man2/shmop.2:107
9766 msgid ""
9767 "The (Linux-specific)  B<SHM_REMAP> flag may be specified in I<shmflg> to "
9768 "indicate that the mapping of the segment should replace any existing mapping "
9769 "in the range starting at I<shmaddr> and continuing for the size of the "
9770 "segment.  (Normally an B<EINVAL> error would result if a mapping already "
9771 "exists in this address range.)  In this case, I<shmaddr> must not be NULL."
9772 msgstr ""
9773 "(Linux 特有の)  B<SHM_REMAP> フラグが I<shmflg> に指定された場合は、 セグメン"
9774 "トのマッピングを既存のマッピングに置き換える。 マッピングの範囲は、 "
9775 "I<shmaddr> から始まりセグメントのサイズ分だけある (通常 B<EINVAL> エラーは、"
9776 "このアドレス範囲にマッピングが既に存在するために起る)。 このフラグを指定する"
9777 "場合は、 I<shmaddr> が NULL であってはならない。"
9778
9779 #. type: Plain text
9780 #: build/C/man2/shmop.2:114
9781 msgid ""
9782 "The B<brk>(2)  value of the calling process is not altered by the attach.  "
9783 "The segment will automatically be detached at process exit.  The same "
9784 "segment may be attached as a read and as a read-write one, and more than "
9785 "once, in the process's address space."
9786 msgstr ""
9787 "呼び出したプロセスの B<brk>(2)  の値は付加によって変化しない。 そのセグメント"
9788 "はプロセスが終了 (exit) したら自動的に分離 (detach) される。 同じセグメントを"
9789 "プロセスのアドレス空間に、読み込み専用および読み書き両用 として付加でき、また"
9790 "複数回付加することもできる。"
9791
9792 #. type: Plain text
9793 #: build/C/man2/shmop.2:122
9794 msgid ""
9795 "A successful B<shmat>()  call updates the members of the I<shmid_ds> "
9796 "structure (see B<shmctl>(2))  associated with the shared memory segment as "
9797 "follows:"
9798 msgstr ""
9799 "成功した B<shmat>()  コールは共有メモリ・セグメントに関連する I<shmid_ds> 構"
9800 "造体 (B<shmctl>(2)  を参照) のメンバーを以下のように更新する:"
9801
9802 #. type: Plain text
9803 #: build/C/man2/shmop.2:125
9804 msgid "I<shm_atime> is set to the current time."
9805 msgstr "I<shm_atime> には現在の時刻を設定する。"
9806
9807 #. type: Plain text
9808 #: build/C/man2/shmop.2:128 build/C/man2/shmop.2:154
9809 msgid "I<shm_lpid> is set to the process-ID of the calling process."
9810 msgstr "I<shm_lpid> には呼び出したプロセスのプロセス ID が設定される。"
9811
9812 #. type: Plain text
9813 #: build/C/man2/shmop.2:131
9814 msgid "I<shm_nattch> is incremented by one."
9815 msgstr "I<shm_nattch> を 1 増加させる。"
9816
9817 #. type: Plain text
9818 #: build/C/man2/shmop.2:142
9819 msgid ""
9820 "B<shmdt>()  detaches the shared memory segment located at the address "
9821 "specified by I<shmaddr> from the address space of the calling process.  The "
9822 "to-be-detached segment must be currently attached with I<shmaddr> equal to "
9823 "the value returned by the attaching B<shmat>()  call."
9824 msgstr ""
9825 "B<shmdt>()  は呼び出したプロセスのアドレス空間から I<shmaddr> で指定されたア"
9826 "ドレスに配置された共有メモリ・セグメントを分離 (detach) する。 分離する共有メ"
9827 "モリ・セグメントは、現在 I<shmaddr> に付加されているものでなければならない。 "
9828 "I<shmaddr> は、それを付加した時に B<shmat>()  が返した値に等しくなければなら"
9829 "ない。"
9830
9831 #. type: Plain text
9832 #: build/C/man2/shmop.2:148
9833 msgid ""
9834 "On a successful B<shmdt>()  call the system updates the members of the "
9835 "I<shmid_ds> structure associated with the shared memory segment as follows:"
9836 msgstr ""
9837 "成功した B<shmdt>()  コールはその共有メモリ・セグメントに関連する "
9838 "I<shmid_ds> 構造体のメンバーを以下のように更新する:"
9839
9840 #. type: Plain text
9841 #: build/C/man2/shmop.2:151
9842 msgid "I<shm_dtime> is set to the current time."
9843 msgstr "I<shm_dtime> には現在の時刻が設定される。"
9844
9845 #. type: Plain text
9846 #: build/C/man2/shmop.2:159
9847 msgid ""
9848 "I<shm_nattch> is decremented by one.  If it becomes 0 and the segment is "
9849 "marked for deletion, the segment is deleted."
9850 msgstr ""
9851 "I<shm_nattch> を 1 減少させる。 もし 0 になり、削除マークがあった場合は その"
9852 "セグメントは削除される。"
9853
9854 #. type: Plain text
9855 #: build/C/man2/shmop.2:163
9856 msgid ""
9857 "After a B<fork>(2)  the child inherits the attached shared memory segments."
9858 msgstr ""
9859 "B<fork>(2)  した後、子プロセスは付加された共有メモリ・セグメントを継承する。"
9860
9861 #. type: Plain text
9862 #: build/C/man2/shmop.2:167
9863 msgid ""
9864 "After an B<execve>(2)  all attached shared memory segments are detached from "
9865 "the process."
9866 msgstr ""
9867 "B<exec>(2)  した後、全ての付加された共有メモリ・セグメントはプロセスから分離"
9868 "される。"
9869
9870 #. type: Plain text
9871 #: build/C/man2/shmop.2:171
9872 msgid ""
9873 "Upon B<_exit>(2)  all attached shared memory segments are detached from the "
9874 "process."
9875 msgstr ""
9876 "B<exit>(2)  において、全ての付加された共有メモリ・セグメントはプロセスから分"
9877 "離される。"
9878
9879 #. type: Plain text
9880 #: build/C/man2/shmop.2:179
9881 msgid ""
9882 "On success B<shmat>()  returns the address of the attached shared memory "
9883 "segment; on error I<(void\\ *)\\ -1> is returned, and I<errno> is set to "
9884 "indicate the cause of the error."
9885 msgstr ""
9886 "B<shmat>()  は、成功した場合、 付加された共有メモリ・セグメントのアドレスを返"
9887 "す。 エラーの場合、 I<(void\\ *)\\ -1> を返し、 I<errno> にエラーの原因を示す"
9888 "値を設定する。"
9889
9890 #. type: Plain text
9891 #: build/C/man2/shmop.2:185
9892 msgid ""
9893 "On success B<shmdt>()  returns 0; on error -1 is returned, and I<errno> is "
9894 "set to indicate the cause of the error."
9895 msgstr ""
9896 "B<shmdt>()  は、成功すると 0 を返す。 エラーの場合、-1 を返し、 I<errno> にエ"
9897 "ラーの原因を示す値を設定する。"
9898
9899 #. type: Plain text
9900 #: build/C/man2/shmop.2:191
9901 msgid "When B<shmat>()  fails, I<errno> is set to one of the following:"
9902 msgstr ""
9903 "B<shmat>()  が失敗した場合、 I<errno> に以下の値のどれかを設定して返す:"
9904
9905 #. type: Plain text
9906 #: build/C/man2/shmop.2:197
9907 msgid ""
9908 "The calling process does not have the required permissions for the requested "
9909 "attach type, and does not have the B<CAP_IPC_OWNER> capability."
9910 msgstr ""
9911 "呼び出したプロセスに要求された種類の付加に必要な許可がなく、 "
9912 "B<CAP_IPC_OWNER> ケーパビリティ (capability) がない。"
9913
9914 #. type: Plain text
9915 #: build/C/man2/shmop.2:214
9916 msgid ""
9917 "Invalid I<shmid> value, unaligned (i.e., not page-aligned and B<SHM_RND> was "
9918 "not specified) or invalid I<shmaddr> value, or can't attach segment at "
9919 "I<shmaddr>, or B<SHM_REMAP> was specified and I<shmaddr> was NULL."
9920 msgstr ""
9921 "I<shmid> の値が不正である。 I<shmaddr> の値が境界違反 (unaligned) (つまり、"
9922 "ページ境界に合っておらず、 B<SHM_RND> が指定されていない) または が不正であ"
9923 "る。 I<shmaddr> へのセグメントの付加に失敗した。 または B<SHM_REMAP> が指定さ"
9924 "れているが、 I<shmaddr> が NULL であった。"
9925
9926 #. type: Plain text
9927 #: build/C/man2/shmop.2:217
9928 msgid "Could not allocate memory for the descriptor or for the page tables."
9929 msgstr ""
9930 "ディスクリプター (descriptor) やページ・テーブルのためのメモリを 割り当てるこ"
9931 "とができない。"
9932
9933 #. type: Plain text
9934 #: build/C/man2/shmop.2:223
9935 msgid "When B<shmdt>()  fails, I<errno> is set as follows:"
9936 msgstr "B<shmdt>()  が失敗した場合、 B<EINVAL> は以下のようにセットされる:"
9937
9938 #.  The following since 2.6.17-rc1:
9939 #. type: Plain text
9940 #: build/C/man2/shmop.2:231
9941 msgid ""
9942 "There is no shared memory segment attached at I<shmaddr>; or, I<shmaddr> is "
9943 "not aligned on a page boundary."
9944 msgstr ""
9945 "I<shmaddr> に付加された共有メモリ・セグメントが存在しない。 もしくは、 "
9946 "I<shmaddr> がページ境界に合っていない。"
9947
9948 #. type: Plain text
9949 #: build/C/man2/shmop.2:250
9950 msgid ""
9951 "In SVID 3 (or perhaps earlier)  the type of the I<shmaddr> argument was "
9952 "changed from I<char *> into I<const void *>, and the returned type of "
9953 "B<shmat>()  from I<char *> into I<void *>.  (Linux libc4 and libc5 have the "
9954 "I<char *> prototypes; glibc2 has I<void *>.)"
9955 msgstr ""
9956 "SVID 3 で (たぶんそれより前だと思うが)  I<shmaddr> 引き数の型は I<char *> か"
9957 "ら I<const void *> に、I<shmat>() の返り値の型は I<char *> から I<void *> に"
9958 "変更された (Linux では libc4 と libc5 のプロトタイプは I<char *> であり、"
9959 "glibc2 のプロトタイプは I<void *> である)。"
9960
9961 #. type: Plain text
9962 #: build/C/man2/shmop.2:262
9963 msgid ""
9964 "Using B<shmat>()  with I<shmaddr> equal to NULL is the preferred, portable "
9965 "way of attaching a shared memory segment.  Be aware that the shared memory "
9966 "segment attached in this way may be attached at different addresses in "
9967 "different processes.  Therefore, any pointers maintained within the shared "
9968 "memory must be made relative (typically to the starting address of the "
9969 "segment), rather than absolute."
9970 msgstr ""
9971 "共有メモリセグメントを付加する場合の移植性の高い方法としては、 I<shmaddr> を "
9972 "NULL にして B<shmat>()  を使用するのがよい。 このような方法で付加される共有メ"
9973 "モリセグメントは、 プロセスが異なれば別のアドレスに付加される、という点に注意"
9974 "すること。 よって共有メモリ内で管理されるポインタは、 絶対アドレスではなく、 "
9975 "(一般的にはセグメントの開始アドレスからの)  相対アドレスで作成するべきであ"
9976 "る。"
9977
9978 #. type: Plain text
9979 #: build/C/man2/shmop.2:267
9980 msgid ""
9981 "On Linux, it is possible to attach a shared memory segment even if it is "
9982 "already marked to be deleted.  However, POSIX.1-2001 does not specify this "
9983 "behavior and many other implementations do not support it."
9984 msgstr ""
9985 "Linux では共有メモリセグメントに既に削除マークが付けられていても、 その共有メ"
9986 "モリセグメントを付加することができる。 しかし POSIX.1-2001 ではこのような動作"
9987 "を指定しておらず、 他の多くの実装もこれをサポートしていない。"
9988
9989 #. type: Plain text
9990 #: build/C/man2/shmop.2:270
9991 msgid "The following system parameter affects B<shmat>():"
9992 msgstr "以下のシステム・パラメーターは、 B<shmat>()  に影響する:"
9993
9994 #.  FIXME A good explanation of the rationale for the existence
9995 #.  of SHMLBA would be useful here
9996 #. type: TP
9997 #: build/C/man2/shmop.2:270
9998 #, no-wrap
9999 msgid "B<SHMLBA>"
10000 msgstr "B<SHMLBA>"
10001
10002 #.  FIXME That last sentence isn't true for all Linux
10003 #.  architectures (i.e., SHMLBA != PAGE_SIZE for some architectures)
10004 #.  -- MTK, Nov 04
10005 #. type: Plain text
10006 #: build/C/man2/shmop.2:283
10007 msgid ""
10008 "Segment low boundary address multiple.  Must be page aligned.  For the "
10009 "current implementation the B<SHMLBA> value is B<PAGE_SIZE>."
10010 msgstr ""
10011 "セグメントの境界アドレスの最小倍数。ページ境界に合ってなければならない。 現在"
10012 "の実装では B<SHMLBA> の値は B<PAGE_SIZE> である。"
10013
10014 #. type: Plain text
10015 #: build/C/man2/shmop.2:287
10016 msgid ""
10017 "The implementation places no intrinsic limit on the per-process maximum "
10018 "number of shared memory segments (B<SHMSEG>)."
10019 msgstr ""
10020 "現在の実装では、プロセスごとの 共有メモリ・セグメントの最大数 (B<SHMSEG>)  に"
10021 "関する実装依存の制限はない。"
10022
10023 #. type: Plain text
10024 #: build/C/man2/shmop.2:295
10025 msgid ""
10026 "B<brk>(2), B<mmap>(2), B<shmctl>(2), B<shmget>(2), B<capabilities>(7), "
10027 "B<shm_overview>(7), B<svipc>(7)"
10028 msgstr ""
10029 "B<brk>(2), B<mmap>(2), B<shmctl>(2), B<shmget>(2), B<capabilities>(7), "
10030 "B<shm_overview>(7), B<svipc>(7)"
10031
10032 #. type: TH
10033 #: build/C/man2/subpage_prot.2:30
10034 #, no-wrap
10035 msgid "SUBPAGE_PROT"
10036 msgstr "SUBPAGE_PROT"
10037
10038 #. type: TH
10039 #: build/C/man2/subpage_prot.2:30
10040 #, fuzzy, no-wrap
10041 #| msgid "2012-04-23"
10042 msgid "2012-07-13"
10043 msgstr "2012-04-23"
10044
10045 #. type: Plain text
10046 #: build/C/man2/subpage_prot.2:33
10047 msgid "subpage_prot - define a subpage protection for an address range"
10048 msgstr ""
10049
10050 #. type: Plain text
10051 #: build/C/man2/subpage_prot.2:37
10052 #, no-wrap
10053 msgid ""
10054 "B<long subpage_prot(unsigned long >I<addr>B<, unsigned long >I<len>B<,>\n"
10055 "B<                  uint32_t *>I<map>B<);>\n"
10056 msgstr ""
10057 "B<long subpage_prot(unsigned long >I<addr>B<, unsigned long >I<len>B<,>\n"
10058 "B<                  uint32_t *>I<map>B<);>\n"
10059
10060 #. type: Plain text
10061 #: build/C/man2/subpage_prot.2:41
10062 msgid "I<Note>: There is no glibc wrapper for this system call; see NOTES."
10063 msgstr ""
10064
10065 #. type: Plain text
10066 #: build/C/man2/subpage_prot.2:47
10067 msgid ""
10068 "The PowerPC-specific B<subpage_prot>()  system call provides the facility to "
10069 "control the access permissions on individual 4kB subpages on systems "
10070 "configured with a page size of 64kB."
10071 msgstr ""
10072
10073 #. type: Plain text
10074 #: build/C/man2/subpage_prot.2:54
10075 msgid ""
10076 "The protection map is applied to the memory pages in the region starting at "
10077 "I<addr> and continuing for I<len> bytes.  Both of these arguments must be "
10078 "aligned to a 64-kB boundary."
10079 msgstr ""
10080
10081 #. type: Plain text
10082 #: build/C/man2/subpage_prot.2:66
10083 msgid ""
10084 "The protection map is specified in the buffer pointed to by I<map>.  The map "
10085 "has 2 bits per 4kB subpage; thus each 32-bit word specifies the protections "
10086 "of 16 4kB subpages inside a 64kB page (so, the number of 32-bit words "
10087 "pointed to by I<map> should equate to the number of 64-kB pages specified by "
10088 "I<len>).  Each 2-bit field in the protection map is either 0 to allow any "
10089 "access, 1 to prevent writes, or 2 or 3 to prevent all accesses."
10090 msgstr ""
10091
10092 #. type: Plain text
10093 #: build/C/man2/subpage_prot.2:71
10094 msgid ""
10095 "On success, B<subpage_prot>()  returns 0.  Otherwise, one of the error codes "
10096 "specified below is returned."
10097 msgstr ""
10098
10099 #. type: Plain text
10100 #: build/C/man2/subpage_prot.2:77
10101 msgid "The buffer referred to by I<map> is not accessible."
10102 msgstr ""
10103
10104 #. type: Plain text
10105 #: build/C/man2/subpage_prot.2:87
10106 msgid ""
10107 "The I<addr> or I<len> arguments are incorrect.  Both of these arguments must "
10108 "be aligned to a multiple of the system page size, and they must not refer to "
10109 "a region outside of the address space of the process or to a region that "
10110 "consists of huge pages."
10111 msgstr ""
10112
10113 #. type: Plain text
10114 #: build/C/man2/subpage_prot.2:90 build/C/man2/sync_file_range.2:166
10115 msgid "Out of memory."
10116 msgstr "メモリ不足である。"
10117
10118 #. type: Plain text
10119 #: build/C/man2/subpage_prot.2:96
10120 msgid ""
10121 "This system call is provided on the PowerPC architecture since Linux "
10122 "2.6.25.  The system call is provided only if the kernel is configured with "
10123 "B<CONFIG_PPC_64K_PAGES>.  No library support is provided."
10124 msgstr ""
10125
10126 #. type: Plain text
10127 #: build/C/man2/subpage_prot.2:101
10128 msgid ""
10129 "Glibc does not provide a wrapper for this system call; call it using "
10130 "B<syscall>(2)."
10131 msgstr ""
10132
10133 #. type: Plain text
10134 #: build/C/man2/subpage_prot.2:106
10135 msgid ""
10136 "Normal page protections (at the 64-kB page level) also apply; the subpage "
10137 "protection mechanism is an additional constraint, so putting 0 in a 2-bit "
10138 "field won't allow writes to a page that is otherwise write-protected."
10139 msgstr ""
10140
10141 #. type: SS
10142 #: build/C/man2/subpage_prot.2:106
10143 #, no-wrap
10144 msgid "Rationale"
10145 msgstr ""
10146
10147 #.  In the initial implementation, it was the case that:
10148 #.      In fact the whole process is switched to use 4k hardware pages when the
10149 #.      subpage_prot system call is used, but this could be improved in future
10150 #.      to switch only the affected segments.
10151 #.  But Paul Mackerass says (Oct 2010): I'm pretty sure we now only switch
10152 #.  the affected segment, not the whole process.
10153 #. type: Plain text
10154 #: build/C/man2/subpage_prot.2:128
10155 msgid ""
10156 "This system call is provided to assist writing emulators that operate using "
10157 "64-kB pages on PowerPC systems.  When emulating systems such as x86, which "
10158 "uses a smaller page size, the emulator can no longer use the memory-"
10159 "management unit (MMU)  and normal system calls for controlling page "
10160 "protections.  (The emulator could emulate the MMU by checking and possibly "
10161 "remapping the address for each memory access in software, but that is "
10162 "slow.)  The idea is that the emulator supplies an array of protection masks "
10163 "to apply to a specified range of virtual addresses.  These masks are applied "
10164 "at the level where hardware page-table entries (PTEs)  are inserted into the "
10165 "hardware page table based on the Linux PTEs, so the Linux PTEs are not "
10166 "affected.  Implicit in this is that the regions of the address space that "
10167 "are protected are switched to use 4-kB hardware pages rather than 64-kB "
10168 "hardware pages (on machines with hardware 64-kB page support)."
10169 msgstr ""
10170
10171 #. type: Plain text
10172 #: build/C/man2/subpage_prot.2:131
10173 #, fuzzy
10174 #| msgid "B<mprotect>(2), B<syscall>(2);"
10175 msgid "B<mprotect>(2), B<syscall>(2)"
10176 msgstr "B<mprotect>(2), B<syscall>(2);"
10177
10178 #. type: Plain text
10179 #: build/C/man2/subpage_prot.2:134
10180 msgid "I<Documentation/vm/hugetlbpage.txt> in the Linux kernel source tree"
10181 msgstr ""
10182
10183 #. type: TH
10184 #: build/C/man2/sync_file_range.2:30
10185 #, no-wrap
10186 msgid "SYNC_FILE_RANGE"
10187 msgstr "SYNC_FILE_RANGE"
10188
10189 #. type: Plain text
10190 #: build/C/man2/sync_file_range.2:33
10191 msgid "sync_file_range - sync a file segment with disk"
10192 msgstr "sync_file_range - ファイルセグメントをディスクと同期する"
10193
10194 #. type: Plain text
10195 #: build/C/man2/sync_file_range.2:37
10196 #, no-wrap
10197 msgid ""
10198 "B<#define _GNU_SOURCE>         /* See feature_test_macros(7) */\n"
10199 "B<#include E<lt>fcntl.hE<gt>>\n"
10200 msgstr ""
10201 "B<#define _GNU_SOURCE>         /* feature_test_macros(7) 参照 */\n"
10202 "B<#include E<lt>fcntl.hE<gt>>\n"
10203
10204 #. type: Plain text
10205 #: build/C/man2/sync_file_range.2:40
10206 #, no-wrap
10207 msgid ""
10208 "B<int sync_file_range(int >I<fd>B<, off64_t >I<offset>B<, off64_t >I<nbytes>B<,>\n"
10209 "B<                    unsigned int >I<flags>B<);>\n"
10210 msgstr ""
10211 "B<int sync_file_range(int >I<fd>B<, off64_t >I<offset>B<, off64_t >I<nbytes>B<,>\n"
10212 "B<                    unsigned int >I<flags>B<);>\n"
10213
10214 #. type: Plain text
10215 #: build/C/man2/sync_file_range.2:47
10216 msgid ""
10217 "B<sync_file_range>()  permits fine control when synchronizing the open file "
10218 "referred to by the file descriptor I<fd> with disk."
10219 msgstr ""
10220 "B<sync_file_range>()  を使うと、ファイルディスクリプタ I<fd> で参照されるオー"
10221 "プンされたファイルのディスクとの同期に関して、 きめ細かな制御が可能となる。"
10222
10223 #. type: Plain text
10224 #: build/C/man2/sync_file_range.2:61
10225 msgid ""
10226 "I<offset> is the starting byte of the file range to be synchronized.  "
10227 "I<nbytes> specifies the length of the range to be synchronized, in bytes; if "
10228 "I<nbytes> is zero, then all bytes from I<offset> through to the end of file "
10229 "are synchronized.  Synchronization is in units of the system page size: "
10230 "I<offset> is rounded down to a page boundary; I<(offset+nbytes-1)> is "
10231 "rounded up to a page boundary."
10232 msgstr ""
10233 "I<offset> は、同期を行うファイルの領域の開始バイトである。 I<nbytes> には同期"
10234 "を行う領域の長さをバイト単位で指定する。 I<nbytes> が 0 の場合は、 I<offset> "
10235 "からファイル末尾までの全バイトを同期する。 同期はシステムのページサイズの単位"
10236 "で行われる。 I<offset> はページ境界にあわせて切り下げられ、 I<(offset"
10237 "+nbytes-1)> はページ境界にあわせて切り上げられる。"
10238
10239 #. type: Plain text
10240 #: build/C/man2/sync_file_range.2:65
10241 msgid "The I<flags> bit-mask argument can include any of the following values:"
10242 msgstr "ビットマスク引き数 I<flags> には以下の値を指定することができる:"
10243
10244 #. type: TP
10245 #: build/C/man2/sync_file_range.2:65
10246 #, no-wrap
10247 msgid "B<SYNC_FILE_RANGE_WAIT_BEFORE>"
10248 msgstr "B<SYNC_FILE_RANGE_WAIT_BEFORE>"
10249
10250 #. type: Plain text
10251 #: build/C/man2/sync_file_range.2:70
10252 msgid ""
10253 "Wait upon write-out of all pages in the specified range that have already "
10254 "been submitted to the device driver for write-out before performing any "
10255 "write."
10256 msgstr ""
10257 "何らかの書き込みを行う前に、指定された領域のページで 書き出しを行うようにデバ"
10258 "イスドライバにすでに要求が発行されている ページの書き出しが全て完了するのを待"
10259 "つ。"
10260
10261 #. type: TP
10262 #: build/C/man2/sync_file_range.2:70 build/C/man2/sync_file_range.2:120
10263 #, no-wrap
10264 msgid "B<SYNC_FILE_RANGE_WRITE>"
10265 msgstr "B<SYNC_FILE_RANGE_WRITE>"
10266
10267 #. type: Plain text
10268 #: build/C/man2/sync_file_range.2:76
10269 msgid ""
10270 "Initiate write-out of all dirty pages in the specified range which are not "
10271 "presently submitted write-out.  Note that even this may block if you attempt "
10272 "to write more than request queue size."
10273 msgstr ""
10274 "指定された領域のページで、書き出し要求が発行されていない 全ての dirty (キャッ"
10275 "シュだけが変更されている) ページの 書き出しを開始する。 リクエストキューの大"
10276 "きさより多く書き込もうとした場合には、 この処理は停止 (block) する可能性があ"
10277 "る点に注意すること。"
10278
10279 #. type: TP
10280 #: build/C/man2/sync_file_range.2:76
10281 #, no-wrap
10282 msgid "B<SYNC_FILE_RANGE_WAIT_AFTER>"
10283 msgstr "B<SYNC_FILE_RANGE_WAIT_AFTER>"
10284
10285 #. type: Plain text
10286 #: build/C/man2/sync_file_range.2:80
10287 msgid ""
10288 "Wait upon write-out of all pages in the range after performing any write."
10289 msgstr ""
10290 "何らかの書き込み後に、指定された領域の全てのページの 書き出しが行われるのを待"
10291 "つ。"
10292
10293 #. type: Plain text
10294 #: build/C/man2/sync_file_range.2:84
10295 msgid "Specifying I<flags> as 0 is permitted, as a no-op."
10296 msgstr "I<flags> に 0 を指定した場合、何もしないことを表す。"
10297
10298 #. type: SS
10299 #: build/C/man2/sync_file_range.2:84
10300 #, no-wrap
10301 msgid "Warning"
10302 msgstr "警告"
10303
10304 #. type: Plain text
10305 #: build/C/man2/sync_file_range.2:100
10306 msgid ""
10307 "This system call is extremely dangerous and should not be used in portable "
10308 "programs.  None of these operations writes out the file's metadata.  "
10309 "Therefore, unless the application is strictly performing overwrites of "
10310 "already-instantiated disk blocks, there are no guarantees that the data will "
10311 "be available after a crash.  There is no user interface to know if a write "
10312 "is purely an overwrite.  On file systems using copy-on-write semantics (e."
10313 "g., I<btrfs>)  an overwrite of existing allocated blocks is impossible.  "
10314 "When writing into preallocated space, many file systems also require calls "
10315 "into the block allocator, which this system call does not sync out to disk.  "
10316 "This system call does not flush disk write caches and thus does not provide "
10317 "any data integrity on systems with volatile disk write caches."
10318 msgstr ""
10319 "このシステムコールは非常に危険であり、 移植性が必要なプログラムで使用すべきで"
10320 "はない。 これらの操作ではどれもファイルのメタデータの書き出しを行わない。 し"
10321 "たがって、アプリケーションにより作成済みのディスクブロックの 上書きの実行が確"
10322 "実に行われない限り、クラッシュの後でもデータが 利用できる保証はない。 書き込"
10323 "みが上書きだけであるかを知るためのユーザインタフェースは存在しない。 "
10324 "(I<btrfs> などの) copy-on-write 動作を使ったファイルシステムでは、 既存の割り"
10325 "当て済みのブロックに対する上書き自体ができない。 前もって割り当てられた領域に"
10326 "書き込みを行う場合、 多くのファイルシステムでは block allocator への書き込み"
10327 "も必要となるが、 このシステムコールは block allocator のディスクへの同期を行"
10328 "わない。 このシステムコールはディスク書き込みキャッシュのフラッシュを 行わな"
10329 "いので、揮発性のディスク書き込みキャッシュを使ったシステムでは このシステム"
10330 "コールではデータの一貫性を確保できないことになる。"
10331
10332 #. type: SS
10333 #: build/C/man2/sync_file_range.2:100
10334 #, no-wrap
10335 msgid "Some details"
10336 msgstr "詳細"
10337
10338 #. type: Plain text
10339 #: build/C/man2/sync_file_range.2:108
10340 msgid ""
10341 "B<SYNC_FILE_RANGE_WAIT_BEFORE> and B<SYNC_FILE_RANGE_WAIT_AFTER> will detect "
10342 "any I/O errors or B<ENOSPC> conditions and will return these to the caller."
10343 msgstr ""
10344 "B<SYNC_FILE_RANGE_WAIT_BEFORE> と B<SYNC_FILE_RANGE_WAIT_AFTER> は I/O エラー"
10345 "や B<ENOSPC> 状態を検出し、呼び出し元にこれらの情報を返す。"
10346
10347 #. type: Plain text
10348 #: build/C/man2/sync_file_range.2:112
10349 msgid "Useful combinations of the I<flags> bits are:"
10350 msgstr "I<flags> の役に立つビットの組み合わせを以下に示す:"
10351
10352 #. type: TP
10353 #: build/C/man2/sync_file_range.2:112
10354 #, no-wrap
10355 msgid "B<SYNC_FILE_RANGE_WAIT_BEFORE | SYNC_FILE_RANGE_WRITE>"
10356 msgstr "B<SYNC_FILE_RANGE_WAIT_BEFORE | SYNC_FILE_RANGE_WRITE>"
10357
10358 #. type: Plain text
10359 #: build/C/man2/sync_file_range.2:120
10360 msgid ""
10361 "Ensures that all pages in the specified range which were dirty when "
10362 "B<sync_file_range>()  was called are placed under write-out.  This is a "
10363 "start-write-for-data-integrity operation."
10364 msgstr ""
10365 "指定された範囲内のページで、 B<sync_file_range>()  が呼び出された際に dirty "
10366 "であった全てのページが、 確実に書き出し対象となるようにする。 これは、start-"
10367 "write-for-data-integrity 操作 (データ完全性確保のための書き込み開始の操作) で"
10368 "ある。"
10369
10370 #. type: Plain text
10371 #: build/C/man2/sync_file_range.2:127
10372 msgid ""
10373 "Start write-out of all dirty pages in the specified range which are not "
10374 "presently under write-out.  This is an asynchronous flush-to-disk "
10375 "operation.  This is not suitable for data integrity operations."
10376 msgstr ""
10377 "指定された範囲内のページで、現在書き出し中でない全ての dirty ページの 書き出"
10378 "しを開始する。これは非同期のディスクへのフラッシュ (flush-to-disk)  操作であ"
10379 "る。データ完全性確保が必要な操作としては適切ではない。"
10380
10381 #. type: TP
10382 #: build/C/man2/sync_file_range.2:127
10383 #, no-wrap
10384 msgid "B<SYNC_FILE_RANGE_WAIT_BEFORE> (or B<SYNC_FILE_RANGE_WAIT_AFTER>)"
10385 msgstr "B<SYNC_FILE_RANGE_WAIT_BEFORE> (or B<SYNC_FILE_RANGE_WAIT_AFTER>)"
10386
10387 #. type: Plain text
10388 #: build/C/man2/sync_file_range.2:134
10389 msgid ""
10390 "Wait for completion of write-out of all pages in the specified range.  This "
10391 "can be used after an earlier B<SYNC_FILE_RANGE_WAIT_BEFORE | "
10392 "SYNC_FILE_RANGE_WRITE> operation to wait for completion of that operation, "
10393 "and obtain its result."
10394 msgstr ""
10395 "指定された範囲内の全てのページの書き出しの完了を待つ。 このフラグは、前に行わ"
10396 "れた操作 B<SYNC_FILE_RANGE_WAIT_BEFORE | SYNC_FILE_RANGE_WRITE> の後に使用で"
10397 "き、この操作の完了を待ち、結果を取得することができる。"
10398
10399 #. type: TP
10400 #: build/C/man2/sync_file_range.2:134
10401 #, no-wrap
10402 msgid "B<SYNC_FILE_RANGE_WAIT_BEFORE | SYNC_FILE_RANGE_WRITE | SYNC_FILE_RANGE_WAIT_AFTER>"
10403 msgstr "B<SYNC_FILE_RANGE_WAIT_BEFORE | SYNC_FILE_RANGE_WRITE | SYNC_FILE_RANGE_WAIT_AFTER>"
10404
10405 #. type: Plain text
10406 #: build/C/man2/sync_file_range.2:141
10407 msgid ""
10408 "This is a write-for-data-integrity operation that will ensure that all pages "
10409 "in the specified range which were dirty when B<sync_file_range>()  was "
10410 "called are committed to disk."
10411 msgstr ""
10412 "これは write-for-data-integrity 操作 (データ完全性確保のための書き込み) であ"
10413 "り、指定された範囲内の、 B<sync_file_range>()  が呼ばれた時点で dirty な全て"
10414 "のページが ディスクに格納されることが保証される。"
10415
10416 #. type: Plain text
10417 #: build/C/man2/sync_file_range.2:147
10418 msgid ""
10419 "On success, B<sync_file_range>()  returns 0; on failure -1 is returned and "
10420 "I<errno> is set to indicate the error."
10421 msgstr ""
10422 "成功の場合、 B<sync_file_range>()  は 0 を返す。失敗の場合、-1 を返し、 "
10423 "I<error> にエラーを示す値を設定する。"
10424
10425 #. type: Plain text
10426 #: build/C/man2/sync_file_range.2:152
10427 msgid "I<fd> is not a valid file descriptor."
10428 msgstr "I<fd> が有効なファイルディスクリプタではない。"
10429
10430 #. type: Plain text
10431 #: build/C/man2/sync_file_range.2:160
10432 msgid ""
10433 "I<flags> specifies an invalid bit; or I<offset> or I<nbytes> is invalid."
10434 msgstr ""
10435 "I<flags> に不正なビットが指定されている。または I<offset> か I<nbytes> が不正"
10436 "である。"
10437
10438 #. type: Plain text
10439 #: build/C/man2/sync_file_range.2:163
10440 msgid "I/O error."
10441 msgstr "I/O エラー。"
10442
10443 #. type: Plain text
10444 #: build/C/man2/sync_file_range.2:169
10445 msgid "Out of disk space."
10446 msgstr "ディスク領域不足である。"
10447
10448 #.  FIXME . (bug?) Actually, how can 'fd' refer to a symbolic link (S_ISLNK)?
10449 #.  (In user space at least) it isn't possible to obtain a file descriptor
10450 #.  for a symbolic link.
10451 #. type: Plain text
10452 #: build/C/man2/sync_file_range.2:177
10453 msgid ""
10454 "I<fd> refers to something other than a regular file, a block device, a "
10455 "directory, or a symbolic link."
10456 msgstr ""
10457 "I<fd> が、通常のファイル、ブロックデバイス、ディレクトリ、シンボリックリンク "
10458 "以外のものを指している。"
10459
10460 #. type: Plain text
10461 #: build/C/man2/sync_file_range.2:180
10462 msgid "B<sync_file_range>()  appeared on Linux in kernel 2.6.17."
10463 msgstr "B<sync_file_range>()  はカーネル 2.6.17 で Linux に登場した。"
10464
10465 #. type: Plain text
10466 #: build/C/man2/sync_file_range.2:183
10467 msgid ""
10468 "This system call is Linux-specific, and should be avoided in portable "
10469 "programs."
10470 msgstr ""
10471 "このシステムコールは Linux 独自であり、 移植性が必要なプログラムでは使用を避"
10472 "けるべきである。"
10473
10474 #.  See kernel commit edd5cd4a9424f22b0fa08bef5e299d41befd5622
10475 #. type: Plain text
10476 #: build/C/man2/sync_file_range.2:196
10477 msgid ""
10478 "Some architectures (e.g., PowerPC, ARM)  need 64-bit arguments to be aligned "
10479 "in a suitable pair of registers.  On such architectures, the call signature "
10480 "of B<sync_file_range>()  is flawed, since it forces a register to be wasted "
10481 "as padding between the I<fd> and I<offset> arguments.  Therefore, these "
10482 "architectures define a different system call that orders the arguments "
10483 "suitably:"
10484 msgstr ""
10485 "いくつかのアーキテクチャ (例えば、 PowerPC や ARM) では、 64 ビットの\n"
10486 "引き数は適切なレジスタの組に割り当てる必要がある。このようなアーキテク\n"
10487 "チャでは、 B<sync_file_range>() の呼び出し方には欠陥があり、それはこの\n"
10488 "システムコールでは引き数 I<fd> と I<offset> の間のパディング (詰めもの)\n"
10489 "でレジスタが一つ消費されてしまうというものである。そのため、これらの\n"
10490 "アーキテクチャでは引き数が適切な順序になった別のシステムコールが定義\n"
10491 "されている。"
10492
10493 #. type: Plain text
10494 #: build/C/man2/sync_file_range.2:201
10495 #, no-wrap
10496 msgid ""
10497 "B<int sync_file_range2(int >I<fd>B<, unsigned int >I<flags>B<,>\n"
10498 "B<                     off64_t >I<offset>B<, off64_t >I<nbytes>B<);>\n"
10499 msgstr ""
10500 "B<int sync_file_range2(int >I<fd>B<, unsigned int >I<flags>B<,>\n"
10501 "B<                     off64_t >I<offset>B<, off64_t >I<nbytes>B<);>\n"
10502
10503 #. type: Plain text
10504 #: build/C/man2/sync_file_range.2:206
10505 msgid ""
10506 "The behavior of this system call is otherwise exactly the same as "
10507 "B<sync_file_range>()."
10508 msgstr ""
10509 "上記の点以外は、このシステムコールの動作は B<sync_file_range>() と\n"
10510 "全く同じである。このシステムコールに対するライブラリによるサポートは\n"
10511 "glibc では提供されていない。"
10512
10513 #. type: Plain text
10514 #: build/C/man2/sync_file_range.2:217
10515 msgid ""
10516 "A system call with this signature first appeared on the ARM architecture in "
10517 "Linux 2.6.20, with the name B<arm_sync_file_range>().  It was renamed in "
10518 "Linux 2.6.22, when the analogous system call was added for PowerPC.  On "
10519 "architectures where glibc support is provided, glibc transparently wraps "
10520 "B<sync_file_range2>()  under the name B<sync_file_range>()."
10521 msgstr ""
10522 "このバージョンのシステムコールは、Linux 2.6.20 で ARM アーキテクチャで\n"
10523 "初めて登場し、 B<arm_sync_file_range>() という名前であった。\n"
10524 "Linux 2.6.22 で、同様のシステムコールが PowerPC 用に追加された際に、\n"
10525 "システムコールの名前が変更された。\n"
10526 "glibc によるサポートが提供されているアーキテクチャでは、\n"
10527 "glibc のラッパー関数は B<sync_file_range>() という名前で\n"
10528 "B<sync_file_range2>() を適切に使用するようになっている。"
10529
10530 #. type: Plain text
10531 #: build/C/man2/sync_file_range.2:222
10532 msgid "B<fdatasync>(2), B<fsync>(2), B<msync>(2), B<sync>(2)"
10533 msgstr "B<fdatasync>(2), B<fsync>(2), B<msync>(2), B<sync>(2)"
10534
10535 #~ msgid "2011-09-08"
10536 #~ msgstr "2011-09-08"
10537
10538 #~ msgid "2010-09-20"
10539 #~ msgstr "2010-09-20"
10540
10541 #~ msgid "2008-08-07"
10542 #~ msgstr "2008-08-07"
10543
10544 #~ msgid "2006-05-02"
10545 #~ msgstr "2006-05-02"
10546
10547 #~ msgid "2008-06-03"
10548 #~ msgstr "2008-06-03"
10549
10550 #~ msgid "2010-10-30"
10551 #~ msgstr "2010-10-30"
10552
10553 #~ msgid "the kernel source file I<Documentation/vm/hugetlbpage.txt>."
10554 #~ msgstr "カーネルソースファイルの I<Documentation/vm/hugetlbpage.txt>"
10555
10556 #~ msgid ""
10557 #~ "The I<mode> is not supported by the file system containing the file "
10558 #~ "referred to by I<fd>."
10559 #~ msgstr ""
10560 #~ "I<fd> が参照するファイルを含むファイルシステムが I<mode> をサポートしてい"
10561 #~ "ない。"
10562
10563 #~ msgid ""
10564 #~ "The function B<mtrace>()  installs handlers for B<malloc>(3), B<realloc>"
10565 #~ "(3)  and B<free>(3).  The function B<muntrace>()  disables these handlers."
10566 #~ msgstr ""
10567 #~ "関数 B<mtrace>()  は、 B<malloc>(3), B<realloc>(3), B<free>(3)  のハンドラ"
10568 #~ "を組み込む。 関数 B<muntrace>()  はこれらのハンドラを解除する。"
10569
10570 #~ msgid ""
10571 #~ "The environment variable B<MALLOC_TRACE> defines a file where B<mtrace>"
10572 #~ "()  writes its output.  This file must be writable to the user or "
10573 #~ "B<mtrace>()  will do nothing.  If the file is not empty it will be "
10574 #~ "truncated."
10575 #~ msgstr ""
10576 #~ "環境変数 B<MALLOC_TRACE> は B<mtrace>()  が出力を書き出すファイルを指定す"
10577 #~ "る。 ユーザが書き込み権限を持つファイルを指定しなければならない。 書き込み"
10578 #~ "権限がない場合、 B<mtrace>()  は何もしない。 ファイルが空でない場合、ファ"
10579 #~ "イルの元の内容を上書きする。"
10580
10581 #~ msgid "These are GNU extensions."
10582 #~ msgstr "この関数は GNU 拡張である。"
10583
10584 #~ msgid ""
10585 #~ "The output of B<mtrace>()  will be ASCII but not in a friendly format.  "
10586 #~ "So glibc comes with a perl-script called mtrace to make sense of it."
10587 #~ msgstr ""
10588 #~ "B<mtrace>()  の出力は ASCII 形式だが、人が読みやすいフォーマットではな"
10589 #~ "い。 そこで、glibc には mtrace 出力を分かりやすい形式に変換する perl スク"
10590 #~ "リプトが付属している。"
10591
10592 #~ msgid ""
10593 #~ "This flag allocates and initializes to zero the disk space within the "
10594 #~ "range specified by I<offset> and I<len>.  After a successful call, "
10595 #~ "subsequent writes into this range are guaranteed not to fail because of "
10596 #~ "lack of disk space.  Preallocating zeroed blocks beyond the end of the "
10597 #~ "file is useful for optimizing append workloads.  Preallocating blocks "
10598 #~ "does not change the file size (as reported by B<stat>(2))  even if it is "
10599 #~ "less than I<offset>+I<len>."
10600 #~ msgstr ""
10601 #~ "このフラグは、 I<offset> と I<len> で指定された領域のディスク空間を割り当"
10602 #~ "て、その空間を 0 で初期化する。 呼び出しが成功すると、それに続いてこの領域"
10603 #~ "への書き込みが行われるが、 ディスク空間の不足による書き込み失敗が発生しな"
10604 #~ "いことが保証される。 ファイル末尾より後ろの領域について 0 で埋めたブロック"
10605 #~ "を前もって 割り当てておくことは、追記 (append) の作業負荷を最適化するのに "
10606 #~ "有用である。 ファイルサイズが I<offset>+I<len> よりも小さい場合であって"
10607 #~ "も、ブロックの前もっての割り当てにより (B<stat>(2)  が返す) ファイルサイズ"
10608 #~ "は変更されることはない。"
10609
10610 #~ msgid ""
10611 #~ "(Linux 2.6.9 and later) the caller was not privileged (B<CAP_IPC_LOCK>)  "
10612 #~ "and its B<RLIMIT_MEMLOCK> soft resource limit was 0."
10613 #~ msgstr ""
10614 #~ "(Linux 2.6.9 以降) 呼び出し元は特権 (B<CAP_IPC_LOCK>)  を持たず、ソフト資"
10615 #~ "源制限 B<RLIMIT_MEMLOCK> が 0 である。"
10616
10617 #~ msgid ""
10618 #~ "(Linux 2.6.8 and earlier)  The calling process has insufficient privilege "
10619 #~ "to call B<munlockall>().  Under Linux the B<CAP_IPC_LOCK> capability is "
10620 #~ "required."
10621 #~ msgstr ""
10622 #~ "(Linux 2.6.8 以前)  呼び出し元プロセスが B<munlockall>()  を呼び出すのに必"
10623 #~ "要な特権を所有していなかった。 Linux では、 B<CAP_IPC_LOCK> ケーパビリティ"
10624 #~ "が必要である。"
10625
10626 #~ msgid ""
10627 #~ "B<posix_fadvise>()  appeared in kernel 2.5.60.  Glibc support has been "
10628 #~ "provided since version 2.2."
10629 #~ msgstr ""
10630 #~ "B<posix_fadvise>()  はカーネル 2.5.60 で登場した。 glibc でのサポートは "
10631 #~ "glibc バージョン 2.2 以降で行われている。"