OSDN Git Service

(split) LDP: Update ja.po (editorical changes)
[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-26 12:04+0900\n"
11 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
12 "Language-Team: LANGUAGE <LL@li.org>\n"
13 "Language: \n"
14 "MIME-Version: 1.0\n"
15 "Content-Type: text/plain; charset=UTF-8\n"
16 "Content-Transfer-Encoding: 8bit\n"
17
18 #. type: TH
19 #: build/C/man2/alloc_hugepages.2:25
20 #, no-wrap
21 msgid "ALLOC_HUGEPAGES"
22 msgstr "ALLOC_HUGEPAGES"
23
24 #. type: TH
25 #: build/C/man2/alloc_hugepages.2:25
26 #, no-wrap
27 msgid "2007-05-31"
28 msgstr "2007-05-31"
29
30 #. type: TH
31 #: build/C/man2/alloc_hugepages.2:25 build/C/man2/cacheflush.2:25
32 #: build/C/man2/fallocate.2:11 build/C/man2/madvise.2:35
33 #: build/C/man3/mallinfo.3:26 build/C/man3/malloc_stats.3:26
34 #: build/C/man3/malloc_trim.3:26 build/C/man3/mallopt.3:26
35 #: build/C/man2/mlock.2:26 build/C/man2/mmap.2:40 build/C/man2/mmap2.2:29
36 #: build/C/man2/mprotect.2:38 build/C/man2/mremap.2:30 build/C/man2/msync.2:25
37 #: build/C/man2/posix_fadvise.2:28 build/C/man2/readahead.2:28
38 #: build/C/man2/remap_file_pages.2:28 build/C/man3/shm_open.3:26
39 #: build/C/man7/shm_overview.7:27 build/C/man2/shmctl.2:45
40 #: build/C/man2/shmget.2:38 build/C/man2/shmop.2:41
41 #: build/C/man2/subpage_prot.2:30 build/C/man2/sync_file_range.2:30
42 #, no-wrap
43 msgid "Linux"
44 msgstr "Linux"
45
46 #. type: TH
47 #: build/C/man2/alloc_hugepages.2:25 build/C/man3/alloca.3:43
48 #: build/C/man2/cacheflush.2:25 build/C/man2/fallocate.2:11
49 #: build/C/man2/madvise.2:35 build/C/man3/mallinfo.3:26
50 #: build/C/man3/malloc_get_state.3:25 build/C/man3/malloc_hook.3:10
51 #: build/C/man3/malloc_info.3:25 build/C/man3/malloc_stats.3:26
52 #: build/C/man3/malloc_trim.3:26 build/C/man3/malloc_usable_size.3:25
53 #: build/C/man3/mallopt.3:26 build/C/man3/mcheck.3:25 build/C/man2/mlock.2:26
54 #: build/C/man2/mmap.2:40 build/C/man2/mmap2.2:29 build/C/man2/mprotect.2:38
55 #: build/C/man2/mremap.2:30 build/C/man2/msync.2:25 build/C/man3/mtrace.3:25
56 #: build/C/man2/posix_fadvise.2:28 build/C/man3/posix_fallocate.3:25
57 #: build/C/man3/posix_memalign.3:29 build/C/man2/readahead.2:28
58 #: build/C/man2/remap_file_pages.2:28 build/C/man3/shm_open.3:26
59 #: build/C/man7/shm_overview.7:27 build/C/man2/shmctl.2:45
60 #: build/C/man2/shmget.2:38 build/C/man2/shmop.2:41
61 #: build/C/man2/subpage_prot.2:30 build/C/man2/sync_file_range.2:30
62 #, no-wrap
63 msgid "Linux Programmer's Manual"
64 msgstr "Linux Programmer's Manual"
65
66 #. type: SH
67 #: build/C/man2/alloc_hugepages.2:26 build/C/man3/alloca.3:44
68 #: build/C/man2/cacheflush.2:26 build/C/man2/fallocate.2:12
69 #: build/C/man2/madvise.2:36 build/C/man3/mallinfo.3:27
70 #: build/C/man3/malloc_get_state.3:26 build/C/man3/malloc_hook.3:11
71 #: build/C/man3/malloc_info.3:26 build/C/man3/malloc_stats.3:27
72 #: build/C/man3/malloc_trim.3:27 build/C/man3/malloc_usable_size.3:26
73 #: build/C/man3/mallopt.3:27 build/C/man3/mcheck.3:26 build/C/man2/mlock.2:27
74 #: build/C/man2/mmap.2:41 build/C/man2/mmap2.2:30 build/C/man2/mprotect.2:39
75 #: build/C/man2/mremap.2:31 build/C/man2/msync.2:26 build/C/man3/mtrace.3:26
76 #: build/C/man2/posix_fadvise.2:29 build/C/man3/posix_fallocate.3:26
77 #: build/C/man3/posix_memalign.3:30 build/C/man2/readahead.2:29
78 #: build/C/man2/remap_file_pages.2:29 build/C/man3/shm_open.3:27
79 #: build/C/man7/shm_overview.7:28 build/C/man2/shmctl.2:46
80 #: build/C/man2/shmget.2:39 build/C/man2/shmop.2:42
81 #: build/C/man2/subpage_prot.2:31 build/C/man2/sync_file_range.2:31
82 #, no-wrap
83 msgid "NAME"
84 msgstr "名前"
85
86 #. type: Plain text
87 #: build/C/man2/alloc_hugepages.2:28
88 msgid "alloc_hugepages, free_hugepages - allocate or free huge pages"
89 msgstr ""
90 "alloc_hugepages, free_hugepages - 大きなサイズのページの割り当てと解放を行う"
91
92 #. type: SH
93 #: build/C/man2/alloc_hugepages.2:28 build/C/man3/alloca.3:46
94 #: build/C/man2/cacheflush.2:28 build/C/man2/fallocate.2:14
95 #: build/C/man2/madvise.2:38 build/C/man3/mallinfo.3:29
96 #: build/C/man3/malloc_get_state.3:28 build/C/man3/malloc_hook.3:15
97 #: build/C/man3/malloc_info.3:28 build/C/man3/malloc_stats.3:29
98 #: build/C/man3/malloc_trim.3:29 build/C/man3/malloc_usable_size.3:28
99 #: build/C/man3/mallopt.3:29 build/C/man3/mcheck.3:28 build/C/man2/mlock.2:29
100 #: build/C/man2/mmap.2:43 build/C/man2/mmap2.2:32 build/C/man2/mprotect.2:41
101 #: build/C/man2/mremap.2:33 build/C/man2/msync.2:28 build/C/man3/mtrace.3:28
102 #: build/C/man2/posix_fadvise.2:31 build/C/man3/posix_fallocate.3:28
103 #: build/C/man3/posix_memalign.3:32 build/C/man2/readahead.2:31
104 #: build/C/man2/remap_file_pages.2:31 build/C/man3/shm_open.3:29
105 #: build/C/man2/shmctl.2:48 build/C/man2/shmget.2:41 build/C/man2/shmop.2:44
106 #: build/C/man2/subpage_prot.2:33 build/C/man2/sync_file_range.2:33
107 #, no-wrap
108 msgid "SYNOPSIS"
109 msgstr "書式"
110
111 #.  asmlinkage unsigned long sys_alloc_hugepages(int key, unsigned long addr,
112 #.  unsigned long len, int prot, int flag);
113 #. type: Plain text
114 #: build/C/man2/alloc_hugepages.2:34
115 #, no-wrap
116 msgid ""
117 "B<void *alloc_hugepages(int >I<key>B<, void *>I<addr>B<, size_t >I<len>B<,>\n"
118 "B<                      int >I<prot>B<, int >I<flag>B<);>\n"
119 msgstr ""
120 "B<void *alloc_hugepages(int >I<key>B<, void *>I<addr>B<, size_t >I<len>B<,>\n"
121 "B<                      int >I<prot>B<, int >I<flag>B<);>\n"
122
123 #.  asmlinkage int sys_free_hugepages(unsigned long addr);
124 #. type: Plain text
125 #: build/C/man2/alloc_hugepages.2:37
126 #, no-wrap
127 msgid "B<int free_hugepages(void *>I<addr>B<);>\n"
128 msgstr "B<int free_hugepages(void *>I<addr>B<);>\n"
129
130 #. type: SH
131 #: build/C/man2/alloc_hugepages.2:38 build/C/man3/alloca.3:50
132 #: build/C/man2/cacheflush.2:34 build/C/man2/fallocate.2:22
133 #: build/C/man2/madvise.2:50 build/C/man3/mallinfo.3:33
134 #: build/C/man3/malloc_get_state.3:36 build/C/man3/malloc_hook.3:33
135 #: build/C/man3/malloc_info.3:34 build/C/man3/malloc_stats.3:33
136 #: build/C/man3/malloc_trim.3:33 build/C/man3/malloc_usable_size.3:32
137 #: build/C/man3/mallopt.3:33 build/C/man3/mcheck.3:40 build/C/man2/mlock.2:39
138 #: build/C/man2/mmap.2:54 build/C/man2/mmap2.2:39 build/C/man2/mprotect.2:47
139 #: build/C/man2/mremap.2:42 build/C/man2/msync.2:32 build/C/man3/mtrace.3:34
140 #: build/C/man2/posix_fadvise.2:50 build/C/man3/posix_fallocate.3:46
141 #: build/C/man3/posix_memalign.3:84 build/C/man2/readahead.2:38
142 #: build/C/man2/remap_file_pages.2:39 build/C/man3/shm_open.3:41
143 #: build/C/man7/shm_overview.7:30 build/C/man2/shmctl.2:56
144 #: build/C/man2/shmget.2:49 build/C/man2/shmop.2:53
145 #: build/C/man2/subpage_prot.2:41 build/C/man2/sync_file_range.2:41
146 #, no-wrap
147 msgid "DESCRIPTION"
148 msgstr "説明"
149
150 #. type: Plain text
151 #: build/C/man2/alloc_hugepages.2:49
152 msgid ""
153 "The system calls B<alloc_hugepages>()  and B<free_hugepages>()  were "
154 "introduced in Linux 2.5.36 and removed again in 2.5.54.  They existed only "
155 "on i386 and ia64 (when built with B<CONFIG_HUGETLB_PAGE>).  In Linux 2.4.20 "
156 "the syscall numbers exist, but the calls fail with the error B<ENOSYS>."
157 msgstr ""
158 "システムコール B<alloc_hugepages>()  と B<free_hugepages>()  は Linux 2.5.36 "
159 "で導入され、2.5.54 で再び削除された。 これらのシステムコールは i386 と ia64 "
160 "のみで (かつ B<CONFIG_HUGETLB_PAGE> を指定してビルドされた場合に) 存在する。 "
161 "Linux 2.4.20 では syscall 番号が存在するが、 呼び出すとエラー B<ENOSYS> で失"
162 "敗する。"
163
164 #. type: Plain text
165 #: build/C/man2/alloc_hugepages.2:57
166 msgid ""
167 "On i386 the memory management hardware knows about ordinary pages (4 KiB)  "
168 "and huge pages (2 or 4 MiB).  Similarly ia64 knows about huge pages of "
169 "several sizes.  These system calls serve to map huge pages into the "
170 "process's memory or to free them again.  Huge pages are locked into memory, "
171 "and are not swapped."
172 msgstr ""
173 "i386 では、メモリ管理ハードウェアは通常のページ (4 KiB) と 大きなサイズのペー"
174 "ジ (以下、ヒュージページ; 2MiB または 4 MiB) を 扱うことができる。 同様に、"
175 "ia64 もいくつかのサイズのヒュージページを扱うことができる。 これらのシステム"
176 "コールは、ヒュージページをプロセスのメモリにマップしたり、 再び解放したりす"
177 "る。 ヒュージページはメモリ内にロックされ、スワップされない。"
178
179 #. type: Plain text
180 #: build/C/man2/alloc_hugepages.2:66
181 msgid ""
182 "The I<key> argument is an identifier.  When zero the pages are private, and "
183 "not inherited by children.  When positive the pages are shared with other "
184 "applications using the same I<key>, and inherited by child processes."
185 msgstr ""
186 "I<key> 引き数は識別子である。 0 の場合、ページは非公開になり、子プロセスに継"
187 "承されない。 正の場合、ページは同じ I<key> を使う他のアプリケーションと共有さ"
188 "れ、子プロセスに継承される。"
189
190 #. type: Plain text
191 #: build/C/man2/alloc_hugepages.2:81
192 msgid ""
193 "The I<addr> argument of B<free_hugepages>()  tells which page is being "
194 "freed: it was the return value of a call to B<alloc_hugepages>().  (The "
195 "memory is first actually freed when all users have released it.)  The "
196 "I<addr> argument of B<alloc_hugepages>()  is a hint, that the kernel may or "
197 "may not follow.  Addresses must be properly aligned."
198 msgstr ""
199 "B<free_hugepages>()  の I<addr> 引き数は、どのページを解放するかを指定する: "
200 "I<addr> は B<alloc_hugepages>()  の呼び出しの返り値である (全てのユーザがメモ"
201 "リを解放したときに、 そのメモリは初めて実際に解放される)。 B<alloc_hugepages>"
202 "()  の I<addr> 引き数はヒントであり、カーネルはそれに従うかもしれないし、 従"
203 "わないかもしれない。 アドレスは正しく配置されなければならない。"
204
205 #. type: Plain text
206 #: build/C/man2/alloc_hugepages.2:86
207 msgid ""
208 "The I<len> argument is the length of the required segment.  It must be a "
209 "multiple of the huge page size."
210 msgstr ""
211 "I<len> 引き数は要求されたセグメントの長さである。 これはヒュージページのサイ"
212 "ズの倍数にしなければならない。"
213
214 #. type: Plain text
215 #: build/C/man2/alloc_hugepages.2:94
216 msgid ""
217 "The I<prot> argument specifies the memory protection of the segment.  It is "
218 "one of B<PROT_READ>, B<PROT_WRITE>, B<PROT_EXEC>."
219 msgstr ""
220 "I<prot> 引き数はセグメントのメモリ保護を指定する。 これは B<PROT_READ>, "
221 "B<PROT_WRITE>, B<PROT_EXEC> のいずれかである。"
222
223 #. type: Plain text
224 #: build/C/man2/alloc_hugepages.2:109
225 msgid ""
226 "The I<flag> argument is ignored, unless I<key> is positive.  In that case, "
227 "if I<flag> is B<IPC_CREAT>, then a new huge page segment is created when "
228 "none with the given key existed.  If this flag is not set, then B<ENOENT> is "
229 "returned when no segment with the given key exists."
230 msgstr ""
231 "I<key> が正でない限り、 I<flag> 引き数は無視される。 I<key> が正で、かつ "
232 "I<flag> が B<IPC_CREAT> であり、かつ指定された I<key> で (セグメントが) 何も"
233 "存在しない場合、 新しいヒュージページセグメントが作成される。 I<flag> が設定"
234 "されておらず、かつ指定された I<key> のセグメントが存在しない場合、 B<ENOENT> "
235 "が返される。"
236
237 #. type: SH
238 #: build/C/man2/alloc_hugepages.2:109 build/C/man3/alloca.3:60
239 #: build/C/man2/cacheflush.2:53 build/C/man2/fallocate.2:112
240 #: build/C/man2/madvise.2:268 build/C/man3/malloc_get_state.3:61
241 #: build/C/man3/malloc_info.3:48 build/C/man3/malloc_trim.3:51
242 #: build/C/man3/malloc_usable_size.3:40 build/C/man3/mallopt.3:379
243 #: build/C/man3/mcheck.3:129 build/C/man2/mlock.2:116 build/C/man2/mmap.2:375
244 #: build/C/man2/mmap2.2:54 build/C/man2/mprotect.2:78
245 #: build/C/man2/mremap.2:127 build/C/man2/msync.2:68
246 #: build/C/man2/posix_fadvise.2:87 build/C/man3/posix_fallocate.3:66
247 #: build/C/man3/posix_memalign.3:141 build/C/man2/readahead.2:65
248 #: build/C/man2/remap_file_pages.2:124 build/C/man3/shm_open.3:169
249 #: build/C/man2/shmctl.2:274 build/C/man2/shmget.2:180
250 #: build/C/man2/shmop.2:171 build/C/man2/subpage_prot.2:66
251 #: build/C/man2/sync_file_range.2:141
252 #, no-wrap
253 msgid "RETURN VALUE"
254 msgstr "返り値"
255
256 #. type: Plain text
257 #: build/C/man2/alloc_hugepages.2:118
258 msgid ""
259 "On success, B<alloc_hugepages>()  returns the allocated virtual address, and "
260 "B<free_hugepages>()  returns zero.  On error, -1 is returned, and I<errno> "
261 "is set appropriately."
262 msgstr ""
263 "成功した場合、 B<alloc_hugepages>()  は割り当てられた仮想アドレスを返し、 "
264 "B<free_hugepages>()  は 0 を返す。 失敗した場合、-1 を返し、 I<errno> が適切"
265 "に設定される。"
266
267 #. type: SH
268 #: build/C/man2/alloc_hugepages.2:118 build/C/man2/cacheflush.2:59
269 #: build/C/man2/fallocate.2:115 build/C/man2/madvise.2:275
270 #: build/C/man3/malloc_info.3:53 build/C/man3/malloc_trim.3:56
271 #: build/C/man3/mallopt.3:384 build/C/man2/mlock.2:122 build/C/man2/mmap.2:392
272 #: build/C/man2/mmap2.2:61 build/C/man2/mprotect.2:85
273 #: build/C/man2/mremap.2:135 build/C/man2/msync.2:73
274 #: build/C/man2/posix_fadvise.2:90 build/C/man3/posix_fallocate.3:72
275 #: build/C/man3/posix_memalign.3:155 build/C/man2/readahead.2:71
276 #: build/C/man2/remap_file_pages.2:131 build/C/man3/shm_open.3:178
277 #: build/C/man2/shmctl.2:296 build/C/man2/shmget.2:184
278 #: build/C/man2/shmop.2:185 build/C/man2/subpage_prot.2:71
279 #: build/C/man2/sync_file_range.2:147
280 #, no-wrap
281 msgid "ERRORS"
282 msgstr "エラー"
283
284 #. type: TP
285 #: build/C/man2/alloc_hugepages.2:119 build/C/man2/fallocate.2:154
286 #, no-wrap
287 msgid "B<ENOSYS>"
288 msgstr "B<ENOSYS>"
289
290 #. type: Plain text
291 #: build/C/man2/alloc_hugepages.2:122
292 msgid "The system call is not supported on this kernel."
293 msgstr "このシステムコールはカーネルでサポートされていない。"
294
295 #. type: SH
296 #: build/C/man2/alloc_hugepages.2:122
297 #, no-wrap
298 msgid "FILES"
299 msgstr "ファイル"
300
301 #. type: Plain text
302 #: build/C/man2/alloc_hugepages.2:126
303 msgid ""
304 "I</proc/sys/vm/nr_hugepages> Number of configured hugetlb pages.  This can "
305 "be read and written."
306 msgstr ""
307 "I</proc/sys/vm/nr_hugepages> 設定された hugetlb ページの数。 このファイルは読"
308 "み書きできる。"
309
310 #. type: Plain text
311 #: build/C/man2/alloc_hugepages.2:130
312 msgid ""
313 "I</proc/meminfo> Gives info on the number of configured hugetlb pages and on "
314 "their size in the three variables HugePages_Total, HugePages_Free, "
315 "Hugepagesize."
316 msgstr ""
317 "I</proc/meminfo> 設定された hugetlb ページの数と、 3 つの変数 "
318 "HugePages_Total, HugePages_Free, Hugepagesize の サイズについての情報を提供す"
319 "る。"
320
321 #. type: SH
322 #: build/C/man2/alloc_hugepages.2:130 build/C/man3/alloca.3:65
323 #: build/C/man2/cacheflush.2:75 build/C/man2/fallocate.2:195
324 #: build/C/man2/madvise.2:325 build/C/man3/mallinfo.3:110
325 #: build/C/man3/malloc_get_state.3:86 build/C/man3/malloc_hook.3:80
326 #: build/C/man3/malloc_info.3:61 build/C/man3/malloc_stats.3:55
327 #: build/C/man3/malloc_trim.3:60 build/C/man3/malloc_usable_size.3:48
328 #: build/C/man3/mallopt.3:392 build/C/man3/mcheck.3:145
329 #: build/C/man2/mlock.2:186 build/C/man2/mmap.2:497 build/C/man2/mmap2.2:77
330 #: build/C/man2/mprotect.2:113 build/C/man2/mremap.2:185
331 #: build/C/man2/msync.2:96 build/C/man3/mtrace.3:78
332 #: build/C/man2/posix_fadvise.2:112 build/C/man3/posix_fallocate.3:103
333 #: build/C/man3/posix_memalign.3:180 build/C/man2/readahead.2:87
334 #: build/C/man2/remap_file_pages.2:153 build/C/man3/shm_open.3:249
335 #: build/C/man7/shm_overview.7:101 build/C/man2/shmctl.2:368
336 #: build/C/man2/shmget.2:231 build/C/man2/shmop.2:231
337 #: build/C/man2/subpage_prot.2:96 build/C/man2/sync_file_range.2:180
338 #, no-wrap
339 msgid "CONFORMING TO"
340 msgstr "準拠"
341
342 #. type: Plain text
343 #: build/C/man2/alloc_hugepages.2:133
344 msgid ""
345 "These calls are specific to Linux on Intel processors, and should not be "
346 "used in programs intended to be portable."
347 msgstr ""
348 "このシステムコールは Intel プロセッサ上の Linux に固有のものであり、 移植性が"
349 "必要なプログラムで使うべきでない。"
350
351 #. type: SH
352 #: build/C/man2/alloc_hugepages.2:133 build/C/man3/alloca.3:73
353 #: build/C/man2/madvise.2:346 build/C/man3/malloc_get_state.3:88
354 #: build/C/man3/malloc_hook.3:82 build/C/man3/malloc_info.3:63
355 #: build/C/man3/malloc_stats.3:57 build/C/man3/malloc_trim.3:62
356 #: build/C/man3/malloc_usable_size.3:50 build/C/man3/mcheck.3:147
357 #: build/C/man2/mlock.2:213 build/C/man2/mmap.2:515 build/C/man2/mmap2.2:79
358 #: build/C/man2/mprotect.2:122 build/C/man2/mremap.2:191
359 #: build/C/man3/mtrace.3:80 build/C/man2/posix_fadvise.2:121
360 #: build/C/man3/posix_memalign.3:219 build/C/man3/shm_open.3:255
361 #: build/C/man7/shm_overview.7:103 build/C/man2/shmctl.2:373
362 #: build/C/man2/shmget.2:237 build/C/man2/shmop.2:250
363 #: build/C/man2/subpage_prot.2:98 build/C/man2/sync_file_range.2:183
364 #, no-wrap
365 msgid "NOTES"
366 msgstr "注意"
367
368 #. type: Plain text
369 #: build/C/man2/alloc_hugepages.2:141
370 msgid ""
371 "These system calls are gone; they existed only in Linux 2.5.36 through to "
372 "2.5.54.  Now the hugetlbfs file system can be used instead.  Memory backed "
373 "by huge pages (if the CPU supports them) is obtained by using B<mmap>(2)  to "
374 "map files in this virtual file system."
375 msgstr ""
376 "これらのシステムコールはなくなった。 これらは Linux 2.5.36 から 2.5.54 にのみ"
377 "存在する。 代わりに今は hugetlbfs ファイルシステムを使うことができる。 (CPU "
378 "がサポートしている場合) ヒュージページを持つメモリは、 B<mmap>(2)  を使ってこ"
379 "の仮想ファイルシステムでファイルをマップすることで取得できる。"
380
381 #. type: Plain text
382 #: build/C/man2/alloc_hugepages.2:145
383 msgid ""
384 "The maximal number of huge pages can be specified using the B<hugepages=> "
385 "boot parameter."
386 msgstr ""
387 "ヒュージページの最大数は、 B<hugepages=> 起動パラメータを使って指定できる。"
388
389 #. type: SH
390 #: build/C/man2/alloc_hugepages.2:150 build/C/man3/alloca.3:155
391 #: build/C/man2/cacheflush.2:89 build/C/man2/fallocate.2:203
392 #: build/C/man2/madvise.2:379 build/C/man3/mallinfo.3:279
393 #: build/C/man3/malloc_get_state.3:114 build/C/man3/malloc_hook.3:142
394 #: build/C/man3/malloc_info.3:260 build/C/man3/malloc_stats.3:67
395 #: build/C/man3/malloc_trim.3:82 build/C/man3/malloc_usable_size.3:64
396 #: build/C/man3/mallopt.3:580 build/C/man3/mcheck.3:208
397 #: build/C/man2/mlock.2:336 build/C/man2/mmap.2:730 build/C/man2/mmap2.2:98
398 #: build/C/man2/mprotect.2:229 build/C/man2/mremap.2:214
399 #: build/C/man2/msync.2:122 build/C/man3/mtrace.3:172
400 #: build/C/man2/posix_fadvise.2:189 build/C/man3/posix_fallocate.3:133
401 #: build/C/man3/posix_memalign.3:275 build/C/man2/readahead.2:98
402 #: build/C/man2/remap_file_pages.2:164 build/C/man3/shm_open.3:280
403 #: build/C/man7/shm_overview.7:127 build/C/man2/shmctl.2:425
404 #: build/C/man2/shmget.2:313 build/C/man2/shmop.2:295
405 #: build/C/man2/subpage_prot.2:134 build/C/man2/sync_file_range.2:222
406 #, no-wrap
407 msgid "COLOPHON"
408 msgstr "この文書について"
409
410 #. type: Plain text
411 #: build/C/man2/alloc_hugepages.2:157 build/C/man3/alloca.3:162
412 #: build/C/man2/cacheflush.2:96 build/C/man2/fallocate.2:210
413 #: build/C/man2/madvise.2:386 build/C/man3/mallinfo.3:286
414 #: build/C/man3/malloc_get_state.3:121 build/C/man3/malloc_hook.3:149
415 #: build/C/man3/malloc_info.3:267 build/C/man3/malloc_stats.3:74
416 #: build/C/man3/malloc_trim.3:89 build/C/man3/malloc_usable_size.3:71
417 #: build/C/man3/mallopt.3:587 build/C/man3/mcheck.3:215
418 #: build/C/man2/mlock.2:343 build/C/man2/mmap.2:737 build/C/man2/mmap2.2:105
419 #: build/C/man2/mprotect.2:236 build/C/man2/mremap.2:221
420 #: build/C/man2/msync.2:129 build/C/man3/mtrace.3:179
421 #: build/C/man2/posix_fadvise.2:196 build/C/man3/posix_fallocate.3:140
422 #: build/C/man3/posix_memalign.3:282 build/C/man2/readahead.2:105
423 #: build/C/man2/remap_file_pages.2:171 build/C/man3/shm_open.3:287
424 #: build/C/man7/shm_overview.7:134 build/C/man2/shmctl.2:432
425 #: build/C/man2/shmget.2:320 build/C/man2/shmop.2:302
426 #: build/C/man2/subpage_prot.2:141 build/C/man2/sync_file_range.2:229
427 msgid ""
428 "This page is part of release 3.50 of the Linux I<man-pages> project.  A "
429 "description of the project, and information about reporting bugs, can be "
430 "found at http://www.kernel.org/doc/man-pages/."
431 msgstr ""
432 "この man ページは Linux I<man-pages> プロジェクトのリリース 3.50 の一部\n"
433 "である。プロジェクトの説明とバグ報告に関する情報は\n"
434 "http://www.kernel.org/doc/man-pages/ に書かれている。"
435
436 #. type: TH
437 #: build/C/man3/alloca.3:43
438 #, no-wrap
439 msgid "ALLOCA"
440 msgstr "ALLOCA"
441
442 #. type: TH
443 #: build/C/man3/alloca.3:43
444 #, no-wrap
445 msgid "2008-01-24"
446 msgstr "2008-01-24"
447
448 #. type: TH
449 #: build/C/man3/alloca.3:43 build/C/man3/malloc_get_state.3:25
450 #: build/C/man3/malloc_hook.3:10 build/C/man3/malloc_info.3:25
451 #: build/C/man3/malloc_usable_size.3:25 build/C/man3/mcheck.3:25
452 #: build/C/man3/mtrace.3:25 build/C/man3/posix_fallocate.3:25
453 #: build/C/man3/posix_memalign.3:29
454 #, no-wrap
455 msgid "GNU"
456 msgstr "GNU"
457
458 #. type: Plain text
459 #: build/C/man3/alloca.3:46
460 msgid "alloca - allocate memory that is automatically freed"
461 msgstr "alloca - 自動的に解放されるメモリを割り当てる"
462
463 #. type: Plain text
464 #: build/C/man3/alloca.3:48
465 msgid "B<#include E<lt>alloca.hE<gt>>"
466 msgstr "B<#include E<lt>alloca.hE<gt>>"
467
468 #. type: Plain text
469 #: build/C/man3/alloca.3:50
470 msgid "B<void *alloca(size_t >I<size>B<);>"
471 msgstr "B<void *alloca(size_t >I<size>B<);>"
472
473 #. type: Plain text
474 #: build/C/man3/alloca.3:60
475 msgid ""
476 "The B<alloca>()  function allocates I<size> bytes of space in the stack "
477 "frame of the caller.  This temporary space is automatically freed when the "
478 "function that called B<alloca>()  returns to its caller."
479 msgstr ""
480 "B<alloca>()  関数は、 I<size> バイトの領域を呼出元のスタック・フレームに割り"
481 "付ける。 この一時的な領域は、 B<alloca>()  を呼び出した関数が呼出元に返るとき"
482 "に自動的に解放される。"
483
484 #. type: Plain text
485 #: build/C/man3/alloca.3:65
486 msgid ""
487 "The B<alloca>()  function returns a pointer to the beginning of the "
488 "allocated space.  If the allocation causes stack overflow, program behavior "
489 "is undefined."
490 msgstr ""
491 "B<alloca>()  関数は、割り付けた領域の始まりを指すポインタを返す。 割り付けに"
492 "よってスタックオーバーフローが起った場合の プログラムの動作は定義されていな"
493 "い。"
494
495 #. type: Plain text
496 #: build/C/man3/alloca.3:67
497 msgid "This function is not in POSIX.1-2001."
498 msgstr "この関数は POSIX.1-2001 にはない。"
499
500 #. type: Plain text
501 #: build/C/man3/alloca.3:73
502 msgid ""
503 "There is evidence that the B<alloca>()  function appeared in 32V, PWB, "
504 "PWB.2, 3BSD, and 4BSD.  There is a man page for it in 4.3BSD.  Linux uses "
505 "the GNU version."
506 msgstr ""
507 "32V, PWB, PWB.2, 3BSD, 4BSD に B<alloca>()  関数が登場した証拠がある。 "
508 "4.3BSD には、マニュアルページがある。 Linux は、GNU 版を使っている。 この関数"
509 "は POSIX.1-2001 にはない。"
510
511 #. type: Plain text
512 #: build/C/man3/alloca.3:88
513 msgid ""
514 "The B<alloca>()  function is machine- and compiler-dependent.  For certain "
515 "applications, its use can improve efficiency compared to the use of B<malloc>"
516 "(3)  plus B<free>(3).  In certain cases, it can also simplify memory "
517 "deallocation in applications that use B<longjmp>(3)  or B<siglongjmp>(3).  "
518 "Otherwise, its use is discouraged."
519 msgstr ""
520 "B<alloca>()  関数は、機種とコンパイラに依存する。 特定のアプリケーションで"
521 "は、この関数を使うと B<malloc>(3)  と B<free>(3)  を組み合わせて使った場合に"
522 "比べて効率を改善することができる。 特定の場合では、この関数を使うことで、 "
523 "B<longjmp>(3)  や B<siglongjmp>(3)  を使うアプリケーションでのメモリの開放を"
524 "簡単にすることができる。 それ以外の場合では、この関数の使用は推奨されない。"
525
526 #. type: Plain text
527 #: build/C/man3/alloca.3:97
528 msgid ""
529 "Because the space allocated by B<alloca>()  is allocated within the stack "
530 "frame, that space is automatically freed if the function return is jumped "
531 "over by a call to B<longjmp>(3)  or B<siglongjmp>(3)."
532 msgstr ""
533 "B<alloca>()  により割り当てられる空間はスタックフレームから割り当てらるの"
534 "で、 関数の戻り先が B<longjmp>(3)  や B<siglongjmp>(3)  の呼び出しによりジャ"
535 "ンプした場合には、 割り当てられた空間は自動的に解放される。"
536
537 #. type: Plain text
538 #: build/C/man3/alloca.3:102
539 msgid "Do not attempt to B<free>(3)  space allocated by B<alloca>()!"
540 msgstr ""
541 "B<alloca>()  で割り当てられた空間を B<free>(3)  しようとすることのないよう"
542 "に!"
543
544 #. type: SS
545 #: build/C/man3/alloca.3:102
546 #, no-wrap
547 msgid "Notes on the GNU version"
548 msgstr "GNU 版についての注意"
549
550 #. type: Plain text
551 #: build/C/man3/alloca.3:124
552 msgid ""
553 "Normally, B<gcc>(1)  translates calls to B<alloca>()  with inlined code.  "
554 "This is not done when either the I<-ansi>, I<-std=c89>, I<-std=c99>, or the "
555 "I<-fno-builtin> option is given (and the header I<E<lt>alloca.hE<gt>> is not "
556 "included).  But beware! By default the glibc version of I<E<lt>stdlib."
557 "hE<gt>> includes I<E<lt>alloca.hE<gt>> and that contains the line:"
558 msgstr ""
559 "通常 B<gcc>(1)  は B<alloca>()  の呼び出しをインラインコードに変換する。 I<-"
560 "ansi>, I<-std=c89>, I<-std=c99>, I<-fno-builtin> のいずれかのオプションが指定"
561 "された場合、この変換は行われない (また I<E<lt>alloca.hE<gt>> のインクルードも"
562 "行われない)。 だだし、デフォルトでは glibc 版の I<E<lt>stdlib.hE<gt>> は "
563 "I<E<lt>alloca.hE<gt>> をインクルードしており、これには以下の行が含まれている"
564 "ので注意すること。"
565
566 #. type: Plain text
567 #: build/C/man3/alloca.3:127
568 #, no-wrap
569 msgid "    #define alloca(size)   __builtin_alloca (size)\n"
570 msgstr "    #define alloca(size)   __builtin_alloca (size)\n"
571
572 #. type: Plain text
573 #: build/C/man3/alloca.3:130
574 msgid "with messy consequences if one has a private version of this function."
575 msgstr "独自版の __builtin_alloca (size) 関数があると厄介な結果になる。"
576
577 #. type: Plain text
578 #: build/C/man3/alloca.3:134
579 msgid ""
580 "The fact that the code is inlined means that it is impossible to take the "
581 "address of this function, or to change its behavior by linking with a "
582 "different library."
583 msgstr ""
584 "このコードはインライン化されているので、 この関数のアドレスを取得したり、 他"
585 "のライブラリをリンクして動作を変更することはできない。"
586
587 #. type: Plain text
588 #: build/C/man3/alloca.3:138
589 msgid ""
590 "The inlined code often consists of a single instruction adjusting the stack "
591 "pointer, and does not check for stack overflow.  Thus, there is no NULL "
592 "error return."
593 msgstr ""
594 "通常このインラインコードはスタックポインタを移動する 1 つの命令 "
595 "(instruction) から構成されており、 スタックオーバーフローをチェックしない。 "
596 "よって NULL エラーが返されることはない。"
597
598 #. type: SH
599 #: build/C/man3/alloca.3:138 build/C/man2/cacheflush.2:82
600 #: build/C/man3/mallinfo.3:114 build/C/man3/mallopt.3:406
601 #: build/C/man2/mlock.2:304 build/C/man2/mmap.2:587 build/C/man3/mtrace.3:102
602 #: build/C/man2/posix_fadvise.2:178 build/C/man2/shmget.2:299
603 #, no-wrap
604 msgid "BUGS"
605 msgstr "バグ"
606
607 #. type: Plain text
608 #: build/C/man3/alloca.3:143
609 msgid ""
610 "There is no error indication if the stack frame cannot be extended.  "
611 "(However, after a failed allocation, the program is likely to receive a "
612 "B<SIGSEGV> signal if it attempts to access the unallocated space.)"
613 msgstr ""
614 "スタックフレームが拡張できなかった場合、エラー通知は行われない。 (しかしなが"
615 "ら、割り当てに失敗した後で、プログラムが割り当てられなかった 空間にアクセスし"
616 "ようとした場合に B<SIGSEGV> シグナルを受信することだろう。)"
617
618 #. type: Plain text
619 #: build/C/man3/alloca.3:151
620 msgid ""
621 "On many systems B<alloca>()  cannot be used inside the list of arguments of "
622 "a function call, because the stack space reserved by B<alloca>()  would "
623 "appear on the stack in the middle of the space for the function arguments."
624 msgstr ""
625 "多くのシステムにおいて、関数コールの引き数のリスト内では B<alloca>()  が使え"
626 "ない。 これは、 B<alloca>()  によって予約されるスタック領域が、 関数引き数に"
627 "使われるスタック領域の中に現れてしまうためである。"
628
629 #. type: SH
630 #: build/C/man3/alloca.3:151 build/C/man2/fallocate.2:198
631 #: build/C/man2/madvise.2:371 build/C/man3/mallinfo.3:270
632 #: build/C/man3/malloc_get_state.3:111 build/C/man3/malloc_hook.3:137
633 #: build/C/man3/malloc_info.3:254 build/C/man3/malloc_stats.3:61
634 #: build/C/man3/malloc_trim.3:78 build/C/man3/malloc_usable_size.3:62
635 #: build/C/man3/mallopt.3:566 build/C/man3/mcheck.3:204
636 #: build/C/man2/mlock.2:329 build/C/man2/mmap.2:712 build/C/man2/mmap2.2:92
637 #: build/C/man2/mprotect.2:226 build/C/man2/mremap.2:199
638 #: build/C/man2/msync.2:118 build/C/man3/mtrace.3:167
639 #: build/C/man2/posix_fadvise.2:183 build/C/man3/posix_fallocate.3:128
640 #: build/C/man3/posix_memalign.3:270 build/C/man2/readahead.2:92
641 #: build/C/man2/remap_file_pages.2:157 build/C/man3/shm_open.3:269
642 #: build/C/man7/shm_overview.7:114 build/C/man2/shmctl.2:418
643 #: build/C/man2/shmget.2:305 build/C/man2/shmop.2:287
644 #: build/C/man2/subpage_prot.2:128 build/C/man2/sync_file_range.2:217
645 #, no-wrap
646 msgid "SEE ALSO"
647 msgstr "関連項目"
648
649 #. type: Plain text
650 #: build/C/man3/alloca.3:155
651 msgid "B<brk>(2), B<longjmp>(3), B<malloc>(3)"
652 msgstr "B<brk>(2), B<longjmp>(3), B<malloc>(3)"
653
654 #. type: TH
655 #: build/C/man2/cacheflush.2:25
656 #, no-wrap
657 msgid "CACHEFLUSH"
658 msgstr "CACHEFLUSH"
659
660 #. type: TH
661 #: build/C/man2/cacheflush.2:25
662 #, no-wrap
663 msgid "2007-05-26"
664 msgstr "2007-05-26"
665
666 #. type: Plain text
667 #: build/C/man2/cacheflush.2:28
668 msgid "cacheflush - flush contents of instruction and/or data cache"
669 msgstr "cacheflush - 命令キャッシュやデータキャッシュの内容をフラッシュする"
670
671 #. type: Plain text
672 #: build/C/man2/cacheflush.2:31
673 #, no-wrap
674 msgid "B<#include E<lt>asm/cachectl.hE<gt>>\n"
675 msgstr "B<#include E<lt>asm/cachectl.hE<gt>>\n"
676
677 #. type: Plain text
678 #: build/C/man2/cacheflush.2:33
679 #, no-wrap
680 msgid "B<int cacheflush(char *>I<addr>B<, int >I<nbytes>B<, int >I<cache>B<);>\n"
681 msgstr "B<int cacheflush(char *>I<addr>B<, int >I<nbytes>B<, int >I<cache>B<);>\n"
682
683 #. type: Plain text
684 #: build/C/man2/cacheflush.2:43
685 msgid ""
686 "B<cacheflush>()  flushes the contents of the indicated cache(s) for the user "
687 "addresses in the range I<addr> to I<(addr+nbytes-1)>.  I<cache> may be one "
688 "of:"
689 msgstr ""
690 "B<cacheflush>()  は I<addr> から I<(addr+nbytes-1)> の範囲のユーザアドレスに"
691 "対応する 指定されたキャッシュをフラッシュする。 I<cache> には以下のいずれかを"
692 "指定する:"
693
694 #. type: TP
695 #: build/C/man2/cacheflush.2:43
696 #, no-wrap
697 msgid "B<ICACHE>"
698 msgstr "B<ICACHE>"
699
700 #. type: Plain text
701 #: build/C/man2/cacheflush.2:46
702 msgid "Flush the instruction cache."
703 msgstr "命令 (instruction) キャッシュをフラッシュする。"
704
705 #. type: TP
706 #: build/C/man2/cacheflush.2:46
707 #, no-wrap
708 msgid "B<DCACHE>"
709 msgstr "B<DCACHE>"
710
711 #. type: Plain text
712 #: build/C/man2/cacheflush.2:49
713 msgid "Write back to memory and invalidate the affected valid cache lines."
714 msgstr "変更があったキャッシュラインをメモリに書き戻し、無効にする。"
715
716 #. type: TP
717 #: build/C/man2/cacheflush.2:49
718 #, no-wrap
719 msgid "B<BCACHE>"
720 msgstr "B<BCACHE>"
721
722 #. type: Plain text
723 #: build/C/man2/cacheflush.2:53
724 msgid "Same as B<(ICACHE|DCACHE)>."
725 msgstr "B<(ICACHE|DCACHE)> と同じ。"
726
727 #. type: Plain text
728 #: build/C/man2/cacheflush.2:59
729 msgid ""
730 "B<cacheflush>()  returns 0 on success or -1 on error.  If errors are "
731 "detected, I<errno> will indicate the error."
732 msgstr ""
733 "B<cacheflush>()  は成功した場合は 0 を、失敗した場合は -1 を返す。エラーが検"
734 "出された場合は I<errno> にエラーが指示される。"
735
736 #. type: TP
737 #: build/C/man2/cacheflush.2:60 build/C/man2/mmap2.2:62
738 #: build/C/man2/mremap.2:142 build/C/man2/shmctl.2:305
739 #: build/C/man2/subpage_prot.2:72
740 #, no-wrap
741 msgid "B<EFAULT>"
742 msgstr "B<EFAULT>"
743
744 #. type: Plain text
745 #: build/C/man2/cacheflush.2:67
746 msgid ""
747 "Some or all of the address range I<addr> to I<(addr+nbytes-1)> is not "
748 "accessible."
749 msgstr ""
750 "I<addr> から I<(addr+nbytes-1)> の範囲のアドレスの全てまたは一部が アクセス可"
751 "能ではない。"
752
753 #. type: TP
754 #: build/C/man2/cacheflush.2:67 build/C/man2/fallocate.2:127
755 #: build/C/man2/madvise.2:282 build/C/man3/malloc_info.3:54
756 #: build/C/man2/mlock.2:157 build/C/man2/mlock.2:164 build/C/man2/mlock.2:176
757 #: build/C/man2/mmap.2:423 build/C/man2/mmap.2:431 build/C/man2/mmap.2:436
758 #: build/C/man2/mmap2.2:65 build/C/man2/mprotect.2:95
759 #: build/C/man2/mremap.2:151 build/C/man2/msync.2:80
760 #: build/C/man2/posix_fadvise.2:94 build/C/man3/posix_fallocate.3:81
761 #: build/C/man3/posix_memalign.3:156 build/C/man2/readahead.2:76
762 #: build/C/man2/remap_file_pages.2:132 build/C/man2/remap_file_pages.2:139
763 #: build/C/man3/shm_open.3:211 build/C/man2/shmctl.2:319
764 #: build/C/man2/shmget.2:198 build/C/man2/shmop.2:200 build/C/man2/shmop.2:223
765 #: build/C/man2/subpage_prot.2:77 build/C/man2/sync_file_range.2:152
766 #, no-wrap
767 msgid "B<EINVAL>"
768 msgstr "B<EINVAL>"
769
770 #. type: Plain text
771 #: build/C/man2/cacheflush.2:75
772 msgid "I<cache> is not one of B<ICACHE>, B<DCACHE>, or B<BCACHE>."
773 msgstr "I<cache> パラメータが B<ICACHE>, B<DCACHE>, B<BCACHE> のどれでもない。"
774
775 #.  FIXME This system call was only on MIPS back in 1.2 days, but
776 #.  by now it is on a number of other architectures (but not i386).
777 #.  Investigate the details and update this page.
778 #.  Irix 6.5 appears to have a cacheflush() syscall -- mtk
779 #. type: Plain text
780 #: build/C/man2/cacheflush.2:82
781 msgid ""
782 "This Linux-specific system call is only available on MIPS-based systems.  It "
783 "should not be used in programs intended to be portable."
784 msgstr ""
785 "この Linux 特有のシステムコールは MIPS ベースのシステムでのみ有効である。 移"
786 "植を意図したプログラムで使用すべきではない。"
787
788 #. type: Plain text
789 #: build/C/man2/cacheflush.2:89
790 msgid ""
791 "The current implementation ignores the I<addr> and I<nbytes> arguments.  "
792 "Therefore, the whole cache is always flushed."
793 msgstr ""
794 "現在の実装では、引き数 I<addr> と I<nbytes> は無視される。そのため、 常に全て"
795 "のキャッシュがフラッシュされる。"
796
797 #. type: TH
798 #: build/C/man2/fallocate.2:11
799 #, no-wrap
800 msgid "FALLOCATE"
801 msgstr "FALLOCATE"
802
803 #. type: TH
804 #: build/C/man2/fallocate.2:11 build/C/man3/posix_fallocate.3:25
805 #: build/C/man2/shmop.2:41
806 #, no-wrap
807 msgid "2013-02-12"
808 msgstr "2013-02-12"
809
810 #. type: Plain text
811 #: build/C/man2/fallocate.2:14
812 msgid "fallocate - manipulate file space"
813 msgstr "fallocate - ファイル空間の操作"
814
815 #. type: Plain text
816 #: build/C/man2/fallocate.2:18 build/C/man2/readahead.2:35
817 #, no-wrap
818 msgid ""
819 "B<#define _GNU_SOURCE>             /* See feature_test_macros(7) */\n"
820 "B<#include E<lt>fcntl.hE<gt>>\n"
821 msgstr ""
822 "B<#define _GNU_SOURCE>             /* feature_test_macros(7) 参照 */\n"
823 "B<#include E<lt>fcntl.hE<gt>>\n"
824
825 #. type: Plain text
826 #: build/C/man2/fallocate.2:21
827 #, no-wrap
828 msgid "B<int fallocate(int >I<fd>B<, int >I<mode>B<, off_t >I<offset>B<, off_t >I<len>B<);>\n"
829 msgstr "B<int fallocate(int >I<fd>B<, int >I<mode>B<, off_t >I<offset>B<, off_t >I<len>B<);>\n"
830
831 #. type: Plain text
832 #: build/C/man2/fallocate.2:27
833 msgid ""
834 "This is a nonportable, Linux-specific system call.  For the portable, "
835 "POSIX.1-specified method of ensuring that space is allocated for a file, see "
836 "B<posix_fallocate>(3)."
837 msgstr ""
838 "このシステムコールは、移植性のない、Linux 固有のシステムコールである。 移植性"
839 "が必要な場合は、ファイルに対してディスク空間を確実に確保するために、 POSIX.1 "
840 "で規定された方法である B<posix_fallocate>(3)  を使うこと。"
841
842 #. type: Plain text
843 #: build/C/man2/fallocate.2:37
844 msgid ""
845 "B<fallocate>()  allows the caller to directly manipulate the allocated disk "
846 "space for the file referred to by I<fd> for the byte range starting at "
847 "I<offset> and continuing for I<len> bytes."
848 msgstr ""
849 "B<fallocate>()  を使うと、 I<fd> が参照するファイルに割り当てられたディスク空"
850 "間を直接操作できる。 操作対象は、 I<offset> から始まる長さ I<len> バイトの領"
851 "域である。"
852
853 #. type: Plain text
854 #: build/C/man2/fallocate.2:42
855 msgid ""
856 "The I<mode> argument determines the operation to be performed on the given "
857 "range.  Details of the supported operations are given in the subsections "
858 "below."
859 msgstr ""
860 "I<mode> 引き数は、指定された領域に対して実行する操作を指定する。\n"
861 "サポートされている操作の詳細は以下のサブセクションで説明する。"
862
863 #. type: SS
864 #: build/C/man2/fallocate.2:42
865 #, no-wrap
866 msgid "Allocating disk space"
867 msgstr "ディスク領域の割り当て"
868
869 #. type: Plain text
870 #: build/C/man2/fallocate.2:61
871 msgid ""
872 "The default operation (i.e., I<mode> is zero) of B<fallocate>()  allocates "
873 "and initializes to zero the disk space within the range specified by "
874 "I<offset> and I<len>.  The file size (as reported by B<stat>(2))  will be "
875 "changed if I<offset>+I<len> is greater than the file size.  This default "
876 "behavior closely resembles the behavior of the B<posix_fallocate>(3)  "
877 "library function, and is intended as a method of optimally implementing that "
878 "function."
879 msgstr ""
880 "B<fallocate>() のデフォルトの動作 (つまり I<mode> が 0 の場合) は、\n"
881 "I<offset> と I<len> で指定された範囲のディスク領域の割り当てと初期化を行"
882 "う。\n"
883 "I<offset>+I<len> がファイルサイズよりも大きかった場合、\n"
884 "(B<stat>(2) で報告される) ファイルサイズが変更される。このデフォルトの動作"
885 "は、\n"
886 "ライブラリ関数 B<posix_fallocate>(3) の動作と非常に似ている。これは、\n"
887 "このシステムコールが B<posix_fallocate>(3) を最適に実装する手段を提供する\n"
888 "ことを目的としているからである。"
889
890 #. type: Plain text
891 #: build/C/man2/fallocate.2:67
892 msgid ""
893 "After a successful call, subsequent writes into the range specified by "
894 "I<offset> and I<len> are guaranteed not to fail because of lack of disk "
895 "space."
896 msgstr ""
897 "呼び出しが成功した場合、\n"
898 "I<offset> と I<len> で指定された範囲へのそれ以降の書き込みでは、\n"
899 "ディスクの領域不足での書き込み失敗が起こらないことが保証される。"
900
901 #. type: Plain text
902 #: build/C/man2/fallocate.2:78
903 msgid ""
904 "If the B<FALLOC_FL_KEEP_SIZE> flag is specified in I<mode>, the behavior of "
905 "the call is similar, but the file size will not be changed even if I<offset>"
906 "+I<len> is greater than the file size.  Preallocating zeroed blocks beyond "
907 "the end of the file in this manner is useful for optimizing append workloads."
908 msgstr ""
909 "B<FALLOC_FL_KEEP_SIZE> フラグが I<mode> に指定された場合、このシステムコー"
910 "ル\n"
911 "の動作は似ているが、 I<offset>+I<len> がファイルサイズよりも大きい場合で\n"
912 "あってもファイルサイズは変更されない点が異なる。この場合のファイルの末尾\n"
913 "よりも後ろの前もって割り当てられた 0 で埋められたブロックは、ファイルへの\n"
914 "追記を最適化したい場合に役に立つ。"
915
916 #. type: Plain text
917 #: build/C/man2/fallocate.2:82
918 msgid ""
919 "Because allocation is done in block size chunks, B<fallocate>()  may "
920 "allocate a larger range of disk space than was specified."
921 msgstr ""
922 "割り当てはブロックサイズ単位で行われるため、 B<fallocate>() は指定されたよ"
923 "り\n"
924 "も大きなディスク領域を割り当てることがある。"
925
926 #. type: SS
927 #: build/C/man2/fallocate.2:82
928 #, no-wrap
929 msgid "Deallocating file space"
930 msgstr "ファイル空間の割り当て解除"
931
932 #. type: Plain text
933 #: build/C/man2/fallocate.2:97
934 msgid ""
935 "Specifying the B<FALLOC_FL_PUNCH_HOLE> flag (available since Linux 2.6.38) "
936 "in I<mode> deallocates space (i.e., creates a hole)  in the byte range "
937 "starting at I<offset> and continuing for I<len> bytes.  Within the specified "
938 "range, partial file system blocks are zeroed, and whole file system blocks "
939 "are removed from the file.  After a successful call, subsequent reads from "
940 "this range will return zeroes."
941 msgstr ""
942
943 #. type: Plain text
944 #: build/C/man2/fallocate.2:108
945 msgid ""
946 "The B<FALLOC_FL_PUNCH_HOLE> flag must be ORed with B<FALLOC_FL_KEEP_SIZE> in "
947 "I<mode>; in other words, even when punching off the end of the file, the "
948 "file size (as reported by B<stat>(2))  does not change."
949 msgstr ""
950
951 #. type: Plain text
952 #: build/C/man2/fallocate.2:112
953 msgid ""
954 "Not all file systems support B<FALLOC_FL_PUNCH_HOLE>; if a file system "
955 "doesn't support the operation, an error is returned."
956 msgstr ""
957
958 #. type: Plain text
959 #: build/C/man2/fallocate.2:115
960 msgid "B<fallocate>()  returns zero on success, and -1 on failure."
961 msgstr "B<fallocate>()  は成功すると 0 を返し、エラーの場合は -1 を返す。"
962
963 #. type: TP
964 #: build/C/man2/fallocate.2:116 build/C/man2/madvise.2:279
965 #: build/C/man2/mmap.2:417 build/C/man2/posix_fadvise.2:91
966 #: build/C/man3/posix_fallocate.3:73 build/C/man2/readahead.2:72
967 #: build/C/man2/sync_file_range.2:148
968 #, no-wrap
969 msgid "B<EBADF>"
970 msgstr "B<EBADF>"
971
972 #. type: Plain text
973 #: build/C/man2/fallocate.2:120 build/C/man3/posix_fallocate.3:77
974 msgid "I<fd> is not a valid file descriptor, or is not opened for writing."
975 msgstr ""
976 "I<fd> が有効なファイルディスクリプタでないか、 書き込み用としてオープンされて"
977 "いない。"
978
979 #. type: TP
980 #: build/C/man2/fallocate.2:120 build/C/man3/posix_fallocate.3:77
981 #, no-wrap
982 msgid "B<EFBIG>"
983 msgstr "B<EFBIG>"
984
985 #. type: Plain text
986 #: build/C/man2/fallocate.2:124
987 msgid "I<offset>+I<len> exceeds the maximum file size."
988 msgstr "I<offset + len> がファイルサイズの最大値よりも大きい。"
989
990 #. type: TP
991 #: build/C/man2/fallocate.2:124
992 #, no-wrap
993 msgid "B<EINTR>"
994 msgstr "B<EINTR>"
995
996 #. type: Plain text
997 #: build/C/man2/fallocate.2:127
998 msgid "A signal was caught during execution."
999 msgstr "実行中にシグナルが捕捉された。"
1000
1001 #. type: Plain text
1002 #: build/C/man2/fallocate.2:139 build/C/man3/posix_fallocate.3:87
1003 msgid "I<offset> was less than 0, or I<len> was less than or equal to 0."
1004 msgstr "I<offset> が 0 未満だったか、 I<len> が 0 以下だった。"
1005
1006 #. type: TP
1007 #: build/C/man2/fallocate.2:139 build/C/man2/madvise.2:310
1008 #: build/C/man2/sync_file_range.2:160
1009 #, no-wrap
1010 msgid "B<EIO>"
1011 msgstr "B<EIO>"
1012
1013 #. type: Plain text
1014 #: build/C/man2/fallocate.2:142
1015 msgid "An I/O error occurred while reading from or writing to a file system."
1016 msgstr "ファイルシステムとの読み書き中に入出力エラーが発生した。"
1017
1018 #. type: TP
1019 #: build/C/man2/fallocate.2:142 build/C/man2/mmap.2:452
1020 #: build/C/man3/posix_fallocate.3:87
1021 #, no-wrap
1022 msgid "B<ENODEV>"
1023 msgstr "B<ENODEV>"
1024
1025 #. type: Plain text
1026 #: build/C/man2/fallocate.2:149
1027 msgid ""
1028 "I<fd> does not refer to a regular file or a directory.  (If I<fd> is a pipe "
1029 "or FIFO, a different error results.)"
1030 msgstr ""
1031 "I<fd> が通常のファイルかディレクトリを参照していない (I<fd> がパイプや FIFO "
1032 "を参照している場合、別のエラーが発生する)。"
1033
1034 #. type: TP
1035 #: build/C/man2/fallocate.2:149 build/C/man3/posix_fallocate.3:91
1036 #: build/C/man2/shmget.2:216 build/C/man2/sync_file_range.2:166
1037 #, no-wrap
1038 msgid "B<ENOSPC>"
1039 msgstr "B<ENOSPC>"
1040
1041 #. type: Plain text
1042 #: build/C/man2/fallocate.2:154 build/C/man3/posix_fallocate.3:96
1043 msgid ""
1044 "There is not enough space left on the device containing the file referred to "
1045 "by I<fd>."
1046 msgstr "I<fd> が参照するファイルを含むデバイスに十分な空き領域がない。"
1047
1048 #. type: Plain text
1049 #: build/C/man2/fallocate.2:158
1050 msgid "This kernel does not implement B<fallocate>()."
1051 msgstr "このカーネルでは B<fallocate>() は実装されていない。"
1052
1053 #. type: TP
1054 #: build/C/man2/fallocate.2:158
1055 #, no-wrap
1056 msgid "B<EOPNOTSUPP>"
1057 msgstr "B<EOPNOTSUPP>"
1058
1059 #. type: Plain text
1060 #: build/C/man2/fallocate.2:167
1061 msgid ""
1062 "The file system containing the file referred to by I<fd> does not support "
1063 "this operation; or the I<mode> is not supported by the file system "
1064 "containing the file referred to by I<fd>."
1065 msgstr ""
1066 "I<fd> が参照するファイルを含むファイルシステムが 指定された操作を\n"
1067 "サポートしていない。 I<fd> が参照するファイルを含むファイルシステムが\n"
1068 "I<mode> をサポートしていない。"
1069
1070 #. type: TP
1071 #: build/C/man2/fallocate.2:167 build/C/man2/mlock.2:143
1072 #: build/C/man2/mlock.2:182 build/C/man2/mmap.2:460 build/C/man2/shmctl.2:344
1073 #: build/C/man2/shmget.2:224
1074 #, no-wrap
1075 msgid "B<EPERM>"
1076 msgstr "B<EPERM>"
1077
1078 #. type: Plain text
1079 #: build/C/man2/fallocate.2:183
1080 msgid ""
1081 "The file referred to by I<fd> is marked immutable (see B<chattr>(1)).  Or: "
1082 "I<mode> specifies B<FALLOC_FL_PUNCH_HOLE> and the file referred to by I<fd> "
1083 "is marked append-only (see B<chattr>(1))."
1084 msgstr ""
1085
1086 #. type: TP
1087 #: build/C/man2/fallocate.2:183 build/C/man2/posix_fadvise.2:97
1088 #: build/C/man3/posix_fallocate.3:96 build/C/man2/sync_file_range.2:169
1089 #, no-wrap
1090 msgid "B<ESPIPE>"
1091 msgstr "B<ESPIPE>"
1092
1093 #. type: Plain text
1094 #: build/C/man2/fallocate.2:187
1095 msgid "I<fd> refers to a pipe or FIFO."
1096 msgstr "I<fd> がパイプか FIFO を参照している。"
1097
1098 #. type: SH
1099 #: build/C/man2/fallocate.2:187 build/C/man3/malloc_info.3:58
1100 #: build/C/man3/mcheck.3:134 build/C/man2/mmap2.2:74
1101 #: build/C/man2/posix_fadvise.2:104 build/C/man3/posix_fallocate.3:100
1102 #: build/C/man3/posix_memalign.3:165 build/C/man2/readahead.2:82
1103 #: build/C/man2/remap_file_pages.2:148 build/C/man3/shm_open.3:247
1104 #: build/C/man2/subpage_prot.2:90 build/C/man2/sync_file_range.2:177
1105 #, no-wrap
1106 msgid "VERSIONS"
1107 msgstr "バージョン"
1108
1109 #.  See http://sourceware.org/bugzilla/show_bug.cgi?id=14964
1110 #. type: Plain text
1111 #: build/C/man2/fallocate.2:195
1112 msgid ""
1113 "B<fallocate>()  is available on Linux since kernel 2.6.23.  Support is "
1114 "provided by glibc since version 2.10.  The B<FALLOC_FL_*> flags are defined "
1115 "in glibc headers only since version 2.18."
1116 msgstr "B<fallocate>()  はカーネル 2.6.23 以降の Linux で利用可能である。 glibc での対応はバージョン 3.10 以降で行われている。 B<FALLOC_FL_*> が glibc のヘッダファイルで定義されているのは、バージョン 2.18 以降のみである。"
1117
1118 #. type: Plain text
1119 #: build/C/man2/fallocate.2:198
1120 msgid "B<fallocate>()  is Linux-specific."
1121 msgstr "B<fallocate>()  は Linux 固有である。"
1122
1123 #. type: Plain text
1124 #: build/C/man2/fallocate.2:203
1125 msgid ""
1126 "B<fallocate>(1), B<ftruncate>(2), B<posix_fadvise>(3), B<posix_fallocate>(3)"
1127 msgstr "B<fallocate>(1), B<ftruncate>(2), B<posix_fadvise>(3), B<posix_fallocate>(3)"
1128
1129 #. type: TH
1130 #: build/C/man2/madvise.2:35
1131 #, no-wrap
1132 msgid "MADVISE"
1133 msgstr "MADVISE"
1134
1135 #. type: TH
1136 #: build/C/man2/madvise.2:35 build/C/man3/malloc_info.3:25
1137 #, no-wrap
1138 msgid "2012-04-28"
1139 msgstr "2012-04-28"
1140
1141 #. type: Plain text
1142 #: build/C/man2/madvise.2:38
1143 msgid "madvise - give advice about use of memory"
1144 msgstr "madvise - メモリ利用に関するアドバイスを与える"
1145
1146 #. type: Plain text
1147 #: build/C/man2/madvise.2:40 build/C/man2/msync.2:30
1148 #: build/C/man3/shm_open.3:31
1149 msgid "B<#include E<lt>sys/mman.hE<gt>>"
1150 msgstr "B<#include E<lt>sys/mman.hE<gt>>"
1151
1152 #. type: Plain text
1153 #: build/C/man2/madvise.2:42
1154 msgid ""
1155 "B<int madvise(void *>I<addr>B<, size_t >I<length>B<, int >I<advice>B<);>"
1156 msgstr ""
1157 "B<int madvise(void *>I<addr>B<, size_t >I<length>B<, int >I<advice>B<);>"
1158
1159 #. type: Plain text
1160 #: build/C/man2/madvise.2:46 build/C/man2/posix_fadvise.2:43
1161 #: build/C/man3/posix_fallocate.3:39 build/C/man3/posix_memalign.3:49
1162 msgid ""
1163 "Feature Test Macro Requirements for glibc (see B<feature_test_macros>(7)):"
1164 msgstr "glibc 向けの機能検査マクロの要件 (B<feature_test_macros>(7)  参照):"
1165
1166 #. type: Plain text
1167 #: build/C/man2/madvise.2:50
1168 msgid "B<madvise>(): _BSD_SOURCE"
1169 msgstr "B<madvise>(): _BSD_SOURCE"
1170
1171 #. type: Plain text
1172 #: build/C/man2/madvise.2:68
1173 msgid ""
1174 "The B<madvise>()  system call advises the kernel about how to handle paging "
1175 "input/output in the address range beginning at address I<addr> and with size "
1176 "I<length> bytes.  It allows an application to tell the kernel how it expects "
1177 "to use some mapped or shared memory areas, so that the kernel can choose "
1178 "appropriate read-ahead and caching techniques.  This call does not influence "
1179 "the semantics of the application (except in the case of B<MADV_DONTNEED>), "
1180 "but may influence its performance.  The kernel is free to ignore the advice."
1181 msgstr ""
1182 "B<madvise>()  システムコールは、アドレス I<addr> からはじまる I<length> バイ"
1183 "トのメモリブロックのページング入出力をどう扱えば良いか、 カーネルにアドバイス"
1184 "する。 これを用いると、 アプリケーションからカーネルに、 マップされたメモリや"
1185 "共有メモリをどのように扱ってほしいか伝えることができ、 カーネルはそれに応じて"
1186 "先読みやキャッシュなどの適切な手法を選択できる。 このコールはアプリケーション"
1187 "の動作そのものには影響しない (B<MADV_DONTNEED> の場合は別) が、 性能には影響"
1188 "しうる。 なおこのアドバイスを受け入れるかどうかはカーネルに任される。"
1189
1190 #. type: Plain text
1191 #: build/C/man2/madvise.2:72
1192 msgid "The advice is indicated in the I<advice> argument which can be"
1193 msgstr ""
1194 "アドバイスは引き数 I<advice> によって与える。以下のいずれかを指定できる。"
1195
1196 #. type: TP
1197 #: build/C/man2/madvise.2:72
1198 #, no-wrap
1199 msgid "B<MADV_NORMAL>"
1200 msgstr "B<MADV_NORMAL>"
1201
1202 #. type: Plain text
1203 #: build/C/man2/madvise.2:76
1204 msgid "No special treatment.  This is the default."
1205 msgstr "特別な扱いは行わない。これがデフォルトである。"
1206
1207 #. type: TP
1208 #: build/C/man2/madvise.2:76
1209 #, no-wrap
1210 msgid "B<MADV_RANDOM>"
1211 msgstr "B<MADV_RANDOM>"
1212
1213 #. type: Plain text
1214 #: build/C/man2/madvise.2:80
1215 msgid ""
1216 "Expect page references in random order.  (Hence, read ahead may be less "
1217 "useful than normally.)"
1218 msgstr ""
1219 "ページ参照はランダムな順序で行われそうだ。 (したがって、先読みはあまり効果が"
1220 "なさそうだ。)"
1221
1222 #. type: TP
1223 #: build/C/man2/madvise.2:80
1224 #, no-wrap
1225 msgid "B<MADV_SEQUENTIAL>"
1226 msgstr "B<MADV_SEQUENTIAL>"
1227
1228 #. type: Plain text
1229 #: build/C/man2/madvise.2:85
1230 msgid ""
1231 "Expect page references in sequential order.  (Hence, pages in the given "
1232 "range can be aggressively read ahead, and may be freed soon after they are "
1233 "accessed.)"
1234 msgstr ""
1235 "ページ参照はシーケンシャルな順序で行われそうだ。 (したがって与えた範囲のペー"
1236 "ジは積極的に先読みしておくと良いだろう。 またアクセスが終わったら速やかに解放"
1237 "して良い。)"
1238
1239 #. type: TP
1240 #: build/C/man2/madvise.2:85
1241 #, no-wrap
1242 msgid "B<MADV_WILLNEED>"
1243 msgstr "B<MADV_WILLNEED>"
1244
1245 #. type: Plain text
1246 #: build/C/man2/madvise.2:89
1247 msgid ""
1248 "Expect access in the near future.  (Hence, it might be a good idea to read "
1249 "some pages ahead.)"
1250 msgstr ""
1251 "近い将来にアクセスされそうだ。 (したがってこれらのページを今のうちに先読みし"
1252 "ておくといいだろう。)"
1253
1254 #. type: TP
1255 #: build/C/man2/madvise.2:89
1256 #, no-wrap
1257 msgid "B<MADV_DONTNEED>"
1258 msgstr "B<MADV_DONTNEED>"
1259
1260 #. type: Plain text
1261 #: build/C/man2/madvise.2:100
1262 msgid ""
1263 "Do not expect access in the near future.  (For the time being, the "
1264 "application is finished with the given range, so the kernel can free "
1265 "resources associated with it.)  Subsequent accesses of pages in this range "
1266 "will succeed, but will result either in reloading of the memory contents "
1267 "from the underlying mapped file (see B<mmap>(2))  or zero-fill-on-demand "
1268 "pages for mappings without an underlying file."
1269 msgstr ""
1270 "しばらくアクセスはなさそうだ。 (現時点でアプリケーションは与えた範囲の処理を"
1271 "終えている。 したがってカーネルはこれに関連するリソースを解放して良い。)  こ"
1272 "れ以降この範囲のページへのアクセスがあると、 成功はするが、メモリの内容をマッ"
1273 "プ元のファイルからロードし直すことになる (B<mmap>(2)  を見よ) か、 または元"
1274 "ファイルがないマップページでは アクセスがあったときに 0 埋めが行われることに"
1275 "なる。"
1276
1277 #. type: TP
1278 #: build/C/man2/madvise.2:100
1279 #, no-wrap
1280 msgid "B<MADV_REMOVE> (Since Linux 2.6.16)"
1281 msgstr "B<MADV_REMOVE> (Linux 2.6.16 以降)"
1282
1283 #.  2.6.18-rc5
1284 #.  Databases want to use this feature to drop a section of their
1285 #.  bufferpool (shared memory segments) - without writing back to
1286 #.  disk/swap space.  This feature is also useful for supporting
1287 #.  hot-plug memory on UML.
1288 #. type: Plain text
1289 #: build/C/man2/madvise.2:113
1290 msgid ""
1291 "Free up a given range of pages and its associated backing store.  Currently, "
1292 "only shmfs/tmpfs supports this; other file systems return with the error "
1293 "B<ENOSYS>."
1294 msgstr ""
1295 "指定された範囲のページと関連するバッキングストアを解放する。 現在のところ、 "
1296 "shmfs/tmpfs だけがこれに対応している。 他のファイルシステムでは B<ENOSYS> が"
1297 "返される。"
1298
1299 #. type: TP
1300 #: build/C/man2/madvise.2:113
1301 #, no-wrap
1302 msgid "B<MADV_DONTFORK> (Since Linux 2.6.16)"
1303 msgstr "B<MADV_DONTFORK> (Linux 2.6.16 以降)"
1304
1305 #.  See http://lwn.net/Articles/171941/
1306 #.  [PATCH] madvise MADV_DONTFORK/MADV_DOFORK
1307 #.  Currently, copy-on-write may change the physical address of
1308 #.  a page even if the user requested that the page is pinned in
1309 #.  memory (either by mlock or by get_user_pages).  This happens
1310 #.  if the process forks meanwhile, and the parent writes to that
1311 #.  page.  As a result, the page is orphaned: in case of
1312 #.  get_user_pages, the application will never see any data hardware
1313 #.  DMA's into this page after the COW.  In case of mlock'd memory,
1314 #.  the parent is not getting the realtime/security benefits of mlock.
1315 #.  In particular, this affects the Infiniband modules which do DMA from
1316 #.  and into user pages all the time.
1317 #.  This patch adds madvise options to control whether memory range is
1318 #.  inherited across fork. Useful e.g. for when hardware is doing DMA
1319 #.  from/into these pages.  Could also be useful to an application
1320 #.  wanting to speed up its forks by cutting large areas out of
1321 #.  consideration.
1322 #.  SEE ALSO: http://lwn.net/Articles/171941/
1323 #.  "Tweaks to madvise() and posix_fadvise()", 14 Feb 2006
1324 #. type: Plain text
1325 #: build/C/man2/madvise.2:144
1326 msgid ""
1327 "Do not make the pages in this range available to the child after a B<fork>"
1328 "(2).  This is useful to prevent copy-on-write semantics from changing the "
1329 "physical location of a page(s) if the parent writes to it after a B<fork>"
1330 "(2).  (Such page relocations cause problems for hardware that DMAs into the "
1331 "page(s).)"
1332 msgstr ""
1333 "B<fork>(2)  が行われた後、指定された範囲のページを子プロセスが利用できないよ"
1334 "うにする。 この機能は、書き込み時コピー (copy-on-write) 方式で、 B<fork>(2)  "
1335 "の後で親プロセスがページに書き込みを行った場合に ページの物理位置が変化しない"
1336 "ようにするのに有効である (ページの再配置はハードウェアがそのページに DMA 転送"
1337 "を行うような場合に 問題を起こすことがある)。"
1338
1339 #. type: TP
1340 #: build/C/man2/madvise.2:144
1341 #, no-wrap
1342 msgid "B<MADV_DOFORK> (Since Linux 2.6.16)"
1343 msgstr "B<MADV_DOFORK> (Linux 2.6.16 以降)"
1344
1345 #. type: Plain text
1346 #: build/C/man2/madvise.2:150
1347 msgid ""
1348 "Undo the effect of B<MADV_DONTFORK>, restoring the default behavior, whereby "
1349 "a mapping is inherited across B<fork>(2)."
1350 msgstr ""
1351 "B<MADV_DONTFORK> の影響を取り消し、デフォルトの動作に戻す。 つまり、 B<fork>"
1352 "(2)  の前後でマッピングは継承されるようになる。"
1353
1354 #. type: TP
1355 #: build/C/man2/madvise.2:150
1356 #, no-wrap
1357 msgid "B<MADV_HWPOISON> (Since Linux 2.6.32)"
1358 msgstr "B<MADV_HWPOISON> (Linux 2.6.32 以降)"
1359
1360 #. type: Plain text
1361 #: build/C/man2/madvise.2:162
1362 msgid ""
1363 "Poison a page and handle it like a hardware memory corruption.  This "
1364 "operation is only available for privileged (B<CAP_SYS_ADMIN>)  processes.  "
1365 "This operation may result in the calling process receiving a B<SIGBUS> and "
1366 "the page being unmapped.  This feature is intended for testing of memory "
1367 "error-handling code; it is only available if the kernel was configured with "
1368 "B<CONFIG_MEMORY_FAILURE>."
1369 msgstr ""
1370
1371 #. type: TP
1372 #: build/C/man2/madvise.2:162
1373 #, no-wrap
1374 msgid "B<MADV_SOFT_OFFLINE> (Since Linux 2.6.33)"
1375 msgstr "B<MADV_SOFT_OFFLINE> (Linux 2.6.33 以降)"
1376
1377 #. type: Plain text
1378 #: build/C/man2/madvise.2:180
1379 msgid ""
1380 "Soft offline the pages in the range specified by I<addr> and I<length>.  The "
1381 "memory of each page in the specified range is preserved (i.e., when next "
1382 "accessed, the same content will be visible, but in a new physical page "
1383 "frame), and the original page is offlined (i.e., no longer used, and taken "
1384 "out of normal memory management).  The effect of the B<MADV_SOFT_OFFLINE> "
1385 "operation is invisible to (i.e., does not change the semantics of)  the "
1386 "calling process.  This feature is intended for testing of memory error-"
1387 "handling code; it is only available if the kernel was configured with "
1388 "B<CONFIG_MEMORY_FAILURE>."
1389 msgstr ""
1390
1391 #. type: TP
1392 #: build/C/man2/madvise.2:180
1393 #, no-wrap
1394 msgid "B<MADV_MERGEABLE> (since Linux 2.6.32)"
1395 msgstr "B<MADV_MERGEABLE> (Linux 2.6.32 以降)"
1396
1397 #. type: Plain text
1398 #: build/C/man2/madvise.2:205
1399 msgid ""
1400 "Enable Kernel Samepage Merging (KSM) for the pages in the range specified by "
1401 "I<addr> and I<length>.  The kernel regularly scans those areas of user "
1402 "memory that have been marked as mergeable, looking for pages with identical "
1403 "content.  These are replaced by a single write-protected page (which is "
1404 "automatically copied if a process later wants to update the content of the "
1405 "page).  KSM only merges private anonymous pages (see B<mmap>(2)).  The KSM "
1406 "feature is intended for applications that generate many instances of the "
1407 "same data (e.g., virtualization systems such as KVM).  It can consume a lot "
1408 "of processing power; use with care.  See the Linux kernel source file "
1409 "I<Documentation/vm/ksm.txt> for more details.  The B<MADV_MERGEABLE> and "
1410 "B<MADV_UNMERGEABLE> operations are only available if the kernel was "
1411 "configured with B<CONFIG_KSM>."
1412 msgstr ""
1413
1414 #. type: TP
1415 #: build/C/man2/madvise.2:205
1416 #, no-wrap
1417 msgid "B<MADV_UNMERGEABLE> (since Linux 2.6.32)"
1418 msgstr "B<MADV_UNMERGEABLE> (Linux 2.6.32 以降)"
1419
1420 #. type: Plain text
1421 #: build/C/man2/madvise.2:214
1422 msgid ""
1423 "Undo the effect of an earlier B<MADV_MERGEABLE> operation on the specified "
1424 "address range; KSM unmerges whatever pages it had merged in the address "
1425 "range specified by I<addr> and I<length>."
1426 msgstr ""
1427
1428 #. type: TP
1429 #: build/C/man2/madvise.2:214
1430 #, no-wrap
1431 msgid "B<MADV_HUGEPAGE> (since Linux 2.6.38)"
1432 msgstr "B<MADV_HUGEPAGE> (Linux 2.6.38 以降)"
1433
1434 #.  http://lwn.net/Articles/358904/
1435 #.  https://lwn.net/Articles/423584/
1436 #. type: Plain text
1437 #: build/C/man2/madvise.2:243
1438 msgid ""
1439 "Enables Transparent Huge Pages (THP) for pages in the range specified by "
1440 "I<addr> and I<length>.  Currently, Transparent Huge Pages only work with "
1441 "private anonymous pages (see B<mmap>(2)).  The kernel will regularly scan "
1442 "the areas marked as huge page candidates to replace them with huge pages.  "
1443 "The kernel will also allocate huge pages directly when the region is "
1444 "naturally aligned to the huge page size (see B<posix_memalign>(2)).  This "
1445 "feature is primarily aimed at applications that use large mappings of data "
1446 "and access large regions of that memory at a time (e.g., virtualization "
1447 "systems such as QEMU).  It can very easily waste memory (e.g., a 2MB mapping "
1448 "that only ever accesses 1 byte will result in 2MB of wired memory instead of "
1449 "one 4KB page).  See the Linux kernel source file I<Documentation/vm/"
1450 "transhuge.txt> for more details.  The B<MADV_HUGEPAGE> and "
1451 "B<MADV_NOHUGEPAGE> operations are only available if the kernel was "
1452 "configured with B<CONFIG_TRANSPARENT_HUGEPAGE>."
1453 msgstr ""
1454
1455 #. type: TP
1456 #: build/C/man2/madvise.2:243
1457 #, no-wrap
1458 msgid "B<MADV_NOHUGEPAGE> (since Linux 2.6.38)"
1459 msgstr "B<MADV_NOHUGEPAGE> (Linux 2.6.38 以降)"
1460
1461 #. type: Plain text
1462 #: build/C/man2/madvise.2:250
1463 msgid ""
1464 "Ensures that memory in the address range specified by I<addr> and I<length> "
1465 "will not be collapsed into huge pages."
1466 msgstr ""
1467
1468 #. type: TP
1469 #: build/C/man2/madvise.2:250
1470 #, no-wrap
1471 msgid "B<MADV_DONTDUMP> (since Linux 3.4)"
1472 msgstr "B<MADV_DONTDUMP> (Linux 3.4 以降)"
1473
1474 #. type: Plain text
1475 #: build/C/man2/madvise.2:264
1476 msgid ""
1477 "Exclude from a core dump those pages in the range specified by I<addr> and "
1478 "I<length>.  This is useful in applications that have large areas of memory "
1479 "that are known not to be useful in a core dump.  The effect of "
1480 "B<MADV_DONTDUMP> takes precedence over the bit mask that is set via the I</"
1481 "proc/PID/coredump_filter> file (see B<core>(5))."
1482 msgstr ""
1483
1484 #. type: TP
1485 #: build/C/man2/madvise.2:264
1486 #, no-wrap
1487 msgid "B<MADV_DODUMP> (since Linux 3.4)"
1488 msgstr "B<MADV_DODUMP> (Linux 3.4 以降)"
1489
1490 #. type: Plain text
1491 #: build/C/man2/madvise.2:268
1492 msgid "Undo the effect of an earlier B<MADV_DONTDUMP>."
1493 msgstr ""
1494
1495 #. type: Plain text
1496 #: build/C/man2/madvise.2:275
1497 msgid ""
1498 "On success B<madvise>()  returns zero.  On error, it returns -1 and I<errno> "
1499 "is set appropriately."
1500 msgstr ""
1501 "B<madvise>()  は成功すると 0 を返す。 エラーが起こると -1 を返し、 I<errno> "
1502 "を適切な値に設定する。"
1503
1504 #. type: TP
1505 #: build/C/man2/madvise.2:276 build/C/man2/mlock.2:154 build/C/man2/mmap.2:413
1506 #: build/C/man2/mremap.2:136
1507 #, no-wrap
1508 msgid "B<EAGAIN>"
1509 msgstr "B<EAGAIN>"
1510
1511 #. type: Plain text
1512 #: build/C/man2/madvise.2:279
1513 msgid "A kernel resource was temporarily unavailable."
1514 msgstr "何らかのカーネルリソースが一時的に利用できなかった。"
1515
1516 #. type: Plain text
1517 #: build/C/man2/madvise.2:282
1518 msgid "The map exists, but the area maps something that isn't a file."
1519 msgstr "指定したマップは存在するが、ファイルではないところをマップしている。"
1520
1521 #. type: Plain text
1522 #: build/C/man2/madvise.2:285
1523 msgid "This error can occur for the following reasons:"
1524 msgstr ""
1525
1526 #. type: IP
1527 #: build/C/man2/madvise.2:286 build/C/man2/madvise.2:292
1528 #: build/C/man2/madvise.2:295 build/C/man2/madvise.2:298
1529 #: build/C/man2/madvise.2:301 build/C/man3/mallopt.3:235
1530 #: build/C/man3/mallopt.3:241
1531 #, no-wrap
1532 msgid "*"
1533 msgstr "*"
1534
1535 #.  .I len
1536 #.  is zero,
1537 #. type: Plain text
1538 #: build/C/man2/madvise.2:292
1539 msgid "The value I<len> is negative."
1540 msgstr "I<len> が負の値である。"
1541
1542 #. type: Plain text
1543 #: build/C/man2/madvise.2:295
1544 msgid "I<addr> is not page-aligned."
1545 msgstr ""
1546
1547 #. type: Plain text
1548 #: build/C/man2/madvise.2:298
1549 msgid "I<advice> is not a valid value"
1550 msgstr "I<advice> が有効な値でない。"
1551
1552 #. type: Plain text
1553 #: build/C/man2/madvise.2:301
1554 msgid ""
1555 "The application is attempting to release locked or shared pages (with "
1556 "B<MADV_DONTNEED>)."
1557 msgstr ""
1558 "アプリケーションがロックされたページや共有ページを (B<MADV_DONTNEED> で) 解"
1559 "放\n"
1560 "しようとしている。"
1561
1562 #. type: Plain text
1563 #: build/C/man2/madvise.2:309
1564 msgid ""
1565 "B<MADV_MERGEABLE> or B<MADV_UNMERGEABLE> was specified in I<advice>, but the "
1566 "kernel was not configured with B<CONFIG_KSM>."
1567 msgstr ""
1568
1569 #. type: Plain text
1570 #: build/C/man2/madvise.2:316
1571 msgid ""
1572 "(for B<MADV_WILLNEED>)  Paging in this area would exceed the process's "
1573 "maximum resident set size."
1574 msgstr ""
1575 "(B<MADV_WILLNEED> の場合) この範囲のページングを行うと、 プロセスの RSS "
1576 "(resident set size) の最大値を越えてしまう。"
1577
1578 #. type: TP
1579 #: build/C/man2/madvise.2:316 build/C/man2/madvise.2:321
1580 #: build/C/man2/mlock.2:123 build/C/man2/mlock.2:131 build/C/man2/mlock.2:169
1581 #: build/C/man2/mmap.2:456 build/C/man2/mprotect.2:100
1582 #: build/C/man2/mprotect.2:103 build/C/man2/mremap.2:179
1583 #: build/C/man2/msync.2:93 build/C/man3/posix_memalign.3:162
1584 #: build/C/man2/shmctl.2:328 build/C/man2/shmget.2:213
1585 #: build/C/man2/shmop.2:214 build/C/man2/subpage_prot.2:87
1586 #: build/C/man2/sync_file_range.2:163
1587 #, no-wrap
1588 msgid "B<ENOMEM>"
1589 msgstr "B<ENOMEM>"
1590
1591 #. type: Plain text
1592 #: build/C/man2/madvise.2:321
1593 msgid "(for B<MADV_WILLNEED>)  Not enough memory: paging in failed."
1594 msgstr "(B<MADV_WILLNEED> の場合) メモリが足りず、ページングに失敗した。"
1595
1596 #. type: Plain text
1597 #: build/C/man2/madvise.2:325
1598 msgid ""
1599 "Addresses in the specified range are not currently mapped, or are outside "
1600 "the address space of the process."
1601 msgstr ""
1602 "指定した範囲のアドレスが、現在マップされていない。 あるいはプロセスのアドレス"
1603 "空間の内部にない。"
1604
1605 #.  FIXME . Write a posix_madvise(3) page.
1606 #. type: Plain text
1607 #: build/C/man2/madvise.2:337
1608 msgid ""
1609 "POSIX.1b.  POSIX.1-2001 describes B<posix_madvise>(3)  with constants "
1610 "B<POSIX_MADV_NORMAL>, etc., with a behavior close to that described here.  "
1611 "There is a similar B<posix_fadvise>(2)  for file access."
1612 msgstr ""
1613 "POSIX.1b.  POSIX.1-2001 では、 B<posix_madvise>(3)  を B<POSIX_MADV_NORMAL> "
1614 "などの定数とともに記述していた (それぞれの振る舞いはここで述べたものに近"
1615 "い)。 ファイルアクセスに対しても B<posix_fadvise>(2)  という類似の関数が存在"
1616 "する。"
1617
1618 #. type: Plain text
1619 #: build/C/man2/madvise.2:346
1620 msgid ""
1621 "B<MADV_REMOVE>, B<MADV_DONTFORK>, B<MADV_DOFORK>, B<MADV_HWPOISON>, "
1622 "B<MADV_MERGEABLE>, and B<MADV_UNMERGEABLE> are Linux-specific."
1623 msgstr ""
1624 "B<MADV_REMOVE>, B<MADV_DONTFORK>, B<MADV_DOFORK>, B<MADV_HWPOISON>,\n"
1625 "B<MADV_MERGEABLE>, B<MADV_UNMERGEABLE> は Linux 固有である。"
1626
1627 #. type: SS
1628 #: build/C/man2/madvise.2:347 build/C/man2/mlock.2:267
1629 #: build/C/man2/shmget.2:293
1630 #, no-wrap
1631 msgid "Linux notes"
1632 msgstr "Linux での注意"
1633
1634 #. type: Plain text
1635 #: build/C/man2/madvise.2:355
1636 msgid ""
1637 "The current Linux implementation (2.4.0) views this system call more as a "
1638 "command than as advice and hence may return an error when it cannot do what "
1639 "it usually would do in response to this advice.  (See the ERRORS description "
1640 "above.)  This is nonstandard behavior."
1641 msgstr ""
1642 "現在の Linux の実装 (2.4.0) では、 このシステムコールをアドバイスというよりは"
1643 "命令と見ている。 したがってこのアドバイスに対して通常行われる動作が不可能な場"
1644 "合は、 エラーを返すことがある (上記の エラー の記述を参照)。 この振舞いは標準"
1645 "とは異なる。"
1646
1647 #.  .SH HISTORY
1648 #.  The
1649 #.  .BR madvise ()
1650 #.  function first appeared in 4.4BSD.
1651 #. type: Plain text
1652 #: build/C/man2/madvise.2:371
1653 msgid ""
1654 "The Linux implementation requires that the address I<addr> be page-aligned, "
1655 "and allows I<length> to be zero.  If there are some parts of the specified "
1656 "address range that are not mapped, the Linux version of B<madvise>()  "
1657 "ignores them and applies the call to the rest (but returns B<ENOMEM> from "
1658 "the system call, as it should)."
1659 msgstr ""
1660 "Linux の実装では I<addr> のアドレスはページ境界の値でなければならない。また "
1661 "I<length> は 0 であっても構わない。 また Linux 版の B<madvise>()  では、指定"
1662 "されたアドレス範囲にマップされていない部分があると、 これらを無視して残りの部"
1663 "分にアドバイスを適用する (しかしシステムコールに対してはちゃんと B<ENOMEM> を"
1664 "返す)。"
1665
1666 #. type: Plain text
1667 #: build/C/man2/madvise.2:379
1668 msgid ""
1669 "B<getrlimit>(2), B<mincore>(2), B<mmap>(2), B<mprotect>(2), B<msync>(2), "
1670 "B<munmap>(2), B<core>(5)"
1671 msgstr ""
1672 "B<getrlimit>(2), B<mincore>(2), B<mmap>(2), B<mprotect>(2), B<msync>(2), "
1673 "B<munmap>(2), B<core>(5)"
1674
1675 #. type: TH
1676 #: build/C/man3/mallinfo.3:26
1677 #, no-wrap
1678 msgid "MALLINFO"
1679 msgstr "MALLINFO"
1680
1681 #. type: TH
1682 #: build/C/man3/mallinfo.3:26 build/C/man3/malloc_stats.3:26
1683 #, no-wrap
1684 msgid "2012-05-06"
1685 msgstr "2012-05-06"
1686
1687 #. type: Plain text
1688 #: build/C/man3/mallinfo.3:29
1689 msgid "mallinfo - obtain memory allocation information"
1690 msgstr "mallinfo - メモリ割り当て情報を取得する"
1691
1692 #. type: Plain text
1693 #: build/C/man3/mallinfo.3:31 build/C/man3/malloc_stats.3:31
1694 #: build/C/man3/malloc_trim.3:31 build/C/man3/malloc_usable_size.3:30
1695 #: build/C/man3/mallopt.3:31
1696 msgid "B<#include E<lt>malloc.hE<gt>>"
1697 msgstr "B<#include E<lt>malloc.hE<gt>>"
1698
1699 #. type: Plain text
1700 #: build/C/man3/mallinfo.3:33
1701 msgid "B<struct mallinfo mallinfo(void);>"
1702 msgstr "B<struct mallinfo mallinfo(void);>"
1703
1704 #. type: Plain text
1705 #: build/C/man3/mallinfo.3:41
1706 msgid ""
1707 "The B<mallinfo>()  function returns a copy of a structure containing "
1708 "information about memory allocations performed by B<malloc>(3)  and related "
1709 "functions.  This structure is defined as follows:"
1710 msgstr ""
1711 "B<mallinfo>() 関数は、 B<malloc>(3) や一連の関数により実行されたメモリ\n"
1712 "割り当てに関する情報を格納した構造体のコピーを返す。\n"
1713 "この構造体は以下のように定義されている。"
1714
1715 #. type: Plain text
1716 #: build/C/man3/mallinfo.3:56
1717 #, no-wrap
1718 msgid ""
1719 "struct mallinfo {\n"
1720 "    int arena;     /* Non-mmapped space allocated (bytes) */\n"
1721 "    int ordblks;   /* Number of free chunks */\n"
1722 "    int smblks;    /* Number of free fastbin blocks */\n"
1723 "    int hblks;     /* Number of mmapped regions */\n"
1724 "    int hblkhd;    /* Space allocated in mmapped regions (bytes) */\n"
1725 "    int usmblks;   /* Maximum total allocated space (bytes) */\n"
1726 "    int fsmblks;   /* Space in freed fastbin blocks (bytes) */\n"
1727 "    int uordblks;  /* Total allocated space (bytes) */\n"
1728 "    int fordblks;  /* Total free space (bytes) */\n"
1729 "    int keepcost;  /* Top-most, releasable space (bytes) */\n"
1730 "};\n"
1731 msgstr ""
1732 "struct mallinfo {\n"
1733 "    int arena;     /* Non-mmapped space allocated (bytes) */\n"
1734 "    int ordblks;   /* Number of free chunks */\n"
1735 "    int smblks;    /* Number of free fastbin blocks */\n"
1736 "    int hblks;     /* Number of mmapped regions */\n"
1737 "    int hblkhd;    /* Space allocated in mmapped regions (bytes) */\n"
1738 "    int usmblks;   /* Maximum total allocated space (bytes) */\n"
1739 "    int fsmblks;   /* Space in freed fastbin blocks (bytes) */\n"
1740 "    int uordblks;  /* Total allocated space (bytes) */\n"
1741 "    int fordblks;  /* Total free space (bytes) */\n"
1742 "    int keepcost;  /* Top-most, releasable space (bytes) */\n"
1743 "};\n"
1744
1745 #. type: Plain text
1746 #: build/C/man3/mallinfo.3:62
1747 msgid ""
1748 "The fields of the I<mallinfo> structure contain the following information:"
1749 msgstr "I<mallinfo> 構造体の各フィールドには以下の情報が格納される。"
1750
1751 #. type: TP
1752 #: build/C/man3/mallinfo.3:62
1753 #, no-wrap
1754 msgid "I<arena>"
1755 msgstr "I<arena>"
1756
1757 #. type: Plain text
1758 #: build/C/man3/mallinfo.3:68
1759 msgid ""
1760 "The total amount of memory allocated by means other than B<mmap>(2)  (i.e., "
1761 "memory allocated on the heap).  This figure includes both in-use blocks and "
1762 "blocks on the free list."
1763 msgstr ""
1764
1765 #. type: TP
1766 #: build/C/man3/mallinfo.3:68
1767 #, no-wrap
1768 msgid "I<ordblks>"
1769 msgstr "I<ordblks>"
1770
1771 #. type: Plain text
1772 #: build/C/man3/mallinfo.3:71
1773 msgid "The number of ordinary (i.e., non-fastbin) free blocks."
1774 msgstr ""
1775
1776 #. type: TP
1777 #: build/C/man3/mallinfo.3:71
1778 #, no-wrap
1779 msgid "I<smblks>"
1780 msgstr "I<smblks>"
1781
1782 #. type: Plain text
1783 #: build/C/man3/mallinfo.3:75
1784 msgid "The number of fastbin free blocks (see B<mallopt>(3))."
1785 msgstr ""
1786
1787 #. type: TP
1788 #: build/C/man3/mallinfo.3:75
1789 #, no-wrap
1790 msgid "I<hblks>"
1791 msgstr "I<hblks>"
1792
1793 #. type: Plain text
1794 #: build/C/man3/mallinfo.3:83
1795 msgid ""
1796 "The number of blocks currently allocated using B<mmap>(2).  (See the "
1797 "discussion of B<M_MMAP_THRESHOLD> in B<mallopt>(3).)"
1798 msgstr ""
1799
1800 #. type: TP
1801 #: build/C/man3/mallinfo.3:83
1802 #, no-wrap
1803 msgid "I<hblkhd>"
1804 msgstr "I<hblkhd>"
1805
1806 #. type: Plain text
1807 #: build/C/man3/mallinfo.3:87
1808 msgid "The number of bytes in blocks currently allocated using B<mmap>(2)."
1809 msgstr ""
1810
1811 #. type: TP
1812 #: build/C/man3/mallinfo.3:87
1813 #, no-wrap
1814 msgid "I<usmblks>"
1815 msgstr "I<usmblks>"
1816
1817 #. type: Plain text
1818 #: build/C/man3/mallinfo.3:92
1819 msgid ""
1820 "The \"highwater mark\" for allocated space\\(emthat is, the maximum amount "
1821 "of space that was ever allocated.  This field is maintained only in "
1822 "nonthreading environments."
1823 msgstr ""
1824
1825 #. type: TP
1826 #: build/C/man3/mallinfo.3:92
1827 #, no-wrap
1828 msgid "I<fsmblks>"
1829 msgstr "I<fsmblks>"
1830
1831 #. type: Plain text
1832 #: build/C/man3/mallinfo.3:95
1833 msgid "The total number of bytes in fastbin free blocks."
1834 msgstr ""
1835
1836 #. type: TP
1837 #: build/C/man3/mallinfo.3:95
1838 #, no-wrap
1839 msgid "I<uordblks>"
1840 msgstr "I<uordblks>"
1841
1842 #. type: Plain text
1843 #: build/C/man3/mallinfo.3:98
1844 msgid "The total number of bytes used by in-use allocations."
1845 msgstr ""
1846
1847 #. type: TP
1848 #: build/C/man3/mallinfo.3:98
1849 #, no-wrap
1850 msgid "I<fordblks>"
1851 msgstr "I<fordblks>"
1852
1853 #. type: Plain text
1854 #: build/C/man3/mallinfo.3:101
1855 msgid "The total number of bytes in free blocks."
1856 msgstr ""
1857
1858 #. type: TP
1859 #: build/C/man3/mallinfo.3:101
1860 #, no-wrap
1861 msgid "I<keepcost>"
1862 msgstr "I<keepcost>"
1863
1864 #.  .SH VERSIONS
1865 #.  Available already in glibc 2.0, possibly earlier
1866 #. type: Plain text
1867 #: build/C/man3/mallinfo.3:110
1868 msgid ""
1869 "The total amount of releasable free space at the top of the heap.  This is "
1870 "the maximum number of bytes that could ideally (i.e., ignoring page "
1871 "alignment restrictions, and so on) be released by B<malloc_trim>(3)."
1872 msgstr ""
1873
1874 #. type: Plain text
1875 #: build/C/man3/mallinfo.3:114
1876 msgid ""
1877 "This function is not specified by POSIX or the C standards.  A similar "
1878 "function exists on many System V derivatives, and was specified in the SVID."
1879 msgstr ""
1880
1881 #.  FIXME http://sourceware.org/bugzilla/show_bug.cgi?id=208
1882 #.  See the 24 Aug 2011 mail by Paul Pluzhnikov:
1883 #.      "[patch] Fix mallinfo() to accumulate results for all arenas"
1884 #.  on libc-alpha@sourceware.org
1885 #. type: Plain text
1886 #: build/C/man3/mallinfo.3:126
1887 msgid ""
1888 "B<Information is returned for only the main memory allocation area.> "
1889 "Allocations in other arenas are excluded.  See B<malloc_stats>(3)  and "
1890 "B<malloc_info>(3)  for alternatives that include information about other "
1891 "arenas."
1892 msgstr ""
1893
1894 #. type: Plain text
1895 #: build/C/man3/mallinfo.3:134
1896 msgid ""
1897 "The fields of the I<mallinfo> structure are typed as I<int>.  However, "
1898 "because some internal bookkeeping values may be of type I<long>, the "
1899 "reported values may wrap around zero and thus be inaccurate."
1900 msgstr ""
1901
1902 #. type: SH
1903 #: build/C/man3/mallinfo.3:134 build/C/man3/malloc_hook.3:89
1904 #: build/C/man3/malloc_info.3:82 build/C/man3/mallopt.3:466
1905 #: build/C/man3/mcheck.3:159 build/C/man2/mmap.2:630
1906 #: build/C/man2/mprotect.2:148 build/C/man3/mtrace.3:108
1907 #, no-wrap
1908 msgid "EXAMPLE"
1909 msgstr "例"
1910
1911 #. type: Plain text
1912 #: build/C/man3/mallinfo.3:140
1913 msgid ""
1914 "The program below employs B<mallinfo>()  to retrieve memory allocation "
1915 "statistics before and after allocating and freeing some blocks of memory.  "
1916 "The statistics are displayed on standard output."
1917 msgstr ""
1918
1919 #. type: Plain text
1920 #: build/C/man3/mallinfo.3:144
1921 msgid ""
1922 "The first two command-line arguments specify the number and size of blocks "
1923 "to be allocated with B<malloc>(3)."
1924 msgstr ""
1925
1926 #. type: Plain text
1927 #: build/C/man3/mallinfo.3:158
1928 msgid ""
1929 "The remaining three arguments specify which of the allocated blocks should "
1930 "be freed with B<free>(3).  These three arguments are optional, and specify "
1931 "(in order): the step size to be used in the loop that frees blocks (the "
1932 "default is 1, meaning free all blocks in the range); the ordinal position of "
1933 "the first block to be freed (default 0, meaning the first allocated block); "
1934 "and a number one greater than the ordinal position of the last block to be "
1935 "freed (default is one greater than the maximum block number).  If these "
1936 "three arguments are omitted, then the defaults cause all allocated blocks to "
1937 "be freed."
1938 msgstr ""
1939
1940 #. type: Plain text
1941 #: build/C/man3/mallinfo.3:162
1942 msgid ""
1943 "In the following example run of the program, 1000 allocations of 100 bytes "
1944 "are performed, and then every second allocated block is freed:"
1945 msgstr ""
1946
1947 #. type: Plain text
1948 #: build/C/man3/mallinfo.3:177
1949 #, no-wrap
1950 msgid ""
1951 "$ B<./a.out 1000 100 2>\n"
1952 "============== Before allocating blocks ==============\n"
1953 "Total non-mmapped bytes (arena):       0\n"
1954 "# of free chunks (ordblks):            1\n"
1955 "# of free fastbin blocks (smblks):     0\n"
1956 "# of mapped regions (hblks):           0\n"
1957 "Bytes in mapped regions (hblkhd):      0\n"
1958 "Max. total allocated space (usmblks):  0\n"
1959 "Free bytes held in fastbins (fsmblks): 0\n"
1960 "Total allocated space (uordblks):      0\n"
1961 "Total free space (fordblks):           0\n"
1962 "Topmost releasable block (keepcost):   0\n"
1963 msgstr ""
1964 "$ B<./a.out 1000 100 2>\n"
1965 "============== Before allocating blocks ==============\n"
1966 "Total non-mmapped bytes (arena):       0\n"
1967 "# of free chunks (ordblks):            1\n"
1968 "# of free fastbin blocks (smblks):     0\n"
1969 "# of mapped regions (hblks):           0\n"
1970 "Bytes in mapped regions (hblkhd):      0\n"
1971 "Max. total allocated space (usmblks):  0\n"
1972 "Free bytes held in fastbins (fsmblks): 0\n"
1973 "Total allocated space (uordblks):      0\n"
1974 "Total free space (fordblks):           0\n"
1975 "Topmost releasable block (keepcost):   0\n"
1976
1977 #. type: Plain text
1978 #: build/C/man3/mallinfo.3:189
1979 #, no-wrap
1980 msgid ""
1981 "============== After allocating blocks ==============\n"
1982 "Total non-mmapped bytes (arena):       135168\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):      104000\n"
1990 "Total free space (fordblks):           31168\n"
1991 "Topmost releasable block (keepcost):   31168\n"
1992 msgstr ""
1993 "============== After allocating blocks ==============\n"
1994 "Total non-mmapped bytes (arena):       135168\n"
1995 "# of free chunks (ordblks):            1\n"
1996 "# of free fastbin blocks (smblks):     0\n"
1997 "# of mapped regions (hblks):           0\n"
1998 "Bytes in mapped regions (hblkhd):      0\n"
1999 "Max. total allocated space (usmblks):  0\n"
2000 "Free bytes held in fastbins (fsmblks): 0\n"
2001 "Total allocated space (uordblks):      104000\n"
2002 "Total free space (fordblks):           31168\n"
2003 "Topmost releasable block (keepcost):   31168\n"
2004
2005 #. type: Plain text
2006 #: build/C/man3/mallinfo.3:201
2007 #, no-wrap
2008 msgid ""
2009 "============== After freeing blocks ==============\n"
2010 "Total non-mmapped bytes (arena):       135168\n"
2011 "# of free chunks (ordblks):            501\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):      52000\n"
2018 "Total free space (fordblks):           83168\n"
2019 "Topmost releasable block (keepcost):   31168\n"
2020 msgstr ""
2021 "============== After freeing blocks ==============\n"
2022 "Total non-mmapped bytes (arena):       135168\n"
2023 "# of free chunks (ordblks):            501\n"
2024 "# of free fastbin blocks (smblks):     0\n"
2025 "# of mapped regions (hblks):           0\n"
2026 "Bytes in mapped regions (hblkhd):      0\n"
2027 "Max. total allocated space (usmblks):  0\n"
2028 "Free bytes held in fastbins (fsmblks): 0\n"
2029 "Total allocated space (uordblks):      52000\n"
2030 "Total free space (fordblks):           83168\n"
2031 "Topmost releasable block (keepcost):   31168\n"
2032
2033 #. type: SS
2034 #: build/C/man3/mallinfo.3:203 build/C/man3/malloc_info.3:165
2035 #: build/C/man3/mallopt.3:532 build/C/man3/mcheck.3:176
2036 #: build/C/man2/mprotect.2:165
2037 #, no-wrap
2038 msgid "Program source"
2039 msgstr "プログラムのソース"
2040
2041 #. type: Plain text
2042 #: build/C/man3/mallinfo.3:208
2043 #, no-wrap
2044 msgid ""
2045 "#include E<lt>malloc.hE<gt>\n"
2046 "#include \"tlpi_hdr.h\"\n"
2047 msgstr ""
2048 "#include E<lt>malloc.hE<gt>\n"
2049 "#include \"tlpi_hdr.h\"\n"
2050
2051 #. type: Plain text
2052 #: build/C/man3/mallinfo.3:213
2053 #, no-wrap
2054 msgid ""
2055 "static void\n"
2056 "display_mallinfo(void)\n"
2057 "{\n"
2058 "    struct mallinfo mi;\n"
2059 msgstr ""
2060 "static void\n"
2061 "display_mallinfo(void)\n"
2062 "{\n"
2063 "    struct mallinfo mi;\n"
2064
2065 #. type: Plain text
2066 #: build/C/man3/mallinfo.3:215
2067 #, no-wrap
2068 msgid "    mi = mallinfo();\n"
2069 msgstr "    mi = mallinfo();\n"
2070
2071 #. type: Plain text
2072 #: build/C/man3/mallinfo.3:227
2073 #, no-wrap
2074 msgid ""
2075 "    printf(\"Total non-mmapped bytes (arena):       %d\\en\", mi.arena);\n"
2076 "    printf(\"# of free chunks (ordblks):            %d\\en\", mi.ordblks);\n"
2077 "    printf(\"# of free fastbin blocks (smblks):     %d\\en\", mi.smblks);\n"
2078 "    printf(\"# of mapped regions (hblks):           %d\\en\", mi.hblks);\n"
2079 "    printf(\"Bytes in mapped regions (hblkhd):      %d\\en\", mi.hblkhd);\n"
2080 "    printf(\"Max. total allocated space (usmblks):  %d\\en\", mi.usmblks);\n"
2081 "    printf(\"Free bytes held in fastbins (fsmblks): %d\\en\", mi.fsmblks);\n"
2082 "    printf(\"Total allocated space (uordblks):      %d\\en\", mi.uordblks);\n"
2083 "    printf(\"Total free space (fordblks):           %d\\en\", mi.fordblks);\n"
2084 "    printf(\"Topmost releasable block (keepcost):   %d\\en\", mi.keepcost);\n"
2085 "}\n"
2086 msgstr ""
2087 "    printf(\"Total non-mmapped bytes (arena):       %d\\en\", mi.arena);\n"
2088 "    printf(\"# of free chunks (ordblks):            %d\\en\", mi.ordblks);\n"
2089 "    printf(\"# of free fastbin blocks (smblks):     %d\\en\", mi.smblks);\n"
2090 "    printf(\"# of mapped regions (hblks):           %d\\en\", mi.hblks);\n"
2091 "    printf(\"Bytes in mapped regions (hblkhd):      %d\\en\", mi.hblkhd);\n"
2092 "    printf(\"Max. total allocated space (usmblks):  %d\\en\", mi.usmblks);\n"
2093 "    printf(\"Free bytes held in fastbins (fsmblks): %d\\en\", mi.fsmblks);\n"
2094 "    printf(\"Total allocated space (uordblks):      %d\\en\", mi.uordblks);\n"
2095 "    printf(\"Total free space (fordblks):           %d\\en\", mi.fordblks);\n"
2096 "    printf(\"Topmost releasable block (keepcost):   %d\\en\", mi.keepcost);\n"
2097 "}\n"
2098
2099 #. type: Plain text
2100 #: build/C/man3/mallinfo.3:235
2101 #, no-wrap
2102 msgid ""
2103 "int\n"
2104 "main(int argc, char *argv[])\n"
2105 "{\n"
2106 "#define MAX_ALLOCS 2000000\n"
2107 "    char *alloc[MAX_ALLOCS];\n"
2108 "    int numBlocks, j, freeBegin, freeEnd, freeStep;\n"
2109 "    size_t blockSize;\n"
2110 msgstr ""
2111 "int\n"
2112 "main(int argc, char *argv[])\n"
2113 "{\n"
2114 "#define MAX_ALLOCS 2000000\n"
2115 "    char *alloc[MAX_ALLOCS];\n"
2116 "    int numBlocks, j, freeBegin, freeEnd, freeStep;\n"
2117 "    size_t blockSize;\n"
2118
2119 #. type: Plain text
2120 #: build/C/man3/mallinfo.3:239
2121 #, no-wrap
2122 msgid ""
2123 "    if (argc E<lt> 3 || strcmp(argv[1], \"--help\") == 0)\n"
2124 "        usageErr(\"%s num-blocks block-size [free-step [start-free \"\n"
2125 "                \"[end-free]]]\\en\", argv[0]);\n"
2126 msgstr ""
2127 "    if (argc E<lt> 3 || strcmp(argv[1], \"--help\") == 0)\n"
2128 "        usageErr(\"%s num-blocks block-size [free-step [start-free \"\n"
2129 "                \"[end-free]]]\\en\", argv[0]);\n"
2130
2131 #. type: Plain text
2132 #: build/C/man3/mallinfo.3:245
2133 #, no-wrap
2134 msgid ""
2135 "    numBlocks = atoi(argv[1]);\n"
2136 "    blockSize = atoi(argv[2]);\n"
2137 "    freeStep = (argc E<gt> 3) ? atoi(argv[3]) : 1;\n"
2138 "    freeBegin = (argc E<gt> 4) ? atoi(argv[4]) : 0;\n"
2139 "    freeEnd = (argc E<gt> 5) ? atoi(argv[5]) : numBlocks;\n"
2140 msgstr ""
2141 "    numBlocks = atoi(argv[1]);\n"
2142 "    blockSize = atoi(argv[2]);\n"
2143 "    freeStep = (argc E<gt> 3) ? atoi(argv[3]) : 1;\n"
2144 "    freeBegin = (argc E<gt> 4) ? atoi(argv[4]) : 0;\n"
2145 "    freeEnd = (argc E<gt> 5) ? atoi(argv[5]) : numBlocks;\n"
2146
2147 #. type: Plain text
2148 #: build/C/man3/mallinfo.3:248
2149 #, no-wrap
2150 msgid ""
2151 "    printf(\"============== Before allocating blocks ==============\\en\");\n"
2152 "    display_mallinfo();\n"
2153 msgstr ""
2154 "    printf(\"============== Before allocating blocks ==============\\en\");\n"
2155 "    display_mallinfo();\n"
2156
2157 #. type: Plain text
2158 #: build/C/man3/mallinfo.3:252
2159 #, no-wrap
2160 msgid ""
2161 "    for (j = 0; j E<lt> numBlocks; j++) {\n"
2162 "        if (numBlocks E<gt>= MAX_ALLOCS)\n"
2163 "            fatal(\"Too many allocations\");\n"
2164 msgstr ""
2165 "    for (j = 0; j E<lt> numBlocks; j++) {\n"
2166 "        if (numBlocks E<gt>= MAX_ALLOCS)\n"
2167 "            fatal(\"Too many allocations\");\n"
2168
2169 #. type: Plain text
2170 #: build/C/man3/mallinfo.3:257
2171 #, no-wrap
2172 msgid ""
2173 "        alloc[j] = malloc(blockSize);\n"
2174 "        if (alloc[j] == NULL)\n"
2175 "            errExit(\"malloc\");\n"
2176 "    }\n"
2177 msgstr ""
2178 "        alloc[j] = malloc(blockSize);\n"
2179 "        if (alloc[j] == NULL)\n"
2180 "            errExit(\"malloc\");\n"
2181 "    }\n"
2182
2183 #. type: Plain text
2184 #: build/C/man3/mallinfo.3:260
2185 #, no-wrap
2186 msgid ""
2187 "    printf(\"\\en============== After allocating blocks ==============\\en\");\n"
2188 "    display_mallinfo();\n"
2189 msgstr ""
2190 "    printf(\"\\en============== After allocating blocks ==============\\en\");\n"
2191 "    display_mallinfo();\n"
2192
2193 #. type: Plain text
2194 #: build/C/man3/mallinfo.3:263
2195 #, no-wrap
2196 msgid ""
2197 "    for (j = freeBegin; j E<lt> freeEnd; j += freeStep)\n"
2198 "        free(alloc[j]);\n"
2199 msgstr ""
2200 "    for (j = freeBegin; j E<lt> freeEnd; j += freeStep)\n"
2201 "        free(alloc[j]);\n"
2202
2203 #. type: Plain text
2204 #: build/C/man3/mallinfo.3:266
2205 #, no-wrap
2206 msgid ""
2207 "    printf(\"\\en============== After freeing blocks ==============\\en\");\n"
2208 "    display_mallinfo();\n"
2209 msgstr ""
2210 "    printf(\"\\en============== After freeing blocks ==============\\en\");\n"
2211 "    display_mallinfo();\n"
2212
2213 #. type: Plain text
2214 #: build/C/man3/mallinfo.3:269 build/C/man3/malloc_info.3:253
2215 #: build/C/man3/mallopt.3:565 build/C/man3/mcheck.3:203
2216 #: build/C/man2/mmap.2:711
2217 #, no-wrap
2218 msgid ""
2219 "    exit(EXIT_SUCCESS);\n"
2220 "}\n"
2221 msgstr ""
2222 "    exit(EXIT_SUCCESS);\n"
2223 "}\n"
2224
2225 #. type: Plain text
2226 #: build/C/man3/mallinfo.3:279
2227 msgid ""
2228 "B<mmap>(2), B<malloc>(3), B<malloc_info>(3), B<malloc_stats>(3), "
2229 "B<malloc_trim>(3), B<mallopt>(3)"
2230 msgstr ""
2231 "B<mmap>(2), B<malloc>(3), B<malloc_info>(3), B<malloc_stats>(3), "
2232 "B<malloc_trim>(3), B<mallopt>(3)"
2233
2234 #. type: TH
2235 #: build/C/man3/malloc_get_state.3:25
2236 #, no-wrap
2237 msgid "MALLOC_GET_STATE"
2238 msgstr "MALLOC_GET_STATE"
2239
2240 #. type: TH
2241 #: build/C/man3/malloc_get_state.3:25
2242 #, no-wrap
2243 msgid "2012-05-04"
2244 msgstr "2012-05-04"
2245
2246 #. type: Plain text
2247 #: build/C/man3/malloc_get_state.3:28
2248 msgid ""
2249 "malloc_get_state, malloc_set_state - record and restore state of malloc "
2250 "implementation"
2251 msgstr ""
2252
2253 #. type: Plain text
2254 #: build/C/man3/malloc_get_state.3:31 build/C/man3/posix_memalign.3:35
2255 #, no-wrap
2256 msgid "B<#include E<lt>stdlib.hE<gt>>\n"
2257 msgstr "B<#include E<lt>stdlib.hE<gt>>\n"
2258
2259 #. type: Plain text
2260 #: build/C/man3/malloc_get_state.3:33
2261 #, no-wrap
2262 msgid "B<void* malloc_get_state(void);>\n"
2263 msgstr "B<void* malloc_get_state(void);>\n"
2264
2265 #. type: Plain text
2266 #: build/C/man3/malloc_get_state.3:35
2267 #, no-wrap
2268 msgid "B<int malloc_set_state(void *>I<state>B<);>\n"
2269 msgstr "B<int malloc_set_state(void *>I<state>B<);>\n"
2270
2271 #. type: Plain text
2272 #: build/C/man3/malloc_get_state.3:53
2273 msgid ""
2274 "The B<malloc_get_state>()  function records the current state of all "
2275 "B<malloc>(3)  internal bookkeeping variables (but not the actual contents of "
2276 "the heap or the state of B<malloc_hook>(3)  functions pointers).  The state "
2277 "is recorded in a system-dependent opaque data structure dynamically "
2278 "allocated via B<malloc>(3), and a pointer to that data structure is returned "
2279 "as the function result.  (It is the caller's responsibility to B<free>(3)  "
2280 "this memory.)"
2281 msgstr ""
2282
2283 #. type: Plain text
2284 #: build/C/man3/malloc_get_state.3:61
2285 msgid ""
2286 "The B<malloc_set_state>()  function restores the state of all B<malloc>(3)  "
2287 "internal bookkeeping variables to the values recorded in the opaque data "
2288 "structure pointed to by I<state>."
2289 msgstr ""
2290
2291 #. type: Plain text
2292 #: build/C/man3/malloc_get_state.3:68
2293 msgid ""
2294 "On success, B<malloc_get_state>()  returns a pointer to a newly allocated "
2295 "opaque data structure.  On error (for example, memory could not be allocated "
2296 "for the data structure), B<malloc_get_state>()  returns NULL."
2297 msgstr ""
2298
2299 #.  if(ms->magic != MALLOC_STATE_MAGIC) return -1;
2300 #.  /* Must fail if the major version is too high. */
2301 #.  if((ms->version & ~0xffl) > (MALLOC_STATE_VERSION & ~0xffl)) return -2;
2302 #. type: Plain text
2303 #: build/C/man3/malloc_get_state.3:86
2304 msgid ""
2305 "On success, B<malloc_set_state>()  returns 0.  If the implementation detects "
2306 "that I<state> does not point to a correctly formed data structure, "
2307 "B<malloc_set_state>()  returns -1.  If the implementation detects that the "
2308 "version of the data structure referred to by I<state> is a more recent "
2309 "version than this implementation knows about, B<malloc_set_state>()  returns "
2310 "-2."
2311 msgstr ""
2312
2313 #. type: Plain text
2314 #: build/C/man3/malloc_get_state.3:88 build/C/man3/malloc_hook.3:82
2315 #: build/C/man3/mcheck.3:147 build/C/man3/mtrace.3:80
2316 msgid "These functions are GNU extensions."
2317 msgstr "これらの関数は GNU による拡張である。"
2318
2319 #. type: Plain text
2320 #: build/C/man3/malloc_get_state.3:94
2321 msgid ""
2322 "These functions are especially useful when using this B<malloc>(3)  "
2323 "implementation as part of a shared library, and the heap contents are saved/"
2324 "restored via some other method.  This technique is used by the GNU Emacs to "
2325 "implement its \"dumping\" function."
2326 msgstr ""
2327
2328 #.  i.e., calls __malloc_check_init()
2329 #.  i.e., malloc checking is not already in use
2330 #.  and the caller requested malloc checking
2331 #. type: Plain text
2332 #: build/C/man3/malloc_get_state.3:111
2333 msgid ""
2334 "Hook function pointers are never saved or restored by these functions, with "
2335 "two exceptions: if malloc checking (see B<mallopt>(3))  was in use when "
2336 "B<malloc_get_state>()  was called, then B<malloc_set_state>()  resets malloc "
2337 "checking hooks if possible; if malloc checking was not in use in the "
2338 "recorded state, but the caller has requested malloc checking, then the hooks "
2339 "are reset to 0."
2340 msgstr ""
2341
2342 #. type: Plain text
2343 #: build/C/man3/malloc_get_state.3:114
2344 msgid "B<malloc>(3), B<mallopt>(3)"
2345 msgstr "B<malloc>(3), B<mallopt>(3)"
2346
2347 #. type: TH
2348 #: build/C/man3/malloc_hook.3:10
2349 #, no-wrap
2350 msgid "MALLOC_HOOK"
2351 msgstr "MALLOC_HOOK"
2352
2353 #. type: TH
2354 #: build/C/man3/malloc_hook.3:10
2355 #, no-wrap
2356 msgid "2010-10-13"
2357 msgstr "2010-10-13"
2358
2359 #. type: Plain text
2360 #: build/C/man3/malloc_hook.3:15
2361 msgid ""
2362 "__malloc_hook, __malloc_initialize_hook, __memalign_hook, __free_hook, "
2363 "__realloc_hook, __after_morecore_hook - malloc debugging variables"
2364 msgstr ""
2365 "__malloc_hook, __malloc_initialize_hook, __memalign_hook, __free_hook, "
2366 "__realloc_hook, __after_morecore_hook - malloc デバッグ用の変数"
2367
2368 #. type: Plain text
2369 #: build/C/man3/malloc_hook.3:18 build/C/man3/malloc_info.3:31
2370 #: build/C/man3/posix_memalign.3:41
2371 #, no-wrap
2372 msgid "B<#include E<lt>malloc.hE<gt>>\n"
2373 msgstr "B<#include E<lt>malloc.hE<gt>>\n"
2374
2375 #. type: Plain text
2376 #: build/C/man3/malloc_hook.3:20
2377 #, no-wrap
2378 msgid "B<void *(*__malloc_hook)(size_t >I<size>B<, const void *>I<caller>B<);>\n"
2379 msgstr "B<void *(*__malloc_hook)(size_t >I<size>B<, const void *>I<caller>B<);>\n"
2380
2381 #. type: Plain text
2382 #: build/C/man3/malloc_hook.3:23
2383 #, no-wrap
2384 msgid "B<void *(*__realloc_hook)(void *>I<ptr>B<, size_t >I<size>B<, const void *>I<caller>B<);>\n"
2385 msgstr "B<void *(*__realloc_hook)(void *>I<ptr>B<, size_t >I<size>B<, const void *>I<caller>B<);>\n"
2386
2387 #. type: Plain text
2388 #: build/C/man3/malloc_hook.3:26
2389 #, no-wrap
2390 msgid ""
2391 "B<void *(*__memalign_hook)(size_t >I<alignment>B<, size_t >I<size>B<,>\n"
2392 "B<                         const void *>I<caller>B<);>\n"
2393 msgstr ""
2394 "B<void *(*__memalign_hook)(size_t >I<alignment>B<, size_t >I<size>B<,>\n"
2395 "B<                         const void *>I<caller>B<);>\n"
2396
2397 #. type: Plain text
2398 #: build/C/man3/malloc_hook.3:28
2399 #, no-wrap
2400 msgid "B<void (*__free_hook)(void *>I<ptr>B<, const void *>I<caller>B<);>\n"
2401 msgstr "B<void (*__free_hook)(void *>I<ptr>B<, const void *>I<caller>B<);>\n"
2402
2403 #. type: Plain text
2404 #: build/C/man3/malloc_hook.3:30
2405 #, no-wrap
2406 msgid "B<void (*__malloc_initialize_hook)(void);>\n"
2407 msgstr "B<void (*__malloc_initialize_hook)(void);>\n"
2408
2409 #. type: Plain text
2410 #: build/C/man3/malloc_hook.3:32
2411 #, no-wrap
2412 msgid "B<void (*__after_morecore_hook)(void);>\n"
2413 msgstr "B<void (*__after_morecore_hook)(void);>\n"
2414
2415 #. type: Plain text
2416 #: build/C/man3/malloc_hook.3:43
2417 msgid ""
2418 "The GNU C library lets you modify the behavior of B<malloc>(3), B<realloc>"
2419 "(3), and B<free>(3)  by specifying appropriate hook functions.  You can use "
2420 "these hooks to help you debug programs that use dynamic memory allocation, "
2421 "for example."
2422 msgstr ""
2423 "GNU C ライブラリでは、適切なフック関数 (hook function) を指定することで "
2424 "B<malloc>(3), B<realloc>(3), B<free>(3)  の動作を変更することができる。例え"
2425 "ば、動的にメモリ割り当てを行う プログラムのデバッグにこれらのフックを使うこと"
2426 "ができる。"
2427
2428 #. type: Plain text
2429 #: build/C/man3/malloc_hook.3:50
2430 msgid ""
2431 "The variable B<__malloc_initialize_hook> points at a function that is called "
2432 "once when the malloc implementation is initialized.  This is a weak "
2433 "variable, so it can be overridden in the application with a definition like "
2434 "the following:"
2435 msgstr ""
2436 "変数 B<__malloc_initialize_hook> は malloc の実装が初期化される際に一度だけ呼"
2437 "ばれる関数へのポインタである。 この変数は書き換え可能 (weak) であり、アプリ"
2438 "ケーション内で 以下のような定義で上書きできる:"
2439
2440 #. type: Plain text
2441 #: build/C/man3/malloc_hook.3:53
2442 #, no-wrap
2443 msgid "    void (*__malloc_initialize_hook)(void) = my_init_hook;\n"
2444 msgstr "    void (*__malloc_initialize_hook)(void) = my_init_hook;\n"
2445
2446 #. type: Plain text
2447 #: build/C/man3/malloc_hook.3:58
2448 msgid ""
2449 "Now the function I<my_init_hook>()  can do the initialization of all hooks."
2450 msgstr ""
2451 "なお、関数 I<my_init_hook>()  で全てのフックの初期化をすることができる。"
2452
2453 #. type: Plain text
2454 #: build/C/man3/malloc_hook.3:74
2455 msgid ""
2456 "The four functions pointed to by B<__malloc_hook>, B<__realloc_hook>, "
2457 "B<__memalign_hook>, B<__free_hook> have a prototype like the functions "
2458 "B<malloc>(3), B<realloc>(3), B<memalign>(3), B<free>(3), respectively, "
2459 "except that they have a final argument I<caller> that gives the address of "
2460 "the caller of B<malloc>(3), etc."
2461 msgstr ""
2462 "B<__malloc_hook>, B<__realloc_hook>, B<__memalign_hook>, B<__free_hook> で指"
2463 "される 4 つの関数は、各々 B<malloc>(3), B<realloc>(3), B<memalign>(3), "
2464 "B<free>(3)  とよく似たプロトタイプを持っているが、 一番最後の引き数 "
2465 "I<caller> をとる点が異なる。 引き数 I<caller> には、 B<malloc>(3)  などの呼び"
2466 "出し元 (caller) のアドレスが格納される。"
2467
2468 #. type: Plain text
2469 #: build/C/man3/malloc_hook.3:80
2470 msgid ""
2471 "The variable B<__after_morecore_hook> points at a function that is called "
2472 "each time after B<sbrk>(2)  was asked for more memory."
2473 msgstr ""
2474 "変数 B<__after_morecore_hook> は、領域の追加要求があり B<sbrk>(2)  が呼ばれた"
2475 "後で毎回呼び出される関数へのポインタである。"
2476
2477 #.  https://bugzilla.redhat.com/show_bug.cgi?id=450187
2478 #.  http://sourceware.org/bugzilla/show_bug.cgi?id=9957
2479 #. type: Plain text
2480 #: build/C/man3/malloc_hook.3:89
2481 msgid ""
2482 "The use of these hook functions is not safe in multithreaded programs, and "
2483 "they are now deprecated.  Programmers should instead preempt calls to the "
2484 "relevant functions by defining and exporting functions such as \"malloc\" "
2485 "and \"free\"."
2486 msgstr ""
2487
2488 #. type: Plain text
2489 #: build/C/man3/malloc_hook.3:91
2490 msgid "Here is a short example of how to use these variables."
2491 msgstr "これらの変数の使い方の簡単な例を以下に示す。"
2492
2493 #. type: Plain text
2494 #: build/C/man3/malloc_hook.3:95
2495 #, no-wrap
2496 msgid ""
2497 "#include E<lt>stdio.hE<gt>\n"
2498 "#include E<lt>malloc.hE<gt>\n"
2499 msgstr ""
2500 "#include E<lt>stdio.hE<gt>\n"
2501 "#include E<lt>malloc.hE<gt>\n"
2502
2503 #. type: Plain text
2504 #: build/C/man3/malloc_hook.3:99
2505 #, no-wrap
2506 msgid ""
2507 "/* Prototypes for our hooks.  */\n"
2508 "static void my_init_hook(void);\n"
2509 "static void *my_malloc_hook(size_t, const void *);\n"
2510 msgstr ""
2511 "/* 使おうとするフックのプロトタイプ宣言 */\n"
2512 "static void my_init_hook(void);\n"
2513 "static void *my_malloc_hook(size_t, const void *);\n"
2514
2515 #. type: Plain text
2516 #: build/C/man3/malloc_hook.3:102
2517 #, no-wrap
2518 msgid ""
2519 "/* Variables to save original hooks. */\n"
2520 "static void *(*old_malloc_hook)(size_t, const void *);\n"
2521 msgstr ""
2522 "/* 元々のフックを保存するための変数 */\n"
2523 "static void *(*old_malloc_hook)(size_t, const void *);\n"
2524
2525 #. type: Plain text
2526 #: build/C/man3/malloc_hook.3:105
2527 #, no-wrap
2528 msgid ""
2529 "/* Override initializing hook from the C library. */\n"
2530 "void (*__malloc_initialize_hook) (void) = my_init_hook;\n"
2531 msgstr ""
2532 "/* C ライブラリから呼ばれる初期化フックを上書きする */\n"
2533 "void (*__malloc_initialize_hook) (void) = my_init_hook;\n"
2534
2535 #. type: Plain text
2536 #: build/C/man3/malloc_hook.3:112
2537 #, no-wrap
2538 msgid ""
2539 "static void\n"
2540 "my_init_hook(void)\n"
2541 "{\n"
2542 "    old_malloc_hook = __malloc_hook;\n"
2543 "    __malloc_hook = my_malloc_hook;\n"
2544 "}\n"
2545 msgstr ""
2546 "static void\n"
2547 "my_init_hook(void)\n"
2548 "{\n"
2549 "    old_malloc_hook = __malloc_hook;\n"
2550 "    __malloc_hook = my_malloc_hook;\n"
2551 "}\n"
2552
2553 #. type: Plain text
2554 #: build/C/man3/malloc_hook.3:117
2555 #, no-wrap
2556 msgid ""
2557 "static void *\n"
2558 "my_malloc_hook(size_t size, const void *caller)\n"
2559 "{\n"
2560 "    void *result;\n"
2561 msgstr ""
2562 "static void *\n"
2563 "my_malloc_hook(size_t size, const void *caller)\n"
2564 "{\n"
2565 "    void *result;\n"
2566
2567 #. type: Plain text
2568 #: build/C/man3/malloc_hook.3:120
2569 #, no-wrap
2570 msgid ""
2571 "    /* Restore all old hooks */\n"
2572 "    __malloc_hook = old_malloc_hook;\n"
2573 msgstr ""
2574 "    /* 元々のフックを全て戻す */\n"
2575 "    __malloc_hook = old_malloc_hook;\n"
2576
2577 #. type: Plain text
2578 #: build/C/man3/malloc_hook.3:123
2579 #, no-wrap
2580 msgid ""
2581 "    /* Call recursively */\n"
2582 "    result = malloc(size);\n"
2583 msgstr ""
2584 "    /* malloc の再帰的呼び出し */\n"
2585 "    result = malloc(size);\n"
2586
2587 #. type: Plain text
2588 #: build/C/man3/malloc_hook.3:126
2589 #, no-wrap
2590 msgid ""
2591 "    /* Save underlying hooks */\n"
2592 "    old_malloc_hook = __malloc_hook;\n"
2593 msgstr ""
2594 "    /* 現在設定されているフック (underlying hook) を保存する */\n"
2595 "    old_malloc_hook = __malloc_hook;\n"
2596
2597 #. type: Plain text
2598 #: build/C/man3/malloc_hook.3:130
2599 #, no-wrap
2600 msgid ""
2601 "    /* printf() might call malloc(), so protect it too. */\n"
2602 "    printf(\"malloc(%u) called from %p returns %p\\en\",\n"
2603 "            (unsigned int) size, caller, result);\n"
2604 msgstr ""
2605 "    /* printf() は malloc() を呼び出す可能性があるので\n"
2606 "        ここでもガードを行う (元々のフックのままにしておく) */\n"
2607 "    printf(\"malloc(%u) called from %p returns %p\\en\",\n"
2608 "            (unsigned int) size, caller, result);\n"
2609
2610 #. type: Plain text
2611 #: build/C/man3/malloc_hook.3:133
2612 #, no-wrap
2613 msgid ""
2614 "    /* Restore our own hooks */\n"
2615 "    __malloc_hook = my_malloc_hook;\n"
2616 msgstr ""
2617 "    /* ユーザが使おうとするフックを再設定する */\n"
2618 "    __malloc_hook = my_malloc_hook;\n"
2619
2620 #. type: Plain text
2621 #: build/C/man3/malloc_hook.3:136
2622 #, no-wrap
2623 msgid ""
2624 "    return result;\n"
2625 "}\n"
2626 msgstr ""
2627 "    return result;\n"
2628 "}\n"
2629
2630 #. type: Plain text
2631 #: build/C/man3/malloc_hook.3:142
2632 msgid "B<mallinfo>(3), B<malloc>(3), B<mcheck>(3), B<mtrace>(3)"
2633 msgstr "B<mallinfo>(3), B<malloc>(3), B<mcheck>(3), B<mtrace>(3)"
2634
2635 #. type: TH
2636 #: build/C/man3/malloc_info.3:25
2637 #, no-wrap
2638 msgid "MALLOC_INFO"
2639 msgstr "MALLOC_INFO"
2640
2641 #. type: Plain text
2642 #: build/C/man3/malloc_info.3:28
2643 msgid "malloc_info - export malloc state to a stream"
2644 msgstr ""
2645
2646 #. type: Plain text
2647 #: build/C/man3/malloc_info.3:33
2648 #, no-wrap
2649 msgid "B<int malloc_info(int >I<options>B<, FILE *>I<fp>B<);>\n"
2650 msgstr "B<int malloc_info(int >I<options>B<, FILE *>I<fp>B<);>\n"
2651
2652 #. type: Plain text
2653 #: build/C/man3/malloc_info.3:44
2654 msgid ""
2655 "The B<malloc_info>()  function exports an XML string that describes the "
2656 "current state of the memory-allocation implementation in the caller.  The "
2657 "string is printed on the file stream I<fp>.  The exported string includes "
2658 "information about all arenas (see B<malloc>(3))."
2659 msgstr ""
2660
2661 #. type: Plain text
2662 #: build/C/man3/malloc_info.3:48
2663 msgid "As currently implemented, I<options> must be zero."
2664 msgstr ""
2665
2666 #. type: Plain text
2667 #: build/C/man3/malloc_info.3:53
2668 msgid "On success, B<malloc_info>()  returns 0; on error, it returns -1."
2669 msgstr "B<malloc_info>() は成功すると 0 を返す。エラーの場合は -1 を返す。"
2670
2671 #. type: Plain text
2672 #: build/C/man3/malloc_info.3:58
2673 msgid "I<options> was nonzero."
2674 msgstr ""
2675
2676 #. type: Plain text
2677 #: build/C/man3/malloc_info.3:61
2678 msgid "B<malloc_info>()  was added to glibc in version 2.10."
2679 msgstr "B<malloc_info>() は glibc バージョン 2.10 で追加された。"
2680
2681 #. type: Plain text
2682 #: build/C/man3/malloc_info.3:63 build/C/man3/malloc_stats.3:57
2683 #: build/C/man3/malloc_trim.3:62 build/C/man3/malloc_usable_size.3:50
2684 msgid "This function is a GNU extension."
2685 msgstr "この関数は GNU による拡張である。"
2686
2687 #. type: Plain text
2688 #: build/C/man3/malloc_info.3:69
2689 msgid ""
2690 "The memory-allocation information is provided as an XML string (rather than "
2691 "a C structure)  because the information may change over time (according to "
2692 "changes in the underlying implementation).  The output XML string includes a "
2693 "version field."
2694 msgstr ""
2695
2696 #. type: Plain text
2697 #: build/C/man3/malloc_info.3:75
2698 msgid ""
2699 "The B<open_memstream>(3)  function can be used to send the output of "
2700 "B<malloc_info>()  directly into a buffer in memory, rather than to a file."
2701 msgstr ""
2702
2703 #. type: Plain text
2704 #: build/C/man3/malloc_info.3:82
2705 msgid ""
2706 "The B<malloc_info>()  function is designed to address deficiencies in "
2707 "B<malloc_stats>(3)  and B<mallinfo>(3)."
2708 msgstr ""
2709
2710 #. type: Plain text
2711 #: build/C/man3/malloc_info.3:93
2712 msgid ""
2713 "The program below takes up to four command-line arguments, of which the "
2714 "first three are mandatory.  The first argument specifies the number of "
2715 "threads that the program should create.  All of the threads, including the "
2716 "main thread, allocate the number of blocks of memory specified by the second "
2717 "argument.  The third argument controls the size of the blocks to be "
2718 "allocated.  The main thread creates blocks of this size, the second thread "
2719 "created by the program allocates blocks of twice this size, the third thread "
2720 "allocates blocks of three times this size, and so on."
2721 msgstr ""
2722
2723 #. type: Plain text
2724 #: build/C/man3/malloc_info.3:100
2725 msgid ""
2726 "The program calls B<malloc_info>()  twice to display the memory-allocation "
2727 "state.  The first call takes place before any threads are created or memory "
2728 "allocated.  The second call is performed after all threads have allocated "
2729 "memory."
2730 msgstr ""
2731
2732 #. type: Plain text
2733 #: build/C/man3/malloc_info.3:108
2734 msgid ""
2735 "In the following example, the command-line arguments specify the creation of "
2736 "one additional thread, and both the main thread and the additional thread "
2737 "allocate 10000 blocks of memory.  After the blocks of memory have been "
2738 "allocated, B<malloc_info>()  shows the state of two allocation arenas."
2739 msgstr ""
2740
2741 #. type: Plain text
2742 #: build/C/man3/malloc_info.3:133
2743 #, no-wrap
2744 msgid ""
2745 "$ B<getconf GNU_LIBC_VERSION>\n"
2746 "glibc 2.13\n"
2747 "$ B<./a.out 1 10000 100>\n"
2748 "============ Before allocating blocks ============\n"
2749 "E<lt>malloc version=\"1\"E<gt>\n"
2750 "E<lt>heap nr=\"0\"E<gt>\n"
2751 "E<lt>sizesE<gt>\n"
2752 "E<lt>/sizesE<gt>\n"
2753 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
2754 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
2755 "E<lt>system type=\"current\" size=\"135168\"/E<gt>\n"
2756 "E<lt>system type=\"max\" size=\"135168\"/E<gt>\n"
2757 "E<lt>aspace type=\"total\" size=\"135168\"/E<gt>\n"
2758 "E<lt>aspace type=\"mprotect\" size=\"135168\"/E<gt>\n"
2759 "E<lt>/heapE<gt>\n"
2760 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
2761 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
2762 "E<lt>system type=\"current\" size=\"135168\"/E<gt>\n"
2763 "E<lt>system type=\"max\" size=\"135168\"/E<gt>\n"
2764 "E<lt>aspace type=\"total\" size=\"135168\"/E<gt>\n"
2765 "E<lt>aspace type=\"mprotect\" size=\"135168\"/E<gt>\n"
2766 "E<lt>/mallocE<gt>\n"
2767 msgstr ""
2768 "$ B<getconf GNU_LIBC_VERSION>\n"
2769 "glibc 2.13\n"
2770 "$ B<./a.out 1 10000 100>\n"
2771 "============ Before allocating blocks ============\n"
2772 "E<lt>malloc version=\"1\"E<gt>\n"
2773 "E<lt>heap nr=\"0\"E<gt>\n"
2774 "E<lt>sizesE<gt>\n"
2775 "E<lt>/sizesE<gt>\n"
2776 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
2777 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
2778 "E<lt>system type=\"current\" size=\"135168\"/E<gt>\n"
2779 "E<lt>system type=\"max\" size=\"135168\"/E<gt>\n"
2780 "E<lt>aspace type=\"total\" size=\"135168\"/E<gt>\n"
2781 "E<lt>aspace type=\"mprotect\" size=\"135168\"/E<gt>\n"
2782 "E<lt>/heapE<gt>\n"
2783 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
2784 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
2785 "E<lt>system type=\"current\" size=\"135168\"/E<gt>\n"
2786 "E<lt>system type=\"max\" size=\"135168\"/E<gt>\n"
2787 "E<lt>aspace type=\"total\" size=\"135168\"/E<gt>\n"
2788 "E<lt>aspace type=\"mprotect\" size=\"135168\"/E<gt>\n"
2789 "E<lt>/mallocE<gt>\n"
2790
2791 #. type: Plain text
2792 #: build/C/man3/malloc_info.3:163
2793 #, no-wrap
2794 msgid ""
2795 "============ After allocating blocks ============\n"
2796 "E<lt>malloc version=\"1\"E<gt>\n"
2797 "E<lt>heap nr=\"0\"E<gt>\n"
2798 "E<lt>sizesE<gt>\n"
2799 "E<lt>/sizesE<gt>\n"
2800 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
2801 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
2802 "E<lt>system type=\"current\" size=\"1081344\"/E<gt>\n"
2803 "E<lt>system type=\"max\" size=\"1081344\"/E<gt>\n"
2804 "E<lt>aspace type=\"total\" size=\"1081344\"/E<gt>\n"
2805 "E<lt>aspace type=\"mprotect\" size=\"1081344\"/E<gt>\n"
2806 "E<lt>/heapE<gt>\n"
2807 "E<lt>heap nr=\"1\"E<gt>\n"
2808 "E<lt>sizesE<gt>\n"
2809 "E<lt>/sizesE<gt>\n"
2810 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
2811 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
2812 "E<lt>system type=\"current\" size=\"1032192\"/E<gt>\n"
2813 "E<lt>system type=\"max\" size=\"1032192\"/E<gt>\n"
2814 "E<lt>aspace type=\"total\" size=\"1032192\"/E<gt>\n"
2815 "E<lt>aspace type=\"mprotect\" size=\"1032192\"/E<gt>\n"
2816 "E<lt>/heapE<gt>\n"
2817 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
2818 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
2819 "E<lt>system type=\"current\" size=\"2113536\"/E<gt>\n"
2820 "E<lt>system type=\"max\" size=\"2113536\"/E<gt>\n"
2821 "E<lt>aspace type=\"total\" size=\"2113536\"/E<gt>\n"
2822 "E<lt>aspace type=\"mprotect\" size=\"2113536\"/E<gt>\n"
2823 "E<lt>/mallocE<gt>\n"
2824 msgstr ""
2825 "============ After allocating blocks ============\n"
2826 "E<lt>malloc version=\"1\"E<gt>\n"
2827 "E<lt>heap nr=\"0\"E<gt>\n"
2828 "E<lt>sizesE<gt>\n"
2829 "E<lt>/sizesE<gt>\n"
2830 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
2831 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
2832 "E<lt>system type=\"current\" size=\"1081344\"/E<gt>\n"
2833 "E<lt>system type=\"max\" size=\"1081344\"/E<gt>\n"
2834 "E<lt>aspace type=\"total\" size=\"1081344\"/E<gt>\n"
2835 "E<lt>aspace type=\"mprotect\" size=\"1081344\"/E<gt>\n"
2836 "E<lt>/heapE<gt>\n"
2837 "E<lt>heap nr=\"1\"E<gt>\n"
2838 "E<lt>sizesE<gt>\n"
2839 "E<lt>/sizesE<gt>\n"
2840 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
2841 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
2842 "E<lt>system type=\"current\" size=\"1032192\"/E<gt>\n"
2843 "E<lt>system type=\"max\" size=\"1032192\"/E<gt>\n"
2844 "E<lt>aspace type=\"total\" size=\"1032192\"/E<gt>\n"
2845 "E<lt>aspace type=\"mprotect\" size=\"1032192\"/E<gt>\n"
2846 "E<lt>/heapE<gt>\n"
2847 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
2848 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
2849 "E<lt>system type=\"current\" size=\"2113536\"/E<gt>\n"
2850 "E<lt>system type=\"max\" size=\"2113536\"/E<gt>\n"
2851 "E<lt>aspace type=\"total\" size=\"2113536\"/E<gt>\n"
2852 "E<lt>aspace type=\"mprotect\" size=\"2113536\"/E<gt>\n"
2853 "E<lt>/mallocE<gt>\n"
2854
2855 #. type: Plain text
2856 #: build/C/man3/malloc_info.3:173
2857 #, no-wrap
2858 msgid ""
2859 "#include E<lt>unistd.hE<gt>\n"
2860 "#include E<lt>stdlib.hE<gt>\n"
2861 "#include E<lt>pthread.hE<gt>\n"
2862 "#include E<lt>malloc.hE<gt>\n"
2863 "#include E<lt>errno.hE<gt>\n"
2864 msgstr ""
2865 "#include E<lt>unistd.hE<gt>\n"
2866 "#include E<lt>stdlib.hE<gt>\n"
2867 "#include E<lt>pthread.hE<gt>\n"
2868 "#include E<lt>malloc.hE<gt>\n"
2869 "#include E<lt>errno.hE<gt>\n"
2870
2871 #. type: Plain text
2872 #: build/C/man3/malloc_info.3:176
2873 #, no-wrap
2874 msgid ""
2875 "static size_t blockSize;\n"
2876 "static int numThreads, numBlocks;\n"
2877 msgstr ""
2878 "static size_t blockSize;\n"
2879 "static int numThreads, numBlocks;\n"
2880
2881 #. type: Plain text
2882 #: build/C/man3/malloc_info.3:179
2883 #, no-wrap
2884 msgid ""
2885 "#define errExit(msg)    do { perror(msg); exit(EXIT_FAILURE); \\e\n"
2886 "                        } while (0)\n"
2887 msgstr ""
2888 "#define errExit(msg)    do { perror(msg); exit(EXIT_FAILURE); \\e\n"
2889 "                        } while (0)\n"
2890
2891 #. type: Plain text
2892 #: build/C/man3/malloc_info.3:185
2893 #, no-wrap
2894 msgid ""
2895 "static void *\n"
2896 "thread_func(void *arg)\n"
2897 "{\n"
2898 "    int j;\n"
2899 "    int tn = (int) arg;\n"
2900 msgstr ""
2901 "static void *\n"
2902 "thread_func(void *arg)\n"
2903 "{\n"
2904 "    int j;\n"
2905 "    int tn = (int) arg;\n"
2906
2907 #. type: Plain text
2908 #: build/C/man3/malloc_info.3:188
2909 #, no-wrap
2910 msgid ""
2911 "    /* The multiplier \\(aq(2 + tn)\\(aq ensures that each thread (including\n"
2912 "       the main thread) allocates a different amount of memory */\n"
2913 msgstr ""
2914 "    /* The multiplier \\(aq(2 + tn)\\(aq ensures that each thread (including\n"
2915 "       the main thread) allocates a different amount of memory */\n"
2916
2917 #. type: Plain text
2918 #: build/C/man3/malloc_info.3:192
2919 #, no-wrap
2920 msgid ""
2921 "    for (j = 0; j E<lt> numBlocks; j++)\n"
2922 "        if (malloc(blockSize * (2 + tn)) == NULL)\n"
2923 "            errExit(\"malloc-thread\");\n"
2924 msgstr ""
2925 "    for (j = 0; j E<lt> numBlocks; j++)\n"
2926 "        if (malloc(blockSize * (2 + tn)) == NULL)\n"
2927 "            errExit(\"malloc-thread\");\n"
2928
2929 #. type: Plain text
2930 #: build/C/man3/malloc_info.3:196
2931 #, no-wrap
2932 msgid ""
2933 "    sleep(100);         /* Sleep until main thread terminates */\n"
2934 "    return NULL;\n"
2935 "}\n"
2936 msgstr ""
2937 "    sleep(100);         /* Sleep until main thread terminates */\n"
2938 "    return NULL;\n"
2939 "}\n"
2940
2941 #. type: Plain text
2942 #: build/C/man3/malloc_info.3:202
2943 #, no-wrap
2944 msgid ""
2945 "int\n"
2946 "main(int argc, char *argv[])\n"
2947 "{\n"
2948 "    int j, tn, sleepTime;\n"
2949 "    pthread_t *thr;\n"
2950 msgstr ""
2951 "int\n"
2952 "main(int argc, char *argv[])\n"
2953 "{\n"
2954 "    int j, tn, sleepTime;\n"
2955 "    pthread_t *thr;\n"
2956
2957 #. type: Plain text
2958 #: build/C/man3/malloc_info.3:209
2959 #, no-wrap
2960 msgid ""
2961 "    if (argc E<lt> 4) {\n"
2962 "        fprintf(stderr,\n"
2963 "                \"%s num-threads num-blocks block-size [sleep-time]\\en\",\n"
2964 "                argv[0]);\n"
2965 "        exit(EXIT_FAILURE);\n"
2966 "    }\n"
2967 msgstr ""
2968 "    if (argc E<lt> 4) {\n"
2969 "        fprintf(stderr,\n"
2970 "                \"%s num-threads num-blocks block-size [sleep-time]\\en\",\n"
2971 "                argv[0]);\n"
2972 "        exit(EXIT_FAILURE);\n"
2973 "    }\n"
2974
2975 #. type: Plain text
2976 #: build/C/man3/malloc_info.3:214
2977 #, no-wrap
2978 msgid ""
2979 "    numThreads = atoi(argv[1]);\n"
2980 "    numBlocks = atoi(argv[2]);\n"
2981 "    blockSize = atoi(argv[3]);\n"
2982 "    sleepTime = (argc E<gt> 4) ? atoi(argv[4]) : 0;\n"
2983 msgstr ""
2984 "    numThreads = atoi(argv[1]);\n"
2985 "    numBlocks = atoi(argv[2]);\n"
2986 "    blockSize = atoi(argv[3]);\n"
2987 "    sleepTime = (argc E<gt> 4) ? atoi(argv[4]) : 0;\n"
2988
2989 #. type: Plain text
2990 #: build/C/man3/malloc_info.3:218
2991 #, no-wrap
2992 msgid ""
2993 "    thr = calloc(numThreads, sizeof(pthread_t));\n"
2994 "    if (thr == NULL)\n"
2995 "        errExit(\"calloc\");\n"
2996 msgstr ""
2997 "    thr = calloc(numThreads, sizeof(pthread_t));\n"
2998 "    if (thr == NULL)\n"
2999 "        errExit(\"calloc\");\n"
3000
3001 #. type: Plain text
3002 #: build/C/man3/malloc_info.3:221
3003 #, no-wrap
3004 msgid ""
3005 "    printf(\"============ Before allocating blocks ============\\en\");\n"
3006 "    malloc_info(0, stdout);\n"
3007 msgstr ""
3008 "    printf(\"============ Before allocating blocks ============\\en\");\n"
3009 "    malloc_info(0, stdout);\n"
3010
3011 #. type: Plain text
3012 #: build/C/man3/malloc_info.3:223
3013 #, no-wrap
3014 msgid "    /* Create threads that allocate different amounts of memory */\n"
3015 msgstr "    /* Create threads that allocate different amounts of memory */\n"
3016
3017 #. type: Plain text
3018 #: build/C/man3/malloc_info.3:229
3019 #, no-wrap
3020 msgid ""
3021 "    for (tn = 0; tn E<lt> numThreads; tn++) {\n"
3022 "        errno = pthread_create(&thr[tn], NULL, thread_func,\n"
3023 "                               (void *) tn);\n"
3024 "        if (errno != 0)\n"
3025 "            errExit(\"pthread_create\");\n"
3026 msgstr ""
3027 "    for (tn = 0; tn E<lt> numThreads; tn++) {\n"
3028 "        errno = pthread_create(&thr[tn], NULL, thread_func,\n"
3029 "                               (void *) tn);\n"
3030 "        if (errno != 0)\n"
3031 "            errExit(\"pthread_create\");\n"
3032
3033 #. type: Plain text
3034 #: build/C/man3/malloc_info.3:234
3035 #, no-wrap
3036 msgid ""
3037 "        /* If we add a sleep interval after the start-up of each\n"
3038 "           thread, the threads likely won\\(aqt contend for malloc\n"
3039 "           mutexes, and therefore additional arenas won\\(aqt be\n"
3040 "           allocated (see malloc(3)). */\n"
3041 msgstr ""
3042 "        /* If we add a sleep interval after the start-up of each\n"
3043 "           thread, the threads likely won\\(aqt contend for malloc\n"
3044 "           mutexes, and therefore additional arenas won\\(aqt be\n"
3045 "           allocated (see malloc(3)). */\n"
3046
3047 #. type: Plain text
3048 #: build/C/man3/malloc_info.3:238
3049 #, no-wrap
3050 msgid ""
3051 "        if (sleepTime E<gt> 0)\n"
3052 "            sleep(sleepTime);\n"
3053 "    }\n"
3054 msgstr ""
3055 "        if (sleepTime E<gt> 0)\n"
3056 "            sleep(sleepTime);\n"
3057 "    }\n"
3058
3059 #. type: Plain text
3060 #: build/C/man3/malloc_info.3:240
3061 #, no-wrap
3062 msgid "    /* The main thread also allocates some memory */\n"
3063 msgstr "    /* The main thread also allocates some memory */\n"
3064
3065 #. type: Plain text
3066 #: build/C/man3/malloc_info.3:244
3067 #, no-wrap
3068 msgid ""
3069 "    for (j = 0; j E<lt> numBlocks; j++)\n"
3070 "        if (malloc(blockSize) == NULL)\n"
3071 "            errExit(\"malloc\");\n"
3072 msgstr ""
3073 "    for (j = 0; j E<lt> numBlocks; j++)\n"
3074 "        if (malloc(blockSize) == NULL)\n"
3075 "            errExit(\"malloc\");\n"
3076
3077 #. type: Plain text
3078 #: build/C/man3/malloc_info.3:247
3079 #, no-wrap
3080 msgid ""
3081 "    sleep(2);           /* Give all threads a chance to\n"
3082 "                           complete allocations */\n"
3083 msgstr ""
3084 "    sleep(2);           /* Give all threads a chance to\n"
3085 "                           complete allocations */\n"
3086
3087 #. type: Plain text
3088 #: build/C/man3/malloc_info.3:250
3089 #, no-wrap
3090 msgid ""
3091 "    printf(\"\\en============ After allocating blocks ============\\en\");\n"
3092 "    malloc_info(0, stdout);\n"
3093 msgstr ""
3094 "    printf(\"\\en============ After allocating blocks ============\\en\");\n"
3095 "    malloc_info(0, stdout);\n"
3096
3097 #. type: Plain text
3098 #: build/C/man3/malloc_info.3:260
3099 msgid ""
3100 "B<mallinfo>(3), B<malloc>(3), B<malloc_stats>(3), B<mallopt>(3), "
3101 "B<open_memstream>(3)"
3102 msgstr ""
3103 "B<mallinfo>(3), B<malloc>(3), B<malloc_stats>(3), B<mallopt>(3), "
3104 "B<open_memstream>(3)"
3105
3106 #. type: TH
3107 #: build/C/man3/malloc_stats.3:26
3108 #, no-wrap
3109 msgid "MALLOC_STATS"
3110 msgstr "MALLOC_STATS"
3111
3112 #. type: Plain text
3113 #: build/C/man3/malloc_stats.3:29
3114 msgid "malloc_stats - print memory allocation statistics"
3115 msgstr "malloc_stats - メモリ割り当ての統計を表示する"
3116
3117 #. type: Plain text
3118 #: build/C/man3/malloc_stats.3:33
3119 msgid "B<void malloc_stats(void);>"
3120 msgstr "B<void malloc_stats(void);>"
3121
3122 #.  .SH VERSIONS
3123 #.  Available already in glibc 2.0, possibly earlier
3124 #. type: Plain text
3125 #: build/C/man3/malloc_stats.3:55
3126 msgid ""
3127 "The B<malloc_stats>()  function prints (on standard error) statistics about "
3128 "memory allocated by B<malloc>(3)  and related functions.  For each arena "
3129 "(allocation area), this function prints the total amount of memory allocated "
3130 "and the total number of bytes consumed by in-use allocations.  (These two "
3131 "values correspond to the I<arena> and I<uordblks> fields retrieved by "
3132 "B<mallinfo>(3).)  In addition, the function prints the sum of these two "
3133 "statistics for all arenas, and the maximum number of blocks and bytes that "
3134 "were ever simultaneously allocated using B<mmap>(2)."
3135 msgstr ""
3136
3137 #. type: Plain text
3138 #: build/C/man3/malloc_stats.3:61
3139 msgid ""
3140 "More detailed information about memory allocations in the main arena can be "
3141 "obtained using B<mallinfo>(3)."
3142 msgstr ""
3143
3144 #. type: Plain text
3145 #: build/C/man3/malloc_stats.3:67
3146 msgid ""
3147 "B<mmap>(2), B<mallinfo>(3), B<malloc>(3), B<malloc_info>(3), B<mallopt>(3)"
3148 msgstr ""
3149 "B<mmap>(2), B<mallinfo>(3), B<malloc>(3), B<malloc_info>(3), B<mallopt>(3)"
3150
3151 #. type: TH
3152 #: build/C/man3/malloc_trim.3:26
3153 #, no-wrap
3154 msgid "MALLOC_TRIM"
3155 msgstr "MALLOC_TRIM"
3156
3157 #. type: TH
3158 #: build/C/man3/malloc_trim.3:26 build/C/man3/malloc_usable_size.3:25
3159 #, no-wrap
3160 msgid "2012-03-29"
3161 msgstr "2012-03-29"
3162
3163 #. type: Plain text
3164 #: build/C/man3/malloc_trim.3:29
3165 msgid "malloc_trim - release free memory from the top of the heap"
3166 msgstr ""
3167
3168 #. type: Plain text
3169 #: build/C/man3/malloc_trim.3:33
3170 msgid "B<void malloc_trim(size_t >I<pad>B<);>"
3171 msgstr "B<void malloc_trim(size_t >I<pad>B<);>"
3172
3173 #. type: Plain text
3174 #: build/C/man3/malloc_trim.3:40
3175 msgid ""
3176 "The B<malloc_trim>()  function attempts to release free memory at the top of "
3177 "the heap (by calling B<sbrk>(2)  with a suitable argument)."
3178 msgstr ""
3179
3180 #. type: Plain text
3181 #: build/C/man3/malloc_trim.3:51
3182 msgid ""
3183 "The I<pad> argument specifies the amount of free space to leave untrimmed at "
3184 "the top of the heap.  If this argument is 0, only the minimum amount of "
3185 "memory is maintained at the top of the heap (i.e., one page or less).  A "
3186 "nonzero argument can be used to maintain some trailing space at the top of "
3187 "the heap in order to allow future allocations to be made without having to "
3188 "extend the heap with B<sbrk>(2)."
3189 msgstr ""
3190
3191 #. type: Plain text
3192 #: build/C/man3/malloc_trim.3:56
3193 msgid ""
3194 "The B<malloc_trim>()  function returns 1 if memory was actually released "
3195 "back to the system, or 0 if it was not possible to release any memory."
3196 msgstr ""
3197
3198 #.  .SH VERSIONS
3199 #.  Available already in glibc 2.0, possibly earlier
3200 #. type: Plain text
3201 #: build/C/man3/malloc_trim.3:60
3202 msgid "No errors are defined."
3203 msgstr ""
3204
3205 #. type: Plain text
3206 #: build/C/man3/malloc_trim.3:71
3207 msgid ""
3208 "This function is automatically called by B<free>(3)  in certain "
3209 "circumstances; see the discussion of B<M_TOP_PAD> and B<M_TRIM_THRESHOLD> in "
3210 "B<mallopt>(3)."
3211 msgstr ""
3212
3213 #. type: Plain text
3214 #: build/C/man3/malloc_trim.3:74
3215 msgid ""
3216 "This function cannot release free memory located at places other than the "
3217 "top of the heap."
3218 msgstr ""
3219
3220 #.  malloc/malloc.c::mTRIm():
3221 #.      return result | (av == &main_arena ? sYSTRIm (pad, av) : 0);
3222 #. type: Plain text
3223 #: build/C/man3/malloc_trim.3:78
3224 msgid "This function releases only memory in the main arena."
3225 msgstr ""
3226
3227 #. type: Plain text
3228 #: build/C/man3/malloc_trim.3:82
3229 msgid "B<sbrk>(2), B<malloc>(3), B<mallopt>(3)"
3230 msgstr "B<sbrk>(2), B<malloc>(3), B<mallopt>(3)"
3231
3232 #. type: TH
3233 #: build/C/man3/malloc_usable_size.3:25
3234 #, no-wrap
3235 msgid "MALLOC_USABLE_SIZE"
3236 msgstr "MALLOC_USABLE_SIZE"
3237
3238 #. type: Plain text
3239 #: build/C/man3/malloc_usable_size.3:28
3240 msgid "malloc_usable_size - obtain size of block of memory allocated from heap"
3241 msgstr ""
3242
3243 #. type: Plain text
3244 #: build/C/man3/malloc_usable_size.3:32
3245 msgid "B<size_t malloc_usable_size (void *>I<ptr>B<);>"
3246 msgstr "B<size_t malloc_usable_size (void *>I<ptr>B<);>"
3247
3248 #. type: Plain text
3249 #: build/C/man3/malloc_usable_size.3:40
3250 msgid ""
3251 "The B<malloc_usable_size>()  function returns the number of usable bytes in "
3252 "the block pointed to by I<ptr>, a pointer to a block of memory allocated by "
3253 "B<malloc>(3)  or a related function."
3254 msgstr ""
3255
3256 #. type: Plain text
3257 #: build/C/man3/malloc_usable_size.3:48
3258 msgid ""
3259 "B<malloc_usable_size>()  returns the number of usable bytes in the block of "
3260 "allocated memory pointed to by I<ptr>.  If I<ptr> is NULL, 0 is returned."
3261 msgstr ""
3262
3263 #. type: Plain text
3264 #: build/C/man3/malloc_usable_size.3:60
3265 msgid ""
3266 "The value returned by B<malloc_usable_size>()  may be greater than the "
3267 "requested size of the allocation because of alignment and minimum size "
3268 "constraints.  Although the excess bytes can be overwritten by the "
3269 "application without ill effects, this is not good programming practice: the "
3270 "number of excess bytes in an allocation depends on the underlying "
3271 "implementation."
3272 msgstr ""
3273
3274 #. type: Plain text
3275 #: build/C/man3/malloc_usable_size.3:62
3276 msgid "The main use of this function is for debugging and introspection."
3277 msgstr ""
3278
3279 #. type: Plain text
3280 #: build/C/man3/malloc_usable_size.3:64
3281 msgid "B<malloc>(3)"
3282 msgstr "B<malloc>(3)"
3283
3284 #. type: TH
3285 #: build/C/man3/mallopt.3:26
3286 #, no-wrap
3287 msgid "MALLOPT"
3288 msgstr "MALLOPT"
3289
3290 #. type: TH
3291 #: build/C/man3/mallopt.3:26
3292 #, no-wrap
3293 msgid "2012-04-30"
3294 msgstr "2012-04-30"
3295
3296 #. type: Plain text
3297 #: build/C/man3/mallopt.3:29
3298 msgid "mallopt - set memory allocation parameters"
3299 msgstr "mallopt - メモリ割り当てパラメータを設定する"
3300
3301 #. type: Plain text
3302 #: build/C/man3/mallopt.3:33
3303 msgid "B<int mallopt(int >I<param>B<, int >I<value>B<);>"
3304 msgstr "B<int mallopt(int >I<param>B<, int >I<value>B<);>"
3305
3306 #. type: Plain text
3307 #: build/C/man3/mallopt.3:44
3308 msgid ""
3309 "The B<mallopt>()  function adjusts parameters that control the behavior of "
3310 "the memory-allocation functions (see B<malloc>(3)).  The I<param> argument "
3311 "specifies the parameter to be modified, and I<value> specifies the new value "
3312 "for that parameter."
3313 msgstr ""
3314 "B<mallopt>() 関数は、メモリ割り当て関数 (B<malloc>(3) を参照) の動作を\n"
3315 "制御するパラメータの調整を行う。\n"
3316 "I<param> 引き数で変更するパラメータを指定し、\n"
3317 "I<value> 引き数でそのパラメータの新しい値を指定する。"
3318
3319 #. type: Plain text
3320 #: build/C/man3/mallopt.3:47
3321 msgid "The following values can be specified for I<param>:"
3322 msgstr "I<param> には以下の値を指定することができる。"
3323
3324 #. type: TP
3325 #: build/C/man3/mallopt.3:47
3326 #, no-wrap
3327 msgid "B<M_CHECK_ACTION>"
3328 msgstr "B<M_CHECK_ACTION>"
3329
3330 #. type: Plain text
3331 #: build/C/man3/mallopt.3:53
3332 msgid ""
3333 "Setting this parameter controls how glibc responds when various kinds of "
3334 "programming errors are detected (e.g., freeing the same pointer twice).  The "
3335 "3 least significant bits (2, 1, and 0) of the value assigned to this "
3336 "parameter determine the glibc behavior, as follows:"
3337 msgstr ""
3338
3339 #. type: TP
3340 #: build/C/man3/mallopt.3:54
3341 #, no-wrap
3342 msgid "Bit 0"
3343 msgstr "Bit 0"
3344
3345 #. type: Plain text
3346 #: build/C/man3/mallopt.3:64
3347 msgid ""
3348 "If this bit is set, then print a one-line message on I<stderr> that provides "
3349 "details about the error.  The message starts with the string \"***\\ glibc "
3350 "detected\\ ***\", followed by the program name, the name of the memory-"
3351 "allocation function in which the error was detected, a brief description of "
3352 "the error, and the memory address where the error was detected."
3353 msgstr ""
3354
3355 #. type: TP
3356 #: build/C/man3/mallopt.3:64
3357 #, no-wrap
3358 msgid "Bit 1"
3359 msgstr "Bit 1"
3360
3361 #. type: Plain text
3362 #: build/C/man3/mallopt.3:79
3363 msgid ""
3364 "If this bit is set, then, after printing any error message specified by bit "
3365 "0, the program is terminated by calling B<abort>(3).  In glibc versions "
3366 "since 2.4, if bit 0 is also set, then, between printing the error message "
3367 "and aborting, the program also prints a stack trace in the manner of "
3368 "B<backtrace>(3), and prints the process's memory mapping in the style of I</"
3369 "proc/[pid]/maps> (see B<proc>(5))."
3370 msgstr ""
3371
3372 #. type: TP
3373 #: build/C/man3/mallopt.3:79
3374 #, no-wrap
3375 msgid "Bit 2 (since glibc 2.4)"
3376 msgstr "Bit 2 (glibc 2.4 以降)"
3377
3378 #. type: Plain text
3379 #: build/C/man3/mallopt.3:86
3380 msgid ""
3381 "This bit has an effect only if bit 0 is also set.  If this bit is set, then "
3382 "the one-line message describing the error is simplified to contain just the "
3383 "name of the function where the error was detected and the brief description "
3384 "of the error."
3385 msgstr ""
3386
3387 #. type: Plain text
3388 #: build/C/man3/mallopt.3:91
3389 msgid "The remaining bits in I<value> are ignored."
3390 msgstr ""
3391
3392 #. type: Plain text
3393 #: build/C/man3/mallopt.3:95
3394 msgid ""
3395 "Combining the above details, the following numeric values are meaningful for "
3396 "B<M_CHECK_ACTION>:"
3397 msgstr ""
3398
3399 #. type: IP
3400 #: build/C/man3/mallopt.3:96
3401 #, no-wrap
3402 msgid "0"
3403 msgstr "0"
3404
3405 #. type: Plain text
3406 #: build/C/man3/mallopt.3:98
3407 msgid "Ignore error conditions; continue execution (with undefined results)."
3408 msgstr ""
3409
3410 #. type: IP
3411 #: build/C/man3/mallopt.3:98
3412 #, no-wrap
3413 msgid "1"
3414 msgstr "1"
3415
3416 #. type: Plain text
3417 #: build/C/man3/mallopt.3:100
3418 msgid "Print a detailed error message and continue execution."
3419 msgstr ""
3420
3421 #. type: IP
3422 #: build/C/man3/mallopt.3:100
3423 #, no-wrap
3424 msgid "2"
3425 msgstr "2"
3426
3427 #. type: Plain text
3428 #: build/C/man3/mallopt.3:102
3429 msgid "Abort the program."
3430 msgstr ""
3431
3432 #. type: IP
3433 #: build/C/man3/mallopt.3:102
3434 #, no-wrap
3435 msgid "3"
3436 msgstr "3"
3437
3438 #. type: Plain text
3439 #: build/C/man3/mallopt.3:105
3440 msgid ""
3441 "Print detailed error message, stack trace, and memory mappings, and abort "
3442 "the program."
3443 msgstr ""
3444
3445 #. type: IP
3446 #: build/C/man3/mallopt.3:105
3447 #, no-wrap
3448 msgid "5"
3449 msgstr "5"
3450
3451 #. type: Plain text
3452 #: build/C/man3/mallopt.3:107
3453 msgid "Print a simple error message and continue execution."
3454 msgstr ""
3455
3456 #. type: IP
3457 #: build/C/man3/mallopt.3:107
3458 #, no-wrap
3459 msgid "7"
3460 msgstr "7"
3461
3462 #. type: Plain text
3463 #: build/C/man3/mallopt.3:110
3464 msgid ""
3465 "Print simple error message, stack trace, and memory mappings, and abort the "
3466 "program."
3467 msgstr ""
3468
3469 #. type: Plain text
3470 #: build/C/man3/mallopt.3:116
3471 msgid ""
3472 "Since glibc 2.3.4, the default value for the B<M_CHECK_ACTION> parameter is "
3473 "3.  In glibc version 2.3.3 and earlier, the default value is 1."
3474 msgstr ""
3475
3476 #. type: Plain text
3477 #: build/C/man3/mallopt.3:121
3478 msgid ""
3479 "Using a nonzero B<M_CHECK_ACTION> value can be useful because otherwise a "
3480 "crash may happen much later, and the true cause of the problem is then very "
3481 "hard to track down."
3482 msgstr ""
3483
3484 #. type: TP
3485 #: build/C/man3/mallopt.3:121
3486 #, no-wrap
3487 msgid "B<M_MMAP_MAX>"
3488 msgstr "B<M_MMAP_MAX>"
3489
3490 #.  The following text adapted from comments in the glibc source:
3491 #. type: Plain text
3492 #: build/C/man3/mallopt.3:131
3493 msgid ""
3494 "This parameter specifies the maximum number of allocation requests that may "
3495 "be simultaneously serviced using B<mmap>(2).  This parameter exists because "
3496 "some systems have a limited number of internal tables for use by B<mmap>(2), "
3497 "and using more than a few of them may degrade performance."
3498 msgstr ""
3499
3500 #. type: Plain text
3501 #: build/C/man3/mallopt.3:138
3502 msgid ""
3503 "The default value is 65,536, a value which has no special significance and "
3504 "which servers only as a safeguard.  Setting this parameter to 0 disables the "
3505 "use of B<mmap>(2)  for servicing large allocation requests."
3506 msgstr ""
3507
3508 #. type: TP
3509 #: build/C/man3/mallopt.3:138
3510 #, no-wrap
3511 msgid "B<M_MMAP_THRESHOLD>"
3512 msgstr "B<M_MMAP_THRESHOLD>"
3513
3514 #. type: Plain text
3515 #: build/C/man3/mallopt.3:147
3516 msgid ""
3517 "For allocations greater than or equal to the limit specified (in bytes) by "
3518 "B<M_MMAP_THRESHOLD> that can't be satisfied from the free list, the memory-"
3519 "allocation functions employ B<mmap>(2)  instead of increasing the program "
3520 "break using B<sbrk>(2)."
3521 msgstr ""
3522
3523 #. type: Plain text
3524 #: build/C/man3/mallopt.3:167
3525 msgid ""
3526 "Allocating memory using B<mmap>(2)  has the significant advantage that the "
3527 "allocated memory blocks can always be independently released back to the "
3528 "system.  (By contrast, the heap can be trimmed only if memory is freed at "
3529 "the top end.)  On the other hand, there are some disadvantages to the use of "
3530 "B<mmap>(2): deallocated space is not placed on the free list for reuse by "
3531 "later allocations; memory may be wasted because B<mmap>(2)  allocations must "
3532 "be page-aligned; and the kernel must perform the expensive task of zeroing "
3533 "out memory allocated via B<mmap>(2).  Balancing these factors leads to a "
3534 "default setting of 128*1024 for the B<M_MMAP_THRESHOLD> parameter."
3535 msgstr ""
3536
3537 #. type: Plain text
3538 #: build/C/man3/mallopt.3:174
3539 msgid ""
3540 "The lower limit for this parameter is 0.  The upper limit is "
3541 "B<DEFAULT_MMAP_THRESHOLD_MAX>: 512*1024 on 32-bit systems or "
3542 "I<4*1024*1024*sizeof(long)> on 64-bit systems."
3543 msgstr ""
3544
3545 #. type: Plain text
3546 #: build/C/man3/mallopt.3:192
3547 msgid ""
3548 "I<Note:> Nowadays, glibc uses a dynamic mmap threshold by default.  The "
3549 "initial value of the threshold is 128*1024, but when blocks larger than the "
3550 "current threshold and less than or equal to B<DEFAULT_MMAP_THRESHOLD_MAX> "
3551 "are freed, the threshold is adjusted upwards to the size of the freed "
3552 "block.  When dynamic mmap thresholding is in effect, the threshold for "
3553 "trimming the heap is also dynamically adjusted to be twice the dynamic mmap "
3554 "threshold.  Dynamic adjustment of the mmap threshold is disabled if any of "
3555 "the B<M_TRIM_THRESHOLD>, B<M_TOP_PAD>, B<M_MMAP_THRESHOLD>, or B<M_MMAP_MAX> "
3556 "parameters is set."
3557 msgstr ""
3558
3559 #. type: TP
3560 #: build/C/man3/mallopt.3:192
3561 #, no-wrap
3562 msgid "B<M_MXFAST> (since glibc 2.3)"
3563 msgstr "B<M_MXFAST> (glibc 2.3 以降)"
3564
3565 #.  The following text adapted from comments in the glibc sources:
3566 #. type: Plain text
3567 #: build/C/man3/mallopt.3:212
3568 msgid ""
3569 "Set the upper limit for memory allocation requests that are satisfied using "
3570 "\"fastbins\".  (The measurement unit for this parameter is bytes.)  Fastbins "
3571 "are storage areas that hold deallocated blocks of memory of the same size "
3572 "without merging adjacent free blocks.  Subsequent reallocation of blocks of "
3573 "the same size can be handled very quickly by allocating from the fastbin, "
3574 "although memory fragmentation and the overall memory footprint of the "
3575 "program can increase.  The default value for this parameter is I<64*sizeof"
3576 "(size_t)/4> (i.e., 64 on 32-bit architectures).  The range for this "
3577 "parameter is 0 to I<80*sizeof(size_t)/4>.  Setting B<M_MXFAST> to 0 disables "
3578 "the use of fastbins."
3579 msgstr ""
3580
3581 #. type: TP
3582 #: build/C/man3/mallopt.3:212
3583 #, no-wrap
3584 msgid "B<M_PERTURB> (since glibc 2.4)"
3585 msgstr "B<M_PERTURB> (glibc 2.4 以降)"
3586
3587 #. type: Plain text
3588 #: build/C/man3/mallopt.3:227
3589 msgid ""
3590 "If this parameter is set to a nonzero value, then bytes of allocated memory "
3591 "(other than allocations via B<calloc>(3))  are initialized to the complement "
3592 "of the value in the least significant byte of I<value>, and when allocated "
3593 "memory is released using B<free>(3), the freed bytes are set to the least "
3594 "significant byte of I<value>.  This can be useful for detecting errors where "
3595 "programs incorrectly rely on allocated memory being initialized to zero, or "
3596 "reuse values in memory that has already been freed."
3597 msgstr ""
3598
3599 #. type: TP
3600 #: build/C/man3/mallopt.3:227
3601 #, no-wrap
3602 msgid "B<M_TOP_PAD>"
3603 msgstr "B<M_TOP_PAD>"
3604
3605 #. type: Plain text
3606 #: build/C/man3/mallopt.3:234
3607 msgid ""
3608 "This parameter defines the amount of padding to employ when calling B<sbrk>"
3609 "(2)  to modify the program break.  (The measurement unit for this parameter "
3610 "is bytes.)  This parameter has an effect in the following circumstances:"
3611 msgstr ""
3612
3613 #. type: Plain text
3614 #: build/C/man3/mallopt.3:241
3615 msgid ""
3616 "When the program break is increased, then B<M_TOP_PAD> bytes are added to "
3617 "the B<sbrk>(2)  request."
3618 msgstr ""
3619
3620 #. type: Plain text
3621 #: build/C/man3/mallopt.3:247
3622 msgid ""
3623 "When the heap is trimmed as a consequence of calling B<free>(3)  (see the "
3624 "discussion of B<M_TRIM_THRESHOLD>)  this much free space is preserved at the "
3625 "top of the heap."
3626 msgstr ""
3627
3628 #. type: Plain text
3629 #: build/C/man3/mallopt.3:251
3630 msgid ""
3631 "In either case, the amount of padding is always rounded to a system page "
3632 "boundary."
3633 msgstr ""
3634
3635 #. type: Plain text
3636 #: build/C/man3/mallopt.3:258
3637 msgid ""
3638 "Modifying B<M_TOP_PAD> is a trade-off between increasing the number of "
3639 "system calls (when the parameter is set low)  and wasting unused memory at "
3640 "the top of the heap (when the parameter is set high)."
3641 msgstr ""
3642
3643 #.  DEFAULT_TOP_PAD in glibc source
3644 #. type: Plain text
3645 #: build/C/man3/mallopt.3:261
3646 msgid "The default value for this parameter is 128*1024."
3647 msgstr ""
3648
3649 #. type: TP
3650 #: build/C/man3/mallopt.3:261
3651 #, no-wrap
3652 msgid "B<M_TRIM_THRESHOLD>"
3653 msgstr "B<M_TRIM_THRESHOLD>"
3654
3655 #. type: Plain text
3656 #: build/C/man3/mallopt.3:277
3657 msgid ""
3658 "When the amount of contiguous free memory at the top of the heap grows "
3659 "sufficiently large, B<free>(3)  employs B<sbrk>(2)  to release this memory "
3660 "back to the system.  (This can be useful in programs that continue to "
3661 "execute for a long period after freeing a significant amount of memory.)  "
3662 "The B<M_TRIM_THRESHOLD> parameter specifies the minimum size (in bytes) that "
3663 "this block of memory must reach before B<sbrk>(2)  is used to trim the heap."
3664 msgstr ""
3665
3666 #. type: Plain text
3667 #: build/C/man3/mallopt.3:282
3668 msgid ""
3669 "The default value for this parameter is 128*1024.  Setting "
3670 "B<M_TRIM_THRESHOLD> to -1 disables trimming completely."
3671 msgstr ""
3672
3673 #
3674 #
3675 #
3676 #.  FIXME Do the arena parameters need to be documented?
3677 #.  .TP
3678 #.  .BR M_ARENA_TEST " (since glibc 2.10)"
3679 #.  .TP
3680 #.  .BR M_ARENA_MAX " (since glibc 2.10)"
3681 #.  Environment variables
3682 #.      MALLOC_ARENA_MAX_
3683 #.      MALLOC_ARENA_TEST_
3684 #.  http://udrepper.livejournal.com/20948.html describes some details
3685 #.      of the MALLOC_ARENA_* environment variables.
3686 #.  These macros aren't enabled in production releases until 2.15?
3687 #.  (see glibc malloc/Makefile)
3688 #. type: Plain text
3689 #: build/C/man3/mallopt.3:305
3690 msgid ""
3691 "Modifying B<M_TRIM_THRESHOLD> is a trade-off between increasing the number "
3692 "of system calls (when the parameter is set low)  and wasting unused memory "
3693 "at the top of the heap (when the parameter is set high)."
3694 msgstr ""
3695
3696 #. type: SS
3697 #: build/C/man3/mallopt.3:305
3698 #, no-wrap
3699 msgid "Environment variables"
3700 msgstr "環境変数"
3701
3702 #. type: Plain text
3703 #: build/C/man3/mallopt.3:320
3704 msgid ""
3705 "A number of environment variables can be defined to modify some of the same "
3706 "parameters as are controlled by B<mallopt>().  Using these variables has the "
3707 "advantage that the source code of the program need not be changed.  To be "
3708 "effective, these variables must be defined before the first call to a memory-"
3709 "allocation function.  (If the same parameters are adjusted via B<mallopt>()  "
3710 "then the B<mallopt>()  settings take precedence.)  For security reasons, "
3711 "these variables are ignored in set-user-ID and set-group-ID programs."
3712 msgstr ""
3713
3714 #. type: Plain text
3715 #: build/C/man3/mallopt.3:323
3716 msgid ""
3717 "The environment variables are as follows (note the trailing underscore at "
3718 "the end of the name of each variable):"
3719 msgstr ""
3720
3721 #. type: TP
3722 #: build/C/man3/mallopt.3:323
3723 #, no-wrap
3724 msgid "B<MALLOC_CHECK_>"
3725 msgstr "B<MALLOC_CHECK_>"
3726
3727 #.  On glibc 2.12/x86, a simple malloc()+free() loop is about 70% slower
3728 #.  when MALLOC_CHECK_ was set.
3729 #. type: Plain text
3730 #: build/C/man3/mallopt.3:340
3731 msgid ""
3732 "This environment variable controls the same parameter as B<mallopt>()  "
3733 "B<M_CHECK_ACTION>.  If this variable is set to a nonzero value, then a "
3734 "special implementation of the memory-allocation functions is used.  (This is "
3735 "accomplished using the B<malloc_hook>(3)  feature.)  This implementation "
3736 "performs additional error checking, but is slower than the standard set of "
3737 "memory-allocation functions.  (This implementation does not detect all "
3738 "possible errors; memory leaks can still occur.)"
3739 msgstr ""
3740
3741 #. type: Plain text
3742 #: build/C/man3/mallopt.3:345
3743 msgid ""
3744 "The value assigned to this environment variable should be a single digit, "
3745 "whose meaning is as described for B<M_CHECK_ACTION>.  Any characters beyond "
3746 "the initial digit are ignored."
3747 msgstr ""
3748
3749 #. type: Plain text
3750 #: build/C/man3/mallopt.3:354
3751 msgid ""
3752 "For security reasons, the effect of B<MALLOC_CHECK_> is disabled by default "
3753 "for set-user-ID and set-group-ID programs.  However, if the file I</etc/suid-"
3754 "debug> exists (the content of the file is irrelevant), then B<MALLOC_CHECK_> "
3755 "also has an effect for set-user-ID and set-group-ID programs."
3756 msgstr ""
3757
3758 #. type: TP
3759 #: build/C/man3/mallopt.3:354
3760 #, no-wrap
3761 msgid "B<MALLOC_MMAP_MAX_>"
3762 msgstr "B<MALLOC_MMAP_MAX_>"
3763
3764 #. type: Plain text
3765 #: build/C/man3/mallopt.3:359
3766 msgid "Controls the same parameter as B<mallopt>()  B<M_MMAP_MAX>."
3767 msgstr ""
3768
3769 #. type: TP
3770 #: build/C/man3/mallopt.3:359
3771 #, no-wrap
3772 msgid "B<MALLOC_MMAP_THRESHOLD_>"
3773 msgstr "B<MALLOC_MMAP_THRESHOLD_>"
3774
3775 #. type: Plain text
3776 #: build/C/man3/mallopt.3:364
3777 msgid "Controls the same parameter as B<mallopt>()  B<M_MMAP_THRESHOLD>."
3778 msgstr ""
3779
3780 #. type: TP
3781 #: build/C/man3/mallopt.3:364
3782 #, no-wrap
3783 msgid "B<MALLOC_PERTURB_>"
3784 msgstr "B<MALLOC_PERTURB_>"
3785
3786 #. type: Plain text
3787 #: build/C/man3/mallopt.3:369
3788 msgid "Controls the same parameter as B<mallopt>()  B<M_PERTURB>."
3789 msgstr ""
3790
3791 #. type: TP
3792 #: build/C/man3/mallopt.3:369
3793 #, no-wrap
3794 msgid "B<MALLOC_TRIM_THRESHOLD_>"
3795 msgstr "B<MALLOC_TRIM_THRESHOLD_>"
3796
3797 #. type: Plain text
3798 #: build/C/man3/mallopt.3:374
3799 msgid "Controls the same parameter as B<mallopt>()  B<M_TRIM_THRESHOLD>."
3800 msgstr ""
3801
3802 #. type: TP
3803 #: build/C/man3/mallopt.3:374
3804 #, no-wrap
3805 msgid "B<MALLOC_TOP_PAD_>"
3806 msgstr "B<MALLOC_TOP_PAD_>"
3807
3808 #. type: Plain text
3809 #: build/C/man3/mallopt.3:379
3810 msgid "Controls the same parameter as B<mallopt>()  B<M_TOP_PAD>."
3811 msgstr ""
3812
3813 #. type: Plain text
3814 #: build/C/man3/mallopt.3:384
3815 msgid "On success, B<mallopt>()  returns 1.  On error, it returns 0."
3816 msgstr "B<mallopt>()  は成功すると 1 を返す。エラーの場合は 0 を返す。"
3817
3818 #.  .SH VERSIONS
3819 #.  Available already in glibc 2.0, possibly earlier
3820 #. type: Plain text
3821 #: build/C/man3/mallopt.3:392
3822 msgid "On error, I<errno> is I<not> set."
3823 msgstr "エラーの場合、I<errno> は設定I<されない>。"
3824
3825 #.  .SH NOTES
3826 #. type: Plain text
3827 #: build/C/man3/mallopt.3:406
3828 msgid ""
3829 "This function is not specified by POSIX or the C standards.  A similar "
3830 "function exists on many System V derivatives, but the range of values for "
3831 "I<param> varies across systems.  The SVID defined options B<M_MXFAST>, "
3832 "B<M_NLBLKS>, B<M_GRAIN>, and B<M_KEEP>, but only the first of these is "
3833 "implemented in glibc."
3834 msgstr ""
3835
3836 #. type: Plain text
3837 #: build/C/man3/mallopt.3:410
3838 msgid "Specifying an invalid value for I<param> does not generate an error."
3839 msgstr ""
3840
3841 #.  FIXME This looks buggy:
3842 #.  setting the M_MXFAST limit rounds up:    (s + SIZE_SZ) & ~MALLOC_ALIGN_MASK)
3843 #.  malloc requests are rounded up:
3844 #.     (req) + SIZE_SZ + MALLOC_ALIGN_MASK) & ~MALLOC_ALIGN_MASK
3845 #.  http://sources.redhat.com/bugzilla/show_bug.cgi?id=12129
3846 #. type: Plain text
3847 #: build/C/man3/mallopt.3:418
3848 msgid ""
3849 "A calculation error within the glibc implementation means that a call of the "
3850 "form:"
3851 msgstr ""
3852
3853 #. type: Plain text
3854 #: build/C/man3/mallopt.3:421
3855 #, no-wrap
3856 msgid "    mallopt(M_MXFAST, n)\n"
3857 msgstr "    mallopt(M_MXFAST, n)\n"
3858
3859 #.  Bins are multiples of 2 * sizeof(size_t) + sizeof(size_t)
3860 #. type: Plain text
3861 #: build/C/man3/mallopt.3:433
3862 msgid ""
3863 "does not result in fastbins being employed for all allocations of size up to "
3864 "I<n>.  To ensure desired results, I<n> should be rounded up to the next "
3865 "multiple greater than or equal to I<(2k+1)*sizeof(size_t)>, where I<k> is an "
3866 "integer."
3867 msgstr ""
3868
3869 #.  FIXME MALLOC_MMAP_THRESHOLD_ and MALLOC_MMAP_MAX_
3870 #.  do have an effect for set-user-ID programs (but not
3871 #.  set-group-ID programs).
3872 #.  http://sources.redhat.com/bugzilla/show_bug.cgi?id=12155
3873 #. type: Plain text
3874 #: build/C/man3/mallopt.3:445
3875 msgid ""
3876 "The B<MALLOC_MMAP_THRESHOLD_> and B<MALLOC_MMAP_MAX_> variables are I<not> "
3877 "ignored in set-group-ID programs."
3878 msgstr ""
3879
3880 #.  FIXME http://sources.redhat.com/bugzilla/show_bug.cgi?id=12140
3881 #. type: Plain text
3882 #: build/C/man3/mallopt.3:466
3883 msgid ""
3884 "If B<mallopt>()  is used to set B<M_PERTURB>, then, as expected, the bytes "
3885 "of allocated memory are initialized to the complement of the byte in "
3886 "I<value>, and when that memory is freed, the bytes of the region are "
3887 "initialized to the byte specified in I<value>.  However, there is an off-by-"
3888 "I<sizeof(size_t)> error in the implementation: instead of initializing "
3889 "precisely the block of memory being freed by the call I<free(p)>, the block "
3890 "starting at I<p+sizeof(size_t)> is initialized."
3891 msgstr ""
3892
3893 #. type: Plain text
3894 #: build/C/man3/mallopt.3:475
3895 msgid ""
3896 "The program below demonstrates the use of B<M_CHECK_ACTION>.  If the program "
3897 "is supplied with an (integer) command-line argument, then that argument is "
3898 "used to set the B<M_CHECK_ACTION> parameter.  The program then allocates a "
3899 "block of memory, and frees it twice (an error)."
3900 msgstr ""
3901
3902 #. type: Plain text
3903 #: build/C/man3/mallopt.3:479
3904 msgid ""
3905 "The following shell session shows what happens when we run this program "
3906 "under glibc, with the default value for B<M_CHECK_ACTION>:"
3907 msgstr ""
3908
3909 #. type: Plain text
3910 #: build/C/man3/mallopt.3:499
3911 #, no-wrap
3912 msgid ""
3913 "$ B<./a.out>\n"
3914 "main(): returned from first free() call\n"
3915 "*** glibc detected *** ./a.out: double free or corruption (top): 0x09d30008 ***\n"
3916 "======= Backtrace: =========\n"
3917 "/lib/libc.so.6(+0x6c501)[0x523501]\n"
3918 "/lib/libc.so.6(+0x6dd70)[0x524d70]\n"
3919 "/lib/libc.so.6(cfree+0x6d)[0x527e5d]\n"
3920 "\\&./a.out[0x80485db]\n"
3921 "/lib/libc.so.6(__libc_start_main+0xe7)[0x4cdce7]\n"
3922 "\\&./a.out[0x8048471]\n"
3923 "======= Memory map: ========\n"
3924 "001e4000-001fe000 r-xp 00000000 08:06 1083555    /lib/libgcc_s.so.1\n"
3925 "001fe000-001ff000 r--p 00019000 08:06 1083555    /lib/libgcc_s.so.1\n"
3926 "[some lines omitted]\n"
3927 "b7814000-b7817000 rw-p 00000000 00:00 0\n"
3928 "bff53000-bff74000 rw-p 00000000 00:00 0          [stack]\n"
3929 "Aborted (core dumped)\n"
3930 msgstr ""
3931 "$ B<./a.out>\n"
3932 "main(): returned from first free() call\n"
3933 "*** glibc detected *** ./a.out: double free or corruption (top): 0x09d30008 ***\n"
3934 "======= Backtrace: =========\n"
3935 "/lib/libc.so.6(+0x6c501)[0x523501]\n"
3936 "/lib/libc.so.6(+0x6dd70)[0x524d70]\n"
3937 "/lib/libc.so.6(cfree+0x6d)[0x527e5d]\n"
3938 "\\&./a.out[0x80485db]\n"
3939 "/lib/libc.so.6(__libc_start_main+0xe7)[0x4cdce7]\n"
3940 "\\&./a.out[0x8048471]\n"
3941 "======= Memory map: ========\n"
3942 "001e4000-001fe000 r-xp 00000000 08:06 1083555    /lib/libgcc_s.so.1\n"
3943 "001fe000-001ff000 r--p 00019000 08:06 1083555    /lib/libgcc_s.so.1\n"
3944 "[some lines omitted]\n"
3945 "b7814000-b7817000 rw-p 00000000 00:00 0\n"
3946 "bff53000-bff74000 rw-p 00000000 00:00 0          [stack]\n"
3947 "Aborted (core dumped)\n"
3948
3949 #. type: Plain text
3950 #: build/C/man3/mallopt.3:504
3951 msgid ""
3952 "The following runs show the results when employing other values for "
3953 "B<M_CHECK_ACTION>:"
3954 msgstr ""
3955
3956 #. type: Plain text
3957 #: build/C/man3/mallopt.3:517
3958 #, no-wrap
3959 msgid ""
3960 "$ B<./a.out 1>             # Diagnose error and continue\n"
3961 "main(): returned from first free() call\n"
3962 "*** glibc detected *** ./a.out: double free or corruption (top): 0x09cbe008 ***\n"
3963 "main(): returned from second free() call\n"
3964 "$ B<./a.out 2>             # Abort without error message\n"
3965 "main(): returned from first free() call\n"
3966 "Aborted (core dumped)\n"
3967 "$ B<./a.out 0>             # Ignore error and continue\n"
3968 "main(): returned from first free() call\n"
3969 "main(): returned from second free() call\n"
3970 msgstr ""
3971 "$ B<./a.out 1>             # Diagnose error and continue\n"
3972 "main(): returned from first free() call\n"
3973 "*** glibc detected *** ./a.out: double free or corruption (top): 0x09cbe008 ***\n"
3974 "main(): returned from second free() call\n"
3975 "$ B<./a.out 2>             # Abort without error message\n"
3976 "main(): returned from first free() call\n"
3977 "Aborted (core dumped)\n"
3978 "$ B<./a.out 0>             # Ignore error and continue\n"
3979 "main(): returned from first free() call\n"
3980 "main(): returned from second free() call\n"
3981
3982 #. type: Plain text
3983 #: build/C/man3/mallopt.3:523
3984 msgid ""
3985 "The next run shows how to set the same parameter using the B<MALLOC_CHECK_> "
3986 "environment variable:"
3987 msgstr ""
3988
3989 #. type: Plain text
3990 #: build/C/man3/mallopt.3:530
3991 #, no-wrap
3992 msgid ""
3993 "$ B<MALLOC_CHECK_=1 ./a.out>\n"
3994 "main(): returned from first free() call\n"
3995 "*** glibc detected *** ./a.out: free(): invalid pointer: 0x092c2008 ***\n"
3996 "main(): returned from second free() call\n"
3997 msgstr ""
3998 "$ B<MALLOC_CHECK_=1 ./a.out>\n"
3999 "main(): returned from first free() call\n"
4000 "*** glibc detected *** ./a.out: free(): invalid pointer: 0x092c2008 ***\n"
4001 "main(): returned from second free() call\n"
4002
4003 #. type: Plain text
4004 #: build/C/man3/mallopt.3:538
4005 #, no-wrap
4006 msgid ""
4007 "#include E<lt>malloc.hE<gt>\n"
4008 "#include E<lt>stdio.hE<gt>\n"
4009 "#include E<lt>stdlib.hE<gt>\n"
4010 msgstr ""
4011 "#include E<lt>malloc.hE<gt>\n"
4012 "#include E<lt>stdio.hE<gt>\n"
4013 "#include E<lt>stdlib.hE<gt>\n"
4014
4015 #. type: Plain text
4016 #: build/C/man3/mallopt.3:543 build/C/man3/mcheck.3:187
4017 #, no-wrap
4018 msgid ""
4019 "int\n"
4020 "main(int argc, char *argv[])\n"
4021 "{\n"
4022 "    char *p;\n"
4023 msgstr ""
4024 "int\n"
4025 "main(int argc, char *argv[])\n"
4026 "{\n"
4027 "    char *p;\n"
4028
4029 #. type: Plain text
4030 #: build/C/man3/mallopt.3:550
4031 #, no-wrap
4032 msgid ""
4033 "    if (argc E<gt> 1) {\n"
4034 "        if (mallopt(M_CHECK_ACTION, atoi(argv[1])) != 1) {\n"
4035 "            fprintf(stderr, \"mallopt() failed\");\n"
4036 "            exit(EXIT_FAILURE);\n"
4037 "        }\n"
4038 "    }\n"
4039 msgstr ""
4040 "    if (argc E<gt> 1) {\n"
4041 "        if (mallopt(M_CHECK_ACTION, atoi(argv[1])) != 1) {\n"
4042 "            fprintf(stderr, \"mallopt() failed\");\n"
4043 "            exit(EXIT_FAILURE);\n"
4044 "        }\n"
4045 "    }\n"
4046
4047 #. type: Plain text
4048 #: build/C/man3/mallopt.3:556
4049 #, no-wrap
4050 msgid ""
4051 "    p = malloc(1000);\n"
4052 "    if (p == NULL) {\n"
4053 "        fprintf(stderr, \"malloc() failed\");\n"
4054 "        exit(EXIT_FAILURE);\n"
4055 "    }\n"
4056 msgstr ""
4057 "    p = malloc(1000);\n"
4058 "    if (p == NULL) {\n"
4059 "        fprintf(stderr, \"malloc() failed\");\n"
4060 "        exit(EXIT_FAILURE);\n"
4061 "    }\n"
4062
4063 #. type: Plain text
4064 #: build/C/man3/mallopt.3:559
4065 #, no-wrap
4066 msgid ""
4067 "    free(p);\n"
4068 "    printf(\"main(): returned from first free() call\\en\");\n"
4069 msgstr ""
4070 "    free(p);\n"
4071 "    printf(\"main(): returned from first free() call\\en\");\n"
4072
4073 #. type: Plain text
4074 #: build/C/man3/mallopt.3:562
4075 #, no-wrap
4076 msgid ""
4077 "    free(p);\n"
4078 "    printf(\"main(): returned from second free() call\\en\");\n"
4079 msgstr ""
4080 "    free(p);\n"
4081 "    printf(\"main(): returned from second free() call\\en\");\n"
4082
4083 #. type: Plain text
4084 #: build/C/man3/mallopt.3:580
4085 msgid ""
4086 "B<mmap>(2), B<sbrk>(2), B<mallinfo>(3), B<malloc>(3), B<malloc_hook>(3), "
4087 "B<malloc_info>(3), B<malloc_stats>(3), B<malloc_trim>(3), B<mcheck>(3), "
4088 "B<mtrace>(3), B<posix_memalign>(3)"
4089 msgstr "B<mmap>(2), B<sbrk>(2), B<mallinfo>(3), B<malloc>(3), B<malloc_hook>(3), B<malloc_info>(3), B<malloc_stats>(3), B<malloc_trim>(3), B<mcheck>(3), B<mtrace>(3), B<posix_memalign>(3)"
4090
4091 #. type: TH
4092 #: build/C/man3/mcheck.3:25
4093 #, no-wrap
4094 msgid "MCHECK"
4095 msgstr "MCHECK"
4096
4097 #. type: TH
4098 #: build/C/man3/mcheck.3:25 build/C/man3/mtrace.3:25
4099 #, no-wrap
4100 msgid "2012-04-18"
4101 msgstr "2012-04-18"
4102
4103 #. type: Plain text
4104 #: build/C/man3/mcheck.3:28
4105 msgid ""
4106 "mcheck, mcheck_check_all, mcheck_pedantic, mprobe - heap consistency checking"
4107 msgstr ""
4108
4109 #. type: Plain text
4110 #: build/C/man3/mcheck.3:31
4111 #, no-wrap
4112 msgid "B<#include E<lt>mcheck.hE<gt>>\n"
4113 msgstr "B<#include E<lt>mcheck.hE<gt>>\n"
4114
4115 #. type: Plain text
4116 #: build/C/man3/mcheck.3:33
4117 #, no-wrap
4118 msgid "B<int mcheck(void (*>I<abortfunc>B<)(enum mcheck_status >I<mstatus>B<));>\n"
4119 msgstr ""
4120
4121 #. type: Plain text
4122 #: build/C/man3/mcheck.3:35
4123 #, no-wrap
4124 msgid "B<int mcheck_pedantic(void (*>I<abortfunc>B<)(enum mcheck_status >I<mstatus>B<));>\n"
4125 msgstr ""
4126
4127 #. type: Plain text
4128 #: build/C/man3/mcheck.3:37
4129 #, no-wrap
4130 msgid "B<void mcheck_check_all(void);>\n"
4131 msgstr "B<void mcheck_check_all(void);>\n"
4132
4133 #. type: Plain text
4134 #: build/C/man3/mcheck.3:39
4135 #, no-wrap
4136 msgid "B<enum mcheck_status mprobe(void *>I<ptr>B<);>\n"
4137 msgstr "B<enum mcheck_status mprobe(void *>I<ptr>B<);>\n"
4138
4139 #. type: Plain text
4140 #: build/C/man3/mcheck.3:51
4141 msgid ""
4142 "The B<mcheck>()  function installs a set of debugging hooks for the B<malloc>"
4143 "(3)  family of memory-allocation functions.  These hooks cause certain "
4144 "consistency checks to be performed on the state of the heap.  The checks can "
4145 "detect application errors such as freeing a block of memory more than once "
4146 "or corrupting the bookkeeping data structures that immediately precede a "
4147 "block of allocated memory."
4148 msgstr ""
4149
4150 #. type: Plain text
4151 #: build/C/man3/mcheck.3:63
4152 msgid ""
4153 "To be effective, the B<mcheck>()  function must be called before the first "
4154 "call to B<malloc>(3)  or a related function.  In cases where this is "
4155 "difficult to ensure, linking the program with I<-mcheck> inserts an implicit "
4156 "call to B<mcheck>()  (with a NULL argument)  before the first call to a "
4157 "memory-allocation function."
4158 msgstr ""
4159
4160 #. type: Plain text
4161 #: build/C/man3/mcheck.3:71
4162 msgid ""
4163 "The B<mcheck_pedantic>()  function is similar to B<mcheck>(), but performs "
4164 "checks on all allocated blocks whenever one of the memory-allocation "
4165 "functions is called.  This can be very slow!"
4166 msgstr ""
4167
4168 #. type: Plain text
4169 #: build/C/man3/mcheck.3:78
4170 msgid ""
4171 "The B<mcheck_check_all>()  function causes an immediate check on all "
4172 "allocated blocks.  This call is only effective if B<mcheck>()  is called "
4173 "beforehand."
4174 msgstr ""
4175
4176 #. type: Plain text
4177 #: build/C/man3/mcheck.3:91
4178 msgid ""
4179 "If the system detects an inconsistency in the heap, the caller-supplied "
4180 "function pointed to by I<abortfunc> is invoked with a single argument "
4181 "argument, I<mstatus>, that indicates what type of inconsistency was "
4182 "detected.  If I<abortfunc> is NULL, a default function prints an error "
4183 "message on I<stderr> and calls B<abort>(3)."
4184 msgstr ""
4185
4186 #. type: Plain text
4187 #: build/C/man3/mcheck.3:103
4188 msgid ""
4189 "The B<mprobe>()  function performs a consistency check on the block of "
4190 "allocated memory pointed to by I<ptr>.  The B<mcheck>()  function should be "
4191 "called beforehand (otherwise B<mprobe>()  returns B<MCHECK_DISABLED>)."
4192 msgstr ""
4193
4194 #. type: Plain text
4195 #: build/C/man3/mcheck.3:111
4196 msgid ""
4197 "The following list describes the values returned by B<mprobe>()  or passed "
4198 "as the I<mstatus> argument when I<abortfunc> is invoked:"
4199 msgstr ""
4200
4201 #. type: TP
4202 #: build/C/man3/mcheck.3:111
4203 #, no-wrap
4204 msgid "B<MCHECK_DISABLED> (B<mprobe>() only)"
4205 msgstr ""
4206
4207 #. type: Plain text
4208 #: build/C/man3/mcheck.3:116
4209 msgid ""
4210 "B<mcheck>()  was not called before the first memory allocation function was "
4211 "called.  Consistency checking is not possible."
4212 msgstr ""
4213
4214 #. type: TP
4215 #: build/C/man3/mcheck.3:116
4216 #, no-wrap
4217 msgid "B<MCHECK_OK> (B<mprobe>() only)"
4218 msgstr ""
4219
4220 #. type: Plain text
4221 #: build/C/man3/mcheck.3:119
4222 msgid "No inconsistency detected."
4223 msgstr ""
4224
4225 #. type: TP
4226 #: build/C/man3/mcheck.3:119
4227 #, no-wrap
4228 msgid "B<MCHECK_HEAD>"
4229 msgstr "B<MCHECK_HEAD>"
4230
4231 #. type: Plain text
4232 #: build/C/man3/mcheck.3:122
4233 msgid "Memory preceding an allocated block was clobbered."
4234 msgstr ""
4235
4236 #. type: TP
4237 #: build/C/man3/mcheck.3:122
4238 #, no-wrap
4239 msgid "B<MCHECK_TAIL>"
4240 msgstr "B<MCHECK_TAIL>"
4241
4242 #. type: Plain text
4243 #: build/C/man3/mcheck.3:125
4244 msgid "Memory following an allocated block was clobbered."
4245 msgstr ""
4246
4247 #. type: TP
4248 #: build/C/man3/mcheck.3:125
4249 #, no-wrap
4250 msgid "B<MCHECK_FREE>"
4251 msgstr "B<MCHECK_FREE>"
4252
4253 #. type: Plain text
4254 #: build/C/man3/mcheck.3:129
4255 msgid "A block of memory was freed twice."
4256 msgstr ""
4257
4258 #. type: Plain text
4259 #: build/C/man3/mcheck.3:134
4260 msgid ""
4261 "B<mcheck>()  and B<mcheck_pedantic>()  return 0 on success, or -1 on error."
4262 msgstr ""
4263
4264 #. type: Plain text
4265 #: build/C/man3/mcheck.3:145
4266 msgid ""
4267 "The B<mcheck_pedantic>()  and B<mcheck_check_all>()  functions are available "
4268 "since glibc 2.2.  The B<mcheck>()  and B<mprobe>()  functions are present "
4269 "since at least glibc 2.0"
4270 msgstr ""
4271
4272 #.  But is MALLOC_CHECK_ slower?
4273 #. type: Plain text
4274 #: build/C/man3/mcheck.3:159
4275 msgid ""
4276 "Linking a program with I<-lmcheck> and using the B<MALLOC_CHECK_> "
4277 "environment variable (described in B<mallopt>(3))  cause the same kinds of "
4278 "errors to be detected.  But, using B<MALLOC_CHECK_> does not require the "
4279 "application to be relinked."
4280 msgstr ""
4281
4282 #. type: Plain text
4283 #: build/C/man3/mcheck.3:165
4284 msgid ""
4285 "The program below calls B<mcheck>()  with a NULL argument and then frees the "
4286 "same block of memory twice.  The following shell session demonstrates what "
4287 "happens when running the program:"
4288 msgstr ""
4289
4290 #. type: Plain text
4291 #: build/C/man3/mcheck.3:170
4292 #, no-wrap
4293 msgid ""
4294 "$B< ./a.out>\n"
4295 "About to free\n"
4296 msgstr ""
4297
4298 #. type: Plain text
4299 #: build/C/man3/mcheck.3:174
4300 #, no-wrap
4301 msgid ""
4302 "About to free a second time\n"
4303 "block freed twice\n"
4304 "Aborted (core dumped)\n"
4305 msgstr ""
4306
4307 #. type: Plain text
4308 #: build/C/man3/mcheck.3:182
4309 #, no-wrap
4310 msgid ""
4311 "#include E<lt>stdlib.hE<gt>\n"
4312 "#include E<lt>stdio.hE<gt>\n"
4313 "#include E<lt>mcheck.hE<gt>\n"
4314 msgstr ""
4315 "#include E<lt>stdlib.hE<gt>\n"
4316 "#include E<lt>stdio.hE<gt>\n"
4317 "#include E<lt>mcheck.hE<gt>\n"
4318
4319 #. type: Plain text
4320 #: build/C/man3/mcheck.3:190
4321 #, no-wrap
4322 msgid ""
4323 "    if (mcheck(NULL) != 0) {\n"
4324 "        fprintf(stderr, \"mcheck() failed\\en\");\n"
4325 msgstr ""
4326
4327 #. type: Plain text
4328 #: build/C/man3/mcheck.3:193
4329 #, no-wrap
4330 msgid ""
4331 "        exit(EXIT_FAILURE);\n"
4332 "    }\n"
4333 msgstr ""
4334 "        exit(EXIT_FAILURE);\n"
4335 "    }\n"
4336
4337 #. type: Plain text
4338 #: build/C/man3/mcheck.3:195
4339 #, no-wrap
4340 msgid "    p = malloc(1000);\n"
4341 msgstr "    p = malloc(1000);\n"
4342
4343 #. type: Plain text
4344 #: build/C/man3/mcheck.3:200
4345 #, no-wrap
4346 msgid ""
4347 "    fprintf(stderr, \"About to free\\en\");\n"
4348 "    free(p);\n"
4349 "    fprintf(stderr, \"\\enAbout to free a second time\\en\");\n"
4350 "    free(p);\n"
4351 msgstr ""
4352
4353 #. type: Plain text
4354 #: build/C/man3/mcheck.3:208
4355 msgid "B<malloc>(3), B<mallopt>(3), B<mtrace>(3)"
4356 msgstr "B<malloc>(3), B<mallopt>(3), B<mtrace>(3)"
4357
4358 #. type: TH
4359 #: build/C/man2/mlock.2:26
4360 #, no-wrap
4361 msgid "MLOCK"
4362 msgstr "MLOCK"
4363
4364 #. type: TH
4365 #: build/C/man2/mlock.2:26
4366 #, no-wrap
4367 msgid "2011-09-14"
4368 msgstr "2011-09-14"
4369
4370 #. type: Plain text
4371 #: build/C/man2/mlock.2:29
4372 msgid "mlock, munlock, mlockall, munlockall - lock and unlock memory"
4373 msgstr "mlock - メモリのロックとロック解除を行う"
4374
4375 #. type: Plain text
4376 #: build/C/man2/mlock.2:32 build/C/man2/mmap.2:46 build/C/man2/mmap2.2:35
4377 #: build/C/man2/mprotect.2:44 build/C/man2/mremap.2:38
4378 #, no-wrap
4379 msgid "B<#include E<lt>sys/mman.hE<gt>>\n"
4380 msgstr "B<#include E<lt>sys/mman.hE<gt>>\n"
4381
4382 #. type: Plain text
4383 #: build/C/man2/mlock.2:35
4384 #, no-wrap
4385 msgid ""
4386 "B<int mlock(const void *>I<addr>B<, size_t >I<len>B<);>\n"
4387 "B<int munlock(const void *>I<addr>B<, size_t >I<len>B<);>\n"
4388 msgstr ""
4389 "B<int mlock(const void *>I<addr>B<, size_t >I<len>B<);>\n"
4390 "B<int munlock(const void *>I<addr>B<, size_t >I<len>B<);>\n"
4391
4392 #. type: Plain text
4393 #: build/C/man2/mlock.2:38
4394 #, no-wrap
4395 msgid ""
4396 "B<int mlockall(int >I<flags>B<);>\n"
4397 "B<int munlockall(void);>\n"
4398 msgstr ""
4399 "B<int mlockall(int >I<flags>B<);>\n"
4400 "B<int munlockall(void);>\n"
4401
4402 #. type: Plain text
4403 #: build/C/man2/mlock.2:54
4404 msgid ""
4405 "B<mlock>()  and B<mlockall>()  respectively lock part or all of the calling "
4406 "process's virtual address space into RAM, preventing that memory from being "
4407 "paged to the swap area.  B<munlock>()  and B<munlockall>()  perform the "
4408 "converse operation, respectively unlocking part or all of the calling "
4409 "process's virtual address space, so that pages in the specified virtual "
4410 "address range may once more to be swapped out if required by the kernel "
4411 "memory manager.  Memory locking and unlocking are performed in units of "
4412 "whole pages."
4413 msgstr ""
4414 "B<mlock>()  と B<mlockall>()  はそれぞれ、呼び出し元プロセスの仮想アドレス空"
4415 "間の一部または全部を RAM 上にロックし、メモリがスワップエリアにページングされ"
4416 "るのを防ぐ。 B<munlock>()  と B<munlockall>()  は逆の操作で、それぞれ呼び出し"
4417 "元プロセスの仮想アドレス空間の一部または全部を ロック解除する。つまり、指定さ"
4418 "れた仮想アドレス範囲のページは カーネルメモリマネージャーから要求されればス"
4419 "ワップアウトするようになる。 メモリのロックとロック解除はページ単位で行われ"
4420 "る。"
4421
4422 #. type: SS
4423 #: build/C/man2/mlock.2:54
4424 #, no-wrap
4425 msgid "mlock() and munlock()"
4426 msgstr "mlock() と munlock()"
4427
4428 #. type: Plain text
4429 #: build/C/man2/mlock.2:64
4430 msgid ""
4431 "B<mlock>()  locks pages in the address range starting at I<addr> and "
4432 "continuing for I<len> bytes.  All pages that contain a part of the specified "
4433 "address range are guaranteed to be resident in RAM when the call returns "
4434 "successfully; the pages are guaranteed to stay in RAM until later unlocked."
4435 msgstr ""
4436 "B<mlock>()  は I<addr> から始まる長さ I<len> バイトのアドレス範囲のページを"
4437 "ロックする。 呼び出しが成功した場合には、 指定されたアドレス範囲を含む全ての"
4438 "ページは RAM に残り続けることが保証される。 これらのページは後でロック解除さ"
4439 "れるまで RAM に残り続けることが保証される。"
4440
4441 #. type: Plain text
4442 #: build/C/man2/mlock.2:73
4443 msgid ""
4444 "B<munlock>()  unlocks pages in the address range starting at I<addr> and "
4445 "continuing for I<len> bytes.  After this call, all pages that contain a part "
4446 "of the specified memory range can be moved to external swap space again by "
4447 "the kernel."
4448 msgstr ""
4449 "B<munlock>()  は、 I<addr> から始まる長さ I<len> バイトのアドレス範囲のページ"
4450 "のロックを解除する。 この呼び出しを行った後は、カーネルが、指定されたメモリ範"
4451 "囲を含む 全てのページを外部のスワップ空間に移動できるようになる。"
4452
4453 #. type: SS
4454 #: build/C/man2/mlock.2:73
4455 #, no-wrap
4456 msgid "mlockall() and munlockall()"
4457 msgstr "mlockall() と munlockall()"
4458
4459 #. type: Plain text
4460 #: build/C/man2/mlock.2:83
4461 msgid ""
4462 "B<mlockall>()  locks all pages mapped into the address space of the calling "
4463 "process.  This includes the pages of the code, data and stack segment, as "
4464 "well as shared libraries, user space kernel data, shared memory, and memory-"
4465 "mapped files.  All mapped pages are guaranteed to be resident in RAM when "
4466 "the call returns successfully; the pages are guaranteed to stay in RAM until "
4467 "later unlocked."
4468 msgstr ""
4469 "B<mlockall>()  は呼び出し元プロセスのアドレス空間にマップされている全てのペー"
4470 "ジを ロックする。これにはコード、データ、スタックの 各セグメント、共有ライブ"
4471 "ラリ、カーネルのユーザー空間データ、 共有メモリ、メモリ・マップされたファイル"
4472 "が含まれる。 システム・コールが成功した場合には全てのマップされたページは "
4473 "RAM に 残ることを保証される。 これらのページは後でロック解除されるまで RAM に"
4474 "残り続けることが保証される。"
4475
4476 #. type: Plain text
4477 #: build/C/man2/mlock.2:88
4478 msgid ""
4479 "The I<flags> argument is constructed as the bitwise OR of one or more of the "
4480 "following constants:"
4481 msgstr "I<flags> 引数は以下の内容の一つまたは複数のビット OR から構成される:"
4482
4483 #. type: TP
4484 #: build/C/man2/mlock.2:88
4485 #, no-wrap
4486 msgid "B<MCL_CURRENT>"
4487 msgstr "B<MCL_CURRENT>"
4488
4489 #. type: Plain text
4490 #: build/C/man2/mlock.2:92
4491 msgid ""
4492 "Lock all pages which are currently mapped into the address space of the "
4493 "process."
4494 msgstr ""
4495 "現在、プロセスのアドレス空間にマップされている全てのページをロックする。"
4496
4497 #. type: TP
4498 #: build/C/man2/mlock.2:92
4499 #, no-wrap
4500 msgid "B<MCL_FUTURE>"
4501 msgstr "B<MCL_FUTURE>"
4502
4503 #. type: Plain text
4504 #: build/C/man2/mlock.2:99
4505 msgid ""
4506 "Lock all pages which will become mapped into the address space of the "
4507 "process in the future.  These could be for instance new pages required by a "
4508 "growing heap and stack as well as new memory mapped files or shared memory "
4509 "regions."
4510 msgstr ""
4511 "将来、プロセスのアドレス空間にマップされる全てのページをロックする。 例えば、"
4512 "ヒープ (heap) やスタックの成長により新しく必要になったページだけで なく、新し"
4513 "くメモリマップされたファイルや共有メモリ領域もロックされる。"
4514
4515 #. type: Plain text
4516 #: build/C/man2/mlock.2:112
4517 msgid ""
4518 "If B<MCL_FUTURE> has been specified, then a later system call (e.g., B<mmap>"
4519 "(2), B<sbrk>(2), B<malloc>(3)), may fail if it would cause the number of "
4520 "locked bytes to exceed the permitted maximum (see below).  In the same "
4521 "circumstances, stack growth may likewise fail: the kernel will deny stack "
4522 "expansion and deliver a B<SIGSEGV> signal to the process."
4523 msgstr ""
4524 "B<MCL_FUTURE> が指定されていると、以後のシステムコール (例えば、 B<mmap>(2), "
4525 "B<sbrk>(2), B<malloc>(3))  は、ロックするバイト数が許可された最大値 (下記参"
4526 "照) を超えた場合に 失敗する可能性がある。 同様に、スタックの成長も失敗する可"
4527 "能性がある。 その場合、カーネルはスタックの拡張を拒否し、 B<SIGSEGV> をプロセ"
4528 "スに送る。"
4529
4530 #. type: Plain text
4531 #: build/C/man2/mlock.2:116
4532 msgid ""
4533 "B<munlockall>()  unlocks all pages mapped into the address space of the "
4534 "calling process."
4535 msgstr ""
4536 "B<munlockall>()  は、呼び出し元プロセスのアドレス空間にマッピングされている "
4537 "全てのページをロック解除する。"
4538
4539 #. type: Plain text
4540 #: build/C/man2/mlock.2:122
4541 msgid ""
4542 "On success these system calls return 0.  On error, -1 is returned, I<errno> "
4543 "is set appropriately, and no changes are made to any locks in the address "
4544 "space of the process."
4545 msgstr ""
4546 "成功した場合は、これらのシステムコールはゼロを返す。 エラーの場合は -1 が返さ"
4547 "れ、 I<errno> が適切に設定され、プロセスのアドレス空間におけるロックは変更さ"
4548 "れない。"
4549
4550 #. type: Plain text
4551 #: build/C/man2/mlock.2:131
4552 msgid ""
4553 "(Linux 2.6.9 and later) the caller had a nonzero B<RLIMIT_MEMLOCK> soft "
4554 "resource limit, but tried to lock more memory than the limit permitted.  "
4555 "This limit is not enforced if the process is privileged (B<CAP_IPC_LOCK>)."
4556 msgstr ""
4557 "(Linux 2.6.9 以降) 呼び出し元は非ゼロの ソフト資源制限 B<RLIMIT_MEMLOCK> を持"
4558 "つが、制限が許可している以上のメモリをロックしようとした。 この制限は、プロセ"
4559 "スが特権 (B<CAP_IPC_LOCK>)  を持っている場合は適用されない。"
4560
4561 #.  In the case of mlock(), this check is somewhat buggy: it doesn't
4562 #.  take into account whether the to-be-locked range overlaps with
4563 #.  already locked pages.  Thus, suppose we allocate
4564 #.  (num_physpages / 4 + 1) of memory, and lock those pages once using
4565 #.  mlock(), and then lock the *same* page range a second time.
4566 #.  In the case, the second mlock() call will fail, since the check
4567 #.  calculates that the process is trying to lock (num_physpages / 2 + 2)
4568 #.  pages, which of course is not true.  (MTK, Nov 04, kernel 2.4.28)
4569 #. type: Plain text
4570 #: build/C/man2/mlock.2:143
4571 msgid ""
4572 "(Linux 2.4 and earlier) the calling process tried to lock more than half of "
4573 "RAM."
4574 msgstr ""
4575 "(Linux 2.4 以前) 呼び出し元プロセスが RAM の半分以上をロックしようとした。"
4576
4577 #. SVr4 documents an additional EAGAIN error code.
4578 #. type: Plain text
4579 #: build/C/man2/mlock.2:149
4580 msgid ""
4581 "The caller is not privileged, but needs privilege (B<CAP_IPC_LOCK>)  to "
4582 "perform the requested operation."
4583 msgstr ""
4584 "呼び出し側が特権を持っていないが、\n"
4585 "要求された操作を実行するには特権 (B<CAP_IPC_LOCK>) が必要である。"
4586
4587 #. type: Plain text
4588 #: build/C/man2/mlock.2:154
4589 msgid "For B<mlock>()  and B<munlock>():"
4590 msgstr "B<mlock>()  と B<munlock>()  用として:"
4591
4592 #. type: Plain text
4593 #: build/C/man2/mlock.2:157
4594 msgid "Some or all of the specified address range could not be locked."
4595 msgstr "指定されたアドレス範囲の一部または全てをロックすることができなかった。"
4596
4597 #. type: Plain text
4598 #: build/C/man2/mlock.2:164
4599 msgid ""
4600 "The result of the addition I<start>+I<len> was less than I<start> (e.g., the "
4601 "addition may have resulted in an overflow)."
4602 msgstr ""
4603 "I<start>+I<len> の加算の結果が I<start> よりも小さかった\n"
4604 "(例えば、加算でオーバーフローが発生したなど)。"
4605
4606 #. type: Plain text
4607 #: build/C/man2/mlock.2:169
4608 msgid "(Not on Linux)  I<addr> was not a multiple of the page size."
4609 msgstr ""
4610 "(Linux ではこの意味で使われない)  I<addr> がページサイズの倍数ではない。"
4611
4612 #. type: Plain text
4613 #: build/C/man2/mlock.2:173
4614 msgid ""
4615 "Some of the specified address range does not correspond to mapped pages in "
4616 "the address space of the process."
4617 msgstr ""
4618 "指定されたアドレス範囲がプロセスのアドレス空間にマップされたページと 一致しな"
4619 "い。"
4620
4621 #. type: Plain text
4622 #: build/C/man2/mlock.2:176
4623 msgid "For B<mlockall>():"
4624 msgstr "B<mlockall>()  用として:"
4625
4626 #. type: Plain text
4627 #: build/C/man2/mlock.2:179
4628 msgid "Unknown I<flags> were specified."
4629 msgstr "未知の I<flags> が指定された。"
4630
4631 #. type: Plain text
4632 #: build/C/man2/mlock.2:182
4633 msgid "For B<munlockall>():"
4634 msgstr "B<munlockall>()  用として:"
4635
4636 #. type: Plain text
4637 #: build/C/man2/mlock.2:186
4638 msgid ""
4639 "(Linux 2.6.8 and earlier) The caller was not privileged (B<CAP_IPC_LOCK>)."
4640 msgstr ""
4641 "(Linux 2.6.8 以前) 呼び出し元が権限 (B<CAP_IPC_LOCK>)  を持っていない。"
4642
4643 #. type: Plain text
4644 #: build/C/man2/mlock.2:188
4645 msgid "POSIX.1-2001, SVr4."
4646 msgstr "POSIX.1-2001, SVr4."
4647
4648 #. type: SH
4649 #: build/C/man2/mlock.2:188 build/C/man2/mmap.2:501 build/C/man2/msync.2:105
4650 #, no-wrap
4651 msgid "AVAILABILITY"
4652 msgstr "可用性"
4653
4654 #. type: Plain text
4655 #: build/C/man2/mlock.2:200
4656 msgid ""
4657 "On POSIX systems on which B<mlock>()  and B<munlock>()  are available, "
4658 "B<_POSIX_MEMLOCK_RANGE> is defined in I<E<lt>unistd.hE<gt>> and the number "
4659 "of bytes in a page can be determined from the constant B<PAGESIZE> (if "
4660 "defined) in I<E<lt>limits.hE<gt>> or by calling I<sysconf(_SC_PAGESIZE)>."
4661 msgstr ""
4662 "B<mlock>()  と B<munlock>()  が使用可能な POSIX システムでは "
4663 "B<_POSIX_MEMLOCK_RANGE> が I<E<lt>unistd.hE<gt>> で定義されている。 また、"
4664 "ページあたりのバイト数は、 I<E<lt>limits.hE<gt>> で定義される定数 "
4665 "B<PAGESIZE> から (定義されている場合)、もしくは I<sysconf(_SC_PAGESIZE)> を呼"
4666 "び出すことで決定できる。"
4667
4668 #.  POSIX.1-2001: It shall be defined to -1 or 0 or 200112L.
4669 #.  -1: unavailable, 0: ask using sysconf().
4670 #.  glibc defines it to 1.
4671 #. type: Plain text
4672 #: build/C/man2/mlock.2:213
4673 msgid ""
4674 "On POSIX systems on which B<mlockall>()  and B<munlockall>()  are available, "
4675 "B<_POSIX_MEMLOCK> is defined in I<E<lt>unistd.hE<gt>> to a value greater "
4676 "than 0.  (See also B<sysconf>(3).)"
4677 msgstr ""
4678 "B<mlockall>()  と B<munlockall>()  が利用可能な POSIX システムでは、 "
4679 "B<_POSIX_MEMLOCK> は I<E<lt>unistd.hE<gt>> で 0 より大きい値に定義されている "
4680 "(B<sysconf>(3)  も参照のこと)。"
4681
4682 #. type: Plain text
4683 #: build/C/man2/mlock.2:231
4684 msgid ""
4685 "Memory locking has two main applications: real-time algorithms and high-"
4686 "security data processing.  Real-time applications require deterministic "
4687 "timing, and, like scheduling, paging is one major cause of unexpected "
4688 "program execution delays.  Real-time applications will usually also switch "
4689 "to a real-time scheduler with B<sched_setscheduler>(2).  Cryptographic "
4690 "security software often handles critical bytes like passwords or secret keys "
4691 "as data structures.  As a result of paging, these secrets could be "
4692 "transferred onto a persistent swap store medium, where they might be "
4693 "accessible to the enemy long after the security software has erased the "
4694 "secrets in RAM and terminated.  (But be aware that the suspend mode on "
4695 "laptops and some desktop computers will save a copy of the system's RAM to "
4696 "disk, regardless of memory locks.)"
4697 msgstr ""
4698 "メモリのロックの用途としては主に二つある: リアルタイム アルゴリズムと高いセ"
4699 "キュリティの必要なデータ処理である。リアルタイムの アプリケーションは決定的な"
4700 "タイミングやスケジューリングを必要とするが、 ページングは予期しないプログラム"
4701 "の実行遅延をもたらす主要な要因となる。 リアルタイムのアプリケーションはたいて"
4702 "いは B<sched_setscheduler>(2)  でリアルタイムスケジューラに変更される。 暗号"
4703 "やセキュリティのソフトウェアはしばしばパスワードや秘密鍵のデータの ような重要"
4704 "なバイト列を扱う。ページングの結果、これらの秘密が スワップ用の固定媒体に転送"
4705 "されるかもしれない。そして、セキュリティ・ ソフトウェアが RAM 上の秘密を削除"
4706 "して終了したずっと後になっても、 このスワップされたデータには敵がアクセスでき"
4707 "る可能性がある (しかし、ラップトップといくつかのデスクトップコンピュータの サ"
4708 "スペンドモードはシステムの RAM の内容をメモリのロックに関わらず ディスクに保"
4709 "存することに注意)。"
4710
4711 #. type: Plain text
4712 #: build/C/man2/mlock.2:244
4713 msgid ""
4714 "Real-time processes that are using B<mlockall>()  to prevent delays on page "
4715 "faults should reserve enough locked stack pages before entering the time-"
4716 "critical section, so that no page fault can be caused by function calls.  "
4717 "This can be achieved by calling a function that allocates a sufficiently "
4718 "large automatic variable (an array) and writes to the memory occupied by "
4719 "this array in order to touch these stack pages.  This way, enough pages will "
4720 "be mapped for the stack and can be locked into RAM.  The dummy writes ensure "
4721 "that not even copy-on-write page faults can occur in the critical section."
4722 msgstr ""
4723 "リアルタイムプロセスが B<mlockall>()  を使ってページフォールトによる遅延を防"
4724 "ごうとする場合、 関数呼び出しによってページフォールトが発生しないように、 時"
4725 "間制限の厳しい部分 (time-critical section) に入る前に 十分な量のロックされた"
4726 "スタックを確保しておく必要がある。 これを実現するには、十分な大きさの自動変"
4727 "数 (の配列) を確保し、 これらのスタック用のページがメモリ上に確保されるように"
4728 "この配列に 書き込みを行う関数を用意し、これを呼び出せばよい。こうすること"
4729 "で、 十分な量のページがスタックにマッピングされ、RAM にロックされる。 ダミー"
4730 "の書き込みを行うことによって、 時間制限の厳しい部分 (critical section) 内では"
4731 "書き込み時コピーによる ページフォールトさえも発生しないことが保証される。"
4732
4733 #. type: Plain text
4734 #: build/C/man2/mlock.2:250
4735 msgid ""
4736 "Memory locks are not inherited by a child created via B<fork>(2)  and are "
4737 "automatically removed (unlocked) during an B<execve>(2)  or when the process "
4738 "terminates."
4739 msgstr ""
4740 "メモリロックは B<fork>(2)  で作成された子プロセスには継承されず、 B<execve>"
4741 "(2)  が呼ばれたり、プロセスが終了した場合は 自動的に削除される (ロック解除さ"
4742 "れる)。"
4743
4744 #. type: Plain text
4745 #: build/C/man2/mlock.2:254
4746 msgid ""
4747 "The memory lock on an address range is automatically removed if the address "
4748 "range is unmapped via B<munmap>(2)."
4749 msgstr ""
4750 "あるアドレス範囲に対するメモリロックは、そのアドレス範囲が B<munmap>(2)  に"
4751 "よってアンマップされた場合は削除される。"
4752
4753 #. type: Plain text
4754 #: build/C/man2/mlock.2:267
4755 msgid ""
4756 "Memory locks do not stack, that is, pages which have been locked several "
4757 "times by calls to B<mlock>()  or B<mlockall>()  will be unlocked by a single "
4758 "call to B<munlock>()  for the corresponding range or by B<munlockall>().  "
4759 "Pages which are mapped to several locations or by several processes stay "
4760 "locked into RAM as long as they are locked at least at one location or by at "
4761 "least one process."
4762 msgstr ""
4763 "メモリのロックは累積しない。 すなわち複数回 B<mlock>()  や B<mlockall>()  を"
4764 "呼び出してロックされたページでも、 対応する範囲に対して B<munlock>()  を 1 回"
4765 "呼び出したり B<munlockall>()  を呼び出したりするだけでロック解除される。 複数"
4766 "の場所や複数のプロセスにマップされているページは、少なくとも一つの場所、 一つ"
4767 "のプロセスでロックされている限りは RAM に残り続ける。"
4768
4769 #. type: Plain text
4770 #: build/C/man2/mlock.2:278
4771 msgid ""
4772 "Under Linux, B<mlock>()  and B<munlock>()  automatically round I<addr> down "
4773 "to the nearest page boundary.  However, POSIX.1-2001 allows an "
4774 "implementation to require that I<addr> is page aligned, so portable "
4775 "applications should ensure this."
4776 msgstr ""
4777 "Linux では、 B<mlock>()  と B<munlock>()  は自動的に I<addr> を端数切り捨てに"
4778 "より一番近いページ境界へと丸める。 しかし POSIX.1-2001 は I<addr> がページ境"
4779 "界に合っていることを要求する実装も許している。 そのため移植性を意図したアプリ"
4780 "ケーションではきちんと境界に合わせた方が良い。"
4781
4782 #. type: Plain text
4783 #: build/C/man2/mlock.2:291
4784 msgid ""
4785 "The I<VmLck> field of the Linux-specific I</proc/PID/status> file shows how "
4786 "many kilobytes of memory the process with ID I<PID> has locked using B<mlock>"
4787 "(), B<mlockall>(), and B<mmap>(2)  B<MAP_LOCKED>."
4788 msgstr ""
4789 "Linux 固有の I</proc/PID/status> ファイルの I<VmLck> フィールドには、\n"
4790 "B<mlock>(), B<mlockall>() および B<mmap>(2) B<MAP_LOCKED> を使って、\n"
4791 "ID が I<PID> のプロセスがロックしているメモリ量 (キロバイト単位) が\n"
4792 "表示される。"
4793
4794 #. type: SS
4795 #: build/C/man2/mlock.2:291
4796 #, no-wrap
4797 msgid "Limits and permissions"
4798 msgstr "制限と権限"
4799
4800 #. type: Plain text
4801 #: build/C/man2/mlock.2:298
4802 msgid ""
4803 "In Linux 2.6.8 and earlier, a process must be privileged (B<CAP_IPC_LOCK>)  "
4804 "in order to lock memory and the B<RLIMIT_MEMLOCK> soft resource limit "
4805 "defines a limit on how much memory the process may lock."
4806 msgstr ""
4807 "Linux 2.6.8 以前では、メモリをロックするためには特権 (B<CAP_IPC_LOCK>)  が必"
4808 "要で、 ソフト資源制限 B<RLIMIT_MEMLOCK> はプロセスがどれだけのメモリをロック"
4809 "できるかの制限を定義する。"
4810
4811 #. type: Plain text
4812 #: build/C/man2/mlock.2:304
4813 msgid ""
4814 "Since Linux 2.6.9, no limits are placed on the amount of memory that a "
4815 "privileged process can lock and the B<RLIMIT_MEMLOCK> soft resource limit "
4816 "instead defines a limit on how much memory an unprivileged process may lock."
4817 msgstr ""
4818 "Linux 2.6.9 以降では、特権を持つプロセスがロックできるメモリ量は無制限とな"
4819 "り、 代わりにソフト資源制限 B<RLIMIT_MEMLOCK> は特権を持たないプロセスがロッ"
4820 "クできるメモリ量の制限を定義する。"
4821
4822 #. type: Plain text
4823 #: build/C/man2/mlock.2:312
4824 msgid ""
4825 "In the 2.4 series Linux kernels up to and including 2.4.17, a bug caused the "
4826 "B<mlockall>()  B<MCL_FUTURE> flag to be inherited across a B<fork>(2).  This "
4827 "was rectified in kernel 2.4.18."
4828 msgstr ""
4829 "2.4.17 までの 2.4 シリーズの Linux カーネルには、 B<mlockall>()  "
4830 "B<MCL_FUTURE> フラグが B<fork>(2)  で継承されると言うバグがある。 これはカー"
4831 "ネル 2.4.18 で修正された。"
4832
4833 #.  See the following LKML thread:
4834 #.  http://marc.theaimsgroup.com/?l=linux-kernel&m=113801392825023&w=2
4835 #.  "Rationale for RLIMIT_MEMLOCK"
4836 #.  23 Jan 2006
4837 #. type: Plain text
4838 #: build/C/man2/mlock.2:329
4839 msgid ""
4840 "Since kernel 2.6.9, if a privileged process calls I<mlockall(MCL_FUTURE)> "
4841 "and later drops privileges (loses the B<CAP_IPC_LOCK> capability by, for "
4842 "example, setting its effective UID to a nonzero value), then subsequent "
4843 "memory allocations (e.g., B<mmap>(2), B<brk>(2))  will fail if the "
4844 "B<RLIMIT_MEMLOCK> resource limit is encountered."
4845 msgstr ""
4846 "カーネル 2.6.9 以降では、特権を持ったプロセスが I<mlockall(MCL_FUTURE)> を呼"
4847 "び出した後で、特権をなくした場合 (例えば、 実効 UID を 0 以外の値に変更するな"
4848 "どにより、 B<CAP_IPC_LOCK> ケーパビリティを失った場合)、リソース上限 "
4849 "B<RLIMIT_MEMLOCK> に達すると、それ以降のメモリ割り当て (例えば B<mmap>(2), "
4850 "B<brk>(2))  は失敗する。"
4851
4852 #. type: Plain text
4853 #: build/C/man2/mlock.2:336
4854 msgid ""
4855 "B<mmap>(2), B<setrlimit>(2), B<shmctl>(2), B<sysconf>(3), B<proc>(5), "
4856 "B<capabilities>(7)"
4857 msgstr ""
4858 "B<mmap>(2), B<setrlimit>(2), B<shmctl>(2), B<sysconf>(3), B<proc>(5),\n"
4859 "B<capabilities>(7)"
4860
4861 #. type: TH
4862 #: build/C/man2/mmap.2:40
4863 #, no-wrap
4864 msgid "MMAP"
4865 msgstr "MMAP"
4866
4867 #. type: TH
4868 #: build/C/man2/mmap.2:40
4869 #, no-wrap
4870 msgid "2013-02-25"
4871 msgstr "2013-02-25"
4872
4873 #. type: Plain text
4874 #: build/C/man2/mmap.2:43
4875 msgid "mmap, munmap - map or unmap files or devices into memory"
4876 msgstr "mmap, munmap - ファイルやデバイスをメモリにマップ/アンマップする"
4877
4878 #. type: Plain text
4879 #: build/C/man2/mmap.2:51
4880 #, no-wrap
4881 msgid ""
4882 "B<void *mmap(void *>I<addr>B<, size_t >I<length>B<, int >I<prot>B<, int >I<flags>B<,>\n"
4883 "B<           int >I<fd>B<, off_t >I<offset>B<);>\n"
4884 "B<int munmap(void *>I<addr>B<, size_t >I<length>B<);>\n"
4885 msgstr ""
4886 "B<void *mmap(void *>I<addr>B<, size_t >I<length>B<, int >I<prot>B<, int >I<flags>B<,>\n"
4887 "B<           int >I<fd>B<, off_t >I<offset>B<);>\n"
4888 "B<int munmap(void *>I<addr>B<, size_t >I<length>B<);>\n"
4889
4890 #. type: Plain text
4891 #: build/C/man2/mmap.2:54
4892 msgid "See NOTES for information on feature test macro requirements."
4893 msgstr ""
4894
4895 #. type: Plain text
4896 #: build/C/man2/mmap.2:63
4897 msgid ""
4898 "B<mmap>()  creates a new mapping in the virtual address space of the calling "
4899 "process.  The starting address for the new mapping is specified in I<addr>.  "
4900 "The I<length> argument specifies the length of the mapping."
4901 msgstr ""
4902 "B<mmap>()  は、新しいマッピングを呼び出し元プロセスの仮想アドレス空間に作成す"
4903 "る。 新しいマッピングの開始アドレスは I<addr> で指定される。マッピングの長さ"
4904 "は I<length> 引き数で指定される。"
4905
4906 #.  Before Linux 2.6.24, the address was rounded up to the next page
4907 #.  boundary; since 2.6.24, it is rounded down!
4908 #. type: Plain text
4909 #: build/C/man2/mmap.2:77
4910 msgid ""
4911 "If I<addr> is NULL, then the kernel chooses the address at which to create "
4912 "the mapping; this is the most portable method of creating a new mapping.  If "
4913 "I<addr> is not NULL, then the kernel takes it as a hint about where to place "
4914 "the mapping; on Linux, the mapping will be created at a nearby page "
4915 "boundary.  The address of the new mapping is returned as the result of the "
4916 "call."
4917 msgstr ""
4918 "I<addr> が NULL の場合、カーネルがマッピングを作成するアドレスを選択する。 こ"
4919 "の方法は最も移植性のある新しいマッピングの作成方法である。 I<addr> が NULL で"
4920 "ない場合、カーネルはマッピングをどこに配置するかのヒントとして I<addr> を使用"
4921 "する。Linux では、マッピングはすぐ近くのページ境界に作成される。 新しいマッピ"
4922 "ングのアドレスは、呼び出しの返り値として返される。"
4923
4924 #. type: Plain text
4925 #: build/C/man2/mmap.2:89
4926 msgid ""
4927 "The contents of a file mapping (as opposed to an anonymous mapping; see "
4928 "B<MAP_ANONYMOUS> below), are initialized using I<length> bytes starting at "
4929 "offset I<offset> in the file (or other object) referred to by the file "
4930 "descriptor I<fd>.  I<offset> must be a multiple of the page size as returned "
4931 "by I<sysconf(_SC_PAGE_SIZE)>."
4932 msgstr ""
4933 "ファイルマッピングの内容は、 ファイルディスクリプタ I<fd> で参照されるファイ"
4934 "ル (もしくは他のオブジェクト) のオフセット I<offset> から開始される "
4935 "I<length> バイトのデータで初期化される (ファイルマッピングは無名マッピングの"
4936 "反対語である。 B<MAP_ANONYMOUS> を参照)。 I<offset> は I<sysconf"
4937 "(_SC_PAGE_SIZE)> が返すページサイズの倍数でなければならない。"
4938
4939 #. type: Plain text
4940 #: build/C/man2/mmap.2:97
4941 msgid ""
4942 "The I<prot> argument describes the desired memory protection of the mapping "
4943 "(and must not conflict with the open mode of the file).  It is either "
4944 "B<PROT_NONE> or the bitwise OR of one or more of the following flags:"
4945 msgstr ""
4946 "引き数 I<prot> には、マッピングのメモリ保護をどのように行なうかを指定する "
4947 "(ファイルのオープンモードと矛盾してはいけない)。 I<prot> には、 B<PROT_NONE> "
4948 "か、以下のフラグをひとつ以上ビット毎の論理和 (OR) をとったものを 指定できる。"
4949
4950 #. type: TP
4951 #: build/C/man2/mmap.2:97 build/C/man2/mprotect.2:73
4952 #, no-wrap
4953 msgid "B<PROT_EXEC>"
4954 msgstr "B<PROT_EXEC>"
4955
4956 #. type: Plain text
4957 #: build/C/man2/mmap.2:100
4958 msgid "Pages may be executed."
4959 msgstr "ページは実行可能である。"
4960
4961 #. type: TP
4962 #: build/C/man2/mmap.2:100 build/C/man2/mprotect.2:67
4963 #, no-wrap
4964 msgid "B<PROT_READ>"
4965 msgstr "B<PROT_READ>"
4966
4967 #. type: Plain text
4968 #: build/C/man2/mmap.2:103
4969 msgid "Pages may be read."
4970 msgstr "ページは読み込み可能である。"
4971
4972 #. type: TP
4973 #: build/C/man2/mmap.2:103 build/C/man2/mprotect.2:70
4974 #, no-wrap
4975 msgid "B<PROT_WRITE>"
4976 msgstr "B<PROT_WRITE>"
4977
4978 #. type: Plain text
4979 #: build/C/man2/mmap.2:106
4980 msgid "Pages may be written."
4981 msgstr "ページに書き込み可能である。"
4982
4983 #. type: TP
4984 #: build/C/man2/mmap.2:106 build/C/man2/mprotect.2:64
4985 #, no-wrap
4986 msgid "B<PROT_NONE>"
4987 msgstr "B<PROT_NONE>"
4988
4989 #. type: Plain text
4990 #: build/C/man2/mmap.2:109
4991 msgid "Pages may not be accessed."
4992 msgstr "ページにはアクセスできない。"
4993
4994 #. type: Plain text
4995 #: build/C/man2/mmap.2:118
4996 msgid ""
4997 "The I<flags> argument determines whether updates to the mapping are visible "
4998 "to other processes mapping the same region, and whether updates are carried "
4999 "through to the underlying file.  This behavior is determined by including "
5000 "exactly one of the following values in I<flags>:"
5001 msgstr ""
5002 "I<flags> 引き数により、マッピングに対する更新が同じ領域をマッピングしている "
5003 "他のプロセスに見えるか、更新がマッピング元のファイルを通じて 伝えられるか、が"
5004 "決定される。この動作は、以下の値のいずれか一つだけ (複数は指定できない) を "
5005 "I<flags> に含めることで指定する。"
5006
5007 #. type: TP
5008 #: build/C/man2/mmap.2:118
5009 #, no-wrap
5010 msgid "B<MAP_SHARED>"
5011 msgstr "B<MAP_SHARED>"
5012
5013 #. type: Plain text
5014 #: build/C/man2/mmap.2:128
5015 msgid ""
5016 "Share this mapping.  Updates to the mapping are visible to other processes "
5017 "that map this file, and are carried through to the underlying file.  The "
5018 "file may not actually be updated until B<msync>(2)  or B<munmap>()  is "
5019 "called."
5020 msgstr ""
5021 "このマッピングを共有する。 マッピングに対する更新はこのファイルをマッピングし"
5022 "ている他のプロセス から見える。更新はマッピング元のファイルを通じて伝えられ"
5023 "る。 ただし、ファイルの実際の更新は B<msync>(2)  または B<munmap>()  が呼ばれ"
5024 "るまで行われないこともある。"
5025
5026 #. type: TP
5027 #: build/C/man2/mmap.2:128
5028 #, no-wrap
5029 msgid "B<MAP_PRIVATE>"
5030 msgstr "B<MAP_PRIVATE>"
5031
5032 #. type: Plain text
5033 #: build/C/man2/mmap.2:137
5034 msgid ""
5035 "Create a private copy-on-write mapping.  Updates to the mapping are not "
5036 "visible to other processes mapping the same file, and are not carried "
5037 "through to the underlying file.  It is unspecified whether changes made to "
5038 "the file after the B<mmap>()  call are visible in the mapped region."
5039 msgstr ""
5040 "プライベートな copy-on-write (書き込み時コピー) マップを生成する。 マッピング"
5041 "に対する更新は同じファイルをマッピングしている他のプロセス には見えず、更新が"
5042 "マッピング元のファイルを通じて伝えられることもない。 B<mmap>()  の呼び出し後"
5043 "にマッピング元のファイルに対して行われた変更が、 マップ領域に反映されるかどう"
5044 "かは規定されていない。"
5045
5046 #. type: Plain text
5047 #: build/C/man2/mmap.2:139
5048 msgid "Both of these flags are described in POSIX.1-2001."
5049 msgstr "上記の二つのフラグは POSIX.1-2001 で規定されている。"
5050
5051 #. type: Plain text
5052 #: build/C/man2/mmap.2:142
5053 msgid ""
5054 "In addition, zero or more of the following values can be ORed in I<flags>:"
5055 msgstr ""
5056 "さらに、以下の値のうち 0 個以上をビット毎の論理和 (OR) で I<flags> に指定する"
5057 "ことができる。"
5058
5059 #. type: TP
5060 #: build/C/man2/mmap.2:142
5061 #, no-wrap
5062 msgid "B<MAP_32BIT> (since Linux 2.4.20, 2.6)"
5063 msgstr "B<MAP_32BIT> (Linux 2.4.20, 2.6 以降)"
5064
5065 #.  See http://lwn.net/Articles/294642 "Tangled up in threads", 19 Aug 08
5066 #. type: Plain text
5067 #: build/C/man2/mmap.2:158
5068 msgid ""
5069 "Put the mapping into the first 2 Gigabytes of the process address space.  "
5070 "This flag is only supported on x86-64, for 64-bit programs.  It was added to "
5071 "allow thread stacks to be allocated somewhere in the first 2GB of memory, so "
5072 "as to improve context-switch performance on some early 64-bit processors.  "
5073 "Modern x86-64 processors no longer have this performance problem, so use of "
5074 "this flag is not required on those systems.  The B<MAP_32BIT> flag is "
5075 "ignored when B<MAP_FIXED> is set."
5076 msgstr ""
5077 "マッピングをプロセスのアドレス空間の先頭 2 ギガバイト以内に配置する。 このフ"
5078 "ラグがサポートされているのは x86-64 アーキテクチャ上の 64 ビットプログラムの"
5079 "みである。 このフラグが追加されたのは、スレッドのスタックをメモリの先頭 2GB "
5080 "以内の どこかに割り当てることで、初期のいくつかの 64 ビットプロセッサにおけ"
5081 "る コンテキストスイッチの性能問題を改善するためである。 最近の x86-64 プロ"
5082 "セッサではこの性能問題はもはや存在せず、 そのようなシステムではこのフラグを使"
5083 "用する必要はない。 B<MAP_FIXED> がセットされている場合は、 B<MAP_32BIT> フラ"
5084 "グは無視される。"
5085
5086 #. type: TP
5087 #: build/C/man2/mmap.2:158
5088 #, no-wrap
5089 msgid "B<MAP_ANON>"
5090 msgstr "B<MAP_ANON>"
5091
5092 #. type: Plain text
5093 #: build/C/man2/mmap.2:163
5094 msgid "Synonym for B<MAP_ANONYMOUS>.  Deprecated."
5095 msgstr "B<MAP_ANONYMOUS> の同義語。非推奨。"
5096
5097 #. type: TP
5098 #: build/C/man2/mmap.2:163
5099 #, no-wrap
5100 msgid "B<MAP_ANONYMOUS>"
5101 msgstr "B<MAP_ANONYMOUS>"
5102
5103 #. type: Plain text
5104 #: build/C/man2/mmap.2:185
5105 msgid ""
5106 "The mapping is not backed by any file; its contents are initialized to "
5107 "zero.  The I<fd> and I<offset> arguments are ignored; however, some "
5108 "implementations require I<fd> to be -1 if B<MAP_ANONYMOUS> (or B<MAP_ANON>)  "
5109 "is specified, and portable applications should ensure this.  The use of "
5110 "B<MAP_ANONYMOUS> in conjunction with B<MAP_SHARED> is only supported on "
5111 "Linux since kernel 2.4."
5112 msgstr ""
5113 "マッピングはどのファイルとも関連付けされない。 マッピングの内容は 0 で初期化"
5114 "される。 引き数 I<fd> と I<offset> は無視される。 ただし、実装によっては "
5115 "B<MAP_ANONYMOUS> (もしくは B<MAP_ANON>)  が指定された場合、 I<fd> を -1 にす"
5116 "る必要があり、 移植性が必要なアプリケーションでは必ず I<fd> を -1 にすべきで"
5117 "ある。 B<MAP_ANONYMOUS> と B<MAP_SHARED> を組み合わせての利用は カーネル 2.4 "
5118 "以降の Linux でのみサポートされている。"
5119
5120 #. type: TP
5121 #: build/C/man2/mmap.2:185
5122 #, no-wrap
5123 msgid "B<MAP_DENYWRITE>"
5124 msgstr "B<MAP_DENYWRITE>"
5125
5126 #.  Introduced in 1.1.36, removed in 1.3.24.
5127 #. type: Plain text
5128 #: build/C/man2/mmap.2:193
5129 msgid ""
5130 "This flag is ignored.  (Long ago, it signaled that attempts to write to the "
5131 "underlying file should fail with B<ETXTBUSY>.  But this was a source of "
5132 "denial-of-service attacks.)"
5133 msgstr ""
5134 "このフラグは無視される (ずっと前は、マップ元のファイルへの書き込みを行おうと"
5135 "すると、エラー B<ETXTBUSY> で失敗するようにシグナルが設定されていたが、これ"
5136 "は denial-of-service (サービス拒否) 攻撃の原因となった)。"
5137
5138 #. type: TP
5139 #: build/C/man2/mmap.2:193
5140 #, no-wrap
5141 msgid "B<MAP_EXECUTABLE>"
5142 msgstr "B<MAP_EXECUTABLE>"
5143
5144 #.  Introduced in 1.1.38, removed in 1.3.24. Flag tested in proc_follow_link.
5145 #.  (Long ago, it signaled that the underlying file is an executable.
5146 #.  However, that information was not really used anywhere.)
5147 #.  Linus talked about DOS related to MAP_EXECUTABLE, but he was thinking of
5148 #.  MAP_DENYWRITE?
5149 #. type: Plain text
5150 #: build/C/man2/mmap.2:201
5151 msgid "This flag is ignored."
5152 msgstr "このフラグは無視される。"
5153
5154 #. type: TP
5155 #: build/C/man2/mmap.2:201
5156 #, no-wrap
5157 msgid "B<MAP_FILE>"
5158 msgstr "B<MAP_FILE>"
5159
5160 #.  On some systems, this was required as the opposite of
5161 #.  MAP_ANONYMOUS -- mtk, 1 May 2007
5162 #. type: Plain text
5163 #: build/C/man2/mmap.2:207
5164 msgid "Compatibility flag.  Ignored."
5165 msgstr "互換性のためのフラグ。無視される。"
5166
5167 #. type: TP
5168 #: build/C/man2/mmap.2:207
5169 #, no-wrap
5170 msgid "B<MAP_FIXED>"
5171 msgstr "B<MAP_FIXED>"
5172
5173 #. type: Plain text
5174 #: build/C/man2/mmap.2:225
5175 msgid ""
5176 "Don't interpret I<addr> as a hint: place the mapping at exactly that "
5177 "address.  I<addr> must be a multiple of the page size.  If the memory region "
5178 "specified by I<addr> and I<len> overlaps pages of any existing mapping(s), "
5179 "then the overlapped part of the existing mapping(s) will be discarded.  If "
5180 "the specified address cannot be used, B<mmap>()  will fail.  Because "
5181 "requiring a fixed address for a mapping is less portable, the use of this "
5182 "option is discouraged."
5183 msgstr ""
5184 "I<addr> をアドレスのヒントとして使用するのではなく、 I<addr> で指定されたアド"
5185 "レスをそのまま使用してマッピングを配置する。 I<addr> はページサイズの倍数でな"
5186 "ければならない。 I<addr> と I<len> で指定されたメモリ領域が既存のマッピングの"
5187 "ページと重なる場合、 既存のマッピングの重なった部分は捨てられる。 もし指定さ"
5188 "れたアドレスが使用できない場合、 B<mmap>()  は失敗する。 マッピングに対して固"
5189 "定アドレスを要求するのは移植性の面で劣るので、 このオプションは使用しないこと"
5190 "を推奨する。"
5191
5192 #. type: TP
5193 #: build/C/man2/mmap.2:225
5194 #, no-wrap
5195 msgid "B<MAP_GROWSDOWN>"
5196 msgstr "B<MAP_GROWSDOWN>"
5197
5198 #. type: Plain text
5199 #: build/C/man2/mmap.2:230
5200 msgid ""
5201 "Used for stacks.  Indicates to the kernel virtual memory system that the "
5202 "mapping should extend downward in memory."
5203 msgstr ""
5204 "スタック用に使用される。マッピングをメモリ内で逆向きに行うことを カーネル仮想"
5205 "メモリシステムに指示する。 (訳注:マッピングは通常はメモリ・アドレスが増加す"
5206 "る向きに行うが、 このオプションを指定すると逆向きにマッピングを行う)"
5207
5208 #. type: TP
5209 #: build/C/man2/mmap.2:230
5210 #, no-wrap
5211 msgid "B<MAP_HUGETLB> (since Linux 2.6.32)"
5212 msgstr "B<MAP_HUGETLB> (Linux 2.6.32 以降)"
5213
5214 #. type: Plain text
5215 #: build/C/man2/mmap.2:236
5216 msgid ""
5217 "Allocate the mapping using \"huge pages.\" See the Linux kernel source file "
5218 "I<Documentation/vm/hugetlbpage.txt> for further information."
5219 msgstr "\"huge page\" を使ってマッピングを割り当てる。詳しい情報は、Linux カーネルソースの I<Documentation/vm/hugetlbpage.txt> を参照。"
5220
5221 #. type: TP
5222 #: build/C/man2/mmap.2:236
5223 #, no-wrap
5224 msgid "B<MAP_LOCKED> (since Linux 2.5.37)"
5225 msgstr "B<MAP_LOCKED> (Linux 2.5.37 以降)"
5226
5227 #.  If set, the mapped pages will not be swapped out.
5228 #. type: Plain text
5229 #: build/C/man2/mmap.2:242
5230 msgid ""
5231 "Lock the pages of the mapped region into memory in the manner of B<mlock>"
5232 "(2).  This flag is ignored in older kernels."
5233 msgstr ""
5234 "マップされた領域のページを B<mlock>(2)  の方法でメモリ内にロックする。 それ以"
5235 "前のカーネルでは、このフラグは無視される。"
5236
5237 #. type: TP
5238 #: build/C/man2/mmap.2:242
5239 #, no-wrap
5240 msgid "B<MAP_NONBLOCK> (since Linux 2.5.46)"
5241 msgstr "B<MAP_NONBLOCK> (Linux 2.5.46 以降)"
5242
5243 #. type: Plain text
5244 #: build/C/man2/mmap.2:257
5245 msgid ""
5246 "Only meaningful in conjunction with B<MAP_POPULATE>.  Don't perform read-"
5247 "ahead: only create page tables entries for pages that are already present in "
5248 "RAM.  Since Linux 2.6.23, this flag causes B<MAP_POPULATE> to do nothing.  "
5249 "One day the combination of B<MAP_POPULATE> and B<MAP_NONBLOCK> may be "
5250 "reimplemented."
5251 msgstr ""
5252 "B<MAP_POPULATE> と組み合わせた場合のみ意味を持つ。 read-ahead (前もって読み込"
5253 "むこと) を実行しない。 単に、すでに RAM 上に存在するページに対して ページテー"
5254 "ブルエントリを作成するだけである。 Linux 2.6.23 以降では、このフラグは "
5255 "B<MAP_POPULATE> に何の影響も与えない。 いつか B<MAP_POPULATE> と "
5256 "B<MAP_NONBLOCK> を組み合わせた場合の動作は実装し直されるかもしれない。"
5257
5258 #. type: TP
5259 #: build/C/man2/mmap.2:257
5260 #, no-wrap
5261 msgid "B<MAP_NORESERVE>"
5262 msgstr "B<MAP_NORESERVE>"
5263
5264 #. type: Plain text
5265 #: build/C/man2/mmap.2:272
5266 msgid ""
5267 "Do not reserve swap space for this mapping.  When swap space is reserved, "
5268 "one has the guarantee that it is possible to modify the mapping.  When swap "
5269 "space is not reserved one might get B<SIGSEGV> upon a write if no physical "
5270 "memory is available.  See also the discussion of the file I</proc/sys/vm/"
5271 "overcommit_memory> in B<proc>(5).  In kernels before 2.6, this flag only had "
5272 "effect for private writable mappings."
5273 msgstr ""
5274 "このマッピングに対するスワップ空間の予約を行わない。 スワップ空間を予約した場"
5275 "合は、このマッピングの変更が必ず可能なことが 保証される。予約を行わなかった場"
5276 "合、物理メモリに空きがないと 書き込み時に B<SIGSEGV> エラーを受け取ることがあ"
5277 "る。 B<proc>(5)  の I</proc/sys/vm/overcommit_memory> ファイルについての議論"
5278 "も参照。 バージョン 2.6 より前のカーネルでは、このフラグは書き込み可能な プラ"
5279 "イベート・マッピングについてのみ効果があった。"
5280
5281 #. type: TP
5282 #: build/C/man2/mmap.2:272
5283 #, no-wrap
5284 msgid "B<MAP_POPULATE> (since Linux 2.5.46)"
5285 msgstr "B<MAP_POPULATE> (Linux 2.5.46 以降)"
5286
5287 #. type: Plain text
5288 #: build/C/man2/mmap.2:279
5289 msgid ""
5290 "Populate (prefault) page tables for a mapping.  For a file mapping, this "
5291 "causes read-ahead on the file.  Later accesses to the mapping will not be "
5292 "blocked by page faults.  B<MAP_POPULATE> is only supported for private "
5293 "mappings since Linux 2.6.23."
5294 msgstr ""
5295 "マッピング用のページテーブルを配置 (populate) する ファイルマッピングの場合に"
5296 "は、これによりファイルが先読み (read-ahead)  が行われる。この以後は、マッピン"
5297 "グに対するアクセスがページフォールトで ブロックされることがなくなる。 "
5298 "B<MAP_POPULATE> は Linux 2.6.23 以降でプライベート・マッピングについてのみ サ"
5299 "ポートされている。"
5300
5301 #. type: TP
5302 #: build/C/man2/mmap.2:279
5303 #, no-wrap
5304 msgid "B<MAP_STACK> (since Linux 2.6.27)"
5305 msgstr "B<MAP_STACK> (Linux 2.6.27 以降)"
5306
5307 #.  See http://lwn.net/Articles/294642 "Tangled up in threads", 19 Aug 08
5308 #.  commit cd98a04a59e2f94fa64d5bf1e26498d27427d5e7
5309 #.  http://thread.gmane.org/gmane.linux.kernel/720412
5310 #.  "pthread_create() slow for many threads; also time to revisit 64b
5311 #.   context switch optimization?"
5312 #. type: Plain text
5313 #: build/C/man2/mmap.2:292
5314 msgid ""
5315 "Allocate the mapping at an address suitable for a process or thread stack.  "
5316 "This flag is currently a no-op, but is used in the glibc threading "
5317 "implementation so that if some architectures require special treatment for "
5318 "stack allocations, support can later be transparently implemented for glibc."
5319 msgstr ""
5320 "プロセスやスレッドのスタックに適したアドレスにマッピングを割り当てる。 現在の"
5321 "ところ、このフラグは何もしないが、 glibc のスレッド実装では使用されている。 "
5322 "これは、いくつかのアーキテクチャではスタックの割り当てに関して特別な扱い が必"
5323 "要な場合に、glibc にそのサポートを後で透過的に実装できるようにする ためであ"
5324 "る。"
5325
5326 #. type: TP
5327 #: build/C/man2/mmap.2:292
5328 #, no-wrap
5329 msgid "B<MAP_UNINITIALIZED> (since Linux 2.6.33)"
5330 msgstr "B<MAP_UNINITIALIZED> (Linux 2.6.33 以降)"
5331
5332 #. type: Plain text
5333 #: build/C/man2/mmap.2:302
5334 msgid ""
5335 "Don't clear anonymous pages.  This flag is intended to improve performance "
5336 "on embedded devices.  This flag is only honored if the kernel was configured "
5337 "with the B<CONFIG_MMAP_ALLOW_UNINITIALIZED> option.  Because of the security "
5338 "implications, that option is normally enabled only on embedded devices (i."
5339 "e., devices where one has complete control of the contents of user memory)."
5340 msgstr ""
5341 "無名ページ (anonymous page) のクリアを行わない。このフラグは組み込みデバイ"
5342 "ス\n"
5343 "での性能向上を目的に作られてものである。カーネルの設定で\n"
5344 "B<CONFIG_MMAP_ALLOW_UNINITIALIZED> オプションが有効になっている場合のみ、\n"
5345 "このフラグは効果を持つ。\n"
5346 "セキュリティ面の考慮から、このオプションは通常組み込みデバイス (すなわち、\n"
5347 "ユーザメモリの内容を完全に制御化におけるデバイス) においてのみ有効にされる。"
5348
5349 #. type: Plain text
5350 #: build/C/man2/mmap.2:310
5351 msgid ""
5352 "Of the above flags, only B<MAP_FIXED> is specified in POSIX.1-2001.  "
5353 "However, most systems also support B<MAP_ANONYMOUS> (or its synonym "
5354 "B<MAP_ANON>)."
5355 msgstr ""
5356 "上記のフラグの中では、 B<MAP_FIXED> だけが POSIX.1-2001 で規定されている。 し"
5357 "かしながら、ほとんどのシステムで B<MAP_ANONYMOUS> (またはその同義語である "
5358 "B<MAP_ANON>)  もサポートされている。"
5359
5360 #. type: Plain text
5361 #: build/C/man2/mmap.2:317
5362 msgid ""
5363 "Some systems document the additional flags B<MAP_AUTOGROW>, "
5364 "B<MAP_AUTORESRV>, B<MAP_COPY>, and B<MAP_LOCAL>."
5365 msgstr ""
5366 "いくつかのシステムでは、上記以外にフラグとして B<MAP_AUTOGROW>, "
5367 "B<MAP_AUTORESRV>, B<MAP_COPY>, B<MAP_LOCAL> が規定されている。"
5368
5369 #. type: Plain text
5370 #: build/C/man2/mmap.2:323
5371 msgid ""
5372 "Memory mapped by B<mmap>()  is preserved across B<fork>(2), with the same "
5373 "attributes."
5374 msgstr ""
5375 "B<mmap>()  によってマップされたメモリの属性は B<fork>(2)  の際に継承される。"
5376
5377 #. type: Plain text
5378 #: build/C/man2/mmap.2:331
5379 msgid ""
5380 "A file is mapped in multiples of the page size.  For a file that is not a "
5381 "multiple of the page size, the remaining memory is zeroed when mapped, and "
5382 "writes to that region are not written out to the file.  The effect of "
5383 "changing the size of the underlying file of a mapping on the pages that "
5384 "correspond to added or removed regions of the file is unspecified."
5385 msgstr ""
5386 "ファイルはページサイズの整数倍の領域にマップされる。サイズがページサイズの 整"
5387 "数倍でないファイルの場合、マップ時に残りの領域は 0 で埋められ、この領域へ 書"
5388 "きこみを行ってもファイルに書き出されることはない。マッピングを行った元 ファイ"
5389 "ルのサイズを変更した場合、元ファイルの追加されたり削除された領域に対応 する"
5390 "マップされたページに対してどのような影響があるかは規定されていない。"
5391
5392 #. type: SS
5393 #: build/C/man2/mmap.2:331
5394 #, no-wrap
5395 msgid "munmap()"
5396 msgstr "munmap()"
5397
5398 #. type: Plain text
5399 #: build/C/man2/mmap.2:341
5400 msgid ""
5401 "The B<munmap>()  system call deletes the mappings for the specified address "
5402 "range, and causes further references to addresses within the range to "
5403 "generate invalid memory references.  The region is also automatically "
5404 "unmapped when the process is terminated.  On the other hand, closing the "
5405 "file descriptor does not unmap the region."
5406 msgstr ""
5407 "システムコール B<munmap>()  は指定されたアドレス範囲のマップを消去し、 これ以"
5408 "降のその範囲内へのメモリ参照は不正となる。 この領域は、プロセスが終了したとき"
5409 "にも自動的にアンマップされる。 一方、ファイル記述子をクローズしても、この領域"
5410 "はアンマップされない。"
5411
5412 #. type: Plain text
5413 #: build/C/man2/mmap.2:351
5414 msgid ""
5415 "The address I<addr> must be a multiple of the page size.  All pages "
5416 "containing a part of the indicated range are unmapped, and subsequent "
5417 "references to these pages will generate B<SIGSEGV>.  It is not an error if "
5418 "the indicated range does not contain any mapped pages."
5419 msgstr ""
5420 "I<addr> アドレスはページサイズの整数倍でなければならない。指定された範囲の一"
5421 "部分を 含む全てのページはアンマップされ、これ以降にこれらのページへの参照があ"
5422 "ると B<SIGSEGV> が発生する。 指定した範囲内にマップされたページが一つも含まれ"
5423 "ていない場合でも エラーにならない。"
5424
5425 #. type: SS
5426 #: build/C/man2/mmap.2:351
5427 #, no-wrap
5428 msgid "Timestamps changes for file-backed mappings"
5429 msgstr "ファイルと関連付けられたマッピングに対するタイムスタンプの更新"
5430
5431 #. type: Plain text
5432 #: build/C/man2/mmap.2:358
5433 msgid ""
5434 "For file-backed mappings, the I<st_atime> field for the mapped file may be "
5435 "updated at any time between the B<mmap>()  and the corresponding unmapping; "
5436 "the first reference to a mapped page will update the field if it has not "
5437 "been already."
5438 msgstr ""
5439 "ファイルと関連付けられたマッピングの場合、マッピングされたファイルの "
5440 "I<st_atime> フィールドは、 B<mmap>()  されてからアンマップ (unmap) されるまで"
5441 "の間に更新されることがある。 それまでに更新が行われていなければ、マップされた"
5442 "ページへの最初の参照があった 際に更新される。"
5443
5444 #. type: Plain text
5445 #: build/C/man2/mmap.2:375
5446 msgid ""
5447 "The I<st_ctime> and I<st_mtime> field for a file mapped with B<PROT_WRITE> "
5448 "and B<MAP_SHARED> will be updated after a write to the mapped region, and "
5449 "before a subsequent B<msync>(2)  with the B<MS_SYNC> or B<MS_ASYNC> flag, if "
5450 "one occurs."
5451 msgstr ""
5452 "B<PROT_WRITE> と B<MAP_SHARED> の両方を指定してマップされたファイルの場合、書"
5453 "き込みがあると、 I<st_ctime> と I<st_mtime> の両フィールドは、マップされた領"
5454 "域への書き込みより後で、 B<MS_SYNC> または B<MS_ASYNC> フラグを指定して "
5455 "B<msync>(2)  が呼ばれる前までに更新される。"
5456
5457 #. type: Plain text
5458 #: build/C/man2/mmap.2:392
5459 msgid ""
5460 "On success, B<mmap>()  returns a pointer to the mapped area.  On error, the "
5461 "value B<MAP_FAILED> (that is, I<(void\\ *)\\ -1>)  is returned, and I<errno> "
5462 "is set appropriately.  On success, B<munmap>()  returns 0, on failure -1, "
5463 "and I<errno> is set (probably to B<EINVAL>)."
5464 msgstr ""
5465 "B<mmap>()  は成功するとマップされた領域へのポインタを返す。 失敗すると値 "
5466 "B<MAP_FAILED> (つまり I<(void\\ *)\\ -1>)  を返し、 I<errno> がエラーの内容に"
5467 "したがってセットされる。 B<munmap>()  は成功すると 0 を返す。失敗すると -1 を"
5468 "返し、 I<errno> がセットされる (多くの場合 B<EINVAL> になるだろう)。"
5469
5470 #. type: TP
5471 #: build/C/man2/mmap.2:393 build/C/man2/mprotect.2:86
5472 #: build/C/man3/shm_open.3:185 build/C/man3/shm_open.3:190
5473 #: build/C/man2/shmctl.2:297 build/C/man2/shmget.2:188
5474 #: build/C/man2/shmop.2:191
5475 #, no-wrap
5476 msgid "B<EACCES>"
5477 msgstr "B<EACCES>"
5478
5479 #. type: Plain text
5480 #: build/C/man2/mmap.2:413
5481 msgid ""
5482 "A file descriptor refers to a non-regular file.  Or B<MAP_PRIVATE> was "
5483 "requested, but I<fd> is not open for reading.  Or B<MAP_SHARED> was "
5484 "requested and B<PROT_WRITE> is set, but I<fd> is not open in read/write "
5485 "(B<O_RDWR>)  mode.  Or B<PROT_WRITE> is set, but the file is append-only."
5486 msgstr ""
5487 "以下のいずれかの場合。 ファイル記述子の参照先が通常のファイルではない (non-"
5488 "regular file) 。 B<MAP_PRIVATE> を要求したが I<fd> は読み込み用にオープンされ"
5489 "ていない。 B<MAP_SHARED> を要求して B<PROT_WRITE> をセットしたが I<fd> は読み"
5490 "書きモード (B<O_RDWR>)  でオープンされていない、 B<PROT_WRITE> をセットした"
5491 "が、ファイルは追加 (append) 専用である。"
5492
5493 #. type: Plain text
5494 #: build/C/man2/mmap.2:417
5495 msgid ""
5496 "The file has been locked, or too much memory has been locked (see "
5497 "B<setrlimit>(2))."
5498 msgstr ""
5499 "ファイルがロックされている。またはロックされているメモリが多すぎる "
5500 "(B<setrlimit>(2)  を参照)。"
5501
5502 #. type: Plain text
5503 #: build/C/man2/mmap.2:423
5504 msgid ""
5505 "I<fd> is not a valid file descriptor (and B<MAP_ANONYMOUS> was not set)."
5506 msgstr ""
5507 "I<fd> が有効なファイル記述子 (file descriptor) ではない (かつ "
5508 "B<MAP_ANONYMOUS> がセットされていない)。"
5509
5510 #. type: Plain text
5511 #: build/C/man2/mmap.2:431
5512 msgid ""
5513 "We don't like I<addr>, I<length>, or I<offset> (e.g., they are too large, or "
5514 "not aligned on a page boundary)."
5515 msgstr ""
5516 "I<addr> か I<length> か I<offset> が適切でない (例えば、大きすぎるとか、ペー"
5517 "ジ境界にアラインメントされていない)。"
5518
5519 #. type: Plain text
5520 #: build/C/man2/mmap.2:436
5521 msgid "(since Linux 2.6.12)  I<length> was 0."
5522 msgstr "(Linux 2.6.12 以降)  I<length> が 0 であった。"
5523
5524 #. type: Plain text
5525 #: build/C/man2/mmap.2:444
5526 msgid ""
5527 "I<flags> contained neither B<MAP_PRIVATE> or B<MAP_SHARED>, or contained "
5528 "both of these values."
5529 msgstr ""
5530 "I<flags> に B<MAP_PRIVATE> と B<MAP_SHARED> のどちらも含まれていなかった、も"
5531 "しくは その両方が含まれていた。"
5532
5533 #. type: TP
5534 #: build/C/man2/mmap.2:444 build/C/man3/shm_open.3:227
5535 #: build/C/man2/shmget.2:204
5536 #, no-wrap
5537 msgid "B<ENFILE>"
5538 msgstr "B<ENFILE>"
5539
5540 #.  [2.6.7] shmem_zero_setup()-->shmem_file_setup()-->get_empty_filp()
5541 #. type: Plain text
5542 #: build/C/man2/mmap.2:452 build/C/man2/shmget.2:208
5543 msgid "The system limit on the total number of open files has been reached."
5544 msgstr "システム全体でオープンされているファイルの総数が上限に達した。"
5545
5546 #. type: Plain text
5547 #: build/C/man2/mmap.2:456
5548 msgid ""
5549 "The underlying file system of the specified file does not support memory "
5550 "mapping."
5551 msgstr ""
5552 "指定されたファイルが置かれているファイルシステムがメモリマッピングをサポート "
5553 "していない。"
5554
5555 #. type: Plain text
5556 #: build/C/man2/mmap.2:460
5557 msgid ""
5558 "No memory is available, or the process's maximum number of mappings would "
5559 "have been exceeded."
5560 msgstr ""
5561 "メモリに空きがない、または処理中のプロセスのマッピング数が最大数を超過した。"
5562
5563 #.  (Since 2.4.25 / 2.6.0.)
5564 #. type: Plain text
5565 #: build/C/man2/mmap.2:469
5566 msgid ""
5567 "The I<prot> argument asks for B<PROT_EXEC> but the mapped area belongs to a "
5568 "file on a file system that was mounted no-exec."
5569 msgstr ""
5570 "I<prot> 引き数は B<PROT_EXEC> を行うように指定されているが、 no-exec でマウン"
5571 "トされたファイルシステム上のファイルに マップ領域が対応している。"
5572
5573 #. type: TP
5574 #: build/C/man2/mmap.2:469
5575 #, no-wrap
5576 msgid "B<ETXTBSY>"
5577 msgstr "B<ETXTBSY>"
5578
5579 #. type: Plain text
5580 #: build/C/man2/mmap.2:475
5581 msgid ""
5582 "B<MAP_DENYWRITE> was set but the object specified by I<fd> is open for "
5583 "writing."
5584 msgstr ""
5585 "B<MAP_DENYWRITE> がセットされているが I<fd> で指定されているオブジェクトは書"
5586 "き込み用に開かれている。"
5587
5588 #. type: TP
5589 #: build/C/man2/mmap.2:475 build/C/man2/shmctl.2:339
5590 #, no-wrap
5591 msgid "B<EOVERFLOW>"
5592 msgstr "B<EOVERFLOW>"
5593
5594 #. type: Plain text
5595 #: build/C/man2/mmap.2:487
5596 msgid ""
5597 "On 32-bit architecture together with the large file extension (i.e., using "
5598 "64-bit I<off_t>): the number of pages used for I<length> plus number of "
5599 "pages used for I<offset> would overflow I<unsigned long> (32 bits)."
5600 msgstr ""
5601
5602 #. type: Plain text
5603 #: build/C/man2/mmap.2:489
5604 msgid "Use of a mapped region can result in these signals:"
5605 msgstr "マップ領域を利用する際に、以下のシグナルが発生することがある:"
5606
5607 #. type: TP
5608 #: build/C/man2/mmap.2:489
5609 #, no-wrap
5610 msgid "B<SIGSEGV>"
5611 msgstr "B<SIGSEGV>"
5612
5613 #. type: Plain text
5614 #: build/C/man2/mmap.2:492
5615 msgid "Attempted write into a region mapped as read-only."
5616 msgstr "読み込み専用で mmap された領域へ書き込みを行おうとした。"
5617
5618 #. type: TP
5619 #: build/C/man2/mmap.2:492
5620 #, no-wrap
5621 msgid "B<SIGBUS>"
5622 msgstr "B<SIGBUS>"
5623
5624 #. type: Plain text
5625 #: build/C/man2/mmap.2:497
5626 msgid ""
5627 "Attempted access to a portion of the buffer that does not correspond to the "
5628 "file (for example, beyond the end of the file, including the case where "
5629 "another process has truncated the file)."
5630 msgstr ""
5631 "バッファのうち、ファイルに関連づけられていない部分 (例えばファイル末尾を越え"
5632 "た部分など。これには 他のプロセスがファイルを切り詰めた場合なども含まれる)  "
5633 "にアクセスしようとした。"
5634
5635 #.  SVr4 documents additional error codes ENXIO and ENODEV.
5636 #.  SUSv2 documents additional error codes EMFILE and EOVERFLOW.
5637 #. type: Plain text
5638 #: build/C/man2/mmap.2:501
5639 msgid "SVr4, 4.4BSD, POSIX.1-2001."
5640 msgstr "SVr4, 4.4BSD, POSIX.1-2001."
5641
5642 #.  POSIX.1-2001: It shall be defined to -1 or 0 or 200112L.
5643 #.  -1: unavailable, 0: ask using sysconf().
5644 #.  glibc defines it to 1.
5645 #. type: Plain text
5646 #: build/C/man2/mmap.2:515
5647 msgid ""
5648 "On POSIX systems on which B<mmap>(), B<msync>(2)  and B<munmap>()  are "
5649 "available, B<_POSIX_MAPPED_FILES> is defined in I<E<lt>unistd.hE<gt>> to a "
5650 "value greater than 0.  (See also B<sysconf>(3).)"
5651 msgstr ""
5652 "B<mmap>(), B<msync>(2)  B<munmap>()  が利用可能な POSIX システムでは、 "
5653 "B<_POSIX_MAPPED_FILES> は E<lt>unistd.hE<gt> で 0 より大きな値に定義される "
5654 "(B<sysconf>(3)  も参照のこと)。"
5655
5656 #.  Since around glibc 2.1/2.2, depending on the platform.
5657 #. type: Plain text
5658 #: build/C/man2/mmap.2:530
5659 msgid ""
5660 "This page describes the interface provided by the glibc B<mmap>()  wrapper "
5661 "function.  Originally, this function invoked a system call of the same "
5662 "name.  Since kernel 2.4, that system call has been superseded by B<mmap2>"
5663 "(2), and nowadays the glibc B<mmap>()  wrapper function invokes B<mmap2>(2)  "
5664 "with a suitably adjusted value for I<offset>."
5665 msgstr ""
5666 "このページでは glibc の B<mmap>() のラッパー関数が提供するインターフェース"
5667 "に\n"
5668 "ついて説明している。元々は、この関数は同じ名前のシステムコールを起動してい"
5669 "た。\n"
5670 "カーネル 2.4 以降、このシステムコールは B<mmap2>(2) に取って代わられ、現在\n"
5671 "では、 glibc の B<mmap>() のラッパー関数は I<offset> を適切に調整してから\n"
5672 "B<mmap2>(2) を起動する。"
5673
5674 #. type: Plain text
5675 #: build/C/man2/mmap.2:543
5676 msgid ""
5677 "On some hardware architectures (e.g., i386), B<PROT_WRITE> implies "
5678 "B<PROT_READ>.  It is architecture dependent whether B<PROT_READ> implies "
5679 "B<PROT_EXEC> or not.  Portable programs should always set B<PROT_EXEC> if "
5680 "they intend to execute code in the new mapping."
5681 msgstr ""
5682 "(i386 などの) いくつかのアーキテクチャでは、 B<PROT_WRITE> をセットすると、暗"
5683 "黙のうちに B<PROT_READ> がセットされる。 B<PROT_READ> をセットした際に暗黙の"
5684 "うちに B<PROT_EXEC> がセットされるかどうかは、アーキテクチャ依存である。 移植"
5685 "性を考慮したプログラムでは、 新規にマップした領域でコードを実行したい場合は、"
5686 "常に B<PROT_EXEC> をセットすべきである。"
5687
5688 #. type: Plain text
5689 #: build/C/man2/mmap.2:558
5690 msgid ""
5691 "The portable way to create a mapping is to specify I<addr> as 0 (NULL), and "
5692 "omit B<MAP_FIXED> from I<flags>.  In this case, the system chooses the "
5693 "address for the mapping; the address is chosen so as not to conflict with "
5694 "any existing mapping, and will not be 0.  If the B<MAP_FIXED> flag is "
5695 "specified, and I<addr> is 0 (NULL), then the mapped address will be 0 (NULL)."
5696 msgstr ""
5697 "マッピングを作成する移植性のある方法は、 I<addr> に 0 (NULL) を指定し、 "
5698 "I<flags> から B<MAP_FIXED> を外すことである。 この場合、システムがマッピング"
5699 "用のアドレスの選択を行う。 アドレスは既存のマッピングと衝突しないように、 か"
5700 "つ 0 にならないように選択される。 B<MAP_FIXED> フラグが指定され、かつ "
5701 "I<addr> が 0 (NULL)  の場合には、マップされるアドレスが 0 (NULL) になる。"
5702
5703 #. type: Plain text
5704 #: build/C/man2/mmap.2:587
5705 msgid ""
5706 "Certain I<flags> constants are defined only if either B<_BSD_SOURCE> or "
5707 "B<_SVID_SOURCE> is defined.  (Requiring B<_GNU_SOURCE> also suffices, and "
5708 "requiring that macro specifically would have been more logical, since these "
5709 "flags are all Linux specific.)  The relevant flags are: B<MAP_32BIT>, "
5710 "B<MAP_ANONYMOUS> (and the synonym B<MAP_ANON>), B<MAP_DENYWRITE>, "
5711 "B<MAP_EXECUTABLE>, B<MAP_FILE>, B<MAP_GROWSDOWN>, B<MAP_HUGETLB>, "
5712 "B<MAP_LOCKED>, B<MAP_NONBLOCK>, B<MAP_NORESERVE>, B<MAP_POPULATE>, and "
5713 "B<MAP_STACK>."
5714 msgstr ""
5715
5716 #. type: Plain text
5717 #: build/C/man2/mmap.2:592
5718 msgid ""
5719 "On Linux there are no guarantees like those suggested above under "
5720 "B<MAP_NORESERVE>.  By default, any process can be killed at any moment when "
5721 "the system runs out of memory."
5722 msgstr ""
5723 "Linux においては、上記の B<MAP_NORESERVE> で述べられているような保証はない。 "
5724 "デフォルトでは、システムがメモリを使い切った場合には、 どのプロセスがいつ強制"
5725 "終了されるか分からないからである。"
5726
5727 #. type: Plain text
5728 #: build/C/man2/mmap.2:599
5729 msgid ""
5730 "In kernels before 2.6.7, the B<MAP_POPULATE> flag only has effect if I<prot> "
5731 "is specified as B<PROT_NONE>."
5732 msgstr ""
5733 "2.6.7 より前のカーネルでは、 I<prot> に B<PROT_NONE> が指定された場合にの"
5734 "み、 B<MAP_POPULATE> フラグが効力を持つ。"
5735
5736 #. type: Plain text
5737 #: build/C/man2/mmap.2:614
5738 msgid ""
5739 "SUSv3 specifies that B<mmap>()  should fail if I<length> is 0.  However, in "
5740 "kernels before 2.6.12, B<mmap>()  succeeded in this case: no mapping was "
5741 "created and the call returned I<addr>.  Since kernel 2.6.12, B<mmap>()  "
5742 "fails with the error B<EINVAL> for this case."
5743 msgstr ""
5744 "SUSv3 では、 I<length> が 0 の場合、 B<mmap>()  は失敗すると規定されている。"
5745 "しかしながら、2.6.12 より前のカーネルでは、 この場合に B<mmap>()  は成功して"
5746 "いた (マッピングは作成されず、 I<addr> が返されていた)。 カーネル 2.6.12 以降"
5747 "では、 B<mmap>()  はエラー B<EINVAL> で失敗する。"
5748
5749 #. type: Plain text
5750 #: build/C/man2/mmap.2:630
5751 msgid ""
5752 "POSIX specifies that the system shall always zero fill any partial page at "
5753 "the end of the object and that system will never write any modification of "
5754 "the object beyond its end.  On Linux, when you write data to such partial "
5755 "page after the end of the object, the data stays in the page cache even "
5756 "after the file is closed and unmapped and even though the data is never "
5757 "written to the file itself, subsequent mappings may see the modified "
5758 "content.  In some cases, this could be fixed by calling B<msync>(2)  before "
5759 "the unmap takes place; however, this doesn't work on tmpfs (for example, "
5760 "when using POSIX shared memory interface documented in B<shm_overview>(7))."
5761 msgstr ""
5762
5763 #. type: Plain text
5764 #: build/C/man2/mmap.2:642
5765 msgid ""
5766 "The following program prints part of the file specified in its first command-"
5767 "line argument to standard output.  The range of bytes to be printed is "
5768 "specified via offset and length values in the second and third command-line "
5769 "arguments.  The program creates a memory mapping of the required pages of "
5770 "the file and then uses B<write>(2)  to output the desired bytes."
5771 msgstr ""
5772 "以下のプログラムは、一番目のコマンドライン引き数で指定された ファイルの一部を"
5773 "標準出力に表示する。 表示する範囲は、二番目、三番目のコマンドライン引き数で渡"
5774 "される オフセットと長さで指定される。 このプログラムは、指定されたファイルの"
5775 "必要なページのメモリ・ マッピングを作成し、 B<write>(2)  を使って所望のバイト"
5776 "を出力する。"
5777
5778 #. type: Plain text
5779 #: build/C/man2/mmap.2:650
5780 #, no-wrap
5781 msgid ""
5782 "#include E<lt>sys/mman.hE<gt>\n"
5783 "#include E<lt>sys/stat.hE<gt>\n"
5784 "#include E<lt>fcntl.hE<gt>\n"
5785 "#include E<lt>stdio.hE<gt>\n"
5786 "#include E<lt>stdlib.hE<gt>\n"
5787 "#include E<lt>unistd.hE<gt>\n"
5788 msgstr ""
5789 "#include E<lt>sys/mman.hE<gt>\n"
5790 "#include E<lt>sys/stat.hE<gt>\n"
5791 "#include E<lt>fcntl.hE<gt>\n"
5792 "#include E<lt>stdio.hE<gt>\n"
5793 "#include E<lt>stdlib.hE<gt>\n"
5794 "#include E<lt>unistd.hE<gt>\n"
5795
5796 #. type: Plain text
5797 #: build/C/man2/mmap.2:653 build/C/man2/mprotect.2:178
5798 #, no-wrap
5799 msgid ""
5800 "#define handle_error(msg) \\e\n"
5801 "    do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
5802 msgstr ""
5803 "#define handle_error(msg) \\e\n"
5804 "    do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
5805
5806 #. type: Plain text
5807 #: build/C/man2/mmap.2:663
5808 #, no-wrap
5809 msgid ""
5810 "int\n"
5811 "main(int argc, char *argv[])\n"
5812 "{\n"
5813 "    char *addr;\n"
5814 "    int fd;\n"
5815 "    struct stat sb;\n"
5816 "    off_t offset, pa_offset;\n"
5817 "    size_t length;\n"
5818 "    ssize_t s;\n"
5819 msgstr ""
5820 "int\n"
5821 "main(int argc, char *argv[])\n"
5822 "{\n"
5823 "    char *addr;\n"
5824 "    int fd;\n"
5825 "    struct stat sb;\n"
5826 "    off_t offset, pa_offset;\n"
5827 "    size_t length;\n"
5828 "    ssize_t s;\n"
5829
5830 #. type: Plain text
5831 #: build/C/man2/mmap.2:668
5832 #, no-wrap
5833 msgid ""
5834 "    if (argc E<lt> 3 || argc E<gt> 4) {\n"
5835 "        fprintf(stderr, \"%s file offset [length]\\en\", argv[0]);\n"
5836 "        exit(EXIT_FAILURE);\n"
5837 "    }\n"
5838 msgstr ""
5839 "    if (argc E<lt> 3 || argc E<gt> 4) {\n"
5840 "        fprintf(stderr, \"%s file offset [length]\\en\", argv[0]);\n"
5841 "        exit(EXIT_FAILURE);\n"
5842 "    }\n"
5843
5844 #. type: Plain text
5845 #: build/C/man2/mmap.2:672
5846 #, no-wrap
5847 msgid ""
5848 "    fd = open(argv[1], O_RDONLY);\n"
5849 "    if (fd == -1)\n"
5850 "        handle_error(\"open\");\n"
5851 msgstr ""
5852 "    fd = open(argv[1], O_RDONLY);\n"
5853 "    if (fd == -1)\n"
5854 "        handle_error(\"open\");\n"
5855
5856 #. type: Plain text
5857 #: build/C/man2/mmap.2:675
5858 #, no-wrap
5859 msgid ""
5860 "    if (fstat(fd, &sb) == -1)           /* To obtain file size */\n"
5861 "        handle_error(\"fstat\");\n"
5862 msgstr ""
5863 "    if (fstat(fd, &sb) == -1)           /* To obtain file size */\n"
5864 "        handle_error(\"fstat\");\n"
5865
5866 #. type: Plain text
5867 #: build/C/man2/mmap.2:679
5868 #, no-wrap
5869 msgid ""
5870 "    offset = atoi(argv[2]);\n"
5871 "    pa_offset = offset & ~(sysconf(_SC_PAGE_SIZE) - 1);\n"
5872 "        /* offset for mmap() must be page aligned */\n"
5873 msgstr ""
5874 "    offset = atoi(argv[2]);\n"
5875 "    pa_offset = offset & ~(sysconf(_SC_PAGE_SIZE) - 1);\n"
5876 "        /* offset for mmap() must be page aligned */\n"
5877
5878 #. type: Plain text
5879 #: build/C/man2/mmap.2:684
5880 #, no-wrap
5881 msgid ""
5882 "    if (offset E<gt>= sb.st_size) {\n"
5883 "        fprintf(stderr, \"offset is past end of file\\en\");\n"
5884 "        exit(EXIT_FAILURE);\n"
5885 "    }\n"
5886 msgstr ""
5887 "    if (offset E<gt>= sb.st_size) {\n"
5888 "        fprintf(stderr, \"offset is past end of file\\en\");\n"
5889 "        exit(EXIT_FAILURE);\n"
5890 "    }\n"
5891
5892 #. type: Plain text
5893 #: build/C/man2/mmap.2:690
5894 #, no-wrap
5895 msgid ""
5896 "    if (argc == 4) {\n"
5897 "        length = atoi(argv[3]);\n"
5898 "        if (offset + length E<gt> sb.st_size)\n"
5899 "            length = sb.st_size - offset;\n"
5900 "                /* Can\\(aqt display bytes past end of file */\n"
5901 msgstr ""
5902 "    if (argc == 4) {\n"
5903 "        length = atoi(argv[3]);\n"
5904 "        if (offset + length E<gt> sb.st_size)\n"
5905 "            length = sb.st_size - offset;\n"
5906 "                /* Can\\(aqt display bytes past end of file */\n"
5907
5908 #. type: Plain text
5909 #: build/C/man2/mmap.2:694
5910 #, no-wrap
5911 msgid ""
5912 "    } else {    /* No length arg ==E<gt> display to end of file */\n"
5913 "        length = sb.st_size - offset;\n"
5914 "    }\n"
5915 msgstr ""
5916 "    } else {    /* No length arg ==E<gt> display to end of file */\n"
5917 "        length = sb.st_size - offset;\n"
5918 "    }\n"
5919
5920 #. type: Plain text
5921 #: build/C/man2/mmap.2:699
5922 #, no-wrap
5923 msgid ""
5924 "    addr = mmap(NULL, length + offset - pa_offset, PROT_READ,\n"
5925 "                MAP_PRIVATE, fd, pa_offset);\n"
5926 "    if (addr == MAP_FAILED)\n"
5927 "        handle_error(\"mmap\");\n"
5928 msgstr ""
5929 "    addr = mmap(NULL, length + offset - pa_offset, PROT_READ,\n"
5930 "                MAP_PRIVATE, fd, pa_offset);\n"
5931 "    if (addr == MAP_FAILED)\n"
5932 "        handle_error(\"mmap\");\n"
5933
5934 #. type: Plain text
5935 #: build/C/man2/mmap.2:704
5936 #, no-wrap
5937 msgid ""
5938 "    s = write(STDOUT_FILENO, addr + offset - pa_offset, length);\n"
5939 "    if (s != length) {\n"
5940 "        if (s == -1)\n"
5941 "            handle_error(\"write\");\n"
5942 msgstr ""
5943 "    s = write(STDOUT_FILENO, addr + offset - pa_offset, length);\n"
5944 "    if (s != length) {\n"
5945 "        if (s == -1)\n"
5946 "            handle_error(\"write\");\n"
5947
5948 #. type: Plain text
5949 #: build/C/man2/mmap.2:708
5950 #, no-wrap
5951 msgid ""
5952 "        fprintf(stderr, \"partial write\");\n"
5953 "        exit(EXIT_FAILURE);\n"
5954 "    }\n"
5955 msgstr ""
5956 "        fprintf(stderr, \"partial write\");\n"
5957 "        exit(EXIT_FAILURE);\n"
5958 "    }\n"
5959
5960 #. type: Plain text
5961 #: build/C/man2/mmap.2:725
5962 msgid ""
5963 "B<getpagesize>(2), B<mincore>(2), B<mlock>(2), B<mmap2>(2), B<mprotect>(2), "
5964 "B<mremap>(2), B<msync>(2), B<remap_file_pages>(2), B<setrlimit>(2), B<shmat>"
5965 "(2), B<shm_open>(3), B<shm_overview>(7)"
5966 msgstr ""
5967 "B<getpagesize>(2), B<mincore>(2), B<mlock>(2), B<mmap2>(2), B<mprotect>(2), "
5968 "B<mremap>(2), B<msync>(2), B<remap_file_pages>(2), B<setrlimit>(2), B<shmat>"
5969 "(2), B<shm_open>(3), B<shm_overview>(7)"
5970
5971 #. type: Plain text
5972 #: build/C/man2/mmap.2:730 build/C/man2/msync.2:122
5973 msgid "B.O. Gallmeister, POSIX.4, O'Reilly, pp. 128-129 and 389-391."
5974 msgstr "B.O. Gallmeister, POSIX.4, O'Reilly, pp. 128-129 and 389-391."
5975
5976 #. type: TH
5977 #: build/C/man2/mmap2.2:29
5978 #, no-wrap
5979 msgid "MMAP2"
5980 msgstr "MMAP2"
5981
5982 #. type: TH
5983 #: build/C/man2/mmap2.2:29
5984 #, no-wrap
5985 msgid "2012-04-16"
5986 msgstr "2012-04-16"
5987
5988 #. type: Plain text
5989 #: build/C/man2/mmap2.2:32
5990 msgid "mmap2 - map files or devices into memory"
5991 msgstr "mmap2 - ファイルやデバイスをメモリにマップする"
5992
5993 #. type: Plain text
5994 #: build/C/man2/mmap2.2:38
5995 #, no-wrap
5996 msgid ""
5997 "B<void *mmap2(void *>I<addr>B<, size_t >I<length>B<, int >I<prot>B<,>\n"
5998 "B<             int >I<flags>B<, int >I<fd>B<, off_t >I<pgoffset>B<);>\n"
5999 msgstr ""
6000 "B<void *mmap2(void *>I<addr>B<, size_t >I<length>B<, int >I<prot>B<,>\n"
6001 "B<            int >I<flags>B<, int >I<fd>B<, off_t >I<pgoffset>B<);>\n"
6002
6003 #. type: Plain text
6004 #: build/C/man2/mmap2.2:43
6005 msgid ""
6006 "This is probably not the system call you are interested; instead, see B<mmap>"
6007 "(2), which describes the glibc wrapper function that invokes this system "
6008 "call."
6009 msgstr ""
6010 "これはおそらくあなたが興味のあるシステムコールではないだろう。代わりに\n"
6011 "B<mmap>(2) を見るとよい。そのページにはこのシステムコールを起動する glibc "
6012 "の\n"
6013 "ラッパー関数についての説明がある。"
6014
6015 #. type: Plain text
6016 #: build/C/man2/mmap2.2:54
6017 msgid ""
6018 "The B<mmap2>()  system call provides the same interface as B<mmap>(2), "
6019 "except that the final argument specifies the offset into the file in 4096-"
6020 "byte units (instead of bytes, as is done by B<mmap>(2)).  This enables "
6021 "applications that use a 32-bit I<off_t> to map large files (up to 2^44 "
6022 "bytes)."
6023 msgstr ""
6024 "B<mmap2>() システムコールは B<mmap>(2) と同じインターフェースを提供する。た"
6025 "だ\n"
6026 "し、最後の引き数には、ファイルのオフセットを (B<mmap>(2) が行っている、バイ"
6027 "ト\n"
6028 "単位ではなく) 4096 バイトを単位として指定する。 これにより、32 ビットの\n"
6029 "I<off_t> を使うアプリケーションで (2^44 バイトまでの) 大きなファイルをマッ"
6030 "プ\n"
6031 "できるようになる。"
6032
6033 #. type: Plain text
6034 #: build/C/man2/mmap2.2:61
6035 msgid ""
6036 "On success, B<mmap2>()  returns a pointer to the mapped area.  On error -1 "
6037 "is returned and I<errno> is set appropriately."
6038 msgstr ""
6039 "成功した場合、 B<mmap2>()  はマップされた領域へのポインタを返す。 エラーの場"
6040 "合は -1 が返されて、 I<errno> が適切に設定される。"
6041
6042 #. type: Plain text
6043 #: build/C/man2/mmap2.2:65
6044 msgid "Problem with getting the data from user space."
6045 msgstr "ユーザ空間からデータを取得するときに問題があった。"
6046
6047 #. type: Plain text
6048 #: build/C/man2/mmap2.2:70
6049 msgid ""
6050 "(Various platforms where the page size is not 4096 bytes.)  I<offset * 4096> "
6051 "is not a multiple of the system page size."
6052 msgstr ""
6053 "(ページサイズが 4096 バイトでないプラットフォームにおいて)  I<offset * 4096> "
6054 "がシステムのページサイズの倍数ではない。"
6055
6056 #. type: Plain text
6057 #: build/C/man2/mmap2.2:74
6058 msgid "B<mmap2>()  can also return any of the errors described in B<mmap>(2)."
6059 msgstr "B<mmap2>() は B<mmap>(2) に載っているエラーを返すこともある。"
6060
6061 #. type: Plain text
6062 #: build/C/man2/mmap2.2:77
6063 msgid "B<mmap2>()  is available since Linux 2.3.31."
6064 msgstr "B<mmap2>()  は、Linux 2.3.31 以降で使用可能である。"
6065
6066 #. type: Plain text
6067 #: build/C/man2/mmap2.2:79 build/C/man2/subpage_prot.2:98
6068 msgid "This system call is Linux-specific."
6069 msgstr "このシステムコールは Linux 独自である。"
6070
6071 #. type: Plain text
6072 #: build/C/man2/mmap2.2:85
6073 msgid ""
6074 "Nowadays, the glibc B<mmap>()  wrapper function invokes this system call "
6075 "rather than the B<mmap>(2)  system call."
6076 msgstr ""
6077 "現在では、glibc の B<mmap>()  のラッパー関数は、 B<mmap>(2)  システムコールで"
6078 "はなく、このシステムコール (B<mmap2>(2))  を起動する。"
6079
6080 #.  ia64 can have page sizes ranging from 4kB to 64kB.
6081 #.  On cris, it looks like the unit might also be the page size,
6082 #.  which is 8192 bytes. -- mtk, June 2007
6083 #. type: Plain text
6084 #: build/C/man2/mmap2.2:92
6085 msgid ""
6086 "On ia64, the unit for I<offset> is actually the system page size, rather "
6087 "than 4096 bytes."
6088 msgstr ""
6089 "ia64 では、 I<offset> の単位は、実際にはシステムのページサイズであり、 4096 "
6090 "バイトではない。"
6091
6092 #. type: Plain text
6093 #: build/C/man2/mmap2.2:98
6094 msgid ""
6095 "B<getpagesize>(2), B<mmap>(2), B<mremap>(2), B<msync>(2), B<shm_open>(3)"
6096 msgstr ""
6097 "B<getpagesize>(2), B<mmap>(2), B<mremap>(2), B<msync>(2), B<shm_open>(3)"
6098
6099 #. type: TH
6100 #: build/C/man2/mprotect.2:38
6101 #, no-wrap
6102 msgid "MPROTECT"
6103 msgstr "MPROTECT"
6104
6105 #. type: TH
6106 #: build/C/man2/mprotect.2:38
6107 #, no-wrap
6108 msgid "2012-08-14"
6109 msgstr "2012-08-14"
6110
6111 #. type: Plain text
6112 #: build/C/man2/mprotect.2:41
6113 msgid "mprotect - set protection on a region of memory"
6114 msgstr "mprotect - メモリ領域の保護を設定する"
6115
6116 #. type: Plain text
6117 #: build/C/man2/mprotect.2:46
6118 #, no-wrap
6119 msgid "B<int mprotect(void *>I<addr>B<, size_t >I<len>B<, int >I<prot>B<);>\n"
6120 msgstr "B<int mprotect(void *>I<addr>B<, size_t >I<len>B<, int >I<prot>B<);>\n"
6121
6122 #. type: Plain text
6123 #: build/C/man2/mprotect.2:54
6124 msgid ""
6125 "B<mprotect>()  changes protection for the calling process's memory page(s)  "
6126 "containing any part of the address range in the interval [I<addr>,\\ I<addr>"
6127 "+I<len>-1].  I<addr> must be aligned to a page boundary."
6128 msgstr ""
6129 "B<mprotect>()  は、区間 [I<addr>,\\ I<addr>+I<len>-1] のアドレス範囲を含む 呼"
6130 "び出し元のプロセスのメモリページのアクセス保護を変更する。 I<addr> はページ境"
6131 "界に一致していなければならない。"
6132
6133 #. type: Plain text
6134 #: build/C/man2/mprotect.2:59
6135 msgid ""
6136 "If the calling process tries to access memory in a manner that violates the "
6137 "protection, then the kernel generates a B<SIGSEGV> signal for the process."
6138 msgstr ""
6139 "呼び出し元のプロセスがアクセス保護に違反するようなメモリアクセスを 行おうとす"
6140 "ると、カーネルはシグナル B<SIGSEGV> をそのプロセスに対して生成する。"
6141
6142 #. type: Plain text
6143 #: build/C/man2/mprotect.2:64
6144 msgid ""
6145 "I<prot> is either B<PROT_NONE> or a bitwise-or of the other values in the "
6146 "following list:"
6147 msgstr ""
6148 "I<prot> には、 B<PROT_NONE> か、以下のリストの B<PROT_NONE> 以外の値をビット"
6149 "毎の論理和 (bitwize-or) で指定する:"
6150
6151 #. type: Plain text
6152 #: build/C/man2/mprotect.2:67
6153 msgid "The memory cannot be accessed at all."
6154 msgstr "そのメモリには全くアクセスできない。"
6155
6156 #. type: Plain text
6157 #: build/C/man2/mprotect.2:70
6158 msgid "The memory can be read."
6159 msgstr "そのメモリを読み取ることができる。"
6160
6161 #. type: Plain text
6162 #: build/C/man2/mprotect.2:73
6163 msgid "The memory can be modified."
6164 msgstr "そのメモリを変更できる。"
6165
6166 #.  FIXME
6167 #.  Document PROT_GROWSUP and PROT_GROWSDOWN
6168 #. type: Plain text
6169 #: build/C/man2/mprotect.2:78
6170 msgid "The memory can be executed."
6171 msgstr "そのメモリは実行可能である。"
6172
6173 #. type: Plain text
6174 #: build/C/man2/mprotect.2:85
6175 msgid ""
6176 "On success, B<mprotect>()  returns zero.  On error, -1 is returned, and "
6177 "I<errno> is set appropriately."
6178 msgstr ""
6179 "成功した場合、 B<mprotect>()  は 0 を返す。エラーの場合は -1 が返り、 "
6180 "I<errno> が適切に設定される。"
6181
6182 #. type: Plain text
6183 #: build/C/man2/mprotect.2:95
6184 msgid ""
6185 "The memory cannot be given the specified access.  This can happen, for "
6186 "example, if you B<mmap>(2)  a file to which you have read-only access, then "
6187 "ask B<mprotect>()  to mark it B<PROT_WRITE>."
6188 msgstr ""
6189 "指定されたアクセスをメモリに設定することができない。 これは、例えば ファイル"
6190 "を読み取り専用で B<mmap>(2)  しており、その領域に対して B<mprotect>()  を呼び"
6191 "出して B<PROT_WRITE> に設定しようとした場合に発生する。"
6192
6193 #.  Or: both PROT_GROWSUP and PROT_GROWSDOWN were specified in 'prot'.
6194 #. type: Plain text
6195 #: build/C/man2/mprotect.2:100
6196 msgid ""
6197 "I<addr> is not a valid pointer, or not a multiple of the system page size."
6198 msgstr ""
6199 "I<addr> が有効なポインタでないか、 システムのページサイズの倍数でない。"
6200
6201 #. type: Plain text
6202 #: build/C/man2/mprotect.2:103
6203 msgid "Internal kernel structures could not be allocated."
6204 msgstr "カーネル内部の構造体を割り当てることができなかった。"
6205
6206 #. type: Plain text
6207 #: build/C/man2/mprotect.2:113
6208 msgid ""
6209 "Addresses in the range [I<addr>, I<addr>+I<len>-1] are invalid for the "
6210 "address space of the process, or specify one or more pages that are not "
6211 "mapped.  (Before kernel 2.4.19, the error B<EFAULT> was incorrectly produced "
6212 "for these cases.)"
6213 msgstr ""
6214 "[I<addr>, I<addr>+I<len>-1] という範囲のアドレスがプロセスのアドレス空間とし"
6215 "て不正であるか、 その範囲のアドレスがマップされていない 1 つ以上のページを指"
6216 "している (カーネル 2.4.19 より前では、この状況でエラー B<EFAULT> が間違って生"
6217 "成されていた)。"
6218
6219 #.  SVr4 defines an additional error
6220 #.  code EAGAIN. The SVr4 error conditions don't map neatly onto Linux's.
6221 #. type: Plain text
6222 #: build/C/man2/mprotect.2:122
6223 msgid ""
6224 "SVr4, POSIX.1-2001.  POSIX says that the behavior of B<mprotect>()  is "
6225 "unspecified if it is applied to a region of memory that was not obtained via "
6226 "B<mmap>(2)."
6227 msgstr ""
6228 "SVr4, POSIX.1-2001.  POSIX では、 B<mmap>(2)  経由で獲得していないメモリ領域"
6229 "に対して B<mprotect>()  を行った場合の B<mprotect>()  の動作は未定義であると"
6230 "されている。"
6231
6232 #. type: Plain text
6233 #: build/C/man2/mprotect.2:129
6234 msgid ""
6235 "On Linux it is always permissible to call B<mprotect>()  on any address in a "
6236 "process's address space (except for the kernel vsyscall area).  In "
6237 "particular it can be used to change existing code mappings to be writable."
6238 msgstr ""
6239 "Linux では、(カーネル vsyscall 領域以外の)  任意のプロセスアドレス空間に対し"
6240 "て B<mprotect>()  を呼び出すことが、常に許されている。 これは特に既存のコード"
6241 "マッピングを書き込み可能にするために使われる。"
6242
6243 #. type: Plain text
6244 #: build/C/man2/mprotect.2:139
6245 msgid ""
6246 "Whether B<PROT_EXEC> has any effect different from B<PROT_READ> is "
6247 "architecture- and kernel version-dependent.  On some hardware architectures "
6248 "(e.g., i386), B<PROT_WRITE> implies B<PROT_READ>."
6249 msgstr ""
6250 "B<PROT_EXEC> が B<PROT_READ> と異なる影響を持つか否かは、アーキテクチャとカー"
6251 "ネルのバージョンに依存する。 (i386 などの) いくつかのアーキテクチャでは、 "
6252 "B<PROT_WRITE> をセットすると、暗黙のうちに B<PROT_READ> がセットされる。"
6253
6254 #. type: Plain text
6255 #: build/C/man2/mprotect.2:148
6256 msgid ""
6257 "POSIX.1-2001 says that an implementation may permit access other than that "
6258 "specified in I<prot>, but at a minimum can only allow write access if "
6259 "B<PROT_WRITE> has been set, and must not allow any access if B<PROT_NONE> "
6260 "has been set."
6261 msgstr ""
6262 "POSIX.1-2001 では、 I<prot> で指定されていないアクセスを許可する実装を認めて"
6263 "いる。 ただし、最低限、 B<PROT_WRITE> がセットされている場合にのみ書き込みア"
6264 "クセスが許可され、 B<PROT_NONE> がセットされている場合にはアクセスは許可され"
6265 "ない点だけは 満たす必要がある。"
6266
6267 #. type: Plain text
6268 #: build/C/man2/mprotect.2:154
6269 msgid ""
6270 "The program below allocates four pages of memory, makes the third of these "
6271 "pages read-only, and then executes a loop that walks upward through the "
6272 "allocated region modifying bytes."
6273 msgstr ""
6274 "以下のプログラムは、メモリページを 4つ確保し、そのうち 3番目のページを 読み込"
6275 "み専用に設定する。その後で、確保した領域のアドレスの小さい方から 大きな方に向"
6276 "かって順番にバイト値を変更するループを実行する。"
6277
6278 #. type: Plain text
6279 #: build/C/man2/mprotect.2:157
6280 msgid ""
6281 "An example of what we might see when running the program is the following:"
6282 msgstr "プログラムを実行した場合の一例を以下に示す。"
6283
6284 #. type: Plain text
6285 #: build/C/man2/mprotect.2:163
6286 #, no-wrap
6287 msgid ""
6288 "$B< ./a.out>\n"
6289 "Start of region:        0x804c000\n"
6290 "Got SIGSEGV at address: 0x804e000\n"
6291 msgstr ""
6292 "$B< ./a.out>\n"
6293 "Start of region:        0x804c000\n"
6294 "Got SIGSEGV at address: 0x804e000\n"
6295
6296 #. type: Plain text
6297 #: build/C/man2/mprotect.2:175
6298 #, no-wrap
6299 msgid ""
6300 "#include E<lt>unistd.hE<gt>\n"
6301 "#include E<lt>signal.hE<gt>\n"
6302 "#include E<lt>stdio.hE<gt>\n"
6303 "#include E<lt>malloc.hE<gt>\n"
6304 "#include E<lt>stdlib.hE<gt>\n"
6305 "#include E<lt>errno.hE<gt>\n"
6306 "#include E<lt>sys/mman.hE<gt>\n"
6307 msgstr ""
6308 "#include E<lt>unistd.hE<gt>\n"
6309 "#include E<lt>signal.hE<gt>\n"
6310 "#include E<lt>stdio.hE<gt>\n"
6311 "#include E<lt>malloc.hE<gt>\n"
6312 "#include E<lt>stdlib.hE<gt>\n"
6313 "#include E<lt>errno.hE<gt>\n"
6314 "#include E<lt>sys/mman.hE<gt>\n"
6315
6316 #. type: Plain text
6317 #: build/C/man2/mprotect.2:180
6318 #, no-wrap
6319 msgid "char *buffer;\n"
6320 msgstr "char *buffer;\n"
6321
6322 #. type: Plain text
6323 #: build/C/man2/mprotect.2:188
6324 #, no-wrap
6325 msgid ""
6326 "static void\n"
6327 "handler(int sig, siginfo_t *si, void *unused)\n"
6328 "{\n"
6329 "    printf(\"Got SIGSEGV at address: 0x%lx\\en\",\n"
6330 "            (long) si-E<gt>si_addr);\n"
6331 "    exit(EXIT_FAILURE);\n"
6332 "}\n"
6333 msgstr ""
6334 "static void\n"
6335 "handler(int sig, siginfo_t *si, void *unused)\n"
6336 "{\n"
6337 "    printf(\"Got SIGSEGV at address: 0x%lx\\en\",\n"
6338 "            (long) si-E<gt>si_addr);\n"
6339 "    exit(EXIT_FAILURE);\n"
6340 "}\n"
6341
6342 #. type: Plain text
6343 #: build/C/man2/mprotect.2:195
6344 #, no-wrap
6345 msgid ""
6346 "int\n"
6347 "main(int argc, char *argv[])\n"
6348 "{\n"
6349 "    char *p;\n"
6350 "    int pagesize;\n"
6351 "    struct sigaction sa;\n"
6352 msgstr ""
6353 "int\n"
6354 "main(void)\n"
6355 "{\n"
6356 "    char *p;\n"
6357 "    int pagesize;\n"
6358 "    struct sigaction sa;\n"
6359
6360 #. type: Plain text
6361 #: build/C/man2/mprotect.2:201
6362 #, no-wrap
6363 msgid ""
6364 "    sa.sa_flags = SA_SIGINFO;\n"
6365 "    sigemptyset(&sa.sa_mask);\n"
6366 "    sa.sa_sigaction = handler;\n"
6367 "    if (sigaction(SIGSEGV, &sa, NULL) == -1)\n"
6368 "        handle_error(\"sigaction\");\n"
6369 msgstr ""
6370 "    sa.sa_flags = SA_SIGINFO;\n"
6371 "    sigemptyset(&sa.sa_mask);\n"
6372 "    sa.sa_sigaction = handler;\n"
6373 "    if (sigaction(SIGSEGV, &sa, NULL) == -1)\n"
6374 "        handle_error(\"sigaction\");\n"
6375
6376 #. type: Plain text
6377 #: build/C/man2/mprotect.2:205
6378 #, no-wrap
6379 msgid ""
6380 "    pagesize = sysconf(_SC_PAGE_SIZE);\n"
6381 "    if (pagesize == -1)\n"
6382 "        handle_error(\"sysconf\");\n"
6383 msgstr ""
6384 "    pagesize = sysconf(_SC_PAGE_SIZE);\n"
6385 "    if (pagesize == -1)\n"
6386 "        handle_error(\"sysconf\");\n"
6387
6388 #. type: Plain text
6389 #: build/C/man2/mprotect.2:208
6390 #, no-wrap
6391 msgid ""
6392 "    /* Allocate a buffer aligned on a page boundary;\n"
6393 "       initial protection is PROT_READ | PROT_WRITE */\n"
6394 msgstr ""
6395 "    /* Allocate a buffer aligned on a page boundary;\n"
6396 "       initial protection is PROT_READ | PROT_WRITE */\n"
6397
6398 #. type: Plain text
6399 #: build/C/man2/mprotect.2:212
6400 #, no-wrap
6401 msgid ""
6402 "    buffer = memalign(pagesize, 4 * pagesize);\n"
6403 "    if (buffer == NULL)\n"
6404 "        handle_error(\"memalign\");\n"
6405 msgstr ""
6406 "    buffer = memalign(pagesize, 4 * pagesize);\n"
6407 "    if (buffer == NULL)\n"
6408 "        handle_error(\"memalign\");\n"
6409
6410 #. type: Plain text
6411 #: build/C/man2/mprotect.2:214
6412 #, no-wrap
6413 msgid "    printf(\"Start of region:        0x%lx\\en\", (long) buffer);\n"
6414 msgstr "    printf(\"Start of region:        0x%lx\\en\", (long) buffer);\n"
6415
6416 #. type: Plain text
6417 #: build/C/man2/mprotect.2:218
6418 #, no-wrap
6419 msgid ""
6420 "    if (mprotect(buffer + pagesize * 2, pagesize,\n"
6421 "                PROT_READ) == -1)\n"
6422 "        handle_error(\"mprotect\");\n"
6423 msgstr ""
6424 "    if (mprotect(buffer + pagesize * 2, pagesize,\n"
6425 "                PROT_READ) == -1)\n"
6426 "        handle_error(\"mprotect\");\n"
6427
6428 #. type: Plain text
6429 #: build/C/man2/mprotect.2:221
6430 #, no-wrap
6431 msgid ""
6432 "    for (p = buffer ; ; )\n"
6433 "        *(p++) = \\(aqa\\(aq;\n"
6434 msgstr ""
6435 "    for (p = buffer ; ; )\n"
6436 "        *(p++) = \\(aqa\\(aq;\n"
6437
6438 #. type: Plain text
6439 #: build/C/man2/mprotect.2:225
6440 #, no-wrap
6441 msgid ""
6442 "    printf(\"Loop completed\\en\");     /* Should never happen */\n"
6443 "    exit(EXIT_SUCCESS);\n"
6444 "}\n"
6445 msgstr ""
6446 "    printf(\"Loop completed\\en\");     /* Should never happen */\n"
6447 "    exit(EXIT_SUCCESS);\n"
6448 "}\n"
6449
6450 #. type: Plain text
6451 #: build/C/man2/mprotect.2:229
6452 msgid "B<mmap>(2), B<sysconf>(3)"
6453 msgstr "B<mmap>(2), B<sysconf>(3)"
6454
6455 #. type: TH
6456 #: build/C/man2/mremap.2:30
6457 #, no-wrap
6458 msgid "MREMAP"
6459 msgstr "MREMAP"
6460
6461 #. type: TH
6462 #: build/C/man2/mremap.2:30
6463 #, no-wrap
6464 msgid "2010-06-10"
6465 msgstr "2010-06-10"
6466
6467 #. type: Plain text
6468 #: build/C/man2/mremap.2:33
6469 msgid "mremap - remap a virtual memory address"
6470 msgstr "mremap - 仮想メモリ・アドレスを再マッピングする"
6471
6472 #. type: Plain text
6473 #: build/C/man2/mremap.2:36
6474 #, no-wrap
6475 msgid "B<#define _GNU_SOURCE>         /* See feature_test_macros(7) */\n"
6476 msgstr "B<#define _GNU_SOURCE>         /* feature_test_macros(7) 参照 */\n"
6477
6478 #. type: Plain text
6479 #: build/C/man2/mremap.2:41
6480 #, no-wrap
6481 msgid ""
6482 "B<void *mremap(void *>I<old_address>B<, size_t >I<old_size>B<,>\n"
6483 "B<             size_t >I<new_size>B<, int >I<flags>B<, ... /* void *>I<new_address>B< */);>\n"
6484 msgstr ""
6485 "B<void *mremap(void *>I<old_address>B<, size_t >I<old_size>B<,>\n"
6486 "B<             size_t >I<new_size>B<, int >I<flags>B<, ... /* void *>I<new_address>B< */);>\n"
6487
6488 #. type: Plain text
6489 #: build/C/man2/mremap.2:47
6490 msgid ""
6491 "B<mremap>()  expands (or shrinks) an existing memory mapping, potentially "
6492 "moving it at the same time (controlled by the I<flags> argument and the "
6493 "available virtual address space)."
6494 msgstr ""
6495 "B<mremap>()  は既存のメモリ・マッピングの拡張 (または縮小) を行う。 同時に移"
6496 "動されることもある (I<flags> 引き数と利用可能な仮想アドレス空間によって決ま"
6497 "る)。"
6498
6499 #. type: Plain text
6500 #: build/C/man2/mremap.2:61
6501 msgid ""
6502 "I<old_address> is the old address of the virtual memory block that you want "
6503 "to expand (or shrink).  Note that I<old_address> has to be page aligned.  "
6504 "I<old_size> is the old size of the virtual memory block.  I<new_size> is the "
6505 "requested size of the virtual memory block after the resize.  An optional "
6506 "fifth argument, I<new_address>, may be provided; see the description of "
6507 "B<MREMAP_FIXED> below."
6508 msgstr ""
6509 "I<old_address> は拡張 (または縮小) しようとする仮想メモリ・ブロック の元のア"
6510 "ドレスである。I<old_address> はページ境界に合っていなければ ならない点に注意"
6511 "すること。I<old_size> は元の仮想メモリ・ブロックの サイズである。 "
6512 "I<new_size> は要求する変更後の仮想メモリ・ブロックのサイズである。 5 番目の引"
6513 "き数として I<new_address> を指定することができる。下記の B<MREMAP_FIXED> の説"
6514 "明を参照のこと。"
6515
6516 #. type: Plain text
6517 #: build/C/man2/mremap.2:73
6518 msgid ""
6519 "In Linux the memory is divided into pages.  A user process has (one or)  "
6520 "several linear virtual memory segments.  Each virtual memory segment has one "
6521 "or more mappings to real memory pages (in the page table).  Each virtual "
6522 "memory segment has its own protection (access rights), which may cause a "
6523 "segmentation violation if the memory is accessed incorrectly (e.g., writing "
6524 "to a read-only segment).  Accessing virtual memory outside of the segments "
6525 "will also cause a segmentation violation."
6526 msgstr ""
6527 "Linux ではメモリはページに分割される。ユーザー・プロセスは (一つまたは)  複数"
6528 "のリニアな仮想メモリセグメントを持つ。 それぞれの仮想メモリセグメントは一つ以"
6529 "上の実メモリ・ページ にマッピングされている (マッピング情報はページ・テーブル"
6530 "で管理される)。 仮想メモリセグメントにはセグメント毎の保護 (アクセス権) が設"
6531 "定されており、 メモリが不正にアクセスされた場合 (例えば読み込み専用のセグメン"
6532 "トに 書き込んだ場合)、セグメンテーション侵害 (segmentation violation) を 引き"
6533 "起こす。また、セグメント外の仮想メモリにアクセスした場合にも セグメンテーショ"
6534 "ン侵害が発生する。"
6535
6536 #. type: Plain text
6537 #: build/C/man2/mremap.2:81
6538 msgid ""
6539 "B<mremap>()  uses the Linux page table scheme.  B<mremap>()  changes the "
6540 "mapping between virtual addresses and memory pages.  This can be used to "
6541 "implement a very efficient B<realloc>(3)."
6542 msgstr ""
6543 "B<mremap>()  は Linux のページ・テーブル方式を使用する。 B<mremap>()  は仮想"
6544 "アドレスとメモリ・ページのマッピングを変更する。これは非常に効率的な "
6545 "B<realloc>(3)  を実装するのに使用されている。"
6546
6547 #. type: Plain text
6548 #: build/C/man2/mremap.2:83
6549 msgid "The I<flags> bit-mask argument may be 0, or include the following flag:"
6550 msgstr "I<flags> ビットマスク引数は 0 または以下のフラグを含む:"
6551
6552 #. type: TP
6553 #: build/C/man2/mremap.2:83
6554 #, no-wrap
6555 msgid "B<MREMAP_MAYMOVE>"
6556 msgstr "B<MREMAP_MAYMOVE>"
6557
6558 #. type: Plain text
6559 #: build/C/man2/mremap.2:95
6560 msgid ""
6561 "By default, if there is not sufficient space to expand a mapping at its "
6562 "current location, then B<mremap>()  fails.  If this flag is specified, then "
6563 "the kernel is permitted to relocate the mapping to a new virtual address, if "
6564 "necessary.  If the mapping is relocated, then absolute pointers into the old "
6565 "mapping location become invalid (offsets relative to the starting address of "
6566 "the mapping should be employed)."
6567 msgstr ""
6568 "デフォルトでは、現在の位置にマッピングを拡張するための 十分な空きがなければ "
6569 "B<mremap>()  は失敗する。 このフラグが指定されると、カーネルは必要があれば"
6570 "マッピングを 新しい仮想アドレスに再配置することができる マッピングが再配置さ"
6571 "れると、古いマッピング位置への絶対ポインタは 無効になる (マッピングの開始アド"
6572 "レスからの相対オフセットは有効のままである)。"
6573
6574 #. type: TP
6575 #: build/C/man2/mremap.2:95
6576 #, no-wrap
6577 msgid "B<MREMAP_FIXED> (since Linux 2.3.31)"
6578 msgstr "B<MREMAP_FIXED> (Linux 2.3.31 以降)"
6579
6580 #. type: Plain text
6581 #: build/C/man2/mremap.2:117
6582 msgid ""
6583 "This flag serves a similar purpose to the B<MAP_FIXED> flag of B<mmap>(2).  "
6584 "If this flag is specified, then B<mremap>()  accepts a fifth argument, "
6585 "I<void *new_address>, which specifies a page-aligned address to which the "
6586 "mapping must be moved.  Any previous mapping at the address range specified "
6587 "by I<new_address> and I<new_size> is unmapped.  If B<MREMAP_FIXED> is "
6588 "specified, then B<MREMAP_MAYMOVE> must also be specified."
6589 msgstr ""
6590 "このフラグは B<mmap>(2)  の B<MAP_FIXED> フラグと似たような目的で用いられ"
6591 "る。 このフラグが指定されると、 B<mremap>()  は 5 番目の引き数 I<void "
6592 "*new_address> を受け取り、この引数はマッピングが移動されるべきアドレスを指定"
6593 "する。 このアドレスはページ境界に合っていなければならない。 I<new_address> "
6594 "と I<new_size> で指定されるアドレス範囲に過去のマッピングがあった場合、 その"
6595 "マッピングはアンマップされる (unmapped)。 B<MREMAP_FIXED> を指定した場合は、 "
6596 "B<MREMAP_MAYMOVE> も指定しなければならない。"
6597
6598 #. type: Plain text
6599 #: build/C/man2/mremap.2:127
6600 msgid ""
6601 "If the memory segment specified by I<old_address> and I<old_size> is locked "
6602 "(using B<mlock>(2)  or similar), then this lock is maintained when the "
6603 "segment is resized and/or relocated.  As a consequence, the amount of memory "
6604 "locked by the process may change."
6605 msgstr ""
6606 "I<old_address> と I<old_size> で指定されるメモリセグメントが (B<mlock>(2)  や"
6607 "同様のもので) ロックされている場合、セグメントのサイズが変わったり 再配置され"
6608 "たりした時にロックも維持される。 その結果、プロセスによってロックされるメモリ"
6609 "の量は変化する。"
6610
6611 #. type: Plain text
6612 #: build/C/man2/mremap.2:135
6613 msgid ""
6614 "On success B<mremap>()  returns a pointer to the new virtual memory area.  "
6615 "On error, the value B<MAP_FAILED> (that is, I<(void\\ *)\\ -1>) is returned, "
6616 "and I<errno> is set appropriately."
6617 msgstr ""
6618 "成功した場合は B<mremap>()  は新しい仮想メモリ領域へのポインタを返す。 エラー"
6619 "の場合は B<MAP_FAILED> (すなわち I<(void\\ *)\\ -1>) が返され、 I<errno> が適"
6620 "切に設定される。"
6621
6622 #. type: Plain text
6623 #: build/C/man2/mremap.2:142
6624 msgid ""
6625 "The caller tried to expand a memory segment that is locked, but this was not "
6626 "possible without exceeding the B<RLIMIT_MEMLOCK> resource limit."
6627 msgstr ""
6628 "呼び出し元がロックされているメモリセグメントを拡張しようとしたが、 "
6629 "B<RLIMIT_MEMLOCK> リソース制限を越えずにこれを行うことができない。"
6630
6631 #. type: Plain text
6632 #: build/C/man2/mremap.2:151
6633 msgid ""
6634 "\"Segmentation fault.\" Some address in the range I<old_address> to "
6635 "I<old_address>+I<old_size> is an invalid virtual memory address for this "
6636 "process.  You can also get B<EFAULT> even if there exist mappings that cover "
6637 "the whole address space requested, but those mappings are of different types."
6638 msgstr ""
6639 "「セグメンテーション違反(segmentation fault)」 I<old_address> から "
6640 "I<old_address>+I<old_size> の 範囲のアドレスのどれかがこのプロセスにおいて不"
6641 "正な仮想メモリ・アドレスである。 たとえ要求したアドレス空間全体を含むような"
6642 "マッピングがあったとしても、 それらのマッピングが異なった型ならば B<EFAULT> "
6643 "を受け取るだろう。"
6644
6645 #. type: Plain text
6646 #: build/C/man2/mremap.2:179
6647 msgid ""
6648 "An invalid argument was given.  Possible causes are: I<old_address> was not "
6649 "page aligned; a value other than B<MREMAP_MAYMOVE> or B<MREMAP_FIXED> was "
6650 "specified in I<flags>; I<new_size> was zero; I<new_size> or I<new_address> "
6651 "was invalid; or the new address range specified by I<new_address> and "
6652 "I<new_size> overlapped the old address range specified by I<old_address> and "
6653 "I<old_size>; or B<MREMAP_FIXED> was specified without also specifying "
6654 "B<MREMAP_MAYMOVE>."
6655 msgstr ""
6656 "不正な引き数が与えられた。 可能性のある原因は以下の通りである: たいていは "
6657 "I<old_address> がページ境界に 合ってない; I<flags> に B<MREMAP_MAYMOVE> また"
6658 "は B<MREMAP_FIXED> 以外の値が指定されている; I<new_size> がゼロ; I<new_size> "
6659 "または I<new_address> の値が不正; I<new_address> と I<new_size> で指定される"
6660 "新しいアドレス範囲が I<old_address> と I<old_size> で指定される古いアドレス範"
6661 "囲と重なっている; B<MREMAP_FIXED> が指定されているが B<MREMAP_MAYMOVE> が指定"
6662 "されていない。"
6663
6664 #. type: Plain text
6665 #: build/C/man2/mremap.2:185
6666 msgid ""
6667 "The memory area cannot be expanded at the current virtual address, and the "
6668 "B<MREMAP_MAYMOVE> flag is not set in I<flags>.  Or, there is not enough "
6669 "(virtual) memory available."
6670 msgstr ""
6671 "現在の仮想アドレスではメモリ領域が拡張できず、 B<MREMAP_MAYMOVE> フラグが "
6672 "I<flags> に設定されていない。 または十分な (仮想) メモリが存在しない。"
6673
6674 #.  4.2BSD had a (never actually implemented)
6675 #.  .BR mremap (2)
6676 #.  call with completely different semantics.
6677 #. type: Plain text
6678 #: build/C/man2/mremap.2:191
6679 msgid ""
6680 "This call is Linux-specific, and should not be used in programs intended to "
6681 "be portable."
6682 msgstr ""
6683 "このコールは Linux 特有であり、移植を意図したプログラムで 使用すべきではな"
6684 "い。"
6685
6686 #. type: Plain text
6687 #: build/C/man2/mremap.2:199
6688 msgid ""
6689 "Prior to version 2.4, glibc did not expose the definition of "
6690 "B<MREMAP_FIXED>, and the prototype for B<mremap>()  did not allow for the "
6691 "I<new_address> argument."
6692 msgstr ""
6693 "バージョン 2.4 より前の glibc では、 B<MREMAP_FIXED> の定義は公開されておら"
6694 "ず、 B<mremap>()  のプロトタイプは I<new_address> 引き数を取らなかった。"
6695
6696 #. type: Plain text
6697 #: build/C/man2/mremap.2:208
6698 msgid ""
6699 "B<brk>(2), B<getpagesize>(2), B<getrlimit>(2), B<mlock>(2), B<mmap>(2), "
6700 "B<sbrk>(2), B<malloc>(3), B<realloc>(3)"
6701 msgstr ""
6702 "B<brk>(2), B<getpagesize>(2), B<getrlimit>(2), B<mlock>(2), B<mmap>(2), "
6703 "B<sbrk>(2), B<realloc>(3), B<malloc>(3)"
6704
6705 #. type: Plain text
6706 #: build/C/man2/mremap.2:214
6707 msgid ""
6708 "Your favorite text book on operating systems for more information on paged "
6709 "memory (e.g., I<Modern Operating Systems> by Andrew S. Tanenbaum, I<Inside "
6710 "Linux> by Randolf Bentson, I<The Design of the UNIX Operating System> by "
6711 "Maurice J. Bach)"
6712 msgstr "ページ分割されたメモリについてもっと詳しく知りたいならば、あなたのお気に入りのオペレーティングシステムの教科書を参照してほしい (例えば、 I<Modern Operating Systems> by Andrew S. Tanenbaum, I<Inside Linux> by Randolf Bentson, I<The Design of the UNIX Operating System> by Maurice J. Bach.)"
6713
6714 #. type: TH
6715 #: build/C/man2/msync.2:25
6716 #, no-wrap
6717 msgid "MSYNC"
6718 msgstr "MSYNC"
6719
6720 #. type: TH
6721 #: build/C/man2/msync.2:25 build/C/man2/remap_file_pages.2:28
6722 #, no-wrap
6723 msgid "2008-04-22"
6724 msgstr "2008-04-22"
6725
6726 #. type: Plain text
6727 #: build/C/man2/msync.2:28
6728 msgid "msync - synchronize a file with a memory map"
6729 msgstr "msync - ファイルをマップしたメモリと同期させる"
6730
6731 #. type: Plain text
6732 #: build/C/man2/msync.2:32
6733 msgid "B<int msync(void *>I<addr>B<, size_t >I<length>B<, int >I<flags>B<);>"
6734 msgstr "B<int msync(void *>I<addr>B<, size_t >I<length>B<, int >I<flags>B<);>"
6735
6736 #. type: Plain text
6737 #: build/C/man2/msync.2:48
6738 msgid ""
6739 "B<msync>()  flushes changes made to the in-core copy of a file that was "
6740 "mapped into memory using B<mmap>(2)  back to disk.  Without use of this call "
6741 "there is no guarantee that changes are written back before B<munmap>(2)  is "
6742 "called.  To be more precise, the part of the file that corresponds to the "
6743 "memory area starting at I<addr> and having length I<length> is updated."
6744 msgstr ""
6745 "B<msync>()  は B<mmap>(2)  を使ってメモリにマップされたファイルの、 メモリ上"
6746 "のコピーになされた変更をディスクに反映させる。 この関数を使用しないと、 "
6747 "B<munmap>(2)  が呼び出されるまで変更が書き戻される保証はない。 より正確には、"
6748 "ファイルのうち I<addr> から始まり長さ I<length> のメモリ領域に対応する部分が"
6749 "更新される。"
6750
6751 #. type: Plain text
6752 #: build/C/man2/msync.2:68
6753 msgid ""
6754 "The I<flags> argument may have the bits B<MS_ASYNC>, B<MS_SYNC>, and "
6755 "B<MS_INVALIDATE> set, but not both B<MS_ASYNC> and B<MS_SYNC>.  B<MS_ASYNC> "
6756 "specifies that an update be scheduled, but the call returns immediately.  "
6757 "B<MS_SYNC> asks for an update and waits for it to complete.  "
6758 "B<MS_INVALIDATE> asks to invalidate other mappings of the same file (so that "
6759 "they can be updated with the fresh values just written)."
6760 msgstr ""
6761 "I<flags> 引数にはビット B<MS_ASYNC>, B<MS_SYNC>, B<MS_INVALIDATE> を設定する"
6762 "ことができるが、 B<MS_ASYNC> と B<MS_SYNC> を同時に指定することはできない。 "
6763 "B<MS_ASYNC> は更新を予定に組み込むことを表し、呼び出しは直ちに返る。 "
6764 "B<MS_SYNC> は更新を要求し、更新が完了するまで待つ。 B<MS_INVALIDATE> は(たっ"
6765 "た今書き込んだ新しい値でマッピングを更新することができるように)  同じファイル"
6766 "に対する他のマッピングを無効にすることを要求する。"
6767
6768 #. type: Plain text
6769 #: build/C/man2/msync.2:73
6770 msgid ""
6771 "On success, zero is returned.  On error, -1 is returned, and I<errno> is set "
6772 "appropriately."
6773 msgstr ""
6774 "成功した場合、 0 が返る。エラーの場合、 -1 が返り、 I<errno> が適切に設定され"
6775 "る。"
6776
6777 #. type: TP
6778 #: build/C/man2/msync.2:74
6779 #, no-wrap
6780 msgid "B<EBUSY>"
6781 msgstr "B<EBUSY>"
6782
6783 #. type: Plain text
6784 #: build/C/man2/msync.2:80
6785 msgid ""
6786 "B<MS_INVALIDATE> was specified in I<flags>, and a memory lock exists for the "
6787 "specified address range."
6788 msgstr ""
6789 "I flags に B<MS_INVALIDATE> が指定されたが、指定されたアドレス範囲にロックが"
6790 "存在する。"
6791
6792 #. type: Plain text
6793 #: build/C/man2/msync.2:93
6794 msgid ""
6795 "I<addr> is not a multiple of PAGESIZE; or any bit other than B<MS_ASYNC> | "
6796 "B<MS_INVALIDATE> | B<MS_SYNC> is set in I<flags>; or both B<MS_SYNC> and "
6797 "B<MS_ASYNC> are set in I<flags>."
6798 msgstr ""
6799 "I<addr> が PAGESIZE の倍数でない。または、 I<flags> に B<MS_ASYNC>、"
6800 "B<MS_INVALIDATE>、B<MS_SYNC> 以外のビットが設定された。 または、 I<flags> に "
6801 "B<MS_SYNC> と B<MS_ASYNC> の両方が設定された。"
6802
6803 #. type: Plain text
6804 #: build/C/man2/msync.2:96
6805 msgid "The indicated memory (or part of it) was not mapped."
6806 msgstr "指定されたメモリ (またはその一部) がマップされていない。"
6807
6808 #. type: Plain text
6809 #: build/C/man2/msync.2:98 build/C/man3/posix_fallocate.3:105
6810 #: build/C/man3/shm_open.3:251 build/C/man7/shm_overview.7:103
6811 msgid "POSIX.1-2001."
6812 msgstr "POSIX.1-2001."
6813
6814 #. type: Plain text
6815 #: build/C/man2/msync.2:105
6816 msgid ""
6817 "This call was introduced in Linux 1.3.21, and then used B<EFAULT> instead of "
6818 "B<ENOMEM>.  In Linux 2.4.19 this was changed to the POSIX value B<ENOMEM>."
6819 msgstr ""
6820 "この関数は Linux 1.3.21 で導入されたが、 B<ENOMEM> ではなく B<EFAULT> が使わ"
6821 "れていた。 これは Linux 2.4.19 で POSIX における値 B<ENOMEM> に変更された。"
6822
6823 #.  POSIX.1-2001: It shall be defined to -1 or 0 or 200112L.
6824 #.  -1: unavailable, 0: ask using sysconf().
6825 #.  glibc defines them to 1.
6826 #. type: Plain text
6827 #: build/C/man2/msync.2:118
6828 msgid ""
6829 "On POSIX systems on which B<msync>()  is available, both "
6830 "B<_POSIX_MAPPED_FILES> and B<_POSIX_SYNCHRONIZED_IO> are defined in "
6831 "I<E<lt>unistd.hE<gt>> to a value greater than 0.  (See also B<sysconf>(3).)"
6832 msgstr ""
6833 "B<msync>()  が使用可能な POSIX システムでは B<_POSIX_MAPPED_FILES> と "
6834 "B<_POSIX_SYNCHRONIZED_IO> の両方が I<E<lt>unistd.hE<gt>> で 0 より大きい値に"
6835 "定義される。 (B<sysconf>(3)  を参照すること。 )"
6836
6837 #. type: TP
6838 #: build/C/man2/msync.2:120 build/C/man7/shm_overview.7:46
6839 #, no-wrap
6840 msgid "B<mmap>(2)"
6841 msgstr "B<mmap>(2)"
6842
6843 #. type: TH
6844 #: build/C/man3/mtrace.3:25
6845 #, no-wrap
6846 msgid "MTRACE"
6847 msgstr "MTRACE"
6848
6849 #. type: Plain text
6850 #: build/C/man3/mtrace.3:28
6851 msgid "mtrace, muntrace - malloc tracing"
6852 msgstr "mtrace, muntrace - malloc のトレース"
6853
6854 #. type: Plain text
6855 #: build/C/man3/mtrace.3:30
6856 msgid "B<#include E<lt>mcheck.hE<gt>>"
6857 msgstr "B<#include E<lt>mcheck.hE<gt>>"
6858
6859 #. type: Plain text
6860 #: build/C/man3/mtrace.3:32
6861 msgid "B<void mtrace(void);>"
6862 msgstr "B<void mtrace(void);>"
6863
6864 #. type: Plain text
6865 #: build/C/man3/mtrace.3:34
6866 msgid "B<void muntrace(void);>"
6867 msgstr "B<void muntrace(void);>"
6868
6869 #. type: Plain text
6870 #: build/C/man3/mtrace.3:46
6871 msgid ""
6872 "The B<mtrace>()  function installs hook functions for the memory-allocation "
6873 "functions (B<malloc>(3), B<realloc>(3)  B<memalign>(3), B<free>(3)).  These "
6874 "hook functions record tracing information about memory allocation and "
6875 "deallocation.  The tracing information can be used to discover memory leaks "
6876 "and attempts to free nonallocated memory in a program."
6877 msgstr ""
6878
6879 #. type: Plain text
6880 #: build/C/man3/mtrace.3:57
6881 msgid ""
6882 "The B<muntrace>()  function disables the hook functions installed by "
6883 "B<mtrace>(), so that tracing information is no longer recorded for the "
6884 "memory-allocation functions.  If no hook functions were successfully "
6885 "installed by B<mtrace>(), B<muntrace>()  does nothing."
6886 msgstr ""
6887
6888 #. type: Plain text
6889 #: build/C/man3/mtrace.3:65
6890 msgid ""
6891 "When B<mtrace>()  is called, it checks the value of the environment variable "
6892 "B<MALLOC_TRACE>, which should contain the pathname of a file in which the "
6893 "tracing information is to be recorded.  If the pathname is successfully "
6894 "opened, it is truncated to zero length."
6895 msgstr ""
6896
6897 #. type: Plain text
6898 #: build/C/man3/mtrace.3:78
6899 msgid ""
6900 "If B<MALLOC_TRACE> is not set, or the pathname it specifies is invalid or "
6901 "not writable, then no hook functions are installed, and B<mtrace>()  has no "
6902 "effect.  In set-user-ID and set-group-ID programs, B<MALLOC_TRACE> is "
6903 "ignored, and B<mtrace>()  has no effect."
6904 msgstr ""
6905
6906 #. type: Plain text
6907 #: build/C/man3/mtrace.3:86
6908 msgid ""
6909 "In normal usage, B<mtrace>()  is called once at the start of execution of a "
6910 "program, and B<muntrace>()  is never called."
6911 msgstr ""
6912
6913 #. type: Plain text
6914 #: build/C/man3/mtrace.3:96
6915 msgid ""
6916 "The tracing output produced after a call to B<mtrace>()  is textual, but not "
6917 "designed to be human readable.  The GNU C library provides a Perl script, "
6918 "B<mtrace>(1), that interprets the trace log and produces human-readable "
6919 "output.  For best results, the traced program should be compiled with "
6920 "debugging enabled, so that line-number information is recorded in the "
6921 "executable."
6922 msgstr ""
6923
6924 #. type: Plain text
6925 #: build/C/man3/mtrace.3:102
6926 msgid ""
6927 "The tracing performed by B<mtrace>()  incurs a performance penalty (if "
6928 "B<MALLOC_TRACE> points to a valid, writable pathname)."
6929 msgstr ""
6930
6931 #. type: Plain text
6932 #: build/C/man3/mtrace.3:108
6933 msgid ""
6934 "The line-number information produced by B<mtrace>(1)  is not always precise: "
6935 "the line number references may refer to the previous or following (non-"
6936 "blank)  line of the source code."
6937 msgstr ""
6938
6939 #. type: Plain text
6940 #: build/C/man3/mtrace.3:115
6941 msgid ""
6942 "The shell session below demonstrates the use of the B<mtrace>()  function "
6943 "and the B<mtrace>(1)  command in a program that has memory leaks at two "
6944 "different locations.  The demonstration uses the following program:"
6945 msgstr ""
6946
6947 #. type: Plain text
6948 #: build/C/man3/mtrace.3:122
6949 #, no-wrap
6950 msgid ""
6951 "$ B<cat t_mtrace.c>\n"
6952 "#include E<lt>mcheck.hE<gt>\n"
6953 "#include E<lt>stdlib.hE<gt>\n"
6954 "#include E<lt>stdio.hE<gt>\n"
6955 msgstr ""
6956 "$ B<cat t_mtrace.c>\n"
6957 "#include E<lt>mcheck.hE<gt>\n"
6958 "#include E<lt>stdlib.hE<gt>\n"
6959 "#include E<lt>stdio.hE<gt>\n"
6960
6961 #. type: Plain text
6962 #: build/C/man3/mtrace.3:127
6963 #, no-wrap
6964 msgid ""
6965 "int\n"
6966 "main(int argc, char *argv[])\n"
6967 "{\n"
6968 "    int j;\n"
6969 msgstr ""
6970 "int\n"
6971 "main(int argc, char *argv[])\n"
6972 "{\n"
6973 "    int j;\n"
6974
6975 #. type: Plain text
6976 #: build/C/man3/mtrace.3:129
6977 #, no-wrap
6978 msgid "    mtrace();\n"
6979 msgstr "    mtrace();\n"
6980
6981 #. type: Plain text
6982 #: build/C/man3/mtrace.3:132
6983 #, no-wrap
6984 msgid ""
6985 "    for (j = 0; j E<lt> 2; j++)\n"
6986 "        malloc(100);            /* Never freed--a memory leak */\n"
6987 msgstr ""
6988 "    for (j = 0; j E<lt> 2; j++)\n"
6989 "        malloc(100);            /* Never freed--a memory leak */\n"
6990
6991 #. type: Plain text
6992 #: build/C/man3/mtrace.3:136
6993 #, no-wrap
6994 msgid ""
6995 "    calloc(16, 16);             /* Never freed--a memory leak */\n"
6996 "    exit(EXIT_SUCCESS);\n"
6997 "}\n"
6998 msgstr ""
6999 "    calloc(16, 16);             /* Never freed--a memory leak */\n"
7000 "    exit(EXIT_SUCCESS);\n"
7001 "}\n"
7002
7003 #. type: Plain text
7004 #: build/C/man3/mtrace.3:142
7005 msgid ""
7006 "When we run the program as follows, we see that B<mtrace>()  diagnosed "
7007 "memory leaks at two different locations in the program:"
7008 msgstr ""
7009
7010 #. type: Plain text
7011 #: build/C/man3/mtrace.3:155
7012 #, no-wrap
7013 msgid ""
7014 "$ B<cc -g t_mtrace.c -o t_mtrace>\n"
7015 "$ B<export MALLOC_TRACE=/tmp/t>\n"
7016 "$ B<./t_mtrace>\n"
7017 "$ B<mtrace ./t_mtrace $MALLOC_TRACE>\n"
7018 "Memory not freed:\n"
7019 "-----------------\n"
7020 "   Address     Size     Caller\n"
7021 "0x084c9378     0x64  at /home/cecilia/t_mtrace.c:12\n"
7022 "0x084c93e0     0x64  at /home/cecilia/t_mtrace.c:12\n"
7023 "0x084c9448    0x100  at /home/cecilia/t_mtrace.c:16\n"
7024 msgstr ""
7025 "$ B<cc -g t_mtrace.c -o t_mtrace>\n"
7026 "$ B<export MALLOC_TRACE=/tmp/t>\n"
7027 "$ B<./t_mtrace>\n"
7028 "$ B<mtrace ./t_mtrace $MALLOC_TRACE>\n"
7029 "Memory not freed:\n"
7030 "-----------------\n"
7031 "   Address     Size     Caller\n"
7032 "0x084c9378     0x64  at /home/cecilia/t_mtrace.c:12\n"
7033 "0x084c93e0     0x64  at /home/cecilia/t_mtrace.c:12\n"
7034 "0x084c9448    0x100  at /home/cecilia/t_mtrace.c:16\n"
7035
7036 #. type: Plain text
7037 #: build/C/man3/mtrace.3:167
7038 msgid ""
7039 "The first two messages about unfreed memory correspond to the two B<malloc>"
7040 "(3)  calls inside the I<for> loop.  The final message corresponds to the "
7041 "call to B<calloc>(3)  (which in turn calls B<malloc>(3))."
7042 msgstr ""
7043
7044 #. type: Plain text
7045 #: build/C/man3/mtrace.3:172
7046 msgid "B<mtrace>(1), B<malloc>(3), B<malloc_hook>(3), B<mcheck>(3)"
7047 msgstr "B<mtrace>(1), B<malloc>(3), B<malloc_hook>(3), B<mcheck>(3)"
7048
7049 #. type: TH
7050 #: build/C/man2/posix_fadvise.2:28
7051 #, no-wrap
7052 msgid "POSIX_FADVISE"
7053 msgstr "POSIX_FADVISE"
7054
7055 #. type: TH
7056 #: build/C/man2/posix_fadvise.2:28 build/C/man2/sync_file_range.2:30
7057 #, no-wrap
7058 msgid "2010-10-09"
7059 msgstr "2010-10-09"
7060
7061 #. type: Plain text
7062 #: build/C/man2/posix_fadvise.2:31
7063 msgid "posix_fadvise - predeclare an access pattern for file data"
7064 msgstr "posix_fadvise - ファイルデータのアクセスパターンをあらかじめ宣言する"
7065
7066 #. type: Plain text
7067 #: build/C/man2/posix_fadvise.2:34 build/C/man3/posix_fallocate.3:31
7068 #, no-wrap
7069 msgid "B<#include E<lt>fcntl.hE<gt>>\n"
7070 msgstr "B<#include E<lt>fcntl.hE<gt>>\n"
7071
7072 #. type: Plain text
7073 #: build/C/man2/posix_fadvise.2:37
7074 #, no-wrap
7075 msgid "B<int posix_fadvise(int >I<fd>B<, off_t >I<offset>B<, off_t >I<len>B<, int >I<advice>B<);>\n"
7076 msgstr "B<int posix_fadvise(int >I<fd>B<, off_t >I<offset>B<, off_t >I<len>B<, int >I<advice>B<);>\n"
7077
7078 #. type: Plain text
7079 #: build/C/man2/posix_fadvise.2:46
7080 msgid "B<posix_fadvise>():"
7081 msgstr "B<posix_fadvise>():"
7082
7083 #. type: Plain text
7084 #: build/C/man2/posix_fadvise.2:48 build/C/man3/posix_fallocate.3:44
7085 msgid "_XOPEN_SOURCE\\ E<gt>=\\ 600 || _POSIX_C_SOURCE\\ E<gt>=\\ 200112L"
7086 msgstr "_XOPEN_SOURCE\\ E<gt>=\\ 600 || _POSIX_C_SOURCE\\ E<gt>=\\ 200112L"
7087
7088 #. type: Plain text
7089 #: build/C/man2/posix_fadvise.2:56
7090 msgid ""
7091 "Programs can use B<posix_fadvise>()  to announce an intention to access file "
7092 "data in a specific pattern in the future, thus allowing the kernel to "
7093 "perform appropriate optimizations."
7094 msgstr ""
7095 "プログラムは、将来特定のパターンでファイルデータに アクセスする意思を伝えるた"
7096 "めに B<posix_fadvise>()  を使うことができる。 これにより、カーネルが適切な最"
7097 "適化を実行することが可能になる。"
7098
7099 #. type: Plain text
7100 #: build/C/man2/posix_fadvise.2:63
7101 msgid ""
7102 "The I<advice> applies to a (not necessarily existent) region starting at "
7103 "I<offset> and extending for I<len> bytes (or until the end of the file if "
7104 "I<len> is 0) within the file referred to by I<fd>.  The I<advice> is not "
7105 "binding; it merely constitutes an expectation on behalf of the application."
7106 msgstr ""
7107 "I<advice> は I<fd> が参照しているファイルの I<offset> から始まる I<len> バ"
7108 "イ\n"
7109 "トの範囲内 (I<len> が 0 の場合はファイルの終りまで) の (必ずしも存在しない)\n"
7110 "領域に適用される。 I<advice> は義務づけではない。 I<advice> は単にアプリ"
7111 "ケー\n"
7112 "ションのために可能性を構成するだけである。"
7113
7114 #. type: Plain text
7115 #: build/C/man2/posix_fadvise.2:65
7116 msgid "Permissible values for I<advice> include:"
7117 msgstr "I<advice> に許される値には、以下のものが含まれる:"
7118
7119 #. type: TP
7120 #: build/C/man2/posix_fadvise.2:65
7121 #, no-wrap
7122 msgid "B<POSIX_FADV_NORMAL>"
7123 msgstr "B<POSIX_FADV_NORMAL>"
7124
7125 #. type: Plain text
7126 #: build/C/man2/posix_fadvise.2:71
7127 msgid ""
7128 "Indicates that the application has no advice to give about its access "
7129 "pattern for the specified data.  If no advice is given for an open file, "
7130 "this is the default assumption."
7131 msgstr ""
7132 "指定されたデータのアクセスパターンを指示するアドバイスを アプリケーションが何"
7133 "も持っていないことを示す。 オープンされたファイルにアドバイスが指定されない場"
7134 "合、 これがデフォルトで仮定される。"
7135
7136 #. type: TP
7137 #: build/C/man2/posix_fadvise.2:71
7138 #, no-wrap
7139 msgid "B<POSIX_FADV_SEQUENTIAL>"
7140 msgstr "B<POSIX_FADV_SEQUENTIAL>"
7141
7142 #. type: Plain text
7143 #: build/C/man2/posix_fadvise.2:75
7144 msgid ""
7145 "The application expects to access the specified data sequentially (with "
7146 "lower offsets read before higher ones)."
7147 msgstr ""
7148 "アプリケーションは指定されたデータがシーケンシャルに (大きなオフセットの前に"
7149 "小さなオフセットのデータを読むように)  アクセスされることを期待する。"
7150
7151 #. type: TP
7152 #: build/C/man2/posix_fadvise.2:75
7153 #, no-wrap
7154 msgid "B<POSIX_FADV_RANDOM>"
7155 msgstr "B<POSIX_FADV_RANDOM>"
7156
7157 #. type: Plain text
7158 #: build/C/man2/posix_fadvise.2:78
7159 msgid "The specified data will be accessed in random order."
7160 msgstr "指定されたデータがランダムな順番でアクセスされる。"
7161
7162 #. type: TP
7163 #: build/C/man2/posix_fadvise.2:78
7164 #, no-wrap
7165 msgid "B<POSIX_FADV_NOREUSE>"
7166 msgstr "B<POSIX_FADV_NOREUSE>"
7167
7168 #. type: Plain text
7169 #: build/C/man2/posix_fadvise.2:81
7170 msgid "The specified data will be accessed only once."
7171 msgstr "指定されたデータは 1 度しかアクセスされない。"
7172
7173 #. type: TP
7174 #: build/C/man2/posix_fadvise.2:81
7175 #, no-wrap
7176 msgid "B<POSIX_FADV_WILLNEED>"
7177 msgstr "B<POSIX_FADV_WILLNEED>"
7178
7179 #. type: Plain text
7180 #: build/C/man2/posix_fadvise.2:84
7181 msgid "The specified data will be accessed in the near future."
7182 msgstr "指定されたデータは近い将来アクセスされる。"
7183
7184 #. type: TP
7185 #: build/C/man2/posix_fadvise.2:84
7186 #, no-wrap
7187 msgid "B<POSIX_FADV_DONTNEED>"
7188 msgstr "B<POSIX_FADV_DONTNEED>"
7189
7190 #. type: Plain text
7191 #: build/C/man2/posix_fadvise.2:87
7192 msgid "The specified data will not be accessed in the near future."
7193 msgstr "指定されたデータは近い将来アクセスされない。"
7194
7195 #. type: Plain text
7196 #: build/C/man2/posix_fadvise.2:90
7197 msgid "On success, zero is returned.  On error, an error number is returned."
7198 msgstr "成功した場合は 0 が返される。 失敗した場合はエラー番号が返される。"
7199
7200 #. type: Plain text
7201 #: build/C/man2/posix_fadvise.2:94
7202 msgid "The I<fd> argument was not a valid file descriptor."
7203 msgstr "I<fd> 引き数が有効なファイルディスクリプタでない。"
7204
7205 #. type: Plain text
7206 #: build/C/man2/posix_fadvise.2:97
7207 msgid "An invalid value was specified for I<advice>."
7208 msgstr "無効な値が I<advice> に指定された。"
7209
7210 #. type: Plain text
7211 #: build/C/man2/posix_fadvise.2:104
7212 msgid ""
7213 "The specified file descriptor refers to a pipe or FIFO.  (Linux actually "
7214 "returns B<EINVAL> in this case.)"
7215 msgstr ""
7216 "指定されたファイルディスクリプタがパイプまたは FIFO を参照している (この場"
7217 "合、Linux は実際には B<EINVAL> を返す)。"
7218
7219 #.  of fadvise64_64()
7220 #. type: Plain text
7221 #: build/C/man2/posix_fadvise.2:112
7222 msgid ""
7223 "Kernel support first appeared in Linux 2.5.60; the underlying system call is "
7224 "called B<fadvise64>().  Library support has been provided since glibc "
7225 "version 2.2, via the wrapper function B<posix_fadvise>()."
7226 msgstr ""
7227 "カーネルによるサポートは Linux 2.5.60 で最初に登場し、\n"
7228 "対応するシステムコールは B<fadvise64>() という名前である。\n"
7229 "ライブラリによるサポートは glibc バージョン 2.2 以降で提供されており、\n"
7230 "ラッパー関数は B<posix_fadvise>() という名前である。"
7231
7232 #. type: Plain text
7233 #: build/C/man2/posix_fadvise.2:121
7234 msgid ""
7235 "POSIX.1-2001.  Note that the type of the I<len> argument was changed from "
7236 "I<size_t> to I<off_t> in POSIX.1-2003 TC1."
7237 msgstr ""
7238 "POSIX.1-2001.  I<len> 引き数の型が POSIX.1-2003 TC1 において I<size_t> から "
7239 "I<off_t> に変更された点に注意すること。"
7240
7241 #. type: Plain text
7242 #: build/C/man2/posix_fadvise.2:127
7243 msgid ""
7244 "Under Linux, B<POSIX_FADV_NORMAL> sets the readahead window to the default "
7245 "size for the backing device; B<POSIX_FADV_SEQUENTIAL> doubles this size, and "
7246 "B<POSIX_FADV_RANDOM> disables file readahead entirely.  These changes affect "
7247 "the entire file, not just the specified region (but other open file handles "
7248 "to the same file are unaffected)."
7249 msgstr ""
7250 "Linux では、B<POSIX_FADV_NORMAL> はバッキングデバイスの デフォルトサイズに先"
7251 "読み (readahead) ウインドウを設定する。 B<POSIX_FADV_SEQUENTIAL> はこのサイズ"
7252 "を 2 倍し、 B<POSIX_FADV_RANDOM> は先読みを全く無効にする。 これらの変更は"
7253 "ファイル全体に影響し、指定された領域のみに影響するわけではない (しかし同じ"
7254 "ファイルに対する他のオープンファイルハンドルは影響を受けない)。"
7255
7256 #. type: Plain text
7257 #: build/C/man2/posix_fadvise.2:134
7258 msgid ""
7259 "B<POSIX_FADV_WILLNEED> initiates a nonblocking read of the specified region "
7260 "into the page cache.  The amount of data read may be decreased by the kernel "
7261 "depending on virtual memory load.  (A few megabytes will usually be fully "
7262 "satisfied, and more is rarely useful.)"
7263 msgstr ""
7264 "B<POSIX_FADV_WILLNEED> は、 ページキャッシュに指定領域のブロックされない読み"
7265 "込みを開始する。 読み込まれるデータの総量は、 仮想メモリの負荷に依ってカーネ"
7266 "ルが減らすかもしれない (数メガバイトであれば通常は全く十分であり、 それより多"
7267 "くてもめったに役に立たない)。"
7268
7269 #. type: Plain text
7270 #: build/C/man2/posix_fadvise.2:138
7271 msgid ""
7272 "In kernels before 2.6.18, B<POSIX_FADV_NOREUSE> had the same semantics as "
7273 "B<POSIX_FADV_WILLNEED>.  This was probably a bug; since kernel 2.6.18, this "
7274 "flag is a no-op."
7275 msgstr ""
7276 "2.6.18 より前のカーネルでは、B<POSIX_FADV_NOREUSE> は B<POSIX_FADV_WILLNEED> "
7277 "と同じ意味であった。 これは多分バグであった。 カーネル 2.6.18 以降では、この"
7278 "フラグは何も行わない。"
7279
7280 #. type: Plain text
7281 #: build/C/man2/posix_fadvise.2:146
7282 msgid ""
7283 "B<POSIX_FADV_DONTNEED> attempts to free cached pages associated with the "
7284 "specified region.  This is useful, for example, while streaming large "
7285 "files.  A program may periodically request the kernel to free cached data "
7286 "that has already been used, so that more useful cached pages are not "
7287 "discarded instead."
7288 msgstr ""
7289 "B<POSIX_FADV_DONTNEED> は指定された領域に関連付けられた キャッシュページを解"
7290 "放しようとする。 例えば、これは大きなファイルをストリーミングするときに役立"
7291 "つ。 プログラムは、使用済みのキャッシュされたデータを解放するように、 定期的"
7292 "にカーネルに要求するかもしれない。 そうすることにより、さらに有効なキャッシュ"
7293 "されたページが、 代わりに破棄されることはない。"
7294
7295 #. type: Plain text
7296 #: build/C/man2/posix_fadvise.2:154
7297 msgid ""
7298 "Pages that have not yet been written out will be unaffected, so if the "
7299 "application wishes to guarantee that pages will be released, it should call "
7300 "B<fsync>(2)  or B<fdatasync>(2)  first."
7301 msgstr ""
7302 "まだ書き出されていないページは影響を受けないので、 そのページの解放が保証され"
7303 "ることをアプリケーションが望んでいるなら、 最初に B<fsync>(2)  または "
7304 "B<fdatasync>(2)  を呼ぶべきである。"
7305
7306 #. type: SS
7307 #: build/C/man2/posix_fadvise.2:154
7308 #, no-wrap
7309 msgid "arm_fadvise()"
7310 msgstr "arm_fadvise()"
7311
7312 #. type: Plain text
7313 #: build/C/man2/posix_fadvise.2:166
7314 msgid ""
7315 "The ARM architecture needs 64-bit arguments to be aligned in a suitable pair "
7316 "of registers.  On this architecture, the call signature of B<posix_fadvise>"
7317 "()  is flawed, since it forces a register to be wasted as padding between "
7318 "the I<fd> and I<len> arguments.  Therefore, since Linux 2.6.14, ARM defines "
7319 "a different system call that orders the arguments suitably:"
7320 msgstr ""
7321 "ARM アーキテクチャでは、64 ビットの引き数は適切なレジスタの組に割り当て\n"
7322 "る必要がある。このアーキテクチャでは、B<posix_fadvise>() の呼び出し方に\n"
7323 "は欠陥があり、それはこのシステムコールでは引き数 I<fd> と I<len> の間の\n"
7324 "パディング (詰めもの) でレジスタが一つ消費されてしまうというものである。\n"
7325 "そのため、Linux 2.6.14 以降では、ARM では引き数が適切な順序になった別の\n"
7326 "システムコールが定義されている。"
7327
7328 #. type: Plain text
7329 #: build/C/man2/posix_fadvise.2:171
7330 #, no-wrap
7331 msgid ""
7332 "B<long arm_fadvise64_64(int >I<fd>B<, int >I<advice>B<,>\n"
7333 "B<                      loff_t >I<offset>B<, loff_t >I<len>B<);>\n"
7334 msgstr ""
7335 "B<long arm_fadvise64_64(int >I<fd>B<, int >I<advice>B<,>\n"
7336 "B<                      loff_t >I<offset>B<, loff_t >I<len>B<);>\n"
7337
7338 #.  No ARM support in glibc.
7339 #. type: Plain text
7340 #: build/C/man2/posix_fadvise.2:178
7341 msgid ""
7342 "The behavior of this system call is otherwise exactly the same as "
7343 "B<posix_fadvise>().  No library support is provided for this system call in "
7344 "glibc."
7345 msgstr ""
7346 "上記の点以外は、このシステムコールの動作は B<posix_fadvise>() と全く\n"
7347 "同じである。このシステムコールに対するライブラリによるサポートは glibc\n"
7348 "では提供されていない。"
7349
7350 #. type: Plain text
7351 #: build/C/man2/posix_fadvise.2:183
7352 msgid ""
7353 "In kernels before 2.6.6, if I<len> was specified as 0, then this was "
7354 "interpreted literally as \"zero bytes\", rather than as meaning \"all bytes "
7355 "through to the end of the file\"."
7356 msgstr ""
7357 "2.6.6 より前のカーネルでは、 I<len> に 0 が指定された場合、 「ファイルの終り"
7358 "までの全てのバイト」という意味ではなく、 文字通り「0 バイト」として解釈されて"
7359 "いた。"
7360
7361 #.  FIXME . Write a posix_fadvise(3) page.
7362 #. type: Plain text
7363 #: build/C/man2/posix_fadvise.2:189
7364 msgid ""
7365 "B<readahead>(2), B<sync_file_range>(2), B<posix_fallocate>(3), "
7366 "B<posix_madvise>(3)"
7367 msgstr ""
7368 "B<readahead>(2), B<sync_file_range>(2), B<posix_fallocate>(3),\n"
7369 "B<posix_madvise>(3)"
7370
7371 #. type: TH
7372 #: build/C/man3/posix_fallocate.3:25
7373 #, no-wrap
7374 msgid "POSIX_FALLOCATE"
7375 msgstr "POSIX_FALLOCATE"
7376
7377 #. type: Plain text
7378 #: build/C/man3/posix_fallocate.3:28
7379 msgid "posix_fallocate - allocate file space"
7380 msgstr "posix_fallocate - ファイルのスペースを確保する"
7381
7382 #. type: Plain text
7383 #: build/C/man3/posix_fallocate.3:33
7384 #, no-wrap
7385 msgid "B<int posix_fallocate(int >I<fd>B<, off_t >I<offset>B<, off_t >I<len>B<);>\n"
7386 msgstr "B<int posix_fallocate(int >I<fd>B<, off_t >I<offset>B<, off_t >I<len>B<);>\n"
7387
7388 #. type: Plain text
7389 #: build/C/man3/posix_fallocate.3:42
7390 msgid "B<posix_fallocate>():"
7391 msgstr "B<posix_fallocate>():"
7392
7393 #. type: Plain text
7394 #: build/C/man3/posix_fallocate.3:61
7395 msgid ""
7396 "The function B<posix_fallocate>()  ensures that disk space is allocated for "
7397 "the file referred to by the descriptor I<fd> for the bytes in the range "
7398 "starting at I<offset> and continuing for I<len> bytes.  After a successful "
7399 "call to B<posix_fallocate>(), subsequent writes to bytes in the specified "
7400 "range are guaranteed not to fail because of lack of disk space."
7401 msgstr ""
7402 "関数 B<posix_fallocate>()  は、ディスクリプタ I<fd> で参照されるファイルに対"
7403 "して、ディスクスペースを確実に確保する。 ディスクスペースは I<offset> から始"
7404 "まる I<len> バイトの範囲のバイトである。 B<posix_fallocate>()  の呼び出しが成"
7405 "功した後、指定された範囲のバイトに対する書き込みは、 ディスクスペースの不足で"
7406 "失敗しないことが保証される。"
7407
7408 #. type: Plain text
7409 #: build/C/man3/posix_fallocate.3:66
7410 msgid ""
7411 "If the size of the file is less than I<offset>+I<len>, then the file is "
7412 "increased to this size; otherwise the file size is left unchanged."
7413 msgstr ""
7414 "ファイルのサイズが I<offset>+I<len> より小さい場合、ファイルはこのサイズにな"
7415 "るように拡大される。 それ以外の場合、ファイルサイズは変わらない。"
7416
7417 #. type: Plain text
7418 #: build/C/man3/posix_fallocate.3:72
7419 msgid ""
7420 "B<posix_fallocate>()  returns zero on success, or an error number on "
7421 "failure.  Note that I<errno> is not set."
7422 msgstr ""
7423 "B<posix_fallocate>()  は成功した場合、0 を返す。 失敗した場合、エラー番号を返"
7424 "す。 I<errno> が設定されない点に注意すること。"
7425
7426 #. type: Plain text
7427 #: build/C/man3/posix_fallocate.3:81
7428 msgid "I<offset+len> exceeds the maximum file size."
7429 msgstr "I<offset+len> が最大ファイルサイズを超えている。"
7430
7431 #. type: Plain text
7432 #: build/C/man3/posix_fallocate.3:91
7433 msgid "I<fd> does not refer to a regular file."
7434 msgstr "I<fd> が通常のファイルとして参照されていない。"
7435
7436 #. type: Plain text
7437 #: build/C/man3/posix_fallocate.3:100
7438 msgid "I<fd> refers to a pipe."
7439 msgstr "I<fd> がパイプを参照している。"
7440
7441 #. type: Plain text
7442 #: build/C/man3/posix_fallocate.3:103
7443 msgid "B<posix_fallocate>()  is available since glibc 2.1.94."
7444 msgstr "B<posix_fallocate>()  は glibc 2.1.94 以降で利用可能である。"
7445
7446 #. type: Plain text
7447 #: build/C/man3/posix_fallocate.3:128
7448 msgid ""
7449 "POSIX.1-2008 says that an implementation I<shall> give the B<EINVAL> error "
7450 "if I<len> was 0, or I<offset> was less than 0.  POSIX.1-2001 says that an "
7451 "implementation I<shall> give the B<EINVAL> error if I<len> is less than 0, "
7452 "or I<offset> was less than 0, and I<may> give the error if I<len> equals "
7453 "zero."
7454 msgstr ""
7455 "POSIX.1-2008 では、 I<len> が 0 の場合、もしくは I<offset> が 0 未満の場合、 "
7456 "B<EINVAL> エラーを返すものとされている。 POSIX.1-2001 では、 I<len> が 0 未満"
7457 "の場合、もしくは I<offset> が 0 未満の場合、 B<EINVAL> エラーを返すものとされ"
7458 "ている。また、 I<len> が 0 の場合、 B<EINVAL> エラーを返してもよいとされてい"
7459 "る。"
7460
7461 #. type: Plain text
7462 #: build/C/man3/posix_fallocate.3:133
7463 msgid "B<fallocate>(1), B<fallocate>(2), B<lseek>(2), B<posix_fadvise>(2)"
7464 msgstr "B<fallocate>(1), B<fallocate>(2), B<lseek>(2), B<posix_fadvise>(2)"
7465
7466 #. type: TH
7467 #: build/C/man3/posix_memalign.3:29
7468 #, no-wrap
7469 msgid "POSIX_MEMALIGN"
7470 msgstr "POSIX_MEMALIGN"
7471
7472 #. type: TH
7473 #: build/C/man3/posix_memalign.3:29
7474 #, no-wrap
7475 msgid "2012-03-23"
7476 msgstr "2012-03-23"
7477
7478 #. type: Plain text
7479 #: build/C/man3/posix_memalign.3:32
7480 msgid ""
7481 "posix_memalign, aligned_alloc, memalign, valloc, pvalloc - allocate aligned "
7482 "memory"
7483 msgstr ""
7484 "posix_memalign, aligned_alloc, memalign, valloc, pvalloc - アラインメント\n"
7485 "されたメモリの割り当てを行う"
7486
7487 #. type: Plain text
7488 #: build/C/man3/posix_memalign.3:39
7489 #, no-wrap
7490 msgid ""
7491 "B<int posix_memalign(void **>I<memptr>B<, size_t >I<alignment>B<, size_t >I<size>B<);>\n"
7492 "B<void *aligned_alloc(size_t >I<alignment>B<, size_t >I<size>B<);>\n"
7493 "B<void *valloc(size_t >I<size>B<);>\n"
7494 msgstr ""
7495 "B<int posix_memalign(void **>I<memptr>B<, size_t >I<alignment>B<, size_t >I<size>B<);>\n"
7496 "B<void *aligned_alloc(size_t >I<alignment>B<, size_t >I<size>B<);>\n"
7497 "B<void *valloc(size_t >I<size>B<);>\n"
7498
7499 #. type: Plain text
7500 #: build/C/man3/posix_memalign.3:44
7501 #, no-wrap
7502 msgid ""
7503 "B<void *memalign(size_t >I<alignment>B<, size_t >I<size>B<);>\n"
7504 "B<void *pvalloc(size_t >I<size>B<);>\n"
7505 msgstr ""
7506 "B<void *memalign(size_t >I<alignment>B<, size_t >I<size>B<);>\n"
7507 "B<void *pvalloc(size_t >I<size>B<);>\n"
7508
7509 #. type: Plain text
7510 #: build/C/man3/posix_memalign.3:54
7511 msgid ""
7512 "B<posix_memalign>(): _POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ "
7513 "E<gt>=\\ 600"
7514 msgstr ""
7515 "B<posix_memalign>(): _POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ "
7516 "E<gt>=\\ 600"
7517
7518 #. type: Plain text
7519 #: build/C/man3/posix_memalign.3:57
7520 msgid "B<aligned_alloc>(): _ISOC11_SOURCE"
7521 msgstr "B<aligned_alloc>(): _ISOC11_SOURCE"
7522
7523 #. type: Plain text
7524 #: build/C/man3/posix_memalign.3:59
7525 msgid "B<valloc>():"
7526 msgstr "B<valloc>():"
7527
7528 #. type: TP
7529 #: build/C/man3/posix_memalign.3:62
7530 #, no-wrap
7531 msgid "Since glibc 2.12:"
7532 msgstr "glibc 2.12 以降:"
7533
7534 #. type: Plain text
7535 #: build/C/man3/posix_memalign.3:69
7536 #, no-wrap
7537 msgid ""
7538 "_BSD_SOURCE ||\n"
7539 "    (_XOPEN_SOURCE\\ E<gt>=\\ 500 ||\n"
7540 "        _XOPEN_SOURCE\\ &&\\ _XOPEN_SOURCE_EXTENDED) &&\n"
7541 "    !(_POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ E<gt>=\\ 600)\n"
7542 msgstr ""
7543 "_BSD_SOURCE ||\n"
7544 "    (_XOPEN_SOURCE\\ E<gt>=\\ 500 ||\n"
7545 "        _XOPEN_SOURCE\\ &&\\ _XOPEN_SOURCE_EXTENDED) &&\n"
7546 "    !(_POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ E<gt>=\\ 600)\n"
7547
7548 #. type: TP
7549 #: build/C/man3/posix_memalign.3:71
7550 #, no-wrap
7551 msgid "Before glibc 2.12:"
7552 msgstr "glibc 2.12 より前:"
7553
7554 #. type: Plain text
7555 #: build/C/man3/posix_memalign.3:75
7556 msgid ""
7557 "_BSD_SOURCE || _XOPEN_SOURCE\\ E<gt>=\\ 500 || _XOPEN_SOURCE\\ &&\\ "
7558 "_XOPEN_SOURCE_EXTENDED"
7559 msgstr ""
7560 "_BSD_SOURCE || _XOPEN_SOURCE\\ E<gt>=\\ 500 || _XOPEN_SOURCE\\ &&\\ "
7561 "_XOPEN_SOURCE_EXTENDED"
7562
7563 #. type: Plain text
7564 #: build/C/man3/posix_memalign.3:82
7565 msgid ""
7566 "(The (nonstandard) header file I<E<lt>malloc.hE<gt>> also exposes the "
7567 "declaration of B<valloc>(); no feature test macros are required.)"
7568 msgstr ""
7569 "((非標準の) ヘッダファイル I<E<lt>malloc.hE<gt>> も\n"
7570 "B<valloc>() の宣言も公開する。機能検査マクロは不要である。"
7571
7572 #.  glibc does this:
7573 #. type: Plain text
7574 #: build/C/man3/posix_memalign.3:103
7575 msgid ""
7576 "The function B<posix_memalign>()  allocates I<size> bytes and places the "
7577 "address of the allocated memory in I<*memptr>.  The address of the allocated "
7578 "memory will be a multiple of I<alignment>, which must be a power of two and "
7579 "a multiple of I<sizeof(void *)>.  If I<size> is 0, then B<posix_memalign>()  "
7580 "returns either NULL, or a unique pointer value that can later be "
7581 "successfully passed to B<free>(3)."
7582 msgstr ""
7583 "関数 B<posix_memalign>()  は、 I<size> バイトのメモリを割り当て、割り当てられ"
7584 "たメモリのアドレスを I<*memptr> に設定する。 割り当てられたメモリのアドレス"
7585 "は I<alignment> の倍数になっているはずである。 I<alignment> は 2 のべき乗で、"
7586 "かつ I<sizeof(void *)> の倍数でなければならない。 I<size> が 0 の場合、 "
7587 "B<posix_memalign>()  は NULL か一意なポインタ値を返す。 このポインタ値は、後"
7588 "で B<free>(3)  に問題なく渡すことができる。"
7589
7590 #.  The behavior of memalign() for size==0 is as for posix_memalign()
7591 #.  but no standards govern this.
7592 #. type: Plain text
7593 #: build/C/man3/posix_memalign.3:114
7594 msgid ""
7595 "The obsolete function B<memalign>()  allocates I<size> bytes and returns a "
7596 "pointer to the allocated memory.  The memory address will be a multiple of "
7597 "I<alignment>, which must be a power of two."
7598 msgstr ""
7599 "廃止された関数である B<memalign>() は、 I<size> バイトのメモリを割り当て、\n"
7600 "割り当てられたメモリへのポインタを返す。 メモリのアドレスは I<alignment> \n"
7601 "の倍数になっているはずである。 I<alignment> は 2 のべき乗でなければならない。"
7602
7603 #. type: Plain text
7604 #: build/C/man3/posix_memalign.3:123
7605 msgid ""
7606 "The function B<aligned_alloc>()  is the same as B<memalign>(), except for "
7607 "the added restriction that I<size> should be a multiple of I<alignment>."
7608 msgstr ""
7609 "関数 B<aligned_alloc>() は B<memalign>() と同じだが、I<size> が "
7610 "I<alignment>\n"
7611 "の倍数でなければならないという追加の制限がある点が異なる。"
7612
7613 #. type: Plain text
7614 #: build/C/man3/posix_memalign.3:132
7615 msgid ""
7616 "The obsolete function B<valloc>()  allocates I<size> bytes and returns a "
7617 "pointer to the allocated memory.  The memory address will be a multiple of "
7618 "the page size.  It is equivalent to I<memalign(sysconf(_SC_PAGESIZE),size)>."
7619 msgstr ""
7620 "廃止された関数である B<valloc>()  は I<size> バイトのメモリを割り当て、割り当"
7621 "てられたメモリへのポインタを返す。 メモリのアドレスはページサイズの倍数になっ"
7622 "ているはずである。 これは I<memalign(sysconf(_SC_PAGESIZE),size)> と等価であ"
7623 "る。"
7624
7625 #. type: Plain text
7626 #: build/C/man3/posix_memalign.3:139
7627 msgid ""
7628 "The obsolete function B<pvalloc>()  is similar to B<valloc>(), but rounds "
7629 "the size of the allocation up to the next multiple of the system page size."
7630 msgstr ""
7631 "廃止された関数 B<pvalloc>() は B<valloc>() と同様だが、\n"
7632 "割り当てられるサイズがシステムのページサイズの倍数に切り上げられる。"
7633
7634 #. type: Plain text
7635 #: build/C/man3/posix_memalign.3:141
7636 msgid "For all of these functions, the memory is not zeroed."
7637 msgstr "これらの関数はいずれもメモリのゼロクリアを行わない。"
7638
7639 #. type: Plain text
7640 #: build/C/man3/posix_memalign.3:148
7641 msgid ""
7642 "B<aligned_alloc>(), B<memalign>(), B<valloc>(), and B<pvalloc>()  return a "
7643 "pointer to the allocated memory, or NULL if the request fails."
7644 msgstr ""
7645 "B<aligned_alloc>(), B<memalign>(), B<valloc>(), B<pvalloc>() は割り当てられ"
7646 "た\n"
7647 "メモリへのポインタを返す。 割り当てに失敗した場合は NULL を返す。"
7648
7649 #. type: Plain text
7650 #: build/C/man3/posix_memalign.3:155
7651 msgid ""
7652 "B<posix_memalign>()  returns zero on success, or one of the error values "
7653 "listed in the next section on failure.  Note that I<errno> is not set."
7654 msgstr ""
7655 "B<posix_memalign>()  は成功した場合は 0 を返し、 失敗した場合は次のセクション"
7656 "に記載されたエラー値のいずれかを返す。 I<errno> はセットされないことに注意す"
7657 "ること。"
7658
7659 #. type: Plain text
7660 #: build/C/man3/posix_memalign.3:162
7661 msgid ""
7662 "The I<alignment> argument was not a power of two, or was not a multiple of "
7663 "I<sizeof(void *)>."
7664 msgstr ""
7665 "I<alignment> 引き数が 2 のべき乗でなかったか、 I<sizeof(void *)> の倍数でな"
7666 "かった。"
7667
7668 #. type: Plain text
7669 #: build/C/man3/posix_memalign.3:165
7670 msgid "There was insufficient memory to fulfill the allocation request."
7671 msgstr "割り当て要求を満たすのに十分なメモリがなかった。"
7672
7673 #. type: Plain text
7674 #: build/C/man3/posix_memalign.3:172
7675 msgid ""
7676 "The functions B<memalign>(), B<valloc>(), and B<pvalloc>()  have been "
7677 "available in all Linux libc libraries."
7678 msgstr ""
7679 "関数 B<memalign>(), B<valloc>(), B<pvalloc>() は\n"
7680 "すべての Linux libc ライブラリで使用可能である。"
7681
7682 #. type: Plain text
7683 #: build/C/man3/posix_memalign.3:176
7684 msgid "The function B<aligned_alloc>()  was added to glibc in version 2.16."
7685 msgstr "関数 B<aligned_alloc>() は glibc バージョン 2.16 で追加された。"
7686
7687 #. type: Plain text
7688 #: build/C/man3/posix_memalign.3:180
7689 msgid "The function B<posix_memalign>()  is available since glibc 2.1.91."
7690 msgstr "関数 B<posix_fallocate>() は glibc 2.1.91 以降で利用可能である。"
7691
7692 #. type: Plain text
7693 #: build/C/man3/posix_memalign.3:187
7694 msgid ""
7695 "The function B<valloc>()  appeared in 3.0BSD.  It is documented as being "
7696 "obsolete in 4.3BSD, and as legacy in SUSv2.  It does not appear in "
7697 "POSIX.1-2001."
7698 msgstr ""
7699 "関数 B<valloc>() は 3.0BSD で登場した。4.3BSD では廃止されたと記載されてお"
7700 "り、\n"
7701 "SUSv2 では過去の名残だと記載されている。 POSIX.1-2001 には存在しない。"
7702
7703 #. type: Plain text
7704 #: build/C/man3/posix_memalign.3:191
7705 msgid "The function B<pvalloc>()  is a GNU extension."
7706 msgstr "関数 B<pvalloc>() は GNU による拡張である。"
7707
7708 #. type: Plain text
7709 #: build/C/man3/posix_memalign.3:195
7710 msgid "The function B<memalign>()  appears in SunOS 4.1.3 but not in 4.4BSD."
7711 msgstr "関数 B<memalign>() は SunOS 4.1.3 で登場したが、4.4BSD にはない。"
7712
7713 #. type: Plain text
7714 #: build/C/man3/posix_memalign.3:199
7715 msgid "The function B<posix_memalign>()  comes from POSIX.1d."
7716 msgstr "関数 B<posix_memalign>() は POSIX.1d に由来する。"
7717
7718 #. type: Plain text
7719 #: build/C/man3/posix_memalign.3:204
7720 msgid "The function B<aligned_alloc>()  is specified in the C11 standard."
7721 msgstr "関数 I<aligned_alloc>() は C11 標準で規定されている。"
7722
7723 #. type: SS
7724 #: build/C/man3/posix_memalign.3:204
7725 #, no-wrap
7726 msgid "Headers"
7727 msgstr "ヘッダ"
7728
7729 #. type: Plain text
7730 #: build/C/man3/posix_memalign.3:208
7731 msgid ""
7732 "Everybody agrees that B<posix_memalign>()  is declared in I<E<lt>stdlib."
7733 "hE<gt>>."
7734 msgstr ""
7735 "B<posix_memalign>()  の宣言を I<E<lt>stdlib.hE<gt>> で行うことに関しては、 皆"
7736 "の意見が一致している。"
7737
7738 #. type: Plain text
7739 #: build/C/man3/posix_memalign.3:212
7740 msgid ""
7741 "On some systems B<memalign>()  is declared in I<E<lt>stdlib.hE<gt>> instead "
7742 "of I<E<lt>malloc.hE<gt>>."
7743 msgstr ""
7744 "いくつかのシステムでは、 B<memalign>()  は I<E<lt>malloc.hE<gt>> ではなく "
7745 "I<E<lt>stdlib.hE<gt>> で宣言されている。"
7746
7747 #. type: Plain text
7748 #: build/C/man3/posix_memalign.3:219
7749 msgid ""
7750 "According to SUSv2, B<valloc>()  is declared in I<E<lt>stdlib.hE<gt>>.  "
7751 "Libc4,5 and glibc declare it in I<E<lt>malloc.hE<gt>>, and also in "
7752 "I<E<lt>stdlib.hE<gt>> if suitable feature test macros are defined (see "
7753 "above)."
7754 msgstr ""
7755 "SUSv2 によると、 B<valloc>() は I<E<lt>stdlib.hE<gt>> で宣言される。 "
7756 "libc4,5\n"
7757 "や glibc では I<E<lt>malloc.hE<gt>> で宣言されており、 さらに適切な機能検査\n"
7758 "マクロが定義された場合には I<E<lt>stdlib.hE<gt>> でも宣言される(上記を参照)。"
7759
7760 #. type: Plain text
7761 #: build/C/man3/posix_memalign.3:228
7762 msgid ""
7763 "On many systems there are alignment restrictions, for example, on buffers "
7764 "used for direct block device I/O.  POSIX specifies the I<pathconf(path,"
7765 "_PC_REC_XFER_ALIGN)> call that tells what alignment is needed.  Now one can "
7766 "use B<posix_memalign>()  to satisfy this requirement."
7767 msgstr ""
7768 "多くのシステムでは、アラインメントに関して制限がある。例えば、 ブロックデバイ"
7769 "スに対するダイレクト I/O に使用するバッファには アラインメントに関する制限が"
7770 "ある。 POSIX では、どんなアラインメントが必要かを知るために I<pathconf(path,"
7771 "_PC_REC_XFER_ALIGN)> コールを規定している。ここで B<posix_memalign>()  を使う"
7772 "と、この必要条件を満たすことができる。"
7773
7774 #. type: Plain text
7775 #: build/C/man3/posix_memalign.3:237
7776 msgid ""
7777 "B<posix_memalign>()  verifies that I<alignment> matches the requirements "
7778 "detailed above.  B<memalign>()  may not check that the I<alignment> argument "
7779 "is correct."
7780 msgstr ""
7781 "B<posix_memalign>() は I<alignment> が上で詳細に述べた必要条件を満たすか\n"
7782 "どうかを確かめる。 B<memalign>() は I<alignment> 引き数が正しいかどうかの\n"
7783 "確認を行わないかもしれない。"
7784
7785 #.  Other systems allow passing the result of
7786 #.  .IR valloc ()
7787 #.  to
7788 #.  .IR free (3),
7789 #.  but not to
7790 #.  .IR realloc (3).
7791 #. type: Plain text
7792 #: build/C/man3/posix_memalign.3:265
7793 msgid ""
7794 "POSIX requires that memory obtained from B<posix_memalign>()  can be freed "
7795 "using B<free>(3).  Some systems provide no way to reclaim memory allocated "
7796 "with B<memalign>()  or B<valloc>()  (because one can only pass to B<free>"
7797 "(3)  a pointer gotten from B<malloc>(3), while, for example, B<memalign>()  "
7798 "would call B<malloc>(3)  and then align the obtained value).  The glibc "
7799 "implementation allows memory obtained from any of these functions to be "
7800 "reclaimed with B<free>(3)."
7801 msgstr ""
7802 "POSIX では B<posix_memalign>() によって獲得したメモリは B<free>(3) を\n"
7803 "使って解放することができる必要がある。 いくつかのシステムでは\n"
7804 "B<memalign>() やB<valloc>() で割り当てられたメモリを再利用する手段が\n"
7805 "提供されていない(なぜなら B<free>(3) に渡すことができるのは\n"
7806 "B<malloc>(3) から受け取ったポインタだけだが、例えば B<memalign>() は\n"
7807 "B<malloc>(3) を呼び出し、得た値をアラインメントしてしまうからである)。\n"
7808 "glibc の実装では、 ここに述べた関数のいずれで獲得したメモリも\n"
7809 "B<free>(3) で再利用することができる。"
7810
7811 #. type: Plain text
7812 #: build/C/man3/posix_memalign.3:270
7813 msgid ""
7814 "The glibc B<malloc>(3)  always returns 8-byte aligned memory addresses, so "
7815 "these functions are only needed if you require larger alignment values."
7816 msgstr ""
7817 "glibc の B<malloc>(3) は常に 8 バイトにアラインメントされたメモリアドレスを\n"
7818 "返すので、ここで述べた関数が必要になるのは 8 バイトよりも大きなアラインメン"
7819 "ト\n"
7820 "が必要な場合だけである。"
7821
7822 #. type: Plain text
7823 #: build/C/man3/posix_memalign.3:275
7824 msgid "B<brk>(2), B<getpagesize>(2), B<free>(3), B<malloc>(3)"
7825 msgstr "B<brk>(2), B<getpagesize>(2), B<free>(3), B<malloc>(3)"
7826
7827 #. type: TH
7828 #: build/C/man2/readahead.2:28
7829 #, no-wrap
7830 msgid "READAHEAD"
7831 msgstr "READAHEAD"
7832
7833 #. type: TH
7834 #: build/C/man2/readahead.2:28 build/C/man7/shm_overview.7:27
7835 #, no-wrap
7836 msgid "2010-09-10"
7837 msgstr "2010-09-10"
7838
7839 #. type: Plain text
7840 #: build/C/man2/readahead.2:31
7841 msgid "readahead - perform file readahead into page cache"
7842 msgstr "readahead - 前もってファイルをページ・キャッシュに読み込む"
7843
7844 #. type: Plain text
7845 #: build/C/man2/readahead.2:37
7846 #, no-wrap
7847 msgid "B<ssize_t readahead(int >I<fd>B<, off64_t >I<offset>B<, size_t >I<count>B<);>\n"
7848 msgstr "B<ssize_t readahead(int >I<fd>B<, off64_t >I<offset>B<, size_t >I<count>B<);>\n"
7849
7850 #. type: Plain text
7851 #: build/C/man2/readahead.2:65
7852 msgid ""
7853 "B<readahead>()  populates the page cache with data from a file so that "
7854 "subsequent reads from that file will not block on disk I/O.  The I<fd> "
7855 "argument is a file descriptor identifying the file which is to be read.  The "
7856 "I<offset> argument specifies the starting point from which data is to be "
7857 "read and I<count> specifies the number of bytes to be read.  I/O is "
7858 "performed in whole pages, so that I<offset> is effectively rounded down to a "
7859 "page boundary and bytes are read up to the next page boundary greater than "
7860 "or equal to I<(offset+count)>.  B<readahead>()  does not read beyond the end "
7861 "of the file.  B<readahead>()  blocks until the specified data has been "
7862 "read.  The current file offset of the open file referred to by I<fd> is left "
7863 "unchanged."
7864 msgstr ""
7865 "B<readahead>()  は、この後の同じファイルからのデータ読み込み時にディスク I/O "
7866 "で 動作が停止 (block) しないように、前もってファイルの内容を ページ・キャッ"
7867 "シュに読み込む。 I<fd> 引き数は読み込みを行うファイルを識別するファイル・ディ"
7868 "スクリプタである。 I<offset> 引き数はデータの読み込み開始位置を指定し、 "
7869 "I<count> は読み込むデータのバイト数を指定する。 ディスク I/O はページ単位で実"
7870 "行されるので、 実際には I<offset> はページ境界に切り下げられ、読み込みバイト"
7871 "数は I<(offset+count)> より小さくない次のページ境界まで切り上げられる。 "
7872 "B<readahead>()  はファイルの末尾を越えた範囲まで読み出しを行うことはない。ま"
7873 "た、 B<readahead>()  は指定したデータの読み込みが終わるまで停止 (block) す"
7874 "る。 I<fd> で参照されたオープン済のファイルのファイルオフセットの現在値は 変"
7875 "更されない。"
7876
7877 #. type: Plain text
7878 #: build/C/man2/readahead.2:71
7879 msgid ""
7880 "On success, B<readahead>()  returns 0; on failure, -1 is returned, with "
7881 "I<errno> set to indicate the cause of the error."
7882 msgstr ""
7883 "B<readahead>()  は成功すると 0 を返す。失敗した場合 -1 を返し、 I<errno> にエ"
7884 "ラーの原因を示す値を設定する。"
7885
7886 #. type: Plain text
7887 #: build/C/man2/readahead.2:76
7888 msgid "I<fd> is not a valid file descriptor or is not open for reading."
7889 msgstr ""
7890 "I<fd> が有効なファイル・ディスクリプタでない、または 読み込み用にオープンされ"
7891 "ていない。"
7892
7893 #. type: Plain text
7894 #: build/C/man2/readahead.2:82
7895 msgid ""
7896 "I<fd> does not refer to a file type to which B<readahead>()  can be applied."
7897 msgstr ""
7898 "I<fd> が参照しているファイルが、 B<readahead>()  を行うことができないタイプの"
7899 "ファイルであった。"
7900
7901 #. type: Plain text
7902 #: build/C/man2/readahead.2:87
7903 msgid ""
7904 "The B<readahead>()  system call appeared in Linux 2.4.13; glibc support has "
7905 "been provided since version 2.3."
7906 msgstr ""
7907 "B<readahead>()  システムコールは Linux 2.4.13 で登場した。 glibc でのサポート"
7908 "は glibc バージョン 2.3 以降で行われている。"
7909
7910 #. type: Plain text
7911 #: build/C/man2/readahead.2:92
7912 msgid ""
7913 "The B<readahead>()  system call is Linux-specific, and its use should be "
7914 "avoided in portable applications."
7915 msgstr ""
7916 "B<readahead>()  システムコールは Linux 固有であり、移植を考慮したプログラムで"
7917 "は 使用を避けるべきである。"
7918
7919 #. type: Plain text
7920 #: build/C/man2/readahead.2:98
7921 msgid "B<lseek>(2), B<madvise>(2), B<mmap>(2), B<posix_fadvise>(2), B<read>(2)"
7922 msgstr ""
7923 "B<lseek>(2), B<madvise>(2), B<mmap>(2), B<posix_fadvise>(2), B<read>(2)"
7924
7925 #. type: TH
7926 #: build/C/man2/remap_file_pages.2:28
7927 #, no-wrap
7928 msgid "REMAP_FILE_PAGES"
7929 msgstr "REMAP_FILE_PAGES"
7930
7931 #. type: Plain text
7932 #: build/C/man2/remap_file_pages.2:31
7933 msgid "remap_file_pages - create a nonlinear file mapping"
7934 msgstr "remap_file_pages - 非線形ファイルマッピングを作成する。"
7935
7936 #. type: Plain text
7937 #: build/C/man2/remap_file_pages.2:35
7938 #, no-wrap
7939 msgid ""
7940 "B<#define _GNU_SOURCE>         /* See feature_test_macros(7) */\n"
7941 "B<#include E<lt>sys/mman.hE<gt>>\n"
7942 msgstr ""
7943 "B<#define _GNU_SOURCE>         /* feature_test_macros(7) 参照 */\n"
7944 "B<#include E<lt>sys/mman.hE<gt>>\n"
7945
7946 #. type: Plain text
7947 #: build/C/man2/remap_file_pages.2:38
7948 #, no-wrap
7949 msgid ""
7950 "B<int remap_file_pages(void *>I<addr>B<, size_t >I<size>B<, int >I<prot>B<,>\n"
7951 "B<                     ssize_t >I<pgoff>B<, int >I<flags>B<);>\n"
7952 msgstr ""
7953 "B<int remap_file_pages(void *>I<addr>B<, size_t >I<size>B<, int >I<prot>B<,>\n"
7954 "B<                     ssize_t >I<pgoff>B<, int >I<flags>B<);>\n"
7955
7956 #. type: Plain text
7957 #: build/C/man2/remap_file_pages.2:51
7958 msgid ""
7959 "The B<remap_file_pages>()  system call is used to create a nonlinear "
7960 "mapping, that is, a mapping in which the pages of the file are mapped into a "
7961 "nonsequential order in memory.  The advantage of using B<remap_file_pages>"
7962 "()  over using repeated calls to B<mmap>(2)  is that the former approach "
7963 "does not require the kernel to create additional VMA (Virtual Memory Area) "
7964 "data structures."
7965 msgstr ""
7966 "B<remap_file_pages>()  システムコールは非線形なマッピング、 つまりファイルの"
7967 "ページがメモリ上で連続しない順番でマップされる マッピングを作成するために使わ"
7968 "れる。 B<remap_file_pages>()  を使う方が B<mmap>(2)  を繰り返して使うより優れ"
7969 "ている点は、 前者の方法ではカーネルが VMA (Virtual Memory Area, 仮想メモリ領"
7970 "域)  データ構造体を追加で作成する必要がないことである。"
7971
7972 #. type: Plain text
7973 #: build/C/man2/remap_file_pages.2:53
7974 msgid "To create a nonlinear mapping we perform the following steps:"
7975 msgstr "非線形マッピングを作成するためには、 以下のようなステップを実行する:"
7976
7977 #. type: TP
7978 #: build/C/man2/remap_file_pages.2:53
7979 #, no-wrap
7980 msgid "1."
7981 msgstr "1."
7982
7983 #. type: Plain text
7984 #: build/C/man2/remap_file_pages.2:61
7985 msgid ""
7986 "Use B<mmap>(2)  to create a mapping (which is initially linear).  This "
7987 "mapping must be created with the B<MAP_SHARED> flag."
7988 msgstr ""
7989 "B<mmap>(2)  を使い、マッピングを作成する (このマッピングは最初は線形であ"
7990 "る)。 このマッピングは B<MAP_SHARED> フラグを指定して作成されなければならな"
7991 "い。"
7992
7993 #. type: TP
7994 #: build/C/man2/remap_file_pages.2:61
7995 #, no-wrap
7996 msgid "2."
7997 msgstr "2."
7998
7999 #. type: Plain text
8000 #: build/C/man2/remap_file_pages.2:69
8001 msgid ""
8002 "Use one or more calls to B<remap_file_pages>()  to rearrange the "
8003 "correspondence between the pages of the mapping and the pages of the file.  "
8004 "It is possible to map the same page of a file into multiple locations within "
8005 "the mapped region."
8006 msgstr ""
8007 "B<remap_file_pages>()  を 1 回以上呼び出して、 マッピングのページとファイルの"
8008 "ページの対応関係を再構成する。 ファイルの同じページをマッピング領域の複数の場"
8009 "所に マップすることが可能である。"
8010
8011 #. type: Plain text
8012 #: build/C/man2/remap_file_pages.2:80
8013 msgid ""
8014 "The I<pgoff> and I<size> arguments specify the region of the file that is to "
8015 "be relocated within the mapping: I<pgoff> is a file offset in units of the "
8016 "system page size; I<size> is the length of the region in bytes."
8017 msgstr ""
8018 "I<pgoff> と I<size> 引き数は、マッピング内で再配置されるファイルの領域を指定"
8019 "する。 I<pgoff> はファイルオフセットであり、単位はシステムのページサイズであ"
8020 "る。 I<size> は領域の長さであり、単位はバイトである。"
8021
8022 #. type: Plain text
8023 #: build/C/man2/remap_file_pages.2:98
8024 msgid ""
8025 "The I<addr> argument serves two purposes.  First, it identifies the mapping "
8026 "whose pages we want to rearrange.  Thus, I<addr> must be an address that "
8027 "falls within a region previously mapped by a call to B<mmap>(2).  Second, "
8028 "I<addr> specifies the address at which the file pages identified by I<pgoff> "
8029 "and I<size> will be placed."
8030 msgstr ""
8031 "I<addr> 引き数は 2 つの目的で使われる。 第 1 の目的は、この引き数によって再編"
8032 "成したいページの マッピングを識別することである。 よって I<addr> は B<mmap>"
8033 "(2)  の呼び出しで過去にマップされた領域内のアドレスでなければならない。 第 2 "
8034 "の目的は、 I<pgoff> と I<size> で識別されるファイルページが置かれる予定のアド"
8035 "レスを、 I<addr> によって指定することである。"
8036
8037 #.  This rounding is weird, and not consistent with the treatment of
8038 #.  the analogous arguments for munmap()/mprotect() and for mlock().
8039 #.  MTK, 14 Sep 2005
8040 #. type: Plain text
8041 #: build/C/man2/remap_file_pages.2:112
8042 msgid ""
8043 "The values specified in I<addr> and I<size> should be multiples of the "
8044 "system page size.  If they are not, then the kernel rounds I<both> values "
8045 "I<down> to the nearest multiple of the page size."
8046 msgstr ""
8047 "I<addr> と I<size> に指定する値は、システムのページサイズの倍数とすべきであ"
8048 "る。 それ以外の場合、カーネルは「両方」の値を 最も近いページサイズの倍数へ"
8049 "「切り下げる」。"
8050
8051 #. type: Plain text
8052 #: build/C/man2/remap_file_pages.2:116
8053 msgid "The I<prot> argument must be specified as 0."
8054 msgstr "I<prot> 引き数は 0 に指定されなければならない。"
8055
8056 #. type: Plain text
8057 #: build/C/man2/remap_file_pages.2:124
8058 msgid ""
8059 "The I<flags> argument has the same meaning as for B<mmap>(2), but all flags "
8060 "other than B<MAP_NONBLOCK> are ignored."
8061 msgstr ""
8062 "I<flags> 引き数は B<mmap>(2)  のものと同じ意味であるが、 B<MAP_NONBLOCK> 以外"
8063 "の全てのフラグは無視される。"
8064
8065 #. type: Plain text
8066 #: build/C/man2/remap_file_pages.2:131
8067 msgid ""
8068 "On success, B<remap_file_pages>()  returns 0.  On error, -1 is returned, and "
8069 "I<errno> is set appropriately."
8070 msgstr ""
8071 "成功した場合、 B<remap_file_pages>()  は 0 を返す。 エラーの場合、-1 が返さ"
8072 "れ、 I<errno> が適切に設定される。"
8073
8074 #. type: Plain text
8075 #: build/C/man2/remap_file_pages.2:139
8076 msgid ""
8077 "I<addr> does not refer to a valid mapping created with the B<MAP_SHARED> "
8078 "flag."
8079 msgstr ""
8080 "I<addr> が B<MAP_SHARED> フラグを指定して作成された有効なマッピングを参照して"
8081 "いない。"
8082
8083 #.  And possibly others from vma->vm_ops->populate()
8084 #. type: Plain text
8085 #: build/C/man2/remap_file_pages.2:148
8086 msgid "I<addr>, I<size>, I<prot>, or I<pgoff> is invalid."
8087 msgstr "I<addr>, I<size>, I<prot>, I<pgoff> のいずれかが不正である。"
8088
8089 #. type: Plain text
8090 #: build/C/man2/remap_file_pages.2:153
8091 msgid ""
8092 "The B<remap_file_pages>()  system call appeared in Linux 2.5.46; glibc "
8093 "support was added in version 2.3.3."
8094 msgstr ""
8095 "B<remap_file_pages>()  システムコールは Linux 2.5.46 で登場した。 glibc での"
8096 "サポートは glibc バージョン 2.3.3 で追加された。"
8097
8098 #. type: Plain text
8099 #: build/C/man2/remap_file_pages.2:157
8100 msgid "The B<remap_file_pages>()  system call is Linux-specific."
8101 msgstr "B<remap_file_pages>()  システムコールは Linux 固有のものである。"
8102
8103 #. type: Plain text
8104 #: build/C/man2/remap_file_pages.2:164
8105 msgid ""
8106 "B<getpagesize>(2), B<mmap>(2), B<mmap2>(2), B<mprotect>(2), B<mremap>(2), "
8107 "B<msync>(2)"
8108 msgstr ""
8109 "B<getpagesize>(2), B<mmap>(2), B<mmap2>(2), B<mprotect>(2), B<mremap>(2), "
8110 "B<msync>(2)"
8111
8112 #. type: TH
8113 #: build/C/man3/shm_open.3:26
8114 #, no-wrap
8115 msgid "SHM_OPEN"
8116 msgstr "SHM_OPEN"
8117
8118 #. type: TH
8119 #: build/C/man3/shm_open.3:26
8120 #, no-wrap
8121 msgid "2009-02-25"
8122 msgstr "2009-02-25"
8123
8124 #. type: Plain text
8125 #: build/C/man3/shm_open.3:29
8126 msgid ""
8127 "shm_open, shm_unlink - create/open or unlink POSIX shared memory objects"
8128 msgstr "shm_open, shm_unlink - POSIX 共有メモリ・オブジェクトの作成/オープン/削除を行う"
8129
8130 #. type: Plain text
8131 #: build/C/man3/shm_open.3:33
8132 msgid "B<#include E<lt>sys/stat.hE<gt>> /* For mode constants */"
8133 msgstr "B<#include E<lt>sys/stat.hE<gt>> /* mode 定数用 */"
8134
8135 #. type: Plain text
8136 #: build/C/man3/shm_open.3:35
8137 msgid "B<#include E<lt>fcntl.hE<gt>> /* For O_* constants */"
8138 msgstr "B<#include E<lt>fcntl.hE<gt>> /* O_* 定数の定義用 */"
8139
8140 #. type: Plain text
8141 #: build/C/man3/shm_open.3:37
8142 msgid ""
8143 "B<int shm_open(const char *>I<name>B<, int >I<oflag>B<, mode_t >I<mode>B<);>"
8144 msgstr ""
8145 "B<int shm_open(const char *>I<name>B<, int >I<oflag>B<, mode_t >I<mode>B<);>"
8146
8147 #. type: Plain text
8148 #: build/C/man3/shm_open.3:39
8149 msgid "B<int shm_unlink(const char *>I<name>B<);>"
8150 msgstr "B<int shm_unlink(const char *>I<name>B<);>"
8151
8152 #. type: Plain text
8153 #: build/C/man3/shm_open.3:41
8154 msgid "Link with I<-lrt>."
8155 msgstr "I<-lrt> でリンクする。"
8156
8157 #. type: Plain text
8158 #: build/C/man3/shm_open.3:53
8159 msgid ""
8160 "B<shm_open>()  creates and opens a new, or opens an existing, POSIX shared "
8161 "memory object.  A POSIX shared memory object is in effect a handle which can "
8162 "be used by unrelated processes to B<mmap>(2)  the same region of shared "
8163 "memory.  The B<shm_unlink>()  function performs the converse operation, "
8164 "removing an object previously created by B<shm_open>()."
8165 msgstr ""
8166 "B<shm_open>()  は、POSIX 共有メモリ・オブジェクトを新規に作成/オープンした"
8167 "り、 すでに存在するオブジェクトをオープンしたりする。 POSIX 共有メモリ・オブ"
8168 "ジェクトは、実際には、関係のないプロセスが 共有メモリの同じ領域を B<mmap>"
8169 "(2)  するために使用することができる手段である。 B<shm_unlink>()  は、逆の操"
8170 "作、つまり以前に B<shm_open>()  で作成されたオブジェクトの削除を行う。"
8171
8172 #.  glibc allows the initial slash to be omitted, and makes
8173 #.  multiple initial slashes equivalent to a single slash.
8174 #.  This differs from the implementation of POSIX message queues.
8175 #.  glibc allows subdirectory components in the name, in which
8176 #.  case the subdirectory must exist under /dev/shm, and allow the
8177 #.  required permissions if a user wants to create a shared memory
8178 #.  object in that subdirectory.
8179 #. type: Plain text
8180 #: build/C/man3/shm_open.3:74
8181 msgid ""
8182 "The operation of B<shm_open>()  is analogous to that of B<open>(2).  I<name> "
8183 "specifies the shared memory object to be created or opened.  For portable "
8184 "use, a shared memory object should be identified by a name of the form I</"
8185 "somename>; that is, a null-terminated string of up to B<NAME_MAX> (i.e., "
8186 "255) characters consisting of an initial slash, followed by one or more "
8187 "characters, none of which are slashes."
8188 msgstr ""
8189 "B<shm_open>()  の動作は B<open>(2)  とよく似ている。 I<name> で作成したりオー"
8190 "プンしたりする共有メモリ・オブジェクトを指定する。 移植性を持たせるためには、"
8191 "共有メモリ・オブジェクトは I</somename> という形式の名前で識別し、 その名前"
8192 "は、最大で B<NAME_MAX> (すなわち 255) 文字の NULL 終端された文字列で、 スラッ"
8193 "シュで始まり、スラッシュ以外の文字が 1 文字以上続く形式 にすべきである。"
8194
8195 #. type: Plain text
8196 #: build/C/man3/shm_open.3:81
8197 msgid ""
8198 "I<oflag> is a bit mask created by ORing together exactly one of B<O_RDONLY> "
8199 "or B<O_RDWR> and any of the other flags listed here:"
8200 msgstr ""
8201 "I<oflag> はビットマスクで、 B<O_RDONLY> と B<O_RDWR> のいずれか一方と、以下に"
8202 "述べる他のフラグの論理和をとったもの を指定する。"
8203
8204 #. type: TP
8205 #: build/C/man3/shm_open.3:81
8206 #, no-wrap
8207 msgid "B<O_RDONLY>"
8208 msgstr "B<O_RDONLY>"
8209
8210 #. type: Plain text
8211 #: build/C/man3/shm_open.3:87
8212 msgid ""
8213 "Open the object for read access.  A shared memory object opened in this way "
8214 "can only be B<mmap>(2)ed for read (B<PROT_READ>) access."
8215 msgstr ""
8216 "読み出しアクセス用にオブジェクトをオープンする。 このフラグを指定してオープン"
8217 "された共有メモリ・オブジェクトは、 読み出し (B<PROT_READ>) アクセスでのみ "
8218 "B<mmap>(2)  することができる。"
8219
8220 #. type: TP
8221 #: build/C/man3/shm_open.3:87
8222 #, no-wrap
8223 msgid "B<O_RDWR>"
8224 msgstr "B<O_RDWR>"
8225
8226 #. type: Plain text
8227 #: build/C/man3/shm_open.3:90
8228 msgid "Open the object for read-write access."
8229 msgstr "読み書きアクセス用にオブジェクトをオープンする。"
8230
8231 #. type: TP
8232 #: build/C/man3/shm_open.3:90
8233 #, no-wrap
8234 msgid "B<O_CREAT>"
8235 msgstr "B<O_CREAT>"
8236
8237 #.  In truth it is actually the file system IDs on Linux, but these
8238 #.  are nearly always the same as the effective IDs.  (MTK, Jul 05)
8239 #. type: Plain text
8240 #: build/C/man3/shm_open.3:110
8241 msgid ""
8242 "Create the shared memory object if it does not exist.  The user and group "
8243 "ownership of the object are taken from the corresponding effective IDs of "
8244 "the calling process, and the object's permission bits are set according to "
8245 "the low-order 9 bits of I<mode>, except that those bits set in the process "
8246 "file mode creation mask (see B<umask>(2))  are cleared for the new object.  "
8247 "A set of macro constants which can be used to define I<mode> is listed in "
8248 "B<open>(2).  (Symbolic definitions of these constants can be obtained by "
8249 "including I<E<lt>sys/stat.hE<gt>>.)"
8250 msgstr ""
8251 "存在しない場合、共有メモリ・オブジェクトを作成する。 オブジェクトのユーザとグ"
8252 "ループの所有権は、 呼び出し元プロセスの対応する実効 ID が使われ、 オブジェク"
8253 "トの許可ビットは I<mode> の下位 9 ビットに基づいて設定される。ただし、 ファイ"
8254 "ルモード作成マスク (B<umask>(2)  参照) に設定されている値は、新規オブジェクト"
8255 "に関してはクリアされる。 I<mode> を定義するために使用できるマクロ定数(群)は "
8256 "B<open>(2)  に記載されている (これらの定数のシンボル定義は I<E<lt>sys/stat."
8257 "hE<gt>> のインクルードにより得られる)。"
8258
8259 #. type: Plain text
8260 #: build/C/man3/shm_open.3:116
8261 msgid ""
8262 "A new shared memory object initially has zero length\\(emthe size of the "
8263 "object can be set using B<ftruncate>(2).  The newly allocated bytes of a "
8264 "shared memory object are automatically initialized to 0."
8265 msgstr ""
8266 "新規に作成された共有メモリ・オブジェクトは長さ 0 で初期化される。 オブジェク"
8267 "トの大きさは B<ftruncate>(2)  を使って設定できる。 共有メモリ・オブジェクトと"
8268 "して新規に確保されたバイトは自動的に 0 に初期化される。"
8269
8270 #. type: TP
8271 #: build/C/man3/shm_open.3:116
8272 #, no-wrap
8273 msgid "B<O_EXCL>"
8274 msgstr "B<O_EXCL>"
8275
8276 #. type: Plain text
8277 #: build/C/man3/shm_open.3:125
8278 msgid ""
8279 "If B<O_CREAT> was also specified, and a shared memory object with the given "
8280 "I<name> already exists, return an error.  The check for the existence of the "
8281 "object, and its creation if it does not exist, are performed atomically."
8282 msgstr ""
8283 "B<O_CREAT> が一緒に指定されており、 I<name> で指定された共有メモリ・オブジェ"
8284 "クトが既に存在した場合、 エラーを返す。 オブジェクトの存在確認と、存在しな"
8285 "かった場合のオブジェクト作成は、 必ず一連の操作として実行される (performed "
8286 "atomically)。"
8287
8288 #. type: TP
8289 #: build/C/man3/shm_open.3:125
8290 #, no-wrap
8291 msgid "B<O_TRUNC>"
8292 msgstr "B<O_TRUNC>"
8293
8294 #. type: Plain text
8295 #: build/C/man3/shm_open.3:128
8296 msgid "If the shared memory object already exists, truncate it to zero bytes."
8297 msgstr ""
8298 "共有メモリ・オブジェクトがすでに存在した場合、 そのオブジェクトを 0 バイトに"
8299 "切り詰める。"
8300
8301 #. type: Plain text
8302 #: build/C/man3/shm_open.3:131
8303 msgid ""
8304 "Definitions of these flag values can be obtained by including I<E<lt>fcntl."
8305 "hE<gt>>."
8306 msgstr ""
8307 "これらのフラグ値の定義は I<E<lt>fcntl.hE<gt>> のインクルードにより得られる。"
8308
8309 #. type: Plain text
8310 #: build/C/man3/shm_open.3:142
8311 msgid ""
8312 "On successful completion B<shm_open>()  returns a new file descriptor "
8313 "referring to the shared memory object.  This file descriptor is guaranteed "
8314 "to be the lowest-numbered file descriptor not previously opened within the "
8315 "process.  The B<FD_CLOEXEC> flag (see B<fcntl>(2))  is set for the file "
8316 "descriptor."
8317 msgstr ""
8318 "成功して完了した場合、 B<shm_open>()  は共有メモリ・オブジェクトを参照する新"
8319 "しいファイル・ディスクリプタを返す。 このファイル・ディスクリプタは、そのプロ"
8320 "セス内で過去にオープンされていない ファイル・ディスクリプタの中で最も小さな数"
8321 "になることが保証される。 B<FD_CLOEXEC> フラグ (B<fcntl>(2)  を参照) が、この"
8322 "ファイル・ディスクリプタに設定される。"
8323
8324 #. type: Plain text
8325 #: build/C/man3/shm_open.3:151
8326 msgid ""
8327 "The file descriptor is normally used in subsequent calls to B<ftruncate>(2)  "
8328 "(for a newly created object) and B<mmap>(2).  After a call to B<mmap>(2)  "
8329 "the file descriptor may be closed without affecting the memory mapping."
8330 msgstr ""
8331 "通常、これらのファイル・ディスクリプタは、この後続けて実行される B<ftruncate>"
8332 "(2)  (新規に作成されたオブジェクトの場合のみ) と B<mmap>(2)  の呼び出しに使用"
8333 "される。 B<mmap>(2)  を呼び出した後は、ファイル・ディスクリプタをクローズして"
8334 "もよく、 クローズしてもメモリ・マッピングに影響を与えることはない。"
8335
8336 #. type: Plain text
8337 #: build/C/man3/shm_open.3:169
8338 msgid ""
8339 "The operation of B<shm_unlink>()  is analogous to B<unlink>(2): it removes a "
8340 "shared memory object name, and, once all processes have unmapped the object, "
8341 "de-allocates and destroys the contents of the associated memory region.  "
8342 "After a successful B<shm_unlink>(), attempts to B<shm_open>()  an object "
8343 "with the same I<name> will fail (unless B<O_CREAT> was specified, in which "
8344 "case a new, distinct object is created)."
8345 msgstr ""
8346 "B<shm_unlink>()  の動作は B<unlink>(2)  とよく似ている: 共有メモリ・オブジェ"
8347 "クト名を削除し、すべてのプロセスが処理対象の オブジェクトをアンマップした時点"
8348 "でオブジェクトの割り当てを解除し、 対応するメモリ領域の内容を破棄する。 "
8349 "B<shm_unlink>()  が成功した後で、同じ I<name> を持つオブジェクトに対して "
8350 "B<shm_open>()  を行うと、 (B<O_CREAT> が指定されていない場合) 失敗する。 "
8351 "(B<O_CREAT> が指定されている場合、新しく別のオブジェクトが作成される)。"
8352
8353 #. type: Plain text
8354 #: build/C/man3/shm_open.3:178
8355 msgid ""
8356 "On success, B<shm_open>()  returns a nonnegative file descriptor.  On "
8357 "failure, B<shm_open>()  returns -1.  B<shm_unlink>()  returns 0 on success, "
8358 "or -1 on error."
8359 msgstr ""
8360 "成功した場合、 B<shm_open>()  は非負のファイル・ディスクリプタを返す。 失敗し"
8361 "た場合、 B<shm_open>()  は -1 を返す。 B<shm_unlink>()  は、成功した場合 0 "
8362 "を、エラーが起こった場合 -1 を返す。"
8363
8364 #. type: Plain text
8365 #: build/C/man3/shm_open.3:185
8366 msgid ""
8367 "On failure, I<errno> is set to indicate the cause of the error.  Values "
8368 "which may appear in I<errno> include the following:"
8369 msgstr ""
8370 "失敗した場合、エラーの原因を示すため I<errno> が設定される。 I<errno> に設定"
8371 "される値は以下の通りである:"
8372
8373 #. type: Plain text
8374 #: build/C/man3/shm_open.3:190
8375 msgid "Permission to B<shm_unlink>()  the shared memory object was denied."
8376 msgstr "共有メモリオブジェクトを B<shm_unlink>()  する権限がなかった。"
8377
8378 #. type: Plain text
8379 #: build/C/man3/shm_open.3:200
8380 msgid ""
8381 "Permission was denied to B<shm_open>()  I<name> in the specified I<mode>, or "
8382 "B<O_TRUNC> was specified and the caller does not have write permission on "
8383 "the object."
8384 msgstr ""
8385 "指定された I<mode> で I<name> を B<shm_open>()  する権限がなかった。もしく"
8386 "は、 B<O_TRUNC> が指定されたが、呼び出し元にはそのオブジェクトに対する書き込"
8387 "み権限が なかった。"
8388
8389 #. type: TP
8390 #: build/C/man3/shm_open.3:200 build/C/man2/shmget.2:194
8391 #, no-wrap
8392 msgid "B<EEXIST>"
8393 msgstr "B<EEXIST>"
8394
8395 #. type: Plain text
8396 #: build/C/man3/shm_open.3:211
8397 msgid ""
8398 "Both B<O_CREAT> and B<O_EXCL> were specified to B<shm_open>()  and the "
8399 "shared memory object specified by I<name> already exists."
8400 msgstr ""
8401 "B<O_CREAT> と B<O_EXCL> の両方が B<shm_open>()  に指定されたが、 I<name> で指"
8402 "定された共有メモリ・オブジェクトが既に存在した。"
8403
8404 #. type: Plain text
8405 #: build/C/man3/shm_open.3:218
8406 msgid "The I<name> argument to B<shm_open>()  was invalid."
8407 msgstr "B<shm_open>()  に与えられた I<name> 引き数が不正であった。"
8408
8409 #. type: TP
8410 #: build/C/man3/shm_open.3:218
8411 #, no-wrap
8412 msgid "B<EMFILE>"
8413 msgstr "B<EMFILE>"
8414
8415 #. type: Plain text
8416 #: build/C/man3/shm_open.3:221
8417 msgid "The process already has the maximum number of files open."
8418 msgstr "プロセスがオープン可能なファイル数の上限にすでに達していた。"
8419
8420 #. type: TP
8421 #: build/C/man3/shm_open.3:221
8422 #, no-wrap
8423 msgid "B<ENAMETOOLONG>"
8424 msgstr "B<ENAMETOOLONG>"
8425
8426 #. type: Plain text
8427 #: build/C/man3/shm_open.3:227
8428 msgid "The length of I<name> exceeds B<PATH_MAX>."
8429 msgstr "I<name> の長さが B<PATH_MAX> を越えている。"
8430
8431 #. type: Plain text
8432 #: build/C/man3/shm_open.3:231
8433 msgid ""
8434 "The limit on the total number of files open on the system has been reached."
8435 msgstr "ファイルシステムでオープンできるファイル数の上限に達した。"
8436
8437 #. type: TP
8438 #: build/C/man3/shm_open.3:231 build/C/man3/shm_open.3:240
8439 #: build/C/man2/shmget.2:208
8440 #, no-wrap
8441 msgid "B<ENOENT>"
8442 msgstr "B<ENOENT>"
8443
8444 #. type: Plain text
8445 #: build/C/man3/shm_open.3:240
8446 msgid ""
8447 "An attempt was made to B<shm_open>()  a I<name> that did not exist, and "
8448 "B<O_CREAT> was not specified."
8449 msgstr ""
8450 "存在していない I<name> のオブジェクトを B<shm_open>()  しようとしたが、 "
8451 "B<O_CREAT> が指定されていなかった。"
8452
8453 #. type: Plain text
8454 #: build/C/man3/shm_open.3:247
8455 msgid ""
8456 "An attempt was to made to B<shm_unlink>()  a I<name> that does not exist."
8457 msgstr "存在しない I<name> のオブジェクトを B<shm_unlink>()  しようとした。"
8458
8459 #. type: Plain text
8460 #: build/C/man3/shm_open.3:249
8461 msgid "These functions are provided in glibc 2.2 and later."
8462 msgstr "これらの関数は glibc 2.2 以降で提供されている。"
8463
8464 #. type: Plain text
8465 #: build/C/man3/shm_open.3:255
8466 msgid ""
8467 "POSIX.1-2001 says that the group ownership of a newly created shared memory "
8468 "object is set to either the calling process's effective group ID or \"a "
8469 "system default group ID\"."
8470 msgstr ""
8471 "POSIX.1-2001 には、新規に作成される共有メモリオブジェクトのグループ所有権"
8472 "は、 呼び出し元プロセスの実効グループ ID か 「システムのデフォルトのグループ "
8473 "ID」 のどちらかに設定される、と書かれている。"
8474
8475 #. type: Plain text
8476 #: build/C/man3/shm_open.3:264
8477 msgid ""
8478 "POSIX leaves the behavior of the combination of B<O_RDONLY> and B<O_TRUNC> "
8479 "unspecified.  On Linux, this will successfully truncate an existing shared "
8480 "memory object\\(emthis may not be so on other UNIX systems."
8481 msgstr ""
8482 "POSIX は B<O_RDONLY> と B<O_TRUNC> が一緒に指定された場合の動作を未定義にして"
8483 "いる。Linux では、 既存の共有メモリ・オブジェクトに対する切り詰め (truncate) "
8484 "は成功する。 しかし、他の UNIX システムでも同じであるとは限らない。"
8485
8486 #. type: Plain text
8487 #: build/C/man3/shm_open.3:269
8488 msgid ""
8489 "The POSIX shared memory object implementation on Linux 2.4 makes use of a "
8490 "dedicated file system, which is normally mounted under I</dev/shm>."
8491 msgstr ""
8492 "Linux 2.4 における POSIX 共有メモリ・オブジェクトの実装は 専用のファイルシス"
8493 "テムを使用する。そのファイルシステムは通常 I</dev/shm> にマウントされる。"
8494
8495 #. type: Plain text
8496 #: build/C/man3/shm_open.3:280
8497 msgid ""
8498 "B<close>(2), B<fchmod>(2), B<fchown>(2), B<fcntl>(2), B<fstat>(2), "
8499 "B<ftruncate>(2), B<mmap>(2), B<open>(2), B<umask>(2), B<shm_overview>(7)"
8500 msgstr ""
8501 "B<close>(2), B<fchmod>(2), B<fchown>(2), B<fcntl>(2), B<fstat>(2), "
8502 "B<ftruncate>(2), B<mmap>(2), B<open>(2), B<umask>(2), B<shm_overview>(7)"
8503
8504 #. type: TH
8505 #: build/C/man7/shm_overview.7:27
8506 #, no-wrap
8507 msgid "SHM_OVERVIEW"
8508 msgstr "SHM_OVERVIEW"
8509
8510 #. type: Plain text
8511 #: build/C/man7/shm_overview.7:30
8512 msgid "shm_overview - overview of POSIX shared memory"
8513 msgstr "shm_overview - POSIX 共有メモリの概要"
8514
8515 #. type: Plain text
8516 #: build/C/man7/shm_overview.7:33
8517 msgid ""
8518 "The POSIX shared memory API allows processes to communicate information by "
8519 "sharing a region of memory."
8520 msgstr ""
8521 "POSIX 共有メモリ API を使用すると、メモリのある領域を共有して、 プロセス間で"
8522 "情報をやり取りすることができる。"
8523
8524 #. type: Plain text
8525 #: build/C/man7/shm_overview.7:35
8526 msgid "The interfaces employed in the API are:"
8527 msgstr "この API では以下のインターフェースが採用されている。"
8528
8529 #. type: TP
8530 #: build/C/man7/shm_overview.7:35
8531 #, no-wrap
8532 msgid "B<shm_open>(3)"
8533 msgstr "B<shm_open>(3)"
8534
8535 #. type: Plain text
8536 #: build/C/man7/shm_overview.7:42
8537 msgid ""
8538 "Create and open a new object, or open an existing object.  This is analogous "
8539 "to B<open>(2).  The call returns a file descriptor for use by the other "
8540 "interfaces listed below."
8541 msgstr ""
8542 "新しいオブジェクトを生成しオープンする、もしくは 既存のオブジェクトをオープン"
8543 "する。これは B<open>(2)  と同じである。下記にある他のインターフェースで使用す"
8544 "る ファイルディスクリプタを返す。"
8545
8546 #. type: TP
8547 #: build/C/man7/shm_overview.7:42
8548 #, no-wrap
8549 msgid "B<ftruncate>(2)"
8550 msgstr "B<ftruncate>(2)"
8551
8552 #. type: Plain text
8553 #: build/C/man7/shm_overview.7:46
8554 msgid ""
8555 "Set the size of the shared memory object.  (A newly created shared memory "
8556 "object has a length of zero.)"
8557 msgstr "共有メモリオブジェクトの大きさを設定する。"
8558
8559 #. type: Plain text
8560 #: build/C/man7/shm_overview.7:50
8561 msgid ""
8562 "Map the shared memory object into the virtual address space of the calling "
8563 "process."
8564 msgstr ""
8565 "呼び出したプロセスの仮想アドレス空間に共有メモリオブジェクトを マップする。"
8566
8567 #. type: TP
8568 #: build/C/man7/shm_overview.7:50
8569 #, no-wrap
8570 msgid "B<munmap>(2)"
8571 msgstr "B<munmap>(2)"
8572
8573 #. type: Plain text
8574 #: build/C/man7/shm_overview.7:54
8575 msgid ""
8576 "Unmap the shared memory object from the virtual address space of the calling "
8577 "process."
8578 msgstr ""
8579 "呼び出したプロセスの仮想アドレス空間から 共有メモリオブジェクトをアンマップす"
8580 "る。"
8581
8582 #. type: TP
8583 #: build/C/man7/shm_overview.7:54
8584 #, no-wrap
8585 msgid "B<shm_unlink>(3)"
8586 msgstr "B<shm_unlink>(3)"
8587
8588 #. type: Plain text
8589 #: build/C/man7/shm_overview.7:57
8590 msgid "Remove a shared memory object name."
8591 msgstr "共有メモリオブジェクト名を削除する。"
8592
8593 #. type: TP
8594 #: build/C/man7/shm_overview.7:57
8595 #, no-wrap
8596 msgid "B<close>(2)"
8597 msgstr "B<close>(2)"
8598
8599 #. type: Plain text
8600 #: build/C/man7/shm_overview.7:62
8601 msgid ""
8602 "Close the file descriptor allocated by B<shm_open>(3)  when it is no longer "
8603 "needed."
8604 msgstr ""
8605 "B<shm_open>(3)  で割り当てられたファイルディスクリプタが不要になった際に、 そ"
8606 "のファイルディスクリプタをクローズする。"
8607
8608 #. type: TP
8609 #: build/C/man7/shm_overview.7:62
8610 #, no-wrap
8611 msgid "B<fstat>(2)"
8612 msgstr "B<fstat>(2)"
8613
8614 #. type: Plain text
8615 #: build/C/man7/shm_overview.7:76
8616 msgid ""
8617 "Obtain a I<stat> structure that describes the shared memory object.  Among "
8618 "the information returned by this call are the object's size (I<st_size>), "
8619 "permissions (I<st_mode>), owner (I<st_uid>), and group (I<st_gid>)."
8620 msgstr ""
8621 "その共有メモリオブジェクトについての情報が入った I<stat> 構造体を取得する。 "
8622 "このシステムコールが返す情報には、オブジェクトのサイズ (I<st_size>)、 許可属"
8623 "性 (I<st_mode>)、 所有者 (I<st_uid>)、 グループ (I<st_gid>)  がある。"
8624
8625 #. type: TP
8626 #: build/C/man7/shm_overview.7:76
8627 #, no-wrap
8628 msgid "B<fchown>(2)"
8629 msgstr "B<fchown>(2)"
8630
8631 #. type: Plain text
8632 #: build/C/man7/shm_overview.7:79
8633 msgid "To change the ownership of a shared memory object."
8634 msgstr "共有メモリオブジェクトの所有権を変更する。"
8635
8636 #. type: TP
8637 #: build/C/man7/shm_overview.7:79
8638 #, no-wrap
8639 msgid "B<fchmod>(2)"
8640 msgstr "B<fchmod>(2)"
8641
8642 #. type: Plain text
8643 #: build/C/man7/shm_overview.7:82
8644 msgid "To change the permissions of a shared memory object."
8645 msgstr "共有メモリオブジェクトの許可属性を変更する。"
8646
8647 #. type: SS
8648 #: build/C/man7/shm_overview.7:82
8649 #, no-wrap
8650 msgid "Versions"
8651 msgstr "Versions"
8652
8653 #. type: Plain text
8654 #: build/C/man7/shm_overview.7:84
8655 msgid "POSIX shared memory is supported since Linux 2.4 and glibc 2.2."
8656 msgstr "POSIX 共有メモリは Linux 2.4 と glibc 2.2 以降でサポートされている。"
8657
8658 #. type: SS
8659 #: build/C/man7/shm_overview.7:84
8660 #, no-wrap
8661 msgid "Persistence"
8662 msgstr "持続性"
8663
8664 #. type: Plain text
8665 #: build/C/man7/shm_overview.7:89
8666 msgid ""
8667 "POSIX shared memory objects have kernel persistence: a shared memory object "
8668 "will exist until the system is shut down, or until all processes have "
8669 "unmapped the object and it has been deleted with B<shm_unlink>(3)"
8670 msgstr ""
8671 "POSIX 共有メモリオブジェクトはカーネル内で保持される。 共有メモリオブジェクト"
8672 "は、システムがシャットダウンされるか、 全てのプロセスがそのオブジェクトをアン"
8673 "マップし、 B<shm_unlink>(3)  で削除されるまで、存在し続ける。"
8674
8675 #. type: SS
8676 #: build/C/man7/shm_overview.7:89
8677 #, no-wrap
8678 msgid "Linking"
8679 msgstr "リンク"
8680
8681 #. type: Plain text
8682 #: build/C/man7/shm_overview.7:94
8683 msgid ""
8684 "Programs using the POSIX shared memory API must be compiled with I<cc -lrt> "
8685 "to link against the real-time library, I<librt>."
8686 msgstr ""
8687 "POSIX 共有メモリ API を使用したプログラムは I<cc -lrt> でコンパイルし、リアル"
8688 "タイムライブラリ I<librt> とリンクしなければならない。"
8689
8690 #. type: SS
8691 #: build/C/man7/shm_overview.7:94
8692 #, no-wrap
8693 msgid "Accessing shared memory objects via the file system"
8694 msgstr "ファイルシステム経由での共有メモリオブジェクトへのアクセス"
8695
8696 #. type: Plain text
8697 #: build/C/man7/shm_overview.7:101
8698 msgid ""
8699 "On Linux, shared memory objects are created in a (I<tmpfs>)  virtual file "
8700 "system, normally mounted under I</dev/shm>.  Since kernel 2.6.19, Linux "
8701 "supports the use of access control lists (ACLs)  to control the permissions "
8702 "of objects in the virtual file system."
8703 msgstr ""
8704 "Linux では、共有メモリオブジェクトは通常 I</dev/shm> 以下にマウントされる仮想"
8705 "ファイルシステム (I<tmpfs>)  内に作成される。 カーネル 2.6.19 以降の Linux で"
8706 "は、 仮想ファイルシステム内のオブジェクトの許可属性の制御に、 アクセス制御リ"
8707 "スト (ACL; access control lists) を使うことができる。"
8708
8709 #. type: Plain text
8710 #: build/C/man7/shm_overview.7:106
8711 msgid ""
8712 "Typically, processes must synchronize their access to a shared memory "
8713 "object, using, for example, POSIX semaphores."
8714 msgstr ""
8715 "通常は、共有メモリオブジェクトにアクセスするプロセスは、 POSIX セマフォなどを"
8716 "使ってプロセス間で同期をとらなければならない。"
8717
8718 #. type: Plain text
8719 #: build/C/man7/shm_overview.7:114
8720 msgid ""
8721 "System V shared memory (B<shmget>(2), B<shmop>(2), etc.) is an older shared "
8722 "memory API.  POSIX shared memory provides a simpler, and better designed "
8723 "interface; on the other hand POSIX shared memory is somewhat less widely "
8724 "available (especially on older systems) than System V shared memory."
8725 msgstr ""
8726 "System V 共有メモリ (B<shmget>(2), B<shmop>(2)  など) は古い共有メモリ API で"
8727 "ある。 POSIX 共有メモリは、より簡単で、うまく設計されたインタフェースを提供し"
8728 "ている。 一方で、POSIX 共有メモリは System V 共有メモリと比べると 利用できる"
8729 "システムが少ない (特に、古いシステムでは少ない)。"
8730
8731 #. type: Plain text
8732 #: build/C/man7/shm_overview.7:127
8733 msgid ""
8734 "B<fchmod>(2), B<fchown>(2), B<fstat>(2), B<ftruncate>(2), B<mmap>(2), "
8735 "B<mprotect>(2), B<munmap>(2), B<shmget>(2), B<shmop>(2), B<shm_open>(3), "
8736 "B<shm_unlink>(3), B<sem_overview>(7)"
8737 msgstr ""
8738 "B<fchmod>(2), B<fchown>(2), B<fstat>(2), B<ftruncate>(2), B<mmap>(2), "
8739 "B<mprotect>(2), B<munmap>(2), B<shmget>(2), B<shmop>(2), B<shm_open>(3), "
8740 "B<shm_unlink>(3), B<sem_overview>(7)"
8741
8742 #. type: TH
8743 #: build/C/man2/shmctl.2:45
8744 #, no-wrap
8745 msgid "SHMCTL"
8746 msgstr "SHMCTL"
8747
8748 #. type: TH
8749 #: build/C/man2/shmctl.2:45 build/C/man2/shmget.2:38
8750 #, no-wrap
8751 msgid "2012-05-31"
8752 msgstr "2012-05-31"
8753
8754 #. type: Plain text
8755 #: build/C/man2/shmctl.2:48
8756 msgid "shmctl - shared memory control"
8757 msgstr "shmctl - 共有メモリ (shared memory) を制御する"
8758
8759 #. type: Plain text
8760 #: build/C/man2/shmctl.2:51 build/C/man2/shmget.2:44
8761 msgid "B<#include E<lt>sys/ipc.hE<gt>>"
8762 msgstr "B<#include E<lt>sys/ipc.hE<gt>>"
8763
8764 #. type: Plain text
8765 #: build/C/man2/shmctl.2:53 build/C/man2/shmget.2:46
8766 msgid "B<#include E<lt>sys/shm.hE<gt>>"
8767 msgstr "B<#include E<lt>sys/shm.hE<gt>>"
8768
8769 #. type: Plain text
8770 #: build/C/man2/shmctl.2:55
8771 msgid ""
8772 "B<int shmctl(int >I<shmid>B<, int >I<cmd>B<, struct shmid_ds *>I<buf>B<);>"
8773 msgstr ""
8774 "B<int shmctl(int >I<shmid>B<, int >I<cmd>B<, struct shmid_ds *>I<buf>B<);>"
8775
8776 #. type: Plain text
8777 #: build/C/man2/shmctl.2:62
8778 msgid ""
8779 "B<shmctl>()  performs the control operation specified by I<cmd> on the "
8780 "shared memory segment whose identifier is given in I<shmid>."
8781 msgstr ""
8782 "B<shmctl>()  は、識別子が I<shmid> の共有メモリ・セグメントに対して I<cmd> で"
8783 "指示した制御命令を実行する。"
8784
8785 #. type: Plain text
8786 #: build/C/man2/shmctl.2:67
8787 msgid ""
8788 "The I<buf> argument is a pointer to a I<shmid_ds> structure, defined in "
8789 "I<E<lt>sys/shm.hE<gt>> as follows:"
8790 msgstr ""
8791 "I<buf> 引き数は、 I<shmid_ds> 構造体へのポインタである。 この構造体は "
8792 "I<E<lt>sys/shm.hE<gt>> で以下のように定義されている"
8793
8794 #. type: Plain text
8795 #: build/C/man2/shmctl.2:81
8796 #, no-wrap
8797 msgid ""
8798 "struct shmid_ds {\n"
8799 "    struct ipc_perm shm_perm;    /* Ownership and permissions */\n"
8800 "    size_t          shm_segsz;   /* Size of segment (bytes) */\n"
8801 "    time_t          shm_atime;   /* Last attach time */\n"
8802 "    time_t          shm_dtime;   /* Last detach time */\n"
8803 "    time_t          shm_ctime;   /* Last change time */\n"
8804 "    pid_t           shm_cpid;    /* PID of creator */\n"
8805 "    pid_t           shm_lpid;    /* PID of last shmat(2)/shmdt(2) */\n"
8806 "    shmatt_t        shm_nattch;  /* No. of current attaches */\n"
8807 "    ...\n"
8808 "};\n"
8809 msgstr ""
8810 "struct shmid_ds {\n"
8811 "    struct ipc_perm shm_perm;    /* 所有権と許可 */\n"
8812 "    size_t          shm_segsz;   /* セグメントのサイズ (バイト) */\n"
8813 "    time_t          shm_atime;   /* 最後の付加 (attach) の時刻 */\n"
8814 "    time_t          shm_dtime;   /* 最後の分離 (detach) の時刻 */\n"
8815 "    time_t          shm_ctime;   /* 最後に変更が行われた時刻 */\n"
8816 "    pid_t           shm_cpid;    /* 作成者 (creator) の PID */\n"
8817 "    pid_t           shm_lpid;    /* 最後の shmat(2)/shmdt(2) の PID */\n"
8818 "    shmatt_t        shm_nattch;  /* 現在付加されている数 */\n"
8819 "    ...\n"
8820 "};\n"
8821
8822 #. type: Plain text
8823 #: build/C/man2/shmctl.2:89
8824 msgid ""
8825 "The I<ipc_perm> structure is defined as follows (the highlighted fields are "
8826 "settable using B<IPC_SET>):"
8827 msgstr "I<ipc_perm> 構造体は以下のように定義されている (強調されたフィールドは B<IPC_SET> を使って設定可能である):"
8828
8829 #. type: Plain text
8830 #: build/C/man2/shmctl.2:102
8831 #, no-wrap
8832 msgid ""
8833 "struct ipc_perm {\n"
8834 "    key_t          __key;    /* Key supplied to shmget(2) */\n"
8835 "    uid_t          B<uid>;      /* Effective UID of owner */\n"
8836 "    gid_t          B<gid>;      /* Effective GID of owner */\n"
8837 "    uid_t          cuid;     /* Effective UID of creator */\n"
8838 "    gid_t          cgid;     /* Effective GID of creator */\n"
8839 "    unsigned short B<mode>;     /* B<Permissions> + SHM_DEST and\n"
8840 "                                SHM_LOCKED flags */\n"
8841 "    unsigned short __seq;    /* Sequence number */\n"
8842 "};\n"
8843 msgstr ""
8844 "struct ipc_perm {\n"
8845 "    key_t          __key;    /* shmget(2) に与えられるキー */\n"
8846 "    uid_t          B<uid>;      /* 所有者の実効 UID */\n"
8847 "    gid_t          B<gid>;      /* 所有者の実効 GID */\n"
8848 "    uid_t          cuid;     /* 作成者の実効 UID */\n"
8849 "    gid_t          cgid;     /* 作成者の実効 GID */\n"
8850 "    unsigned short B<mode>;     /* B<許可> + SHM_DEST と\n"
8851 "                                SHM_LOCKED フラグ */\n"
8852 "    unsigned short __seq;    /* シーケンス番号 */\n"
8853 "};\n"
8854
8855 #. type: Plain text
8856 #: build/C/man2/shmctl.2:108
8857 msgid "Valid values for I<cmd> are:"
8858 msgstr "I<cmd> として有効な値は以下の通り:"
8859
8860 #. type: TP
8861 #: build/C/man2/shmctl.2:109
8862 #, no-wrap
8863 msgid "B<IPC_STAT>"
8864 msgstr "B<IPC_STAT>"
8865
8866 #. type: Plain text
8867 #: build/C/man2/shmctl.2:118
8868 msgid ""
8869 "Copy information from the kernel data structure associated with I<shmid> "
8870 "into the I<shmid_ds> structure pointed to by I<buf>.  The caller must have "
8871 "read permission on the shared memory segment."
8872 msgstr ""
8873 "I<shmid> に関連づけられたカーネルデータ構造体の情報を I<buf> で指された "
8874 "I<shmid_ds> 構造体にコピーする。 呼び出し元は共有メモリ・セグメントに対する "
8875 "読み込み許可を持たなければならない。"
8876
8877 #. type: TP
8878 #: build/C/man2/shmctl.2:118
8879 #, no-wrap
8880 msgid "B<IPC_SET>"
8881 msgstr "B<IPC_SET>"
8882
8883 #. type: Plain text
8884 #: build/C/man2/shmctl.2:136
8885 msgid ""
8886 "Write the values of some members of the I<shmid_ds> structure pointed to by "
8887 "I<buf> to the kernel data structure associated with this shared memory "
8888 "segment, updating also its I<shm_ctime> member.  The following fields can be "
8889 "changed: I<shm_perm.uid>, I<shm_perm.gid>, and (the least significant 9 bits "
8890 "of) I<shm_perm.mode>.  The effective UID of the calling process must match "
8891 "the owner (I<shm_perm.uid>)  or creator (I<shm_perm.cuid>)  of the shared "
8892 "memory segment, or the caller must be privileged."
8893 msgstr ""
8894 "I<buf> によって指される I<shmid_ds> 構造体のいくつかのメンバーの値を、 この共"
8895 "有メモリ・セグメントに関連づけられたカーネルデータ構造体に書き込み、 "
8896 "I<shm_ctime> メンバーも更新する。 以下のフィールドは変更できる。 I<shm_perm."
8897 "uid>, I<shm_perm.gid>, I<shm_perm.mode> (の最下位 9 ビット)。 呼び出したプロ"
8898 "セスの実効 UID が所有者 (I<shm_perm.uid>)  または作成者 (I<shm_perm.cuid>)  "
8899 "と一致するか、呼び出し元が特権を持たなければならない。"
8900
8901 #. type: TP
8902 #: build/C/man2/shmctl.2:136
8903 #, no-wrap
8904 msgid "B<IPC_RMID>"
8905 msgstr "B<IPC_RMID>"
8906
8907 #. type: Plain text
8908 #: build/C/man2/shmctl.2:153
8909 msgid ""
8910 "Mark the segment to be destroyed.  The segment will only actually be "
8911 "destroyed after the last process detaches it (i.e., when the I<shm_nattch> "
8912 "member of the associated structure I<shmid_ds> is zero).  The caller must be "
8913 "the owner or creator, or be privileged.  If a segment has been marked for "
8914 "destruction, then the (nonstandard)  B<SHM_DEST> flag of the I<shm_perm."
8915 "mode> field in the associated data structure retrieved by B<IPC_STAT> will "
8916 "be set."
8917 msgstr ""
8918 "セグメントに破棄済みのマークを付ける。 セグメントは、実際には最後プロセスがセ"
8919 "グメントを分離した (関連する I<shmid_ds> 構造体の I<shm_nattch> メンバーが 0 "
8920 "になった) 後でのみ破棄される。 呼び出し元は所有者か作成者であるか、特権を持た"
8921 "なければならない。 セグメントに破棄のマークが付けられると、 関連するデータ構"
8922 "造体において I<shm_perm.mode> フィールドの (標準ではない)  B<SHM_DEST> フラグ"
8923 "が設定される。 このデータ構造体は B<IPC_STAT> で取得される。"
8924
8925 #. type: Plain text
8926 #: build/C/man2/shmctl.2:156
8927 msgid ""
8928 "The caller I<must> ensure that a segment is eventually destroyed; otherwise "
8929 "its pages that were faulted in will remain in memory or swap."
8930 msgstr ""
8931 "呼び出し元は最終的にはセグメントを忘れずに破棄I<しなければならない>。 そうで"
8932 "なれば、フォールト (fault) されたページは メモリかスワップ (swap) に残り続け"
8933 "る。"
8934
8935 #. type: TP
8936 #: build/C/man2/shmctl.2:156
8937 #, no-wrap
8938 msgid "B<IPC_INFO> (Linux-specific)"
8939 msgstr "B<IPC_INFO> (Linux 固有)"
8940
8941 #. type: Plain text
8942 #: build/C/man2/shmctl.2:169
8943 msgid ""
8944 "Returns information about system-wide shared memory limits and parameters in "
8945 "the structure pointed to by I<buf>.  This structure is of type I<shminfo> "
8946 "(thus, a cast is required), defined in I<E<lt>sys/shm.hE<gt>> if the "
8947 "B<_GNU_SOURCE> feature test macro is defined:"
8948 msgstr ""
8949 "システム全体での共有メモリの制限とパラメータに関する情報を、 I<buf> が指す構"
8950 "造体に入れて返す。 この構造体は I<shminfo> 型である (そのためキャストが必要で"
8951 "ある)。 I<shminfo> は B<_GNU_SOURCE> 機能検査マクロが定義された場合に "
8952 "I<E<lt>sys/shm.hE<gt>> で以下のように定義される:"
8953
8954 #. type: Plain text
8955 #: build/C/man2/shmctl.2:183
8956 #, no-wrap
8957 msgid ""
8958 "struct  shminfo {\n"
8959 "    unsigned long shmmax; /* Maximum segment size */\n"
8960 "    unsigned long shmmin; /* Minimum segment size;\n"
8961 "                             always 1 */\n"
8962 "    unsigned long shmmni; /* Maximum number of segments */\n"
8963 "    unsigned long shmseg; /* Maximum number of segments\n"
8964 "                             that a process can attach;\n"
8965 "                             unused within kernel */\n"
8966 "    unsigned long shmall; /* Maximum number of pages of\n"
8967 "                             shared memory, system-wide */\n"
8968 "};\n"
8969 msgstr ""
8970 "struct  shminfo {\n"
8971 "    unsigned long shmmax; /* 最大セグメントサイズ */\n"
8972 "    unsigned long shmmin; /* 最小セグメントサイズ。\n"
8973 "                             常に 1 */\n"
8974 "    unsigned long shmmni; /* 最大セグメント数 */\n"
8975 "    unsigned long shmseg; /* プロセスが付加できる\n"
8976 "                             セグメントの最大数。\n"
8977 "                             カーネル内では未使用 */\n"
8978 "    unsigned long shmall; /* 共有メモリの最大ページ数。\n"
8979 "                             システム全体での値 */\n"
8980 "};\n"
8981
8982 #. type: Plain text
8983 #: build/C/man2/shmctl.2:196
8984 msgid ""
8985 "The I<shmmni>, I<shmmax>, and I<shmall> settings can be changed via I</proc> "
8986 "files of the same name; see B<proc>(5)  for details."
8987 msgstr ""
8988 "設定 I<shmmni>, I<shmmax>, I<shmall> は I</proc> にある同じ名前のファイル経由"
8989 "で変更可能である。 詳しくは B<proc>(5)  を参照。"
8990
8991 #. type: TP
8992 #: build/C/man2/shmctl.2:196
8993 #, no-wrap
8994 msgid "B<SHM_INFO> (Linux-specific)"
8995 msgstr "B<SHM_INFO> (Linux 固有)"
8996
8997 #. type: Plain text
8998 #: build/C/man2/shmctl.2:207
8999 msgid ""
9000 "Returns a I<shm_info> structure whose fields contain information about "
9001 "system resources consumed by shared memory.  This structure is defined in "
9002 "I<E<lt>sys/shm.hE<gt>> if the B<_GNU_SOURCE> feature test macro is defined:"
9003 msgstr ""
9004 "共有メモリが消費しているシステム資源に関する情報を 格納した I<shm_info> 構造"
9005 "体を返す。 この構造体は、 B<_GNU_SOURCE> 機能検査マクロが定義された場合に "
9006 "I<E<lt>sys/shm.hE<gt>> で以下のように定義される:"
9007
9008 #. type: Plain text
9009 #: build/C/man2/shmctl.2:224
9010 #, no-wrap
9011 msgid ""
9012 "struct shm_info {\n"
9013 "    int           used_ids; /* # of currently existing\n"
9014 "                               segments */\n"
9015 "    unsigned long shm_tot;  /* Total number of shared\n"
9016 "                               memory pages */\n"
9017 "    unsigned long shm_rss;  /* # of resident shared\n"
9018 "                               memory pages */\n"
9019 "    unsigned long shm_swp;  /* # of swapped shared\n"
9020 "                               memory pages */\n"
9021 "    unsigned long swap_attempts;\n"
9022 "                            /* Unused since Linux 2.4 */\n"
9023 "    unsigned long swap_successes;\n"
9024 "                            /* Unused since Linux 2.4 */\n"
9025 "};\n"
9026 msgstr ""
9027 "struct shm_info {\n"
9028 "    int           used_ids; /* 現在存在するセグメント数 */\n"
9029 "    unsigned long shm_tot;  /* 共有メモリのページ総数 */\n"
9030 "    unsigned long shm_rss;  /* メモリ上にある (スワップされて\n"
9031 "                               いない) 共有メモリページ数 */\n"
9032 "    unsigned long shm_swp;  /* スワップされている共有メモリ\n"
9033 "                               ページ数 */\n"
9034 "    unsigned long swap_attempts;\n"
9035 "                            /* Linux 2.4 以降では未使用 */\n"
9036 "    unsigned long swap_successes;\n"
9037 "                            /* Linux 2.4 以降では未使用 */\n"
9038 "};\n"
9039
9040 #. type: TP
9041 #: build/C/man2/shmctl.2:226
9042 #, no-wrap
9043 msgid "B<SHM_STAT> (Linux-specific)"
9044 msgstr "B<SHM_STAT> (Linux 固有)"
9045
9046 #. type: Plain text
9047 #: build/C/man2/shmctl.2:237
9048 msgid ""
9049 "Returns a I<shmid_ds> structure as for B<IPC_STAT>.  However, the I<shmid> "
9050 "argument is not a segment identifier, but instead an index into the kernel's "
9051 "internal array that maintains information about all shared memory segments "
9052 "on the system."
9053 msgstr ""
9054 "B<IPC_STAT> と同じく I<shmid_ds> 構造体を返す。 但し、 I<shmid> 引き数は、セ"
9055 "グメント識別子ではなく、システム上の全ての共有メモリ セグメントに関する情報を"
9056 "管理するカーネルの内部配列へのインデックス である。"
9057
9058 #. type: Plain text
9059 #: build/C/man2/shmctl.2:240
9060 msgid ""
9061 "The caller can prevent or allow swapping of a shared memory segment with the "
9062 "following I<cmd> values:"
9063 msgstr ""
9064 "呼び出し元は、I<cmd> に以下の値を指定することで、共有メモリ・セグメントが ス"
9065 "ワップされることを防止したり、許可したりできる:"
9066
9067 #. type: TP
9068 #: build/C/man2/shmctl.2:241
9069 #, no-wrap
9070 msgid "B<SHM_LOCK> (Linux-specific)"
9071 msgstr "B<SHM_LOCK> (Linux 固有)"
9072
9073 #. type: Plain text
9074 #: build/C/man2/shmctl.2:253
9075 msgid ""
9076 "Prevent swapping of the shared memory segment.  The caller must fault in any "
9077 "pages that are required to be present after locking is enabled.  If a "
9078 "segment has been locked, then the (nonstandard)  B<SHM_LOCKED> flag of the "
9079 "I<shm_perm.mode> field in the associated data structure retrieved by "
9080 "B<IPC_STAT> will be set."
9081 msgstr ""
9082 "共有メモリ・セグメントをスワップすることを防止する。 ロックが有効になった後、"
9083 "呼び出し元は、 存在することが要求された全てのページをフォールトさせなければな"
9084 "らない。 セグメントがロックされると、 関連するデータ構造体において "
9085 "I<shm_perm.mode> フィールドの (標準的ではない)  B<SHM_LOCKED> フラグが設定さ"
9086 "れる。 このデータ構造体は B<IPC_STAT> で取得される。"
9087
9088 #. type: TP
9089 #: build/C/man2/shmctl.2:253
9090 #, no-wrap
9091 msgid "B<SHM_UNLOCK> (Linux-specific)"
9092 msgstr "B<SHM_UNLOCK> (Linux 固有)"
9093
9094 #. type: Plain text
9095 #: build/C/man2/shmctl.2:256
9096 msgid "Unlock the segment, allowing it to be swapped out."
9097 msgstr "セグメントのロックを解除し、スワップ・アウトすることを可能にする。"
9098
9099 #.  There was some weirdness in 2.6.9: SHM_LOCK and SHM_UNLOCK could
9100 #.  be applied to a segment, regardless of ownership of the segment.
9101 #.  This was a botch-up in the move to RLIMIT_MEMLOCK, and was fixed
9102 #.  in 2.6.10.  MTK, May 2005
9103 #. type: Plain text
9104 #: build/C/man2/shmctl.2:274
9105 msgid ""
9106 "In kernels before 2.6.10, only a privileged process could employ B<SHM_LOCK> "
9107 "and B<SHM_UNLOCK>.  Since kernel 2.6.10, an unprivileged process can employ "
9108 "these operations if its effective UID matches the owner or creator UID of "
9109 "the segment, and (for B<SHM_LOCK>)  the amount of memory to be locked falls "
9110 "within the B<RLIMIT_MEMLOCK> resource limit (see B<setrlimit>(2))."
9111 msgstr ""
9112 "2.6.10 より前のカーネルでは、特権プロセスだけが B<SHM_LOCK> と B<SHM_UNLOCK> "
9113 "を利用することができた。 2.6.10 以降のカーネルでは、非特権プロセスであっても"
9114 "次の条件を満たせば これらの操作を利用することができる。その条件とは、プロセス"
9115 "の実効 UID がそのセグメントの所有者もしくは作成者の UID と一致し、 "
9116 "(B<SHM_LOCK> の場合には) ロックするメモリの合計が B<RLIMIT_MEMLOCK> リソース"
9117 "上限 (B<setrlimit>(2)  参照) の範囲内に入っていることである。"
9118
9119 #. type: Plain text
9120 #: build/C/man2/shmctl.2:292
9121 msgid ""
9122 "A successful B<IPC_INFO> or B<SHM_INFO> operation returns the index of the "
9123 "highest used entry in the kernel's internal array recording information "
9124 "about all shared memory segments.  (This information can be used with "
9125 "repeated B<SHM_STAT> operations to obtain information about all shared "
9126 "memory segments on the system.)  A successful B<SHM_STAT> operation returns "
9127 "the identifier of the shared memory segment whose index was given in "
9128 "I<shmid>.  Other operations return 0 on success."
9129 msgstr ""
9130 "B<IPC_INFO> と B<SHM_INFO> 操作は、成功すると、全ての共有メモリセグメントに関"
9131 "する情報を 管理しているカーネルの内部配列の使用中エントリのインデックスの う"
9132 "ち最大値を返す (この情報は、システムの全ての共有メモリセグメントに関する情報"
9133 "を 取得するために、 B<SHM_STAT> 操作を繰り返し実行する際に使用できる)。 "
9134 "B<SHM_STAT> 操作は、成功すると、 I<shmid> で指定されたインデックスを持つ共有"
9135 "メモリセグメントの識別子を返す。 他の操作は、成功の場合 0 を返す。"
9136
9137 #. type: Plain text
9138 #: build/C/man2/shmctl.2:296
9139 msgid "On error, -1 is returned, and I<errno> is set appropriately."
9140 msgstr "エラーの場合は -1 を返し、 I<errno> を適切に設定する。"
9141
9142 #. type: Plain text
9143 #: build/C/man2/shmctl.2:305
9144 msgid ""
9145 "B<IPC_STAT> or B<SHM_STAT> is requested and I<shm_perm.mode> does not allow "
9146 "read access for I<shmid>, and the calling process does not have the "
9147 "B<CAP_IPC_OWNER> capability."
9148 msgstr ""
9149 "B<IPC_STAT> または B<SHM_STAT> が要求され、 I<shm_perm.mode> が I<shmid> への"
9150 "読み込みアクセスを許しておらず、 かつ呼び出したプロセスが B<CAP_IPC_OWNER> "
9151 "ケーパビリティ (capability) を持っていない。"
9152
9153 #. type: Plain text
9154 #: build/C/man2/shmctl.2:316
9155 msgid ""
9156 "The argument I<cmd> has value B<IPC_SET> or B<IPC_STAT> but the address "
9157 "pointed to by I<buf> isn't accessible."
9158 msgstr ""
9159 "I<cmd> 引き数に B<IPC_SET> か B<IPC_STAT> が指定されたが I<buf> で指されてい"
9160 "るアドレスにアクセスできない。"
9161
9162 #. type: TP
9163 #: build/C/man2/shmctl.2:316 build/C/man2/shmop.2:197
9164 #, no-wrap
9165 msgid "B<EIDRM>"
9166 msgstr "B<EIDRM>"
9167
9168 #. type: Plain text
9169 #: build/C/man2/shmctl.2:319 build/C/man2/shmop.2:200
9170 msgid "I<shmid> points to a removed identifier."
9171 msgstr "I<shmid> が削除 (remove) された識別子 (identifier) を指している。"
9172
9173 #. type: Plain text
9174 #: build/C/man2/shmctl.2:328
9175 msgid ""
9176 "I<shmid> is not a valid identifier, or I<cmd> is not a valid command.  Or: "
9177 "for a B<SHM_STAT> operation, the index value specified in I<shmid> referred "
9178 "to an array slot that is currently unused."
9179 msgstr ""
9180 "I<shmid> が有効な識別子でないか、 I<cmd> が有効なコマンドでない。 もしくは、 "
9181 "B<SHM_STAT> 操作の場合に、 I<shmid> で指定されたインデックス値が現在未使用の"
9182 "配列のスロットを参照していた。"
9183
9184 #. type: Plain text
9185 #: build/C/man2/shmctl.2:339
9186 msgid ""
9187 "(In kernels since 2.6.9), B<SHM_LOCK> was specified and the size of the to-"
9188 "be-locked segment would mean that the total bytes in locked shared memory "
9189 "segments would exceed the limit for the real user ID of the calling "
9190 "process.  This limit is defined by the B<RLIMIT_MEMLOCK> soft resource limit "
9191 "(see B<setrlimit>(2))."
9192 msgstr ""
9193 "(2.6.9 以降のカーネルにおいて)  B<SHM_LOCK> が指定され、 ロックされる予定のセ"
9194 "グメントのサイズ (ロックされる共有メモリ・セグメントの合計バイト数) が、 呼び"
9195 "出したプロセスの実ユーザー ID についての制限を超えた。 この制限は "
9196 "B<RLIMIT_MEMLOCK> ソフト資源制限で定義される (B<setrlimit>(2)  を参照)。"
9197
9198 #. type: Plain text
9199 #: build/C/man2/shmctl.2:344
9200 msgid ""
9201 "B<IPC_STAT> is attempted, and the GID or UID value is too large to be stored "
9202 "in the structure pointed to by I<buf>."
9203 msgstr ""
9204 "B<IPC_STAT> が試みられ、GID や UID の値が I<buf> で指示される構造体に格納する"
9205 "には大き過ぎる。"
9206
9207 #. type: Plain text
9208 #: build/C/man2/shmctl.2:356
9209 msgid ""
9210 "B<IPC_SET> or B<IPC_RMID> is attempted, and the effective user ID of the "
9211 "calling process is not that of the creator (found in I<shm_perm.cuid>), or "
9212 "the owner (found in I<shm_perm.uid>), and the process was not privileged "
9213 "(Linux: did not have the B<CAP_SYS_ADMIN> capability)."
9214 msgstr ""
9215 "B<IPC_SET> か B<IPC_RMID> が試みられ、 呼び出したプロセスの実効ユーザー ID が"
9216 "作成者 (I<shm_perm.cuid>)  でも所有者 (I<shm_perm.uid>)  でもなく、プロセスが"
9217 "特権を持たない (Linux では B<CAP_SYS_ADMIN> ケーパビリティを持たない)。"
9218
9219 #. type: Plain text
9220 #: build/C/man2/shmctl.2:368
9221 msgid ""
9222 "Or (in kernels before 2.6.9), B<SHM_LOCK> or B<SHM_UNLOCK> was specified, "
9223 "but the process was not privileged (Linux: did not have the B<CAP_IPC_LOCK> "
9224 "capability).  (Since Linux 2.6.9, this error can also occur if the "
9225 "B<RLIMIT_MEMLOCK> is 0 and the caller is not privileged.)"
9226 msgstr ""
9227 "または (2.6.9 より前のカーネルで)  B<SHM_LOCK> または B<SHM_UNLOCK> が指定さ"
9228 "れているが、プロセスが特権を持たない (Linux では B<CAP_IPC_LOCK> ケーパビリ"
9229 "ティを持たない)。 (Linux 2.6.9 以降では、 B<RLIMIT_MEMLOCK> が 0 で呼び出し元"
9230 "が特権を持たない場合にも、このエラーが起こる。)"
9231
9232 #.  SVr4 documents an additional error condition EMFILE.
9233 #. type: Plain text
9234 #: build/C/man2/shmctl.2:373 build/C/man2/shmget.2:234
9235 #: build/C/man2/shmop.2:234
9236 msgid "SVr4, POSIX.1-2001."
9237 msgstr "SVr4, POSIX.1-2001."
9238
9239 #.  Like Linux, the FreeBSD man pages still document
9240 #.  the inclusion of these header files.
9241 #. type: Plain text
9242 #: build/C/man2/shmctl.2:386 build/C/man2/shmget.2:250
9243 msgid ""
9244 "The inclusion of I<E<lt>sys/types.hE<gt>> and I<E<lt>sys/ipc.hE<gt>> isn't "
9245 "required on Linux or by any version of POSIX.  However, some old "
9246 "implementations required the inclusion of these header files, and the SVID "
9247 "also documented their inclusion.  Applications intended to be portable to "
9248 "such old systems may need to include these header files."
9249 msgstr ""
9250
9251 #. type: Plain text
9252 #: build/C/man2/shmctl.2:397
9253 msgid ""
9254 "The B<IPC_INFO>, B<SHM_STAT> and B<SHM_INFO> operations are used by the "
9255 "B<ipcs>(1)  program to provide information on allocated resources.  In the "
9256 "future these may modified or moved to a /proc file system interface."
9257 msgstr ""
9258 "B<IPC_INFO>, B<SHM_STAT>, B<SHM_INFO> 操作は、 B<ipcs>(1)  プログラムで割り当"
9259 "て済の資源に関する情報を提供するために 使用されている。将来、これらの操作は変"
9260 "更されたり、 /proc ファイルシステムのインタフェースに移動されるかもしれない。"
9261
9262 #. type: Plain text
9263 #: build/C/man2/shmctl.2:405
9264 msgid ""
9265 "Linux permits a process to attach (B<shmat>(2))  a shared memory segment "
9266 "that has already been marked for deletion using I<shmctl(IPC_RMID)>.  This "
9267 "feature is not available on other UNIX implementations; portable "
9268 "applications should avoid relying on it."
9269 msgstr ""
9270 "Linux では、 I<shmctl(IPC_RMID)> を使ってすでに削除マークがつけられている共有"
9271 "メモリ・セグメントを あるプロセスが付加 (attach)  (B<shmat>(2))  することを許"
9272 "可している。 この機能は他の UNIX の実装では利用できない。 移植性を考慮したア"
9273 "プリケーションではこれに依存しないようにすべきである。"
9274
9275 #. type: Plain text
9276 #: build/C/man2/shmctl.2:418
9277 msgid ""
9278 "Various fields in a I<struct shmid_ds> were typed as I<short> under Linux "
9279 "2.2 and have become I<long> under Linux 2.4.  To take advantage of this, a "
9280 "recompilation under glibc-2.1.91 or later should suffice.  (The kernel "
9281 "distinguishes old and new calls by an B<IPC_64> flag in I<cmd>.)"
9282 msgstr ""
9283 "I<構造体 shmid_ds> 内の多くのフィールドは、 Linux 2.2 では I<short> 型だった"
9284 "が、Linux 2.4 では I<long> 型になった。 この利点を生かすには、glibc-2.1.91 以"
9285 "降の環境下で 再コンパイルすれば十分である。 カーネルは新しい形式の呼び出しと"
9286 "古い形式の呼び出しを I<cmd> 内の B<IPC_64> フラグで区別する。"
9287
9288 #. type: Plain text
9289 #: build/C/man2/shmctl.2:425
9290 msgid ""
9291 "B<mlock>(2), B<setrlimit>(2), B<shmget>(2), B<shmop>(2), B<capabilities>(7), "
9292 "B<svipc>(7)"
9293 msgstr ""
9294 "B<mlock>(2), B<setrlimit>(2), B<shmget>(2), B<shmop>(2), B<capabilities>(7), "
9295 "B<shm_overview>(7), B<svipc>(7)"
9296
9297 #. type: TH
9298 #: build/C/man2/shmget.2:38
9299 #, no-wrap
9300 msgid "SHMGET"
9301 msgstr "SHMGET"
9302
9303 #. type: Plain text
9304 #: build/C/man2/shmget.2:41
9305 msgid "shmget - allocates a shared memory segment"
9306 msgstr "shmget - 共有メモリ・セグメントを割り当てる"
9307
9308 #. type: Plain text
9309 #: build/C/man2/shmget.2:48
9310 msgid "B<int shmget(key_t >I<key>B<, size_t >I<size>B<, int >I<shmflg>B<);>"
9311 msgstr "B<int shmget(key_t >I<key>B<, size_t >I<size>B<, int >I<shmflg>B<);>"
9312
9313 #. type: Plain text
9314 #: build/C/man2/shmget.2:72
9315 msgid ""
9316 "B<shmget>()  returns the identifier of the shared memory segment associated "
9317 "with the value of the argument I<key>.  A new shared memory segment, with "
9318 "size equal to the value of I<size> rounded up to a multiple of B<PAGE_SIZE>, "
9319 "is created if I<key> has the value B<IPC_PRIVATE> or I<key> isn't "
9320 "B<IPC_PRIVATE>, no shared memory segment corresponding to I<key> exists, and "
9321 "B<IPC_CREAT> is specified in I<shmflg>."
9322 msgstr ""
9323 "B<shmget>()  は I<key> 引き数に対応する共有メモリ・セグメントの識別子を返"
9324 "す。 I<key> の値が B<IPC_PRIVATE> の場合、もしくは I<key> に対応する共有メモ"
9325 "リ・セグメントが存在せず、 I<shmflg> に B<IPC_CREAT> が指定されていた場合、 "
9326 "新しい共有メモリ・セグメントを作成する。 作成される共有メモリ・セグメント"
9327 "は、 I<size> 引き数の値を B<PAGE_SIZE> の倍数へと切り上げた (round up) 大きさ"
9328 "となる。"
9329
9330 #. type: Plain text
9331 #: build/C/man2/shmget.2:91
9332 msgid ""
9333 "If I<shmflg> specifies both B<IPC_CREAT> and B<IPC_EXCL> and a shared memory "
9334 "segment already exists for I<key>, then B<shmget>()  fails with I<errno> set "
9335 "to B<EEXIST>.  (This is analogous to the effect of the combination B<O_CREAT "
9336 "| O_EXCL> for B<open>(2).)"
9337 msgstr ""
9338 "I<shmflg> に B<IPC_CREAT> と B<IPC_EXCL> の両方が指定された場合、 I<key> に対"
9339 "応する共有メモリ・セグメントが既に存在すると、 B<shmget>()  は失敗し、 "
9340 "I<errno> に B<EEXIST> が設定される (これは B<open>(2)  に B<O_CREAT | "
9341 "O_EXCL> を指定した場合の動作と同じである)。"
9342
9343 #. type: Plain text
9344 #: build/C/man2/shmget.2:95
9345 msgid "The value I<shmflg> is composed of:"
9346 msgstr "I<shmflg> は以下の内容から構成される:"
9347
9348 #. type: TP
9349 #: build/C/man2/shmget.2:95
9350 #, no-wrap
9351 msgid "B<IPC_CREAT>"
9352 msgstr "B<IPC_CREAT>"
9353
9354 #. type: Plain text
9355 #: build/C/man2/shmget.2:102
9356 msgid ""
9357 "to create a new segment.  If this flag is not used, then B<shmget>()  will "
9358 "find the segment associated with I<key> and check to see if the user has "
9359 "permission to access the segment."
9360 msgstr ""
9361 "新しいセグメントを作成する。このフラグが指定されなかった場合、 B<shmget>()  "
9362 "は I<key> に対応するセグメントを探し、 ユーザがそのセグメントにアクセスする許"
9363 "可があるかどうかをチェックする。"
9364
9365 #. type: TP
9366 #: build/C/man2/shmget.2:102
9367 #, no-wrap
9368 msgid "B<IPC_EXCL>"
9369 msgstr "B<IPC_EXCL>"
9370
9371 #. type: Plain text
9372 #: build/C/man2/shmget.2:105
9373 msgid "used with B<IPC_CREAT> to ensure failure if the segment already exists."
9374 msgstr ""
9375 "B<IPC_CREAT> と共に使用し、セグメントが既に存在した場合には 失敗することを保"
9376 "証する。"
9377
9378 #. type: TP
9379 #: build/C/man2/shmget.2:105
9380 #, no-wrap
9381 msgid "I<mode_flags>"
9382 msgstr "I<mode_flags>"
9383
9384 #. type: Plain text
9385 #: build/C/man2/shmget.2:115
9386 msgid ""
9387 "(least significant 9 bits)  specifying the permissions granted to the owner, "
9388 "group, and world.  These bits have the same format, and the same meaning, as "
9389 "the I<mode> argument of B<open>(2).  Presently, the execute permissions are "
9390 "not used by the system."
9391 msgstr ""
9392 "(下位 9 ビット)  所有者、グループ、他人 (world) への許可を指定する。 これらの"
9393 "ビットは B<open>(2)  の I<mode> 引き数と同じ形式で同じ意味を持つ。 今のとこ"
9394 "ろ、システムは実行 (execute) 許可を参照しない。"
9395
9396 #. type: TP
9397 #: build/C/man2/shmget.2:115
9398 #, no-wrap
9399 msgid "B<SHM_HUGETLB> (since Linux 2.6)"
9400 msgstr "B<SHM_HUGETLB> (Linux 2.6 以降)"
9401
9402 #. type: Plain text
9403 #: build/C/man2/shmget.2:121
9404 msgid ""
9405 "Allocate the segment using \"huge pages.\" See the Linux kernel source file "
9406 "I<Documentation/vm/hugetlbpage.txt> for further information."
9407 msgstr "\"ヒュージページ (huge page)\" を使うセグメントを割り当てる。詳細な情報は、Linux カーネルソースのファイル I<Documentation/vm/hugetlbpage.txt> を参照。"
9408
9409 #. type: TP
9410 #: build/C/man2/shmget.2:121
9411 #, no-wrap
9412 msgid "B<SHM_NORESERVE> (since Linux 2.6.15)"
9413 msgstr "B<SHM_NORESERVE> (Linux 2.6.15 以降)"
9414
9415 #.  As at 2.6.17-rc2, this flag has no effect if SHM_HUGETLB was also
9416 #.  specified.
9417 #. type: Plain text
9418 #: build/C/man2/shmget.2:140
9419 msgid ""
9420 "This flag serves the same purpose as the B<mmap>(2)  B<MAP_NORESERVE> flag.  "
9421 "Do not reserve swap space for this segment.  When swap space is reserved, "
9422 "one has the guarantee that it is possible to modify the segment.  When swap "
9423 "space is not reserved one might get B<SIGSEGV> upon a write if no physical "
9424 "memory is available.  See also the discussion of the file I</proc/sys/vm/"
9425 "overcommit_memory> in B<proc>(5)."
9426 msgstr ""
9427 "このフラグは、 B<mmap>(2)  の B<MAP_NORESERVE> フラグと同じ役割を果たす。 こ"
9428 "のセグメントに対するスワップ空間の予約を行わない。 スワップ空間を予約した場合"
9429 "は、そのセグメントの変更が必ず成功することが 保証される。スワップ空間の予約を"
9430 "行わなかった場合は、物理メモリに空きが ないと書き込み時に B<SIGSEGV> を受け取"
9431 "る可能性がある。 B<proc>(5)  にある I</proc/sys/vm/overcommit_memory> ファイ"
9432 "ルに関する議論も参照のこと。"
9433
9434 #. type: Plain text
9435 #: build/C/man2/shmget.2:148
9436 msgid ""
9437 "When a new shared memory segment is created, its contents are initialized to "
9438 "zero values, and its associated data structure, I<shmid_ds> (see B<shmctl>"
9439 "(2)), is initialized as follows:"
9440 msgstr ""
9441 "共有メモリ・セグメントが新たに作成される際、 共有メモリ・セグメントの内容は "
9442 "0 で初期化され、 関連情報を保持するデータ構造体 I<shmid_ds> は以下のように初"
9443 "期化される。"
9444
9445 #. type: Plain text
9446 #: build/C/man2/shmget.2:153
9447 msgid ""
9448 "I<shm_perm.cuid> and I<shm_perm.uid> are set to the effective user ID of the "
9449 "calling process."
9450 msgstr ""
9451 "I<shm_perm.cuid> と I<shm_perm.uid> に呼び出し元プロセスの実効 (effective) "
9452 "ユーザーID を設定する。"
9453
9454 #. type: Plain text
9455 #: build/C/man2/shmget.2:158
9456 msgid ""
9457 "I<shm_perm.cgid> and I<shm_perm.gid> are set to the effective group ID of "
9458 "the calling process."
9459 msgstr ""
9460 "I<shm_perm.cgid> と I<shm_perm.gid> に呼び出し元プロセスの実効グループID を設"
9461 "定する。"
9462
9463 #. type: Plain text
9464 #: build/C/man2/shmget.2:163
9465 msgid ""
9466 "The least significant 9 bits of I<shm_perm.mode> are set to the least "
9467 "significant 9 bit of I<shmflg>."
9468 msgstr ""
9469 "I<shm_perm.mode> の下位 9 ビットに I<shmflg> の下位 9 ビットを設定する。"
9470
9471 #. type: Plain text
9472 #: build/C/man2/shmget.2:167
9473 msgid "I<shm_segsz> is set to the value of I<size>."
9474 msgstr "I<shm_segsz> に I<size> の値を設定する。"
9475
9476 #. type: Plain text
9477 #: build/C/man2/shmget.2:174
9478 msgid "I<shm_lpid>, I<shm_nattch>, I<shm_atime> and I<shm_dtime> are set to 0."
9479 msgstr ""
9480 "I<shm_lpid>, I<shm_nattch>, I<shm_atime>, I<shm_dtime> に 0 を設定する。"
9481
9482 #. type: Plain text
9483 #: build/C/man2/shmget.2:177
9484 msgid "I<shm_ctime> is set to the current time."
9485 msgstr "I<shm_ctime> に現在の時刻を設定する。"
9486
9487 #. type: Plain text
9488 #: build/C/man2/shmget.2:180
9489 msgid ""
9490 "If the shared memory segment already exists, the permissions are verified, "
9491 "and a check is made to see if it is marked for destruction."
9492 msgstr ""
9493 "共有メモリ・セグメントが既に存在する場合、アクセス許可の検査と、 破壊 "
9494 "(destruction) マークがつけられていないかのチェックが行われる。"
9495
9496 #. type: Plain text
9497 #: build/C/man2/shmget.2:184
9498 msgid ""
9499 "A valid segment identifier, I<shmid>, is returned on success, -1 on error."
9500 msgstr ""
9501 "成功した場合、有効なセグメント識別子 I<shmid> が返される。エラーの場合、 -1 "
9502 "が返される。"
9503
9504 #. type: Plain text
9505 #: build/C/man2/shmget.2:188
9506 msgid "On failure, I<errno> is set to one of the following:"
9507 msgstr "失敗した場合は I<errno> が以下のどれかに設定される:"
9508
9509 #. type: Plain text
9510 #: build/C/man2/shmget.2:194
9511 msgid ""
9512 "The user does not have permission to access the shared memory segment, and "
9513 "does not have the B<CAP_IPC_OWNER> capability."
9514 msgstr ""
9515 "ユーザーはその共有メモリ・セグメントへのアクセス許可を持たず、 "
9516 "B<CAP_IPC_OWNER> ケーパビリティも持っていない。"
9517
9518 #. type: Plain text
9519 #: build/C/man2/shmget.2:198
9520 msgid "B<IPC_CREAT | IPC_EXCL> was specified and the segment exists."
9521 msgstr ""
9522 "B<IPC_CREAT | IPC_EXCL> が指定されていたが、そのセグメントが既に存在する。"
9523
9524 #. type: Plain text
9525 #: build/C/man2/shmget.2:204
9526 msgid ""
9527 "A new segment was to be created and I<size> E<lt> B<SHMMIN> or I<size> E<gt> "
9528 "B<SHMMAX>, or no new segment was to be created, a segment with given key "
9529 "existed, but I<size> is greater than the size of that segment."
9530 msgstr ""
9531 "新しいセグメントを作成しようとした際に I<size> E<lt> B<SHMMIN> または "
9532 "I<size> E<gt> B<SHMMAX> であった。 もしくは、指定されたキーに対応するセグメン"
9533 "トが既に存在して、新しい セグメントを作成しようとはしなかったが、I<size> が存"
9534 "在するセグメントの サイズよりも大きかった。"
9535
9536 #. type: Plain text
9537 #: build/C/man2/shmget.2:213
9538 msgid ""
9539 "No segment exists for the given I<key>, and B<IPC_CREAT> was not specified."
9540 msgstr ""
9541 "指定された I<key> に対応するセグメントが存在せず、 B<IPC_CREAT> も指定されて"
9542 "いなかった。"
9543
9544 #. type: Plain text
9545 #: build/C/man2/shmget.2:216
9546 msgid "No memory could be allocated for segment overhead."
9547 msgstr "セグメントの管理情報 (overhead) に割り当てるメモリがなかった。"
9548
9549 #. type: Plain text
9550 #: build/C/man2/shmget.2:224
9551 msgid ""
9552 "All possible shared memory IDs have been taken (B<SHMMNI>), or allocating a "
9553 "segment of the requested I<size> would cause the system to exceed the system-"
9554 "wide limit on shared memory (B<SHMALL>)."
9555 msgstr ""
9556 "システム全体の共有メモリ・セグメント数の制限 (B<SHMMNI>)  に達した、または要"
9557 "求された I<size> のセグメントの割り当てが システム全体の共有メモリサイズの制"
9558 "限 (B<SHMALL>)  を超過した。"
9559
9560 #. type: Plain text
9561 #: build/C/man2/shmget.2:231
9562 msgid ""
9563 "The B<SHM_HUGETLB> flag was specified, but the caller was not privileged "
9564 "(did not have the B<CAP_IPC_LOCK> capability)."
9565 msgstr ""
9566 "B<SHM_HUGETLB> フラグが指定されたが、呼び出し元には権限がなかった "
9567 "(B<CAP_IPC_LOCK> ケーパビリティを持っていなかった)。"
9568
9569 #. type: Plain text
9570 #: build/C/man2/shmget.2:237
9571 msgid "B<SHM_HUGETLB> is a nonportable Linux extension."
9572 msgstr "B<SHM_HUGETLB> は Linux での拡張であり、移植性はない。"
9573
9574 #. type: Plain text
9575 #: build/C/man2/shmget.2:260
9576 msgid ""
9577 "B<IPC_PRIVATE> isn't a flag field but a I<key_t> type.  If this special "
9578 "value is used for I<key>, the system call ignores everything but the least "
9579 "significant 9 bits of I<shmflg> and creates a new shared memory segment (on "
9580 "success)."
9581 msgstr ""
9582 "B<IPC_PRIVATE> はフラグではなく I<key_t> 型である。 この特別な値が I<key> に"
9583 "使用された場合は、 B<shmget>()  は I<shmflg> の下位 9 ビットを除いた全てを無"
9584 "視し、 (成功すれば) 新しい共有メモリ・セグメントを作成する。"
9585
9586 #. type: Plain text
9587 #: build/C/man2/shmget.2:264
9588 msgid ""
9589 "The following limits on shared memory segment resources affect the B<shmget>"
9590 "()  call:"
9591 msgstr ""
9592 "B<shmget>()  コールに影響する共有メモリ・セグメント資源の制限は以下の通りであ"
9593 "る:"
9594
9595 #. type: TP
9596 #: build/C/man2/shmget.2:264
9597 #, no-wrap
9598 msgid "B<SHMALL>"
9599 msgstr "B<SHMALL>"
9600
9601 #. type: Plain text
9602 #: build/C/man2/shmget.2:269
9603 msgid ""
9604 "System wide maximum of shared memory pages (on Linux, this limit can be read "
9605 "and modified via I</proc/sys/kernel/shmall>)."
9606 msgstr ""
9607 "システム全体の共有メモリ・ページの最大数 (Linux では、この上限値は I</proc/"
9608 "sys/kernel/shmall> 経由で参照したり、変更したりできる)。"
9609
9610 #. type: TP
9611 #: build/C/man2/shmget.2:269
9612 #, no-wrap
9613 msgid "B<SHMMAX>"
9614 msgstr "B<SHMMAX>"
9615
9616 #. type: Plain text
9617 #: build/C/man2/shmget.2:274
9618 msgid ""
9619 "Maximum size in bytes for a shared memory segment: policy dependent (on "
9620 "Linux, this limit can be read and modified via I</proc/sys/kernel/shmmax>)."
9621 msgstr ""
9622 "共有メモリ・セグメントのバイト単位の大きさの上限: 方針依存 (Linux では、この"
9623 "上限値は I</proc/sys/kernel/shmmax> 経由で参照したり、変更したりできる)。"
9624
9625 #. type: TP
9626 #: build/C/man2/shmget.2:274
9627 #, no-wrap
9628 msgid "B<SHMMIN>"
9629 msgstr "B<SHMMIN>"
9630
9631 #. type: Plain text
9632 #: build/C/man2/shmget.2:280
9633 msgid ""
9634 "Minimum size in bytes for a shared memory segment: implementation dependent "
9635 "(currently 1 byte, though B<PAGE_SIZE> is the effective minimum size)."
9636 msgstr ""
9637 "共有メモリ・セグメントのバイト単位の大きさの下限: 実装依存 (現在は 1 バイトだ"
9638 "が、実質的な最小サイズは B<PAGE_SIZE> である)。"
9639
9640 #. type: TP
9641 #: build/C/man2/shmget.2:280
9642 #, no-wrap
9643 msgid "B<SHMMNI>"
9644 msgstr "B<SHMMNI>"
9645
9646 #.  Kernels between 2.4.x and 2.6.8 had an off-by-one error that meant
9647 #.  that we could create one more segment than SHMMNI -- MTK
9648 #.  This /proc file is not available in Linux 2.2 and earlier -- MTK
9649 #. type: Plain text
9650 #: build/C/man2/shmget.2:289
9651 msgid ""
9652 "System wide maximum number of shared memory segments: implementation "
9653 "dependent (currently 4096, was 128 before Linux 2.3.99; on Linux, this limit "
9654 "can be read and modified via I</proc/sys/kernel/shmmni>)."
9655 msgstr ""
9656 "システム全体の共有メモリーの数の上限: 実装依存 (現在は 4096。Linux 2.3.99 よ"
9657 "り前では 128。 Linux では、この上限値は I</proc/sys/kernel/shmmni> 経由で参照"
9658 "したり、変更したりできる)。"
9659
9660 #. type: Plain text
9661 #: build/C/man2/shmget.2:293
9662 msgid ""
9663 "The implementation has no specific limits for the per-process maximum number "
9664 "of shared memory segments (B<SHMSEG>)."
9665 msgstr ""
9666 "プロセス当りの共有メモリ・セグメントの個数の最大値 (B<SHMSEG>)  に関する実装"
9667 "上の制限はない。"
9668
9669 #. type: Plain text
9670 #: build/C/man2/shmget.2:299
9671 msgid ""
9672 "Until version 2.3.30 Linux would return B<EIDRM> for a B<shmget>()  on a "
9673 "shared memory segment scheduled for deletion."
9674 msgstr ""
9675 "バージョン 2.3.30 までは、Linux は 削除が予定されている共有メモリ・セグメント"
9676 "に対して B<shmget>()  が行われると B<EIDRM> を返していた。"
9677
9678 #. type: Plain text
9679 #: build/C/man2/shmget.2:305
9680 msgid ""
9681 "The name choice B<IPC_PRIVATE> was perhaps unfortunate, B<IPC_NEW> would "
9682 "more clearly show its function."
9683 msgstr ""
9684 "B<IPC_PRIVATE> という名前を選んだのはおそらく失敗であろう。 B<IPC_NEW> の方が"
9685 "より明確にその機能を表しているだろう。"
9686
9687 #. type: Plain text
9688 #: build/C/man2/shmget.2:313
9689 msgid ""
9690 "B<shmat>(2), B<shmctl>(2), B<shmdt>(2), B<ftok>(3), B<capabilities>(7), "
9691 "B<shm_overview>(7), B<svipc>(7)"
9692 msgstr ""
9693 "B<shmat>(2), B<shmctl>(2), B<shmdt>(2), B<ftok>(3), B<capabilities>(7), "
9694 "B<shm_overview>(7), B<svipc>(7)"
9695
9696 #. type: TH
9697 #: build/C/man2/shmop.2:41
9698 #, no-wrap
9699 msgid "SHMOP"
9700 msgstr "SHMOP"
9701
9702 #. type: Plain text
9703 #: build/C/man2/shmop.2:44
9704 msgid "shmat, shmdt - shared memory operations"
9705 msgstr "shmat, shmdt - 共有メモリ (shared memory) の操作"
9706
9707 #. type: Plain text
9708 #: build/C/man2/shmop.2:48
9709 #, no-wrap
9710 msgid ""
9711 "B<#include E<lt>sys/types.hE<gt>>\n"
9712 "B<#include E<lt>sys/shm.hE<gt>>\n"
9713 msgstr ""
9714 "B<#include E<lt>sys/types.hE<gt>>\n"
9715 "B<#include E<lt>sys/shm.hE<gt>>\n"
9716
9717 #. type: Plain text
9718 #: build/C/man2/shmop.2:50
9719 #, no-wrap
9720 msgid "B<void *shmat(int >I<shmid>B<, const void *>I<shmaddr>B<, int >I<shmflg>B<);>\n"
9721 msgstr "B<void *shmat(int >I<shmid>B<, const void *>I<shmaddr>B<, int >I<shmflg>B<);>\n"
9722
9723 #. type: Plain text
9724 #: build/C/man2/shmop.2:52
9725 #, no-wrap
9726 msgid "B<int shmdt(const void *>I<shmaddr>B<);>\n"
9727 msgstr "B<int shmdt(const void *>I<shmaddr>B<);>\n"
9728
9729 #. type: Plain text
9730 #: build/C/man2/shmop.2:61
9731 msgid ""
9732 "B<shmat>()  attaches the shared memory segment identified by I<shmid> to the "
9733 "address space of the calling process.  The attaching address is specified by "
9734 "I<shmaddr> with one of the following criteria:"
9735 msgstr ""
9736 "B<shmat>()  は I<shmid> で指定された共有メモリ・セグメント (shared memory "
9737 "segment) を コールしたプロセスのアドレス空間に付加 (attach) する。 付加するア"
9738 "ドレスは I<shmaddr> に以下のどれかの形式で指定する:"
9739
9740 #. type: Plain text
9741 #: build/C/man2/shmop.2:67
9742 msgid ""
9743 "If I<shmaddr> is NULL, the system chooses a suitable (unused) address at "
9744 "which to attach the segment."
9745 msgstr ""
9746 "I<shmaddr> が NULL ならば、システムはセグメントを付加するための 適切な (使用"
9747 "されていない) アドレスを選択する。"
9748
9749 #. type: Plain text
9750 #: build/C/man2/shmop.2:82
9751 msgid ""
9752 "If I<shmaddr> isn't NULL and B<SHM_RND> is specified in I<shmflg>, the "
9753 "attach occurs at the address equal to I<shmaddr> rounded down to the nearest "
9754 "multiple of B<SHMLBA>.  Otherwise I<shmaddr> must be a page-aligned address "
9755 "at which the attach occurs."
9756 msgstr ""
9757 "I<shmaddr> が NULL でなく B<SHM_RND> が I<shmflg> に指定されている場合は、 "
9758 "I<shmaddr> を B<SHMLBA> の倍数へと切り捨てた (rounding down) のと等しいアドレ"
9759 "スへ付加する。 その他の場合は I<shmaddr> は付加を行なうアドレスで、ページ境界"
9760 "を指している必要がある。"
9761
9762 #. type: Plain text
9763 #: build/C/man2/shmop.2:92
9764 msgid ""
9765 "If B<SHM_RDONLY> is specified in I<shmflg>, the segment is attached for "
9766 "reading and the process must have read permission for the segment.  "
9767 "Otherwise the segment is attached for read and write and the process must "
9768 "have read and write permission for the segment.  There is no notion of a "
9769 "write-only shared memory segment."
9770 msgstr ""
9771 "B<SHM_RDONLY> が I<shmflg> に指定されていた場合は、 セグメントは読み込み専用"
9772 "に付加され、プロセスはそのセグメントへの 読み込み許可を持たなければならな"
9773 "い。 そうでなければそのセグメントは読み込みと書き込みのために付加され、 プロ"
9774 "セスはそのセグメントに読み込みと書き込みの許可を持つ必要がある。 書き込み専用"
9775 "の共有メモリ・セグメントという概念は存在しない。"
9776
9777 #. type: Plain text
9778 #: build/C/man2/shmop.2:107
9779 msgid ""
9780 "The (Linux-specific)  B<SHM_REMAP> flag may be specified in I<shmflg> to "
9781 "indicate that the mapping of the segment should replace any existing mapping "
9782 "in the range starting at I<shmaddr> and continuing for the size of the "
9783 "segment.  (Normally an B<EINVAL> error would result if a mapping already "
9784 "exists in this address range.)  In this case, I<shmaddr> must not be NULL."
9785 msgstr ""
9786 "(Linux 特有の)  B<SHM_REMAP> フラグが I<shmflg> に指定された場合は、 セグメン"
9787 "トのマッピングを既存のマッピングに置き換える。 マッピングの範囲は、 "
9788 "I<shmaddr> から始まりセグメントのサイズ分だけある (通常 B<EINVAL> エラーは、"
9789 "このアドレス範囲にマッピングが既に存在するために起る)。 このフラグを指定する"
9790 "場合は、 I<shmaddr> が NULL であってはならない。"
9791
9792 #. type: Plain text
9793 #: build/C/man2/shmop.2:114
9794 msgid ""
9795 "The B<brk>(2)  value of the calling process is not altered by the attach.  "
9796 "The segment will automatically be detached at process exit.  The same "
9797 "segment may be attached as a read and as a read-write one, and more than "
9798 "once, in the process's address space."
9799 msgstr ""
9800 "呼び出したプロセスの B<brk>(2)  の値は付加によって変化しない。 そのセグメント"
9801 "はプロセスが終了 (exit) したら自動的に分離 (detach) される。 同じセグメントを"
9802 "プロセスのアドレス空間に、読み込み専用および読み書き両用 として付加でき、また"
9803 "複数回付加することもできる。"
9804
9805 #. type: Plain text
9806 #: build/C/man2/shmop.2:122
9807 msgid ""
9808 "A successful B<shmat>()  call updates the members of the I<shmid_ds> "
9809 "structure (see B<shmctl>(2))  associated with the shared memory segment as "
9810 "follows:"
9811 msgstr ""
9812 "成功した B<shmat>()  コールは共有メモリ・セグメントに関連する I<shmid_ds> 構"
9813 "造体 (B<shmctl>(2)  を参照) のメンバーを以下のように更新する:"
9814
9815 #. type: Plain text
9816 #: build/C/man2/shmop.2:125
9817 msgid "I<shm_atime> is set to the current time."
9818 msgstr "I<shm_atime> には現在の時刻を設定する。"
9819
9820 #. type: Plain text
9821 #: build/C/man2/shmop.2:128 build/C/man2/shmop.2:154
9822 msgid "I<shm_lpid> is set to the process-ID of the calling process."
9823 msgstr "I<shm_lpid> には呼び出したプロセスのプロセス ID が設定される。"
9824
9825 #. type: Plain text
9826 #: build/C/man2/shmop.2:131
9827 msgid "I<shm_nattch> is incremented by one."
9828 msgstr "I<shm_nattch> を 1 増加させる。"
9829
9830 #. type: Plain text
9831 #: build/C/man2/shmop.2:142
9832 msgid ""
9833 "B<shmdt>()  detaches the shared memory segment located at the address "
9834 "specified by I<shmaddr> from the address space of the calling process.  The "
9835 "to-be-detached segment must be currently attached with I<shmaddr> equal to "
9836 "the value returned by the attaching B<shmat>()  call."
9837 msgstr ""
9838 "B<shmdt>()  は呼び出したプロセスのアドレス空間から I<shmaddr> で指定されたア"
9839 "ドレスに配置された共有メモリ・セグメントを分離 (detach) する。 分離する共有メ"
9840 "モリ・セグメントは、現在 I<shmaddr> に付加されているものでなければならない。 "
9841 "I<shmaddr> は、それを付加した時に B<shmat>()  が返した値に等しくなければなら"
9842 "ない。"
9843
9844 #. type: Plain text
9845 #: build/C/man2/shmop.2:148
9846 msgid ""
9847 "On a successful B<shmdt>()  call the system updates the members of the "
9848 "I<shmid_ds> structure associated with the shared memory segment as follows:"
9849 msgstr ""
9850 "成功した B<shmdt>()  コールはその共有メモリ・セグメントに関連する "
9851 "I<shmid_ds> 構造体のメンバーを以下のように更新する:"
9852
9853 #. type: Plain text
9854 #: build/C/man2/shmop.2:151
9855 msgid "I<shm_dtime> is set to the current time."
9856 msgstr "I<shm_dtime> には現在の時刻が設定される。"
9857
9858 #. type: Plain text
9859 #: build/C/man2/shmop.2:159
9860 msgid ""
9861 "I<shm_nattch> is decremented by one.  If it becomes 0 and the segment is "
9862 "marked for deletion, the segment is deleted."
9863 msgstr ""
9864 "I<shm_nattch> を 1 減少させる。 もし 0 になり、削除マークがあった場合は その"
9865 "セグメントは削除される。"
9866
9867 #. type: Plain text
9868 #: build/C/man2/shmop.2:163
9869 msgid ""
9870 "After a B<fork>(2)  the child inherits the attached shared memory segments."
9871 msgstr ""
9872 "B<fork>(2)  した後、子プロセスは付加された共有メモリ・セグメントを継承する。"
9873
9874 #. type: Plain text
9875 #: build/C/man2/shmop.2:167
9876 msgid ""
9877 "After an B<execve>(2)  all attached shared memory segments are detached from "
9878 "the process."
9879 msgstr ""
9880 "B<exec>(2)  した後、全ての付加された共有メモリ・セグメントはプロセスから分離"
9881 "される。"
9882
9883 #. type: Plain text
9884 #: build/C/man2/shmop.2:171
9885 msgid ""
9886 "Upon B<_exit>(2)  all attached shared memory segments are detached from the "
9887 "process."
9888 msgstr ""
9889 "B<exit>(2)  において、全ての付加された共有メモリ・セグメントはプロセスから分"
9890 "離される。"
9891
9892 #. type: Plain text
9893 #: build/C/man2/shmop.2:179
9894 msgid ""
9895 "On success B<shmat>()  returns the address of the attached shared memory "
9896 "segment; on error I<(void\\ *)\\ -1> is returned, and I<errno> is set to "
9897 "indicate the cause of the error."
9898 msgstr ""
9899 "B<shmat>()  は、成功した場合、 付加された共有メモリ・セグメントのアドレスを返"
9900 "す。 エラーの場合、 I<(void\\ *)\\ -1> を返し、 I<errno> にエラーの原因を示す"
9901 "値を設定する。"
9902
9903 #. type: Plain text
9904 #: build/C/man2/shmop.2:185
9905 msgid ""
9906 "On success B<shmdt>()  returns 0; on error -1 is returned, and I<errno> is "
9907 "set to indicate the cause of the error."
9908 msgstr ""
9909 "B<shmdt>()  は、成功すると 0 を返す。 エラーの場合、-1 を返し、 I<errno> にエ"
9910 "ラーの原因を示す値を設定する。"
9911
9912 #. type: Plain text
9913 #: build/C/man2/shmop.2:191
9914 msgid "When B<shmat>()  fails, I<errno> is set to one of the following:"
9915 msgstr ""
9916 "B<shmat>()  が失敗した場合、 I<errno> に以下の値のどれかを設定して返す:"
9917
9918 #. type: Plain text
9919 #: build/C/man2/shmop.2:197
9920 msgid ""
9921 "The calling process does not have the required permissions for the requested "
9922 "attach type, and does not have the B<CAP_IPC_OWNER> capability."
9923 msgstr ""
9924 "呼び出したプロセスに要求された種類の付加に必要な許可がなく、 "
9925 "B<CAP_IPC_OWNER> ケーパビリティ (capability) がない。"
9926
9927 #. type: Plain text
9928 #: build/C/man2/shmop.2:214
9929 msgid ""
9930 "Invalid I<shmid> value, unaligned (i.e., not page-aligned and B<SHM_RND> was "
9931 "not specified) or invalid I<shmaddr> value, or can't attach segment at "
9932 "I<shmaddr>, or B<SHM_REMAP> was specified and I<shmaddr> was NULL."
9933 msgstr ""
9934 "I<shmid> の値が不正である。 I<shmaddr> の値が境界違反 (unaligned) (つまり、"
9935 "ページ境界に合っておらず、 B<SHM_RND> が指定されていない) または が不正であ"
9936 "る。 I<shmaddr> へのセグメントの付加に失敗した。 または B<SHM_REMAP> が指定さ"
9937 "れているが、 I<shmaddr> が NULL であった。"
9938
9939 #. type: Plain text
9940 #: build/C/man2/shmop.2:217
9941 msgid "Could not allocate memory for the descriptor or for the page tables."
9942 msgstr ""
9943 "ディスクリプター (descriptor) やページ・テーブルのためのメモリを 割り当てるこ"
9944 "とができない。"
9945
9946 #. type: Plain text
9947 #: build/C/man2/shmop.2:223
9948 msgid "When B<shmdt>()  fails, I<errno> is set as follows:"
9949 msgstr "B<shmdt>()  が失敗した場合、 B<EINVAL> は以下のようにセットされる:"
9950
9951 #.  The following since 2.6.17-rc1:
9952 #. type: Plain text
9953 #: build/C/man2/shmop.2:231
9954 msgid ""
9955 "There is no shared memory segment attached at I<shmaddr>; or, I<shmaddr> is "
9956 "not aligned on a page boundary."
9957 msgstr ""
9958 "I<shmaddr> に付加された共有メモリ・セグメントが存在しない。 もしくは、 "
9959 "I<shmaddr> がページ境界に合っていない。"
9960
9961 #. type: Plain text
9962 #: build/C/man2/shmop.2:250
9963 msgid ""
9964 "In SVID 3 (or perhaps earlier)  the type of the I<shmaddr> argument was "
9965 "changed from I<char *> into I<const void *>, and the returned type of "
9966 "B<shmat>()  from I<char *> into I<void *>.  (Linux libc4 and libc5 have the "
9967 "I<char *> prototypes; glibc2 has I<void *>.)"
9968 msgstr ""
9969 "SVID 3 で (たぶんそれより前だと思うが)  I<shmaddr> 引き数の型は I<char *> か"
9970 "ら I<const void *> に、I<shmat>() の返り値の型は I<char *> から I<void *> に"
9971 "変更された (Linux では libc4 と libc5 のプロトタイプは I<char *> であり、"
9972 "glibc2 のプロトタイプは I<void *> である)。"
9973
9974 #. type: Plain text
9975 #: build/C/man2/shmop.2:262
9976 msgid ""
9977 "Using B<shmat>()  with I<shmaddr> equal to NULL is the preferred, portable "
9978 "way of attaching a shared memory segment.  Be aware that the shared memory "
9979 "segment attached in this way may be attached at different addresses in "
9980 "different processes.  Therefore, any pointers maintained within the shared "
9981 "memory must be made relative (typically to the starting address of the "
9982 "segment), rather than absolute."
9983 msgstr ""
9984 "共有メモリセグメントを付加する場合の移植性の高い方法としては、 I<shmaddr> を "
9985 "NULL にして B<shmat>()  を使用するのがよい。 このような方法で付加される共有メ"
9986 "モリセグメントは、 プロセスが異なれば別のアドレスに付加される、という点に注意"
9987 "すること。 よって共有メモリ内で管理されるポインタは、 絶対アドレスではなく、 "
9988 "(一般的にはセグメントの開始アドレスからの)  相対アドレスで作成するべきであ"
9989 "る。"
9990
9991 #. type: Plain text
9992 #: build/C/man2/shmop.2:267
9993 msgid ""
9994 "On Linux, it is possible to attach a shared memory segment even if it is "
9995 "already marked to be deleted.  However, POSIX.1-2001 does not specify this "
9996 "behavior and many other implementations do not support it."
9997 msgstr ""
9998 "Linux では共有メモリセグメントに既に削除マークが付けられていても、 その共有メ"
9999 "モリセグメントを付加することができる。 しかし POSIX.1-2001 ではこのような動作"
10000 "を指定しておらず、 他の多くの実装もこれをサポートしていない。"
10001
10002 #. type: Plain text
10003 #: build/C/man2/shmop.2:270
10004 msgid "The following system parameter affects B<shmat>():"
10005 msgstr "以下のシステム・パラメーターは、 B<shmat>()  に影響する:"
10006
10007 #.  FIXME A good explanation of the rationale for the existence
10008 #.  of SHMLBA would be useful here
10009 #. type: TP
10010 #: build/C/man2/shmop.2:270
10011 #, no-wrap
10012 msgid "B<SHMLBA>"
10013 msgstr "B<SHMLBA>"
10014
10015 #.  FIXME That last sentence isn't true for all Linux
10016 #.  architectures (i.e., SHMLBA != PAGE_SIZE for some architectures)
10017 #.  -- MTK, Nov 04
10018 #. type: Plain text
10019 #: build/C/man2/shmop.2:283
10020 msgid ""
10021 "Segment low boundary address multiple.  Must be page aligned.  For the "
10022 "current implementation the B<SHMLBA> value is B<PAGE_SIZE>."
10023 msgstr ""
10024 "セグメントの境界アドレスの最小倍数。ページ境界に合ってなければならない。 現在"
10025 "の実装では B<SHMLBA> の値は B<PAGE_SIZE> である。"
10026
10027 #. type: Plain text
10028 #: build/C/man2/shmop.2:287
10029 msgid ""
10030 "The implementation places no intrinsic limit on the per-process maximum "
10031 "number of shared memory segments (B<SHMSEG>)."
10032 msgstr ""
10033 "現在の実装では、プロセスごとの 共有メモリ・セグメントの最大数 (B<SHMSEG>)  に"
10034 "関する実装依存の制限はない。"
10035
10036 #. type: Plain text
10037 #: build/C/man2/shmop.2:295
10038 msgid ""
10039 "B<brk>(2), B<mmap>(2), B<shmctl>(2), B<shmget>(2), B<capabilities>(7), "
10040 "B<shm_overview>(7), B<svipc>(7)"
10041 msgstr ""
10042 "B<brk>(2), B<mmap>(2), B<shmctl>(2), B<shmget>(2), B<capabilities>(7), "
10043 "B<shm_overview>(7), B<svipc>(7)"
10044
10045 #. type: TH
10046 #: build/C/man2/subpage_prot.2:30
10047 #, no-wrap
10048 msgid "SUBPAGE_PROT"
10049 msgstr "SUBPAGE_PROT"
10050
10051 #. type: TH
10052 #: build/C/man2/subpage_prot.2:30
10053 #, no-wrap
10054 msgid "2012-07-13"
10055 msgstr "2012-07-13"
10056
10057 #. type: Plain text
10058 #: build/C/man2/subpage_prot.2:33
10059 msgid "subpage_prot - define a subpage protection for an address range"
10060 msgstr ""
10061
10062 #. type: Plain text
10063 #: build/C/man2/subpage_prot.2:37
10064 #, no-wrap
10065 msgid ""
10066 "B<long subpage_prot(unsigned long >I<addr>B<, unsigned long >I<len>B<,>\n"
10067 "B<                  uint32_t *>I<map>B<);>\n"
10068 msgstr ""
10069 "B<long subpage_prot(unsigned long >I<addr>B<, unsigned long >I<len>B<,>\n"
10070 "B<                  uint32_t *>I<map>B<);>\n"
10071
10072 #. type: Plain text
10073 #: build/C/man2/subpage_prot.2:41
10074 msgid "I<Note>: There is no glibc wrapper for this system call; see NOTES."
10075 msgstr ""
10076
10077 #. type: Plain text
10078 #: build/C/man2/subpage_prot.2:47
10079 msgid ""
10080 "The PowerPC-specific B<subpage_prot>()  system call provides the facility to "
10081 "control the access permissions on individual 4kB subpages on systems "
10082 "configured with a page size of 64kB."
10083 msgstr ""
10084
10085 #. type: Plain text
10086 #: build/C/man2/subpage_prot.2:54
10087 msgid ""
10088 "The protection map is applied to the memory pages in the region starting at "
10089 "I<addr> and continuing for I<len> bytes.  Both of these arguments must be "
10090 "aligned to a 64-kB boundary."
10091 msgstr ""
10092
10093 #. type: Plain text
10094 #: build/C/man2/subpage_prot.2:66
10095 msgid ""
10096 "The protection map is specified in the buffer pointed to by I<map>.  The map "
10097 "has 2 bits per 4kB subpage; thus each 32-bit word specifies the protections "
10098 "of 16 4kB subpages inside a 64kB page (so, the number of 32-bit words "
10099 "pointed to by I<map> should equate to the number of 64-kB pages specified by "
10100 "I<len>).  Each 2-bit field in the protection map is either 0 to allow any "
10101 "access, 1 to prevent writes, or 2 or 3 to prevent all accesses."
10102 msgstr ""
10103
10104 #. type: Plain text
10105 #: build/C/man2/subpage_prot.2:71
10106 msgid ""
10107 "On success, B<subpage_prot>()  returns 0.  Otherwise, one of the error codes "
10108 "specified below is returned."
10109 msgstr ""
10110
10111 #. type: Plain text
10112 #: build/C/man2/subpage_prot.2:77
10113 msgid "The buffer referred to by I<map> is not accessible."
10114 msgstr ""
10115
10116 #. type: Plain text
10117 #: build/C/man2/subpage_prot.2:87
10118 msgid ""
10119 "The I<addr> or I<len> arguments are incorrect.  Both of these arguments must "
10120 "be aligned to a multiple of the system page size, and they must not refer to "
10121 "a region outside of the address space of the process or to a region that "
10122 "consists of huge pages."
10123 msgstr ""
10124
10125 #. type: Plain text
10126 #: build/C/man2/subpage_prot.2:90 build/C/man2/sync_file_range.2:166
10127 msgid "Out of memory."
10128 msgstr "メモリ不足である。"
10129
10130 #. type: Plain text
10131 #: build/C/man2/subpage_prot.2:96
10132 msgid ""
10133 "This system call is provided on the PowerPC architecture since Linux "
10134 "2.6.25.  The system call is provided only if the kernel is configured with "
10135 "B<CONFIG_PPC_64K_PAGES>.  No library support is provided."
10136 msgstr ""
10137
10138 #. type: Plain text
10139 #: build/C/man2/subpage_prot.2:101
10140 msgid ""
10141 "Glibc does not provide a wrapper for this system call; call it using "
10142 "B<syscall>(2)."
10143 msgstr ""
10144
10145 #. type: Plain text
10146 #: build/C/man2/subpage_prot.2:106
10147 msgid ""
10148 "Normal page protections (at the 64-kB page level) also apply; the subpage "
10149 "protection mechanism is an additional constraint, so putting 0 in a 2-bit "
10150 "field won't allow writes to a page that is otherwise write-protected."
10151 msgstr ""
10152
10153 #. type: SS
10154 #: build/C/man2/subpage_prot.2:106
10155 #, no-wrap
10156 msgid "Rationale"
10157 msgstr ""
10158
10159 #.  In the initial implementation, it was the case that:
10160 #.      In fact the whole process is switched to use 4k hardware pages when the
10161 #.      subpage_prot system call is used, but this could be improved in future
10162 #.      to switch only the affected segments.
10163 #.  But Paul Mackerass says (Oct 2010): I'm pretty sure we now only switch
10164 #.  the affected segment, not the whole process.
10165 #. type: Plain text
10166 #: build/C/man2/subpage_prot.2:128
10167 msgid ""
10168 "This system call is provided to assist writing emulators that operate using "
10169 "64-kB pages on PowerPC systems.  When emulating systems such as x86, which "
10170 "uses a smaller page size, the emulator can no longer use the memory-"
10171 "management unit (MMU)  and normal system calls for controlling page "
10172 "protections.  (The emulator could emulate the MMU by checking and possibly "
10173 "remapping the address for each memory access in software, but that is "
10174 "slow.)  The idea is that the emulator supplies an array of protection masks "
10175 "to apply to a specified range of virtual addresses.  These masks are applied "
10176 "at the level where hardware page-table entries (PTEs)  are inserted into the "
10177 "hardware page table based on the Linux PTEs, so the Linux PTEs are not "
10178 "affected.  Implicit in this is that the regions of the address space that "
10179 "are protected are switched to use 4-kB hardware pages rather than 64-kB "
10180 "hardware pages (on machines with hardware 64-kB page support)."
10181 msgstr ""
10182
10183 #. type: Plain text
10184 #: build/C/man2/subpage_prot.2:131
10185 msgid "B<mprotect>(2), B<syscall>(2)"
10186 msgstr "B<mprotect>(2), B<syscall>(2)"
10187
10188 #. type: Plain text
10189 #: build/C/man2/subpage_prot.2:134
10190 msgid "I<Documentation/vm/hugetlbpage.txt> in the Linux kernel source tree"
10191 msgstr ""
10192
10193 #. type: TH
10194 #: build/C/man2/sync_file_range.2:30
10195 #, no-wrap
10196 msgid "SYNC_FILE_RANGE"
10197 msgstr "SYNC_FILE_RANGE"
10198
10199 #. type: Plain text
10200 #: build/C/man2/sync_file_range.2:33
10201 msgid "sync_file_range - sync a file segment with disk"
10202 msgstr "sync_file_range - ファイルセグメントをディスクと同期する"
10203
10204 #. type: Plain text
10205 #: build/C/man2/sync_file_range.2:37
10206 #, no-wrap
10207 msgid ""
10208 "B<#define _GNU_SOURCE>         /* See feature_test_macros(7) */\n"
10209 "B<#include E<lt>fcntl.hE<gt>>\n"
10210 msgstr ""
10211 "B<#define _GNU_SOURCE>         /* feature_test_macros(7) 参照 */\n"
10212 "B<#include E<lt>fcntl.hE<gt>>\n"
10213
10214 #. type: Plain text
10215 #: build/C/man2/sync_file_range.2:40
10216 #, no-wrap
10217 msgid ""
10218 "B<int sync_file_range(int >I<fd>B<, off64_t >I<offset>B<, off64_t >I<nbytes>B<,>\n"
10219 "B<                    unsigned int >I<flags>B<);>\n"
10220 msgstr ""
10221 "B<int sync_file_range(int >I<fd>B<, off64_t >I<offset>B<, off64_t >I<nbytes>B<,>\n"
10222 "B<                    unsigned int >I<flags>B<);>\n"
10223
10224 #. type: Plain text
10225 #: build/C/man2/sync_file_range.2:47
10226 msgid ""
10227 "B<sync_file_range>()  permits fine control when synchronizing the open file "
10228 "referred to by the file descriptor I<fd> with disk."
10229 msgstr ""
10230 "B<sync_file_range>()  を使うと、ファイルディスクリプタ I<fd> で参照されるオー"
10231 "プンされたファイルのディスクとの同期に関して、 きめ細かな制御が可能となる。"
10232
10233 #. type: Plain text
10234 #: build/C/man2/sync_file_range.2:61
10235 msgid ""
10236 "I<offset> is the starting byte of the file range to be synchronized.  "
10237 "I<nbytes> specifies the length of the range to be synchronized, in bytes; if "
10238 "I<nbytes> is zero, then all bytes from I<offset> through to the end of file "
10239 "are synchronized.  Synchronization is in units of the system page size: "
10240 "I<offset> is rounded down to a page boundary; I<(offset+nbytes-1)> is "
10241 "rounded up to a page boundary."
10242 msgstr ""
10243 "I<offset> は、同期を行うファイルの領域の開始バイトである。 I<nbytes> には同期"
10244 "を行う領域の長さをバイト単位で指定する。 I<nbytes> が 0 の場合は、 I<offset> "
10245 "からファイル末尾までの全バイトを同期する。 同期はシステムのページサイズの単位"
10246 "で行われる。 I<offset> はページ境界にあわせて切り下げられ、 I<(offset"
10247 "+nbytes-1)> はページ境界にあわせて切り上げられる。"
10248
10249 #. type: Plain text
10250 #: build/C/man2/sync_file_range.2:65
10251 msgid "The I<flags> bit-mask argument can include any of the following values:"
10252 msgstr "ビットマスク引き数 I<flags> には以下の値を指定することができる:"
10253
10254 #. type: TP
10255 #: build/C/man2/sync_file_range.2:65
10256 #, no-wrap
10257 msgid "B<SYNC_FILE_RANGE_WAIT_BEFORE>"
10258 msgstr "B<SYNC_FILE_RANGE_WAIT_BEFORE>"
10259
10260 #. type: Plain text
10261 #: build/C/man2/sync_file_range.2:70
10262 msgid ""
10263 "Wait upon write-out of all pages in the specified range that have already "
10264 "been submitted to the device driver for write-out before performing any "
10265 "write."
10266 msgstr ""
10267 "何らかの書き込みを行う前に、指定された領域のページで 書き出しを行うようにデバ"
10268 "イスドライバにすでに要求が発行されている ページの書き出しが全て完了するのを待"
10269 "つ。"
10270
10271 #. type: TP
10272 #: build/C/man2/sync_file_range.2:70 build/C/man2/sync_file_range.2:120
10273 #, no-wrap
10274 msgid "B<SYNC_FILE_RANGE_WRITE>"
10275 msgstr "B<SYNC_FILE_RANGE_WRITE>"
10276
10277 #. type: Plain text
10278 #: build/C/man2/sync_file_range.2:76
10279 msgid ""
10280 "Initiate write-out of all dirty pages in the specified range which are not "
10281 "presently submitted write-out.  Note that even this may block if you attempt "
10282 "to write more than request queue size."
10283 msgstr ""
10284 "指定された領域のページで、書き出し要求が発行されていない 全ての dirty (キャッ"
10285 "シュだけが変更されている) ページの 書き出しを開始する。 リクエストキューの大"
10286 "きさより多く書き込もうとした場合には、 この処理は停止 (block) する可能性があ"
10287 "る点に注意すること。"
10288
10289 #. type: TP
10290 #: build/C/man2/sync_file_range.2:76
10291 #, no-wrap
10292 msgid "B<SYNC_FILE_RANGE_WAIT_AFTER>"
10293 msgstr "B<SYNC_FILE_RANGE_WAIT_AFTER>"
10294
10295 #. type: Plain text
10296 #: build/C/man2/sync_file_range.2:80
10297 msgid ""
10298 "Wait upon write-out of all pages in the range after performing any write."
10299 msgstr ""
10300 "何らかの書き込み後に、指定された領域の全てのページの 書き出しが行われるのを待"
10301 "つ。"
10302
10303 #. type: Plain text
10304 #: build/C/man2/sync_file_range.2:84
10305 msgid "Specifying I<flags> as 0 is permitted, as a no-op."
10306 msgstr "I<flags> に 0 を指定した場合、何もしないことを表す。"
10307
10308 #. type: SS
10309 #: build/C/man2/sync_file_range.2:84
10310 #, no-wrap
10311 msgid "Warning"
10312 msgstr "警告"
10313
10314 #. type: Plain text
10315 #: build/C/man2/sync_file_range.2:100
10316 msgid ""
10317 "This system call is extremely dangerous and should not be used in portable "
10318 "programs.  None of these operations writes out the file's metadata.  "
10319 "Therefore, unless the application is strictly performing overwrites of "
10320 "already-instantiated disk blocks, there are no guarantees that the data will "
10321 "be available after a crash.  There is no user interface to know if a write "
10322 "is purely an overwrite.  On file systems using copy-on-write semantics (e."
10323 "g., I<btrfs>)  an overwrite of existing allocated blocks is impossible.  "
10324 "When writing into preallocated space, many file systems also require calls "
10325 "into the block allocator, which this system call does not sync out to disk.  "
10326 "This system call does not flush disk write caches and thus does not provide "
10327 "any data integrity on systems with volatile disk write caches."
10328 msgstr ""
10329 "このシステムコールは非常に危険であり、 移植性が必要なプログラムで使用すべきで"
10330 "はない。 これらの操作ではどれもファイルのメタデータの書き出しを行わない。 し"
10331 "たがって、アプリケーションにより作成済みのディスクブロックの 上書きの実行が確"
10332 "実に行われない限り、クラッシュの後でもデータが 利用できる保証はない。 書き込"
10333 "みが上書きだけであるかを知るためのユーザインタフェースは存在しない。 "
10334 "(I<btrfs> などの) copy-on-write 動作を使ったファイルシステムでは、 既存の割り"
10335 "当て済みのブロックに対する上書き自体ができない。 前もって割り当てられた領域に"
10336 "書き込みを行う場合、 多くのファイルシステムでは block allocator への書き込み"
10337 "も必要となるが、 このシステムコールは block allocator のディスクへの同期を行"
10338 "わない。 このシステムコールはディスク書き込みキャッシュのフラッシュを 行わな"
10339 "いので、揮発性のディスク書き込みキャッシュを使ったシステムでは このシステム"
10340 "コールではデータの一貫性を確保できないことになる。"
10341
10342 #. type: SS
10343 #: build/C/man2/sync_file_range.2:100
10344 #, no-wrap
10345 msgid "Some details"
10346 msgstr "詳細"
10347
10348 #. type: Plain text
10349 #: build/C/man2/sync_file_range.2:108
10350 msgid ""
10351 "B<SYNC_FILE_RANGE_WAIT_BEFORE> and B<SYNC_FILE_RANGE_WAIT_AFTER> will detect "
10352 "any I/O errors or B<ENOSPC> conditions and will return these to the caller."
10353 msgstr ""
10354 "B<SYNC_FILE_RANGE_WAIT_BEFORE> と B<SYNC_FILE_RANGE_WAIT_AFTER> は I/O エラー"
10355 "や B<ENOSPC> 状態を検出し、呼び出し元にこれらの情報を返す。"
10356
10357 #. type: Plain text
10358 #: build/C/man2/sync_file_range.2:112
10359 msgid "Useful combinations of the I<flags> bits are:"
10360 msgstr "I<flags> の役に立つビットの組み合わせを以下に示す:"
10361
10362 #. type: TP
10363 #: build/C/man2/sync_file_range.2:112
10364 #, no-wrap
10365 msgid "B<SYNC_FILE_RANGE_WAIT_BEFORE | SYNC_FILE_RANGE_WRITE>"
10366 msgstr "B<SYNC_FILE_RANGE_WAIT_BEFORE | SYNC_FILE_RANGE_WRITE>"
10367
10368 #. type: Plain text
10369 #: build/C/man2/sync_file_range.2:120
10370 msgid ""
10371 "Ensures that all pages in the specified range which were dirty when "
10372 "B<sync_file_range>()  was called are placed under write-out.  This is a "
10373 "start-write-for-data-integrity operation."
10374 msgstr ""
10375 "指定された範囲内のページで、 B<sync_file_range>()  が呼び出された際に dirty "
10376 "であった全てのページが、 確実に書き出し対象となるようにする。 これは、start-"
10377 "write-for-data-integrity 操作 (データ完全性確保のための書き込み開始の操作) で"
10378 "ある。"
10379
10380 #. type: Plain text
10381 #: build/C/man2/sync_file_range.2:127
10382 msgid ""
10383 "Start write-out of all dirty pages in the specified range which are not "
10384 "presently under write-out.  This is an asynchronous flush-to-disk "
10385 "operation.  This is not suitable for data integrity operations."
10386 msgstr ""
10387 "指定された範囲内のページで、現在書き出し中でない全ての dirty ページの 書き出"
10388 "しを開始する。これは非同期のディスクへのフラッシュ (flush-to-disk)  操作であ"
10389 "る。データ完全性確保が必要な操作としては適切ではない。"
10390
10391 #. type: TP
10392 #: build/C/man2/sync_file_range.2:127
10393 #, no-wrap
10394 msgid "B<SYNC_FILE_RANGE_WAIT_BEFORE> (or B<SYNC_FILE_RANGE_WAIT_AFTER>)"
10395 msgstr "B<SYNC_FILE_RANGE_WAIT_BEFORE> (or B<SYNC_FILE_RANGE_WAIT_AFTER>)"
10396
10397 #. type: Plain text
10398 #: build/C/man2/sync_file_range.2:134
10399 msgid ""
10400 "Wait for completion of write-out of all pages in the specified range.  This "
10401 "can be used after an earlier B<SYNC_FILE_RANGE_WAIT_BEFORE | "
10402 "SYNC_FILE_RANGE_WRITE> operation to wait for completion of that operation, "
10403 "and obtain its result."
10404 msgstr ""
10405 "指定された範囲内の全てのページの書き出しの完了を待つ。 このフラグは、前に行わ"
10406 "れた操作 B<SYNC_FILE_RANGE_WAIT_BEFORE | SYNC_FILE_RANGE_WRITE> の後に使用で"
10407 "き、この操作の完了を待ち、結果を取得することができる。"
10408
10409 #. type: TP
10410 #: build/C/man2/sync_file_range.2:134
10411 #, no-wrap
10412 msgid "B<SYNC_FILE_RANGE_WAIT_BEFORE | SYNC_FILE_RANGE_WRITE | SYNC_FILE_RANGE_WAIT_AFTER>"
10413 msgstr "B<SYNC_FILE_RANGE_WAIT_BEFORE | SYNC_FILE_RANGE_WRITE | SYNC_FILE_RANGE_WAIT_AFTER>"
10414
10415 #. type: Plain text
10416 #: build/C/man2/sync_file_range.2:141
10417 msgid ""
10418 "This is a write-for-data-integrity operation that will ensure that all pages "
10419 "in the specified range which were dirty when B<sync_file_range>()  was "
10420 "called are committed to disk."
10421 msgstr ""
10422 "これは write-for-data-integrity 操作 (データ完全性確保のための書き込み) であ"
10423 "り、指定された範囲内の、 B<sync_file_range>()  が呼ばれた時点で dirty な全て"
10424 "のページが ディスクに格納されることが保証される。"
10425
10426 #. type: Plain text
10427 #: build/C/man2/sync_file_range.2:147
10428 msgid ""
10429 "On success, B<sync_file_range>()  returns 0; on failure -1 is returned and "
10430 "I<errno> is set to indicate the error."
10431 msgstr ""
10432 "成功の場合、 B<sync_file_range>()  は 0 を返す。失敗の場合、-1 を返し、 "
10433 "I<error> にエラーを示す値を設定する。"
10434
10435 #. type: Plain text
10436 #: build/C/man2/sync_file_range.2:152
10437 msgid "I<fd> is not a valid file descriptor."
10438 msgstr "I<fd> が有効なファイルディスクリプタではない。"
10439
10440 #. type: Plain text
10441 #: build/C/man2/sync_file_range.2:160
10442 msgid ""
10443 "I<flags> specifies an invalid bit; or I<offset> or I<nbytes> is invalid."
10444 msgstr ""
10445 "I<flags> に不正なビットが指定されている。または I<offset> か I<nbytes> が不正"
10446 "である。"
10447
10448 #. type: Plain text
10449 #: build/C/man2/sync_file_range.2:163
10450 msgid "I/O error."
10451 msgstr "I/O エラー。"
10452
10453 #. type: Plain text
10454 #: build/C/man2/sync_file_range.2:169
10455 msgid "Out of disk space."
10456 msgstr "ディスク領域不足である。"
10457
10458 #.  FIXME . (bug?) Actually, how can 'fd' refer to a symbolic link (S_ISLNK)?
10459 #.  (In user space at least) it isn't possible to obtain a file descriptor
10460 #.  for a symbolic link.
10461 #. type: Plain text
10462 #: build/C/man2/sync_file_range.2:177
10463 msgid ""
10464 "I<fd> refers to something other than a regular file, a block device, a "
10465 "directory, or a symbolic link."
10466 msgstr ""
10467 "I<fd> が、通常のファイル、ブロックデバイス、ディレクトリ、シンボリックリンク "
10468 "以外のものを指している。"
10469
10470 #. type: Plain text
10471 #: build/C/man2/sync_file_range.2:180
10472 msgid "B<sync_file_range>()  appeared on Linux in kernel 2.6.17."
10473 msgstr "B<sync_file_range>()  はカーネル 2.6.17 で Linux に登場した。"
10474
10475 #. type: Plain text
10476 #: build/C/man2/sync_file_range.2:183
10477 msgid ""
10478 "This system call is Linux-specific, and should be avoided in portable "
10479 "programs."
10480 msgstr ""
10481 "このシステムコールは Linux 独自であり、 移植性が必要なプログラムでは使用を避"
10482 "けるべきである。"
10483
10484 #.  See kernel commit edd5cd4a9424f22b0fa08bef5e299d41befd5622
10485 #. type: Plain text
10486 #: build/C/man2/sync_file_range.2:196
10487 msgid ""
10488 "Some architectures (e.g., PowerPC, ARM)  need 64-bit arguments to be aligned "
10489 "in a suitable pair of registers.  On such architectures, the call signature "
10490 "of B<sync_file_range>()  is flawed, since it forces a register to be wasted "
10491 "as padding between the I<fd> and I<offset> arguments.  Therefore, these "
10492 "architectures define a different system call that orders the arguments "
10493 "suitably:"
10494 msgstr ""
10495 "いくつかのアーキテクチャ (例えば、 PowerPC や ARM) では、 64 ビットの\n"
10496 "引き数は適切なレジスタの組に割り当てる必要がある。このようなアーキテク\n"
10497 "チャでは、 B<sync_file_range>() の呼び出し方には欠陥があり、それはこの\n"
10498 "システムコールでは引き数 I<fd> と I<offset> の間のパディング (詰めもの)\n"
10499 "でレジスタが一つ消費されてしまうというものである。そのため、これらの\n"
10500 "アーキテクチャでは引き数が適切な順序になった別のシステムコールが定義\n"
10501 "されている。"
10502
10503 #. type: Plain text
10504 #: build/C/man2/sync_file_range.2:201
10505 #, no-wrap
10506 msgid ""
10507 "B<int sync_file_range2(int >I<fd>B<, unsigned int >I<flags>B<,>\n"
10508 "B<                     off64_t >I<offset>B<, off64_t >I<nbytes>B<);>\n"
10509 msgstr ""
10510 "B<int sync_file_range2(int >I<fd>B<, unsigned int >I<flags>B<,>\n"
10511 "B<                     off64_t >I<offset>B<, off64_t >I<nbytes>B<);>\n"
10512
10513 #. type: Plain text
10514 #: build/C/man2/sync_file_range.2:206
10515 msgid ""
10516 "The behavior of this system call is otherwise exactly the same as "
10517 "B<sync_file_range>()."
10518 msgstr ""
10519 "上記の点以外は、このシステムコールの動作は B<sync_file_range>() と\n"
10520 "全く同じである。このシステムコールに対するライブラリによるサポートは\n"
10521 "glibc では提供されていない。"
10522
10523 #. type: Plain text
10524 #: build/C/man2/sync_file_range.2:217
10525 msgid ""
10526 "A system call with this signature first appeared on the ARM architecture in "
10527 "Linux 2.6.20, with the name B<arm_sync_file_range>().  It was renamed in "
10528 "Linux 2.6.22, when the analogous system call was added for PowerPC.  On "
10529 "architectures where glibc support is provided, glibc transparently wraps "
10530 "B<sync_file_range2>()  under the name B<sync_file_range>()."
10531 msgstr ""
10532 "このバージョンのシステムコールは、Linux 2.6.20 で ARM アーキテクチャで\n"
10533 "初めて登場し、 B<arm_sync_file_range>() という名前であった。\n"
10534 "Linux 2.6.22 で、同様のシステムコールが PowerPC 用に追加された際に、\n"
10535 "システムコールの名前が変更された。\n"
10536 "glibc によるサポートが提供されているアーキテクチャでは、\n"
10537 "glibc のラッパー関数は B<sync_file_range>() という名前で\n"
10538 "B<sync_file_range2>() を適切に使用するようになっている。"
10539
10540 #. type: Plain text
10541 #: build/C/man2/sync_file_range.2:222
10542 msgid "B<fdatasync>(2), B<fsync>(2), B<msync>(2), B<sync>(2)"
10543 msgstr "B<fdatasync>(2), B<fsync>(2), B<msync>(2), B<sync>(2)"
10544
10545 #~ msgid "2011-09-08"
10546 #~ msgstr "2011-09-08"
10547
10548 #~ msgid "2010-09-20"
10549 #~ msgstr "2010-09-20"
10550
10551 #~ msgid "2008-08-07"
10552 #~ msgstr "2008-08-07"
10553
10554 #~ msgid "2006-05-02"
10555 #~ msgstr "2006-05-02"
10556
10557 #~ msgid "2008-06-03"
10558 #~ msgstr "2008-06-03"
10559
10560 #~ msgid "2010-10-30"
10561 #~ msgstr "2010-10-30"
10562
10563 #~ msgid "the kernel source file I<Documentation/vm/hugetlbpage.txt>."
10564 #~ msgstr "カーネルソースファイルの I<Documentation/vm/hugetlbpage.txt>"
10565
10566 #~ msgid ""
10567 #~ "The I<mode> is not supported by the file system containing the file "
10568 #~ "referred to by I<fd>."
10569 #~ msgstr ""
10570 #~ "I<fd> が参照するファイルを含むファイルシステムが I<mode> をサポートしてい"
10571 #~ "ない。"
10572
10573 #~ msgid ""
10574 #~ "The function B<mtrace>()  installs handlers for B<malloc>(3), B<realloc>"
10575 #~ "(3)  and B<free>(3).  The function B<muntrace>()  disables these handlers."
10576 #~ msgstr ""
10577 #~ "関数 B<mtrace>()  は、 B<malloc>(3), B<realloc>(3), B<free>(3)  のハンドラ"
10578 #~ "を組み込む。 関数 B<muntrace>()  はこれらのハンドラを解除する。"
10579
10580 #~ msgid ""
10581 #~ "The environment variable B<MALLOC_TRACE> defines a file where B<mtrace>"
10582 #~ "()  writes its output.  This file must be writable to the user or "
10583 #~ "B<mtrace>()  will do nothing.  If the file is not empty it will be "
10584 #~ "truncated."
10585 #~ msgstr ""
10586 #~ "環境変数 B<MALLOC_TRACE> は B<mtrace>()  が出力を書き出すファイルを指定す"
10587 #~ "る。 ユーザが書き込み権限を持つファイルを指定しなければならない。 書き込み"
10588 #~ "権限がない場合、 B<mtrace>()  は何もしない。 ファイルが空でない場合、ファ"
10589 #~ "イルの元の内容を上書きする。"
10590
10591 #~ msgid "These are GNU extensions."
10592 #~ msgstr "この関数は GNU 拡張である。"
10593
10594 #~ msgid ""
10595 #~ "The output of B<mtrace>()  will be ASCII but not in a friendly format.  "
10596 #~ "So glibc comes with a perl-script called mtrace to make sense of it."
10597 #~ msgstr ""
10598 #~ "B<mtrace>()  の出力は ASCII 形式だが、人が読みやすいフォーマットではな"
10599 #~ "い。 そこで、glibc には mtrace 出力を分かりやすい形式に変換する perl スク"
10600 #~ "リプトが付属している。"
10601
10602 #~ msgid ""
10603 #~ "This flag allocates and initializes to zero the disk space within the "
10604 #~ "range specified by I<offset> and I<len>.  After a successful call, "
10605 #~ "subsequent writes into this range are guaranteed not to fail because of "
10606 #~ "lack of disk space.  Preallocating zeroed blocks beyond the end of the "
10607 #~ "file is useful for optimizing append workloads.  Preallocating blocks "
10608 #~ "does not change the file size (as reported by B<stat>(2))  even if it is "
10609 #~ "less than I<offset>+I<len>."
10610 #~ msgstr ""
10611 #~ "このフラグは、 I<offset> と I<len> で指定された領域のディスク空間を割り当"
10612 #~ "て、その空間を 0 で初期化する。 呼び出しが成功すると、それに続いてこの領域"
10613 #~ "への書き込みが行われるが、 ディスク空間の不足による書き込み失敗が発生しな"
10614 #~ "いことが保証される。 ファイル末尾より後ろの領域について 0 で埋めたブロック"
10615 #~ "を前もって 割り当てておくことは、追記 (append) の作業負荷を最適化するのに "
10616 #~ "有用である。 ファイルサイズが I<offset>+I<len> よりも小さい場合であって"
10617 #~ "も、ブロックの前もっての割り当てにより (B<stat>(2)  が返す) ファイルサイズ"
10618 #~ "は変更されることはない。"
10619
10620 #~ msgid ""
10621 #~ "(Linux 2.6.9 and later) the caller was not privileged (B<CAP_IPC_LOCK>)  "
10622 #~ "and its B<RLIMIT_MEMLOCK> soft resource limit was 0."
10623 #~ msgstr ""
10624 #~ "(Linux 2.6.9 以降) 呼び出し元は特権 (B<CAP_IPC_LOCK>)  を持たず、ソフト資"
10625 #~ "源制限 B<RLIMIT_MEMLOCK> が 0 である。"
10626
10627 #~ msgid ""
10628 #~ "(Linux 2.6.8 and earlier)  The calling process has insufficient privilege "
10629 #~ "to call B<munlockall>().  Under Linux the B<CAP_IPC_LOCK> capability is "
10630 #~ "required."
10631 #~ msgstr ""
10632 #~ "(Linux 2.6.8 以前)  呼び出し元プロセスが B<munlockall>()  を呼び出すのに必"
10633 #~ "要な特権を所有していなかった。 Linux では、 B<CAP_IPC_LOCK> ケーパビリティ"
10634 #~ "が必要である。"
10635
10636 #~ msgid ""
10637 #~ "B<posix_fadvise>()  appeared in kernel 2.5.60.  Glibc support has been "
10638 #~ "provided since version 2.2."
10639 #~ msgstr ""
10640 #~ "B<posix_fadvise>()  はカーネル 2.5.60 で登場した。 glibc でのサポートは "
10641 #~ "glibc バージョン 2.2 以降で行われている。"