OSDN Git Service

(split) LDP: Update POT and ja.po to LDP v3.51.
[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-04-30 20:29+0900\n"
10 "PO-Revision-Date: 2013-03-27 00:53+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:279 build/C/man2/shmget.2:180
250 #: build/C/man2/shmop.2:171 build/C/man2/subpage_prot.2:66
251 #: build/C/man2/sync_file_range.2:141
252 #, no-wrap
253 msgid "RETURN VALUE"
254 msgstr "返り値"
255
256 #. type: Plain text
257 #: build/C/man2/alloc_hugepages.2:118
258 msgid ""
259 "On success, B<alloc_hugepages>()  returns the allocated virtual address, and "
260 "B<free_hugepages>()  returns zero.  On error, -1 is returned, and I<errno> "
261 "is set appropriately."
262 msgstr ""
263 "成功した場合、 B<alloc_hugepages>()  は割り当てられた仮想アドレスを返し、 "
264 "B<free_hugepages>()  は 0 を返す。 失敗した場合、-1 を返し、 I<errno> が適切"
265 "に設定される。"
266
267 #. type: SH
268 #: build/C/man2/alloc_hugepages.2:118 build/C/man2/cacheflush.2:59
269 #: build/C/man2/fallocate.2: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:301 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:373
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/man2/readahead.2:92
361 #: build/C/man3/shm_open.3:255 build/C/man7/shm_overview.7:103
362 #: build/C/man2/shmctl.2:378 build/C/man2/shmget.2:237
363 #: build/C/man2/shmop.2:250 build/C/man2/subpage_prot.2:98
364 #: build/C/man2/sync_file_range.2:183
365 #, no-wrap
366 msgid "NOTES"
367 msgstr "注意"
368
369 #. type: Plain text
370 #: build/C/man2/alloc_hugepages.2:141
371 msgid ""
372 "These system calls are gone; they existed only in Linux 2.5.36 through to "
373 "2.5.54.  Now the hugetlbfs file system can be used instead.  Memory backed "
374 "by huge pages (if the CPU supports them) is obtained by using B<mmap>(2)  to "
375 "map files in this virtual file system."
376 msgstr ""
377 "これらのシステムコールはなくなった。 これらは Linux 2.5.36 から 2.5.54 にのみ"
378 "存在する。 代わりに今は hugetlbfs ファイルシステムを使うことができる。 (CPU "
379 "がサポートしている場合) ヒュージページを持つメモリは、 B<mmap>(2)  を使ってこ"
380 "の仮想ファイルシステムでファイルをマップすることで取得できる。"
381
382 #. type: Plain text
383 #: build/C/man2/alloc_hugepages.2:145
384 msgid ""
385 "The maximal number of huge pages can be specified using the B<hugepages=> "
386 "boot parameter."
387 msgstr ""
388 "ヒュージページの最大数は、 B<hugepages=> 起動パラメータを使って指定できる。"
389
390 #. type: SH
391 #: build/C/man2/alloc_hugepages.2:150 build/C/man3/alloca.3:155
392 #: build/C/man2/cacheflush.2:89 build/C/man2/fallocate.2:203
393 #: build/C/man2/madvise.2:379 build/C/man3/mallinfo.3:279
394 #: build/C/man3/malloc_get_state.3:114 build/C/man3/malloc_hook.3:142
395 #: build/C/man3/malloc_info.3:260 build/C/man3/malloc_stats.3:67
396 #: build/C/man3/malloc_trim.3:82 build/C/man3/malloc_usable_size.3:64
397 #: build/C/man3/mallopt.3:580 build/C/man3/mcheck.3:208
398 #: build/C/man2/mlock.2:336 build/C/man2/mmap.2:737 build/C/man2/mmap2.2:98
399 #: build/C/man2/mprotect.2:229 build/C/man2/mremap.2:214
400 #: build/C/man2/msync.2:122 build/C/man3/mtrace.3:172
401 #: build/C/man2/posix_fadvise.2:197 build/C/man3/posix_fallocate.3:133
402 #: build/C/man3/posix_memalign.3:275 build/C/man2/readahead.2:103
403 #: build/C/man2/remap_file_pages.2:164 build/C/man3/shm_open.3:280
404 #: build/C/man7/shm_overview.7:127 build/C/man2/shmctl.2:430
405 #: build/C/man2/shmget.2:313 build/C/man2/shmop.2:295
406 #: build/C/man2/subpage_prot.2:134 build/C/man2/sync_file_range.2:226
407 #, no-wrap
408 msgid "COLOPHON"
409 msgstr "この文書について"
410
411 #. type: Plain text
412 #: build/C/man2/alloc_hugepages.2:157 build/C/man3/alloca.3:162
413 #: build/C/man2/cacheflush.2:96 build/C/man2/fallocate.2:210
414 #: build/C/man2/madvise.2:386 build/C/man3/mallinfo.3:286
415 #: build/C/man3/malloc_get_state.3:121 build/C/man3/malloc_hook.3:149
416 #: build/C/man3/malloc_info.3:267 build/C/man3/malloc_stats.3:74
417 #: build/C/man3/malloc_trim.3:89 build/C/man3/malloc_usable_size.3:71
418 #: build/C/man3/mallopt.3:587 build/C/man3/mcheck.3:215
419 #: build/C/man2/mlock.2:343 build/C/man2/mmap.2:744 build/C/man2/mmap2.2:105
420 #: build/C/man2/mprotect.2:236 build/C/man2/mremap.2:221
421 #: build/C/man2/msync.2:129 build/C/man3/mtrace.3:179
422 #: build/C/man2/posix_fadvise.2:204 build/C/man3/posix_fallocate.3:140
423 #: build/C/man3/posix_memalign.3:282 build/C/man2/readahead.2:110
424 #: build/C/man2/remap_file_pages.2:171 build/C/man3/shm_open.3:287
425 #: build/C/man7/shm_overview.7:134 build/C/man2/shmctl.2:437
426 #: build/C/man2/shmget.2:320 build/C/man2/shmop.2:302
427 #: build/C/man2/subpage_prot.2:141 build/C/man2/sync_file_range.2:233
428 #, fuzzy
429 #| msgid ""
430 #| "This page is part of release 3.50 of the Linux I<man-pages> project.  A "
431 #| "description of the project, and information about reporting bugs, can be "
432 #| "found at http://www.kernel.org/doc/man-pages/."
433 msgid ""
434 "This page is part of release 3.51 of the Linux I<man-pages> project.  A "
435 "description of the project, and information about reporting bugs, can be "
436 "found at http://www.kernel.org/doc/man-pages/."
437 msgstr ""
438 "この man ページは Linux I<man-pages> プロジェクトのリリース 3.50 の一部\n"
439 "である。プロジェクトの説明とバグ報告に関する情報は\n"
440 "http://www.kernel.org/doc/man-pages/ に書かれている。"
441
442 #. type: TH
443 #: build/C/man3/alloca.3:43
444 #, no-wrap
445 msgid "ALLOCA"
446 msgstr "ALLOCA"
447
448 #. type: TH
449 #: build/C/man3/alloca.3:43
450 #, no-wrap
451 msgid "2008-01-24"
452 msgstr "2008-01-24"
453
454 #. type: TH
455 #: build/C/man3/alloca.3:43 build/C/man3/malloc_get_state.3:25
456 #: build/C/man3/malloc_hook.3:10 build/C/man3/malloc_info.3:25
457 #: build/C/man3/malloc_usable_size.3:25 build/C/man3/mcheck.3:25
458 #: build/C/man3/mtrace.3:25 build/C/man3/posix_fallocate.3:25
459 #: build/C/man3/posix_memalign.3:29
460 #, no-wrap
461 msgid "GNU"
462 msgstr "GNU"
463
464 #. type: Plain text
465 #: build/C/man3/alloca.3:46
466 msgid "alloca - allocate memory that is automatically freed"
467 msgstr "alloca - 自動的に解放されるメモリを割り当てる"
468
469 #. type: Plain text
470 #: build/C/man3/alloca.3:48
471 msgid "B<#include E<lt>alloca.hE<gt>>"
472 msgstr "B<#include E<lt>alloca.hE<gt>>"
473
474 #. type: Plain text
475 #: build/C/man3/alloca.3:50
476 msgid "B<void *alloca(size_t >I<size>B<);>"
477 msgstr "B<void *alloca(size_t >I<size>B<);>"
478
479 #. type: Plain text
480 #: build/C/man3/alloca.3:60
481 msgid ""
482 "The B<alloca>()  function allocates I<size> bytes of space in the stack "
483 "frame of the caller.  This temporary space is automatically freed when the "
484 "function that called B<alloca>()  returns to its caller."
485 msgstr ""
486 "B<alloca>()  関数は、 I<size> バイトの領域を呼出元のスタック・フレームに割り"
487 "付ける。 この一時的な領域は、 B<alloca>()  を呼び出した関数が呼出元に返るとき"
488 "に自動的に解放される。"
489
490 #. type: Plain text
491 #: build/C/man3/alloca.3:65
492 msgid ""
493 "The B<alloca>()  function returns a pointer to the beginning of the "
494 "allocated space.  If the allocation causes stack overflow, program behavior "
495 "is undefined."
496 msgstr ""
497 "B<alloca>()  関数は、割り付けた領域の始まりを指すポインタを返す。 割り付けに"
498 "よってスタックオーバーフローが起った場合の プログラムの動作は定義されていな"
499 "い。"
500
501 #. type: Plain text
502 #: build/C/man3/alloca.3:67
503 msgid "This function is not in POSIX.1-2001."
504 msgstr "この関数は POSIX.1-2001 にはない。"
505
506 #. type: Plain text
507 #: build/C/man3/alloca.3:73
508 msgid ""
509 "There is evidence that the B<alloca>()  function appeared in 32V, PWB, "
510 "PWB.2, 3BSD, and 4BSD.  There is a man page for it in 4.3BSD.  Linux uses "
511 "the GNU version."
512 msgstr ""
513 "32V, PWB, PWB.2, 3BSD, 4BSD に B<alloca>()  関数が登場した証拠がある。 "
514 "4.3BSD には、マニュアルページがある。 Linux は、GNU 版を使っている。 この関数"
515 "は POSIX.1-2001 にはない。"
516
517 #. type: Plain text
518 #: build/C/man3/alloca.3:88
519 msgid ""
520 "The B<alloca>()  function is machine- and compiler-dependent.  For certain "
521 "applications, its use can improve efficiency compared to the use of B<malloc>"
522 "(3)  plus B<free>(3).  In certain cases, it can also simplify memory "
523 "deallocation in applications that use B<longjmp>(3)  or B<siglongjmp>(3).  "
524 "Otherwise, its use is discouraged."
525 msgstr ""
526 "B<alloca>()  関数は、機種とコンパイラに依存する。 特定のアプリケーションで"
527 "は、この関数を使うと B<malloc>(3)  と B<free>(3)  を組み合わせて使った場合に"
528 "比べて効率を改善することができる。 特定の場合では、この関数を使うことで、 "
529 "B<longjmp>(3)  や B<siglongjmp>(3)  を使うアプリケーションでのメモリの開放を"
530 "簡単にすることができる。 それ以外の場合では、この関数の使用は推奨されない。"
531
532 #. type: Plain text
533 #: build/C/man3/alloca.3:97
534 msgid ""
535 "Because the space allocated by B<alloca>()  is allocated within the stack "
536 "frame, that space is automatically freed if the function return is jumped "
537 "over by a call to B<longjmp>(3)  or B<siglongjmp>(3)."
538 msgstr ""
539 "B<alloca>()  により割り当てられる空間はスタックフレームから割り当てらるの"
540 "で、 関数の戻り先が B<longjmp>(3)  や B<siglongjmp>(3)  の呼び出しによりジャ"
541 "ンプした場合には、 割り当てられた空間は自動的に解放される。"
542
543 #. type: Plain text
544 #: build/C/man3/alloca.3:102
545 msgid "Do not attempt to B<free>(3)  space allocated by B<alloca>()!"
546 msgstr ""
547 "B<alloca>()  で割り当てられた空間を B<free>(3)  しようとすることのないよう"
548 "に!"
549
550 #. type: SS
551 #: build/C/man3/alloca.3:102
552 #, no-wrap
553 msgid "Notes on the GNU version"
554 msgstr "GNU 版についての注意"
555
556 #. type: Plain text
557 #: build/C/man3/alloca.3:124
558 msgid ""
559 "Normally, B<gcc>(1)  translates calls to B<alloca>()  with inlined code.  "
560 "This is not done when either the I<-ansi>, I<-std=c89>, I<-std=c99>, or the "
561 "I<-fno-builtin> option is given (and the header I<E<lt>alloca.hE<gt>> is not "
562 "included).  But beware! By default the glibc version of I<E<lt>stdlib."
563 "hE<gt>> includes I<E<lt>alloca.hE<gt>> and that contains the line:"
564 msgstr ""
565 "通常 B<gcc>(1)  は B<alloca>()  の呼び出しをインラインコードに変換する。 I<-"
566 "ansi>, I<-std=c89>, I<-std=c99>, I<-fno-builtin> のいずれかのオプションが指定"
567 "された場合、この変換は行われない (また I<E<lt>alloca.hE<gt>> のインクルードも"
568 "行われない)。 だだし、デフォルトでは glibc 版の I<E<lt>stdlib.hE<gt>> は "
569 "I<E<lt>alloca.hE<gt>> をインクルードしており、これには以下の行が含まれている"
570 "ので注意すること。"
571
572 #. type: Plain text
573 #: build/C/man3/alloca.3:127
574 #, no-wrap
575 msgid "    #define alloca(size)   __builtin_alloca (size)\n"
576 msgstr "    #define alloca(size)   __builtin_alloca (size)\n"
577
578 #. type: Plain text
579 #: build/C/man3/alloca.3:130
580 msgid "with messy consequences if one has a private version of this function."
581 msgstr "独自版の __builtin_alloca (size) 関数があると厄介な結果になる。"
582
583 #. type: Plain text
584 #: build/C/man3/alloca.3:134
585 msgid ""
586 "The fact that the code is inlined means that it is impossible to take the "
587 "address of this function, or to change its behavior by linking with a "
588 "different library."
589 msgstr ""
590 "このコードはインライン化されているので、 この関数のアドレスを取得したり、 他"
591 "のライブラリをリンクして動作を変更することはできない。"
592
593 #. type: Plain text
594 #: build/C/man3/alloca.3:138
595 msgid ""
596 "The inlined code often consists of a single instruction adjusting the stack "
597 "pointer, and does not check for stack overflow.  Thus, there is no NULL "
598 "error return."
599 msgstr ""
600 "通常このインラインコードはスタックポインタを移動する 1 つの命令 "
601 "(instruction) から構成されており、 スタックオーバーフローをチェックしない。 "
602 "よって NULL エラーが返されることはない。"
603
604 #. type: SH
605 #: build/C/man3/alloca.3:138 build/C/man2/cacheflush.2:82
606 #: build/C/man3/mallinfo.3:114 build/C/man3/mallopt.3:406
607 #: build/C/man2/mlock.2:304 build/C/man2/mmap.2:587 build/C/man3/mtrace.3:102
608 #: build/C/man2/posix_fadvise.2:186 build/C/man2/shmget.2:299
609 #, no-wrap
610 msgid "BUGS"
611 msgstr "バグ"
612
613 #. type: Plain text
614 #: build/C/man3/alloca.3:143
615 msgid ""
616 "There is no error indication if the stack frame cannot be extended.  "
617 "(However, after a failed allocation, the program is likely to receive a "
618 "B<SIGSEGV> signal if it attempts to access the unallocated space.)"
619 msgstr ""
620 "スタックフレームが拡張できなかった場合、エラー通知は行われない。 (しかしなが"
621 "ら、割り当てに失敗した後で、プログラムが割り当てられなかった 空間にアクセスし"
622 "ようとした場合に B<SIGSEGV> シグナルを受信することだろう。)"
623
624 #. type: Plain text
625 #: build/C/man3/alloca.3:151
626 msgid ""
627 "On many systems B<alloca>()  cannot be used inside the list of arguments of "
628 "a function call, because the stack space reserved by B<alloca>()  would "
629 "appear on the stack in the middle of the space for the function arguments."
630 msgstr ""
631 "多くのシステムにおいて、関数コールの引き数のリスト内では B<alloca>()  が使え"
632 "ない。 これは、 B<alloca>()  によって予約されるスタック領域が、 関数引き数に"
633 "使われるスタック領域の中に現れてしまうためである。"
634
635 #. type: SH
636 #: build/C/man3/alloca.3:151 build/C/man2/fallocate.2:198
637 #: build/C/man2/madvise.2:371 build/C/man3/mallinfo.3:270
638 #: build/C/man3/malloc_get_state.3:111 build/C/man3/malloc_hook.3:137
639 #: build/C/man3/malloc_info.3:254 build/C/man3/malloc_stats.3:61
640 #: build/C/man3/malloc_trim.3:78 build/C/man3/malloc_usable_size.3:62
641 #: build/C/man3/mallopt.3:566 build/C/man3/mcheck.3:204
642 #: build/C/man2/mlock.2:329 build/C/man2/mmap.2:712 build/C/man2/mmap2.2:92
643 #: build/C/man2/mprotect.2:226 build/C/man2/mremap.2:199
644 #: build/C/man2/msync.2:118 build/C/man3/mtrace.3:167
645 #: build/C/man2/posix_fadvise.2:191 build/C/man3/posix_fallocate.3:128
646 #: build/C/man3/posix_memalign.3:270 build/C/man2/readahead.2:97
647 #: build/C/man2/remap_file_pages.2:157 build/C/man3/shm_open.3:269
648 #: build/C/man7/shm_overview.7:114 build/C/man2/shmctl.2:423
649 #: build/C/man2/shmget.2:305 build/C/man2/shmop.2:287
650 #: build/C/man2/subpage_prot.2:128 build/C/man2/sync_file_range.2:221
651 #, no-wrap
652 msgid "SEE ALSO"
653 msgstr "関連項目"
654
655 #. type: Plain text
656 #: build/C/man3/alloca.3:155
657 msgid "B<brk>(2), B<longjmp>(3), B<malloc>(3)"
658 msgstr "B<brk>(2), B<longjmp>(3), B<malloc>(3)"
659
660 #. type: TH
661 #: build/C/man2/cacheflush.2:25
662 #, no-wrap
663 msgid "CACHEFLUSH"
664 msgstr "CACHEFLUSH"
665
666 #. type: TH
667 #: build/C/man2/cacheflush.2:25
668 #, no-wrap
669 msgid "2007-05-26"
670 msgstr "2007-05-26"
671
672 #. type: Plain text
673 #: build/C/man2/cacheflush.2:28
674 msgid "cacheflush - flush contents of instruction and/or data cache"
675 msgstr "cacheflush - 命令キャッシュやデータキャッシュの内容をフラッシュする"
676
677 #. type: Plain text
678 #: build/C/man2/cacheflush.2:31
679 #, no-wrap
680 msgid "B<#include E<lt>asm/cachectl.hE<gt>>\n"
681 msgstr "B<#include E<lt>asm/cachectl.hE<gt>>\n"
682
683 #. type: Plain text
684 #: build/C/man2/cacheflush.2:33
685 #, no-wrap
686 msgid "B<int cacheflush(char *>I<addr>B<, int >I<nbytes>B<, int >I<cache>B<);>\n"
687 msgstr "B<int cacheflush(char *>I<addr>B<, int >I<nbytes>B<, int >I<cache>B<);>\n"
688
689 #. type: Plain text
690 #: build/C/man2/cacheflush.2:43
691 msgid ""
692 "B<cacheflush>()  flushes the contents of the indicated cache(s) for the user "
693 "addresses in the range I<addr> to I<(addr+nbytes-1)>.  I<cache> may be one "
694 "of:"
695 msgstr ""
696 "B<cacheflush>()  は I<addr> から I<(addr+nbytes-1)> の範囲のユーザアドレスに"
697 "対応する 指定されたキャッシュをフラッシュする。 I<cache> には以下のいずれかを"
698 "指定する:"
699
700 #. type: TP
701 #: build/C/man2/cacheflush.2:43
702 #, no-wrap
703 msgid "B<ICACHE>"
704 msgstr "B<ICACHE>"
705
706 #. type: Plain text
707 #: build/C/man2/cacheflush.2:46
708 msgid "Flush the instruction cache."
709 msgstr "命令 (instruction) キャッシュをフラッシュする。"
710
711 #. type: TP
712 #: build/C/man2/cacheflush.2:46
713 #, no-wrap
714 msgid "B<DCACHE>"
715 msgstr "B<DCACHE>"
716
717 #. type: Plain text
718 #: build/C/man2/cacheflush.2:49
719 msgid "Write back to memory and invalidate the affected valid cache lines."
720 msgstr "変更があったキャッシュラインをメモリに書き戻し、無効にする。"
721
722 #. type: TP
723 #: build/C/man2/cacheflush.2:49
724 #, no-wrap
725 msgid "B<BCACHE>"
726 msgstr "B<BCACHE>"
727
728 #. type: Plain text
729 #: build/C/man2/cacheflush.2:53
730 msgid "Same as B<(ICACHE|DCACHE)>."
731 msgstr "B<(ICACHE|DCACHE)> と同じ。"
732
733 #. type: Plain text
734 #: build/C/man2/cacheflush.2:59
735 msgid ""
736 "B<cacheflush>()  returns 0 on success or -1 on error.  If errors are "
737 "detected, I<errno> will indicate the error."
738 msgstr ""
739 "B<cacheflush>()  は成功した場合は 0 を、失敗した場合は -1 を返す。エラーが検"
740 "出された場合は I<errno> にエラーが指示される。"
741
742 #. type: TP
743 #: build/C/man2/cacheflush.2:60 build/C/man2/mmap2.2:62
744 #: build/C/man2/mremap.2:142 build/C/man2/shmctl.2:310
745 #: build/C/man2/subpage_prot.2:72
746 #, no-wrap
747 msgid "B<EFAULT>"
748 msgstr "B<EFAULT>"
749
750 #. type: Plain text
751 #: build/C/man2/cacheflush.2:67
752 msgid ""
753 "Some or all of the address range I<addr> to I<(addr+nbytes-1)> is not "
754 "accessible."
755 msgstr ""
756 "I<addr> から I<(addr+nbytes-1)> の範囲のアドレスの全てまたは一部が アクセス可"
757 "能ではない。"
758
759 #. type: TP
760 #: build/C/man2/cacheflush.2:67 build/C/man2/fallocate.2:127
761 #: build/C/man2/madvise.2:282 build/C/man3/malloc_info.3:54
762 #: build/C/man2/mlock.2:157 build/C/man2/mlock.2:164 build/C/man2/mlock.2:176
763 #: build/C/man2/mmap.2:423 build/C/man2/mmap.2:431 build/C/man2/mmap.2:436
764 #: build/C/man2/mmap2.2:65 build/C/man2/mprotect.2:95
765 #: build/C/man2/mremap.2:151 build/C/man2/msync.2:80
766 #: build/C/man2/posix_fadvise.2:94 build/C/man3/posix_fallocate.3:81
767 #: build/C/man3/posix_memalign.3:156 build/C/man2/readahead.2:76
768 #: build/C/man2/remap_file_pages.2:132 build/C/man2/remap_file_pages.2:139
769 #: build/C/man3/shm_open.3:211 build/C/man2/shmctl.2:324
770 #: build/C/man2/shmget.2:198 build/C/man2/shmop.2:200 build/C/man2/shmop.2:223
771 #: build/C/man2/subpage_prot.2:77 build/C/man2/sync_file_range.2:152
772 #, no-wrap
773 msgid "B<EINVAL>"
774 msgstr "B<EINVAL>"
775
776 #. type: Plain text
777 #: build/C/man2/cacheflush.2:75
778 msgid "I<cache> is not one of B<ICACHE>, B<DCACHE>, or B<BCACHE>."
779 msgstr "I<cache> パラメータが B<ICACHE>, B<DCACHE>, B<BCACHE> のどれでもない。"
780
781 #.  FIXME This system call was only on MIPS back in 1.2 days, but
782 #.  by now it is on a number of other architectures (but not i386).
783 #.  Investigate the details and update this page.
784 #.  Irix 6.5 appears to have a cacheflush() syscall -- mtk
785 #. type: Plain text
786 #: build/C/man2/cacheflush.2:82
787 #, fuzzy
788 #| msgid ""
789 #| "This Linux-specific system call is only available on MIPS-based systems.  "
790 #| "It should not be used in programs intended to be portable."
791 msgid ""
792 "This Linux-specific system call is available only on MIPS-based systems.  It "
793 "should not be used in programs intended to be portable."
794 msgstr ""
795 "この Linux 特有のシステムコールは MIPS ベースのシステムでのみ有効である。 移"
796 "植を意図したプログラムで使用すべきではない。"
797
798 #. type: Plain text
799 #: build/C/man2/cacheflush.2:89
800 msgid ""
801 "The current implementation ignores the I<addr> and I<nbytes> arguments.  "
802 "Therefore, the whole cache is always flushed."
803 msgstr ""
804 "現在の実装では、引き数 I<addr> と I<nbytes> は無視される。そのため、 常に全て"
805 "のキャッシュがフラッシュされる。"
806
807 #. type: TH
808 #: build/C/man2/fallocate.2:11
809 #, no-wrap
810 msgid "FALLOCATE"
811 msgstr "FALLOCATE"
812
813 #. type: TH
814 #: build/C/man2/fallocate.2:11 build/C/man3/posix_fallocate.3:25
815 #: build/C/man2/shmop.2:41
816 #, no-wrap
817 msgid "2013-02-12"
818 msgstr "2013-02-12"
819
820 #. type: Plain text
821 #: build/C/man2/fallocate.2:14
822 msgid "fallocate - manipulate file space"
823 msgstr "fallocate - ファイル空間の操作"
824
825 #. type: Plain text
826 #: build/C/man2/fallocate.2:18 build/C/man2/readahead.2:35
827 #, no-wrap
828 msgid ""
829 "B<#define _GNU_SOURCE>             /* See feature_test_macros(7) */\n"
830 "B<#include E<lt>fcntl.hE<gt>>\n"
831 msgstr ""
832 "B<#define _GNU_SOURCE>             /* feature_test_macros(7) 参照 */\n"
833 "B<#include E<lt>fcntl.hE<gt>>\n"
834
835 #. type: Plain text
836 #: build/C/man2/fallocate.2:21
837 #, no-wrap
838 msgid "B<int fallocate(int >I<fd>B<, int >I<mode>B<, off_t >I<offset>B<, off_t >I<len>B<);>\n"
839 msgstr "B<int fallocate(int >I<fd>B<, int >I<mode>B<, off_t >I<offset>B<, off_t >I<len>B<);>\n"
840
841 #. type: Plain text
842 #: build/C/man2/fallocate.2:27
843 msgid ""
844 "This is a nonportable, Linux-specific system call.  For the portable, "
845 "POSIX.1-specified method of ensuring that space is allocated for a file, see "
846 "B<posix_fallocate>(3)."
847 msgstr ""
848 "このシステムコールは、移植性のない、Linux 固有のシステムコールである。 移植性"
849 "が必要な場合は、ファイルに対してディスク空間を確実に確保するために、 POSIX.1 "
850 "で規定された方法である B<posix_fallocate>(3)  を使うこと。"
851
852 #. type: Plain text
853 #: build/C/man2/fallocate.2:37
854 msgid ""
855 "B<fallocate>()  allows the caller to directly manipulate the allocated disk "
856 "space for the file referred to by I<fd> for the byte range starting at "
857 "I<offset> and continuing for I<len> bytes."
858 msgstr ""
859 "B<fallocate>()  を使うと、 I<fd> が参照するファイルに割り当てられたディスク空"
860 "間を直接操作できる。 操作対象は、 I<offset> から始まる長さ I<len> バイトの領"
861 "域である。"
862
863 #. type: Plain text
864 #: build/C/man2/fallocate.2:42
865 msgid ""
866 "The I<mode> argument determines the operation to be performed on the given "
867 "range.  Details of the supported operations are given in the subsections "
868 "below."
869 msgstr ""
870 "I<mode> 引き数は、指定された領域に対して実行する操作を指定する。\n"
871 "サポートされている操作の詳細は以下のサブセクションで説明する。"
872
873 #. type: SS
874 #: build/C/man2/fallocate.2:42
875 #, no-wrap
876 msgid "Allocating disk space"
877 msgstr "ディスク領域の割り当て"
878
879 #. type: Plain text
880 #: build/C/man2/fallocate.2:61
881 msgid ""
882 "The default operation (i.e., I<mode> is zero) of B<fallocate>()  allocates "
883 "and initializes to zero the disk space within the range specified by "
884 "I<offset> and I<len>.  The file size (as reported by B<stat>(2))  will be "
885 "changed if I<offset>+I<len> is greater than the file size.  This default "
886 "behavior closely resembles the behavior of the B<posix_fallocate>(3)  "
887 "library function, and is intended as a method of optimally implementing that "
888 "function."
889 msgstr ""
890 "B<fallocate>() のデフォルトの動作 (つまり I<mode> が 0 の場合) は、\n"
891 "I<offset> と I<len> で指定された範囲のディスク領域の割り当てと初期化を行"
892 "う。\n"
893 "I<offset>+I<len> がファイルサイズよりも大きかった場合、\n"
894 "(B<stat>(2) で報告される) ファイルサイズが変更される。このデフォルトの動作"
895 "は、\n"
896 "ライブラリ関数 B<posix_fallocate>(3) の動作と非常に似ている。これは、\n"
897 "このシステムコールが B<posix_fallocate>(3) を最適に実装する手段を提供する\n"
898 "ことを目的としているからである。"
899
900 #. type: Plain text
901 #: build/C/man2/fallocate.2:67
902 msgid ""
903 "After a successful call, subsequent writes into the range specified by "
904 "I<offset> and I<len> are guaranteed not to fail because of lack of disk "
905 "space."
906 msgstr ""
907 "呼び出しが成功した場合、\n"
908 "I<offset> と I<len> で指定された範囲へのそれ以降の書き込みでは、\n"
909 "ディスクの領域不足での書き込み失敗が起こらないことが保証される。"
910
911 #. type: Plain text
912 #: build/C/man2/fallocate.2:78
913 msgid ""
914 "If the B<FALLOC_FL_KEEP_SIZE> flag is specified in I<mode>, the behavior of "
915 "the call is similar, but the file size will not be changed even if I<offset>"
916 "+I<len> is greater than the file size.  Preallocating zeroed blocks beyond "
917 "the end of the file in this manner is useful for optimizing append workloads."
918 msgstr ""
919 "B<FALLOC_FL_KEEP_SIZE> フラグが I<mode> に指定された場合、このシステムコー"
920 "ル\n"
921 "の動作は似ているが、 I<offset>+I<len> がファイルサイズよりも大きい場合で\n"
922 "あってもファイルサイズは変更されない点が異なる。この場合のファイルの末尾\n"
923 "よりも後ろの前もって割り当てられた 0 で埋められたブロックは、ファイルへの\n"
924 "追記を最適化したい場合に役に立つ。"
925
926 #. type: Plain text
927 #: build/C/man2/fallocate.2:82
928 msgid ""
929 "Because allocation is done in block size chunks, B<fallocate>()  may "
930 "allocate a larger range of disk space than was specified."
931 msgstr ""
932 "割り当てはブロックサイズ単位で行われるため、 B<fallocate>() は指定されたよ"
933 "り\n"
934 "も大きなディスク領域を割り当てることがある。"
935
936 #. type: SS
937 #: build/C/man2/fallocate.2:82
938 #, no-wrap
939 msgid "Deallocating file space"
940 msgstr "ファイル空間の割り当て解除"
941
942 #. type: Plain text
943 #: build/C/man2/fallocate.2:97
944 msgid ""
945 "Specifying the B<FALLOC_FL_PUNCH_HOLE> flag (available since Linux 2.6.38) "
946 "in I<mode> deallocates space (i.e., creates a hole)  in the byte range "
947 "starting at I<offset> and continuing for I<len> bytes.  Within the specified "
948 "range, partial file system blocks are zeroed, and whole file system blocks "
949 "are removed from the file.  After a successful call, subsequent reads from "
950 "this range will return zeroes."
951 msgstr ""
952
953 #. type: Plain text
954 #: build/C/man2/fallocate.2:108
955 msgid ""
956 "The B<FALLOC_FL_PUNCH_HOLE> flag must be ORed with B<FALLOC_FL_KEEP_SIZE> in "
957 "I<mode>; in other words, even when punching off the end of the file, the "
958 "file size (as reported by B<stat>(2))  does not change."
959 msgstr ""
960
961 #. type: Plain text
962 #: build/C/man2/fallocate.2:112
963 msgid ""
964 "Not all file systems support B<FALLOC_FL_PUNCH_HOLE>; if a file system "
965 "doesn't support the operation, an error is returned."
966 msgstr ""
967
968 #. type: Plain text
969 #: build/C/man2/fallocate.2:115
970 msgid "B<fallocate>()  returns zero on success, and -1 on failure."
971 msgstr "B<fallocate>()  は成功すると 0 を返し、エラーの場合は -1 を返す。"
972
973 #. type: TP
974 #: build/C/man2/fallocate.2:116 build/C/man2/madvise.2:279
975 #: build/C/man2/mmap.2:417 build/C/man2/posix_fadvise.2:91
976 #: build/C/man3/posix_fallocate.3:73 build/C/man2/readahead.2:72
977 #: build/C/man2/sync_file_range.2:148
978 #, no-wrap
979 msgid "B<EBADF>"
980 msgstr "B<EBADF>"
981
982 #. type: Plain text
983 #: build/C/man2/fallocate.2:120 build/C/man3/posix_fallocate.3:77
984 msgid "I<fd> is not a valid file descriptor, or is not opened for writing."
985 msgstr ""
986 "I<fd> が有効なファイルディスクリプタでないか、 書き込み用としてオープンされて"
987 "いない。"
988
989 #. type: TP
990 #: build/C/man2/fallocate.2:120 build/C/man3/posix_fallocate.3:77
991 #, no-wrap
992 msgid "B<EFBIG>"
993 msgstr "B<EFBIG>"
994
995 #. type: Plain text
996 #: build/C/man2/fallocate.2:124
997 msgid "I<offset>+I<len> exceeds the maximum file size."
998 msgstr "I<offset + len> がファイルサイズの最大値よりも大きい。"
999
1000 #. type: TP
1001 #: build/C/man2/fallocate.2:124
1002 #, no-wrap
1003 msgid "B<EINTR>"
1004 msgstr "B<EINTR>"
1005
1006 #. type: Plain text
1007 #: build/C/man2/fallocate.2:127
1008 msgid "A signal was caught during execution."
1009 msgstr "実行中にシグナルが捕捉された。"
1010
1011 #. type: Plain text
1012 #: build/C/man2/fallocate.2:139 build/C/man3/posix_fallocate.3:87
1013 msgid "I<offset> was less than 0, or I<len> was less than or equal to 0."
1014 msgstr "I<offset> が 0 未満だったか、 I<len> が 0 以下だった。"
1015
1016 #. type: TP
1017 #: build/C/man2/fallocate.2:139 build/C/man2/madvise.2:310
1018 #: build/C/man2/sync_file_range.2:160
1019 #, no-wrap
1020 msgid "B<EIO>"
1021 msgstr "B<EIO>"
1022
1023 #. type: Plain text
1024 #: build/C/man2/fallocate.2:142
1025 msgid "An I/O error occurred while reading from or writing to a file system."
1026 msgstr "ファイルシステムとの読み書き中に入出力エラーが発生した。"
1027
1028 #. type: TP
1029 #: build/C/man2/fallocate.2:142 build/C/man2/mmap.2:452
1030 #: build/C/man3/posix_fallocate.3:87
1031 #, no-wrap
1032 msgid "B<ENODEV>"
1033 msgstr "B<ENODEV>"
1034
1035 #. type: Plain text
1036 #: build/C/man2/fallocate.2:149
1037 msgid ""
1038 "I<fd> does not refer to a regular file or a directory.  (If I<fd> is a pipe "
1039 "or FIFO, a different error results.)"
1040 msgstr ""
1041 "I<fd> が通常のファイルかディレクトリを参照していない (I<fd> がパイプや FIFO "
1042 "を参照している場合、別のエラーが発生する)。"
1043
1044 #. type: TP
1045 #: build/C/man2/fallocate.2:149 build/C/man3/posix_fallocate.3:91
1046 #: build/C/man2/shmget.2:216 build/C/man2/sync_file_range.2:166
1047 #, no-wrap
1048 msgid "B<ENOSPC>"
1049 msgstr "B<ENOSPC>"
1050
1051 #. type: Plain text
1052 #: build/C/man2/fallocate.2:154 build/C/man3/posix_fallocate.3:96
1053 msgid ""
1054 "There is not enough space left on the device containing the file referred to "
1055 "by I<fd>."
1056 msgstr "I<fd> が参照するファイルを含むデバイスに十分な空き領域がない。"
1057
1058 #. type: Plain text
1059 #: build/C/man2/fallocate.2:158
1060 msgid "This kernel does not implement B<fallocate>()."
1061 msgstr "このカーネルでは B<fallocate>() は実装されていない。"
1062
1063 #. type: TP
1064 #: build/C/man2/fallocate.2:158
1065 #, no-wrap
1066 msgid "B<EOPNOTSUPP>"
1067 msgstr "B<EOPNOTSUPP>"
1068
1069 #. type: Plain text
1070 #: build/C/man2/fallocate.2:167
1071 msgid ""
1072 "The file system containing the file referred to by I<fd> does not support "
1073 "this operation; or the I<mode> is not supported by the file system "
1074 "containing the file referred to by I<fd>."
1075 msgstr ""
1076 "I<fd> が参照するファイルを含むファイルシステムが 指定された操作を\n"
1077 "サポートしていない。 I<fd> が参照するファイルを含むファイルシステムが\n"
1078 "I<mode> をサポートしていない。"
1079
1080 #. type: TP
1081 #: build/C/man2/fallocate.2:167 build/C/man2/mlock.2:143
1082 #: build/C/man2/mlock.2:182 build/C/man2/mmap.2:460 build/C/man2/shmctl.2:349
1083 #: build/C/man2/shmget.2:224
1084 #, no-wrap
1085 msgid "B<EPERM>"
1086 msgstr "B<EPERM>"
1087
1088 #. type: Plain text
1089 #: build/C/man2/fallocate.2:183
1090 msgid ""
1091 "The file referred to by I<fd> is marked immutable (see B<chattr>(1)).  Or: "
1092 "I<mode> specifies B<FALLOC_FL_PUNCH_HOLE> and the file referred to by I<fd> "
1093 "is marked append-only (see B<chattr>(1))."
1094 msgstr ""
1095
1096 #. type: TP
1097 #: build/C/man2/fallocate.2:183 build/C/man2/posix_fadvise.2:97
1098 #: build/C/man3/posix_fallocate.3:96 build/C/man2/sync_file_range.2:169
1099 #, no-wrap
1100 msgid "B<ESPIPE>"
1101 msgstr "B<ESPIPE>"
1102
1103 #. type: Plain text
1104 #: build/C/man2/fallocate.2:187
1105 msgid "I<fd> refers to a pipe or FIFO."
1106 msgstr "I<fd> がパイプか FIFO を参照している。"
1107
1108 #. type: SH
1109 #: build/C/man2/fallocate.2:187 build/C/man3/malloc_info.3:58
1110 #: build/C/man3/mcheck.3:134 build/C/man2/mmap2.2:74
1111 #: build/C/man2/posix_fadvise.2:104 build/C/man3/posix_fallocate.3:100
1112 #: build/C/man3/posix_memalign.3:165 build/C/man2/readahead.2:82
1113 #: build/C/man2/remap_file_pages.2:148 build/C/man3/shm_open.3:247
1114 #: build/C/man2/subpage_prot.2:90 build/C/man2/sync_file_range.2:177
1115 #, no-wrap
1116 msgid "VERSIONS"
1117 msgstr "バージョン"
1118
1119 #.  See http://sourceware.org/bugzilla/show_bug.cgi?id=14964
1120 #. type: Plain text
1121 #: build/C/man2/fallocate.2:195
1122 msgid ""
1123 "B<fallocate>()  is available on Linux since kernel 2.6.23.  Support is "
1124 "provided by glibc since version 2.10.  The B<FALLOC_FL_*> flags are defined "
1125 "in glibc headers only since version 2.18."
1126 msgstr ""
1127 "B<fallocate>()  はカーネル 2.6.23 以降の Linux で利用可能である。 glibc での"
1128 "対応はバージョン 3.10 以降で行われている。 B<FALLOC_FL_*> が glibc のヘッダ"
1129 "ファイルで定義されているのは、バージョン 2.18 以降のみである。"
1130
1131 #. type: Plain text
1132 #: build/C/man2/fallocate.2:198
1133 msgid "B<fallocate>()  is Linux-specific."
1134 msgstr "B<fallocate>()  は Linux 固有である。"
1135
1136 #. type: Plain text
1137 #: build/C/man2/fallocate.2:203
1138 msgid ""
1139 "B<fallocate>(1), B<ftruncate>(2), B<posix_fadvise>(3), B<posix_fallocate>(3)"
1140 msgstr ""
1141 "B<fallocate>(1), B<ftruncate>(2), B<posix_fadvise>(3), B<posix_fallocate>(3)"
1142
1143 #. type: TH
1144 #: build/C/man2/madvise.2:35
1145 #, no-wrap
1146 msgid "MADVISE"
1147 msgstr "MADVISE"
1148
1149 #. type: TH
1150 #: build/C/man2/madvise.2:35 build/C/man3/malloc_info.3:25
1151 #, no-wrap
1152 msgid "2012-04-28"
1153 msgstr "2012-04-28"
1154
1155 #. type: Plain text
1156 #: build/C/man2/madvise.2:38
1157 msgid "madvise - give advice about use of memory"
1158 msgstr "madvise - メモリ利用に関するアドバイスを与える"
1159
1160 #. type: Plain text
1161 #: build/C/man2/madvise.2:40 build/C/man2/msync.2:30
1162 #: build/C/man3/shm_open.3:31
1163 msgid "B<#include E<lt>sys/mman.hE<gt>>"
1164 msgstr "B<#include E<lt>sys/mman.hE<gt>>"
1165
1166 #. type: Plain text
1167 #: build/C/man2/madvise.2:42
1168 msgid ""
1169 "B<int madvise(void *>I<addr>B<, size_t >I<length>B<, int >I<advice>B<);>"
1170 msgstr ""
1171 "B<int madvise(void *>I<addr>B<, size_t >I<length>B<, int >I<advice>B<);>"
1172
1173 #. type: Plain text
1174 #: build/C/man2/madvise.2:46 build/C/man2/posix_fadvise.2:43
1175 #: build/C/man3/posix_fallocate.3:39 build/C/man3/posix_memalign.3:49
1176 msgid ""
1177 "Feature Test Macro Requirements for glibc (see B<feature_test_macros>(7)):"
1178 msgstr "glibc 向けの機能検査マクロの要件 (B<feature_test_macros>(7)  参照):"
1179
1180 #. type: Plain text
1181 #: build/C/man2/madvise.2:50
1182 msgid "B<madvise>(): _BSD_SOURCE"
1183 msgstr "B<madvise>(): _BSD_SOURCE"
1184
1185 #. type: Plain text
1186 #: build/C/man2/madvise.2:68
1187 msgid ""
1188 "The B<madvise>()  system call advises the kernel about how to handle paging "
1189 "input/output in the address range beginning at address I<addr> and with size "
1190 "I<length> bytes.  It allows an application to tell the kernel how it expects "
1191 "to use some mapped or shared memory areas, so that the kernel can choose "
1192 "appropriate read-ahead and caching techniques.  This call does not influence "
1193 "the semantics of the application (except in the case of B<MADV_DONTNEED>), "
1194 "but may influence its performance.  The kernel is free to ignore the advice."
1195 msgstr ""
1196 "B<madvise>()  システムコールは、アドレス I<addr> からはじまる I<length> バイ"
1197 "トのメモリブロックのページング入出力をどう扱えば良いか、 カーネルにアドバイス"
1198 "する。 これを用いると、 アプリケーションからカーネルに、 マップされたメモリや"
1199 "共有メモリをどのように扱ってほしいか伝えることができ、 カーネルはそれに応じて"
1200 "先読みやキャッシュなどの適切な手法を選択できる。 このコールはアプリケーション"
1201 "の動作そのものには影響しない (B<MADV_DONTNEED> の場合は別) が、 性能には影響"
1202 "しうる。 なおこのアドバイスを受け入れるかどうかはカーネルに任される。"
1203
1204 #. type: Plain text
1205 #: build/C/man2/madvise.2:72
1206 msgid "The advice is indicated in the I<advice> argument which can be"
1207 msgstr ""
1208 "アドバイスは引き数 I<advice> によって与える。以下のいずれかを指定できる。"
1209
1210 #. type: TP
1211 #: build/C/man2/madvise.2:72
1212 #, no-wrap
1213 msgid "B<MADV_NORMAL>"
1214 msgstr "B<MADV_NORMAL>"
1215
1216 #. type: Plain text
1217 #: build/C/man2/madvise.2:76
1218 msgid "No special treatment.  This is the default."
1219 msgstr "特別な扱いは行わない。これがデフォルトである。"
1220
1221 #. type: TP
1222 #: build/C/man2/madvise.2:76
1223 #, no-wrap
1224 msgid "B<MADV_RANDOM>"
1225 msgstr "B<MADV_RANDOM>"
1226
1227 #. type: Plain text
1228 #: build/C/man2/madvise.2:80
1229 msgid ""
1230 "Expect page references in random order.  (Hence, read ahead may be less "
1231 "useful than normally.)"
1232 msgstr ""
1233 "ページ参照はランダムな順序で行われそうだ。 (したがって、先読みはあまり効果が"
1234 "なさそうだ。)"
1235
1236 #. type: TP
1237 #: build/C/man2/madvise.2:80
1238 #, no-wrap
1239 msgid "B<MADV_SEQUENTIAL>"
1240 msgstr "B<MADV_SEQUENTIAL>"
1241
1242 #. type: Plain text
1243 #: build/C/man2/madvise.2:85
1244 msgid ""
1245 "Expect page references in sequential order.  (Hence, pages in the given "
1246 "range can be aggressively read ahead, and may be freed soon after they are "
1247 "accessed.)"
1248 msgstr ""
1249 "ページ参照はシーケンシャルな順序で行われそうだ。 (したがって与えた範囲のペー"
1250 "ジは積極的に先読みしておくと良いだろう。 またアクセスが終わったら速やかに解放"
1251 "して良い。)"
1252
1253 #. type: TP
1254 #: build/C/man2/madvise.2:85
1255 #, no-wrap
1256 msgid "B<MADV_WILLNEED>"
1257 msgstr "B<MADV_WILLNEED>"
1258
1259 #. type: Plain text
1260 #: build/C/man2/madvise.2:89
1261 msgid ""
1262 "Expect access in the near future.  (Hence, it might be a good idea to read "
1263 "some pages ahead.)"
1264 msgstr ""
1265 "近い将来にアクセスされそうだ。 (したがってこれらのページを今のうちに先読みし"
1266 "ておくといいだろう。)"
1267
1268 #. type: TP
1269 #: build/C/man2/madvise.2:89
1270 #, no-wrap
1271 msgid "B<MADV_DONTNEED>"
1272 msgstr "B<MADV_DONTNEED>"
1273
1274 #. type: Plain text
1275 #: build/C/man2/madvise.2:100
1276 msgid ""
1277 "Do not expect access in the near future.  (For the time being, the "
1278 "application is finished with the given range, so the kernel can free "
1279 "resources associated with it.)  Subsequent accesses of pages in this range "
1280 "will succeed, but will result either in reloading of the memory contents "
1281 "from the underlying mapped file (see B<mmap>(2))  or zero-fill-on-demand "
1282 "pages for mappings without an underlying file."
1283 msgstr ""
1284 "しばらくアクセスはなさそうだ。 (現時点でアプリケーションは与えた範囲の処理を"
1285 "終えている。 したがってカーネルはこれに関連するリソースを解放して良い。)  こ"
1286 "れ以降この範囲のページへのアクセスがあると、 成功はするが、メモリの内容をマッ"
1287 "プ元のファイルからロードし直すことになる (B<mmap>(2)  を見よ) か、 または元"
1288 "ファイルがないマップページでは アクセスがあったときに 0 埋めが行われることに"
1289 "なる。"
1290
1291 #. type: TP
1292 #: build/C/man2/madvise.2:100
1293 #, no-wrap
1294 msgid "B<MADV_REMOVE> (Since Linux 2.6.16)"
1295 msgstr "B<MADV_REMOVE> (Linux 2.6.16 以降)"
1296
1297 #.  2.6.18-rc5
1298 #.  Databases want to use this feature to drop a section of their
1299 #.  bufferpool (shared memory segments) - without writing back to
1300 #.  disk/swap space.  This feature is also useful for supporting
1301 #.  hot-plug memory on UML.
1302 #. type: Plain text
1303 #: build/C/man2/madvise.2:113
1304 msgid ""
1305 "Free up a given range of pages and its associated backing store.  Currently, "
1306 "only shmfs/tmpfs supports this; other file systems return with the error "
1307 "B<ENOSYS>."
1308 msgstr ""
1309 "指定された範囲のページと関連するバッキングストアを解放する。 現在のところ、 "
1310 "shmfs/tmpfs だけがこれに対応している。 他のファイルシステムでは B<ENOSYS> が"
1311 "返される。"
1312
1313 #. type: TP
1314 #: build/C/man2/madvise.2:113
1315 #, no-wrap
1316 msgid "B<MADV_DONTFORK> (Since Linux 2.6.16)"
1317 msgstr "B<MADV_DONTFORK> (Linux 2.6.16 以降)"
1318
1319 #.  See http://lwn.net/Articles/171941/
1320 #.  [PATCH] madvise MADV_DONTFORK/MADV_DOFORK
1321 #.  Currently, copy-on-write may change the physical address of
1322 #.  a page even if the user requested that the page is pinned in
1323 #.  memory (either by mlock or by get_user_pages).  This happens
1324 #.  if the process forks meanwhile, and the parent writes to that
1325 #.  page.  As a result, the page is orphaned: in case of
1326 #.  get_user_pages, the application will never see any data hardware
1327 #.  DMA's into this page after the COW.  In case of mlock'd memory,
1328 #.  the parent is not getting the realtime/security benefits of mlock.
1329 #.  In particular, this affects the Infiniband modules which do DMA from
1330 #.  and into user pages all the time.
1331 #.  This patch adds madvise options to control whether memory range is
1332 #.  inherited across fork. Useful e.g. for when hardware is doing DMA
1333 #.  from/into these pages.  Could also be useful to an application
1334 #.  wanting to speed up its forks by cutting large areas out of
1335 #.  consideration.
1336 #.  SEE ALSO: http://lwn.net/Articles/171941/
1337 #.  "Tweaks to madvise() and posix_fadvise()", 14 Feb 2006
1338 #. type: Plain text
1339 #: build/C/man2/madvise.2:144
1340 msgid ""
1341 "Do not make the pages in this range available to the child after a B<fork>"
1342 "(2).  This is useful to prevent copy-on-write semantics from changing the "
1343 "physical location of a page(s) if the parent writes to it after a B<fork>"
1344 "(2).  (Such page relocations cause problems for hardware that DMAs into the "
1345 "page(s).)"
1346 msgstr ""
1347 "B<fork>(2)  が行われた後、指定された範囲のページを子プロセスが利用できないよ"
1348 "うにする。 この機能は、書き込み時コピー (copy-on-write) 方式で、 B<fork>(2)  "
1349 "の後で親プロセスがページに書き込みを行った場合に ページの物理位置が変化しない"
1350 "ようにするのに有効である (ページの再配置はハードウェアがそのページに DMA 転送"
1351 "を行うような場合に 問題を起こすことがある)。"
1352
1353 #. type: TP
1354 #: build/C/man2/madvise.2:144
1355 #, no-wrap
1356 msgid "B<MADV_DOFORK> (Since Linux 2.6.16)"
1357 msgstr "B<MADV_DOFORK> (Linux 2.6.16 以降)"
1358
1359 #. type: Plain text
1360 #: build/C/man2/madvise.2:150
1361 msgid ""
1362 "Undo the effect of B<MADV_DONTFORK>, restoring the default behavior, whereby "
1363 "a mapping is inherited across B<fork>(2)."
1364 msgstr ""
1365 "B<MADV_DONTFORK> の影響を取り消し、デフォルトの動作に戻す。 つまり、 B<fork>"
1366 "(2)  の前後でマッピングは継承されるようになる。"
1367
1368 #. type: TP
1369 #: build/C/man2/madvise.2:150
1370 #, no-wrap
1371 msgid "B<MADV_HWPOISON> (Since Linux 2.6.32)"
1372 msgstr "B<MADV_HWPOISON> (Linux 2.6.32 以降)"
1373
1374 #. type: Plain text
1375 #: build/C/man2/madvise.2:162
1376 msgid ""
1377 "Poison a page and handle it like a hardware memory corruption.  This "
1378 "operation is available only for privileged (B<CAP_SYS_ADMIN>)  processes.  "
1379 "This operation may result in the calling process receiving a B<SIGBUS> and "
1380 "the page being unmapped.  This feature is intended for testing of memory "
1381 "error-handling code; it is available only if the kernel was configured with "
1382 "B<CONFIG_MEMORY_FAILURE>."
1383 msgstr ""
1384
1385 #. type: TP
1386 #: build/C/man2/madvise.2:162
1387 #, no-wrap
1388 msgid "B<MADV_SOFT_OFFLINE> (Since Linux 2.6.33)"
1389 msgstr "B<MADV_SOFT_OFFLINE> (Linux 2.6.33 以降)"
1390
1391 #. type: Plain text
1392 #: build/C/man2/madvise.2:180
1393 msgid ""
1394 "Soft offline the pages in the range specified by I<addr> and I<length>.  The "
1395 "memory of each page in the specified range is preserved (i.e., when next "
1396 "accessed, the same content will be visible, but in a new physical page "
1397 "frame), and the original page is offlined (i.e., no longer used, and taken "
1398 "out of normal memory management).  The effect of the B<MADV_SOFT_OFFLINE> "
1399 "operation is invisible to (i.e., does not change the semantics of)  the "
1400 "calling process.  This feature is intended for testing of memory error-"
1401 "handling code; it is available only if the kernel was configured with "
1402 "B<CONFIG_MEMORY_FAILURE>."
1403 msgstr ""
1404
1405 #. type: TP
1406 #: build/C/man2/madvise.2:180
1407 #, no-wrap
1408 msgid "B<MADV_MERGEABLE> (since Linux 2.6.32)"
1409 msgstr "B<MADV_MERGEABLE> (Linux 2.6.32 以降)"
1410
1411 #. type: Plain text
1412 #: build/C/man2/madvise.2:205
1413 msgid ""
1414 "Enable Kernel Samepage Merging (KSM) for the pages in the range specified by "
1415 "I<addr> and I<length>.  The kernel regularly scans those areas of user "
1416 "memory that have been marked as mergeable, looking for pages with identical "
1417 "content.  These are replaced by a single write-protected page (which is "
1418 "automatically copied if a process later wants to update the content of the "
1419 "page).  KSM merges only private anonymous pages (see B<mmap>(2)).  The KSM "
1420 "feature is intended for applications that generate many instances of the "
1421 "same data (e.g., virtualization systems such as KVM).  It can consume a lot "
1422 "of processing power; use with care.  See the Linux kernel source file "
1423 "I<Documentation/vm/ksm.txt> for more details.  The B<MADV_MERGEABLE> and "
1424 "B<MADV_UNMERGEABLE> operations are available only if the kernel was "
1425 "configured with B<CONFIG_KSM>."
1426 msgstr ""
1427
1428 #. type: TP
1429 #: build/C/man2/madvise.2:205
1430 #, no-wrap
1431 msgid "B<MADV_UNMERGEABLE> (since Linux 2.6.32)"
1432 msgstr "B<MADV_UNMERGEABLE> (Linux 2.6.32 以降)"
1433
1434 #. type: Plain text
1435 #: build/C/man2/madvise.2:214
1436 msgid ""
1437 "Undo the effect of an earlier B<MADV_MERGEABLE> operation on the specified "
1438 "address range; KSM unmerges whatever pages it had merged in the address "
1439 "range specified by I<addr> and I<length>."
1440 msgstr ""
1441
1442 #. type: TP
1443 #: build/C/man2/madvise.2:214
1444 #, no-wrap
1445 msgid "B<MADV_HUGEPAGE> (since Linux 2.6.38)"
1446 msgstr "B<MADV_HUGEPAGE> (Linux 2.6.38 以降)"
1447
1448 #.  http://lwn.net/Articles/358904/
1449 #.  https://lwn.net/Articles/423584/
1450 #. type: Plain text
1451 #: build/C/man2/madvise.2:243
1452 msgid ""
1453 "Enables Transparent Huge Pages (THP) for pages in the range specified by "
1454 "I<addr> and I<length>.  Currently, Transparent Huge Pages work only with "
1455 "private anonymous pages (see B<mmap>(2)).  The kernel will regularly scan "
1456 "the areas marked as huge page candidates to replace them with huge pages.  "
1457 "The kernel will also allocate huge pages directly when the region is "
1458 "naturally aligned to the huge page size (see B<posix_memalign>(2)).  This "
1459 "feature is primarily aimed at applications that use large mappings of data "
1460 "and access large regions of that memory at a time (e.g., virtualization "
1461 "systems such as QEMU).  It can very easily waste memory (e.g., a 2MB mapping "
1462 "that only ever accesses 1 byte will result in 2MB of wired memory instead of "
1463 "one 4KB page).  See the Linux kernel source file I<Documentation/vm/"
1464 "transhuge.txt> for more details.  The B<MADV_HUGEPAGE> and "
1465 "B<MADV_NOHUGEPAGE> operations are available only if the kernel was "
1466 "configured with B<CONFIG_TRANSPARENT_HUGEPAGE>."
1467 msgstr ""
1468
1469 #. type: TP
1470 #: build/C/man2/madvise.2:243
1471 #, no-wrap
1472 msgid "B<MADV_NOHUGEPAGE> (since Linux 2.6.38)"
1473 msgstr "B<MADV_NOHUGEPAGE> (Linux 2.6.38 以降)"
1474
1475 #. type: Plain text
1476 #: build/C/man2/madvise.2:250
1477 msgid ""
1478 "Ensures that memory in the address range specified by I<addr> and I<length> "
1479 "will not be collapsed into huge pages."
1480 msgstr ""
1481
1482 #. type: TP
1483 #: build/C/man2/madvise.2:250
1484 #, no-wrap
1485 msgid "B<MADV_DONTDUMP> (since Linux 3.4)"
1486 msgstr "B<MADV_DONTDUMP> (Linux 3.4 以降)"
1487
1488 #. type: Plain text
1489 #: build/C/man2/madvise.2:264
1490 msgid ""
1491 "Exclude from a core dump those pages in the range specified by I<addr> and "
1492 "I<length>.  This is useful in applications that have large areas of memory "
1493 "that are known not to be useful in a core dump.  The effect of "
1494 "B<MADV_DONTDUMP> takes precedence over the bit mask that is set via the I</"
1495 "proc/PID/coredump_filter> file (see B<core>(5))."
1496 msgstr ""
1497
1498 #. type: TP
1499 #: build/C/man2/madvise.2:264
1500 #, no-wrap
1501 msgid "B<MADV_DODUMP> (since Linux 3.4)"
1502 msgstr "B<MADV_DODUMP> (Linux 3.4 以降)"
1503
1504 #. type: Plain text
1505 #: build/C/man2/madvise.2:268
1506 msgid "Undo the effect of an earlier B<MADV_DONTDUMP>."
1507 msgstr ""
1508
1509 #. type: Plain text
1510 #: build/C/man2/madvise.2:275
1511 msgid ""
1512 "On success B<madvise>()  returns zero.  On error, it returns -1 and I<errno> "
1513 "is set appropriately."
1514 msgstr ""
1515 "B<madvise>()  は成功すると 0 を返す。 エラーが起こると -1 を返し、 I<errno> "
1516 "を適切な値に設定する。"
1517
1518 #. type: TP
1519 #: build/C/man2/madvise.2:276 build/C/man2/mlock.2:154 build/C/man2/mmap.2:413
1520 #: build/C/man2/mremap.2:136
1521 #, no-wrap
1522 msgid "B<EAGAIN>"
1523 msgstr "B<EAGAIN>"
1524
1525 #. type: Plain text
1526 #: build/C/man2/madvise.2:279
1527 msgid "A kernel resource was temporarily unavailable."
1528 msgstr "何らかのカーネルリソースが一時的に利用できなかった。"
1529
1530 #. type: Plain text
1531 #: build/C/man2/madvise.2:282
1532 msgid "The map exists, but the area maps something that isn't a file."
1533 msgstr "指定したマップは存在するが、ファイルではないところをマップしている。"
1534
1535 #. type: Plain text
1536 #: build/C/man2/madvise.2:285
1537 msgid "This error can occur for the following reasons:"
1538 msgstr ""
1539
1540 #. type: IP
1541 #: build/C/man2/madvise.2:286 build/C/man2/madvise.2:292
1542 #: build/C/man2/madvise.2:295 build/C/man2/madvise.2:298
1543 #: build/C/man2/madvise.2:301 build/C/man3/mallopt.3:235
1544 #: build/C/man3/mallopt.3:241
1545 #, no-wrap
1546 msgid "*"
1547 msgstr "*"
1548
1549 #.  .I len
1550 #.  is zero,
1551 #. type: Plain text
1552 #: build/C/man2/madvise.2:292
1553 msgid "The value I<len> is negative."
1554 msgstr "I<len> が負の値である。"
1555
1556 #. type: Plain text
1557 #: build/C/man2/madvise.2:295
1558 msgid "I<addr> is not page-aligned."
1559 msgstr ""
1560
1561 #. type: Plain text
1562 #: build/C/man2/madvise.2:298
1563 msgid "I<advice> is not a valid value"
1564 msgstr "I<advice> が有効な値でない。"
1565
1566 #. type: Plain text
1567 #: build/C/man2/madvise.2:301
1568 msgid ""
1569 "The application is attempting to release locked or shared pages (with "
1570 "B<MADV_DONTNEED>)."
1571 msgstr ""
1572 "アプリケーションがロックされたページや共有ページを (B<MADV_DONTNEED> で) 解"
1573 "放\n"
1574 "しようとしている。"
1575
1576 #. type: Plain text
1577 #: build/C/man2/madvise.2:309
1578 msgid ""
1579 "B<MADV_MERGEABLE> or B<MADV_UNMERGEABLE> was specified in I<advice>, but the "
1580 "kernel was not configured with B<CONFIG_KSM>."
1581 msgstr ""
1582
1583 #. type: Plain text
1584 #: build/C/man2/madvise.2:316
1585 msgid ""
1586 "(for B<MADV_WILLNEED>)  Paging in this area would exceed the process's "
1587 "maximum resident set size."
1588 msgstr ""
1589 "(B<MADV_WILLNEED> の場合) この範囲のページングを行うと、 プロセスの RSS "
1590 "(resident set size) の最大値を越えてしまう。"
1591
1592 #. type: TP
1593 #: build/C/man2/madvise.2:316 build/C/man2/madvise.2:321
1594 #: build/C/man2/mlock.2:123 build/C/man2/mlock.2:131 build/C/man2/mlock.2:169
1595 #: build/C/man2/mmap.2:456 build/C/man2/mprotect.2:100
1596 #: build/C/man2/mprotect.2:103 build/C/man2/mremap.2:179
1597 #: build/C/man2/msync.2:93 build/C/man3/posix_memalign.3:162
1598 #: build/C/man2/shmctl.2:333 build/C/man2/shmget.2:213
1599 #: build/C/man2/shmop.2:214 build/C/man2/subpage_prot.2:87
1600 #: build/C/man2/sync_file_range.2:163
1601 #, no-wrap
1602 msgid "B<ENOMEM>"
1603 msgstr "B<ENOMEM>"
1604
1605 #. type: Plain text
1606 #: build/C/man2/madvise.2:321
1607 msgid "(for B<MADV_WILLNEED>)  Not enough memory: paging in failed."
1608 msgstr "(B<MADV_WILLNEED> の場合) メモリが足りず、ページングに失敗した。"
1609
1610 #. type: Plain text
1611 #: build/C/man2/madvise.2:325
1612 msgid ""
1613 "Addresses in the specified range are not currently mapped, or are outside "
1614 "the address space of the process."
1615 msgstr ""
1616 "指定した範囲のアドレスが、現在マップされていない。 あるいはプロセスのアドレス"
1617 "空間の内部にない。"
1618
1619 #.  FIXME . Write a posix_madvise(3) page.
1620 #. type: Plain text
1621 #: build/C/man2/madvise.2:337
1622 msgid ""
1623 "POSIX.1b.  POSIX.1-2001 describes B<posix_madvise>(3)  with constants "
1624 "B<POSIX_MADV_NORMAL>, etc., with a behavior close to that described here.  "
1625 "There is a similar B<posix_fadvise>(2)  for file access."
1626 msgstr ""
1627 "POSIX.1b.  POSIX.1-2001 では、 B<posix_madvise>(3)  を B<POSIX_MADV_NORMAL> "
1628 "などの定数とともに記述していた (それぞれの振る舞いはここで述べたものに近"
1629 "い)。 ファイルアクセスに対しても B<posix_fadvise>(2)  という類似の関数が存在"
1630 "する。"
1631
1632 #. type: Plain text
1633 #: build/C/man2/madvise.2:346
1634 msgid ""
1635 "B<MADV_REMOVE>, B<MADV_DONTFORK>, B<MADV_DOFORK>, B<MADV_HWPOISON>, "
1636 "B<MADV_MERGEABLE>, and B<MADV_UNMERGEABLE> are Linux-specific."
1637 msgstr ""
1638 "B<MADV_REMOVE>, B<MADV_DONTFORK>, B<MADV_DOFORK>, B<MADV_HWPOISON>,\n"
1639 "B<MADV_MERGEABLE>, B<MADV_UNMERGEABLE> は Linux 固有である。"
1640
1641 #. type: SS
1642 #: build/C/man2/madvise.2:347 build/C/man2/mlock.2:267
1643 #: build/C/man2/shmget.2:293
1644 #, no-wrap
1645 msgid "Linux notes"
1646 msgstr "Linux での注意"
1647
1648 #. type: Plain text
1649 #: build/C/man2/madvise.2:355
1650 msgid ""
1651 "The current Linux implementation (2.4.0) views this system call more as a "
1652 "command than as advice and hence may return an error when it cannot do what "
1653 "it usually would do in response to this advice.  (See the ERRORS description "
1654 "above.)  This is nonstandard behavior."
1655 msgstr ""
1656 "現在の Linux の実装 (2.4.0) では、 このシステムコールをアドバイスというよりは"
1657 "命令と見ている。 したがってこのアドバイスに対して通常行われる動作が不可能な場"
1658 "合は、 エラーを返すことがある (上記の エラー の記述を参照)。 この振舞いは標準"
1659 "とは異なる。"
1660
1661 #.  .SH HISTORY
1662 #.  The
1663 #.  .BR madvise ()
1664 #.  function first appeared in 4.4BSD.
1665 #. type: Plain text
1666 #: build/C/man2/madvise.2:371
1667 msgid ""
1668 "The Linux implementation requires that the address I<addr> be page-aligned, "
1669 "and allows I<length> to be zero.  If there are some parts of the specified "
1670 "address range that are not mapped, the Linux version of B<madvise>()  "
1671 "ignores them and applies the call to the rest (but returns B<ENOMEM> from "
1672 "the system call, as it should)."
1673 msgstr ""
1674 "Linux の実装では I<addr> のアドレスはページ境界の値でなければならない。また "
1675 "I<length> は 0 であっても構わない。 また Linux 版の B<madvise>()  では、指定"
1676 "されたアドレス範囲にマップされていない部分があると、 これらを無視して残りの部"
1677 "分にアドバイスを適用する (しかしシステムコールに対してはちゃんと B<ENOMEM> を"
1678 "返す)。"
1679
1680 #. type: Plain text
1681 #: build/C/man2/madvise.2:379
1682 msgid ""
1683 "B<getrlimit>(2), B<mincore>(2), B<mmap>(2), B<mprotect>(2), B<msync>(2), "
1684 "B<munmap>(2), B<core>(5)"
1685 msgstr ""
1686 "B<getrlimit>(2), B<mincore>(2), B<mmap>(2), B<mprotect>(2), B<msync>(2), "
1687 "B<munmap>(2), B<core>(5)"
1688
1689 #. type: TH
1690 #: build/C/man3/mallinfo.3:26
1691 #, no-wrap
1692 msgid "MALLINFO"
1693 msgstr "MALLINFO"
1694
1695 #. type: TH
1696 #: build/C/man3/mallinfo.3:26 build/C/man3/malloc_stats.3:26
1697 #, no-wrap
1698 msgid "2012-05-06"
1699 msgstr "2012-05-06"
1700
1701 #. type: Plain text
1702 #: build/C/man3/mallinfo.3:29
1703 msgid "mallinfo - obtain memory allocation information"
1704 msgstr "mallinfo - メモリ割り当て情報を取得する"
1705
1706 #. type: Plain text
1707 #: build/C/man3/mallinfo.3:31 build/C/man3/malloc_stats.3:31
1708 #: build/C/man3/malloc_trim.3:31 build/C/man3/malloc_usable_size.3:30
1709 #: build/C/man3/mallopt.3:31
1710 msgid "B<#include E<lt>malloc.hE<gt>>"
1711 msgstr "B<#include E<lt>malloc.hE<gt>>"
1712
1713 #. type: Plain text
1714 #: build/C/man3/mallinfo.3:33
1715 msgid "B<struct mallinfo mallinfo(void);>"
1716 msgstr "B<struct mallinfo mallinfo(void);>"
1717
1718 #. type: Plain text
1719 #: build/C/man3/mallinfo.3:41
1720 msgid ""
1721 "The B<mallinfo>()  function returns a copy of a structure containing "
1722 "information about memory allocations performed by B<malloc>(3)  and related "
1723 "functions.  This structure is defined as follows:"
1724 msgstr ""
1725 "B<mallinfo>() 関数は、 B<malloc>(3) や一連の関数により実行されたメモリ\n"
1726 "割り当てに関する情報を格納した構造体のコピーを返す。\n"
1727 "この構造体は以下のように定義されている。"
1728
1729 #. type: Plain text
1730 #: build/C/man3/mallinfo.3:56
1731 #, no-wrap
1732 msgid ""
1733 "struct mallinfo {\n"
1734 "    int arena;     /* Non-mmapped space allocated (bytes) */\n"
1735 "    int ordblks;   /* Number of free chunks */\n"
1736 "    int smblks;    /* Number of free fastbin blocks */\n"
1737 "    int hblks;     /* Number of mmapped regions */\n"
1738 "    int hblkhd;    /* Space allocated in mmapped regions (bytes) */\n"
1739 "    int usmblks;   /* Maximum total allocated space (bytes) */\n"
1740 "    int fsmblks;   /* Space in freed fastbin blocks (bytes) */\n"
1741 "    int uordblks;  /* Total allocated space (bytes) */\n"
1742 "    int fordblks;  /* Total free space (bytes) */\n"
1743 "    int keepcost;  /* Top-most, releasable space (bytes) */\n"
1744 "};\n"
1745 msgstr ""
1746 "struct mallinfo {\n"
1747 "    int arena;     /* Non-mmapped space allocated (bytes) */\n"
1748 "    int ordblks;   /* Number of free chunks */\n"
1749 "    int smblks;    /* Number of free fastbin blocks */\n"
1750 "    int hblks;     /* Number of mmapped regions */\n"
1751 "    int hblkhd;    /* Space allocated in mmapped regions (bytes) */\n"
1752 "    int usmblks;   /* Maximum total allocated space (bytes) */\n"
1753 "    int fsmblks;   /* Space in freed fastbin blocks (bytes) */\n"
1754 "    int uordblks;  /* Total allocated space (bytes) */\n"
1755 "    int fordblks;  /* Total free space (bytes) */\n"
1756 "    int keepcost;  /* Top-most, releasable space (bytes) */\n"
1757 "};\n"
1758
1759 #. type: Plain text
1760 #: build/C/man3/mallinfo.3:62
1761 msgid ""
1762 "The fields of the I<mallinfo> structure contain the following information:"
1763 msgstr "I<mallinfo> 構造体の各フィールドには以下の情報が格納される。"
1764
1765 #. type: TP
1766 #: build/C/man3/mallinfo.3:62
1767 #, no-wrap
1768 msgid "I<arena>"
1769 msgstr "I<arena>"
1770
1771 #. type: Plain text
1772 #: build/C/man3/mallinfo.3:68
1773 msgid ""
1774 "The total amount of memory allocated by means other than B<mmap>(2)  (i.e., "
1775 "memory allocated on the heap).  This figure includes both in-use blocks and "
1776 "blocks on the free list."
1777 msgstr ""
1778
1779 #. type: TP
1780 #: build/C/man3/mallinfo.3:68
1781 #, no-wrap
1782 msgid "I<ordblks>"
1783 msgstr "I<ordblks>"
1784
1785 #. type: Plain text
1786 #: build/C/man3/mallinfo.3:71
1787 msgid "The number of ordinary (i.e., non-fastbin) free blocks."
1788 msgstr ""
1789
1790 #. type: TP
1791 #: build/C/man3/mallinfo.3:71
1792 #, no-wrap
1793 msgid "I<smblks>"
1794 msgstr "I<smblks>"
1795
1796 #. type: Plain text
1797 #: build/C/man3/mallinfo.3:75
1798 msgid "The number of fastbin free blocks (see B<mallopt>(3))."
1799 msgstr ""
1800
1801 #. type: TP
1802 #: build/C/man3/mallinfo.3:75
1803 #, no-wrap
1804 msgid "I<hblks>"
1805 msgstr "I<hblks>"
1806
1807 #. type: Plain text
1808 #: build/C/man3/mallinfo.3:83
1809 msgid ""
1810 "The number of blocks currently allocated using B<mmap>(2).  (See the "
1811 "discussion of B<M_MMAP_THRESHOLD> in B<mallopt>(3).)"
1812 msgstr ""
1813
1814 #. type: TP
1815 #: build/C/man3/mallinfo.3:83
1816 #, no-wrap
1817 msgid "I<hblkhd>"
1818 msgstr "I<hblkhd>"
1819
1820 #. type: Plain text
1821 #: build/C/man3/mallinfo.3:87
1822 msgid "The number of bytes in blocks currently allocated using B<mmap>(2)."
1823 msgstr ""
1824
1825 #. type: TP
1826 #: build/C/man3/mallinfo.3:87
1827 #, no-wrap
1828 msgid "I<usmblks>"
1829 msgstr "I<usmblks>"
1830
1831 #. type: Plain text
1832 #: build/C/man3/mallinfo.3:92
1833 msgid ""
1834 "The \"highwater mark\" for allocated space\\(emthat is, the maximum amount "
1835 "of space that was ever allocated.  This field is maintained only in "
1836 "nonthreading environments."
1837 msgstr ""
1838
1839 #. type: TP
1840 #: build/C/man3/mallinfo.3:92
1841 #, no-wrap
1842 msgid "I<fsmblks>"
1843 msgstr "I<fsmblks>"
1844
1845 #. type: Plain text
1846 #: build/C/man3/mallinfo.3:95
1847 msgid "The total number of bytes in fastbin free blocks."
1848 msgstr ""
1849
1850 #. type: TP
1851 #: build/C/man3/mallinfo.3:95
1852 #, no-wrap
1853 msgid "I<uordblks>"
1854 msgstr "I<uordblks>"
1855
1856 #. type: Plain text
1857 #: build/C/man3/mallinfo.3:98
1858 msgid "The total number of bytes used by in-use allocations."
1859 msgstr ""
1860
1861 #. type: TP
1862 #: build/C/man3/mallinfo.3:98
1863 #, no-wrap
1864 msgid "I<fordblks>"
1865 msgstr "I<fordblks>"
1866
1867 #. type: Plain text
1868 #: build/C/man3/mallinfo.3:101
1869 msgid "The total number of bytes in free blocks."
1870 msgstr ""
1871
1872 #. type: TP
1873 #: build/C/man3/mallinfo.3:101
1874 #, no-wrap
1875 msgid "I<keepcost>"
1876 msgstr "I<keepcost>"
1877
1878 #.  .SH VERSIONS
1879 #.  Available already in glibc 2.0, possibly earlier
1880 #. type: Plain text
1881 #: build/C/man3/mallinfo.3:110
1882 msgid ""
1883 "The total amount of releasable free space at the top of the heap.  This is "
1884 "the maximum number of bytes that could ideally (i.e., ignoring page "
1885 "alignment restrictions, and so on) be released by B<malloc_trim>(3)."
1886 msgstr ""
1887
1888 #. type: Plain text
1889 #: build/C/man3/mallinfo.3:114
1890 msgid ""
1891 "This function is not specified by POSIX or the C standards.  A similar "
1892 "function exists on many System V derivatives, and was specified in the SVID."
1893 msgstr ""
1894
1895 #.  FIXME http://sourceware.org/bugzilla/show_bug.cgi?id=208
1896 #.  See the 24 Aug 2011 mail by Paul Pluzhnikov:
1897 #.      "[patch] Fix mallinfo() to accumulate results for all arenas"
1898 #.  on libc-alpha@sourceware.org
1899 #. type: Plain text
1900 #: build/C/man3/mallinfo.3:126
1901 msgid ""
1902 "B<Information is returned for only the main memory allocation area.> "
1903 "Allocations in other arenas are excluded.  See B<malloc_stats>(3)  and "
1904 "B<malloc_info>(3)  for alternatives that include information about other "
1905 "arenas."
1906 msgstr ""
1907
1908 #. type: Plain text
1909 #: build/C/man3/mallinfo.3:134
1910 msgid ""
1911 "The fields of the I<mallinfo> structure are typed as I<int>.  However, "
1912 "because some internal bookkeeping values may be of type I<long>, the "
1913 "reported values may wrap around zero and thus be inaccurate."
1914 msgstr ""
1915
1916 #. type: SH
1917 #: build/C/man3/mallinfo.3:134 build/C/man3/malloc_hook.3:89
1918 #: build/C/man3/malloc_info.3:82 build/C/man3/mallopt.3:466
1919 #: build/C/man3/mcheck.3:159 build/C/man2/mmap.2:630
1920 #: build/C/man2/mprotect.2:148 build/C/man3/mtrace.3:108
1921 #, no-wrap
1922 msgid "EXAMPLE"
1923 msgstr "例"
1924
1925 #. type: Plain text
1926 #: build/C/man3/mallinfo.3:140
1927 msgid ""
1928 "The program below employs B<mallinfo>()  to retrieve memory allocation "
1929 "statistics before and after allocating and freeing some blocks of memory.  "
1930 "The statistics are displayed on standard output."
1931 msgstr ""
1932
1933 #. type: Plain text
1934 #: build/C/man3/mallinfo.3:144
1935 msgid ""
1936 "The first two command-line arguments specify the number and size of blocks "
1937 "to be allocated with B<malloc>(3)."
1938 msgstr ""
1939
1940 #. type: Plain text
1941 #: build/C/man3/mallinfo.3:158
1942 msgid ""
1943 "The remaining three arguments specify which of the allocated blocks should "
1944 "be freed with B<free>(3).  These three arguments are optional, and specify "
1945 "(in order): the step size to be used in the loop that frees blocks (the "
1946 "default is 1, meaning free all blocks in the range); the ordinal position of "
1947 "the first block to be freed (default 0, meaning the first allocated block); "
1948 "and a number one greater than the ordinal position of the last block to be "
1949 "freed (default is one greater than the maximum block number).  If these "
1950 "three arguments are omitted, then the defaults cause all allocated blocks to "
1951 "be freed."
1952 msgstr ""
1953
1954 #. type: Plain text
1955 #: build/C/man3/mallinfo.3:162
1956 msgid ""
1957 "In the following example run of the program, 1000 allocations of 100 bytes "
1958 "are performed, and then every second allocated block is freed:"
1959 msgstr ""
1960
1961 #. type: Plain text
1962 #: build/C/man3/mallinfo.3:177
1963 #, no-wrap
1964 msgid ""
1965 "$ B<./a.out 1000 100 2>\n"
1966 "============== Before allocating blocks ==============\n"
1967 "Total non-mmapped bytes (arena):       0\n"
1968 "# of free chunks (ordblks):            1\n"
1969 "# of free fastbin blocks (smblks):     0\n"
1970 "# of mapped regions (hblks):           0\n"
1971 "Bytes in mapped regions (hblkhd):      0\n"
1972 "Max. total allocated space (usmblks):  0\n"
1973 "Free bytes held in fastbins (fsmblks): 0\n"
1974 "Total allocated space (uordblks):      0\n"
1975 "Total free space (fordblks):           0\n"
1976 "Topmost releasable block (keepcost):   0\n"
1977 msgstr ""
1978 "$ B<./a.out 1000 100 2>\n"
1979 "============== Before allocating blocks ==============\n"
1980 "Total non-mmapped bytes (arena):       0\n"
1981 "# of free chunks (ordblks):            1\n"
1982 "# of free fastbin blocks (smblks):     0\n"
1983 "# of mapped regions (hblks):           0\n"
1984 "Bytes in mapped regions (hblkhd):      0\n"
1985 "Max. total allocated space (usmblks):  0\n"
1986 "Free bytes held in fastbins (fsmblks): 0\n"
1987 "Total allocated space (uordblks):      0\n"
1988 "Total free space (fordblks):           0\n"
1989 "Topmost releasable block (keepcost):   0\n"
1990
1991 #. type: Plain text
1992 #: build/C/man3/mallinfo.3:189
1993 #, no-wrap
1994 msgid ""
1995 "============== After allocating blocks ==============\n"
1996 "Total non-mmapped bytes (arena):       135168\n"
1997 "# of free chunks (ordblks):            1\n"
1998 "# of free fastbin blocks (smblks):     0\n"
1999 "# of mapped regions (hblks):           0\n"
2000 "Bytes in mapped regions (hblkhd):      0\n"
2001 "Max. total allocated space (usmblks):  0\n"
2002 "Free bytes held in fastbins (fsmblks): 0\n"
2003 "Total allocated space (uordblks):      104000\n"
2004 "Total free space (fordblks):           31168\n"
2005 "Topmost releasable block (keepcost):   31168\n"
2006 msgstr ""
2007 "============== After allocating blocks ==============\n"
2008 "Total non-mmapped bytes (arena):       135168\n"
2009 "# of free chunks (ordblks):            1\n"
2010 "# of free fastbin blocks (smblks):     0\n"
2011 "# of mapped regions (hblks):           0\n"
2012 "Bytes in mapped regions (hblkhd):      0\n"
2013 "Max. total allocated space (usmblks):  0\n"
2014 "Free bytes held in fastbins (fsmblks): 0\n"
2015 "Total allocated space (uordblks):      104000\n"
2016 "Total free space (fordblks):           31168\n"
2017 "Topmost releasable block (keepcost):   31168\n"
2018
2019 #. type: Plain text
2020 #: build/C/man3/mallinfo.3:201
2021 #, no-wrap
2022 msgid ""
2023 "============== After freeing blocks ==============\n"
2024 "Total non-mmapped bytes (arena):       135168\n"
2025 "# of free chunks (ordblks):            501\n"
2026 "# of free fastbin blocks (smblks):     0\n"
2027 "# of mapped regions (hblks):           0\n"
2028 "Bytes in mapped regions (hblkhd):      0\n"
2029 "Max. total allocated space (usmblks):  0\n"
2030 "Free bytes held in fastbins (fsmblks): 0\n"
2031 "Total allocated space (uordblks):      52000\n"
2032 "Total free space (fordblks):           83168\n"
2033 "Topmost releasable block (keepcost):   31168\n"
2034 msgstr ""
2035 "============== After freeing blocks ==============\n"
2036 "Total non-mmapped bytes (arena):       135168\n"
2037 "# of free chunks (ordblks):            501\n"
2038 "# of free fastbin blocks (smblks):     0\n"
2039 "# of mapped regions (hblks):           0\n"
2040 "Bytes in mapped regions (hblkhd):      0\n"
2041 "Max. total allocated space (usmblks):  0\n"
2042 "Free bytes held in fastbins (fsmblks): 0\n"
2043 "Total allocated space (uordblks):      52000\n"
2044 "Total free space (fordblks):           83168\n"
2045 "Topmost releasable block (keepcost):   31168\n"
2046
2047 #. type: SS
2048 #: build/C/man3/mallinfo.3:203 build/C/man3/malloc_info.3:165
2049 #: build/C/man3/mallopt.3:532 build/C/man3/mcheck.3:176
2050 #: build/C/man2/mprotect.2:165
2051 #, no-wrap
2052 msgid "Program source"
2053 msgstr "プログラムのソース"
2054
2055 #. type: Plain text
2056 #: build/C/man3/mallinfo.3:208
2057 #, no-wrap
2058 msgid ""
2059 "#include E<lt>malloc.hE<gt>\n"
2060 "#include \"tlpi_hdr.h\"\n"
2061 msgstr ""
2062 "#include E<lt>malloc.hE<gt>\n"
2063 "#include \"tlpi_hdr.h\"\n"
2064
2065 #. type: Plain text
2066 #: build/C/man3/mallinfo.3:213
2067 #, no-wrap
2068 msgid ""
2069 "static void\n"
2070 "display_mallinfo(void)\n"
2071 "{\n"
2072 "    struct mallinfo mi;\n"
2073 msgstr ""
2074 "static void\n"
2075 "display_mallinfo(void)\n"
2076 "{\n"
2077 "    struct mallinfo mi;\n"
2078
2079 #. type: Plain text
2080 #: build/C/man3/mallinfo.3:215
2081 #, no-wrap
2082 msgid "    mi = mallinfo();\n"
2083 msgstr "    mi = mallinfo();\n"
2084
2085 #. type: Plain text
2086 #: build/C/man3/mallinfo.3:227
2087 #, no-wrap
2088 msgid ""
2089 "    printf(\"Total non-mmapped bytes (arena):       %d\\en\", mi.arena);\n"
2090 "    printf(\"# of free chunks (ordblks):            %d\\en\", mi.ordblks);\n"
2091 "    printf(\"# of free fastbin blocks (smblks):     %d\\en\", mi.smblks);\n"
2092 "    printf(\"# of mapped regions (hblks):           %d\\en\", mi.hblks);\n"
2093 "    printf(\"Bytes in mapped regions (hblkhd):      %d\\en\", mi.hblkhd);\n"
2094 "    printf(\"Max. total allocated space (usmblks):  %d\\en\", mi.usmblks);\n"
2095 "    printf(\"Free bytes held in fastbins (fsmblks): %d\\en\", mi.fsmblks);\n"
2096 "    printf(\"Total allocated space (uordblks):      %d\\en\", mi.uordblks);\n"
2097 "    printf(\"Total free space (fordblks):           %d\\en\", mi.fordblks);\n"
2098 "    printf(\"Topmost releasable block (keepcost):   %d\\en\", mi.keepcost);\n"
2099 "}\n"
2100 msgstr ""
2101 "    printf(\"Total non-mmapped bytes (arena):       %d\\en\", mi.arena);\n"
2102 "    printf(\"# of free chunks (ordblks):            %d\\en\", mi.ordblks);\n"
2103 "    printf(\"# of free fastbin blocks (smblks):     %d\\en\", mi.smblks);\n"
2104 "    printf(\"# of mapped regions (hblks):           %d\\en\", mi.hblks);\n"
2105 "    printf(\"Bytes in mapped regions (hblkhd):      %d\\en\", mi.hblkhd);\n"
2106 "    printf(\"Max. total allocated space (usmblks):  %d\\en\", mi.usmblks);\n"
2107 "    printf(\"Free bytes held in fastbins (fsmblks): %d\\en\", mi.fsmblks);\n"
2108 "    printf(\"Total allocated space (uordblks):      %d\\en\", mi.uordblks);\n"
2109 "    printf(\"Total free space (fordblks):           %d\\en\", mi.fordblks);\n"
2110 "    printf(\"Topmost releasable block (keepcost):   %d\\en\", mi.keepcost);\n"
2111 "}\n"
2112
2113 #. type: Plain text
2114 #: build/C/man3/mallinfo.3:235
2115 #, no-wrap
2116 msgid ""
2117 "int\n"
2118 "main(int argc, char *argv[])\n"
2119 "{\n"
2120 "#define MAX_ALLOCS 2000000\n"
2121 "    char *alloc[MAX_ALLOCS];\n"
2122 "    int numBlocks, j, freeBegin, freeEnd, freeStep;\n"
2123 "    size_t blockSize;\n"
2124 msgstr ""
2125 "int\n"
2126 "main(int argc, char *argv[])\n"
2127 "{\n"
2128 "#define MAX_ALLOCS 2000000\n"
2129 "    char *alloc[MAX_ALLOCS];\n"
2130 "    int numBlocks, j, freeBegin, freeEnd, freeStep;\n"
2131 "    size_t blockSize;\n"
2132
2133 #. type: Plain text
2134 #: build/C/man3/mallinfo.3:239
2135 #, no-wrap
2136 msgid ""
2137 "    if (argc E<lt> 3 || strcmp(argv[1], \"--help\") == 0)\n"
2138 "        usageErr(\"%s num-blocks block-size [free-step [start-free \"\n"
2139 "                \"[end-free]]]\\en\", argv[0]);\n"
2140 msgstr ""
2141 "    if (argc E<lt> 3 || strcmp(argv[1], \"--help\") == 0)\n"
2142 "        usageErr(\"%s num-blocks block-size [free-step [start-free \"\n"
2143 "                \"[end-free]]]\\en\", argv[0]);\n"
2144
2145 #. type: Plain text
2146 #: build/C/man3/mallinfo.3:245
2147 #, no-wrap
2148 msgid ""
2149 "    numBlocks = atoi(argv[1]);\n"
2150 "    blockSize = atoi(argv[2]);\n"
2151 "    freeStep = (argc E<gt> 3) ? atoi(argv[3]) : 1;\n"
2152 "    freeBegin = (argc E<gt> 4) ? atoi(argv[4]) : 0;\n"
2153 "    freeEnd = (argc E<gt> 5) ? atoi(argv[5]) : numBlocks;\n"
2154 msgstr ""
2155 "    numBlocks = atoi(argv[1]);\n"
2156 "    blockSize = atoi(argv[2]);\n"
2157 "    freeStep = (argc E<gt> 3) ? atoi(argv[3]) : 1;\n"
2158 "    freeBegin = (argc E<gt> 4) ? atoi(argv[4]) : 0;\n"
2159 "    freeEnd = (argc E<gt> 5) ? atoi(argv[5]) : numBlocks;\n"
2160
2161 #. type: Plain text
2162 #: build/C/man3/mallinfo.3:248
2163 #, no-wrap
2164 msgid ""
2165 "    printf(\"============== Before allocating blocks ==============\\en\");\n"
2166 "    display_mallinfo();\n"
2167 msgstr ""
2168 "    printf(\"============== Before allocating blocks ==============\\en\");\n"
2169 "    display_mallinfo();\n"
2170
2171 #. type: Plain text
2172 #: build/C/man3/mallinfo.3:252
2173 #, no-wrap
2174 msgid ""
2175 "    for (j = 0; j E<lt> numBlocks; j++) {\n"
2176 "        if (numBlocks E<gt>= MAX_ALLOCS)\n"
2177 "            fatal(\"Too many allocations\");\n"
2178 msgstr ""
2179 "    for (j = 0; j E<lt> numBlocks; j++) {\n"
2180 "        if (numBlocks E<gt>= MAX_ALLOCS)\n"
2181 "            fatal(\"Too many allocations\");\n"
2182
2183 #. type: Plain text
2184 #: build/C/man3/mallinfo.3:257
2185 #, no-wrap
2186 msgid ""
2187 "        alloc[j] = malloc(blockSize);\n"
2188 "        if (alloc[j] == NULL)\n"
2189 "            errExit(\"malloc\");\n"
2190 "    }\n"
2191 msgstr ""
2192 "        alloc[j] = malloc(blockSize);\n"
2193 "        if (alloc[j] == NULL)\n"
2194 "            errExit(\"malloc\");\n"
2195 "    }\n"
2196
2197 #. type: Plain text
2198 #: build/C/man3/mallinfo.3:260
2199 #, no-wrap
2200 msgid ""
2201 "    printf(\"\\en============== After allocating blocks ==============\\en\");\n"
2202 "    display_mallinfo();\n"
2203 msgstr ""
2204 "    printf(\"\\en============== After allocating blocks ==============\\en\");\n"
2205 "    display_mallinfo();\n"
2206
2207 #. type: Plain text
2208 #: build/C/man3/mallinfo.3:263
2209 #, no-wrap
2210 msgid ""
2211 "    for (j = freeBegin; j E<lt> freeEnd; j += freeStep)\n"
2212 "        free(alloc[j]);\n"
2213 msgstr ""
2214 "    for (j = freeBegin; j E<lt> freeEnd; j += freeStep)\n"
2215 "        free(alloc[j]);\n"
2216
2217 #. type: Plain text
2218 #: build/C/man3/mallinfo.3:266
2219 #, no-wrap
2220 msgid ""
2221 "    printf(\"\\en============== After freeing blocks ==============\\en\");\n"
2222 "    display_mallinfo();\n"
2223 msgstr ""
2224 "    printf(\"\\en============== After freeing blocks ==============\\en\");\n"
2225 "    display_mallinfo();\n"
2226
2227 #. type: Plain text
2228 #: build/C/man3/mallinfo.3:269 build/C/man3/malloc_info.3:253
2229 #: build/C/man3/mallopt.3:565 build/C/man3/mcheck.3:203
2230 #: build/C/man2/mmap.2:711
2231 #, no-wrap
2232 msgid ""
2233 "    exit(EXIT_SUCCESS);\n"
2234 "}\n"
2235 msgstr ""
2236 "    exit(EXIT_SUCCESS);\n"
2237 "}\n"
2238
2239 #. type: Plain text
2240 #: build/C/man3/mallinfo.3:279
2241 msgid ""
2242 "B<mmap>(2), B<malloc>(3), B<malloc_info>(3), B<malloc_stats>(3), "
2243 "B<malloc_trim>(3), B<mallopt>(3)"
2244 msgstr ""
2245 "B<mmap>(2), B<malloc>(3), B<malloc_info>(3), B<malloc_stats>(3), "
2246 "B<malloc_trim>(3), B<mallopt>(3)"
2247
2248 #. type: TH
2249 #: build/C/man3/malloc_get_state.3:25
2250 #, no-wrap
2251 msgid "MALLOC_GET_STATE"
2252 msgstr "MALLOC_GET_STATE"
2253
2254 #. type: TH
2255 #: build/C/man3/malloc_get_state.3:25
2256 #, no-wrap
2257 msgid "2012-05-04"
2258 msgstr "2012-05-04"
2259
2260 #. type: Plain text
2261 #: build/C/man3/malloc_get_state.3:28
2262 msgid ""
2263 "malloc_get_state, malloc_set_state - record and restore state of malloc "
2264 "implementation"
2265 msgstr ""
2266
2267 #. type: Plain text
2268 #: build/C/man3/malloc_get_state.3:31 build/C/man3/posix_memalign.3:35
2269 #, no-wrap
2270 msgid "B<#include E<lt>stdlib.hE<gt>>\n"
2271 msgstr "B<#include E<lt>stdlib.hE<gt>>\n"
2272
2273 #. type: Plain text
2274 #: build/C/man3/malloc_get_state.3:33
2275 #, no-wrap
2276 msgid "B<void* malloc_get_state(void);>\n"
2277 msgstr "B<void* malloc_get_state(void);>\n"
2278
2279 #. type: Plain text
2280 #: build/C/man3/malloc_get_state.3:35
2281 #, no-wrap
2282 msgid "B<int malloc_set_state(void *>I<state>B<);>\n"
2283 msgstr "B<int malloc_set_state(void *>I<state>B<);>\n"
2284
2285 #. type: Plain text
2286 #: build/C/man3/malloc_get_state.3:53
2287 msgid ""
2288 "The B<malloc_get_state>()  function records the current state of all "
2289 "B<malloc>(3)  internal bookkeeping variables (but not the actual contents of "
2290 "the heap or the state of B<malloc_hook>(3)  functions pointers).  The state "
2291 "is recorded in a system-dependent opaque data structure dynamically "
2292 "allocated via B<malloc>(3), and a pointer to that data structure is returned "
2293 "as the function result.  (It is the caller's responsibility to B<free>(3)  "
2294 "this memory.)"
2295 msgstr ""
2296
2297 #. type: Plain text
2298 #: build/C/man3/malloc_get_state.3:61
2299 msgid ""
2300 "The B<malloc_set_state>()  function restores the state of all B<malloc>(3)  "
2301 "internal bookkeeping variables to the values recorded in the opaque data "
2302 "structure pointed to by I<state>."
2303 msgstr ""
2304
2305 #. type: Plain text
2306 #: build/C/man3/malloc_get_state.3:68
2307 msgid ""
2308 "On success, B<malloc_get_state>()  returns a pointer to a newly allocated "
2309 "opaque data structure.  On error (for example, memory could not be allocated "
2310 "for the data structure), B<malloc_get_state>()  returns NULL."
2311 msgstr ""
2312
2313 #.  if(ms->magic != MALLOC_STATE_MAGIC) return -1;
2314 #.  /* Must fail if the major version is too high. */
2315 #.  if((ms->version & ~0xffl) > (MALLOC_STATE_VERSION & ~0xffl)) return -2;
2316 #. type: Plain text
2317 #: build/C/man3/malloc_get_state.3:86
2318 msgid ""
2319 "On success, B<malloc_set_state>()  returns 0.  If the implementation detects "
2320 "that I<state> does not point to a correctly formed data structure, "
2321 "B<malloc_set_state>()  returns -1.  If the implementation detects that the "
2322 "version of the data structure referred to by I<state> is a more recent "
2323 "version than this implementation knows about, B<malloc_set_state>()  returns "
2324 "-2."
2325 msgstr ""
2326
2327 #. type: Plain text
2328 #: build/C/man3/malloc_get_state.3:88 build/C/man3/malloc_hook.3:82
2329 #: build/C/man3/mcheck.3:147 build/C/man3/mtrace.3:80
2330 msgid "These functions are GNU extensions."
2331 msgstr "これらの関数は GNU による拡張である。"
2332
2333 #. type: Plain text
2334 #: build/C/man3/malloc_get_state.3:94
2335 msgid ""
2336 "These functions are especially useful when using this B<malloc>(3)  "
2337 "implementation as part of a shared library, and the heap contents are saved/"
2338 "restored via some other method.  This technique is used by the GNU Emacs to "
2339 "implement its \"dumping\" function."
2340 msgstr ""
2341
2342 #.  i.e., calls __malloc_check_init()
2343 #.  i.e., malloc checking is not already in use
2344 #.  and the caller requested malloc checking
2345 #. type: Plain text
2346 #: build/C/man3/malloc_get_state.3:111
2347 msgid ""
2348 "Hook function pointers are never saved or restored by these functions, with "
2349 "two exceptions: if malloc checking (see B<mallopt>(3))  was in use when "
2350 "B<malloc_get_state>()  was called, then B<malloc_set_state>()  resets malloc "
2351 "checking hooks if possible; if malloc checking was not in use in the "
2352 "recorded state, but the caller has requested malloc checking, then the hooks "
2353 "are reset to 0."
2354 msgstr ""
2355
2356 #. type: Plain text
2357 #: build/C/man3/malloc_get_state.3:114
2358 msgid "B<malloc>(3), B<mallopt>(3)"
2359 msgstr "B<malloc>(3), B<mallopt>(3)"
2360
2361 #. type: TH
2362 #: build/C/man3/malloc_hook.3:10
2363 #, no-wrap
2364 msgid "MALLOC_HOOK"
2365 msgstr "MALLOC_HOOK"
2366
2367 #. type: TH
2368 #: build/C/man3/malloc_hook.3:10
2369 #, no-wrap
2370 msgid "2010-10-13"
2371 msgstr "2010-10-13"
2372
2373 #. type: Plain text
2374 #: build/C/man3/malloc_hook.3:15
2375 msgid ""
2376 "__malloc_hook, __malloc_initialize_hook, __memalign_hook, __free_hook, "
2377 "__realloc_hook, __after_morecore_hook - malloc debugging variables"
2378 msgstr ""
2379 "__malloc_hook, __malloc_initialize_hook, __memalign_hook, __free_hook, "
2380 "__realloc_hook, __after_morecore_hook - malloc デバッグ用の変数"
2381
2382 #. type: Plain text
2383 #: build/C/man3/malloc_hook.3:18 build/C/man3/malloc_info.3:31
2384 #: build/C/man3/posix_memalign.3:41
2385 #, no-wrap
2386 msgid "B<#include E<lt>malloc.hE<gt>>\n"
2387 msgstr "B<#include E<lt>malloc.hE<gt>>\n"
2388
2389 #. type: Plain text
2390 #: build/C/man3/malloc_hook.3:20
2391 #, no-wrap
2392 msgid "B<void *(*__malloc_hook)(size_t >I<size>B<, const void *>I<caller>B<);>\n"
2393 msgstr "B<void *(*__malloc_hook)(size_t >I<size>B<, const void *>I<caller>B<);>\n"
2394
2395 #. type: Plain text
2396 #: build/C/man3/malloc_hook.3:23
2397 #, no-wrap
2398 msgid "B<void *(*__realloc_hook)(void *>I<ptr>B<, size_t >I<size>B<, const void *>I<caller>B<);>\n"
2399 msgstr "B<void *(*__realloc_hook)(void *>I<ptr>B<, size_t >I<size>B<, const void *>I<caller>B<);>\n"
2400
2401 #. type: Plain text
2402 #: build/C/man3/malloc_hook.3:26
2403 #, no-wrap
2404 msgid ""
2405 "B<void *(*__memalign_hook)(size_t >I<alignment>B<, size_t >I<size>B<,>\n"
2406 "B<                         const void *>I<caller>B<);>\n"
2407 msgstr ""
2408 "B<void *(*__memalign_hook)(size_t >I<alignment>B<, size_t >I<size>B<,>\n"
2409 "B<                         const void *>I<caller>B<);>\n"
2410
2411 #. type: Plain text
2412 #: build/C/man3/malloc_hook.3:28
2413 #, no-wrap
2414 msgid "B<void (*__free_hook)(void *>I<ptr>B<, const void *>I<caller>B<);>\n"
2415 msgstr "B<void (*__free_hook)(void *>I<ptr>B<, const void *>I<caller>B<);>\n"
2416
2417 #. type: Plain text
2418 #: build/C/man3/malloc_hook.3:30
2419 #, no-wrap
2420 msgid "B<void (*__malloc_initialize_hook)(void);>\n"
2421 msgstr "B<void (*__malloc_initialize_hook)(void);>\n"
2422
2423 #. type: Plain text
2424 #: build/C/man3/malloc_hook.3:32
2425 #, no-wrap
2426 msgid "B<void (*__after_morecore_hook)(void);>\n"
2427 msgstr "B<void (*__after_morecore_hook)(void);>\n"
2428
2429 #. type: Plain text
2430 #: build/C/man3/malloc_hook.3:43
2431 msgid ""
2432 "The GNU C library lets you modify the behavior of B<malloc>(3), B<realloc>"
2433 "(3), and B<free>(3)  by specifying appropriate hook functions.  You can use "
2434 "these hooks to help you debug programs that use dynamic memory allocation, "
2435 "for example."
2436 msgstr ""
2437 "GNU C ライブラリでは、適切なフック関数 (hook function) を指定することで "
2438 "B<malloc>(3), B<realloc>(3), B<free>(3)  の動作を変更することができる。例え"
2439 "ば、動的にメモリ割り当てを行う プログラムのデバッグにこれらのフックを使うこと"
2440 "ができる。"
2441
2442 #. type: Plain text
2443 #: build/C/man3/malloc_hook.3:50
2444 msgid ""
2445 "The variable B<__malloc_initialize_hook> points at a function that is called "
2446 "once when the malloc implementation is initialized.  This is a weak "
2447 "variable, so it can be overridden in the application with a definition like "
2448 "the following:"
2449 msgstr ""
2450 "変数 B<__malloc_initialize_hook> は malloc の実装が初期化される際に一度だけ呼"
2451 "ばれる関数へのポインタである。 この変数は書き換え可能 (weak) であり、アプリ"
2452 "ケーション内で 以下のような定義で上書きできる:"
2453
2454 #. type: Plain text
2455 #: build/C/man3/malloc_hook.3:53
2456 #, no-wrap
2457 msgid "    void (*__malloc_initialize_hook)(void) = my_init_hook;\n"
2458 msgstr "    void (*__malloc_initialize_hook)(void) = my_init_hook;\n"
2459
2460 #. type: Plain text
2461 #: build/C/man3/malloc_hook.3:58
2462 msgid ""
2463 "Now the function I<my_init_hook>()  can do the initialization of all hooks."
2464 msgstr ""
2465 "なお、関数 I<my_init_hook>()  で全てのフックの初期化をすることができる。"
2466
2467 #. type: Plain text
2468 #: build/C/man3/malloc_hook.3:74
2469 msgid ""
2470 "The four functions pointed to by B<__malloc_hook>, B<__realloc_hook>, "
2471 "B<__memalign_hook>, B<__free_hook> have a prototype like the functions "
2472 "B<malloc>(3), B<realloc>(3), B<memalign>(3), B<free>(3), respectively, "
2473 "except that they have a final argument I<caller> that gives the address of "
2474 "the caller of B<malloc>(3), etc."
2475 msgstr ""
2476 "B<__malloc_hook>, B<__realloc_hook>, B<__memalign_hook>, B<__free_hook> で指"
2477 "される 4 つの関数は、各々 B<malloc>(3), B<realloc>(3), B<memalign>(3), "
2478 "B<free>(3)  とよく似たプロトタイプを持っているが、 一番最後の引き数 "
2479 "I<caller> をとる点が異なる。 引き数 I<caller> には、 B<malloc>(3)  などの呼び"
2480 "出し元 (caller) のアドレスが格納される。"
2481
2482 #. type: Plain text
2483 #: build/C/man3/malloc_hook.3:80
2484 msgid ""
2485 "The variable B<__after_morecore_hook> points at a function that is called "
2486 "each time after B<sbrk>(2)  was asked for more memory."
2487 msgstr ""
2488 "変数 B<__after_morecore_hook> は、領域の追加要求があり B<sbrk>(2)  が呼ばれた"
2489 "後で毎回呼び出される関数へのポインタである。"
2490
2491 #.  https://bugzilla.redhat.com/show_bug.cgi?id=450187
2492 #.  http://sourceware.org/bugzilla/show_bug.cgi?id=9957
2493 #. type: Plain text
2494 #: build/C/man3/malloc_hook.3:89
2495 msgid ""
2496 "The use of these hook functions is not safe in multithreaded programs, and "
2497 "they are now deprecated.  Programmers should instead preempt calls to the "
2498 "relevant functions by defining and exporting functions such as \"malloc\" "
2499 "and \"free\"."
2500 msgstr ""
2501
2502 #. type: Plain text
2503 #: build/C/man3/malloc_hook.3:91
2504 msgid "Here is a short example of how to use these variables."
2505 msgstr "これらの変数の使い方の簡単な例を以下に示す。"
2506
2507 #. type: Plain text
2508 #: build/C/man3/malloc_hook.3:95
2509 #, no-wrap
2510 msgid ""
2511 "#include E<lt>stdio.hE<gt>\n"
2512 "#include E<lt>malloc.hE<gt>\n"
2513 msgstr ""
2514 "#include E<lt>stdio.hE<gt>\n"
2515 "#include E<lt>malloc.hE<gt>\n"
2516
2517 #. type: Plain text
2518 #: build/C/man3/malloc_hook.3:99
2519 #, no-wrap
2520 msgid ""
2521 "/* Prototypes for our hooks.  */\n"
2522 "static void my_init_hook(void);\n"
2523 "static void *my_malloc_hook(size_t, const void *);\n"
2524 msgstr ""
2525 "/* 使おうとするフックのプロトタイプ宣言 */\n"
2526 "static void my_init_hook(void);\n"
2527 "static void *my_malloc_hook(size_t, const void *);\n"
2528
2529 #. type: Plain text
2530 #: build/C/man3/malloc_hook.3:102
2531 #, no-wrap
2532 msgid ""
2533 "/* Variables to save original hooks. */\n"
2534 "static void *(*old_malloc_hook)(size_t, const void *);\n"
2535 msgstr ""
2536 "/* 元々のフックを保存するための変数 */\n"
2537 "static void *(*old_malloc_hook)(size_t, const void *);\n"
2538
2539 #. type: Plain text
2540 #: build/C/man3/malloc_hook.3:105
2541 #, no-wrap
2542 msgid ""
2543 "/* Override initializing hook from the C library. */\n"
2544 "void (*__malloc_initialize_hook) (void) = my_init_hook;\n"
2545 msgstr ""
2546 "/* C ライブラリから呼ばれる初期化フックを上書きする */\n"
2547 "void (*__malloc_initialize_hook) (void) = my_init_hook;\n"
2548
2549 #. type: Plain text
2550 #: build/C/man3/malloc_hook.3:112
2551 #, no-wrap
2552 msgid ""
2553 "static void\n"
2554 "my_init_hook(void)\n"
2555 "{\n"
2556 "    old_malloc_hook = __malloc_hook;\n"
2557 "    __malloc_hook = my_malloc_hook;\n"
2558 "}\n"
2559 msgstr ""
2560 "static void\n"
2561 "my_init_hook(void)\n"
2562 "{\n"
2563 "    old_malloc_hook = __malloc_hook;\n"
2564 "    __malloc_hook = my_malloc_hook;\n"
2565 "}\n"
2566
2567 #. type: Plain text
2568 #: build/C/man3/malloc_hook.3:117
2569 #, no-wrap
2570 msgid ""
2571 "static void *\n"
2572 "my_malloc_hook(size_t size, const void *caller)\n"
2573 "{\n"
2574 "    void *result;\n"
2575 msgstr ""
2576 "static void *\n"
2577 "my_malloc_hook(size_t size, const void *caller)\n"
2578 "{\n"
2579 "    void *result;\n"
2580
2581 #. type: Plain text
2582 #: build/C/man3/malloc_hook.3:120
2583 #, no-wrap
2584 msgid ""
2585 "    /* Restore all old hooks */\n"
2586 "    __malloc_hook = old_malloc_hook;\n"
2587 msgstr ""
2588 "    /* 元々のフックを全て戻す */\n"
2589 "    __malloc_hook = old_malloc_hook;\n"
2590
2591 #. type: Plain text
2592 #: build/C/man3/malloc_hook.3:123
2593 #, no-wrap
2594 msgid ""
2595 "    /* Call recursively */\n"
2596 "    result = malloc(size);\n"
2597 msgstr ""
2598 "    /* malloc の再帰的呼び出し */\n"
2599 "    result = malloc(size);\n"
2600
2601 #. type: Plain text
2602 #: build/C/man3/malloc_hook.3:126
2603 #, no-wrap
2604 msgid ""
2605 "    /* Save underlying hooks */\n"
2606 "    old_malloc_hook = __malloc_hook;\n"
2607 msgstr ""
2608 "    /* 現在設定されているフック (underlying hook) を保存する */\n"
2609 "    old_malloc_hook = __malloc_hook;\n"
2610
2611 #. type: Plain text
2612 #: build/C/man3/malloc_hook.3:130
2613 #, no-wrap
2614 msgid ""
2615 "    /* printf() might call malloc(), so protect it too. */\n"
2616 "    printf(\"malloc(%u) called from %p returns %p\\en\",\n"
2617 "            (unsigned int) size, caller, result);\n"
2618 msgstr ""
2619 "    /* printf() は malloc() を呼び出す可能性があるので\n"
2620 "        ここでもガードを行う (元々のフックのままにしておく) */\n"
2621 "    printf(\"malloc(%u) called from %p returns %p\\en\",\n"
2622 "            (unsigned int) size, caller, result);\n"
2623
2624 #. type: Plain text
2625 #: build/C/man3/malloc_hook.3:133
2626 #, no-wrap
2627 msgid ""
2628 "    /* Restore our own hooks */\n"
2629 "    __malloc_hook = my_malloc_hook;\n"
2630 msgstr ""
2631 "    /* ユーザが使おうとするフックを再設定する */\n"
2632 "    __malloc_hook = my_malloc_hook;\n"
2633
2634 #. type: Plain text
2635 #: build/C/man3/malloc_hook.3:136
2636 #, no-wrap
2637 msgid ""
2638 "    return result;\n"
2639 "}\n"
2640 msgstr ""
2641 "    return result;\n"
2642 "}\n"
2643
2644 #. type: Plain text
2645 #: build/C/man3/malloc_hook.3:142
2646 msgid "B<mallinfo>(3), B<malloc>(3), B<mcheck>(3), B<mtrace>(3)"
2647 msgstr "B<mallinfo>(3), B<malloc>(3), B<mcheck>(3), B<mtrace>(3)"
2648
2649 #. type: TH
2650 #: build/C/man3/malloc_info.3:25
2651 #, no-wrap
2652 msgid "MALLOC_INFO"
2653 msgstr "MALLOC_INFO"
2654
2655 #. type: Plain text
2656 #: build/C/man3/malloc_info.3:28
2657 msgid "malloc_info - export malloc state to a stream"
2658 msgstr ""
2659
2660 #. type: Plain text
2661 #: build/C/man3/malloc_info.3:33
2662 #, no-wrap
2663 msgid "B<int malloc_info(int >I<options>B<, FILE *>I<fp>B<);>\n"
2664 msgstr "B<int malloc_info(int >I<options>B<, FILE *>I<fp>B<);>\n"
2665
2666 #. type: Plain text
2667 #: build/C/man3/malloc_info.3:44
2668 msgid ""
2669 "The B<malloc_info>()  function exports an XML string that describes the "
2670 "current state of the memory-allocation implementation in the caller.  The "
2671 "string is printed on the file stream I<fp>.  The exported string includes "
2672 "information about all arenas (see B<malloc>(3))."
2673 msgstr ""
2674
2675 #. type: Plain text
2676 #: build/C/man3/malloc_info.3:48
2677 msgid "As currently implemented, I<options> must be zero."
2678 msgstr ""
2679
2680 #. type: Plain text
2681 #: build/C/man3/malloc_info.3:53
2682 msgid "On success, B<malloc_info>()  returns 0; on error, it returns -1."
2683 msgstr "B<malloc_info>() は成功すると 0 を返す。エラーの場合は -1 を返す。"
2684
2685 #. type: Plain text
2686 #: build/C/man3/malloc_info.3:58
2687 msgid "I<options> was nonzero."
2688 msgstr ""
2689
2690 #. type: Plain text
2691 #: build/C/man3/malloc_info.3:61
2692 msgid "B<malloc_info>()  was added to glibc in version 2.10."
2693 msgstr "B<malloc_info>() は glibc バージョン 2.10 で追加された。"
2694
2695 #. type: Plain text
2696 #: build/C/man3/malloc_info.3:63 build/C/man3/malloc_stats.3:57
2697 #: build/C/man3/malloc_trim.3:62 build/C/man3/malloc_usable_size.3:50
2698 msgid "This function is a GNU extension."
2699 msgstr "この関数は GNU による拡張である。"
2700
2701 #. type: Plain text
2702 #: build/C/man3/malloc_info.3:69
2703 msgid ""
2704 "The memory-allocation information is provided as an XML string (rather than "
2705 "a C structure)  because the information may change over time (according to "
2706 "changes in the underlying implementation).  The output XML string includes a "
2707 "version field."
2708 msgstr ""
2709
2710 #. type: Plain text
2711 #: build/C/man3/malloc_info.3:75
2712 msgid ""
2713 "The B<open_memstream>(3)  function can be used to send the output of "
2714 "B<malloc_info>()  directly into a buffer in memory, rather than to a file."
2715 msgstr ""
2716
2717 #. type: Plain text
2718 #: build/C/man3/malloc_info.3:82
2719 msgid ""
2720 "The B<malloc_info>()  function is designed to address deficiencies in "
2721 "B<malloc_stats>(3)  and B<mallinfo>(3)."
2722 msgstr ""
2723
2724 #. type: Plain text
2725 #: build/C/man3/malloc_info.3:93
2726 msgid ""
2727 "The program below takes up to four command-line arguments, of which the "
2728 "first three are mandatory.  The first argument specifies the number of "
2729 "threads that the program should create.  All of the threads, including the "
2730 "main thread, allocate the number of blocks of memory specified by the second "
2731 "argument.  The third argument controls the size of the blocks to be "
2732 "allocated.  The main thread creates blocks of this size, the second thread "
2733 "created by the program allocates blocks of twice this size, the third thread "
2734 "allocates blocks of three times this size, and so on."
2735 msgstr ""
2736
2737 #. type: Plain text
2738 #: build/C/man3/malloc_info.3:100
2739 msgid ""
2740 "The program calls B<malloc_info>()  twice to display the memory-allocation "
2741 "state.  The first call takes place before any threads are created or memory "
2742 "allocated.  The second call is performed after all threads have allocated "
2743 "memory."
2744 msgstr ""
2745
2746 #. type: Plain text
2747 #: build/C/man3/malloc_info.3:108
2748 msgid ""
2749 "In the following example, the command-line arguments specify the creation of "
2750 "one additional thread, and both the main thread and the additional thread "
2751 "allocate 10000 blocks of memory.  After the blocks of memory have been "
2752 "allocated, B<malloc_info>()  shows the state of two allocation arenas."
2753 msgstr ""
2754
2755 #. type: Plain text
2756 #: build/C/man3/malloc_info.3:133
2757 #, no-wrap
2758 msgid ""
2759 "$ B<getconf GNU_LIBC_VERSION>\n"
2760 "glibc 2.13\n"
2761 "$ B<./a.out 1 10000 100>\n"
2762 "============ Before allocating blocks ============\n"
2763 "E<lt>malloc version=\"1\"E<gt>\n"
2764 "E<lt>heap nr=\"0\"E<gt>\n"
2765 "E<lt>sizesE<gt>\n"
2766 "E<lt>/sizesE<gt>\n"
2767 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
2768 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
2769 "E<lt>system type=\"current\" size=\"135168\"/E<gt>\n"
2770 "E<lt>system type=\"max\" size=\"135168\"/E<gt>\n"
2771 "E<lt>aspace type=\"total\" size=\"135168\"/E<gt>\n"
2772 "E<lt>aspace type=\"mprotect\" size=\"135168\"/E<gt>\n"
2773 "E<lt>/heapE<gt>\n"
2774 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
2775 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
2776 "E<lt>system type=\"current\" size=\"135168\"/E<gt>\n"
2777 "E<lt>system type=\"max\" size=\"135168\"/E<gt>\n"
2778 "E<lt>aspace type=\"total\" size=\"135168\"/E<gt>\n"
2779 "E<lt>aspace type=\"mprotect\" size=\"135168\"/E<gt>\n"
2780 "E<lt>/mallocE<gt>\n"
2781 msgstr ""
2782 "$ B<getconf GNU_LIBC_VERSION>\n"
2783 "glibc 2.13\n"
2784 "$ B<./a.out 1 10000 100>\n"
2785 "============ Before allocating blocks ============\n"
2786 "E<lt>malloc version=\"1\"E<gt>\n"
2787 "E<lt>heap nr=\"0\"E<gt>\n"
2788 "E<lt>sizesE<gt>\n"
2789 "E<lt>/sizesE<gt>\n"
2790 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
2791 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
2792 "E<lt>system type=\"current\" size=\"135168\"/E<gt>\n"
2793 "E<lt>system type=\"max\" size=\"135168\"/E<gt>\n"
2794 "E<lt>aspace type=\"total\" size=\"135168\"/E<gt>\n"
2795 "E<lt>aspace type=\"mprotect\" size=\"135168\"/E<gt>\n"
2796 "E<lt>/heapE<gt>\n"
2797 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
2798 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
2799 "E<lt>system type=\"current\" size=\"135168\"/E<gt>\n"
2800 "E<lt>system type=\"max\" size=\"135168\"/E<gt>\n"
2801 "E<lt>aspace type=\"total\" size=\"135168\"/E<gt>\n"
2802 "E<lt>aspace type=\"mprotect\" size=\"135168\"/E<gt>\n"
2803 "E<lt>/mallocE<gt>\n"
2804
2805 #. type: Plain text
2806 #: build/C/man3/malloc_info.3:163
2807 #, no-wrap
2808 msgid ""
2809 "============ After allocating blocks ============\n"
2810 "E<lt>malloc version=\"1\"E<gt>\n"
2811 "E<lt>heap nr=\"0\"E<gt>\n"
2812 "E<lt>sizesE<gt>\n"
2813 "E<lt>/sizesE<gt>\n"
2814 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
2815 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
2816 "E<lt>system type=\"current\" size=\"1081344\"/E<gt>\n"
2817 "E<lt>system type=\"max\" size=\"1081344\"/E<gt>\n"
2818 "E<lt>aspace type=\"total\" size=\"1081344\"/E<gt>\n"
2819 "E<lt>aspace type=\"mprotect\" size=\"1081344\"/E<gt>\n"
2820 "E<lt>/heapE<gt>\n"
2821 "E<lt>heap nr=\"1\"E<gt>\n"
2822 "E<lt>sizesE<gt>\n"
2823 "E<lt>/sizesE<gt>\n"
2824 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
2825 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
2826 "E<lt>system type=\"current\" size=\"1032192\"/E<gt>\n"
2827 "E<lt>system type=\"max\" size=\"1032192\"/E<gt>\n"
2828 "E<lt>aspace type=\"total\" size=\"1032192\"/E<gt>\n"
2829 "E<lt>aspace type=\"mprotect\" size=\"1032192\"/E<gt>\n"
2830 "E<lt>/heapE<gt>\n"
2831 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
2832 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
2833 "E<lt>system type=\"current\" size=\"2113536\"/E<gt>\n"
2834 "E<lt>system type=\"max\" size=\"2113536\"/E<gt>\n"
2835 "E<lt>aspace type=\"total\" size=\"2113536\"/E<gt>\n"
2836 "E<lt>aspace type=\"mprotect\" size=\"2113536\"/E<gt>\n"
2837 "E<lt>/mallocE<gt>\n"
2838 msgstr ""
2839 "============ After allocating blocks ============\n"
2840 "E<lt>malloc version=\"1\"E<gt>\n"
2841 "E<lt>heap nr=\"0\"E<gt>\n"
2842 "E<lt>sizesE<gt>\n"
2843 "E<lt>/sizesE<gt>\n"
2844 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
2845 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
2846 "E<lt>system type=\"current\" size=\"1081344\"/E<gt>\n"
2847 "E<lt>system type=\"max\" size=\"1081344\"/E<gt>\n"
2848 "E<lt>aspace type=\"total\" size=\"1081344\"/E<gt>\n"
2849 "E<lt>aspace type=\"mprotect\" size=\"1081344\"/E<gt>\n"
2850 "E<lt>/heapE<gt>\n"
2851 "E<lt>heap nr=\"1\"E<gt>\n"
2852 "E<lt>sizesE<gt>\n"
2853 "E<lt>/sizesE<gt>\n"
2854 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
2855 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
2856 "E<lt>system type=\"current\" size=\"1032192\"/E<gt>\n"
2857 "E<lt>system type=\"max\" size=\"1032192\"/E<gt>\n"
2858 "E<lt>aspace type=\"total\" size=\"1032192\"/E<gt>\n"
2859 "E<lt>aspace type=\"mprotect\" size=\"1032192\"/E<gt>\n"
2860 "E<lt>/heapE<gt>\n"
2861 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
2862 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
2863 "E<lt>system type=\"current\" size=\"2113536\"/E<gt>\n"
2864 "E<lt>system type=\"max\" size=\"2113536\"/E<gt>\n"
2865 "E<lt>aspace type=\"total\" size=\"2113536\"/E<gt>\n"
2866 "E<lt>aspace type=\"mprotect\" size=\"2113536\"/E<gt>\n"
2867 "E<lt>/mallocE<gt>\n"
2868
2869 #. type: Plain text
2870 #: build/C/man3/malloc_info.3:173
2871 #, no-wrap
2872 msgid ""
2873 "#include E<lt>unistd.hE<gt>\n"
2874 "#include E<lt>stdlib.hE<gt>\n"
2875 "#include E<lt>pthread.hE<gt>\n"
2876 "#include E<lt>malloc.hE<gt>\n"
2877 "#include E<lt>errno.hE<gt>\n"
2878 msgstr ""
2879 "#include E<lt>unistd.hE<gt>\n"
2880 "#include E<lt>stdlib.hE<gt>\n"
2881 "#include E<lt>pthread.hE<gt>\n"
2882 "#include E<lt>malloc.hE<gt>\n"
2883 "#include E<lt>errno.hE<gt>\n"
2884
2885 #. type: Plain text
2886 #: build/C/man3/malloc_info.3:176
2887 #, no-wrap
2888 msgid ""
2889 "static size_t blockSize;\n"
2890 "static int numThreads, numBlocks;\n"
2891 msgstr ""
2892 "static size_t blockSize;\n"
2893 "static int numThreads, numBlocks;\n"
2894
2895 #. type: Plain text
2896 #: build/C/man3/malloc_info.3:179
2897 #, no-wrap
2898 msgid ""
2899 "#define errExit(msg)    do { perror(msg); exit(EXIT_FAILURE); \\e\n"
2900 "                        } while (0)\n"
2901 msgstr ""
2902 "#define errExit(msg)    do { perror(msg); exit(EXIT_FAILURE); \\e\n"
2903 "                        } while (0)\n"
2904
2905 #. type: Plain text
2906 #: build/C/man3/malloc_info.3:185
2907 #, no-wrap
2908 msgid ""
2909 "static void *\n"
2910 "thread_func(void *arg)\n"
2911 "{\n"
2912 "    int j;\n"
2913 "    int tn = (int) arg;\n"
2914 msgstr ""
2915 "static void *\n"
2916 "thread_func(void *arg)\n"
2917 "{\n"
2918 "    int j;\n"
2919 "    int tn = (int) arg;\n"
2920
2921 #. type: Plain text
2922 #: build/C/man3/malloc_info.3:188
2923 #, no-wrap
2924 msgid ""
2925 "    /* The multiplier \\(aq(2 + tn)\\(aq ensures that each thread (including\n"
2926 "       the main thread) allocates a different amount of memory */\n"
2927 msgstr ""
2928 "    /* The multiplier \\(aq(2 + tn)\\(aq ensures that each thread (including\n"
2929 "       the main thread) allocates a different amount of memory */\n"
2930
2931 #. type: Plain text
2932 #: build/C/man3/malloc_info.3:192
2933 #, no-wrap
2934 msgid ""
2935 "    for (j = 0; j E<lt> numBlocks; j++)\n"
2936 "        if (malloc(blockSize * (2 + tn)) == NULL)\n"
2937 "            errExit(\"malloc-thread\");\n"
2938 msgstr ""
2939 "    for (j = 0; j E<lt> numBlocks; j++)\n"
2940 "        if (malloc(blockSize * (2 + tn)) == NULL)\n"
2941 "            errExit(\"malloc-thread\");\n"
2942
2943 #. type: Plain text
2944 #: build/C/man3/malloc_info.3:196
2945 #, no-wrap
2946 msgid ""
2947 "    sleep(100);         /* Sleep until main thread terminates */\n"
2948 "    return NULL;\n"
2949 "}\n"
2950 msgstr ""
2951 "    sleep(100);         /* Sleep until main thread terminates */\n"
2952 "    return NULL;\n"
2953 "}\n"
2954
2955 #. type: Plain text
2956 #: build/C/man3/malloc_info.3:202
2957 #, no-wrap
2958 msgid ""
2959 "int\n"
2960 "main(int argc, char *argv[])\n"
2961 "{\n"
2962 "    int j, tn, sleepTime;\n"
2963 "    pthread_t *thr;\n"
2964 msgstr ""
2965 "int\n"
2966 "main(int argc, char *argv[])\n"
2967 "{\n"
2968 "    int j, tn, sleepTime;\n"
2969 "    pthread_t *thr;\n"
2970
2971 #. type: Plain text
2972 #: build/C/man3/malloc_info.3:209
2973 #, no-wrap
2974 msgid ""
2975 "    if (argc E<lt> 4) {\n"
2976 "        fprintf(stderr,\n"
2977 "                \"%s num-threads num-blocks block-size [sleep-time]\\en\",\n"
2978 "                argv[0]);\n"
2979 "        exit(EXIT_FAILURE);\n"
2980 "    }\n"
2981 msgstr ""
2982 "    if (argc E<lt> 4) {\n"
2983 "        fprintf(stderr,\n"
2984 "                \"%s num-threads num-blocks block-size [sleep-time]\\en\",\n"
2985 "                argv[0]);\n"
2986 "        exit(EXIT_FAILURE);\n"
2987 "    }\n"
2988
2989 #. type: Plain text
2990 #: build/C/man3/malloc_info.3:214
2991 #, no-wrap
2992 msgid ""
2993 "    numThreads = atoi(argv[1]);\n"
2994 "    numBlocks = atoi(argv[2]);\n"
2995 "    blockSize = atoi(argv[3]);\n"
2996 "    sleepTime = (argc E<gt> 4) ? atoi(argv[4]) : 0;\n"
2997 msgstr ""
2998 "    numThreads = atoi(argv[1]);\n"
2999 "    numBlocks = atoi(argv[2]);\n"
3000 "    blockSize = atoi(argv[3]);\n"
3001 "    sleepTime = (argc E<gt> 4) ? atoi(argv[4]) : 0;\n"
3002
3003 #. type: Plain text
3004 #: build/C/man3/malloc_info.3:218
3005 #, no-wrap
3006 msgid ""
3007 "    thr = calloc(numThreads, sizeof(pthread_t));\n"
3008 "    if (thr == NULL)\n"
3009 "        errExit(\"calloc\");\n"
3010 msgstr ""
3011 "    thr = calloc(numThreads, sizeof(pthread_t));\n"
3012 "    if (thr == NULL)\n"
3013 "        errExit(\"calloc\");\n"
3014
3015 #. type: Plain text
3016 #: build/C/man3/malloc_info.3:221
3017 #, no-wrap
3018 msgid ""
3019 "    printf(\"============ Before allocating blocks ============\\en\");\n"
3020 "    malloc_info(0, stdout);\n"
3021 msgstr ""
3022 "    printf(\"============ Before allocating blocks ============\\en\");\n"
3023 "    malloc_info(0, stdout);\n"
3024
3025 #. type: Plain text
3026 #: build/C/man3/malloc_info.3:223
3027 #, no-wrap
3028 msgid "    /* Create threads that allocate different amounts of memory */\n"
3029 msgstr "    /* Create threads that allocate different amounts of memory */\n"
3030
3031 #. type: Plain text
3032 #: build/C/man3/malloc_info.3:229
3033 #, no-wrap
3034 msgid ""
3035 "    for (tn = 0; tn E<lt> numThreads; tn++) {\n"
3036 "        errno = pthread_create(&thr[tn], NULL, thread_func,\n"
3037 "                               (void *) tn);\n"
3038 "        if (errno != 0)\n"
3039 "            errExit(\"pthread_create\");\n"
3040 msgstr ""
3041 "    for (tn = 0; tn E<lt> numThreads; tn++) {\n"
3042 "        errno = pthread_create(&thr[tn], NULL, thread_func,\n"
3043 "                               (void *) tn);\n"
3044 "        if (errno != 0)\n"
3045 "            errExit(\"pthread_create\");\n"
3046
3047 #. type: Plain text
3048 #: build/C/man3/malloc_info.3:234
3049 #, no-wrap
3050 msgid ""
3051 "        /* If we add a sleep interval after the start-up of each\n"
3052 "           thread, the threads likely won\\(aqt contend for malloc\n"
3053 "           mutexes, and therefore additional arenas won\\(aqt be\n"
3054 "           allocated (see malloc(3)). */\n"
3055 msgstr ""
3056 "        /* If we add a sleep interval after the start-up of each\n"
3057 "           thread, the threads likely won\\(aqt contend for malloc\n"
3058 "           mutexes, and therefore additional arenas won\\(aqt be\n"
3059 "           allocated (see malloc(3)). */\n"
3060
3061 #. type: Plain text
3062 #: build/C/man3/malloc_info.3:238
3063 #, no-wrap
3064 msgid ""
3065 "        if (sleepTime E<gt> 0)\n"
3066 "            sleep(sleepTime);\n"
3067 "    }\n"
3068 msgstr ""
3069 "        if (sleepTime E<gt> 0)\n"
3070 "            sleep(sleepTime);\n"
3071 "    }\n"
3072
3073 #. type: Plain text
3074 #: build/C/man3/malloc_info.3:240
3075 #, no-wrap
3076 msgid "    /* The main thread also allocates some memory */\n"
3077 msgstr "    /* The main thread also allocates some memory */\n"
3078
3079 #. type: Plain text
3080 #: build/C/man3/malloc_info.3:244
3081 #, no-wrap
3082 msgid ""
3083 "    for (j = 0; j E<lt> numBlocks; j++)\n"
3084 "        if (malloc(blockSize) == NULL)\n"
3085 "            errExit(\"malloc\");\n"
3086 msgstr ""
3087 "    for (j = 0; j E<lt> numBlocks; j++)\n"
3088 "        if (malloc(blockSize) == NULL)\n"
3089 "            errExit(\"malloc\");\n"
3090
3091 #. type: Plain text
3092 #: build/C/man3/malloc_info.3:247
3093 #, no-wrap
3094 msgid ""
3095 "    sleep(2);           /* Give all threads a chance to\n"
3096 "                           complete allocations */\n"
3097 msgstr ""
3098 "    sleep(2);           /* Give all threads a chance to\n"
3099 "                           complete allocations */\n"
3100
3101 #. type: Plain text
3102 #: build/C/man3/malloc_info.3:250
3103 #, no-wrap
3104 msgid ""
3105 "    printf(\"\\en============ After allocating blocks ============\\en\");\n"
3106 "    malloc_info(0, stdout);\n"
3107 msgstr ""
3108 "    printf(\"\\en============ After allocating blocks ============\\en\");\n"
3109 "    malloc_info(0, stdout);\n"
3110
3111 #. type: Plain text
3112 #: build/C/man3/malloc_info.3:260
3113 msgid ""
3114 "B<mallinfo>(3), B<malloc>(3), B<malloc_stats>(3), B<mallopt>(3), "
3115 "B<open_memstream>(3)"
3116 msgstr ""
3117 "B<mallinfo>(3), B<malloc>(3), B<malloc_stats>(3), B<mallopt>(3), "
3118 "B<open_memstream>(3)"
3119
3120 #. type: TH
3121 #: build/C/man3/malloc_stats.3:26
3122 #, no-wrap
3123 msgid "MALLOC_STATS"
3124 msgstr "MALLOC_STATS"
3125
3126 #. type: Plain text
3127 #: build/C/man3/malloc_stats.3:29
3128 msgid "malloc_stats - print memory allocation statistics"
3129 msgstr "malloc_stats - メモリ割り当ての統計を表示する"
3130
3131 #. type: Plain text
3132 #: build/C/man3/malloc_stats.3:33
3133 msgid "B<void malloc_stats(void);>"
3134 msgstr "B<void malloc_stats(void);>"
3135
3136 #.  .SH VERSIONS
3137 #.  Available already in glibc 2.0, possibly earlier
3138 #. type: Plain text
3139 #: build/C/man3/malloc_stats.3:55
3140 msgid ""
3141 "The B<malloc_stats>()  function prints (on standard error) statistics about "
3142 "memory allocated by B<malloc>(3)  and related functions.  For each arena "
3143 "(allocation area), this function prints the total amount of memory allocated "
3144 "and the total number of bytes consumed by in-use allocations.  (These two "
3145 "values correspond to the I<arena> and I<uordblks> fields retrieved by "
3146 "B<mallinfo>(3).)  In addition, the function prints the sum of these two "
3147 "statistics for all arenas, and the maximum number of blocks and bytes that "
3148 "were ever simultaneously allocated using B<mmap>(2)."
3149 msgstr ""
3150
3151 #. type: Plain text
3152 #: build/C/man3/malloc_stats.3:61
3153 msgid ""
3154 "More detailed information about memory allocations in the main arena can be "
3155 "obtained using B<mallinfo>(3)."
3156 msgstr ""
3157
3158 #. type: Plain text
3159 #: build/C/man3/malloc_stats.3:67
3160 msgid ""
3161 "B<mmap>(2), B<mallinfo>(3), B<malloc>(3), B<malloc_info>(3), B<mallopt>(3)"
3162 msgstr ""
3163 "B<mmap>(2), B<mallinfo>(3), B<malloc>(3), B<malloc_info>(3), B<mallopt>(3)"
3164
3165 #. type: TH
3166 #: build/C/man3/malloc_trim.3:26
3167 #, no-wrap
3168 msgid "MALLOC_TRIM"
3169 msgstr "MALLOC_TRIM"
3170
3171 #. type: TH
3172 #: build/C/man3/malloc_trim.3:26 build/C/man3/malloc_usable_size.3:25
3173 #, no-wrap
3174 msgid "2012-03-29"
3175 msgstr "2012-03-29"
3176
3177 #. type: Plain text
3178 #: build/C/man3/malloc_trim.3:29
3179 msgid "malloc_trim - release free memory from the top of the heap"
3180 msgstr ""
3181
3182 #. type: Plain text
3183 #: build/C/man3/malloc_trim.3:33
3184 msgid "B<void malloc_trim(size_t >I<pad>B<);>"
3185 msgstr "B<void malloc_trim(size_t >I<pad>B<);>"
3186
3187 #. type: Plain text
3188 #: build/C/man3/malloc_trim.3:40
3189 msgid ""
3190 "The B<malloc_trim>()  function attempts to release free memory at the top of "
3191 "the heap (by calling B<sbrk>(2)  with a suitable argument)."
3192 msgstr ""
3193
3194 #. type: Plain text
3195 #: build/C/man3/malloc_trim.3:51
3196 msgid ""
3197 "The I<pad> argument specifies the amount of free space to leave untrimmed at "
3198 "the top of the heap.  If this argument is 0, only the minimum amount of "
3199 "memory is maintained at the top of the heap (i.e., one page or less).  A "
3200 "nonzero argument can be used to maintain some trailing space at the top of "
3201 "the heap in order to allow future allocations to be made without having to "
3202 "extend the heap with B<sbrk>(2)."
3203 msgstr ""
3204
3205 #. type: Plain text
3206 #: build/C/man3/malloc_trim.3:56
3207 msgid ""
3208 "The B<malloc_trim>()  function returns 1 if memory was actually released "
3209 "back to the system, or 0 if it was not possible to release any memory."
3210 msgstr ""
3211
3212 #.  .SH VERSIONS
3213 #.  Available already in glibc 2.0, possibly earlier
3214 #. type: Plain text
3215 #: build/C/man3/malloc_trim.3:60
3216 msgid "No errors are defined."
3217 msgstr ""
3218
3219 #. type: Plain text
3220 #: build/C/man3/malloc_trim.3:71
3221 msgid ""
3222 "This function is automatically called by B<free>(3)  in certain "
3223 "circumstances; see the discussion of B<M_TOP_PAD> and B<M_TRIM_THRESHOLD> in "
3224 "B<mallopt>(3)."
3225 msgstr ""
3226
3227 #. type: Plain text
3228 #: build/C/man3/malloc_trim.3:74
3229 msgid ""
3230 "This function cannot release free memory located at places other than the "
3231 "top of the heap."
3232 msgstr ""
3233
3234 #.  malloc/malloc.c::mTRIm():
3235 #.      return result | (av == &main_arena ? sYSTRIm (pad, av) : 0);
3236 #. type: Plain text
3237 #: build/C/man3/malloc_trim.3:78
3238 msgid "This function releases only memory in the main arena."
3239 msgstr ""
3240
3241 #. type: Plain text
3242 #: build/C/man3/malloc_trim.3:82
3243 msgid "B<sbrk>(2), B<malloc>(3), B<mallopt>(3)"
3244 msgstr "B<sbrk>(2), B<malloc>(3), B<mallopt>(3)"
3245
3246 #. type: TH
3247 #: build/C/man3/malloc_usable_size.3:25
3248 #, no-wrap
3249 msgid "MALLOC_USABLE_SIZE"
3250 msgstr "MALLOC_USABLE_SIZE"
3251
3252 #. type: Plain text
3253 #: build/C/man3/malloc_usable_size.3:28
3254 msgid "malloc_usable_size - obtain size of block of memory allocated from heap"
3255 msgstr ""
3256
3257 #. type: Plain text
3258 #: build/C/man3/malloc_usable_size.3:32
3259 msgid "B<size_t malloc_usable_size (void *>I<ptr>B<);>"
3260 msgstr "B<size_t malloc_usable_size (void *>I<ptr>B<);>"
3261
3262 #. type: Plain text
3263 #: build/C/man3/malloc_usable_size.3:40
3264 msgid ""
3265 "The B<malloc_usable_size>()  function returns the number of usable bytes in "
3266 "the block pointed to by I<ptr>, a pointer to a block of memory allocated by "
3267 "B<malloc>(3)  or a related function."
3268 msgstr ""
3269
3270 #. type: Plain text
3271 #: build/C/man3/malloc_usable_size.3:48
3272 msgid ""
3273 "B<malloc_usable_size>()  returns the number of usable bytes in the block of "
3274 "allocated memory pointed to by I<ptr>.  If I<ptr> is NULL, 0 is returned."
3275 msgstr ""
3276
3277 #. type: Plain text
3278 #: build/C/man3/malloc_usable_size.3:60
3279 msgid ""
3280 "The value returned by B<malloc_usable_size>()  may be greater than the "
3281 "requested size of the allocation because of alignment and minimum size "
3282 "constraints.  Although the excess bytes can be overwritten by the "
3283 "application without ill effects, this is not good programming practice: the "
3284 "number of excess bytes in an allocation depends on the underlying "
3285 "implementation."
3286 msgstr ""
3287
3288 #. type: Plain text
3289 #: build/C/man3/malloc_usable_size.3:62
3290 msgid "The main use of this function is for debugging and introspection."
3291 msgstr ""
3292
3293 #. type: Plain text
3294 #: build/C/man3/malloc_usable_size.3:64
3295 msgid "B<malloc>(3)"
3296 msgstr "B<malloc>(3)"
3297
3298 #. type: TH
3299 #: build/C/man3/mallopt.3:26
3300 #, no-wrap
3301 msgid "MALLOPT"
3302 msgstr "MALLOPT"
3303
3304 #. type: TH
3305 #: build/C/man3/mallopt.3:26
3306 #, no-wrap
3307 msgid "2012-04-30"
3308 msgstr "2012-04-30"
3309
3310 #. type: Plain text
3311 #: build/C/man3/mallopt.3:29
3312 msgid "mallopt - set memory allocation parameters"
3313 msgstr "mallopt - メモリ割り当てパラメータを設定する"
3314
3315 #. type: Plain text
3316 #: build/C/man3/mallopt.3:33
3317 msgid "B<int mallopt(int >I<param>B<, int >I<value>B<);>"
3318 msgstr "B<int mallopt(int >I<param>B<, int >I<value>B<);>"
3319
3320 #. type: Plain text
3321 #: build/C/man3/mallopt.3:44
3322 msgid ""
3323 "The B<mallopt>()  function adjusts parameters that control the behavior of "
3324 "the memory-allocation functions (see B<malloc>(3)).  The I<param> argument "
3325 "specifies the parameter to be modified, and I<value> specifies the new value "
3326 "for that parameter."
3327 msgstr ""
3328 "B<mallopt>() 関数は、メモリ割り当て関数 (B<malloc>(3) を参照) の動作を\n"
3329 "制御するパラメータの調整を行う。\n"
3330 "I<param> 引き数で変更するパラメータを指定し、\n"
3331 "I<value> 引き数でそのパラメータの新しい値を指定する。"
3332
3333 #. type: Plain text
3334 #: build/C/man3/mallopt.3:47
3335 msgid "The following values can be specified for I<param>:"
3336 msgstr "I<param> には以下の値を指定することができる。"
3337
3338 #. type: TP
3339 #: build/C/man3/mallopt.3:47
3340 #, no-wrap
3341 msgid "B<M_CHECK_ACTION>"
3342 msgstr "B<M_CHECK_ACTION>"
3343
3344 #. type: Plain text
3345 #: build/C/man3/mallopt.3:53
3346 msgid ""
3347 "Setting this parameter controls how glibc responds when various kinds of "
3348 "programming errors are detected (e.g., freeing the same pointer twice).  The "
3349 "3 least significant bits (2, 1, and 0) of the value assigned to this "
3350 "parameter determine the glibc behavior, as follows:"
3351 msgstr ""
3352
3353 #. type: TP
3354 #: build/C/man3/mallopt.3:54
3355 #, no-wrap
3356 msgid "Bit 0"
3357 msgstr "Bit 0"
3358
3359 #. type: Plain text
3360 #: build/C/man3/mallopt.3:64
3361 msgid ""
3362 "If this bit is set, then print a one-line message on I<stderr> that provides "
3363 "details about the error.  The message starts with the string \"***\\ glibc "
3364 "detected\\ ***\", followed by the program name, the name of the memory-"
3365 "allocation function in which the error was detected, a brief description of "
3366 "the error, and the memory address where the error was detected."
3367 msgstr ""
3368
3369 #. type: TP
3370 #: build/C/man3/mallopt.3:64
3371 #, no-wrap
3372 msgid "Bit 1"
3373 msgstr "Bit 1"
3374
3375 #. type: Plain text
3376 #: build/C/man3/mallopt.3:79
3377 msgid ""
3378 "If this bit is set, then, after printing any error message specified by bit "
3379 "0, the program is terminated by calling B<abort>(3).  In glibc versions "
3380 "since 2.4, if bit 0 is also set, then, between printing the error message "
3381 "and aborting, the program also prints a stack trace in the manner of "
3382 "B<backtrace>(3), and prints the process's memory mapping in the style of I</"
3383 "proc/[pid]/maps> (see B<proc>(5))."
3384 msgstr ""
3385
3386 #. type: TP
3387 #: build/C/man3/mallopt.3:79
3388 #, no-wrap
3389 msgid "Bit 2 (since glibc 2.4)"
3390 msgstr "Bit 2 (glibc 2.4 以降)"
3391
3392 #. type: Plain text
3393 #: build/C/man3/mallopt.3:86
3394 msgid ""
3395 "This bit has an effect only if bit 0 is also set.  If this bit is set, then "
3396 "the one-line message describing the error is simplified to contain just the "
3397 "name of the function where the error was detected and the brief description "
3398 "of the error."
3399 msgstr ""
3400
3401 #. type: Plain text
3402 #: build/C/man3/mallopt.3:91
3403 msgid "The remaining bits in I<value> are ignored."
3404 msgstr ""
3405
3406 #. type: Plain text
3407 #: build/C/man3/mallopt.3:95
3408 msgid ""
3409 "Combining the above details, the following numeric values are meaningful for "
3410 "B<M_CHECK_ACTION>:"
3411 msgstr ""
3412
3413 #. type: IP
3414 #: build/C/man3/mallopt.3:96
3415 #, no-wrap
3416 msgid "0"
3417 msgstr "0"
3418
3419 #. type: Plain text
3420 #: build/C/man3/mallopt.3:98
3421 msgid "Ignore error conditions; continue execution (with undefined results)."
3422 msgstr ""
3423
3424 #. type: IP
3425 #: build/C/man3/mallopt.3:98
3426 #, no-wrap
3427 msgid "1"
3428 msgstr "1"
3429
3430 #. type: Plain text
3431 #: build/C/man3/mallopt.3:100
3432 msgid "Print a detailed error message and continue execution."
3433 msgstr ""
3434
3435 #. type: IP
3436 #: build/C/man3/mallopt.3:100
3437 #, no-wrap
3438 msgid "2"
3439 msgstr "2"
3440
3441 #. type: Plain text
3442 #: build/C/man3/mallopt.3:102
3443 msgid "Abort the program."
3444 msgstr ""
3445
3446 #. type: IP
3447 #: build/C/man3/mallopt.3:102
3448 #, no-wrap
3449 msgid "3"
3450 msgstr "3"
3451
3452 #. type: Plain text
3453 #: build/C/man3/mallopt.3:105
3454 msgid ""
3455 "Print detailed error message, stack trace, and memory mappings, and abort "
3456 "the program."
3457 msgstr ""
3458
3459 #. type: IP
3460 #: build/C/man3/mallopt.3:105
3461 #, no-wrap
3462 msgid "5"
3463 msgstr "5"
3464
3465 #. type: Plain text
3466 #: build/C/man3/mallopt.3:107
3467 msgid "Print a simple error message and continue execution."
3468 msgstr ""
3469
3470 #. type: IP
3471 #: build/C/man3/mallopt.3:107
3472 #, no-wrap
3473 msgid "7"
3474 msgstr "7"
3475
3476 #. type: Plain text
3477 #: build/C/man3/mallopt.3:110
3478 msgid ""
3479 "Print simple error message, stack trace, and memory mappings, and abort the "
3480 "program."
3481 msgstr ""
3482
3483 #. type: Plain text
3484 #: build/C/man3/mallopt.3:116
3485 msgid ""
3486 "Since glibc 2.3.4, the default value for the B<M_CHECK_ACTION> parameter is "
3487 "3.  In glibc version 2.3.3 and earlier, the default value is 1."
3488 msgstr ""
3489
3490 #. type: Plain text
3491 #: build/C/man3/mallopt.3:121
3492 msgid ""
3493 "Using a nonzero B<M_CHECK_ACTION> value can be useful because otherwise a "
3494 "crash may happen much later, and the true cause of the problem is then very "
3495 "hard to track down."
3496 msgstr ""
3497
3498 #. type: TP
3499 #: build/C/man3/mallopt.3:121
3500 #, no-wrap
3501 msgid "B<M_MMAP_MAX>"
3502 msgstr "B<M_MMAP_MAX>"
3503
3504 #.  The following text adapted from comments in the glibc source:
3505 #. type: Plain text
3506 #: build/C/man3/mallopt.3:131
3507 msgid ""
3508 "This parameter specifies the maximum number of allocation requests that may "
3509 "be simultaneously serviced using B<mmap>(2).  This parameter exists because "
3510 "some systems have a limited number of internal tables for use by B<mmap>(2), "
3511 "and using more than a few of them may degrade performance."
3512 msgstr ""
3513
3514 #. type: Plain text
3515 #: build/C/man3/mallopt.3:138
3516 msgid ""
3517 "The default value is 65,536, a value which has no special significance and "
3518 "which servers only as a safeguard.  Setting this parameter to 0 disables the "
3519 "use of B<mmap>(2)  for servicing large allocation requests."
3520 msgstr ""
3521
3522 #. type: TP
3523 #: build/C/man3/mallopt.3:138
3524 #, no-wrap
3525 msgid "B<M_MMAP_THRESHOLD>"
3526 msgstr "B<M_MMAP_THRESHOLD>"
3527
3528 #. type: Plain text
3529 #: build/C/man3/mallopt.3:147
3530 msgid ""
3531 "For allocations greater than or equal to the limit specified (in bytes) by "
3532 "B<M_MMAP_THRESHOLD> that can't be satisfied from the free list, the memory-"
3533 "allocation functions employ B<mmap>(2)  instead of increasing the program "
3534 "break using B<sbrk>(2)."
3535 msgstr ""
3536
3537 #. type: Plain text
3538 #: build/C/man3/mallopt.3:167
3539 msgid ""
3540 "Allocating memory using B<mmap>(2)  has the significant advantage that the "
3541 "allocated memory blocks can always be independently released back to the "
3542 "system.  (By contrast, the heap can be trimmed only if memory is freed at "
3543 "the top end.)  On the other hand, there are some disadvantages to the use of "
3544 "B<mmap>(2): deallocated space is not placed on the free list for reuse by "
3545 "later allocations; memory may be wasted because B<mmap>(2)  allocations must "
3546 "be page-aligned; and the kernel must perform the expensive task of zeroing "
3547 "out memory allocated via B<mmap>(2).  Balancing these factors leads to a "
3548 "default setting of 128*1024 for the B<M_MMAP_THRESHOLD> parameter."
3549 msgstr ""
3550
3551 #. type: Plain text
3552 #: build/C/man3/mallopt.3:174
3553 msgid ""
3554 "The lower limit for this parameter is 0.  The upper limit is "
3555 "B<DEFAULT_MMAP_THRESHOLD_MAX>: 512*1024 on 32-bit systems or "
3556 "I<4*1024*1024*sizeof(long)> on 64-bit systems."
3557 msgstr ""
3558
3559 #. type: Plain text
3560 #: build/C/man3/mallopt.3:192
3561 msgid ""
3562 "I<Note:> Nowadays, glibc uses a dynamic mmap threshold by default.  The "
3563 "initial value of the threshold is 128*1024, but when blocks larger than the "
3564 "current threshold and less than or equal to B<DEFAULT_MMAP_THRESHOLD_MAX> "
3565 "are freed, the threshold is adjusted upwards to the size of the freed "
3566 "block.  When dynamic mmap thresholding is in effect, the threshold for "
3567 "trimming the heap is also dynamically adjusted to be twice the dynamic mmap "
3568 "threshold.  Dynamic adjustment of the mmap threshold is disabled if any of "
3569 "the B<M_TRIM_THRESHOLD>, B<M_TOP_PAD>, B<M_MMAP_THRESHOLD>, or B<M_MMAP_MAX> "
3570 "parameters is set."
3571 msgstr ""
3572
3573 #. type: TP
3574 #: build/C/man3/mallopt.3:192
3575 #, no-wrap
3576 msgid "B<M_MXFAST> (since glibc 2.3)"
3577 msgstr "B<M_MXFAST> (glibc 2.3 以降)"
3578
3579 #.  The following text adapted from comments in the glibc sources:
3580 #. type: Plain text
3581 #: build/C/man3/mallopt.3:212
3582 msgid ""
3583 "Set the upper limit for memory allocation requests that are satisfied using "
3584 "\"fastbins\".  (The measurement unit for this parameter is bytes.)  Fastbins "
3585 "are storage areas that hold deallocated blocks of memory of the same size "
3586 "without merging adjacent free blocks.  Subsequent reallocation of blocks of "
3587 "the same size can be handled very quickly by allocating from the fastbin, "
3588 "although memory fragmentation and the overall memory footprint of the "
3589 "program can increase.  The default value for this parameter is I<64*sizeof"
3590 "(size_t)/4> (i.e., 64 on 32-bit architectures).  The range for this "
3591 "parameter is 0 to I<80*sizeof(size_t)/4>.  Setting B<M_MXFAST> to 0 disables "
3592 "the use of fastbins."
3593 msgstr ""
3594
3595 #. type: TP
3596 #: build/C/man3/mallopt.3:212
3597 #, no-wrap
3598 msgid "B<M_PERTURB> (since glibc 2.4)"
3599 msgstr "B<M_PERTURB> (glibc 2.4 以降)"
3600
3601 #. type: Plain text
3602 #: build/C/man3/mallopt.3:227
3603 msgid ""
3604 "If this parameter is set to a nonzero value, then bytes of allocated memory "
3605 "(other than allocations via B<calloc>(3))  are initialized to the complement "
3606 "of the value in the least significant byte of I<value>, and when allocated "
3607 "memory is released using B<free>(3), the freed bytes are set to the least "
3608 "significant byte of I<value>.  This can be useful for detecting errors where "
3609 "programs incorrectly rely on allocated memory being initialized to zero, or "
3610 "reuse values in memory that has already been freed."
3611 msgstr ""
3612
3613 #. type: TP
3614 #: build/C/man3/mallopt.3:227
3615 #, no-wrap
3616 msgid "B<M_TOP_PAD>"
3617 msgstr "B<M_TOP_PAD>"
3618
3619 #. type: Plain text
3620 #: build/C/man3/mallopt.3:234
3621 msgid ""
3622 "This parameter defines the amount of padding to employ when calling B<sbrk>"
3623 "(2)  to modify the program break.  (The measurement unit for this parameter "
3624 "is bytes.)  This parameter has an effect in the following circumstances:"
3625 msgstr ""
3626
3627 #. type: Plain text
3628 #: build/C/man3/mallopt.3:241
3629 msgid ""
3630 "When the program break is increased, then B<M_TOP_PAD> bytes are added to "
3631 "the B<sbrk>(2)  request."
3632 msgstr ""
3633
3634 #. type: Plain text
3635 #: build/C/man3/mallopt.3:247
3636 msgid ""
3637 "When the heap is trimmed as a consequence of calling B<free>(3)  (see the "
3638 "discussion of B<M_TRIM_THRESHOLD>)  this much free space is preserved at the "
3639 "top of the heap."
3640 msgstr ""
3641
3642 #. type: Plain text
3643 #: build/C/man3/mallopt.3:251
3644 msgid ""
3645 "In either case, the amount of padding is always rounded to a system page "
3646 "boundary."
3647 msgstr ""
3648
3649 #. type: Plain text
3650 #: build/C/man3/mallopt.3:258
3651 msgid ""
3652 "Modifying B<M_TOP_PAD> is a trade-off between increasing the number of "
3653 "system calls (when the parameter is set low)  and wasting unused memory at "
3654 "the top of the heap (when the parameter is set high)."
3655 msgstr ""
3656
3657 #.  DEFAULT_TOP_PAD in glibc source
3658 #. type: Plain text
3659 #: build/C/man3/mallopt.3:261
3660 msgid "The default value for this parameter is 128*1024."
3661 msgstr ""
3662
3663 #. type: TP
3664 #: build/C/man3/mallopt.3:261
3665 #, no-wrap
3666 msgid "B<M_TRIM_THRESHOLD>"
3667 msgstr "B<M_TRIM_THRESHOLD>"
3668
3669 #. type: Plain text
3670 #: build/C/man3/mallopt.3:277
3671 msgid ""
3672 "When the amount of contiguous free memory at the top of the heap grows "
3673 "sufficiently large, B<free>(3)  employs B<sbrk>(2)  to release this memory "
3674 "back to the system.  (This can be useful in programs that continue to "
3675 "execute for a long period after freeing a significant amount of memory.)  "
3676 "The B<M_TRIM_THRESHOLD> parameter specifies the minimum size (in bytes) that "
3677 "this block of memory must reach before B<sbrk>(2)  is used to trim the heap."
3678 msgstr ""
3679
3680 #. type: Plain text
3681 #: build/C/man3/mallopt.3:282
3682 msgid ""
3683 "The default value for this parameter is 128*1024.  Setting "
3684 "B<M_TRIM_THRESHOLD> to -1 disables trimming completely."
3685 msgstr ""
3686
3687 #
3688 #
3689 #
3690 #.  FIXME Do the arena parameters need to be documented?
3691 #.  .TP
3692 #.  .BR M_ARENA_TEST " (since glibc 2.10)"
3693 #.  .TP
3694 #.  .BR M_ARENA_MAX " (since glibc 2.10)"
3695 #.  Environment variables
3696 #.      MALLOC_ARENA_MAX_
3697 #.      MALLOC_ARENA_TEST_
3698 #.  http://udrepper.livejournal.com/20948.html describes some details
3699 #.      of the MALLOC_ARENA_* environment variables.
3700 #.  These macros aren't enabled in production releases until 2.15?
3701 #.  (see glibc malloc/Makefile)
3702 #. type: Plain text
3703 #: build/C/man3/mallopt.3:305
3704 msgid ""
3705 "Modifying B<M_TRIM_THRESHOLD> is a trade-off between increasing the number "
3706 "of system calls (when the parameter is set low)  and wasting unused memory "
3707 "at the top of the heap (when the parameter is set high)."
3708 msgstr ""
3709
3710 #. type: SS
3711 #: build/C/man3/mallopt.3:305
3712 #, no-wrap
3713 msgid "Environment variables"
3714 msgstr "環境変数"
3715
3716 #. type: Plain text
3717 #: build/C/man3/mallopt.3:320
3718 msgid ""
3719 "A number of environment variables can be defined to modify some of the same "
3720 "parameters as are controlled by B<mallopt>().  Using these variables has the "
3721 "advantage that the source code of the program need not be changed.  To be "
3722 "effective, these variables must be defined before the first call to a memory-"
3723 "allocation function.  (If the same parameters are adjusted via B<mallopt>()  "
3724 "then the B<mallopt>()  settings take precedence.)  For security reasons, "
3725 "these variables are ignored in set-user-ID and set-group-ID programs."
3726 msgstr ""
3727
3728 #. type: Plain text
3729 #: build/C/man3/mallopt.3:323
3730 msgid ""
3731 "The environment variables are as follows (note the trailing underscore at "
3732 "the end of the name of each variable):"
3733 msgstr ""
3734
3735 #. type: TP
3736 #: build/C/man3/mallopt.3:323
3737 #, no-wrap
3738 msgid "B<MALLOC_CHECK_>"
3739 msgstr "B<MALLOC_CHECK_>"
3740
3741 #.  On glibc 2.12/x86, a simple malloc()+free() loop is about 70% slower
3742 #.  when MALLOC_CHECK_ was set.
3743 #. type: Plain text
3744 #: build/C/man3/mallopt.3:340
3745 msgid ""
3746 "This environment variable controls the same parameter as B<mallopt>()  "
3747 "B<M_CHECK_ACTION>.  If this variable is set to a nonzero value, then a "
3748 "special implementation of the memory-allocation functions is used.  (This is "
3749 "accomplished using the B<malloc_hook>(3)  feature.)  This implementation "
3750 "performs additional error checking, but is slower than the standard set of "
3751 "memory-allocation functions.  (This implementation does not detect all "
3752 "possible errors; memory leaks can still occur.)"
3753 msgstr ""
3754
3755 #. type: Plain text
3756 #: build/C/man3/mallopt.3:345
3757 msgid ""
3758 "The value assigned to this environment variable should be a single digit, "
3759 "whose meaning is as described for B<M_CHECK_ACTION>.  Any characters beyond "
3760 "the initial digit are ignored."
3761 msgstr ""
3762
3763 #. type: Plain text
3764 #: build/C/man3/mallopt.3:354
3765 msgid ""
3766 "For security reasons, the effect of B<MALLOC_CHECK_> is disabled by default "
3767 "for set-user-ID and set-group-ID programs.  However, if the file I</etc/suid-"
3768 "debug> exists (the content of the file is irrelevant), then B<MALLOC_CHECK_> "
3769 "also has an effect for set-user-ID and set-group-ID programs."
3770 msgstr ""
3771
3772 #. type: TP
3773 #: build/C/man3/mallopt.3:354
3774 #, no-wrap
3775 msgid "B<MALLOC_MMAP_MAX_>"
3776 msgstr "B<MALLOC_MMAP_MAX_>"
3777
3778 #. type: Plain text
3779 #: build/C/man3/mallopt.3:359
3780 msgid "Controls the same parameter as B<mallopt>()  B<M_MMAP_MAX>."
3781 msgstr ""
3782
3783 #. type: TP
3784 #: build/C/man3/mallopt.3:359
3785 #, no-wrap
3786 msgid "B<MALLOC_MMAP_THRESHOLD_>"
3787 msgstr "B<MALLOC_MMAP_THRESHOLD_>"
3788
3789 #. type: Plain text
3790 #: build/C/man3/mallopt.3:364
3791 msgid "Controls the same parameter as B<mallopt>()  B<M_MMAP_THRESHOLD>."
3792 msgstr ""
3793
3794 #. type: TP
3795 #: build/C/man3/mallopt.3:364
3796 #, no-wrap
3797 msgid "B<MALLOC_PERTURB_>"
3798 msgstr "B<MALLOC_PERTURB_>"
3799
3800 #. type: Plain text
3801 #: build/C/man3/mallopt.3:369
3802 msgid "Controls the same parameter as B<mallopt>()  B<M_PERTURB>."
3803 msgstr ""
3804
3805 #. type: TP
3806 #: build/C/man3/mallopt.3:369
3807 #, no-wrap
3808 msgid "B<MALLOC_TRIM_THRESHOLD_>"
3809 msgstr "B<MALLOC_TRIM_THRESHOLD_>"
3810
3811 #. type: Plain text
3812 #: build/C/man3/mallopt.3:374
3813 msgid "Controls the same parameter as B<mallopt>()  B<M_TRIM_THRESHOLD>."
3814 msgstr ""
3815
3816 #. type: TP
3817 #: build/C/man3/mallopt.3:374
3818 #, no-wrap
3819 msgid "B<MALLOC_TOP_PAD_>"
3820 msgstr "B<MALLOC_TOP_PAD_>"
3821
3822 #. type: Plain text
3823 #: build/C/man3/mallopt.3:379
3824 msgid "Controls the same parameter as B<mallopt>()  B<M_TOP_PAD>."
3825 msgstr ""
3826
3827 #. type: Plain text
3828 #: build/C/man3/mallopt.3:384
3829 msgid "On success, B<mallopt>()  returns 1.  On error, it returns 0."
3830 msgstr "B<mallopt>()  は成功すると 1 を返す。エラーの場合は 0 を返す。"
3831
3832 #.  .SH VERSIONS
3833 #.  Available already in glibc 2.0, possibly earlier
3834 #. type: Plain text
3835 #: build/C/man3/mallopt.3:392
3836 msgid "On error, I<errno> is I<not> set."
3837 msgstr "エラーの場合、I<errno> は設定I<されない>。"
3838
3839 #.  .SH NOTES
3840 #. type: Plain text
3841 #: build/C/man3/mallopt.3:406
3842 msgid ""
3843 "This function is not specified by POSIX or the C standards.  A similar "
3844 "function exists on many System V derivatives, but the range of values for "
3845 "I<param> varies across systems.  The SVID defined options B<M_MXFAST>, "
3846 "B<M_NLBLKS>, B<M_GRAIN>, and B<M_KEEP>, but only the first of these is "
3847 "implemented in glibc."
3848 msgstr ""
3849
3850 #. type: Plain text
3851 #: build/C/man3/mallopt.3:410
3852 msgid "Specifying an invalid value for I<param> does not generate an error."
3853 msgstr ""
3854
3855 #.  FIXME This looks buggy:
3856 #.  setting the M_MXFAST limit rounds up:    (s + SIZE_SZ) & ~MALLOC_ALIGN_MASK)
3857 #.  malloc requests are rounded up:
3858 #.     (req) + SIZE_SZ + MALLOC_ALIGN_MASK) & ~MALLOC_ALIGN_MASK
3859 #.  http://sources.redhat.com/bugzilla/show_bug.cgi?id=12129
3860 #. type: Plain text
3861 #: build/C/man3/mallopt.3:418
3862 msgid ""
3863 "A calculation error within the glibc implementation means that a call of the "
3864 "form:"
3865 msgstr ""
3866
3867 #. type: Plain text
3868 #: build/C/man3/mallopt.3:421
3869 #, no-wrap
3870 msgid "    mallopt(M_MXFAST, n)\n"
3871 msgstr "    mallopt(M_MXFAST, n)\n"
3872
3873 #.  Bins are multiples of 2 * sizeof(size_t) + sizeof(size_t)
3874 #. type: Plain text
3875 #: build/C/man3/mallopt.3:433
3876 msgid ""
3877 "does not result in fastbins being employed for all allocations of size up to "
3878 "I<n>.  To ensure desired results, I<n> should be rounded up to the next "
3879 "multiple greater than or equal to I<(2k+1)*sizeof(size_t)>, where I<k> is an "
3880 "integer."
3881 msgstr ""
3882
3883 #.  FIXME MALLOC_MMAP_THRESHOLD_ and MALLOC_MMAP_MAX_
3884 #.  do have an effect for set-user-ID programs (but not
3885 #.  set-group-ID programs).
3886 #.  http://sources.redhat.com/bugzilla/show_bug.cgi?id=12155
3887 #. type: Plain text
3888 #: build/C/man3/mallopt.3:445
3889 msgid ""
3890 "The B<MALLOC_MMAP_THRESHOLD_> and B<MALLOC_MMAP_MAX_> variables are I<not> "
3891 "ignored in set-group-ID programs."
3892 msgstr ""
3893
3894 #.  FIXME http://sources.redhat.com/bugzilla/show_bug.cgi?id=12140
3895 #. type: Plain text
3896 #: build/C/man3/mallopt.3:466
3897 msgid ""
3898 "If B<mallopt>()  is used to set B<M_PERTURB>, then, as expected, the bytes "
3899 "of allocated memory are initialized to the complement of the byte in "
3900 "I<value>, and when that memory is freed, the bytes of the region are "
3901 "initialized to the byte specified in I<value>.  However, there is an off-by-"
3902 "I<sizeof(size_t)> error in the implementation: instead of initializing "
3903 "precisely the block of memory being freed by the call I<free(p)>, the block "
3904 "starting at I<p+sizeof(size_t)> is initialized."
3905 msgstr ""
3906
3907 #. type: Plain text
3908 #: build/C/man3/mallopt.3:475
3909 msgid ""
3910 "The program below demonstrates the use of B<M_CHECK_ACTION>.  If the program "
3911 "is supplied with an (integer) command-line argument, then that argument is "
3912 "used to set the B<M_CHECK_ACTION> parameter.  The program then allocates a "
3913 "block of memory, and frees it twice (an error)."
3914 msgstr ""
3915
3916 #. type: Plain text
3917 #: build/C/man3/mallopt.3:479
3918 msgid ""
3919 "The following shell session shows what happens when we run this program "
3920 "under glibc, with the default value for B<M_CHECK_ACTION>:"
3921 msgstr ""
3922
3923 #. type: Plain text
3924 #: build/C/man3/mallopt.3:499
3925 #, no-wrap
3926 msgid ""
3927 "$ B<./a.out>\n"
3928 "main(): returned from first free() call\n"
3929 "*** glibc detected *** ./a.out: double free or corruption (top): 0x09d30008 ***\n"
3930 "======= Backtrace: =========\n"
3931 "/lib/libc.so.6(+0x6c501)[0x523501]\n"
3932 "/lib/libc.so.6(+0x6dd70)[0x524d70]\n"
3933 "/lib/libc.so.6(cfree+0x6d)[0x527e5d]\n"
3934 "\\&./a.out[0x80485db]\n"
3935 "/lib/libc.so.6(__libc_start_main+0xe7)[0x4cdce7]\n"
3936 "\\&./a.out[0x8048471]\n"
3937 "======= Memory map: ========\n"
3938 "001e4000-001fe000 r-xp 00000000 08:06 1083555    /lib/libgcc_s.so.1\n"
3939 "001fe000-001ff000 r--p 00019000 08:06 1083555    /lib/libgcc_s.so.1\n"
3940 "[some lines omitted]\n"
3941 "b7814000-b7817000 rw-p 00000000 00:00 0\n"
3942 "bff53000-bff74000 rw-p 00000000 00:00 0          [stack]\n"
3943 "Aborted (core dumped)\n"
3944 msgstr ""
3945 "$ B<./a.out>\n"
3946 "main(): returned from first free() call\n"
3947 "*** glibc detected *** ./a.out: double free or corruption (top): 0x09d30008 ***\n"
3948 "======= Backtrace: =========\n"
3949 "/lib/libc.so.6(+0x6c501)[0x523501]\n"
3950 "/lib/libc.so.6(+0x6dd70)[0x524d70]\n"
3951 "/lib/libc.so.6(cfree+0x6d)[0x527e5d]\n"
3952 "\\&./a.out[0x80485db]\n"
3953 "/lib/libc.so.6(__libc_start_main+0xe7)[0x4cdce7]\n"
3954 "\\&./a.out[0x8048471]\n"
3955 "======= Memory map: ========\n"
3956 "001e4000-001fe000 r-xp 00000000 08:06 1083555    /lib/libgcc_s.so.1\n"
3957 "001fe000-001ff000 r--p 00019000 08:06 1083555    /lib/libgcc_s.so.1\n"
3958 "[some lines omitted]\n"
3959 "b7814000-b7817000 rw-p 00000000 00:00 0\n"
3960 "bff53000-bff74000 rw-p 00000000 00:00 0          [stack]\n"
3961 "Aborted (core dumped)\n"
3962
3963 #. type: Plain text
3964 #: build/C/man3/mallopt.3:504
3965 msgid ""
3966 "The following runs show the results when employing other values for "
3967 "B<M_CHECK_ACTION>:"
3968 msgstr ""
3969
3970 #. type: Plain text
3971 #: build/C/man3/mallopt.3:517
3972 #, no-wrap
3973 msgid ""
3974 "$ B<./a.out 1>             # Diagnose error and continue\n"
3975 "main(): returned from first free() call\n"
3976 "*** glibc detected *** ./a.out: double free or corruption (top): 0x09cbe008 ***\n"
3977 "main(): returned from second free() call\n"
3978 "$ B<./a.out 2>             # Abort without error message\n"
3979 "main(): returned from first free() call\n"
3980 "Aborted (core dumped)\n"
3981 "$ B<./a.out 0>             # Ignore error and continue\n"
3982 "main(): returned from first free() call\n"
3983 "main(): returned from second free() call\n"
3984 msgstr ""
3985 "$ B<./a.out 1>             # Diagnose error and continue\n"
3986 "main(): returned from first free() call\n"
3987 "*** glibc detected *** ./a.out: double free or corruption (top): 0x09cbe008 ***\n"
3988 "main(): returned from second free() call\n"
3989 "$ B<./a.out 2>             # Abort without error message\n"
3990 "main(): returned from first free() call\n"
3991 "Aborted (core dumped)\n"
3992 "$ B<./a.out 0>             # Ignore error and continue\n"
3993 "main(): returned from first free() call\n"
3994 "main(): returned from second free() call\n"
3995
3996 #. type: Plain text
3997 #: build/C/man3/mallopt.3:523
3998 msgid ""
3999 "The next run shows how to set the same parameter using the B<MALLOC_CHECK_> "
4000 "environment variable:"
4001 msgstr ""
4002
4003 #. type: Plain text
4004 #: build/C/man3/mallopt.3:530
4005 #, no-wrap
4006 msgid ""
4007 "$ B<MALLOC_CHECK_=1 ./a.out>\n"
4008 "main(): returned from first free() call\n"
4009 "*** glibc detected *** ./a.out: free(): invalid pointer: 0x092c2008 ***\n"
4010 "main(): returned from second free() call\n"
4011 msgstr ""
4012 "$ B<MALLOC_CHECK_=1 ./a.out>\n"
4013 "main(): returned from first free() call\n"
4014 "*** glibc detected *** ./a.out: free(): invalid pointer: 0x092c2008 ***\n"
4015 "main(): returned from second free() call\n"
4016
4017 #. type: Plain text
4018 #: build/C/man3/mallopt.3:538
4019 #, no-wrap
4020 msgid ""
4021 "#include E<lt>malloc.hE<gt>\n"
4022 "#include E<lt>stdio.hE<gt>\n"
4023 "#include E<lt>stdlib.hE<gt>\n"
4024 msgstr ""
4025 "#include E<lt>malloc.hE<gt>\n"
4026 "#include E<lt>stdio.hE<gt>\n"
4027 "#include E<lt>stdlib.hE<gt>\n"
4028
4029 #. type: Plain text
4030 #: build/C/man3/mallopt.3:543 build/C/man3/mcheck.3:187
4031 #, no-wrap
4032 msgid ""
4033 "int\n"
4034 "main(int argc, char *argv[])\n"
4035 "{\n"
4036 "    char *p;\n"
4037 msgstr ""
4038 "int\n"
4039 "main(int argc, char *argv[])\n"
4040 "{\n"
4041 "    char *p;\n"
4042
4043 #. type: Plain text
4044 #: build/C/man3/mallopt.3:550
4045 #, no-wrap
4046 msgid ""
4047 "    if (argc E<gt> 1) {\n"
4048 "        if (mallopt(M_CHECK_ACTION, atoi(argv[1])) != 1) {\n"
4049 "            fprintf(stderr, \"mallopt() failed\");\n"
4050 "            exit(EXIT_FAILURE);\n"
4051 "        }\n"
4052 "    }\n"
4053 msgstr ""
4054 "    if (argc E<gt> 1) {\n"
4055 "        if (mallopt(M_CHECK_ACTION, atoi(argv[1])) != 1) {\n"
4056 "            fprintf(stderr, \"mallopt() failed\");\n"
4057 "            exit(EXIT_FAILURE);\n"
4058 "        }\n"
4059 "    }\n"
4060
4061 #. type: Plain text
4062 #: build/C/man3/mallopt.3:556
4063 #, no-wrap
4064 msgid ""
4065 "    p = malloc(1000);\n"
4066 "    if (p == NULL) {\n"
4067 "        fprintf(stderr, \"malloc() failed\");\n"
4068 "        exit(EXIT_FAILURE);\n"
4069 "    }\n"
4070 msgstr ""
4071 "    p = malloc(1000);\n"
4072 "    if (p == NULL) {\n"
4073 "        fprintf(stderr, \"malloc() failed\");\n"
4074 "        exit(EXIT_FAILURE);\n"
4075 "    }\n"
4076
4077 #. type: Plain text
4078 #: build/C/man3/mallopt.3:559
4079 #, no-wrap
4080 msgid ""
4081 "    free(p);\n"
4082 "    printf(\"main(): returned from first free() call\\en\");\n"
4083 msgstr ""
4084 "    free(p);\n"
4085 "    printf(\"main(): returned from first free() call\\en\");\n"
4086
4087 #. type: Plain text
4088 #: build/C/man3/mallopt.3:562
4089 #, no-wrap
4090 msgid ""
4091 "    free(p);\n"
4092 "    printf(\"main(): returned from second free() call\\en\");\n"
4093 msgstr ""
4094 "    free(p);\n"
4095 "    printf(\"main(): returned from second free() call\\en\");\n"
4096
4097 #. type: Plain text
4098 #: build/C/man3/mallopt.3:580
4099 msgid ""
4100 "B<mmap>(2), B<sbrk>(2), B<mallinfo>(3), B<malloc>(3), B<malloc_hook>(3), "
4101 "B<malloc_info>(3), B<malloc_stats>(3), B<malloc_trim>(3), B<mcheck>(3), "
4102 "B<mtrace>(3), B<posix_memalign>(3)"
4103 msgstr ""
4104 "B<mmap>(2), B<sbrk>(2), B<mallinfo>(3), B<malloc>(3), B<malloc_hook>(3), "
4105 "B<malloc_info>(3), B<malloc_stats>(3), B<malloc_trim>(3), B<mcheck>(3), "
4106 "B<mtrace>(3), B<posix_memalign>(3)"
4107
4108 #. type: TH
4109 #: build/C/man3/mcheck.3:25
4110 #, no-wrap
4111 msgid "MCHECK"
4112 msgstr "MCHECK"
4113
4114 #. type: TH
4115 #: build/C/man3/mcheck.3:25 build/C/man3/mtrace.3:25
4116 #, no-wrap
4117 msgid "2012-04-18"
4118 msgstr "2012-04-18"
4119
4120 #. type: Plain text
4121 #: build/C/man3/mcheck.3:28
4122 msgid ""
4123 "mcheck, mcheck_check_all, mcheck_pedantic, mprobe - heap consistency checking"
4124 msgstr ""
4125
4126 #. type: Plain text
4127 #: build/C/man3/mcheck.3:31
4128 #, no-wrap
4129 msgid "B<#include E<lt>mcheck.hE<gt>>\n"
4130 msgstr "B<#include E<lt>mcheck.hE<gt>>\n"
4131
4132 #. type: Plain text
4133 #: build/C/man3/mcheck.3:33
4134 #, no-wrap
4135 msgid "B<int mcheck(void (*>I<abortfunc>B<)(enum mcheck_status >I<mstatus>B<));>\n"
4136 msgstr ""
4137
4138 #. type: Plain text
4139 #: build/C/man3/mcheck.3:35
4140 #, no-wrap
4141 msgid "B<int mcheck_pedantic(void (*>I<abortfunc>B<)(enum mcheck_status >I<mstatus>B<));>\n"
4142 msgstr ""
4143
4144 #. type: Plain text
4145 #: build/C/man3/mcheck.3:37
4146 #, no-wrap
4147 msgid "B<void mcheck_check_all(void);>\n"
4148 msgstr "B<void mcheck_check_all(void);>\n"
4149
4150 #. type: Plain text
4151 #: build/C/man3/mcheck.3:39
4152 #, no-wrap
4153 msgid "B<enum mcheck_status mprobe(void *>I<ptr>B<);>\n"
4154 msgstr "B<enum mcheck_status mprobe(void *>I<ptr>B<);>\n"
4155
4156 #. type: Plain text
4157 #: build/C/man3/mcheck.3:51
4158 msgid ""
4159 "The B<mcheck>()  function installs a set of debugging hooks for the B<malloc>"
4160 "(3)  family of memory-allocation functions.  These hooks cause certain "
4161 "consistency checks to be performed on the state of the heap.  The checks can "
4162 "detect application errors such as freeing a block of memory more than once "
4163 "or corrupting the bookkeeping data structures that immediately precede a "
4164 "block of allocated memory."
4165 msgstr ""
4166
4167 #. type: Plain text
4168 #: build/C/man3/mcheck.3:63
4169 msgid ""
4170 "To be effective, the B<mcheck>()  function must be called before the first "
4171 "call to B<malloc>(3)  or a related function.  In cases where this is "
4172 "difficult to ensure, linking the program with I<-mcheck> inserts an implicit "
4173 "call to B<mcheck>()  (with a NULL argument)  before the first call to a "
4174 "memory-allocation function."
4175 msgstr ""
4176
4177 #. type: Plain text
4178 #: build/C/man3/mcheck.3:71
4179 msgid ""
4180 "The B<mcheck_pedantic>()  function is similar to B<mcheck>(), but performs "
4181 "checks on all allocated blocks whenever one of the memory-allocation "
4182 "functions is called.  This can be very slow!"
4183 msgstr ""
4184
4185 #. type: Plain text
4186 #: build/C/man3/mcheck.3:78
4187 msgid ""
4188 "The B<mcheck_check_all>()  function causes an immediate check on all "
4189 "allocated blocks.  This call is effective only if B<mcheck>()  is called "
4190 "beforehand."
4191 msgstr ""
4192
4193 #. type: Plain text
4194 #: build/C/man3/mcheck.3:91
4195 msgid ""
4196 "If the system detects an inconsistency in the heap, the caller-supplied "
4197 "function pointed to by I<abortfunc> is invoked with a single argument "
4198 "argument, I<mstatus>, that indicates what type of inconsistency was "
4199 "detected.  If I<abortfunc> is NULL, a default function prints an error "
4200 "message on I<stderr> and calls B<abort>(3)."
4201 msgstr ""
4202
4203 #. type: Plain text
4204 #: build/C/man3/mcheck.3:103
4205 msgid ""
4206 "The B<mprobe>()  function performs a consistency check on the block of "
4207 "allocated memory pointed to by I<ptr>.  The B<mcheck>()  function should be "
4208 "called beforehand (otherwise B<mprobe>()  returns B<MCHECK_DISABLED>)."
4209 msgstr ""
4210
4211 #. type: Plain text
4212 #: build/C/man3/mcheck.3:111
4213 msgid ""
4214 "The following list describes the values returned by B<mprobe>()  or passed "
4215 "as the I<mstatus> argument when I<abortfunc> is invoked:"
4216 msgstr ""
4217
4218 #. type: TP
4219 #: build/C/man3/mcheck.3:111
4220 #, no-wrap
4221 msgid "B<MCHECK_DISABLED> (B<mprobe>() only)"
4222 msgstr ""
4223
4224 #. type: Plain text
4225 #: build/C/man3/mcheck.3:116
4226 msgid ""
4227 "B<mcheck>()  was not called before the first memory allocation function was "
4228 "called.  Consistency checking is not possible."
4229 msgstr ""
4230
4231 #. type: TP
4232 #: build/C/man3/mcheck.3:116
4233 #, no-wrap
4234 msgid "B<MCHECK_OK> (B<mprobe>() only)"
4235 msgstr ""
4236
4237 #. type: Plain text
4238 #: build/C/man3/mcheck.3:119
4239 msgid "No inconsistency detected."
4240 msgstr ""
4241
4242 #. type: TP
4243 #: build/C/man3/mcheck.3:119
4244 #, no-wrap
4245 msgid "B<MCHECK_HEAD>"
4246 msgstr "B<MCHECK_HEAD>"
4247
4248 #. type: Plain text
4249 #: build/C/man3/mcheck.3:122
4250 msgid "Memory preceding an allocated block was clobbered."
4251 msgstr ""
4252
4253 #. type: TP
4254 #: build/C/man3/mcheck.3:122
4255 #, no-wrap
4256 msgid "B<MCHECK_TAIL>"
4257 msgstr "B<MCHECK_TAIL>"
4258
4259 #. type: Plain text
4260 #: build/C/man3/mcheck.3:125
4261 msgid "Memory following an allocated block was clobbered."
4262 msgstr ""
4263
4264 #. type: TP
4265 #: build/C/man3/mcheck.3:125
4266 #, no-wrap
4267 msgid "B<MCHECK_FREE>"
4268 msgstr "B<MCHECK_FREE>"
4269
4270 #. type: Plain text
4271 #: build/C/man3/mcheck.3:129
4272 msgid "A block of memory was freed twice."
4273 msgstr ""
4274
4275 #. type: Plain text
4276 #: build/C/man3/mcheck.3:134
4277 msgid ""
4278 "B<mcheck>()  and B<mcheck_pedantic>()  return 0 on success, or -1 on error."
4279 msgstr ""
4280
4281 #. type: Plain text
4282 #: build/C/man3/mcheck.3:145
4283 msgid ""
4284 "The B<mcheck_pedantic>()  and B<mcheck_check_all>()  functions are available "
4285 "since glibc 2.2.  The B<mcheck>()  and B<mprobe>()  functions are present "
4286 "since at least glibc 2.0"
4287 msgstr ""
4288
4289 #.  But is MALLOC_CHECK_ slower?
4290 #. type: Plain text
4291 #: build/C/man3/mcheck.3:159
4292 msgid ""
4293 "Linking a program with I<-lmcheck> and using the B<MALLOC_CHECK_> "
4294 "environment variable (described in B<mallopt>(3))  cause the same kinds of "
4295 "errors to be detected.  But, using B<MALLOC_CHECK_> does not require the "
4296 "application to be relinked."
4297 msgstr ""
4298
4299 #. type: Plain text
4300 #: build/C/man3/mcheck.3:165
4301 msgid ""
4302 "The program below calls B<mcheck>()  with a NULL argument and then frees the "
4303 "same block of memory twice.  The following shell session demonstrates what "
4304 "happens when running the program:"
4305 msgstr ""
4306
4307 #. type: Plain text
4308 #: build/C/man3/mcheck.3:170
4309 #, no-wrap
4310 msgid ""
4311 "$B< ./a.out>\n"
4312 "About to free\n"
4313 msgstr ""
4314
4315 #. type: Plain text
4316 #: build/C/man3/mcheck.3:174
4317 #, no-wrap
4318 msgid ""
4319 "About to free a second time\n"
4320 "block freed twice\n"
4321 "Aborted (core dumped)\n"
4322 msgstr ""
4323
4324 #. type: Plain text
4325 #: build/C/man3/mcheck.3:182
4326 #, no-wrap
4327 msgid ""
4328 "#include E<lt>stdlib.hE<gt>\n"
4329 "#include E<lt>stdio.hE<gt>\n"
4330 "#include E<lt>mcheck.hE<gt>\n"
4331 msgstr ""
4332 "#include E<lt>stdlib.hE<gt>\n"
4333 "#include E<lt>stdio.hE<gt>\n"
4334 "#include E<lt>mcheck.hE<gt>\n"
4335
4336 #. type: Plain text
4337 #: build/C/man3/mcheck.3:190
4338 #, no-wrap
4339 msgid ""
4340 "    if (mcheck(NULL) != 0) {\n"
4341 "        fprintf(stderr, \"mcheck() failed\\en\");\n"
4342 msgstr ""
4343
4344 #. type: Plain text
4345 #: build/C/man3/mcheck.3:193
4346 #, no-wrap
4347 msgid ""
4348 "        exit(EXIT_FAILURE);\n"
4349 "    }\n"
4350 msgstr ""
4351 "        exit(EXIT_FAILURE);\n"
4352 "    }\n"
4353
4354 #. type: Plain text
4355 #: build/C/man3/mcheck.3:195
4356 #, no-wrap
4357 msgid "    p = malloc(1000);\n"
4358 msgstr "    p = malloc(1000);\n"
4359
4360 #. type: Plain text
4361 #: build/C/man3/mcheck.3:200
4362 #, no-wrap
4363 msgid ""
4364 "    fprintf(stderr, \"About to free\\en\");\n"
4365 "    free(p);\n"
4366 "    fprintf(stderr, \"\\enAbout to free a second time\\en\");\n"
4367 "    free(p);\n"
4368 msgstr ""
4369
4370 #. type: Plain text
4371 #: build/C/man3/mcheck.3:208
4372 msgid "B<malloc>(3), B<mallopt>(3), B<mtrace>(3)"
4373 msgstr "B<malloc>(3), B<mallopt>(3), B<mtrace>(3)"
4374
4375 #. type: TH
4376 #: build/C/man2/mlock.2:26
4377 #, no-wrap
4378 msgid "MLOCK"
4379 msgstr "MLOCK"
4380
4381 #. type: TH
4382 #: build/C/man2/mlock.2:26
4383 #, no-wrap
4384 msgid "2011-09-14"
4385 msgstr "2011-09-14"
4386
4387 #. type: Plain text
4388 #: build/C/man2/mlock.2:29
4389 msgid "mlock, munlock, mlockall, munlockall - lock and unlock memory"
4390 msgstr "mlock - メモリのロックとロック解除を行う"
4391
4392 #. type: Plain text
4393 #: build/C/man2/mlock.2:32 build/C/man2/mmap.2:46 build/C/man2/mmap2.2:35
4394 #: build/C/man2/mprotect.2:44 build/C/man2/mremap.2:38
4395 #, no-wrap
4396 msgid "B<#include E<lt>sys/mman.hE<gt>>\n"
4397 msgstr "B<#include E<lt>sys/mman.hE<gt>>\n"
4398
4399 #. type: Plain text
4400 #: build/C/man2/mlock.2:35
4401 #, no-wrap
4402 msgid ""
4403 "B<int mlock(const void *>I<addr>B<, size_t >I<len>B<);>\n"
4404 "B<int munlock(const void *>I<addr>B<, size_t >I<len>B<);>\n"
4405 msgstr ""
4406 "B<int mlock(const void *>I<addr>B<, size_t >I<len>B<);>\n"
4407 "B<int munlock(const void *>I<addr>B<, size_t >I<len>B<);>\n"
4408
4409 #. type: Plain text
4410 #: build/C/man2/mlock.2:38
4411 #, no-wrap
4412 msgid ""
4413 "B<int mlockall(int >I<flags>B<);>\n"
4414 "B<int munlockall(void);>\n"
4415 msgstr ""
4416 "B<int mlockall(int >I<flags>B<);>\n"
4417 "B<int munlockall(void);>\n"
4418
4419 #. type: Plain text
4420 #: build/C/man2/mlock.2:54
4421 msgid ""
4422 "B<mlock>()  and B<mlockall>()  respectively lock part or all of the calling "
4423 "process's virtual address space into RAM, preventing that memory from being "
4424 "paged to the swap area.  B<munlock>()  and B<munlockall>()  perform the "
4425 "converse operation, respectively unlocking part or all of the calling "
4426 "process's virtual address space, so that pages in the specified virtual "
4427 "address range may once more to be swapped out if required by the kernel "
4428 "memory manager.  Memory locking and unlocking are performed in units of "
4429 "whole pages."
4430 msgstr ""
4431 "B<mlock>()  と B<mlockall>()  はそれぞれ、呼び出し元プロセスの仮想アドレス空"
4432 "間の一部または全部を RAM 上にロックし、メモリがスワップエリアにページングされ"
4433 "るのを防ぐ。 B<munlock>()  と B<munlockall>()  は逆の操作で、それぞれ呼び出し"
4434 "元プロセスの仮想アドレス空間の一部または全部を ロック解除する。つまり、指定さ"
4435 "れた仮想アドレス範囲のページは カーネルメモリマネージャーから要求されればス"
4436 "ワップアウトするようになる。 メモリのロックとロック解除はページ単位で行われ"
4437 "る。"
4438
4439 #. type: SS
4440 #: build/C/man2/mlock.2:54
4441 #, no-wrap
4442 msgid "mlock() and munlock()"
4443 msgstr "mlock() と munlock()"
4444
4445 #. type: Plain text
4446 #: build/C/man2/mlock.2:64
4447 msgid ""
4448 "B<mlock>()  locks pages in the address range starting at I<addr> and "
4449 "continuing for I<len> bytes.  All pages that contain a part of the specified "
4450 "address range are guaranteed to be resident in RAM when the call returns "
4451 "successfully; the pages are guaranteed to stay in RAM until later unlocked."
4452 msgstr ""
4453 "B<mlock>()  は I<addr> から始まる長さ I<len> バイトのアドレス範囲のページを"
4454 "ロックする。 呼び出しが成功した場合には、 指定されたアドレス範囲を含む全ての"
4455 "ページは RAM に残り続けることが保証される。 これらのページは後でロック解除さ"
4456 "れるまで RAM に残り続けることが保証される。"
4457
4458 #. type: Plain text
4459 #: build/C/man2/mlock.2:73
4460 msgid ""
4461 "B<munlock>()  unlocks pages in the address range starting at I<addr> and "
4462 "continuing for I<len> bytes.  After this call, all pages that contain a part "
4463 "of the specified memory range can be moved to external swap space again by "
4464 "the kernel."
4465 msgstr ""
4466 "B<munlock>()  は、 I<addr> から始まる長さ I<len> バイトのアドレス範囲のページ"
4467 "のロックを解除する。 この呼び出しを行った後は、カーネルが、指定されたメモリ範"
4468 "囲を含む 全てのページを外部のスワップ空間に移動できるようになる。"
4469
4470 #. type: SS
4471 #: build/C/man2/mlock.2:73
4472 #, no-wrap
4473 msgid "mlockall() and munlockall()"
4474 msgstr "mlockall() と munlockall()"
4475
4476 #. type: Plain text
4477 #: build/C/man2/mlock.2:83
4478 msgid ""
4479 "B<mlockall>()  locks all pages mapped into the address space of the calling "
4480 "process.  This includes the pages of the code, data and stack segment, as "
4481 "well as shared libraries, user space kernel data, shared memory, and memory-"
4482 "mapped files.  All mapped pages are guaranteed to be resident in RAM when "
4483 "the call returns successfully; the pages are guaranteed to stay in RAM until "
4484 "later unlocked."
4485 msgstr ""
4486 "B<mlockall>()  は呼び出し元プロセスのアドレス空間にマップされている全てのペー"
4487 "ジを ロックする。これにはコード、データ、スタックの 各セグメント、共有ライブ"
4488 "ラリ、カーネルのユーザー空間データ、 共有メモリ、メモリ・マップされたファイル"
4489 "が含まれる。 システム・コールが成功した場合には全てのマップされたページは "
4490 "RAM に 残ることを保証される。 これらのページは後でロック解除されるまで RAM に"
4491 "残り続けることが保証される。"
4492
4493 #. type: Plain text
4494 #: build/C/man2/mlock.2:88
4495 msgid ""
4496 "The I<flags> argument is constructed as the bitwise OR of one or more of the "
4497 "following constants:"
4498 msgstr "I<flags> 引数は以下の内容の一つまたは複数のビット OR から構成される:"
4499
4500 #. type: TP
4501 #: build/C/man2/mlock.2:88
4502 #, no-wrap
4503 msgid "B<MCL_CURRENT>"
4504 msgstr "B<MCL_CURRENT>"
4505
4506 #. type: Plain text
4507 #: build/C/man2/mlock.2:92
4508 msgid ""
4509 "Lock all pages which are currently mapped into the address space of the "
4510 "process."
4511 msgstr ""
4512 "現在、プロセスのアドレス空間にマップされている全てのページをロックする。"
4513
4514 #. type: TP
4515 #: build/C/man2/mlock.2:92
4516 #, no-wrap
4517 msgid "B<MCL_FUTURE>"
4518 msgstr "B<MCL_FUTURE>"
4519
4520 #. type: Plain text
4521 #: build/C/man2/mlock.2:99
4522 msgid ""
4523 "Lock all pages which will become mapped into the address space of the "
4524 "process in the future.  These could be for instance new pages required by a "
4525 "growing heap and stack as well as new memory mapped files or shared memory "
4526 "regions."
4527 msgstr ""
4528 "将来、プロセスのアドレス空間にマップされる全てのページをロックする。 例えば、"
4529 "ヒープ (heap) やスタックの成長により新しく必要になったページだけで なく、新し"
4530 "くメモリマップされたファイルや共有メモリ領域もロックされる。"
4531
4532 #. type: Plain text
4533 #: build/C/man2/mlock.2:112
4534 msgid ""
4535 "If B<MCL_FUTURE> has been specified, then a later system call (e.g., B<mmap>"
4536 "(2), B<sbrk>(2), B<malloc>(3)), may fail if it would cause the number of "
4537 "locked bytes to exceed the permitted maximum (see below).  In the same "
4538 "circumstances, stack growth may likewise fail: the kernel will deny stack "
4539 "expansion and deliver a B<SIGSEGV> signal to the process."
4540 msgstr ""
4541 "B<MCL_FUTURE> が指定されていると、以後のシステムコール (例えば、 B<mmap>(2), "
4542 "B<sbrk>(2), B<malloc>(3))  は、ロックするバイト数が許可された最大値 (下記参"
4543 "照) を超えた場合に 失敗する可能性がある。 同様に、スタックの成長も失敗する可"
4544 "能性がある。 その場合、カーネルはスタックの拡張を拒否し、 B<SIGSEGV> をプロセ"
4545 "スに送る。"
4546
4547 #. type: Plain text
4548 #: build/C/man2/mlock.2:116
4549 msgid ""
4550 "B<munlockall>()  unlocks all pages mapped into the address space of the "
4551 "calling process."
4552 msgstr ""
4553 "B<munlockall>()  は、呼び出し元プロセスのアドレス空間にマッピングされている "
4554 "全てのページをロック解除する。"
4555
4556 #. type: Plain text
4557 #: build/C/man2/mlock.2:122
4558 msgid ""
4559 "On success these system calls return 0.  On error, -1 is returned, I<errno> "
4560 "is set appropriately, and no changes are made to any locks in the address "
4561 "space of the process."
4562 msgstr ""
4563 "成功した場合は、これらのシステムコールはゼロを返す。 エラーの場合は -1 が返さ"
4564 "れ、 I<errno> が適切に設定され、プロセスのアドレス空間におけるロックは変更さ"
4565 "れない。"
4566
4567 #. type: Plain text
4568 #: build/C/man2/mlock.2:131
4569 msgid ""
4570 "(Linux 2.6.9 and later) the caller had a nonzero B<RLIMIT_MEMLOCK> soft "
4571 "resource limit, but tried to lock more memory than the limit permitted.  "
4572 "This limit is not enforced if the process is privileged (B<CAP_IPC_LOCK>)."
4573 msgstr ""
4574 "(Linux 2.6.9 以降) 呼び出し元は非ゼロの ソフト資源制限 B<RLIMIT_MEMLOCK> を持"
4575 "つが、制限が許可している以上のメモリをロックしようとした。 この制限は、プロセ"
4576 "スが特権 (B<CAP_IPC_LOCK>)  を持っている場合は適用されない。"
4577
4578 #.  In the case of mlock(), this check is somewhat buggy: it doesn't
4579 #.  take into account whether the to-be-locked range overlaps with
4580 #.  already locked pages.  Thus, suppose we allocate
4581 #.  (num_physpages / 4 + 1) of memory, and lock those pages once using
4582 #.  mlock(), and then lock the *same* page range a second time.
4583 #.  In the case, the second mlock() call will fail, since the check
4584 #.  calculates that the process is trying to lock (num_physpages / 2 + 2)
4585 #.  pages, which of course is not true.  (MTK, Nov 04, kernel 2.4.28)
4586 #. type: Plain text
4587 #: build/C/man2/mlock.2:143
4588 msgid ""
4589 "(Linux 2.4 and earlier) the calling process tried to lock more than half of "
4590 "RAM."
4591 msgstr ""
4592 "(Linux 2.4 以前) 呼び出し元プロセスが RAM の半分以上をロックしようとした。"
4593
4594 #. SVr4 documents an additional EAGAIN error code.
4595 #. type: Plain text
4596 #: build/C/man2/mlock.2:149
4597 msgid ""
4598 "The caller is not privileged, but needs privilege (B<CAP_IPC_LOCK>)  to "
4599 "perform the requested operation."
4600 msgstr ""
4601 "呼び出し側が特権を持っていないが、\n"
4602 "要求された操作を実行するには特権 (B<CAP_IPC_LOCK>) が必要である。"
4603
4604 #. type: Plain text
4605 #: build/C/man2/mlock.2:154
4606 msgid "For B<mlock>()  and B<munlock>():"
4607 msgstr "B<mlock>()  と B<munlock>()  用として:"
4608
4609 #. type: Plain text
4610 #: build/C/man2/mlock.2:157
4611 msgid "Some or all of the specified address range could not be locked."
4612 msgstr "指定されたアドレス範囲の一部または全てをロックすることができなかった。"
4613
4614 #. type: Plain text
4615 #: build/C/man2/mlock.2:164
4616 msgid ""
4617 "The result of the addition I<start>+I<len> was less than I<start> (e.g., the "
4618 "addition may have resulted in an overflow)."
4619 msgstr ""
4620 "I<start>+I<len> の加算の結果が I<start> よりも小さかった\n"
4621 "(例えば、加算でオーバーフローが発生したなど)。"
4622
4623 #. type: Plain text
4624 #: build/C/man2/mlock.2:169
4625 msgid "(Not on Linux)  I<addr> was not a multiple of the page size."
4626 msgstr ""
4627 "(Linux ではこの意味で使われない)  I<addr> がページサイズの倍数ではない。"
4628
4629 #. type: Plain text
4630 #: build/C/man2/mlock.2:173
4631 msgid ""
4632 "Some of the specified address range does not correspond to mapped pages in "
4633 "the address space of the process."
4634 msgstr ""
4635 "指定されたアドレス範囲がプロセスのアドレス空間にマップされたページと 一致しな"
4636 "い。"
4637
4638 #. type: Plain text
4639 #: build/C/man2/mlock.2:176
4640 msgid "For B<mlockall>():"
4641 msgstr "B<mlockall>()  用として:"
4642
4643 #. type: Plain text
4644 #: build/C/man2/mlock.2:179
4645 msgid "Unknown I<flags> were specified."
4646 msgstr "未知の I<flags> が指定された。"
4647
4648 #. type: Plain text
4649 #: build/C/man2/mlock.2:182
4650 msgid "For B<munlockall>():"
4651 msgstr "B<munlockall>()  用として:"
4652
4653 #. type: Plain text
4654 #: build/C/man2/mlock.2:186
4655 msgid ""
4656 "(Linux 2.6.8 and earlier) The caller was not privileged (B<CAP_IPC_LOCK>)."
4657 msgstr ""
4658 "(Linux 2.6.8 以前) 呼び出し元が権限 (B<CAP_IPC_LOCK>)  を持っていない。"
4659
4660 #. type: Plain text
4661 #: build/C/man2/mlock.2:188
4662 msgid "POSIX.1-2001, SVr4."
4663 msgstr "POSIX.1-2001, SVr4."
4664
4665 #. type: SH
4666 #: build/C/man2/mlock.2:188 build/C/man2/mmap.2:501 build/C/man2/msync.2:105
4667 #, no-wrap
4668 msgid "AVAILABILITY"
4669 msgstr "可用性"
4670
4671 #. type: Plain text
4672 #: build/C/man2/mlock.2:200
4673 msgid ""
4674 "On POSIX systems on which B<mlock>()  and B<munlock>()  are available, "
4675 "B<_POSIX_MEMLOCK_RANGE> is defined in I<E<lt>unistd.hE<gt>> and the number "
4676 "of bytes in a page can be determined from the constant B<PAGESIZE> (if "
4677 "defined) in I<E<lt>limits.hE<gt>> or by calling I<sysconf(_SC_PAGESIZE)>."
4678 msgstr ""
4679 "B<mlock>()  と B<munlock>()  が使用可能な POSIX システムでは "
4680 "B<_POSIX_MEMLOCK_RANGE> が I<E<lt>unistd.hE<gt>> で定義されている。 また、"
4681 "ページあたりのバイト数は、 I<E<lt>limits.hE<gt>> で定義される定数 "
4682 "B<PAGESIZE> から (定義されている場合)、もしくは I<sysconf(_SC_PAGESIZE)> を呼"
4683 "び出すことで決定できる。"
4684
4685 #.  POSIX.1-2001: It shall be defined to -1 or 0 or 200112L.
4686 #.  -1: unavailable, 0: ask using sysconf().
4687 #.  glibc defines it to 1.
4688 #. type: Plain text
4689 #: build/C/man2/mlock.2:213
4690 msgid ""
4691 "On POSIX systems on which B<mlockall>()  and B<munlockall>()  are available, "
4692 "B<_POSIX_MEMLOCK> is defined in I<E<lt>unistd.hE<gt>> to a value greater "
4693 "than 0.  (See also B<sysconf>(3).)"
4694 msgstr ""
4695 "B<mlockall>()  と B<munlockall>()  が利用可能な POSIX システムでは、 "
4696 "B<_POSIX_MEMLOCK> は I<E<lt>unistd.hE<gt>> で 0 より大きい値に定義されている "
4697 "(B<sysconf>(3)  も参照のこと)。"
4698
4699 #. type: Plain text
4700 #: build/C/man2/mlock.2:231
4701 msgid ""
4702 "Memory locking has two main applications: real-time algorithms and high-"
4703 "security data processing.  Real-time applications require deterministic "
4704 "timing, and, like scheduling, paging is one major cause of unexpected "
4705 "program execution delays.  Real-time applications will usually also switch "
4706 "to a real-time scheduler with B<sched_setscheduler>(2).  Cryptographic "
4707 "security software often handles critical bytes like passwords or secret keys "
4708 "as data structures.  As a result of paging, these secrets could be "
4709 "transferred onto a persistent swap store medium, where they might be "
4710 "accessible to the enemy long after the security software has erased the "
4711 "secrets in RAM and terminated.  (But be aware that the suspend mode on "
4712 "laptops and some desktop computers will save a copy of the system's RAM to "
4713 "disk, regardless of memory locks.)"
4714 msgstr ""
4715 "メモリのロックの用途としては主に二つある: リアルタイム アルゴリズムと高いセ"
4716 "キュリティの必要なデータ処理である。リアルタイムの アプリケーションは決定的な"
4717 "タイミングやスケジューリングを必要とするが、 ページングは予期しないプログラム"
4718 "の実行遅延をもたらす主要な要因となる。 リアルタイムのアプリケーションはたいて"
4719 "いは B<sched_setscheduler>(2)  でリアルタイムスケジューラに変更される。 暗号"
4720 "やセキュリティのソフトウェアはしばしばパスワードや秘密鍵のデータの ような重要"
4721 "なバイト列を扱う。ページングの結果、これらの秘密が スワップ用の固定媒体に転送"
4722 "されるかもしれない。そして、セキュリティ・ ソフトウェアが RAM 上の秘密を削除"
4723 "して終了したずっと後になっても、 このスワップされたデータには敵がアクセスでき"
4724 "る可能性がある (しかし、ラップトップといくつかのデスクトップコンピュータの サ"
4725 "スペンドモードはシステムの RAM の内容をメモリのロックに関わらず ディスクに保"
4726 "存することに注意)。"
4727
4728 #. type: Plain text
4729 #: build/C/man2/mlock.2:244
4730 msgid ""
4731 "Real-time processes that are using B<mlockall>()  to prevent delays on page "
4732 "faults should reserve enough locked stack pages before entering the time-"
4733 "critical section, so that no page fault can be caused by function calls.  "
4734 "This can be achieved by calling a function that allocates a sufficiently "
4735 "large automatic variable (an array) and writes to the memory occupied by "
4736 "this array in order to touch these stack pages.  This way, enough pages will "
4737 "be mapped for the stack and can be locked into RAM.  The dummy writes ensure "
4738 "that not even copy-on-write page faults can occur in the critical section."
4739 msgstr ""
4740 "リアルタイムプロセスが B<mlockall>()  を使ってページフォールトによる遅延を防"
4741 "ごうとする場合、 関数呼び出しによってページフォールトが発生しないように、 時"
4742 "間制限の厳しい部分 (time-critical section) に入る前に 十分な量のロックされた"
4743 "スタックを確保しておく必要がある。 これを実現するには、十分な大きさの自動変"
4744 "数 (の配列) を確保し、 これらのスタック用のページがメモリ上に確保されるように"
4745 "この配列に 書き込みを行う関数を用意し、これを呼び出せばよい。こうすること"
4746 "で、 十分な量のページがスタックにマッピングされ、RAM にロックされる。 ダミー"
4747 "の書き込みを行うことによって、 時間制限の厳しい部分 (critical section) 内では"
4748 "書き込み時コピーによる ページフォールトさえも発生しないことが保証される。"
4749
4750 #. type: Plain text
4751 #: build/C/man2/mlock.2:250
4752 msgid ""
4753 "Memory locks are not inherited by a child created via B<fork>(2)  and are "
4754 "automatically removed (unlocked) during an B<execve>(2)  or when the process "
4755 "terminates."
4756 msgstr ""
4757 "メモリロックは B<fork>(2)  で作成された子プロセスには継承されず、 B<execve>"
4758 "(2)  が呼ばれたり、プロセスが終了した場合は 自動的に削除される (ロック解除さ"
4759 "れる)。"
4760
4761 #. type: Plain text
4762 #: build/C/man2/mlock.2:254
4763 msgid ""
4764 "The memory lock on an address range is automatically removed if the address "
4765 "range is unmapped via B<munmap>(2)."
4766 msgstr ""
4767 "あるアドレス範囲に対するメモリロックは、そのアドレス範囲が B<munmap>(2)  に"
4768 "よってアンマップされた場合は削除される。"
4769
4770 #. type: Plain text
4771 #: build/C/man2/mlock.2:267
4772 msgid ""
4773 "Memory locks do not stack, that is, pages which have been locked several "
4774 "times by calls to B<mlock>()  or B<mlockall>()  will be unlocked by a single "
4775 "call to B<munlock>()  for the corresponding range or by B<munlockall>().  "
4776 "Pages which are mapped to several locations or by several processes stay "
4777 "locked into RAM as long as they are locked at least at one location or by at "
4778 "least one process."
4779 msgstr ""
4780 "メモリのロックは累積しない。 すなわち複数回 B<mlock>()  や B<mlockall>()  を"
4781 "呼び出してロックされたページでも、 対応する範囲に対して B<munlock>()  を 1 回"
4782 "呼び出したり B<munlockall>()  を呼び出したりするだけでロック解除される。 複数"
4783 "の場所や複数のプロセスにマップされているページは、少なくとも一つの場所、 一つ"
4784 "のプロセスでロックされている限りは RAM に残り続ける。"
4785
4786 #. type: Plain text
4787 #: build/C/man2/mlock.2:278
4788 msgid ""
4789 "Under Linux, B<mlock>()  and B<munlock>()  automatically round I<addr> down "
4790 "to the nearest page boundary.  However, POSIX.1-2001 allows an "
4791 "implementation to require that I<addr> is page aligned, so portable "
4792 "applications should ensure this."
4793 msgstr ""
4794 "Linux では、 B<mlock>()  と B<munlock>()  は自動的に I<addr> を端数切り捨てに"
4795 "より一番近いページ境界へと丸める。 しかし POSIX.1-2001 は I<addr> がページ境"
4796 "界に合っていることを要求する実装も許している。 そのため移植性を意図したアプリ"
4797 "ケーションではきちんと境界に合わせた方が良い。"
4798
4799 #. type: Plain text
4800 #: build/C/man2/mlock.2:291
4801 msgid ""
4802 "The I<VmLck> field of the Linux-specific I</proc/PID/status> file shows how "
4803 "many kilobytes of memory the process with ID I<PID> has locked using B<mlock>"
4804 "(), B<mlockall>(), and B<mmap>(2)  B<MAP_LOCKED>."
4805 msgstr ""
4806 "Linux 固有の I</proc/PID/status> ファイルの I<VmLck> フィールドには、\n"
4807 "B<mlock>(), B<mlockall>() および B<mmap>(2) B<MAP_LOCKED> を使って、\n"
4808 "ID が I<PID> のプロセスがロックしているメモリ量 (キロバイト単位) が\n"
4809 "表示される。"
4810
4811 #. type: SS
4812 #: build/C/man2/mlock.2:291
4813 #, no-wrap
4814 msgid "Limits and permissions"
4815 msgstr "制限と権限"
4816
4817 #. type: Plain text
4818 #: build/C/man2/mlock.2:298
4819 msgid ""
4820 "In Linux 2.6.8 and earlier, a process must be privileged (B<CAP_IPC_LOCK>)  "
4821 "in order to lock memory and the B<RLIMIT_MEMLOCK> soft resource limit "
4822 "defines a limit on how much memory the process may lock."
4823 msgstr ""
4824 "Linux 2.6.8 以前では、メモリをロックするためには特権 (B<CAP_IPC_LOCK>)  が必"
4825 "要で、 ソフト資源制限 B<RLIMIT_MEMLOCK> はプロセスがどれだけのメモリをロック"
4826 "できるかの制限を定義する。"
4827
4828 #. type: Plain text
4829 #: build/C/man2/mlock.2:304
4830 msgid ""
4831 "Since Linux 2.6.9, no limits are placed on the amount of memory that a "
4832 "privileged process can lock and the B<RLIMIT_MEMLOCK> soft resource limit "
4833 "instead defines a limit on how much memory an unprivileged process may lock."
4834 msgstr ""
4835 "Linux 2.6.9 以降では、特権を持つプロセスがロックできるメモリ量は無制限とな"
4836 "り、 代わりにソフト資源制限 B<RLIMIT_MEMLOCK> は特権を持たないプロセスがロッ"
4837 "クできるメモリ量の制限を定義する。"
4838
4839 #. type: Plain text
4840 #: build/C/man2/mlock.2:312
4841 msgid ""
4842 "In the 2.4 series Linux kernels up to and including 2.4.17, a bug caused the "
4843 "B<mlockall>()  B<MCL_FUTURE> flag to be inherited across a B<fork>(2).  This "
4844 "was rectified in kernel 2.4.18."
4845 msgstr ""
4846 "2.4.17 までの 2.4 シリーズの Linux カーネルには、 B<mlockall>()  "
4847 "B<MCL_FUTURE> フラグが B<fork>(2)  で継承されると言うバグがある。 これはカー"
4848 "ネル 2.4.18 で修正された。"
4849
4850 #.  See the following LKML thread:
4851 #.  http://marc.theaimsgroup.com/?l=linux-kernel&m=113801392825023&w=2
4852 #.  "Rationale for RLIMIT_MEMLOCK"
4853 #.  23 Jan 2006
4854 #. type: Plain text
4855 #: build/C/man2/mlock.2:329
4856 msgid ""
4857 "Since kernel 2.6.9, if a privileged process calls I<mlockall(MCL_FUTURE)> "
4858 "and later drops privileges (loses the B<CAP_IPC_LOCK> capability by, for "
4859 "example, setting its effective UID to a nonzero value), then subsequent "
4860 "memory allocations (e.g., B<mmap>(2), B<brk>(2))  will fail if the "
4861 "B<RLIMIT_MEMLOCK> resource limit is encountered."
4862 msgstr ""
4863 "カーネル 2.6.9 以降では、特権を持ったプロセスが I<mlockall(MCL_FUTURE)> を呼"
4864 "び出した後で、特権をなくした場合 (例えば、 実効 UID を 0 以外の値に変更するな"
4865 "どにより、 B<CAP_IPC_LOCK> ケーパビリティを失った場合)、リソース上限 "
4866 "B<RLIMIT_MEMLOCK> に達すると、それ以降のメモリ割り当て (例えば B<mmap>(2), "
4867 "B<brk>(2))  は失敗する。"
4868
4869 #. type: Plain text
4870 #: build/C/man2/mlock.2:336
4871 msgid ""
4872 "B<mmap>(2), B<setrlimit>(2), B<shmctl>(2), B<sysconf>(3), B<proc>(5), "
4873 "B<capabilities>(7)"
4874 msgstr ""
4875 "B<mmap>(2), B<setrlimit>(2), B<shmctl>(2), B<sysconf>(3), B<proc>(5),\n"
4876 "B<capabilities>(7)"
4877
4878 #. type: TH
4879 #: build/C/man2/mmap.2:40
4880 #, no-wrap
4881 msgid "MMAP"
4882 msgstr "MMAP"
4883
4884 #. type: TH
4885 #: build/C/man2/mmap.2:40
4886 #, fuzzy, no-wrap
4887 #| msgid "2013-02-12"
4888 msgid "2013-04-17"
4889 msgstr "2013-02-12"
4890
4891 #. type: Plain text
4892 #: build/C/man2/mmap.2:43
4893 msgid "mmap, munmap - map or unmap files or devices into memory"
4894 msgstr "mmap, munmap - ファイルやデバイスをメモリにマップ/アンマップする"
4895
4896 #. type: Plain text
4897 #: build/C/man2/mmap.2:51
4898 #, no-wrap
4899 msgid ""
4900 "B<void *mmap(void *>I<addr>B<, size_t >I<length>B<, int >I<prot>B<, int >I<flags>B<,>\n"
4901 "B<           int >I<fd>B<, off_t >I<offset>B<);>\n"
4902 "B<int munmap(void *>I<addr>B<, size_t >I<length>B<);>\n"
4903 msgstr ""
4904 "B<void *mmap(void *>I<addr>B<, size_t >I<length>B<, int >I<prot>B<, int >I<flags>B<,>\n"
4905 "B<           int >I<fd>B<, off_t >I<offset>B<);>\n"
4906 "B<int munmap(void *>I<addr>B<, size_t >I<length>B<);>\n"
4907
4908 #. type: Plain text
4909 #: build/C/man2/mmap.2:54
4910 msgid "See NOTES for information on feature test macro requirements."
4911 msgstr ""
4912
4913 #. type: Plain text
4914 #: build/C/man2/mmap.2:63
4915 msgid ""
4916 "B<mmap>()  creates a new mapping in the virtual address space of the calling "
4917 "process.  The starting address for the new mapping is specified in I<addr>.  "
4918 "The I<length> argument specifies the length of the mapping."
4919 msgstr ""
4920 "B<mmap>()  は、新しいマッピングを呼び出し元プロセスの仮想アドレス空間に作成す"
4921 "る。 新しいマッピングの開始アドレスは I<addr> で指定される。マッピングの長さ"
4922 "は I<length> 引き数で指定される。"
4923
4924 #.  Before Linux 2.6.24, the address was rounded up to the next page
4925 #.  boundary; since 2.6.24, it is rounded down!
4926 #. type: Plain text
4927 #: build/C/man2/mmap.2:77
4928 msgid ""
4929 "If I<addr> is NULL, then the kernel chooses the address at which to create "
4930 "the mapping; this is the most portable method of creating a new mapping.  If "
4931 "I<addr> is not NULL, then the kernel takes it as a hint about where to place "
4932 "the mapping; on Linux, the mapping will be created at a nearby page "
4933 "boundary.  The address of the new mapping is returned as the result of the "
4934 "call."
4935 msgstr ""
4936 "I<addr> が NULL の場合、カーネルがマッピングを作成するアドレスを選択する。 こ"
4937 "の方法は最も移植性のある新しいマッピングの作成方法である。 I<addr> が NULL で"
4938 "ない場合、カーネルはマッピングをどこに配置するかのヒントとして I<addr> を使用"
4939 "する。Linux では、マッピングはすぐ近くのページ境界に作成される。 新しいマッピ"
4940 "ングのアドレスは、呼び出しの返り値として返される。"
4941
4942 #. type: Plain text
4943 #: build/C/man2/mmap.2:89
4944 msgid ""
4945 "The contents of a file mapping (as opposed to an anonymous mapping; see "
4946 "B<MAP_ANONYMOUS> below), are initialized using I<length> bytes starting at "
4947 "offset I<offset> in the file (or other object) referred to by the file "
4948 "descriptor I<fd>.  I<offset> must be a multiple of the page size as returned "
4949 "by I<sysconf(_SC_PAGE_SIZE)>."
4950 msgstr ""
4951 "ファイルマッピングの内容は、 ファイルディスクリプタ I<fd> で参照されるファイ"
4952 "ル (もしくは他のオブジェクト) のオフセット I<offset> から開始される "
4953 "I<length> バイトのデータで初期化される (ファイルマッピングは無名マッピングの"
4954 "反対語である。 B<MAP_ANONYMOUS> を参照)。 I<offset> は I<sysconf"
4955 "(_SC_PAGE_SIZE)> が返すページサイズの倍数でなければならない。"
4956
4957 #. type: Plain text
4958 #: build/C/man2/mmap.2:97
4959 msgid ""
4960 "The I<prot> argument describes the desired memory protection of the mapping "
4961 "(and must not conflict with the open mode of the file).  It is either "
4962 "B<PROT_NONE> or the bitwise OR of one or more of the following flags:"
4963 msgstr ""
4964 "引き数 I<prot> には、マッピングのメモリ保護をどのように行なうかを指定する "
4965 "(ファイルのオープンモードと矛盾してはいけない)。 I<prot> には、 B<PROT_NONE> "
4966 "か、以下のフラグをひとつ以上ビット毎の論理和 (OR) をとったものを 指定できる。"
4967
4968 #. type: TP
4969 #: build/C/man2/mmap.2:97 build/C/man2/mprotect.2:73
4970 #, no-wrap
4971 msgid "B<PROT_EXEC>"
4972 msgstr "B<PROT_EXEC>"
4973
4974 #. type: Plain text
4975 #: build/C/man2/mmap.2:100
4976 msgid "Pages may be executed."
4977 msgstr "ページは実行可能である。"
4978
4979 #. type: TP
4980 #: build/C/man2/mmap.2:100 build/C/man2/mprotect.2:67
4981 #, no-wrap
4982 msgid "B<PROT_READ>"
4983 msgstr "B<PROT_READ>"
4984
4985 #. type: Plain text
4986 #: build/C/man2/mmap.2:103
4987 msgid "Pages may be read."
4988 msgstr "ページは読み込み可能である。"
4989
4990 #. type: TP
4991 #: build/C/man2/mmap.2:103 build/C/man2/mprotect.2:70
4992 #, no-wrap
4993 msgid "B<PROT_WRITE>"
4994 msgstr "B<PROT_WRITE>"
4995
4996 #. type: Plain text
4997 #: build/C/man2/mmap.2:106
4998 msgid "Pages may be written."
4999 msgstr "ページに書き込み可能である。"
5000
5001 #. type: TP
5002 #: build/C/man2/mmap.2:106 build/C/man2/mprotect.2:64
5003 #, no-wrap
5004 msgid "B<PROT_NONE>"
5005 msgstr "B<PROT_NONE>"
5006
5007 #. type: Plain text
5008 #: build/C/man2/mmap.2:109
5009 msgid "Pages may not be accessed."
5010 msgstr "ページにはアクセスできない。"
5011
5012 #. type: Plain text
5013 #: build/C/man2/mmap.2:118
5014 msgid ""
5015 "The I<flags> argument determines whether updates to the mapping are visible "
5016 "to other processes mapping the same region, and whether updates are carried "
5017 "through to the underlying file.  This behavior is determined by including "
5018 "exactly one of the following values in I<flags>:"
5019 msgstr ""
5020 "I<flags> 引き数により、マッピングに対する更新が同じ領域をマッピングしている "
5021 "他のプロセスに見えるか、更新がマッピング元のファイルを通じて 伝えられるか、が"
5022 "決定される。この動作は、以下の値のいずれか一つだけ (複数は指定できない) を "
5023 "I<flags> に含めることで指定する。"
5024
5025 #. type: TP
5026 #: build/C/man2/mmap.2:118
5027 #, no-wrap
5028 msgid "B<MAP_SHARED>"
5029 msgstr "B<MAP_SHARED>"
5030
5031 #. type: Plain text
5032 #: build/C/man2/mmap.2:128
5033 msgid ""
5034 "Share this mapping.  Updates to the mapping are visible to other processes "
5035 "that map this file, and are carried through to the underlying file.  The "
5036 "file may not actually be updated until B<msync>(2)  or B<munmap>()  is "
5037 "called."
5038 msgstr ""
5039 "このマッピングを共有する。 マッピングに対する更新はこのファイルをマッピングし"
5040 "ている他のプロセス から見える。更新はマッピング元のファイルを通じて伝えられ"
5041 "る。 ただし、ファイルの実際の更新は B<msync>(2)  または B<munmap>()  が呼ばれ"
5042 "るまで行われないこともある。"
5043
5044 #. type: TP
5045 #: build/C/man2/mmap.2:128
5046 #, no-wrap
5047 msgid "B<MAP_PRIVATE>"
5048 msgstr "B<MAP_PRIVATE>"
5049
5050 #. type: Plain text
5051 #: build/C/man2/mmap.2:137
5052 msgid ""
5053 "Create a private copy-on-write mapping.  Updates to the mapping are not "
5054 "visible to other processes mapping the same file, and are not carried "
5055 "through to the underlying file.  It is unspecified whether changes made to "
5056 "the file after the B<mmap>()  call are visible in the mapped region."
5057 msgstr ""
5058 "プライベートな copy-on-write (書き込み時コピー) マップを生成する。 マッピング"
5059 "に対する更新は同じファイルをマッピングしている他のプロセス には見えず、更新が"
5060 "マッピング元のファイルを通じて伝えられることもない。 B<mmap>()  の呼び出し後"
5061 "にマッピング元のファイルに対して行われた変更が、 マップ領域に反映されるかどう"
5062 "かは規定されていない。"
5063
5064 #. type: Plain text
5065 #: build/C/man2/mmap.2:139
5066 msgid "Both of these flags are described in POSIX.1-2001."
5067 msgstr "上記の二つのフラグは POSIX.1-2001 で規定されている。"
5068
5069 #. type: Plain text
5070 #: build/C/man2/mmap.2:142
5071 msgid ""
5072 "In addition, zero or more of the following values can be ORed in I<flags>:"
5073 msgstr ""
5074 "さらに、以下の値のうち 0 個以上をビット毎の論理和 (OR) で I<flags> に指定する"
5075 "ことができる。"
5076
5077 #. type: TP
5078 #: build/C/man2/mmap.2:142
5079 #, no-wrap
5080 msgid "B<MAP_32BIT> (since Linux 2.4.20, 2.6)"
5081 msgstr "B<MAP_32BIT> (Linux 2.4.20, 2.6 以降)"
5082
5083 #.  See http://lwn.net/Articles/294642 "Tangled up in threads", 19 Aug 08
5084 #. type: Plain text
5085 #: build/C/man2/mmap.2:158
5086 #, fuzzy
5087 #| msgid ""
5088 #| "Put the mapping into the first 2 Gigabytes of the process address space.  "
5089 #| "This flag is only supported on x86-64, for 64-bit programs.  It was added "
5090 #| "to allow thread stacks to be allocated somewhere in the first 2GB of "
5091 #| "memory, so as to improve context-switch performance on some early 64-bit "
5092 #| "processors.  Modern x86-64 processors no longer have this performance "
5093 #| "problem, so use of this flag is not required on those systems.  The "
5094 #| "B<MAP_32BIT> flag is ignored when B<MAP_FIXED> is set."
5095 msgid ""
5096 "Put the mapping into the first 2 Gigabytes of the process address space.  "
5097 "This flag is supported only on x86-64, for 64-bit programs.  It was added to "
5098 "allow thread stacks to be allocated somewhere in the first 2GB of memory, so "
5099 "as to improve context-switch performance on some early 64-bit processors.  "
5100 "Modern x86-64 processors no longer have this performance problem, so use of "
5101 "this flag is not required on those systems.  The B<MAP_32BIT> flag is "
5102 "ignored when B<MAP_FIXED> is set."
5103 msgstr ""
5104 "マッピングをプロセスのアドレス空間の先頭 2 ギガバイト以内に配置する。 このフ"
5105 "ラグがサポートされているのは x86-64 アーキテクチャ上の 64 ビットプログラムの"
5106 "みである。 このフラグが追加されたのは、スレッドのスタックをメモリの先頭 2GB "
5107 "以内の どこかに割り当てることで、初期のいくつかの 64 ビットプロセッサにおけ"
5108 "る コンテキストスイッチの性能問題を改善するためである。 最近の x86-64 プロ"
5109 "セッサではこの性能問題はもはや存在せず、 そのようなシステムではこのフラグを使"
5110 "用する必要はない。 B<MAP_FIXED> がセットされている場合は、 B<MAP_32BIT> フラ"
5111 "グは無視される。"
5112
5113 #. type: TP
5114 #: build/C/man2/mmap.2:158
5115 #, no-wrap
5116 msgid "B<MAP_ANON>"
5117 msgstr "B<MAP_ANON>"
5118
5119 #. type: Plain text
5120 #: build/C/man2/mmap.2:163
5121 msgid "Synonym for B<MAP_ANONYMOUS>.  Deprecated."
5122 msgstr "B<MAP_ANONYMOUS> の同義語。非推奨。"
5123
5124 #. type: TP
5125 #: build/C/man2/mmap.2:163
5126 #, no-wrap
5127 msgid "B<MAP_ANONYMOUS>"
5128 msgstr "B<MAP_ANONYMOUS>"
5129
5130 #. type: Plain text
5131 #: build/C/man2/mmap.2:185
5132 #, fuzzy
5133 #| msgid ""
5134 #| "The mapping is not backed by any file; its contents are initialized to "
5135 #| "zero.  The I<fd> and I<offset> arguments are ignored; however, some "
5136 #| "implementations require I<fd> to be -1 if B<MAP_ANONYMOUS> (or "
5137 #| "B<MAP_ANON>)  is specified, and portable applications should ensure "
5138 #| "this.  The use of B<MAP_ANONYMOUS> in conjunction with B<MAP_SHARED> is "
5139 #| "only supported on Linux since kernel 2.4."
5140 msgid ""
5141 "The mapping is not backed by any file; its contents are initialized to "
5142 "zero.  The I<fd> and I<offset> arguments are ignored; however, some "
5143 "implementations require I<fd> to be -1 if B<MAP_ANONYMOUS> (or B<MAP_ANON>)  "
5144 "is specified, and portable applications should ensure this.  The use of "
5145 "B<MAP_ANONYMOUS> in conjunction with B<MAP_SHARED> is supported on Linux "
5146 "only since kernel 2.4."
5147 msgstr ""
5148 "マッピングはどのファイルとも関連付けされない。 マッピングの内容は 0 で初期化"
5149 "される。 引き数 I<fd> と I<offset> は無視される。 ただし、実装によっては "
5150 "B<MAP_ANONYMOUS> (もしくは B<MAP_ANON>)  が指定された場合、 I<fd> を -1 にす"
5151 "る必要があり、 移植性が必要なアプリケーションでは必ず I<fd> を -1 にすべきで"
5152 "ある。 B<MAP_ANONYMOUS> と B<MAP_SHARED> を組み合わせての利用は カーネル 2.4 "
5153 "以降の Linux でのみサポートされている。"
5154
5155 #. type: TP
5156 #: build/C/man2/mmap.2:185
5157 #, no-wrap
5158 msgid "B<MAP_DENYWRITE>"
5159 msgstr "B<MAP_DENYWRITE>"
5160
5161 #.  Introduced in 1.1.36, removed in 1.3.24.
5162 #. type: Plain text
5163 #: build/C/man2/mmap.2:193
5164 msgid ""
5165 "This flag is ignored.  (Long ago, it signaled that attempts to write to the "
5166 "underlying file should fail with B<ETXTBUSY>.  But this was a source of "
5167 "denial-of-service attacks.)"
5168 msgstr ""
5169 "このフラグは無視される (ずっと前は、マップ元のファイルへの書き込みを行おうと"
5170 "すると、エラー B<ETXTBUSY> で失敗するようにシグナルが設定されていたが、これ"
5171 "は denial-of-service (サービス拒否) 攻撃の原因となった)。"
5172
5173 #. type: TP
5174 #: build/C/man2/mmap.2:193
5175 #, no-wrap
5176 msgid "B<MAP_EXECUTABLE>"
5177 msgstr "B<MAP_EXECUTABLE>"
5178
5179 #.  Introduced in 1.1.38, removed in 1.3.24. Flag tested in proc_follow_link.
5180 #.  (Long ago, it signaled that the underlying file is an executable.
5181 #.  However, that information was not really used anywhere.)
5182 #.  Linus talked about DOS related to MAP_EXECUTABLE, but he was thinking of
5183 #.  MAP_DENYWRITE?
5184 #. type: Plain text
5185 #: build/C/man2/mmap.2:201
5186 msgid "This flag is ignored."
5187 msgstr "このフラグは無視される。"
5188
5189 #. type: TP
5190 #: build/C/man2/mmap.2:201
5191 #, no-wrap
5192 msgid "B<MAP_FILE>"
5193 msgstr "B<MAP_FILE>"
5194
5195 #.  On some systems, this was required as the opposite of
5196 #.  MAP_ANONYMOUS -- mtk, 1 May 2007
5197 #. type: Plain text
5198 #: build/C/man2/mmap.2:207
5199 msgid "Compatibility flag.  Ignored."
5200 msgstr "互換性のためのフラグ。無視される。"
5201
5202 #. type: TP
5203 #: build/C/man2/mmap.2:207
5204 #, no-wrap
5205 msgid "B<MAP_FIXED>"
5206 msgstr "B<MAP_FIXED>"
5207
5208 #. type: Plain text
5209 #: build/C/man2/mmap.2:225
5210 msgid ""
5211 "Don't interpret I<addr> as a hint: place the mapping at exactly that "
5212 "address.  I<addr> must be a multiple of the page size.  If the memory region "
5213 "specified by I<addr> and I<len> overlaps pages of any existing mapping(s), "
5214 "then the overlapped part of the existing mapping(s) will be discarded.  If "
5215 "the specified address cannot be used, B<mmap>()  will fail.  Because "
5216 "requiring a fixed address for a mapping is less portable, the use of this "
5217 "option is discouraged."
5218 msgstr ""
5219 "I<addr> をアドレスのヒントとして使用するのではなく、 I<addr> で指定されたアド"
5220 "レスをそのまま使用してマッピングを配置する。 I<addr> はページサイズの倍数でな"
5221 "ければならない。 I<addr> と I<len> で指定されたメモリ領域が既存のマッピングの"
5222 "ページと重なる場合、 既存のマッピングの重なった部分は捨てられる。 もし指定さ"
5223 "れたアドレスが使用できない場合、 B<mmap>()  は失敗する。 マッピングに対して固"
5224 "定アドレスを要求するのは移植性の面で劣るので、 このオプションは使用しないこと"
5225 "を推奨する。"
5226
5227 #. type: TP
5228 #: build/C/man2/mmap.2:225
5229 #, no-wrap
5230 msgid "B<MAP_GROWSDOWN>"
5231 msgstr "B<MAP_GROWSDOWN>"
5232
5233 #. type: Plain text
5234 #: build/C/man2/mmap.2:230
5235 msgid ""
5236 "Used for stacks.  Indicates to the kernel virtual memory system that the "
5237 "mapping should extend downward in memory."
5238 msgstr ""
5239 "スタック用に使用される。マッピングをメモリ内で逆向きに行うことを カーネル仮想"
5240 "メモリシステムに指示する。 (訳注:マッピングは通常はメモリ・アドレスが増加す"
5241 "る向きに行うが、 このオプションを指定すると逆向きにマッピングを行う)"
5242
5243 #. type: TP
5244 #: build/C/man2/mmap.2:230
5245 #, no-wrap
5246 msgid "B<MAP_HUGETLB> (since Linux 2.6.32)"
5247 msgstr "B<MAP_HUGETLB> (Linux 2.6.32 以降)"
5248
5249 #. type: Plain text
5250 #: build/C/man2/mmap.2:236
5251 msgid ""
5252 "Allocate the mapping using \"huge pages.\" See the Linux kernel source file "
5253 "I<Documentation/vm/hugetlbpage.txt> for further information."
5254 msgstr ""
5255 "\"huge page\" を使ってマッピングを割り当てる。詳しい情報は、Linux カーネル"
5256 "ソースの I<Documentation/vm/hugetlbpage.txt> を参照。"
5257
5258 #. type: TP
5259 #: build/C/man2/mmap.2:236
5260 #, no-wrap
5261 msgid "B<MAP_LOCKED> (since Linux 2.5.37)"
5262 msgstr "B<MAP_LOCKED> (Linux 2.5.37 以降)"
5263
5264 #.  If set, the mapped pages will not be swapped out.
5265 #. type: Plain text
5266 #: build/C/man2/mmap.2:242
5267 msgid ""
5268 "Lock the pages of the mapped region into memory in the manner of B<mlock>"
5269 "(2).  This flag is ignored in older kernels."
5270 msgstr ""
5271 "マップされた領域のページを B<mlock>(2)  の方法でメモリ内にロックする。 それ以"
5272 "前のカーネルでは、このフラグは無視される。"
5273
5274 #. type: TP
5275 #: build/C/man2/mmap.2:242
5276 #, no-wrap
5277 msgid "B<MAP_NONBLOCK> (since Linux 2.5.46)"
5278 msgstr "B<MAP_NONBLOCK> (Linux 2.5.46 以降)"
5279
5280 #. type: Plain text
5281 #: build/C/man2/mmap.2:257
5282 #, fuzzy
5283 #| msgid ""
5284 #| "Only meaningful in conjunction with B<MAP_POPULATE>.  Don't perform read-"
5285 #| "ahead: only create page tables entries for pages that are already present "
5286 #| "in RAM.  Since Linux 2.6.23, this flag causes B<MAP_POPULATE> to do "
5287 #| "nothing.  One day the combination of B<MAP_POPULATE> and B<MAP_NONBLOCK> "
5288 #| "may be reimplemented."
5289 msgid ""
5290 "Only meaningful in conjunction with B<MAP_POPULATE>.  Don't perform read-"
5291 "ahead: create page tables entries only for pages that are already present in "
5292 "RAM.  Since Linux 2.6.23, this flag causes B<MAP_POPULATE> to do nothing.  "
5293 "One day the combination of B<MAP_POPULATE> and B<MAP_NONBLOCK> may be "
5294 "reimplemented."
5295 msgstr ""
5296 "B<MAP_POPULATE> と組み合わせた場合のみ意味を持つ。 read-ahead (前もって読み込"
5297 "むこと) を実行しない。 単に、すでに RAM 上に存在するページに対して ページテー"
5298 "ブルエントリを作成するだけである。 Linux 2.6.23 以降では、このフラグは "
5299 "B<MAP_POPULATE> に何の影響も与えない。 いつか B<MAP_POPULATE> と "
5300 "B<MAP_NONBLOCK> を組み合わせた場合の動作は実装し直されるかもしれない。"
5301
5302 #. type: TP
5303 #: build/C/man2/mmap.2:257
5304 #, no-wrap
5305 msgid "B<MAP_NORESERVE>"
5306 msgstr "B<MAP_NORESERVE>"
5307
5308 #. type: Plain text
5309 #: build/C/man2/mmap.2:272
5310 #, fuzzy
5311 #| msgid ""
5312 #| "Do not reserve swap space for this mapping.  When swap space is reserved, "
5313 #| "one has the guarantee that it is possible to modify the mapping.  When "
5314 #| "swap space is not reserved one might get B<SIGSEGV> upon a write if no "
5315 #| "physical memory is available.  See also the discussion of the file I</"
5316 #| "proc/sys/vm/overcommit_memory> in B<proc>(5).  In kernels before 2.6, "
5317 #| "this flag only had effect for private writable mappings."
5318 msgid ""
5319 "Do not reserve swap space for this mapping.  When swap space is reserved, "
5320 "one has the guarantee that it is possible to modify the mapping.  When swap "
5321 "space is not reserved one might get B<SIGSEGV> upon a write if no physical "
5322 "memory is available.  See also the discussion of the file I</proc/sys/vm/"
5323 "overcommit_memory> in B<proc>(5).  In kernels before 2.6, this flag had "
5324 "effect only for private writable mappings."
5325 msgstr ""
5326 "このマッピングに対するスワップ空間の予約を行わない。 スワップ空間を予約した場"
5327 "合は、このマッピングの変更が必ず可能なことが 保証される。予約を行わなかった場"
5328 "合、物理メモリに空きがないと 書き込み時に B<SIGSEGV> エラーを受け取ることがあ"
5329 "る。 B<proc>(5)  の I</proc/sys/vm/overcommit_memory> ファイルについての議論"
5330 "も参照。 バージョン 2.6 より前のカーネルでは、このフラグは書き込み可能な プラ"
5331 "イベート・マッピングについてのみ効果があった。"
5332
5333 #. type: TP
5334 #: build/C/man2/mmap.2:272
5335 #, no-wrap
5336 msgid "B<MAP_POPULATE> (since Linux 2.5.46)"
5337 msgstr "B<MAP_POPULATE> (Linux 2.5.46 以降)"
5338
5339 #. type: Plain text
5340 #: build/C/man2/mmap.2:279
5341 #, fuzzy
5342 #| msgid ""
5343 #| "Populate (prefault) page tables for a mapping.  For a file mapping, this "
5344 #| "causes read-ahead on the file.  Later accesses to the mapping will not be "
5345 #| "blocked by page faults.  B<MAP_POPULATE> is only supported for private "
5346 #| "mappings since Linux 2.6.23."
5347 msgid ""
5348 "Populate (prefault) page tables for a mapping.  For a file mapping, this "
5349 "causes read-ahead on the file.  Later accesses to the mapping will not be "
5350 "blocked by page faults.  B<MAP_POPULATE> is supported for private mappings "
5351 "only since Linux 2.6.23."
5352 msgstr ""
5353 "マッピング用のページテーブルを配置 (populate) する ファイルマッピングの場合に"
5354 "は、これによりファイルが先読み (read-ahead)  が行われる。この以後は、マッピン"
5355 "グに対するアクセスがページフォールトで ブロックされることがなくなる。 "
5356 "B<MAP_POPULATE> は Linux 2.6.23 以降でプライベート・マッピングについてのみ サ"
5357 "ポートされている。"
5358
5359 #. type: TP
5360 #: build/C/man2/mmap.2:279
5361 #, no-wrap
5362 msgid "B<MAP_STACK> (since Linux 2.6.27)"
5363 msgstr "B<MAP_STACK> (Linux 2.6.27 以降)"
5364
5365 #.  See http://lwn.net/Articles/294642 "Tangled up in threads", 19 Aug 08
5366 #.  commit cd98a04a59e2f94fa64d5bf1e26498d27427d5e7
5367 #.  http://thread.gmane.org/gmane.linux.kernel/720412
5368 #.  "pthread_create() slow for many threads; also time to revisit 64b
5369 #.   context switch optimization?"
5370 #. type: Plain text
5371 #: build/C/man2/mmap.2:292
5372 msgid ""
5373 "Allocate the mapping at an address suitable for a process or thread stack.  "
5374 "This flag is currently a no-op, but is used in the glibc threading "
5375 "implementation so that if some architectures require special treatment for "
5376 "stack allocations, support can later be transparently implemented for glibc."
5377 msgstr ""
5378 "プロセスやスレッドのスタックに適したアドレスにマッピングを割り当てる。 現在の"
5379 "ところ、このフラグは何もしないが、 glibc のスレッド実装では使用されている。 "
5380 "これは、いくつかのアーキテクチャではスタックの割り当てに関して特別な扱い が必"
5381 "要な場合に、glibc にそのサポートを後で透過的に実装できるようにする ためであ"
5382 "る。"
5383
5384 #. type: TP
5385 #: build/C/man2/mmap.2:292
5386 #, no-wrap
5387 msgid "B<MAP_UNINITIALIZED> (since Linux 2.6.33)"
5388 msgstr "B<MAP_UNINITIALIZED> (Linux 2.6.33 以降)"
5389
5390 #. type: Plain text
5391 #: build/C/man2/mmap.2:302
5392 #, fuzzy
5393 #| msgid ""
5394 #| "Don't clear anonymous pages.  This flag is intended to improve "
5395 #| "performance on embedded devices.  This flag is only honored if the kernel "
5396 #| "was configured with the B<CONFIG_MMAP_ALLOW_UNINITIALIZED> option.  "
5397 #| "Because of the security implications, that option is normally enabled "
5398 #| "only on embedded devices (i.e., devices where one has complete control of "
5399 #| "the contents of user memory)."
5400 msgid ""
5401 "Don't clear anonymous pages.  This flag is intended to improve performance "
5402 "on embedded devices.  This flag is honored only if the kernel was configured "
5403 "with the B<CONFIG_MMAP_ALLOW_UNINITIALIZED> option.  Because of the security "
5404 "implications, that option is normally enabled only on embedded devices (i."
5405 "e., devices where one has complete control of the contents of user memory)."
5406 msgstr ""
5407 "無名ページ (anonymous page) のクリアを行わない。このフラグは組み込みデバイ"
5408 "ス\n"
5409 "での性能向上を目的に作られてものである。カーネルの設定で\n"
5410 "B<CONFIG_MMAP_ALLOW_UNINITIALIZED> オプションが有効になっている場合のみ、\n"
5411 "このフラグは効果を持つ。\n"
5412 "セキュリティ面の考慮から、このオプションは通常組み込みデバイス (すなわち、\n"
5413 "ユーザメモリの内容を完全に制御化におけるデバイス) においてのみ有効にされる。"
5414
5415 #. type: Plain text
5416 #: build/C/man2/mmap.2:310
5417 msgid ""
5418 "Of the above flags, only B<MAP_FIXED> is specified in POSIX.1-2001.  "
5419 "However, most systems also support B<MAP_ANONYMOUS> (or its synonym "
5420 "B<MAP_ANON>)."
5421 msgstr ""
5422 "上記のフラグの中では、 B<MAP_FIXED> だけが POSIX.1-2001 で規定されている。 し"
5423 "かしながら、ほとんどのシステムで B<MAP_ANONYMOUS> (またはその同義語である "
5424 "B<MAP_ANON>)  もサポートされている。"
5425
5426 #. type: Plain text
5427 #: build/C/man2/mmap.2:317
5428 msgid ""
5429 "Some systems document the additional flags B<MAP_AUTOGROW>, "
5430 "B<MAP_AUTORESRV>, B<MAP_COPY>, and B<MAP_LOCAL>."
5431 msgstr ""
5432 "いくつかのシステムでは、上記以外にフラグとして B<MAP_AUTOGROW>, "
5433 "B<MAP_AUTORESRV>, B<MAP_COPY>, B<MAP_LOCAL> が規定されている。"
5434
5435 #. type: Plain text
5436 #: build/C/man2/mmap.2:323
5437 msgid ""
5438 "Memory mapped by B<mmap>()  is preserved across B<fork>(2), with the same "
5439 "attributes."
5440 msgstr ""
5441 "B<mmap>()  によってマップされたメモリの属性は B<fork>(2)  の際に継承される。"
5442
5443 #. type: Plain text
5444 #: build/C/man2/mmap.2:331
5445 msgid ""
5446 "A file is mapped in multiples of the page size.  For a file that is not a "
5447 "multiple of the page size, the remaining memory is zeroed when mapped, and "
5448 "writes to that region are not written out to the file.  The effect of "
5449 "changing the size of the underlying file of a mapping on the pages that "
5450 "correspond to added or removed regions of the file is unspecified."
5451 msgstr ""
5452 "ファイルはページサイズの整数倍の領域にマップされる。サイズがページサイズの 整"
5453 "数倍でないファイルの場合、マップ時に残りの領域は 0 で埋められ、この領域へ 書"
5454 "きこみを行ってもファイルに書き出されることはない。マッピングを行った元 ファイ"
5455 "ルのサイズを変更した場合、元ファイルの追加されたり削除された領域に対応 する"
5456 "マップされたページに対してどのような影響があるかは規定されていない。"
5457
5458 #. type: SS
5459 #: build/C/man2/mmap.2:331
5460 #, no-wrap
5461 msgid "munmap()"
5462 msgstr "munmap()"
5463
5464 #. type: Plain text
5465 #: build/C/man2/mmap.2:341
5466 msgid ""
5467 "The B<munmap>()  system call deletes the mappings for the specified address "
5468 "range, and causes further references to addresses within the range to "
5469 "generate invalid memory references.  The region is also automatically "
5470 "unmapped when the process is terminated.  On the other hand, closing the "
5471 "file descriptor does not unmap the region."
5472 msgstr ""
5473 "システムコール B<munmap>()  は指定されたアドレス範囲のマップを消去し、 これ以"
5474 "降のその範囲内へのメモリ参照は不正となる。 この領域は、プロセスが終了したとき"
5475 "にも自動的にアンマップされる。 一方、ファイル記述子をクローズしても、この領域"
5476 "はアンマップされない。"
5477
5478 #. type: Plain text
5479 #: build/C/man2/mmap.2:351
5480 msgid ""
5481 "The address I<addr> must be a multiple of the page size.  All pages "
5482 "containing a part of the indicated range are unmapped, and subsequent "
5483 "references to these pages will generate B<SIGSEGV>.  It is not an error if "
5484 "the indicated range does not contain any mapped pages."
5485 msgstr ""
5486 "I<addr> アドレスはページサイズの整数倍でなければならない。指定された範囲の一"
5487 "部分を 含む全てのページはアンマップされ、これ以降にこれらのページへの参照があ"
5488 "ると B<SIGSEGV> が発生する。 指定した範囲内にマップされたページが一つも含まれ"
5489 "ていない場合でも エラーにならない。"
5490
5491 #. type: SS
5492 #: build/C/man2/mmap.2:351
5493 #, no-wrap
5494 msgid "Timestamps changes for file-backed mappings"
5495 msgstr "ファイルと関連付けられたマッピングに対するタイムスタンプの更新"
5496
5497 #. type: Plain text
5498 #: build/C/man2/mmap.2:358
5499 msgid ""
5500 "For file-backed mappings, the I<st_atime> field for the mapped file may be "
5501 "updated at any time between the B<mmap>()  and the corresponding unmapping; "
5502 "the first reference to a mapped page will update the field if it has not "
5503 "been already."
5504 msgstr ""
5505 "ファイルと関連付けられたマッピングの場合、マッピングされたファイルの "
5506 "I<st_atime> フィールドは、 B<mmap>()  されてからアンマップ (unmap) されるまで"
5507 "の間に更新されることがある。 それまでに更新が行われていなければ、マップされた"
5508 "ページへの最初の参照があった 際に更新される。"
5509
5510 #. type: Plain text
5511 #: build/C/man2/mmap.2:375
5512 msgid ""
5513 "The I<st_ctime> and I<st_mtime> field for a file mapped with B<PROT_WRITE> "
5514 "and B<MAP_SHARED> will be updated after a write to the mapped region, and "
5515 "before a subsequent B<msync>(2)  with the B<MS_SYNC> or B<MS_ASYNC> flag, if "
5516 "one occurs."
5517 msgstr ""
5518 "B<PROT_WRITE> と B<MAP_SHARED> の両方を指定してマップされたファイルの場合、書"
5519 "き込みがあると、 I<st_ctime> と I<st_mtime> の両フィールドは、マップされた領"
5520 "域への書き込みより後で、 B<MS_SYNC> または B<MS_ASYNC> フラグを指定して "
5521 "B<msync>(2)  が呼ばれる前までに更新される。"
5522
5523 #. type: Plain text
5524 #: build/C/man2/mmap.2:392
5525 msgid ""
5526 "On success, B<mmap>()  returns a pointer to the mapped area.  On error, the "
5527 "value B<MAP_FAILED> (that is, I<(void\\ *)\\ -1>)  is returned, and I<errno> "
5528 "is set appropriately.  On success, B<munmap>()  returns 0, on failure -1, "
5529 "and I<errno> is set (probably to B<EINVAL>)."
5530 msgstr ""
5531 "B<mmap>()  は成功するとマップされた領域へのポインタを返す。 失敗すると値 "
5532 "B<MAP_FAILED> (つまり I<(void\\ *)\\ -1>)  を返し、 I<errno> がエラーの内容に"
5533 "したがってセットされる。 B<munmap>()  は成功すると 0 を返す。失敗すると -1 を"
5534 "返し、 I<errno> がセットされる (多くの場合 B<EINVAL> になるだろう)。"
5535
5536 #. type: TP
5537 #: build/C/man2/mmap.2:393 build/C/man2/mprotect.2:86
5538 #: build/C/man3/shm_open.3:185 build/C/man3/shm_open.3:190
5539 #: build/C/man2/shmctl.2:302 build/C/man2/shmget.2:188
5540 #: build/C/man2/shmop.2:191
5541 #, no-wrap
5542 msgid "B<EACCES>"
5543 msgstr "B<EACCES>"
5544
5545 #. type: Plain text
5546 #: build/C/man2/mmap.2:413
5547 msgid ""
5548 "A file descriptor refers to a non-regular file.  Or B<MAP_PRIVATE> was "
5549 "requested, but I<fd> is not open for reading.  Or B<MAP_SHARED> was "
5550 "requested and B<PROT_WRITE> is set, but I<fd> is not open in read/write "
5551 "(B<O_RDWR>)  mode.  Or B<PROT_WRITE> is set, but the file is append-only."
5552 msgstr ""
5553 "以下のいずれかの場合。 ファイル記述子の参照先が通常のファイルではない (non-"
5554 "regular file) 。 B<MAP_PRIVATE> を要求したが I<fd> は読み込み用にオープンされ"
5555 "ていない。 B<MAP_SHARED> を要求して B<PROT_WRITE> をセットしたが I<fd> は読み"
5556 "書きモード (B<O_RDWR>)  でオープンされていない、 B<PROT_WRITE> をセットした"
5557 "が、ファイルは追加 (append) 専用である。"
5558
5559 #. type: Plain text
5560 #: build/C/man2/mmap.2:417
5561 msgid ""
5562 "The file has been locked, or too much memory has been locked (see "
5563 "B<setrlimit>(2))."
5564 msgstr ""
5565 "ファイルがロックされている。またはロックされているメモリが多すぎる "
5566 "(B<setrlimit>(2)  を参照)。"
5567
5568 #. type: Plain text
5569 #: build/C/man2/mmap.2:423
5570 msgid ""
5571 "I<fd> is not a valid file descriptor (and B<MAP_ANONYMOUS> was not set)."
5572 msgstr ""
5573 "I<fd> が有効なファイル記述子 (file descriptor) ではない (かつ "
5574 "B<MAP_ANONYMOUS> がセットされていない)。"
5575
5576 #. type: Plain text
5577 #: build/C/man2/mmap.2:431
5578 msgid ""
5579 "We don't like I<addr>, I<length>, or I<offset> (e.g., they are too large, or "
5580 "not aligned on a page boundary)."
5581 msgstr ""
5582 "I<addr> か I<length> か I<offset> が適切でない (例えば、大きすぎるとか、ペー"
5583 "ジ境界にアラインメントされていない)。"
5584
5585 #. type: Plain text
5586 #: build/C/man2/mmap.2:436
5587 msgid "(since Linux 2.6.12)  I<length> was 0."
5588 msgstr "(Linux 2.6.12 以降)  I<length> が 0 であった。"
5589
5590 #. type: Plain text
5591 #: build/C/man2/mmap.2:444
5592 msgid ""
5593 "I<flags> contained neither B<MAP_PRIVATE> or B<MAP_SHARED>, or contained "
5594 "both of these values."
5595 msgstr ""
5596 "I<flags> に B<MAP_PRIVATE> と B<MAP_SHARED> のどちらも含まれていなかった、も"
5597 "しくは その両方が含まれていた。"
5598
5599 #. type: TP
5600 #: build/C/man2/mmap.2:444 build/C/man3/shm_open.3:227
5601 #: build/C/man2/shmget.2:204
5602 #, no-wrap
5603 msgid "B<ENFILE>"
5604 msgstr "B<ENFILE>"
5605
5606 #.  [2.6.7] shmem_zero_setup()-->shmem_file_setup()-->get_empty_filp()
5607 #. type: Plain text
5608 #: build/C/man2/mmap.2:452 build/C/man2/shmget.2:208
5609 msgid "The system limit on the total number of open files has been reached."
5610 msgstr "システム全体でオープンされているファイルの総数が上限に達した。"
5611
5612 #. type: Plain text
5613 #: build/C/man2/mmap.2:456
5614 msgid ""
5615 "The underlying file system of the specified file does not support memory "
5616 "mapping."
5617 msgstr ""
5618 "指定されたファイルが置かれているファイルシステムがメモリマッピングをサポート "
5619 "していない。"
5620
5621 #. type: Plain text
5622 #: build/C/man2/mmap.2:460
5623 msgid ""
5624 "No memory is available, or the process's maximum number of mappings would "
5625 "have been exceeded."
5626 msgstr ""
5627 "メモリに空きがない、または処理中のプロセスのマッピング数が最大数を超過した。"
5628
5629 #.  (Since 2.4.25 / 2.6.0.)
5630 #. type: Plain text
5631 #: build/C/man2/mmap.2:469
5632 msgid ""
5633 "The I<prot> argument asks for B<PROT_EXEC> but the mapped area belongs to a "
5634 "file on a file system that was mounted no-exec."
5635 msgstr ""
5636 "I<prot> 引き数は B<PROT_EXEC> を行うように指定されているが、 no-exec でマウン"
5637 "トされたファイルシステム上のファイルに マップ領域が対応している。"
5638
5639 #. type: TP
5640 #: build/C/man2/mmap.2:469
5641 #, no-wrap
5642 msgid "B<ETXTBSY>"
5643 msgstr "B<ETXTBSY>"
5644
5645 #. type: Plain text
5646 #: build/C/man2/mmap.2:475
5647 msgid ""
5648 "B<MAP_DENYWRITE> was set but the object specified by I<fd> is open for "
5649 "writing."
5650 msgstr ""
5651 "B<MAP_DENYWRITE> がセットされているが I<fd> で指定されているオブジェクトは書"
5652 "き込み用に開かれている。"
5653
5654 #. type: TP
5655 #: build/C/man2/mmap.2:475 build/C/man2/shmctl.2:344
5656 #, no-wrap
5657 msgid "B<EOVERFLOW>"
5658 msgstr "B<EOVERFLOW>"
5659
5660 #. type: Plain text
5661 #: build/C/man2/mmap.2:487
5662 msgid ""
5663 "On 32-bit architecture together with the large file extension (i.e., using "
5664 "64-bit I<off_t>): the number of pages used for I<length> plus number of "
5665 "pages used for I<offset> would overflow I<unsigned long> (32 bits)."
5666 msgstr ""
5667
5668 #. type: Plain text
5669 #: build/C/man2/mmap.2:489
5670 msgid "Use of a mapped region can result in these signals:"
5671 msgstr "マップ領域を利用する際に、以下のシグナルが発生することがある:"
5672
5673 #. type: TP
5674 #: build/C/man2/mmap.2:489
5675 #, no-wrap
5676 msgid "B<SIGSEGV>"
5677 msgstr "B<SIGSEGV>"
5678
5679 #. type: Plain text
5680 #: build/C/man2/mmap.2:492
5681 msgid "Attempted write into a region mapped as read-only."
5682 msgstr "読み込み専用で mmap された領域へ書き込みを行おうとした。"
5683
5684 #. type: TP
5685 #: build/C/man2/mmap.2:492
5686 #, no-wrap
5687 msgid "B<SIGBUS>"
5688 msgstr "B<SIGBUS>"
5689
5690 #. type: Plain text
5691 #: build/C/man2/mmap.2:497
5692 msgid ""
5693 "Attempted access to a portion of the buffer that does not correspond to the "
5694 "file (for example, beyond the end of the file, including the case where "
5695 "another process has truncated the file)."
5696 msgstr ""
5697 "バッファのうち、ファイルに関連づけられていない部分 (例えばファイル末尾を越え"
5698 "た部分など。これには 他のプロセスがファイルを切り詰めた場合なども含まれる)  "
5699 "にアクセスしようとした。"
5700
5701 #.  SVr4 documents additional error codes ENXIO and ENODEV.
5702 #.  SUSv2 documents additional error codes EMFILE and EOVERFLOW.
5703 #. type: Plain text
5704 #: build/C/man2/mmap.2:501
5705 msgid "SVr4, 4.4BSD, POSIX.1-2001."
5706 msgstr "SVr4, 4.4BSD, POSIX.1-2001."
5707
5708 #.  POSIX.1-2001: It shall be defined to -1 or 0 or 200112L.
5709 #.  -1: unavailable, 0: ask using sysconf().
5710 #.  glibc defines it to 1.
5711 #. type: Plain text
5712 #: build/C/man2/mmap.2:515
5713 msgid ""
5714 "On POSIX systems on which B<mmap>(), B<msync>(2)  and B<munmap>()  are "
5715 "available, B<_POSIX_MAPPED_FILES> is defined in I<E<lt>unistd.hE<gt>> to a "
5716 "value greater than 0.  (See also B<sysconf>(3).)"
5717 msgstr ""
5718 "B<mmap>(), B<msync>(2)  B<munmap>()  が利用可能な POSIX システムでは、 "
5719 "B<_POSIX_MAPPED_FILES> は E<lt>unistd.hE<gt> で 0 より大きな値に定義される "
5720 "(B<sysconf>(3)  も参照のこと)。"
5721
5722 #.  Since around glibc 2.1/2.2, depending on the platform.
5723 #. type: Plain text
5724 #: build/C/man2/mmap.2:530
5725 msgid ""
5726 "This page describes the interface provided by the glibc B<mmap>()  wrapper "
5727 "function.  Originally, this function invoked a system call of the same "
5728 "name.  Since kernel 2.4, that system call has been superseded by B<mmap2>"
5729 "(2), and nowadays the glibc B<mmap>()  wrapper function invokes B<mmap2>(2)  "
5730 "with a suitably adjusted value for I<offset>."
5731 msgstr ""
5732 "このページでは glibc の B<mmap>() のラッパー関数が提供するインターフェース"
5733 "に\n"
5734 "ついて説明している。元々は、この関数は同じ名前のシステムコールを起動してい"
5735 "た。\n"
5736 "カーネル 2.4 以降、このシステムコールは B<mmap2>(2) に取って代わられ、現在\n"
5737 "では、 glibc の B<mmap>() のラッパー関数は I<offset> を適切に調整してから\n"
5738 "B<mmap2>(2) を起動する。"
5739
5740 #. type: Plain text
5741 #: build/C/man2/mmap.2:543
5742 msgid ""
5743 "On some hardware architectures (e.g., i386), B<PROT_WRITE> implies "
5744 "B<PROT_READ>.  It is architecture dependent whether B<PROT_READ> implies "
5745 "B<PROT_EXEC> or not.  Portable programs should always set B<PROT_EXEC> if "
5746 "they intend to execute code in the new mapping."
5747 msgstr ""
5748 "(i386 などの) いくつかのアーキテクチャでは、 B<PROT_WRITE> をセットすると、暗"
5749 "黙のうちに B<PROT_READ> がセットされる。 B<PROT_READ> をセットした際に暗黙の"
5750 "うちに B<PROT_EXEC> がセットされるかどうかは、アーキテクチャ依存である。 移植"
5751 "性を考慮したプログラムでは、 新規にマップした領域でコードを実行したい場合は、"
5752 "常に B<PROT_EXEC> をセットすべきである。"
5753
5754 #. type: Plain text
5755 #: build/C/man2/mmap.2:558
5756 msgid ""
5757 "The portable way to create a mapping is to specify I<addr> as 0 (NULL), and "
5758 "omit B<MAP_FIXED> from I<flags>.  In this case, the system chooses the "
5759 "address for the mapping; the address is chosen so as not to conflict with "
5760 "any existing mapping, and will not be 0.  If the B<MAP_FIXED> flag is "
5761 "specified, and I<addr> is 0 (NULL), then the mapped address will be 0 (NULL)."
5762 msgstr ""
5763 "マッピングを作成する移植性のある方法は、 I<addr> に 0 (NULL) を指定し、 "
5764 "I<flags> から B<MAP_FIXED> を外すことである。 この場合、システムがマッピング"
5765 "用のアドレスの選択を行う。 アドレスは既存のマッピングと衝突しないように、 か"
5766 "つ 0 にならないように選択される。 B<MAP_FIXED> フラグが指定され、かつ "
5767 "I<addr> が 0 (NULL)  の場合には、マップされるアドレスが 0 (NULL) になる。"
5768
5769 #. type: Plain text
5770 #: build/C/man2/mmap.2:587
5771 msgid ""
5772 "Certain I<flags> constants are defined only if either B<_BSD_SOURCE> or "
5773 "B<_SVID_SOURCE> is defined.  (Requiring B<_GNU_SOURCE> also suffices, and "
5774 "requiring that macro specifically would have been more logical, since these "
5775 "flags are all Linux specific.)  The relevant flags are: B<MAP_32BIT>, "
5776 "B<MAP_ANONYMOUS> (and the synonym B<MAP_ANON>), B<MAP_DENYWRITE>, "
5777 "B<MAP_EXECUTABLE>, B<MAP_FILE>, B<MAP_GROWSDOWN>, B<MAP_HUGETLB>, "
5778 "B<MAP_LOCKED>, B<MAP_NONBLOCK>, B<MAP_NORESERVE>, B<MAP_POPULATE>, and "
5779 "B<MAP_STACK>."
5780 msgstr ""
5781
5782 #. type: Plain text
5783 #: build/C/man2/mmap.2:592
5784 msgid ""
5785 "On Linux there are no guarantees like those suggested above under "
5786 "B<MAP_NORESERVE>.  By default, any process can be killed at any moment when "
5787 "the system runs out of memory."
5788 msgstr ""
5789 "Linux においては、上記の B<MAP_NORESERVE> で述べられているような保証はない。 "
5790 "デフォルトでは、システムがメモリを使い切った場合には、 どのプロセスがいつ強制"
5791 "終了されるか分からないからである。"
5792
5793 #. type: Plain text
5794 #: build/C/man2/mmap.2:599
5795 #, fuzzy
5796 #| msgid ""
5797 #| "In kernels before 2.6.7, the B<MAP_POPULATE> flag only has effect if "
5798 #| "I<prot> is specified as B<PROT_NONE>."
5799 msgid ""
5800 "In kernels before 2.6.7, the B<MAP_POPULATE> flag has effect only if I<prot> "
5801 "is specified as B<PROT_NONE>."
5802 msgstr ""
5803 "2.6.7 より前のカーネルでは、 I<prot> に B<PROT_NONE> が指定された場合にの"
5804 "み、 B<MAP_POPULATE> フラグが効力を持つ。"
5805
5806 #. type: Plain text
5807 #: build/C/man2/mmap.2:614
5808 msgid ""
5809 "SUSv3 specifies that B<mmap>()  should fail if I<length> is 0.  However, in "
5810 "kernels before 2.6.12, B<mmap>()  succeeded in this case: no mapping was "
5811 "created and the call returned I<addr>.  Since kernel 2.6.12, B<mmap>()  "
5812 "fails with the error B<EINVAL> for this case."
5813 msgstr ""
5814 "SUSv3 では、 I<length> が 0 の場合、 B<mmap>()  は失敗すると規定されている。"
5815 "しかしながら、2.6.12 より前のカーネルでは、 この場合に B<mmap>()  は成功して"
5816 "いた (マッピングは作成されず、 I<addr> が返されていた)。 カーネル 2.6.12 以降"
5817 "では、 B<mmap>()  はエラー B<EINVAL> で失敗する。"
5818
5819 #. type: Plain text
5820 #: build/C/man2/mmap.2:630
5821 msgid ""
5822 "POSIX specifies that the system shall always zero fill any partial page at "
5823 "the end of the object and that system will never write any modification of "
5824 "the object beyond its end.  On Linux, when you write data to such partial "
5825 "page after the end of the object, the data stays in the page cache even "
5826 "after the file is closed and unmapped and even though the data is never "
5827 "written to the file itself, subsequent mappings may see the modified "
5828 "content.  In some cases, this could be fixed by calling B<msync>(2)  before "
5829 "the unmap takes place; however, this doesn't work on tmpfs (for example, "
5830 "when using POSIX shared memory interface documented in B<shm_overview>(7))."
5831 msgstr ""
5832
5833 #. type: Plain text
5834 #: build/C/man2/mmap.2:642
5835 msgid ""
5836 "The following program prints part of the file specified in its first command-"
5837 "line argument to standard output.  The range of bytes to be printed is "
5838 "specified via offset and length values in the second and third command-line "
5839 "arguments.  The program creates a memory mapping of the required pages of "
5840 "the file and then uses B<write>(2)  to output the desired bytes."
5841 msgstr ""
5842 "以下のプログラムは、一番目のコマンドライン引き数で指定された ファイルの一部を"
5843 "標準出力に表示する。 表示する範囲は、二番目、三番目のコマンドライン引き数で渡"
5844 "される オフセットと長さで指定される。 このプログラムは、指定されたファイルの"
5845 "必要なページのメモリ・ マッピングを作成し、 B<write>(2)  を使って所望のバイト"
5846 "を出力する。"
5847
5848 #. type: Plain text
5849 #: build/C/man2/mmap.2:650
5850 #, no-wrap
5851 msgid ""
5852 "#include E<lt>sys/mman.hE<gt>\n"
5853 "#include E<lt>sys/stat.hE<gt>\n"
5854 "#include E<lt>fcntl.hE<gt>\n"
5855 "#include E<lt>stdio.hE<gt>\n"
5856 "#include E<lt>stdlib.hE<gt>\n"
5857 "#include E<lt>unistd.hE<gt>\n"
5858 msgstr ""
5859 "#include E<lt>sys/mman.hE<gt>\n"
5860 "#include E<lt>sys/stat.hE<gt>\n"
5861 "#include E<lt>fcntl.hE<gt>\n"
5862 "#include E<lt>stdio.hE<gt>\n"
5863 "#include E<lt>stdlib.hE<gt>\n"
5864 "#include E<lt>unistd.hE<gt>\n"
5865
5866 #. type: Plain text
5867 #: build/C/man2/mmap.2:653 build/C/man2/mprotect.2:178
5868 #, no-wrap
5869 msgid ""
5870 "#define handle_error(msg) \\e\n"
5871 "    do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
5872 msgstr ""
5873 "#define handle_error(msg) \\e\n"
5874 "    do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
5875
5876 #. type: Plain text
5877 #: build/C/man2/mmap.2:663
5878 #, no-wrap
5879 msgid ""
5880 "int\n"
5881 "main(int argc, char *argv[])\n"
5882 "{\n"
5883 "    char *addr;\n"
5884 "    int fd;\n"
5885 "    struct stat sb;\n"
5886 "    off_t offset, pa_offset;\n"
5887 "    size_t length;\n"
5888 "    ssize_t s;\n"
5889 msgstr ""
5890 "int\n"
5891 "main(int argc, char *argv[])\n"
5892 "{\n"
5893 "    char *addr;\n"
5894 "    int fd;\n"
5895 "    struct stat sb;\n"
5896 "    off_t offset, pa_offset;\n"
5897 "    size_t length;\n"
5898 "    ssize_t s;\n"
5899
5900 #. type: Plain text
5901 #: build/C/man2/mmap.2:668
5902 #, no-wrap
5903 msgid ""
5904 "    if (argc E<lt> 3 || argc E<gt> 4) {\n"
5905 "        fprintf(stderr, \"%s file offset [length]\\en\", argv[0]);\n"
5906 "        exit(EXIT_FAILURE);\n"
5907 "    }\n"
5908 msgstr ""
5909 "    if (argc E<lt> 3 || argc E<gt> 4) {\n"
5910 "        fprintf(stderr, \"%s file offset [length]\\en\", argv[0]);\n"
5911 "        exit(EXIT_FAILURE);\n"
5912 "    }\n"
5913
5914 #. type: Plain text
5915 #: build/C/man2/mmap.2:672
5916 #, no-wrap
5917 msgid ""
5918 "    fd = open(argv[1], O_RDONLY);\n"
5919 "    if (fd == -1)\n"
5920 "        handle_error(\"open\");\n"
5921 msgstr ""
5922 "    fd = open(argv[1], O_RDONLY);\n"
5923 "    if (fd == -1)\n"
5924 "        handle_error(\"open\");\n"
5925
5926 #. type: Plain text
5927 #: build/C/man2/mmap.2:675
5928 #, no-wrap
5929 msgid ""
5930 "    if (fstat(fd, &sb) == -1)           /* To obtain file size */\n"
5931 "        handle_error(\"fstat\");\n"
5932 msgstr ""
5933 "    if (fstat(fd, &sb) == -1)           /* To obtain file size */\n"
5934 "        handle_error(\"fstat\");\n"
5935
5936 #. type: Plain text
5937 #: build/C/man2/mmap.2:679
5938 #, no-wrap
5939 msgid ""
5940 "    offset = atoi(argv[2]);\n"
5941 "    pa_offset = offset & ~(sysconf(_SC_PAGE_SIZE) - 1);\n"
5942 "        /* offset for mmap() must be page aligned */\n"
5943 msgstr ""
5944 "    offset = atoi(argv[2]);\n"
5945 "    pa_offset = offset & ~(sysconf(_SC_PAGE_SIZE) - 1);\n"
5946 "        /* offset for mmap() must be page aligned */\n"
5947
5948 #. type: Plain text
5949 #: build/C/man2/mmap.2:684
5950 #, no-wrap
5951 msgid ""
5952 "    if (offset E<gt>= sb.st_size) {\n"
5953 "        fprintf(stderr, \"offset is past end of file\\en\");\n"
5954 "        exit(EXIT_FAILURE);\n"
5955 "    }\n"
5956 msgstr ""
5957 "    if (offset E<gt>= sb.st_size) {\n"
5958 "        fprintf(stderr, \"offset is past end of file\\en\");\n"
5959 "        exit(EXIT_FAILURE);\n"
5960 "    }\n"
5961
5962 #. type: Plain text
5963 #: build/C/man2/mmap.2:690
5964 #, no-wrap
5965 msgid ""
5966 "    if (argc == 4) {\n"
5967 "        length = atoi(argv[3]);\n"
5968 "        if (offset + length E<gt> sb.st_size)\n"
5969 "            length = sb.st_size - offset;\n"
5970 "                /* Can\\(aqt display bytes past end of file */\n"
5971 msgstr ""
5972 "    if (argc == 4) {\n"
5973 "        length = atoi(argv[3]);\n"
5974 "        if (offset + length E<gt> sb.st_size)\n"
5975 "            length = sb.st_size - offset;\n"
5976 "                /* Can\\(aqt display bytes past end of file */\n"
5977
5978 #. type: Plain text
5979 #: build/C/man2/mmap.2:694
5980 #, no-wrap
5981 msgid ""
5982 "    } else {    /* No length arg ==E<gt> display to end of file */\n"
5983 "        length = sb.st_size - offset;\n"
5984 "    }\n"
5985 msgstr ""
5986 "    } else {    /* No length arg ==E<gt> display to end of file */\n"
5987 "        length = sb.st_size - offset;\n"
5988 "    }\n"
5989
5990 #. type: Plain text
5991 #: build/C/man2/mmap.2:699
5992 #, no-wrap
5993 msgid ""
5994 "    addr = mmap(NULL, length + offset - pa_offset, PROT_READ,\n"
5995 "                MAP_PRIVATE, fd, pa_offset);\n"
5996 "    if (addr == MAP_FAILED)\n"
5997 "        handle_error(\"mmap\");\n"
5998 msgstr ""
5999 "    addr = mmap(NULL, length + offset - pa_offset, PROT_READ,\n"
6000 "                MAP_PRIVATE, fd, pa_offset);\n"
6001 "    if (addr == MAP_FAILED)\n"
6002 "        handle_error(\"mmap\");\n"
6003
6004 #. type: Plain text
6005 #: build/C/man2/mmap.2:704
6006 #, no-wrap
6007 msgid ""
6008 "    s = write(STDOUT_FILENO, addr + offset - pa_offset, length);\n"
6009 "    if (s != length) {\n"
6010 "        if (s == -1)\n"
6011 "            handle_error(\"write\");\n"
6012 msgstr ""
6013 "    s = write(STDOUT_FILENO, addr + offset - pa_offset, length);\n"
6014 "    if (s != length) {\n"
6015 "        if (s == -1)\n"
6016 "            handle_error(\"write\");\n"
6017
6018 #. type: Plain text
6019 #: build/C/man2/mmap.2:708
6020 #, no-wrap
6021 msgid ""
6022 "        fprintf(stderr, \"partial write\");\n"
6023 "        exit(EXIT_FAILURE);\n"
6024 "    }\n"
6025 msgstr ""
6026 "        fprintf(stderr, \"partial write\");\n"
6027 "        exit(EXIT_FAILURE);\n"
6028 "    }\n"
6029
6030 #. type: Plain text
6031 #: build/C/man2/mmap.2:725
6032 msgid ""
6033 "B<getpagesize>(2), B<mincore>(2), B<mlock>(2), B<mmap2>(2), B<mprotect>(2), "
6034 "B<mremap>(2), B<msync>(2), B<remap_file_pages>(2), B<setrlimit>(2), B<shmat>"
6035 "(2), B<shm_open>(3), B<shm_overview>(7)"
6036 msgstr ""
6037 "B<getpagesize>(2), B<mincore>(2), B<mlock>(2), B<mmap2>(2), B<mprotect>(2), "
6038 "B<mremap>(2), B<msync>(2), B<remap_file_pages>(2), B<setrlimit>(2), B<shmat>"
6039 "(2), B<shm_open>(3), B<shm_overview>(7)"
6040
6041 #. type: Plain text
6042 #: build/C/man2/mmap.2:732
6043 msgid ""
6044 "The descriptions of the following files in B<proc>(5): I</proc/[pid]/maps>, "
6045 "I</proc/[pid]/map_files>, and I</proc/[pid]/smaps>."
6046 msgstr ""
6047
6048 #. type: Plain text
6049 #: build/C/man2/mmap.2:737 build/C/man2/msync.2:122
6050 msgid "B.O. Gallmeister, POSIX.4, O'Reilly, pp. 128-129 and 389-391."
6051 msgstr "B.O. Gallmeister, POSIX.4, O'Reilly, pp. 128-129 and 389-391."
6052
6053 #. type: TH
6054 #: build/C/man2/mmap2.2:29
6055 #, no-wrap
6056 msgid "MMAP2"
6057 msgstr "MMAP2"
6058
6059 #. type: TH
6060 #: build/C/man2/mmap2.2:29
6061 #, no-wrap
6062 msgid "2012-04-16"
6063 msgstr "2012-04-16"
6064
6065 #. type: Plain text
6066 #: build/C/man2/mmap2.2:32
6067 msgid "mmap2 - map files or devices into memory"
6068 msgstr "mmap2 - ファイルやデバイスをメモリにマップする"
6069
6070 #. type: Plain text
6071 #: build/C/man2/mmap2.2:38
6072 #, no-wrap
6073 msgid ""
6074 "B<void *mmap2(void *>I<addr>B<, size_t >I<length>B<, int >I<prot>B<,>\n"
6075 "B<             int >I<flags>B<, int >I<fd>B<, off_t >I<pgoffset>B<);>\n"
6076 msgstr ""
6077 "B<void *mmap2(void *>I<addr>B<, size_t >I<length>B<, int >I<prot>B<,>\n"
6078 "B<            int >I<flags>B<, int >I<fd>B<, off_t >I<pgoffset>B<);>\n"
6079
6080 #. type: Plain text
6081 #: build/C/man2/mmap2.2:43
6082 msgid ""
6083 "This is probably not the system call you are interested; instead, see B<mmap>"
6084 "(2), which describes the glibc wrapper function that invokes this system "
6085 "call."
6086 msgstr ""
6087 "これはおそらくあなたが興味のあるシステムコールではないだろう。代わりに\n"
6088 "B<mmap>(2) を見るとよい。そのページにはこのシステムコールを起動する glibc "
6089 "の\n"
6090 "ラッパー関数についての説明がある。"
6091
6092 #. type: Plain text
6093 #: build/C/man2/mmap2.2:54
6094 msgid ""
6095 "The B<mmap2>()  system call provides the same interface as B<mmap>(2), "
6096 "except that the final argument specifies the offset into the file in 4096-"
6097 "byte units (instead of bytes, as is done by B<mmap>(2)).  This enables "
6098 "applications that use a 32-bit I<off_t> to map large files (up to 2^44 "
6099 "bytes)."
6100 msgstr ""
6101 "B<mmap2>() システムコールは B<mmap>(2) と同じインターフェースを提供する。た"
6102 "だ\n"
6103 "し、最後の引き数には、ファイルのオフセットを (B<mmap>(2) が行っている、バイ"
6104 "ト\n"
6105 "単位ではなく) 4096 バイトを単位として指定する。 これにより、32 ビットの\n"
6106 "I<off_t> を使うアプリケーションで (2^44 バイトまでの) 大きなファイルをマッ"
6107 "プ\n"
6108 "できるようになる。"
6109
6110 #. type: Plain text
6111 #: build/C/man2/mmap2.2:61
6112 msgid ""
6113 "On success, B<mmap2>()  returns a pointer to the mapped area.  On error -1 "
6114 "is returned and I<errno> is set appropriately."
6115 msgstr ""
6116 "成功した場合、 B<mmap2>()  はマップされた領域へのポインタを返す。 エラーの場"
6117 "合は -1 が返されて、 I<errno> が適切に設定される。"
6118
6119 #. type: Plain text
6120 #: build/C/man2/mmap2.2:65
6121 msgid "Problem with getting the data from user space."
6122 msgstr "ユーザ空間からデータを取得するときに問題があった。"
6123
6124 #. type: Plain text
6125 #: build/C/man2/mmap2.2:70
6126 msgid ""
6127 "(Various platforms where the page size is not 4096 bytes.)  I<offset * 4096> "
6128 "is not a multiple of the system page size."
6129 msgstr ""
6130 "(ページサイズが 4096 バイトでないプラットフォームにおいて)  I<offset * 4096> "
6131 "がシステムのページサイズの倍数ではない。"
6132
6133 #. type: Plain text
6134 #: build/C/man2/mmap2.2:74
6135 msgid "B<mmap2>()  can also return any of the errors described in B<mmap>(2)."
6136 msgstr "B<mmap2>() は B<mmap>(2) に載っているエラーを返すこともある。"
6137
6138 #. type: Plain text
6139 #: build/C/man2/mmap2.2:77
6140 msgid "B<mmap2>()  is available since Linux 2.3.31."
6141 msgstr "B<mmap2>()  は、Linux 2.3.31 以降で使用可能である。"
6142
6143 #. type: Plain text
6144 #: build/C/man2/mmap2.2:79 build/C/man2/subpage_prot.2:98
6145 msgid "This system call is Linux-specific."
6146 msgstr "このシステムコールは Linux 独自である。"
6147
6148 #. type: Plain text
6149 #: build/C/man2/mmap2.2:85
6150 msgid ""
6151 "Nowadays, the glibc B<mmap>()  wrapper function invokes this system call "
6152 "rather than the B<mmap>(2)  system call."
6153 msgstr ""
6154 "現在では、glibc の B<mmap>()  のラッパー関数は、 B<mmap>(2)  システムコールで"
6155 "はなく、このシステムコール (B<mmap2>(2))  を起動する。"
6156
6157 #.  ia64 can have page sizes ranging from 4kB to 64kB.
6158 #.  On cris, it looks like the unit might also be the page size,
6159 #.  which is 8192 bytes. -- mtk, June 2007
6160 #. type: Plain text
6161 #: build/C/man2/mmap2.2:92
6162 msgid ""
6163 "On ia64, the unit for I<offset> is actually the system page size, rather "
6164 "than 4096 bytes."
6165 msgstr ""
6166 "ia64 では、 I<offset> の単位は、実際にはシステムのページサイズであり、 4096 "
6167 "バイトではない。"
6168
6169 #. type: Plain text
6170 #: build/C/man2/mmap2.2:98
6171 msgid ""
6172 "B<getpagesize>(2), B<mmap>(2), B<mremap>(2), B<msync>(2), B<shm_open>(3)"
6173 msgstr ""
6174 "B<getpagesize>(2), B<mmap>(2), B<mremap>(2), B<msync>(2), B<shm_open>(3)"
6175
6176 #. type: TH
6177 #: build/C/man2/mprotect.2:38
6178 #, no-wrap
6179 msgid "MPROTECT"
6180 msgstr "MPROTECT"
6181
6182 #. type: TH
6183 #: build/C/man2/mprotect.2:38
6184 #, no-wrap
6185 msgid "2012-08-14"
6186 msgstr "2012-08-14"
6187
6188 #. type: Plain text
6189 #: build/C/man2/mprotect.2:41
6190 msgid "mprotect - set protection on a region of memory"
6191 msgstr "mprotect - メモリ領域の保護を設定する"
6192
6193 #. type: Plain text
6194 #: build/C/man2/mprotect.2:46
6195 #, no-wrap
6196 msgid "B<int mprotect(void *>I<addr>B<, size_t >I<len>B<, int >I<prot>B<);>\n"
6197 msgstr "B<int mprotect(void *>I<addr>B<, size_t >I<len>B<, int >I<prot>B<);>\n"
6198
6199 #. type: Plain text
6200 #: build/C/man2/mprotect.2:54
6201 msgid ""
6202 "B<mprotect>()  changes protection for the calling process's memory page(s)  "
6203 "containing any part of the address range in the interval [I<addr>,\\ I<addr>"
6204 "+I<len>-1].  I<addr> must be aligned to a page boundary."
6205 msgstr ""
6206 "B<mprotect>()  は、区間 [I<addr>,\\ I<addr>+I<len>-1] のアドレス範囲を含む 呼"
6207 "び出し元のプロセスのメモリページのアクセス保護を変更する。 I<addr> はページ境"
6208 "界に一致していなければならない。"
6209
6210 #. type: Plain text
6211 #: build/C/man2/mprotect.2:59
6212 msgid ""
6213 "If the calling process tries to access memory in a manner that violates the "
6214 "protection, then the kernel generates a B<SIGSEGV> signal for the process."
6215 msgstr ""
6216 "呼び出し元のプロセスがアクセス保護に違反するようなメモリアクセスを 行おうとす"
6217 "ると、カーネルはシグナル B<SIGSEGV> をそのプロセスに対して生成する。"
6218
6219 #. type: Plain text
6220 #: build/C/man2/mprotect.2:64
6221 msgid ""
6222 "I<prot> is either B<PROT_NONE> or a bitwise-or of the other values in the "
6223 "following list:"
6224 msgstr ""
6225 "I<prot> には、 B<PROT_NONE> か、以下のリストの B<PROT_NONE> 以外の値をビット"
6226 "毎の論理和 (bitwize-or) で指定する:"
6227
6228 #. type: Plain text
6229 #: build/C/man2/mprotect.2:67
6230 msgid "The memory cannot be accessed at all."
6231 msgstr "そのメモリには全くアクセスできない。"
6232
6233 #. type: Plain text
6234 #: build/C/man2/mprotect.2:70
6235 msgid "The memory can be read."
6236 msgstr "そのメモリを読み取ることができる。"
6237
6238 #. type: Plain text
6239 #: build/C/man2/mprotect.2:73
6240 msgid "The memory can be modified."
6241 msgstr "そのメモリを変更できる。"
6242
6243 #.  FIXME
6244 #.  Document PROT_GROWSUP and PROT_GROWSDOWN
6245 #. type: Plain text
6246 #: build/C/man2/mprotect.2:78
6247 msgid "The memory can be executed."
6248 msgstr "そのメモリは実行可能である。"
6249
6250 #. type: Plain text
6251 #: build/C/man2/mprotect.2:85
6252 msgid ""
6253 "On success, B<mprotect>()  returns zero.  On error, -1 is returned, and "
6254 "I<errno> is set appropriately."
6255 msgstr ""
6256 "成功した場合、 B<mprotect>()  は 0 を返す。エラーの場合は -1 が返り、 "
6257 "I<errno> が適切に設定される。"
6258
6259 #. type: Plain text
6260 #: build/C/man2/mprotect.2:95
6261 msgid ""
6262 "The memory cannot be given the specified access.  This can happen, for "
6263 "example, if you B<mmap>(2)  a file to which you have read-only access, then "
6264 "ask B<mprotect>()  to mark it B<PROT_WRITE>."
6265 msgstr ""
6266 "指定されたアクセスをメモリに設定することができない。 これは、例えば ファイル"
6267 "を読み取り専用で B<mmap>(2)  しており、その領域に対して B<mprotect>()  を呼び"
6268 "出して B<PROT_WRITE> に設定しようとした場合に発生する。"
6269
6270 #.  Or: both PROT_GROWSUP and PROT_GROWSDOWN were specified in 'prot'.
6271 #. type: Plain text
6272 #: build/C/man2/mprotect.2:100
6273 msgid ""
6274 "I<addr> is not a valid pointer, or not a multiple of the system page size."
6275 msgstr ""
6276 "I<addr> が有効なポインタでないか、 システムのページサイズの倍数でない。"
6277
6278 #. type: Plain text
6279 #: build/C/man2/mprotect.2:103
6280 msgid "Internal kernel structures could not be allocated."
6281 msgstr "カーネル内部の構造体を割り当てることができなかった。"
6282
6283 #. type: Plain text
6284 #: build/C/man2/mprotect.2:113
6285 msgid ""
6286 "Addresses in the range [I<addr>, I<addr>+I<len>-1] are invalid for the "
6287 "address space of the process, or specify one or more pages that are not "
6288 "mapped.  (Before kernel 2.4.19, the error B<EFAULT> was incorrectly produced "
6289 "for these cases.)"
6290 msgstr ""
6291 "[I<addr>, I<addr>+I<len>-1] という範囲のアドレスがプロセスのアドレス空間とし"
6292 "て不正であるか、 その範囲のアドレスがマップされていない 1 つ以上のページを指"
6293 "している (カーネル 2.4.19 より前では、この状況でエラー B<EFAULT> が間違って生"
6294 "成されていた)。"
6295
6296 #.  SVr4 defines an additional error
6297 #.  code EAGAIN. The SVr4 error conditions don't map neatly onto Linux's.
6298 #. type: Plain text
6299 #: build/C/man2/mprotect.2:122
6300 msgid ""
6301 "SVr4, POSIX.1-2001.  POSIX says that the behavior of B<mprotect>()  is "
6302 "unspecified if it is applied to a region of memory that was not obtained via "
6303 "B<mmap>(2)."
6304 msgstr ""
6305 "SVr4, POSIX.1-2001.  POSIX では、 B<mmap>(2)  経由で獲得していないメモリ領域"
6306 "に対して B<mprotect>()  を行った場合の B<mprotect>()  の動作は未定義であると"
6307 "されている。"
6308
6309 #. type: Plain text
6310 #: build/C/man2/mprotect.2:129
6311 msgid ""
6312 "On Linux it is always permissible to call B<mprotect>()  on any address in a "
6313 "process's address space (except for the kernel vsyscall area).  In "
6314 "particular it can be used to change existing code mappings to be writable."
6315 msgstr ""
6316 "Linux では、(カーネル vsyscall 領域以外の)  任意のプロセスアドレス空間に対し"
6317 "て B<mprotect>()  を呼び出すことが、常に許されている。 これは特に既存のコード"
6318 "マッピングを書き込み可能にするために使われる。"
6319
6320 #. type: Plain text
6321 #: build/C/man2/mprotect.2:139
6322 msgid ""
6323 "Whether B<PROT_EXEC> has any effect different from B<PROT_READ> is "
6324 "architecture- and kernel version-dependent.  On some hardware architectures "
6325 "(e.g., i386), B<PROT_WRITE> implies B<PROT_READ>."
6326 msgstr ""
6327 "B<PROT_EXEC> が B<PROT_READ> と異なる影響を持つか否かは、アーキテクチャとカー"
6328 "ネルのバージョンに依存する。 (i386 などの) いくつかのアーキテクチャでは、 "
6329 "B<PROT_WRITE> をセットすると、暗黙のうちに B<PROT_READ> がセットされる。"
6330
6331 #. type: Plain text
6332 #: build/C/man2/mprotect.2:148
6333 #, fuzzy
6334 #| msgid ""
6335 #| "POSIX.1-2001 says that an implementation may permit access other than "
6336 #| "that specified in I<prot>, but at a minimum can only allow write access "
6337 #| "if B<PROT_WRITE> has been set, and must not allow any access if "
6338 #| "B<PROT_NONE> has been set."
6339 msgid ""
6340 "POSIX.1-2001 says that an implementation may permit access other than that "
6341 "specified in I<prot>, but at a minimum can allow write access only if "
6342 "B<PROT_WRITE> has been set, and must not allow any access if B<PROT_NONE> "
6343 "has been set."
6344 msgstr ""
6345 "POSIX.1-2001 では、 I<prot> で指定されていないアクセスを許可する実装を認めて"
6346 "いる。 ただし、最低限、 B<PROT_WRITE> がセットされている場合にのみ書き込みア"
6347 "クセスが許可され、 B<PROT_NONE> がセットされている場合にはアクセスは許可され"
6348 "ない点だけは 満たす必要がある。"
6349
6350 #. type: Plain text
6351 #: build/C/man2/mprotect.2:154
6352 msgid ""
6353 "The program below allocates four pages of memory, makes the third of these "
6354 "pages read-only, and then executes a loop that walks upward through the "
6355 "allocated region modifying bytes."
6356 msgstr ""
6357 "以下のプログラムは、メモリページを 4つ確保し、そのうち 3番目のページを 読み込"
6358 "み専用に設定する。その後で、確保した領域のアドレスの小さい方から 大きな方に向"
6359 "かって順番にバイト値を変更するループを実行する。"
6360
6361 #. type: Plain text
6362 #: build/C/man2/mprotect.2:157
6363 msgid ""
6364 "An example of what we might see when running the program is the following:"
6365 msgstr "プログラムを実行した場合の一例を以下に示す。"
6366
6367 #. type: Plain text
6368 #: build/C/man2/mprotect.2:163
6369 #, no-wrap
6370 msgid ""
6371 "$B< ./a.out>\n"
6372 "Start of region:        0x804c000\n"
6373 "Got SIGSEGV at address: 0x804e000\n"
6374 msgstr ""
6375 "$B< ./a.out>\n"
6376 "Start of region:        0x804c000\n"
6377 "Got SIGSEGV at address: 0x804e000\n"
6378
6379 #. type: Plain text
6380 #: build/C/man2/mprotect.2:175
6381 #, no-wrap
6382 msgid ""
6383 "#include E<lt>unistd.hE<gt>\n"
6384 "#include E<lt>signal.hE<gt>\n"
6385 "#include E<lt>stdio.hE<gt>\n"
6386 "#include E<lt>malloc.hE<gt>\n"
6387 "#include E<lt>stdlib.hE<gt>\n"
6388 "#include E<lt>errno.hE<gt>\n"
6389 "#include E<lt>sys/mman.hE<gt>\n"
6390 msgstr ""
6391 "#include E<lt>unistd.hE<gt>\n"
6392 "#include E<lt>signal.hE<gt>\n"
6393 "#include E<lt>stdio.hE<gt>\n"
6394 "#include E<lt>malloc.hE<gt>\n"
6395 "#include E<lt>stdlib.hE<gt>\n"
6396 "#include E<lt>errno.hE<gt>\n"
6397 "#include E<lt>sys/mman.hE<gt>\n"
6398
6399 #. type: Plain text
6400 #: build/C/man2/mprotect.2:180
6401 #, no-wrap
6402 msgid "char *buffer;\n"
6403 msgstr "char *buffer;\n"
6404
6405 #. type: Plain text
6406 #: build/C/man2/mprotect.2:188
6407 #, no-wrap
6408 msgid ""
6409 "static void\n"
6410 "handler(int sig, siginfo_t *si, void *unused)\n"
6411 "{\n"
6412 "    printf(\"Got SIGSEGV at address: 0x%lx\\en\",\n"
6413 "            (long) si-E<gt>si_addr);\n"
6414 "    exit(EXIT_FAILURE);\n"
6415 "}\n"
6416 msgstr ""
6417 "static void\n"
6418 "handler(int sig, siginfo_t *si, void *unused)\n"
6419 "{\n"
6420 "    printf(\"Got SIGSEGV at address: 0x%lx\\en\",\n"
6421 "            (long) si-E<gt>si_addr);\n"
6422 "    exit(EXIT_FAILURE);\n"
6423 "}\n"
6424
6425 #. type: Plain text
6426 #: build/C/man2/mprotect.2:195
6427 #, no-wrap
6428 msgid ""
6429 "int\n"
6430 "main(int argc, char *argv[])\n"
6431 "{\n"
6432 "    char *p;\n"
6433 "    int pagesize;\n"
6434 "    struct sigaction sa;\n"
6435 msgstr ""
6436 "int\n"
6437 "main(void)\n"
6438 "{\n"
6439 "    char *p;\n"
6440 "    int pagesize;\n"
6441 "    struct sigaction sa;\n"
6442
6443 #. type: Plain text
6444 #: build/C/man2/mprotect.2:201
6445 #, no-wrap
6446 msgid ""
6447 "    sa.sa_flags = SA_SIGINFO;\n"
6448 "    sigemptyset(&sa.sa_mask);\n"
6449 "    sa.sa_sigaction = handler;\n"
6450 "    if (sigaction(SIGSEGV, &sa, NULL) == -1)\n"
6451 "        handle_error(\"sigaction\");\n"
6452 msgstr ""
6453 "    sa.sa_flags = SA_SIGINFO;\n"
6454 "    sigemptyset(&sa.sa_mask);\n"
6455 "    sa.sa_sigaction = handler;\n"
6456 "    if (sigaction(SIGSEGV, &sa, NULL) == -1)\n"
6457 "        handle_error(\"sigaction\");\n"
6458
6459 #. type: Plain text
6460 #: build/C/man2/mprotect.2:205
6461 #, no-wrap
6462 msgid ""
6463 "    pagesize = sysconf(_SC_PAGE_SIZE);\n"
6464 "    if (pagesize == -1)\n"
6465 "        handle_error(\"sysconf\");\n"
6466 msgstr ""
6467 "    pagesize = sysconf(_SC_PAGE_SIZE);\n"
6468 "    if (pagesize == -1)\n"
6469 "        handle_error(\"sysconf\");\n"
6470
6471 #. type: Plain text
6472 #: build/C/man2/mprotect.2:208
6473 #, no-wrap
6474 msgid ""
6475 "    /* Allocate a buffer aligned on a page boundary;\n"
6476 "       initial protection is PROT_READ | PROT_WRITE */\n"
6477 msgstr ""
6478 "    /* Allocate a buffer aligned on a page boundary;\n"
6479 "       initial protection is PROT_READ | PROT_WRITE */\n"
6480
6481 #. type: Plain text
6482 #: build/C/man2/mprotect.2:212
6483 #, no-wrap
6484 msgid ""
6485 "    buffer = memalign(pagesize, 4 * pagesize);\n"
6486 "    if (buffer == NULL)\n"
6487 "        handle_error(\"memalign\");\n"
6488 msgstr ""
6489 "    buffer = memalign(pagesize, 4 * pagesize);\n"
6490 "    if (buffer == NULL)\n"
6491 "        handle_error(\"memalign\");\n"
6492
6493 #. type: Plain text
6494 #: build/C/man2/mprotect.2:214
6495 #, no-wrap
6496 msgid "    printf(\"Start of region:        0x%lx\\en\", (long) buffer);\n"
6497 msgstr "    printf(\"Start of region:        0x%lx\\en\", (long) buffer);\n"
6498
6499 #. type: Plain text
6500 #: build/C/man2/mprotect.2:218
6501 #, no-wrap
6502 msgid ""
6503 "    if (mprotect(buffer + pagesize * 2, pagesize,\n"
6504 "                PROT_READ) == -1)\n"
6505 "        handle_error(\"mprotect\");\n"
6506 msgstr ""
6507 "    if (mprotect(buffer + pagesize * 2, pagesize,\n"
6508 "                PROT_READ) == -1)\n"
6509 "        handle_error(\"mprotect\");\n"
6510
6511 #. type: Plain text
6512 #: build/C/man2/mprotect.2:221
6513 #, no-wrap
6514 msgid ""
6515 "    for (p = buffer ; ; )\n"
6516 "        *(p++) = \\(aqa\\(aq;\n"
6517 msgstr ""
6518 "    for (p = buffer ; ; )\n"
6519 "        *(p++) = \\(aqa\\(aq;\n"
6520
6521 #. type: Plain text
6522 #: build/C/man2/mprotect.2:225
6523 #, no-wrap
6524 msgid ""
6525 "    printf(\"Loop completed\\en\");     /* Should never happen */\n"
6526 "    exit(EXIT_SUCCESS);\n"
6527 "}\n"
6528 msgstr ""
6529 "    printf(\"Loop completed\\en\");     /* Should never happen */\n"
6530 "    exit(EXIT_SUCCESS);\n"
6531 "}\n"
6532
6533 #. type: Plain text
6534 #: build/C/man2/mprotect.2:229
6535 msgid "B<mmap>(2), B<sysconf>(3)"
6536 msgstr "B<mmap>(2), B<sysconf>(3)"
6537
6538 #. type: TH
6539 #: build/C/man2/mremap.2:30
6540 #, no-wrap
6541 msgid "MREMAP"
6542 msgstr "MREMAP"
6543
6544 #. type: TH
6545 #: build/C/man2/mremap.2:30
6546 #, no-wrap
6547 msgid "2010-06-10"
6548 msgstr "2010-06-10"
6549
6550 #. type: Plain text
6551 #: build/C/man2/mremap.2:33
6552 msgid "mremap - remap a virtual memory address"
6553 msgstr "mremap - 仮想メモリ・アドレスを再マッピングする"
6554
6555 #. type: Plain text
6556 #: build/C/man2/mremap.2:36
6557 #, no-wrap
6558 msgid "B<#define _GNU_SOURCE>         /* See feature_test_macros(7) */\n"
6559 msgstr "B<#define _GNU_SOURCE>         /* feature_test_macros(7) 参照 */\n"
6560
6561 #. type: Plain text
6562 #: build/C/man2/mremap.2:41
6563 #, no-wrap
6564 msgid ""
6565 "B<void *mremap(void *>I<old_address>B<, size_t >I<old_size>B<,>\n"
6566 "B<             size_t >I<new_size>B<, int >I<flags>B<, ... /* void *>I<new_address>B< */);>\n"
6567 msgstr ""
6568 "B<void *mremap(void *>I<old_address>B<, size_t >I<old_size>B<,>\n"
6569 "B<             size_t >I<new_size>B<, int >I<flags>B<, ... /* void *>I<new_address>B< */);>\n"
6570
6571 #. type: Plain text
6572 #: build/C/man2/mremap.2:47
6573 msgid ""
6574 "B<mremap>()  expands (or shrinks) an existing memory mapping, potentially "
6575 "moving it at the same time (controlled by the I<flags> argument and the "
6576 "available virtual address space)."
6577 msgstr ""
6578 "B<mremap>()  は既存のメモリ・マッピングの拡張 (または縮小) を行う。 同時に移"
6579 "動されることもある (I<flags> 引き数と利用可能な仮想アドレス空間によって決ま"
6580 "る)。"
6581
6582 #. type: Plain text
6583 #: build/C/man2/mremap.2:61
6584 msgid ""
6585 "I<old_address> is the old address of the virtual memory block that you want "
6586 "to expand (or shrink).  Note that I<old_address> has to be page aligned.  "
6587 "I<old_size> is the old size of the virtual memory block.  I<new_size> is the "
6588 "requested size of the virtual memory block after the resize.  An optional "
6589 "fifth argument, I<new_address>, may be provided; see the description of "
6590 "B<MREMAP_FIXED> below."
6591 msgstr ""
6592 "I<old_address> は拡張 (または縮小) しようとする仮想メモリ・ブロック の元のア"
6593 "ドレスである。I<old_address> はページ境界に合っていなければ ならない点に注意"
6594 "すること。I<old_size> は元の仮想メモリ・ブロックの サイズである。 "
6595 "I<new_size> は要求する変更後の仮想メモリ・ブロックのサイズである。 5 番目の引"
6596 "き数として I<new_address> を指定することができる。下記の B<MREMAP_FIXED> の説"
6597 "明を参照のこと。"
6598
6599 #. type: Plain text
6600 #: build/C/man2/mremap.2:73
6601 msgid ""
6602 "In Linux the memory is divided into pages.  A user process has (one or)  "
6603 "several linear virtual memory segments.  Each virtual memory segment has one "
6604 "or more mappings to real memory pages (in the page table).  Each virtual "
6605 "memory segment has its own protection (access rights), which may cause a "
6606 "segmentation violation if the memory is accessed incorrectly (e.g., writing "
6607 "to a read-only segment).  Accessing virtual memory outside of the segments "
6608 "will also cause a segmentation violation."
6609 msgstr ""
6610 "Linux ではメモリはページに分割される。ユーザー・プロセスは (一つまたは)  複数"
6611 "のリニアな仮想メモリセグメントを持つ。 それぞれの仮想メモリセグメントは一つ以"
6612 "上の実メモリ・ページ にマッピングされている (マッピング情報はページ・テーブル"
6613 "で管理される)。 仮想メモリセグメントにはセグメント毎の保護 (アクセス権) が設"
6614 "定されており、 メモリが不正にアクセスされた場合 (例えば読み込み専用のセグメン"
6615 "トに 書き込んだ場合)、セグメンテーション侵害 (segmentation violation) を 引き"
6616 "起こす。また、セグメント外の仮想メモリにアクセスした場合にも セグメンテーショ"
6617 "ン侵害が発生する。"
6618
6619 #. type: Plain text
6620 #: build/C/man2/mremap.2:81
6621 msgid ""
6622 "B<mremap>()  uses the Linux page table scheme.  B<mremap>()  changes the "
6623 "mapping between virtual addresses and memory pages.  This can be used to "
6624 "implement a very efficient B<realloc>(3)."
6625 msgstr ""
6626 "B<mremap>()  は Linux のページ・テーブル方式を使用する。 B<mremap>()  は仮想"
6627 "アドレスとメモリ・ページのマッピングを変更する。これは非常に効率的な "
6628 "B<realloc>(3)  を実装するのに使用されている。"
6629
6630 #. type: Plain text
6631 #: build/C/man2/mremap.2:83
6632 msgid "The I<flags> bit-mask argument may be 0, or include the following flag:"
6633 msgstr "I<flags> ビットマスク引数は 0 または以下のフラグを含む:"
6634
6635 #. type: TP
6636 #: build/C/man2/mremap.2:83
6637 #, no-wrap
6638 msgid "B<MREMAP_MAYMOVE>"
6639 msgstr "B<MREMAP_MAYMOVE>"
6640
6641 #. type: Plain text
6642 #: build/C/man2/mremap.2:95
6643 msgid ""
6644 "By default, if there is not sufficient space to expand a mapping at its "
6645 "current location, then B<mremap>()  fails.  If this flag is specified, then "
6646 "the kernel is permitted to relocate the mapping to a new virtual address, if "
6647 "necessary.  If the mapping is relocated, then absolute pointers into the old "
6648 "mapping location become invalid (offsets relative to the starting address of "
6649 "the mapping should be employed)."
6650 msgstr ""
6651 "デフォルトでは、現在の位置にマッピングを拡張するための 十分な空きがなければ "
6652 "B<mremap>()  は失敗する。 このフラグが指定されると、カーネルは必要があれば"
6653 "マッピングを 新しい仮想アドレスに再配置することができる マッピングが再配置さ"
6654 "れると、古いマッピング位置への絶対ポインタは 無効になる (マッピングの開始アド"
6655 "レスからの相対オフセットは有効のままである)。"
6656
6657 #. type: TP
6658 #: build/C/man2/mremap.2:95
6659 #, no-wrap
6660 msgid "B<MREMAP_FIXED> (since Linux 2.3.31)"
6661 msgstr "B<MREMAP_FIXED> (Linux 2.3.31 以降)"
6662
6663 #. type: Plain text
6664 #: build/C/man2/mremap.2:117
6665 msgid ""
6666 "This flag serves a similar purpose to the B<MAP_FIXED> flag of B<mmap>(2).  "
6667 "If this flag is specified, then B<mremap>()  accepts a fifth argument, "
6668 "I<void *new_address>, which specifies a page-aligned address to which the "
6669 "mapping must be moved.  Any previous mapping at the address range specified "
6670 "by I<new_address> and I<new_size> is unmapped.  If B<MREMAP_FIXED> is "
6671 "specified, then B<MREMAP_MAYMOVE> must also be specified."
6672 msgstr ""
6673 "このフラグは B<mmap>(2)  の B<MAP_FIXED> フラグと似たような目的で用いられ"
6674 "る。 このフラグが指定されると、 B<mremap>()  は 5 番目の引き数 I<void "
6675 "*new_address> を受け取り、この引数はマッピングが移動されるべきアドレスを指定"
6676 "する。 このアドレスはページ境界に合っていなければならない。 I<new_address> "
6677 "と I<new_size> で指定されるアドレス範囲に過去のマッピングがあった場合、 その"
6678 "マッピングはアンマップされる (unmapped)。 B<MREMAP_FIXED> を指定した場合は、 "
6679 "B<MREMAP_MAYMOVE> も指定しなければならない。"
6680
6681 #. type: Plain text
6682 #: build/C/man2/mremap.2:127
6683 msgid ""
6684 "If the memory segment specified by I<old_address> and I<old_size> is locked "
6685 "(using B<mlock>(2)  or similar), then this lock is maintained when the "
6686 "segment is resized and/or relocated.  As a consequence, the amount of memory "
6687 "locked by the process may change."
6688 msgstr ""
6689 "I<old_address> と I<old_size> で指定されるメモリセグメントが (B<mlock>(2)  や"
6690 "同様のもので) ロックされている場合、セグメントのサイズが変わったり 再配置され"
6691 "たりした時にロックも維持される。 その結果、プロセスによってロックされるメモリ"
6692 "の量は変化する。"
6693
6694 #. type: Plain text
6695 #: build/C/man2/mremap.2:135
6696 msgid ""
6697 "On success B<mremap>()  returns a pointer to the new virtual memory area.  "
6698 "On error, the value B<MAP_FAILED> (that is, I<(void\\ *)\\ -1>) is returned, "
6699 "and I<errno> is set appropriately."
6700 msgstr ""
6701 "成功した場合は B<mremap>()  は新しい仮想メモリ領域へのポインタを返す。 エラー"
6702 "の場合は B<MAP_FAILED> (すなわち I<(void\\ *)\\ -1>) が返され、 I<errno> が適"
6703 "切に設定される。"
6704
6705 #. type: Plain text
6706 #: build/C/man2/mremap.2:142
6707 msgid ""
6708 "The caller tried to expand a memory segment that is locked, but this was not "
6709 "possible without exceeding the B<RLIMIT_MEMLOCK> resource limit."
6710 msgstr ""
6711 "呼び出し元がロックされているメモリセグメントを拡張しようとしたが、 "
6712 "B<RLIMIT_MEMLOCK> リソース制限を越えずにこれを行うことができない。"
6713
6714 #. type: Plain text
6715 #: build/C/man2/mremap.2:151
6716 msgid ""
6717 "\"Segmentation fault.\" Some address in the range I<old_address> to "
6718 "I<old_address>+I<old_size> is an invalid virtual memory address for this "
6719 "process.  You can also get B<EFAULT> even if there exist mappings that cover "
6720 "the whole address space requested, but those mappings are of different types."
6721 msgstr ""
6722 "「セグメンテーション違反(segmentation fault)」 I<old_address> から "
6723 "I<old_address>+I<old_size> の 範囲のアドレスのどれかがこのプロセスにおいて不"
6724 "正な仮想メモリ・アドレスである。 たとえ要求したアドレス空間全体を含むような"
6725 "マッピングがあったとしても、 それらのマッピングが異なった型ならば B<EFAULT> "
6726 "を受け取るだろう。"
6727
6728 #. type: Plain text
6729 #: build/C/man2/mremap.2:179
6730 msgid ""
6731 "An invalid argument was given.  Possible causes are: I<old_address> was not "
6732 "page aligned; a value other than B<MREMAP_MAYMOVE> or B<MREMAP_FIXED> was "
6733 "specified in I<flags>; I<new_size> was zero; I<new_size> or I<new_address> "
6734 "was invalid; or the new address range specified by I<new_address> and "
6735 "I<new_size> overlapped the old address range specified by I<old_address> and "
6736 "I<old_size>; or B<MREMAP_FIXED> was specified without also specifying "
6737 "B<MREMAP_MAYMOVE>."
6738 msgstr ""
6739 "不正な引き数が与えられた。 可能性のある原因は以下の通りである: たいていは "
6740 "I<old_address> がページ境界に 合ってない; I<flags> に B<MREMAP_MAYMOVE> また"
6741 "は B<MREMAP_FIXED> 以外の値が指定されている; I<new_size> がゼロ; I<new_size> "
6742 "または I<new_address> の値が不正; I<new_address> と I<new_size> で指定される"
6743 "新しいアドレス範囲が I<old_address> と I<old_size> で指定される古いアドレス範"
6744 "囲と重なっている; B<MREMAP_FIXED> が指定されているが B<MREMAP_MAYMOVE> が指定"
6745 "されていない。"
6746
6747 #. type: Plain text
6748 #: build/C/man2/mremap.2:185
6749 msgid ""
6750 "The memory area cannot be expanded at the current virtual address, and the "
6751 "B<MREMAP_MAYMOVE> flag is not set in I<flags>.  Or, there is not enough "
6752 "(virtual) memory available."
6753 msgstr ""
6754 "現在の仮想アドレスではメモリ領域が拡張できず、 B<MREMAP_MAYMOVE> フラグが "
6755 "I<flags> に設定されていない。 または十分な (仮想) メモリが存在しない。"
6756
6757 #.  4.2BSD had a (never actually implemented)
6758 #.  .BR mremap (2)
6759 #.  call with completely different semantics.
6760 #. type: Plain text
6761 #: build/C/man2/mremap.2:191
6762 msgid ""
6763 "This call is Linux-specific, and should not be used in programs intended to "
6764 "be portable."
6765 msgstr ""
6766 "このコールは Linux 特有であり、移植を意図したプログラムで 使用すべきではな"
6767 "い。"
6768
6769 #. type: Plain text
6770 #: build/C/man2/mremap.2:199
6771 msgid ""
6772 "Prior to version 2.4, glibc did not expose the definition of "
6773 "B<MREMAP_FIXED>, and the prototype for B<mremap>()  did not allow for the "
6774 "I<new_address> argument."
6775 msgstr ""
6776 "バージョン 2.4 より前の glibc では、 B<MREMAP_FIXED> の定義は公開されておら"
6777 "ず、 B<mremap>()  のプロトタイプは I<new_address> 引き数を取らなかった。"
6778
6779 #. type: Plain text
6780 #: build/C/man2/mremap.2:208
6781 msgid ""
6782 "B<brk>(2), B<getpagesize>(2), B<getrlimit>(2), B<mlock>(2), B<mmap>(2), "
6783 "B<sbrk>(2), B<malloc>(3), B<realloc>(3)"
6784 msgstr ""
6785 "B<brk>(2), B<getpagesize>(2), B<getrlimit>(2), B<mlock>(2), B<mmap>(2), "
6786 "B<sbrk>(2), B<realloc>(3), B<malloc>(3)"
6787
6788 #. type: Plain text
6789 #: build/C/man2/mremap.2:214
6790 msgid ""
6791 "Your favorite text book on operating systems for more information on paged "
6792 "memory (e.g., I<Modern Operating Systems> by Andrew S. Tanenbaum, I<Inside "
6793 "Linux> by Randolf Bentson, I<The Design of the UNIX Operating System> by "
6794 "Maurice J. Bach)"
6795 msgstr ""
6796 "ページ分割されたメモリについてもっと詳しく知りたいならば、あなたのお気に入り"
6797 "のオペレーティングシステムの教科書を参照してほしい (例えば、 I<Modern "
6798 "Operating Systems> by Andrew S. Tanenbaum, I<Inside Linux> by Randolf "
6799 "Bentson, I<The Design of the UNIX Operating System> by Maurice J. Bach.)"
6800
6801 #. type: TH
6802 #: build/C/man2/msync.2:25
6803 #, no-wrap
6804 msgid "MSYNC"
6805 msgstr "MSYNC"
6806
6807 #. type: TH
6808 #: build/C/man2/msync.2:25 build/C/man2/remap_file_pages.2:28
6809 #, no-wrap
6810 msgid "2008-04-22"
6811 msgstr "2008-04-22"
6812
6813 #. type: Plain text
6814 #: build/C/man2/msync.2:28
6815 msgid "msync - synchronize a file with a memory map"
6816 msgstr "msync - ファイルをマップしたメモリと同期させる"
6817
6818 #. type: Plain text
6819 #: build/C/man2/msync.2:32
6820 msgid "B<int msync(void *>I<addr>B<, size_t >I<length>B<, int >I<flags>B<);>"
6821 msgstr "B<int msync(void *>I<addr>B<, size_t >I<length>B<, int >I<flags>B<);>"
6822
6823 #. type: Plain text
6824 #: build/C/man2/msync.2:48
6825 msgid ""
6826 "B<msync>()  flushes changes made to the in-core copy of a file that was "
6827 "mapped into memory using B<mmap>(2)  back to disk.  Without use of this call "
6828 "there is no guarantee that changes are written back before B<munmap>(2)  is "
6829 "called.  To be more precise, the part of the file that corresponds to the "
6830 "memory area starting at I<addr> and having length I<length> is updated."
6831 msgstr ""
6832 "B<msync>()  は B<mmap>(2)  を使ってメモリにマップされたファイルの、 メモリ上"
6833 "のコピーになされた変更をディスクに反映させる。 この関数を使用しないと、 "
6834 "B<munmap>(2)  が呼び出されるまで変更が書き戻される保証はない。 より正確には、"
6835 "ファイルのうち I<addr> から始まり長さ I<length> のメモリ領域に対応する部分が"
6836 "更新される。"
6837
6838 #. type: Plain text
6839 #: build/C/man2/msync.2:68
6840 msgid ""
6841 "The I<flags> argument may have the bits B<MS_ASYNC>, B<MS_SYNC>, and "
6842 "B<MS_INVALIDATE> set, but not both B<MS_ASYNC> and B<MS_SYNC>.  B<MS_ASYNC> "
6843 "specifies that an update be scheduled, but the call returns immediately.  "
6844 "B<MS_SYNC> asks for an update and waits for it to complete.  "
6845 "B<MS_INVALIDATE> asks to invalidate other mappings of the same file (so that "
6846 "they can be updated with the fresh values just written)."
6847 msgstr ""
6848 "I<flags> 引数にはビット B<MS_ASYNC>, B<MS_SYNC>, B<MS_INVALIDATE> を設定する"
6849 "ことができるが、 B<MS_ASYNC> と B<MS_SYNC> を同時に指定することはできない。 "
6850 "B<MS_ASYNC> は更新を予定に組み込むことを表し、呼び出しは直ちに返る。 "
6851 "B<MS_SYNC> は更新を要求し、更新が完了するまで待つ。 B<MS_INVALIDATE> は(たっ"
6852 "た今書き込んだ新しい値でマッピングを更新することができるように)  同じファイル"
6853 "に対する他のマッピングを無効にすることを要求する。"
6854
6855 #. type: Plain text
6856 #: build/C/man2/msync.2:73
6857 msgid ""
6858 "On success, zero is returned.  On error, -1 is returned, and I<errno> is set "
6859 "appropriately."
6860 msgstr ""
6861 "成功した場合、 0 が返る。エラーの場合、 -1 が返り、 I<errno> が適切に設定され"
6862 "る。"
6863
6864 #. type: TP
6865 #: build/C/man2/msync.2:74
6866 #, no-wrap
6867 msgid "B<EBUSY>"
6868 msgstr "B<EBUSY>"
6869
6870 #. type: Plain text
6871 #: build/C/man2/msync.2:80
6872 msgid ""
6873 "B<MS_INVALIDATE> was specified in I<flags>, and a memory lock exists for the "
6874 "specified address range."
6875 msgstr ""
6876 "I flags に B<MS_INVALIDATE> が指定されたが、指定されたアドレス範囲にロックが"
6877 "存在する。"
6878
6879 #. type: Plain text
6880 #: build/C/man2/msync.2:93
6881 msgid ""
6882 "I<addr> is not a multiple of PAGESIZE; or any bit other than B<MS_ASYNC> | "
6883 "B<MS_INVALIDATE> | B<MS_SYNC> is set in I<flags>; or both B<MS_SYNC> and "
6884 "B<MS_ASYNC> are set in I<flags>."
6885 msgstr ""
6886 "I<addr> が PAGESIZE の倍数でない。または、 I<flags> に B<MS_ASYNC>、"
6887 "B<MS_INVALIDATE>、B<MS_SYNC> 以外のビットが設定された。 または、 I<flags> に "
6888 "B<MS_SYNC> と B<MS_ASYNC> の両方が設定された。"
6889
6890 #. type: Plain text
6891 #: build/C/man2/msync.2:96
6892 msgid "The indicated memory (or part of it) was not mapped."
6893 msgstr "指定されたメモリ (またはその一部) がマップされていない。"
6894
6895 #. type: Plain text
6896 #: build/C/man2/msync.2:98 build/C/man3/posix_fallocate.3:105
6897 #: build/C/man3/shm_open.3:251 build/C/man7/shm_overview.7:103
6898 msgid "POSIX.1-2001."
6899 msgstr "POSIX.1-2001."
6900
6901 #. type: Plain text
6902 #: build/C/man2/msync.2:105
6903 msgid ""
6904 "This call was introduced in Linux 1.3.21, and then used B<EFAULT> instead of "
6905 "B<ENOMEM>.  In Linux 2.4.19 this was changed to the POSIX value B<ENOMEM>."
6906 msgstr ""
6907 "この関数は Linux 1.3.21 で導入されたが、 B<ENOMEM> ではなく B<EFAULT> が使わ"
6908 "れていた。 これは Linux 2.4.19 で POSIX における値 B<ENOMEM> に変更された。"
6909
6910 #.  POSIX.1-2001: It shall be defined to -1 or 0 or 200112L.
6911 #.  -1: unavailable, 0: ask using sysconf().
6912 #.  glibc defines them to 1.
6913 #. type: Plain text
6914 #: build/C/man2/msync.2:118
6915 msgid ""
6916 "On POSIX systems on which B<msync>()  is available, both "
6917 "B<_POSIX_MAPPED_FILES> and B<_POSIX_SYNCHRONIZED_IO> are defined in "
6918 "I<E<lt>unistd.hE<gt>> to a value greater than 0.  (See also B<sysconf>(3).)"
6919 msgstr ""
6920 "B<msync>()  が使用可能な POSIX システムでは B<_POSIX_MAPPED_FILES> と "
6921 "B<_POSIX_SYNCHRONIZED_IO> の両方が I<E<lt>unistd.hE<gt>> で 0 より大きい値に"
6922 "定義される。 (B<sysconf>(3)  を参照すること。 )"
6923
6924 #. type: TP
6925 #: build/C/man2/msync.2:120 build/C/man7/shm_overview.7:46
6926 #, no-wrap
6927 msgid "B<mmap>(2)"
6928 msgstr "B<mmap>(2)"
6929
6930 #. type: TH
6931 #: build/C/man3/mtrace.3:25
6932 #, no-wrap
6933 msgid "MTRACE"
6934 msgstr "MTRACE"
6935
6936 #. type: Plain text
6937 #: build/C/man3/mtrace.3:28
6938 msgid "mtrace, muntrace - malloc tracing"
6939 msgstr "mtrace, muntrace - malloc のトレース"
6940
6941 #. type: Plain text
6942 #: build/C/man3/mtrace.3:30
6943 msgid "B<#include E<lt>mcheck.hE<gt>>"
6944 msgstr "B<#include E<lt>mcheck.hE<gt>>"
6945
6946 #. type: Plain text
6947 #: build/C/man3/mtrace.3:32
6948 msgid "B<void mtrace(void);>"
6949 msgstr "B<void mtrace(void);>"
6950
6951 #. type: Plain text
6952 #: build/C/man3/mtrace.3:34
6953 msgid "B<void muntrace(void);>"
6954 msgstr "B<void muntrace(void);>"
6955
6956 #. type: Plain text
6957 #: build/C/man3/mtrace.3:46
6958 msgid ""
6959 "The B<mtrace>()  function installs hook functions for the memory-allocation "
6960 "functions (B<malloc>(3), B<realloc>(3)  B<memalign>(3), B<free>(3)).  These "
6961 "hook functions record tracing information about memory allocation and "
6962 "deallocation.  The tracing information can be used to discover memory leaks "
6963 "and attempts to free nonallocated memory in a program."
6964 msgstr ""
6965
6966 #. type: Plain text
6967 #: build/C/man3/mtrace.3:57
6968 msgid ""
6969 "The B<muntrace>()  function disables the hook functions installed by "
6970 "B<mtrace>(), so that tracing information is no longer recorded for the "
6971 "memory-allocation functions.  If no hook functions were successfully "
6972 "installed by B<mtrace>(), B<muntrace>()  does nothing."
6973 msgstr ""
6974
6975 #. type: Plain text
6976 #: build/C/man3/mtrace.3:65
6977 msgid ""
6978 "When B<mtrace>()  is called, it checks the value of the environment variable "
6979 "B<MALLOC_TRACE>, which should contain the pathname of a file in which the "
6980 "tracing information is to be recorded.  If the pathname is successfully "
6981 "opened, it is truncated to zero length."
6982 msgstr ""
6983
6984 #. type: Plain text
6985 #: build/C/man3/mtrace.3:78
6986 msgid ""
6987 "If B<MALLOC_TRACE> is not set, or the pathname it specifies is invalid or "
6988 "not writable, then no hook functions are installed, and B<mtrace>()  has no "
6989 "effect.  In set-user-ID and set-group-ID programs, B<MALLOC_TRACE> is "
6990 "ignored, and B<mtrace>()  has no effect."
6991 msgstr ""
6992
6993 #. type: Plain text
6994 #: build/C/man3/mtrace.3:86
6995 msgid ""
6996 "In normal usage, B<mtrace>()  is called once at the start of execution of a "
6997 "program, and B<muntrace>()  is never called."
6998 msgstr ""
6999
7000 #. type: Plain text
7001 #: build/C/man3/mtrace.3:96
7002 msgid ""
7003 "The tracing output produced after a call to B<mtrace>()  is textual, but not "
7004 "designed to be human readable.  The GNU C library provides a Perl script, "
7005 "B<mtrace>(1), that interprets the trace log and produces human-readable "
7006 "output.  For best results, the traced program should be compiled with "
7007 "debugging enabled, so that line-number information is recorded in the "
7008 "executable."
7009 msgstr ""
7010
7011 #. type: Plain text
7012 #: build/C/man3/mtrace.3:102
7013 msgid ""
7014 "The tracing performed by B<mtrace>()  incurs a performance penalty (if "
7015 "B<MALLOC_TRACE> points to a valid, writable pathname)."
7016 msgstr ""
7017
7018 #. type: Plain text
7019 #: build/C/man3/mtrace.3:108
7020 msgid ""
7021 "The line-number information produced by B<mtrace>(1)  is not always precise: "
7022 "the line number references may refer to the previous or following (non-"
7023 "blank)  line of the source code."
7024 msgstr ""
7025
7026 #. type: Plain text
7027 #: build/C/man3/mtrace.3:115
7028 msgid ""
7029 "The shell session below demonstrates the use of the B<mtrace>()  function "
7030 "and the B<mtrace>(1)  command in a program that has memory leaks at two "
7031 "different locations.  The demonstration uses the following program:"
7032 msgstr ""
7033
7034 #. type: Plain text
7035 #: build/C/man3/mtrace.3:122
7036 #, no-wrap
7037 msgid ""
7038 "$ B<cat t_mtrace.c>\n"
7039 "#include E<lt>mcheck.hE<gt>\n"
7040 "#include E<lt>stdlib.hE<gt>\n"
7041 "#include E<lt>stdio.hE<gt>\n"
7042 msgstr ""
7043 "$ B<cat t_mtrace.c>\n"
7044 "#include E<lt>mcheck.hE<gt>\n"
7045 "#include E<lt>stdlib.hE<gt>\n"
7046 "#include E<lt>stdio.hE<gt>\n"
7047
7048 #. type: Plain text
7049 #: build/C/man3/mtrace.3:127
7050 #, no-wrap
7051 msgid ""
7052 "int\n"
7053 "main(int argc, char *argv[])\n"
7054 "{\n"
7055 "    int j;\n"
7056 msgstr ""
7057 "int\n"
7058 "main(int argc, char *argv[])\n"
7059 "{\n"
7060 "    int j;\n"
7061
7062 #. type: Plain text
7063 #: build/C/man3/mtrace.3:129
7064 #, no-wrap
7065 msgid "    mtrace();\n"
7066 msgstr "    mtrace();\n"
7067
7068 #. type: Plain text
7069 #: build/C/man3/mtrace.3:132
7070 #, no-wrap
7071 msgid ""
7072 "    for (j = 0; j E<lt> 2; j++)\n"
7073 "        malloc(100);            /* Never freed--a memory leak */\n"
7074 msgstr ""
7075 "    for (j = 0; j E<lt> 2; j++)\n"
7076 "        malloc(100);            /* Never freed--a memory leak */\n"
7077
7078 #. type: Plain text
7079 #: build/C/man3/mtrace.3:136
7080 #, no-wrap
7081 msgid ""
7082 "    calloc(16, 16);             /* Never freed--a memory leak */\n"
7083 "    exit(EXIT_SUCCESS);\n"
7084 "}\n"
7085 msgstr ""
7086 "    calloc(16, 16);             /* Never freed--a memory leak */\n"
7087 "    exit(EXIT_SUCCESS);\n"
7088 "}\n"
7089
7090 #. type: Plain text
7091 #: build/C/man3/mtrace.3:142
7092 msgid ""
7093 "When we run the program as follows, we see that B<mtrace>()  diagnosed "
7094 "memory leaks at two different locations in the program:"
7095 msgstr ""
7096
7097 #. type: Plain text
7098 #: build/C/man3/mtrace.3:155
7099 #, no-wrap
7100 msgid ""
7101 "$ B<cc -g t_mtrace.c -o t_mtrace>\n"
7102 "$ B<export MALLOC_TRACE=/tmp/t>\n"
7103 "$ B<./t_mtrace>\n"
7104 "$ B<mtrace ./t_mtrace $MALLOC_TRACE>\n"
7105 "Memory not freed:\n"
7106 "-----------------\n"
7107 "   Address     Size     Caller\n"
7108 "0x084c9378     0x64  at /home/cecilia/t_mtrace.c:12\n"
7109 "0x084c93e0     0x64  at /home/cecilia/t_mtrace.c:12\n"
7110 "0x084c9448    0x100  at /home/cecilia/t_mtrace.c:16\n"
7111 msgstr ""
7112 "$ B<cc -g t_mtrace.c -o t_mtrace>\n"
7113 "$ B<export MALLOC_TRACE=/tmp/t>\n"
7114 "$ B<./t_mtrace>\n"
7115 "$ B<mtrace ./t_mtrace $MALLOC_TRACE>\n"
7116 "Memory not freed:\n"
7117 "-----------------\n"
7118 "   Address     Size     Caller\n"
7119 "0x084c9378     0x64  at /home/cecilia/t_mtrace.c:12\n"
7120 "0x084c93e0     0x64  at /home/cecilia/t_mtrace.c:12\n"
7121 "0x084c9448    0x100  at /home/cecilia/t_mtrace.c:16\n"
7122
7123 #. type: Plain text
7124 #: build/C/man3/mtrace.3:167
7125 msgid ""
7126 "The first two messages about unfreed memory correspond to the two B<malloc>"
7127 "(3)  calls inside the I<for> loop.  The final message corresponds to the "
7128 "call to B<calloc>(3)  (which in turn calls B<malloc>(3))."
7129 msgstr ""
7130
7131 #. type: Plain text
7132 #: build/C/man3/mtrace.3:172
7133 msgid "B<mtrace>(1), B<malloc>(3), B<malloc_hook>(3), B<mcheck>(3)"
7134 msgstr "B<mtrace>(1), B<malloc>(3), B<malloc_hook>(3), B<mcheck>(3)"
7135
7136 #. type: TH
7137 #: build/C/man2/posix_fadvise.2:28
7138 #, no-wrap
7139 msgid "POSIX_FADVISE"
7140 msgstr "POSIX_FADVISE"
7141
7142 #. type: TH
7143 #: build/C/man2/posix_fadvise.2:28 build/C/man2/readahead.2:28
7144 #: build/C/man2/sync_file_range.2:30
7145 #, fuzzy, no-wrap
7146 #| msgid "2013-02-12"
7147 msgid "2013-04-01"
7148 msgstr "2013-02-12"
7149
7150 #. type: Plain text
7151 #: build/C/man2/posix_fadvise.2:31
7152 msgid "posix_fadvise - predeclare an access pattern for file data"
7153 msgstr "posix_fadvise - ファイルデータのアクセスパターンをあらかじめ宣言する"
7154
7155 #. type: Plain text
7156 #: build/C/man2/posix_fadvise.2:34 build/C/man3/posix_fallocate.3:31
7157 #, no-wrap
7158 msgid "B<#include E<lt>fcntl.hE<gt>>\n"
7159 msgstr "B<#include E<lt>fcntl.hE<gt>>\n"
7160
7161 #. type: Plain text
7162 #: build/C/man2/posix_fadvise.2:37
7163 #, no-wrap
7164 msgid "B<int posix_fadvise(int >I<fd>B<, off_t >I<offset>B<, off_t >I<len>B<, int >I<advice>B<);>\n"
7165 msgstr "B<int posix_fadvise(int >I<fd>B<, off_t >I<offset>B<, off_t >I<len>B<, int >I<advice>B<);>\n"
7166
7167 #. type: Plain text
7168 #: build/C/man2/posix_fadvise.2:46
7169 msgid "B<posix_fadvise>():"
7170 msgstr "B<posix_fadvise>():"
7171
7172 #. type: Plain text
7173 #: build/C/man2/posix_fadvise.2:48 build/C/man3/posix_fallocate.3:44
7174 msgid "_XOPEN_SOURCE\\ E<gt>=\\ 600 || _POSIX_C_SOURCE\\ E<gt>=\\ 200112L"
7175 msgstr "_XOPEN_SOURCE\\ E<gt>=\\ 600 || _POSIX_C_SOURCE\\ E<gt>=\\ 200112L"
7176
7177 #. type: Plain text
7178 #: build/C/man2/posix_fadvise.2:56
7179 msgid ""
7180 "Programs can use B<posix_fadvise>()  to announce an intention to access file "
7181 "data in a specific pattern in the future, thus allowing the kernel to "
7182 "perform appropriate optimizations."
7183 msgstr ""
7184 "プログラムは、将来特定のパターンでファイルデータに アクセスする意思を伝えるた"
7185 "めに B<posix_fadvise>()  を使うことができる。 これにより、カーネルが適切な最"
7186 "適化を実行することが可能になる。"
7187
7188 #. type: Plain text
7189 #: build/C/man2/posix_fadvise.2:63
7190 msgid ""
7191 "The I<advice> applies to a (not necessarily existent) region starting at "
7192 "I<offset> and extending for I<len> bytes (or until the end of the file if "
7193 "I<len> is 0) within the file referred to by I<fd>.  The I<advice> is not "
7194 "binding; it merely constitutes an expectation on behalf of the application."
7195 msgstr ""
7196 "I<advice> は I<fd> が参照しているファイルの I<offset> から始まる I<len> バ"
7197 "イ\n"
7198 "トの範囲内 (I<len> が 0 の場合はファイルの終りまで) の (必ずしも存在しない)\n"
7199 "領域に適用される。 I<advice> は義務づけではない。 I<advice> は単にアプリ"
7200 "ケー\n"
7201 "ションのために可能性を構成するだけである。"
7202
7203 #. type: Plain text
7204 #: build/C/man2/posix_fadvise.2:65
7205 msgid "Permissible values for I<advice> include:"
7206 msgstr "I<advice> に許される値には、以下のものが含まれる:"
7207
7208 #. type: TP
7209 #: build/C/man2/posix_fadvise.2:65
7210 #, no-wrap
7211 msgid "B<POSIX_FADV_NORMAL>"
7212 msgstr "B<POSIX_FADV_NORMAL>"
7213
7214 #. type: Plain text
7215 #: build/C/man2/posix_fadvise.2:71
7216 msgid ""
7217 "Indicates that the application has no advice to give about its access "
7218 "pattern for the specified data.  If no advice is given for an open file, "
7219 "this is the default assumption."
7220 msgstr ""
7221 "指定されたデータのアクセスパターンを指示するアドバイスを アプリケーションが何"
7222 "も持っていないことを示す。 オープンされたファイルにアドバイスが指定されない場"
7223 "合、 これがデフォルトで仮定される。"
7224
7225 #. type: TP
7226 #: build/C/man2/posix_fadvise.2:71
7227 #, no-wrap
7228 msgid "B<POSIX_FADV_SEQUENTIAL>"
7229 msgstr "B<POSIX_FADV_SEQUENTIAL>"
7230
7231 #. type: Plain text
7232 #: build/C/man2/posix_fadvise.2:75
7233 msgid ""
7234 "The application expects to access the specified data sequentially (with "
7235 "lower offsets read before higher ones)."
7236 msgstr ""
7237 "アプリケーションは指定されたデータがシーケンシャルに (大きなオフセットの前に"
7238 "小さなオフセットのデータを読むように)  アクセスされることを期待する。"
7239
7240 #. type: TP
7241 #: build/C/man2/posix_fadvise.2:75
7242 #, no-wrap
7243 msgid "B<POSIX_FADV_RANDOM>"
7244 msgstr "B<POSIX_FADV_RANDOM>"
7245
7246 #. type: Plain text
7247 #: build/C/man2/posix_fadvise.2:78
7248 msgid "The specified data will be accessed in random order."
7249 msgstr "指定されたデータがランダムな順番でアクセスされる。"
7250
7251 #. type: TP
7252 #: build/C/man2/posix_fadvise.2:78
7253 #, no-wrap
7254 msgid "B<POSIX_FADV_NOREUSE>"
7255 msgstr "B<POSIX_FADV_NOREUSE>"
7256
7257 #. type: Plain text
7258 #: build/C/man2/posix_fadvise.2:81
7259 msgid "The specified data will be accessed only once."
7260 msgstr "指定されたデータは 1 度しかアクセスされない。"
7261
7262 #. type: TP
7263 #: build/C/man2/posix_fadvise.2:81
7264 #, no-wrap
7265 msgid "B<POSIX_FADV_WILLNEED>"
7266 msgstr "B<POSIX_FADV_WILLNEED>"
7267
7268 #. type: Plain text
7269 #: build/C/man2/posix_fadvise.2:84
7270 msgid "The specified data will be accessed in the near future."
7271 msgstr "指定されたデータは近い将来アクセスされる。"
7272
7273 #. type: TP
7274 #: build/C/man2/posix_fadvise.2:84
7275 #, no-wrap
7276 msgid "B<POSIX_FADV_DONTNEED>"
7277 msgstr "B<POSIX_FADV_DONTNEED>"
7278
7279 #. type: Plain text
7280 #: build/C/man2/posix_fadvise.2:87
7281 msgid "The specified data will not be accessed in the near future."
7282 msgstr "指定されたデータは近い将来アクセスされない。"
7283
7284 #. type: Plain text
7285 #: build/C/man2/posix_fadvise.2:90
7286 msgid "On success, zero is returned.  On error, an error number is returned."
7287 msgstr "成功した場合は 0 が返される。 失敗した場合はエラー番号が返される。"
7288
7289 #. type: Plain text
7290 #: build/C/man2/posix_fadvise.2:94
7291 msgid "The I<fd> argument was not a valid file descriptor."
7292 msgstr "I<fd> 引き数が有効なファイルディスクリプタでない。"
7293
7294 #. type: Plain text
7295 #: build/C/man2/posix_fadvise.2:97
7296 msgid "An invalid value was specified for I<advice>."
7297 msgstr "無効な値が I<advice> に指定された。"
7298
7299 #. type: Plain text
7300 #: build/C/man2/posix_fadvise.2:104
7301 msgid ""
7302 "The specified file descriptor refers to a pipe or FIFO.  (Linux actually "
7303 "returns B<EINVAL> in this case.)"
7304 msgstr ""
7305 "指定されたファイルディスクリプタがパイプまたは FIFO を参照している (この場"
7306 "合、Linux は実際には B<EINVAL> を返す)。"
7307
7308 #.  of fadvise64_64()
7309 #. type: Plain text
7310 #: build/C/man2/posix_fadvise.2:112
7311 msgid ""
7312 "Kernel support first appeared in Linux 2.5.60; the underlying system call is "
7313 "called B<fadvise64>().  Library support has been provided since glibc "
7314 "version 2.2, via the wrapper function B<posix_fadvise>()."
7315 msgstr ""
7316 "カーネルによるサポートは Linux 2.5.60 で最初に登場し、\n"
7317 "対応するシステムコールは B<fadvise64>() という名前である。\n"
7318 "ライブラリによるサポートは glibc バージョン 2.2 以降で提供されており、\n"
7319 "ラッパー関数は B<posix_fadvise>() という名前である。"
7320
7321 #. type: Plain text
7322 #: build/C/man2/posix_fadvise.2:121
7323 msgid ""
7324 "POSIX.1-2001.  Note that the type of the I<len> argument was changed from "
7325 "I<size_t> to I<off_t> in POSIX.1-2003 TC1."
7326 msgstr ""
7327 "POSIX.1-2001.  I<len> 引き数の型が POSIX.1-2003 TC1 において I<size_t> から "
7328 "I<off_t> に変更された点に注意すること。"
7329
7330 #. type: Plain text
7331 #: build/C/man2/posix_fadvise.2:127
7332 msgid ""
7333 "Under Linux, B<POSIX_FADV_NORMAL> sets the readahead window to the default "
7334 "size for the backing device; B<POSIX_FADV_SEQUENTIAL> doubles this size, and "
7335 "B<POSIX_FADV_RANDOM> disables file readahead entirely.  These changes affect "
7336 "the entire file, not just the specified region (but other open file handles "
7337 "to the same file are unaffected)."
7338 msgstr ""
7339 "Linux では、B<POSIX_FADV_NORMAL> はバッキングデバイスの デフォルトサイズに先"
7340 "読み (readahead) ウインドウを設定する。 B<POSIX_FADV_SEQUENTIAL> はこのサイズ"
7341 "を 2 倍し、 B<POSIX_FADV_RANDOM> は先読みを全く無効にする。 これらの変更は"
7342 "ファイル全体に影響し、指定された領域のみに影響するわけではない (しかし同じ"
7343 "ファイルに対する他のオープンファイルハンドルは影響を受けない)。"
7344
7345 #. type: Plain text
7346 #: build/C/man2/posix_fadvise.2:134
7347 msgid ""
7348 "B<POSIX_FADV_WILLNEED> initiates a nonblocking read of the specified region "
7349 "into the page cache.  The amount of data read may be decreased by the kernel "
7350 "depending on virtual memory load.  (A few megabytes will usually be fully "
7351 "satisfied, and more is rarely useful.)"
7352 msgstr ""
7353 "B<POSIX_FADV_WILLNEED> は、 ページキャッシュに指定領域のブロックされない読み"
7354 "込みを開始する。 読み込まれるデータの総量は、 仮想メモリの負荷に依ってカーネ"
7355 "ルが減らすかもしれない (数メガバイトであれば通常は全く十分であり、 それより多"
7356 "くてもめったに役に立たない)。"
7357
7358 #. type: Plain text
7359 #: build/C/man2/posix_fadvise.2:138
7360 msgid ""
7361 "In kernels before 2.6.18, B<POSIX_FADV_NOREUSE> had the same semantics as "
7362 "B<POSIX_FADV_WILLNEED>.  This was probably a bug; since kernel 2.6.18, this "
7363 "flag is a no-op."
7364 msgstr ""
7365 "2.6.18 より前のカーネルでは、B<POSIX_FADV_NOREUSE> は B<POSIX_FADV_WILLNEED> "
7366 "と同じ意味であった。 これは多分バグであった。 カーネル 2.6.18 以降では、この"
7367 "フラグは何も行わない。"
7368
7369 #. type: Plain text
7370 #: build/C/man2/posix_fadvise.2:146
7371 msgid ""
7372 "B<POSIX_FADV_DONTNEED> attempts to free cached pages associated with the "
7373 "specified region.  This is useful, for example, while streaming large "
7374 "files.  A program may periodically request the kernel to free cached data "
7375 "that has already been used, so that more useful cached pages are not "
7376 "discarded instead."
7377 msgstr ""
7378 "B<POSIX_FADV_DONTNEED> は指定された領域に関連付けられた キャッシュページを解"
7379 "放しようとする。 例えば、これは大きなファイルをストリーミングするときに役立"
7380 "つ。 プログラムは、使用済みのキャッシュされたデータを解放するように、 定期的"
7381 "にカーネルに要求するかもしれない。 そうすることにより、さらに有効なキャッシュ"
7382 "されたページが、 代わりに破棄されることはない。"
7383
7384 #. type: Plain text
7385 #: build/C/man2/posix_fadvise.2:154
7386 msgid ""
7387 "Pages that have not yet been written out will be unaffected, so if the "
7388 "application wishes to guarantee that pages will be released, it should call "
7389 "B<fsync>(2)  or B<fdatasync>(2)  first."
7390 msgstr ""
7391 "まだ書き出されていないページは影響を受けないので、 そのページの解放が保証され"
7392 "ることをアプリケーションが望んでいるなら、 最初に B<fsync>(2)  または "
7393 "B<fdatasync>(2)  を呼ぶべきである。"
7394
7395 #. type: SS
7396 #: build/C/man2/posix_fadvise.2:154
7397 #, no-wrap
7398 msgid "Architecture-specific variants"
7399 msgstr ""
7400
7401 #. type: Plain text
7402 #: build/C/man2/posix_fadvise.2:171
7403 #, fuzzy
7404 #| msgid ""
7405 #| "Some architectures (e.g., PowerPC, ARM)  need 64-bit arguments to be "
7406 #| "aligned in a suitable pair of registers.  On such architectures, the call "
7407 #| "signature of B<sync_file_range>()  is flawed, since it forces a register "
7408 #| "to be wasted as padding between the I<fd> and I<offset> arguments.  "
7409 #| "Therefore, these architectures define a different system call that orders "
7410 #| "the arguments suitably:"
7411 msgid ""
7412 "Some architectures require 64-bit arguments to be aligned in a suitable pair "
7413 "of registers (see B<syscall>(2)  for further detail).  On such "
7414 "architectures, the call signature of B<posix_fadvise>()  shown in the "
7415 "SYNOPSIS would force a register to be wasted as padding between the I<fd> "
7416 "and I<len> arguments.  Therefore, these architectures define a version of "
7417 "the system call that orders the arguments suitably, but otherwise is "
7418 "otherwise exactly the same as B<posix_fadvise>()."
7419 msgstr ""
7420 "いくつかのアーキテクチャ (例えば、 PowerPC や ARM) では、 64 ビットの\n"
7421 "引き数は適切なレジスタの組に割り当てる必要がある。このようなアーキテク\n"
7422 "チャでは、 B<sync_file_range>() の呼び出し方には欠陥があり、それはこの\n"
7423 "システムコールでは引き数 I<fd> と I<offset> の間のパディング (詰めもの)\n"
7424 "でレジスタが一つ消費されてしまうというものである。そのため、これらの\n"
7425 "アーキテクチャでは引き数が適切な順序になった別のシステムコールが定義\n"
7426 "されている。"
7427
7428 #. type: Plain text
7429 #: build/C/man2/posix_fadvise.2:173
7430 msgid "For example, since Linux 2.6.14, ARM has the following system call:"
7431 msgstr ""
7432
7433 #. type: Plain text
7434 #: build/C/man2/posix_fadvise.2:178
7435 #, no-wrap
7436 msgid ""
7437 "B<long arm_fadvise64_64(int >I<fd>B<, int >I<advice>B<,>\n"
7438 "B<                      loff_t >I<offset>B<, loff_t >I<len>B<);>\n"
7439 msgstr ""
7440 "B<long arm_fadvise64_64(int >I<fd>B<, int >I<advice>B<,>\n"
7441 "B<                      loff_t >I<offset>B<, loff_t >I<len>B<);>\n"
7442
7443 #. type: Plain text
7444 #: build/C/man2/posix_fadvise.2:186
7445 msgid ""
7446 "These architecture-specific details are generally hidden from applications "
7447 "by the glibc B<posix_fadvise>()  wrapper function, which invokes the "
7448 "appropriate architecture-specific system call."
7449 msgstr ""
7450
7451 #. type: Plain text
7452 #: build/C/man2/posix_fadvise.2:191
7453 msgid ""
7454 "In kernels before 2.6.6, if I<len> was specified as 0, then this was "
7455 "interpreted literally as \"zero bytes\", rather than as meaning \"all bytes "
7456 "through to the end of the file\"."
7457 msgstr ""
7458 "2.6.6 より前のカーネルでは、 I<len> に 0 が指定された場合、 「ファイルの終り"
7459 "までの全てのバイト」という意味ではなく、 文字通り「0 バイト」として解釈されて"
7460 "いた。"
7461
7462 #.  FIXME . Write a posix_fadvise(3) page.
7463 #. type: Plain text
7464 #: build/C/man2/posix_fadvise.2:197
7465 msgid ""
7466 "B<readahead>(2), B<sync_file_range>(2), B<posix_fallocate>(3), "
7467 "B<posix_madvise>(3)"
7468 msgstr ""
7469 "B<readahead>(2), B<sync_file_range>(2), B<posix_fallocate>(3),\n"
7470 "B<posix_madvise>(3)"
7471
7472 #. type: TH
7473 #: build/C/man3/posix_fallocate.3:25
7474 #, no-wrap
7475 msgid "POSIX_FALLOCATE"
7476 msgstr "POSIX_FALLOCATE"
7477
7478 #. type: Plain text
7479 #: build/C/man3/posix_fallocate.3:28
7480 msgid "posix_fallocate - allocate file space"
7481 msgstr "posix_fallocate - ファイルのスペースを確保する"
7482
7483 #. type: Plain text
7484 #: build/C/man3/posix_fallocate.3:33
7485 #, no-wrap
7486 msgid "B<int posix_fallocate(int >I<fd>B<, off_t >I<offset>B<, off_t >I<len>B<);>\n"
7487 msgstr "B<int posix_fallocate(int >I<fd>B<, off_t >I<offset>B<, off_t >I<len>B<);>\n"
7488
7489 #. type: Plain text
7490 #: build/C/man3/posix_fallocate.3:42
7491 msgid "B<posix_fallocate>():"
7492 msgstr "B<posix_fallocate>():"
7493
7494 #. type: Plain text
7495 #: build/C/man3/posix_fallocate.3:61
7496 msgid ""
7497 "The function B<posix_fallocate>()  ensures that disk space is allocated for "
7498 "the file referred to by the descriptor I<fd> for the bytes in the range "
7499 "starting at I<offset> and continuing for I<len> bytes.  After a successful "
7500 "call to B<posix_fallocate>(), subsequent writes to bytes in the specified "
7501 "range are guaranteed not to fail because of lack of disk space."
7502 msgstr ""
7503 "関数 B<posix_fallocate>()  は、ディスクリプタ I<fd> で参照されるファイルに対"
7504 "して、ディスクスペースを確実に確保する。 ディスクスペースは I<offset> から始"
7505 "まる I<len> バイトの範囲のバイトである。 B<posix_fallocate>()  の呼び出しが成"
7506 "功した後、指定された範囲のバイトに対する書き込みは、 ディスクスペースの不足で"
7507 "失敗しないことが保証される。"
7508
7509 #. type: Plain text
7510 #: build/C/man3/posix_fallocate.3:66
7511 msgid ""
7512 "If the size of the file is less than I<offset>+I<len>, then the file is "
7513 "increased to this size; otherwise the file size is left unchanged."
7514 msgstr ""
7515 "ファイルのサイズが I<offset>+I<len> より小さい場合、ファイルはこのサイズにな"
7516 "るように拡大される。 それ以外の場合、ファイルサイズは変わらない。"
7517
7518 #. type: Plain text
7519 #: build/C/man3/posix_fallocate.3:72
7520 msgid ""
7521 "B<posix_fallocate>()  returns zero on success, or an error number on "
7522 "failure.  Note that I<errno> is not set."
7523 msgstr ""
7524 "B<posix_fallocate>()  は成功した場合、0 を返す。 失敗した場合、エラー番号を返"
7525 "す。 I<errno> が設定されない点に注意すること。"
7526
7527 #. type: Plain text
7528 #: build/C/man3/posix_fallocate.3:81
7529 msgid "I<offset+len> exceeds the maximum file size."
7530 msgstr "I<offset+len> が最大ファイルサイズを超えている。"
7531
7532 #. type: Plain text
7533 #: build/C/man3/posix_fallocate.3:91
7534 msgid "I<fd> does not refer to a regular file."
7535 msgstr "I<fd> が通常のファイルとして参照されていない。"
7536
7537 #. type: Plain text
7538 #: build/C/man3/posix_fallocate.3:100
7539 msgid "I<fd> refers to a pipe."
7540 msgstr "I<fd> がパイプを参照している。"
7541
7542 #. type: Plain text
7543 #: build/C/man3/posix_fallocate.3:103
7544 msgid "B<posix_fallocate>()  is available since glibc 2.1.94."
7545 msgstr "B<posix_fallocate>()  は glibc 2.1.94 以降で利用可能である。"
7546
7547 #. type: Plain text
7548 #: build/C/man3/posix_fallocate.3:128
7549 msgid ""
7550 "POSIX.1-2008 says that an implementation I<shall> give the B<EINVAL> error "
7551 "if I<len> was 0, or I<offset> was less than 0.  POSIX.1-2001 says that an "
7552 "implementation I<shall> give the B<EINVAL> error if I<len> is less than 0, "
7553 "or I<offset> was less than 0, and I<may> give the error if I<len> equals "
7554 "zero."
7555 msgstr ""
7556 "POSIX.1-2008 では、 I<len> が 0 の場合、もしくは I<offset> が 0 未満の場合、 "
7557 "B<EINVAL> エラーを返すものとされている。 POSIX.1-2001 では、 I<len> が 0 未満"
7558 "の場合、もしくは I<offset> が 0 未満の場合、 B<EINVAL> エラーを返すものとされ"
7559 "ている。また、 I<len> が 0 の場合、 B<EINVAL> エラーを返してもよいとされてい"
7560 "る。"
7561
7562 #. type: Plain text
7563 #: build/C/man3/posix_fallocate.3:133
7564 msgid "B<fallocate>(1), B<fallocate>(2), B<lseek>(2), B<posix_fadvise>(2)"
7565 msgstr "B<fallocate>(1), B<fallocate>(2), B<lseek>(2), B<posix_fadvise>(2)"
7566
7567 #. type: TH
7568 #: build/C/man3/posix_memalign.3:29
7569 #, no-wrap
7570 msgid "POSIX_MEMALIGN"
7571 msgstr "POSIX_MEMALIGN"
7572
7573 #. type: TH
7574 #: build/C/man3/posix_memalign.3:29
7575 #, no-wrap
7576 msgid "2012-03-23"
7577 msgstr "2012-03-23"
7578
7579 #. type: Plain text
7580 #: build/C/man3/posix_memalign.3:32
7581 msgid ""
7582 "posix_memalign, aligned_alloc, memalign, valloc, pvalloc - allocate aligned "
7583 "memory"
7584 msgstr ""
7585 "posix_memalign, aligned_alloc, memalign, valloc, pvalloc - アラインメント\n"
7586 "されたメモリの割り当てを行う"
7587
7588 #. type: Plain text
7589 #: build/C/man3/posix_memalign.3:39
7590 #, no-wrap
7591 msgid ""
7592 "B<int posix_memalign(void **>I<memptr>B<, size_t >I<alignment>B<, size_t >I<size>B<);>\n"
7593 "B<void *aligned_alloc(size_t >I<alignment>B<, size_t >I<size>B<);>\n"
7594 "B<void *valloc(size_t >I<size>B<);>\n"
7595 msgstr ""
7596 "B<int posix_memalign(void **>I<memptr>B<, size_t >I<alignment>B<, size_t >I<size>B<);>\n"
7597 "B<void *aligned_alloc(size_t >I<alignment>B<, size_t >I<size>B<);>\n"
7598 "B<void *valloc(size_t >I<size>B<);>\n"
7599
7600 #. type: Plain text
7601 #: build/C/man3/posix_memalign.3:44
7602 #, no-wrap
7603 msgid ""
7604 "B<void *memalign(size_t >I<alignment>B<, size_t >I<size>B<);>\n"
7605 "B<void *pvalloc(size_t >I<size>B<);>\n"
7606 msgstr ""
7607 "B<void *memalign(size_t >I<alignment>B<, size_t >I<size>B<);>\n"
7608 "B<void *pvalloc(size_t >I<size>B<);>\n"
7609
7610 #. type: Plain text
7611 #: build/C/man3/posix_memalign.3:54
7612 msgid ""
7613 "B<posix_memalign>(): _POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ "
7614 "E<gt>=\\ 600"
7615 msgstr ""
7616 "B<posix_memalign>(): _POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ "
7617 "E<gt>=\\ 600"
7618
7619 #. type: Plain text
7620 #: build/C/man3/posix_memalign.3:57
7621 msgid "B<aligned_alloc>(): _ISOC11_SOURCE"
7622 msgstr "B<aligned_alloc>(): _ISOC11_SOURCE"
7623
7624 #. type: Plain text
7625 #: build/C/man3/posix_memalign.3:59
7626 msgid "B<valloc>():"
7627 msgstr "B<valloc>():"
7628
7629 #. type: TP
7630 #: build/C/man3/posix_memalign.3:62
7631 #, no-wrap
7632 msgid "Since glibc 2.12:"
7633 msgstr "glibc 2.12 以降:"
7634
7635 #. type: Plain text
7636 #: build/C/man3/posix_memalign.3:69
7637 #, no-wrap
7638 msgid ""
7639 "_BSD_SOURCE ||\n"
7640 "    (_XOPEN_SOURCE\\ E<gt>=\\ 500 ||\n"
7641 "        _XOPEN_SOURCE\\ &&\\ _XOPEN_SOURCE_EXTENDED) &&\n"
7642 "    !(_POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ E<gt>=\\ 600)\n"
7643 msgstr ""
7644 "_BSD_SOURCE ||\n"
7645 "    (_XOPEN_SOURCE\\ E<gt>=\\ 500 ||\n"
7646 "        _XOPEN_SOURCE\\ &&\\ _XOPEN_SOURCE_EXTENDED) &&\n"
7647 "    !(_POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ E<gt>=\\ 600)\n"
7648
7649 #. type: TP
7650 #: build/C/man3/posix_memalign.3:71
7651 #, no-wrap
7652 msgid "Before glibc 2.12:"
7653 msgstr "glibc 2.12 より前:"
7654
7655 #. type: Plain text
7656 #: build/C/man3/posix_memalign.3:75
7657 msgid ""
7658 "_BSD_SOURCE || _XOPEN_SOURCE\\ E<gt>=\\ 500 || _XOPEN_SOURCE\\ &&\\ "
7659 "_XOPEN_SOURCE_EXTENDED"
7660 msgstr ""
7661 "_BSD_SOURCE || _XOPEN_SOURCE\\ E<gt>=\\ 500 || _XOPEN_SOURCE\\ &&\\ "
7662 "_XOPEN_SOURCE_EXTENDED"
7663
7664 #. type: Plain text
7665 #: build/C/man3/posix_memalign.3:82
7666 msgid ""
7667 "(The (nonstandard) header file I<E<lt>malloc.hE<gt>> also exposes the "
7668 "declaration of B<valloc>(); no feature test macros are required.)"
7669 msgstr ""
7670 "((非標準の) ヘッダファイル I<E<lt>malloc.hE<gt>> も\n"
7671 "B<valloc>() の宣言も公開する。機能検査マクロは不要である。"
7672
7673 #.  glibc does this:
7674 #. type: Plain text
7675 #: build/C/man3/posix_memalign.3:103
7676 msgid ""
7677 "The function B<posix_memalign>()  allocates I<size> bytes and places the "
7678 "address of the allocated memory in I<*memptr>.  The address of the allocated "
7679 "memory will be a multiple of I<alignment>, which must be a power of two and "
7680 "a multiple of I<sizeof(void *)>.  If I<size> is 0, then B<posix_memalign>()  "
7681 "returns either NULL, or a unique pointer value that can later be "
7682 "successfully passed to B<free>(3)."
7683 msgstr ""
7684 "関数 B<posix_memalign>()  は、 I<size> バイトのメモリを割り当て、割り当てられ"
7685 "たメモリのアドレスを I<*memptr> に設定する。 割り当てられたメモリのアドレス"
7686 "は I<alignment> の倍数になっているはずである。 I<alignment> は 2 のべき乗で、"
7687 "かつ I<sizeof(void *)> の倍数でなければならない。 I<size> が 0 の場合、 "
7688 "B<posix_memalign>()  は NULL か一意なポインタ値を返す。 このポインタ値は、後"
7689 "で B<free>(3)  に問題なく渡すことができる。"
7690
7691 #.  The behavior of memalign() for size==0 is as for posix_memalign()
7692 #.  but no standards govern this.
7693 #. type: Plain text
7694 #: build/C/man3/posix_memalign.3:114
7695 msgid ""
7696 "The obsolete function B<memalign>()  allocates I<size> bytes and returns a "
7697 "pointer to the allocated memory.  The memory address will be a multiple of "
7698 "I<alignment>, which must be a power of two."
7699 msgstr ""
7700 "廃止された関数である B<memalign>() は、 I<size> バイトのメモリを割り当て、\n"
7701 "割り当てられたメモリへのポインタを返す。 メモリのアドレスは I<alignment> \n"
7702 "の倍数になっているはずである。 I<alignment> は 2 のべき乗でなければならない。"
7703
7704 #. type: Plain text
7705 #: build/C/man3/posix_memalign.3:123
7706 msgid ""
7707 "The function B<aligned_alloc>()  is the same as B<memalign>(), except for "
7708 "the added restriction that I<size> should be a multiple of I<alignment>."
7709 msgstr ""
7710 "関数 B<aligned_alloc>() は B<memalign>() と同じだが、I<size> が "
7711 "I<alignment>\n"
7712 "の倍数でなければならないという追加の制限がある点が異なる。"
7713
7714 #. type: Plain text
7715 #: build/C/man3/posix_memalign.3:132
7716 msgid ""
7717 "The obsolete function B<valloc>()  allocates I<size> bytes and returns a "
7718 "pointer to the allocated memory.  The memory address will be a multiple of "
7719 "the page size.  It is equivalent to I<memalign(sysconf(_SC_PAGESIZE),size)>."
7720 msgstr ""
7721 "廃止された関数である B<valloc>()  は I<size> バイトのメモリを割り当て、割り当"
7722 "てられたメモリへのポインタを返す。 メモリのアドレスはページサイズの倍数になっ"
7723 "ているはずである。 これは I<memalign(sysconf(_SC_PAGESIZE),size)> と等価であ"
7724 "る。"
7725
7726 #. type: Plain text
7727 #: build/C/man3/posix_memalign.3:139
7728 msgid ""
7729 "The obsolete function B<pvalloc>()  is similar to B<valloc>(), but rounds "
7730 "the size of the allocation up to the next multiple of the system page size."
7731 msgstr ""
7732 "廃止された関数 B<pvalloc>() は B<valloc>() と同様だが、\n"
7733 "割り当てられるサイズがシステムのページサイズの倍数に切り上げられる。"
7734
7735 #. type: Plain text
7736 #: build/C/man3/posix_memalign.3:141
7737 msgid "For all of these functions, the memory is not zeroed."
7738 msgstr "これらの関数はいずれもメモリのゼロクリアを行わない。"
7739
7740 #. type: Plain text
7741 #: build/C/man3/posix_memalign.3:148
7742 msgid ""
7743 "B<aligned_alloc>(), B<memalign>(), B<valloc>(), and B<pvalloc>()  return a "
7744 "pointer to the allocated memory, or NULL if the request fails."
7745 msgstr ""
7746 "B<aligned_alloc>(), B<memalign>(), B<valloc>(), B<pvalloc>() は割り当てられ"
7747 "た\n"
7748 "メモリへのポインタを返す。 割り当てに失敗した場合は NULL を返す。"
7749
7750 #. type: Plain text
7751 #: build/C/man3/posix_memalign.3:155
7752 msgid ""
7753 "B<posix_memalign>()  returns zero on success, or one of the error values "
7754 "listed in the next section on failure.  Note that I<errno> is not set."
7755 msgstr ""
7756 "B<posix_memalign>()  は成功した場合は 0 を返し、 失敗した場合は次のセクション"
7757 "に記載されたエラー値のいずれかを返す。 I<errno> はセットされないことに注意す"
7758 "ること。"
7759
7760 #. type: Plain text
7761 #: build/C/man3/posix_memalign.3:162
7762 msgid ""
7763 "The I<alignment> argument was not a power of two, or was not a multiple of "
7764 "I<sizeof(void *)>."
7765 msgstr ""
7766 "I<alignment> 引き数が 2 のべき乗でなかったか、 I<sizeof(void *)> の倍数でな"
7767 "かった。"
7768
7769 #. type: Plain text
7770 #: build/C/man3/posix_memalign.3:165
7771 msgid "There was insufficient memory to fulfill the allocation request."
7772 msgstr "割り当て要求を満たすのに十分なメモリがなかった。"
7773
7774 #. type: Plain text
7775 #: build/C/man3/posix_memalign.3:172
7776 msgid ""
7777 "The functions B<memalign>(), B<valloc>(), and B<pvalloc>()  have been "
7778 "available in all Linux libc libraries."
7779 msgstr ""
7780 "関数 B<memalign>(), B<valloc>(), B<pvalloc>() は\n"
7781 "すべての Linux libc ライブラリで使用可能である。"
7782
7783 #. type: Plain text
7784 #: build/C/man3/posix_memalign.3:176
7785 msgid "The function B<aligned_alloc>()  was added to glibc in version 2.16."
7786 msgstr "関数 B<aligned_alloc>() は glibc バージョン 2.16 で追加された。"
7787
7788 #. type: Plain text
7789 #: build/C/man3/posix_memalign.3:180
7790 msgid "The function B<posix_memalign>()  is available since glibc 2.1.91."
7791 msgstr "関数 B<posix_fallocate>() は glibc 2.1.91 以降で利用可能である。"
7792
7793 #. type: Plain text
7794 #: build/C/man3/posix_memalign.3:187
7795 msgid ""
7796 "The function B<valloc>()  appeared in 3.0BSD.  It is documented as being "
7797 "obsolete in 4.3BSD, and as legacy in SUSv2.  It does not appear in "
7798 "POSIX.1-2001."
7799 msgstr ""
7800 "関数 B<valloc>() は 3.0BSD で登場した。4.3BSD では廃止されたと記載されてお"
7801 "り、\n"
7802 "SUSv2 では過去の名残だと記載されている。 POSIX.1-2001 には存在しない。"
7803
7804 #. type: Plain text
7805 #: build/C/man3/posix_memalign.3:191
7806 msgid "The function B<pvalloc>()  is a GNU extension."
7807 msgstr "関数 B<pvalloc>() は GNU による拡張である。"
7808
7809 #. type: Plain text
7810 #: build/C/man3/posix_memalign.3:195
7811 msgid "The function B<memalign>()  appears in SunOS 4.1.3 but not in 4.4BSD."
7812 msgstr "関数 B<memalign>() は SunOS 4.1.3 で登場したが、4.4BSD にはない。"
7813
7814 #. type: Plain text
7815 #: build/C/man3/posix_memalign.3:199
7816 msgid "The function B<posix_memalign>()  comes from POSIX.1d."
7817 msgstr "関数 B<posix_memalign>() は POSIX.1d に由来する。"
7818
7819 #. type: Plain text
7820 #: build/C/man3/posix_memalign.3:204
7821 msgid "The function B<aligned_alloc>()  is specified in the C11 standard."
7822 msgstr "関数 I<aligned_alloc>() は C11 標準で規定されている。"
7823
7824 #. type: SS
7825 #: build/C/man3/posix_memalign.3:204
7826 #, no-wrap
7827 msgid "Headers"
7828 msgstr "ヘッダ"
7829
7830 #. type: Plain text
7831 #: build/C/man3/posix_memalign.3:208
7832 msgid ""
7833 "Everybody agrees that B<posix_memalign>()  is declared in I<E<lt>stdlib."
7834 "hE<gt>>."
7835 msgstr ""
7836 "B<posix_memalign>()  の宣言を I<E<lt>stdlib.hE<gt>> で行うことに関しては、 皆"
7837 "の意見が一致している。"
7838
7839 #. type: Plain text
7840 #: build/C/man3/posix_memalign.3:212
7841 msgid ""
7842 "On some systems B<memalign>()  is declared in I<E<lt>stdlib.hE<gt>> instead "
7843 "of I<E<lt>malloc.hE<gt>>."
7844 msgstr ""
7845 "いくつかのシステムでは、 B<memalign>()  は I<E<lt>malloc.hE<gt>> ではなく "
7846 "I<E<lt>stdlib.hE<gt>> で宣言されている。"
7847
7848 #. type: Plain text
7849 #: build/C/man3/posix_memalign.3:219
7850 msgid ""
7851 "According to SUSv2, B<valloc>()  is declared in I<E<lt>stdlib.hE<gt>>.  "
7852 "Libc4,5 and glibc declare it in I<E<lt>malloc.hE<gt>>, and also in "
7853 "I<E<lt>stdlib.hE<gt>> if suitable feature test macros are defined (see "
7854 "above)."
7855 msgstr ""
7856 "SUSv2 によると、 B<valloc>() は I<E<lt>stdlib.hE<gt>> で宣言される。 "
7857 "libc4,5\n"
7858 "や glibc では I<E<lt>malloc.hE<gt>> で宣言されており、 さらに適切な機能検査\n"
7859 "マクロが定義された場合には I<E<lt>stdlib.hE<gt>> でも宣言される(上記を参照)。"
7860
7861 #. type: Plain text
7862 #: build/C/man3/posix_memalign.3:228
7863 msgid ""
7864 "On many systems there are alignment restrictions, for example, on buffers "
7865 "used for direct block device I/O.  POSIX specifies the I<pathconf(path,"
7866 "_PC_REC_XFER_ALIGN)> call that tells what alignment is needed.  Now one can "
7867 "use B<posix_memalign>()  to satisfy this requirement."
7868 msgstr ""
7869 "多くのシステムでは、アラインメントに関して制限がある。例えば、 ブロックデバイ"
7870 "スに対するダイレクト I/O に使用するバッファには アラインメントに関する制限が"
7871 "ある。 POSIX では、どんなアラインメントが必要かを知るために I<pathconf(path,"
7872 "_PC_REC_XFER_ALIGN)> コールを規定している。ここで B<posix_memalign>()  を使う"
7873 "と、この必要条件を満たすことができる。"
7874
7875 #. type: Plain text
7876 #: build/C/man3/posix_memalign.3:237
7877 msgid ""
7878 "B<posix_memalign>()  verifies that I<alignment> matches the requirements "
7879 "detailed above.  B<memalign>()  may not check that the I<alignment> argument "
7880 "is correct."
7881 msgstr ""
7882 "B<posix_memalign>() は I<alignment> が上で詳細に述べた必要条件を満たすか\n"
7883 "どうかを確かめる。 B<memalign>() は I<alignment> 引き数が正しいかどうかの\n"
7884 "確認を行わないかもしれない。"
7885
7886 #.  Other systems allow passing the result of
7887 #.  .IR valloc ()
7888 #.  to
7889 #.  .IR free (3),
7890 #.  but not to
7891 #.  .IR realloc (3).
7892 #. type: Plain text
7893 #: build/C/man3/posix_memalign.3:265
7894 #, fuzzy
7895 #| msgid ""
7896 #| "POSIX requires that memory obtained from B<posix_memalign>()  can be "
7897 #| "freed using B<free>(3).  Some systems provide no way to reclaim memory "
7898 #| "allocated with B<memalign>()  or B<valloc>()  (because one can only pass "
7899 #| "to B<free>(3)  a pointer gotten from B<malloc>(3), while, for example, "
7900 #| "B<memalign>()  would call B<malloc>(3)  and then align the obtained "
7901 #| "value).  The glibc implementation allows memory obtained from any of "
7902 #| "these functions to be reclaimed with B<free>(3)."
7903 msgid ""
7904 "POSIX requires that memory obtained from B<posix_memalign>()  can be freed "
7905 "using B<free>(3).  Some systems provide no way to reclaim memory allocated "
7906 "with B<memalign>()  or B<valloc>()  (because one can pass to B<free>(3)  "
7907 "only a pointer obtained from B<malloc>(3), while, for example, B<memalign>"
7908 "()  would call B<malloc>(3)  and then align the obtained value).  The glibc "
7909 "implementation allows memory obtained from any of these functions to be "
7910 "reclaimed with B<free>(3)."
7911 msgstr ""
7912 "POSIX では B<posix_memalign>() によって獲得したメモリは B<free>(3) を\n"
7913 "使って解放することができる必要がある。 いくつかのシステムでは\n"
7914 "B<memalign>() やB<valloc>() で割り当てられたメモリを再利用する手段が\n"
7915 "提供されていない(なぜなら B<free>(3) に渡すことができるのは\n"
7916 "B<malloc>(3) から受け取ったポインタだけだが、例えば B<memalign>() は\n"
7917 "B<malloc>(3) を呼び出し、得た値をアラインメントしてしまうからである)。\n"
7918 "glibc の実装では、 ここに述べた関数のいずれで獲得したメモリも\n"
7919 "B<free>(3) で再利用することができる。"
7920
7921 #. type: Plain text
7922 #: build/C/man3/posix_memalign.3:270
7923 #, fuzzy
7924 #| msgid ""
7925 #| "The glibc B<malloc>(3)  always returns 8-byte aligned memory addresses, "
7926 #| "so these functions are only needed if you require larger alignment values."
7927 msgid ""
7928 "The glibc B<malloc>(3)  always returns 8-byte aligned memory addresses, so "
7929 "these functions are needed only if you require larger alignment values."
7930 msgstr ""
7931 "glibc の B<malloc>(3) は常に 8 バイトにアラインメントされたメモリアドレスを\n"
7932 "返すので、ここで述べた関数が必要になるのは 8 バイトよりも大きなアラインメン"
7933 "ト\n"
7934 "が必要な場合だけである。"
7935
7936 #. type: Plain text
7937 #: build/C/man3/posix_memalign.3:275
7938 msgid "B<brk>(2), B<getpagesize>(2), B<free>(3), B<malloc>(3)"
7939 msgstr "B<brk>(2), B<getpagesize>(2), B<free>(3), B<malloc>(3)"
7940
7941 #. type: TH
7942 #: build/C/man2/readahead.2:28
7943 #, no-wrap
7944 msgid "READAHEAD"
7945 msgstr "READAHEAD"
7946
7947 #. type: Plain text
7948 #: build/C/man2/readahead.2:31
7949 msgid "readahead - perform file readahead into page cache"
7950 msgstr "readahead - 前もってファイルをページ・キャッシュに読み込む"
7951
7952 #. type: Plain text
7953 #: build/C/man2/readahead.2:37
7954 #, no-wrap
7955 msgid "B<ssize_t readahead(int >I<fd>B<, off64_t >I<offset>B<, size_t >I<count>B<);>\n"
7956 msgstr "B<ssize_t readahead(int >I<fd>B<, off64_t >I<offset>B<, size_t >I<count>B<);>\n"
7957
7958 #. type: Plain text
7959 #: build/C/man2/readahead.2:65
7960 msgid ""
7961 "B<readahead>()  populates the page cache with data from a file so that "
7962 "subsequent reads from that file will not block on disk I/O.  The I<fd> "
7963 "argument is a file descriptor identifying the file which is to be read.  The "
7964 "I<offset> argument specifies the starting point from which data is to be "
7965 "read and I<count> specifies the number of bytes to be read.  I/O is "
7966 "performed in whole pages, so that I<offset> is effectively rounded down to a "
7967 "page boundary and bytes are read up to the next page boundary greater than "
7968 "or equal to I<(offset+count)>.  B<readahead>()  does not read beyond the end "
7969 "of the file.  B<readahead>()  blocks until the specified data has been "
7970 "read.  The current file offset of the open file referred to by I<fd> is left "
7971 "unchanged."
7972 msgstr ""
7973 "B<readahead>()  は、この後の同じファイルからのデータ読み込み時にディスク I/O "
7974 "で 動作が停止 (block) しないように、前もってファイルの内容を ページ・キャッ"
7975 "シュに読み込む。 I<fd> 引き数は読み込みを行うファイルを識別するファイル・ディ"
7976 "スクリプタである。 I<offset> 引き数はデータの読み込み開始位置を指定し、 "
7977 "I<count> は読み込むデータのバイト数を指定する。 ディスク I/O はページ単位で実"
7978 "行されるので、 実際には I<offset> はページ境界に切り下げられ、読み込みバイト"
7979 "数は I<(offset+count)> より小さくない次のページ境界まで切り上げられる。 "
7980 "B<readahead>()  はファイルの末尾を越えた範囲まで読み出しを行うことはない。ま"
7981 "た、 B<readahead>()  は指定したデータの読み込みが終わるまで停止 (block) す"
7982 "る。 I<fd> で参照されたオープン済のファイルのファイルオフセットの現在値は 変"
7983 "更されない。"
7984
7985 #. type: Plain text
7986 #: build/C/man2/readahead.2:71
7987 msgid ""
7988 "On success, B<readahead>()  returns 0; on failure, -1 is returned, with "
7989 "I<errno> set to indicate the cause of the error."
7990 msgstr ""
7991 "B<readahead>()  は成功すると 0 を返す。失敗した場合 -1 を返し、 I<errno> にエ"
7992 "ラーの原因を示す値を設定する。"
7993
7994 #. type: Plain text
7995 #: build/C/man2/readahead.2:76
7996 msgid "I<fd> is not a valid file descriptor or is not open for reading."
7997 msgstr ""
7998 "I<fd> が有効なファイル・ディスクリプタでない、または 読み込み用にオープンされ"
7999 "ていない。"
8000
8001 #. type: Plain text
8002 #: build/C/man2/readahead.2:82
8003 msgid ""
8004 "I<fd> does not refer to a file type to which B<readahead>()  can be applied."
8005 msgstr ""
8006 "I<fd> が参照しているファイルが、 B<readahead>()  を行うことができないタイプの"
8007 "ファイルであった。"
8008
8009 #. type: Plain text
8010 #: build/C/man2/readahead.2:87
8011 msgid ""
8012 "The B<readahead>()  system call appeared in Linux 2.4.13; glibc support has "
8013 "been provided since version 2.3."
8014 msgstr ""
8015 "B<readahead>()  システムコールは Linux 2.4.13 で登場した。 glibc でのサポート"
8016 "は glibc バージョン 2.3 以降で行われている。"
8017
8018 #. type: Plain text
8019 #: build/C/man2/readahead.2:92
8020 msgid ""
8021 "The B<readahead>()  system call is Linux-specific, and its use should be "
8022 "avoided in portable applications."
8023 msgstr ""
8024 "B<readahead>()  システムコールは Linux 固有であり、移植を考慮したプログラムで"
8025 "は 使用を避けるべきである。"
8026
8027 #. type: Plain text
8028 #: build/C/man2/readahead.2:97
8029 msgid ""
8030 "On some 32-bit architectures, the calling signature for this system call "
8031 "differs, for the reasons described in B<syscall>(2)."
8032 msgstr ""
8033
8034 #. type: Plain text
8035 #: build/C/man2/readahead.2:103
8036 msgid "B<lseek>(2), B<madvise>(2), B<mmap>(2), B<posix_fadvise>(2), B<read>(2)"
8037 msgstr ""
8038 "B<lseek>(2), B<madvise>(2), B<mmap>(2), B<posix_fadvise>(2), B<read>(2)"
8039
8040 #. type: TH
8041 #: build/C/man2/remap_file_pages.2:28
8042 #, no-wrap
8043 msgid "REMAP_FILE_PAGES"
8044 msgstr "REMAP_FILE_PAGES"
8045
8046 #. type: Plain text
8047 #: build/C/man2/remap_file_pages.2:31
8048 msgid "remap_file_pages - create a nonlinear file mapping"
8049 msgstr "remap_file_pages - 非線形ファイルマッピングを作成する。"
8050
8051 #. type: Plain text
8052 #: build/C/man2/remap_file_pages.2:35
8053 #, no-wrap
8054 msgid ""
8055 "B<#define _GNU_SOURCE>         /* See feature_test_macros(7) */\n"
8056 "B<#include E<lt>sys/mman.hE<gt>>\n"
8057 msgstr ""
8058 "B<#define _GNU_SOURCE>         /* feature_test_macros(7) 参照 */\n"
8059 "B<#include E<lt>sys/mman.hE<gt>>\n"
8060
8061 #. type: Plain text
8062 #: build/C/man2/remap_file_pages.2:38
8063 #, no-wrap
8064 msgid ""
8065 "B<int remap_file_pages(void *>I<addr>B<, size_t >I<size>B<, int >I<prot>B<,>\n"
8066 "B<                     ssize_t >I<pgoff>B<, int >I<flags>B<);>\n"
8067 msgstr ""
8068 "B<int remap_file_pages(void *>I<addr>B<, size_t >I<size>B<, int >I<prot>B<,>\n"
8069 "B<                     ssize_t >I<pgoff>B<, int >I<flags>B<);>\n"
8070
8071 #. type: Plain text
8072 #: build/C/man2/remap_file_pages.2:51
8073 msgid ""
8074 "The B<remap_file_pages>()  system call is used to create a nonlinear "
8075 "mapping, that is, a mapping in which the pages of the file are mapped into a "
8076 "nonsequential order in memory.  The advantage of using B<remap_file_pages>"
8077 "()  over using repeated calls to B<mmap>(2)  is that the former approach "
8078 "does not require the kernel to create additional VMA (Virtual Memory Area) "
8079 "data structures."
8080 msgstr ""
8081 "B<remap_file_pages>()  システムコールは非線形なマッピング、 つまりファイルの"
8082 "ページがメモリ上で連続しない順番でマップされる マッピングを作成するために使わ"
8083 "れる。 B<remap_file_pages>()  を使う方が B<mmap>(2)  を繰り返して使うより優れ"
8084 "ている点は、 前者の方法ではカーネルが VMA (Virtual Memory Area, 仮想メモリ領"
8085 "域)  データ構造体を追加で作成する必要がないことである。"
8086
8087 #. type: Plain text
8088 #: build/C/man2/remap_file_pages.2:53
8089 msgid "To create a nonlinear mapping we perform the following steps:"
8090 msgstr "非線形マッピングを作成するためには、 以下のようなステップを実行する:"
8091
8092 #. type: TP
8093 #: build/C/man2/remap_file_pages.2:53
8094 #, no-wrap
8095 msgid "1."
8096 msgstr "1."
8097
8098 #. type: Plain text
8099 #: build/C/man2/remap_file_pages.2:61
8100 msgid ""
8101 "Use B<mmap>(2)  to create a mapping (which is initially linear).  This "
8102 "mapping must be created with the B<MAP_SHARED> flag."
8103 msgstr ""
8104 "B<mmap>(2)  を使い、マッピングを作成する (このマッピングは最初は線形であ"
8105 "る)。 このマッピングは B<MAP_SHARED> フラグを指定して作成されなければならな"
8106 "い。"
8107
8108 #. type: TP
8109 #: build/C/man2/remap_file_pages.2:61
8110 #, no-wrap
8111 msgid "2."
8112 msgstr "2."
8113
8114 #. type: Plain text
8115 #: build/C/man2/remap_file_pages.2:69
8116 msgid ""
8117 "Use one or more calls to B<remap_file_pages>()  to rearrange the "
8118 "correspondence between the pages of the mapping and the pages of the file.  "
8119 "It is possible to map the same page of a file into multiple locations within "
8120 "the mapped region."
8121 msgstr ""
8122 "B<remap_file_pages>()  を 1 回以上呼び出して、 マッピングのページとファイルの"
8123 "ページの対応関係を再構成する。 ファイルの同じページをマッピング領域の複数の場"
8124 "所に マップすることが可能である。"
8125
8126 #. type: Plain text
8127 #: build/C/man2/remap_file_pages.2:80
8128 msgid ""
8129 "The I<pgoff> and I<size> arguments specify the region of the file that is to "
8130 "be relocated within the mapping: I<pgoff> is a file offset in units of the "
8131 "system page size; I<size> is the length of the region in bytes."
8132 msgstr ""
8133 "I<pgoff> と I<size> 引き数は、マッピング内で再配置されるファイルの領域を指定"
8134 "する。 I<pgoff> はファイルオフセットであり、単位はシステムのページサイズであ"
8135 "る。 I<size> は領域の長さであり、単位はバイトである。"
8136
8137 #. type: Plain text
8138 #: build/C/man2/remap_file_pages.2:98
8139 msgid ""
8140 "The I<addr> argument serves two purposes.  First, it identifies the mapping "
8141 "whose pages we want to rearrange.  Thus, I<addr> must be an address that "
8142 "falls within a region previously mapped by a call to B<mmap>(2).  Second, "
8143 "I<addr> specifies the address at which the file pages identified by I<pgoff> "
8144 "and I<size> will be placed."
8145 msgstr ""
8146 "I<addr> 引き数は 2 つの目的で使われる。 第 1 の目的は、この引き数によって再編"
8147 "成したいページの マッピングを識別することである。 よって I<addr> は B<mmap>"
8148 "(2)  の呼び出しで過去にマップされた領域内のアドレスでなければならない。 第 2 "
8149 "の目的は、 I<pgoff> と I<size> で識別されるファイルページが置かれる予定のアド"
8150 "レスを、 I<addr> によって指定することである。"
8151
8152 #.  This rounding is weird, and not consistent with the treatment of
8153 #.  the analogous arguments for munmap()/mprotect() and for mlock().
8154 #.  MTK, 14 Sep 2005
8155 #. type: Plain text
8156 #: build/C/man2/remap_file_pages.2:112
8157 msgid ""
8158 "The values specified in I<addr> and I<size> should be multiples of the "
8159 "system page size.  If they are not, then the kernel rounds I<both> values "
8160 "I<down> to the nearest multiple of the page size."
8161 msgstr ""
8162 "I<addr> と I<size> に指定する値は、システムのページサイズの倍数とすべきであ"
8163 "る。 それ以外の場合、カーネルは「両方」の値を 最も近いページサイズの倍数へ"
8164 "「切り下げる」。"
8165
8166 #. type: Plain text
8167 #: build/C/man2/remap_file_pages.2:116
8168 msgid "The I<prot> argument must be specified as 0."
8169 msgstr "I<prot> 引き数は 0 に指定されなければならない。"
8170
8171 #. type: Plain text
8172 #: build/C/man2/remap_file_pages.2:124
8173 msgid ""
8174 "The I<flags> argument has the same meaning as for B<mmap>(2), but all flags "
8175 "other than B<MAP_NONBLOCK> are ignored."
8176 msgstr ""
8177 "I<flags> 引き数は B<mmap>(2)  のものと同じ意味であるが、 B<MAP_NONBLOCK> 以外"
8178 "の全てのフラグは無視される。"
8179
8180 #. type: Plain text
8181 #: build/C/man2/remap_file_pages.2:131
8182 msgid ""
8183 "On success, B<remap_file_pages>()  returns 0.  On error, -1 is returned, and "
8184 "I<errno> is set appropriately."
8185 msgstr ""
8186 "成功した場合、 B<remap_file_pages>()  は 0 を返す。 エラーの場合、-1 が返さ"
8187 "れ、 I<errno> が適切に設定される。"
8188
8189 #. type: Plain text
8190 #: build/C/man2/remap_file_pages.2:139
8191 msgid ""
8192 "I<addr> does not refer to a valid mapping created with the B<MAP_SHARED> "
8193 "flag."
8194 msgstr ""
8195 "I<addr> が B<MAP_SHARED> フラグを指定して作成された有効なマッピングを参照して"
8196 "いない。"
8197
8198 #.  And possibly others from vma->vm_ops->populate()
8199 #. type: Plain text
8200 #: build/C/man2/remap_file_pages.2:148
8201 msgid "I<addr>, I<size>, I<prot>, or I<pgoff> is invalid."
8202 msgstr "I<addr>, I<size>, I<prot>, I<pgoff> のいずれかが不正である。"
8203
8204 #. type: Plain text
8205 #: build/C/man2/remap_file_pages.2:153
8206 msgid ""
8207 "The B<remap_file_pages>()  system call appeared in Linux 2.5.46; glibc "
8208 "support was added in version 2.3.3."
8209 msgstr ""
8210 "B<remap_file_pages>()  システムコールは Linux 2.5.46 で登場した。 glibc での"
8211 "サポートは glibc バージョン 2.3.3 で追加された。"
8212
8213 #. type: Plain text
8214 #: build/C/man2/remap_file_pages.2:157
8215 msgid "The B<remap_file_pages>()  system call is Linux-specific."
8216 msgstr "B<remap_file_pages>()  システムコールは Linux 固有のものである。"
8217
8218 #. type: Plain text
8219 #: build/C/man2/remap_file_pages.2:164
8220 msgid ""
8221 "B<getpagesize>(2), B<mmap>(2), B<mmap2>(2), B<mprotect>(2), B<mremap>(2), "
8222 "B<msync>(2)"
8223 msgstr ""
8224 "B<getpagesize>(2), B<mmap>(2), B<mmap2>(2), B<mprotect>(2), B<mremap>(2), "
8225 "B<msync>(2)"
8226
8227 #. type: TH
8228 #: build/C/man3/shm_open.3:26
8229 #, no-wrap
8230 msgid "SHM_OPEN"
8231 msgstr "SHM_OPEN"
8232
8233 #. type: TH
8234 #: build/C/man3/shm_open.3:26
8235 #, no-wrap
8236 msgid "2009-02-25"
8237 msgstr "2009-02-25"
8238
8239 #. type: Plain text
8240 #: build/C/man3/shm_open.3:29
8241 msgid ""
8242 "shm_open, shm_unlink - create/open or unlink POSIX shared memory objects"
8243 msgstr ""
8244 "shm_open, shm_unlink - POSIX 共有メモリ・オブジェクトの作成/オープン/削除を行"
8245 "う"
8246
8247 #. type: Plain text
8248 #: build/C/man3/shm_open.3:33
8249 msgid "B<#include E<lt>sys/stat.hE<gt>> /* For mode constants */"
8250 msgstr "B<#include E<lt>sys/stat.hE<gt>> /* mode 定数用 */"
8251
8252 #. type: Plain text
8253 #: build/C/man3/shm_open.3:35
8254 msgid "B<#include E<lt>fcntl.hE<gt>> /* For O_* constants */"
8255 msgstr "B<#include E<lt>fcntl.hE<gt>> /* O_* 定数の定義用 */"
8256
8257 #. type: Plain text
8258 #: build/C/man3/shm_open.3:37
8259 msgid ""
8260 "B<int shm_open(const char *>I<name>B<, int >I<oflag>B<, mode_t >I<mode>B<);>"
8261 msgstr ""
8262 "B<int shm_open(const char *>I<name>B<, int >I<oflag>B<, mode_t >I<mode>B<);>"
8263
8264 #. type: Plain text
8265 #: build/C/man3/shm_open.3:39
8266 msgid "B<int shm_unlink(const char *>I<name>B<);>"
8267 msgstr "B<int shm_unlink(const char *>I<name>B<);>"
8268
8269 #. type: Plain text
8270 #: build/C/man3/shm_open.3:41
8271 msgid "Link with I<-lrt>."
8272 msgstr "I<-lrt> でリンクする。"
8273
8274 #. type: Plain text
8275 #: build/C/man3/shm_open.3:53
8276 msgid ""
8277 "B<shm_open>()  creates and opens a new, or opens an existing, POSIX shared "
8278 "memory object.  A POSIX shared memory object is in effect a handle which can "
8279 "be used by unrelated processes to B<mmap>(2)  the same region of shared "
8280 "memory.  The B<shm_unlink>()  function performs the converse operation, "
8281 "removing an object previously created by B<shm_open>()."
8282 msgstr ""
8283 "B<shm_open>()  は、POSIX 共有メモリ・オブジェクトを新規に作成/オープンした"
8284 "り、 すでに存在するオブジェクトをオープンしたりする。 POSIX 共有メモリ・オブ"
8285 "ジェクトは、実際には、関係のないプロセスが 共有メモリの同じ領域を B<mmap>"
8286 "(2)  するために使用することができる手段である。 B<shm_unlink>()  は、逆の操"
8287 "作、つまり以前に B<shm_open>()  で作成されたオブジェクトの削除を行う。"
8288
8289 #.  glibc allows the initial slash to be omitted, and makes
8290 #.  multiple initial slashes equivalent to a single slash.
8291 #.  This differs from the implementation of POSIX message queues.
8292 #.  glibc allows subdirectory components in the name, in which
8293 #.  case the subdirectory must exist under /dev/shm, and allow the
8294 #.  required permissions if a user wants to create a shared memory
8295 #.  object in that subdirectory.
8296 #. type: Plain text
8297 #: build/C/man3/shm_open.3:74
8298 msgid ""
8299 "The operation of B<shm_open>()  is analogous to that of B<open>(2).  I<name> "
8300 "specifies the shared memory object to be created or opened.  For portable "
8301 "use, a shared memory object should be identified by a name of the form I</"
8302 "somename>; that is, a null-terminated string of up to B<NAME_MAX> (i.e., "
8303 "255) characters consisting of an initial slash, followed by one or more "
8304 "characters, none of which are slashes."
8305 msgstr ""
8306 "B<shm_open>()  の動作は B<open>(2)  とよく似ている。 I<name> で作成したりオー"
8307 "プンしたりする共有メモリ・オブジェクトを指定する。 移植性を持たせるためには、"
8308 "共有メモリ・オブジェクトは I</somename> という形式の名前で識別し、 その名前"
8309 "は、最大で B<NAME_MAX> (すなわち 255) 文字の NULL 終端された文字列で、 スラッ"
8310 "シュで始まり、スラッシュ以外の文字が 1 文字以上続く形式 にすべきである。"
8311
8312 #. type: Plain text
8313 #: build/C/man3/shm_open.3:81
8314 msgid ""
8315 "I<oflag> is a bit mask created by ORing together exactly one of B<O_RDONLY> "
8316 "or B<O_RDWR> and any of the other flags listed here:"
8317 msgstr ""
8318 "I<oflag> はビットマスクで、 B<O_RDONLY> と B<O_RDWR> のいずれか一方と、以下に"
8319 "述べる他のフラグの論理和をとったもの を指定する。"
8320
8321 #. type: TP
8322 #: build/C/man3/shm_open.3:81
8323 #, no-wrap
8324 msgid "B<O_RDONLY>"
8325 msgstr "B<O_RDONLY>"
8326
8327 #. type: Plain text
8328 #: build/C/man3/shm_open.3:87
8329 #, fuzzy
8330 #| msgid ""
8331 #| "Open the object for read access.  A shared memory object opened in this "
8332 #| "way can only be B<mmap>(2)ed for read (B<PROT_READ>) access."
8333 msgid ""
8334 "Open the object for read access.  A shared memory object opened in this way "
8335 "can be B<mmap>(2)ed only for read (B<PROT_READ>) access."
8336 msgstr ""
8337 "読み出しアクセス用にオブジェクトをオープンする。 このフラグを指定してオープン"
8338 "された共有メモリ・オブジェクトは、 読み出し (B<PROT_READ>) アクセスでのみ "
8339 "B<mmap>(2)  することができる。"
8340
8341 #. type: TP
8342 #: build/C/man3/shm_open.3:87
8343 #, no-wrap
8344 msgid "B<O_RDWR>"
8345 msgstr "B<O_RDWR>"
8346
8347 #. type: Plain text
8348 #: build/C/man3/shm_open.3:90
8349 msgid "Open the object for read-write access."
8350 msgstr "読み書きアクセス用にオブジェクトをオープンする。"
8351
8352 #. type: TP
8353 #: build/C/man3/shm_open.3:90
8354 #, no-wrap
8355 msgid "B<O_CREAT>"
8356 msgstr "B<O_CREAT>"
8357
8358 #.  In truth it is actually the file system IDs on Linux, but these
8359 #.  are nearly always the same as the effective IDs.  (MTK, Jul 05)
8360 #. type: Plain text
8361 #: build/C/man3/shm_open.3:110
8362 msgid ""
8363 "Create the shared memory object if it does not exist.  The user and group "
8364 "ownership of the object are taken from the corresponding effective IDs of "
8365 "the calling process, and the object's permission bits are set according to "
8366 "the low-order 9 bits of I<mode>, except that those bits set in the process "
8367 "file mode creation mask (see B<umask>(2))  are cleared for the new object.  "
8368 "A set of macro constants which can be used to define I<mode> is listed in "
8369 "B<open>(2).  (Symbolic definitions of these constants can be obtained by "
8370 "including I<E<lt>sys/stat.hE<gt>>.)"
8371 msgstr ""
8372 "存在しない場合、共有メモリ・オブジェクトを作成する。 オブジェクトのユーザとグ"
8373 "ループの所有権は、 呼び出し元プロセスの対応する実効 ID が使われ、 オブジェク"
8374 "トの許可ビットは I<mode> の下位 9 ビットに基づいて設定される。ただし、 ファイ"
8375 "ルモード作成マスク (B<umask>(2)  参照) に設定されている値は、新規オブジェクト"
8376 "に関してはクリアされる。 I<mode> を定義するために使用できるマクロ定数(群)は "
8377 "B<open>(2)  に記載されている (これらの定数のシンボル定義は I<E<lt>sys/stat."
8378 "hE<gt>> のインクルードにより得られる)。"
8379
8380 #. type: Plain text
8381 #: build/C/man3/shm_open.3:116
8382 msgid ""
8383 "A new shared memory object initially has zero length\\(emthe size of the "
8384 "object can be set using B<ftruncate>(2).  The newly allocated bytes of a "
8385 "shared memory object are automatically initialized to 0."
8386 msgstr ""
8387 "新規に作成された共有メモリ・オブジェクトは長さ 0 で初期化される。 オブジェク"
8388 "トの大きさは B<ftruncate>(2)  を使って設定できる。 共有メモリ・オブジェクトと"
8389 "して新規に確保されたバイトは自動的に 0 に初期化される。"
8390
8391 #. type: TP
8392 #: build/C/man3/shm_open.3:116
8393 #, no-wrap
8394 msgid "B<O_EXCL>"
8395 msgstr "B<O_EXCL>"
8396
8397 #. type: Plain text
8398 #: build/C/man3/shm_open.3:125
8399 msgid ""
8400 "If B<O_CREAT> was also specified, and a shared memory object with the given "
8401 "I<name> already exists, return an error.  The check for the existence of the "
8402 "object, and its creation if it does not exist, are performed atomically."
8403 msgstr ""
8404 "B<O_CREAT> が一緒に指定されており、 I<name> で指定された共有メモリ・オブジェ"
8405 "クトが既に存在した場合、 エラーを返す。 オブジェクトの存在確認と、存在しな"
8406 "かった場合のオブジェクト作成は、 必ず一連の操作として実行される (performed "
8407 "atomically)。"
8408
8409 #. type: TP
8410 #: build/C/man3/shm_open.3:125
8411 #, no-wrap
8412 msgid "B<O_TRUNC>"
8413 msgstr "B<O_TRUNC>"
8414
8415 #. type: Plain text
8416 #: build/C/man3/shm_open.3:128
8417 msgid "If the shared memory object already exists, truncate it to zero bytes."
8418 msgstr ""
8419 "共有メモリ・オブジェクトがすでに存在した場合、 そのオブジェクトを 0 バイトに"
8420 "切り詰める。"
8421
8422 #. type: Plain text
8423 #: build/C/man3/shm_open.3:131
8424 msgid ""
8425 "Definitions of these flag values can be obtained by including I<E<lt>fcntl."
8426 "hE<gt>>."
8427 msgstr ""
8428 "これらのフラグ値の定義は I<E<lt>fcntl.hE<gt>> のインクルードにより得られる。"
8429
8430 #. type: Plain text
8431 #: build/C/man3/shm_open.3:142
8432 msgid ""
8433 "On successful completion B<shm_open>()  returns a new file descriptor "
8434 "referring to the shared memory object.  This file descriptor is guaranteed "
8435 "to be the lowest-numbered file descriptor not previously opened within the "
8436 "process.  The B<FD_CLOEXEC> flag (see B<fcntl>(2))  is set for the file "
8437 "descriptor."
8438 msgstr ""
8439 "成功して完了した場合、 B<shm_open>()  は共有メモリ・オブジェクトを参照する新"
8440 "しいファイル・ディスクリプタを返す。 このファイル・ディスクリプタは、そのプロ"
8441 "セス内で過去にオープンされていない ファイル・ディスクリプタの中で最も小さな数"
8442 "になることが保証される。 B<FD_CLOEXEC> フラグ (B<fcntl>(2)  を参照) が、この"
8443 "ファイル・ディスクリプタに設定される。"
8444
8445 #. type: Plain text
8446 #: build/C/man3/shm_open.3:151
8447 msgid ""
8448 "The file descriptor is normally used in subsequent calls to B<ftruncate>(2)  "
8449 "(for a newly created object) and B<mmap>(2).  After a call to B<mmap>(2)  "
8450 "the file descriptor may be closed without affecting the memory mapping."
8451 msgstr ""
8452 "通常、これらのファイル・ディスクリプタは、この後続けて実行される B<ftruncate>"
8453 "(2)  (新規に作成されたオブジェクトの場合のみ) と B<mmap>(2)  の呼び出しに使用"
8454 "される。 B<mmap>(2)  を呼び出した後は、ファイル・ディスクリプタをクローズして"
8455 "もよく、 クローズしてもメモリ・マッピングに影響を与えることはない。"
8456
8457 #. type: Plain text
8458 #: build/C/man3/shm_open.3:169
8459 msgid ""
8460 "The operation of B<shm_unlink>()  is analogous to B<unlink>(2): it removes a "
8461 "shared memory object name, and, once all processes have unmapped the object, "
8462 "de-allocates and destroys the contents of the associated memory region.  "
8463 "After a successful B<shm_unlink>(), attempts to B<shm_open>()  an object "
8464 "with the same I<name> will fail (unless B<O_CREAT> was specified, in which "
8465 "case a new, distinct object is created)."
8466 msgstr ""
8467 "B<shm_unlink>()  の動作は B<unlink>(2)  とよく似ている: 共有メモリ・オブジェ"
8468 "クト名を削除し、すべてのプロセスが処理対象の オブジェクトをアンマップした時点"
8469 "でオブジェクトの割り当てを解除し、 対応するメモリ領域の内容を破棄する。 "
8470 "B<shm_unlink>()  が成功した後で、同じ I<name> を持つオブジェクトに対して "
8471 "B<shm_open>()  を行うと、 (B<O_CREAT> が指定されていない場合) 失敗する。 "
8472 "(B<O_CREAT> が指定されている場合、新しく別のオブジェクトが作成される)。"
8473
8474 #. type: Plain text
8475 #: build/C/man3/shm_open.3:178
8476 msgid ""
8477 "On success, B<shm_open>()  returns a nonnegative file descriptor.  On "
8478 "failure, B<shm_open>()  returns -1.  B<shm_unlink>()  returns 0 on success, "
8479 "or -1 on error."
8480 msgstr ""
8481 "成功した場合、 B<shm_open>()  は非負のファイル・ディスクリプタを返す。 失敗し"
8482 "た場合、 B<shm_open>()  は -1 を返す。 B<shm_unlink>()  は、成功した場合 0 "
8483 "を、エラーが起こった場合 -1 を返す。"
8484
8485 #. type: Plain text
8486 #: build/C/man3/shm_open.3:185
8487 msgid ""
8488 "On failure, I<errno> is set to indicate the cause of the error.  Values "
8489 "which may appear in I<errno> include the following:"
8490 msgstr ""
8491 "失敗した場合、エラーの原因を示すため I<errno> が設定される。 I<errno> に設定"
8492 "される値は以下の通りである:"
8493
8494 #. type: Plain text
8495 #: build/C/man3/shm_open.3:190
8496 msgid "Permission to B<shm_unlink>()  the shared memory object was denied."
8497 msgstr "共有メモリオブジェクトを B<shm_unlink>()  する権限がなかった。"
8498
8499 #. type: Plain text
8500 #: build/C/man3/shm_open.3:200
8501 msgid ""
8502 "Permission was denied to B<shm_open>()  I<name> in the specified I<mode>, or "
8503 "B<O_TRUNC> was specified and the caller does not have write permission on "
8504 "the object."
8505 msgstr ""
8506 "指定された I<mode> で I<name> を B<shm_open>()  する権限がなかった。もしく"
8507 "は、 B<O_TRUNC> が指定されたが、呼び出し元にはそのオブジェクトに対する書き込"
8508 "み権限が なかった。"
8509
8510 #. type: TP
8511 #: build/C/man3/shm_open.3:200 build/C/man2/shmget.2:194
8512 #, no-wrap
8513 msgid "B<EEXIST>"
8514 msgstr "B<EEXIST>"
8515
8516 #. type: Plain text
8517 #: build/C/man3/shm_open.3:211
8518 msgid ""
8519 "Both B<O_CREAT> and B<O_EXCL> were specified to B<shm_open>()  and the "
8520 "shared memory object specified by I<name> already exists."
8521 msgstr ""
8522 "B<O_CREAT> と B<O_EXCL> の両方が B<shm_open>()  に指定されたが、 I<name> で指"
8523 "定された共有メモリ・オブジェクトが既に存在した。"
8524
8525 #. type: Plain text
8526 #: build/C/man3/shm_open.3:218
8527 msgid "The I<name> argument to B<shm_open>()  was invalid."
8528 msgstr "B<shm_open>()  に与えられた I<name> 引き数が不正であった。"
8529
8530 #. type: TP
8531 #: build/C/man3/shm_open.3:218
8532 #, no-wrap
8533 msgid "B<EMFILE>"
8534 msgstr "B<EMFILE>"
8535
8536 #. type: Plain text
8537 #: build/C/man3/shm_open.3:221
8538 msgid "The process already has the maximum number of files open."
8539 msgstr "プロセスがオープン可能なファイル数の上限にすでに達していた。"
8540
8541 #. type: TP
8542 #: build/C/man3/shm_open.3:221
8543 #, no-wrap
8544 msgid "B<ENAMETOOLONG>"
8545 msgstr "B<ENAMETOOLONG>"
8546
8547 #. type: Plain text
8548 #: build/C/man3/shm_open.3:227
8549 msgid "The length of I<name> exceeds B<PATH_MAX>."
8550 msgstr "I<name> の長さが B<PATH_MAX> を越えている。"
8551
8552 #. type: Plain text
8553 #: build/C/man3/shm_open.3:231
8554 msgid ""
8555 "The limit on the total number of files open on the system has been reached."
8556 msgstr "ファイルシステムでオープンできるファイル数の上限に達した。"
8557
8558 #. type: TP
8559 #: build/C/man3/shm_open.3:231 build/C/man3/shm_open.3:240
8560 #: build/C/man2/shmget.2:208
8561 #, no-wrap
8562 msgid "B<ENOENT>"
8563 msgstr "B<ENOENT>"
8564
8565 #. type: Plain text
8566 #: build/C/man3/shm_open.3:240
8567 msgid ""
8568 "An attempt was made to B<shm_open>()  a I<name> that did not exist, and "
8569 "B<O_CREAT> was not specified."
8570 msgstr ""
8571 "存在していない I<name> のオブジェクトを B<shm_open>()  しようとしたが、 "
8572 "B<O_CREAT> が指定されていなかった。"
8573
8574 #. type: Plain text
8575 #: build/C/man3/shm_open.3:247
8576 msgid ""
8577 "An attempt was to made to B<shm_unlink>()  a I<name> that does not exist."
8578 msgstr "存在しない I<name> のオブジェクトを B<shm_unlink>()  しようとした。"
8579
8580 #. type: Plain text
8581 #: build/C/man3/shm_open.3:249
8582 msgid "These functions are provided in glibc 2.2 and later."
8583 msgstr "これらの関数は glibc 2.2 以降で提供されている。"
8584
8585 #. type: Plain text
8586 #: build/C/man3/shm_open.3:255
8587 msgid ""
8588 "POSIX.1-2001 says that the group ownership of a newly created shared memory "
8589 "object is set to either the calling process's effective group ID or \"a "
8590 "system default group ID\"."
8591 msgstr ""
8592 "POSIX.1-2001 には、新規に作成される共有メモリオブジェクトのグループ所有権"
8593 "は、 呼び出し元プロセスの実効グループ ID か 「システムのデフォルトのグループ "
8594 "ID」 のどちらかに設定される、と書かれている。"
8595
8596 #. type: Plain text
8597 #: build/C/man3/shm_open.3:264
8598 msgid ""
8599 "POSIX leaves the behavior of the combination of B<O_RDONLY> and B<O_TRUNC> "
8600 "unspecified.  On Linux, this will successfully truncate an existing shared "
8601 "memory object\\(emthis may not be so on other UNIX systems."
8602 msgstr ""
8603 "POSIX は B<O_RDONLY> と B<O_TRUNC> が一緒に指定された場合の動作を未定義にして"
8604 "いる。Linux では、 既存の共有メモリ・オブジェクトに対する切り詰め (truncate) "
8605 "は成功する。 しかし、他の UNIX システムでも同じであるとは限らない。"
8606
8607 #. type: Plain text
8608 #: build/C/man3/shm_open.3:269
8609 msgid ""
8610 "The POSIX shared memory object implementation on Linux 2.4 makes use of a "
8611 "dedicated file system, which is normally mounted under I</dev/shm>."
8612 msgstr ""
8613 "Linux 2.4 における POSIX 共有メモリ・オブジェクトの実装は 専用のファイルシス"
8614 "テムを使用する。そのファイルシステムは通常 I</dev/shm> にマウントされる。"
8615
8616 #. type: Plain text
8617 #: build/C/man3/shm_open.3:280
8618 msgid ""
8619 "B<close>(2), B<fchmod>(2), B<fchown>(2), B<fcntl>(2), B<fstat>(2), "
8620 "B<ftruncate>(2), B<mmap>(2), B<open>(2), B<umask>(2), B<shm_overview>(7)"
8621 msgstr ""
8622 "B<close>(2), B<fchmod>(2), B<fchown>(2), B<fcntl>(2), B<fstat>(2), "
8623 "B<ftruncate>(2), B<mmap>(2), B<open>(2), B<umask>(2), B<shm_overview>(7)"
8624
8625 #. type: TH
8626 #: build/C/man7/shm_overview.7:27
8627 #, no-wrap
8628 msgid "SHM_OVERVIEW"
8629 msgstr "SHM_OVERVIEW"
8630
8631 #. type: TH
8632 #: build/C/man7/shm_overview.7:27
8633 #, no-wrap
8634 msgid "2010-09-10"
8635 msgstr "2010-09-10"
8636
8637 #. type: Plain text
8638 #: build/C/man7/shm_overview.7:30
8639 msgid "shm_overview - overview of POSIX shared memory"
8640 msgstr "shm_overview - POSIX 共有メモリの概要"
8641
8642 #. type: Plain text
8643 #: build/C/man7/shm_overview.7:33
8644 msgid ""
8645 "The POSIX shared memory API allows processes to communicate information by "
8646 "sharing a region of memory."
8647 msgstr ""
8648 "POSIX 共有メモリ API を使用すると、メモリのある領域を共有して、 プロセス間で"
8649 "情報をやり取りすることができる。"
8650
8651 #. type: Plain text
8652 #: build/C/man7/shm_overview.7:35
8653 msgid "The interfaces employed in the API are:"
8654 msgstr "この API では以下のインターフェースが採用されている。"
8655
8656 #. type: TP
8657 #: build/C/man7/shm_overview.7:35
8658 #, no-wrap
8659 msgid "B<shm_open>(3)"
8660 msgstr "B<shm_open>(3)"
8661
8662 #. type: Plain text
8663 #: build/C/man7/shm_overview.7:42
8664 msgid ""
8665 "Create and open a new object, or open an existing object.  This is analogous "
8666 "to B<open>(2).  The call returns a file descriptor for use by the other "
8667 "interfaces listed below."
8668 msgstr ""
8669 "新しいオブジェクトを生成しオープンする、もしくは 既存のオブジェクトをオープン"
8670 "する。これは B<open>(2)  と同じである。下記にある他のインターフェースで使用す"
8671 "る ファイルディスクリプタを返す。"
8672
8673 #. type: TP
8674 #: build/C/man7/shm_overview.7:42
8675 #, no-wrap
8676 msgid "B<ftruncate>(2)"
8677 msgstr "B<ftruncate>(2)"
8678
8679 #. type: Plain text
8680 #: build/C/man7/shm_overview.7:46
8681 msgid ""
8682 "Set the size of the shared memory object.  (A newly created shared memory "
8683 "object has a length of zero.)"
8684 msgstr "共有メモリオブジェクトの大きさを設定する。"
8685
8686 #. type: Plain text
8687 #: build/C/man7/shm_overview.7:50
8688 msgid ""
8689 "Map the shared memory object into the virtual address space of the calling "
8690 "process."
8691 msgstr ""
8692 "呼び出したプロセスの仮想アドレス空間に共有メモリオブジェクトを マップする。"
8693
8694 #. type: TP
8695 #: build/C/man7/shm_overview.7:50
8696 #, no-wrap
8697 msgid "B<munmap>(2)"
8698 msgstr "B<munmap>(2)"
8699
8700 #. type: Plain text
8701 #: build/C/man7/shm_overview.7:54
8702 msgid ""
8703 "Unmap the shared memory object from the virtual address space of the calling "
8704 "process."
8705 msgstr ""
8706 "呼び出したプロセスの仮想アドレス空間から 共有メモリオブジェクトをアンマップす"
8707 "る。"
8708
8709 #. type: TP
8710 #: build/C/man7/shm_overview.7:54
8711 #, no-wrap
8712 msgid "B<shm_unlink>(3)"
8713 msgstr "B<shm_unlink>(3)"
8714
8715 #. type: Plain text
8716 #: build/C/man7/shm_overview.7:57
8717 msgid "Remove a shared memory object name."
8718 msgstr "共有メモリオブジェクト名を削除する。"
8719
8720 #. type: TP
8721 #: build/C/man7/shm_overview.7:57
8722 #, no-wrap
8723 msgid "B<close>(2)"
8724 msgstr "B<close>(2)"
8725
8726 #. type: Plain text
8727 #: build/C/man7/shm_overview.7:62
8728 msgid ""
8729 "Close the file descriptor allocated by B<shm_open>(3)  when it is no longer "
8730 "needed."
8731 msgstr ""
8732 "B<shm_open>(3)  で割り当てられたファイルディスクリプタが不要になった際に、 そ"
8733 "のファイルディスクリプタをクローズする。"
8734
8735 #. type: TP
8736 #: build/C/man7/shm_overview.7:62
8737 #, no-wrap
8738 msgid "B<fstat>(2)"
8739 msgstr "B<fstat>(2)"
8740
8741 #. type: Plain text
8742 #: build/C/man7/shm_overview.7:76
8743 msgid ""
8744 "Obtain a I<stat> structure that describes the shared memory object.  Among "
8745 "the information returned by this call are the object's size (I<st_size>), "
8746 "permissions (I<st_mode>), owner (I<st_uid>), and group (I<st_gid>)."
8747 msgstr ""
8748 "その共有メモリオブジェクトについての情報が入った I<stat> 構造体を取得する。 "
8749 "このシステムコールが返す情報には、オブジェクトのサイズ (I<st_size>)、 許可属"
8750 "性 (I<st_mode>)、 所有者 (I<st_uid>)、 グループ (I<st_gid>)  がある。"
8751
8752 #. type: TP
8753 #: build/C/man7/shm_overview.7:76
8754 #, no-wrap
8755 msgid "B<fchown>(2)"
8756 msgstr "B<fchown>(2)"
8757
8758 #. type: Plain text
8759 #: build/C/man7/shm_overview.7:79
8760 msgid "To change the ownership of a shared memory object."
8761 msgstr "共有メモリオブジェクトの所有権を変更する。"
8762
8763 #. type: TP
8764 #: build/C/man7/shm_overview.7:79
8765 #, no-wrap
8766 msgid "B<fchmod>(2)"
8767 msgstr "B<fchmod>(2)"
8768
8769 #. type: Plain text
8770 #: build/C/man7/shm_overview.7:82
8771 msgid "To change the permissions of a shared memory object."
8772 msgstr "共有メモリオブジェクトの許可属性を変更する。"
8773
8774 #. type: SS
8775 #: build/C/man7/shm_overview.7:82
8776 #, no-wrap
8777 msgid "Versions"
8778 msgstr "Versions"
8779
8780 #. type: Plain text
8781 #: build/C/man7/shm_overview.7:84
8782 msgid "POSIX shared memory is supported since Linux 2.4 and glibc 2.2."
8783 msgstr "POSIX 共有メモリは Linux 2.4 と glibc 2.2 以降でサポートされている。"
8784
8785 #. type: SS
8786 #: build/C/man7/shm_overview.7:84
8787 #, no-wrap
8788 msgid "Persistence"
8789 msgstr "持続性"
8790
8791 #. type: Plain text
8792 #: build/C/man7/shm_overview.7:89
8793 msgid ""
8794 "POSIX shared memory objects have kernel persistence: a shared memory object "
8795 "will exist until the system is shut down, or until all processes have "
8796 "unmapped the object and it has been deleted with B<shm_unlink>(3)"
8797 msgstr ""
8798 "POSIX 共有メモリオブジェクトはカーネル内で保持される。 共有メモリオブジェクト"
8799 "は、システムがシャットダウンされるか、 全てのプロセスがそのオブジェクトをアン"
8800 "マップし、 B<shm_unlink>(3)  で削除されるまで、存在し続ける。"
8801
8802 #. type: SS
8803 #: build/C/man7/shm_overview.7:89
8804 #, no-wrap
8805 msgid "Linking"
8806 msgstr "リンク"
8807
8808 #. type: Plain text
8809 #: build/C/man7/shm_overview.7:94
8810 msgid ""
8811 "Programs using the POSIX shared memory API must be compiled with I<cc -lrt> "
8812 "to link against the real-time library, I<librt>."
8813 msgstr ""
8814 "POSIX 共有メモリ API を使用したプログラムは I<cc -lrt> でコンパイルし、リアル"
8815 "タイムライブラリ I<librt> とリンクしなければならない。"
8816
8817 #. type: SS
8818 #: build/C/man7/shm_overview.7:94
8819 #, no-wrap
8820 msgid "Accessing shared memory objects via the file system"
8821 msgstr "ファイルシステム経由での共有メモリオブジェクトへのアクセス"
8822
8823 #. type: Plain text
8824 #: build/C/man7/shm_overview.7:101
8825 msgid ""
8826 "On Linux, shared memory objects are created in a (I<tmpfs>)  virtual file "
8827 "system, normally mounted under I</dev/shm>.  Since kernel 2.6.19, Linux "
8828 "supports the use of access control lists (ACLs)  to control the permissions "
8829 "of objects in the virtual file system."
8830 msgstr ""
8831 "Linux では、共有メモリオブジェクトは通常 I</dev/shm> 以下にマウントされる仮想"
8832 "ファイルシステム (I<tmpfs>)  内に作成される。 カーネル 2.6.19 以降の Linux で"
8833 "は、 仮想ファイルシステム内のオブジェクトの許可属性の制御に、 アクセス制御リ"
8834 "スト (ACL; access control lists) を使うことができる。"
8835
8836 #. type: Plain text
8837 #: build/C/man7/shm_overview.7:106
8838 msgid ""
8839 "Typically, processes must synchronize their access to a shared memory "
8840 "object, using, for example, POSIX semaphores."
8841 msgstr ""
8842 "通常は、共有メモリオブジェクトにアクセスするプロセスは、 POSIX セマフォなどを"
8843 "使ってプロセス間で同期をとらなければならない。"
8844
8845 #. type: Plain text
8846 #: build/C/man7/shm_overview.7:114
8847 msgid ""
8848 "System V shared memory (B<shmget>(2), B<shmop>(2), etc.) is an older shared "
8849 "memory API.  POSIX shared memory provides a simpler, and better designed "
8850 "interface; on the other hand POSIX shared memory is somewhat less widely "
8851 "available (especially on older systems) than System V shared memory."
8852 msgstr ""
8853 "System V 共有メモリ (B<shmget>(2), B<shmop>(2)  など) は古い共有メモリ API で"
8854 "ある。 POSIX 共有メモリは、より簡単で、うまく設計されたインタフェースを提供し"
8855 "ている。 一方で、POSIX 共有メモリは System V 共有メモリと比べると 利用できる"
8856 "システムが少ない (特に、古いシステムでは少ない)。"
8857
8858 #. type: Plain text
8859 #: build/C/man7/shm_overview.7:127
8860 msgid ""
8861 "B<fchmod>(2), B<fchown>(2), B<fstat>(2), B<ftruncate>(2), B<mmap>(2), "
8862 "B<mprotect>(2), B<munmap>(2), B<shmget>(2), B<shmop>(2), B<shm_open>(3), "
8863 "B<shm_unlink>(3), B<sem_overview>(7)"
8864 msgstr ""
8865 "B<fchmod>(2), B<fchown>(2), B<fstat>(2), B<ftruncate>(2), B<mmap>(2), "
8866 "B<mprotect>(2), B<munmap>(2), B<shmget>(2), B<shmop>(2), B<shm_open>(3), "
8867 "B<shm_unlink>(3), B<sem_overview>(7)"
8868
8869 #. type: TH
8870 #: build/C/man2/shmctl.2:45
8871 #, no-wrap
8872 msgid "SHMCTL"
8873 msgstr "SHMCTL"
8874
8875 #. type: TH
8876 #: build/C/man2/shmctl.2:45
8877 #, fuzzy, no-wrap
8878 #| msgid "2013-02-12"
8879 msgid "2013-03-18"
8880 msgstr "2013-02-12"
8881
8882 #. type: Plain text
8883 #: build/C/man2/shmctl.2:48
8884 #, fuzzy
8885 #| msgid "shmctl - shared memory control"
8886 msgid "shmctl - System V shared memory control"
8887 msgstr "shmctl - 共有メモリ (shared memory) を制御する"
8888
8889 #. type: Plain text
8890 #: build/C/man2/shmctl.2:51 build/C/man2/shmget.2:44
8891 msgid "B<#include E<lt>sys/ipc.hE<gt>>"
8892 msgstr "B<#include E<lt>sys/ipc.hE<gt>>"
8893
8894 #. type: Plain text
8895 #: build/C/man2/shmctl.2:53 build/C/man2/shmget.2:46
8896 msgid "B<#include E<lt>sys/shm.hE<gt>>"
8897 msgstr "B<#include E<lt>sys/shm.hE<gt>>"
8898
8899 #. type: Plain text
8900 #: build/C/man2/shmctl.2:55
8901 msgid ""
8902 "B<int shmctl(int >I<shmid>B<, int >I<cmd>B<, struct shmid_ds *>I<buf>B<);>"
8903 msgstr ""
8904 "B<int shmctl(int >I<shmid>B<, int >I<cmd>B<, struct shmid_ds *>I<buf>B<);>"
8905
8906 #. type: Plain text
8907 #: build/C/man2/shmctl.2:62
8908 #, fuzzy
8909 #| msgid ""
8910 #| "B<shmctl>()  performs the control operation specified by I<cmd> on the "
8911 #| "shared memory segment whose identifier is given in I<shmid>."
8912 msgid ""
8913 "B<shmctl>()  performs the control operation specified by I<cmd> on the "
8914 "System V shared memory segment whose identifier is given in I<shmid>."
8915 msgstr ""
8916 "B<shmctl>()  は、識別子が I<shmid> の共有メモリ・セグメントに対して I<cmd> で"
8917 "指示した制御命令を実行する。"
8918
8919 #. type: Plain text
8920 #: build/C/man2/shmctl.2:67
8921 msgid ""
8922 "The I<buf> argument is a pointer to a I<shmid_ds> structure, defined in "
8923 "I<E<lt>sys/shm.hE<gt>> as follows:"
8924 msgstr ""
8925 "I<buf> 引き数は、 I<shmid_ds> 構造体へのポインタである。 この構造体は "
8926 "I<E<lt>sys/shm.hE<gt>> で以下のように定義されている"
8927
8928 #. type: Plain text
8929 #: build/C/man2/shmctl.2:81
8930 #, no-wrap
8931 msgid ""
8932 "struct shmid_ds {\n"
8933 "    struct ipc_perm shm_perm;    /* Ownership and permissions */\n"
8934 "    size_t          shm_segsz;   /* Size of segment (bytes) */\n"
8935 "    time_t          shm_atime;   /* Last attach time */\n"
8936 "    time_t          shm_dtime;   /* Last detach time */\n"
8937 "    time_t          shm_ctime;   /* Last change time */\n"
8938 "    pid_t           shm_cpid;    /* PID of creator */\n"
8939 "    pid_t           shm_lpid;    /* PID of last shmat(2)/shmdt(2) */\n"
8940 "    shmatt_t        shm_nattch;  /* No. of current attaches */\n"
8941 "    ...\n"
8942 "};\n"
8943 msgstr ""
8944 "struct shmid_ds {\n"
8945 "    struct ipc_perm shm_perm;    /* 所有権と許可 */\n"
8946 "    size_t          shm_segsz;   /* セグメントのサイズ (バイト) */\n"
8947 "    time_t          shm_atime;   /* 最後の付加 (attach) の時刻 */\n"
8948 "    time_t          shm_dtime;   /* 最後の分離 (detach) の時刻 */\n"
8949 "    time_t          shm_ctime;   /* 最後に変更が行われた時刻 */\n"
8950 "    pid_t           shm_cpid;    /* 作成者 (creator) の PID */\n"
8951 "    pid_t           shm_lpid;    /* 最後の shmat(2)/shmdt(2) の PID */\n"
8952 "    shmatt_t        shm_nattch;  /* 現在付加されている数 */\n"
8953 "    ...\n"
8954 "};\n"
8955
8956 #. type: Plain text
8957 #: build/C/man2/shmctl.2:89
8958 msgid ""
8959 "The I<ipc_perm> structure is defined as follows (the highlighted fields are "
8960 "settable using B<IPC_SET>):"
8961 msgstr ""
8962 "I<ipc_perm> 構造体は以下のように定義されている (強調されたフィールドは "
8963 "B<IPC_SET> を使って設定可能である):"
8964
8965 #. type: Plain text
8966 #: build/C/man2/shmctl.2:102
8967 #, no-wrap
8968 msgid ""
8969 "struct ipc_perm {\n"
8970 "    key_t          __key;    /* Key supplied to shmget(2) */\n"
8971 "    uid_t          B<uid>;      /* Effective UID of owner */\n"
8972 "    gid_t          B<gid>;      /* Effective GID of owner */\n"
8973 "    uid_t          cuid;     /* Effective UID of creator */\n"
8974 "    gid_t          cgid;     /* Effective GID of creator */\n"
8975 "    unsigned short B<mode>;     /* B<Permissions> + SHM_DEST and\n"
8976 "                                SHM_LOCKED flags */\n"
8977 "    unsigned short __seq;    /* Sequence number */\n"
8978 "};\n"
8979 msgstr ""
8980 "struct ipc_perm {\n"
8981 "    key_t          __key;    /* shmget(2) に与えられるキー */\n"
8982 "    uid_t          B<uid>;      /* 所有者の実効 UID */\n"
8983 "    gid_t          B<gid>;      /* 所有者の実効 GID */\n"
8984 "    uid_t          cuid;     /* 作成者の実効 UID */\n"
8985 "    gid_t          cgid;     /* 作成者の実効 GID */\n"
8986 "    unsigned short B<mode>;     /* B<許可> + SHM_DEST と\n"
8987 "                                SHM_LOCKED フラグ */\n"
8988 "    unsigned short __seq;    /* シーケンス番号 */\n"
8989 "};\n"
8990
8991 #. type: Plain text
8992 #: build/C/man2/shmctl.2:108
8993 msgid "Valid values for I<cmd> are:"
8994 msgstr "I<cmd> として有効な値は以下の通り:"
8995
8996 #. type: TP
8997 #: build/C/man2/shmctl.2:109
8998 #, no-wrap
8999 msgid "B<IPC_STAT>"
9000 msgstr "B<IPC_STAT>"
9001
9002 #. type: Plain text
9003 #: build/C/man2/shmctl.2:118
9004 msgid ""
9005 "Copy information from the kernel data structure associated with I<shmid> "
9006 "into the I<shmid_ds> structure pointed to by I<buf>.  The caller must have "
9007 "read permission on the shared memory segment."
9008 msgstr ""
9009 "I<shmid> に関連づけられたカーネルデータ構造体の情報を I<buf> で指された "
9010 "I<shmid_ds> 構造体にコピーする。 呼び出し元は共有メモリ・セグメントに対する "
9011 "読み込み許可を持たなければならない。"
9012
9013 #. type: TP
9014 #: build/C/man2/shmctl.2:118
9015 #, no-wrap
9016 msgid "B<IPC_SET>"
9017 msgstr "B<IPC_SET>"
9018
9019 #. type: Plain text
9020 #: build/C/man2/shmctl.2:136
9021 msgid ""
9022 "Write the values of some members of the I<shmid_ds> structure pointed to by "
9023 "I<buf> to the kernel data structure associated with this shared memory "
9024 "segment, updating also its I<shm_ctime> member.  The following fields can be "
9025 "changed: I<shm_perm.uid>, I<shm_perm.gid>, and (the least significant 9 bits "
9026 "of) I<shm_perm.mode>.  The effective UID of the calling process must match "
9027 "the owner (I<shm_perm.uid>)  or creator (I<shm_perm.cuid>)  of the shared "
9028 "memory segment, or the caller must be privileged."
9029 msgstr ""
9030 "I<buf> によって指される I<shmid_ds> 構造体のいくつかのメンバーの値を、 この共"
9031 "有メモリ・セグメントに関連づけられたカーネルデータ構造体に書き込み、 "
9032 "I<shm_ctime> メンバーも更新する。 以下のフィールドは変更できる。 I<shm_perm."
9033 "uid>, I<shm_perm.gid>, I<shm_perm.mode> (の最下位 9 ビット)。 呼び出したプロ"
9034 "セスの実効 UID が所有者 (I<shm_perm.uid>)  または作成者 (I<shm_perm.cuid>)  "
9035 "と一致するか、呼び出し元が特権を持たなければならない。"
9036
9037 #. type: TP
9038 #: build/C/man2/shmctl.2:136
9039 #, no-wrap
9040 msgid "B<IPC_RMID>"
9041 msgstr "B<IPC_RMID>"
9042
9043 #. type: Plain text
9044 #: build/C/man2/shmctl.2:153
9045 msgid ""
9046 "Mark the segment to be destroyed.  The segment will only actually be "
9047 "destroyed after the last process detaches it (i.e., when the I<shm_nattch> "
9048 "member of the associated structure I<shmid_ds> is zero).  The caller must be "
9049 "the owner or creator, or be privileged.  If a segment has been marked for "
9050 "destruction, then the (nonstandard)  B<SHM_DEST> flag of the I<shm_perm."
9051 "mode> field in the associated data structure retrieved by B<IPC_STAT> will "
9052 "be set."
9053 msgstr ""
9054 "セグメントに破棄済みのマークを付ける。 セグメントは、実際には最後プロセスがセ"
9055 "グメントを分離した (関連する I<shmid_ds> 構造体の I<shm_nattch> メンバーが 0 "
9056 "になった) 後でのみ破棄される。 呼び出し元は所有者か作成者であるか、特権を持た"
9057 "なければならない。 セグメントに破棄のマークが付けられると、 関連するデータ構"
9058 "造体において I<shm_perm.mode> フィールドの (標準ではない)  B<SHM_DEST> フラグ"
9059 "が設定される。 このデータ構造体は B<IPC_STAT> で取得される。"
9060
9061 #. type: Plain text
9062 #: build/C/man2/shmctl.2:156
9063 msgid ""
9064 "The caller I<must> ensure that a segment is eventually destroyed; otherwise "
9065 "its pages that were faulted in will remain in memory or swap."
9066 msgstr ""
9067 "呼び出し元は最終的にはセグメントを忘れずに破棄I<しなければならない>。 そうで"
9068 "なれば、フォールト (fault) されたページは メモリかスワップ (swap) に残り続け"
9069 "る。"
9070
9071 #. type: Plain text
9072 #: build/C/man2/shmctl.2:161
9073 msgid ""
9074 "See also the description of I</proc/sys/kernel/shm_rmid_forced> in B<proc>"
9075 "(5)."
9076 msgstr ""
9077
9078 #. type: TP
9079 #: build/C/man2/shmctl.2:161
9080 #, no-wrap
9081 msgid "B<IPC_INFO> (Linux-specific)"
9082 msgstr "B<IPC_INFO> (Linux 固有)"
9083
9084 #. type: Plain text
9085 #: build/C/man2/shmctl.2:174
9086 msgid ""
9087 "Returns information about system-wide shared memory limits and parameters in "
9088 "the structure pointed to by I<buf>.  This structure is of type I<shminfo> "
9089 "(thus, a cast is required), defined in I<E<lt>sys/shm.hE<gt>> if the "
9090 "B<_GNU_SOURCE> feature test macro is defined:"
9091 msgstr ""
9092 "システム全体での共有メモリの制限とパラメータに関する情報を、 I<buf> が指す構"
9093 "造体に入れて返す。 この構造体は I<shminfo> 型である (そのためキャストが必要で"
9094 "ある)。 I<shminfo> は B<_GNU_SOURCE> 機能検査マクロが定義された場合に "
9095 "I<E<lt>sys/shm.hE<gt>> で以下のように定義される:"
9096
9097 #. type: Plain text
9098 #: build/C/man2/shmctl.2:188
9099 #, no-wrap
9100 msgid ""
9101 "struct  shminfo {\n"
9102 "    unsigned long shmmax; /* Maximum segment size */\n"
9103 "    unsigned long shmmin; /* Minimum segment size;\n"
9104 "                             always 1 */\n"
9105 "    unsigned long shmmni; /* Maximum number of segments */\n"
9106 "    unsigned long shmseg; /* Maximum number of segments\n"
9107 "                             that a process can attach;\n"
9108 "                             unused within kernel */\n"
9109 "    unsigned long shmall; /* Maximum number of pages of\n"
9110 "                             shared memory, system-wide */\n"
9111 "};\n"
9112 msgstr ""
9113 "struct  shminfo {\n"
9114 "    unsigned long shmmax; /* 最大セグメントサイズ */\n"
9115 "    unsigned long shmmin; /* 最小セグメントサイズ。\n"
9116 "                             常に 1 */\n"
9117 "    unsigned long shmmni; /* 最大セグメント数 */\n"
9118 "    unsigned long shmseg; /* プロセスが付加できる\n"
9119 "                             セグメントの最大数。\n"
9120 "                             カーネル内では未使用 */\n"
9121 "    unsigned long shmall; /* 共有メモリの最大ページ数。\n"
9122 "                             システム全体での値 */\n"
9123 "};\n"
9124
9125 #. type: Plain text
9126 #: build/C/man2/shmctl.2:201
9127 msgid ""
9128 "The I<shmmni>, I<shmmax>, and I<shmall> settings can be changed via I</proc> "
9129 "files of the same name; see B<proc>(5)  for details."
9130 msgstr ""
9131 "設定 I<shmmni>, I<shmmax>, I<shmall> は I</proc> にある同じ名前のファイル経由"
9132 "で変更可能である。 詳しくは B<proc>(5)  を参照。"
9133
9134 #. type: TP
9135 #: build/C/man2/shmctl.2:201
9136 #, no-wrap
9137 msgid "B<SHM_INFO> (Linux-specific)"
9138 msgstr "B<SHM_INFO> (Linux 固有)"
9139
9140 #. type: Plain text
9141 #: build/C/man2/shmctl.2:212
9142 msgid ""
9143 "Returns a I<shm_info> structure whose fields contain information about "
9144 "system resources consumed by shared memory.  This structure is defined in "
9145 "I<E<lt>sys/shm.hE<gt>> if the B<_GNU_SOURCE> feature test macro is defined:"
9146 msgstr ""
9147 "共有メモリが消費しているシステム資源に関する情報を 格納した I<shm_info> 構造"
9148 "体を返す。 この構造体は、 B<_GNU_SOURCE> 機能検査マクロが定義された場合に "
9149 "I<E<lt>sys/shm.hE<gt>> で以下のように定義される:"
9150
9151 #. type: Plain text
9152 #: build/C/man2/shmctl.2:229
9153 #, no-wrap
9154 msgid ""
9155 "struct shm_info {\n"
9156 "    int           used_ids; /* # of currently existing\n"
9157 "                               segments */\n"
9158 "    unsigned long shm_tot;  /* Total number of shared\n"
9159 "                               memory pages */\n"
9160 "    unsigned long shm_rss;  /* # of resident shared\n"
9161 "                               memory pages */\n"
9162 "    unsigned long shm_swp;  /* # of swapped shared\n"
9163 "                               memory pages */\n"
9164 "    unsigned long swap_attempts;\n"
9165 "                            /* Unused since Linux 2.4 */\n"
9166 "    unsigned long swap_successes;\n"
9167 "                            /* Unused since Linux 2.4 */\n"
9168 "};\n"
9169 msgstr ""
9170 "struct shm_info {\n"
9171 "    int           used_ids; /* 現在存在するセグメント数 */\n"
9172 "    unsigned long shm_tot;  /* 共有メモリのページ総数 */\n"
9173 "    unsigned long shm_rss;  /* メモリ上にある (スワップされて\n"
9174 "                               いない) 共有メモリページ数 */\n"
9175 "    unsigned long shm_swp;  /* スワップされている共有メモリ\n"
9176 "                               ページ数 */\n"
9177 "    unsigned long swap_attempts;\n"
9178 "                            /* Linux 2.4 以降では未使用 */\n"
9179 "    unsigned long swap_successes;\n"
9180 "                            /* Linux 2.4 以降では未使用 */\n"
9181 "};\n"
9182
9183 #. type: TP
9184 #: build/C/man2/shmctl.2:231
9185 #, no-wrap
9186 msgid "B<SHM_STAT> (Linux-specific)"
9187 msgstr "B<SHM_STAT> (Linux 固有)"
9188
9189 #. type: Plain text
9190 #: build/C/man2/shmctl.2:242
9191 msgid ""
9192 "Returns a I<shmid_ds> structure as for B<IPC_STAT>.  However, the I<shmid> "
9193 "argument is not a segment identifier, but instead an index into the kernel's "
9194 "internal array that maintains information about all shared memory segments "
9195 "on the system."
9196 msgstr ""
9197 "B<IPC_STAT> と同じく I<shmid_ds> 構造体を返す。 但し、 I<shmid> 引き数は、セ"
9198 "グメント識別子ではなく、システム上の全ての共有メモリ セグメントに関する情報を"
9199 "管理するカーネルの内部配列へのインデックス である。"
9200
9201 #. type: Plain text
9202 #: build/C/man2/shmctl.2:245
9203 msgid ""
9204 "The caller can prevent or allow swapping of a shared memory segment with the "
9205 "following I<cmd> values:"
9206 msgstr ""
9207 "呼び出し元は、I<cmd> に以下の値を指定することで、共有メモリ・セグメントが ス"
9208 "ワップされることを防止したり、許可したりできる:"
9209
9210 #. type: TP
9211 #: build/C/man2/shmctl.2:246
9212 #, no-wrap
9213 msgid "B<SHM_LOCK> (Linux-specific)"
9214 msgstr "B<SHM_LOCK> (Linux 固有)"
9215
9216 #. type: Plain text
9217 #: build/C/man2/shmctl.2:258
9218 msgid ""
9219 "Prevent swapping of the shared memory segment.  The caller must fault in any "
9220 "pages that are required to be present after locking is enabled.  If a "
9221 "segment has been locked, then the (nonstandard)  B<SHM_LOCKED> flag of the "
9222 "I<shm_perm.mode> field in the associated data structure retrieved by "
9223 "B<IPC_STAT> will be set."
9224 msgstr ""
9225 "共有メモリ・セグメントをスワップすることを防止する。 ロックが有効になった後、"
9226 "呼び出し元は、 存在することが要求された全てのページをフォールトさせなければな"
9227 "らない。 セグメントがロックされると、 関連するデータ構造体において "
9228 "I<shm_perm.mode> フィールドの (標準的ではない)  B<SHM_LOCKED> フラグが設定さ"
9229 "れる。 このデータ構造体は B<IPC_STAT> で取得される。"
9230
9231 #. type: TP
9232 #: build/C/man2/shmctl.2:258
9233 #, no-wrap
9234 msgid "B<SHM_UNLOCK> (Linux-specific)"
9235 msgstr "B<SHM_UNLOCK> (Linux 固有)"
9236
9237 #. type: Plain text
9238 #: build/C/man2/shmctl.2:261
9239 msgid "Unlock the segment, allowing it to be swapped out."
9240 msgstr "セグメントのロックを解除し、スワップ・アウトすることを可能にする。"
9241
9242 #.  There was some weirdness in 2.6.9: SHM_LOCK and SHM_UNLOCK could
9243 #.  be applied to a segment, regardless of ownership of the segment.
9244 #.  This was a botch-up in the move to RLIMIT_MEMLOCK, and was fixed
9245 #.  in 2.6.10.  MTK, May 2005
9246 #. type: Plain text
9247 #: build/C/man2/shmctl.2:279
9248 msgid ""
9249 "In kernels before 2.6.10, only a privileged process could employ B<SHM_LOCK> "
9250 "and B<SHM_UNLOCK>.  Since kernel 2.6.10, an unprivileged process can employ "
9251 "these operations if its effective UID matches the owner or creator UID of "
9252 "the segment, and (for B<SHM_LOCK>)  the amount of memory to be locked falls "
9253 "within the B<RLIMIT_MEMLOCK> resource limit (see B<setrlimit>(2))."
9254 msgstr ""
9255 "2.6.10 より前のカーネルでは、特権プロセスだけが B<SHM_LOCK> と B<SHM_UNLOCK> "
9256 "を利用することができた。 2.6.10 以降のカーネルでは、非特権プロセスであっても"
9257 "次の条件を満たせば これらの操作を利用することができる。その条件とは、プロセス"
9258 "の実効 UID がそのセグメントの所有者もしくは作成者の UID と一致し、 "
9259 "(B<SHM_LOCK> の場合には) ロックするメモリの合計が B<RLIMIT_MEMLOCK> リソース"
9260 "上限 (B<setrlimit>(2)  参照) の範囲内に入っていることである。"
9261
9262 #. type: Plain text
9263 #: build/C/man2/shmctl.2:297
9264 msgid ""
9265 "A successful B<IPC_INFO> or B<SHM_INFO> operation returns the index of the "
9266 "highest used entry in the kernel's internal array recording information "
9267 "about all shared memory segments.  (This information can be used with "
9268 "repeated B<SHM_STAT> operations to obtain information about all shared "
9269 "memory segments on the system.)  A successful B<SHM_STAT> operation returns "
9270 "the identifier of the shared memory segment whose index was given in "
9271 "I<shmid>.  Other operations return 0 on success."
9272 msgstr ""
9273 "B<IPC_INFO> と B<SHM_INFO> 操作は、成功すると、全ての共有メモリセグメントに関"
9274 "する情報を 管理しているカーネルの内部配列の使用中エントリのインデックスの う"
9275 "ち最大値を返す (この情報は、システムの全ての共有メモリセグメントに関する情報"
9276 "を 取得するために、 B<SHM_STAT> 操作を繰り返し実行する際に使用できる)。 "
9277 "B<SHM_STAT> 操作は、成功すると、 I<shmid> で指定されたインデックスを持つ共有"
9278 "メモリセグメントの識別子を返す。 他の操作は、成功の場合 0 を返す。"
9279
9280 #. type: Plain text
9281 #: build/C/man2/shmctl.2:301
9282 msgid "On error, -1 is returned, and I<errno> is set appropriately."
9283 msgstr "エラーの場合は -1 を返し、 I<errno> を適切に設定する。"
9284
9285 #. type: Plain text
9286 #: build/C/man2/shmctl.2:310
9287 msgid ""
9288 "B<IPC_STAT> or B<SHM_STAT> is requested and I<shm_perm.mode> does not allow "
9289 "read access for I<shmid>, and the calling process does not have the "
9290 "B<CAP_IPC_OWNER> capability."
9291 msgstr ""
9292 "B<IPC_STAT> または B<SHM_STAT> が要求され、 I<shm_perm.mode> が I<shmid> への"
9293 "読み込みアクセスを許しておらず、 かつ呼び出したプロセスが B<CAP_IPC_OWNER> "
9294 "ケーパビリティ (capability) を持っていない。"
9295
9296 #. type: Plain text
9297 #: build/C/man2/shmctl.2:321
9298 msgid ""
9299 "The argument I<cmd> has value B<IPC_SET> or B<IPC_STAT> but the address "
9300 "pointed to by I<buf> isn't accessible."
9301 msgstr ""
9302 "I<cmd> 引き数に B<IPC_SET> か B<IPC_STAT> が指定されたが I<buf> で指されてい"
9303 "るアドレスにアクセスできない。"
9304
9305 #. type: TP
9306 #: build/C/man2/shmctl.2:321 build/C/man2/shmop.2:197
9307 #, no-wrap
9308 msgid "B<EIDRM>"
9309 msgstr "B<EIDRM>"
9310
9311 #. type: Plain text
9312 #: build/C/man2/shmctl.2:324 build/C/man2/shmop.2:200
9313 msgid "I<shmid> points to a removed identifier."
9314 msgstr "I<shmid> が削除 (remove) された識別子 (identifier) を指している。"
9315
9316 #. type: Plain text
9317 #: build/C/man2/shmctl.2:333
9318 msgid ""
9319 "I<shmid> is not a valid identifier, or I<cmd> is not a valid command.  Or: "
9320 "for a B<SHM_STAT> operation, the index value specified in I<shmid> referred "
9321 "to an array slot that is currently unused."
9322 msgstr ""
9323 "I<shmid> が有効な識別子でないか、 I<cmd> が有効なコマンドでない。 もしくは、 "
9324 "B<SHM_STAT> 操作の場合に、 I<shmid> で指定されたインデックス値が現在未使用の"
9325 "配列のスロットを参照していた。"
9326
9327 #. type: Plain text
9328 #: build/C/man2/shmctl.2:344
9329 msgid ""
9330 "(In kernels since 2.6.9), B<SHM_LOCK> was specified and the size of the to-"
9331 "be-locked segment would mean that the total bytes in locked shared memory "
9332 "segments would exceed the limit for the real user ID of the calling "
9333 "process.  This limit is defined by the B<RLIMIT_MEMLOCK> soft resource limit "
9334 "(see B<setrlimit>(2))."
9335 msgstr ""
9336 "(2.6.9 以降のカーネルにおいて)  B<SHM_LOCK> が指定され、 ロックされる予定のセ"
9337 "グメントのサイズ (ロックされる共有メモリ・セグメントの合計バイト数) が、 呼び"
9338 "出したプロセスの実ユーザー ID についての制限を超えた。 この制限は "
9339 "B<RLIMIT_MEMLOCK> ソフト資源制限で定義される (B<setrlimit>(2)  を参照)。"
9340
9341 #. type: Plain text
9342 #: build/C/man2/shmctl.2:349
9343 msgid ""
9344 "B<IPC_STAT> is attempted, and the GID or UID value is too large to be stored "
9345 "in the structure pointed to by I<buf>."
9346 msgstr ""
9347 "B<IPC_STAT> が試みられ、GID や UID の値が I<buf> で指示される構造体に格納する"
9348 "には大き過ぎる。"
9349
9350 #. type: Plain text
9351 #: build/C/man2/shmctl.2:361
9352 msgid ""
9353 "B<IPC_SET> or B<IPC_RMID> is attempted, and the effective user ID of the "
9354 "calling process is not that of the creator (found in I<shm_perm.cuid>), or "
9355 "the owner (found in I<shm_perm.uid>), and the process was not privileged "
9356 "(Linux: did not have the B<CAP_SYS_ADMIN> capability)."
9357 msgstr ""
9358 "B<IPC_SET> か B<IPC_RMID> が試みられ、 呼び出したプロセスの実効ユーザー ID が"
9359 "作成者 (I<shm_perm.cuid>)  でも所有者 (I<shm_perm.uid>)  でもなく、プロセスが"
9360 "特権を持たない (Linux では B<CAP_SYS_ADMIN> ケーパビリティを持たない)。"
9361
9362 #. type: Plain text
9363 #: build/C/man2/shmctl.2:373
9364 msgid ""
9365 "Or (in kernels before 2.6.9), B<SHM_LOCK> or B<SHM_UNLOCK> was specified, "
9366 "but the process was not privileged (Linux: did not have the B<CAP_IPC_LOCK> "
9367 "capability).  (Since Linux 2.6.9, this error can also occur if the "
9368 "B<RLIMIT_MEMLOCK> is 0 and the caller is not privileged.)"
9369 msgstr ""
9370 "または (2.6.9 より前のカーネルで)  B<SHM_LOCK> または B<SHM_UNLOCK> が指定さ"
9371 "れているが、プロセスが特権を持たない (Linux では B<CAP_IPC_LOCK> ケーパビリ"
9372 "ティを持たない)。 (Linux 2.6.9 以降では、 B<RLIMIT_MEMLOCK> が 0 で呼び出し元"
9373 "が特権を持たない場合にも、このエラーが起こる。)"
9374
9375 #.  SVr4 documents an additional error condition EMFILE.
9376 #. type: Plain text
9377 #: build/C/man2/shmctl.2:378 build/C/man2/shmget.2:234
9378 #: build/C/man2/shmop.2:234
9379 msgid "SVr4, POSIX.1-2001."
9380 msgstr "SVr4, POSIX.1-2001."
9381
9382 #.  Like Linux, the FreeBSD man pages still document
9383 #.  the inclusion of these header files.
9384 #. type: Plain text
9385 #: build/C/man2/shmctl.2:391 build/C/man2/shmget.2:250
9386 msgid ""
9387 "The inclusion of I<E<lt>sys/types.hE<gt>> and I<E<lt>sys/ipc.hE<gt>> isn't "
9388 "required on Linux or by any version of POSIX.  However, some old "
9389 "implementations required the inclusion of these header files, and the SVID "
9390 "also documented their inclusion.  Applications intended to be portable to "
9391 "such old systems may need to include these header files."
9392 msgstr ""
9393
9394 #. type: Plain text
9395 #: build/C/man2/shmctl.2:402
9396 msgid ""
9397 "The B<IPC_INFO>, B<SHM_STAT> and B<SHM_INFO> operations are used by the "
9398 "B<ipcs>(1)  program to provide information on allocated resources.  In the "
9399 "future these may modified or moved to a /proc file system interface."
9400 msgstr ""
9401 "B<IPC_INFO>, B<SHM_STAT>, B<SHM_INFO> 操作は、 B<ipcs>(1)  プログラムで割り当"
9402 "て済の資源に関する情報を提供するために 使用されている。将来、これらの操作は変"
9403 "更されたり、 /proc ファイルシステムのインタフェースに移動されるかもしれない。"
9404
9405 #. type: Plain text
9406 #: build/C/man2/shmctl.2:410
9407 msgid ""
9408 "Linux permits a process to attach (B<shmat>(2))  a shared memory segment "
9409 "that has already been marked for deletion using I<shmctl(IPC_RMID)>.  This "
9410 "feature is not available on other UNIX implementations; portable "
9411 "applications should avoid relying on it."
9412 msgstr ""
9413 "Linux では、 I<shmctl(IPC_RMID)> を使ってすでに削除マークがつけられている共有"
9414 "メモリ・セグメントを あるプロセスが付加 (attach)  (B<shmat>(2))  することを許"
9415 "可している。 この機能は他の UNIX の実装では利用できない。 移植性を考慮したア"
9416 "プリケーションではこれに依存しないようにすべきである。"
9417
9418 #. type: Plain text
9419 #: build/C/man2/shmctl.2:423
9420 msgid ""
9421 "Various fields in a I<struct shmid_ds> were typed as I<short> under Linux "
9422 "2.2 and have become I<long> under Linux 2.4.  To take advantage of this, a "
9423 "recompilation under glibc-2.1.91 or later should suffice.  (The kernel "
9424 "distinguishes old and new calls by an B<IPC_64> flag in I<cmd>.)"
9425 msgstr ""
9426 "I<構造体 shmid_ds> 内の多くのフィールドは、 Linux 2.2 では I<short> 型だった"
9427 "が、Linux 2.4 では I<long> 型になった。 この利点を生かすには、glibc-2.1.91 以"
9428 "降の環境下で 再コンパイルすれば十分である。 カーネルは新しい形式の呼び出しと"
9429 "古い形式の呼び出しを I<cmd> 内の B<IPC_64> フラグで区別する。"
9430
9431 #. type: Plain text
9432 #: build/C/man2/shmctl.2:430
9433 msgid ""
9434 "B<mlock>(2), B<setrlimit>(2), B<shmget>(2), B<shmop>(2), B<capabilities>(7), "
9435 "B<svipc>(7)"
9436 msgstr ""
9437 "B<mlock>(2), B<setrlimit>(2), B<shmget>(2), B<shmop>(2), B<capabilities>(7), "
9438 "B<shm_overview>(7), B<svipc>(7)"
9439
9440 #. type: TH
9441 #: build/C/man2/shmget.2:38
9442 #, no-wrap
9443 msgid "SHMGET"
9444 msgstr "SHMGET"
9445
9446 #. type: TH
9447 #: build/C/man2/shmget.2:38
9448 #, no-wrap
9449 msgid "2012-05-31"
9450 msgstr "2012-05-31"
9451
9452 #. type: Plain text
9453 #: build/C/man2/shmget.2:41
9454 #, fuzzy
9455 #| msgid "shmget - allocates a shared memory segment"
9456 msgid "shmget - allocates a System V shared memory segment"
9457 msgstr "shmget - 共有メモリ・セグメントを割り当てる"
9458
9459 #. type: Plain text
9460 #: build/C/man2/shmget.2:48
9461 msgid "B<int shmget(key_t >I<key>B<, size_t >I<size>B<, int >I<shmflg>B<);>"
9462 msgstr "B<int shmget(key_t >I<key>B<, size_t >I<size>B<, int >I<shmflg>B<);>"
9463
9464 #. type: Plain text
9465 #: build/C/man2/shmget.2:72
9466 #, fuzzy
9467 #| msgid ""
9468 #| "B<shmget>()  returns the identifier of the shared memory segment "
9469 #| "associated with the value of the argument I<key>.  A new shared memory "
9470 #| "segment, with size equal to the value of I<size> rounded up to a multiple "
9471 #| "of B<PAGE_SIZE>, is created if I<key> has the value B<IPC_PRIVATE> or "
9472 #| "I<key> isn't B<IPC_PRIVATE>, no shared memory segment corresponding to "
9473 #| "I<key> exists, and B<IPC_CREAT> is specified in I<shmflg>."
9474 msgid ""
9475 "B<shmget>()  returns the identifier of the System V shared memory segment "
9476 "associated with the value of the argument I<key>.  A new shared memory "
9477 "segment, with size equal to the value of I<size> rounded up to a multiple of "
9478 "B<PAGE_SIZE>, is created if I<key> has the value B<IPC_PRIVATE> or I<key> "
9479 "isn't B<IPC_PRIVATE>, no shared memory segment corresponding to I<key> "
9480 "exists, and B<IPC_CREAT> is specified in I<shmflg>."
9481 msgstr ""
9482 "B<shmget>()  は I<key> 引き数に対応する共有メモリ・セグメントの識別子を返"
9483 "す。 I<key> の値が B<IPC_PRIVATE> の場合、もしくは I<key> に対応する共有メモ"
9484 "リ・セグメントが存在せず、 I<shmflg> に B<IPC_CREAT> が指定されていた場合、 "
9485 "新しい共有メモリ・セグメントを作成する。 作成される共有メモリ・セグメント"
9486 "は、 I<size> 引き数の値を B<PAGE_SIZE> の倍数へと切り上げた (round up) 大きさ"
9487 "となる。"
9488
9489 #. type: Plain text
9490 #: build/C/man2/shmget.2:91
9491 msgid ""
9492 "If I<shmflg> specifies both B<IPC_CREAT> and B<IPC_EXCL> and a shared memory "
9493 "segment already exists for I<key>, then B<shmget>()  fails with I<errno> set "
9494 "to B<EEXIST>.  (This is analogous to the effect of the combination B<O_CREAT "
9495 "| O_EXCL> for B<open>(2).)"
9496 msgstr ""
9497 "I<shmflg> に B<IPC_CREAT> と B<IPC_EXCL> の両方が指定された場合、 I<key> に対"
9498 "応する共有メモリ・セグメントが既に存在すると、 B<shmget>()  は失敗し、 "
9499 "I<errno> に B<EEXIST> が設定される (これは B<open>(2)  に B<O_CREAT | "
9500 "O_EXCL> を指定した場合の動作と同じである)。"
9501
9502 #. type: Plain text
9503 #: build/C/man2/shmget.2:95
9504 msgid "The value I<shmflg> is composed of:"
9505 msgstr "I<shmflg> は以下の内容から構成される:"
9506
9507 #. type: TP
9508 #: build/C/man2/shmget.2:95
9509 #, no-wrap
9510 msgid "B<IPC_CREAT>"
9511 msgstr "B<IPC_CREAT>"
9512
9513 #. type: Plain text
9514 #: build/C/man2/shmget.2:102
9515 msgid ""
9516 "to create a new segment.  If this flag is not used, then B<shmget>()  will "
9517 "find the segment associated with I<key> and check to see if the user has "
9518 "permission to access the segment."
9519 msgstr ""
9520 "新しいセグメントを作成する。このフラグが指定されなかった場合、 B<shmget>()  "
9521 "は I<key> に対応するセグメントを探し、 ユーザがそのセグメントにアクセスする許"
9522 "可があるかどうかをチェックする。"
9523
9524 #. type: TP
9525 #: build/C/man2/shmget.2:102
9526 #, no-wrap
9527 msgid "B<IPC_EXCL>"
9528 msgstr "B<IPC_EXCL>"
9529
9530 #. type: Plain text
9531 #: build/C/man2/shmget.2:105
9532 msgid "used with B<IPC_CREAT> to ensure failure if the segment already exists."
9533 msgstr ""
9534 "B<IPC_CREAT> と共に使用し、セグメントが既に存在した場合には 失敗することを保"
9535 "証する。"
9536
9537 #. type: TP
9538 #: build/C/man2/shmget.2:105
9539 #, no-wrap
9540 msgid "I<mode_flags>"
9541 msgstr "I<mode_flags>"
9542
9543 #. type: Plain text
9544 #: build/C/man2/shmget.2:115
9545 msgid ""
9546 "(least significant 9 bits)  specifying the permissions granted to the owner, "
9547 "group, and world.  These bits have the same format, and the same meaning, as "
9548 "the I<mode> argument of B<open>(2).  Presently, the execute permissions are "
9549 "not used by the system."
9550 msgstr ""
9551 "(下位 9 ビット)  所有者、グループ、他人 (world) への許可を指定する。 これらの"
9552 "ビットは B<open>(2)  の I<mode> 引き数と同じ形式で同じ意味を持つ。 今のとこ"
9553 "ろ、システムは実行 (execute) 許可を参照しない。"
9554
9555 #. type: TP
9556 #: build/C/man2/shmget.2:115
9557 #, no-wrap
9558 msgid "B<SHM_HUGETLB> (since Linux 2.6)"
9559 msgstr "B<SHM_HUGETLB> (Linux 2.6 以降)"
9560
9561 #. type: Plain text
9562 #: build/C/man2/shmget.2:121
9563 msgid ""
9564 "Allocate the segment using \"huge pages.\" See the Linux kernel source file "
9565 "I<Documentation/vm/hugetlbpage.txt> for further information."
9566 msgstr ""
9567 "\"ヒュージページ (huge page)\" を使うセグメントを割り当てる。詳細な情報は、"
9568 "Linux カーネルソースのファイル I<Documentation/vm/hugetlbpage.txt> を参照。"
9569
9570 #. type: TP
9571 #: build/C/man2/shmget.2:121
9572 #, no-wrap
9573 msgid "B<SHM_NORESERVE> (since Linux 2.6.15)"
9574 msgstr "B<SHM_NORESERVE> (Linux 2.6.15 以降)"
9575
9576 #.  As at 2.6.17-rc2, this flag has no effect if SHM_HUGETLB was also
9577 #.  specified.
9578 #. type: Plain text
9579 #: build/C/man2/shmget.2:140
9580 msgid ""
9581 "This flag serves the same purpose as the B<mmap>(2)  B<MAP_NORESERVE> flag.  "
9582 "Do not reserve swap space for this segment.  When swap space is reserved, "
9583 "one has the guarantee that it is possible to modify the segment.  When swap "
9584 "space is not reserved one might get B<SIGSEGV> upon a write if no physical "
9585 "memory is available.  See also the discussion of the file I</proc/sys/vm/"
9586 "overcommit_memory> in B<proc>(5)."
9587 msgstr ""
9588 "このフラグは、 B<mmap>(2)  の B<MAP_NORESERVE> フラグと同じ役割を果たす。 こ"
9589 "のセグメントに対するスワップ空間の予約を行わない。 スワップ空間を予約した場合"
9590 "は、そのセグメントの変更が必ず成功することが 保証される。スワップ空間の予約を"
9591 "行わなかった場合は、物理メモリに空きが ないと書き込み時に B<SIGSEGV> を受け取"
9592 "る可能性がある。 B<proc>(5)  にある I</proc/sys/vm/overcommit_memory> ファイ"
9593 "ルに関する議論も参照のこと。"
9594
9595 #. type: Plain text
9596 #: build/C/man2/shmget.2:148
9597 msgid ""
9598 "When a new shared memory segment is created, its contents are initialized to "
9599 "zero values, and its associated data structure, I<shmid_ds> (see B<shmctl>"
9600 "(2)), is initialized as follows:"
9601 msgstr ""
9602 "共有メモリ・セグメントが新たに作成される際、 共有メモリ・セグメントの内容は "
9603 "0 で初期化され、 関連情報を保持するデータ構造体 I<shmid_ds> は以下のように初"
9604 "期化される。"
9605
9606 #. type: Plain text
9607 #: build/C/man2/shmget.2:153
9608 msgid ""
9609 "I<shm_perm.cuid> and I<shm_perm.uid> are set to the effective user ID of the "
9610 "calling process."
9611 msgstr ""
9612 "I<shm_perm.cuid> と I<shm_perm.uid> に呼び出し元プロセスの実効 (effective) "
9613 "ユーザーID を設定する。"
9614
9615 #. type: Plain text
9616 #: build/C/man2/shmget.2:158
9617 msgid ""
9618 "I<shm_perm.cgid> and I<shm_perm.gid> are set to the effective group ID of "
9619 "the calling process."
9620 msgstr ""
9621 "I<shm_perm.cgid> と I<shm_perm.gid> に呼び出し元プロセスの実効グループID を設"
9622 "定する。"
9623
9624 #. type: Plain text
9625 #: build/C/man2/shmget.2:163
9626 msgid ""
9627 "The least significant 9 bits of I<shm_perm.mode> are set to the least "
9628 "significant 9 bit of I<shmflg>."
9629 msgstr ""
9630 "I<shm_perm.mode> の下位 9 ビットに I<shmflg> の下位 9 ビットを設定する。"
9631
9632 #. type: Plain text
9633 #: build/C/man2/shmget.2:167
9634 msgid "I<shm_segsz> is set to the value of I<size>."
9635 msgstr "I<shm_segsz> に I<size> の値を設定する。"
9636
9637 #. type: Plain text
9638 #: build/C/man2/shmget.2:174
9639 msgid "I<shm_lpid>, I<shm_nattch>, I<shm_atime> and I<shm_dtime> are set to 0."
9640 msgstr ""
9641 "I<shm_lpid>, I<shm_nattch>, I<shm_atime>, I<shm_dtime> に 0 を設定する。"
9642
9643 #. type: Plain text
9644 #: build/C/man2/shmget.2:177
9645 msgid "I<shm_ctime> is set to the current time."
9646 msgstr "I<shm_ctime> に現在の時刻を設定する。"
9647
9648 #. type: Plain text
9649 #: build/C/man2/shmget.2:180
9650 msgid ""
9651 "If the shared memory segment already exists, the permissions are verified, "
9652 "and a check is made to see if it is marked for destruction."
9653 msgstr ""
9654 "共有メモリ・セグメントが既に存在する場合、アクセス許可の検査と、 破壊 "
9655 "(destruction) マークがつけられていないかのチェックが行われる。"
9656
9657 #. type: Plain text
9658 #: build/C/man2/shmget.2:184
9659 msgid ""
9660 "A valid segment identifier, I<shmid>, is returned on success, -1 on error."
9661 msgstr ""
9662 "成功した場合、有効なセグメント識別子 I<shmid> が返される。エラーの場合、 -1 "
9663 "が返される。"
9664
9665 #. type: Plain text
9666 #: build/C/man2/shmget.2:188
9667 msgid "On failure, I<errno> is set to one of the following:"
9668 msgstr "失敗した場合は I<errno> が以下のどれかに設定される:"
9669
9670 #. type: Plain text
9671 #: build/C/man2/shmget.2:194
9672 msgid ""
9673 "The user does not have permission to access the shared memory segment, and "
9674 "does not have the B<CAP_IPC_OWNER> capability."
9675 msgstr ""
9676 "ユーザーはその共有メモリ・セグメントへのアクセス許可を持たず、 "
9677 "B<CAP_IPC_OWNER> ケーパビリティも持っていない。"
9678
9679 #. type: Plain text
9680 #: build/C/man2/shmget.2:198
9681 msgid "B<IPC_CREAT | IPC_EXCL> was specified and the segment exists."
9682 msgstr ""
9683 "B<IPC_CREAT | IPC_EXCL> が指定されていたが、そのセグメントが既に存在する。"
9684
9685 #. type: Plain text
9686 #: build/C/man2/shmget.2:204
9687 msgid ""
9688 "A new segment was to be created and I<size> E<lt> B<SHMMIN> or I<size> E<gt> "
9689 "B<SHMMAX>, or no new segment was to be created, a segment with given key "
9690 "existed, but I<size> is greater than the size of that segment."
9691 msgstr ""
9692 "新しいセグメントを作成しようとした際に I<size> E<lt> B<SHMMIN> または "
9693 "I<size> E<gt> B<SHMMAX> であった。 もしくは、指定されたキーに対応するセグメン"
9694 "トが既に存在して、新しい セグメントを作成しようとはしなかったが、I<size> が存"
9695 "在するセグメントの サイズよりも大きかった。"
9696
9697 #. type: Plain text
9698 #: build/C/man2/shmget.2:213
9699 msgid ""
9700 "No segment exists for the given I<key>, and B<IPC_CREAT> was not specified."
9701 msgstr ""
9702 "指定された I<key> に対応するセグメントが存在せず、 B<IPC_CREAT> も指定されて"
9703 "いなかった。"
9704
9705 #. type: Plain text
9706 #: build/C/man2/shmget.2:216
9707 msgid "No memory could be allocated for segment overhead."
9708 msgstr "セグメントの管理情報 (overhead) に割り当てるメモリがなかった。"
9709
9710 #. type: Plain text
9711 #: build/C/man2/shmget.2:224
9712 msgid ""
9713 "All possible shared memory IDs have been taken (B<SHMMNI>), or allocating a "
9714 "segment of the requested I<size> would cause the system to exceed the system-"
9715 "wide limit on shared memory (B<SHMALL>)."
9716 msgstr ""
9717 "システム全体の共有メモリ・セグメント数の制限 (B<SHMMNI>)  に達した、または要"
9718 "求された I<size> のセグメントの割り当てが システム全体の共有メモリサイズの制"
9719 "限 (B<SHMALL>)  を超過した。"
9720
9721 #. type: Plain text
9722 #: build/C/man2/shmget.2:231
9723 msgid ""
9724 "The B<SHM_HUGETLB> flag was specified, but the caller was not privileged "
9725 "(did not have the B<CAP_IPC_LOCK> capability)."
9726 msgstr ""
9727 "B<SHM_HUGETLB> フラグが指定されたが、呼び出し元には権限がなかった "
9728 "(B<CAP_IPC_LOCK> ケーパビリティを持っていなかった)。"
9729
9730 #. type: Plain text
9731 #: build/C/man2/shmget.2:237
9732 msgid "B<SHM_HUGETLB> is a nonportable Linux extension."
9733 msgstr "B<SHM_HUGETLB> は Linux での拡張であり、移植性はない。"
9734
9735 #. type: Plain text
9736 #: build/C/man2/shmget.2:260
9737 msgid ""
9738 "B<IPC_PRIVATE> isn't a flag field but a I<key_t> type.  If this special "
9739 "value is used for I<key>, the system call ignores everything but the least "
9740 "significant 9 bits of I<shmflg> and creates a new shared memory segment (on "
9741 "success)."
9742 msgstr ""
9743 "B<IPC_PRIVATE> はフラグではなく I<key_t> 型である。 この特別な値が I<key> に"
9744 "使用された場合は、 B<shmget>()  は I<shmflg> の下位 9 ビットを除いた全てを無"
9745 "視し、 (成功すれば) 新しい共有メモリ・セグメントを作成する。"
9746
9747 #. type: Plain text
9748 #: build/C/man2/shmget.2:264
9749 msgid ""
9750 "The following limits on shared memory segment resources affect the B<shmget>"
9751 "()  call:"
9752 msgstr ""
9753 "B<shmget>()  コールに影響する共有メモリ・セグメント資源の制限は以下の通りであ"
9754 "る:"
9755
9756 #. type: TP
9757 #: build/C/man2/shmget.2:264
9758 #, no-wrap
9759 msgid "B<SHMALL>"
9760 msgstr "B<SHMALL>"
9761
9762 #. type: Plain text
9763 #: build/C/man2/shmget.2:269
9764 msgid ""
9765 "System wide maximum of shared memory pages (on Linux, this limit can be read "
9766 "and modified via I</proc/sys/kernel/shmall>)."
9767 msgstr ""
9768 "システム全体の共有メモリ・ページの最大数 (Linux では、この上限値は I</proc/"
9769 "sys/kernel/shmall> 経由で参照したり、変更したりできる)。"
9770
9771 #. type: TP
9772 #: build/C/man2/shmget.2:269
9773 #, no-wrap
9774 msgid "B<SHMMAX>"
9775 msgstr "B<SHMMAX>"
9776
9777 #. type: Plain text
9778 #: build/C/man2/shmget.2:274
9779 msgid ""
9780 "Maximum size in bytes for a shared memory segment: policy dependent (on "
9781 "Linux, this limit can be read and modified via I</proc/sys/kernel/shmmax>)."
9782 msgstr ""
9783 "共有メモリ・セグメントのバイト単位の大きさの上限: 方針依存 (Linux では、この"
9784 "上限値は I</proc/sys/kernel/shmmax> 経由で参照したり、変更したりできる)。"
9785
9786 #. type: TP
9787 #: build/C/man2/shmget.2:274
9788 #, no-wrap
9789 msgid "B<SHMMIN>"
9790 msgstr "B<SHMMIN>"
9791
9792 #. type: Plain text
9793 #: build/C/man2/shmget.2:280
9794 msgid ""
9795 "Minimum size in bytes for a shared memory segment: implementation dependent "
9796 "(currently 1 byte, though B<PAGE_SIZE> is the effective minimum size)."
9797 msgstr ""
9798 "共有メモリ・セグメントのバイト単位の大きさの下限: 実装依存 (現在は 1 バイトだ"
9799 "が、実質的な最小サイズは B<PAGE_SIZE> である)。"
9800
9801 #. type: TP
9802 #: build/C/man2/shmget.2:280
9803 #, no-wrap
9804 msgid "B<SHMMNI>"
9805 msgstr "B<SHMMNI>"
9806
9807 #.  Kernels between 2.4.x and 2.6.8 had an off-by-one error that meant
9808 #.  that we could create one more segment than SHMMNI -- MTK
9809 #.  This /proc file is not available in Linux 2.2 and earlier -- MTK
9810 #. type: Plain text
9811 #: build/C/man2/shmget.2:289
9812 msgid ""
9813 "System wide maximum number of shared memory segments: implementation "
9814 "dependent (currently 4096, was 128 before Linux 2.3.99; on Linux, this limit "
9815 "can be read and modified via I</proc/sys/kernel/shmmni>)."
9816 msgstr ""
9817 "システム全体の共有メモリーの数の上限: 実装依存 (現在は 4096。Linux 2.3.99 よ"
9818 "り前では 128。 Linux では、この上限値は I</proc/sys/kernel/shmmni> 経由で参照"
9819 "したり、変更したりできる)。"
9820
9821 #. type: Plain text
9822 #: build/C/man2/shmget.2:293
9823 msgid ""
9824 "The implementation has no specific limits for the per-process maximum number "
9825 "of shared memory segments (B<SHMSEG>)."
9826 msgstr ""
9827 "プロセス当りの共有メモリ・セグメントの個数の最大値 (B<SHMSEG>)  に関する実装"
9828 "上の制限はない。"
9829
9830 #. type: Plain text
9831 #: build/C/man2/shmget.2:299
9832 msgid ""
9833 "Until version 2.3.30 Linux would return B<EIDRM> for a B<shmget>()  on a "
9834 "shared memory segment scheduled for deletion."
9835 msgstr ""
9836 "バージョン 2.3.30 までは、Linux は 削除が予定されている共有メモリ・セグメント"
9837 "に対して B<shmget>()  が行われると B<EIDRM> を返していた。"
9838
9839 #. type: Plain text
9840 #: build/C/man2/shmget.2:305
9841 msgid ""
9842 "The name choice B<IPC_PRIVATE> was perhaps unfortunate, B<IPC_NEW> would "
9843 "more clearly show its function."
9844 msgstr ""
9845 "B<IPC_PRIVATE> という名前を選んだのはおそらく失敗であろう。 B<IPC_NEW> の方が"
9846 "より明確にその機能を表しているだろう。"
9847
9848 #. type: Plain text
9849 #: build/C/man2/shmget.2:313
9850 msgid ""
9851 "B<shmat>(2), B<shmctl>(2), B<shmdt>(2), B<ftok>(3), B<capabilities>(7), "
9852 "B<shm_overview>(7), B<svipc>(7)"
9853 msgstr ""
9854 "B<shmat>(2), B<shmctl>(2), B<shmdt>(2), B<ftok>(3), B<capabilities>(7), "
9855 "B<shm_overview>(7), B<svipc>(7)"
9856
9857 #. type: TH
9858 #: build/C/man2/shmop.2:41
9859 #, no-wrap
9860 msgid "SHMOP"
9861 msgstr "SHMOP"
9862
9863 #. type: Plain text
9864 #: build/C/man2/shmop.2:44
9865 #, fuzzy
9866 #| msgid "shmat, shmdt - shared memory operations"
9867 msgid "shmat, shmdt - System V shared memory operations"
9868 msgstr "shmat, shmdt - 共有メモリ (shared memory) の操作"
9869
9870 #. type: Plain text
9871 #: build/C/man2/shmop.2:48
9872 #, no-wrap
9873 msgid ""
9874 "B<#include E<lt>sys/types.hE<gt>>\n"
9875 "B<#include E<lt>sys/shm.hE<gt>>\n"
9876 msgstr ""
9877 "B<#include E<lt>sys/types.hE<gt>>\n"
9878 "B<#include E<lt>sys/shm.hE<gt>>\n"
9879
9880 #. type: Plain text
9881 #: build/C/man2/shmop.2:50
9882 #, no-wrap
9883 msgid "B<void *shmat(int >I<shmid>B<, const void *>I<shmaddr>B<, int >I<shmflg>B<);>\n"
9884 msgstr "B<void *shmat(int >I<shmid>B<, const void *>I<shmaddr>B<, int >I<shmflg>B<);>\n"
9885
9886 #. type: Plain text
9887 #: build/C/man2/shmop.2:52
9888 #, no-wrap
9889 msgid "B<int shmdt(const void *>I<shmaddr>B<);>\n"
9890 msgstr "B<int shmdt(const void *>I<shmaddr>B<);>\n"
9891
9892 #. type: Plain text
9893 #: build/C/man2/shmop.2:61
9894 #, fuzzy
9895 #| msgid ""
9896 #| "B<shmat>()  attaches the shared memory segment identified by I<shmid> to "
9897 #| "the address space of the calling process.  The attaching address is "
9898 #| "specified by I<shmaddr> with one of the following criteria:"
9899 msgid ""
9900 "B<shmat>()  attaches the System V shared memory segment identified by "
9901 "I<shmid> to the address space of the calling process.  The attaching address "
9902 "is specified by I<shmaddr> with one of the following criteria:"
9903 msgstr ""
9904 "B<shmat>()  は I<shmid> で指定された共有メモリ・セグメント (shared memory "
9905 "segment) を コールしたプロセスのアドレス空間に付加 (attach) する。 付加するア"
9906 "ドレスは I<shmaddr> に以下のどれかの形式で指定する:"
9907
9908 #. type: Plain text
9909 #: build/C/man2/shmop.2:67
9910 msgid ""
9911 "If I<shmaddr> is NULL, the system chooses a suitable (unused) address at "
9912 "which to attach the segment."
9913 msgstr ""
9914 "I<shmaddr> が NULL ならば、システムはセグメントを付加するための 適切な (使用"
9915 "されていない) アドレスを選択する。"
9916
9917 #. type: Plain text
9918 #: build/C/man2/shmop.2:82
9919 msgid ""
9920 "If I<shmaddr> isn't NULL and B<SHM_RND> is specified in I<shmflg>, the "
9921 "attach occurs at the address equal to I<shmaddr> rounded down to the nearest "
9922 "multiple of B<SHMLBA>.  Otherwise I<shmaddr> must be a page-aligned address "
9923 "at which the attach occurs."
9924 msgstr ""
9925 "I<shmaddr> が NULL でなく B<SHM_RND> が I<shmflg> に指定されている場合は、 "
9926 "I<shmaddr> を B<SHMLBA> の倍数へと切り捨てた (rounding down) のと等しいアドレ"
9927 "スへ付加する。 その他の場合は I<shmaddr> は付加を行なうアドレスで、ページ境界"
9928 "を指している必要がある。"
9929
9930 #. type: Plain text
9931 #: build/C/man2/shmop.2:92
9932 msgid ""
9933 "If B<SHM_RDONLY> is specified in I<shmflg>, the segment is attached for "
9934 "reading and the process must have read permission for the segment.  "
9935 "Otherwise the segment is attached for read and write and the process must "
9936 "have read and write permission for the segment.  There is no notion of a "
9937 "write-only shared memory segment."
9938 msgstr ""
9939 "B<SHM_RDONLY> が I<shmflg> に指定されていた場合は、 セグメントは読み込み専用"
9940 "に付加され、プロセスはそのセグメントへの 読み込み許可を持たなければならな"
9941 "い。 そうでなければそのセグメントは読み込みと書き込みのために付加され、 プロ"
9942 "セスはそのセグメントに読み込みと書き込みの許可を持つ必要がある。 書き込み専用"
9943 "の共有メモリ・セグメントという概念は存在しない。"
9944
9945 #. type: Plain text
9946 #: build/C/man2/shmop.2:107
9947 msgid ""
9948 "The (Linux-specific)  B<SHM_REMAP> flag may be specified in I<shmflg> to "
9949 "indicate that the mapping of the segment should replace any existing mapping "
9950 "in the range starting at I<shmaddr> and continuing for the size of the "
9951 "segment.  (Normally an B<EINVAL> error would result if a mapping already "
9952 "exists in this address range.)  In this case, I<shmaddr> must not be NULL."
9953 msgstr ""
9954 "(Linux 特有の)  B<SHM_REMAP> フラグが I<shmflg> に指定された場合は、 セグメン"
9955 "トのマッピングを既存のマッピングに置き換える。 マッピングの範囲は、 "
9956 "I<shmaddr> から始まりセグメントのサイズ分だけある (通常 B<EINVAL> エラーは、"
9957 "このアドレス範囲にマッピングが既に存在するために起る)。 このフラグを指定する"
9958 "場合は、 I<shmaddr> が NULL であってはならない。"
9959
9960 #. type: Plain text
9961 #: build/C/man2/shmop.2:114
9962 msgid ""
9963 "The B<brk>(2)  value of the calling process is not altered by the attach.  "
9964 "The segment will automatically be detached at process exit.  The same "
9965 "segment may be attached as a read and as a read-write one, and more than "
9966 "once, in the process's address space."
9967 msgstr ""
9968 "呼び出したプロセスの B<brk>(2)  の値は付加によって変化しない。 そのセグメント"
9969 "はプロセスが終了 (exit) したら自動的に分離 (detach) される。 同じセグメントを"
9970 "プロセスのアドレス空間に、読み込み専用および読み書き両用 として付加でき、また"
9971 "複数回付加することもできる。"
9972
9973 #. type: Plain text
9974 #: build/C/man2/shmop.2:122
9975 msgid ""
9976 "A successful B<shmat>()  call updates the members of the I<shmid_ds> "
9977 "structure (see B<shmctl>(2))  associated with the shared memory segment as "
9978 "follows:"
9979 msgstr ""
9980 "成功した B<shmat>()  コールは共有メモリ・セグメントに関連する I<shmid_ds> 構"
9981 "造体 (B<shmctl>(2)  を参照) のメンバーを以下のように更新する:"
9982
9983 #. type: Plain text
9984 #: build/C/man2/shmop.2:125
9985 msgid "I<shm_atime> is set to the current time."
9986 msgstr "I<shm_atime> には現在の時刻を設定する。"
9987
9988 #. type: Plain text
9989 #: build/C/man2/shmop.2:128 build/C/man2/shmop.2:154
9990 msgid "I<shm_lpid> is set to the process-ID of the calling process."
9991 msgstr "I<shm_lpid> には呼び出したプロセスのプロセス ID が設定される。"
9992
9993 #. type: Plain text
9994 #: build/C/man2/shmop.2:131
9995 msgid "I<shm_nattch> is incremented by one."
9996 msgstr "I<shm_nattch> を 1 増加させる。"
9997
9998 #. type: Plain text
9999 #: build/C/man2/shmop.2:142
10000 msgid ""
10001 "B<shmdt>()  detaches the shared memory segment located at the address "
10002 "specified by I<shmaddr> from the address space of the calling process.  The "
10003 "to-be-detached segment must be currently attached with I<shmaddr> equal to "
10004 "the value returned by the attaching B<shmat>()  call."
10005 msgstr ""
10006 "B<shmdt>()  は呼び出したプロセスのアドレス空間から I<shmaddr> で指定されたア"
10007 "ドレスに配置された共有メモリ・セグメントを分離 (detach) する。 分離する共有メ"
10008 "モリ・セグメントは、現在 I<shmaddr> に付加されているものでなければならない。 "
10009 "I<shmaddr> は、それを付加した時に B<shmat>()  が返した値に等しくなければなら"
10010 "ない。"
10011
10012 #. type: Plain text
10013 #: build/C/man2/shmop.2:148
10014 msgid ""
10015 "On a successful B<shmdt>()  call the system updates the members of the "
10016 "I<shmid_ds> structure associated with the shared memory segment as follows:"
10017 msgstr ""
10018 "成功した B<shmdt>()  コールはその共有メモリ・セグメントに関連する "
10019 "I<shmid_ds> 構造体のメンバーを以下のように更新する:"
10020
10021 #. type: Plain text
10022 #: build/C/man2/shmop.2:151
10023 msgid "I<shm_dtime> is set to the current time."
10024 msgstr "I<shm_dtime> には現在の時刻が設定される。"
10025
10026 #. type: Plain text
10027 #: build/C/man2/shmop.2:159
10028 msgid ""
10029 "I<shm_nattch> is decremented by one.  If it becomes 0 and the segment is "
10030 "marked for deletion, the segment is deleted."
10031 msgstr ""
10032 "I<shm_nattch> を 1 減少させる。 もし 0 になり、削除マークがあった場合は その"
10033 "セグメントは削除される。"
10034
10035 #. type: Plain text
10036 #: build/C/man2/shmop.2:163
10037 msgid ""
10038 "After a B<fork>(2)  the child inherits the attached shared memory segments."
10039 msgstr ""
10040 "B<fork>(2)  した後、子プロセスは付加された共有メモリ・セグメントを継承する。"
10041
10042 #. type: Plain text
10043 #: build/C/man2/shmop.2:167
10044 msgid ""
10045 "After an B<execve>(2)  all attached shared memory segments are detached from "
10046 "the process."
10047 msgstr ""
10048 "B<exec>(2)  した後、全ての付加された共有メモリ・セグメントはプロセスから分離"
10049 "される。"
10050
10051 #. type: Plain text
10052 #: build/C/man2/shmop.2:171
10053 msgid ""
10054 "Upon B<_exit>(2)  all attached shared memory segments are detached from the "
10055 "process."
10056 msgstr ""
10057 "B<exit>(2)  において、全ての付加された共有メモリ・セグメントはプロセスから分"
10058 "離される。"
10059
10060 #. type: Plain text
10061 #: build/C/man2/shmop.2:179
10062 msgid ""
10063 "On success B<shmat>()  returns the address of the attached shared memory "
10064 "segment; on error I<(void\\ *)\\ -1> is returned, and I<errno> is set to "
10065 "indicate the cause of the error."
10066 msgstr ""
10067 "B<shmat>()  は、成功した場合、 付加された共有メモリ・セグメントのアドレスを返"
10068 "す。 エラーの場合、 I<(void\\ *)\\ -1> を返し、 I<errno> にエラーの原因を示す"
10069 "値を設定する。"
10070
10071 #. type: Plain text
10072 #: build/C/man2/shmop.2:185
10073 msgid ""
10074 "On success B<shmdt>()  returns 0; on error -1 is returned, and I<errno> is "
10075 "set to indicate the cause of the error."
10076 msgstr ""
10077 "B<shmdt>()  は、成功すると 0 を返す。 エラーの場合、-1 を返し、 I<errno> にエ"
10078 "ラーの原因を示す値を設定する。"
10079
10080 #. type: Plain text
10081 #: build/C/man2/shmop.2:191
10082 msgid "When B<shmat>()  fails, I<errno> is set to one of the following:"
10083 msgstr ""
10084 "B<shmat>()  が失敗した場合、 I<errno> に以下の値のどれかを設定して返す:"
10085
10086 #. type: Plain text
10087 #: build/C/man2/shmop.2:197
10088 msgid ""
10089 "The calling process does not have the required permissions for the requested "
10090 "attach type, and does not have the B<CAP_IPC_OWNER> capability."
10091 msgstr ""
10092 "呼び出したプロセスに要求された種類の付加に必要な許可がなく、 "
10093 "B<CAP_IPC_OWNER> ケーパビリティ (capability) がない。"
10094
10095 #. type: Plain text
10096 #: build/C/man2/shmop.2:214
10097 msgid ""
10098 "Invalid I<shmid> value, unaligned (i.e., not page-aligned and B<SHM_RND> was "
10099 "not specified) or invalid I<shmaddr> value, or can't attach segment at "
10100 "I<shmaddr>, or B<SHM_REMAP> was specified and I<shmaddr> was NULL."
10101 msgstr ""
10102 "I<shmid> の値が不正である。 I<shmaddr> の値が境界違反 (unaligned) (つまり、"
10103 "ページ境界に合っておらず、 B<SHM_RND> が指定されていない) または が不正であ"
10104 "る。 I<shmaddr> へのセグメントの付加に失敗した。 または B<SHM_REMAP> が指定さ"
10105 "れているが、 I<shmaddr> が NULL であった。"
10106
10107 #. type: Plain text
10108 #: build/C/man2/shmop.2:217
10109 msgid "Could not allocate memory for the descriptor or for the page tables."
10110 msgstr ""
10111 "ディスクリプター (descriptor) やページ・テーブルのためのメモリを 割り当てるこ"
10112 "とができない。"
10113
10114 #. type: Plain text
10115 #: build/C/man2/shmop.2:223
10116 msgid "When B<shmdt>()  fails, I<errno> is set as follows:"
10117 msgstr "B<shmdt>()  が失敗した場合、 B<EINVAL> は以下のようにセットされる:"
10118
10119 #.  The following since 2.6.17-rc1:
10120 #. type: Plain text
10121 #: build/C/man2/shmop.2:231
10122 msgid ""
10123 "There is no shared memory segment attached at I<shmaddr>; or, I<shmaddr> is "
10124 "not aligned on a page boundary."
10125 msgstr ""
10126 "I<shmaddr> に付加された共有メモリ・セグメントが存在しない。 もしくは、 "
10127 "I<shmaddr> がページ境界に合っていない。"
10128
10129 #. type: Plain text
10130 #: build/C/man2/shmop.2:250
10131 msgid ""
10132 "In SVID 3 (or perhaps earlier)  the type of the I<shmaddr> argument was "
10133 "changed from I<char *> into I<const void *>, and the returned type of "
10134 "B<shmat>()  from I<char *> into I<void *>.  (Linux libc4 and libc5 have the "
10135 "I<char *> prototypes; glibc2 has I<void *>.)"
10136 msgstr ""
10137 "SVID 3 で (たぶんそれより前だと思うが)  I<shmaddr> 引き数の型は I<char *> か"
10138 "ら I<const void *> に、I<shmat>() の返り値の型は I<char *> から I<void *> に"
10139 "変更された (Linux では libc4 と libc5 のプロトタイプは I<char *> であり、"
10140 "glibc2 のプロトタイプは I<void *> である)。"
10141
10142 #. type: Plain text
10143 #: build/C/man2/shmop.2:262
10144 msgid ""
10145 "Using B<shmat>()  with I<shmaddr> equal to NULL is the preferred, portable "
10146 "way of attaching a shared memory segment.  Be aware that the shared memory "
10147 "segment attached in this way may be attached at different addresses in "
10148 "different processes.  Therefore, any pointers maintained within the shared "
10149 "memory must be made relative (typically to the starting address of the "
10150 "segment), rather than absolute."
10151 msgstr ""
10152 "共有メモリセグメントを付加する場合の移植性の高い方法としては、 I<shmaddr> を "
10153 "NULL にして B<shmat>()  を使用するのがよい。 このような方法で付加される共有メ"
10154 "モリセグメントは、 プロセスが異なれば別のアドレスに付加される、という点に注意"
10155 "すること。 よって共有メモリ内で管理されるポインタは、 絶対アドレスではなく、 "
10156 "(一般的にはセグメントの開始アドレスからの)  相対アドレスで作成するべきであ"
10157 "る。"
10158
10159 #. type: Plain text
10160 #: build/C/man2/shmop.2:267
10161 msgid ""
10162 "On Linux, it is possible to attach a shared memory segment even if it is "
10163 "already marked to be deleted.  However, POSIX.1-2001 does not specify this "
10164 "behavior and many other implementations do not support it."
10165 msgstr ""
10166 "Linux では共有メモリセグメントに既に削除マークが付けられていても、 その共有メ"
10167 "モリセグメントを付加することができる。 しかし POSIX.1-2001 ではこのような動作"
10168 "を指定しておらず、 他の多くの実装もこれをサポートしていない。"
10169
10170 #. type: Plain text
10171 #: build/C/man2/shmop.2:270
10172 msgid "The following system parameter affects B<shmat>():"
10173 msgstr "以下のシステム・パラメーターは、 B<shmat>()  に影響する:"
10174
10175 #.  FIXME A good explanation of the rationale for the existence
10176 #.  of SHMLBA would be useful here
10177 #. type: TP
10178 #: build/C/man2/shmop.2:270
10179 #, no-wrap
10180 msgid "B<SHMLBA>"
10181 msgstr "B<SHMLBA>"
10182
10183 #.  FIXME That last sentence isn't true for all Linux
10184 #.  architectures (i.e., SHMLBA != PAGE_SIZE for some architectures)
10185 #.  -- MTK, Nov 04
10186 #. type: Plain text
10187 #: build/C/man2/shmop.2:283
10188 msgid ""
10189 "Segment low boundary address multiple.  Must be page aligned.  For the "
10190 "current implementation the B<SHMLBA> value is B<PAGE_SIZE>."
10191 msgstr ""
10192 "セグメントの境界アドレスの最小倍数。ページ境界に合ってなければならない。 現在"
10193 "の実装では B<SHMLBA> の値は B<PAGE_SIZE> である。"
10194
10195 #. type: Plain text
10196 #: build/C/man2/shmop.2:287
10197 msgid ""
10198 "The implementation places no intrinsic limit on the per-process maximum "
10199 "number of shared memory segments (B<SHMSEG>)."
10200 msgstr ""
10201 "現在の実装では、プロセスごとの 共有メモリ・セグメントの最大数 (B<SHMSEG>)  に"
10202 "関する実装依存の制限はない。"
10203
10204 #. type: Plain text
10205 #: build/C/man2/shmop.2:295
10206 msgid ""
10207 "B<brk>(2), B<mmap>(2), B<shmctl>(2), B<shmget>(2), B<capabilities>(7), "
10208 "B<shm_overview>(7), B<svipc>(7)"
10209 msgstr ""
10210 "B<brk>(2), B<mmap>(2), B<shmctl>(2), B<shmget>(2), B<capabilities>(7), "
10211 "B<shm_overview>(7), B<svipc>(7)"
10212
10213 #. type: TH
10214 #: build/C/man2/subpage_prot.2:30
10215 #, no-wrap
10216 msgid "SUBPAGE_PROT"
10217 msgstr "SUBPAGE_PROT"
10218
10219 #. type: TH
10220 #: build/C/man2/subpage_prot.2:30
10221 #, no-wrap
10222 msgid "2012-07-13"
10223 msgstr "2012-07-13"
10224
10225 #. type: Plain text
10226 #: build/C/man2/subpage_prot.2:33
10227 msgid "subpage_prot - define a subpage protection for an address range"
10228 msgstr ""
10229
10230 #. type: Plain text
10231 #: build/C/man2/subpage_prot.2:37
10232 #, no-wrap
10233 msgid ""
10234 "B<long subpage_prot(unsigned long >I<addr>B<, unsigned long >I<len>B<,>\n"
10235 "B<                  uint32_t *>I<map>B<);>\n"
10236 msgstr ""
10237 "B<long subpage_prot(unsigned long >I<addr>B<, unsigned long >I<len>B<,>\n"
10238 "B<                  uint32_t *>I<map>B<);>\n"
10239
10240 #. type: Plain text
10241 #: build/C/man2/subpage_prot.2:41
10242 msgid "I<Note>: There is no glibc wrapper for this system call; see NOTES."
10243 msgstr ""
10244 "I<注>: このシステムコールには glibc のラッパー関数は存在しない。「注意」の節"
10245 "を参照。"
10246
10247 #. type: Plain text
10248 #: build/C/man2/subpage_prot.2:47
10249 msgid ""
10250 "The PowerPC-specific B<subpage_prot>()  system call provides the facility to "
10251 "control the access permissions on individual 4kB subpages on systems "
10252 "configured with a page size of 64kB."
10253 msgstr ""
10254
10255 #. type: Plain text
10256 #: build/C/man2/subpage_prot.2:54
10257 msgid ""
10258 "The protection map is applied to the memory pages in the region starting at "
10259 "I<addr> and continuing for I<len> bytes.  Both of these arguments must be "
10260 "aligned to a 64-kB boundary."
10261 msgstr ""
10262
10263 #. type: Plain text
10264 #: build/C/man2/subpage_prot.2:66
10265 msgid ""
10266 "The protection map is specified in the buffer pointed to by I<map>.  The map "
10267 "has 2 bits per 4kB subpage; thus each 32-bit word specifies the protections "
10268 "of 16 4kB subpages inside a 64kB page (so, the number of 32-bit words "
10269 "pointed to by I<map> should equate to the number of 64-kB pages specified by "
10270 "I<len>).  Each 2-bit field in the protection map is either 0 to allow any "
10271 "access, 1 to prevent writes, or 2 or 3 to prevent all accesses."
10272 msgstr ""
10273
10274 #. type: Plain text
10275 #: build/C/man2/subpage_prot.2:71
10276 msgid ""
10277 "On success, B<subpage_prot>()  returns 0.  Otherwise, one of the error codes "
10278 "specified below is returned."
10279 msgstr ""
10280
10281 #. type: Plain text
10282 #: build/C/man2/subpage_prot.2:77
10283 msgid "The buffer referred to by I<map> is not accessible."
10284 msgstr ""
10285
10286 #. type: Plain text
10287 #: build/C/man2/subpage_prot.2:87
10288 msgid ""
10289 "The I<addr> or I<len> arguments are incorrect.  Both of these arguments must "
10290 "be aligned to a multiple of the system page size, and they must not refer to "
10291 "a region outside of the address space of the process or to a region that "
10292 "consists of huge pages."
10293 msgstr ""
10294
10295 #. type: Plain text
10296 #: build/C/man2/subpage_prot.2:90 build/C/man2/sync_file_range.2:166
10297 msgid "Out of memory."
10298 msgstr "メモリ不足である。"
10299
10300 #. type: Plain text
10301 #: build/C/man2/subpage_prot.2:96
10302 msgid ""
10303 "This system call is provided on the PowerPC architecture since Linux "
10304 "2.6.25.  The system call is provided only if the kernel is configured with "
10305 "B<CONFIG_PPC_64K_PAGES>.  No library support is provided."
10306 msgstr ""
10307
10308 #. type: Plain text
10309 #: build/C/man2/subpage_prot.2:101
10310 msgid ""
10311 "Glibc does not provide a wrapper for this system call; call it using "
10312 "B<syscall>(2)."
10313 msgstr ""
10314
10315 #. type: Plain text
10316 #: build/C/man2/subpage_prot.2:106
10317 msgid ""
10318 "Normal page protections (at the 64-kB page level) also apply; the subpage "
10319 "protection mechanism is an additional constraint, so putting 0 in a 2-bit "
10320 "field won't allow writes to a page that is otherwise write-protected."
10321 msgstr ""
10322
10323 #. type: SS
10324 #: build/C/man2/subpage_prot.2:106
10325 #, no-wrap
10326 msgid "Rationale"
10327 msgstr ""
10328
10329 #.  In the initial implementation, it was the case that:
10330 #.      In fact the whole process is switched to use 4k hardware pages when the
10331 #.      subpage_prot system call is used, but this could be improved in future
10332 #.      to switch only the affected segments.
10333 #.  But Paul Mackerass says (Oct 2010): I'm pretty sure we now only switch
10334 #.  the affected segment, not the whole process.
10335 #. type: Plain text
10336 #: build/C/man2/subpage_prot.2:128
10337 msgid ""
10338 "This system call is provided to assist writing emulators that operate using "
10339 "64-kB pages on PowerPC systems.  When emulating systems such as x86, which "
10340 "uses a smaller page size, the emulator can no longer use the memory-"
10341 "management unit (MMU)  and normal system calls for controlling page "
10342 "protections.  (The emulator could emulate the MMU by checking and possibly "
10343 "remapping the address for each memory access in software, but that is "
10344 "slow.)  The idea is that the emulator supplies an array of protection masks "
10345 "to apply to a specified range of virtual addresses.  These masks are applied "
10346 "at the level where hardware page-table entries (PTEs)  are inserted into the "
10347 "hardware page table based on the Linux PTEs, so the Linux PTEs are not "
10348 "affected.  Implicit in this is that the regions of the address space that "
10349 "are protected are switched to use 4-kB hardware pages rather than 64-kB "
10350 "hardware pages (on machines with hardware 64-kB page support)."
10351 msgstr ""
10352
10353 #. type: Plain text
10354 #: build/C/man2/subpage_prot.2:131
10355 msgid "B<mprotect>(2), B<syscall>(2)"
10356 msgstr "B<mprotect>(2), B<syscall>(2)"
10357
10358 #. type: Plain text
10359 #: build/C/man2/subpage_prot.2:134
10360 msgid "I<Documentation/vm/hugetlbpage.txt> in the Linux kernel source tree"
10361 msgstr ""
10362
10363 #. type: TH
10364 #: build/C/man2/sync_file_range.2:30
10365 #, no-wrap
10366 msgid "SYNC_FILE_RANGE"
10367 msgstr "SYNC_FILE_RANGE"
10368
10369 #. type: Plain text
10370 #: build/C/man2/sync_file_range.2:33
10371 msgid "sync_file_range - sync a file segment with disk"
10372 msgstr "sync_file_range - ファイルセグメントをディスクと同期する"
10373
10374 #. type: Plain text
10375 #: build/C/man2/sync_file_range.2:37
10376 #, no-wrap
10377 msgid ""
10378 "B<#define _GNU_SOURCE>         /* See feature_test_macros(7) */\n"
10379 "B<#include E<lt>fcntl.hE<gt>>\n"
10380 msgstr ""
10381 "B<#define _GNU_SOURCE>         /* feature_test_macros(7) 参照 */\n"
10382 "B<#include E<lt>fcntl.hE<gt>>\n"
10383
10384 #. type: Plain text
10385 #: build/C/man2/sync_file_range.2:40
10386 #, no-wrap
10387 msgid ""
10388 "B<int sync_file_range(int >I<fd>B<, off64_t >I<offset>B<, off64_t >I<nbytes>B<,>\n"
10389 "B<                    unsigned int >I<flags>B<);>\n"
10390 msgstr ""
10391 "B<int sync_file_range(int >I<fd>B<, off64_t >I<offset>B<, off64_t >I<nbytes>B<,>\n"
10392 "B<                    unsigned int >I<flags>B<);>\n"
10393
10394 #. type: Plain text
10395 #: build/C/man2/sync_file_range.2:47
10396 msgid ""
10397 "B<sync_file_range>()  permits fine control when synchronizing the open file "
10398 "referred to by the file descriptor I<fd> with disk."
10399 msgstr ""
10400 "B<sync_file_range>()  を使うと、ファイルディスクリプタ I<fd> で参照されるオー"
10401 "プンされたファイルのディスクとの同期に関して、 きめ細かな制御が可能となる。"
10402
10403 #. type: Plain text
10404 #: build/C/man2/sync_file_range.2:61
10405 msgid ""
10406 "I<offset> is the starting byte of the file range to be synchronized.  "
10407 "I<nbytes> specifies the length of the range to be synchronized, in bytes; if "
10408 "I<nbytes> is zero, then all bytes from I<offset> through to the end of file "
10409 "are synchronized.  Synchronization is in units of the system page size: "
10410 "I<offset> is rounded down to a page boundary; I<(offset+nbytes-1)> is "
10411 "rounded up to a page boundary."
10412 msgstr ""
10413 "I<offset> は、同期を行うファイルの領域の開始バイトである。 I<nbytes> には同期"
10414 "を行う領域の長さをバイト単位で指定する。 I<nbytes> が 0 の場合は、 I<offset> "
10415 "からファイル末尾までの全バイトを同期する。 同期はシステムのページサイズの単位"
10416 "で行われる。 I<offset> はページ境界にあわせて切り下げられ、 I<(offset"
10417 "+nbytes-1)> はページ境界にあわせて切り上げられる。"
10418
10419 #. type: Plain text
10420 #: build/C/man2/sync_file_range.2:65
10421 msgid "The I<flags> bit-mask argument can include any of the following values:"
10422 msgstr "ビットマスク引き数 I<flags> には以下の値を指定することができる:"
10423
10424 #. type: TP
10425 #: build/C/man2/sync_file_range.2:65
10426 #, no-wrap
10427 msgid "B<SYNC_FILE_RANGE_WAIT_BEFORE>"
10428 msgstr "B<SYNC_FILE_RANGE_WAIT_BEFORE>"
10429
10430 #. type: Plain text
10431 #: build/C/man2/sync_file_range.2:70
10432 msgid ""
10433 "Wait upon write-out of all pages in the specified range that have already "
10434 "been submitted to the device driver for write-out before performing any "
10435 "write."
10436 msgstr ""
10437 "何らかの書き込みを行う前に、指定された領域のページで 書き出しを行うようにデバ"
10438 "イスドライバにすでに要求が発行されている ページの書き出しが全て完了するのを待"
10439 "つ。"
10440
10441 #. type: TP
10442 #: build/C/man2/sync_file_range.2:70 build/C/man2/sync_file_range.2:120
10443 #, no-wrap
10444 msgid "B<SYNC_FILE_RANGE_WRITE>"
10445 msgstr "B<SYNC_FILE_RANGE_WRITE>"
10446
10447 #. type: Plain text
10448 #: build/C/man2/sync_file_range.2:76
10449 msgid ""
10450 "Initiate write-out of all dirty pages in the specified range which are not "
10451 "presently submitted write-out.  Note that even this may block if you attempt "
10452 "to write more than request queue size."
10453 msgstr ""
10454 "指定された領域のページで、書き出し要求が発行されていない 全ての dirty (キャッ"
10455 "シュだけが変更されている) ページの 書き出しを開始する。 リクエストキューの大"
10456 "きさより多く書き込もうとした場合には、 この処理は停止 (block) する可能性があ"
10457 "る点に注意すること。"
10458
10459 #. type: TP
10460 #: build/C/man2/sync_file_range.2:76
10461 #, no-wrap
10462 msgid "B<SYNC_FILE_RANGE_WAIT_AFTER>"
10463 msgstr "B<SYNC_FILE_RANGE_WAIT_AFTER>"
10464
10465 #. type: Plain text
10466 #: build/C/man2/sync_file_range.2:80
10467 msgid ""
10468 "Wait upon write-out of all pages in the range after performing any write."
10469 msgstr ""
10470 "何らかの書き込み後に、指定された領域の全てのページの 書き出しが行われるのを待"
10471 "つ。"
10472
10473 #. type: Plain text
10474 #: build/C/man2/sync_file_range.2:84
10475 msgid "Specifying I<flags> as 0 is permitted, as a no-op."
10476 msgstr "I<flags> に 0 を指定した場合、何もしないことを表す。"
10477
10478 #. type: SS
10479 #: build/C/man2/sync_file_range.2:84
10480 #, no-wrap
10481 msgid "Warning"
10482 msgstr "警告"
10483
10484 #. type: Plain text
10485 #: build/C/man2/sync_file_range.2:100
10486 msgid ""
10487 "This system call is extremely dangerous and should not be used in portable "
10488 "programs.  None of these operations writes out the file's metadata.  "
10489 "Therefore, unless the application is strictly performing overwrites of "
10490 "already-instantiated disk blocks, there are no guarantees that the data will "
10491 "be available after a crash.  There is no user interface to know if a write "
10492 "is purely an overwrite.  On file systems using copy-on-write semantics (e."
10493 "g., I<btrfs>)  an overwrite of existing allocated blocks is impossible.  "
10494 "When writing into preallocated space, many file systems also require calls "
10495 "into the block allocator, which this system call does not sync out to disk.  "
10496 "This system call does not flush disk write caches and thus does not provide "
10497 "any data integrity on systems with volatile disk write caches."
10498 msgstr ""
10499 "このシステムコールは非常に危険であり、 移植性が必要なプログラムで使用すべきで"
10500 "はない。 これらの操作ではどれもファイルのメタデータの書き出しを行わない。 し"
10501 "たがって、アプリケーションにより作成済みのディスクブロックの 上書きの実行が確"
10502 "実に行われない限り、クラッシュの後でもデータが 利用できる保証はない。 書き込"
10503 "みが上書きだけであるかを知るためのユーザインタフェースは存在しない。 "
10504 "(I<btrfs> などの) copy-on-write 動作を使ったファイルシステムでは、 既存の割り"
10505 "当て済みのブロックに対する上書き自体ができない。 前もって割り当てられた領域に"
10506 "書き込みを行う場合、 多くのファイルシステムでは block allocator への書き込み"
10507 "も必要となるが、 このシステムコールは block allocator のディスクへの同期を行"
10508 "わない。 このシステムコールはディスク書き込みキャッシュのフラッシュを 行わな"
10509 "いので、揮発性のディスク書き込みキャッシュを使ったシステムでは このシステム"
10510 "コールではデータの一貫性を確保できないことになる。"
10511
10512 #. type: SS
10513 #: build/C/man2/sync_file_range.2:100
10514 #, no-wrap
10515 msgid "Some details"
10516 msgstr "詳細"
10517
10518 #. type: Plain text
10519 #: build/C/man2/sync_file_range.2:108
10520 msgid ""
10521 "B<SYNC_FILE_RANGE_WAIT_BEFORE> and B<SYNC_FILE_RANGE_WAIT_AFTER> will detect "
10522 "any I/O errors or B<ENOSPC> conditions and will return these to the caller."
10523 msgstr ""
10524 "B<SYNC_FILE_RANGE_WAIT_BEFORE> と B<SYNC_FILE_RANGE_WAIT_AFTER> は I/O エラー"
10525 "や B<ENOSPC> 状態を検出し、呼び出し元にこれらの情報を返す。"
10526
10527 #. type: Plain text
10528 #: build/C/man2/sync_file_range.2:112
10529 msgid "Useful combinations of the I<flags> bits are:"
10530 msgstr "I<flags> の役に立つビットの組み合わせを以下に示す:"
10531
10532 #. type: TP
10533 #: build/C/man2/sync_file_range.2:112
10534 #, no-wrap
10535 msgid "B<SYNC_FILE_RANGE_WAIT_BEFORE | SYNC_FILE_RANGE_WRITE>"
10536 msgstr "B<SYNC_FILE_RANGE_WAIT_BEFORE | SYNC_FILE_RANGE_WRITE>"
10537
10538 #. type: Plain text
10539 #: build/C/man2/sync_file_range.2:120
10540 msgid ""
10541 "Ensures that all pages in the specified range which were dirty when "
10542 "B<sync_file_range>()  was called are placed under write-out.  This is a "
10543 "start-write-for-data-integrity operation."
10544 msgstr ""
10545 "指定された範囲内のページで、 B<sync_file_range>()  が呼び出された際に dirty "
10546 "であった全てのページが、 確実に書き出し対象となるようにする。 これは、start-"
10547 "write-for-data-integrity 操作 (データ完全性確保のための書き込み開始の操作) で"
10548 "ある。"
10549
10550 #. type: Plain text
10551 #: build/C/man2/sync_file_range.2:127
10552 msgid ""
10553 "Start write-out of all dirty pages in the specified range which are not "
10554 "presently under write-out.  This is an asynchronous flush-to-disk "
10555 "operation.  This is not suitable for data integrity operations."
10556 msgstr ""
10557 "指定された範囲内のページで、現在書き出し中でない全ての dirty ページの 書き出"
10558 "しを開始する。これは非同期のディスクへのフラッシュ (flush-to-disk)  操作であ"
10559 "る。データ完全性確保が必要な操作としては適切ではない。"
10560
10561 #. type: TP
10562 #: build/C/man2/sync_file_range.2:127
10563 #, no-wrap
10564 msgid "B<SYNC_FILE_RANGE_WAIT_BEFORE> (or B<SYNC_FILE_RANGE_WAIT_AFTER>)"
10565 msgstr "B<SYNC_FILE_RANGE_WAIT_BEFORE> (or B<SYNC_FILE_RANGE_WAIT_AFTER>)"
10566
10567 #. type: Plain text
10568 #: build/C/man2/sync_file_range.2:134
10569 msgid ""
10570 "Wait for completion of write-out of all pages in the specified range.  This "
10571 "can be used after an earlier B<SYNC_FILE_RANGE_WAIT_BEFORE | "
10572 "SYNC_FILE_RANGE_WRITE> operation to wait for completion of that operation, "
10573 "and obtain its result."
10574 msgstr ""
10575 "指定された範囲内の全てのページの書き出しの完了を待つ。 このフラグは、前に行わ"
10576 "れた操作 B<SYNC_FILE_RANGE_WAIT_BEFORE | SYNC_FILE_RANGE_WRITE> の後に使用で"
10577 "き、この操作の完了を待ち、結果を取得することができる。"
10578
10579 #. type: TP
10580 #: build/C/man2/sync_file_range.2:134
10581 #, no-wrap
10582 msgid "B<SYNC_FILE_RANGE_WAIT_BEFORE | SYNC_FILE_RANGE_WRITE | SYNC_FILE_RANGE_WAIT_AFTER>"
10583 msgstr "B<SYNC_FILE_RANGE_WAIT_BEFORE | SYNC_FILE_RANGE_WRITE | SYNC_FILE_RANGE_WAIT_AFTER>"
10584
10585 #. type: Plain text
10586 #: build/C/man2/sync_file_range.2:141
10587 msgid ""
10588 "This is a write-for-data-integrity operation that will ensure that all pages "
10589 "in the specified range which were dirty when B<sync_file_range>()  was "
10590 "called are committed to disk."
10591 msgstr ""
10592 "これは write-for-data-integrity 操作 (データ完全性確保のための書き込み) であ"
10593 "り、指定された範囲内の、 B<sync_file_range>()  が呼ばれた時点で dirty な全て"
10594 "のページが ディスクに格納されることが保証される。"
10595
10596 #. type: Plain text
10597 #: build/C/man2/sync_file_range.2:147
10598 msgid ""
10599 "On success, B<sync_file_range>()  returns 0; on failure -1 is returned and "
10600 "I<errno> is set to indicate the error."
10601 msgstr ""
10602 "成功の場合、 B<sync_file_range>()  は 0 を返す。失敗の場合、-1 を返し、 "
10603 "I<error> にエラーを示す値を設定する。"
10604
10605 #. type: Plain text
10606 #: build/C/man2/sync_file_range.2:152
10607 msgid "I<fd> is not a valid file descriptor."
10608 msgstr "I<fd> が有効なファイルディスクリプタではない。"
10609
10610 #. type: Plain text
10611 #: build/C/man2/sync_file_range.2:160
10612 msgid ""
10613 "I<flags> specifies an invalid bit; or I<offset> or I<nbytes> is invalid."
10614 msgstr ""
10615 "I<flags> に不正なビットが指定されている。または I<offset> か I<nbytes> が不正"
10616 "である。"
10617
10618 #. type: Plain text
10619 #: build/C/man2/sync_file_range.2:163
10620 msgid "I/O error."
10621 msgstr "I/O エラー。"
10622
10623 #. type: Plain text
10624 #: build/C/man2/sync_file_range.2:169
10625 msgid "Out of disk space."
10626 msgstr "ディスク領域不足である。"
10627
10628 #.  FIXME . (bug?) Actually, how can 'fd' refer to a symbolic link (S_ISLNK)?
10629 #.  (In user space at least) it isn't possible to obtain a file descriptor
10630 #.  for a symbolic link.
10631 #. type: Plain text
10632 #: build/C/man2/sync_file_range.2:177
10633 msgid ""
10634 "I<fd> refers to something other than a regular file, a block device, a "
10635 "directory, or a symbolic link."
10636 msgstr ""
10637 "I<fd> が、通常のファイル、ブロックデバイス、ディレクトリ、シンボリックリンク "
10638 "以外のものを指している。"
10639
10640 #. type: Plain text
10641 #: build/C/man2/sync_file_range.2:180
10642 msgid "B<sync_file_range>()  appeared on Linux in kernel 2.6.17."
10643 msgstr "B<sync_file_range>()  はカーネル 2.6.17 で Linux に登場した。"
10644
10645 #. type: Plain text
10646 #: build/C/man2/sync_file_range.2:183
10647 msgid ""
10648 "This system call is Linux-specific, and should be avoided in portable "
10649 "programs."
10650 msgstr ""
10651 "このシステムコールは Linux 独自であり、 移植性が必要なプログラムでは使用を避"
10652 "けるべきである。"
10653
10654 #.  See kernel commit edd5cd4a9424f22b0fa08bef5e299d41befd5622
10655 #. type: Plain text
10656 #: build/C/man2/sync_file_range.2:200
10657 #, fuzzy
10658 #| msgid ""
10659 #| "Some architectures (e.g., PowerPC, ARM)  need 64-bit arguments to be "
10660 #| "aligned in a suitable pair of registers.  On such architectures, the call "
10661 #| "signature of B<sync_file_range>()  is flawed, since it forces a register "
10662 #| "to be wasted as padding between the I<fd> and I<offset> arguments.  "
10663 #| "Therefore, these architectures define a different system call that orders "
10664 #| "the arguments suitably:"
10665 msgid ""
10666 "Some architectures (e.g., PowerPC, ARM)  need 64-bit arguments to be aligned "
10667 "in a suitable pair of registers.  On such architectures, the call signature "
10668 "of B<sync_file_range>()  shown in the SYNOPSIS would force a register to be "
10669 "wasted as padding between the I<fd> and I<offset> arguments.  (See B<syscall>"
10670 "(2)  for details.)  Therefore, these architectures define a different system "
10671 "call that orders the arguments suitably:"
10672 msgstr ""
10673 "いくつかのアーキテクチャ (例えば、 PowerPC や ARM) では、 64 ビットの\n"
10674 "引き数は適切なレジスタの組に割り当てる必要がある。このようなアーキテク\n"
10675 "チャでは、 B<sync_file_range>() の呼び出し方には欠陥があり、それはこの\n"
10676 "システムコールでは引き数 I<fd> と I<offset> の間のパディング (詰めもの)\n"
10677 "でレジスタが一つ消費されてしまうというものである。そのため、これらの\n"
10678 "アーキテクチャでは引き数が適切な順序になった別のシステムコールが定義\n"
10679 "されている。"
10680
10681 #. type: Plain text
10682 #: build/C/man2/sync_file_range.2:205
10683 #, no-wrap
10684 msgid ""
10685 "B<int sync_file_range2(int >I<fd>B<, unsigned int >I<flags>B<,>\n"
10686 "B<                     off64_t >I<offset>B<, off64_t >I<nbytes>B<);>\n"
10687 msgstr ""
10688 "B<int sync_file_range2(int >I<fd>B<, unsigned int >I<flags>B<,>\n"
10689 "B<                     off64_t >I<offset>B<, off64_t >I<nbytes>B<);>\n"
10690
10691 #. type: Plain text
10692 #: build/C/man2/sync_file_range.2:210
10693 msgid ""
10694 "The behavior of this system call is otherwise exactly the same as "
10695 "B<sync_file_range>()."
10696 msgstr ""
10697 "上記の点以外は、このシステムコールの動作は B<sync_file_range>() と\n"
10698 "全く同じである。このシステムコールに対するライブラリによるサポートは\n"
10699 "glibc では提供されていない。"
10700
10701 #. type: Plain text
10702 #: build/C/man2/sync_file_range.2:221
10703 msgid ""
10704 "A system call with this signature first appeared on the ARM architecture in "
10705 "Linux 2.6.20, with the name B<arm_sync_file_range>().  It was renamed in "
10706 "Linux 2.6.22, when the analogous system call was added for PowerPC.  On "
10707 "architectures where glibc support is provided, glibc transparently wraps "
10708 "B<sync_file_range2>()  under the name B<sync_file_range>()."
10709 msgstr ""
10710 "このバージョンのシステムコールは、Linux 2.6.20 で ARM アーキテクチャで\n"
10711 "初めて登場し、 B<arm_sync_file_range>() という名前であった。\n"
10712 "Linux 2.6.22 で、同様のシステムコールが PowerPC 用に追加された際に、\n"
10713 "システムコールの名前が変更された。\n"
10714 "glibc によるサポートが提供されているアーキテクチャでは、\n"
10715 "glibc のラッパー関数は B<sync_file_range>() という名前で\n"
10716 "B<sync_file_range2>() を適切に使用するようになっている。"
10717
10718 #. type: Plain text
10719 #: build/C/man2/sync_file_range.2:226
10720 msgid "B<fdatasync>(2), B<fsync>(2), B<msync>(2), B<sync>(2)"
10721 msgstr "B<fdatasync>(2), B<fsync>(2), B<msync>(2), B<sync>(2)"
10722
10723 #~ msgid "2013-02-25"
10724 #~ msgstr "2013-02-25"
10725
10726 #~ msgid "2010-10-09"
10727 #~ msgstr "2010-10-09"
10728
10729 #~ msgid "arm_fadvise()"
10730 #~ msgstr "arm_fadvise()"
10731
10732 #~ msgid ""
10733 #~ "The ARM architecture needs 64-bit arguments to be aligned in a suitable "
10734 #~ "pair of registers.  On this architecture, the call signature of "
10735 #~ "B<posix_fadvise>()  is flawed, since it forces a register to be wasted as "
10736 #~ "padding between the I<fd> and I<len> arguments.  Therefore, since Linux "
10737 #~ "2.6.14, ARM defines a different system call that orders the arguments "
10738 #~ "suitably:"
10739 #~ msgstr ""
10740 #~ "ARM アーキテクチャでは、64 ビットの引き数は適切なレジスタの組に割り当て\n"
10741 #~ "る必要がある。このアーキテクチャでは、B<posix_fadvise>() の呼び出し方に\n"
10742 #~ "は欠陥があり、それはこのシステムコールでは引き数 I<fd> と I<len> の間の\n"
10743 #~ "パディング (詰めもの) でレジスタが一つ消費されてしまうというものである。\n"
10744 #~ "そのため、Linux 2.6.14 以降では、ARM では引き数が適切な順序になった別の\n"
10745 #~ "システムコールが定義されている。"
10746
10747 #~ msgid ""
10748 #~ "The behavior of this system call is otherwise exactly the same as "
10749 #~ "B<posix_fadvise>().  No library support is provided for this system call "
10750 #~ "in glibc."
10751 #~ msgstr ""
10752 #~ "上記の点以外は、このシステムコールの動作は B<posix_fadvise>() と全く\n"
10753 #~ "同じである。このシステムコールに対するライブラリによるサポートは glibc\n"
10754 #~ "では提供されていない。"
10755
10756 #~ msgid "2011-09-08"
10757 #~ msgstr "2011-09-08"
10758
10759 #~ msgid "2010-09-20"
10760 #~ msgstr "2010-09-20"
10761
10762 #~ msgid "2008-08-07"
10763 #~ msgstr "2008-08-07"
10764
10765 #~ msgid "2006-05-02"
10766 #~ msgstr "2006-05-02"
10767
10768 #~ msgid "2008-06-03"
10769 #~ msgstr "2008-06-03"
10770
10771 #~ msgid "2010-10-30"
10772 #~ msgstr "2010-10-30"
10773
10774 #~ msgid "the kernel source file I<Documentation/vm/hugetlbpage.txt>."
10775 #~ msgstr "カーネルソースファイルの I<Documentation/vm/hugetlbpage.txt>"
10776
10777 #~ msgid ""
10778 #~ "The I<mode> is not supported by the file system containing the file "
10779 #~ "referred to by I<fd>."
10780 #~ msgstr ""
10781 #~ "I<fd> が参照するファイルを含むファイルシステムが I<mode> をサポートしてい"
10782 #~ "ない。"
10783
10784 #~ msgid ""
10785 #~ "The function B<mtrace>()  installs handlers for B<malloc>(3), B<realloc>"
10786 #~ "(3)  and B<free>(3).  The function B<muntrace>()  disables these handlers."
10787 #~ msgstr ""
10788 #~ "関数 B<mtrace>()  は、 B<malloc>(3), B<realloc>(3), B<free>(3)  のハンドラ"
10789 #~ "を組み込む。 関数 B<muntrace>()  はこれらのハンドラを解除する。"
10790
10791 #~ msgid ""
10792 #~ "The environment variable B<MALLOC_TRACE> defines a file where B<mtrace>"
10793 #~ "()  writes its output.  This file must be writable to the user or "
10794 #~ "B<mtrace>()  will do nothing.  If the file is not empty it will be "
10795 #~ "truncated."
10796 #~ msgstr ""
10797 #~ "環境変数 B<MALLOC_TRACE> は B<mtrace>()  が出力を書き出すファイルを指定す"
10798 #~ "る。 ユーザが書き込み権限を持つファイルを指定しなければならない。 書き込み"
10799 #~ "権限がない場合、 B<mtrace>()  は何もしない。 ファイルが空でない場合、ファ"
10800 #~ "イルの元の内容を上書きする。"
10801
10802 #~ msgid "These are GNU extensions."
10803 #~ msgstr "この関数は GNU 拡張である。"
10804
10805 #~ msgid ""
10806 #~ "The output of B<mtrace>()  will be ASCII but not in a friendly format.  "
10807 #~ "So glibc comes with a perl-script called mtrace to make sense of it."
10808 #~ msgstr ""
10809 #~ "B<mtrace>()  の出力は ASCII 形式だが、人が読みやすいフォーマットではな"
10810 #~ "い。 そこで、glibc には mtrace 出力を分かりやすい形式に変換する perl スク"
10811 #~ "リプトが付属している。"
10812
10813 #~ msgid ""
10814 #~ "This flag allocates and initializes to zero the disk space within the "
10815 #~ "range specified by I<offset> and I<len>.  After a successful call, "
10816 #~ "subsequent writes into this range are guaranteed not to fail because of "
10817 #~ "lack of disk space.  Preallocating zeroed blocks beyond the end of the "
10818 #~ "file is useful for optimizing append workloads.  Preallocating blocks "
10819 #~ "does not change the file size (as reported by B<stat>(2))  even if it is "
10820 #~ "less than I<offset>+I<len>."
10821 #~ msgstr ""
10822 #~ "このフラグは、 I<offset> と I<len> で指定された領域のディスク空間を割り当"
10823 #~ "て、その空間を 0 で初期化する。 呼び出しが成功すると、それに続いてこの領域"
10824 #~ "への書き込みが行われるが、 ディスク空間の不足による書き込み失敗が発生しな"
10825 #~ "いことが保証される。 ファイル末尾より後ろの領域について 0 で埋めたブロック"
10826 #~ "を前もって 割り当てておくことは、追記 (append) の作業負荷を最適化するのに "
10827 #~ "有用である。 ファイルサイズが I<offset>+I<len> よりも小さい場合であって"
10828 #~ "も、ブロックの前もっての割り当てにより (B<stat>(2)  が返す) ファイルサイズ"
10829 #~ "は変更されることはない。"
10830
10831 #~ msgid ""
10832 #~ "(Linux 2.6.9 and later) the caller was not privileged (B<CAP_IPC_LOCK>)  "
10833 #~ "and its B<RLIMIT_MEMLOCK> soft resource limit was 0."
10834 #~ msgstr ""
10835 #~ "(Linux 2.6.9 以降) 呼び出し元は特権 (B<CAP_IPC_LOCK>)  を持たず、ソフト資"
10836 #~ "源制限 B<RLIMIT_MEMLOCK> が 0 である。"
10837
10838 #~ msgid ""
10839 #~ "(Linux 2.6.8 and earlier)  The calling process has insufficient privilege "
10840 #~ "to call B<munlockall>().  Under Linux the B<CAP_IPC_LOCK> capability is "
10841 #~ "required."
10842 #~ msgstr ""
10843 #~ "(Linux 2.6.8 以前)  呼び出し元プロセスが B<munlockall>()  を呼び出すのに必"
10844 #~ "要な特権を所有していなかった。 Linux では、 B<CAP_IPC_LOCK> ケーパビリティ"
10845 #~ "が必要である。"
10846
10847 #~ msgid ""
10848 #~ "B<posix_fadvise>()  appeared in kernel 2.5.60.  Glibc support has been "
10849 #~ "provided since version 2.2."
10850 #~ msgstr ""
10851 #~ "B<posix_fadvise>()  はカーネル 2.5.60 で登場した。 glibc でのサポートは "
10852 #~ "glibc バージョン 2.2 以降で行われている。"