OSDN Git Service

(split) LDP: Update POT and ja.po to LDP v3.54
[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-09-28 04:05+0900\n"
10 "PO-Revision-Date: 2013-08-15 20:31+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:142 build/C/man2/readahead.2:65
248 #: build/C/man2/remap_file_pages.2:124 build/C/man3/shm_open.3:171
249 #: build/C/man2/shmctl.2:279 build/C/man2/shmget.2:180
250 #: build/C/man2/shmop.2:171 build/C/man2/subpage_prot.2:66
251 #: build/C/man2/sync_file_range.2:141
252 #, no-wrap
253 msgid "RETURN VALUE"
254 msgstr "返り値"
255
256 #. type: Plain text
257 #: build/C/man2/alloc_hugepages.2:118
258 msgid ""
259 "On success, B<alloc_hugepages>()  returns the allocated virtual address, and "
260 "B<free_hugepages>()  returns zero.  On error, -1 is returned, and I<errno> "
261 "is set appropriately."
262 msgstr ""
263 "成功した場合、 B<alloc_hugepages>()  は割り当てられた仮想アドレスを返し、 "
264 "B<free_hugepages>()  は 0 を返す。 失敗した場合、-1 を返し、 I<errno> が適切"
265 "に設定される。"
266
267 #. type: SH
268 #: build/C/man2/alloc_hugepages.2:118 build/C/man2/cacheflush.2:59
269 #: build/C/man2/fallocate.2:119 build/C/man2/madvise.2:275
270 #: build/C/man3/malloc_info.3:55 build/C/man3/malloc_trim.3:56
271 #: build/C/man3/mallopt.3:384 build/C/man2/mlock.2:122 build/C/man2/mmap.2:392
272 #: build/C/man2/mmap2.2:61 build/C/man2/mprotect.2:85
273 #: build/C/man2/mremap.2:135 build/C/man2/msync.2:73
274 #: build/C/man2/posix_fadvise.2:90 build/C/man3/posix_fallocate.3:72
275 #: build/C/man3/posix_memalign.3:157 build/C/man2/readahead.2:71
276 #: build/C/man2/remap_file_pages.2:131 build/C/man3/shm_open.3:180
277 #: build/C/man2/shmctl.2:301 build/C/man2/shmget.2:185
278 #: build/C/man2/shmop.2:185 build/C/man2/subpage_prot.2:71
279 #: build/C/man2/sync_file_range.2:147
280 #, no-wrap
281 msgid "ERRORS"
282 msgstr "エラー"
283
284 #. type: TP
285 #: build/C/man2/alloc_hugepages.2:119 build/C/man2/fallocate.2:158
286 #, no-wrap
287 msgid "B<ENOSYS>"
288 msgstr "B<ENOSYS>"
289
290 #. type: Plain text
291 #: build/C/man2/alloc_hugepages.2:122
292 msgid "The system call is not supported on this kernel."
293 msgstr "このシステムコールはカーネルでサポートされていない。"
294
295 #. type: SH
296 #: build/C/man2/alloc_hugepages.2:122
297 #, no-wrap
298 msgid "FILES"
299 msgstr "ファイル"
300
301 #. type: Plain text
302 #: build/C/man2/alloc_hugepages.2:126
303 msgid ""
304 "I</proc/sys/vm/nr_hugepages> Number of configured hugetlb pages.  This can "
305 "be read and written."
306 msgstr ""
307 "I</proc/sys/vm/nr_hugepages> 設定された hugetlb ページの数。 このファイルは読"
308 "み書きできる。"
309
310 #. type: Plain text
311 #: build/C/man2/alloc_hugepages.2:130
312 msgid ""
313 "I</proc/meminfo> Gives info on the number of configured hugetlb pages and on "
314 "their size in the three variables HugePages_Total, HugePages_Free, "
315 "Hugepagesize."
316 msgstr ""
317 "I</proc/meminfo> 設定された hugetlb ページの数と、 3 つの変数 "
318 "HugePages_Total, HugePages_Free, Hugepagesize の サイズについての情報を提供す"
319 "る。"
320
321 #. type: SH
322 #: build/C/man2/alloc_hugepages.2:130 build/C/man3/alloca.3:65
323 #: build/C/man2/cacheflush.2:75 build/C/man2/fallocate.2:199
324 #: build/C/man2/madvise.2:325 build/C/man3/mallinfo.3:110
325 #: build/C/man3/malloc_get_state.3:86 build/C/man3/malloc_hook.3:80
326 #: build/C/man3/malloc_info.3:63 build/C/man3/malloc_stats.3:55
327 #: build/C/man3/malloc_trim.3:60 build/C/man3/malloc_usable_size.3:48
328 #: build/C/man3/mallopt.3:392 build/C/man3/mcheck.3:145
329 #: build/C/man2/mlock.2:186 build/C/man2/mmap.2:497 build/C/man2/mmap2.2:77
330 #: build/C/man2/mprotect.2:113 build/C/man2/mremap.2:185
331 #: build/C/man2/msync.2:96 build/C/man3/mtrace.3:78
332 #: build/C/man2/posix_fadvise.2:112 build/C/man3/posix_fallocate.3:103
333 #: build/C/man3/posix_memalign.3:182 build/C/man2/readahead.2:87
334 #: build/C/man2/remap_file_pages.2:153 build/C/man3/shm_open.3:251
335 #: build/C/man7/shm_overview.7:101 build/C/man2/shmctl.2:373
336 #: build/C/man2/shmget.2:232 build/C/man2/shmop.2:231
337 #: build/C/man2/subpage_prot.2:96 build/C/man2/sync_file_range.2:180
338 #, no-wrap
339 msgid "CONFORMING TO"
340 msgstr "準拠"
341
342 #. type: Plain text
343 #: build/C/man2/alloc_hugepages.2:133
344 msgid ""
345 "These calls are specific to Linux on Intel processors, and should not be "
346 "used in programs intended to be portable."
347 msgstr ""
348 "このシステムコールは Intel プロセッサ上の Linux に固有のものであり、 移植性が"
349 "必要なプログラムで使うべきでない。"
350
351 #. type: SH
352 #: build/C/man2/alloc_hugepages.2:133 build/C/man3/alloca.3:73
353 #: build/C/man2/madvise.2:346 build/C/man3/malloc_get_state.3:88
354 #: build/C/man3/malloc_hook.3:82 build/C/man3/malloc_info.3:65
355 #: build/C/man3/malloc_stats.3:57 build/C/man3/malloc_trim.3:62
356 #: build/C/man3/malloc_usable_size.3:50 build/C/man3/mcheck.3:147
357 #: build/C/man2/mlock.2:213 build/C/man2/mmap.2:515 build/C/man2/mmap2.2:79
358 #: build/C/man2/mprotect.2:122 build/C/man2/mremap.2:191
359 #: build/C/man3/mtrace.3:80 build/C/man2/posix_fadvise.2:121
360 #: build/C/man3/posix_memalign.3:221 build/C/man2/readahead.2:92
361 #: build/C/man3/shm_open.3:257 build/C/man7/shm_overview.7:103
362 #: build/C/man2/shmctl.2:378 build/C/man2/shmget.2:238
363 #: build/C/man2/shmop.2:250 build/C/man2/subpage_prot.2:98
364 #: build/C/man2/sync_file_range.2:183
365 #, no-wrap
366 msgid "NOTES"
367 msgstr "注意"
368
369 #. type: Plain text
370 #: build/C/man2/alloc_hugepages.2:141
371 #, fuzzy
372 #| msgid ""
373 #| "These system calls are gone; they existed only in Linux 2.5.36 through to "
374 #| "2.5.54.  Now the hugetlbfs file system can be used instead.  Memory "
375 #| "backed by huge pages (if the CPU supports them) is obtained by using "
376 #| "B<mmap>(2)  to map files in this virtual file system."
377 msgid ""
378 "These system calls are gone; they existed only in Linux 2.5.36 through to "
379 "2.5.54.  Now the hugetlbfs filesystem can be used instead.  Memory backed by "
380 "huge pages (if the CPU supports them) is obtained by using B<mmap>(2)  to "
381 "map files in this virtual filesystem."
382 msgstr ""
383 "これらのシステムコールはなくなった。 これらは Linux 2.5.36 から 2.5.54 にのみ"
384 "存在する。 代わりに今は hugetlbfs ファイルシステムを使うことができる。 (CPU "
385 "がサポートしている場合) ヒュージページを持つメモリは、 B<mmap>(2)  を使ってこ"
386 "の仮想ファイルシステムでファイルをマップすることで取得できる。"
387
388 #. type: Plain text
389 #: build/C/man2/alloc_hugepages.2:145
390 msgid ""
391 "The maximal number of huge pages can be specified using the B<hugepages=> "
392 "boot parameter."
393 msgstr ""
394 "ヒュージページの最大数は、 B<hugepages=> 起動パラメータを使って指定できる。"
395
396 #. type: SH
397 #: build/C/man2/alloc_hugepages.2:150 build/C/man3/alloca.3:157
398 #: build/C/man2/cacheflush.2:89 build/C/man2/fallocate.2:207
399 #: build/C/man2/madvise.2:379 build/C/man3/mallinfo.3:279
400 #: build/C/man3/malloc_get_state.3:114 build/C/man3/malloc_hook.3:142
401 #: build/C/man3/malloc_info.3:262 build/C/man3/malloc_stats.3:67
402 #: build/C/man3/malloc_trim.3:82 build/C/man3/malloc_usable_size.3:64
403 #: build/C/man3/mallopt.3:580 build/C/man3/mcheck.3:208
404 #: build/C/man2/mlock.2:336 build/C/man2/mmap.2:737 build/C/man2/mmap2.2:98
405 #: build/C/man2/mprotect.2:229 build/C/man2/mremap.2:214
406 #: build/C/man2/msync.2:124 build/C/man3/mtrace.3:172
407 #: build/C/man2/posix_fadvise.2:197 build/C/man3/posix_fallocate.3:133
408 #: build/C/man3/posix_memalign.3:277 build/C/man2/readahead.2:103
409 #: build/C/man2/remap_file_pages.2:164 build/C/man3/shm_open.3:282
410 #: build/C/man7/shm_overview.7:127 build/C/man2/shmctl.2:431
411 #: build/C/man2/shmget.2:314 build/C/man2/shmop.2:295
412 #: build/C/man2/subpage_prot.2:134 build/C/man2/sync_file_range.2:226
413 #, no-wrap
414 msgid "COLOPHON"
415 msgstr "この文書について"
416
417 #. type: Plain text
418 #: build/C/man2/alloc_hugepages.2:157 build/C/man3/alloca.3:164
419 #: build/C/man2/cacheflush.2:96 build/C/man2/fallocate.2:214
420 #: build/C/man2/madvise.2:386 build/C/man3/mallinfo.3:286
421 #: build/C/man3/malloc_get_state.3:121 build/C/man3/malloc_hook.3:149
422 #: build/C/man3/malloc_info.3:269 build/C/man3/malloc_stats.3:74
423 #: build/C/man3/malloc_trim.3:89 build/C/man3/malloc_usable_size.3:71
424 #: build/C/man3/mallopt.3:587 build/C/man3/mcheck.3:215
425 #: build/C/man2/mlock.2:343 build/C/man2/mmap.2:744 build/C/man2/mmap2.2:105
426 #: build/C/man2/mprotect.2:236 build/C/man2/mremap.2:221
427 #: build/C/man2/msync.2:131 build/C/man3/mtrace.3:179
428 #: build/C/man2/posix_fadvise.2:204 build/C/man3/posix_fallocate.3:140
429 #: build/C/man3/posix_memalign.3:284 build/C/man2/readahead.2:110
430 #: build/C/man2/remap_file_pages.2:171 build/C/man3/shm_open.3:289
431 #: build/C/man7/shm_overview.7:134 build/C/man2/shmctl.2:438
432 #: build/C/man2/shmget.2:321 build/C/man2/shmop.2:302
433 #: build/C/man2/subpage_prot.2:141 build/C/man2/sync_file_range.2:233
434 #, fuzzy
435 #| msgid ""
436 #| "This page is part of release 3.53 of the Linux I<man-pages> project.  A "
437 #| "description of the project, and information about reporting bugs, can be "
438 #| "found at \\%http://www.kernel.org/doc/man-pages/."
439 msgid ""
440 "This page is part of release 3.54 of the Linux I<man-pages> project.  A "
441 "description of the project, and information about reporting bugs, can be "
442 "found at \\%http://www.kernel.org/doc/man-pages/."
443 msgstr ""
444 "この man ページは Linux I<man-pages> プロジェクトのリリース 3.53 の一部\n"
445 "である。プロジェクトの説明とバグ報告に関する情報は\n"
446 "http://www.kernel.org/doc/man-pages/ に書かれている。"
447
448 #. type: TH
449 #: build/C/man3/alloca.3:43
450 #, no-wrap
451 msgid "ALLOCA"
452 msgstr "ALLOCA"
453
454 #. type: TH
455 #: build/C/man3/alloca.3:43
456 #, no-wrap
457 msgid "2013-05-12"
458 msgstr "2013-05-12"
459
460 #. type: TH
461 #: build/C/man3/alloca.3:43 build/C/man3/malloc_get_state.3:25
462 #: build/C/man3/malloc_hook.3:10 build/C/man3/malloc_info.3:25
463 #: build/C/man3/malloc_usable_size.3:25 build/C/man3/mcheck.3:25
464 #: build/C/man3/mtrace.3:25 build/C/man3/posix_fallocate.3:25
465 #: build/C/man3/posix_memalign.3:29
466 #, no-wrap
467 msgid "GNU"
468 msgstr "GNU"
469
470 #. type: Plain text
471 #: build/C/man3/alloca.3:46
472 msgid "alloca - allocate memory that is automatically freed"
473 msgstr "alloca - 自動的に解放されるメモリを割り当てる"
474
475 #. type: Plain text
476 #: build/C/man3/alloca.3:48
477 msgid "B<#include E<lt>alloca.hE<gt>>"
478 msgstr "B<#include E<lt>alloca.hE<gt>>"
479
480 #. type: Plain text
481 #: build/C/man3/alloca.3:50
482 msgid "B<void *alloca(size_t >I<size>B<);>"
483 msgstr "B<void *alloca(size_t >I<size>B<);>"
484
485 #. type: Plain text
486 #: build/C/man3/alloca.3:60
487 msgid ""
488 "The B<alloca>()  function allocates I<size> bytes of space in the stack "
489 "frame of the caller.  This temporary space is automatically freed when the "
490 "function that called B<alloca>()  returns to its caller."
491 msgstr ""
492 "B<alloca>()  関数は、 I<size> バイトの領域を呼出元のスタック・フレームに割り"
493 "付ける。 この一時的な領域は、 B<alloca>()  を呼び出した関数が呼出元に返るとき"
494 "に自動的に解放される。"
495
496 #. type: Plain text
497 #: build/C/man3/alloca.3:65
498 msgid ""
499 "The B<alloca>()  function returns a pointer to the beginning of the "
500 "allocated space.  If the allocation causes stack overflow, program behavior "
501 "is undefined."
502 msgstr ""
503 "B<alloca>()  関数は、割り付けた領域の始まりを指すポインタを返す。 割り付けに"
504 "よってスタックオーバーフローが起った場合の プログラムの動作は定義されていな"
505 "い。"
506
507 #. type: Plain text
508 #: build/C/man3/alloca.3:67
509 msgid "This function is not in POSIX.1-2001."
510 msgstr "この関数は POSIX.1-2001 にはない。"
511
512 #. type: Plain text
513 #: build/C/man3/alloca.3:73
514 msgid ""
515 "There is evidence that the B<alloca>()  function appeared in 32V, PWB, "
516 "PWB.2, 3BSD, and 4BSD.  There is a man page for it in 4.3BSD.  Linux uses "
517 "the GNU version."
518 msgstr ""
519 "32V, PWB, PWB.2, 3BSD, 4BSD に B<alloca>()  関数が登場した証拠がある。 "
520 "4.3BSD には、マニュアルページがある。 Linux は、GNU 版を使っている。 この関数"
521 "は POSIX.1-2001 にはない。"
522
523 #. type: Plain text
524 #: build/C/man3/alloca.3:88
525 msgid ""
526 "The B<alloca>()  function is machine- and compiler-dependent.  For certain "
527 "applications, its use can improve efficiency compared to the use of B<malloc>"
528 "(3)  plus B<free>(3).  In certain cases, it can also simplify memory "
529 "deallocation in applications that use B<longjmp>(3)  or B<siglongjmp>(3).  "
530 "Otherwise, its use is discouraged."
531 msgstr ""
532 "B<alloca>()  関数は、機種とコンパイラに依存する。 特定のアプリケーションで"
533 "は、この関数を使うと B<malloc>(3)  と B<free>(3)  を組み合わせて使った場合に"
534 "比べて効率を改善することができる。 特定の場合では、この関数を使うことで、 "
535 "B<longjmp>(3)  や B<siglongjmp>(3)  を使うアプリケーションでのメモリの開放を"
536 "簡単にすることができる。 それ以外の場合では、この関数の使用は推奨されない。"
537
538 #. type: Plain text
539 #: build/C/man3/alloca.3:97
540 msgid ""
541 "Because the space allocated by B<alloca>()  is allocated within the stack "
542 "frame, that space is automatically freed if the function return is jumped "
543 "over by a call to B<longjmp>(3)  or B<siglongjmp>(3)."
544 msgstr ""
545 "B<alloca>()  により割り当てられる空間はスタックフレームから割り当てらるの"
546 "で、 関数の戻り先が B<longjmp>(3)  や B<siglongjmp>(3)  の呼び出しによりジャ"
547 "ンプした場合には、 割り当てられた空間は自動的に解放される。"
548
549 #. type: Plain text
550 #: build/C/man3/alloca.3:102
551 msgid "Do not attempt to B<free>(3)  space allocated by B<alloca>()!"
552 msgstr ""
553 "B<alloca>()  で割り当てられた空間を B<free>(3)  しようとすることのないよう"
554 "に!"
555
556 #. type: SS
557 #: build/C/man3/alloca.3:102
558 #, no-wrap
559 msgid "Notes on the GNU version"
560 msgstr "GNU 版についての注意"
561
562 #. type: Plain text
563 #: build/C/man3/alloca.3:124
564 msgid ""
565 "Normally, B<gcc>(1)  translates calls to B<alloca>()  with inlined code.  "
566 "This is not done when either the I<-ansi>, I<-std=c89>, I<-std=c99>, or the "
567 "I<-std=c11> option is given B<and> the header I<E<lt>alloca.hE<gt>> is not "
568 "included.  Otherwise (without an -ansi or -std=c* option) the glibc version "
569 "of I<E<lt>stdlib.hE<gt>> includes I<E<lt>alloca.hE<gt>> and that contains "
570 "the lines:"
571 msgstr ""
572 "通常 B<gcc>(1) は B<alloca>()  の呼び出しをインラインコードに変換する。 I<-"
573 "ansi>, I<-std=c89>, I<-std=c99>, I<-std=c11> のいずれかのオプションが指定さ"
574 "れ、B<かつ> I<E<lt>alloca.hE<gt>> がインクルードされていない場合、 この変換は"
575 "行われない。 それ以外の場合 (-ansi オプションも -std=c* オプションも指定され"
576 "ない場合) には、 glibc 版の I<E<lt>stdlib.hE<gt>> は I<E<lt>alloca.hE<gt>> を"
577 "インクルードするが、このファイルには以下の行が含まれており、"
578
579 #. type: Plain text
580 #: build/C/man3/alloca.3:129
581 #, no-wrap
582 msgid ""
583 "    #ifdef  __GNUC__\n"
584 "    #define alloca(size)   __builtin_alloca (size)\n"
585 "    #endif\n"
586 msgstr ""
587 "    #ifdef  __GNUC__\n"
588 "    #define alloca(size)   __builtin_alloca (size)\n"
589 "    #endif\n"
590
591 #. type: Plain text
592 #: build/C/man3/alloca.3:132
593 msgid "with messy consequences if one has a private version of this function."
594 msgstr "独自版の __builtin_alloca (size) 関数がある場合、厄介な結果になる。"
595
596 #. type: Plain text
597 #: build/C/man3/alloca.3:136
598 msgid ""
599 "The fact that the code is inlined means that it is impossible to take the "
600 "address of this function, or to change its behavior by linking with a "
601 "different library."
602 msgstr ""
603 "このコードはインライン化されているので、 この関数のアドレスを取得したり、 他"
604 "のライブラリをリンクして動作を変更することはできない。"
605
606 #. type: Plain text
607 #: build/C/man3/alloca.3:140
608 msgid ""
609 "The inlined code often consists of a single instruction adjusting the stack "
610 "pointer, and does not check for stack overflow.  Thus, there is no NULL "
611 "error return."
612 msgstr ""
613 "通常このインラインコードはスタックポインタを移動する 1 つの命令 "
614 "(instruction) から構成されており、 スタックオーバーフローをチェックしない。 "
615 "よって NULL エラーが返されることはない。"
616
617 #. type: SH
618 #: build/C/man3/alloca.3:140 build/C/man2/cacheflush.2:82
619 #: build/C/man3/mallinfo.3:114 build/C/man3/mallopt.3:406
620 #: build/C/man2/mlock.2:304 build/C/man2/mmap.2:587 build/C/man3/mtrace.3:102
621 #: build/C/man2/posix_fadvise.2:186 build/C/man2/shmget.2:300
622 #, no-wrap
623 msgid "BUGS"
624 msgstr "バグ"
625
626 #. type: Plain text
627 #: build/C/man3/alloca.3:145
628 msgid ""
629 "There is no error indication if the stack frame cannot be extended.  "
630 "(However, after a failed allocation, the program is likely to receive a "
631 "B<SIGSEGV> signal if it attempts to access the unallocated space.)"
632 msgstr ""
633 "スタックフレームが拡張できなかった場合、エラー通知は行われない。 (しかしなが"
634 "ら、割り当てに失敗した後で、プログラムが割り当てられなかった 空間にアクセスし"
635 "ようとした場合に B<SIGSEGV> シグナルを受信することだろう。)"
636
637 #. type: Plain text
638 #: build/C/man3/alloca.3:153
639 msgid ""
640 "On many systems B<alloca>()  cannot be used inside the list of arguments of "
641 "a function call, because the stack space reserved by B<alloca>()  would "
642 "appear on the stack in the middle of the space for the function arguments."
643 msgstr ""
644 "多くのシステムにおいて、関数コールの引き数のリスト内では B<alloca>()  が使え"
645 "ない。 これは、 B<alloca>()  によって予約されるスタック領域が、 関数引き数に"
646 "使われるスタック領域の中に現れてしまうためである。"
647
648 #. type: SH
649 #: build/C/man3/alloca.3:153 build/C/man2/fallocate.2:202
650 #: build/C/man2/madvise.2:371 build/C/man3/mallinfo.3:270
651 #: build/C/man3/malloc_get_state.3:111 build/C/man3/malloc_hook.3:137
652 #: build/C/man3/malloc_info.3:256 build/C/man3/malloc_stats.3:61
653 #: build/C/man3/malloc_trim.3:78 build/C/man3/malloc_usable_size.3:62
654 #: build/C/man3/mallopt.3:566 build/C/man3/mcheck.3:204
655 #: build/C/man2/mlock.2:329 build/C/man2/mmap.2:712 build/C/man2/mmap2.2:92
656 #: build/C/man2/mprotect.2:226 build/C/man2/mremap.2:199
657 #: build/C/man2/msync.2:120 build/C/man3/mtrace.3:167
658 #: build/C/man2/posix_fadvise.2:191 build/C/man3/posix_fallocate.3:128
659 #: build/C/man3/posix_memalign.3:272 build/C/man2/readahead.2:97
660 #: build/C/man2/remap_file_pages.2:157 build/C/man3/shm_open.3:271
661 #: build/C/man7/shm_overview.7:114 build/C/man2/shmctl.2:424
662 #: build/C/man2/shmget.2:306 build/C/man2/shmop.2:287
663 #: build/C/man2/subpage_prot.2:128 build/C/man2/sync_file_range.2:221
664 #, no-wrap
665 msgid "SEE ALSO"
666 msgstr "関連項目"
667
668 #. type: Plain text
669 #: build/C/man3/alloca.3:157
670 msgid "B<brk>(2), B<longjmp>(3), B<malloc>(3)"
671 msgstr "B<brk>(2), B<longjmp>(3), B<malloc>(3)"
672
673 #. type: TH
674 #: build/C/man2/cacheflush.2:25
675 #, no-wrap
676 msgid "CACHEFLUSH"
677 msgstr "CACHEFLUSH"
678
679 #. type: TH
680 #: build/C/man2/cacheflush.2:25
681 #, no-wrap
682 msgid "2007-05-26"
683 msgstr "2007-05-26"
684
685 #. type: Plain text
686 #: build/C/man2/cacheflush.2:28
687 msgid "cacheflush - flush contents of instruction and/or data cache"
688 msgstr "cacheflush - 命令キャッシュやデータキャッシュの内容をフラッシュする"
689
690 #. type: Plain text
691 #: build/C/man2/cacheflush.2:31
692 #, no-wrap
693 msgid "B<#include E<lt>asm/cachectl.hE<gt>>\n"
694 msgstr "B<#include E<lt>asm/cachectl.hE<gt>>\n"
695
696 #. type: Plain text
697 #: build/C/man2/cacheflush.2:33
698 #, no-wrap
699 msgid "B<int cacheflush(char *>I<addr>B<, int >I<nbytes>B<, int >I<cache>B<);>\n"
700 msgstr "B<int cacheflush(char *>I<addr>B<, int >I<nbytes>B<, int >I<cache>B<);>\n"
701
702 #. type: Plain text
703 #: build/C/man2/cacheflush.2:43
704 msgid ""
705 "B<cacheflush>()  flushes the contents of the indicated cache(s) for the user "
706 "addresses in the range I<addr> to I<(addr+nbytes-1)>.  I<cache> may be one "
707 "of:"
708 msgstr ""
709 "B<cacheflush>()  は I<addr> から I<(addr+nbytes-1)> の範囲のユーザアドレスに"
710 "対応する 指定されたキャッシュをフラッシュする。 I<cache> には以下のいずれかを"
711 "指定する:"
712
713 #. type: TP
714 #: build/C/man2/cacheflush.2:43
715 #, no-wrap
716 msgid "B<ICACHE>"
717 msgstr "B<ICACHE>"
718
719 #. type: Plain text
720 #: build/C/man2/cacheflush.2:46
721 msgid "Flush the instruction cache."
722 msgstr "命令 (instruction) キャッシュをフラッシュする。"
723
724 #. type: TP
725 #: build/C/man2/cacheflush.2:46
726 #, no-wrap
727 msgid "B<DCACHE>"
728 msgstr "B<DCACHE>"
729
730 #. type: Plain text
731 #: build/C/man2/cacheflush.2:49
732 msgid "Write back to memory and invalidate the affected valid cache lines."
733 msgstr "変更があったキャッシュラインをメモリに書き戻し、無効にする。"
734
735 #. type: TP
736 #: build/C/man2/cacheflush.2:49
737 #, no-wrap
738 msgid "B<BCACHE>"
739 msgstr "B<BCACHE>"
740
741 #. type: Plain text
742 #: build/C/man2/cacheflush.2:53
743 msgid "Same as B<(ICACHE|DCACHE)>."
744 msgstr "B<(ICACHE|DCACHE)> と同じ。"
745
746 #. type: Plain text
747 #: build/C/man2/cacheflush.2:59
748 msgid ""
749 "B<cacheflush>()  returns 0 on success or -1 on error.  If errors are "
750 "detected, I<errno> will indicate the error."
751 msgstr ""
752 "B<cacheflush>()  は成功した場合は 0 を、失敗した場合は -1 を返す。エラーが検"
753 "出された場合は I<errno> にエラーが指示される。"
754
755 #. type: TP
756 #: build/C/man2/cacheflush.2:60 build/C/man2/mmap2.2:62
757 #: build/C/man2/mremap.2:142 build/C/man2/shmctl.2:310
758 #: build/C/man2/subpage_prot.2:72
759 #, no-wrap
760 msgid "B<EFAULT>"
761 msgstr "B<EFAULT>"
762
763 #. type: Plain text
764 #: build/C/man2/cacheflush.2:67
765 msgid ""
766 "Some or all of the address range I<addr> to I<(addr+nbytes-1)> is not "
767 "accessible."
768 msgstr ""
769 "I<addr> から I<(addr+nbytes-1)> の範囲のアドレスの全てまたは一部が アクセス可"
770 "能ではない。"
771
772 #. type: TP
773 #: build/C/man2/cacheflush.2:67 build/C/man2/fallocate.2:131
774 #: build/C/man2/madvise.2:282 build/C/man3/malloc_info.3:56
775 #: build/C/man2/mlock.2:157 build/C/man2/mlock.2:164 build/C/man2/mlock.2:176
776 #: build/C/man2/mmap.2:423 build/C/man2/mmap.2:431 build/C/man2/mmap.2:436
777 #: build/C/man2/mmap2.2:65 build/C/man2/mprotect.2:95
778 #: build/C/man2/mremap.2:151 build/C/man2/msync.2:80
779 #: build/C/man2/posix_fadvise.2:94 build/C/man3/posix_fallocate.3:81
780 #: build/C/man3/posix_memalign.3:158 build/C/man2/readahead.2:76
781 #: build/C/man2/remap_file_pages.2:132 build/C/man2/remap_file_pages.2:139
782 #: build/C/man3/shm_open.3:213 build/C/man2/shmctl.2:324
783 #: build/C/man2/shmget.2:199 build/C/man2/shmop.2:200 build/C/man2/shmop.2:223
784 #: build/C/man2/subpage_prot.2:77 build/C/man2/sync_file_range.2:152
785 #, no-wrap
786 msgid "B<EINVAL>"
787 msgstr "B<EINVAL>"
788
789 #. type: Plain text
790 #: build/C/man2/cacheflush.2:75
791 msgid "I<cache> is not one of B<ICACHE>, B<DCACHE>, or B<BCACHE>."
792 msgstr "I<cache> パラメータが B<ICACHE>, B<DCACHE>, B<BCACHE> のどれでもない。"
793
794 #.  FIXME This system call was only on MIPS back in 1.2 days, but
795 #.  by now it is on a number of other architectures (but not i386).
796 #.  Investigate the details and update this page.
797 #.  Irix 6.5 appears to have a cacheflush() syscall -- mtk
798 #. type: Plain text
799 #: build/C/man2/cacheflush.2:82
800 msgid ""
801 "This Linux-specific system call is available only on MIPS-based systems.  It "
802 "should not be used in programs intended to be portable."
803 msgstr ""
804 "この Linux 特有のシステムコールは MIPS ベースのシステムでのみ有効である。 移"
805 "植を意図したプログラムで使用すべきではない。"
806
807 #. type: Plain text
808 #: build/C/man2/cacheflush.2:89
809 msgid ""
810 "The current implementation ignores the I<addr> and I<nbytes> arguments.  "
811 "Therefore, the whole cache is always flushed."
812 msgstr ""
813 "現在の実装では、引き数 I<addr> と I<nbytes> は無視される。そのため、 常に全て"
814 "のキャッシュがフラッシュされる。"
815
816 #. type: TH
817 #: build/C/man2/fallocate.2:11
818 #, no-wrap
819 msgid "FALLOCATE"
820 msgstr "FALLOCATE"
821
822 #. type: TH
823 #: build/C/man2/fallocate.2:11
824 #, no-wrap
825 msgid "2013-06-10"
826 msgstr "2013-06-10"
827
828 #. type: Plain text
829 #: build/C/man2/fallocate.2:14
830 msgid "fallocate - manipulate file space"
831 msgstr "fallocate - ファイル空間の操作"
832
833 #. type: Plain text
834 #: build/C/man2/fallocate.2:18 build/C/man2/readahead.2:35
835 #, no-wrap
836 msgid ""
837 "B<#define _GNU_SOURCE>             /* See feature_test_macros(7) */\n"
838 "B<#include E<lt>fcntl.hE<gt>>\n"
839 msgstr ""
840 "B<#define _GNU_SOURCE>             /* feature_test_macros(7) 参照 */\n"
841 "B<#include E<lt>fcntl.hE<gt>>\n"
842
843 #. type: Plain text
844 #: build/C/man2/fallocate.2:21
845 #, no-wrap
846 msgid "B<int fallocate(int >I<fd>B<, int >I<mode>B<, off_t >I<offset>B<, off_t >I<len>B<);>\n"
847 msgstr "B<int fallocate(int >I<fd>B<, int >I<mode>B<, off_t >I<offset>B<, off_t >I<len>B<);>\n"
848
849 #. type: Plain text
850 #: build/C/man2/fallocate.2:27
851 msgid ""
852 "This is a nonportable, Linux-specific system call.  For the portable, "
853 "POSIX.1-specified method of ensuring that space is allocated for a file, see "
854 "B<posix_fallocate>(3)."
855 msgstr ""
856 "このシステムコールは、移植性のない、Linux 固有のシステムコールである。 移植性"
857 "が必要な場合は、ファイルに対してディスク空間を確実に確保するために、 POSIX.1 "
858 "で規定された方法である B<posix_fallocate>(3)  を使うこと。"
859
860 #. type: Plain text
861 #: build/C/man2/fallocate.2:37
862 msgid ""
863 "B<fallocate>()  allows the caller to directly manipulate the allocated disk "
864 "space for the file referred to by I<fd> for the byte range starting at "
865 "I<offset> and continuing for I<len> bytes."
866 msgstr ""
867 "B<fallocate>()  を使うと、 I<fd> が参照するファイルに割り当てられたディスク空"
868 "間を直接操作できる。 操作対象は、 I<offset> から始まる長さ I<len> バイトの領"
869 "域である。"
870
871 #. type: Plain text
872 #: build/C/man2/fallocate.2:42
873 msgid ""
874 "The I<mode> argument determines the operation to be performed on the given "
875 "range.  Details of the supported operations are given in the subsections "
876 "below."
877 msgstr ""
878 "I<mode> 引き数は、指定された領域に対して実行する操作を指定する。\n"
879 "サポートされている操作の詳細は以下のサブセクションで説明する。"
880
881 #. type: SS
882 #: build/C/man2/fallocate.2:42
883 #, no-wrap
884 msgid "Allocating disk space"
885 msgstr "ディスク領域の割り当て"
886
887 #. type: Plain text
888 #: build/C/man2/fallocate.2:61
889 msgid ""
890 "The default operation (i.e., I<mode> is zero) of B<fallocate>()  allocates "
891 "and initializes to zero the disk space within the range specified by "
892 "I<offset> and I<len>.  The file size (as reported by B<stat>(2))  will be "
893 "changed if I<offset>+I<len> is greater than the file size.  This default "
894 "behavior closely resembles the behavior of the B<posix_fallocate>(3)  "
895 "library function, and is intended as a method of optimally implementing that "
896 "function."
897 msgstr ""
898 "B<fallocate>() のデフォルトの動作 (つまり I<mode> が 0 の場合) は、\n"
899 "I<offset> と I<len> で指定された範囲のディスク領域の割り当てと初期化を行"
900 "う。\n"
901 "I<offset>+I<len> がファイルサイズよりも大きかった場合、\n"
902 "(B<stat>(2) で報告される) ファイルサイズが変更される。このデフォルトの動作"
903 "は、\n"
904 "ライブラリ関数 B<posix_fallocate>(3) の動作と非常に似ている。これは、\n"
905 "このシステムコールが B<posix_fallocate>(3) を最適に実装する手段を提供する\n"
906 "ことを目的としているからである。"
907
908 #. type: Plain text
909 #: build/C/man2/fallocate.2:67
910 msgid ""
911 "After a successful call, subsequent writes into the range specified by "
912 "I<offset> and I<len> are guaranteed not to fail because of lack of disk "
913 "space."
914 msgstr ""
915 "呼び出しが成功した場合、\n"
916 "I<offset> と I<len> で指定された範囲へのそれ以降の書き込みでは、\n"
917 "ディスクの領域不足での書き込み失敗が起こらないことが保証される。"
918
919 #. type: Plain text
920 #: build/C/man2/fallocate.2:78
921 msgid ""
922 "If the B<FALLOC_FL_KEEP_SIZE> flag is specified in I<mode>, the behavior of "
923 "the call is similar, but the file size will not be changed even if I<offset>"
924 "+I<len> is greater than the file size.  Preallocating zeroed blocks beyond "
925 "the end of the file in this manner is useful for optimizing append workloads."
926 msgstr ""
927 "B<FALLOC_FL_KEEP_SIZE> フラグが I<mode> に指定された場合、このシステムコー"
928 "ル\n"
929 "の動作は似ているが、 I<offset>+I<len> がファイルサイズよりも大きい場合で\n"
930 "あってもファイルサイズは変更されない点が異なる。この場合のファイルの末尾\n"
931 "よりも後ろの前もって割り当てられた 0 で埋められたブロックは、ファイルへの\n"
932 "追記を最適化したい場合に役に立つ。"
933
934 #. type: Plain text
935 #: build/C/man2/fallocate.2:82
936 msgid ""
937 "Because allocation is done in block size chunks, B<fallocate>()  may "
938 "allocate a larger range of disk space than was specified."
939 msgstr ""
940 "割り当てはブロックサイズ単位で行われるため、 B<fallocate>() は指定されたよ"
941 "り\n"
942 "も大きなディスク領域を割り当てることがある。"
943
944 #. type: SS
945 #: build/C/man2/fallocate.2:82
946 #, no-wrap
947 msgid "Deallocating file space"
948 msgstr "ファイル空間の割り当て解除"
949
950 #. type: Plain text
951 #: build/C/man2/fallocate.2:97
952 #, fuzzy
953 #| msgid ""
954 #| "Specifying the B<FALLOC_FL_PUNCH_HOLE> flag (available since Linux "
955 #| "2.6.38) in I<mode> deallocates space (i.e., creates a hole)  in the byte "
956 #| "range starting at I<offset> and continuing for I<len> bytes.  Within the "
957 #| "specified range, partial file system blocks are zeroed, and whole file "
958 #| "system blocks are removed from the file.  After a successful call, "
959 #| "subsequent reads from this range will return zeroes."
960 msgid ""
961 "Specifying the B<FALLOC_FL_PUNCH_HOLE> flag (available since Linux 2.6.38) "
962 "in I<mode> deallocates space (i.e., creates a hole)  in the byte range "
963 "starting at I<offset> and continuing for I<len> bytes.  Within the specified "
964 "range, partial filesystem blocks are zeroed, and whole filesystem blocks are "
965 "removed from the file.  After a successful call, subsequent reads from this "
966 "range will return zeroes."
967 msgstr ""
968 "B<FALLOC_FL_PUNCH_HOLE> フラグ (Linux 2.6.38 以降で利用可能) を I<mode> に指"
969 "定すると、 I<offset> で始まる I<len> バイトの領域の空間を解放する (ホールを作"
970 "成する)。 指定された範囲のうち、 部分的に使用しているファイルシステムブロック"
971 "は 0 で埋められ、 全体を使用しているファイルシステムブロックはそのファイルか"
972 "ら削除される。 呼び出しが成功すると、 これ以降のこの範囲からの読み出しでは 0 "
973 "を返す。"
974
975 #. type: Plain text
976 #: build/C/man2/fallocate.2:108
977 msgid ""
978 "The B<FALLOC_FL_PUNCH_HOLE> flag must be ORed with B<FALLOC_FL_KEEP_SIZE> in "
979 "I<mode>; in other words, even when punching off the end of the file, the "
980 "file size (as reported by B<stat>(2))  does not change."
981 msgstr ""
982 "B<FALLOC_FL_PUNCH_HOLE> フラグは B<FALLOC_FL_KEEP_SIZE> と論理和 (OR) をとっ"
983 "て I<mode> に指定しなければならない。 つまり、 ファイル末尾の punch off を"
984 "行った場合でも、 (B<stat>(2) で報告される) ファイルサイズが変化しない。"
985
986 #. type: Plain text
987 #: build/C/man2/fallocate.2:112
988 #, fuzzy
989 #| msgid ""
990 #| "Not all file systems support B<FALLOC_FL_PUNCH_HOLE>; if a file system "
991 #| "doesn't support the operation, an error is returned."
992 msgid ""
993 "Not all filesystems support B<FALLOC_FL_PUNCH_HOLE>; if a filesystem doesn't "
994 "support the operation, an error is returned."
995 msgstr ""
996 "すべてのファイルシステムで B<FALLOC_FL_PUNCH_HOLE> がサポートされているわけで"
997 "はない。 ファイルシステムがこの操作をサポートしていない場合は、 エラーが返"
998 "る。"
999
1000 #. type: Plain text
1001 #: build/C/man2/fallocate.2:119
1002 msgid ""
1003 "On success, B<fallocate>()  returns zero.  On error, -1 is returned and "
1004 "I<errno> is set to indicate the error."
1005 msgstr ""
1006 "成功の場合、 B<fallocate>() は 0 を返す。 エラーの場合、-1 を返し、 I<error> "
1007 "にエラーを示す値を設定する。"
1008
1009 #. type: TP
1010 #: build/C/man2/fallocate.2:120 build/C/man2/madvise.2:279
1011 #: build/C/man2/mmap.2:417 build/C/man2/posix_fadvise.2:91
1012 #: build/C/man3/posix_fallocate.3:73 build/C/man2/readahead.2:72
1013 #: build/C/man2/sync_file_range.2:148
1014 #, no-wrap
1015 msgid "B<EBADF>"
1016 msgstr "B<EBADF>"
1017
1018 #. type: Plain text
1019 #: build/C/man2/fallocate.2:124 build/C/man3/posix_fallocate.3:77
1020 msgid "I<fd> is not a valid file descriptor, or is not opened for writing."
1021 msgstr ""
1022 "I<fd> が有効なファイルディスクリプタでないか、 書き込み用としてオープンされて"
1023 "いない。"
1024
1025 #. type: TP
1026 #: build/C/man2/fallocate.2:124 build/C/man3/posix_fallocate.3:77
1027 #, no-wrap
1028 msgid "B<EFBIG>"
1029 msgstr "B<EFBIG>"
1030
1031 #. type: Plain text
1032 #: build/C/man2/fallocate.2:128
1033 msgid "I<offset>+I<len> exceeds the maximum file size."
1034 msgstr "I<offset + len> がファイルサイズの最大値よりも大きい。"
1035
1036 #. type: TP
1037 #: build/C/man2/fallocate.2:128
1038 #, no-wrap
1039 msgid "B<EINTR>"
1040 msgstr "B<EINTR>"
1041
1042 #. type: Plain text
1043 #: build/C/man2/fallocate.2:131
1044 msgid "A signal was caught during execution."
1045 msgstr "実行中にシグナルが捕捉された。"
1046
1047 #. type: Plain text
1048 #: build/C/man2/fallocate.2:143 build/C/man3/posix_fallocate.3:87
1049 msgid "I<offset> was less than 0, or I<len> was less than or equal to 0."
1050 msgstr "I<offset> が 0 未満だったか、 I<len> が 0 以下だった。"
1051
1052 #. type: TP
1053 #: build/C/man2/fallocate.2:143 build/C/man2/madvise.2:310
1054 #: build/C/man2/sync_file_range.2:160
1055 #, no-wrap
1056 msgid "B<EIO>"
1057 msgstr "B<EIO>"
1058
1059 #. type: Plain text
1060 #: build/C/man2/fallocate.2:146
1061 #, fuzzy
1062 #| msgid ""
1063 #| "An I/O error occurred while reading from or writing to a file system."
1064 msgid "An I/O error occurred while reading from or writing to a filesystem."
1065 msgstr "ファイルシステムとの読み書き中に入出力エラーが発生した。"
1066
1067 #. type: TP
1068 #: build/C/man2/fallocate.2:146 build/C/man2/mmap.2:452
1069 #: build/C/man3/posix_fallocate.3:87
1070 #, no-wrap
1071 msgid "B<ENODEV>"
1072 msgstr "B<ENODEV>"
1073
1074 #. type: Plain text
1075 #: build/C/man2/fallocate.2:153
1076 msgid ""
1077 "I<fd> does not refer to a regular file or a directory.  (If I<fd> is a pipe "
1078 "or FIFO, a different error results.)"
1079 msgstr ""
1080 "I<fd> が通常のファイルかディレクトリを参照していない (I<fd> がパイプや FIFO "
1081 "を参照している場合、別のエラーが発生する)。"
1082
1083 #. type: TP
1084 #: build/C/man2/fallocate.2:153 build/C/man3/posix_fallocate.3:91
1085 #: build/C/man2/shmget.2:217 build/C/man2/sync_file_range.2:166
1086 #, no-wrap
1087 msgid "B<ENOSPC>"
1088 msgstr "B<ENOSPC>"
1089
1090 #. type: Plain text
1091 #: build/C/man2/fallocate.2:158 build/C/man3/posix_fallocate.3:96
1092 msgid ""
1093 "There is not enough space left on the device containing the file referred to "
1094 "by I<fd>."
1095 msgstr "I<fd> が参照するファイルを含むデバイスに十分な空き領域がない。"
1096
1097 #. type: Plain text
1098 #: build/C/man2/fallocate.2:162
1099 msgid "This kernel does not implement B<fallocate>()."
1100 msgstr "このカーネルでは B<fallocate>() は実装されていない。"
1101
1102 #. type: TP
1103 #: build/C/man2/fallocate.2:162
1104 #, no-wrap
1105 msgid "B<EOPNOTSUPP>"
1106 msgstr "B<EOPNOTSUPP>"
1107
1108 #. type: Plain text
1109 #: build/C/man2/fallocate.2:171
1110 #, fuzzy
1111 #| msgid ""
1112 #| "The file system containing the file referred to by I<fd> does not support "
1113 #| "this operation; or the I<mode> is not supported by the file system "
1114 #| "containing the file referred to by I<fd>."
1115 msgid ""
1116 "The filesystem containing the file referred to by I<fd> does not support "
1117 "this operation; or the I<mode> is not supported by the filesystem containing "
1118 "the file referred to by I<fd>."
1119 msgstr ""
1120 "I<fd> が参照するファイルを含むファイルシステムが 指定された操作を\n"
1121 "サポートしていない。 I<fd> が参照するファイルを含むファイルシステムが\n"
1122 "I<mode> をサポートしていない。"
1123
1124 #. type: TP
1125 #: build/C/man2/fallocate.2:171 build/C/man2/mlock.2:143
1126 #: build/C/man2/mlock.2:182 build/C/man2/mmap.2:460 build/C/man2/shmctl.2:349
1127 #: build/C/man2/shmget.2:225
1128 #, no-wrap
1129 msgid "B<EPERM>"
1130 msgstr "B<EPERM>"
1131
1132 #. type: Plain text
1133 #: build/C/man2/fallocate.2:187
1134 msgid ""
1135 "The file referred to by I<fd> is marked immutable (see B<chattr>(1)).  Or: "
1136 "I<mode> specifies B<FALLOC_FL_PUNCH_HOLE> and the file referred to by I<fd> "
1137 "is marked append-only (see B<chattr>(1))."
1138 msgstr ""
1139 "I<fd> が参照するファイルに変更不可 (immutable) の属性が付いている (B<chattr>"
1140 "(1) 参照)。 I<mode> に B<FALLOC_FL_PUNCH_HOLE> が指定されたが、 I<fd> が参照"
1141 "するファイルに追加のみ (append-only) の属性が付いている (B<chattr>(1) 参照)。"
1142
1143 #. type: TP
1144 #: build/C/man2/fallocate.2:187 build/C/man2/posix_fadvise.2:97
1145 #: build/C/man3/posix_fallocate.3:96 build/C/man2/sync_file_range.2:169
1146 #, no-wrap
1147 msgid "B<ESPIPE>"
1148 msgstr "B<ESPIPE>"
1149
1150 #. type: Plain text
1151 #: build/C/man2/fallocate.2:191
1152 msgid "I<fd> refers to a pipe or FIFO."
1153 msgstr "I<fd> がパイプか FIFO を参照している。"
1154
1155 #. type: SH
1156 #: build/C/man2/fallocate.2:191 build/C/man3/malloc_info.3:60
1157 #: build/C/man3/mcheck.3:134 build/C/man2/mmap2.2:74
1158 #: build/C/man2/posix_fadvise.2:104 build/C/man3/posix_fallocate.3:100
1159 #: build/C/man3/posix_memalign.3:167 build/C/man2/readahead.2:82
1160 #: build/C/man2/remap_file_pages.2:148 build/C/man3/shm_open.3:249
1161 #: build/C/man2/subpage_prot.2:90 build/C/man2/sync_file_range.2:177
1162 #, no-wrap
1163 msgid "VERSIONS"
1164 msgstr "バージョン"
1165
1166 #.  See http://sourceware.org/bugzilla/show_bug.cgi?id=14964
1167 #. type: Plain text
1168 #: build/C/man2/fallocate.2:199
1169 msgid ""
1170 "B<fallocate>()  is available on Linux since kernel 2.6.23.  Support is "
1171 "provided by glibc since version 2.10.  The B<FALLOC_FL_*> flags are defined "
1172 "in glibc headers only since version 2.18."
1173 msgstr ""
1174 "B<fallocate>()  はカーネル 2.6.23 以降の Linux で利用可能である。 glibc での"
1175 "対応はバージョン 3.10 以降で行われている。 B<FALLOC_FL_*> が glibc のヘッダ"
1176 "ファイルで定義されているのは、バージョン 2.18 以降のみである。"
1177
1178 #. type: Plain text
1179 #: build/C/man2/fallocate.2:202
1180 msgid "B<fallocate>()  is Linux-specific."
1181 msgstr "B<fallocate>()  は Linux 固有である。"
1182
1183 #. type: Plain text
1184 #: build/C/man2/fallocate.2:207
1185 msgid ""
1186 "B<fallocate>(1), B<ftruncate>(2), B<posix_fadvise>(3), B<posix_fallocate>(3)"
1187 msgstr ""
1188 "B<fallocate>(1), B<ftruncate>(2), B<posix_fadvise>(3), B<posix_fallocate>(3)"
1189
1190 #. type: TH
1191 #: build/C/man2/madvise.2:35
1192 #, no-wrap
1193 msgid "MADVISE"
1194 msgstr "MADVISE"
1195
1196 #. type: TH
1197 #: build/C/man2/madvise.2:35
1198 #, no-wrap
1199 msgid "2012-04-28"
1200 msgstr "2012-04-28"
1201
1202 #. type: Plain text
1203 #: build/C/man2/madvise.2:38
1204 msgid "madvise - give advice about use of memory"
1205 msgstr "madvise - メモリ利用に関するアドバイスを与える"
1206
1207 #. type: Plain text
1208 #: build/C/man2/madvise.2:40 build/C/man2/msync.2:30
1209 #: build/C/man3/shm_open.3:31
1210 msgid "B<#include E<lt>sys/mman.hE<gt>>"
1211 msgstr "B<#include E<lt>sys/mman.hE<gt>>"
1212
1213 #. type: Plain text
1214 #: build/C/man2/madvise.2:42
1215 msgid ""
1216 "B<int madvise(void *>I<addr>B<, size_t >I<length>B<, int >I<advice>B<);>"
1217 msgstr ""
1218 "B<int madvise(void *>I<addr>B<, size_t >I<length>B<, int >I<advice>B<);>"
1219
1220 #. type: Plain text
1221 #: build/C/man2/madvise.2:46 build/C/man2/posix_fadvise.2:43
1222 #: build/C/man3/posix_fallocate.3:39 build/C/man3/posix_memalign.3:49
1223 msgid ""
1224 "Feature Test Macro Requirements for glibc (see B<feature_test_macros>(7)):"
1225 msgstr "glibc 向けの機能検査マクロの要件 (B<feature_test_macros>(7)  参照):"
1226
1227 #. type: Plain text
1228 #: build/C/man2/madvise.2:50
1229 msgid "B<madvise>(): _BSD_SOURCE"
1230 msgstr "B<madvise>(): _BSD_SOURCE"
1231
1232 #. type: Plain text
1233 #: build/C/man2/madvise.2:68
1234 msgid ""
1235 "The B<madvise>()  system call advises the kernel about how to handle paging "
1236 "input/output in the address range beginning at address I<addr> and with size "
1237 "I<length> bytes.  It allows an application to tell the kernel how it expects "
1238 "to use some mapped or shared memory areas, so that the kernel can choose "
1239 "appropriate read-ahead and caching techniques.  This call does not influence "
1240 "the semantics of the application (except in the case of B<MADV_DONTNEED>), "
1241 "but may influence its performance.  The kernel is free to ignore the advice."
1242 msgstr ""
1243 "B<madvise>()  システムコールは、アドレス I<addr> からはじまる I<length> バイ"
1244 "トのメモリブロックのページング入出力をどう扱えば良いか、 カーネルにアドバイス"
1245 "する。 これを用いると、 アプリケーションからカーネルに、 マップされたメモリや"
1246 "共有メモリをどのように扱ってほしいか伝えることができ、 カーネルはそれに応じて"
1247 "先読みやキャッシュなどの適切な手法を選択できる。 このコールはアプリケーション"
1248 "の動作そのものには影響しない (B<MADV_DONTNEED> の場合は別) が、 性能には影響"
1249 "しうる。 なおこのアドバイスを受け入れるかどうかはカーネルに任される。"
1250
1251 #. type: Plain text
1252 #: build/C/man2/madvise.2:72
1253 msgid "The advice is indicated in the I<advice> argument which can be"
1254 msgstr ""
1255 "アドバイスは引き数 I<advice> によって与える。以下のいずれかを指定できる。"
1256
1257 #. type: TP
1258 #: build/C/man2/madvise.2:72
1259 #, no-wrap
1260 msgid "B<MADV_NORMAL>"
1261 msgstr "B<MADV_NORMAL>"
1262
1263 #. type: Plain text
1264 #: build/C/man2/madvise.2:76
1265 msgid "No special treatment.  This is the default."
1266 msgstr "特別な扱いは行わない。これがデフォルトである。"
1267
1268 #. type: TP
1269 #: build/C/man2/madvise.2:76
1270 #, no-wrap
1271 msgid "B<MADV_RANDOM>"
1272 msgstr "B<MADV_RANDOM>"
1273
1274 #. type: Plain text
1275 #: build/C/man2/madvise.2:80
1276 msgid ""
1277 "Expect page references in random order.  (Hence, read ahead may be less "
1278 "useful than normally.)"
1279 msgstr ""
1280 "ページ参照はランダムな順序で行われそうだ。 (したがって、先読みはあまり効果が"
1281 "なさそうだ。)"
1282
1283 #. type: TP
1284 #: build/C/man2/madvise.2:80
1285 #, no-wrap
1286 msgid "B<MADV_SEQUENTIAL>"
1287 msgstr "B<MADV_SEQUENTIAL>"
1288
1289 #. type: Plain text
1290 #: build/C/man2/madvise.2:85
1291 msgid ""
1292 "Expect page references in sequential order.  (Hence, pages in the given "
1293 "range can be aggressively read ahead, and may be freed soon after they are "
1294 "accessed.)"
1295 msgstr ""
1296 "ページ参照はシーケンシャルな順序で行われそうだ。 (したがって与えた範囲のペー"
1297 "ジは積極的に先読みしておくと良いだろう。 またアクセスが終わったら速やかに解放"
1298 "して良い。)"
1299
1300 #. type: TP
1301 #: build/C/man2/madvise.2:85
1302 #, no-wrap
1303 msgid "B<MADV_WILLNEED>"
1304 msgstr "B<MADV_WILLNEED>"
1305
1306 #. type: Plain text
1307 #: build/C/man2/madvise.2:89
1308 msgid ""
1309 "Expect access in the near future.  (Hence, it might be a good idea to read "
1310 "some pages ahead.)"
1311 msgstr ""
1312 "近い将来にアクセスされそうだ。 (したがってこれらのページを今のうちに先読みし"
1313 "ておくといいだろう。)"
1314
1315 #. type: TP
1316 #: build/C/man2/madvise.2:89
1317 #, no-wrap
1318 msgid "B<MADV_DONTNEED>"
1319 msgstr "B<MADV_DONTNEED>"
1320
1321 #. type: Plain text
1322 #: build/C/man2/madvise.2:100
1323 msgid ""
1324 "Do not expect access in the near future.  (For the time being, the "
1325 "application is finished with the given range, so the kernel can free "
1326 "resources associated with it.)  Subsequent accesses of pages in this range "
1327 "will succeed, but will result either in reloading of the memory contents "
1328 "from the underlying mapped file (see B<mmap>(2))  or zero-fill-on-demand "
1329 "pages for mappings without an underlying file."
1330 msgstr ""
1331 "しばらくアクセスはなさそうだ。 (現時点でアプリケーションは与えた範囲の処理を"
1332 "終えている。 したがってカーネルはこれに関連するリソースを解放して良い。)  こ"
1333 "れ以降この範囲のページへのアクセスがあると、 成功はするが、メモリの内容をマッ"
1334 "プ元のファイルからロードし直すことになる (B<mmap>(2)  を見よ) か、 または元"
1335 "ファイルがないマップページでは アクセスがあったときに 0 埋めが行われることに"
1336 "なる。"
1337
1338 #. type: TP
1339 #: build/C/man2/madvise.2:100
1340 #, no-wrap
1341 msgid "B<MADV_REMOVE> (Since Linux 2.6.16)"
1342 msgstr "B<MADV_REMOVE> (Linux 2.6.16 以降)"
1343
1344 #.  2.6.18-rc5
1345 #.  Databases want to use this feature to drop a section of their
1346 #.  bufferpool (shared memory segments) - without writing back to
1347 #.  disk/swap space.  This feature is also useful for supporting
1348 #.  hot-plug memory on UML.
1349 #. type: Plain text
1350 #: build/C/man2/madvise.2:113
1351 #, fuzzy
1352 #| msgid ""
1353 #| "Free up a given range of pages and its associated backing store.  "
1354 #| "Currently, only shmfs/tmpfs supports this; other file systems return with "
1355 #| "the error B<ENOSYS>."
1356 msgid ""
1357 "Free up a given range of pages and its associated backing store.  Currently, "
1358 "only shmfs/tmpfs supports this; other filesystems return with the error "
1359 "B<ENOSYS>."
1360 msgstr ""
1361 "指定された範囲のページと関連するバッキングストアを解放する。 現在のところ、 "
1362 "shmfs/tmpfs だけがこれに対応している。 他のファイルシステムでは B<ENOSYS> が"
1363 "返される。"
1364
1365 #. type: TP
1366 #: build/C/man2/madvise.2:113
1367 #, no-wrap
1368 msgid "B<MADV_DONTFORK> (Since Linux 2.6.16)"
1369 msgstr "B<MADV_DONTFORK> (Linux 2.6.16 以降)"
1370
1371 #.  See http://lwn.net/Articles/171941/
1372 #.  [PATCH] madvise MADV_DONTFORK/MADV_DOFORK
1373 #.  Currently, copy-on-write may change the physical address of
1374 #.  a page even if the user requested that the page is pinned in
1375 #.  memory (either by mlock or by get_user_pages).  This happens
1376 #.  if the process forks meanwhile, and the parent writes to that
1377 #.  page.  As a result, the page is orphaned: in case of
1378 #.  get_user_pages, the application will never see any data hardware
1379 #.  DMA's into this page after the COW.  In case of mlock'd memory,
1380 #.  the parent is not getting the realtime/security benefits of mlock.
1381 #.  In particular, this affects the Infiniband modules which do DMA from
1382 #.  and into user pages all the time.
1383 #.  This patch adds madvise options to control whether memory range is
1384 #.  inherited across fork. Useful e.g. for when hardware is doing DMA
1385 #.  from/into these pages.  Could also be useful to an application
1386 #.  wanting to speed up its forks by cutting large areas out of
1387 #.  consideration.
1388 #.  SEE ALSO: http://lwn.net/Articles/171941/
1389 #.  "Tweaks to madvise() and posix_fadvise()", 14 Feb 2006
1390 #. type: Plain text
1391 #: build/C/man2/madvise.2:144
1392 msgid ""
1393 "Do not make the pages in this range available to the child after a B<fork>"
1394 "(2).  This is useful to prevent copy-on-write semantics from changing the "
1395 "physical location of a page(s) if the parent writes to it after a B<fork>"
1396 "(2).  (Such page relocations cause problems for hardware that DMAs into the "
1397 "page(s).)"
1398 msgstr ""
1399 "B<fork>(2)  が行われた後、指定された範囲のページを子プロセスが利用できないよ"
1400 "うにする。 この機能は、書き込み時コピー (copy-on-write) 方式で、 B<fork>(2)  "
1401 "の後で親プロセスがページに書き込みを行った場合に ページの物理位置が変化しない"
1402 "ようにするのに有効である (ページの再配置はハードウェアがそのページに DMA 転送"
1403 "を行うような場合に 問題を起こすことがある)。"
1404
1405 #. type: TP
1406 #: build/C/man2/madvise.2:144
1407 #, no-wrap
1408 msgid "B<MADV_DOFORK> (Since Linux 2.6.16)"
1409 msgstr "B<MADV_DOFORK> (Linux 2.6.16 以降)"
1410
1411 #. type: Plain text
1412 #: build/C/man2/madvise.2:150
1413 msgid ""
1414 "Undo the effect of B<MADV_DONTFORK>, restoring the default behavior, whereby "
1415 "a mapping is inherited across B<fork>(2)."
1416 msgstr ""
1417 "B<MADV_DONTFORK> の影響を取り消し、デフォルトの動作に戻す。 つまり、 B<fork>"
1418 "(2)  の前後でマッピングは継承されるようになる。"
1419
1420 #. type: TP
1421 #: build/C/man2/madvise.2:150
1422 #, no-wrap
1423 msgid "B<MADV_HWPOISON> (Since Linux 2.6.32)"
1424 msgstr "B<MADV_HWPOISON> (Linux 2.6.32 以降)"
1425
1426 #. type: Plain text
1427 #: build/C/man2/madvise.2:162
1428 msgid ""
1429 "Poison a page and handle it like a hardware memory corruption.  This "
1430 "operation is available only for privileged (B<CAP_SYS_ADMIN>)  processes.  "
1431 "This operation may result in the calling process receiving a B<SIGBUS> and "
1432 "the page being unmapped.  This feature is intended for testing of memory "
1433 "error-handling code; it is available only if the kernel was configured with "
1434 "B<CONFIG_MEMORY_FAILURE>."
1435 msgstr ""
1436
1437 #. type: TP
1438 #: build/C/man2/madvise.2:162
1439 #, no-wrap
1440 msgid "B<MADV_SOFT_OFFLINE> (Since Linux 2.6.33)"
1441 msgstr "B<MADV_SOFT_OFFLINE> (Linux 2.6.33 以降)"
1442
1443 #. type: Plain text
1444 #: build/C/man2/madvise.2:180
1445 msgid ""
1446 "Soft offline the pages in the range specified by I<addr> and I<length>.  The "
1447 "memory of each page in the specified range is preserved (i.e., when next "
1448 "accessed, the same content will be visible, but in a new physical page "
1449 "frame), and the original page is offlined (i.e., no longer used, and taken "
1450 "out of normal memory management).  The effect of the B<MADV_SOFT_OFFLINE> "
1451 "operation is invisible to (i.e., does not change the semantics of)  the "
1452 "calling process.  This feature is intended for testing of memory error-"
1453 "handling code; it is available only if the kernel was configured with "
1454 "B<CONFIG_MEMORY_FAILURE>."
1455 msgstr ""
1456
1457 #. type: TP
1458 #: build/C/man2/madvise.2:180
1459 #, no-wrap
1460 msgid "B<MADV_MERGEABLE> (since Linux 2.6.32)"
1461 msgstr "B<MADV_MERGEABLE> (Linux 2.6.32 以降)"
1462
1463 #. type: Plain text
1464 #: build/C/man2/madvise.2:205
1465 msgid ""
1466 "Enable Kernel Samepage Merging (KSM) for the pages in the range specified by "
1467 "I<addr> and I<length>.  The kernel regularly scans those areas of user "
1468 "memory that have been marked as mergeable, looking for pages with identical "
1469 "content.  These are replaced by a single write-protected page (which is "
1470 "automatically copied if a process later wants to update the content of the "
1471 "page).  KSM merges only private anonymous pages (see B<mmap>(2)).  The KSM "
1472 "feature is intended for applications that generate many instances of the "
1473 "same data (e.g., virtualization systems such as KVM).  It can consume a lot "
1474 "of processing power; use with care.  See the Linux kernel source file "
1475 "I<Documentation/vm/ksm.txt> for more details.  The B<MADV_MERGEABLE> and "
1476 "B<MADV_UNMERGEABLE> operations are available only if the kernel was "
1477 "configured with B<CONFIG_KSM>."
1478 msgstr ""
1479
1480 #. type: TP
1481 #: build/C/man2/madvise.2:205
1482 #, no-wrap
1483 msgid "B<MADV_UNMERGEABLE> (since Linux 2.6.32)"
1484 msgstr "B<MADV_UNMERGEABLE> (Linux 2.6.32 以降)"
1485
1486 #. type: Plain text
1487 #: build/C/man2/madvise.2:214
1488 msgid ""
1489 "Undo the effect of an earlier B<MADV_MERGEABLE> operation on the specified "
1490 "address range; KSM unmerges whatever pages it had merged in the address "
1491 "range specified by I<addr> and I<length>."
1492 msgstr ""
1493
1494 #. type: TP
1495 #: build/C/man2/madvise.2:214
1496 #, no-wrap
1497 msgid "B<MADV_HUGEPAGE> (since Linux 2.6.38)"
1498 msgstr "B<MADV_HUGEPAGE> (Linux 2.6.38 以降)"
1499
1500 #.  http://lwn.net/Articles/358904/
1501 #.  https://lwn.net/Articles/423584/
1502 #. type: Plain text
1503 #: build/C/man2/madvise.2:243
1504 msgid ""
1505 "Enables Transparent Huge Pages (THP) for pages in the range specified by "
1506 "I<addr> and I<length>.  Currently, Transparent Huge Pages work only with "
1507 "private anonymous pages (see B<mmap>(2)).  The kernel will regularly scan "
1508 "the areas marked as huge page candidates to replace them with huge pages.  "
1509 "The kernel will also allocate huge pages directly when the region is "
1510 "naturally aligned to the huge page size (see B<posix_memalign>(2)).  This "
1511 "feature is primarily aimed at applications that use large mappings of data "
1512 "and access large regions of that memory at a time (e.g., virtualization "
1513 "systems such as QEMU).  It can very easily waste memory (e.g., a 2MB mapping "
1514 "that only ever accesses 1 byte will result in 2MB of wired memory instead of "
1515 "one 4KB page).  See the Linux kernel source file I<Documentation/vm/"
1516 "transhuge.txt> for more details.  The B<MADV_HUGEPAGE> and "
1517 "B<MADV_NOHUGEPAGE> operations are available only if the kernel was "
1518 "configured with B<CONFIG_TRANSPARENT_HUGEPAGE>."
1519 msgstr ""
1520
1521 #. type: TP
1522 #: build/C/man2/madvise.2:243
1523 #, no-wrap
1524 msgid "B<MADV_NOHUGEPAGE> (since Linux 2.6.38)"
1525 msgstr "B<MADV_NOHUGEPAGE> (Linux 2.6.38 以降)"
1526
1527 #. type: Plain text
1528 #: build/C/man2/madvise.2:250
1529 msgid ""
1530 "Ensures that memory in the address range specified by I<addr> and I<length> "
1531 "will not be collapsed into huge pages."
1532 msgstr ""
1533
1534 #. type: TP
1535 #: build/C/man2/madvise.2:250
1536 #, no-wrap
1537 msgid "B<MADV_DONTDUMP> (since Linux 3.4)"
1538 msgstr "B<MADV_DONTDUMP> (Linux 3.4 以降)"
1539
1540 #. type: Plain text
1541 #: build/C/man2/madvise.2:264
1542 msgid ""
1543 "Exclude from a core dump those pages in the range specified by I<addr> and "
1544 "I<length>.  This is useful in applications that have large areas of memory "
1545 "that are known not to be useful in a core dump.  The effect of "
1546 "B<MADV_DONTDUMP> takes precedence over the bit mask that is set via the I</"
1547 "proc/PID/coredump_filter> file (see B<core>(5))."
1548 msgstr ""
1549
1550 #. type: TP
1551 #: build/C/man2/madvise.2:264
1552 #, no-wrap
1553 msgid "B<MADV_DODUMP> (since Linux 3.4)"
1554 msgstr "B<MADV_DODUMP> (Linux 3.4 以降)"
1555
1556 #. type: Plain text
1557 #: build/C/man2/madvise.2:268
1558 msgid "Undo the effect of an earlier B<MADV_DONTDUMP>."
1559 msgstr ""
1560
1561 #. type: Plain text
1562 #: build/C/man2/madvise.2:275
1563 msgid ""
1564 "On success B<madvise>()  returns zero.  On error, it returns -1 and I<errno> "
1565 "is set appropriately."
1566 msgstr ""
1567 "B<madvise>()  は成功すると 0 を返す。 エラーが起こると -1 を返し、 I<errno> "
1568 "を適切な値に設定する。"
1569
1570 #. type: TP
1571 #: build/C/man2/madvise.2:276 build/C/man2/mlock.2:154 build/C/man2/mmap.2:413
1572 #: build/C/man2/mremap.2:136
1573 #, no-wrap
1574 msgid "B<EAGAIN>"
1575 msgstr "B<EAGAIN>"
1576
1577 #. type: Plain text
1578 #: build/C/man2/madvise.2:279
1579 msgid "A kernel resource was temporarily unavailable."
1580 msgstr "何らかのカーネルリソースが一時的に利用できなかった。"
1581
1582 #. type: Plain text
1583 #: build/C/man2/madvise.2:282
1584 msgid "The map exists, but the area maps something that isn't a file."
1585 msgstr "指定したマップは存在するが、ファイルではないところをマップしている。"
1586
1587 #. type: Plain text
1588 #: build/C/man2/madvise.2:285
1589 msgid "This error can occur for the following reasons:"
1590 msgstr "このエラーは以下の理由で発生する。"
1591
1592 #. type: IP
1593 #: build/C/man2/madvise.2:286 build/C/man2/madvise.2:292
1594 #: build/C/man2/madvise.2:295 build/C/man2/madvise.2:298
1595 #: build/C/man2/madvise.2:301 build/C/man3/mallopt.3:235
1596 #: build/C/man3/mallopt.3:241
1597 #, no-wrap
1598 msgid "*"
1599 msgstr "*"
1600
1601 #.  .I len
1602 #.  is zero,
1603 #. type: Plain text
1604 #: build/C/man2/madvise.2:292
1605 msgid "The value I<len> is negative."
1606 msgstr "I<len> が負の値である。"
1607
1608 #. type: Plain text
1609 #: build/C/man2/madvise.2:295
1610 msgid "I<addr> is not page-aligned."
1611 msgstr "I<addr> がページ境界ではない。"
1612
1613 #. type: Plain text
1614 #: build/C/man2/madvise.2:298
1615 msgid "I<advice> is not a valid value"
1616 msgstr "I<advice> が有効な値でない。"
1617
1618 #. type: Plain text
1619 #: build/C/man2/madvise.2:301
1620 msgid ""
1621 "The application is attempting to release locked or shared pages (with "
1622 "B<MADV_DONTNEED>)."
1623 msgstr ""
1624 "アプリケーションがロックされたページや共有ページを (B<MADV_DONTNEED> で) 解"
1625 "放\n"
1626 "しようとしている。"
1627
1628 #. type: Plain text
1629 #: build/C/man2/madvise.2:309
1630 msgid ""
1631 "B<MADV_MERGEABLE> or B<MADV_UNMERGEABLE> was specified in I<advice>, but the "
1632 "kernel was not configured with B<CONFIG_KSM>."
1633 msgstr ""
1634 "I<advice> に B<MADV_MERGEABLE> か B<MADV_UNMERGEABLE> が指定されたが、 カーネ"
1635 "ルの設定が B<CONFIG_KSM> が有効になっていなかった。"
1636
1637 #. type: Plain text
1638 #: build/C/man2/madvise.2:316
1639 msgid ""
1640 "(for B<MADV_WILLNEED>)  Paging in this area would exceed the process's "
1641 "maximum resident set size."
1642 msgstr ""
1643 "(B<MADV_WILLNEED> の場合) この範囲のページングを行うと、 プロセスの RSS "
1644 "(resident set size) の最大値を越えてしまう。"
1645
1646 #. type: TP
1647 #: build/C/man2/madvise.2:316 build/C/man2/madvise.2:321
1648 #: build/C/man2/mlock.2:123 build/C/man2/mlock.2:131 build/C/man2/mlock.2:169
1649 #: build/C/man2/mmap.2:456 build/C/man2/mprotect.2:100
1650 #: build/C/man2/mprotect.2:103 build/C/man2/mremap.2:179
1651 #: build/C/man2/msync.2:93 build/C/man3/posix_memalign.3:164
1652 #: build/C/man2/shmctl.2:333 build/C/man2/shmget.2:214
1653 #: build/C/man2/shmop.2:214 build/C/man2/subpage_prot.2:87
1654 #: build/C/man2/sync_file_range.2:163
1655 #, no-wrap
1656 msgid "B<ENOMEM>"
1657 msgstr "B<ENOMEM>"
1658
1659 #. type: Plain text
1660 #: build/C/man2/madvise.2:321
1661 msgid "(for B<MADV_WILLNEED>)  Not enough memory: paging in failed."
1662 msgstr "(B<MADV_WILLNEED> の場合) メモリが足りず、ページングに失敗した。"
1663
1664 #. type: Plain text
1665 #: build/C/man2/madvise.2:325
1666 msgid ""
1667 "Addresses in the specified range are not currently mapped, or are outside "
1668 "the address space of the process."
1669 msgstr ""
1670 "指定した範囲のアドレスが、現在マップされていない。 あるいはプロセスのアドレス"
1671 "空間の内部にない。"
1672
1673 #.  FIXME . Write a posix_madvise(3) page.
1674 #. type: Plain text
1675 #: build/C/man2/madvise.2:337
1676 msgid ""
1677 "POSIX.1b.  POSIX.1-2001 describes B<posix_madvise>(3)  with constants "
1678 "B<POSIX_MADV_NORMAL>, etc., with a behavior close to that described here.  "
1679 "There is a similar B<posix_fadvise>(2)  for file access."
1680 msgstr ""
1681 "POSIX.1b.  POSIX.1-2001 では、 B<posix_madvise>(3)  を B<POSIX_MADV_NORMAL> "
1682 "などの定数とともに記述していた (それぞれの振る舞いはここで述べたものに近"
1683 "い)。 ファイルアクセスに対しても B<posix_fadvise>(2)  という類似の関数が存在"
1684 "する。"
1685
1686 #. type: Plain text
1687 #: build/C/man2/madvise.2:346
1688 msgid ""
1689 "B<MADV_REMOVE>, B<MADV_DONTFORK>, B<MADV_DOFORK>, B<MADV_HWPOISON>, "
1690 "B<MADV_MERGEABLE>, and B<MADV_UNMERGEABLE> are Linux-specific."
1691 msgstr ""
1692 "B<MADV_REMOVE>, B<MADV_DONTFORK>, B<MADV_DOFORK>, B<MADV_HWPOISON>,\n"
1693 "B<MADV_MERGEABLE>, B<MADV_UNMERGEABLE> は Linux 固有である。"
1694
1695 #. type: SS
1696 #: build/C/man2/madvise.2:347 build/C/man2/mlock.2:267
1697 #: build/C/man2/shmget.2:294
1698 #, no-wrap
1699 msgid "Linux notes"
1700 msgstr "Linux での注意"
1701
1702 #. type: Plain text
1703 #: build/C/man2/madvise.2:355
1704 msgid ""
1705 "The current Linux implementation (2.4.0) views this system call more as a "
1706 "command than as advice and hence may return an error when it cannot do what "
1707 "it usually would do in response to this advice.  (See the ERRORS description "
1708 "above.)  This is nonstandard behavior."
1709 msgstr ""
1710 "現在の Linux の実装 (2.4.0) では、 このシステムコールをアドバイスというよりは"
1711 "命令と見ている。 したがってこのアドバイスに対して通常行われる動作が不可能な場"
1712 "合は、 エラーを返すことがある (上記の エラー の記述を参照)。 この振舞いは標準"
1713 "とは異なる。"
1714
1715 #.  .SH HISTORY
1716 #.  The
1717 #.  .BR madvise ()
1718 #.  function first appeared in 4.4BSD.
1719 #. type: Plain text
1720 #: build/C/man2/madvise.2:371
1721 msgid ""
1722 "The Linux implementation requires that the address I<addr> be page-aligned, "
1723 "and allows I<length> to be zero.  If there are some parts of the specified "
1724 "address range that are not mapped, the Linux version of B<madvise>()  "
1725 "ignores them and applies the call to the rest (but returns B<ENOMEM> from "
1726 "the system call, as it should)."
1727 msgstr ""
1728 "Linux の実装では I<addr> のアドレスはページ境界の値でなければならない。また "
1729 "I<length> は 0 であっても構わない。 また Linux 版の B<madvise>()  では、指定"
1730 "されたアドレス範囲にマップされていない部分があると、 これらを無視して残りの部"
1731 "分にアドバイスを適用する (しかしシステムコールに対してはちゃんと B<ENOMEM> を"
1732 "返す)。"
1733
1734 #. type: Plain text
1735 #: build/C/man2/madvise.2:379
1736 msgid ""
1737 "B<getrlimit>(2), B<mincore>(2), B<mmap>(2), B<mprotect>(2), B<msync>(2), "
1738 "B<munmap>(2), B<core>(5)"
1739 msgstr ""
1740 "B<getrlimit>(2), B<mincore>(2), B<mmap>(2), B<mprotect>(2), B<msync>(2), "
1741 "B<munmap>(2), B<core>(5)"
1742
1743 #. type: TH
1744 #: build/C/man3/mallinfo.3:26
1745 #, no-wrap
1746 msgid "MALLINFO"
1747 msgstr "MALLINFO"
1748
1749 #. type: TH
1750 #: build/C/man3/mallinfo.3:26 build/C/man3/malloc_stats.3:26
1751 #, no-wrap
1752 msgid "2012-05-06"
1753 msgstr "2012-05-06"
1754
1755 #. type: Plain text
1756 #: build/C/man3/mallinfo.3:29
1757 msgid "mallinfo - obtain memory allocation information"
1758 msgstr "mallinfo - メモリ割り当て情報を取得する"
1759
1760 #. type: Plain text
1761 #: build/C/man3/mallinfo.3:31 build/C/man3/malloc_stats.3:31
1762 #: build/C/man3/malloc_trim.3:31 build/C/man3/malloc_usable_size.3:30
1763 #: build/C/man3/mallopt.3:31
1764 msgid "B<#include E<lt>malloc.hE<gt>>"
1765 msgstr "B<#include E<lt>malloc.hE<gt>>"
1766
1767 #. type: Plain text
1768 #: build/C/man3/mallinfo.3:33
1769 msgid "B<struct mallinfo mallinfo(void);>"
1770 msgstr "B<struct mallinfo mallinfo(void);>"
1771
1772 #. type: Plain text
1773 #: build/C/man3/mallinfo.3:41
1774 msgid ""
1775 "The B<mallinfo>()  function returns a copy of a structure containing "
1776 "information about memory allocations performed by B<malloc>(3)  and related "
1777 "functions.  This structure is defined as follows:"
1778 msgstr ""
1779 "B<mallinfo>() 関数は、 B<malloc>(3) や一連の関数により実行されたメモリ\n"
1780 "割り当てに関する情報を格納した構造体のコピーを返す。\n"
1781 "この構造体は以下のように定義されている。"
1782
1783 #. type: Plain text
1784 #: build/C/man3/mallinfo.3:56
1785 #, no-wrap
1786 msgid ""
1787 "struct mallinfo {\n"
1788 "    int arena;     /* Non-mmapped space allocated (bytes) */\n"
1789 "    int ordblks;   /* Number of free chunks */\n"
1790 "    int smblks;    /* Number of free fastbin blocks */\n"
1791 "    int hblks;     /* Number of mmapped regions */\n"
1792 "    int hblkhd;    /* Space allocated in mmapped regions (bytes) */\n"
1793 "    int usmblks;   /* Maximum total allocated space (bytes) */\n"
1794 "    int fsmblks;   /* Space in freed fastbin blocks (bytes) */\n"
1795 "    int uordblks;  /* Total allocated space (bytes) */\n"
1796 "    int fordblks;  /* Total free space (bytes) */\n"
1797 "    int keepcost;  /* Top-most, releasable space (bytes) */\n"
1798 "};\n"
1799 msgstr ""
1800 "struct mallinfo {\n"
1801 "    int arena;     /* Non-mmapped space allocated (bytes) */\n"
1802 "    int ordblks;   /* Number of free chunks */\n"
1803 "    int smblks;    /* Number of free fastbin blocks */\n"
1804 "    int hblks;     /* Number of mmapped regions */\n"
1805 "    int hblkhd;    /* Space allocated in mmapped regions (bytes) */\n"
1806 "    int usmblks;   /* Maximum total allocated space (bytes) */\n"
1807 "    int fsmblks;   /* Space in freed fastbin blocks (bytes) */\n"
1808 "    int uordblks;  /* Total allocated space (bytes) */\n"
1809 "    int fordblks;  /* Total free space (bytes) */\n"
1810 "    int keepcost;  /* Top-most, releasable space (bytes) */\n"
1811 "};\n"
1812
1813 #. type: Plain text
1814 #: build/C/man3/mallinfo.3:62
1815 msgid ""
1816 "The fields of the I<mallinfo> structure contain the following information:"
1817 msgstr "I<mallinfo> 構造体の各フィールドには以下の情報が格納される。"
1818
1819 #. type: TP
1820 #: build/C/man3/mallinfo.3:62
1821 #, no-wrap
1822 msgid "I<arena>"
1823 msgstr "I<arena>"
1824
1825 #. type: Plain text
1826 #: build/C/man3/mallinfo.3:68
1827 msgid ""
1828 "The total amount of memory allocated by means other than B<mmap>(2)  (i.e., "
1829 "memory allocated on the heap).  This figure includes both in-use blocks and "
1830 "blocks on the free list."
1831 msgstr ""
1832
1833 #. type: TP
1834 #: build/C/man3/mallinfo.3:68
1835 #, no-wrap
1836 msgid "I<ordblks>"
1837 msgstr "I<ordblks>"
1838
1839 #. type: Plain text
1840 #: build/C/man3/mallinfo.3:71
1841 msgid "The number of ordinary (i.e., non-fastbin) free blocks."
1842 msgstr ""
1843
1844 #. type: TP
1845 #: build/C/man3/mallinfo.3:71
1846 #, no-wrap
1847 msgid "I<smblks>"
1848 msgstr "I<smblks>"
1849
1850 #. type: Plain text
1851 #: build/C/man3/mallinfo.3:75
1852 msgid "The number of fastbin free blocks (see B<mallopt>(3))."
1853 msgstr ""
1854
1855 #. type: TP
1856 #: build/C/man3/mallinfo.3:75
1857 #, no-wrap
1858 msgid "I<hblks>"
1859 msgstr "I<hblks>"
1860
1861 #. type: Plain text
1862 #: build/C/man3/mallinfo.3:83
1863 msgid ""
1864 "The number of blocks currently allocated using B<mmap>(2).  (See the "
1865 "discussion of B<M_MMAP_THRESHOLD> in B<mallopt>(3).)"
1866 msgstr ""
1867
1868 #. type: TP
1869 #: build/C/man3/mallinfo.3:83
1870 #, no-wrap
1871 msgid "I<hblkhd>"
1872 msgstr "I<hblkhd>"
1873
1874 #. type: Plain text
1875 #: build/C/man3/mallinfo.3:87
1876 msgid "The number of bytes in blocks currently allocated using B<mmap>(2)."
1877 msgstr ""
1878
1879 #. type: TP
1880 #: build/C/man3/mallinfo.3:87
1881 #, no-wrap
1882 msgid "I<usmblks>"
1883 msgstr "I<usmblks>"
1884
1885 #. type: Plain text
1886 #: build/C/man3/mallinfo.3:92
1887 msgid ""
1888 "The \"highwater mark\" for allocated space\\(emthat is, the maximum amount "
1889 "of space that was ever allocated.  This field is maintained only in "
1890 "nonthreading environments."
1891 msgstr ""
1892
1893 #. type: TP
1894 #: build/C/man3/mallinfo.3:92
1895 #, no-wrap
1896 msgid "I<fsmblks>"
1897 msgstr "I<fsmblks>"
1898
1899 #. type: Plain text
1900 #: build/C/man3/mallinfo.3:95
1901 msgid "The total number of bytes in fastbin free blocks."
1902 msgstr ""
1903
1904 #. type: TP
1905 #: build/C/man3/mallinfo.3:95
1906 #, no-wrap
1907 msgid "I<uordblks>"
1908 msgstr "I<uordblks>"
1909
1910 #. type: Plain text
1911 #: build/C/man3/mallinfo.3:98
1912 msgid "The total number of bytes used by in-use allocations."
1913 msgstr ""
1914
1915 #. type: TP
1916 #: build/C/man3/mallinfo.3:98
1917 #, no-wrap
1918 msgid "I<fordblks>"
1919 msgstr "I<fordblks>"
1920
1921 #. type: Plain text
1922 #: build/C/man3/mallinfo.3:101
1923 msgid "The total number of bytes in free blocks."
1924 msgstr ""
1925
1926 #. type: TP
1927 #: build/C/man3/mallinfo.3:101
1928 #, no-wrap
1929 msgid "I<keepcost>"
1930 msgstr "I<keepcost>"
1931
1932 #.  .SH VERSIONS
1933 #.  Available already in glibc 2.0, possibly earlier
1934 #. type: Plain text
1935 #: build/C/man3/mallinfo.3:110
1936 msgid ""
1937 "The total amount of releasable free space at the top of the heap.  This is "
1938 "the maximum number of bytes that could ideally (i.e., ignoring page "
1939 "alignment restrictions, and so on) be released by B<malloc_trim>(3)."
1940 msgstr ""
1941
1942 #. type: Plain text
1943 #: build/C/man3/mallinfo.3:114
1944 msgid ""
1945 "This function is not specified by POSIX or the C standards.  A similar "
1946 "function exists on many System V derivatives, and was specified in the SVID."
1947 msgstr ""
1948
1949 #.  FIXME http://sourceware.org/bugzilla/show_bug.cgi?id=208
1950 #.  See the 24 Aug 2011 mail by Paul Pluzhnikov:
1951 #.      "[patch] Fix mallinfo() to accumulate results for all arenas"
1952 #.  on libc-alpha@sourceware.org
1953 #. type: Plain text
1954 #: build/C/man3/mallinfo.3:126
1955 msgid ""
1956 "B<Information is returned for only the main memory allocation area.> "
1957 "Allocations in other arenas are excluded.  See B<malloc_stats>(3)  and "
1958 "B<malloc_info>(3)  for alternatives that include information about other "
1959 "arenas."
1960 msgstr ""
1961
1962 #. type: Plain text
1963 #: build/C/man3/mallinfo.3:134
1964 msgid ""
1965 "The fields of the I<mallinfo> structure are typed as I<int>.  However, "
1966 "because some internal bookkeeping values may be of type I<long>, the "
1967 "reported values may wrap around zero and thus be inaccurate."
1968 msgstr ""
1969
1970 #. type: SH
1971 #: build/C/man3/mallinfo.3:134 build/C/man3/malloc_hook.3:89
1972 #: build/C/man3/malloc_info.3:84 build/C/man3/mallopt.3:466
1973 #: build/C/man3/mcheck.3:159 build/C/man2/mmap.2:630
1974 #: build/C/man2/mprotect.2:148 build/C/man3/mtrace.3:108
1975 #, no-wrap
1976 msgid "EXAMPLE"
1977 msgstr "例"
1978
1979 #. type: Plain text
1980 #: build/C/man3/mallinfo.3:140
1981 msgid ""
1982 "The program below employs B<mallinfo>()  to retrieve memory allocation "
1983 "statistics before and after allocating and freeing some blocks of memory.  "
1984 "The statistics are displayed on standard output."
1985 msgstr ""
1986
1987 #. type: Plain text
1988 #: build/C/man3/mallinfo.3:144
1989 msgid ""
1990 "The first two command-line arguments specify the number and size of blocks "
1991 "to be allocated with B<malloc>(3)."
1992 msgstr ""
1993
1994 #. type: Plain text
1995 #: build/C/man3/mallinfo.3:158
1996 msgid ""
1997 "The remaining three arguments specify which of the allocated blocks should "
1998 "be freed with B<free>(3).  These three arguments are optional, and specify "
1999 "(in order): the step size to be used in the loop that frees blocks (the "
2000 "default is 1, meaning free all blocks in the range); the ordinal position of "
2001 "the first block to be freed (default 0, meaning the first allocated block); "
2002 "and a number one greater than the ordinal position of the last block to be "
2003 "freed (default is one greater than the maximum block number).  If these "
2004 "three arguments are omitted, then the defaults cause all allocated blocks to "
2005 "be freed."
2006 msgstr ""
2007
2008 #. type: Plain text
2009 #: build/C/man3/mallinfo.3:162
2010 msgid ""
2011 "In the following example run of the program, 1000 allocations of 100 bytes "
2012 "are performed, and then every second allocated block is freed:"
2013 msgstr ""
2014
2015 #. type: Plain text
2016 #: build/C/man3/mallinfo.3:177
2017 #, no-wrap
2018 msgid ""
2019 "$ B<./a.out 1000 100 2>\n"
2020 "============== Before allocating blocks ==============\n"
2021 "Total non-mmapped bytes (arena):       0\n"
2022 "# of free chunks (ordblks):            1\n"
2023 "# of free fastbin blocks (smblks):     0\n"
2024 "# of mapped regions (hblks):           0\n"
2025 "Bytes in mapped regions (hblkhd):      0\n"
2026 "Max. total allocated space (usmblks):  0\n"
2027 "Free bytes held in fastbins (fsmblks): 0\n"
2028 "Total allocated space (uordblks):      0\n"
2029 "Total free space (fordblks):           0\n"
2030 "Topmost releasable block (keepcost):   0\n"
2031 msgstr ""
2032 "$ B<./a.out 1000 100 2>\n"
2033 "============== Before allocating blocks ==============\n"
2034 "Total non-mmapped bytes (arena):       0\n"
2035 "# of free chunks (ordblks):            1\n"
2036 "# of free fastbin blocks (smblks):     0\n"
2037 "# of mapped regions (hblks):           0\n"
2038 "Bytes in mapped regions (hblkhd):      0\n"
2039 "Max. total allocated space (usmblks):  0\n"
2040 "Free bytes held in fastbins (fsmblks): 0\n"
2041 "Total allocated space (uordblks):      0\n"
2042 "Total free space (fordblks):           0\n"
2043 "Topmost releasable block (keepcost):   0\n"
2044
2045 #. type: Plain text
2046 #: build/C/man3/mallinfo.3:189
2047 #, no-wrap
2048 msgid ""
2049 "============== After allocating blocks ==============\n"
2050 "Total non-mmapped bytes (arena):       135168\n"
2051 "# of free chunks (ordblks):            1\n"
2052 "# of free fastbin blocks (smblks):     0\n"
2053 "# of mapped regions (hblks):           0\n"
2054 "Bytes in mapped regions (hblkhd):      0\n"
2055 "Max. total allocated space (usmblks):  0\n"
2056 "Free bytes held in fastbins (fsmblks): 0\n"
2057 "Total allocated space (uordblks):      104000\n"
2058 "Total free space (fordblks):           31168\n"
2059 "Topmost releasable block (keepcost):   31168\n"
2060 msgstr ""
2061 "============== After allocating blocks ==============\n"
2062 "Total non-mmapped bytes (arena):       135168\n"
2063 "# of free chunks (ordblks):            1\n"
2064 "# of free fastbin blocks (smblks):     0\n"
2065 "# of mapped regions (hblks):           0\n"
2066 "Bytes in mapped regions (hblkhd):      0\n"
2067 "Max. total allocated space (usmblks):  0\n"
2068 "Free bytes held in fastbins (fsmblks): 0\n"
2069 "Total allocated space (uordblks):      104000\n"
2070 "Total free space (fordblks):           31168\n"
2071 "Topmost releasable block (keepcost):   31168\n"
2072
2073 #. type: Plain text
2074 #: build/C/man3/mallinfo.3:201
2075 #, no-wrap
2076 msgid ""
2077 "============== After freeing blocks ==============\n"
2078 "Total non-mmapped bytes (arena):       135168\n"
2079 "# of free chunks (ordblks):            501\n"
2080 "# of free fastbin blocks (smblks):     0\n"
2081 "# of mapped regions (hblks):           0\n"
2082 "Bytes in mapped regions (hblkhd):      0\n"
2083 "Max. total allocated space (usmblks):  0\n"
2084 "Free bytes held in fastbins (fsmblks): 0\n"
2085 "Total allocated space (uordblks):      52000\n"
2086 "Total free space (fordblks):           83168\n"
2087 "Topmost releasable block (keepcost):   31168\n"
2088 msgstr ""
2089 "============== After freeing blocks ==============\n"
2090 "Total non-mmapped bytes (arena):       135168\n"
2091 "# of free chunks (ordblks):            501\n"
2092 "# of free fastbin blocks (smblks):     0\n"
2093 "# of mapped regions (hblks):           0\n"
2094 "Bytes in mapped regions (hblkhd):      0\n"
2095 "Max. total allocated space (usmblks):  0\n"
2096 "Free bytes held in fastbins (fsmblks): 0\n"
2097 "Total allocated space (uordblks):      52000\n"
2098 "Total free space (fordblks):           83168\n"
2099 "Topmost releasable block (keepcost):   31168\n"
2100
2101 #. type: SS
2102 #: build/C/man3/mallinfo.3:203 build/C/man3/malloc_info.3:167
2103 #: build/C/man3/mallopt.3:532 build/C/man3/mcheck.3:176
2104 #: build/C/man2/mprotect.2:165
2105 #, no-wrap
2106 msgid "Program source"
2107 msgstr "プログラムのソース"
2108
2109 #. type: Plain text
2110 #: build/C/man3/mallinfo.3:208
2111 #, no-wrap
2112 msgid ""
2113 "#include E<lt>malloc.hE<gt>\n"
2114 "#include \"tlpi_hdr.h\"\n"
2115 msgstr ""
2116 "#include E<lt>malloc.hE<gt>\n"
2117 "#include \"tlpi_hdr.h\"\n"
2118
2119 #. type: Plain text
2120 #: build/C/man3/mallinfo.3:213
2121 #, no-wrap
2122 msgid ""
2123 "static void\n"
2124 "display_mallinfo(void)\n"
2125 "{\n"
2126 "    struct mallinfo mi;\n"
2127 msgstr ""
2128 "static void\n"
2129 "display_mallinfo(void)\n"
2130 "{\n"
2131 "    struct mallinfo mi;\n"
2132
2133 #. type: Plain text
2134 #: build/C/man3/mallinfo.3:215
2135 #, no-wrap
2136 msgid "    mi = mallinfo();\n"
2137 msgstr "    mi = mallinfo();\n"
2138
2139 #. type: Plain text
2140 #: build/C/man3/mallinfo.3:227
2141 #, no-wrap
2142 msgid ""
2143 "    printf(\"Total non-mmapped bytes (arena):       %d\\en\", mi.arena);\n"
2144 "    printf(\"# of free chunks (ordblks):            %d\\en\", mi.ordblks);\n"
2145 "    printf(\"# of free fastbin blocks (smblks):     %d\\en\", mi.smblks);\n"
2146 "    printf(\"# of mapped regions (hblks):           %d\\en\", mi.hblks);\n"
2147 "    printf(\"Bytes in mapped regions (hblkhd):      %d\\en\", mi.hblkhd);\n"
2148 "    printf(\"Max. total allocated space (usmblks):  %d\\en\", mi.usmblks);\n"
2149 "    printf(\"Free bytes held in fastbins (fsmblks): %d\\en\", mi.fsmblks);\n"
2150 "    printf(\"Total allocated space (uordblks):      %d\\en\", mi.uordblks);\n"
2151 "    printf(\"Total free space (fordblks):           %d\\en\", mi.fordblks);\n"
2152 "    printf(\"Topmost releasable block (keepcost):   %d\\en\", mi.keepcost);\n"
2153 "}\n"
2154 msgstr ""
2155 "    printf(\"Total non-mmapped bytes (arena):       %d\\en\", mi.arena);\n"
2156 "    printf(\"# of free chunks (ordblks):            %d\\en\", mi.ordblks);\n"
2157 "    printf(\"# of free fastbin blocks (smblks):     %d\\en\", mi.smblks);\n"
2158 "    printf(\"# of mapped regions (hblks):           %d\\en\", mi.hblks);\n"
2159 "    printf(\"Bytes in mapped regions (hblkhd):      %d\\en\", mi.hblkhd);\n"
2160 "    printf(\"Max. total allocated space (usmblks):  %d\\en\", mi.usmblks);\n"
2161 "    printf(\"Free bytes held in fastbins (fsmblks): %d\\en\", mi.fsmblks);\n"
2162 "    printf(\"Total allocated space (uordblks):      %d\\en\", mi.uordblks);\n"
2163 "    printf(\"Total free space (fordblks):           %d\\en\", mi.fordblks);\n"
2164 "    printf(\"Topmost releasable block (keepcost):   %d\\en\", mi.keepcost);\n"
2165 "}\n"
2166
2167 #. type: Plain text
2168 #: build/C/man3/mallinfo.3:235
2169 #, no-wrap
2170 msgid ""
2171 "int\n"
2172 "main(int argc, char *argv[])\n"
2173 "{\n"
2174 "#define MAX_ALLOCS 2000000\n"
2175 "    char *alloc[MAX_ALLOCS];\n"
2176 "    int numBlocks, j, freeBegin, freeEnd, freeStep;\n"
2177 "    size_t blockSize;\n"
2178 msgstr ""
2179 "int\n"
2180 "main(int argc, char *argv[])\n"
2181 "{\n"
2182 "#define MAX_ALLOCS 2000000\n"
2183 "    char *alloc[MAX_ALLOCS];\n"
2184 "    int numBlocks, j, freeBegin, freeEnd, freeStep;\n"
2185 "    size_t blockSize;\n"
2186
2187 #. type: Plain text
2188 #: build/C/man3/mallinfo.3:239
2189 #, no-wrap
2190 msgid ""
2191 "    if (argc E<lt> 3 || strcmp(argv[1], \"--help\") == 0)\n"
2192 "        usageErr(\"%s num-blocks block-size [free-step [start-free \"\n"
2193 "                \"[end-free]]]\\en\", argv[0]);\n"
2194 msgstr ""
2195 "    if (argc E<lt> 3 || strcmp(argv[1], \"--help\") == 0)\n"
2196 "        usageErr(\"%s num-blocks block-size [free-step [start-free \"\n"
2197 "                \"[end-free]]]\\en\", argv[0]);\n"
2198
2199 #. type: Plain text
2200 #: build/C/man3/mallinfo.3:245
2201 #, no-wrap
2202 msgid ""
2203 "    numBlocks = atoi(argv[1]);\n"
2204 "    blockSize = atoi(argv[2]);\n"
2205 "    freeStep = (argc E<gt> 3) ? atoi(argv[3]) : 1;\n"
2206 "    freeBegin = (argc E<gt> 4) ? atoi(argv[4]) : 0;\n"
2207 "    freeEnd = (argc E<gt> 5) ? atoi(argv[5]) : numBlocks;\n"
2208 msgstr ""
2209 "    numBlocks = atoi(argv[1]);\n"
2210 "    blockSize = atoi(argv[2]);\n"
2211 "    freeStep = (argc E<gt> 3) ? atoi(argv[3]) : 1;\n"
2212 "    freeBegin = (argc E<gt> 4) ? atoi(argv[4]) : 0;\n"
2213 "    freeEnd = (argc E<gt> 5) ? atoi(argv[5]) : numBlocks;\n"
2214
2215 #. type: Plain text
2216 #: build/C/man3/mallinfo.3:248
2217 #, no-wrap
2218 msgid ""
2219 "    printf(\"============== Before allocating blocks ==============\\en\");\n"
2220 "    display_mallinfo();\n"
2221 msgstr ""
2222 "    printf(\"============== Before allocating blocks ==============\\en\");\n"
2223 "    display_mallinfo();\n"
2224
2225 #. type: Plain text
2226 #: build/C/man3/mallinfo.3:252
2227 #, no-wrap
2228 msgid ""
2229 "    for (j = 0; j E<lt> numBlocks; j++) {\n"
2230 "        if (numBlocks E<gt>= MAX_ALLOCS)\n"
2231 "            fatal(\"Too many allocations\");\n"
2232 msgstr ""
2233 "    for (j = 0; j E<lt> numBlocks; j++) {\n"
2234 "        if (numBlocks E<gt>= MAX_ALLOCS)\n"
2235 "            fatal(\"Too many allocations\");\n"
2236
2237 #. type: Plain text
2238 #: build/C/man3/mallinfo.3:257
2239 #, no-wrap
2240 msgid ""
2241 "        alloc[j] = malloc(blockSize);\n"
2242 "        if (alloc[j] == NULL)\n"
2243 "            errExit(\"malloc\");\n"
2244 "    }\n"
2245 msgstr ""
2246 "        alloc[j] = malloc(blockSize);\n"
2247 "        if (alloc[j] == NULL)\n"
2248 "            errExit(\"malloc\");\n"
2249 "    }\n"
2250
2251 #. type: Plain text
2252 #: build/C/man3/mallinfo.3:260
2253 #, no-wrap
2254 msgid ""
2255 "    printf(\"\\en============== After allocating blocks ==============\\en\");\n"
2256 "    display_mallinfo();\n"
2257 msgstr ""
2258 "    printf(\"\\en============== After allocating blocks ==============\\en\");\n"
2259 "    display_mallinfo();\n"
2260
2261 #. type: Plain text
2262 #: build/C/man3/mallinfo.3:263
2263 #, no-wrap
2264 msgid ""
2265 "    for (j = freeBegin; j E<lt> freeEnd; j += freeStep)\n"
2266 "        free(alloc[j]);\n"
2267 msgstr ""
2268 "    for (j = freeBegin; j E<lt> freeEnd; j += freeStep)\n"
2269 "        free(alloc[j]);\n"
2270
2271 #. type: Plain text
2272 #: build/C/man3/mallinfo.3:266
2273 #, no-wrap
2274 msgid ""
2275 "    printf(\"\\en============== After freeing blocks ==============\\en\");\n"
2276 "    display_mallinfo();\n"
2277 msgstr ""
2278 "    printf(\"\\en============== After freeing blocks ==============\\en\");\n"
2279 "    display_mallinfo();\n"
2280
2281 #. type: Plain text
2282 #: build/C/man3/mallinfo.3:269 build/C/man3/malloc_info.3:255
2283 #: build/C/man3/mallopt.3:565 build/C/man3/mcheck.3:203
2284 #: build/C/man2/mmap.2:711
2285 #, no-wrap
2286 msgid ""
2287 "    exit(EXIT_SUCCESS);\n"
2288 "}\n"
2289 msgstr ""
2290 "    exit(EXIT_SUCCESS);\n"
2291 "}\n"
2292
2293 #. type: Plain text
2294 #: build/C/man3/mallinfo.3:279
2295 msgid ""
2296 "B<mmap>(2), B<malloc>(3), B<malloc_info>(3), B<malloc_stats>(3), "
2297 "B<malloc_trim>(3), B<mallopt>(3)"
2298 msgstr ""
2299 "B<mmap>(2), B<malloc>(3), B<malloc_info>(3), B<malloc_stats>(3), "
2300 "B<malloc_trim>(3), B<mallopt>(3)"
2301
2302 #. type: TH
2303 #: build/C/man3/malloc_get_state.3:25
2304 #, no-wrap
2305 msgid "MALLOC_GET_STATE"
2306 msgstr "MALLOC_GET_STATE"
2307
2308 #. type: TH
2309 #: build/C/man3/malloc_get_state.3:25
2310 #, no-wrap
2311 msgid "2012-05-04"
2312 msgstr "2012-05-04"
2313
2314 #. type: Plain text
2315 #: build/C/man3/malloc_get_state.3:28
2316 msgid ""
2317 "malloc_get_state, malloc_set_state - record and restore state of malloc "
2318 "implementation"
2319 msgstr ""
2320
2321 #. type: Plain text
2322 #: build/C/man3/malloc_get_state.3:31 build/C/man3/posix_memalign.3:35
2323 #, no-wrap
2324 msgid "B<#include E<lt>stdlib.hE<gt>>\n"
2325 msgstr "B<#include E<lt>stdlib.hE<gt>>\n"
2326
2327 #. type: Plain text
2328 #: build/C/man3/malloc_get_state.3:33
2329 #, no-wrap
2330 msgid "B<void* malloc_get_state(void);>\n"
2331 msgstr "B<void* malloc_get_state(void);>\n"
2332
2333 #. type: Plain text
2334 #: build/C/man3/malloc_get_state.3:35
2335 #, no-wrap
2336 msgid "B<int malloc_set_state(void *>I<state>B<);>\n"
2337 msgstr "B<int malloc_set_state(void *>I<state>B<);>\n"
2338
2339 #. type: Plain text
2340 #: build/C/man3/malloc_get_state.3:53
2341 msgid ""
2342 "The B<malloc_get_state>()  function records the current state of all "
2343 "B<malloc>(3)  internal bookkeeping variables (but not the actual contents of "
2344 "the heap or the state of B<malloc_hook>(3)  functions pointers).  The state "
2345 "is recorded in a system-dependent opaque data structure dynamically "
2346 "allocated via B<malloc>(3), and a pointer to that data structure is returned "
2347 "as the function result.  (It is the caller's responsibility to B<free>(3)  "
2348 "this memory.)"
2349 msgstr ""
2350
2351 #. type: Plain text
2352 #: build/C/man3/malloc_get_state.3:61
2353 msgid ""
2354 "The B<malloc_set_state>()  function restores the state of all B<malloc>(3)  "
2355 "internal bookkeeping variables to the values recorded in the opaque data "
2356 "structure pointed to by I<state>."
2357 msgstr ""
2358
2359 #. type: Plain text
2360 #: build/C/man3/malloc_get_state.3:68
2361 msgid ""
2362 "On success, B<malloc_get_state>()  returns a pointer to a newly allocated "
2363 "opaque data structure.  On error (for example, memory could not be allocated "
2364 "for the data structure), B<malloc_get_state>()  returns NULL."
2365 msgstr ""
2366
2367 #.  if(ms->magic != MALLOC_STATE_MAGIC) return -1;
2368 #.  /* Must fail if the major version is too high. */
2369 #.  if((ms->version & ~0xffl) > (MALLOC_STATE_VERSION & ~0xffl)) return -2;
2370 #. type: Plain text
2371 #: build/C/man3/malloc_get_state.3:86
2372 msgid ""
2373 "On success, B<malloc_set_state>()  returns 0.  If the implementation detects "
2374 "that I<state> does not point to a correctly formed data structure, "
2375 "B<malloc_set_state>()  returns -1.  If the implementation detects that the "
2376 "version of the data structure referred to by I<state> is a more recent "
2377 "version than this implementation knows about, B<malloc_set_state>()  returns "
2378 "-2."
2379 msgstr ""
2380
2381 #. type: Plain text
2382 #: build/C/man3/malloc_get_state.3:88 build/C/man3/malloc_hook.3:82
2383 #: build/C/man3/mcheck.3:147 build/C/man3/mtrace.3:80
2384 msgid "These functions are GNU extensions."
2385 msgstr "これらの関数は GNU による拡張である。"
2386
2387 #. type: Plain text
2388 #: build/C/man3/malloc_get_state.3:94
2389 msgid ""
2390 "These functions are especially useful when using this B<malloc>(3)  "
2391 "implementation as part of a shared library, and the heap contents are saved/"
2392 "restored via some other method.  This technique is used by the GNU Emacs to "
2393 "implement its \"dumping\" function."
2394 msgstr ""
2395
2396 #.  i.e., calls __malloc_check_init()
2397 #.  i.e., malloc checking is not already in use
2398 #.  and the caller requested malloc checking
2399 #. type: Plain text
2400 #: build/C/man3/malloc_get_state.3:111
2401 msgid ""
2402 "Hook function pointers are never saved or restored by these functions, with "
2403 "two exceptions: if malloc checking (see B<mallopt>(3))  was in use when "
2404 "B<malloc_get_state>()  was called, then B<malloc_set_state>()  resets malloc "
2405 "checking hooks if possible; if malloc checking was not in use in the "
2406 "recorded state, but the caller has requested malloc checking, then the hooks "
2407 "are reset to 0."
2408 msgstr ""
2409
2410 #. type: Plain text
2411 #: build/C/man3/malloc_get_state.3:114
2412 msgid "B<malloc>(3), B<mallopt>(3)"
2413 msgstr "B<malloc>(3), B<mallopt>(3)"
2414
2415 #. type: TH
2416 #: build/C/man3/malloc_hook.3:10
2417 #, no-wrap
2418 msgid "MALLOC_HOOK"
2419 msgstr "MALLOC_HOOK"
2420
2421 #. type: TH
2422 #: build/C/man3/malloc_hook.3:10
2423 #, no-wrap
2424 msgid "2010-10-13"
2425 msgstr "2010-10-13"
2426
2427 #. type: Plain text
2428 #: build/C/man3/malloc_hook.3:15
2429 msgid ""
2430 "__malloc_hook, __malloc_initialize_hook, __memalign_hook, __free_hook, "
2431 "__realloc_hook, __after_morecore_hook - malloc debugging variables"
2432 msgstr ""
2433 "__malloc_hook, __malloc_initialize_hook, __memalign_hook, __free_hook, "
2434 "__realloc_hook, __after_morecore_hook - malloc デバッグ用の変数"
2435
2436 #. type: Plain text
2437 #: build/C/man3/malloc_hook.3:18 build/C/man3/malloc_info.3:31
2438 #: build/C/man3/posix_memalign.3:41
2439 #, no-wrap
2440 msgid "B<#include E<lt>malloc.hE<gt>>\n"
2441 msgstr "B<#include E<lt>malloc.hE<gt>>\n"
2442
2443 #. type: Plain text
2444 #: build/C/man3/malloc_hook.3:20
2445 #, no-wrap
2446 msgid "B<void *(*__malloc_hook)(size_t >I<size>B<, const void *>I<caller>B<);>\n"
2447 msgstr "B<void *(*__malloc_hook)(size_t >I<size>B<, const void *>I<caller>B<);>\n"
2448
2449 #. type: Plain text
2450 #: build/C/man3/malloc_hook.3:23
2451 #, no-wrap
2452 msgid "B<void *(*__realloc_hook)(void *>I<ptr>B<, size_t >I<size>B<, const void *>I<caller>B<);>\n"
2453 msgstr "B<void *(*__realloc_hook)(void *>I<ptr>B<, size_t >I<size>B<, const void *>I<caller>B<);>\n"
2454
2455 #. type: Plain text
2456 #: build/C/man3/malloc_hook.3:26
2457 #, no-wrap
2458 msgid ""
2459 "B<void *(*__memalign_hook)(size_t >I<alignment>B<, size_t >I<size>B<,>\n"
2460 "B<                         const void *>I<caller>B<);>\n"
2461 msgstr ""
2462 "B<void *(*__memalign_hook)(size_t >I<alignment>B<, size_t >I<size>B<,>\n"
2463 "B<                         const void *>I<caller>B<);>\n"
2464
2465 #. type: Plain text
2466 #: build/C/man3/malloc_hook.3:28
2467 #, no-wrap
2468 msgid "B<void (*__free_hook)(void *>I<ptr>B<, const void *>I<caller>B<);>\n"
2469 msgstr "B<void (*__free_hook)(void *>I<ptr>B<, const void *>I<caller>B<);>\n"
2470
2471 #. type: Plain text
2472 #: build/C/man3/malloc_hook.3:30
2473 #, no-wrap
2474 msgid "B<void (*__malloc_initialize_hook)(void);>\n"
2475 msgstr "B<void (*__malloc_initialize_hook)(void);>\n"
2476
2477 #. type: Plain text
2478 #: build/C/man3/malloc_hook.3:32
2479 #, no-wrap
2480 msgid "B<void (*__after_morecore_hook)(void);>\n"
2481 msgstr "B<void (*__after_morecore_hook)(void);>\n"
2482
2483 #. type: Plain text
2484 #: build/C/man3/malloc_hook.3:43
2485 msgid ""
2486 "The GNU C library lets you modify the behavior of B<malloc>(3), B<realloc>"
2487 "(3), and B<free>(3)  by specifying appropriate hook functions.  You can use "
2488 "these hooks to help you debug programs that use dynamic memory allocation, "
2489 "for example."
2490 msgstr ""
2491 "GNU C ライブラリでは、適切なフック関数 (hook function) を指定することで "
2492 "B<malloc>(3), B<realloc>(3), B<free>(3)  の動作を変更することができる。例え"
2493 "ば、動的にメモリ割り当てを行う プログラムのデバッグにこれらのフックを使うこと"
2494 "ができる。"
2495
2496 #. type: Plain text
2497 #: build/C/man3/malloc_hook.3:50
2498 msgid ""
2499 "The variable B<__malloc_initialize_hook> points at a function that is called "
2500 "once when the malloc implementation is initialized.  This is a weak "
2501 "variable, so it can be overridden in the application with a definition like "
2502 "the following:"
2503 msgstr ""
2504 "変数 B<__malloc_initialize_hook> は malloc の実装が初期化される際に一度だけ呼"
2505 "ばれる関数へのポインタである。 この変数は書き換え可能 (weak) であり、アプリ"
2506 "ケーション内で 以下のような定義で上書きできる:"
2507
2508 #. type: Plain text
2509 #: build/C/man3/malloc_hook.3:53
2510 #, no-wrap
2511 msgid "    void (*__malloc_initialize_hook)(void) = my_init_hook;\n"
2512 msgstr "    void (*__malloc_initialize_hook)(void) = my_init_hook;\n"
2513
2514 #. type: Plain text
2515 #: build/C/man3/malloc_hook.3:58
2516 msgid ""
2517 "Now the function I<my_init_hook>()  can do the initialization of all hooks."
2518 msgstr ""
2519 "なお、関数 I<my_init_hook>()  で全てのフックの初期化をすることができる。"
2520
2521 #. type: Plain text
2522 #: build/C/man3/malloc_hook.3:74
2523 msgid ""
2524 "The four functions pointed to by B<__malloc_hook>, B<__realloc_hook>, "
2525 "B<__memalign_hook>, B<__free_hook> have a prototype like the functions "
2526 "B<malloc>(3), B<realloc>(3), B<memalign>(3), B<free>(3), respectively, "
2527 "except that they have a final argument I<caller> that gives the address of "
2528 "the caller of B<malloc>(3), etc."
2529 msgstr ""
2530 "B<__malloc_hook>, B<__realloc_hook>, B<__memalign_hook>, B<__free_hook> で指"
2531 "される 4 つの関数は、各々 B<malloc>(3), B<realloc>(3), B<memalign>(3), "
2532 "B<free>(3)  とよく似たプロトタイプを持っているが、 一番最後の引き数 "
2533 "I<caller> をとる点が異なる。 引き数 I<caller> には、 B<malloc>(3)  などの呼び"
2534 "出し元 (caller) のアドレスが格納される。"
2535
2536 #. type: Plain text
2537 #: build/C/man3/malloc_hook.3:80
2538 msgid ""
2539 "The variable B<__after_morecore_hook> points at a function that is called "
2540 "each time after B<sbrk>(2)  was asked for more memory."
2541 msgstr ""
2542 "変数 B<__after_morecore_hook> は、領域の追加要求があり B<sbrk>(2)  が呼ばれた"
2543 "後で毎回呼び出される関数へのポインタである。"
2544
2545 #.  https://bugzilla.redhat.com/show_bug.cgi?id=450187
2546 #.  http://sourceware.org/bugzilla/show_bug.cgi?id=9957
2547 #. type: Plain text
2548 #: build/C/man3/malloc_hook.3:89
2549 msgid ""
2550 "The use of these hook functions is not safe in multithreaded programs, and "
2551 "they are now deprecated.  Programmers should instead preempt calls to the "
2552 "relevant functions by defining and exporting functions such as \"malloc\" "
2553 "and \"free\"."
2554 msgstr ""
2555 "マルチスレッドプログラムでは、 これらのフック関数の使用は安全ではなく、 今で"
2556 "は非推奨である。 プログラマは、 \"malloc\" や \"free\" のような関数を定義して"
2557 "公開して、 関連する関数を呼び出すようにすべきである。"
2558
2559 #. type: Plain text
2560 #: build/C/man3/malloc_hook.3:91
2561 msgid "Here is a short example of how to use these variables."
2562 msgstr "これらの変数の使い方の簡単な例を以下に示す。"
2563
2564 #. type: Plain text
2565 #: build/C/man3/malloc_hook.3:95
2566 #, no-wrap
2567 msgid ""
2568 "#include E<lt>stdio.hE<gt>\n"
2569 "#include E<lt>malloc.hE<gt>\n"
2570 msgstr ""
2571 "#include E<lt>stdio.hE<gt>\n"
2572 "#include E<lt>malloc.hE<gt>\n"
2573
2574 #. type: Plain text
2575 #: build/C/man3/malloc_hook.3:99
2576 #, no-wrap
2577 msgid ""
2578 "/* Prototypes for our hooks.  */\n"
2579 "static void my_init_hook(void);\n"
2580 "static void *my_malloc_hook(size_t, const void *);\n"
2581 msgstr ""
2582 "/* 使おうとするフックのプロトタイプ宣言 */\n"
2583 "static void my_init_hook(void);\n"
2584 "static void *my_malloc_hook(size_t, const void *);\n"
2585
2586 #. type: Plain text
2587 #: build/C/man3/malloc_hook.3:102
2588 #, no-wrap
2589 msgid ""
2590 "/* Variables to save original hooks. */\n"
2591 "static void *(*old_malloc_hook)(size_t, const void *);\n"
2592 msgstr ""
2593 "/* 元々のフックを保存するための変数 */\n"
2594 "static void *(*old_malloc_hook)(size_t, const void *);\n"
2595
2596 #. type: Plain text
2597 #: build/C/man3/malloc_hook.3:105
2598 #, no-wrap
2599 msgid ""
2600 "/* Override initializing hook from the C library. */\n"
2601 "void (*__malloc_initialize_hook) (void) = my_init_hook;\n"
2602 msgstr ""
2603 "/* C ライブラリから呼ばれる初期化フックを上書きする */\n"
2604 "void (*__malloc_initialize_hook) (void) = my_init_hook;\n"
2605
2606 #. type: Plain text
2607 #: build/C/man3/malloc_hook.3:112
2608 #, no-wrap
2609 msgid ""
2610 "static void\n"
2611 "my_init_hook(void)\n"
2612 "{\n"
2613 "    old_malloc_hook = __malloc_hook;\n"
2614 "    __malloc_hook = my_malloc_hook;\n"
2615 "}\n"
2616 msgstr ""
2617 "static void\n"
2618 "my_init_hook(void)\n"
2619 "{\n"
2620 "    old_malloc_hook = __malloc_hook;\n"
2621 "    __malloc_hook = my_malloc_hook;\n"
2622 "}\n"
2623
2624 #. type: Plain text
2625 #: build/C/man3/malloc_hook.3:117
2626 #, no-wrap
2627 msgid ""
2628 "static void *\n"
2629 "my_malloc_hook(size_t size, const void *caller)\n"
2630 "{\n"
2631 "    void *result;\n"
2632 msgstr ""
2633 "static void *\n"
2634 "my_malloc_hook(size_t size, const void *caller)\n"
2635 "{\n"
2636 "    void *result;\n"
2637
2638 #. type: Plain text
2639 #: build/C/man3/malloc_hook.3:120
2640 #, no-wrap
2641 msgid ""
2642 "    /* Restore all old hooks */\n"
2643 "    __malloc_hook = old_malloc_hook;\n"
2644 msgstr ""
2645 "    /* 元々のフックを全て戻す */\n"
2646 "    __malloc_hook = old_malloc_hook;\n"
2647
2648 #. type: Plain text
2649 #: build/C/man3/malloc_hook.3:123
2650 #, no-wrap
2651 msgid ""
2652 "    /* Call recursively */\n"
2653 "    result = malloc(size);\n"
2654 msgstr ""
2655 "    /* malloc の再帰的呼び出し */\n"
2656 "    result = malloc(size);\n"
2657
2658 #. type: Plain text
2659 #: build/C/man3/malloc_hook.3:126
2660 #, no-wrap
2661 msgid ""
2662 "    /* Save underlying hooks */\n"
2663 "    old_malloc_hook = __malloc_hook;\n"
2664 msgstr ""
2665 "    /* 現在設定されているフック (underlying hook) を保存する */\n"
2666 "    old_malloc_hook = __malloc_hook;\n"
2667
2668 #. type: Plain text
2669 #: build/C/man3/malloc_hook.3:130
2670 #, no-wrap
2671 msgid ""
2672 "    /* printf() might call malloc(), so protect it too. */\n"
2673 "    printf(\"malloc(%u) called from %p returns %p\\en\",\n"
2674 "            (unsigned int) size, caller, result);\n"
2675 msgstr ""
2676 "    /* printf() は malloc() を呼び出す可能性があるので\n"
2677 "        ここでもガードを行う (元々のフックのままにしておく) */\n"
2678 "    printf(\"malloc(%u) called from %p returns %p\\en\",\n"
2679 "            (unsigned int) size, caller, result);\n"
2680
2681 #. type: Plain text
2682 #: build/C/man3/malloc_hook.3:133
2683 #, no-wrap
2684 msgid ""
2685 "    /* Restore our own hooks */\n"
2686 "    __malloc_hook = my_malloc_hook;\n"
2687 msgstr ""
2688 "    /* ユーザが使おうとするフックを再設定する */\n"
2689 "    __malloc_hook = my_malloc_hook;\n"
2690
2691 #. type: Plain text
2692 #: build/C/man3/malloc_hook.3:136
2693 #, no-wrap
2694 msgid ""
2695 "    return result;\n"
2696 "}\n"
2697 msgstr ""
2698 "    return result;\n"
2699 "}\n"
2700
2701 #. type: Plain text
2702 #: build/C/man3/malloc_hook.3:142
2703 msgid "B<mallinfo>(3), B<malloc>(3), B<mcheck>(3), B<mtrace>(3)"
2704 msgstr "B<mallinfo>(3), B<malloc>(3), B<mcheck>(3), B<mtrace>(3)"
2705
2706 #. type: TH
2707 #: build/C/man3/malloc_info.3:25
2708 #, no-wrap
2709 msgid "MALLOC_INFO"
2710 msgstr "MALLOC_INFO"
2711
2712 #. type: TH
2713 #: build/C/man3/malloc_info.3:25 build/C/man2/shmget.2:38
2714 #, no-wrap
2715 msgid "2013-04-19"
2716 msgstr "2013-04-19"
2717
2718 #. type: Plain text
2719 #: build/C/man3/malloc_info.3:28
2720 msgid "malloc_info - export malloc state to a stream"
2721 msgstr "malloc_info - malloc の状態をストリームに出力する"
2722
2723 #. type: Plain text
2724 #: build/C/man3/malloc_info.3:33
2725 #, no-wrap
2726 msgid "B<int malloc_info(int >I<options>B<, FILE *>I<fp>B<);>\n"
2727 msgstr "B<int malloc_info(int >I<options>B<, FILE *>I<fp>B<);>\n"
2728
2729 #. type: Plain text
2730 #: build/C/man3/malloc_info.3:44
2731 msgid ""
2732 "The B<malloc_info>()  function exports an XML string that describes the "
2733 "current state of the memory-allocation implementation in the caller.  The "
2734 "string is printed on the file stream I<fp>.  The exported string includes "
2735 "information about all arenas (see B<malloc>(3))."
2736 msgstr ""
2737 "B<malloc_info>() 関数は、 呼び出し元のメモリ割り当て実装の現在の状態を表す "
2738 "XML 文字列を出力する。 文字列は、 ファイルストリーム I<fp> に出力される。 出"
2739 "力された文字列には、 全ての割り当て領域の情報が含まれる (B<malloc>(3) 参照)。"
2740
2741 #. type: Plain text
2742 #: build/C/man3/malloc_info.3:48
2743 msgid "As currently implemented, I<options> must be zero."
2744 msgstr "現在の実装では、 I<options> は 0 でなければならない。"
2745
2746 #. type: Plain text
2747 #: build/C/man3/malloc_info.3:55
2748 msgid ""
2749 "On success, B<malloc_info>()  returns 0; on error, it returns -1, with "
2750 "I<errno> set to indicate the cause."
2751 msgstr ""
2752 "B<malloc_info>() は、成功すると 0 を返す。 エラーの場合、-1 を返し、 "
2753 "I<errno> にエラーの原因を示す値を設定する。"
2754
2755 #. type: Plain text
2756 #: build/C/man3/malloc_info.3:60
2757 msgid "I<options> was nonzero."
2758 msgstr "I<options> が 0 でなかった。"
2759
2760 #. type: Plain text
2761 #: build/C/man3/malloc_info.3:63
2762 msgid "B<malloc_info>()  was added to glibc in version 2.10."
2763 msgstr "B<malloc_info>() は glibc バージョン 2.10 で追加された。"
2764
2765 #. type: Plain text
2766 #: build/C/man3/malloc_info.3:65 build/C/man3/malloc_stats.3:57
2767 #: build/C/man3/malloc_trim.3:62 build/C/man3/malloc_usable_size.3:50
2768 msgid "This function is a GNU extension."
2769 msgstr "この関数は GNU による拡張である。"
2770
2771 #. type: Plain text
2772 #: build/C/man3/malloc_info.3:71
2773 msgid ""
2774 "The memory-allocation information is provided as an XML string (rather than "
2775 "a C structure)  because the information may change over time (according to "
2776 "changes in the underlying implementation).  The output XML string includes a "
2777 "version field."
2778 msgstr ""
2779 "メモリ割り当て情報は (C の構造体ではなく) XML 文字列として提供される。 これ"
2780 "は、 この情報は時間をたつと (内部で使用している実装によって) 変わる可能性があ"
2781 "るからである。 出力される XML 文字列にはバージョンフィールドが付いている。"
2782
2783 #. type: Plain text
2784 #: build/C/man3/malloc_info.3:77
2785 msgid ""
2786 "The B<open_memstream>(3)  function can be used to send the output of "
2787 "B<malloc_info>()  directly into a buffer in memory, rather than to a file."
2788 msgstr ""
2789 "B<open_memstream>(3) 関数を使うと、 B<malloc_info>() の出力を、 ファイルでは"
2790 "なくメモリ内のバッファに直接送ることができる。"
2791
2792 #. type: Plain text
2793 #: build/C/man3/malloc_info.3:84
2794 msgid ""
2795 "The B<malloc_info>()  function is designed to address deficiencies in "
2796 "B<malloc_stats>(3)  and B<mallinfo>(3)."
2797 msgstr ""
2798 "B<malloc_info>() 関数は、 B<malloc_stats>(3) と B<mallinfo>(3) の不備を解決す"
2799 "るために設定された。"
2800
2801 #. type: Plain text
2802 #: build/C/man3/malloc_info.3:95
2803 msgid ""
2804 "The program below takes up to four command-line arguments, of which the "
2805 "first three are mandatory.  The first argument specifies the number of "
2806 "threads that the program should create.  All of the threads, including the "
2807 "main thread, allocate the number of blocks of memory specified by the second "
2808 "argument.  The third argument controls the size of the blocks to be "
2809 "allocated.  The main thread creates blocks of this size, the second thread "
2810 "created by the program allocates blocks of twice this size, the third thread "
2811 "allocates blocks of three times this size, and so on."
2812 msgstr ""
2813
2814 #. type: Plain text
2815 #: build/C/man3/malloc_info.3:102
2816 msgid ""
2817 "The program calls B<malloc_info>()  twice to display the memory-allocation "
2818 "state.  The first call takes place before any threads are created or memory "
2819 "allocated.  The second call is performed after all threads have allocated "
2820 "memory."
2821 msgstr ""
2822
2823 #. type: Plain text
2824 #: build/C/man3/malloc_info.3:110
2825 msgid ""
2826 "In the following example, the command-line arguments specify the creation of "
2827 "one additional thread, and both the main thread and the additional thread "
2828 "allocate 10000 blocks of memory.  After the blocks of memory have been "
2829 "allocated, B<malloc_info>()  shows the state of two allocation arenas."
2830 msgstr ""
2831
2832 #. type: Plain text
2833 #: build/C/man3/malloc_info.3:135
2834 #, no-wrap
2835 msgid ""
2836 "$ B<getconf GNU_LIBC_VERSION>\n"
2837 "glibc 2.13\n"
2838 "$ B<./a.out 1 10000 100>\n"
2839 "============ Before 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=\"135168\"/E<gt>\n"
2847 "E<lt>system type=\"max\" size=\"135168\"/E<gt>\n"
2848 "E<lt>aspace type=\"total\" size=\"135168\"/E<gt>\n"
2849 "E<lt>aspace type=\"mprotect\" size=\"135168\"/E<gt>\n"
2850 "E<lt>/heapE<gt>\n"
2851 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
2852 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
2853 "E<lt>system type=\"current\" size=\"135168\"/E<gt>\n"
2854 "E<lt>system type=\"max\" size=\"135168\"/E<gt>\n"
2855 "E<lt>aspace type=\"total\" size=\"135168\"/E<gt>\n"
2856 "E<lt>aspace type=\"mprotect\" size=\"135168\"/E<gt>\n"
2857 "E<lt>/mallocE<gt>\n"
2858 msgstr ""
2859 "$ B<getconf GNU_LIBC_VERSION>\n"
2860 "glibc 2.13\n"
2861 "$ B<./a.out 1 10000 100>\n"
2862 "============ Before allocating blocks ============\n"
2863 "E<lt>malloc version=\"1\"E<gt>\n"
2864 "E<lt>heap nr=\"0\"E<gt>\n"
2865 "E<lt>sizesE<gt>\n"
2866 "E<lt>/sizesE<gt>\n"
2867 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
2868 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
2869 "E<lt>system type=\"current\" size=\"135168\"/E<gt>\n"
2870 "E<lt>system type=\"max\" size=\"135168\"/E<gt>\n"
2871 "E<lt>aspace type=\"total\" size=\"135168\"/E<gt>\n"
2872 "E<lt>aspace type=\"mprotect\" size=\"135168\"/E<gt>\n"
2873 "E<lt>/heapE<gt>\n"
2874 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
2875 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
2876 "E<lt>system type=\"current\" size=\"135168\"/E<gt>\n"
2877 "E<lt>system type=\"max\" size=\"135168\"/E<gt>\n"
2878 "E<lt>aspace type=\"total\" size=\"135168\"/E<gt>\n"
2879 "E<lt>aspace type=\"mprotect\" size=\"135168\"/E<gt>\n"
2880 "E<lt>/mallocE<gt>\n"
2881
2882 #. type: Plain text
2883 #: build/C/man3/malloc_info.3:165
2884 #, no-wrap
2885 msgid ""
2886 "============ After allocating blocks ============\n"
2887 "E<lt>malloc version=\"1\"E<gt>\n"
2888 "E<lt>heap nr=\"0\"E<gt>\n"
2889 "E<lt>sizesE<gt>\n"
2890 "E<lt>/sizesE<gt>\n"
2891 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
2892 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
2893 "E<lt>system type=\"current\" size=\"1081344\"/E<gt>\n"
2894 "E<lt>system type=\"max\" size=\"1081344\"/E<gt>\n"
2895 "E<lt>aspace type=\"total\" size=\"1081344\"/E<gt>\n"
2896 "E<lt>aspace type=\"mprotect\" size=\"1081344\"/E<gt>\n"
2897 "E<lt>/heapE<gt>\n"
2898 "E<lt>heap nr=\"1\"E<gt>\n"
2899 "E<lt>sizesE<gt>\n"
2900 "E<lt>/sizesE<gt>\n"
2901 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
2902 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
2903 "E<lt>system type=\"current\" size=\"1032192\"/E<gt>\n"
2904 "E<lt>system type=\"max\" size=\"1032192\"/E<gt>\n"
2905 "E<lt>aspace type=\"total\" size=\"1032192\"/E<gt>\n"
2906 "E<lt>aspace type=\"mprotect\" size=\"1032192\"/E<gt>\n"
2907 "E<lt>/heapE<gt>\n"
2908 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
2909 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
2910 "E<lt>system type=\"current\" size=\"2113536\"/E<gt>\n"
2911 "E<lt>system type=\"max\" size=\"2113536\"/E<gt>\n"
2912 "E<lt>aspace type=\"total\" size=\"2113536\"/E<gt>\n"
2913 "E<lt>aspace type=\"mprotect\" size=\"2113536\"/E<gt>\n"
2914 "E<lt>/mallocE<gt>\n"
2915 msgstr ""
2916 "============ After allocating blocks ============\n"
2917 "E<lt>malloc version=\"1\"E<gt>\n"
2918 "E<lt>heap nr=\"0\"E<gt>\n"
2919 "E<lt>sizesE<gt>\n"
2920 "E<lt>/sizesE<gt>\n"
2921 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
2922 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
2923 "E<lt>system type=\"current\" size=\"1081344\"/E<gt>\n"
2924 "E<lt>system type=\"max\" size=\"1081344\"/E<gt>\n"
2925 "E<lt>aspace type=\"total\" size=\"1081344\"/E<gt>\n"
2926 "E<lt>aspace type=\"mprotect\" size=\"1081344\"/E<gt>\n"
2927 "E<lt>/heapE<gt>\n"
2928 "E<lt>heap nr=\"1\"E<gt>\n"
2929 "E<lt>sizesE<gt>\n"
2930 "E<lt>/sizesE<gt>\n"
2931 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
2932 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
2933 "E<lt>system type=\"current\" size=\"1032192\"/E<gt>\n"
2934 "E<lt>system type=\"max\" size=\"1032192\"/E<gt>\n"
2935 "E<lt>aspace type=\"total\" size=\"1032192\"/E<gt>\n"
2936 "E<lt>aspace type=\"mprotect\" size=\"1032192\"/E<gt>\n"
2937 "E<lt>/heapE<gt>\n"
2938 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
2939 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
2940 "E<lt>system type=\"current\" size=\"2113536\"/E<gt>\n"
2941 "E<lt>system type=\"max\" size=\"2113536\"/E<gt>\n"
2942 "E<lt>aspace type=\"total\" size=\"2113536\"/E<gt>\n"
2943 "E<lt>aspace type=\"mprotect\" size=\"2113536\"/E<gt>\n"
2944 "E<lt>/mallocE<gt>\n"
2945
2946 #. type: Plain text
2947 #: build/C/man3/malloc_info.3:175
2948 #, no-wrap
2949 msgid ""
2950 "#include E<lt>unistd.hE<gt>\n"
2951 "#include E<lt>stdlib.hE<gt>\n"
2952 "#include E<lt>pthread.hE<gt>\n"
2953 "#include E<lt>malloc.hE<gt>\n"
2954 "#include E<lt>errno.hE<gt>\n"
2955 msgstr ""
2956 "#include E<lt>unistd.hE<gt>\n"
2957 "#include E<lt>stdlib.hE<gt>\n"
2958 "#include E<lt>pthread.hE<gt>\n"
2959 "#include E<lt>malloc.hE<gt>\n"
2960 "#include E<lt>errno.hE<gt>\n"
2961
2962 #. type: Plain text
2963 #: build/C/man3/malloc_info.3:178
2964 #, no-wrap
2965 msgid ""
2966 "static size_t blockSize;\n"
2967 "static int numThreads, numBlocks;\n"
2968 msgstr ""
2969 "static size_t blockSize;\n"
2970 "static int numThreads, numBlocks;\n"
2971
2972 #. type: Plain text
2973 #: build/C/man3/malloc_info.3:181
2974 #, no-wrap
2975 msgid ""
2976 "#define errExit(msg)    do { perror(msg); exit(EXIT_FAILURE); \\e\n"
2977 "                        } while (0)\n"
2978 msgstr ""
2979 "#define errExit(msg)    do { perror(msg); exit(EXIT_FAILURE); \\e\n"
2980 "                        } while (0)\n"
2981
2982 #. type: Plain text
2983 #: build/C/man3/malloc_info.3:187
2984 #, no-wrap
2985 msgid ""
2986 "static void *\n"
2987 "thread_func(void *arg)\n"
2988 "{\n"
2989 "    int j;\n"
2990 "    int tn = (int) arg;\n"
2991 msgstr ""
2992 "static void *\n"
2993 "thread_func(void *arg)\n"
2994 "{\n"
2995 "    int j;\n"
2996 "    int tn = (int) arg;\n"
2997
2998 #. type: Plain text
2999 #: build/C/man3/malloc_info.3:190
3000 #, no-wrap
3001 msgid ""
3002 "    /* The multiplier \\(aq(2 + tn)\\(aq ensures that each thread (including\n"
3003 "       the main thread) allocates a different amount of memory */\n"
3004 msgstr ""
3005 "    /* The multiplier \\(aq(2 + tn)\\(aq ensures that each thread (including\n"
3006 "       the main thread) allocates a different amount of memory */\n"
3007
3008 #. type: Plain text
3009 #: build/C/man3/malloc_info.3:194
3010 #, no-wrap
3011 msgid ""
3012 "    for (j = 0; j E<lt> numBlocks; j++)\n"
3013 "        if (malloc(blockSize * (2 + tn)) == NULL)\n"
3014 "            errExit(\"malloc-thread\");\n"
3015 msgstr ""
3016 "    for (j = 0; j E<lt> numBlocks; j++)\n"
3017 "        if (malloc(blockSize * (2 + tn)) == NULL)\n"
3018 "            errExit(\"malloc-thread\");\n"
3019
3020 #. type: Plain text
3021 #: build/C/man3/malloc_info.3:198
3022 #, no-wrap
3023 msgid ""
3024 "    sleep(100);         /* Sleep until main thread terminates */\n"
3025 "    return NULL;\n"
3026 "}\n"
3027 msgstr ""
3028 "    sleep(100);         /* Sleep until main thread terminates */\n"
3029 "    return NULL;\n"
3030 "}\n"
3031
3032 #. type: Plain text
3033 #: build/C/man3/malloc_info.3:204
3034 #, no-wrap
3035 msgid ""
3036 "int\n"
3037 "main(int argc, char *argv[])\n"
3038 "{\n"
3039 "    int j, tn, sleepTime;\n"
3040 "    pthread_t *thr;\n"
3041 msgstr ""
3042 "int\n"
3043 "main(int argc, char *argv[])\n"
3044 "{\n"
3045 "    int j, tn, sleepTime;\n"
3046 "    pthread_t *thr;\n"
3047
3048 #. type: Plain text
3049 #: build/C/man3/malloc_info.3:211
3050 #, no-wrap
3051 msgid ""
3052 "    if (argc E<lt> 4) {\n"
3053 "        fprintf(stderr,\n"
3054 "                \"%s num-threads num-blocks block-size [sleep-time]\\en\",\n"
3055 "                argv[0]);\n"
3056 "        exit(EXIT_FAILURE);\n"
3057 "    }\n"
3058 msgstr ""
3059 "    if (argc E<lt> 4) {\n"
3060 "        fprintf(stderr,\n"
3061 "                \"%s num-threads num-blocks block-size [sleep-time]\\en\",\n"
3062 "                argv[0]);\n"
3063 "        exit(EXIT_FAILURE);\n"
3064 "    }\n"
3065
3066 #. type: Plain text
3067 #: build/C/man3/malloc_info.3:216
3068 #, no-wrap
3069 msgid ""
3070 "    numThreads = atoi(argv[1]);\n"
3071 "    numBlocks = atoi(argv[2]);\n"
3072 "    blockSize = atoi(argv[3]);\n"
3073 "    sleepTime = (argc E<gt> 4) ? atoi(argv[4]) : 0;\n"
3074 msgstr ""
3075 "    numThreads = atoi(argv[1]);\n"
3076 "    numBlocks = atoi(argv[2]);\n"
3077 "    blockSize = atoi(argv[3]);\n"
3078 "    sleepTime = (argc E<gt> 4) ? atoi(argv[4]) : 0;\n"
3079
3080 #. type: Plain text
3081 #: build/C/man3/malloc_info.3:220
3082 #, no-wrap
3083 msgid ""
3084 "    thr = calloc(numThreads, sizeof(pthread_t));\n"
3085 "    if (thr == NULL)\n"
3086 "        errExit(\"calloc\");\n"
3087 msgstr ""
3088 "    thr = calloc(numThreads, sizeof(pthread_t));\n"
3089 "    if (thr == NULL)\n"
3090 "        errExit(\"calloc\");\n"
3091
3092 #. type: Plain text
3093 #: build/C/man3/malloc_info.3:223
3094 #, no-wrap
3095 msgid ""
3096 "    printf(\"============ Before allocating blocks ============\\en\");\n"
3097 "    malloc_info(0, stdout);\n"
3098 msgstr ""
3099 "    printf(\"============ Before allocating blocks ============\\en\");\n"
3100 "    malloc_info(0, stdout);\n"
3101
3102 #. type: Plain text
3103 #: build/C/man3/malloc_info.3:225
3104 #, no-wrap
3105 msgid "    /* Create threads that allocate different amounts of memory */\n"
3106 msgstr "    /* Create threads that allocate different amounts of memory */\n"
3107
3108 #. type: Plain text
3109 #: build/C/man3/malloc_info.3:231
3110 #, no-wrap
3111 msgid ""
3112 "    for (tn = 0; tn E<lt> numThreads; tn++) {\n"
3113 "        errno = pthread_create(&thr[tn], NULL, thread_func,\n"
3114 "                               (void *) tn);\n"
3115 "        if (errno != 0)\n"
3116 "            errExit(\"pthread_create\");\n"
3117 msgstr ""
3118 "    for (tn = 0; tn E<lt> numThreads; tn++) {\n"
3119 "        errno = pthread_create(&thr[tn], NULL, thread_func,\n"
3120 "                               (void *) tn);\n"
3121 "        if (errno != 0)\n"
3122 "            errExit(\"pthread_create\");\n"
3123
3124 #. type: Plain text
3125 #: build/C/man3/malloc_info.3:236
3126 #, no-wrap
3127 msgid ""
3128 "        /* If we add a sleep interval after the start-up of each\n"
3129 "           thread, the threads likely won\\(aqt contend for malloc\n"
3130 "           mutexes, and therefore additional arenas won\\(aqt be\n"
3131 "           allocated (see malloc(3)). */\n"
3132 msgstr ""
3133 "        /* If we add a sleep interval after the start-up of each\n"
3134 "           thread, the threads likely won\\(aqt contend for malloc\n"
3135 "           mutexes, and therefore additional arenas won\\(aqt be\n"
3136 "           allocated (see malloc(3)). */\n"
3137
3138 #. type: Plain text
3139 #: build/C/man3/malloc_info.3:240
3140 #, no-wrap
3141 msgid ""
3142 "        if (sleepTime E<gt> 0)\n"
3143 "            sleep(sleepTime);\n"
3144 "    }\n"
3145 msgstr ""
3146 "        if (sleepTime E<gt> 0)\n"
3147 "            sleep(sleepTime);\n"
3148 "    }\n"
3149
3150 #. type: Plain text
3151 #: build/C/man3/malloc_info.3:242
3152 #, no-wrap
3153 msgid "    /* The main thread also allocates some memory */\n"
3154 msgstr "    /* The main thread also allocates some memory */\n"
3155
3156 #. type: Plain text
3157 #: build/C/man3/malloc_info.3:246
3158 #, no-wrap
3159 msgid ""
3160 "    for (j = 0; j E<lt> numBlocks; j++)\n"
3161 "        if (malloc(blockSize) == NULL)\n"
3162 "            errExit(\"malloc\");\n"
3163 msgstr ""
3164 "    for (j = 0; j E<lt> numBlocks; j++)\n"
3165 "        if (malloc(blockSize) == NULL)\n"
3166 "            errExit(\"malloc\");\n"
3167
3168 #. type: Plain text
3169 #: build/C/man3/malloc_info.3:249
3170 #, no-wrap
3171 msgid ""
3172 "    sleep(2);           /* Give all threads a chance to\n"
3173 "                           complete allocations */\n"
3174 msgstr ""
3175 "    sleep(2);           /* Give all threads a chance to\n"
3176 "                           complete allocations */\n"
3177
3178 #. type: Plain text
3179 #: build/C/man3/malloc_info.3:252
3180 #, no-wrap
3181 msgid ""
3182 "    printf(\"\\en============ After allocating blocks ============\\en\");\n"
3183 "    malloc_info(0, stdout);\n"
3184 msgstr ""
3185 "    printf(\"\\en============ After allocating blocks ============\\en\");\n"
3186 "    malloc_info(0, stdout);\n"
3187
3188 #. type: Plain text
3189 #: build/C/man3/malloc_info.3:262
3190 msgid ""
3191 "B<mallinfo>(3), B<malloc>(3), B<malloc_stats>(3), B<mallopt>(3), "
3192 "B<open_memstream>(3)"
3193 msgstr ""
3194 "B<mallinfo>(3), B<malloc>(3), B<malloc_stats>(3), B<mallopt>(3), "
3195 "B<open_memstream>(3)"
3196
3197 #. type: TH
3198 #: build/C/man3/malloc_stats.3:26
3199 #, no-wrap
3200 msgid "MALLOC_STATS"
3201 msgstr "MALLOC_STATS"
3202
3203 #. type: Plain text
3204 #: build/C/man3/malloc_stats.3:29
3205 msgid "malloc_stats - print memory allocation statistics"
3206 msgstr "malloc_stats - メモリ割り当ての統計を表示する"
3207
3208 #. type: Plain text
3209 #: build/C/man3/malloc_stats.3:33
3210 msgid "B<void malloc_stats(void);>"
3211 msgstr "B<void malloc_stats(void);>"
3212
3213 #.  .SH VERSIONS
3214 #.  Available already in glibc 2.0, possibly earlier
3215 #. type: Plain text
3216 #: build/C/man3/malloc_stats.3:55
3217 msgid ""
3218 "The B<malloc_stats>()  function prints (on standard error) statistics about "
3219 "memory allocated by B<malloc>(3)  and related functions.  For each arena "
3220 "(allocation area), this function prints the total amount of memory allocated "
3221 "and the total number of bytes consumed by in-use allocations.  (These two "
3222 "values correspond to the I<arena> and I<uordblks> fields retrieved by "
3223 "B<mallinfo>(3).)  In addition, the function prints the sum of these two "
3224 "statistics for all arenas, and the maximum number of blocks and bytes that "
3225 "were ever simultaneously allocated using B<mmap>(2)."
3226 msgstr ""
3227 "B<malloc_stats>() 関数は B<malloc>(3) や関連する関数により割り当てられたメモ"
3228 "リに関する統計を (標準エラーに) 出力する。 各領域 (割り当てエリア) につい"
3229 "て、 この関数は割り当てられているメモリの総量と現在の割り当てが使用している総"
3230 "バイト数を出力する (これらの二つの値は B<mallinfo>(3) で取得できる I<arena> "
3231 "と I<uordblks> フィールドに対応している)。 また、この関数は、 すべての領域の"
3232 "これら二つの統計情報の合計値と、 B<mmap>(2) を使って同時に割り当てられたブ"
3233 "ロック数とバイト数の最大値を表示する。"
3234
3235 #. type: Plain text
3236 #: build/C/man3/malloc_stats.3:61
3237 msgid ""
3238 "More detailed information about memory allocations in the main arena can be "
3239 "obtained using B<mallinfo>(3)."
3240 msgstr ""
3241 "B<mallinfo>(3) を使用すると、 メイン領域のメモリ割り当てに関するより詳細な情"
3242 "報を取得できる。"
3243
3244 #. type: Plain text
3245 #: build/C/man3/malloc_stats.3:67
3246 msgid ""
3247 "B<mmap>(2), B<mallinfo>(3), B<malloc>(3), B<malloc_info>(3), B<mallopt>(3)"
3248 msgstr ""
3249 "B<mmap>(2), B<mallinfo>(3), B<malloc>(3), B<malloc_info>(3), B<mallopt>(3)"
3250
3251 #. type: TH
3252 #: build/C/man3/malloc_trim.3:26
3253 #, no-wrap
3254 msgid "MALLOC_TRIM"
3255 msgstr "MALLOC_TRIM"
3256
3257 #. type: TH
3258 #: build/C/man3/malloc_trim.3:26 build/C/man3/malloc_usable_size.3:25
3259 #, no-wrap
3260 msgid "2012-03-29"
3261 msgstr "2012-03-29"
3262
3263 #. type: Plain text
3264 #: build/C/man3/malloc_trim.3:29
3265 msgid "malloc_trim - release free memory from the top of the heap"
3266 msgstr ""
3267
3268 #. type: Plain text
3269 #: build/C/man3/malloc_trim.3:33
3270 msgid "B<void malloc_trim(size_t >I<pad>B<);>"
3271 msgstr "B<void malloc_trim(size_t >I<pad>B<);>"
3272
3273 #. type: Plain text
3274 #: build/C/man3/malloc_trim.3:40
3275 msgid ""
3276 "The B<malloc_trim>()  function attempts to release free memory at the top of "
3277 "the heap (by calling B<sbrk>(2)  with a suitable argument)."
3278 msgstr ""
3279
3280 #. type: Plain text
3281 #: build/C/man3/malloc_trim.3:51
3282 msgid ""
3283 "The I<pad> argument specifies the amount of free space to leave untrimmed at "
3284 "the top of the heap.  If this argument is 0, only the minimum amount of "
3285 "memory is maintained at the top of the heap (i.e., one page or less).  A "
3286 "nonzero argument can be used to maintain some trailing space at the top of "
3287 "the heap in order to allow future allocations to be made without having to "
3288 "extend the heap with B<sbrk>(2)."
3289 msgstr ""
3290
3291 #. type: Plain text
3292 #: build/C/man3/malloc_trim.3:56
3293 msgid ""
3294 "The B<malloc_trim>()  function returns 1 if memory was actually released "
3295 "back to the system, or 0 if it was not possible to release any memory."
3296 msgstr ""
3297
3298 #.  .SH VERSIONS
3299 #.  Available already in glibc 2.0, possibly earlier
3300 #. type: Plain text
3301 #: build/C/man3/malloc_trim.3:60
3302 msgid "No errors are defined."
3303 msgstr ""
3304
3305 #. type: Plain text
3306 #: build/C/man3/malloc_trim.3:71
3307 msgid ""
3308 "This function is automatically called by B<free>(3)  in certain "
3309 "circumstances; see the discussion of B<M_TOP_PAD> and B<M_TRIM_THRESHOLD> in "
3310 "B<mallopt>(3)."
3311 msgstr ""
3312
3313 #. type: Plain text
3314 #: build/C/man3/malloc_trim.3:74
3315 msgid ""
3316 "This function cannot release free memory located at places other than the "
3317 "top of the heap."
3318 msgstr ""
3319
3320 #.  malloc/malloc.c::mTRIm():
3321 #.      return result | (av == &main_arena ? sYSTRIm (pad, av) : 0);
3322 #. type: Plain text
3323 #: build/C/man3/malloc_trim.3:78
3324 msgid "This function releases only memory in the main arena."
3325 msgstr ""
3326
3327 #. type: Plain text
3328 #: build/C/man3/malloc_trim.3:82
3329 msgid "B<sbrk>(2), B<malloc>(3), B<mallopt>(3)"
3330 msgstr "B<sbrk>(2), B<malloc>(3), B<mallopt>(3)"
3331
3332 #. type: TH
3333 #: build/C/man3/malloc_usable_size.3:25
3334 #, no-wrap
3335 msgid "MALLOC_USABLE_SIZE"
3336 msgstr "MALLOC_USABLE_SIZE"
3337
3338 #. type: Plain text
3339 #: build/C/man3/malloc_usable_size.3:28
3340 msgid "malloc_usable_size - obtain size of block of memory allocated from heap"
3341 msgstr ""
3342
3343 #. type: Plain text
3344 #: build/C/man3/malloc_usable_size.3:32
3345 msgid "B<size_t malloc_usable_size (void *>I<ptr>B<);>"
3346 msgstr "B<size_t malloc_usable_size (void *>I<ptr>B<);>"
3347
3348 #. type: Plain text
3349 #: build/C/man3/malloc_usable_size.3:40
3350 msgid ""
3351 "The B<malloc_usable_size>()  function returns the number of usable bytes in "
3352 "the block pointed to by I<ptr>, a pointer to a block of memory allocated by "
3353 "B<malloc>(3)  or a related function."
3354 msgstr ""
3355
3356 #. type: Plain text
3357 #: build/C/man3/malloc_usable_size.3:48
3358 msgid ""
3359 "B<malloc_usable_size>()  returns the number of usable bytes in the block of "
3360 "allocated memory pointed to by I<ptr>.  If I<ptr> is NULL, 0 is returned."
3361 msgstr ""
3362
3363 #. type: Plain text
3364 #: build/C/man3/malloc_usable_size.3:60
3365 msgid ""
3366 "The value returned by B<malloc_usable_size>()  may be greater than the "
3367 "requested size of the allocation because of alignment and minimum size "
3368 "constraints.  Although the excess bytes can be overwritten by the "
3369 "application without ill effects, this is not good programming practice: the "
3370 "number of excess bytes in an allocation depends on the underlying "
3371 "implementation."
3372 msgstr ""
3373
3374 #. type: Plain text
3375 #: build/C/man3/malloc_usable_size.3:62
3376 msgid "The main use of this function is for debugging and introspection."
3377 msgstr ""
3378
3379 #. type: Plain text
3380 #: build/C/man3/malloc_usable_size.3:64
3381 msgid "B<malloc>(3)"
3382 msgstr "B<malloc>(3)"
3383
3384 #. type: TH
3385 #: build/C/man3/mallopt.3:26
3386 #, no-wrap
3387 msgid "MALLOPT"
3388 msgstr "MALLOPT"
3389
3390 #. type: TH
3391 #: build/C/man3/mallopt.3:26
3392 #, no-wrap
3393 msgid "2012-04-30"
3394 msgstr "2012-04-30"
3395
3396 #. type: Plain text
3397 #: build/C/man3/mallopt.3:29
3398 msgid "mallopt - set memory allocation parameters"
3399 msgstr "mallopt - メモリ割り当てパラメータを設定する"
3400
3401 #. type: Plain text
3402 #: build/C/man3/mallopt.3:33
3403 msgid "B<int mallopt(int >I<param>B<, int >I<value>B<);>"
3404 msgstr "B<int mallopt(int >I<param>B<, int >I<value>B<);>"
3405
3406 #. type: Plain text
3407 #: build/C/man3/mallopt.3:44
3408 msgid ""
3409 "The B<mallopt>()  function adjusts parameters that control the behavior of "
3410 "the memory-allocation functions (see B<malloc>(3)).  The I<param> argument "
3411 "specifies the parameter to be modified, and I<value> specifies the new value "
3412 "for that parameter."
3413 msgstr ""
3414 "B<mallopt>() 関数は、メモリ割り当て関数 (B<malloc>(3) を参照) の動作を\n"
3415 "制御するパラメータの調整を行う。\n"
3416 "I<param> 引き数で変更するパラメータを指定し、\n"
3417 "I<value> 引き数でそのパラメータの新しい値を指定する。"
3418
3419 #. type: Plain text
3420 #: build/C/man3/mallopt.3:47
3421 msgid "The following values can be specified for I<param>:"
3422 msgstr "I<param> には以下の値を指定することができる。"
3423
3424 #. type: TP
3425 #: build/C/man3/mallopt.3:47
3426 #, no-wrap
3427 msgid "B<M_CHECK_ACTION>"
3428 msgstr "B<M_CHECK_ACTION>"
3429
3430 #. type: Plain text
3431 #: build/C/man3/mallopt.3:53
3432 msgid ""
3433 "Setting this parameter controls how glibc responds when various kinds of "
3434 "programming errors are detected (e.g., freeing the same pointer twice).  The "
3435 "3 least significant bits (2, 1, and 0) of the value assigned to this "
3436 "parameter determine the glibc behavior, as follows:"
3437 msgstr ""
3438
3439 #. type: TP
3440 #: build/C/man3/mallopt.3:54
3441 #, no-wrap
3442 msgid "Bit 0"
3443 msgstr "Bit 0"
3444
3445 #. type: Plain text
3446 #: build/C/man3/mallopt.3:64
3447 msgid ""
3448 "If this bit is set, then print a one-line message on I<stderr> that provides "
3449 "details about the error.  The message starts with the string \"***\\ glibc "
3450 "detected\\ ***\", followed by the program name, the name of the memory-"
3451 "allocation function in which the error was detected, a brief description of "
3452 "the error, and the memory address where the error was detected."
3453 msgstr ""
3454
3455 #. type: TP
3456 #: build/C/man3/mallopt.3:64
3457 #, no-wrap
3458 msgid "Bit 1"
3459 msgstr "Bit 1"
3460
3461 #. type: Plain text
3462 #: build/C/man3/mallopt.3:79
3463 msgid ""
3464 "If this bit is set, then, after printing any error message specified by bit "
3465 "0, the program is terminated by calling B<abort>(3).  In glibc versions "
3466 "since 2.4, if bit 0 is also set, then, between printing the error message "
3467 "and aborting, the program also prints a stack trace in the manner of "
3468 "B<backtrace>(3), and prints the process's memory mapping in the style of I</"
3469 "proc/[pid]/maps> (see B<proc>(5))."
3470 msgstr ""
3471
3472 #. type: TP
3473 #: build/C/man3/mallopt.3:79
3474 #, no-wrap
3475 msgid "Bit 2 (since glibc 2.4)"
3476 msgstr "Bit 2 (glibc 2.4 以降)"
3477
3478 #. type: Plain text
3479 #: build/C/man3/mallopt.3:86
3480 msgid ""
3481 "This bit has an effect only if bit 0 is also set.  If this bit is set, then "
3482 "the one-line message describing the error is simplified to contain just the "
3483 "name of the function where the error was detected and the brief description "
3484 "of the error."
3485 msgstr ""
3486
3487 #. type: Plain text
3488 #: build/C/man3/mallopt.3:91
3489 msgid "The remaining bits in I<value> are ignored."
3490 msgstr ""
3491
3492 #. type: Plain text
3493 #: build/C/man3/mallopt.3:95
3494 msgid ""
3495 "Combining the above details, the following numeric values are meaningful for "
3496 "B<M_CHECK_ACTION>:"
3497 msgstr ""
3498
3499 #. type: IP
3500 #: build/C/man3/mallopt.3:96
3501 #, no-wrap
3502 msgid "0"
3503 msgstr "0"
3504
3505 #. type: Plain text
3506 #: build/C/man3/mallopt.3:98
3507 msgid "Ignore error conditions; continue execution (with undefined results)."
3508 msgstr ""
3509
3510 #. type: IP
3511 #: build/C/man3/mallopt.3:98
3512 #, no-wrap
3513 msgid "1"
3514 msgstr "1"
3515
3516 #. type: Plain text
3517 #: build/C/man3/mallopt.3:100
3518 msgid "Print a detailed error message and continue execution."
3519 msgstr ""
3520
3521 #. type: IP
3522 #: build/C/man3/mallopt.3:100
3523 #, no-wrap
3524 msgid "2"
3525 msgstr "2"
3526
3527 #. type: Plain text
3528 #: build/C/man3/mallopt.3:102
3529 msgid "Abort the program."
3530 msgstr ""
3531
3532 #. type: IP
3533 #: build/C/man3/mallopt.3:102
3534 #, no-wrap
3535 msgid "3"
3536 msgstr "3"
3537
3538 #. type: Plain text
3539 #: build/C/man3/mallopt.3:105
3540 msgid ""
3541 "Print detailed error message, stack trace, and memory mappings, and abort "
3542 "the program."
3543 msgstr ""
3544
3545 #. type: IP
3546 #: build/C/man3/mallopt.3:105
3547 #, no-wrap
3548 msgid "5"
3549 msgstr "5"
3550
3551 #. type: Plain text
3552 #: build/C/man3/mallopt.3:107
3553 msgid "Print a simple error message and continue execution."
3554 msgstr ""
3555
3556 #. type: IP
3557 #: build/C/man3/mallopt.3:107
3558 #, no-wrap
3559 msgid "7"
3560 msgstr "7"
3561
3562 #. type: Plain text
3563 #: build/C/man3/mallopt.3:110
3564 msgid ""
3565 "Print simple error message, stack trace, and memory mappings, and abort the "
3566 "program."
3567 msgstr ""
3568
3569 #. type: Plain text
3570 #: build/C/man3/mallopt.3:116
3571 msgid ""
3572 "Since glibc 2.3.4, the default value for the B<M_CHECK_ACTION> parameter is "
3573 "3.  In glibc version 2.3.3 and earlier, the default value is 1."
3574 msgstr ""
3575
3576 #. type: Plain text
3577 #: build/C/man3/mallopt.3:121
3578 msgid ""
3579 "Using a nonzero B<M_CHECK_ACTION> value can be useful because otherwise a "
3580 "crash may happen much later, and the true cause of the problem is then very "
3581 "hard to track down."
3582 msgstr ""
3583
3584 #. type: TP
3585 #: build/C/man3/mallopt.3:121
3586 #, no-wrap
3587 msgid "B<M_MMAP_MAX>"
3588 msgstr "B<M_MMAP_MAX>"
3589
3590 #.  The following text adapted from comments in the glibc source:
3591 #. type: Plain text
3592 #: build/C/man3/mallopt.3:131
3593 msgid ""
3594 "This parameter specifies the maximum number of allocation requests that may "
3595 "be simultaneously serviced using B<mmap>(2).  This parameter exists because "
3596 "some systems have a limited number of internal tables for use by B<mmap>(2), "
3597 "and using more than a few of them may degrade performance."
3598 msgstr ""
3599
3600 #. type: Plain text
3601 #: build/C/man3/mallopt.3:138
3602 msgid ""
3603 "The default value is 65,536, a value which has no special significance and "
3604 "which servers only as a safeguard.  Setting this parameter to 0 disables the "
3605 "use of B<mmap>(2)  for servicing large allocation requests."
3606 msgstr ""
3607
3608 #. type: TP
3609 #: build/C/man3/mallopt.3:138
3610 #, no-wrap
3611 msgid "B<M_MMAP_THRESHOLD>"
3612 msgstr "B<M_MMAP_THRESHOLD>"
3613
3614 #. type: Plain text
3615 #: build/C/man3/mallopt.3:147
3616 msgid ""
3617 "For allocations greater than or equal to the limit specified (in bytes) by "
3618 "B<M_MMAP_THRESHOLD> that can't be satisfied from the free list, the memory-"
3619 "allocation functions employ B<mmap>(2)  instead of increasing the program "
3620 "break using B<sbrk>(2)."
3621 msgstr ""
3622
3623 #. type: Plain text
3624 #: build/C/man3/mallopt.3:167
3625 msgid ""
3626 "Allocating memory using B<mmap>(2)  has the significant advantage that the "
3627 "allocated memory blocks can always be independently released back to the "
3628 "system.  (By contrast, the heap can be trimmed only if memory is freed at "
3629 "the top end.)  On the other hand, there are some disadvantages to the use of "
3630 "B<mmap>(2): deallocated space is not placed on the free list for reuse by "
3631 "later allocations; memory may be wasted because B<mmap>(2)  allocations must "
3632 "be page-aligned; and the kernel must perform the expensive task of zeroing "
3633 "out memory allocated via B<mmap>(2).  Balancing these factors leads to a "
3634 "default setting of 128*1024 for the B<M_MMAP_THRESHOLD> parameter."
3635 msgstr ""
3636
3637 #. type: Plain text
3638 #: build/C/man3/mallopt.3:174
3639 msgid ""
3640 "The lower limit for this parameter is 0.  The upper limit is "
3641 "B<DEFAULT_MMAP_THRESHOLD_MAX>: 512*1024 on 32-bit systems or "
3642 "I<4*1024*1024*sizeof(long)> on 64-bit systems."
3643 msgstr ""
3644
3645 #. type: Plain text
3646 #: build/C/man3/mallopt.3:192
3647 msgid ""
3648 "I<Note:> Nowadays, glibc uses a dynamic mmap threshold by default.  The "
3649 "initial value of the threshold is 128*1024, but when blocks larger than the "
3650 "current threshold and less than or equal to B<DEFAULT_MMAP_THRESHOLD_MAX> "
3651 "are freed, the threshold is adjusted upwards to the size of the freed "
3652 "block.  When dynamic mmap thresholding is in effect, the threshold for "
3653 "trimming the heap is also dynamically adjusted to be twice the dynamic mmap "
3654 "threshold.  Dynamic adjustment of the mmap threshold is disabled if any of "
3655 "the B<M_TRIM_THRESHOLD>, B<M_TOP_PAD>, B<M_MMAP_THRESHOLD>, or B<M_MMAP_MAX> "
3656 "parameters is set."
3657 msgstr ""
3658
3659 #. type: TP
3660 #: build/C/man3/mallopt.3:192
3661 #, no-wrap
3662 msgid "B<M_MXFAST> (since glibc 2.3)"
3663 msgstr "B<M_MXFAST> (glibc 2.3 以降)"
3664
3665 #.  The following text adapted from comments in the glibc sources:
3666 #. type: Plain text
3667 #: build/C/man3/mallopt.3:212
3668 msgid ""
3669 "Set the upper limit for memory allocation requests that are satisfied using "
3670 "\"fastbins\".  (The measurement unit for this parameter is bytes.)  Fastbins "
3671 "are storage areas that hold deallocated blocks of memory of the same size "
3672 "without merging adjacent free blocks.  Subsequent reallocation of blocks of "
3673 "the same size can be handled very quickly by allocating from the fastbin, "
3674 "although memory fragmentation and the overall memory footprint of the "
3675 "program can increase.  The default value for this parameter is I<64*sizeof"
3676 "(size_t)/4> (i.e., 64 on 32-bit architectures).  The range for this "
3677 "parameter is 0 to I<80*sizeof(size_t)/4>.  Setting B<M_MXFAST> to 0 disables "
3678 "the use of fastbins."
3679 msgstr ""
3680
3681 #. type: TP
3682 #: build/C/man3/mallopt.3:212
3683 #, no-wrap
3684 msgid "B<M_PERTURB> (since glibc 2.4)"
3685 msgstr "B<M_PERTURB> (glibc 2.4 以降)"
3686
3687 #. type: Plain text
3688 #: build/C/man3/mallopt.3:227
3689 msgid ""
3690 "If this parameter is set to a nonzero value, then bytes of allocated memory "
3691 "(other than allocations via B<calloc>(3))  are initialized to the complement "
3692 "of the value in the least significant byte of I<value>, and when allocated "
3693 "memory is released using B<free>(3), the freed bytes are set to the least "
3694 "significant byte of I<value>.  This can be useful for detecting errors where "
3695 "programs incorrectly rely on allocated memory being initialized to zero, or "
3696 "reuse values in memory that has already been freed."
3697 msgstr ""
3698
3699 #. type: TP
3700 #: build/C/man3/mallopt.3:227
3701 #, no-wrap
3702 msgid "B<M_TOP_PAD>"
3703 msgstr "B<M_TOP_PAD>"
3704
3705 #. type: Plain text
3706 #: build/C/man3/mallopt.3:234
3707 msgid ""
3708 "This parameter defines the amount of padding to employ when calling B<sbrk>"
3709 "(2)  to modify the program break.  (The measurement unit for this parameter "
3710 "is bytes.)  This parameter has an effect in the following circumstances:"
3711 msgstr ""
3712
3713 #. type: Plain text
3714 #: build/C/man3/mallopt.3:241
3715 msgid ""
3716 "When the program break is increased, then B<M_TOP_PAD> bytes are added to "
3717 "the B<sbrk>(2)  request."
3718 msgstr ""
3719
3720 #. type: Plain text
3721 #: build/C/man3/mallopt.3:247
3722 msgid ""
3723 "When the heap is trimmed as a consequence of calling B<free>(3)  (see the "
3724 "discussion of B<M_TRIM_THRESHOLD>)  this much free space is preserved at the "
3725 "top of the heap."
3726 msgstr ""
3727
3728 #. type: Plain text
3729 #: build/C/man3/mallopt.3:251
3730 msgid ""
3731 "In either case, the amount of padding is always rounded to a system page "
3732 "boundary."
3733 msgstr ""
3734
3735 #. type: Plain text
3736 #: build/C/man3/mallopt.3:258
3737 msgid ""
3738 "Modifying B<M_TOP_PAD> is a trade-off between increasing the number of "
3739 "system calls (when the parameter is set low)  and wasting unused memory at "
3740 "the top of the heap (when the parameter is set high)."
3741 msgstr ""
3742
3743 #.  DEFAULT_TOP_PAD in glibc source
3744 #. type: Plain text
3745 #: build/C/man3/mallopt.3:261
3746 msgid "The default value for this parameter is 128*1024."
3747 msgstr ""
3748
3749 #. type: TP
3750 #: build/C/man3/mallopt.3:261
3751 #, no-wrap
3752 msgid "B<M_TRIM_THRESHOLD>"
3753 msgstr "B<M_TRIM_THRESHOLD>"
3754
3755 #. type: Plain text
3756 #: build/C/man3/mallopt.3:277
3757 msgid ""
3758 "When the amount of contiguous free memory at the top of the heap grows "
3759 "sufficiently large, B<free>(3)  employs B<sbrk>(2)  to release this memory "
3760 "back to the system.  (This can be useful in programs that continue to "
3761 "execute for a long period after freeing a significant amount of memory.)  "
3762 "The B<M_TRIM_THRESHOLD> parameter specifies the minimum size (in bytes) that "
3763 "this block of memory must reach before B<sbrk>(2)  is used to trim the heap."
3764 msgstr ""
3765
3766 #. type: Plain text
3767 #: build/C/man3/mallopt.3:282
3768 msgid ""
3769 "The default value for this parameter is 128*1024.  Setting "
3770 "B<M_TRIM_THRESHOLD> to -1 disables trimming completely."
3771 msgstr ""
3772
3773 #
3774 #
3775 #
3776 #.  FIXME Do the arena parameters need to be documented?
3777 #.  .TP
3778 #.  .BR M_ARENA_TEST " (since glibc 2.10)"
3779 #.  .TP
3780 #.  .BR M_ARENA_MAX " (since glibc 2.10)"
3781 #.  Environment variables
3782 #.      MALLOC_ARENA_MAX_
3783 #.      MALLOC_ARENA_TEST_
3784 #.  http://udrepper.livejournal.com/20948.html describes some details
3785 #.      of the MALLOC_ARENA_* environment variables.
3786 #.  These macros aren't enabled in production releases until 2.15?
3787 #.  (see glibc malloc/Makefile)
3788 #. type: Plain text
3789 #: build/C/man3/mallopt.3:305
3790 msgid ""
3791 "Modifying B<M_TRIM_THRESHOLD> is a trade-off between increasing the number "
3792 "of system calls (when the parameter is set low)  and wasting unused memory "
3793 "at the top of the heap (when the parameter is set high)."
3794 msgstr ""
3795
3796 #. type: SS
3797 #: build/C/man3/mallopt.3:305
3798 #, no-wrap
3799 msgid "Environment variables"
3800 msgstr "環境変数"
3801
3802 #. type: Plain text
3803 #: build/C/man3/mallopt.3:320
3804 msgid ""
3805 "A number of environment variables can be defined to modify some of the same "
3806 "parameters as are controlled by B<mallopt>().  Using these variables has the "
3807 "advantage that the source code of the program need not be changed.  To be "
3808 "effective, these variables must be defined before the first call to a memory-"
3809 "allocation function.  (If the same parameters are adjusted via B<mallopt>()  "
3810 "then the B<mallopt>()  settings take precedence.)  For security reasons, "
3811 "these variables are ignored in set-user-ID and set-group-ID programs."
3812 msgstr ""
3813
3814 #. type: Plain text
3815 #: build/C/man3/mallopt.3:323
3816 msgid ""
3817 "The environment variables are as follows (note the trailing underscore at "
3818 "the end of the name of each variable):"
3819 msgstr ""
3820
3821 #. type: TP
3822 #: build/C/man3/mallopt.3:323
3823 #, no-wrap
3824 msgid "B<MALLOC_CHECK_>"
3825 msgstr "B<MALLOC_CHECK_>"
3826
3827 #.  On glibc 2.12/x86, a simple malloc()+free() loop is about 70% slower
3828 #.  when MALLOC_CHECK_ was set.
3829 #. type: Plain text
3830 #: build/C/man3/mallopt.3:340
3831 msgid ""
3832 "This environment variable controls the same parameter as B<mallopt>()  "
3833 "B<M_CHECK_ACTION>.  If this variable is set to a nonzero value, then a "
3834 "special implementation of the memory-allocation functions is used.  (This is "
3835 "accomplished using the B<malloc_hook>(3)  feature.)  This implementation "
3836 "performs additional error checking, but is slower than the standard set of "
3837 "memory-allocation functions.  (This implementation does not detect all "
3838 "possible errors; memory leaks can still occur.)"
3839 msgstr ""
3840
3841 #. type: Plain text
3842 #: build/C/man3/mallopt.3:345
3843 msgid ""
3844 "The value assigned to this environment variable should be a single digit, "
3845 "whose meaning is as described for B<M_CHECK_ACTION>.  Any characters beyond "
3846 "the initial digit are ignored."
3847 msgstr ""
3848
3849 #. type: Plain text
3850 #: build/C/man3/mallopt.3:354
3851 msgid ""
3852 "For security reasons, the effect of B<MALLOC_CHECK_> is disabled by default "
3853 "for set-user-ID and set-group-ID programs.  However, if the file I</etc/suid-"
3854 "debug> exists (the content of the file is irrelevant), then B<MALLOC_CHECK_> "
3855 "also has an effect for set-user-ID and set-group-ID programs."
3856 msgstr ""
3857
3858 #. type: TP
3859 #: build/C/man3/mallopt.3:354
3860 #, no-wrap
3861 msgid "B<MALLOC_MMAP_MAX_>"
3862 msgstr "B<MALLOC_MMAP_MAX_>"
3863
3864 #. type: Plain text
3865 #: build/C/man3/mallopt.3:359
3866 msgid "Controls the same parameter as B<mallopt>()  B<M_MMAP_MAX>."
3867 msgstr ""
3868
3869 #. type: TP
3870 #: build/C/man3/mallopt.3:359
3871 #, no-wrap
3872 msgid "B<MALLOC_MMAP_THRESHOLD_>"
3873 msgstr "B<MALLOC_MMAP_THRESHOLD_>"
3874
3875 #. type: Plain text
3876 #: build/C/man3/mallopt.3:364
3877 msgid "Controls the same parameter as B<mallopt>()  B<M_MMAP_THRESHOLD>."
3878 msgstr ""
3879
3880 #. type: TP
3881 #: build/C/man3/mallopt.3:364
3882 #, no-wrap
3883 msgid "B<MALLOC_PERTURB_>"
3884 msgstr "B<MALLOC_PERTURB_>"
3885
3886 #. type: Plain text
3887 #: build/C/man3/mallopt.3:369
3888 msgid "Controls the same parameter as B<mallopt>()  B<M_PERTURB>."
3889 msgstr ""
3890
3891 #. type: TP
3892 #: build/C/man3/mallopt.3:369
3893 #, no-wrap
3894 msgid "B<MALLOC_TRIM_THRESHOLD_>"
3895 msgstr "B<MALLOC_TRIM_THRESHOLD_>"
3896
3897 #. type: Plain text
3898 #: build/C/man3/mallopt.3:374
3899 msgid "Controls the same parameter as B<mallopt>()  B<M_TRIM_THRESHOLD>."
3900 msgstr ""
3901
3902 #. type: TP
3903 #: build/C/man3/mallopt.3:374
3904 #, no-wrap
3905 msgid "B<MALLOC_TOP_PAD_>"
3906 msgstr "B<MALLOC_TOP_PAD_>"
3907
3908 #. type: Plain text
3909 #: build/C/man3/mallopt.3:379
3910 msgid "Controls the same parameter as B<mallopt>()  B<M_TOP_PAD>."
3911 msgstr ""
3912
3913 #. type: Plain text
3914 #: build/C/man3/mallopt.3:384
3915 msgid "On success, B<mallopt>()  returns 1.  On error, it returns 0."
3916 msgstr "B<mallopt>()  は成功すると 1 を返す。エラーの場合は 0 を返す。"
3917
3918 #.  .SH VERSIONS
3919 #.  Available already in glibc 2.0, possibly earlier
3920 #. type: Plain text
3921 #: build/C/man3/mallopt.3:392
3922 msgid "On error, I<errno> is I<not> set."
3923 msgstr "エラーの場合、I<errno> は設定I<されない>。"
3924
3925 #.  .SH NOTES
3926 #. type: Plain text
3927 #: build/C/man3/mallopt.3:406
3928 msgid ""
3929 "This function is not specified by POSIX or the C standards.  A similar "
3930 "function exists on many System V derivatives, but the range of values for "
3931 "I<param> varies across systems.  The SVID defined options B<M_MXFAST>, "
3932 "B<M_NLBLKS>, B<M_GRAIN>, and B<M_KEEP>, but only the first of these is "
3933 "implemented in glibc."
3934 msgstr ""
3935
3936 #. type: Plain text
3937 #: build/C/man3/mallopt.3:410
3938 msgid "Specifying an invalid value for I<param> does not generate an error."
3939 msgstr ""
3940
3941 #.  FIXME This looks buggy:
3942 #.  setting the M_MXFAST limit rounds up:    (s + SIZE_SZ) & ~MALLOC_ALIGN_MASK)
3943 #.  malloc requests are rounded up:
3944 #.     (req) + SIZE_SZ + MALLOC_ALIGN_MASK) & ~MALLOC_ALIGN_MASK
3945 #.  http://sources.redhat.com/bugzilla/show_bug.cgi?id=12129
3946 #. type: Plain text
3947 #: build/C/man3/mallopt.3:418
3948 msgid ""
3949 "A calculation error within the glibc implementation means that a call of the "
3950 "form:"
3951 msgstr ""
3952
3953 #. type: Plain text
3954 #: build/C/man3/mallopt.3:421
3955 #, no-wrap
3956 msgid "    mallopt(M_MXFAST, n)\n"
3957 msgstr "    mallopt(M_MXFAST, n)\n"
3958
3959 #.  Bins are multiples of 2 * sizeof(size_t) + sizeof(size_t)
3960 #. type: Plain text
3961 #: build/C/man3/mallopt.3:433
3962 msgid ""
3963 "does not result in fastbins being employed for all allocations of size up to "
3964 "I<n>.  To ensure desired results, I<n> should be rounded up to the next "
3965 "multiple greater than or equal to I<(2k+1)*sizeof(size_t)>, where I<k> is an "
3966 "integer."
3967 msgstr ""
3968
3969 #.  FIXME MALLOC_MMAP_THRESHOLD_ and MALLOC_MMAP_MAX_
3970 #.  do have an effect for set-user-ID programs (but not
3971 #.  set-group-ID programs).
3972 #.  http://sources.redhat.com/bugzilla/show_bug.cgi?id=12155
3973 #. type: Plain text
3974 #: build/C/man3/mallopt.3:445
3975 msgid ""
3976 "The B<MALLOC_MMAP_THRESHOLD_> and B<MALLOC_MMAP_MAX_> variables are I<not> "
3977 "ignored in set-group-ID programs."
3978 msgstr ""
3979
3980 #.  FIXME http://sources.redhat.com/bugzilla/show_bug.cgi?id=12140
3981 #. type: Plain text
3982 #: build/C/man3/mallopt.3:466
3983 msgid ""
3984 "If B<mallopt>()  is used to set B<M_PERTURB>, then, as expected, the bytes "
3985 "of allocated memory are initialized to the complement of the byte in "
3986 "I<value>, and when that memory is freed, the bytes of the region are "
3987 "initialized to the byte specified in I<value>.  However, there is an off-by-"
3988 "I<sizeof(size_t)> error in the implementation: instead of initializing "
3989 "precisely the block of memory being freed by the call I<free(p)>, the block "
3990 "starting at I<p+sizeof(size_t)> is initialized."
3991 msgstr ""
3992
3993 #. type: Plain text
3994 #: build/C/man3/mallopt.3:475
3995 msgid ""
3996 "The program below demonstrates the use of B<M_CHECK_ACTION>.  If the program "
3997 "is supplied with an (integer) command-line argument, then that argument is "
3998 "used to set the B<M_CHECK_ACTION> parameter.  The program then allocates a "
3999 "block of memory, and frees it twice (an error)."
4000 msgstr ""
4001
4002 #. type: Plain text
4003 #: build/C/man3/mallopt.3:479
4004 msgid ""
4005 "The following shell session shows what happens when we run this program "
4006 "under glibc, with the default value for B<M_CHECK_ACTION>:"
4007 msgstr ""
4008
4009 #. type: Plain text
4010 #: build/C/man3/mallopt.3:499
4011 #, no-wrap
4012 msgid ""
4013 "$ B<./a.out>\n"
4014 "main(): returned from first free() call\n"
4015 "*** glibc detected *** ./a.out: double free or corruption (top): 0x09d30008 ***\n"
4016 "======= Backtrace: =========\n"
4017 "/lib/libc.so.6(+0x6c501)[0x523501]\n"
4018 "/lib/libc.so.6(+0x6dd70)[0x524d70]\n"
4019 "/lib/libc.so.6(cfree+0x6d)[0x527e5d]\n"
4020 "\\&./a.out[0x80485db]\n"
4021 "/lib/libc.so.6(__libc_start_main+0xe7)[0x4cdce7]\n"
4022 "\\&./a.out[0x8048471]\n"
4023 "======= Memory map: ========\n"
4024 "001e4000-001fe000 r-xp 00000000 08:06 1083555    /lib/libgcc_s.so.1\n"
4025 "001fe000-001ff000 r--p 00019000 08:06 1083555    /lib/libgcc_s.so.1\n"
4026 "[some lines omitted]\n"
4027 "b7814000-b7817000 rw-p 00000000 00:00 0\n"
4028 "bff53000-bff74000 rw-p 00000000 00:00 0          [stack]\n"
4029 "Aborted (core dumped)\n"
4030 msgstr ""
4031 "$ B<./a.out>\n"
4032 "main(): returned from first free() call\n"
4033 "*** glibc detected *** ./a.out: double free or corruption (top): 0x09d30008 ***\n"
4034 "======= Backtrace: =========\n"
4035 "/lib/libc.so.6(+0x6c501)[0x523501]\n"
4036 "/lib/libc.so.6(+0x6dd70)[0x524d70]\n"
4037 "/lib/libc.so.6(cfree+0x6d)[0x527e5d]\n"
4038 "\\&./a.out[0x80485db]\n"
4039 "/lib/libc.so.6(__libc_start_main+0xe7)[0x4cdce7]\n"
4040 "\\&./a.out[0x8048471]\n"
4041 "======= Memory map: ========\n"
4042 "001e4000-001fe000 r-xp 00000000 08:06 1083555    /lib/libgcc_s.so.1\n"
4043 "001fe000-001ff000 r--p 00019000 08:06 1083555    /lib/libgcc_s.so.1\n"
4044 "[some lines omitted]\n"
4045 "b7814000-b7817000 rw-p 00000000 00:00 0\n"
4046 "bff53000-bff74000 rw-p 00000000 00:00 0          [stack]\n"
4047 "Aborted (core dumped)\n"
4048
4049 #. type: Plain text
4050 #: build/C/man3/mallopt.3:504
4051 msgid ""
4052 "The following runs show the results when employing other values for "
4053 "B<M_CHECK_ACTION>:"
4054 msgstr ""
4055
4056 #. type: Plain text
4057 #: build/C/man3/mallopt.3:517
4058 #, no-wrap
4059 msgid ""
4060 "$ B<./a.out 1>             # Diagnose error and continue\n"
4061 "main(): returned from first free() call\n"
4062 "*** glibc detected *** ./a.out: double free or corruption (top): 0x09cbe008 ***\n"
4063 "main(): returned from second free() call\n"
4064 "$ B<./a.out 2>             # Abort without error message\n"
4065 "main(): returned from first free() call\n"
4066 "Aborted (core dumped)\n"
4067 "$ B<./a.out 0>             # Ignore error and continue\n"
4068 "main(): returned from first free() call\n"
4069 "main(): returned from second free() call\n"
4070 msgstr ""
4071 "$ B<./a.out 1>             # Diagnose error and continue\n"
4072 "main(): returned from first free() call\n"
4073 "*** glibc detected *** ./a.out: double free or corruption (top): 0x09cbe008 ***\n"
4074 "main(): returned from second free() call\n"
4075 "$ B<./a.out 2>             # Abort without error message\n"
4076 "main(): returned from first free() call\n"
4077 "Aborted (core dumped)\n"
4078 "$ B<./a.out 0>             # Ignore error and continue\n"
4079 "main(): returned from first free() call\n"
4080 "main(): returned from second free() call\n"
4081
4082 #. type: Plain text
4083 #: build/C/man3/mallopt.3:523
4084 msgid ""
4085 "The next run shows how to set the same parameter using the B<MALLOC_CHECK_> "
4086 "environment variable:"
4087 msgstr ""
4088
4089 #. type: Plain text
4090 #: build/C/man3/mallopt.3:530
4091 #, no-wrap
4092 msgid ""
4093 "$ B<MALLOC_CHECK_=1 ./a.out>\n"
4094 "main(): returned from first free() call\n"
4095 "*** glibc detected *** ./a.out: free(): invalid pointer: 0x092c2008 ***\n"
4096 "main(): returned from second free() call\n"
4097 msgstr ""
4098 "$ B<MALLOC_CHECK_=1 ./a.out>\n"
4099 "main(): returned from first free() call\n"
4100 "*** glibc detected *** ./a.out: free(): invalid pointer: 0x092c2008 ***\n"
4101 "main(): returned from second free() call\n"
4102
4103 #. type: Plain text
4104 #: build/C/man3/mallopt.3:538
4105 #, no-wrap
4106 msgid ""
4107 "#include E<lt>malloc.hE<gt>\n"
4108 "#include E<lt>stdio.hE<gt>\n"
4109 "#include E<lt>stdlib.hE<gt>\n"
4110 msgstr ""
4111 "#include E<lt>malloc.hE<gt>\n"
4112 "#include E<lt>stdio.hE<gt>\n"
4113 "#include E<lt>stdlib.hE<gt>\n"
4114
4115 #. type: Plain text
4116 #: build/C/man3/mallopt.3:543 build/C/man3/mcheck.3:187
4117 #, no-wrap
4118 msgid ""
4119 "int\n"
4120 "main(int argc, char *argv[])\n"
4121 "{\n"
4122 "    char *p;\n"
4123 msgstr ""
4124 "int\n"
4125 "main(int argc, char *argv[])\n"
4126 "{\n"
4127 "    char *p;\n"
4128
4129 #. type: Plain text
4130 #: build/C/man3/mallopt.3:550
4131 #, no-wrap
4132 msgid ""
4133 "    if (argc E<gt> 1) {\n"
4134 "        if (mallopt(M_CHECK_ACTION, atoi(argv[1])) != 1) {\n"
4135 "            fprintf(stderr, \"mallopt() failed\");\n"
4136 "            exit(EXIT_FAILURE);\n"
4137 "        }\n"
4138 "    }\n"
4139 msgstr ""
4140 "    if (argc E<gt> 1) {\n"
4141 "        if (mallopt(M_CHECK_ACTION, atoi(argv[1])) != 1) {\n"
4142 "            fprintf(stderr, \"mallopt() failed\");\n"
4143 "            exit(EXIT_FAILURE);\n"
4144 "        }\n"
4145 "    }\n"
4146
4147 #. type: Plain text
4148 #: build/C/man3/mallopt.3:556
4149 #, no-wrap
4150 msgid ""
4151 "    p = malloc(1000);\n"
4152 "    if (p == NULL) {\n"
4153 "        fprintf(stderr, \"malloc() failed\");\n"
4154 "        exit(EXIT_FAILURE);\n"
4155 "    }\n"
4156 msgstr ""
4157 "    p = malloc(1000);\n"
4158 "    if (p == NULL) {\n"
4159 "        fprintf(stderr, \"malloc() failed\");\n"
4160 "        exit(EXIT_FAILURE);\n"
4161 "    }\n"
4162
4163 #. type: Plain text
4164 #: build/C/man3/mallopt.3:559
4165 #, no-wrap
4166 msgid ""
4167 "    free(p);\n"
4168 "    printf(\"main(): returned from first free() call\\en\");\n"
4169 msgstr ""
4170 "    free(p);\n"
4171 "    printf(\"main(): returned from first free() call\\en\");\n"
4172
4173 #. type: Plain text
4174 #: build/C/man3/mallopt.3:562
4175 #, no-wrap
4176 msgid ""
4177 "    free(p);\n"
4178 "    printf(\"main(): returned from second free() call\\en\");\n"
4179 msgstr ""
4180 "    free(p);\n"
4181 "    printf(\"main(): returned from second free() call\\en\");\n"
4182
4183 #. type: Plain text
4184 #: build/C/man3/mallopt.3:580
4185 msgid ""
4186 "B<mmap>(2), B<sbrk>(2), B<mallinfo>(3), B<malloc>(3), B<malloc_hook>(3), "
4187 "B<malloc_info>(3), B<malloc_stats>(3), B<malloc_trim>(3), B<mcheck>(3), "
4188 "B<mtrace>(3), B<posix_memalign>(3)"
4189 msgstr ""
4190 "B<mmap>(2), B<sbrk>(2), B<mallinfo>(3), B<malloc>(3), B<malloc_hook>(3), "
4191 "B<malloc_info>(3), B<malloc_stats>(3), B<malloc_trim>(3), B<mcheck>(3), "
4192 "B<mtrace>(3), B<posix_memalign>(3)"
4193
4194 #. type: TH
4195 #: build/C/man3/mcheck.3:25
4196 #, no-wrap
4197 msgid "MCHECK"
4198 msgstr "MCHECK"
4199
4200 #. type: TH
4201 #: build/C/man3/mcheck.3:25 build/C/man3/mtrace.3:25
4202 #, no-wrap
4203 msgid "2012-04-18"
4204 msgstr "2012-04-18"
4205
4206 #. type: Plain text
4207 #: build/C/man3/mcheck.3:28
4208 msgid ""
4209 "mcheck, mcheck_check_all, mcheck_pedantic, mprobe - heap consistency checking"
4210 msgstr ""
4211
4212 #. type: Plain text
4213 #: build/C/man3/mcheck.3:31
4214 #, no-wrap
4215 msgid "B<#include E<lt>mcheck.hE<gt>>\n"
4216 msgstr "B<#include E<lt>mcheck.hE<gt>>\n"
4217
4218 #. type: Plain text
4219 #: build/C/man3/mcheck.3:33
4220 #, no-wrap
4221 msgid "B<int mcheck(void (*>I<abortfunc>B<)(enum mcheck_status >I<mstatus>B<));>\n"
4222 msgstr ""
4223
4224 #. type: Plain text
4225 #: build/C/man3/mcheck.3:35
4226 #, no-wrap
4227 msgid "B<int mcheck_pedantic(void (*>I<abortfunc>B<)(enum mcheck_status >I<mstatus>B<));>\n"
4228 msgstr ""
4229
4230 #. type: Plain text
4231 #: build/C/man3/mcheck.3:37
4232 #, no-wrap
4233 msgid "B<void mcheck_check_all(void);>\n"
4234 msgstr "B<void mcheck_check_all(void);>\n"
4235
4236 #. type: Plain text
4237 #: build/C/man3/mcheck.3:39
4238 #, no-wrap
4239 msgid "B<enum mcheck_status mprobe(void *>I<ptr>B<);>\n"
4240 msgstr "B<enum mcheck_status mprobe(void *>I<ptr>B<);>\n"
4241
4242 #. type: Plain text
4243 #: build/C/man3/mcheck.3:51
4244 msgid ""
4245 "The B<mcheck>()  function installs a set of debugging hooks for the B<malloc>"
4246 "(3)  family of memory-allocation functions.  These hooks cause certain "
4247 "consistency checks to be performed on the state of the heap.  The checks can "
4248 "detect application errors such as freeing a block of memory more than once "
4249 "or corrupting the bookkeeping data structures that immediately precede a "
4250 "block of allocated memory."
4251 msgstr ""
4252
4253 #. type: Plain text
4254 #: build/C/man3/mcheck.3:63
4255 msgid ""
4256 "To be effective, the B<mcheck>()  function must be called before the first "
4257 "call to B<malloc>(3)  or a related function.  In cases where this is "
4258 "difficult to ensure, linking the program with I<-mcheck> inserts an implicit "
4259 "call to B<mcheck>()  (with a NULL argument)  before the first call to a "
4260 "memory-allocation function."
4261 msgstr ""
4262
4263 #. type: Plain text
4264 #: build/C/man3/mcheck.3:71
4265 msgid ""
4266 "The B<mcheck_pedantic>()  function is similar to B<mcheck>(), but performs "
4267 "checks on all allocated blocks whenever one of the memory-allocation "
4268 "functions is called.  This can be very slow!"
4269 msgstr ""
4270
4271 #. type: Plain text
4272 #: build/C/man3/mcheck.3:78
4273 msgid ""
4274 "The B<mcheck_check_all>()  function causes an immediate check on all "
4275 "allocated blocks.  This call is effective only if B<mcheck>()  is called "
4276 "beforehand."
4277 msgstr ""
4278
4279 #. type: Plain text
4280 #: build/C/man3/mcheck.3:91
4281 msgid ""
4282 "If the system detects an inconsistency in the heap, the caller-supplied "
4283 "function pointed to by I<abortfunc> is invoked with a single argument "
4284 "argument, I<mstatus>, that indicates what type of inconsistency was "
4285 "detected.  If I<abortfunc> is NULL, a default function prints an error "
4286 "message on I<stderr> and calls B<abort>(3)."
4287 msgstr ""
4288
4289 #. type: Plain text
4290 #: build/C/man3/mcheck.3:103
4291 msgid ""
4292 "The B<mprobe>()  function performs a consistency check on the block of "
4293 "allocated memory pointed to by I<ptr>.  The B<mcheck>()  function should be "
4294 "called beforehand (otherwise B<mprobe>()  returns B<MCHECK_DISABLED>)."
4295 msgstr ""
4296
4297 #. type: Plain text
4298 #: build/C/man3/mcheck.3:111
4299 msgid ""
4300 "The following list describes the values returned by B<mprobe>()  or passed "
4301 "as the I<mstatus> argument when I<abortfunc> is invoked:"
4302 msgstr ""
4303
4304 #. type: TP
4305 #: build/C/man3/mcheck.3:111
4306 #, no-wrap
4307 msgid "B<MCHECK_DISABLED> (B<mprobe>() only)"
4308 msgstr ""
4309
4310 #. type: Plain text
4311 #: build/C/man3/mcheck.3:116
4312 msgid ""
4313 "B<mcheck>()  was not called before the first memory allocation function was "
4314 "called.  Consistency checking is not possible."
4315 msgstr ""
4316
4317 #. type: TP
4318 #: build/C/man3/mcheck.3:116
4319 #, no-wrap
4320 msgid "B<MCHECK_OK> (B<mprobe>() only)"
4321 msgstr ""
4322
4323 #. type: Plain text
4324 #: build/C/man3/mcheck.3:119
4325 msgid "No inconsistency detected."
4326 msgstr ""
4327
4328 #. type: TP
4329 #: build/C/man3/mcheck.3:119
4330 #, no-wrap
4331 msgid "B<MCHECK_HEAD>"
4332 msgstr "B<MCHECK_HEAD>"
4333
4334 #. type: Plain text
4335 #: build/C/man3/mcheck.3:122
4336 msgid "Memory preceding an allocated block was clobbered."
4337 msgstr ""
4338
4339 #. type: TP
4340 #: build/C/man3/mcheck.3:122
4341 #, no-wrap
4342 msgid "B<MCHECK_TAIL>"
4343 msgstr "B<MCHECK_TAIL>"
4344
4345 #. type: Plain text
4346 #: build/C/man3/mcheck.3:125
4347 msgid "Memory following an allocated block was clobbered."
4348 msgstr ""
4349
4350 #. type: TP
4351 #: build/C/man3/mcheck.3:125
4352 #, no-wrap
4353 msgid "B<MCHECK_FREE>"
4354 msgstr "B<MCHECK_FREE>"
4355
4356 #. type: Plain text
4357 #: build/C/man3/mcheck.3:129
4358 msgid "A block of memory was freed twice."
4359 msgstr ""
4360
4361 #. type: Plain text
4362 #: build/C/man3/mcheck.3:134
4363 msgid ""
4364 "B<mcheck>()  and B<mcheck_pedantic>()  return 0 on success, or -1 on error."
4365 msgstr ""
4366
4367 #. type: Plain text
4368 #: build/C/man3/mcheck.3:145
4369 msgid ""
4370 "The B<mcheck_pedantic>()  and B<mcheck_check_all>()  functions are available "
4371 "since glibc 2.2.  The B<mcheck>()  and B<mprobe>()  functions are present "
4372 "since at least glibc 2.0"
4373 msgstr ""
4374
4375 #.  But is MALLOC_CHECK_ slower?
4376 #. type: Plain text
4377 #: build/C/man3/mcheck.3:159
4378 msgid ""
4379 "Linking a program with I<-lmcheck> and using the B<MALLOC_CHECK_> "
4380 "environment variable (described in B<mallopt>(3))  cause the same kinds of "
4381 "errors to be detected.  But, using B<MALLOC_CHECK_> does not require the "
4382 "application to be relinked."
4383 msgstr ""
4384
4385 #. type: Plain text
4386 #: build/C/man3/mcheck.3:165
4387 msgid ""
4388 "The program below calls B<mcheck>()  with a NULL argument and then frees the "
4389 "same block of memory twice.  The following shell session demonstrates what "
4390 "happens when running the program:"
4391 msgstr ""
4392
4393 #. type: Plain text
4394 #: build/C/man3/mcheck.3:170
4395 #, no-wrap
4396 msgid ""
4397 "$B< ./a.out>\n"
4398 "About to free\n"
4399 msgstr ""
4400
4401 #. type: Plain text
4402 #: build/C/man3/mcheck.3:174
4403 #, no-wrap
4404 msgid ""
4405 "About to free a second time\n"
4406 "block freed twice\n"
4407 "Aborted (core dumped)\n"
4408 msgstr ""
4409
4410 #. type: Plain text
4411 #: build/C/man3/mcheck.3:182
4412 #, no-wrap
4413 msgid ""
4414 "#include E<lt>stdlib.hE<gt>\n"
4415 "#include E<lt>stdio.hE<gt>\n"
4416 "#include E<lt>mcheck.hE<gt>\n"
4417 msgstr ""
4418 "#include E<lt>stdlib.hE<gt>\n"
4419 "#include E<lt>stdio.hE<gt>\n"
4420 "#include E<lt>mcheck.hE<gt>\n"
4421
4422 #. type: Plain text
4423 #: build/C/man3/mcheck.3:190
4424 #, no-wrap
4425 msgid ""
4426 "    if (mcheck(NULL) != 0) {\n"
4427 "        fprintf(stderr, \"mcheck() failed\\en\");\n"
4428 msgstr ""
4429
4430 #. type: Plain text
4431 #: build/C/man3/mcheck.3:193
4432 #, no-wrap
4433 msgid ""
4434 "        exit(EXIT_FAILURE);\n"
4435 "    }\n"
4436 msgstr ""
4437 "        exit(EXIT_FAILURE);\n"
4438 "    }\n"
4439
4440 #. type: Plain text
4441 #: build/C/man3/mcheck.3:195
4442 #, no-wrap
4443 msgid "    p = malloc(1000);\n"
4444 msgstr "    p = malloc(1000);\n"
4445
4446 #. type: Plain text
4447 #: build/C/man3/mcheck.3:200
4448 #, no-wrap
4449 msgid ""
4450 "    fprintf(stderr, \"About to free\\en\");\n"
4451 "    free(p);\n"
4452 "    fprintf(stderr, \"\\enAbout to free a second time\\en\");\n"
4453 "    free(p);\n"
4454 msgstr ""
4455
4456 #. type: Plain text
4457 #: build/C/man3/mcheck.3:208
4458 msgid "B<malloc>(3), B<mallopt>(3), B<mtrace>(3)"
4459 msgstr "B<malloc>(3), B<mallopt>(3), B<mtrace>(3)"
4460
4461 #. type: TH
4462 #: build/C/man2/mlock.2:26
4463 #, no-wrap
4464 msgid "MLOCK"
4465 msgstr "MLOCK"
4466
4467 #. type: TH
4468 #: build/C/man2/mlock.2:26
4469 #, no-wrap
4470 msgid "2011-09-14"
4471 msgstr "2011-09-14"
4472
4473 #. type: Plain text
4474 #: build/C/man2/mlock.2:29
4475 msgid "mlock, munlock, mlockall, munlockall - lock and unlock memory"
4476 msgstr "mlock - メモリのロックとロック解除を行う"
4477
4478 #. type: Plain text
4479 #: build/C/man2/mlock.2:32 build/C/man2/mmap.2:46 build/C/man2/mmap2.2:35
4480 #: build/C/man2/mprotect.2:44 build/C/man2/mremap.2:38
4481 #, no-wrap
4482 msgid "B<#include E<lt>sys/mman.hE<gt>>\n"
4483 msgstr "B<#include E<lt>sys/mman.hE<gt>>\n"
4484
4485 #. type: Plain text
4486 #: build/C/man2/mlock.2:35
4487 #, no-wrap
4488 msgid ""
4489 "B<int mlock(const void *>I<addr>B<, size_t >I<len>B<);>\n"
4490 "B<int munlock(const void *>I<addr>B<, size_t >I<len>B<);>\n"
4491 msgstr ""
4492 "B<int mlock(const void *>I<addr>B<, size_t >I<len>B<);>\n"
4493 "B<int munlock(const void *>I<addr>B<, size_t >I<len>B<);>\n"
4494
4495 #. type: Plain text
4496 #: build/C/man2/mlock.2:38
4497 #, no-wrap
4498 msgid ""
4499 "B<int mlockall(int >I<flags>B<);>\n"
4500 "B<int munlockall(void);>\n"
4501 msgstr ""
4502 "B<int mlockall(int >I<flags>B<);>\n"
4503 "B<int munlockall(void);>\n"
4504
4505 #. type: Plain text
4506 #: build/C/man2/mlock.2:54
4507 msgid ""
4508 "B<mlock>()  and B<mlockall>()  respectively lock part or all of the calling "
4509 "process's virtual address space into RAM, preventing that memory from being "
4510 "paged to the swap area.  B<munlock>()  and B<munlockall>()  perform the "
4511 "converse operation, respectively unlocking part or all of the calling "
4512 "process's virtual address space, so that pages in the specified virtual "
4513 "address range may once more to be swapped out if required by the kernel "
4514 "memory manager.  Memory locking and unlocking are performed in units of "
4515 "whole pages."
4516 msgstr ""
4517 "B<mlock>()  と B<mlockall>()  はそれぞれ、呼び出し元プロセスの仮想アドレス空"
4518 "間の一部または全部を RAM 上にロックし、メモリがスワップエリアにページングされ"
4519 "るのを防ぐ。 B<munlock>()  と B<munlockall>()  は逆の操作で、それぞれ呼び出し"
4520 "元プロセスの仮想アドレス空間の一部または全部を ロック解除する。つまり、指定さ"
4521 "れた仮想アドレス範囲のページは カーネルメモリマネージャーから要求されればス"
4522 "ワップアウトするようになる。 メモリのロックとロック解除はページ単位で行われ"
4523 "る。"
4524
4525 #. type: SS
4526 #: build/C/man2/mlock.2:54
4527 #, no-wrap
4528 msgid "mlock() and munlock()"
4529 msgstr "mlock() と munlock()"
4530
4531 #. type: Plain text
4532 #: build/C/man2/mlock.2:64
4533 msgid ""
4534 "B<mlock>()  locks pages in the address range starting at I<addr> and "
4535 "continuing for I<len> bytes.  All pages that contain a part of the specified "
4536 "address range are guaranteed to be resident in RAM when the call returns "
4537 "successfully; the pages are guaranteed to stay in RAM until later unlocked."
4538 msgstr ""
4539 "B<mlock>()  は I<addr> から始まる長さ I<len> バイトのアドレス範囲のページを"
4540 "ロックする。 呼び出しが成功した場合には、 指定されたアドレス範囲を含む全ての"
4541 "ページは RAM に残り続けることが保証される。 これらのページは後でロック解除さ"
4542 "れるまで RAM に残り続けることが保証される。"
4543
4544 #. type: Plain text
4545 #: build/C/man2/mlock.2:73
4546 msgid ""
4547 "B<munlock>()  unlocks pages in the address range starting at I<addr> and "
4548 "continuing for I<len> bytes.  After this call, all pages that contain a part "
4549 "of the specified memory range can be moved to external swap space again by "
4550 "the kernel."
4551 msgstr ""
4552 "B<munlock>()  は、 I<addr> から始まる長さ I<len> バイトのアドレス範囲のページ"
4553 "のロックを解除する。 この呼び出しを行った後は、カーネルが、指定されたメモリ範"
4554 "囲を含む 全てのページを外部のスワップ空間に移動できるようになる。"
4555
4556 #. type: SS
4557 #: build/C/man2/mlock.2:73
4558 #, no-wrap
4559 msgid "mlockall() and munlockall()"
4560 msgstr "mlockall() と munlockall()"
4561
4562 #. type: Plain text
4563 #: build/C/man2/mlock.2:83
4564 msgid ""
4565 "B<mlockall>()  locks all pages mapped into the address space of the calling "
4566 "process.  This includes the pages of the code, data and stack segment, as "
4567 "well as shared libraries, user space kernel data, shared memory, and memory-"
4568 "mapped files.  All mapped pages are guaranteed to be resident in RAM when "
4569 "the call returns successfully; the pages are guaranteed to stay in RAM until "
4570 "later unlocked."
4571 msgstr ""
4572 "B<mlockall>()  は呼び出し元プロセスのアドレス空間にマップされている全てのペー"
4573 "ジを ロックする。これにはコード、データ、スタックの 各セグメント、共有ライブ"
4574 "ラリ、カーネルのユーザー空間データ、 共有メモリ、メモリ・マップされたファイル"
4575 "が含まれる。 システム・コールが成功した場合には全てのマップされたページは "
4576 "RAM に 残ることを保証される。 これらのページは後でロック解除されるまで RAM に"
4577 "残り続けることが保証される。"
4578
4579 #. type: Plain text
4580 #: build/C/man2/mlock.2:88
4581 msgid ""
4582 "The I<flags> argument is constructed as the bitwise OR of one or more of the "
4583 "following constants:"
4584 msgstr "I<flags> 引数は以下の内容の一つまたは複数のビット OR から構成される:"
4585
4586 #. type: TP
4587 #: build/C/man2/mlock.2:88
4588 #, no-wrap
4589 msgid "B<MCL_CURRENT>"
4590 msgstr "B<MCL_CURRENT>"
4591
4592 #. type: Plain text
4593 #: build/C/man2/mlock.2:92
4594 msgid ""
4595 "Lock all pages which are currently mapped into the address space of the "
4596 "process."
4597 msgstr ""
4598 "現在、プロセスのアドレス空間にマップされている全てのページをロックする。"
4599
4600 #. type: TP
4601 #: build/C/man2/mlock.2:92
4602 #, no-wrap
4603 msgid "B<MCL_FUTURE>"
4604 msgstr "B<MCL_FUTURE>"
4605
4606 #. type: Plain text
4607 #: build/C/man2/mlock.2:99
4608 msgid ""
4609 "Lock all pages which will become mapped into the address space of the "
4610 "process in the future.  These could be for instance new pages required by a "
4611 "growing heap and stack as well as new memory mapped files or shared memory "
4612 "regions."
4613 msgstr ""
4614 "将来、プロセスのアドレス空間にマップされる全てのページをロックする。 例えば、"
4615 "ヒープ (heap) やスタックの成長により新しく必要になったページだけで なく、新し"
4616 "くメモリマップされたファイルや共有メモリ領域もロックされる。"
4617
4618 #. type: Plain text
4619 #: build/C/man2/mlock.2:112
4620 msgid ""
4621 "If B<MCL_FUTURE> has been specified, then a later system call (e.g., B<mmap>"
4622 "(2), B<sbrk>(2), B<malloc>(3)), may fail if it would cause the number of "
4623 "locked bytes to exceed the permitted maximum (see below).  In the same "
4624 "circumstances, stack growth may likewise fail: the kernel will deny stack "
4625 "expansion and deliver a B<SIGSEGV> signal to the process."
4626 msgstr ""
4627 "B<MCL_FUTURE> が指定されていると、以後のシステムコール (例えば、 B<mmap>(2), "
4628 "B<sbrk>(2), B<malloc>(3))  は、ロックするバイト数が許可された最大値 (下記参"
4629 "照) を超えた場合に 失敗する可能性がある。 同様に、スタックの成長も失敗する可"
4630 "能性がある。 その場合、カーネルはスタックの拡張を拒否し、 B<SIGSEGV> をプロセ"
4631 "スに送る。"
4632
4633 #. type: Plain text
4634 #: build/C/man2/mlock.2:116
4635 msgid ""
4636 "B<munlockall>()  unlocks all pages mapped into the address space of the "
4637 "calling process."
4638 msgstr ""
4639 "B<munlockall>()  は、呼び出し元プロセスのアドレス空間にマッピングされている "
4640 "全てのページをロック解除する。"
4641
4642 #. type: Plain text
4643 #: build/C/man2/mlock.2:122
4644 msgid ""
4645 "On success these system calls return 0.  On error, -1 is returned, I<errno> "
4646 "is set appropriately, and no changes are made to any locks in the address "
4647 "space of the process."
4648 msgstr ""
4649 "成功した場合は、これらのシステムコールはゼロを返す。 エラーの場合は -1 が返さ"
4650 "れ、 I<errno> が適切に設定され、プロセスのアドレス空間におけるロックは変更さ"
4651 "れない。"
4652
4653 #. type: Plain text
4654 #: build/C/man2/mlock.2:131
4655 msgid ""
4656 "(Linux 2.6.9 and later) the caller had a nonzero B<RLIMIT_MEMLOCK> soft "
4657 "resource limit, but tried to lock more memory than the limit permitted.  "
4658 "This limit is not enforced if the process is privileged (B<CAP_IPC_LOCK>)."
4659 msgstr ""
4660 "(Linux 2.6.9 以降) 呼び出し元は非ゼロの ソフト資源制限 B<RLIMIT_MEMLOCK> を持"
4661 "つが、制限が許可している以上のメモリをロックしようとした。 この制限は、プロセ"
4662 "スが特権 (B<CAP_IPC_LOCK>)  を持っている場合は適用されない。"
4663
4664 #.  In the case of mlock(), this check is somewhat buggy: it doesn't
4665 #.  take into account whether the to-be-locked range overlaps with
4666 #.  already locked pages.  Thus, suppose we allocate
4667 #.  (num_physpages / 4 + 1) of memory, and lock those pages once using
4668 #.  mlock(), and then lock the *same* page range a second time.
4669 #.  In the case, the second mlock() call will fail, since the check
4670 #.  calculates that the process is trying to lock (num_physpages / 2 + 2)
4671 #.  pages, which of course is not true.  (MTK, Nov 04, kernel 2.4.28)
4672 #. type: Plain text
4673 #: build/C/man2/mlock.2:143
4674 msgid ""
4675 "(Linux 2.4 and earlier) the calling process tried to lock more than half of "
4676 "RAM."
4677 msgstr ""
4678 "(Linux 2.4 以前) 呼び出し元プロセスが RAM の半分以上をロックしようとした。"
4679
4680 #. SVr4 documents an additional EAGAIN error code.
4681 #. type: Plain text
4682 #: build/C/man2/mlock.2:149
4683 msgid ""
4684 "The caller is not privileged, but needs privilege (B<CAP_IPC_LOCK>)  to "
4685 "perform the requested operation."
4686 msgstr ""
4687 "呼び出し側が特権を持っていないが、\n"
4688 "要求された操作を実行するには特権 (B<CAP_IPC_LOCK>) が必要である。"
4689
4690 #. type: Plain text
4691 #: build/C/man2/mlock.2:154
4692 msgid "For B<mlock>()  and B<munlock>():"
4693 msgstr "B<mlock>()  と B<munlock>()  用として:"
4694
4695 #. type: Plain text
4696 #: build/C/man2/mlock.2:157
4697 msgid "Some or all of the specified address range could not be locked."
4698 msgstr "指定されたアドレス範囲の一部または全てをロックすることができなかった。"
4699
4700 #. type: Plain text
4701 #: build/C/man2/mlock.2:164
4702 msgid ""
4703 "The result of the addition I<start>+I<len> was less than I<start> (e.g., the "
4704 "addition may have resulted in an overflow)."
4705 msgstr ""
4706 "I<start>+I<len> の加算の結果が I<start> よりも小さかった\n"
4707 "(例えば、加算でオーバーフローが発生したなど)。"
4708
4709 #. type: Plain text
4710 #: build/C/man2/mlock.2:169
4711 msgid "(Not on Linux)  I<addr> was not a multiple of the page size."
4712 msgstr ""
4713 "(Linux ではこの意味で使われない)  I<addr> がページサイズの倍数ではない。"
4714
4715 #. type: Plain text
4716 #: build/C/man2/mlock.2:173
4717 msgid ""
4718 "Some of the specified address range does not correspond to mapped pages in "
4719 "the address space of the process."
4720 msgstr ""
4721 "指定されたアドレス範囲がプロセスのアドレス空間にマップされたページと 一致しな"
4722 "い。"
4723
4724 #. type: Plain text
4725 #: build/C/man2/mlock.2:176
4726 msgid "For B<mlockall>():"
4727 msgstr "B<mlockall>()  用として:"
4728
4729 #. type: Plain text
4730 #: build/C/man2/mlock.2:179
4731 msgid "Unknown I<flags> were specified."
4732 msgstr "未知の I<flags> が指定された。"
4733
4734 #. type: Plain text
4735 #: build/C/man2/mlock.2:182
4736 msgid "For B<munlockall>():"
4737 msgstr "B<munlockall>()  用として:"
4738
4739 #. type: Plain text
4740 #: build/C/man2/mlock.2:186
4741 msgid ""
4742 "(Linux 2.6.8 and earlier) The caller was not privileged (B<CAP_IPC_LOCK>)."
4743 msgstr ""
4744 "(Linux 2.6.8 以前) 呼び出し元が権限 (B<CAP_IPC_LOCK>)  を持っていない。"
4745
4746 #. type: Plain text
4747 #: build/C/man2/mlock.2:188
4748 msgid "POSIX.1-2001, SVr4."
4749 msgstr "POSIX.1-2001, SVr4."
4750
4751 #. type: SH
4752 #: build/C/man2/mlock.2:188 build/C/man2/mmap.2:501 build/C/man2/msync.2:105
4753 #, no-wrap
4754 msgid "AVAILABILITY"
4755 msgstr "可用性"
4756
4757 #. type: Plain text
4758 #: build/C/man2/mlock.2:200
4759 msgid ""
4760 "On POSIX systems on which B<mlock>()  and B<munlock>()  are available, "
4761 "B<_POSIX_MEMLOCK_RANGE> is defined in I<E<lt>unistd.hE<gt>> and the number "
4762 "of bytes in a page can be determined from the constant B<PAGESIZE> (if "
4763 "defined) in I<E<lt>limits.hE<gt>> or by calling I<sysconf(_SC_PAGESIZE)>."
4764 msgstr ""
4765 "B<mlock>()  と B<munlock>()  が使用可能な POSIX システムでは "
4766 "B<_POSIX_MEMLOCK_RANGE> が I<E<lt>unistd.hE<gt>> で定義されている。 また、"
4767 "ページあたりのバイト数は、 I<E<lt>limits.hE<gt>> で定義される定数 "
4768 "B<PAGESIZE> から (定義されている場合)、もしくは I<sysconf(_SC_PAGESIZE)> を呼"
4769 "び出すことで決定できる。"
4770
4771 #.  POSIX.1-2001: It shall be defined to -1 or 0 or 200112L.
4772 #.  -1: unavailable, 0: ask using sysconf().
4773 #.  glibc defines it to 1.
4774 #. type: Plain text
4775 #: build/C/man2/mlock.2:213
4776 msgid ""
4777 "On POSIX systems on which B<mlockall>()  and B<munlockall>()  are available, "
4778 "B<_POSIX_MEMLOCK> is defined in I<E<lt>unistd.hE<gt>> to a value greater "
4779 "than 0.  (See also B<sysconf>(3).)"
4780 msgstr ""
4781 "B<mlockall>()  と B<munlockall>()  が利用可能な POSIX システムでは、 "
4782 "B<_POSIX_MEMLOCK> は I<E<lt>unistd.hE<gt>> で 0 より大きい値に定義されている "
4783 "(B<sysconf>(3)  も参照のこと)。"
4784
4785 #. type: Plain text
4786 #: build/C/man2/mlock.2:231
4787 msgid ""
4788 "Memory locking has two main applications: real-time algorithms and high-"
4789 "security data processing.  Real-time applications require deterministic "
4790 "timing, and, like scheduling, paging is one major cause of unexpected "
4791 "program execution delays.  Real-time applications will usually also switch "
4792 "to a real-time scheduler with B<sched_setscheduler>(2).  Cryptographic "
4793 "security software often handles critical bytes like passwords or secret keys "
4794 "as data structures.  As a result of paging, these secrets could be "
4795 "transferred onto a persistent swap store medium, where they might be "
4796 "accessible to the enemy long after the security software has erased the "
4797 "secrets in RAM and terminated.  (But be aware that the suspend mode on "
4798 "laptops and some desktop computers will save a copy of the system's RAM to "
4799 "disk, regardless of memory locks.)"
4800 msgstr ""
4801 "メモリのロックの用途としては主に二つある: リアルタイム アルゴリズムと高いセ"
4802 "キュリティの必要なデータ処理である。リアルタイムの アプリケーションは決定的な"
4803 "タイミングやスケジューリングを必要とするが、 ページングは予期しないプログラム"
4804 "の実行遅延をもたらす主要な要因となる。 リアルタイムのアプリケーションはたいて"
4805 "いは B<sched_setscheduler>(2)  でリアルタイムスケジューラに変更される。 暗号"
4806 "やセキュリティのソフトウェアはしばしばパスワードや秘密鍵のデータの ような重要"
4807 "なバイト列を扱う。ページングの結果、これらの秘密が スワップ用の固定媒体に転送"
4808 "されるかもしれない。そして、セキュリティ・ ソフトウェアが RAM 上の秘密を削除"
4809 "して終了したずっと後になっても、 このスワップされたデータには敵がアクセスでき"
4810 "る可能性がある (しかし、ラップトップといくつかのデスクトップコンピュータの サ"
4811 "スペンドモードはシステムの RAM の内容をメモリのロックに関わらず ディスクに保"
4812 "存することに注意)。"
4813
4814 #. type: Plain text
4815 #: build/C/man2/mlock.2:244
4816 msgid ""
4817 "Real-time processes that are using B<mlockall>()  to prevent delays on page "
4818 "faults should reserve enough locked stack pages before entering the time-"
4819 "critical section, so that no page fault can be caused by function calls.  "
4820 "This can be achieved by calling a function that allocates a sufficiently "
4821 "large automatic variable (an array) and writes to the memory occupied by "
4822 "this array in order to touch these stack pages.  This way, enough pages will "
4823 "be mapped for the stack and can be locked into RAM.  The dummy writes ensure "
4824 "that not even copy-on-write page faults can occur in the critical section."
4825 msgstr ""
4826 "リアルタイムプロセスが B<mlockall>()  を使ってページフォールトによる遅延を防"
4827 "ごうとする場合、 関数呼び出しによってページフォールトが発生しないように、 時"
4828 "間制限の厳しい部分 (time-critical section) に入る前に 十分な量のロックされた"
4829 "スタックを確保しておく必要がある。 これを実現するには、十分な大きさの自動変"
4830 "数 (の配列) を確保し、 これらのスタック用のページがメモリ上に確保されるように"
4831 "この配列に 書き込みを行う関数を用意し、これを呼び出せばよい。こうすること"
4832 "で、 十分な量のページがスタックにマッピングされ、RAM にロックされる。 ダミー"
4833 "の書き込みを行うことによって、 時間制限の厳しい部分 (critical section) 内では"
4834 "書き込み時コピーによる ページフォールトさえも発生しないことが保証される。"
4835
4836 #. type: Plain text
4837 #: build/C/man2/mlock.2:250
4838 msgid ""
4839 "Memory locks are not inherited by a child created via B<fork>(2)  and are "
4840 "automatically removed (unlocked) during an B<execve>(2)  or when the process "
4841 "terminates."
4842 msgstr ""
4843 "メモリロックは B<fork>(2)  で作成された子プロセスには継承されず、 B<execve>"
4844 "(2)  が呼ばれたり、プロセスが終了した場合は 自動的に削除される (ロック解除さ"
4845 "れる)。"
4846
4847 #. type: Plain text
4848 #: build/C/man2/mlock.2:254
4849 msgid ""
4850 "The memory lock on an address range is automatically removed if the address "
4851 "range is unmapped via B<munmap>(2)."
4852 msgstr ""
4853 "あるアドレス範囲に対するメモリロックは、そのアドレス範囲が B<munmap>(2)  に"
4854 "よってアンマップされた場合は削除される。"
4855
4856 #. type: Plain text
4857 #: build/C/man2/mlock.2:267
4858 msgid ""
4859 "Memory locks do not stack, that is, pages which have been locked several "
4860 "times by calls to B<mlock>()  or B<mlockall>()  will be unlocked by a single "
4861 "call to B<munlock>()  for the corresponding range or by B<munlockall>().  "
4862 "Pages which are mapped to several locations or by several processes stay "
4863 "locked into RAM as long as they are locked at least at one location or by at "
4864 "least one process."
4865 msgstr ""
4866 "メモリのロックは累積しない。 すなわち複数回 B<mlock>()  や B<mlockall>()  を"
4867 "呼び出してロックされたページでも、 対応する範囲に対して B<munlock>()  を 1 回"
4868 "呼び出したり B<munlockall>()  を呼び出したりするだけでロック解除される。 複数"
4869 "の場所や複数のプロセスにマップされているページは、少なくとも一つの場所、 一つ"
4870 "のプロセスでロックされている限りは RAM に残り続ける。"
4871
4872 #. type: Plain text
4873 #: build/C/man2/mlock.2:278
4874 msgid ""
4875 "Under Linux, B<mlock>()  and B<munlock>()  automatically round I<addr> down "
4876 "to the nearest page boundary.  However, POSIX.1-2001 allows an "
4877 "implementation to require that I<addr> is page aligned, so portable "
4878 "applications should ensure this."
4879 msgstr ""
4880 "Linux では、 B<mlock>()  と B<munlock>()  は自動的に I<addr> を端数切り捨てに"
4881 "より一番近いページ境界へと丸める。 しかし POSIX.1-2001 は I<addr> がページ境"
4882 "界に合っていることを要求する実装も許している。 そのため移植性を意図したアプリ"
4883 "ケーションではきちんと境界に合わせた方が良い。"
4884
4885 #. type: Plain text
4886 #: build/C/man2/mlock.2:291
4887 msgid ""
4888 "The I<VmLck> field of the Linux-specific I</proc/PID/status> file shows how "
4889 "many kilobytes of memory the process with ID I<PID> has locked using B<mlock>"
4890 "(), B<mlockall>(), and B<mmap>(2)  B<MAP_LOCKED>."
4891 msgstr ""
4892 "Linux 固有の I</proc/PID/status> ファイルの I<VmLck> フィールドには、\n"
4893 "B<mlock>(), B<mlockall>() および B<mmap>(2) B<MAP_LOCKED> を使って、\n"
4894 "ID が I<PID> のプロセスがロックしているメモリ量 (キロバイト単位) が\n"
4895 "表示される。"
4896
4897 #. type: SS
4898 #: build/C/man2/mlock.2:291
4899 #, no-wrap
4900 msgid "Limits and permissions"
4901 msgstr "制限と権限"
4902
4903 #. type: Plain text
4904 #: build/C/man2/mlock.2:298
4905 msgid ""
4906 "In Linux 2.6.8 and earlier, a process must be privileged (B<CAP_IPC_LOCK>)  "
4907 "in order to lock memory and the B<RLIMIT_MEMLOCK> soft resource limit "
4908 "defines a limit on how much memory the process may lock."
4909 msgstr ""
4910 "Linux 2.6.8 以前では、メモリをロックするためには特権 (B<CAP_IPC_LOCK>)  が必"
4911 "要で、 ソフト資源制限 B<RLIMIT_MEMLOCK> はプロセスがどれだけのメモリをロック"
4912 "できるかの制限を定義する。"
4913
4914 #. type: Plain text
4915 #: build/C/man2/mlock.2:304
4916 msgid ""
4917 "Since Linux 2.6.9, no limits are placed on the amount of memory that a "
4918 "privileged process can lock and the B<RLIMIT_MEMLOCK> soft resource limit "
4919 "instead defines a limit on how much memory an unprivileged process may lock."
4920 msgstr ""
4921 "Linux 2.6.9 以降では、特権を持つプロセスがロックできるメモリ量は無制限とな"
4922 "り、 代わりにソフト資源制限 B<RLIMIT_MEMLOCK> は特権を持たないプロセスがロッ"
4923 "クできるメモリ量の制限を定義する。"
4924
4925 #. type: Plain text
4926 #: build/C/man2/mlock.2:312
4927 msgid ""
4928 "In the 2.4 series Linux kernels up to and including 2.4.17, a bug caused the "
4929 "B<mlockall>()  B<MCL_FUTURE> flag to be inherited across a B<fork>(2).  This "
4930 "was rectified in kernel 2.4.18."
4931 msgstr ""
4932 "2.4.17 までの 2.4 シリーズの Linux カーネルには、 B<mlockall>()  "
4933 "B<MCL_FUTURE> フラグが B<fork>(2)  で継承されると言うバグがある。 これはカー"
4934 "ネル 2.4.18 で修正された。"
4935
4936 #.  See the following LKML thread:
4937 #.  http://marc.theaimsgroup.com/?l=linux-kernel&m=113801392825023&w=2
4938 #.  "Rationale for RLIMIT_MEMLOCK"
4939 #.  23 Jan 2006
4940 #. type: Plain text
4941 #: build/C/man2/mlock.2:329
4942 msgid ""
4943 "Since kernel 2.6.9, if a privileged process calls I<mlockall(MCL_FUTURE)> "
4944 "and later drops privileges (loses the B<CAP_IPC_LOCK> capability by, for "
4945 "example, setting its effective UID to a nonzero value), then subsequent "
4946 "memory allocations (e.g., B<mmap>(2), B<brk>(2))  will fail if the "
4947 "B<RLIMIT_MEMLOCK> resource limit is encountered."
4948 msgstr ""
4949 "カーネル 2.6.9 以降では、特権を持ったプロセスが I<mlockall(MCL_FUTURE)> を呼"
4950 "び出した後で、特権をなくした場合 (例えば、 実効 UID を 0 以外の値に変更するな"
4951 "どにより、 B<CAP_IPC_LOCK> ケーパビリティを失った場合)、リソース上限 "
4952 "B<RLIMIT_MEMLOCK> に達すると、それ以降のメモリ割り当て (例えば B<mmap>(2), "
4953 "B<brk>(2))  は失敗する。"
4954
4955 #. type: Plain text
4956 #: build/C/man2/mlock.2:336
4957 msgid ""
4958 "B<mmap>(2), B<setrlimit>(2), B<shmctl>(2), B<sysconf>(3), B<proc>(5), "
4959 "B<capabilities>(7)"
4960 msgstr ""
4961 "B<mmap>(2), B<setrlimit>(2), B<shmctl>(2), B<sysconf>(3), B<proc>(5),\n"
4962 "B<capabilities>(7)"
4963
4964 #. type: TH
4965 #: build/C/man2/mmap.2:40
4966 #, no-wrap
4967 msgid "MMAP"
4968 msgstr "MMAP"
4969
4970 #. type: TH
4971 #: build/C/man2/mmap.2:40
4972 #, no-wrap
4973 msgid "2013-04-17"
4974 msgstr "2013-04-17"
4975
4976 #. type: Plain text
4977 #: build/C/man2/mmap.2:43
4978 msgid "mmap, munmap - map or unmap files or devices into memory"
4979 msgstr "mmap, munmap - ファイルやデバイスをメモリにマップ/アンマップする"
4980
4981 #. type: Plain text
4982 #: build/C/man2/mmap.2:51
4983 #, no-wrap
4984 msgid ""
4985 "B<void *mmap(void *>I<addr>B<, size_t >I<length>B<, int >I<prot>B<, int >I<flags>B<,>\n"
4986 "B<           int >I<fd>B<, off_t >I<offset>B<);>\n"
4987 "B<int munmap(void *>I<addr>B<, size_t >I<length>B<);>\n"
4988 msgstr ""
4989 "B<void *mmap(void *>I<addr>B<, size_t >I<length>B<, int >I<prot>B<, int >I<flags>B<,>\n"
4990 "B<           int >I<fd>B<, off_t >I<offset>B<);>\n"
4991 "B<int munmap(void *>I<addr>B<, size_t >I<length>B<);>\n"
4992
4993 #. type: Plain text
4994 #: build/C/man2/mmap.2:54
4995 msgid "See NOTES for information on feature test macro requirements."
4996 msgstr "機能検査マクロの要件に関する情報は「注意」の節を参照。"
4997
4998 #. type: Plain text
4999 #: build/C/man2/mmap.2:63
5000 msgid ""
5001 "B<mmap>()  creates a new mapping in the virtual address space of the calling "
5002 "process.  The starting address for the new mapping is specified in I<addr>.  "
5003 "The I<length> argument specifies the length of the mapping."
5004 msgstr ""
5005 "B<mmap>()  は、新しいマッピングを呼び出し元プロセスの仮想アドレス空間に作成す"
5006 "る。 新しいマッピングの開始アドレスは I<addr> で指定される。マッピングの長さ"
5007 "は I<length> 引き数で指定される。"
5008
5009 #.  Before Linux 2.6.24, the address was rounded up to the next page
5010 #.  boundary; since 2.6.24, it is rounded down!
5011 #. type: Plain text
5012 #: build/C/man2/mmap.2:77
5013 msgid ""
5014 "If I<addr> is NULL, then the kernel chooses the address at which to create "
5015 "the mapping; this is the most portable method of creating a new mapping.  If "
5016 "I<addr> is not NULL, then the kernel takes it as a hint about where to place "
5017 "the mapping; on Linux, the mapping will be created at a nearby page "
5018 "boundary.  The address of the new mapping is returned as the result of the "
5019 "call."
5020 msgstr ""
5021 "I<addr> が NULL の場合、カーネルがマッピングを作成するアドレスを選択する。 こ"
5022 "の方法は最も移植性のある新しいマッピングの作成方法である。 I<addr> が NULL で"
5023 "ない場合、カーネルはマッピングをどこに配置するかのヒントとして I<addr> を使用"
5024 "する。Linux では、マッピングはすぐ近くのページ境界に作成される。 新しいマッピ"
5025 "ングのアドレスは、呼び出しの返り値として返される。"
5026
5027 #. type: Plain text
5028 #: build/C/man2/mmap.2:89
5029 msgid ""
5030 "The contents of a file mapping (as opposed to an anonymous mapping; see "
5031 "B<MAP_ANONYMOUS> below), are initialized using I<length> bytes starting at "
5032 "offset I<offset> in the file (or other object) referred to by the file "
5033 "descriptor I<fd>.  I<offset> must be a multiple of the page size as returned "
5034 "by I<sysconf(_SC_PAGE_SIZE)>."
5035 msgstr ""
5036 "ファイルマッピングの内容は、 ファイルディスクリプタ I<fd> で参照されるファイ"
5037 "ル (もしくは他のオブジェクト) のオフセット I<offset> から開始される "
5038 "I<length> バイトのデータで初期化される (ファイルマッピングは無名マッピングの"
5039 "反対語である。 B<MAP_ANONYMOUS> を参照)。 I<offset> は I<sysconf"
5040 "(_SC_PAGE_SIZE)> が返すページサイズの倍数でなければならない。"
5041
5042 #. type: Plain text
5043 #: build/C/man2/mmap.2:97
5044 msgid ""
5045 "The I<prot> argument describes the desired memory protection of the mapping "
5046 "(and must not conflict with the open mode of the file).  It is either "
5047 "B<PROT_NONE> or the bitwise OR of one or more of the following flags:"
5048 msgstr ""
5049 "引き数 I<prot> には、マッピングのメモリ保護をどのように行なうかを指定する "
5050 "(ファイルのオープンモードと矛盾してはいけない)。 I<prot> には、 B<PROT_NONE> "
5051 "か、以下のフラグをひとつ以上ビット毎の論理和 (OR) をとったものを 指定できる。"
5052
5053 #. type: TP
5054 #: build/C/man2/mmap.2:97 build/C/man2/mprotect.2:73
5055 #, no-wrap
5056 msgid "B<PROT_EXEC>"
5057 msgstr "B<PROT_EXEC>"
5058
5059 #. type: Plain text
5060 #: build/C/man2/mmap.2:100
5061 msgid "Pages may be executed."
5062 msgstr "ページは実行可能である。"
5063
5064 #. type: TP
5065 #: build/C/man2/mmap.2:100 build/C/man2/mprotect.2:67
5066 #, no-wrap
5067 msgid "B<PROT_READ>"
5068 msgstr "B<PROT_READ>"
5069
5070 #. type: Plain text
5071 #: build/C/man2/mmap.2:103
5072 msgid "Pages may be read."
5073 msgstr "ページは読み込み可能である。"
5074
5075 #. type: TP
5076 #: build/C/man2/mmap.2:103 build/C/man2/mprotect.2:70
5077 #, no-wrap
5078 msgid "B<PROT_WRITE>"
5079 msgstr "B<PROT_WRITE>"
5080
5081 #. type: Plain text
5082 #: build/C/man2/mmap.2:106
5083 msgid "Pages may be written."
5084 msgstr "ページに書き込み可能である。"
5085
5086 #. type: TP
5087 #: build/C/man2/mmap.2:106 build/C/man2/mprotect.2:64
5088 #, no-wrap
5089 msgid "B<PROT_NONE>"
5090 msgstr "B<PROT_NONE>"
5091
5092 #. type: Plain text
5093 #: build/C/man2/mmap.2:109
5094 msgid "Pages may not be accessed."
5095 msgstr "ページにはアクセスできない。"
5096
5097 #. type: Plain text
5098 #: build/C/man2/mmap.2:118
5099 msgid ""
5100 "The I<flags> argument determines whether updates to the mapping are visible "
5101 "to other processes mapping the same region, and whether updates are carried "
5102 "through to the underlying file.  This behavior is determined by including "
5103 "exactly one of the following values in I<flags>:"
5104 msgstr ""
5105 "I<flags> 引き数により、マッピングに対する更新が同じ領域をマッピングしている "
5106 "他のプロセスに見えるか、更新がマッピング元のファイルを通じて 伝えられるか、が"
5107 "決定される。この動作は、以下の値のいずれか一つだけ (複数は指定できない) を "
5108 "I<flags> に含めることで指定する。"
5109
5110 #. type: TP
5111 #: build/C/man2/mmap.2:118
5112 #, no-wrap
5113 msgid "B<MAP_SHARED>"
5114 msgstr "B<MAP_SHARED>"
5115
5116 #. type: Plain text
5117 #: build/C/man2/mmap.2:128
5118 msgid ""
5119 "Share this mapping.  Updates to the mapping are visible to other processes "
5120 "that map this file, and are carried through to the underlying file.  The "
5121 "file may not actually be updated until B<msync>(2)  or B<munmap>()  is "
5122 "called."
5123 msgstr ""
5124 "このマッピングを共有する。 マッピングに対する更新はこのファイルをマッピングし"
5125 "ている他のプロセス から見える。更新はマッピング元のファイルを通じて伝えられ"
5126 "る。 ただし、ファイルの実際の更新は B<msync>(2)  または B<munmap>()  が呼ばれ"
5127 "るまで行われないこともある。"
5128
5129 #. type: TP
5130 #: build/C/man2/mmap.2:128
5131 #, no-wrap
5132 msgid "B<MAP_PRIVATE>"
5133 msgstr "B<MAP_PRIVATE>"
5134
5135 #. type: Plain text
5136 #: build/C/man2/mmap.2:137
5137 msgid ""
5138 "Create a private copy-on-write mapping.  Updates to the mapping are not "
5139 "visible to other processes mapping the same file, and are not carried "
5140 "through to the underlying file.  It is unspecified whether changes made to "
5141 "the file after the B<mmap>()  call are visible in the mapped region."
5142 msgstr ""
5143 "プライベートな copy-on-write (書き込み時コピー) マップを生成する。 マッピング"
5144 "に対する更新は同じファイルをマッピングしている他のプロセス には見えず、更新が"
5145 "マッピング元のファイルを通じて伝えられることもない。 B<mmap>()  の呼び出し後"
5146 "にマッピング元のファイルに対して行われた変更が、 マップ領域に反映されるかどう"
5147 "かは規定されていない。"
5148
5149 #. type: Plain text
5150 #: build/C/man2/mmap.2:139
5151 msgid "Both of these flags are described in POSIX.1-2001."
5152 msgstr "上記の二つのフラグは POSIX.1-2001 で規定されている。"
5153
5154 #. type: Plain text
5155 #: build/C/man2/mmap.2:142
5156 msgid ""
5157 "In addition, zero or more of the following values can be ORed in I<flags>:"
5158 msgstr ""
5159 "さらに、以下の値のうち 0 個以上をビット毎の論理和 (OR) で I<flags> に指定する"
5160 "ことができる。"
5161
5162 #. type: TP
5163 #: build/C/man2/mmap.2:142
5164 #, no-wrap
5165 msgid "B<MAP_32BIT> (since Linux 2.4.20, 2.6)"
5166 msgstr "B<MAP_32BIT> (Linux 2.4.20, 2.6 以降)"
5167
5168 #.  See http://lwn.net/Articles/294642 "Tangled up in threads", 19 Aug 08
5169 #. type: Plain text
5170 #: build/C/man2/mmap.2:158
5171 msgid ""
5172 "Put the mapping into the first 2 Gigabytes of the process address space.  "
5173 "This flag is supported only on x86-64, for 64-bit programs.  It was added to "
5174 "allow thread stacks to be allocated somewhere in the first 2GB of memory, so "
5175 "as to improve context-switch performance on some early 64-bit processors.  "
5176 "Modern x86-64 processors no longer have this performance problem, so use of "
5177 "this flag is not required on those systems.  The B<MAP_32BIT> flag is "
5178 "ignored when B<MAP_FIXED> is set."
5179 msgstr ""
5180 "マッピングをプロセスのアドレス空間の先頭 2 ギガバイト以内に配置する。 このフ"
5181 "ラグがサポートされているのは x86-64 アーキテクチャ上の 64 ビットプログラムの"
5182 "みである。 このフラグが追加されたのは、スレッドのスタックをメモリの先頭 2GB "
5183 "以内の どこかに割り当てることで、初期のいくつかの 64 ビットプロセッサにおけ"
5184 "る コンテキストスイッチの性能問題を改善するためである。 最近の x86-64 プロ"
5185 "セッサではこの性能問題はもはや存在せず、 そのようなシステムではこのフラグを使"
5186 "用する必要はない。 B<MAP_FIXED> がセットされている場合は、 B<MAP_32BIT> フラ"
5187 "グは無視される。"
5188
5189 #. type: TP
5190 #: build/C/man2/mmap.2:158
5191 #, no-wrap
5192 msgid "B<MAP_ANON>"
5193 msgstr "B<MAP_ANON>"
5194
5195 #. type: Plain text
5196 #: build/C/man2/mmap.2:163
5197 msgid "Synonym for B<MAP_ANONYMOUS>.  Deprecated."
5198 msgstr "B<MAP_ANONYMOUS> の同義語。非推奨。"
5199
5200 #. type: TP
5201 #: build/C/man2/mmap.2:163
5202 #, no-wrap
5203 msgid "B<MAP_ANONYMOUS>"
5204 msgstr "B<MAP_ANONYMOUS>"
5205
5206 #. type: Plain text
5207 #: build/C/man2/mmap.2:185
5208 msgid ""
5209 "The mapping is not backed by any file; its contents are initialized to "
5210 "zero.  The I<fd> and I<offset> arguments are ignored; however, some "
5211 "implementations require I<fd> to be -1 if B<MAP_ANONYMOUS> (or B<MAP_ANON>)  "
5212 "is specified, and portable applications should ensure this.  The use of "
5213 "B<MAP_ANONYMOUS> in conjunction with B<MAP_SHARED> is supported on Linux "
5214 "only since kernel 2.4."
5215 msgstr ""
5216 "マッピングはどのファイルとも関連付けされない。 マッピングの内容は 0 で初期化"
5217 "される。 引き数 I<fd> と I<offset> は無視される。 ただし、実装によっては "
5218 "B<MAP_ANONYMOUS> (もしくは B<MAP_ANON>)  が指定された場合、 I<fd> を -1 にす"
5219 "る必要があり、 移植性が必要なアプリケーションでは必ず I<fd> を -1 にすべきで"
5220 "ある。 B<MAP_ANONYMOUS> と B<MAP_SHARED> を組み合わせての利用は カーネル 2.4 "
5221 "以降の Linux でのみサポートされている。"
5222
5223 #. type: TP
5224 #: build/C/man2/mmap.2:185
5225 #, no-wrap
5226 msgid "B<MAP_DENYWRITE>"
5227 msgstr "B<MAP_DENYWRITE>"
5228
5229 #.  Introduced in 1.1.36, removed in 1.3.24.
5230 #. type: Plain text
5231 #: build/C/man2/mmap.2:193
5232 msgid ""
5233 "This flag is ignored.  (Long ago, it signaled that attempts to write to the "
5234 "underlying file should fail with B<ETXTBUSY>.  But this was a source of "
5235 "denial-of-service attacks.)"
5236 msgstr ""
5237 "このフラグは無視される (ずっと前は、マップ元のファイルへの書き込みを行おうと"
5238 "すると、エラー B<ETXTBUSY> で失敗するようにシグナルが設定されていたが、これ"
5239 "は denial-of-service (サービス拒否) 攻撃の原因となった)。"
5240
5241 #. type: TP
5242 #: build/C/man2/mmap.2:193
5243 #, no-wrap
5244 msgid "B<MAP_EXECUTABLE>"
5245 msgstr "B<MAP_EXECUTABLE>"
5246
5247 #.  Introduced in 1.1.38, removed in 1.3.24. Flag tested in proc_follow_link.
5248 #.  (Long ago, it signaled that the underlying file is an executable.
5249 #.  However, that information was not really used anywhere.)
5250 #.  Linus talked about DOS related to MAP_EXECUTABLE, but he was thinking of
5251 #.  MAP_DENYWRITE?
5252 #. type: Plain text
5253 #: build/C/man2/mmap.2:201
5254 msgid "This flag is ignored."
5255 msgstr "このフラグは無視される。"
5256
5257 #. type: TP
5258 #: build/C/man2/mmap.2:201
5259 #, no-wrap
5260 msgid "B<MAP_FILE>"
5261 msgstr "B<MAP_FILE>"
5262
5263 #.  On some systems, this was required as the opposite of
5264 #.  MAP_ANONYMOUS -- mtk, 1 May 2007
5265 #. type: Plain text
5266 #: build/C/man2/mmap.2:207
5267 msgid "Compatibility flag.  Ignored."
5268 msgstr "互換性のためのフラグ。無視される。"
5269
5270 #. type: TP
5271 #: build/C/man2/mmap.2:207
5272 #, no-wrap
5273 msgid "B<MAP_FIXED>"
5274 msgstr "B<MAP_FIXED>"
5275
5276 #. type: Plain text
5277 #: build/C/man2/mmap.2:225
5278 msgid ""
5279 "Don't interpret I<addr> as a hint: place the mapping at exactly that "
5280 "address.  I<addr> must be a multiple of the page size.  If the memory region "
5281 "specified by I<addr> and I<len> overlaps pages of any existing mapping(s), "
5282 "then the overlapped part of the existing mapping(s) will be discarded.  If "
5283 "the specified address cannot be used, B<mmap>()  will fail.  Because "
5284 "requiring a fixed address for a mapping is less portable, the use of this "
5285 "option is discouraged."
5286 msgstr ""
5287 "I<addr> をアドレスのヒントとして使用するのではなく、 I<addr> で指定されたアド"
5288 "レスをそのまま使用してマッピングを配置する。 I<addr> はページサイズの倍数でな"
5289 "ければならない。 I<addr> と I<len> で指定されたメモリ領域が既存のマッピングの"
5290 "ページと重なる場合、 既存のマッピングの重なった部分は捨てられる。 もし指定さ"
5291 "れたアドレスが使用できない場合、 B<mmap>()  は失敗する。 マッピングに対して固"
5292 "定アドレスを要求するのは移植性の面で劣るので、 このオプションは使用しないこと"
5293 "を推奨する。"
5294
5295 #. type: TP
5296 #: build/C/man2/mmap.2:225
5297 #, no-wrap
5298 msgid "B<MAP_GROWSDOWN>"
5299 msgstr "B<MAP_GROWSDOWN>"
5300
5301 #. type: Plain text
5302 #: build/C/man2/mmap.2:230
5303 msgid ""
5304 "Used for stacks.  Indicates to the kernel virtual memory system that the "
5305 "mapping should extend downward in memory."
5306 msgstr ""
5307 "スタック用に使用される。マッピングをメモリ内で逆向きに行うことを カーネル仮想"
5308 "メモリシステムに指示する。 (訳注:マッピングは通常はメモリ・アドレスが増加す"
5309 "る向きに行うが、 このオプションを指定すると逆向きにマッピングを行う)"
5310
5311 #. type: TP
5312 #: build/C/man2/mmap.2:230
5313 #, no-wrap
5314 msgid "B<MAP_HUGETLB> (since Linux 2.6.32)"
5315 msgstr "B<MAP_HUGETLB> (Linux 2.6.32 以降)"
5316
5317 #. type: Plain text
5318 #: build/C/man2/mmap.2:236
5319 msgid ""
5320 "Allocate the mapping using \"huge pages.\" See the Linux kernel source file "
5321 "I<Documentation/vm/hugetlbpage.txt> for further information."
5322 msgstr ""
5323 "\"huge page\" を使ってマッピングを割り当てる。詳しい情報は、Linux カーネル"
5324 "ソースの I<Documentation/vm/hugetlbpage.txt> を参照。"
5325
5326 #. type: TP
5327 #: build/C/man2/mmap.2:236
5328 #, no-wrap
5329 msgid "B<MAP_LOCKED> (since Linux 2.5.37)"
5330 msgstr "B<MAP_LOCKED> (Linux 2.5.37 以降)"
5331
5332 #.  If set, the mapped pages will not be swapped out.
5333 #. type: Plain text
5334 #: build/C/man2/mmap.2:242
5335 msgid ""
5336 "Lock the pages of the mapped region into memory in the manner of B<mlock>"
5337 "(2).  This flag is ignored in older kernels."
5338 msgstr ""
5339 "マップされた領域のページを B<mlock>(2)  の方法でメモリ内にロックする。 それ以"
5340 "前のカーネルでは、このフラグは無視される。"
5341
5342 #. type: TP
5343 #: build/C/man2/mmap.2:242
5344 #, no-wrap
5345 msgid "B<MAP_NONBLOCK> (since Linux 2.5.46)"
5346 msgstr "B<MAP_NONBLOCK> (Linux 2.5.46 以降)"
5347
5348 #. type: Plain text
5349 #: build/C/man2/mmap.2:257
5350 msgid ""
5351 "Only meaningful in conjunction with B<MAP_POPULATE>.  Don't perform read-"
5352 "ahead: create page tables entries only for pages that are already present in "
5353 "RAM.  Since Linux 2.6.23, this flag causes B<MAP_POPULATE> to do nothing.  "
5354 "One day the combination of B<MAP_POPULATE> and B<MAP_NONBLOCK> may be "
5355 "reimplemented."
5356 msgstr ""
5357 "B<MAP_POPULATE> と組み合わせた場合のみ意味を持つ。 read-ahead (前もって読み込"
5358 "むこと) を実行しない。 単に、すでに RAM 上に存在するページに対してのみページ"
5359 "テーブルエントリを作成する。 Linux 2.6.23 以降では、このフラグは "
5360 "B<MAP_POPULATE> に何の影響も与えない。 いつか B<MAP_POPULATE> と "
5361 "B<MAP_NONBLOCK> を組み合わせた場合の動作は実装し直されるかもしれない。"
5362
5363 #. type: TP
5364 #: build/C/man2/mmap.2:257
5365 #, no-wrap
5366 msgid "B<MAP_NORESERVE>"
5367 msgstr "B<MAP_NORESERVE>"
5368
5369 #. type: Plain text
5370 #: build/C/man2/mmap.2:272
5371 msgid ""
5372 "Do not reserve swap space for this mapping.  When swap space is reserved, "
5373 "one has the guarantee that it is possible to modify the mapping.  When swap "
5374 "space is not reserved one might get B<SIGSEGV> upon a write if no physical "
5375 "memory is available.  See also the discussion of the file I</proc/sys/vm/"
5376 "overcommit_memory> in B<proc>(5).  In kernels before 2.6, this flag had "
5377 "effect only for private writable mappings."
5378 msgstr ""
5379 "このマッピングに対するスワップ空間の予約を行わない。 スワップ空間を予約した場"
5380 "合は、このマッピングの変更が必ず可能なことが 保証される。予約を行わなかった場"
5381 "合、物理メモリに空きがないと 書き込み時に B<SIGSEGV> エラーを受け取ることがあ"
5382 "る。 B<proc>(5)  の I</proc/sys/vm/overcommit_memory> ファイルについての議論"
5383 "も参照。 バージョン 2.6 より前のカーネルでは、このフラグは書き込み可能な プラ"
5384 "イベート・マッピングについてのみ効果があった。"
5385
5386 #. type: TP
5387 #: build/C/man2/mmap.2:272
5388 #, no-wrap
5389 msgid "B<MAP_POPULATE> (since Linux 2.5.46)"
5390 msgstr "B<MAP_POPULATE> (Linux 2.5.46 以降)"
5391
5392 #. type: Plain text
5393 #: build/C/man2/mmap.2:279
5394 msgid ""
5395 "Populate (prefault) page tables for a mapping.  For a file mapping, this "
5396 "causes read-ahead on the file.  Later accesses to the mapping will not be "
5397 "blocked by page faults.  B<MAP_POPULATE> is supported for private mappings "
5398 "only since Linux 2.6.23."
5399 msgstr ""
5400 "マッピング用のページテーブルを配置 (populate) する ファイルマッピングの場合に"
5401 "は、これによりファイルが先読み (read-ahead)  が行われる。この以後は、マッピン"
5402 "グに対するアクセスがページフォールトで ブロックされることがなくなる。 Linux "
5403 "2.6.23 以降でのみプライベート・マッピングについて B<MAP_POPULATE> がサポート"
5404 "されている。"
5405
5406 #. type: TP
5407 #: build/C/man2/mmap.2:279
5408 #, no-wrap
5409 msgid "B<MAP_STACK> (since Linux 2.6.27)"
5410 msgstr "B<MAP_STACK> (Linux 2.6.27 以降)"
5411
5412 #.  See http://lwn.net/Articles/294642 "Tangled up in threads", 19 Aug 08
5413 #.  commit cd98a04a59e2f94fa64d5bf1e26498d27427d5e7
5414 #.  http://thread.gmane.org/gmane.linux.kernel/720412
5415 #.  "pthread_create() slow for many threads; also time to revisit 64b
5416 #.   context switch optimization?"
5417 #. type: Plain text
5418 #: build/C/man2/mmap.2:292
5419 msgid ""
5420 "Allocate the mapping at an address suitable for a process or thread stack.  "
5421 "This flag is currently a no-op, but is used in the glibc threading "
5422 "implementation so that if some architectures require special treatment for "
5423 "stack allocations, support can later be transparently implemented for glibc."
5424 msgstr ""
5425 "プロセスやスレッドのスタックに適したアドレスにマッピングを割り当てる。 現在の"
5426 "ところ、このフラグは何もしないが、 glibc のスレッド実装では使用されている。 "
5427 "これは、いくつかのアーキテクチャではスタックの割り当てに関して特別な扱い が必"
5428 "要な場合に、glibc にそのサポートを後で透過的に実装できるようにする ためであ"
5429 "る。"
5430
5431 #. type: TP
5432 #: build/C/man2/mmap.2:292
5433 #, no-wrap
5434 msgid "B<MAP_UNINITIALIZED> (since Linux 2.6.33)"
5435 msgstr "B<MAP_UNINITIALIZED> (Linux 2.6.33 以降)"
5436
5437 #. type: Plain text
5438 #: build/C/man2/mmap.2:302
5439 msgid ""
5440 "Don't clear anonymous pages.  This flag is intended to improve performance "
5441 "on embedded devices.  This flag is honored only if the kernel was configured "
5442 "with the B<CONFIG_MMAP_ALLOW_UNINITIALIZED> option.  Because of the security "
5443 "implications, that option is normally enabled only on embedded devices (i."
5444 "e., devices where one has complete control of the contents of user memory)."
5445 msgstr ""
5446 "無名ページ (anonymous page) のクリアを行わない。このフラグは組み込みデバイ"
5447 "ス\n"
5448 "での性能向上を目的に作られてものである。カーネルの設定で\n"
5449 "B<CONFIG_MMAP_ALLOW_UNINITIALIZED> オプションが有効になっている場合のみ、\n"
5450 "このフラグは効果を持つ。\n"
5451 "セキュリティ面の考慮から、このオプションは通常組み込みデバイス (すなわち、\n"
5452 "ユーザメモリの内容を完全に制御化におけるデバイス) においてのみ有効にされる。"
5453
5454 #. type: Plain text
5455 #: build/C/man2/mmap.2:310
5456 msgid ""
5457 "Of the above flags, only B<MAP_FIXED> is specified in POSIX.1-2001.  "
5458 "However, most systems also support B<MAP_ANONYMOUS> (or its synonym "
5459 "B<MAP_ANON>)."
5460 msgstr ""
5461 "上記のフラグの中では、 B<MAP_FIXED> だけが POSIX.1-2001 で規定されている。 し"
5462 "かしながら、ほとんどのシステムで B<MAP_ANONYMOUS> (またはその同義語である "
5463 "B<MAP_ANON>)  もサポートされている。"
5464
5465 #. type: Plain text
5466 #: build/C/man2/mmap.2:317
5467 msgid ""
5468 "Some systems document the additional flags B<MAP_AUTOGROW>, "
5469 "B<MAP_AUTORESRV>, B<MAP_COPY>, and B<MAP_LOCAL>."
5470 msgstr ""
5471 "いくつかのシステムでは、上記以外にフラグとして B<MAP_AUTOGROW>, "
5472 "B<MAP_AUTORESRV>, B<MAP_COPY>, B<MAP_LOCAL> が規定されている。"
5473
5474 #. type: Plain text
5475 #: build/C/man2/mmap.2:323
5476 msgid ""
5477 "Memory mapped by B<mmap>()  is preserved across B<fork>(2), with the same "
5478 "attributes."
5479 msgstr ""
5480 "B<mmap>()  によってマップされたメモリの属性は B<fork>(2)  の際に継承される。"
5481
5482 #. type: Plain text
5483 #: build/C/man2/mmap.2:331
5484 msgid ""
5485 "A file is mapped in multiples of the page size.  For a file that is not a "
5486 "multiple of the page size, the remaining memory is zeroed when mapped, and "
5487 "writes to that region are not written out to the file.  The effect of "
5488 "changing the size of the underlying file of a mapping on the pages that "
5489 "correspond to added or removed regions of the file is unspecified."
5490 msgstr ""
5491 "ファイルはページサイズの整数倍の領域にマップされる。サイズがページサイズの 整"
5492 "数倍でないファイルの場合、マップ時に残りの領域は 0 で埋められ、この領域へ 書"
5493 "きこみを行ってもファイルに書き出されることはない。マッピングを行った元 ファイ"
5494 "ルのサイズを変更した場合、元ファイルの追加されたり削除された領域に対応 する"
5495 "マップされたページに対してどのような影響があるかは規定されていない。"
5496
5497 #. type: SS
5498 #: build/C/man2/mmap.2:331
5499 #, no-wrap
5500 msgid "munmap()"
5501 msgstr "munmap()"
5502
5503 #. type: Plain text
5504 #: build/C/man2/mmap.2:341
5505 msgid ""
5506 "The B<munmap>()  system call deletes the mappings for the specified address "
5507 "range, and causes further references to addresses within the range to "
5508 "generate invalid memory references.  The region is also automatically "
5509 "unmapped when the process is terminated.  On the other hand, closing the "
5510 "file descriptor does not unmap the region."
5511 msgstr ""
5512 "システムコール B<munmap>()  は指定されたアドレス範囲のマップを消去し、 これ以"
5513 "降のその範囲内へのメモリ参照は不正となる。 この領域は、プロセスが終了したとき"
5514 "にも自動的にアンマップされる。 一方、ファイル記述子をクローズしても、この領域"
5515 "はアンマップされない。"
5516
5517 #. type: Plain text
5518 #: build/C/man2/mmap.2:351
5519 msgid ""
5520 "The address I<addr> must be a multiple of the page size.  All pages "
5521 "containing a part of the indicated range are unmapped, and subsequent "
5522 "references to these pages will generate B<SIGSEGV>.  It is not an error if "
5523 "the indicated range does not contain any mapped pages."
5524 msgstr ""
5525 "I<addr> アドレスはページサイズの整数倍でなければならない。指定された範囲の一"
5526 "部分を 含む全てのページはアンマップされ、これ以降にこれらのページへの参照があ"
5527 "ると B<SIGSEGV> が発生する。 指定した範囲内にマップされたページが一つも含まれ"
5528 "ていない場合でも エラーにならない。"
5529
5530 #. type: SS
5531 #: build/C/man2/mmap.2:351
5532 #, no-wrap
5533 msgid "Timestamps changes for file-backed mappings"
5534 msgstr "ファイルと関連付けられたマッピングに対するタイムスタンプの更新"
5535
5536 #. type: Plain text
5537 #: build/C/man2/mmap.2:358
5538 msgid ""
5539 "For file-backed mappings, the I<st_atime> field for the mapped file may be "
5540 "updated at any time between the B<mmap>()  and the corresponding unmapping; "
5541 "the first reference to a mapped page will update the field if it has not "
5542 "been already."
5543 msgstr ""
5544 "ファイルと関連付けられたマッピングの場合、マッピングされたファイルの "
5545 "I<st_atime> フィールドは、 B<mmap>()  されてからアンマップ (unmap) されるまで"
5546 "の間に更新されることがある。 それまでに更新が行われていなければ、マップされた"
5547 "ページへの最初の参照があった 際に更新される。"
5548
5549 #. type: Plain text
5550 #: build/C/man2/mmap.2:375
5551 msgid ""
5552 "The I<st_ctime> and I<st_mtime> field for a file mapped with B<PROT_WRITE> "
5553 "and B<MAP_SHARED> will be updated after a write to the mapped region, and "
5554 "before a subsequent B<msync>(2)  with the B<MS_SYNC> or B<MS_ASYNC> flag, if "
5555 "one occurs."
5556 msgstr ""
5557 "B<PROT_WRITE> と B<MAP_SHARED> の両方を指定してマップされたファイルの場合、書"
5558 "き込みがあると、 I<st_ctime> と I<st_mtime> の両フィールドは、マップされた領"
5559 "域への書き込みより後で、 B<MS_SYNC> または B<MS_ASYNC> フラグを指定して "
5560 "B<msync>(2)  が呼ばれる前までに更新される。"
5561
5562 #. type: Plain text
5563 #: build/C/man2/mmap.2:392
5564 msgid ""
5565 "On success, B<mmap>()  returns a pointer to the mapped area.  On error, the "
5566 "value B<MAP_FAILED> (that is, I<(void\\ *)\\ -1>)  is returned, and I<errno> "
5567 "is set appropriately.  On success, B<munmap>()  returns 0, on failure -1, "
5568 "and I<errno> is set (probably to B<EINVAL>)."
5569 msgstr ""
5570 "B<mmap>()  は成功するとマップされた領域へのポインタを返す。 失敗すると値 "
5571 "B<MAP_FAILED> (つまり I<(void\\ *)\\ -1>)  を返し、 I<errno> がエラーの内容に"
5572 "したがってセットされる。 B<munmap>()  は成功すると 0 を返す。失敗すると -1 を"
5573 "返し、 I<errno> がセットされる (多くの場合 B<EINVAL> になるだろう)。"
5574
5575 #. type: TP
5576 #: build/C/man2/mmap.2:393 build/C/man2/mprotect.2:86
5577 #: build/C/man3/shm_open.3:187 build/C/man3/shm_open.3:192
5578 #: build/C/man2/shmctl.2:302 build/C/man2/shmget.2:189
5579 #: build/C/man2/shmop.2:191
5580 #, no-wrap
5581 msgid "B<EACCES>"
5582 msgstr "B<EACCES>"
5583
5584 #. type: Plain text
5585 #: build/C/man2/mmap.2:413
5586 msgid ""
5587 "A file descriptor refers to a non-regular file.  Or B<MAP_PRIVATE> was "
5588 "requested, but I<fd> is not open for reading.  Or B<MAP_SHARED> was "
5589 "requested and B<PROT_WRITE> is set, but I<fd> is not open in read/write "
5590 "(B<O_RDWR>)  mode.  Or B<PROT_WRITE> is set, but the file is append-only."
5591 msgstr ""
5592 "以下のいずれかの場合。 ファイル記述子の参照先が通常のファイルではない (non-"
5593 "regular file) 。 B<MAP_PRIVATE> を要求したが I<fd> は読み込み用にオープンされ"
5594 "ていない。 B<MAP_SHARED> を要求して B<PROT_WRITE> をセットしたが I<fd> は読み"
5595 "書きモード (B<O_RDWR>)  でオープンされていない、 B<PROT_WRITE> をセットした"
5596 "が、ファイルは追加 (append) 専用である。"
5597
5598 #. type: Plain text
5599 #: build/C/man2/mmap.2:417
5600 msgid ""
5601 "The file has been locked, or too much memory has been locked (see "
5602 "B<setrlimit>(2))."
5603 msgstr ""
5604 "ファイルがロックされている。またはロックされているメモリが多すぎる "
5605 "(B<setrlimit>(2)  を参照)。"
5606
5607 #. type: Plain text
5608 #: build/C/man2/mmap.2:423
5609 msgid ""
5610 "I<fd> is not a valid file descriptor (and B<MAP_ANONYMOUS> was not set)."
5611 msgstr ""
5612 "I<fd> が有効なファイル記述子 (file descriptor) ではない (かつ "
5613 "B<MAP_ANONYMOUS> がセットされていない)。"
5614
5615 #. type: Plain text
5616 #: build/C/man2/mmap.2:431
5617 msgid ""
5618 "We don't like I<addr>, I<length>, or I<offset> (e.g., they are too large, or "
5619 "not aligned on a page boundary)."
5620 msgstr ""
5621 "I<addr> か I<length> か I<offset> が適切でない (例えば、大きすぎるとか、ペー"
5622 "ジ境界にアラインメントされていない)。"
5623
5624 #. type: Plain text
5625 #: build/C/man2/mmap.2:436
5626 msgid "(since Linux 2.6.12)  I<length> was 0."
5627 msgstr "(Linux 2.6.12 以降)  I<length> が 0 であった。"
5628
5629 #. type: Plain text
5630 #: build/C/man2/mmap.2:444
5631 msgid ""
5632 "I<flags> contained neither B<MAP_PRIVATE> or B<MAP_SHARED>, or contained "
5633 "both of these values."
5634 msgstr ""
5635 "I<flags> に B<MAP_PRIVATE> と B<MAP_SHARED> のどちらも含まれていなかった、も"
5636 "しくは その両方が含まれていた。"
5637
5638 #. type: TP
5639 #: build/C/man2/mmap.2:444 build/C/man3/shm_open.3:229
5640 #: build/C/man2/shmget.2:205
5641 #, no-wrap
5642 msgid "B<ENFILE>"
5643 msgstr "B<ENFILE>"
5644
5645 #.  [2.6.7] shmem_zero_setup()-->shmem_file_setup()-->get_empty_filp()
5646 #. type: Plain text
5647 #: build/C/man2/mmap.2:452 build/C/man2/shmget.2:209
5648 msgid "The system limit on the total number of open files has been reached."
5649 msgstr "システム全体でオープンされているファイルの総数が上限に達した。"
5650
5651 #. type: Plain text
5652 #: build/C/man2/mmap.2:456
5653 #, fuzzy
5654 #| msgid ""
5655 #| "The underlying file system of the specified file does not support memory "
5656 #| "mapping."
5657 msgid ""
5658 "The underlying filesystem of the specified file does not support memory "
5659 "mapping."
5660 msgstr ""
5661 "指定されたファイルが置かれているファイルシステムがメモリマッピングをサポート "
5662 "していない。"
5663
5664 #. type: Plain text
5665 #: build/C/man2/mmap.2:460
5666 msgid ""
5667 "No memory is available, or the process's maximum number of mappings would "
5668 "have been exceeded."
5669 msgstr ""
5670 "メモリに空きがない、または処理中のプロセスのマッピング数が最大数を超過した。"
5671
5672 #.  (Since 2.4.25 / 2.6.0.)
5673 #. type: Plain text
5674 #: build/C/man2/mmap.2:469
5675 #, fuzzy
5676 #| msgid ""
5677 #| "The I<prot> argument asks for B<PROT_EXEC> but the mapped area belongs to "
5678 #| "a file on a file system that was mounted no-exec."
5679 msgid ""
5680 "The I<prot> argument asks for B<PROT_EXEC> but the mapped area belongs to a "
5681 "file on a filesystem that was mounted no-exec."
5682 msgstr ""
5683 "I<prot> 引き数は B<PROT_EXEC> を行うように指定されているが、 no-exec でマウン"
5684 "トされたファイルシステム上のファイルに マップ領域が対応している。"
5685
5686 #. type: TP
5687 #: build/C/man2/mmap.2:469
5688 #, no-wrap
5689 msgid "B<ETXTBSY>"
5690 msgstr "B<ETXTBSY>"
5691
5692 #. type: Plain text
5693 #: build/C/man2/mmap.2:475
5694 msgid ""
5695 "B<MAP_DENYWRITE> was set but the object specified by I<fd> is open for "
5696 "writing."
5697 msgstr ""
5698 "B<MAP_DENYWRITE> がセットされているが I<fd> で指定されているオブジェクトは書"
5699 "き込み用に開かれている。"
5700
5701 #. type: TP
5702 #: build/C/man2/mmap.2:475 build/C/man2/shmctl.2:344
5703 #, no-wrap
5704 msgid "B<EOVERFLOW>"
5705 msgstr "B<EOVERFLOW>"
5706
5707 #. type: Plain text
5708 #: build/C/man2/mmap.2:487
5709 msgid ""
5710 "On 32-bit architecture together with the large file extension (i.e., using "
5711 "64-bit I<off_t>): the number of pages used for I<length> plus number of "
5712 "pages used for I<offset> would overflow I<unsigned long> (32 bits)."
5713 msgstr ""
5714 "32 ビットアーキテクチャで large file 拡張を使っている場合 (つまり 64 ビット"
5715 "の I<off_t> を使う場合)、 I<length> で使うページ数と I<offset> で使うページ数"
5716 "を足した値は I<unsigned long> (32 ビット) を超えてしまう (オーバーフローして"
5717 "しまう) 場合がある。"
5718
5719 #. type: Plain text
5720 #: build/C/man2/mmap.2:489
5721 msgid "Use of a mapped region can result in these signals:"
5722 msgstr "マップ領域を利用する際に、以下のシグナルが発生することがある:"
5723
5724 #. type: TP
5725 #: build/C/man2/mmap.2:489
5726 #, no-wrap
5727 msgid "B<SIGSEGV>"
5728 msgstr "B<SIGSEGV>"
5729
5730 #. type: Plain text
5731 #: build/C/man2/mmap.2:492
5732 msgid "Attempted write into a region mapped as read-only."
5733 msgstr "読み込み専用で mmap された領域へ書き込みを行おうとした。"
5734
5735 #. type: TP
5736 #: build/C/man2/mmap.2:492
5737 #, no-wrap
5738 msgid "B<SIGBUS>"
5739 msgstr "B<SIGBUS>"
5740
5741 #. type: Plain text
5742 #: build/C/man2/mmap.2:497
5743 msgid ""
5744 "Attempted access to a portion of the buffer that does not correspond to the "
5745 "file (for example, beyond the end of the file, including the case where "
5746 "another process has truncated the file)."
5747 msgstr ""
5748 "バッファのうち、ファイルに関連づけられていない部分 (例えばファイル末尾を越え"
5749 "た部分など。これには 他のプロセスがファイルを切り詰めた場合なども含まれる)  "
5750 "にアクセスしようとした。"
5751
5752 #.  SVr4 documents additional error codes ENXIO and ENODEV.
5753 #.  SUSv2 documents additional error codes EMFILE and EOVERFLOW.
5754 #. type: Plain text
5755 #: build/C/man2/mmap.2:501
5756 msgid "SVr4, 4.4BSD, POSIX.1-2001."
5757 msgstr "SVr4, 4.4BSD, POSIX.1-2001."
5758
5759 #.  POSIX.1-2001: It shall be defined to -1 or 0 or 200112L.
5760 #.  -1: unavailable, 0: ask using sysconf().
5761 #.  glibc defines it to 1.
5762 #. type: Plain text
5763 #: build/C/man2/mmap.2:515
5764 msgid ""
5765 "On POSIX systems on which B<mmap>(), B<msync>(2)  and B<munmap>()  are "
5766 "available, B<_POSIX_MAPPED_FILES> is defined in I<E<lt>unistd.hE<gt>> to a "
5767 "value greater than 0.  (See also B<sysconf>(3).)"
5768 msgstr ""
5769 "B<mmap>(), B<msync>(2)  B<munmap>()  が利用可能な POSIX システムでは、 "
5770 "B<_POSIX_MAPPED_FILES> は E<lt>unistd.hE<gt> で 0 より大きな値に定義される "
5771 "(B<sysconf>(3)  も参照のこと)。"
5772
5773 #.  Since around glibc 2.1/2.2, depending on the platform.
5774 #. type: Plain text
5775 #: build/C/man2/mmap.2:530
5776 msgid ""
5777 "This page describes the interface provided by the glibc B<mmap>()  wrapper "
5778 "function.  Originally, this function invoked a system call of the same "
5779 "name.  Since kernel 2.4, that system call has been superseded by B<mmap2>"
5780 "(2), and nowadays the glibc B<mmap>()  wrapper function invokes B<mmap2>(2)  "
5781 "with a suitably adjusted value for I<offset>."
5782 msgstr ""
5783 "このページでは glibc の B<mmap>() のラッパー関数が提供するインターフェース"
5784 "に\n"
5785 "ついて説明している。元々は、この関数は同じ名前のシステムコールを起動してい"
5786 "た。\n"
5787 "カーネル 2.4 以降、このシステムコールは B<mmap2>(2) に取って代わられ、現在\n"
5788 "では、 glibc の B<mmap>() のラッパー関数は I<offset> を適切に調整してから\n"
5789 "B<mmap2>(2) を起動する。"
5790
5791 #. type: Plain text
5792 #: build/C/man2/mmap.2:543
5793 msgid ""
5794 "On some hardware architectures (e.g., i386), B<PROT_WRITE> implies "
5795 "B<PROT_READ>.  It is architecture dependent whether B<PROT_READ> implies "
5796 "B<PROT_EXEC> or not.  Portable programs should always set B<PROT_EXEC> if "
5797 "they intend to execute code in the new mapping."
5798 msgstr ""
5799 "(i386 などの) いくつかのアーキテクチャでは、 B<PROT_WRITE> をセットすると、暗"
5800 "黙のうちに B<PROT_READ> がセットされる。 B<PROT_READ> をセットした際に暗黙の"
5801 "うちに B<PROT_EXEC> がセットされるかどうかは、アーキテクチャ依存である。 移植"
5802 "性を考慮したプログラムでは、 新規にマップした領域でコードを実行したい場合は、"
5803 "常に B<PROT_EXEC> をセットすべきである。"
5804
5805 #. type: Plain text
5806 #: build/C/man2/mmap.2:558
5807 msgid ""
5808 "The portable way to create a mapping is to specify I<addr> as 0 (NULL), and "
5809 "omit B<MAP_FIXED> from I<flags>.  In this case, the system chooses the "
5810 "address for the mapping; the address is chosen so as not to conflict with "
5811 "any existing mapping, and will not be 0.  If the B<MAP_FIXED> flag is "
5812 "specified, and I<addr> is 0 (NULL), then the mapped address will be 0 (NULL)."
5813 msgstr ""
5814 "マッピングを作成する移植性のある方法は、 I<addr> に 0 (NULL) を指定し、 "
5815 "I<flags> から B<MAP_FIXED> を外すことである。 この場合、システムがマッピング"
5816 "用のアドレスの選択を行う。 アドレスは既存のマッピングと衝突しないように、 か"
5817 "つ 0 にならないように選択される。 B<MAP_FIXED> フラグが指定され、かつ "
5818 "I<addr> が 0 (NULL)  の場合には、マップされるアドレスが 0 (NULL) になる。"
5819
5820 #. type: Plain text
5821 #: build/C/man2/mmap.2:587
5822 msgid ""
5823 "Certain I<flags> constants are defined only if either B<_BSD_SOURCE> or "
5824 "B<_SVID_SOURCE> is defined.  (Requiring B<_GNU_SOURCE> also suffices, and "
5825 "requiring that macro specifically would have been more logical, since these "
5826 "flags are all Linux specific.)  The relevant flags are: B<MAP_32BIT>, "
5827 "B<MAP_ANONYMOUS> (and the synonym B<MAP_ANON>), B<MAP_DENYWRITE>, "
5828 "B<MAP_EXECUTABLE>, B<MAP_FILE>, B<MAP_GROWSDOWN>, B<MAP_HUGETLB>, "
5829 "B<MAP_LOCKED>, B<MAP_NONBLOCK>, B<MAP_NORESERVE>, B<MAP_POPULATE>, and "
5830 "B<MAP_STACK>."
5831 msgstr ""
5832 "特定の I<flags> 定数は B<_BSD_SOURCE> か B<_SVID_SOURCE> のいずれかが定義され"
5833 "た場合にのみ定義される。 (B<_GNU_SOURCE> も定義されている必要がある。これらの"
5834 "フラグはすべて Linux 固有のものなので、 特に B<_GNU_SOURCE> を必要とする点は"
5835 "もっと論理的に決められるべきであった。) 関係するフラグは B<MAP_32BIT>, "
5836 "B<MAP_ANONYMOUS> (とその同義語の B<MAP_ANON>), B<MAP_DENYWRITE>, "
5837 "B<MAP_EXECUTABLE>, B<MAP_FILE>, B<MAP_GROWSDOWN>, B<MAP_HUGETLB>, "
5838 "B<MAP_LOCKED>, B<MAP_NONBLOCK>, B<MAP_NORESERVE>, B<MAP_POPULATE>, "
5839 "B<MAP_STACK> である。"
5840
5841 #. type: Plain text
5842 #: build/C/man2/mmap.2:592
5843 msgid ""
5844 "On Linux there are no guarantees like those suggested above under "
5845 "B<MAP_NORESERVE>.  By default, any process can be killed at any moment when "
5846 "the system runs out of memory."
5847 msgstr ""
5848 "Linux においては、上記の B<MAP_NORESERVE> で述べられているような保証はない。 "
5849 "デフォルトでは、システムがメモリを使い切った場合には、 どのプロセスがいつ強制"
5850 "終了されるか分からないからである。"
5851
5852 #. type: Plain text
5853 #: build/C/man2/mmap.2:599
5854 msgid ""
5855 "In kernels before 2.6.7, the B<MAP_POPULATE> flag has effect only if I<prot> "
5856 "is specified as B<PROT_NONE>."
5857 msgstr ""
5858 "2.6.7 より前のカーネルでは、 I<prot> に B<PROT_NONE> が指定された場合にの"
5859 "み、 B<MAP_POPULATE> フラグが効力を持つ。"
5860
5861 #. type: Plain text
5862 #: build/C/man2/mmap.2:614
5863 msgid ""
5864 "SUSv3 specifies that B<mmap>()  should fail if I<length> is 0.  However, in "
5865 "kernels before 2.6.12, B<mmap>()  succeeded in this case: no mapping was "
5866 "created and the call returned I<addr>.  Since kernel 2.6.12, B<mmap>()  "
5867 "fails with the error B<EINVAL> for this case."
5868 msgstr ""
5869 "SUSv3 では、 I<length> が 0 の場合、 B<mmap>()  は失敗すると規定されている。"
5870 "しかしながら、2.6.12 より前のカーネルでは、 この場合に B<mmap>()  は成功して"
5871 "いた (マッピングは作成されず、 I<addr> が返されていた)。 カーネル 2.6.12 以降"
5872 "では、 B<mmap>()  はエラー B<EINVAL> で失敗する。"
5873
5874 #. type: Plain text
5875 #: build/C/man2/mmap.2:630
5876 msgid ""
5877 "POSIX specifies that the system shall always zero fill any partial page at "
5878 "the end of the object and that system will never write any modification of "
5879 "the object beyond its end.  On Linux, when you write data to such partial "
5880 "page after the end of the object, the data stays in the page cache even "
5881 "after the file is closed and unmapped and even though the data is never "
5882 "written to the file itself, subsequent mappings may see the modified "
5883 "content.  In some cases, this could be fixed by calling B<msync>(2)  before "
5884 "the unmap takes place; however, this doesn't work on tmpfs (for example, "
5885 "when using POSIX shared memory interface documented in B<shm_overview>(7))."
5886 msgstr ""
5887 "POSIX では、 システムはオブジェクト末尾の部分ページを常に 0 で埋め、 末尾より"
5888 "後ろのオブジェクトを決して変更してはならない、と規定している。 Linux では、 "
5889 "オブジェクト末尾より後ろの部分ページにデータを書き込んだ場合、 そのファイルを"
5890 "クローズしてアンマップした後であってもページキャッシュにデータが残り続け、 "
5891 "データがファイル自体に書き込まれていなくても、 それ以降のマッピングで変更され"
5892 "た内容が見える可能性がある。 いくつかの場合では、 アンマップを行う前に "
5893 "B<msync>(2) を呼び出すことで、 この状況を修正することができる。 しかし、 これ"
5894 "は tmpfs では機能しない (例えば、 B<shm_overview>(7) で説明されている POSIX "
5895 "共有メモリインターフェースを使った場合)。"
5896
5897 #. type: Plain text
5898 #: build/C/man2/mmap.2:642
5899 msgid ""
5900 "The following program prints part of the file specified in its first command-"
5901 "line argument to standard output.  The range of bytes to be printed is "
5902 "specified via offset and length values in the second and third command-line "
5903 "arguments.  The program creates a memory mapping of the required pages of "
5904 "the file and then uses B<write>(2)  to output the desired bytes."
5905 msgstr ""
5906 "以下のプログラムは、一番目のコマンドライン引き数で指定された ファイルの一部を"
5907 "標準出力に表示する。 表示する範囲は、二番目、三番目のコマンドライン引き数で渡"
5908 "される オフセットと長さで指定される。 このプログラムは、指定されたファイルの"
5909 "必要なページのメモリ・ マッピングを作成し、 B<write>(2)  を使って所望のバイト"
5910 "を出力する。"
5911
5912 #. type: Plain text
5913 #: build/C/man2/mmap.2:650
5914 #, no-wrap
5915 msgid ""
5916 "#include E<lt>sys/mman.hE<gt>\n"
5917 "#include E<lt>sys/stat.hE<gt>\n"
5918 "#include E<lt>fcntl.hE<gt>\n"
5919 "#include E<lt>stdio.hE<gt>\n"
5920 "#include E<lt>stdlib.hE<gt>\n"
5921 "#include E<lt>unistd.hE<gt>\n"
5922 msgstr ""
5923 "#include E<lt>sys/mman.hE<gt>\n"
5924 "#include E<lt>sys/stat.hE<gt>\n"
5925 "#include E<lt>fcntl.hE<gt>\n"
5926 "#include E<lt>stdio.hE<gt>\n"
5927 "#include E<lt>stdlib.hE<gt>\n"
5928 "#include E<lt>unistd.hE<gt>\n"
5929
5930 #. type: Plain text
5931 #: build/C/man2/mmap.2:653 build/C/man2/mprotect.2:178
5932 #, no-wrap
5933 msgid ""
5934 "#define handle_error(msg) \\e\n"
5935 "    do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
5936 msgstr ""
5937 "#define handle_error(msg) \\e\n"
5938 "    do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
5939
5940 #. type: Plain text
5941 #: build/C/man2/mmap.2:663
5942 #, no-wrap
5943 msgid ""
5944 "int\n"
5945 "main(int argc, char *argv[])\n"
5946 "{\n"
5947 "    char *addr;\n"
5948 "    int fd;\n"
5949 "    struct stat sb;\n"
5950 "    off_t offset, pa_offset;\n"
5951 "    size_t length;\n"
5952 "    ssize_t s;\n"
5953 msgstr ""
5954 "int\n"
5955 "main(int argc, char *argv[])\n"
5956 "{\n"
5957 "    char *addr;\n"
5958 "    int fd;\n"
5959 "    struct stat sb;\n"
5960 "    off_t offset, pa_offset;\n"
5961 "    size_t length;\n"
5962 "    ssize_t s;\n"
5963
5964 #. type: Plain text
5965 #: build/C/man2/mmap.2:668
5966 #, no-wrap
5967 msgid ""
5968 "    if (argc E<lt> 3 || argc E<gt> 4) {\n"
5969 "        fprintf(stderr, \"%s file offset [length]\\en\", argv[0]);\n"
5970 "        exit(EXIT_FAILURE);\n"
5971 "    }\n"
5972 msgstr ""
5973 "    if (argc E<lt> 3 || argc E<gt> 4) {\n"
5974 "        fprintf(stderr, \"%s file offset [length]\\en\", argv[0]);\n"
5975 "        exit(EXIT_FAILURE);\n"
5976 "    }\n"
5977
5978 #. type: Plain text
5979 #: build/C/man2/mmap.2:672
5980 #, no-wrap
5981 msgid ""
5982 "    fd = open(argv[1], O_RDONLY);\n"
5983 "    if (fd == -1)\n"
5984 "        handle_error(\"open\");\n"
5985 msgstr ""
5986 "    fd = open(argv[1], O_RDONLY);\n"
5987 "    if (fd == -1)\n"
5988 "        handle_error(\"open\");\n"
5989
5990 #. type: Plain text
5991 #: build/C/man2/mmap.2:675
5992 #, no-wrap
5993 msgid ""
5994 "    if (fstat(fd, &sb) == -1)           /* To obtain file size */\n"
5995 "        handle_error(\"fstat\");\n"
5996 msgstr ""
5997 "    if (fstat(fd, &sb) == -1)           /* To obtain file size */\n"
5998 "        handle_error(\"fstat\");\n"
5999
6000 #. type: Plain text
6001 #: build/C/man2/mmap.2:679
6002 #, no-wrap
6003 msgid ""
6004 "    offset = atoi(argv[2]);\n"
6005 "    pa_offset = offset & ~(sysconf(_SC_PAGE_SIZE) - 1);\n"
6006 "        /* offset for mmap() must be page aligned */\n"
6007 msgstr ""
6008 "    offset = atoi(argv[2]);\n"
6009 "    pa_offset = offset & ~(sysconf(_SC_PAGE_SIZE) - 1);\n"
6010 "        /* offset for mmap() must be page aligned */\n"
6011
6012 #. type: Plain text
6013 #: build/C/man2/mmap.2:684
6014 #, no-wrap
6015 msgid ""
6016 "    if (offset E<gt>= sb.st_size) {\n"
6017 "        fprintf(stderr, \"offset is past end of file\\en\");\n"
6018 "        exit(EXIT_FAILURE);\n"
6019 "    }\n"
6020 msgstr ""
6021 "    if (offset E<gt>= sb.st_size) {\n"
6022 "        fprintf(stderr, \"offset is past end of file\\en\");\n"
6023 "        exit(EXIT_FAILURE);\n"
6024 "    }\n"
6025
6026 #. type: Plain text
6027 #: build/C/man2/mmap.2:690
6028 #, no-wrap
6029 msgid ""
6030 "    if (argc == 4) {\n"
6031 "        length = atoi(argv[3]);\n"
6032 "        if (offset + length E<gt> sb.st_size)\n"
6033 "            length = sb.st_size - offset;\n"
6034 "                /* Can\\(aqt display bytes past end of file */\n"
6035 msgstr ""
6036 "    if (argc == 4) {\n"
6037 "        length = atoi(argv[3]);\n"
6038 "        if (offset + length E<gt> sb.st_size)\n"
6039 "            length = sb.st_size - offset;\n"
6040 "                /* Can\\(aqt display bytes past end of file */\n"
6041
6042 #. type: Plain text
6043 #: build/C/man2/mmap.2:694
6044 #, no-wrap
6045 msgid ""
6046 "    } else {    /* No length arg ==E<gt> display to end of file */\n"
6047 "        length = sb.st_size - offset;\n"
6048 "    }\n"
6049 msgstr ""
6050 "    } else {    /* No length arg ==E<gt> display to end of file */\n"
6051 "        length = sb.st_size - offset;\n"
6052 "    }\n"
6053
6054 #. type: Plain text
6055 #: build/C/man2/mmap.2:699
6056 #, no-wrap
6057 msgid ""
6058 "    addr = mmap(NULL, length + offset - pa_offset, PROT_READ,\n"
6059 "                MAP_PRIVATE, fd, pa_offset);\n"
6060 "    if (addr == MAP_FAILED)\n"
6061 "        handle_error(\"mmap\");\n"
6062 msgstr ""
6063 "    addr = mmap(NULL, length + offset - pa_offset, PROT_READ,\n"
6064 "                MAP_PRIVATE, fd, pa_offset);\n"
6065 "    if (addr == MAP_FAILED)\n"
6066 "        handle_error(\"mmap\");\n"
6067
6068 #. type: Plain text
6069 #: build/C/man2/mmap.2:704
6070 #, no-wrap
6071 msgid ""
6072 "    s = write(STDOUT_FILENO, addr + offset - pa_offset, length);\n"
6073 "    if (s != length) {\n"
6074 "        if (s == -1)\n"
6075 "            handle_error(\"write\");\n"
6076 msgstr ""
6077 "    s = write(STDOUT_FILENO, addr + offset - pa_offset, length);\n"
6078 "    if (s != length) {\n"
6079 "        if (s == -1)\n"
6080 "            handle_error(\"write\");\n"
6081
6082 #. type: Plain text
6083 #: build/C/man2/mmap.2:708
6084 #, no-wrap
6085 msgid ""
6086 "        fprintf(stderr, \"partial write\");\n"
6087 "        exit(EXIT_FAILURE);\n"
6088 "    }\n"
6089 msgstr ""
6090 "        fprintf(stderr, \"partial write\");\n"
6091 "        exit(EXIT_FAILURE);\n"
6092 "    }\n"
6093
6094 #. type: Plain text
6095 #: build/C/man2/mmap.2:725
6096 msgid ""
6097 "B<getpagesize>(2), B<mincore>(2), B<mlock>(2), B<mmap2>(2), B<mprotect>(2), "
6098 "B<mremap>(2), B<msync>(2), B<remap_file_pages>(2), B<setrlimit>(2), B<shmat>"
6099 "(2), B<shm_open>(3), B<shm_overview>(7)"
6100 msgstr ""
6101 "B<getpagesize>(2), B<mincore>(2), B<mlock>(2), B<mmap2>(2), B<mprotect>(2), "
6102 "B<mremap>(2), B<msync>(2), B<remap_file_pages>(2), B<setrlimit>(2), B<shmat>"
6103 "(2), B<shm_open>(3), B<shm_overview>(7)"
6104
6105 #. type: Plain text
6106 #: build/C/man2/mmap.2:732
6107 msgid ""
6108 "The descriptions of the following files in B<proc>(5): I</proc/[pid]/maps>, "
6109 "I</proc/[pid]/map_files>, and I</proc/[pid]/smaps>."
6110 msgstr ""
6111 "B<proc>(5) の I</proc/[pid]/maps>, I</proc/[pid]/map_files>, I</proc/[pid]/"
6112 "smaps> の説明。"
6113
6114 #. type: Plain text
6115 #: build/C/man2/mmap.2:737 build/C/man2/msync.2:124
6116 msgid "B.O. Gallmeister, POSIX.4, O'Reilly, pp. 128-129 and 389-391."
6117 msgstr "B.O. Gallmeister, POSIX.4, O'Reilly, pp. 128-129 and 389-391."
6118
6119 #. type: TH
6120 #: build/C/man2/mmap2.2:29
6121 #, no-wrap
6122 msgid "MMAP2"
6123 msgstr "MMAP2"
6124
6125 #. type: TH
6126 #: build/C/man2/mmap2.2:29
6127 #, no-wrap
6128 msgid "2012-04-16"
6129 msgstr "2012-04-16"
6130
6131 #. type: Plain text
6132 #: build/C/man2/mmap2.2:32
6133 msgid "mmap2 - map files or devices into memory"
6134 msgstr "mmap2 - ファイルやデバイスをメモリにマップする"
6135
6136 #. type: Plain text
6137 #: build/C/man2/mmap2.2:38
6138 #, no-wrap
6139 msgid ""
6140 "B<void *mmap2(void *>I<addr>B<, size_t >I<length>B<, int >I<prot>B<,>\n"
6141 "B<             int >I<flags>B<, int >I<fd>B<, off_t >I<pgoffset>B<);>\n"
6142 msgstr ""
6143 "B<void *mmap2(void *>I<addr>B<, size_t >I<length>B<, int >I<prot>B<,>\n"
6144 "B<            int >I<flags>B<, int >I<fd>B<, off_t >I<pgoffset>B<);>\n"
6145
6146 #. type: Plain text
6147 #: build/C/man2/mmap2.2:43
6148 #, fuzzy
6149 #| msgid ""
6150 #| "This is probably not the system call you are interested; instead, see "
6151 #| "B<mmap>(2), which describes the glibc wrapper function that invokes this "
6152 #| "system call."
6153 msgid ""
6154 "This is probably not the system call that you are interested in; instead, "
6155 "see B<mmap>(2), which describes the glibc wrapper function that invokes this "
6156 "system call."
6157 msgstr ""
6158 "これはおそらくあなたが興味のあるシステムコールではないだろう。代わりに\n"
6159 "B<mmap>(2) を見るとよい。そのページにはこのシステムコールを起動する glibc "
6160 "の\n"
6161 "ラッパー関数についての説明がある。"
6162
6163 #. type: Plain text
6164 #: build/C/man2/mmap2.2:54
6165 msgid ""
6166 "The B<mmap2>()  system call provides the same interface as B<mmap>(2), "
6167 "except that the final argument specifies the offset into the file in 4096-"
6168 "byte units (instead of bytes, as is done by B<mmap>(2)).  This enables "
6169 "applications that use a 32-bit I<off_t> to map large files (up to 2^44 "
6170 "bytes)."
6171 msgstr ""
6172 "B<mmap2>() システムコールは B<mmap>(2) と同じインターフェースを提供する。た"
6173 "だ\n"
6174 "し、最後の引き数には、ファイルのオフセットを (B<mmap>(2) が行っている、バイ"
6175 "ト\n"
6176 "単位ではなく) 4096 バイトを単位として指定する。 これにより、32 ビットの\n"
6177 "I<off_t> を使うアプリケーションで (2^44 バイトまでの) 大きなファイルをマッ"
6178 "プ\n"
6179 "できるようになる。"
6180
6181 #. type: Plain text
6182 #: build/C/man2/mmap2.2:61
6183 msgid ""
6184 "On success, B<mmap2>()  returns a pointer to the mapped area.  On error -1 "
6185 "is returned and I<errno> is set appropriately."
6186 msgstr ""
6187 "成功した場合、 B<mmap2>()  はマップされた領域へのポインタを返す。 エラーの場"
6188 "合は -1 が返されて、 I<errno> が適切に設定される。"
6189
6190 #. type: Plain text
6191 #: build/C/man2/mmap2.2:65
6192 msgid "Problem with getting the data from user space."
6193 msgstr "ユーザ空間からデータを取得するときに問題があった。"
6194
6195 #. type: Plain text
6196 #: build/C/man2/mmap2.2:70
6197 msgid ""
6198 "(Various platforms where the page size is not 4096 bytes.)  I<offset\\ *\\ "
6199 "4096> is not a multiple of the system page size."
6200 msgstr ""
6201 "(ページサイズが 4096 バイトでないプラットフォームにおいて)  I<offset\\ *\\ "
6202 "4096> がシステムのページサイズの倍数ではない。"
6203
6204 #. type: Plain text
6205 #: build/C/man2/mmap2.2:74
6206 msgid "B<mmap2>()  can also return any of the errors described in B<mmap>(2)."
6207 msgstr "B<mmap2>() は B<mmap>(2) に載っているエラーを返すこともある。"
6208
6209 #. type: Plain text
6210 #: build/C/man2/mmap2.2:77
6211 msgid "B<mmap2>()  is available since Linux 2.3.31."
6212 msgstr "B<mmap2>()  は、Linux 2.3.31 以降で使用可能である。"
6213
6214 #. type: Plain text
6215 #: build/C/man2/mmap2.2:79 build/C/man2/subpage_prot.2:98
6216 msgid "This system call is Linux-specific."
6217 msgstr "このシステムコールは Linux 独自である。"
6218
6219 #. type: Plain text
6220 #: build/C/man2/mmap2.2:85
6221 msgid ""
6222 "Nowadays, the glibc B<mmap>()  wrapper function invokes this system call "
6223 "rather than the B<mmap>(2)  system call."
6224 msgstr ""
6225 "現在では、glibc の B<mmap>()  のラッパー関数は、 B<mmap>(2)  システムコールで"
6226 "はなく、このシステムコール (B<mmap2>(2))  を起動する。"
6227
6228 #.  ia64 can have page sizes ranging from 4kB to 64kB.
6229 #.  On cris, it looks like the unit might also be the page size,
6230 #.  which is 8192 bytes. -- mtk, June 2007
6231 #. type: Plain text
6232 #: build/C/man2/mmap2.2:92
6233 msgid ""
6234 "On ia64, the unit for I<offset> is actually the system page size, rather "
6235 "than 4096 bytes."
6236 msgstr ""
6237 "ia64 では、 I<offset> の単位は、実際にはシステムのページサイズであり、 4096 "
6238 "バイトではない。"
6239
6240 #. type: Plain text
6241 #: build/C/man2/mmap2.2:98
6242 msgid ""
6243 "B<getpagesize>(2), B<mmap>(2), B<mremap>(2), B<msync>(2), B<shm_open>(3)"
6244 msgstr ""
6245 "B<getpagesize>(2), B<mmap>(2), B<mremap>(2), B<msync>(2), B<shm_open>(3)"
6246
6247 #. type: TH
6248 #: build/C/man2/mprotect.2:38
6249 #, no-wrap
6250 msgid "MPROTECT"
6251 msgstr "MPROTECT"
6252
6253 #. type: TH
6254 #: build/C/man2/mprotect.2:38
6255 #, no-wrap
6256 msgid "2012-08-14"
6257 msgstr "2012-08-14"
6258
6259 #. type: Plain text
6260 #: build/C/man2/mprotect.2:41
6261 msgid "mprotect - set protection on a region of memory"
6262 msgstr "mprotect - メモリ領域の保護を設定する"
6263
6264 #. type: Plain text
6265 #: build/C/man2/mprotect.2:46
6266 #, no-wrap
6267 msgid "B<int mprotect(void *>I<addr>B<, size_t >I<len>B<, int >I<prot>B<);>\n"
6268 msgstr "B<int mprotect(void *>I<addr>B<, size_t >I<len>B<, int >I<prot>B<);>\n"
6269
6270 #. type: Plain text
6271 #: build/C/man2/mprotect.2:54
6272 msgid ""
6273 "B<mprotect>()  changes protection for the calling process's memory page(s)  "
6274 "containing any part of the address range in the interval [I<addr>,\\ I<addr>"
6275 "+I<len>-1].  I<addr> must be aligned to a page boundary."
6276 msgstr ""
6277 "B<mprotect>()  は、区間 [I<addr>,\\ I<addr>+I<len>-1] のアドレス範囲を含む 呼"
6278 "び出し元のプロセスのメモリページのアクセス保護を変更する。 I<addr> はページ境"
6279 "界に一致していなければならない。"
6280
6281 #. type: Plain text
6282 #: build/C/man2/mprotect.2:59
6283 msgid ""
6284 "If the calling process tries to access memory in a manner that violates the "
6285 "protection, then the kernel generates a B<SIGSEGV> signal for the process."
6286 msgstr ""
6287 "呼び出し元のプロセスがアクセス保護に違反するようなメモリアクセスを 行おうとす"
6288 "ると、カーネルはシグナル B<SIGSEGV> をそのプロセスに対して生成する。"
6289
6290 #. type: Plain text
6291 #: build/C/man2/mprotect.2:64
6292 msgid ""
6293 "I<prot> is either B<PROT_NONE> or a bitwise-or of the other values in the "
6294 "following list:"
6295 msgstr ""
6296 "I<prot> には、 B<PROT_NONE> か、以下のリストの B<PROT_NONE> 以外の値をビット"
6297 "毎の論理和 (bitwize-or) で指定する:"
6298
6299 #. type: Plain text
6300 #: build/C/man2/mprotect.2:67
6301 msgid "The memory cannot be accessed at all."
6302 msgstr "そのメモリには全くアクセスできない。"
6303
6304 #. type: Plain text
6305 #: build/C/man2/mprotect.2:70
6306 msgid "The memory can be read."
6307 msgstr "そのメモリを読み取ることができる。"
6308
6309 #. type: Plain text
6310 #: build/C/man2/mprotect.2:73
6311 msgid "The memory can be modified."
6312 msgstr "そのメモリを変更できる。"
6313
6314 #.  FIXME
6315 #.  Document PROT_GROWSUP and PROT_GROWSDOWN
6316 #. type: Plain text
6317 #: build/C/man2/mprotect.2:78
6318 msgid "The memory can be executed."
6319 msgstr "そのメモリは実行可能である。"
6320
6321 #. type: Plain text
6322 #: build/C/man2/mprotect.2:85
6323 msgid ""
6324 "On success, B<mprotect>()  returns zero.  On error, -1 is returned, and "
6325 "I<errno> is set appropriately."
6326 msgstr ""
6327 "成功した場合、 B<mprotect>()  は 0 を返す。エラーの場合は -1 が返り、 "
6328 "I<errno> が適切に設定される。"
6329
6330 #. type: Plain text
6331 #: build/C/man2/mprotect.2:95
6332 msgid ""
6333 "The memory cannot be given the specified access.  This can happen, for "
6334 "example, if you B<mmap>(2)  a file to which you have read-only access, then "
6335 "ask B<mprotect>()  to mark it B<PROT_WRITE>."
6336 msgstr ""
6337 "指定されたアクセスをメモリに設定することができない。 これは、例えば ファイル"
6338 "を読み取り専用で B<mmap>(2)  しており、その領域に対して B<mprotect>()  を呼び"
6339 "出して B<PROT_WRITE> に設定しようとした場合に発生する。"
6340
6341 #.  Or: both PROT_GROWSUP and PROT_GROWSDOWN were specified in 'prot'.
6342 #. type: Plain text
6343 #: build/C/man2/mprotect.2:100
6344 msgid ""
6345 "I<addr> is not a valid pointer, or not a multiple of the system page size."
6346 msgstr ""
6347 "I<addr> が有効なポインタでないか、 システムのページサイズの倍数でない。"
6348
6349 #. type: Plain text
6350 #: build/C/man2/mprotect.2:103
6351 msgid "Internal kernel structures could not be allocated."
6352 msgstr "カーネル内部の構造体を割り当てることができなかった。"
6353
6354 #. type: Plain text
6355 #: build/C/man2/mprotect.2:113
6356 msgid ""
6357 "Addresses in the range [I<addr>, I<addr>+I<len>-1] are invalid for the "
6358 "address space of the process, or specify one or more pages that are not "
6359 "mapped.  (Before kernel 2.4.19, the error B<EFAULT> was incorrectly produced "
6360 "for these cases.)"
6361 msgstr ""
6362 "[I<addr>, I<addr>+I<len>-1] という範囲のアドレスがプロセスのアドレス空間とし"
6363 "て不正であるか、 その範囲のアドレスがマップされていない 1 つ以上のページを指"
6364 "している (カーネル 2.4.19 より前では、この状況でエラー B<EFAULT> が間違って生"
6365 "成されていた)。"
6366
6367 #.  SVr4 defines an additional error
6368 #.  code EAGAIN. The SVr4 error conditions don't map neatly onto Linux's.
6369 #. type: Plain text
6370 #: build/C/man2/mprotect.2:122
6371 msgid ""
6372 "SVr4, POSIX.1-2001.  POSIX says that the behavior of B<mprotect>()  is "
6373 "unspecified if it is applied to a region of memory that was not obtained via "
6374 "B<mmap>(2)."
6375 msgstr ""
6376 "SVr4, POSIX.1-2001.  POSIX では、 B<mmap>(2)  経由で獲得していないメモリ領域"
6377 "に対して B<mprotect>()  を行った場合の B<mprotect>()  の動作は未定義であると"
6378 "されている。"
6379
6380 #. type: Plain text
6381 #: build/C/man2/mprotect.2:129
6382 msgid ""
6383 "On Linux it is always permissible to call B<mprotect>()  on any address in a "
6384 "process's address space (except for the kernel vsyscall area).  In "
6385 "particular it can be used to change existing code mappings to be writable."
6386 msgstr ""
6387 "Linux では、(カーネル vsyscall 領域以外の)  任意のプロセスアドレス空間に対し"
6388 "て B<mprotect>()  を呼び出すことが、常に許されている。 これは特に既存のコード"
6389 "マッピングを書き込み可能にするために使われる。"
6390
6391 #. type: Plain text
6392 #: build/C/man2/mprotect.2:139
6393 msgid ""
6394 "Whether B<PROT_EXEC> has any effect different from B<PROT_READ> is "
6395 "architecture- and kernel version-dependent.  On some hardware architectures "
6396 "(e.g., i386), B<PROT_WRITE> implies B<PROT_READ>."
6397 msgstr ""
6398 "B<PROT_EXEC> が B<PROT_READ> と異なる影響を持つか否かは、アーキテクチャとカー"
6399 "ネルのバージョンに依存する。 (i386 などの) いくつかのアーキテクチャでは、 "
6400 "B<PROT_WRITE> をセットすると、暗黙のうちに B<PROT_READ> がセットされる。"
6401
6402 #. type: Plain text
6403 #: build/C/man2/mprotect.2:148
6404 msgid ""
6405 "POSIX.1-2001 says that an implementation may permit access other than that "
6406 "specified in I<prot>, but at a minimum can allow write access only if "
6407 "B<PROT_WRITE> has been set, and must not allow any access if B<PROT_NONE> "
6408 "has been set."
6409 msgstr ""
6410 "POSIX.1-2001 では、 I<prot> で指定されていないアクセスを許可する実装を認めて"
6411 "いる。 ただし、最低限、 B<PROT_WRITE> がセットされている場合にのみ書き込みア"
6412 "クセスが許可され、 B<PROT_NONE> がセットされている場合にはアクセスは許可され"
6413 "ない点だけは 満たす必要がある。"
6414
6415 #. type: Plain text
6416 #: build/C/man2/mprotect.2:154
6417 msgid ""
6418 "The program below allocates four pages of memory, makes the third of these "
6419 "pages read-only, and then executes a loop that walks upward through the "
6420 "allocated region modifying bytes."
6421 msgstr ""
6422 "以下のプログラムは、メモリページを 4つ確保し、そのうち 3番目のページを 読み込"
6423 "み専用に設定する。その後で、確保した領域のアドレスの小さい方から 大きな方に向"
6424 "かって順番にバイト値を変更するループを実行する。"
6425
6426 #. type: Plain text
6427 #: build/C/man2/mprotect.2:157
6428 msgid ""
6429 "An example of what we might see when running the program is the following:"
6430 msgstr "プログラムを実行した場合の一例を以下に示す。"
6431
6432 #. type: Plain text
6433 #: build/C/man2/mprotect.2:163
6434 #, no-wrap
6435 msgid ""
6436 "$B< ./a.out>\n"
6437 "Start of region:        0x804c000\n"
6438 "Got SIGSEGV at address: 0x804e000\n"
6439 msgstr ""
6440 "$B< ./a.out>\n"
6441 "Start of region:        0x804c000\n"
6442 "Got SIGSEGV at address: 0x804e000\n"
6443
6444 #. type: Plain text
6445 #: build/C/man2/mprotect.2:175
6446 #, no-wrap
6447 msgid ""
6448 "#include E<lt>unistd.hE<gt>\n"
6449 "#include E<lt>signal.hE<gt>\n"
6450 "#include E<lt>stdio.hE<gt>\n"
6451 "#include E<lt>malloc.hE<gt>\n"
6452 "#include E<lt>stdlib.hE<gt>\n"
6453 "#include E<lt>errno.hE<gt>\n"
6454 "#include E<lt>sys/mman.hE<gt>\n"
6455 msgstr ""
6456 "#include E<lt>unistd.hE<gt>\n"
6457 "#include E<lt>signal.hE<gt>\n"
6458 "#include E<lt>stdio.hE<gt>\n"
6459 "#include E<lt>malloc.hE<gt>\n"
6460 "#include E<lt>stdlib.hE<gt>\n"
6461 "#include E<lt>errno.hE<gt>\n"
6462 "#include E<lt>sys/mman.hE<gt>\n"
6463
6464 #. type: Plain text
6465 #: build/C/man2/mprotect.2:180
6466 #, no-wrap
6467 msgid "char *buffer;\n"
6468 msgstr "char *buffer;\n"
6469
6470 #. type: Plain text
6471 #: build/C/man2/mprotect.2:188
6472 #, no-wrap
6473 msgid ""
6474 "static void\n"
6475 "handler(int sig, siginfo_t *si, void *unused)\n"
6476 "{\n"
6477 "    printf(\"Got SIGSEGV at address: 0x%lx\\en\",\n"
6478 "            (long) si-E<gt>si_addr);\n"
6479 "    exit(EXIT_FAILURE);\n"
6480 "}\n"
6481 msgstr ""
6482 "static void\n"
6483 "handler(int sig, siginfo_t *si, void *unused)\n"
6484 "{\n"
6485 "    printf(\"Got SIGSEGV at address: 0x%lx\\en\",\n"
6486 "            (long) si-E<gt>si_addr);\n"
6487 "    exit(EXIT_FAILURE);\n"
6488 "}\n"
6489
6490 #. type: Plain text
6491 #: build/C/man2/mprotect.2:195
6492 #, no-wrap
6493 msgid ""
6494 "int\n"
6495 "main(int argc, char *argv[])\n"
6496 "{\n"
6497 "    char *p;\n"
6498 "    int pagesize;\n"
6499 "    struct sigaction sa;\n"
6500 msgstr ""
6501 "int\n"
6502 "main(void)\n"
6503 "{\n"
6504 "    char *p;\n"
6505 "    int pagesize;\n"
6506 "    struct sigaction sa;\n"
6507
6508 #. type: Plain text
6509 #: build/C/man2/mprotect.2:201
6510 #, no-wrap
6511 msgid ""
6512 "    sa.sa_flags = SA_SIGINFO;\n"
6513 "    sigemptyset(&sa.sa_mask);\n"
6514 "    sa.sa_sigaction = handler;\n"
6515 "    if (sigaction(SIGSEGV, &sa, NULL) == -1)\n"
6516 "        handle_error(\"sigaction\");\n"
6517 msgstr ""
6518 "    sa.sa_flags = SA_SIGINFO;\n"
6519 "    sigemptyset(&sa.sa_mask);\n"
6520 "    sa.sa_sigaction = handler;\n"
6521 "    if (sigaction(SIGSEGV, &sa, NULL) == -1)\n"
6522 "        handle_error(\"sigaction\");\n"
6523
6524 #. type: Plain text
6525 #: build/C/man2/mprotect.2:205
6526 #, no-wrap
6527 msgid ""
6528 "    pagesize = sysconf(_SC_PAGE_SIZE);\n"
6529 "    if (pagesize == -1)\n"
6530 "        handle_error(\"sysconf\");\n"
6531 msgstr ""
6532 "    pagesize = sysconf(_SC_PAGE_SIZE);\n"
6533 "    if (pagesize == -1)\n"
6534 "        handle_error(\"sysconf\");\n"
6535
6536 #. type: Plain text
6537 #: build/C/man2/mprotect.2:208
6538 #, no-wrap
6539 msgid ""
6540 "    /* Allocate a buffer aligned on a page boundary;\n"
6541 "       initial protection is PROT_READ | PROT_WRITE */\n"
6542 msgstr ""
6543 "    /* Allocate a buffer aligned on a page boundary;\n"
6544 "       initial protection is PROT_READ | PROT_WRITE */\n"
6545
6546 #. type: Plain text
6547 #: build/C/man2/mprotect.2:212
6548 #, no-wrap
6549 msgid ""
6550 "    buffer = memalign(pagesize, 4 * pagesize);\n"
6551 "    if (buffer == NULL)\n"
6552 "        handle_error(\"memalign\");\n"
6553 msgstr ""
6554 "    buffer = memalign(pagesize, 4 * pagesize);\n"
6555 "    if (buffer == NULL)\n"
6556 "        handle_error(\"memalign\");\n"
6557
6558 #. type: Plain text
6559 #: build/C/man2/mprotect.2:214
6560 #, no-wrap
6561 msgid "    printf(\"Start of region:        0x%lx\\en\", (long) buffer);\n"
6562 msgstr "    printf(\"Start of region:        0x%lx\\en\", (long) buffer);\n"
6563
6564 #. type: Plain text
6565 #: build/C/man2/mprotect.2:218
6566 #, no-wrap
6567 msgid ""
6568 "    if (mprotect(buffer + pagesize * 2, pagesize,\n"
6569 "                PROT_READ) == -1)\n"
6570 "        handle_error(\"mprotect\");\n"
6571 msgstr ""
6572 "    if (mprotect(buffer + pagesize * 2, pagesize,\n"
6573 "                PROT_READ) == -1)\n"
6574 "        handle_error(\"mprotect\");\n"
6575
6576 #. type: Plain text
6577 #: build/C/man2/mprotect.2:221
6578 #, no-wrap
6579 msgid ""
6580 "    for (p = buffer ; ; )\n"
6581 "        *(p++) = \\(aqa\\(aq;\n"
6582 msgstr ""
6583 "    for (p = buffer ; ; )\n"
6584 "        *(p++) = \\(aqa\\(aq;\n"
6585
6586 #. type: Plain text
6587 #: build/C/man2/mprotect.2:225
6588 #, no-wrap
6589 msgid ""
6590 "    printf(\"Loop completed\\en\");     /* Should never happen */\n"
6591 "    exit(EXIT_SUCCESS);\n"
6592 "}\n"
6593 msgstr ""
6594 "    printf(\"Loop completed\\en\");     /* Should never happen */\n"
6595 "    exit(EXIT_SUCCESS);\n"
6596 "}\n"
6597
6598 #. type: Plain text
6599 #: build/C/man2/mprotect.2:229
6600 msgid "B<mmap>(2), B<sysconf>(3)"
6601 msgstr "B<mmap>(2), B<sysconf>(3)"
6602
6603 #. type: TH
6604 #: build/C/man2/mremap.2:30
6605 #, no-wrap
6606 msgid "MREMAP"
6607 msgstr "MREMAP"
6608
6609 #. type: TH
6610 #: build/C/man2/mremap.2:30
6611 #, no-wrap
6612 msgid "2010-06-10"
6613 msgstr "2010-06-10"
6614
6615 #. type: Plain text
6616 #: build/C/man2/mremap.2:33
6617 msgid "mremap - remap a virtual memory address"
6618 msgstr "mremap - 仮想メモリ・アドレスを再マッピングする"
6619
6620 #. type: Plain text
6621 #: build/C/man2/mremap.2:36
6622 #, no-wrap
6623 msgid "B<#define _GNU_SOURCE>         /* See feature_test_macros(7) */\n"
6624 msgstr "B<#define _GNU_SOURCE>         /* feature_test_macros(7) 参照 */\n"
6625
6626 #. type: Plain text
6627 #: build/C/man2/mremap.2:41
6628 #, no-wrap
6629 msgid ""
6630 "B<void *mremap(void *>I<old_address>B<, size_t >I<old_size>B<,>\n"
6631 "B<             size_t >I<new_size>B<, int >I<flags>B<, ... /* void *>I<new_address>B< */);>\n"
6632 msgstr ""
6633 "B<void *mremap(void *>I<old_address>B<, size_t >I<old_size>B<,>\n"
6634 "B<             size_t >I<new_size>B<, int >I<flags>B<, ... /* void *>I<new_address>B< */);>\n"
6635
6636 #. type: Plain text
6637 #: build/C/man2/mremap.2:47
6638 msgid ""
6639 "B<mremap>()  expands (or shrinks) an existing memory mapping, potentially "
6640 "moving it at the same time (controlled by the I<flags> argument and the "
6641 "available virtual address space)."
6642 msgstr ""
6643 "B<mremap>()  は既存のメモリ・マッピングの拡張 (または縮小) を行う。 同時に移"
6644 "動されることもある (I<flags> 引き数と利用可能な仮想アドレス空間によって決ま"
6645 "る)。"
6646
6647 #. type: Plain text
6648 #: build/C/man2/mremap.2:61
6649 msgid ""
6650 "I<old_address> is the old address of the virtual memory block that you want "
6651 "to expand (or shrink).  Note that I<old_address> has to be page aligned.  "
6652 "I<old_size> is the old size of the virtual memory block.  I<new_size> is the "
6653 "requested size of the virtual memory block after the resize.  An optional "
6654 "fifth argument, I<new_address>, may be provided; see the description of "
6655 "B<MREMAP_FIXED> below."
6656 msgstr ""
6657 "I<old_address> は拡張 (または縮小) しようとする仮想メモリ・ブロック の元のア"
6658 "ドレスである。I<old_address> はページ境界に合っていなければ ならない点に注意"
6659 "すること。I<old_size> は元の仮想メモリ・ブロックの サイズである。 "
6660 "I<new_size> は要求する変更後の仮想メモリ・ブロックのサイズである。 5 番目の引"
6661 "き数として I<new_address> を指定することができる。下記の B<MREMAP_FIXED> の説"
6662 "明を参照のこと。"
6663
6664 #. type: Plain text
6665 #: build/C/man2/mremap.2:73
6666 msgid ""
6667 "In Linux the memory is divided into pages.  A user process has (one or)  "
6668 "several linear virtual memory segments.  Each virtual memory segment has one "
6669 "or more mappings to real memory pages (in the page table).  Each virtual "
6670 "memory segment has its own protection (access rights), which may cause a "
6671 "segmentation violation if the memory is accessed incorrectly (e.g., writing "
6672 "to a read-only segment).  Accessing virtual memory outside of the segments "
6673 "will also cause a segmentation violation."
6674 msgstr ""
6675 "Linux ではメモリはページに分割される。ユーザー・プロセスは (一つまたは)  複数"
6676 "のリニアな仮想メモリセグメントを持つ。 それぞれの仮想メモリセグメントは一つ以"
6677 "上の実メモリ・ページ にマッピングされている (マッピング情報はページ・テーブル"
6678 "で管理される)。 仮想メモリセグメントにはセグメント毎の保護 (アクセス権) が設"
6679 "定されており、 メモリが不正にアクセスされた場合 (例えば読み込み専用のセグメン"
6680 "トに 書き込んだ場合)、セグメンテーション侵害 (segmentation violation) を 引き"
6681 "起こす。また、セグメント外の仮想メモリにアクセスした場合にも セグメンテーショ"
6682 "ン侵害が発生する。"
6683
6684 #. type: Plain text
6685 #: build/C/man2/mremap.2:81
6686 msgid ""
6687 "B<mremap>()  uses the Linux page table scheme.  B<mremap>()  changes the "
6688 "mapping between virtual addresses and memory pages.  This can be used to "
6689 "implement a very efficient B<realloc>(3)."
6690 msgstr ""
6691 "B<mremap>()  は Linux のページ・テーブル方式を使用する。 B<mremap>()  は仮想"
6692 "アドレスとメモリ・ページのマッピングを変更する。これは非常に効率的な "
6693 "B<realloc>(3)  を実装するのに使用されている。"
6694
6695 #. type: Plain text
6696 #: build/C/man2/mremap.2:83
6697 msgid "The I<flags> bit-mask argument may be 0, or include the following flag:"
6698 msgstr "I<flags> ビットマスク引数は 0 または以下のフラグを含む:"
6699
6700 #. type: TP
6701 #: build/C/man2/mremap.2:83
6702 #, no-wrap
6703 msgid "B<MREMAP_MAYMOVE>"
6704 msgstr "B<MREMAP_MAYMOVE>"
6705
6706 #. type: Plain text
6707 #: build/C/man2/mremap.2:95
6708 msgid ""
6709 "By default, if there is not sufficient space to expand a mapping at its "
6710 "current location, then B<mremap>()  fails.  If this flag is specified, then "
6711 "the kernel is permitted to relocate the mapping to a new virtual address, if "
6712 "necessary.  If the mapping is relocated, then absolute pointers into the old "
6713 "mapping location become invalid (offsets relative to the starting address of "
6714 "the mapping should be employed)."
6715 msgstr ""
6716 "デフォルトでは、現在の位置にマッピングを拡張するための 十分な空きがなければ "
6717 "B<mremap>()  は失敗する。 このフラグが指定されると、カーネルは必要があれば"
6718 "マッピングを 新しい仮想アドレスに再配置することができる マッピングが再配置さ"
6719 "れると、古いマッピング位置への絶対ポインタは 無効になる (マッピングの開始アド"
6720 "レスからの相対オフセットは有効のままである)。"
6721
6722 #. type: TP
6723 #: build/C/man2/mremap.2:95
6724 #, no-wrap
6725 msgid "B<MREMAP_FIXED> (since Linux 2.3.31)"
6726 msgstr "B<MREMAP_FIXED> (Linux 2.3.31 以降)"
6727
6728 #. type: Plain text
6729 #: build/C/man2/mremap.2:117
6730 msgid ""
6731 "This flag serves a similar purpose to the B<MAP_FIXED> flag of B<mmap>(2).  "
6732 "If this flag is specified, then B<mremap>()  accepts a fifth argument, I<void"
6733 "\\ *new_address>, which specifies a page-aligned address to which the "
6734 "mapping must be moved.  Any previous mapping at the address range specified "
6735 "by I<new_address> and I<new_size> is unmapped.  If B<MREMAP_FIXED> is "
6736 "specified, then B<MREMAP_MAYMOVE> must also be specified."
6737 msgstr ""
6738 "このフラグは B<mmap>(2)  の B<MAP_FIXED> フラグと似たような目的で用いられ"
6739 "る。 このフラグが指定されると、 B<mremap>()  は 5 番目の引き数 I<void\\ "
6740 "*new_address> を受け取り、この引数はマッピングが移動されるべきアドレスを指定"
6741 "する。 このアドレスはページ境界に合っていなければならない。 I<new_address> "
6742 "と I<new_size> で指定されるアドレス範囲に過去のマッピングがあった場合、 その"
6743 "マッピングはアンマップされる (unmapped)。 B<MREMAP_FIXED> を指定した場合は、 "
6744 "B<MREMAP_MAYMOVE> も指定しなければならない。"
6745
6746 #. type: Plain text
6747 #: build/C/man2/mremap.2:127
6748 msgid ""
6749 "If the memory segment specified by I<old_address> and I<old_size> is locked "
6750 "(using B<mlock>(2)  or similar), then this lock is maintained when the "
6751 "segment is resized and/or relocated.  As a consequence, the amount of memory "
6752 "locked by the process may change."
6753 msgstr ""
6754 "I<old_address> と I<old_size> で指定されるメモリセグメントが (B<mlock>(2)  や"
6755 "同様のもので) ロックされている場合、セグメントのサイズが変わったり 再配置され"
6756 "たりした時にロックも維持される。 その結果、プロセスによってロックされるメモリ"
6757 "の量は変化する。"
6758
6759 #. type: Plain text
6760 #: build/C/man2/mremap.2:135
6761 msgid ""
6762 "On success B<mremap>()  returns a pointer to the new virtual memory area.  "
6763 "On error, the value B<MAP_FAILED> (that is, I<(void\\ *)\\ -1>) is returned, "
6764 "and I<errno> is set appropriately."
6765 msgstr ""
6766 "成功した場合は B<mremap>()  は新しい仮想メモリ領域へのポインタを返す。 エラー"
6767 "の場合は B<MAP_FAILED> (すなわち I<(void\\ *)\\ -1>) が返され、 I<errno> が適"
6768 "切に設定される。"
6769
6770 #. type: Plain text
6771 #: build/C/man2/mremap.2:142
6772 msgid ""
6773 "The caller tried to expand a memory segment that is locked, but this was not "
6774 "possible without exceeding the B<RLIMIT_MEMLOCK> resource limit."
6775 msgstr ""
6776 "呼び出し元がロックされているメモリセグメントを拡張しようとしたが、 "
6777 "B<RLIMIT_MEMLOCK> リソース制限を越えずにこれを行うことができない。"
6778
6779 #. type: Plain text
6780 #: build/C/man2/mremap.2:151
6781 msgid ""
6782 "\"Segmentation fault.\" Some address in the range I<old_address> to "
6783 "I<old_address>+I<old_size> is an invalid virtual memory address for this "
6784 "process.  You can also get B<EFAULT> even if there exist mappings that cover "
6785 "the whole address space requested, but those mappings are of different types."
6786 msgstr ""
6787 "「セグメンテーション違反(segmentation fault)」 I<old_address> から "
6788 "I<old_address>+I<old_size> の 範囲のアドレスのどれかがこのプロセスにおいて不"
6789 "正な仮想メモリ・アドレスである。 たとえ要求したアドレス空間全体を含むような"
6790 "マッピングがあったとしても、 それらのマッピングが異なった型ならば B<EFAULT> "
6791 "を受け取るだろう。"
6792
6793 #. type: Plain text
6794 #: build/C/man2/mremap.2:179
6795 msgid ""
6796 "An invalid argument was given.  Possible causes are: I<old_address> was not "
6797 "page aligned; a value other than B<MREMAP_MAYMOVE> or B<MREMAP_FIXED> was "
6798 "specified in I<flags>; I<new_size> was zero; I<new_size> or I<new_address> "
6799 "was invalid; or the new address range specified by I<new_address> and "
6800 "I<new_size> overlapped the old address range specified by I<old_address> and "
6801 "I<old_size>; or B<MREMAP_FIXED> was specified without also specifying "
6802 "B<MREMAP_MAYMOVE>."
6803 msgstr ""
6804 "不正な引き数が与えられた。 可能性のある原因は以下の通りである: たいていは "
6805 "I<old_address> がページ境界に 合ってない; I<flags> に B<MREMAP_MAYMOVE> また"
6806 "は B<MREMAP_FIXED> 以外の値が指定されている; I<new_size> がゼロ; I<new_size> "
6807 "または I<new_address> の値が不正; I<new_address> と I<new_size> で指定される"
6808 "新しいアドレス範囲が I<old_address> と I<old_size> で指定される古いアドレス範"
6809 "囲と重なっている; B<MREMAP_FIXED> が指定されているが B<MREMAP_MAYMOVE> が指定"
6810 "されていない。"
6811
6812 #. type: Plain text
6813 #: build/C/man2/mremap.2:185
6814 msgid ""
6815 "The memory area cannot be expanded at the current virtual address, and the "
6816 "B<MREMAP_MAYMOVE> flag is not set in I<flags>.  Or, there is not enough "
6817 "(virtual) memory available."
6818 msgstr ""
6819 "現在の仮想アドレスではメモリ領域が拡張できず、 B<MREMAP_MAYMOVE> フラグが "
6820 "I<flags> に設定されていない。 または十分な (仮想) メモリが存在しない。"
6821
6822 #.  4.2BSD had a (never actually implemented)
6823 #.  .BR mremap (2)
6824 #.  call with completely different semantics.
6825 #. type: Plain text
6826 #: build/C/man2/mremap.2:191
6827 msgid ""
6828 "This call is Linux-specific, and should not be used in programs intended to "
6829 "be portable."
6830 msgstr ""
6831 "このコールは Linux 特有であり、移植を意図したプログラムで 使用すべきではな"
6832 "い。"
6833
6834 #. type: Plain text
6835 #: build/C/man2/mremap.2:199
6836 msgid ""
6837 "Prior to version 2.4, glibc did not expose the definition of "
6838 "B<MREMAP_FIXED>, and the prototype for B<mremap>()  did not allow for the "
6839 "I<new_address> argument."
6840 msgstr ""
6841 "バージョン 2.4 より前の glibc では、 B<MREMAP_FIXED> の定義は公開されておら"
6842 "ず、 B<mremap>()  のプロトタイプは I<new_address> 引き数を取らなかった。"
6843
6844 #. type: Plain text
6845 #: build/C/man2/mremap.2:208
6846 msgid ""
6847 "B<brk>(2), B<getpagesize>(2), B<getrlimit>(2), B<mlock>(2), B<mmap>(2), "
6848 "B<sbrk>(2), B<malloc>(3), B<realloc>(3)"
6849 msgstr ""
6850 "B<brk>(2), B<getpagesize>(2), B<getrlimit>(2), B<mlock>(2), B<mmap>(2), "
6851 "B<sbrk>(2), B<realloc>(3), B<malloc>(3)"
6852
6853 #. type: Plain text
6854 #: build/C/man2/mremap.2:214
6855 msgid ""
6856 "Your favorite text book on operating systems for more information on paged "
6857 "memory (e.g., I<Modern Operating Systems> by Andrew S. Tanenbaum, I<Inside "
6858 "Linux> by Randolf Bentson, I<The Design of the UNIX Operating System> by "
6859 "Maurice J. Bach)"
6860 msgstr ""
6861 "ページ分割されたメモリについてもっと詳しく知りたいならば、あなたのお気に入り"
6862 "のオペレーティングシステムの教科書を参照してほしい (例えば、 I<Modern "
6863 "Operating Systems> by Andrew S. Tanenbaum, I<Inside Linux> by Randolf "
6864 "Bentson, I<The Design of the UNIX Operating System> by Maurice J. Bach.)"
6865
6866 #. type: TH
6867 #: build/C/man2/msync.2:25
6868 #, no-wrap
6869 msgid "MSYNC"
6870 msgstr "MSYNC"
6871
6872 #. type: TH
6873 #: build/C/man2/msync.2:25 build/C/man2/remap_file_pages.2:28
6874 #, no-wrap
6875 msgid "2008-04-22"
6876 msgstr "2008-04-22"
6877
6878 #. type: Plain text
6879 #: build/C/man2/msync.2:28
6880 msgid "msync - synchronize a file with a memory map"
6881 msgstr "msync - ファイルをマップしたメモリと同期させる"
6882
6883 #. type: Plain text
6884 #: build/C/man2/msync.2:32
6885 msgid "B<int msync(void *>I<addr>B<, size_t >I<length>B<, int >I<flags>B<);>"
6886 msgstr "B<int msync(void *>I<addr>B<, size_t >I<length>B<, int >I<flags>B<);>"
6887
6888 #. type: Plain text
6889 #: build/C/man2/msync.2:48
6890 msgid ""
6891 "B<msync>()  flushes changes made to the in-core copy of a file that was "
6892 "mapped into memory using B<mmap>(2)  back to disk.  Without use of this call "
6893 "there is no guarantee that changes are written back before B<munmap>(2)  is "
6894 "called.  To be more precise, the part of the file that corresponds to the "
6895 "memory area starting at I<addr> and having length I<length> is updated."
6896 msgstr ""
6897 "B<msync>()  は B<mmap>(2)  を使ってメモリにマップされたファイルの、 メモリ上"
6898 "のコピーになされた変更をディスクに反映させる。 この関数を使用しないと、 "
6899 "B<munmap>(2)  が呼び出されるまで変更が書き戻される保証はない。 より正確には、"
6900 "ファイルのうち I<addr> から始まり長さ I<length> のメモリ領域に対応する部分が"
6901 "更新される。"
6902
6903 #. type: Plain text
6904 #: build/C/man2/msync.2:68
6905 msgid ""
6906 "The I<flags> argument may have the bits B<MS_ASYNC>, B<MS_SYNC>, and "
6907 "B<MS_INVALIDATE> set, but not both B<MS_ASYNC> and B<MS_SYNC>.  B<MS_ASYNC> "
6908 "specifies that an update be scheduled, but the call returns immediately.  "
6909 "B<MS_SYNC> asks for an update and waits for it to complete.  "
6910 "B<MS_INVALIDATE> asks to invalidate other mappings of the same file (so that "
6911 "they can be updated with the fresh values just written)."
6912 msgstr ""
6913 "I<flags> 引数にはビット B<MS_ASYNC>, B<MS_SYNC>, B<MS_INVALIDATE> を設定する"
6914 "ことができるが、 B<MS_ASYNC> と B<MS_SYNC> を同時に指定することはできない。 "
6915 "B<MS_ASYNC> は更新を予定に組み込むことを表し、呼び出しは直ちに返る。 "
6916 "B<MS_SYNC> は更新を要求し、更新が完了するまで待つ。 B<MS_INVALIDATE> は(たっ"
6917 "た今書き込んだ新しい値でマッピングを更新することができるように)  同じファイル"
6918 "に対する他のマッピングを無効にすることを要求する。"
6919
6920 #. type: Plain text
6921 #: build/C/man2/msync.2:73
6922 msgid ""
6923 "On success, zero is returned.  On error, -1 is returned, and I<errno> is set "
6924 "appropriately."
6925 msgstr ""
6926 "成功した場合、 0 が返る。エラーの場合、 -1 が返り、 I<errno> が適切に設定され"
6927 "る。"
6928
6929 #. type: TP
6930 #: build/C/man2/msync.2:74
6931 #, no-wrap
6932 msgid "B<EBUSY>"
6933 msgstr "B<EBUSY>"
6934
6935 #. type: Plain text
6936 #: build/C/man2/msync.2:80
6937 msgid ""
6938 "B<MS_INVALIDATE> was specified in I<flags>, and a memory lock exists for the "
6939 "specified address range."
6940 msgstr ""
6941 "I flags に B<MS_INVALIDATE> が指定されたが、指定されたアドレス範囲にロックが"
6942 "存在する。"
6943
6944 #. type: Plain text
6945 #: build/C/man2/msync.2:93
6946 msgid ""
6947 "I<addr> is not a multiple of PAGESIZE; or any bit other than B<MS_ASYNC> | "
6948 "B<MS_INVALIDATE> | B<MS_SYNC> is set in I<flags>; or both B<MS_SYNC> and "
6949 "B<MS_ASYNC> are set in I<flags>."
6950 msgstr ""
6951 "I<addr> が PAGESIZE の倍数でない。または、 I<flags> に B<MS_ASYNC>、"
6952 "B<MS_INVALIDATE>、B<MS_SYNC> 以外のビットが設定された。 または、 I<flags> に "
6953 "B<MS_SYNC> と B<MS_ASYNC> の両方が設定された。"
6954
6955 #. type: Plain text
6956 #: build/C/man2/msync.2:96
6957 msgid "The indicated memory (or part of it) was not mapped."
6958 msgstr "指定されたメモリ (またはその一部) がマップされていない。"
6959
6960 #. type: Plain text
6961 #: build/C/man2/msync.2:98 build/C/man3/posix_fallocate.3:105
6962 #: build/C/man3/shm_open.3:253 build/C/man7/shm_overview.7:103
6963 msgid "POSIX.1-2001."
6964 msgstr "POSIX.1-2001."
6965
6966 #. type: Plain text
6967 #: build/C/man2/msync.2:105
6968 msgid ""
6969 "This call was introduced in Linux 1.3.21, and then used B<EFAULT> instead of "
6970 "B<ENOMEM>.  In Linux 2.4.19 this was changed to the POSIX value B<ENOMEM>."
6971 msgstr ""
6972 "この関数は Linux 1.3.21 で導入されたが、 B<ENOMEM> ではなく B<EFAULT> が使わ"
6973 "れていた。 これは Linux 2.4.19 で POSIX における値 B<ENOMEM> に変更された。"
6974
6975 #.  POSIX.1-2001: It shall be defined to -1 or 0 or 200112L.
6976 #.  -1: unavailable, 0: ask using sysconf().
6977 #.  glibc defines them to 1.
6978 #. type: Plain text
6979 #: build/C/man2/msync.2:120
6980 msgid ""
6981 "On POSIX systems on which B<msync>()  is available, both "
6982 "B<_POSIX_MAPPED_FILES> and B<_POSIX_SYNCHRONIZED_IO> are defined in "
6983 "I<E<lt>unistd.hE<gt>> to a value greater than 0.  (See also B<sysconf>(3).)"
6984 msgstr ""
6985 "B<msync>()  が使用可能な POSIX システムでは B<_POSIX_MAPPED_FILES> と "
6986 "B<_POSIX_SYNCHRONIZED_IO> の両方が I<E<lt>unistd.hE<gt>> で 0 より大きい値に"
6987 "定義される。 (B<sysconf>(3)  を参照すること。 )"
6988
6989 #. type: TP
6990 #: build/C/man2/msync.2:122 build/C/man7/shm_overview.7:46
6991 #, no-wrap
6992 msgid "B<mmap>(2)"
6993 msgstr "B<mmap>(2)"
6994
6995 #. type: TH
6996 #: build/C/man3/mtrace.3:25
6997 #, no-wrap
6998 msgid "MTRACE"
6999 msgstr "MTRACE"
7000
7001 #. type: Plain text
7002 #: build/C/man3/mtrace.3:28
7003 msgid "mtrace, muntrace - malloc tracing"
7004 msgstr "mtrace, muntrace - malloc のトレース"
7005
7006 #. type: Plain text
7007 #: build/C/man3/mtrace.3:30
7008 msgid "B<#include E<lt>mcheck.hE<gt>>"
7009 msgstr "B<#include E<lt>mcheck.hE<gt>>"
7010
7011 #. type: Plain text
7012 #: build/C/man3/mtrace.3:32
7013 msgid "B<void mtrace(void);>"
7014 msgstr "B<void mtrace(void);>"
7015
7016 #. type: Plain text
7017 #: build/C/man3/mtrace.3:34
7018 msgid "B<void muntrace(void);>"
7019 msgstr "B<void muntrace(void);>"
7020
7021 #. type: Plain text
7022 #: build/C/man3/mtrace.3:46
7023 msgid ""
7024 "The B<mtrace>()  function installs hook functions for the memory-allocation "
7025 "functions (B<malloc>(3), B<realloc>(3)  B<memalign>(3), B<free>(3)).  These "
7026 "hook functions record tracing information about memory allocation and "
7027 "deallocation.  The tracing information can be used to discover memory leaks "
7028 "and attempts to free nonallocated memory in a program."
7029 msgstr ""
7030
7031 #. type: Plain text
7032 #: build/C/man3/mtrace.3:57
7033 msgid ""
7034 "The B<muntrace>()  function disables the hook functions installed by "
7035 "B<mtrace>(), so that tracing information is no longer recorded for the "
7036 "memory-allocation functions.  If no hook functions were successfully "
7037 "installed by B<mtrace>(), B<muntrace>()  does nothing."
7038 msgstr ""
7039
7040 #. type: Plain text
7041 #: build/C/man3/mtrace.3:65
7042 msgid ""
7043 "When B<mtrace>()  is called, it checks the value of the environment variable "
7044 "B<MALLOC_TRACE>, which should contain the pathname of a file in which the "
7045 "tracing information is to be recorded.  If the pathname is successfully "
7046 "opened, it is truncated to zero length."
7047 msgstr ""
7048
7049 #. type: Plain text
7050 #: build/C/man3/mtrace.3:78
7051 msgid ""
7052 "If B<MALLOC_TRACE> is not set, or the pathname it specifies is invalid or "
7053 "not writable, then no hook functions are installed, and B<mtrace>()  has no "
7054 "effect.  In set-user-ID and set-group-ID programs, B<MALLOC_TRACE> is "
7055 "ignored, and B<mtrace>()  has no effect."
7056 msgstr ""
7057
7058 #. type: Plain text
7059 #: build/C/man3/mtrace.3:86
7060 msgid ""
7061 "In normal usage, B<mtrace>()  is called once at the start of execution of a "
7062 "program, and B<muntrace>()  is never called."
7063 msgstr ""
7064
7065 #. type: Plain text
7066 #: build/C/man3/mtrace.3:96
7067 msgid ""
7068 "The tracing output produced after a call to B<mtrace>()  is textual, but not "
7069 "designed to be human readable.  The GNU C library provides a Perl script, "
7070 "B<mtrace>(1), that interprets the trace log and produces human-readable "
7071 "output.  For best results, the traced program should be compiled with "
7072 "debugging enabled, so that line-number information is recorded in the "
7073 "executable."
7074 msgstr ""
7075
7076 #. type: Plain text
7077 #: build/C/man3/mtrace.3:102
7078 msgid ""
7079 "The tracing performed by B<mtrace>()  incurs a performance penalty (if "
7080 "B<MALLOC_TRACE> points to a valid, writable pathname)."
7081 msgstr ""
7082
7083 #. type: Plain text
7084 #: build/C/man3/mtrace.3:108
7085 msgid ""
7086 "The line-number information produced by B<mtrace>(1)  is not always precise: "
7087 "the line number references may refer to the previous or following (non-"
7088 "blank)  line of the source code."
7089 msgstr ""
7090
7091 #. type: Plain text
7092 #: build/C/man3/mtrace.3:115
7093 msgid ""
7094 "The shell session below demonstrates the use of the B<mtrace>()  function "
7095 "and the B<mtrace>(1)  command in a program that has memory leaks at two "
7096 "different locations.  The demonstration uses the following program:"
7097 msgstr ""
7098
7099 #. type: Plain text
7100 #: build/C/man3/mtrace.3:122
7101 #, no-wrap
7102 msgid ""
7103 "$ B<cat t_mtrace.c>\n"
7104 "#include E<lt>mcheck.hE<gt>\n"
7105 "#include E<lt>stdlib.hE<gt>\n"
7106 "#include E<lt>stdio.hE<gt>\n"
7107 msgstr ""
7108 "$ B<cat t_mtrace.c>\n"
7109 "#include E<lt>mcheck.hE<gt>\n"
7110 "#include E<lt>stdlib.hE<gt>\n"
7111 "#include E<lt>stdio.hE<gt>\n"
7112
7113 #. type: Plain text
7114 #: build/C/man3/mtrace.3:127
7115 #, no-wrap
7116 msgid ""
7117 "int\n"
7118 "main(int argc, char *argv[])\n"
7119 "{\n"
7120 "    int j;\n"
7121 msgstr ""
7122 "int\n"
7123 "main(int argc, char *argv[])\n"
7124 "{\n"
7125 "    int j;\n"
7126
7127 #. type: Plain text
7128 #: build/C/man3/mtrace.3:129
7129 #, no-wrap
7130 msgid "    mtrace();\n"
7131 msgstr "    mtrace();\n"
7132
7133 #. type: Plain text
7134 #: build/C/man3/mtrace.3:132
7135 #, no-wrap
7136 msgid ""
7137 "    for (j = 0; j E<lt> 2; j++)\n"
7138 "        malloc(100);            /* Never freed--a memory leak */\n"
7139 msgstr ""
7140 "    for (j = 0; j E<lt> 2; j++)\n"
7141 "        malloc(100);            /* Never freed--a memory leak */\n"
7142
7143 #. type: Plain text
7144 #: build/C/man3/mtrace.3:136
7145 #, no-wrap
7146 msgid ""
7147 "    calloc(16, 16);             /* Never freed--a memory leak */\n"
7148 "    exit(EXIT_SUCCESS);\n"
7149 "}\n"
7150 msgstr ""
7151 "    calloc(16, 16);             /* Never freed--a memory leak */\n"
7152 "    exit(EXIT_SUCCESS);\n"
7153 "}\n"
7154
7155 #. type: Plain text
7156 #: build/C/man3/mtrace.3:142
7157 msgid ""
7158 "When we run the program as follows, we see that B<mtrace>()  diagnosed "
7159 "memory leaks at two different locations in the program:"
7160 msgstr ""
7161
7162 #. type: Plain text
7163 #: build/C/man3/mtrace.3:155
7164 #, no-wrap
7165 msgid ""
7166 "$ B<cc -g t_mtrace.c -o t_mtrace>\n"
7167 "$ B<export MALLOC_TRACE=/tmp/t>\n"
7168 "$ B<./t_mtrace>\n"
7169 "$ B<mtrace ./t_mtrace $MALLOC_TRACE>\n"
7170 "Memory not freed:\n"
7171 "-----------------\n"
7172 "   Address     Size     Caller\n"
7173 "0x084c9378     0x64  at /home/cecilia/t_mtrace.c:12\n"
7174 "0x084c93e0     0x64  at /home/cecilia/t_mtrace.c:12\n"
7175 "0x084c9448    0x100  at /home/cecilia/t_mtrace.c:16\n"
7176 msgstr ""
7177 "$ B<cc -g t_mtrace.c -o t_mtrace>\n"
7178 "$ B<export MALLOC_TRACE=/tmp/t>\n"
7179 "$ B<./t_mtrace>\n"
7180 "$ B<mtrace ./t_mtrace $MALLOC_TRACE>\n"
7181 "Memory not freed:\n"
7182 "-----------------\n"
7183 "   Address     Size     Caller\n"
7184 "0x084c9378     0x64  at /home/cecilia/t_mtrace.c:12\n"
7185 "0x084c93e0     0x64  at /home/cecilia/t_mtrace.c:12\n"
7186 "0x084c9448    0x100  at /home/cecilia/t_mtrace.c:16\n"
7187
7188 #. type: Plain text
7189 #: build/C/man3/mtrace.3:167
7190 msgid ""
7191 "The first two messages about unfreed memory correspond to the two B<malloc>"
7192 "(3)  calls inside the I<for> loop.  The final message corresponds to the "
7193 "call to B<calloc>(3)  (which in turn calls B<malloc>(3))."
7194 msgstr ""
7195
7196 #. type: Plain text
7197 #: build/C/man3/mtrace.3:172
7198 msgid "B<mtrace>(1), B<malloc>(3), B<malloc_hook>(3), B<mcheck>(3)"
7199 msgstr "B<mtrace>(1), B<malloc>(3), B<malloc_hook>(3), B<mcheck>(3)"
7200
7201 #. type: TH
7202 #: build/C/man2/posix_fadvise.2:28
7203 #, no-wrap
7204 msgid "POSIX_FADVISE"
7205 msgstr "POSIX_FADVISE"
7206
7207 #. type: TH
7208 #: build/C/man2/posix_fadvise.2:28 build/C/man2/readahead.2:28
7209 #: build/C/man2/sync_file_range.2:30
7210 #, no-wrap
7211 msgid "2013-04-01"
7212 msgstr "2013-04-01"
7213
7214 #. type: Plain text
7215 #: build/C/man2/posix_fadvise.2:31
7216 msgid "posix_fadvise - predeclare an access pattern for file data"
7217 msgstr "posix_fadvise - ファイルデータのアクセスパターンをあらかじめ宣言する"
7218
7219 #. type: Plain text
7220 #: build/C/man2/posix_fadvise.2:34 build/C/man3/posix_fallocate.3:31
7221 #, no-wrap
7222 msgid "B<#include E<lt>fcntl.hE<gt>>\n"
7223 msgstr "B<#include E<lt>fcntl.hE<gt>>\n"
7224
7225 #. type: Plain text
7226 #: build/C/man2/posix_fadvise.2:37
7227 #, no-wrap
7228 msgid "B<int posix_fadvise(int >I<fd>B<, off_t >I<offset>B<, off_t >I<len>B<, int >I<advice>B<);>\n"
7229 msgstr "B<int posix_fadvise(int >I<fd>B<, off_t >I<offset>B<, off_t >I<len>B<, int >I<advice>B<);>\n"
7230
7231 #. type: Plain text
7232 #: build/C/man2/posix_fadvise.2:46
7233 msgid "B<posix_fadvise>():"
7234 msgstr "B<posix_fadvise>():"
7235
7236 #. type: Plain text
7237 #: build/C/man2/posix_fadvise.2:48 build/C/man3/posix_fallocate.3:44
7238 msgid "_XOPEN_SOURCE\\ E<gt>=\\ 600 || _POSIX_C_SOURCE\\ E<gt>=\\ 200112L"
7239 msgstr "_XOPEN_SOURCE\\ E<gt>=\\ 600 || _POSIX_C_SOURCE\\ E<gt>=\\ 200112L"
7240
7241 #. type: Plain text
7242 #: build/C/man2/posix_fadvise.2:56
7243 msgid ""
7244 "Programs can use B<posix_fadvise>()  to announce an intention to access file "
7245 "data in a specific pattern in the future, thus allowing the kernel to "
7246 "perform appropriate optimizations."
7247 msgstr ""
7248 "プログラムは、将来特定のパターンでファイルデータに アクセスする意思を伝えるた"
7249 "めに B<posix_fadvise>()  を使うことができる。 これにより、カーネルが適切な最"
7250 "適化を実行することが可能になる。"
7251
7252 #. type: Plain text
7253 #: build/C/man2/posix_fadvise.2:63
7254 msgid ""
7255 "The I<advice> applies to a (not necessarily existent) region starting at "
7256 "I<offset> and extending for I<len> bytes (or until the end of the file if "
7257 "I<len> is 0) within the file referred to by I<fd>.  The I<advice> is not "
7258 "binding; it merely constitutes an expectation on behalf of the application."
7259 msgstr ""
7260 "I<advice> は I<fd> が参照しているファイルの I<offset> から始まる I<len> バ"
7261 "イ\n"
7262 "トの範囲内 (I<len> が 0 の場合はファイルの終りまで) の (必ずしも存在しない)\n"
7263 "領域に適用される。 I<advice> は義務づけではない。 I<advice> は単にアプリ"
7264 "ケー\n"
7265 "ションのために可能性を構成するだけである。"
7266
7267 #. type: Plain text
7268 #: build/C/man2/posix_fadvise.2:65
7269 msgid "Permissible values for I<advice> include:"
7270 msgstr "I<advice> に許される値には、以下のものが含まれる:"
7271
7272 #. type: TP
7273 #: build/C/man2/posix_fadvise.2:65
7274 #, no-wrap
7275 msgid "B<POSIX_FADV_NORMAL>"
7276 msgstr "B<POSIX_FADV_NORMAL>"
7277
7278 #. type: Plain text
7279 #: build/C/man2/posix_fadvise.2:71
7280 msgid ""
7281 "Indicates that the application has no advice to give about its access "
7282 "pattern for the specified data.  If no advice is given for an open file, "
7283 "this is the default assumption."
7284 msgstr ""
7285 "指定されたデータのアクセスパターンを指示するアドバイスを アプリケーションが何"
7286 "も持っていないことを示す。 オープンされたファイルにアドバイスが指定されない場"
7287 "合、 これがデフォルトで仮定される。"
7288
7289 #. type: TP
7290 #: build/C/man2/posix_fadvise.2:71
7291 #, no-wrap
7292 msgid "B<POSIX_FADV_SEQUENTIAL>"
7293 msgstr "B<POSIX_FADV_SEQUENTIAL>"
7294
7295 #. type: Plain text
7296 #: build/C/man2/posix_fadvise.2:75
7297 msgid ""
7298 "The application expects to access the specified data sequentially (with "
7299 "lower offsets read before higher ones)."
7300 msgstr ""
7301 "アプリケーションは指定されたデータがシーケンシャルに (大きなオフセットの前に"
7302 "小さなオフセットのデータを読むように)  アクセスされることを期待する。"
7303
7304 #. type: TP
7305 #: build/C/man2/posix_fadvise.2:75
7306 #, no-wrap
7307 msgid "B<POSIX_FADV_RANDOM>"
7308 msgstr "B<POSIX_FADV_RANDOM>"
7309
7310 #. type: Plain text
7311 #: build/C/man2/posix_fadvise.2:78
7312 msgid "The specified data will be accessed in random order."
7313 msgstr "指定されたデータがランダムな順番でアクセスされる。"
7314
7315 #. type: TP
7316 #: build/C/man2/posix_fadvise.2:78
7317 #, no-wrap
7318 msgid "B<POSIX_FADV_NOREUSE>"
7319 msgstr "B<POSIX_FADV_NOREUSE>"
7320
7321 #. type: Plain text
7322 #: build/C/man2/posix_fadvise.2:81
7323 msgid "The specified data will be accessed only once."
7324 msgstr "指定されたデータは 1 度しかアクセスされない。"
7325
7326 #. type: TP
7327 #: build/C/man2/posix_fadvise.2:81
7328 #, no-wrap
7329 msgid "B<POSIX_FADV_WILLNEED>"
7330 msgstr "B<POSIX_FADV_WILLNEED>"
7331
7332 #. type: Plain text
7333 #: build/C/man2/posix_fadvise.2:84
7334 msgid "The specified data will be accessed in the near future."
7335 msgstr "指定されたデータは近い将来アクセスされる。"
7336
7337 #. type: TP
7338 #: build/C/man2/posix_fadvise.2:84
7339 #, no-wrap
7340 msgid "B<POSIX_FADV_DONTNEED>"
7341 msgstr "B<POSIX_FADV_DONTNEED>"
7342
7343 #. type: Plain text
7344 #: build/C/man2/posix_fadvise.2:87
7345 msgid "The specified data will not be accessed in the near future."
7346 msgstr "指定されたデータは近い将来アクセスされない。"
7347
7348 #. type: Plain text
7349 #: build/C/man2/posix_fadvise.2:90
7350 msgid "On success, zero is returned.  On error, an error number is returned."
7351 msgstr "成功した場合は 0 が返される。 失敗した場合はエラー番号が返される。"
7352
7353 #. type: Plain text
7354 #: build/C/man2/posix_fadvise.2:94
7355 msgid "The I<fd> argument was not a valid file descriptor."
7356 msgstr "I<fd> 引き数が有効なファイルディスクリプタでない。"
7357
7358 #. type: Plain text
7359 #: build/C/man2/posix_fadvise.2:97
7360 msgid "An invalid value was specified for I<advice>."
7361 msgstr "無効な値が I<advice> に指定された。"
7362
7363 #. type: Plain text
7364 #: build/C/man2/posix_fadvise.2:104
7365 msgid ""
7366 "The specified file descriptor refers to a pipe or FIFO.  (Linux actually "
7367 "returns B<EINVAL> in this case.)"
7368 msgstr ""
7369 "指定されたファイルディスクリプタがパイプまたは FIFO を参照している (この場"
7370 "合、Linux は実際には B<EINVAL> を返す)。"
7371
7372 #.  of fadvise64_64()
7373 #. type: Plain text
7374 #: build/C/man2/posix_fadvise.2:112
7375 msgid ""
7376 "Kernel support first appeared in Linux 2.5.60; the underlying system call is "
7377 "called B<fadvise64>().  Library support has been provided since glibc "
7378 "version 2.2, via the wrapper function B<posix_fadvise>()."
7379 msgstr ""
7380 "カーネルによるサポートは Linux 2.5.60 で最初に登場し、\n"
7381 "対応するシステムコールは B<fadvise64>() という名前である。\n"
7382 "ライブラリによるサポートは glibc バージョン 2.2 以降で提供されており、\n"
7383 "ラッパー関数は B<posix_fadvise>() という名前である。"
7384
7385 #. type: Plain text
7386 #: build/C/man2/posix_fadvise.2:121
7387 msgid ""
7388 "POSIX.1-2001.  Note that the type of the I<len> argument was changed from "
7389 "I<size_t> to I<off_t> in POSIX.1-2003 TC1."
7390 msgstr ""
7391 "POSIX.1-2001.  I<len> 引き数の型が POSIX.1-2003 TC1 において I<size_t> から "
7392 "I<off_t> に変更された点に注意すること。"
7393
7394 #. type: Plain text
7395 #: build/C/man2/posix_fadvise.2:127
7396 msgid ""
7397 "Under Linux, B<POSIX_FADV_NORMAL> sets the readahead window to the default "
7398 "size for the backing device; B<POSIX_FADV_SEQUENTIAL> doubles this size, and "
7399 "B<POSIX_FADV_RANDOM> disables file readahead entirely.  These changes affect "
7400 "the entire file, not just the specified region (but other open file handles "
7401 "to the same file are unaffected)."
7402 msgstr ""
7403 "Linux では、B<POSIX_FADV_NORMAL> はバッキングデバイスの デフォルトサイズに先"
7404 "読み (readahead) ウインドウを設定する。 B<POSIX_FADV_SEQUENTIAL> はこのサイズ"
7405 "を 2 倍し、 B<POSIX_FADV_RANDOM> は先読みを全く無効にする。 これらの変更は"
7406 "ファイル全体に影響し、指定された領域のみに影響するわけではない (しかし同じ"
7407 "ファイルに対する他のオープンファイルハンドルは影響を受けない)。"
7408
7409 #. type: Plain text
7410 #: build/C/man2/posix_fadvise.2:134
7411 msgid ""
7412 "B<POSIX_FADV_WILLNEED> initiates a nonblocking read of the specified region "
7413 "into the page cache.  The amount of data read may be decreased by the kernel "
7414 "depending on virtual memory load.  (A few megabytes will usually be fully "
7415 "satisfied, and more is rarely useful.)"
7416 msgstr ""
7417 "B<POSIX_FADV_WILLNEED> は、 ページキャッシュに指定領域のブロックされない読み"
7418 "込みを開始する。 読み込まれるデータの総量は、 仮想メモリの負荷に依ってカーネ"
7419 "ルが減らすかもしれない (数メガバイトであれば通常は全く十分であり、 それより多"
7420 "くてもめったに役に立たない)。"
7421
7422 #. type: Plain text
7423 #: build/C/man2/posix_fadvise.2:138
7424 msgid ""
7425 "In kernels before 2.6.18, B<POSIX_FADV_NOREUSE> had the same semantics as "
7426 "B<POSIX_FADV_WILLNEED>.  This was probably a bug; since kernel 2.6.18, this "
7427 "flag is a no-op."
7428 msgstr ""
7429 "2.6.18 より前のカーネルでは、B<POSIX_FADV_NOREUSE> は B<POSIX_FADV_WILLNEED> "
7430 "と同じ意味であった。 これは多分バグであった。 カーネル 2.6.18 以降では、この"
7431 "フラグは何も行わない。"
7432
7433 #. type: Plain text
7434 #: build/C/man2/posix_fadvise.2:146
7435 msgid ""
7436 "B<POSIX_FADV_DONTNEED> attempts to free cached pages associated with the "
7437 "specified region.  This is useful, for example, while streaming large "
7438 "files.  A program may periodically request the kernel to free cached data "
7439 "that has already been used, so that more useful cached pages are not "
7440 "discarded instead."
7441 msgstr ""
7442 "B<POSIX_FADV_DONTNEED> は指定された領域に関連付けられた キャッシュページを解"
7443 "放しようとする。 例えば、これは大きなファイルをストリーミングするときに役立"
7444 "つ。 プログラムは、使用済みのキャッシュされたデータを解放するように、 定期的"
7445 "にカーネルに要求するかもしれない。 そうすることにより、さらに有効なキャッシュ"
7446 "されたページが、 代わりに破棄されることはない。"
7447
7448 #. type: Plain text
7449 #: build/C/man2/posix_fadvise.2:154
7450 msgid ""
7451 "Pages that have not yet been written out will be unaffected, so if the "
7452 "application wishes to guarantee that pages will be released, it should call "
7453 "B<fsync>(2)  or B<fdatasync>(2)  first."
7454 msgstr ""
7455 "まだ書き出されていないページは影響を受けないので、 そのページの解放が保証され"
7456 "ることをアプリケーションが望んでいるなら、 最初に B<fsync>(2)  または "
7457 "B<fdatasync>(2)  を呼ぶべきである。"
7458
7459 #. type: SS
7460 #: build/C/man2/posix_fadvise.2:154
7461 #, no-wrap
7462 msgid "Architecture-specific variants"
7463 msgstr "アーキテクチャ固有の派生バージョン"
7464
7465 #. type: Plain text
7466 #: build/C/man2/posix_fadvise.2:171
7467 msgid ""
7468 "Some architectures require 64-bit arguments to be aligned in a suitable pair "
7469 "of registers (see B<syscall>(2)  for further detail).  On such "
7470 "architectures, the call signature of B<posix_fadvise>()  shown in the "
7471 "SYNOPSIS would force a register to be wasted as padding between the I<fd> "
7472 "and I<len> arguments.  Therefore, these architectures define a version of "
7473 "the system call that orders the arguments suitably, but otherwise is "
7474 "otherwise exactly the same as B<posix_fadvise>()."
7475 msgstr ""
7476 "いくつかのアーキテクチャでは、 64 ビットの引き数は適切なレジスタの組に割り当"
7477 "てる必要がある (B<syscall>(2) 参照)。 このようなアーキテクチャでは、 「書式」"
7478 "に書かれている  B<posix_fadvise>() の呼び出しシグネチャーで、 引き数 I<fd> "
7479 "と I<offset> の間のパディング (詰めもの) でレジスタが一つ消費されてしまう。 "
7480 "そのため、 これらのアーキテクチャでは引き数が適切な順序になった別のシステム"
7481 "コールが定義されているが、 それ以外は B<posix_fadvise>() と全く同じである。"
7482
7483 #. type: Plain text
7484 #: build/C/man2/posix_fadvise.2:173
7485 msgid "For example, since Linux 2.6.14, ARM has the following system call:"
7486 msgstr ""
7487 "例えば、 Linux 2.6.14 以降では、 ARM には以下のシステムコールが存在する。"
7488
7489 #. type: Plain text
7490 #: build/C/man2/posix_fadvise.2:178
7491 #, no-wrap
7492 msgid ""
7493 "B<long arm_fadvise64_64(int >I<fd>B<, int >I<advice>B<,>\n"
7494 "B<                      loff_t >I<offset>B<, loff_t >I<len>B<);>\n"
7495 msgstr ""
7496 "B<long arm_fadvise64_64(int >I<fd>B<, int >I<advice>B<,>\n"
7497 "B<                      loff_t >I<offset>B<, loff_t >I<len>B<);>\n"
7498
7499 #. type: Plain text
7500 #: build/C/man2/posix_fadvise.2:186
7501 msgid ""
7502 "These architecture-specific details are generally hidden from applications "
7503 "by the glibc B<posix_fadvise>()  wrapper function, which invokes the "
7504 "appropriate architecture-specific system call."
7505 msgstr ""
7506 "通常、 glibc の B<posix_fadvise>() ラッパー関数により、 これらのアーキテク"
7507 "チャ固有の詳細はアプリケーションには見えない。 glibc のラッパー関数では、適切"
7508 "なアーキテクチャ固有のシステムコールが呼び出される。"
7509
7510 #. type: Plain text
7511 #: build/C/man2/posix_fadvise.2:191
7512 msgid ""
7513 "In kernels before 2.6.6, if I<len> was specified as 0, then this was "
7514 "interpreted literally as \"zero bytes\", rather than as meaning \"all bytes "
7515 "through to the end of the file\"."
7516 msgstr ""
7517 "2.6.6 より前のカーネルでは、 I<len> に 0 が指定された場合、 「ファイルの終り"
7518 "までの全てのバイト」という意味ではなく、 文字通り「0 バイト」として解釈されて"
7519 "いた。"
7520
7521 #.  FIXME . Write a posix_fadvise(3) page.
7522 #. type: Plain text
7523 #: build/C/man2/posix_fadvise.2:197
7524 msgid ""
7525 "B<readahead>(2), B<sync_file_range>(2), B<posix_fallocate>(3), "
7526 "B<posix_madvise>(3)"
7527 msgstr ""
7528 "B<readahead>(2), B<sync_file_range>(2), B<posix_fallocate>(3),\n"
7529 "B<posix_madvise>(3)"
7530
7531 #. type: TH
7532 #: build/C/man3/posix_fallocate.3:25
7533 #, no-wrap
7534 msgid "POSIX_FALLOCATE"
7535 msgstr "POSIX_FALLOCATE"
7536
7537 #. type: TH
7538 #: build/C/man3/posix_fallocate.3:25 build/C/man2/shmop.2:41
7539 #, no-wrap
7540 msgid "2013-02-12"
7541 msgstr "2013-02-12"
7542
7543 #. type: Plain text
7544 #: build/C/man3/posix_fallocate.3:28
7545 msgid "posix_fallocate - allocate file space"
7546 msgstr "posix_fallocate - ファイルのスペースを確保する"
7547
7548 #. type: Plain text
7549 #: build/C/man3/posix_fallocate.3:33
7550 #, no-wrap
7551 msgid "B<int posix_fallocate(int >I<fd>B<, off_t >I<offset>B<, off_t >I<len>B<);>\n"
7552 msgstr "B<int posix_fallocate(int >I<fd>B<, off_t >I<offset>B<, off_t >I<len>B<);>\n"
7553
7554 #. type: Plain text
7555 #: build/C/man3/posix_fallocate.3:42
7556 msgid "B<posix_fallocate>():"
7557 msgstr "B<posix_fallocate>():"
7558
7559 #. type: Plain text
7560 #: build/C/man3/posix_fallocate.3:61
7561 msgid ""
7562 "The function B<posix_fallocate>()  ensures that disk space is allocated for "
7563 "the file referred to by the descriptor I<fd> for the bytes in the range "
7564 "starting at I<offset> and continuing for I<len> bytes.  After a successful "
7565 "call to B<posix_fallocate>(), subsequent writes to bytes in the specified "
7566 "range are guaranteed not to fail because of lack of disk space."
7567 msgstr ""
7568 "関数 B<posix_fallocate>()  は、ディスクリプタ I<fd> で参照されるファイルに対"
7569 "して、ディスクスペースを確実に確保する。 ディスクスペースは I<offset> から始"
7570 "まる I<len> バイトの範囲のバイトである。 B<posix_fallocate>()  の呼び出しが成"
7571 "功した後、指定された範囲のバイトに対する書き込みは、 ディスクスペースの不足で"
7572 "失敗しないことが保証される。"
7573
7574 #. type: Plain text
7575 #: build/C/man3/posix_fallocate.3:66
7576 msgid ""
7577 "If the size of the file is less than I<offset>+I<len>, then the file is "
7578 "increased to this size; otherwise the file size is left unchanged."
7579 msgstr ""
7580 "ファイルのサイズが I<offset>+I<len> より小さい場合、ファイルはこのサイズにな"
7581 "るように拡大される。 それ以外の場合、ファイルサイズは変わらない。"
7582
7583 #. type: Plain text
7584 #: build/C/man3/posix_fallocate.3:72
7585 msgid ""
7586 "B<posix_fallocate>()  returns zero on success, or an error number on "
7587 "failure.  Note that I<errno> is not set."
7588 msgstr ""
7589 "B<posix_fallocate>()  は成功した場合、0 を返す。 失敗した場合、エラー番号を返"
7590 "す。 I<errno> が設定されない点に注意すること。"
7591
7592 #. type: Plain text
7593 #: build/C/man3/posix_fallocate.3:81
7594 msgid "I<offset+len> exceeds the maximum file size."
7595 msgstr "I<offset+len> が最大ファイルサイズを超えている。"
7596
7597 #. type: Plain text
7598 #: build/C/man3/posix_fallocate.3:91
7599 msgid "I<fd> does not refer to a regular file."
7600 msgstr "I<fd> が通常のファイルとして参照されていない。"
7601
7602 #. type: Plain text
7603 #: build/C/man3/posix_fallocate.3:100
7604 msgid "I<fd> refers to a pipe."
7605 msgstr "I<fd> がパイプを参照している。"
7606
7607 #. type: Plain text
7608 #: build/C/man3/posix_fallocate.3:103
7609 msgid "B<posix_fallocate>()  is available since glibc 2.1.94."
7610 msgstr "B<posix_fallocate>()  は glibc 2.1.94 以降で利用可能である。"
7611
7612 #. type: Plain text
7613 #: build/C/man3/posix_fallocate.3:128
7614 msgid ""
7615 "POSIX.1-2008 says that an implementation I<shall> give the B<EINVAL> error "
7616 "if I<len> was 0, or I<offset> was less than 0.  POSIX.1-2001 says that an "
7617 "implementation I<shall> give the B<EINVAL> error if I<len> is less than 0, "
7618 "or I<offset> was less than 0, and I<may> give the error if I<len> equals "
7619 "zero."
7620 msgstr ""
7621 "POSIX.1-2008 では、 I<len> が 0 の場合、もしくは I<offset> が 0 未満の場合、 "
7622 "B<EINVAL> エラーを返すものとされている。 POSIX.1-2001 では、 I<len> が 0 未満"
7623 "の場合、もしくは I<offset> が 0 未満の場合、 B<EINVAL> エラーを返すものとされ"
7624 "ている。また、 I<len> が 0 の場合、 B<EINVAL> エラーを返してもよいとされてい"
7625 "る。"
7626
7627 #. type: Plain text
7628 #: build/C/man3/posix_fallocate.3:133
7629 msgid "B<fallocate>(1), B<fallocate>(2), B<lseek>(2), B<posix_fadvise>(2)"
7630 msgstr "B<fallocate>(1), B<fallocate>(2), B<lseek>(2), B<posix_fadvise>(2)"
7631
7632 #. type: TH
7633 #: build/C/man3/posix_memalign.3:29
7634 #, no-wrap
7635 msgid "POSIX_MEMALIGN"
7636 msgstr "POSIX_MEMALIGN"
7637
7638 #. type: TH
7639 #: build/C/man3/posix_memalign.3:29
7640 #, fuzzy, no-wrap
7641 #| msgid "2013-05-12"
7642 msgid "2013-09-02"
7643 msgstr "2013-05-12"
7644
7645 #. type: Plain text
7646 #: build/C/man3/posix_memalign.3:32
7647 msgid ""
7648 "posix_memalign, aligned_alloc, memalign, valloc, pvalloc - allocate aligned "
7649 "memory"
7650 msgstr ""
7651 "posix_memalign, aligned_alloc, memalign, valloc, pvalloc - アラインメント\n"
7652 "されたメモリの割り当てを行う"
7653
7654 #. type: Plain text
7655 #: build/C/man3/posix_memalign.3:39
7656 #, no-wrap
7657 msgid ""
7658 "B<int posix_memalign(void **>I<memptr>B<, size_t >I<alignment>B<, size_t >I<size>B<);>\n"
7659 "B<void *aligned_alloc(size_t >I<alignment>B<, size_t >I<size>B<);>\n"
7660 "B<void *valloc(size_t >I<size>B<);>\n"
7661 msgstr ""
7662 "B<int posix_memalign(void **>I<memptr>B<, size_t >I<alignment>B<, size_t >I<size>B<);>\n"
7663 "B<void *aligned_alloc(size_t >I<alignment>B<, size_t >I<size>B<);>\n"
7664 "B<void *valloc(size_t >I<size>B<);>\n"
7665
7666 #. type: Plain text
7667 #: build/C/man3/posix_memalign.3:44
7668 #, no-wrap
7669 msgid ""
7670 "B<void *memalign(size_t >I<alignment>B<, size_t >I<size>B<);>\n"
7671 "B<void *pvalloc(size_t >I<size>B<);>\n"
7672 msgstr ""
7673 "B<void *memalign(size_t >I<alignment>B<, size_t >I<size>B<);>\n"
7674 "B<void *pvalloc(size_t >I<size>B<);>\n"
7675
7676 #. type: Plain text
7677 #: build/C/man3/posix_memalign.3:54
7678 msgid ""
7679 "B<posix_memalign>(): _POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ "
7680 "E<gt>=\\ 600"
7681 msgstr ""
7682 "B<posix_memalign>(): _POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ "
7683 "E<gt>=\\ 600"
7684
7685 #. type: Plain text
7686 #: build/C/man3/posix_memalign.3:57
7687 msgid "B<aligned_alloc>(): _ISOC11_SOURCE"
7688 msgstr "B<aligned_alloc>(): _ISOC11_SOURCE"
7689
7690 #. type: Plain text
7691 #: build/C/man3/posix_memalign.3:59
7692 msgid "B<valloc>():"
7693 msgstr "B<valloc>():"
7694
7695 #. type: TP
7696 #: build/C/man3/posix_memalign.3:62
7697 #, no-wrap
7698 msgid "Since glibc 2.12:"
7699 msgstr "glibc 2.12 以降:"
7700
7701 #. type: Plain text
7702 #: build/C/man3/posix_memalign.3:69
7703 #, no-wrap
7704 msgid ""
7705 "_BSD_SOURCE ||\n"
7706 "    (_XOPEN_SOURCE\\ E<gt>=\\ 500 ||\n"
7707 "        _XOPEN_SOURCE\\ &&\\ _XOPEN_SOURCE_EXTENDED) &&\n"
7708 "    !(_POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ E<gt>=\\ 600)\n"
7709 msgstr ""
7710 "_BSD_SOURCE ||\n"
7711 "    (_XOPEN_SOURCE\\ E<gt>=\\ 500 ||\n"
7712 "        _XOPEN_SOURCE\\ &&\\ _XOPEN_SOURCE_EXTENDED) &&\n"
7713 "    !(_POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ E<gt>=\\ 600)\n"
7714
7715 #. type: TP
7716 #: build/C/man3/posix_memalign.3:71
7717 #, no-wrap
7718 msgid "Before glibc 2.12:"
7719 msgstr "glibc 2.12 より前:"
7720
7721 #. type: Plain text
7722 #: build/C/man3/posix_memalign.3:75
7723 msgid ""
7724 "_BSD_SOURCE || _XOPEN_SOURCE\\ E<gt>=\\ 500 || _XOPEN_SOURCE\\ &&\\ "
7725 "_XOPEN_SOURCE_EXTENDED"
7726 msgstr ""
7727 "_BSD_SOURCE || _XOPEN_SOURCE\\ E<gt>=\\ 500 || _XOPEN_SOURCE\\ &&\\ "
7728 "_XOPEN_SOURCE_EXTENDED"
7729
7730 #. type: Plain text
7731 #: build/C/man3/posix_memalign.3:82
7732 msgid ""
7733 "(The (nonstandard) header file I<E<lt>malloc.hE<gt>> also exposes the "
7734 "declaration of B<valloc>(); no feature test macros are required.)"
7735 msgstr ""
7736 "((非標準の) ヘッダファイル I<E<lt>malloc.hE<gt>> も\n"
7737 "B<valloc>() の宣言も公開する。機能検査マクロは不要である。"
7738
7739 #.  glibc does this:
7740 #. type: Plain text
7741 #: build/C/man3/posix_memalign.3:104
7742 #, fuzzy
7743 #| msgid ""
7744 #| "The function B<posix_memalign>()  allocates I<size> bytes and places the "
7745 #| "address of the allocated memory in I<*memptr>.  The address of the "
7746 #| "allocated memory will be a multiple of I<alignment>, which must be a "
7747 #| "power of two and a multiple of I<sizeof(void\\ *)>.  If I<size> is 0, "
7748 #| "then B<posix_memalign>()  returns either NULL, or a unique pointer value "
7749 #| "that can later be successfully passed to B<free>(3)."
7750 msgid ""
7751 "The function B<posix_memalign>()  allocates I<size> bytes and places the "
7752 "address of the allocated memory in I<*memptr>.  The address of the allocated "
7753 "memory will be a multiple of I<alignment>, which must be a power of two and "
7754 "a multiple of I<sizeof(void\\ *)>.  If I<size> is 0, then the value placed "
7755 "in I<*memptr> is either NULL, or a unique pointer value that can later be "
7756 "successfully passed to B<free>(3)."
7757 msgstr ""
7758 "関数 B<posix_memalign>()  は、 I<size> バイトのメモリを割り当て、割り当てられ"
7759 "たメモリのアドレスを I<*memptr> に設定する。 割り当てられたメモリのアドレス"
7760 "は I<alignment> の倍数になっているはずである。 I<alignment> は 2 のべき乗で、"
7761 "かつ I<sizeof(void\\ *)> の倍数でなければならない。 I<size> が 0 の場合、 "
7762 "B<posix_memalign>()  は NULL か一意なポインタ値を返す。 このポインタ値は、後"
7763 "で B<free>(3)  に問題なく渡すことができる。"
7764
7765 #.  The behavior of memalign() for size==0 is as for posix_memalign()
7766 #.  but no standards govern this.
7767 #. type: Plain text
7768 #: build/C/man3/posix_memalign.3:115
7769 msgid ""
7770 "The obsolete function B<memalign>()  allocates I<size> bytes and returns a "
7771 "pointer to the allocated memory.  The memory address will be a multiple of "
7772 "I<alignment>, which must be a power of two."
7773 msgstr ""
7774 "廃止された関数である B<memalign>() は、 I<size> バイトのメモリを割り当て、\n"
7775 "割り当てられたメモリへのポインタを返す。 メモリのアドレスは I<alignment> \n"
7776 "の倍数になっているはずである。 I<alignment> は 2 のべき乗でなければならない。"
7777
7778 #. type: Plain text
7779 #: build/C/man3/posix_memalign.3:124
7780 msgid ""
7781 "The function B<aligned_alloc>()  is the same as B<memalign>(), except for "
7782 "the added restriction that I<size> should be a multiple of I<alignment>."
7783 msgstr ""
7784 "関数 B<aligned_alloc>() は B<memalign>() と同じだが、I<size> が "
7785 "I<alignment>\n"
7786 "の倍数でなければならないという追加の制限がある点が異なる。"
7787
7788 #. type: Plain text
7789 #: build/C/man3/posix_memalign.3:133
7790 msgid ""
7791 "The obsolete function B<valloc>()  allocates I<size> bytes and returns a "
7792 "pointer to the allocated memory.  The memory address will be a multiple of "
7793 "the page size.  It is equivalent to I<memalign(sysconf(_SC_PAGESIZE),size)>."
7794 msgstr ""
7795 "廃止された関数である B<valloc>()  は I<size> バイトのメモリを割り当て、割り当"
7796 "てられたメモリへのポインタを返す。 メモリのアドレスはページサイズの倍数になっ"
7797 "ているはずである。 これは I<memalign(sysconf(_SC_PAGESIZE),size)> と等価であ"
7798 "る。"
7799
7800 #. type: Plain text
7801 #: build/C/man3/posix_memalign.3:140
7802 msgid ""
7803 "The obsolete function B<pvalloc>()  is similar to B<valloc>(), but rounds "
7804 "the size of the allocation up to the next multiple of the system page size."
7805 msgstr ""
7806 "廃止された関数 B<pvalloc>() は B<valloc>() と同様だが、\n"
7807 "割り当てられるサイズがシステムのページサイズの倍数に切り上げられる。"
7808
7809 #. type: Plain text
7810 #: build/C/man3/posix_memalign.3:142
7811 msgid "For all of these functions, the memory is not zeroed."
7812 msgstr "これらの関数はいずれもメモリのゼロクリアを行わない。"
7813
7814 #. type: Plain text
7815 #: build/C/man3/posix_memalign.3:149
7816 msgid ""
7817 "B<aligned_alloc>(), B<memalign>(), B<valloc>(), and B<pvalloc>()  return a "
7818 "pointer to the allocated memory, or NULL if the request fails."
7819 msgstr ""
7820 "B<aligned_alloc>(), B<memalign>(), B<valloc>(), B<pvalloc>() は割り当てられ"
7821 "た\n"
7822 "メモリへのポインタを返す。 割り当てに失敗した場合は NULL を返す。"
7823
7824 #. type: Plain text
7825 #: build/C/man3/posix_memalign.3:157
7826 #, fuzzy
7827 #| msgid ""
7828 #| "B<posix_memalign>()  returns zero on success, or one of the error values "
7829 #| "listed in the next section on failure.  Note that I<errno> is not set."
7830 msgid ""
7831 "B<posix_memalign>()  returns zero on success, or one of the error values "
7832 "listed in the next section on failure.  The value of I<errno> is "
7833 "indeterminate after a call to B<posix_memalign>()."
7834 msgstr ""
7835 "B<posix_memalign>()  は成功した場合は 0 を返し、 失敗した場合は次のセクション"
7836 "に記載されたエラー値のいずれかを返す。 I<errno> はセットされないことに注意す"
7837 "ること。"
7838
7839 #. type: Plain text
7840 #: build/C/man3/posix_memalign.3:164
7841 msgid ""
7842 "The I<alignment> argument was not a power of two, or was not a multiple of "
7843 "I<sizeof(void\\ *)>."
7844 msgstr ""
7845 "I<alignment> 引き数が 2 のべき乗でなかったか、 I<sizeof(void\\ *)> の倍数でな"
7846 "かった。"
7847
7848 #. type: Plain text
7849 #: build/C/man3/posix_memalign.3:167
7850 msgid "There was insufficient memory to fulfill the allocation request."
7851 msgstr "割り当て要求を満たすのに十分なメモリがなかった。"
7852
7853 #. type: Plain text
7854 #: build/C/man3/posix_memalign.3:174
7855 msgid ""
7856 "The functions B<memalign>(), B<valloc>(), and B<pvalloc>()  have been "
7857 "available in all Linux libc libraries."
7858 msgstr ""
7859 "関数 B<memalign>(), B<valloc>(), B<pvalloc>() は\n"
7860 "すべての Linux libc ライブラリで使用可能である。"
7861
7862 #. type: Plain text
7863 #: build/C/man3/posix_memalign.3:178
7864 msgid "The function B<aligned_alloc>()  was added to glibc in version 2.16."
7865 msgstr "関数 B<aligned_alloc>() は glibc バージョン 2.16 で追加された。"
7866
7867 #. type: Plain text
7868 #: build/C/man3/posix_memalign.3:182
7869 msgid "The function B<posix_memalign>()  is available since glibc 2.1.91."
7870 msgstr "関数 B<posix_fallocate>() は glibc 2.1.91 以降で利用可能である。"
7871
7872 #. type: Plain text
7873 #: build/C/man3/posix_memalign.3:189
7874 msgid ""
7875 "The function B<valloc>()  appeared in 3.0BSD.  It is documented as being "
7876 "obsolete in 4.3BSD, and as legacy in SUSv2.  It does not appear in "
7877 "POSIX.1-2001."
7878 msgstr ""
7879 "関数 B<valloc>() は 3.0BSD で登場した。4.3BSD では廃止されたと記載されてお"
7880 "り、\n"
7881 "SUSv2 では過去の名残だと記載されている。 POSIX.1-2001 には存在しない。"
7882
7883 #. type: Plain text
7884 #: build/C/man3/posix_memalign.3:193
7885 msgid "The function B<pvalloc>()  is a GNU extension."
7886 msgstr "関数 B<pvalloc>() は GNU による拡張である。"
7887
7888 #. type: Plain text
7889 #: build/C/man3/posix_memalign.3:197
7890 msgid "The function B<memalign>()  appears in SunOS 4.1.3 but not in 4.4BSD."
7891 msgstr "関数 B<memalign>() は SunOS 4.1.3 で登場したが、4.4BSD にはない。"
7892
7893 #. type: Plain text
7894 #: build/C/man3/posix_memalign.3:201
7895 msgid "The function B<posix_memalign>()  comes from POSIX.1d."
7896 msgstr "関数 B<posix_memalign>() は POSIX.1d に由来する。"
7897
7898 #. type: Plain text
7899 #: build/C/man3/posix_memalign.3:206
7900 msgid "The function B<aligned_alloc>()  is specified in the C11 standard."
7901 msgstr "関数 I<aligned_alloc>() は C11 標準で規定されている。"
7902
7903 #. type: SS
7904 #: build/C/man3/posix_memalign.3:206
7905 #, no-wrap
7906 msgid "Headers"
7907 msgstr "ヘッダ"
7908
7909 #. type: Plain text
7910 #: build/C/man3/posix_memalign.3:210
7911 msgid ""
7912 "Everybody agrees that B<posix_memalign>()  is declared in I<E<lt>stdlib."
7913 "hE<gt>>."
7914 msgstr ""
7915 "B<posix_memalign>()  の宣言を I<E<lt>stdlib.hE<gt>> で行うことに関しては、 皆"
7916 "の意見が一致している。"
7917
7918 #. type: Plain text
7919 #: build/C/man3/posix_memalign.3:214
7920 msgid ""
7921 "On some systems B<memalign>()  is declared in I<E<lt>stdlib.hE<gt>> instead "
7922 "of I<E<lt>malloc.hE<gt>>."
7923 msgstr ""
7924 "いくつかのシステムでは、 B<memalign>()  は I<E<lt>malloc.hE<gt>> ではなく "
7925 "I<E<lt>stdlib.hE<gt>> で宣言されている。"
7926
7927 #. type: Plain text
7928 #: build/C/man3/posix_memalign.3:221
7929 msgid ""
7930 "According to SUSv2, B<valloc>()  is declared in I<E<lt>stdlib.hE<gt>>.  "
7931 "Libc4,5 and glibc declare it in I<E<lt>malloc.hE<gt>>, and also in "
7932 "I<E<lt>stdlib.hE<gt>> if suitable feature test macros are defined (see "
7933 "above)."
7934 msgstr ""
7935 "SUSv2 によると、 B<valloc>() は I<E<lt>stdlib.hE<gt>> で宣言される。 "
7936 "libc4,5\n"
7937 "や glibc では I<E<lt>malloc.hE<gt>> で宣言されており、 さらに適切な機能検査\n"
7938 "マクロが定義された場合には I<E<lt>stdlib.hE<gt>> でも宣言される(上記を参照)。"
7939
7940 #. type: Plain text
7941 #: build/C/man3/posix_memalign.3:230
7942 msgid ""
7943 "On many systems there are alignment restrictions, for example, on buffers "
7944 "used for direct block device I/O.  POSIX specifies the I<pathconf(path,"
7945 "_PC_REC_XFER_ALIGN)> call that tells what alignment is needed.  Now one can "
7946 "use B<posix_memalign>()  to satisfy this requirement."
7947 msgstr ""
7948 "多くのシステムでは、アラインメントに関して制限がある。例えば、 ブロックデバイ"
7949 "スに対するダイレクト I/O に使用するバッファには アラインメントに関する制限が"
7950 "ある。 POSIX では、どんなアラインメントが必要かを知るために I<pathconf(path,"
7951 "_PC_REC_XFER_ALIGN)> コールを規定している。ここで B<posix_memalign>()  を使う"
7952 "と、この必要条件を満たすことができる。"
7953
7954 #. type: Plain text
7955 #: build/C/man3/posix_memalign.3:239
7956 msgid ""
7957 "B<posix_memalign>()  verifies that I<alignment> matches the requirements "
7958 "detailed above.  B<memalign>()  may not check that the I<alignment> argument "
7959 "is correct."
7960 msgstr ""
7961 "B<posix_memalign>() は I<alignment> が上で詳細に述べた必要条件を満たすか\n"
7962 "どうかを確かめる。 B<memalign>() は I<alignment> 引き数が正しいかどうかの\n"
7963 "確認を行わないかもしれない。"
7964
7965 #.  Other systems allow passing the result of
7966 #.  .IR valloc ()
7967 #.  to
7968 #.  .IR free (3),
7969 #.  but not to
7970 #.  .IR realloc (3).
7971 #. type: Plain text
7972 #: build/C/man3/posix_memalign.3:267
7973 msgid ""
7974 "POSIX requires that memory obtained from B<posix_memalign>()  can be freed "
7975 "using B<free>(3).  Some systems provide no way to reclaim memory allocated "
7976 "with B<memalign>()  or B<valloc>()  (because one can pass to B<free>(3)  "
7977 "only a pointer obtained from B<malloc>(3), while, for example, B<memalign>"
7978 "()  would call B<malloc>(3)  and then align the obtained value).  The glibc "
7979 "implementation allows memory obtained from any of these functions to be "
7980 "reclaimed with B<free>(3)."
7981 msgstr ""
7982 "POSIX では B<posix_memalign>() によって獲得したメモリは B<free>(3) を\n"
7983 "使って解放することができる必要がある。 いくつかのシステムでは\n"
7984 "B<memalign>() やB<valloc>() で割り当てられたメモリを再利用する手段が\n"
7985 "提供されていない(なぜなら B<free>(3) に渡すことができるのは\n"
7986 "B<malloc>(3) から受け取ったポインタだけだが、例えば B<memalign>() は\n"
7987 "B<malloc>(3) を呼び出し、得た値をアラインメントしてしまうからである)。\n"
7988 "glibc の実装では、 ここに述べた関数のいずれで獲得したメモリも\n"
7989 "B<free>(3) で再利用することができる。"
7990
7991 #. type: Plain text
7992 #: build/C/man3/posix_memalign.3:272
7993 msgid ""
7994 "The glibc B<malloc>(3)  always returns 8-byte aligned memory addresses, so "
7995 "these functions are needed only if you require larger alignment values."
7996 msgstr ""
7997 "glibc の B<malloc>(3) は常に 8 バイトにアラインメントされたメモリアドレスを\n"
7998 "返すので、ここで述べた関数が必要になるのは 8 バイトよりも大きなアラインメン"
7999 "ト\n"
8000 "が必要な場合だけである。"
8001
8002 #. type: Plain text
8003 #: build/C/man3/posix_memalign.3:277
8004 msgid "B<brk>(2), B<getpagesize>(2), B<free>(3), B<malloc>(3)"
8005 msgstr "B<brk>(2), B<getpagesize>(2), B<free>(3), B<malloc>(3)"
8006
8007 #. type: TH
8008 #: build/C/man2/readahead.2:28
8009 #, no-wrap
8010 msgid "READAHEAD"
8011 msgstr "READAHEAD"
8012
8013 #. type: Plain text
8014 #: build/C/man2/readahead.2:31
8015 msgid "readahead - perform file readahead into page cache"
8016 msgstr "readahead - 前もってファイルをページ・キャッシュに読み込む"
8017
8018 #. type: Plain text
8019 #: build/C/man2/readahead.2:37
8020 #, no-wrap
8021 msgid "B<ssize_t readahead(int >I<fd>B<, off64_t >I<offset>B<, size_t >I<count>B<);>\n"
8022 msgstr "B<ssize_t readahead(int >I<fd>B<, off64_t >I<offset>B<, size_t >I<count>B<);>\n"
8023
8024 #. type: Plain text
8025 #: build/C/man2/readahead.2:65
8026 msgid ""
8027 "B<readahead>()  populates the page cache with data from a file so that "
8028 "subsequent reads from that file will not block on disk I/O.  The I<fd> "
8029 "argument is a file descriptor identifying the file which is to be read.  The "
8030 "I<offset> argument specifies the starting point from which data is to be "
8031 "read and I<count> specifies the number of bytes to be read.  I/O is "
8032 "performed in whole pages, so that I<offset> is effectively rounded down to a "
8033 "page boundary and bytes are read up to the next page boundary greater than "
8034 "or equal to I<(offset+count)>.  B<readahead>()  does not read beyond the end "
8035 "of the file.  B<readahead>()  blocks until the specified data has been "
8036 "read.  The current file offset of the open file referred to by I<fd> is left "
8037 "unchanged."
8038 msgstr ""
8039 "B<readahead>()  は、この後の同じファイルからのデータ読み込み時にディスク I/O "
8040 "で 動作が停止 (block) しないように、前もってファイルの内容を ページ・キャッ"
8041 "シュに読み込む。 I<fd> 引き数は読み込みを行うファイルを識別するファイル・ディ"
8042 "スクリプタである。 I<offset> 引き数はデータの読み込み開始位置を指定し、 "
8043 "I<count> は読み込むデータのバイト数を指定する。 ディスク I/O はページ単位で実"
8044 "行されるので、 実際には I<offset> はページ境界に切り下げられ、読み込みバイト"
8045 "数は I<(offset+count)> より小さくない次のページ境界まで切り上げられる。 "
8046 "B<readahead>()  はファイルの末尾を越えた範囲まで読み出しを行うことはない。ま"
8047 "た、 B<readahead>()  は指定したデータの読み込みが終わるまで停止 (block) す"
8048 "る。 I<fd> で参照されたオープン済のファイルのファイルオフセットの現在値は 変"
8049 "更されない。"
8050
8051 #. type: Plain text
8052 #: build/C/man2/readahead.2:71
8053 msgid ""
8054 "On success, B<readahead>()  returns 0; on failure, -1 is returned, with "
8055 "I<errno> set to indicate the cause of the error."
8056 msgstr ""
8057 "B<readahead>()  は成功すると 0 を返す。失敗した場合 -1 を返し、 I<errno> にエ"
8058 "ラーの原因を示す値を設定する。"
8059
8060 #. type: Plain text
8061 #: build/C/man2/readahead.2:76
8062 msgid "I<fd> is not a valid file descriptor or is not open for reading."
8063 msgstr ""
8064 "I<fd> が有効なファイル・ディスクリプタでない、または 読み込み用にオープンされ"
8065 "ていない。"
8066
8067 #. type: Plain text
8068 #: build/C/man2/readahead.2:82
8069 msgid ""
8070 "I<fd> does not refer to a file type to which B<readahead>()  can be applied."
8071 msgstr ""
8072 "I<fd> が参照しているファイルが、 B<readahead>()  を行うことができないタイプの"
8073 "ファイルであった。"
8074
8075 #. type: Plain text
8076 #: build/C/man2/readahead.2:87
8077 msgid ""
8078 "The B<readahead>()  system call appeared in Linux 2.4.13; glibc support has "
8079 "been provided since version 2.3."
8080 msgstr ""
8081 "B<readahead>()  システムコールは Linux 2.4.13 で登場した。 glibc でのサポート"
8082 "は glibc バージョン 2.3 以降で行われている。"
8083
8084 #. type: Plain text
8085 #: build/C/man2/readahead.2:92
8086 msgid ""
8087 "The B<readahead>()  system call is Linux-specific, and its use should be "
8088 "avoided in portable applications."
8089 msgstr ""
8090 "B<readahead>()  システムコールは Linux 固有であり、移植を考慮したプログラムで"
8091 "は 使用を避けるべきである。"
8092
8093 #. type: Plain text
8094 #: build/C/man2/readahead.2:97
8095 msgid ""
8096 "On some 32-bit architectures, the calling signature for this system call "
8097 "differs, for the reasons described in B<syscall>(2)."
8098 msgstr ""
8099 "いくつかの 32 ビットアーキテクチャでは、このシステムコールの呼び出しシグネ"
8100 "チャーが違っている。 理由は B<syscall>(2) で説明されている。"
8101
8102 #. type: Plain text
8103 #: build/C/man2/readahead.2:103
8104 msgid "B<lseek>(2), B<madvise>(2), B<mmap>(2), B<posix_fadvise>(2), B<read>(2)"
8105 msgstr ""
8106 "B<lseek>(2), B<madvise>(2), B<mmap>(2), B<posix_fadvise>(2), B<read>(2)"
8107
8108 #. type: TH
8109 #: build/C/man2/remap_file_pages.2:28
8110 #, no-wrap
8111 msgid "REMAP_FILE_PAGES"
8112 msgstr "REMAP_FILE_PAGES"
8113
8114 #. type: Plain text
8115 #: build/C/man2/remap_file_pages.2:31
8116 msgid "remap_file_pages - create a nonlinear file mapping"
8117 msgstr "remap_file_pages - 非線形ファイルマッピングを作成する。"
8118
8119 #. type: Plain text
8120 #: build/C/man2/remap_file_pages.2:35
8121 #, no-wrap
8122 msgid ""
8123 "B<#define _GNU_SOURCE>         /* See feature_test_macros(7) */\n"
8124 "B<#include E<lt>sys/mman.hE<gt>>\n"
8125 msgstr ""
8126 "B<#define _GNU_SOURCE>         /* feature_test_macros(7) 参照 */\n"
8127 "B<#include E<lt>sys/mman.hE<gt>>\n"
8128
8129 #. type: Plain text
8130 #: build/C/man2/remap_file_pages.2:38
8131 #, no-wrap
8132 msgid ""
8133 "B<int remap_file_pages(void *>I<addr>B<, size_t >I<size>B<, int >I<prot>B<,>\n"
8134 "B<                     ssize_t >I<pgoff>B<, int >I<flags>B<);>\n"
8135 msgstr ""
8136 "B<int remap_file_pages(void *>I<addr>B<, size_t >I<size>B<, int >I<prot>B<,>\n"
8137 "B<                     ssize_t >I<pgoff>B<, int >I<flags>B<);>\n"
8138
8139 #. type: Plain text
8140 #: build/C/man2/remap_file_pages.2:51
8141 msgid ""
8142 "The B<remap_file_pages>()  system call is used to create a nonlinear "
8143 "mapping, that is, a mapping in which the pages of the file are mapped into a "
8144 "nonsequential order in memory.  The advantage of using B<remap_file_pages>"
8145 "()  over using repeated calls to B<mmap>(2)  is that the former approach "
8146 "does not require the kernel to create additional VMA (Virtual Memory Area) "
8147 "data structures."
8148 msgstr ""
8149 "B<remap_file_pages>()  システムコールは非線形なマッピング、 つまりファイルの"
8150 "ページがメモリ上で連続しない順番でマップされる マッピングを作成するために使わ"
8151 "れる。 B<remap_file_pages>()  を使う方が B<mmap>(2)  を繰り返して使うより優れ"
8152 "ている点は、 前者の方法ではカーネルが VMA (Virtual Memory Area, 仮想メモリ領"
8153 "域)  データ構造体を追加で作成する必要がないことである。"
8154
8155 #. type: Plain text
8156 #: build/C/man2/remap_file_pages.2:53
8157 msgid "To create a nonlinear mapping we perform the following steps:"
8158 msgstr "非線形マッピングを作成するためには、 以下のようなステップを実行する:"
8159
8160 #. type: TP
8161 #: build/C/man2/remap_file_pages.2:53
8162 #, no-wrap
8163 msgid "1."
8164 msgstr "1."
8165
8166 #. type: Plain text
8167 #: build/C/man2/remap_file_pages.2:61
8168 msgid ""
8169 "Use B<mmap>(2)  to create a mapping (which is initially linear).  This "
8170 "mapping must be created with the B<MAP_SHARED> flag."
8171 msgstr ""
8172 "B<mmap>(2)  を使い、マッピングを作成する (このマッピングは最初は線形であ"
8173 "る)。 このマッピングは B<MAP_SHARED> フラグを指定して作成されなければならな"
8174 "い。"
8175
8176 #. type: TP
8177 #: build/C/man2/remap_file_pages.2:61
8178 #, no-wrap
8179 msgid "2."
8180 msgstr "2."
8181
8182 #. type: Plain text
8183 #: build/C/man2/remap_file_pages.2:69
8184 msgid ""
8185 "Use one or more calls to B<remap_file_pages>()  to rearrange the "
8186 "correspondence between the pages of the mapping and the pages of the file.  "
8187 "It is possible to map the same page of a file into multiple locations within "
8188 "the mapped region."
8189 msgstr ""
8190 "B<remap_file_pages>()  を 1 回以上呼び出して、 マッピングのページとファイルの"
8191 "ページの対応関係を再構成する。 ファイルの同じページをマッピング領域の複数の場"
8192 "所に マップすることが可能である。"
8193
8194 #. type: Plain text
8195 #: build/C/man2/remap_file_pages.2:80
8196 msgid ""
8197 "The I<pgoff> and I<size> arguments specify the region of the file that is to "
8198 "be relocated within the mapping: I<pgoff> is a file offset in units of the "
8199 "system page size; I<size> is the length of the region in bytes."
8200 msgstr ""
8201 "I<pgoff> と I<size> 引き数は、マッピング内で再配置されるファイルの領域を指定"
8202 "する。 I<pgoff> はファイルオフセットであり、単位はシステムのページサイズであ"
8203 "る。 I<size> は領域の長さであり、単位はバイトである。"
8204
8205 #. type: Plain text
8206 #: build/C/man2/remap_file_pages.2:98
8207 msgid ""
8208 "The I<addr> argument serves two purposes.  First, it identifies the mapping "
8209 "whose pages we want to rearrange.  Thus, I<addr> must be an address that "
8210 "falls within a region previously mapped by a call to B<mmap>(2).  Second, "
8211 "I<addr> specifies the address at which the file pages identified by I<pgoff> "
8212 "and I<size> will be placed."
8213 msgstr ""
8214 "I<addr> 引き数は 2 つの目的で使われる。 第 1 の目的は、この引き数によって再編"
8215 "成したいページの マッピングを識別することである。 よって I<addr> は B<mmap>"
8216 "(2)  の呼び出しで過去にマップされた領域内のアドレスでなければならない。 第 2 "
8217 "の目的は、 I<pgoff> と I<size> で識別されるファイルページが置かれる予定のアド"
8218 "レスを、 I<addr> によって指定することである。"
8219
8220 #.  This rounding is weird, and not consistent with the treatment of
8221 #.  the analogous arguments for munmap()/mprotect() and for mlock().
8222 #.  MTK, 14 Sep 2005
8223 #. type: Plain text
8224 #: build/C/man2/remap_file_pages.2:112
8225 msgid ""
8226 "The values specified in I<addr> and I<size> should be multiples of the "
8227 "system page size.  If they are not, then the kernel rounds I<both> values "
8228 "I<down> to the nearest multiple of the page size."
8229 msgstr ""
8230 "I<addr> と I<size> に指定する値は、システムのページサイズの倍数とすべきであ"
8231 "る。 それ以外の場合、カーネルは「両方」の値を 最も近いページサイズの倍数へ"
8232 "「切り下げる」。"
8233
8234 #. type: Plain text
8235 #: build/C/man2/remap_file_pages.2:116
8236 msgid "The I<prot> argument must be specified as 0."
8237 msgstr "I<prot> 引き数は 0 に指定されなければならない。"
8238
8239 #. type: Plain text
8240 #: build/C/man2/remap_file_pages.2:124
8241 msgid ""
8242 "The I<flags> argument has the same meaning as for B<mmap>(2), but all flags "
8243 "other than B<MAP_NONBLOCK> are ignored."
8244 msgstr ""
8245 "I<flags> 引き数は B<mmap>(2)  のものと同じ意味であるが、 B<MAP_NONBLOCK> 以外"
8246 "の全てのフラグは無視される。"
8247
8248 #. type: Plain text
8249 #: build/C/man2/remap_file_pages.2:131
8250 msgid ""
8251 "On success, B<remap_file_pages>()  returns 0.  On error, -1 is returned, and "
8252 "I<errno> is set appropriately."
8253 msgstr ""
8254 "成功した場合、 B<remap_file_pages>()  は 0 を返す。 エラーの場合、-1 が返さ"
8255 "れ、 I<errno> が適切に設定される。"
8256
8257 #. type: Plain text
8258 #: build/C/man2/remap_file_pages.2:139
8259 msgid ""
8260 "I<addr> does not refer to a valid mapping created with the B<MAP_SHARED> "
8261 "flag."
8262 msgstr ""
8263 "I<addr> が B<MAP_SHARED> フラグを指定して作成された有効なマッピングを参照して"
8264 "いない。"
8265
8266 #.  And possibly others from vma->vm_ops->populate()
8267 #. type: Plain text
8268 #: build/C/man2/remap_file_pages.2:148
8269 msgid "I<addr>, I<size>, I<prot>, or I<pgoff> is invalid."
8270 msgstr "I<addr>, I<size>, I<prot>, I<pgoff> のいずれかが不正である。"
8271
8272 #. type: Plain text
8273 #: build/C/man2/remap_file_pages.2:153
8274 msgid ""
8275 "The B<remap_file_pages>()  system call appeared in Linux 2.5.46; glibc "
8276 "support was added in version 2.3.3."
8277 msgstr ""
8278 "B<remap_file_pages>()  システムコールは Linux 2.5.46 で登場した。 glibc での"
8279 "サポートは glibc バージョン 2.3.3 で追加された。"
8280
8281 #. type: Plain text
8282 #: build/C/man2/remap_file_pages.2:157
8283 msgid "The B<remap_file_pages>()  system call is Linux-specific."
8284 msgstr "B<remap_file_pages>()  システムコールは Linux 固有のものである。"
8285
8286 #. type: Plain text
8287 #: build/C/man2/remap_file_pages.2:164
8288 msgid ""
8289 "B<getpagesize>(2), B<mmap>(2), B<mmap2>(2), B<mprotect>(2), B<mremap>(2), "
8290 "B<msync>(2)"
8291 msgstr ""
8292 "B<getpagesize>(2), B<mmap>(2), B<mmap2>(2), B<mprotect>(2), B<mremap>(2), "
8293 "B<msync>(2)"
8294
8295 #. type: TH
8296 #: build/C/man3/shm_open.3:26
8297 #, no-wrap
8298 msgid "SHM_OPEN"
8299 msgstr "SHM_OPEN"
8300
8301 #. type: TH
8302 #: build/C/man3/shm_open.3:26
8303 #, no-wrap
8304 msgid "2009-02-25"
8305 msgstr "2009-02-25"
8306
8307 #. type: Plain text
8308 #: build/C/man3/shm_open.3:29
8309 msgid ""
8310 "shm_open, shm_unlink - create/open or unlink POSIX shared memory objects"
8311 msgstr ""
8312 "shm_open, shm_unlink - POSIX 共有メモリ・オブジェクトの作成/オープン/削除を行"
8313 "う"
8314
8315 #. type: Plain text
8316 #: build/C/man3/shm_open.3:33
8317 msgid "B<#include E<lt>sys/stat.hE<gt>> /* For mode constants */"
8318 msgstr "B<#include E<lt>sys/stat.hE<gt>> /* mode 定数用 */"
8319
8320 #. type: Plain text
8321 #: build/C/man3/shm_open.3:35
8322 msgid "B<#include E<lt>fcntl.hE<gt>> /* For O_* constants */"
8323 msgstr "B<#include E<lt>fcntl.hE<gt>> /* O_* 定数の定義用 */"
8324
8325 #. type: Plain text
8326 #: build/C/man3/shm_open.3:37
8327 msgid ""
8328 "B<int shm_open(const char *>I<name>B<, int >I<oflag>B<, mode_t >I<mode>B<);>"
8329 msgstr ""
8330 "B<int shm_open(const char *>I<name>B<, int >I<oflag>B<, mode_t >I<mode>B<);>"
8331
8332 #. type: Plain text
8333 #: build/C/man3/shm_open.3:39
8334 msgid "B<int shm_unlink(const char *>I<name>B<);>"
8335 msgstr "B<int shm_unlink(const char *>I<name>B<);>"
8336
8337 #. type: Plain text
8338 #: build/C/man3/shm_open.3:41
8339 msgid "Link with I<-lrt>."
8340 msgstr "I<-lrt> でリンクする。"
8341
8342 #. type: Plain text
8343 #: build/C/man3/shm_open.3:53
8344 msgid ""
8345 "B<shm_open>()  creates and opens a new, or opens an existing, POSIX shared "
8346 "memory object.  A POSIX shared memory object is in effect a handle which can "
8347 "be used by unrelated processes to B<mmap>(2)  the same region of shared "
8348 "memory.  The B<shm_unlink>()  function performs the converse operation, "
8349 "removing an object previously created by B<shm_open>()."
8350 msgstr ""
8351 "B<shm_open>()  は、POSIX 共有メモリ・オブジェクトを新規に作成/オープンした"
8352 "り、 すでに存在するオブジェクトをオープンしたりする。 POSIX 共有メモリ・オブ"
8353 "ジェクトは、実際には、関係のないプロセスが 共有メモリの同じ領域を B<mmap>"
8354 "(2)  するために使用することができる手段である。 B<shm_unlink>()  は、逆の操"
8355 "作、つまり以前に B<shm_open>()  で作成されたオブジェクトの削除を行う。"
8356
8357 #.  glibc allows the initial slash to be omitted, and makes
8358 #.  multiple initial slashes equivalent to a single slash.
8359 #.  This differs from the implementation of POSIX message queues.
8360 #.  glibc allows subdirectory components in the name, in which
8361 #.  case the subdirectory must exist under /dev/shm, and allow the
8362 #.  required permissions if a user wants to create a shared memory
8363 #.  object in that subdirectory.
8364 #. type: Plain text
8365 #: build/C/man3/shm_open.3:74
8366 msgid ""
8367 "The operation of B<shm_open>()  is analogous to that of B<open>(2).  I<name> "
8368 "specifies the shared memory object to be created or opened.  For portable "
8369 "use, a shared memory object should be identified by a name of the form I</"
8370 "somename>; that is, a null-terminated string of up to B<NAME_MAX> (i.e., "
8371 "255) characters consisting of an initial slash, followed by one or more "
8372 "characters, none of which are slashes."
8373 msgstr ""
8374 "B<shm_open>()  の動作は B<open>(2)  とよく似ている。 I<name> で作成したりオー"
8375 "プンしたりする共有メモリ・オブジェクトを指定する。 移植性を持たせるためには、"
8376 "共有メモリ・オブジェクトは I</somename> という形式の名前で識別し、 その名前"
8377 "は、最大で B<NAME_MAX> (すなわち 255) 文字の NULL 終端された文字列で、 スラッ"
8378 "シュで始まり、スラッシュ以外の文字が 1 文字以上続く形式 にすべきである。"
8379
8380 #. type: Plain text
8381 #: build/C/man3/shm_open.3:81
8382 msgid ""
8383 "I<oflag> is a bit mask created by ORing together exactly one of B<O_RDONLY> "
8384 "or B<O_RDWR> and any of the other flags listed here:"
8385 msgstr ""
8386 "I<oflag> はビットマスクで、 B<O_RDONLY> と B<O_RDWR> のいずれか一方と、以下に"
8387 "述べる他のフラグの論理和をとったもの を指定する。"
8388
8389 #. type: TP
8390 #: build/C/man3/shm_open.3:81
8391 #, no-wrap
8392 msgid "B<O_RDONLY>"
8393 msgstr "B<O_RDONLY>"
8394
8395 #. type: Plain text
8396 #: build/C/man3/shm_open.3:89
8397 msgid ""
8398 "Open the object for read access.  A shared memory object opened in this way "
8399 "can be B<mmap>(2)ed only for read (B<PROT_READ>)  access."
8400 msgstr ""
8401 "読み出しアクセス用にオブジェクトをオープンする。 このフラグを指定してオープン"
8402 "された共有メモリ・オブジェクトは、 読み出し (B<PROT_READ>) アクセスでのみ "
8403 "B<mmap>(2)  することができる。"
8404
8405 #. type: TP
8406 #: build/C/man3/shm_open.3:89
8407 #, no-wrap
8408 msgid "B<O_RDWR>"
8409 msgstr "B<O_RDWR>"
8410
8411 #. type: Plain text
8412 #: build/C/man3/shm_open.3:92
8413 msgid "Open the object for read-write access."
8414 msgstr "読み書きアクセス用にオブジェクトをオープンする。"
8415
8416 #. type: TP
8417 #: build/C/man3/shm_open.3:92
8418 #, no-wrap
8419 msgid "B<O_CREAT>"
8420 msgstr "B<O_CREAT>"
8421
8422 #.  In truth it is actually the filesystem IDs on Linux, but these
8423 #.  are nearly always the same as the effective IDs.  (MTK, Jul 05)
8424 #. type: Plain text
8425 #: build/C/man3/shm_open.3:112
8426 msgid ""
8427 "Create the shared memory object if it does not exist.  The user and group "
8428 "ownership of the object are taken from the corresponding effective IDs of "
8429 "the calling process, and the object's permission bits are set according to "
8430 "the low-order 9 bits of I<mode>, except that those bits set in the process "
8431 "file mode creation mask (see B<umask>(2))  are cleared for the new object.  "
8432 "A set of macro constants which can be used to define I<mode> is listed in "
8433 "B<open>(2).  (Symbolic definitions of these constants can be obtained by "
8434 "including I<E<lt>sys/stat.hE<gt>>.)"
8435 msgstr ""
8436 "存在しない場合、共有メモリ・オブジェクトを作成する。 オブジェクトのユーザとグ"
8437 "ループの所有権は、 呼び出し元プロセスの対応する実効 ID が使われ、 オブジェク"
8438 "トの許可ビットは I<mode> の下位 9 ビットに基づいて設定される。ただし、 ファイ"
8439 "ルモード作成マスク (B<umask>(2)  参照) に設定されている値は、新規オブジェクト"
8440 "に関してはクリアされる。 I<mode> を定義するために使用できるマクロ定数(群)は "
8441 "B<open>(2)  に記載されている (これらの定数のシンボル定義は I<E<lt>sys/stat."
8442 "hE<gt>> のインクルードにより得られる)。"
8443
8444 #. type: Plain text
8445 #: build/C/man3/shm_open.3:118
8446 msgid ""
8447 "A new shared memory object initially has zero length\\(emthe size of the "
8448 "object can be set using B<ftruncate>(2).  The newly allocated bytes of a "
8449 "shared memory object are automatically initialized to 0."
8450 msgstr ""
8451 "新規に作成された共有メモリ・オブジェクトは長さ 0 で初期化される。 オブジェク"
8452 "トの大きさは B<ftruncate>(2)  を使って設定できる。 共有メモリ・オブジェクトと"
8453 "して新規に確保されたバイトは自動的に 0 に初期化される。"
8454
8455 #. type: TP
8456 #: build/C/man3/shm_open.3:118
8457 #, no-wrap
8458 msgid "B<O_EXCL>"
8459 msgstr "B<O_EXCL>"
8460
8461 #. type: Plain text
8462 #: build/C/man3/shm_open.3:127
8463 msgid ""
8464 "If B<O_CREAT> was also specified, and a shared memory object with the given "
8465 "I<name> already exists, return an error.  The check for the existence of the "
8466 "object, and its creation if it does not exist, are performed atomically."
8467 msgstr ""
8468 "B<O_CREAT> が一緒に指定されており、 I<name> で指定された共有メモリ・オブジェ"
8469 "クトが既に存在した場合、 エラーを返す。 オブジェクトの存在確認と、存在しな"
8470 "かった場合のオブジェクト作成は、 必ず一連の操作として実行される (performed "
8471 "atomically)。"
8472
8473 #. type: TP
8474 #: build/C/man3/shm_open.3:127
8475 #, no-wrap
8476 msgid "B<O_TRUNC>"
8477 msgstr "B<O_TRUNC>"
8478
8479 #. type: Plain text
8480 #: build/C/man3/shm_open.3:130
8481 msgid "If the shared memory object already exists, truncate it to zero bytes."
8482 msgstr ""
8483 "共有メモリ・オブジェクトがすでに存在した場合、 そのオブジェクトを 0 バイトに"
8484 "切り詰める。"
8485
8486 #. type: Plain text
8487 #: build/C/man3/shm_open.3:133
8488 msgid ""
8489 "Definitions of these flag values can be obtained by including I<E<lt>fcntl."
8490 "hE<gt>>."
8491 msgstr ""
8492 "これらのフラグ値の定義は I<E<lt>fcntl.hE<gt>> のインクルードにより得られる。"
8493
8494 #. type: Plain text
8495 #: build/C/man3/shm_open.3:144
8496 msgid ""
8497 "On successful completion B<shm_open>()  returns a new file descriptor "
8498 "referring to the shared memory object.  This file descriptor is guaranteed "
8499 "to be the lowest-numbered file descriptor not previously opened within the "
8500 "process.  The B<FD_CLOEXEC> flag (see B<fcntl>(2))  is set for the file "
8501 "descriptor."
8502 msgstr ""
8503 "成功して完了した場合、 B<shm_open>()  は共有メモリ・オブジェクトを参照する新"
8504 "しいファイル・ディスクリプタを返す。 このファイル・ディスクリプタは、そのプロ"
8505 "セス内で過去にオープンされていない ファイル・ディスクリプタの中で最も小さな数"
8506 "になることが保証される。 B<FD_CLOEXEC> フラグ (B<fcntl>(2)  を参照) が、この"
8507 "ファイル・ディスクリプタに設定される。"
8508
8509 #. type: Plain text
8510 #: build/C/man3/shm_open.3:153
8511 msgid ""
8512 "The file descriptor is normally used in subsequent calls to B<ftruncate>(2)  "
8513 "(for a newly created object) and B<mmap>(2).  After a call to B<mmap>(2)  "
8514 "the file descriptor may be closed without affecting the memory mapping."
8515 msgstr ""
8516 "通常、これらのファイル・ディスクリプタは、この後続けて実行される B<ftruncate>"
8517 "(2)  (新規に作成されたオブジェクトの場合のみ) と B<mmap>(2)  の呼び出しに使用"
8518 "される。 B<mmap>(2)  を呼び出した後は、ファイル・ディスクリプタをクローズして"
8519 "もよく、 クローズしてもメモリ・マッピングに影響を与えることはない。"
8520
8521 #. type: Plain text
8522 #: build/C/man3/shm_open.3:171
8523 msgid ""
8524 "The operation of B<shm_unlink>()  is analogous to B<unlink>(2): it removes a "
8525 "shared memory object name, and, once all processes have unmapped the object, "
8526 "de-allocates and destroys the contents of the associated memory region.  "
8527 "After a successful B<shm_unlink>(), attempts to B<shm_open>()  an object "
8528 "with the same I<name> will fail (unless B<O_CREAT> was specified, in which "
8529 "case a new, distinct object is created)."
8530 msgstr ""
8531 "B<shm_unlink>()  の動作は B<unlink>(2)  とよく似ている: 共有メモリ・オブジェ"
8532 "クト名を削除し、すべてのプロセスが処理対象の オブジェクトをアンマップした時点"
8533 "でオブジェクトの割り当てを解除し、 対応するメモリ領域の内容を破棄する。 "
8534 "B<shm_unlink>()  が成功した後で、同じ I<name> を持つオブジェクトに対して "
8535 "B<shm_open>()  を行うと、 (B<O_CREAT> が指定されていない場合) 失敗する。 "
8536 "(B<O_CREAT> が指定されている場合、新しく別のオブジェクトが作成される)。"
8537
8538 #. type: Plain text
8539 #: build/C/man3/shm_open.3:180
8540 msgid ""
8541 "On success, B<shm_open>()  returns a nonnegative file descriptor.  On "
8542 "failure, B<shm_open>()  returns -1.  B<shm_unlink>()  returns 0 on success, "
8543 "or -1 on error."
8544 msgstr ""
8545 "成功した場合、 B<shm_open>()  は非負のファイル・ディスクリプタを返す。 失敗し"
8546 "た場合、 B<shm_open>()  は -1 を返す。 B<shm_unlink>()  は、成功した場合 0 "
8547 "を、エラーが起こった場合 -1 を返す。"
8548
8549 #. type: Plain text
8550 #: build/C/man3/shm_open.3:187
8551 msgid ""
8552 "On failure, I<errno> is set to indicate the cause of the error.  Values "
8553 "which may appear in I<errno> include the following:"
8554 msgstr ""
8555 "失敗した場合、エラーの原因を示すため I<errno> が設定される。 I<errno> に設定"
8556 "される値は以下の通りである:"
8557
8558 #. type: Plain text
8559 #: build/C/man3/shm_open.3:192
8560 msgid "Permission to B<shm_unlink>()  the shared memory object was denied."
8561 msgstr "共有メモリオブジェクトを B<shm_unlink>()  する権限がなかった。"
8562
8563 #. type: Plain text
8564 #: build/C/man3/shm_open.3:202
8565 msgid ""
8566 "Permission was denied to B<shm_open>()  I<name> in the specified I<mode>, or "
8567 "B<O_TRUNC> was specified and the caller does not have write permission on "
8568 "the object."
8569 msgstr ""
8570 "指定された I<mode> で I<name> を B<shm_open>()  する権限がなかった。もしく"
8571 "は、 B<O_TRUNC> が指定されたが、呼び出し元にはそのオブジェクトに対する書き込"
8572 "み権限が なかった。"
8573
8574 #. type: TP
8575 #: build/C/man3/shm_open.3:202 build/C/man2/shmget.2:195
8576 #, no-wrap
8577 msgid "B<EEXIST>"
8578 msgstr "B<EEXIST>"
8579
8580 #. type: Plain text
8581 #: build/C/man3/shm_open.3:213
8582 msgid ""
8583 "Both B<O_CREAT> and B<O_EXCL> were specified to B<shm_open>()  and the "
8584 "shared memory object specified by I<name> already exists."
8585 msgstr ""
8586 "B<O_CREAT> と B<O_EXCL> の両方が B<shm_open>()  に指定されたが、 I<name> で指"
8587 "定された共有メモリ・オブジェクトが既に存在した。"
8588
8589 #. type: Plain text
8590 #: build/C/man3/shm_open.3:220
8591 msgid "The I<name> argument to B<shm_open>()  was invalid."
8592 msgstr "B<shm_open>()  に与えられた I<name> 引き数が不正であった。"
8593
8594 #. type: TP
8595 #: build/C/man3/shm_open.3:220
8596 #, no-wrap
8597 msgid "B<EMFILE>"
8598 msgstr "B<EMFILE>"
8599
8600 #. type: Plain text
8601 #: build/C/man3/shm_open.3:223
8602 msgid "The process already has the maximum number of files open."
8603 msgstr "プロセスがオープン可能なファイル数の上限にすでに達していた。"
8604
8605 #. type: TP
8606 #: build/C/man3/shm_open.3:223
8607 #, no-wrap
8608 msgid "B<ENAMETOOLONG>"
8609 msgstr "B<ENAMETOOLONG>"
8610
8611 #. type: Plain text
8612 #: build/C/man3/shm_open.3:229
8613 msgid "The length of I<name> exceeds B<PATH_MAX>."
8614 msgstr "I<name> の長さが B<PATH_MAX> を越えている。"
8615
8616 #. type: Plain text
8617 #: build/C/man3/shm_open.3:233
8618 msgid ""
8619 "The limit on the total number of files open on the system has been reached."
8620 msgstr "ファイルシステムでオープンできるファイル数の上限に達した。"
8621
8622 #. type: TP
8623 #: build/C/man3/shm_open.3:233 build/C/man3/shm_open.3:242
8624 #: build/C/man2/shmget.2:209
8625 #, no-wrap
8626 msgid "B<ENOENT>"
8627 msgstr "B<ENOENT>"
8628
8629 #. type: Plain text
8630 #: build/C/man3/shm_open.3:242
8631 msgid ""
8632 "An attempt was made to B<shm_open>()  a I<name> that did not exist, and "
8633 "B<O_CREAT> was not specified."
8634 msgstr ""
8635 "存在していない I<name> のオブジェクトを B<shm_open>()  しようとしたが、 "
8636 "B<O_CREAT> が指定されていなかった。"
8637
8638 #. type: Plain text
8639 #: build/C/man3/shm_open.3:249
8640 msgid ""
8641 "An attempt was to made to B<shm_unlink>()  a I<name> that does not exist."
8642 msgstr "存在しない I<name> のオブジェクトを B<shm_unlink>()  しようとした。"
8643
8644 #. type: Plain text
8645 #: build/C/man3/shm_open.3:251
8646 msgid "These functions are provided in glibc 2.2 and later."
8647 msgstr "これらの関数は glibc 2.2 以降で提供されている。"
8648
8649 #. type: Plain text
8650 #: build/C/man3/shm_open.3:257
8651 msgid ""
8652 "POSIX.1-2001 says that the group ownership of a newly created shared memory "
8653 "object is set to either the calling process's effective group ID or \"a "
8654 "system default group ID\"."
8655 msgstr ""
8656 "POSIX.1-2001 には、新規に作成される共有メモリオブジェクトのグループ所有権"
8657 "は、 呼び出し元プロセスの実効グループ ID か 「システムのデフォルトのグループ "
8658 "ID」 のどちらかに設定される、と書かれている。"
8659
8660 #. type: Plain text
8661 #: build/C/man3/shm_open.3:266
8662 msgid ""
8663 "POSIX leaves the behavior of the combination of B<O_RDONLY> and B<O_TRUNC> "
8664 "unspecified.  On Linux, this will successfully truncate an existing shared "
8665 "memory object\\(emthis may not be so on other UNIX systems."
8666 msgstr ""
8667 "POSIX は B<O_RDONLY> と B<O_TRUNC> が一緒に指定された場合の動作を未定義にして"
8668 "いる。Linux では、 既存の共有メモリ・オブジェクトに対する切り詰め (truncate) "
8669 "は成功する。 しかし、他の UNIX システムでも同じであるとは限らない。"
8670
8671 #. type: Plain text
8672 #: build/C/man3/shm_open.3:271
8673 #, fuzzy
8674 #| msgid ""
8675 #| "The POSIX shared memory object implementation on Linux 2.4 makes use of a "
8676 #| "dedicated file system, which is normally mounted under I</dev/shm>."
8677 msgid ""
8678 "The POSIX shared memory object implementation on Linux 2.4 makes use of a "
8679 "dedicated filesystem, which is normally mounted under I</dev/shm>."
8680 msgstr ""
8681 "Linux 2.4 における POSIX 共有メモリ・オブジェクトの実装は 専用のファイルシス"
8682 "テムを使用する。そのファイルシステムは通常 I</dev/shm> にマウントされる。"
8683
8684 #. type: Plain text
8685 #: build/C/man3/shm_open.3:282
8686 msgid ""
8687 "B<close>(2), B<fchmod>(2), B<fchown>(2), B<fcntl>(2), B<fstat>(2), "
8688 "B<ftruncate>(2), B<mmap>(2), B<open>(2), B<umask>(2), B<shm_overview>(7)"
8689 msgstr ""
8690 "B<close>(2), B<fchmod>(2), B<fchown>(2), B<fcntl>(2), B<fstat>(2), "
8691 "B<ftruncate>(2), B<mmap>(2), B<open>(2), B<umask>(2), B<shm_overview>(7)"
8692
8693 #. type: TH
8694 #: build/C/man7/shm_overview.7:27
8695 #, no-wrap
8696 msgid "SHM_OVERVIEW"
8697 msgstr "SHM_OVERVIEW"
8698
8699 #. type: TH
8700 #: build/C/man7/shm_overview.7:27
8701 #, no-wrap
8702 msgid "2010-09-10"
8703 msgstr "2010-09-10"
8704
8705 #. type: Plain text
8706 #: build/C/man7/shm_overview.7:30
8707 msgid "shm_overview - overview of POSIX shared memory"
8708 msgstr "shm_overview - POSIX 共有メモリの概要"
8709
8710 #. type: Plain text
8711 #: build/C/man7/shm_overview.7:33
8712 msgid ""
8713 "The POSIX shared memory API allows processes to communicate information by "
8714 "sharing a region of memory."
8715 msgstr ""
8716 "POSIX 共有メモリ API を使用すると、メモリのある領域を共有して、 プロセス間で"
8717 "情報をやり取りすることができる。"
8718
8719 #. type: Plain text
8720 #: build/C/man7/shm_overview.7:35
8721 msgid "The interfaces employed in the API are:"
8722 msgstr "この API では以下のインターフェースが採用されている。"
8723
8724 #. type: TP
8725 #: build/C/man7/shm_overview.7:35
8726 #, no-wrap
8727 msgid "B<shm_open>(3)"
8728 msgstr "B<shm_open>(3)"
8729
8730 #. type: Plain text
8731 #: build/C/man7/shm_overview.7:42
8732 msgid ""
8733 "Create and open a new object, or open an existing object.  This is analogous "
8734 "to B<open>(2).  The call returns a file descriptor for use by the other "
8735 "interfaces listed below."
8736 msgstr ""
8737 "新しいオブジェクトを生成しオープンする、もしくは 既存のオブジェクトをオープン"
8738 "する。これは B<open>(2)  と同じである。下記にある他のインターフェースで使用す"
8739 "る ファイルディスクリプタを返す。"
8740
8741 #. type: TP
8742 #: build/C/man7/shm_overview.7:42
8743 #, no-wrap
8744 msgid "B<ftruncate>(2)"
8745 msgstr "B<ftruncate>(2)"
8746
8747 #. type: Plain text
8748 #: build/C/man7/shm_overview.7:46
8749 msgid ""
8750 "Set the size of the shared memory object.  (A newly created shared memory "
8751 "object has a length of zero.)"
8752 msgstr "共有メモリオブジェクトの大きさを設定する。"
8753
8754 #. type: Plain text
8755 #: build/C/man7/shm_overview.7:50
8756 msgid ""
8757 "Map the shared memory object into the virtual address space of the calling "
8758 "process."
8759 msgstr ""
8760 "呼び出したプロセスの仮想アドレス空間に共有メモリオブジェクトを マップする。"
8761
8762 #. type: TP
8763 #: build/C/man7/shm_overview.7:50
8764 #, no-wrap
8765 msgid "B<munmap>(2)"
8766 msgstr "B<munmap>(2)"
8767
8768 #. type: Plain text
8769 #: build/C/man7/shm_overview.7:54
8770 msgid ""
8771 "Unmap the shared memory object from the virtual address space of the calling "
8772 "process."
8773 msgstr ""
8774 "呼び出したプロセスの仮想アドレス空間から 共有メモリオブジェクトをアンマップす"
8775 "る。"
8776
8777 #. type: TP
8778 #: build/C/man7/shm_overview.7:54
8779 #, no-wrap
8780 msgid "B<shm_unlink>(3)"
8781 msgstr "B<shm_unlink>(3)"
8782
8783 #. type: Plain text
8784 #: build/C/man7/shm_overview.7:57
8785 msgid "Remove a shared memory object name."
8786 msgstr "共有メモリオブジェクト名を削除する。"
8787
8788 #. type: TP
8789 #: build/C/man7/shm_overview.7:57
8790 #, no-wrap
8791 msgid "B<close>(2)"
8792 msgstr "B<close>(2)"
8793
8794 #. type: Plain text
8795 #: build/C/man7/shm_overview.7:62
8796 msgid ""
8797 "Close the file descriptor allocated by B<shm_open>(3)  when it is no longer "
8798 "needed."
8799 msgstr ""
8800 "B<shm_open>(3)  で割り当てられたファイルディスクリプタが不要になった際に、 そ"
8801 "のファイルディスクリプタをクローズする。"
8802
8803 #. type: TP
8804 #: build/C/man7/shm_overview.7:62
8805 #, no-wrap
8806 msgid "B<fstat>(2)"
8807 msgstr "B<fstat>(2)"
8808
8809 #. type: Plain text
8810 #: build/C/man7/shm_overview.7:76
8811 msgid ""
8812 "Obtain a I<stat> structure that describes the shared memory object.  Among "
8813 "the information returned by this call are the object's size (I<st_size>), "
8814 "permissions (I<st_mode>), owner (I<st_uid>), and group (I<st_gid>)."
8815 msgstr ""
8816 "その共有メモリオブジェクトについての情報が入った I<stat> 構造体を取得する。 "
8817 "このシステムコールが返す情報には、オブジェクトのサイズ (I<st_size>)、 許可属"
8818 "性 (I<st_mode>)、 所有者 (I<st_uid>)、 グループ (I<st_gid>)  がある。"
8819
8820 #. type: TP
8821 #: build/C/man7/shm_overview.7:76
8822 #, no-wrap
8823 msgid "B<fchown>(2)"
8824 msgstr "B<fchown>(2)"
8825
8826 #. type: Plain text
8827 #: build/C/man7/shm_overview.7:79
8828 msgid "To change the ownership of a shared memory object."
8829 msgstr "共有メモリオブジェクトの所有権を変更する。"
8830
8831 #. type: TP
8832 #: build/C/man7/shm_overview.7:79
8833 #, no-wrap
8834 msgid "B<fchmod>(2)"
8835 msgstr "B<fchmod>(2)"
8836
8837 #. type: Plain text
8838 #: build/C/man7/shm_overview.7:82
8839 msgid "To change the permissions of a shared memory object."
8840 msgstr "共有メモリオブジェクトの許可属性を変更する。"
8841
8842 #. type: SS
8843 #: build/C/man7/shm_overview.7:82
8844 #, no-wrap
8845 msgid "Versions"
8846 msgstr "Versions"
8847
8848 #. type: Plain text
8849 #: build/C/man7/shm_overview.7:84
8850 msgid "POSIX shared memory is supported since Linux 2.4 and glibc 2.2."
8851 msgstr "POSIX 共有メモリは Linux 2.4 と glibc 2.2 以降でサポートされている。"
8852
8853 #. type: SS
8854 #: build/C/man7/shm_overview.7:84
8855 #, no-wrap
8856 msgid "Persistence"
8857 msgstr "持続性"
8858
8859 #. type: Plain text
8860 #: build/C/man7/shm_overview.7:89
8861 msgid ""
8862 "POSIX shared memory objects have kernel persistence: a shared memory object "
8863 "will exist until the system is shut down, or until all processes have "
8864 "unmapped the object and it has been deleted with B<shm_unlink>(3)"
8865 msgstr ""
8866 "POSIX 共有メモリオブジェクトはカーネル内で保持される。 共有メモリオブジェクト"
8867 "は、システムがシャットダウンされるか、 全てのプロセスがそのオブジェクトをアン"
8868 "マップし、 B<shm_unlink>(3)  で削除されるまで、存在し続ける。"
8869
8870 #. type: SS
8871 #: build/C/man7/shm_overview.7:89
8872 #, no-wrap
8873 msgid "Linking"
8874 msgstr "リンク"
8875
8876 #. type: Plain text
8877 #: build/C/man7/shm_overview.7:94
8878 msgid ""
8879 "Programs using the POSIX shared memory API must be compiled with I<cc -lrt> "
8880 "to link against the real-time library, I<librt>."
8881 msgstr ""
8882 "POSIX 共有メモリ API を使用したプログラムは I<cc -lrt> でコンパイルし、リアル"
8883 "タイムライブラリ I<librt> とリンクしなければならない。"
8884
8885 #. type: SS
8886 #: build/C/man7/shm_overview.7:94
8887 #, fuzzy, no-wrap
8888 #| msgid "Accessing shared memory objects via the file system"
8889 msgid "Accessing shared memory objects via the filesystem"
8890 msgstr "ファイルシステム経由での共有メモリオブジェクトへのアクセス"
8891
8892 #. type: Plain text
8893 #: build/C/man7/shm_overview.7:101
8894 #, fuzzy
8895 #| msgid ""
8896 #| "On Linux, shared memory objects are created in a (I<tmpfs>)  virtual file "
8897 #| "system, normally mounted under I</dev/shm>.  Since kernel 2.6.19, Linux "
8898 #| "supports the use of access control lists (ACLs)  to control the "
8899 #| "permissions of objects in the virtual file system."
8900 msgid ""
8901 "On Linux, shared memory objects are created in a (I<tmpfs>)  virtual "
8902 "filesystem, normally mounted under I</dev/shm>.  Since kernel 2.6.19, Linux "
8903 "supports the use of access control lists (ACLs)  to control the permissions "
8904 "of objects in the virtual filesystem."
8905 msgstr ""
8906 "Linux では、共有メモリオブジェクトは通常 I</dev/shm> 以下にマウントされる仮想"
8907 "ファイルシステム (I<tmpfs>)  内に作成される。 カーネル 2.6.19 以降の Linux で"
8908 "は、 仮想ファイルシステム内のオブジェクトの許可属性の制御に、 アクセス制御リ"
8909 "スト (ACL; access control lists) を使うことができる。"
8910
8911 #. type: Plain text
8912 #: build/C/man7/shm_overview.7:106
8913 msgid ""
8914 "Typically, processes must synchronize their access to a shared memory "
8915 "object, using, for example, POSIX semaphores."
8916 msgstr ""
8917 "通常は、共有メモリオブジェクトにアクセスするプロセスは、 POSIX セマフォなどを"
8918 "使ってプロセス間で同期をとらなければならない。"
8919
8920 #. type: Plain text
8921 #: build/C/man7/shm_overview.7:114
8922 msgid ""
8923 "System V shared memory (B<shmget>(2), B<shmop>(2), etc.) is an older shared "
8924 "memory API.  POSIX shared memory provides a simpler, and better designed "
8925 "interface; on the other hand POSIX shared memory is somewhat less widely "
8926 "available (especially on older systems) than System V shared memory."
8927 msgstr ""
8928 "System V 共有メモリ (B<shmget>(2), B<shmop>(2)  など) は古い共有メモリ API で"
8929 "ある。 POSIX 共有メモリは、より簡単で、うまく設計されたインタフェースを提供し"
8930 "ている。 一方で、POSIX 共有メモリは System V 共有メモリと比べると 利用できる"
8931 "システムが少ない (特に、古いシステムでは少ない)。"
8932
8933 #. type: Plain text
8934 #: build/C/man7/shm_overview.7:127
8935 msgid ""
8936 "B<fchmod>(2), B<fchown>(2), B<fstat>(2), B<ftruncate>(2), B<mmap>(2), "
8937 "B<mprotect>(2), B<munmap>(2), B<shmget>(2), B<shmop>(2), B<shm_open>(3), "
8938 "B<shm_unlink>(3), B<sem_overview>(7)"
8939 msgstr ""
8940 "B<fchmod>(2), B<fchown>(2), B<fstat>(2), B<ftruncate>(2), B<mmap>(2), "
8941 "B<mprotect>(2), B<munmap>(2), B<shmget>(2), B<shmop>(2), B<shm_open>(3), "
8942 "B<shm_unlink>(3), B<sem_overview>(7)"
8943
8944 #. type: TH
8945 #: build/C/man2/shmctl.2:45
8946 #, no-wrap
8947 msgid "SHMCTL"
8948 msgstr "SHMCTL"
8949
8950 #. type: TH
8951 #: build/C/man2/shmctl.2:45
8952 #, no-wrap
8953 msgid "2013-03-18"
8954 msgstr "2013-03-18"
8955
8956 #. type: Plain text
8957 #: build/C/man2/shmctl.2:48
8958 msgid "shmctl - System V shared memory control"
8959 msgstr "shmctl - System V 共有メモリ (shared memory) を制御する"
8960
8961 #. type: Plain text
8962 #: build/C/man2/shmctl.2:51 build/C/man2/shmget.2:44
8963 msgid "B<#include E<lt>sys/ipc.hE<gt>>"
8964 msgstr "B<#include E<lt>sys/ipc.hE<gt>>"
8965
8966 #. type: Plain text
8967 #: build/C/man2/shmctl.2:53 build/C/man2/shmget.2:46
8968 msgid "B<#include E<lt>sys/shm.hE<gt>>"
8969 msgstr "B<#include E<lt>sys/shm.hE<gt>>"
8970
8971 #. type: Plain text
8972 #: build/C/man2/shmctl.2:55
8973 msgid ""
8974 "B<int shmctl(int >I<shmid>B<, int >I<cmd>B<, struct shmid_ds *>I<buf>B<);>"
8975 msgstr ""
8976 "B<int shmctl(int >I<shmid>B<, int >I<cmd>B<, struct shmid_ds *>I<buf>B<);>"
8977
8978 #. type: Plain text
8979 #: build/C/man2/shmctl.2:62
8980 msgid ""
8981 "B<shmctl>()  performs the control operation specified by I<cmd> on the "
8982 "System V shared memory segment whose identifier is given in I<shmid>."
8983 msgstr ""
8984 "B<shmctl>()  は、識別子が I<shmid> の System V 共有メモリ・セグメントに対し"
8985 "て I<cmd> で指示した制御命令を実行する。"
8986
8987 #. type: Plain text
8988 #: build/C/man2/shmctl.2:67
8989 msgid ""
8990 "The I<buf> argument is a pointer to a I<shmid_ds> structure, defined in "
8991 "I<E<lt>sys/shm.hE<gt>> as follows:"
8992 msgstr ""
8993 "I<buf> 引き数は、 I<shmid_ds> 構造体へのポインタである。 この構造体は "
8994 "I<E<lt>sys/shm.hE<gt>> で以下のように定義されている"
8995
8996 #. type: Plain text
8997 #: build/C/man2/shmctl.2:81
8998 #, no-wrap
8999 msgid ""
9000 "struct shmid_ds {\n"
9001 "    struct ipc_perm shm_perm;    /* Ownership and permissions */\n"
9002 "    size_t          shm_segsz;   /* Size of segment (bytes) */\n"
9003 "    time_t          shm_atime;   /* Last attach time */\n"
9004 "    time_t          shm_dtime;   /* Last detach time */\n"
9005 "    time_t          shm_ctime;   /* Last change time */\n"
9006 "    pid_t           shm_cpid;    /* PID of creator */\n"
9007 "    pid_t           shm_lpid;    /* PID of last shmat(2)/shmdt(2) */\n"
9008 "    shmatt_t        shm_nattch;  /* No. of current attaches */\n"
9009 "    ...\n"
9010 "};\n"
9011 msgstr ""
9012 "struct shmid_ds {\n"
9013 "    struct ipc_perm shm_perm;    /* 所有権と許可 */\n"
9014 "    size_t          shm_segsz;   /* セグメントのサイズ (バイト) */\n"
9015 "    time_t          shm_atime;   /* 最後の付加 (attach) の時刻 */\n"
9016 "    time_t          shm_dtime;   /* 最後の分離 (detach) の時刻 */\n"
9017 "    time_t          shm_ctime;   /* 最後に変更が行われた時刻 */\n"
9018 "    pid_t           shm_cpid;    /* 作成者 (creator) の PID */\n"
9019 "    pid_t           shm_lpid;    /* 最後の shmat(2)/shmdt(2) の PID */\n"
9020 "    shmatt_t        shm_nattch;  /* 現在付加されている数 */\n"
9021 "    ...\n"
9022 "};\n"
9023
9024 #. type: Plain text
9025 #: build/C/man2/shmctl.2:89
9026 msgid ""
9027 "The I<ipc_perm> structure is defined as follows (the highlighted fields are "
9028 "settable using B<IPC_SET>):"
9029 msgstr ""
9030 "I<ipc_perm> 構造体は以下のように定義されている (強調されたフィールドは "
9031 "B<IPC_SET> を使って設定可能である):"
9032
9033 #. type: Plain text
9034 #: build/C/man2/shmctl.2:102
9035 #, no-wrap
9036 msgid ""
9037 "struct ipc_perm {\n"
9038 "    key_t          __key;    /* Key supplied to shmget(2) */\n"
9039 "    uid_t          B<uid>;      /* Effective UID of owner */\n"
9040 "    gid_t          B<gid>;      /* Effective GID of owner */\n"
9041 "    uid_t          cuid;     /* Effective UID of creator */\n"
9042 "    gid_t          cgid;     /* Effective GID of creator */\n"
9043 "    unsigned short B<mode>;     /* B<Permissions> + SHM_DEST and\n"
9044 "                                SHM_LOCKED flags */\n"
9045 "    unsigned short __seq;    /* Sequence number */\n"
9046 "};\n"
9047 msgstr ""
9048 "struct ipc_perm {\n"
9049 "    key_t          __key;    /* shmget(2) に与えられるキー */\n"
9050 "    uid_t          B<uid>;      /* 所有者の実効 UID */\n"
9051 "    gid_t          B<gid>;      /* 所有者の実効 GID */\n"
9052 "    uid_t          cuid;     /* 作成者の実効 UID */\n"
9053 "    gid_t          cgid;     /* 作成者の実効 GID */\n"
9054 "    unsigned short B<mode>;     /* B<許可> + SHM_DEST と\n"
9055 "                                SHM_LOCKED フラグ */\n"
9056 "    unsigned short __seq;    /* シーケンス番号 */\n"
9057 "};\n"
9058
9059 #. type: Plain text
9060 #: build/C/man2/shmctl.2:108
9061 msgid "Valid values for I<cmd> are:"
9062 msgstr "I<cmd> として有効な値は以下の通り:"
9063
9064 #. type: TP
9065 #: build/C/man2/shmctl.2:109
9066 #, no-wrap
9067 msgid "B<IPC_STAT>"
9068 msgstr "B<IPC_STAT>"
9069
9070 #. type: Plain text
9071 #: build/C/man2/shmctl.2:118
9072 msgid ""
9073 "Copy information from the kernel data structure associated with I<shmid> "
9074 "into the I<shmid_ds> structure pointed to by I<buf>.  The caller must have "
9075 "read permission on the shared memory segment."
9076 msgstr ""
9077 "I<shmid> に関連づけられたカーネルデータ構造体の情報を I<buf> で指された "
9078 "I<shmid_ds> 構造体にコピーする。 呼び出し元は共有メモリ・セグメントに対する "
9079 "読み込み許可を持たなければならない。"
9080
9081 #. type: TP
9082 #: build/C/man2/shmctl.2:118
9083 #, no-wrap
9084 msgid "B<IPC_SET>"
9085 msgstr "B<IPC_SET>"
9086
9087 #. type: Plain text
9088 #: build/C/man2/shmctl.2:136
9089 msgid ""
9090 "Write the values of some members of the I<shmid_ds> structure pointed to by "
9091 "I<buf> to the kernel data structure associated with this shared memory "
9092 "segment, updating also its I<shm_ctime> member.  The following fields can be "
9093 "changed: I<shm_perm.uid>, I<shm_perm.gid>, and (the least significant 9 bits "
9094 "of) I<shm_perm.mode>.  The effective UID of the calling process must match "
9095 "the owner (I<shm_perm.uid>)  or creator (I<shm_perm.cuid>)  of the shared "
9096 "memory segment, or the caller must be privileged."
9097 msgstr ""
9098 "I<buf> によって指される I<shmid_ds> 構造体のいくつかのメンバーの値を、 この共"
9099 "有メモリ・セグメントに関連づけられたカーネルデータ構造体に書き込み、 "
9100 "I<shm_ctime> メンバーも更新する。 以下のフィールドは変更できる。 I<shm_perm."
9101 "uid>, I<shm_perm.gid>, I<shm_perm.mode> (の最下位 9 ビット)。 呼び出したプロ"
9102 "セスの実効 UID が所有者 (I<shm_perm.uid>)  または作成者 (I<shm_perm.cuid>)  "
9103 "と一致するか、呼び出し元が特権を持たなければならない。"
9104
9105 #. type: TP
9106 #: build/C/man2/shmctl.2:136
9107 #, no-wrap
9108 msgid "B<IPC_RMID>"
9109 msgstr "B<IPC_RMID>"
9110
9111 #. type: Plain text
9112 #: build/C/man2/shmctl.2:153
9113 msgid ""
9114 "Mark the segment to be destroyed.  The segment will only actually be "
9115 "destroyed after the last process detaches it (i.e., when the I<shm_nattch> "
9116 "member of the associated structure I<shmid_ds> is zero).  The caller must be "
9117 "the owner or creator, or be privileged.  If a segment has been marked for "
9118 "destruction, then the (nonstandard)  B<SHM_DEST> flag of the I<shm_perm."
9119 "mode> field in the associated data structure retrieved by B<IPC_STAT> will "
9120 "be set."
9121 msgstr ""
9122 "セグメントに破棄済みのマークを付ける。 セグメントは、実際には最後プロセスがセ"
9123 "グメントを分離した (関連する I<shmid_ds> 構造体の I<shm_nattch> メンバーが 0 "
9124 "になった) 後でのみ破棄される。 呼び出し元は所有者か作成者であるか、特権を持た"
9125 "なければならない。 セグメントに破棄のマークが付けられると、 関連するデータ構"
9126 "造体において I<shm_perm.mode> フィールドの (標準ではない)  B<SHM_DEST> フラグ"
9127 "が設定される。 このデータ構造体は B<IPC_STAT> で取得される。"
9128
9129 #. type: Plain text
9130 #: build/C/man2/shmctl.2:156
9131 msgid ""
9132 "The caller I<must> ensure that a segment is eventually destroyed; otherwise "
9133 "its pages that were faulted in will remain in memory or swap."
9134 msgstr ""
9135 "呼び出し元は最終的にはセグメントを忘れずに破棄I<しなければならない>。 そうで"
9136 "なれば、フォールト (fault) されたページは メモリかスワップ (swap) に残り続け"
9137 "る。"
9138
9139 #. type: Plain text
9140 #: build/C/man2/shmctl.2:161
9141 msgid ""
9142 "See also the description of I</proc/sys/kernel/shm_rmid_forced> in B<proc>"
9143 "(5)."
9144 msgstr "B<proc>(5) の I</proc/sys/kernel/shm_rmid_forced> の説明も参照のこと。"
9145
9146 #. type: TP
9147 #: build/C/man2/shmctl.2:161
9148 #, no-wrap
9149 msgid "B<IPC_INFO> (Linux-specific)"
9150 msgstr "B<IPC_INFO> (Linux 固有)"
9151
9152 #. type: Plain text
9153 #: build/C/man2/shmctl.2:174
9154 msgid ""
9155 "Returns information about system-wide shared memory limits and parameters in "
9156 "the structure pointed to by I<buf>.  This structure is of type I<shminfo> "
9157 "(thus, a cast is required), defined in I<E<lt>sys/shm.hE<gt>> if the "
9158 "B<_GNU_SOURCE> feature test macro is defined:"
9159 msgstr ""
9160 "システム全体での共有メモリの制限とパラメータに関する情報を、 I<buf> が指す構"
9161 "造体に入れて返す。 この構造体は I<shminfo> 型である (そのためキャストが必要で"
9162 "ある)。 I<shminfo> は B<_GNU_SOURCE> 機能検査マクロが定義された場合に "
9163 "I<E<lt>sys/shm.hE<gt>> で以下のように定義される:"
9164
9165 #. type: Plain text
9166 #: build/C/man2/shmctl.2:188
9167 #, no-wrap
9168 msgid ""
9169 "struct  shminfo {\n"
9170 "    unsigned long shmmax; /* Maximum segment size */\n"
9171 "    unsigned long shmmin; /* Minimum segment size;\n"
9172 "                             always 1 */\n"
9173 "    unsigned long shmmni; /* Maximum number of segments */\n"
9174 "    unsigned long shmseg; /* Maximum number of segments\n"
9175 "                             that a process can attach;\n"
9176 "                             unused within kernel */\n"
9177 "    unsigned long shmall; /* Maximum number of pages of\n"
9178 "                             shared memory, system-wide */\n"
9179 "};\n"
9180 msgstr ""
9181 "struct  shminfo {\n"
9182 "    unsigned long shmmax; /* 最大セグメントサイズ */\n"
9183 "    unsigned long shmmin; /* 最小セグメントサイズ。\n"
9184 "                             常に 1 */\n"
9185 "    unsigned long shmmni; /* 最大セグメント数 */\n"
9186 "    unsigned long shmseg; /* プロセスが付加できる\n"
9187 "                             セグメントの最大数。\n"
9188 "                             カーネル内では未使用 */\n"
9189 "    unsigned long shmall; /* 共有メモリの最大ページ数。\n"
9190 "                             システム全体での値 */\n"
9191 "};\n"
9192
9193 #. type: Plain text
9194 #: build/C/man2/shmctl.2:201
9195 msgid ""
9196 "The I<shmmni>, I<shmmax>, and I<shmall> settings can be changed via I</proc> "
9197 "files of the same name; see B<proc>(5)  for details."
9198 msgstr ""
9199 "設定 I<shmmni>, I<shmmax>, I<shmall> は I</proc> にある同じ名前のファイル経由"
9200 "で変更可能である。 詳しくは B<proc>(5)  を参照。"
9201
9202 #. type: TP
9203 #: build/C/man2/shmctl.2:201
9204 #, no-wrap
9205 msgid "B<SHM_INFO> (Linux-specific)"
9206 msgstr "B<SHM_INFO> (Linux 固有)"
9207
9208 #. type: Plain text
9209 #: build/C/man2/shmctl.2:212
9210 msgid ""
9211 "Returns a I<shm_info> structure whose fields contain information about "
9212 "system resources consumed by shared memory.  This structure is defined in "
9213 "I<E<lt>sys/shm.hE<gt>> if the B<_GNU_SOURCE> feature test macro is defined:"
9214 msgstr ""
9215 "共有メモリが消費しているシステム資源に関する情報を 格納した I<shm_info> 構造"
9216 "体を返す。 この構造体は、 B<_GNU_SOURCE> 機能検査マクロが定義された場合に "
9217 "I<E<lt>sys/shm.hE<gt>> で以下のように定義される:"
9218
9219 #. type: Plain text
9220 #: build/C/man2/shmctl.2:229
9221 #, no-wrap
9222 msgid ""
9223 "struct shm_info {\n"
9224 "    int           used_ids; /* # of currently existing\n"
9225 "                               segments */\n"
9226 "    unsigned long shm_tot;  /* Total number of shared\n"
9227 "                               memory pages */\n"
9228 "    unsigned long shm_rss;  /* # of resident shared\n"
9229 "                               memory pages */\n"
9230 "    unsigned long shm_swp;  /* # of swapped shared\n"
9231 "                               memory pages */\n"
9232 "    unsigned long swap_attempts;\n"
9233 "                            /* Unused since Linux 2.4 */\n"
9234 "    unsigned long swap_successes;\n"
9235 "                            /* Unused since Linux 2.4 */\n"
9236 "};\n"
9237 msgstr ""
9238 "struct shm_info {\n"
9239 "    int           used_ids; /* 現在存在するセグメント数 */\n"
9240 "    unsigned long shm_tot;  /* 共有メモリのページ総数 */\n"
9241 "    unsigned long shm_rss;  /* メモリ上にある (スワップされて\n"
9242 "                               いない) 共有メモリページ数 */\n"
9243 "    unsigned long shm_swp;  /* スワップされている共有メモリ\n"
9244 "                               ページ数 */\n"
9245 "    unsigned long swap_attempts;\n"
9246 "                            /* Linux 2.4 以降では未使用 */\n"
9247 "    unsigned long swap_successes;\n"
9248 "                            /* Linux 2.4 以降では未使用 */\n"
9249 "};\n"
9250
9251 #. type: TP
9252 #: build/C/man2/shmctl.2:231
9253 #, no-wrap
9254 msgid "B<SHM_STAT> (Linux-specific)"
9255 msgstr "B<SHM_STAT> (Linux 固有)"
9256
9257 #. type: Plain text
9258 #: build/C/man2/shmctl.2:242
9259 msgid ""
9260 "Returns a I<shmid_ds> structure as for B<IPC_STAT>.  However, the I<shmid> "
9261 "argument is not a segment identifier, but instead an index into the kernel's "
9262 "internal array that maintains information about all shared memory segments "
9263 "on the system."
9264 msgstr ""
9265 "B<IPC_STAT> と同じく I<shmid_ds> 構造体を返す。 但し、 I<shmid> 引き数は、セ"
9266 "グメント識別子ではなく、システム上の全ての共有メモリ セグメントに関する情報を"
9267 "管理するカーネルの内部配列へのインデックス である。"
9268
9269 #. type: Plain text
9270 #: build/C/man2/shmctl.2:245
9271 msgid ""
9272 "The caller can prevent or allow swapping of a shared memory segment with the "
9273 "following I<cmd> values:"
9274 msgstr ""
9275 "呼び出し元は、I<cmd> に以下の値を指定することで、共有メモリ・セグメントが ス"
9276 "ワップされることを防止したり、許可したりできる:"
9277
9278 #. type: TP
9279 #: build/C/man2/shmctl.2:246
9280 #, no-wrap
9281 msgid "B<SHM_LOCK> (Linux-specific)"
9282 msgstr "B<SHM_LOCK> (Linux 固有)"
9283
9284 #. type: Plain text
9285 #: build/C/man2/shmctl.2:258
9286 msgid ""
9287 "Prevent swapping of the shared memory segment.  The caller must fault in any "
9288 "pages that are required to be present after locking is enabled.  If a "
9289 "segment has been locked, then the (nonstandard)  B<SHM_LOCKED> flag of the "
9290 "I<shm_perm.mode> field in the associated data structure retrieved by "
9291 "B<IPC_STAT> will be set."
9292 msgstr ""
9293 "共有メモリ・セグメントをスワップすることを防止する。 ロックが有効になった後、"
9294 "呼び出し元は、 存在することが要求された全てのページをフォールトさせなければな"
9295 "らない。 セグメントがロックされると、 関連するデータ構造体において "
9296 "I<shm_perm.mode> フィールドの (標準的ではない)  B<SHM_LOCKED> フラグが設定さ"
9297 "れる。 このデータ構造体は B<IPC_STAT> で取得される。"
9298
9299 #. type: TP
9300 #: build/C/man2/shmctl.2:258
9301 #, no-wrap
9302 msgid "B<SHM_UNLOCK> (Linux-specific)"
9303 msgstr "B<SHM_UNLOCK> (Linux 固有)"
9304
9305 #. type: Plain text
9306 #: build/C/man2/shmctl.2:261
9307 msgid "Unlock the segment, allowing it to be swapped out."
9308 msgstr "セグメントのロックを解除し、スワップ・アウトすることを可能にする。"
9309
9310 #.  There was some weirdness in 2.6.9: SHM_LOCK and SHM_UNLOCK could
9311 #.  be applied to a segment, regardless of ownership of the segment.
9312 #.  This was a botch-up in the move to RLIMIT_MEMLOCK, and was fixed
9313 #.  in 2.6.10.  MTK, May 2005
9314 #. type: Plain text
9315 #: build/C/man2/shmctl.2:279
9316 msgid ""
9317 "In kernels before 2.6.10, only a privileged process could employ B<SHM_LOCK> "
9318 "and B<SHM_UNLOCK>.  Since kernel 2.6.10, an unprivileged process can employ "
9319 "these operations if its effective UID matches the owner or creator UID of "
9320 "the segment, and (for B<SHM_LOCK>)  the amount of memory to be locked falls "
9321 "within the B<RLIMIT_MEMLOCK> resource limit (see B<setrlimit>(2))."
9322 msgstr ""
9323 "2.6.10 より前のカーネルでは、特権プロセスだけが B<SHM_LOCK> と B<SHM_UNLOCK> "
9324 "を利用することができた。 2.6.10 以降のカーネルでは、非特権プロセスであっても"
9325 "次の条件を満たせば これらの操作を利用することができる。その条件とは、プロセス"
9326 "の実効 UID がそのセグメントの所有者もしくは作成者の UID と一致し、 "
9327 "(B<SHM_LOCK> の場合には) ロックするメモリの合計が B<RLIMIT_MEMLOCK> リソース"
9328 "上限 (B<setrlimit>(2)  参照) の範囲内に入っていることである。"
9329
9330 #. type: Plain text
9331 #: build/C/man2/shmctl.2:297
9332 msgid ""
9333 "A successful B<IPC_INFO> or B<SHM_INFO> operation returns the index of the "
9334 "highest used entry in the kernel's internal array recording information "
9335 "about all shared memory segments.  (This information can be used with "
9336 "repeated B<SHM_STAT> operations to obtain information about all shared "
9337 "memory segments on the system.)  A successful B<SHM_STAT> operation returns "
9338 "the identifier of the shared memory segment whose index was given in "
9339 "I<shmid>.  Other operations return 0 on success."
9340 msgstr ""
9341 "B<IPC_INFO> と B<SHM_INFO> 操作は、成功すると、全ての共有メモリセグメントに関"
9342 "する情報を 管理しているカーネルの内部配列の使用中エントリのインデックスの う"
9343 "ち最大値を返す (この情報は、システムの全ての共有メモリセグメントに関する情報"
9344 "を 取得するために、 B<SHM_STAT> 操作を繰り返し実行する際に使用できる)。 "
9345 "B<SHM_STAT> 操作は、成功すると、 I<shmid> で指定されたインデックスを持つ共有"
9346 "メモリセグメントの識別子を返す。 他の操作は、成功の場合 0 を返す。"
9347
9348 #. type: Plain text
9349 #: build/C/man2/shmctl.2:301
9350 msgid "On error, -1 is returned, and I<errno> is set appropriately."
9351 msgstr "エラーの場合は -1 を返し、 I<errno> を適切に設定する。"
9352
9353 #. type: Plain text
9354 #: build/C/man2/shmctl.2:310
9355 msgid ""
9356 "B<IPC_STAT> or B<SHM_STAT> is requested and I<shm_perm.mode> does not allow "
9357 "read access for I<shmid>, and the calling process does not have the "
9358 "B<CAP_IPC_OWNER> capability."
9359 msgstr ""
9360 "B<IPC_STAT> または B<SHM_STAT> が要求され、 I<shm_perm.mode> が I<shmid> への"
9361 "読み込みアクセスを許しておらず、 かつ呼び出したプロセスが B<CAP_IPC_OWNER> "
9362 "ケーパビリティ (capability) を持っていない。"
9363
9364 #. type: Plain text
9365 #: build/C/man2/shmctl.2:321
9366 msgid ""
9367 "The argument I<cmd> has value B<IPC_SET> or B<IPC_STAT> but the address "
9368 "pointed to by I<buf> isn't accessible."
9369 msgstr ""
9370 "I<cmd> 引き数に B<IPC_SET> か B<IPC_STAT> が指定されたが I<buf> で指されてい"
9371 "るアドレスにアクセスできない。"
9372
9373 #. type: TP
9374 #: build/C/man2/shmctl.2:321 build/C/man2/shmop.2:197
9375 #, no-wrap
9376 msgid "B<EIDRM>"
9377 msgstr "B<EIDRM>"
9378
9379 #. type: Plain text
9380 #: build/C/man2/shmctl.2:324 build/C/man2/shmop.2:200
9381 msgid "I<shmid> points to a removed identifier."
9382 msgstr "I<shmid> が削除 (remove) された識別子 (identifier) を指している。"
9383
9384 #. type: Plain text
9385 #: build/C/man2/shmctl.2:333
9386 msgid ""
9387 "I<shmid> is not a valid identifier, or I<cmd> is not a valid command.  Or: "
9388 "for a B<SHM_STAT> operation, the index value specified in I<shmid> referred "
9389 "to an array slot that is currently unused."
9390 msgstr ""
9391 "I<shmid> が有効な識別子でないか、 I<cmd> が有効なコマンドでない。 もしくは、 "
9392 "B<SHM_STAT> 操作の場合に、 I<shmid> で指定されたインデックス値が現在未使用の"
9393 "配列のスロットを参照していた。"
9394
9395 #. type: Plain text
9396 #: build/C/man2/shmctl.2:344
9397 msgid ""
9398 "(In kernels since 2.6.9), B<SHM_LOCK> was specified and the size of the to-"
9399 "be-locked segment would mean that the total bytes in locked shared memory "
9400 "segments would exceed the limit for the real user ID of the calling "
9401 "process.  This limit is defined by the B<RLIMIT_MEMLOCK> soft resource limit "
9402 "(see B<setrlimit>(2))."
9403 msgstr ""
9404 "(2.6.9 以降のカーネルにおいて)  B<SHM_LOCK> が指定され、 ロックされる予定のセ"
9405 "グメントのサイズ (ロックされる共有メモリ・セグメントの合計バイト数) が、 呼び"
9406 "出したプロセスの実ユーザー ID についての制限を超えた。 この制限は "
9407 "B<RLIMIT_MEMLOCK> ソフト資源制限で定義される (B<setrlimit>(2)  を参照)。"
9408
9409 #. type: Plain text
9410 #: build/C/man2/shmctl.2:349
9411 msgid ""
9412 "B<IPC_STAT> is attempted, and the GID or UID value is too large to be stored "
9413 "in the structure pointed to by I<buf>."
9414 msgstr ""
9415 "B<IPC_STAT> が試みられ、GID や UID の値が I<buf> で指示される構造体に格納する"
9416 "には大き過ぎる。"
9417
9418 #. type: Plain text
9419 #: build/C/man2/shmctl.2:361
9420 msgid ""
9421 "B<IPC_SET> or B<IPC_RMID> is attempted, and the effective user ID of the "
9422 "calling process is not that of the creator (found in I<shm_perm.cuid>), or "
9423 "the owner (found in I<shm_perm.uid>), and the process was not privileged "
9424 "(Linux: did not have the B<CAP_SYS_ADMIN> capability)."
9425 msgstr ""
9426 "B<IPC_SET> か B<IPC_RMID> が試みられ、 呼び出したプロセスの実効ユーザー ID が"
9427 "作成者 (I<shm_perm.cuid>)  でも所有者 (I<shm_perm.uid>)  でもなく、プロセスが"
9428 "特権を持たない (Linux では B<CAP_SYS_ADMIN> ケーパビリティを持たない)。"
9429
9430 #. type: Plain text
9431 #: build/C/man2/shmctl.2:373
9432 msgid ""
9433 "Or (in kernels before 2.6.9), B<SHM_LOCK> or B<SHM_UNLOCK> was specified, "
9434 "but the process was not privileged (Linux: did not have the B<CAP_IPC_LOCK> "
9435 "capability).  (Since Linux 2.6.9, this error can also occur if the "
9436 "B<RLIMIT_MEMLOCK> is 0 and the caller is not privileged.)"
9437 msgstr ""
9438 "または (2.6.9 より前のカーネルで)  B<SHM_LOCK> または B<SHM_UNLOCK> が指定さ"
9439 "れているが、プロセスが特権を持たない (Linux では B<CAP_IPC_LOCK> ケーパビリ"
9440 "ティを持たない)。 (Linux 2.6.9 以降では、 B<RLIMIT_MEMLOCK> が 0 で呼び出し元"
9441 "が特権を持たない場合にも、このエラーが起こる。)"
9442
9443 #.  SVr4 documents an additional error condition EMFILE.
9444 #. type: Plain text
9445 #: build/C/man2/shmctl.2:378 build/C/man2/shmget.2:235
9446 #: build/C/man2/shmop.2:234
9447 msgid "SVr4, POSIX.1-2001."
9448 msgstr "SVr4, POSIX.1-2001."
9449
9450 #.  Like Linux, the FreeBSD man pages still document
9451 #.  the inclusion of these header files.
9452 #. type: Plain text
9453 #: build/C/man2/shmctl.2:391 build/C/man2/shmget.2:251
9454 msgid ""
9455 "The inclusion of I<E<lt>sys/types.hE<gt>> and I<E<lt>sys/ipc.hE<gt>> isn't "
9456 "required on Linux or by any version of POSIX.  However, some old "
9457 "implementations required the inclusion of these header files, and the SVID "
9458 "also documented their inclusion.  Applications intended to be portable to "
9459 "such old systems may need to include these header files."
9460 msgstr ""
9461 "Linux や POSIX の全てのバージョンでは、 I<E<lt>sys/types.hE<gt>> と "
9462 "I<E<lt>sys/ipc.hE<gt>> のインクルードは必要ない。しかしながら、いくつかの古い"
9463 "実装ではこれらのヘッダファイルのインクルードが必要であり、 SVID でもこれらの"
9464 "インクルードをするように記載されている。このような古いシステムへの移植性を意"
9465 "図したアプリケーションではこれらのファイルをインクルードする必要があるかもし"
9466 "れない。"
9467
9468 #. type: Plain text
9469 #: build/C/man2/shmctl.2:403
9470 #, fuzzy
9471 #| msgid ""
9472 #| "The B<IPC_INFO>, B<SHM_STAT> and B<SHM_INFO> operations are used by the "
9473 #| "B<ipcs>(1)  program to provide information on allocated resources.  In "
9474 #| "the future these may modified or moved to a /proc file system interface."
9475 msgid ""
9476 "The B<IPC_INFO>, B<SHM_STAT> and B<SHM_INFO> operations are used by the "
9477 "B<ipcs>(1)  program to provide information on allocated resources.  In the "
9478 "future these may modified or moved to a I</proc> filesystem interface."
9479 msgstr ""
9480 "B<IPC_INFO>, B<SHM_STAT>, B<SHM_INFO> 操作は、 B<ipcs>(1)  プログラムで割り当"
9481 "て済の資源に関する情報を提供するために 使用されている。将来、これらの操作は変"
9482 "更されたり、 /proc ファイルシステムのインタフェースに移動されるかもしれない。"
9483
9484 #. type: Plain text
9485 #: build/C/man2/shmctl.2:411
9486 msgid ""
9487 "Linux permits a process to attach (B<shmat>(2))  a shared memory segment "
9488 "that has already been marked for deletion using I<shmctl(IPC_RMID)>.  This "
9489 "feature is not available on other UNIX implementations; portable "
9490 "applications should avoid relying on it."
9491 msgstr ""
9492 "Linux では、 I<shmctl(IPC_RMID)> を使ってすでに削除マークがつけられている共有"
9493 "メモリ・セグメントを あるプロセスが付加 (attach)  (B<shmat>(2))  することを許"
9494 "可している。 この機能は他の UNIX の実装では利用できない。 移植性を考慮したア"
9495 "プリケーションではこれに依存しないようにすべきである。"
9496
9497 #. type: Plain text
9498 #: build/C/man2/shmctl.2:424
9499 msgid ""
9500 "Various fields in a I<struct shmid_ds> were typed as I<short> under Linux "
9501 "2.2 and have become I<long> under Linux 2.4.  To take advantage of this, a "
9502 "recompilation under glibc-2.1.91 or later should suffice.  (The kernel "
9503 "distinguishes old and new calls by an B<IPC_64> flag in I<cmd>.)"
9504 msgstr ""
9505 "I<構造体 shmid_ds> 内の多くのフィールドは、 Linux 2.2 では I<short> 型だった"
9506 "が、Linux 2.4 では I<long> 型になった。 この利点を生かすには、glibc-2.1.91 以"
9507 "降の環境下で 再コンパイルすれば十分である。 カーネルは新しい形式の呼び出しと"
9508 "古い形式の呼び出しを I<cmd> 内の B<IPC_64> フラグで区別する。"
9509
9510 #. type: Plain text
9511 #: build/C/man2/shmctl.2:431
9512 msgid ""
9513 "B<mlock>(2), B<setrlimit>(2), B<shmget>(2), B<shmop>(2), B<capabilities>(7), "
9514 "B<svipc>(7)"
9515 msgstr ""
9516 "B<mlock>(2), B<setrlimit>(2), B<shmget>(2), B<shmop>(2), B<capabilities>(7), "
9517 "B<shm_overview>(7), B<svipc>(7)"
9518
9519 #. type: TH
9520 #: build/C/man2/shmget.2:38
9521 #, no-wrap
9522 msgid "SHMGET"
9523 msgstr "SHMGET"
9524
9525 #. type: Plain text
9526 #: build/C/man2/shmget.2:41
9527 msgid "shmget - allocates a System V shared memory segment"
9528 msgstr "shmget - System V 共有メモリ・セグメントを割り当てる"
9529
9530 #. type: Plain text
9531 #: build/C/man2/shmget.2:48
9532 msgid "B<int shmget(key_t >I<key>B<, size_t >I<size>B<, int >I<shmflg>B<);>"
9533 msgstr "B<int shmget(key_t >I<key>B<, size_t >I<size>B<, int >I<shmflg>B<);>"
9534
9535 #. type: Plain text
9536 #: build/C/man2/shmget.2:72
9537 msgid ""
9538 "B<shmget>()  returns the identifier of the System V shared memory segment "
9539 "associated with the value of the argument I<key>.  A new shared memory "
9540 "segment, with size equal to the value of I<size> rounded up to a multiple of "
9541 "B<PAGE_SIZE>, is created if I<key> has the value B<IPC_PRIVATE> or I<key> "
9542 "isn't B<IPC_PRIVATE>, no shared memory segment corresponding to I<key> "
9543 "exists, and B<IPC_CREAT> is specified in I<shmflg>."
9544 msgstr ""
9545 "B<shmget>()  は I<key> 引き数に対応する System V 共有メモリ・セグメントの識別"
9546 "子を返す。 I<key> の値が B<IPC_PRIVATE> の場合、もしくは I<key> に対応する共"
9547 "有メモリ・セグメントが存在せず、 I<shmflg> に B<IPC_CREAT> が指定されていた場"
9548 "合、 新しい共有メモリ・セグメントを作成する。 作成される共有メモリ・セグメン"
9549 "トは、 I<size> 引き数の値を B<PAGE_SIZE> の倍数へと切り上げた (round up) 大き"
9550 "さとなる。"
9551
9552 #. type: Plain text
9553 #: build/C/man2/shmget.2:91
9554 msgid ""
9555 "If I<shmflg> specifies both B<IPC_CREAT> and B<IPC_EXCL> and a shared memory "
9556 "segment already exists for I<key>, then B<shmget>()  fails with I<errno> set "
9557 "to B<EEXIST>.  (This is analogous to the effect of the combination B<O_CREAT "
9558 "| O_EXCL> for B<open>(2).)"
9559 msgstr ""
9560 "I<shmflg> に B<IPC_CREAT> と B<IPC_EXCL> の両方が指定された場合、 I<key> に対"
9561 "応する共有メモリ・セグメントが既に存在すると、 B<shmget>()  は失敗し、 "
9562 "I<errno> に B<EEXIST> が設定される (これは B<open>(2)  に B<O_CREAT | "
9563 "O_EXCL> を指定した場合の動作と同じである)。"
9564
9565 #. type: Plain text
9566 #: build/C/man2/shmget.2:95
9567 msgid "The value I<shmflg> is composed of:"
9568 msgstr "I<shmflg> は以下の内容から構成される:"
9569
9570 #. type: TP
9571 #: build/C/man2/shmget.2:95
9572 #, no-wrap
9573 msgid "B<IPC_CREAT>"
9574 msgstr "B<IPC_CREAT>"
9575
9576 #. type: Plain text
9577 #: build/C/man2/shmget.2:102
9578 msgid ""
9579 "to create a new segment.  If this flag is not used, then B<shmget>()  will "
9580 "find the segment associated with I<key> and check to see if the user has "
9581 "permission to access the segment."
9582 msgstr ""
9583 "新しいセグメントを作成する。このフラグが指定されなかった場合、 B<shmget>()  "
9584 "は I<key> に対応するセグメントを探し、 ユーザがそのセグメントにアクセスする許"
9585 "可があるかどうかをチェックする。"
9586
9587 #. type: TP
9588 #: build/C/man2/shmget.2:102
9589 #, no-wrap
9590 msgid "B<IPC_EXCL>"
9591 msgstr "B<IPC_EXCL>"
9592
9593 #. type: Plain text
9594 #: build/C/man2/shmget.2:105
9595 msgid "used with B<IPC_CREAT> to ensure failure if the segment already exists."
9596 msgstr ""
9597 "B<IPC_CREAT> と共に使用し、セグメントが既に存在した場合には 失敗することを保"
9598 "証する。"
9599
9600 #. type: TP
9601 #: build/C/man2/shmget.2:105
9602 #, no-wrap
9603 msgid "I<mode_flags>"
9604 msgstr "I<mode_flags>"
9605
9606 #. type: Plain text
9607 #: build/C/man2/shmget.2:115
9608 msgid ""
9609 "(least significant 9 bits)  specifying the permissions granted to the owner, "
9610 "group, and world.  These bits have the same format, and the same meaning, as "
9611 "the I<mode> argument of B<open>(2).  Presently, the execute permissions are "
9612 "not used by the system."
9613 msgstr ""
9614 "(下位 9 ビット)  所有者、グループ、他人 (world) への許可を指定する。 これらの"
9615 "ビットは B<open>(2)  の I<mode> 引き数と同じ形式で同じ意味を持つ。 今のとこ"
9616 "ろ、システムは実行 (execute) 許可を参照しない。"
9617
9618 #. type: TP
9619 #: build/C/man2/shmget.2:115
9620 #, no-wrap
9621 msgid "B<SHM_HUGETLB> (since Linux 2.6)"
9622 msgstr "B<SHM_HUGETLB> (Linux 2.6 以降)"
9623
9624 #. type: Plain text
9625 #: build/C/man2/shmget.2:121
9626 msgid ""
9627 "Allocate the segment using \"huge pages.\" See the Linux kernel source file "
9628 "I<Documentation/vm/hugetlbpage.txt> for further information."
9629 msgstr ""
9630 "\"ヒュージページ (huge page)\" を使うセグメントを割り当てる。詳細な情報は、"
9631 "Linux カーネルソースのファイル I<Documentation/vm/hugetlbpage.txt> を参照。"
9632
9633 #. type: TP
9634 #: build/C/man2/shmget.2:121
9635 #, no-wrap
9636 msgid "B<SHM_NORESERVE> (since Linux 2.6.15)"
9637 msgstr "B<SHM_NORESERVE> (Linux 2.6.15 以降)"
9638
9639 #.  As at 2.6.17-rc2, this flag has no effect if SHM_HUGETLB was also
9640 #.  specified.
9641 #. type: Plain text
9642 #: build/C/man2/shmget.2:140
9643 msgid ""
9644 "This flag serves the same purpose as the B<mmap>(2)  B<MAP_NORESERVE> flag.  "
9645 "Do not reserve swap space for this segment.  When swap space is reserved, "
9646 "one has the guarantee that it is possible to modify the segment.  When swap "
9647 "space is not reserved one might get B<SIGSEGV> upon a write if no physical "
9648 "memory is available.  See also the discussion of the file I</proc/sys/vm/"
9649 "overcommit_memory> in B<proc>(5)."
9650 msgstr ""
9651 "このフラグは、 B<mmap>(2)  の B<MAP_NORESERVE> フラグと同じ役割を果たす。 こ"
9652 "のセグメントに対するスワップ空間の予約を行わない。 スワップ空間を予約した場合"
9653 "は、そのセグメントの変更が必ず成功することが 保証される。スワップ空間の予約を"
9654 "行わなかった場合は、物理メモリに空きが ないと書き込み時に B<SIGSEGV> を受け取"
9655 "る可能性がある。 B<proc>(5)  にある I</proc/sys/vm/overcommit_memory> ファイ"
9656 "ルに関する議論も参照のこと。"
9657
9658 #. type: Plain text
9659 #: build/C/man2/shmget.2:148
9660 msgid ""
9661 "When a new shared memory segment is created, its contents are initialized to "
9662 "zero values, and its associated data structure, I<shmid_ds> (see B<shmctl>"
9663 "(2)), is initialized as follows:"
9664 msgstr ""
9665 "共有メモリ・セグメントが新たに作成される際、 共有メモリ・セグメントの内容は "
9666 "0 で初期化され、 関連情報を保持するデータ構造体 I<shmid_ds> は以下のように初"
9667 "期化される。"
9668
9669 #. type: Plain text
9670 #: build/C/man2/shmget.2:153
9671 msgid ""
9672 "I<shm_perm.cuid> and I<shm_perm.uid> are set to the effective user ID of the "
9673 "calling process."
9674 msgstr ""
9675 "I<shm_perm.cuid> と I<shm_perm.uid> に呼び出し元プロセスの実効 (effective) "
9676 "ユーザーID を設定する。"
9677
9678 #. type: Plain text
9679 #: build/C/man2/shmget.2:158
9680 msgid ""
9681 "I<shm_perm.cgid> and I<shm_perm.gid> are set to the effective group ID of "
9682 "the calling process."
9683 msgstr ""
9684 "I<shm_perm.cgid> と I<shm_perm.gid> に呼び出し元プロセスの実効グループID を設"
9685 "定する。"
9686
9687 #. type: Plain text
9688 #: build/C/man2/shmget.2:163
9689 msgid ""
9690 "The least significant 9 bits of I<shm_perm.mode> are set to the least "
9691 "significant 9 bit of I<shmflg>."
9692 msgstr ""
9693 "I<shm_perm.mode> の下位 9 ビットに I<shmflg> の下位 9 ビットを設定する。"
9694
9695 #. type: Plain text
9696 #: build/C/man2/shmget.2:167
9697 msgid "I<shm_segsz> is set to the value of I<size>."
9698 msgstr "I<shm_segsz> に I<size> の値を設定する。"
9699
9700 #. type: Plain text
9701 #: build/C/man2/shmget.2:174
9702 msgid "I<shm_lpid>, I<shm_nattch>, I<shm_atime> and I<shm_dtime> are set to 0."
9703 msgstr ""
9704 "I<shm_lpid>, I<shm_nattch>, I<shm_atime>, I<shm_dtime> に 0 を設定する。"
9705
9706 #. type: Plain text
9707 #: build/C/man2/shmget.2:177
9708 msgid "I<shm_ctime> is set to the current time."
9709 msgstr "I<shm_ctime> に現在の時刻を設定する。"
9710
9711 #. type: Plain text
9712 #: build/C/man2/shmget.2:180
9713 msgid ""
9714 "If the shared memory segment already exists, the permissions are verified, "
9715 "and a check is made to see if it is marked for destruction."
9716 msgstr ""
9717 "共有メモリ・セグメントが既に存在する場合、アクセス許可の検査と、 破壊 "
9718 "(destruction) マークがつけられていないかのチェックが行われる。"
9719
9720 #. type: Plain text
9721 #: build/C/man2/shmget.2:185
9722 msgid ""
9723 "On success, a valid shared memory identifier is returned.  On errir, -1 is "
9724 "returned, and I<errno> is set to indicate the error."
9725 msgstr ""
9726 "成功の場合、有効な共有メモリ・セグメントの識別子が返される。 エラーの場合、 "
9727 "-1 が返り、 I<error> にエラーを示す値が設定される。"
9728
9729 #. type: Plain text
9730 #: build/C/man2/shmget.2:189
9731 msgid "On failure, I<errno> is set to one of the following:"
9732 msgstr "失敗した場合は I<errno> が以下のどれかに設定される:"
9733
9734 #. type: Plain text
9735 #: build/C/man2/shmget.2:195
9736 msgid ""
9737 "The user does not have permission to access the shared memory segment, and "
9738 "does not have the B<CAP_IPC_OWNER> capability."
9739 msgstr ""
9740 "ユーザーはその共有メモリ・セグメントへのアクセス許可を持たず、 "
9741 "B<CAP_IPC_OWNER> ケーパビリティも持っていない。"
9742
9743 #. type: Plain text
9744 #: build/C/man2/shmget.2:199
9745 msgid "B<IPC_CREAT | IPC_EXCL> was specified and the segment exists."
9746 msgstr ""
9747 "B<IPC_CREAT | IPC_EXCL> が指定されていたが、そのセグメントが既に存在する。"
9748
9749 #. type: Plain text
9750 #: build/C/man2/shmget.2:205
9751 msgid ""
9752 "A new segment was to be created and I<size> E<lt> B<SHMMIN> or I<size> E<gt> "
9753 "B<SHMMAX>, or no new segment was to be created, a segment with given key "
9754 "existed, but I<size> is greater than the size of that segment."
9755 msgstr ""
9756 "新しいセグメントを作成しようとした際に I<size> E<lt> B<SHMMIN> または "
9757 "I<size> E<gt> B<SHMMAX> であった。 もしくは、指定されたキーに対応するセグメン"
9758 "トが既に存在して、新しい セグメントを作成しようとはしなかったが、I<size> が存"
9759 "在するセグメントの サイズよりも大きかった。"
9760
9761 #. type: Plain text
9762 #: build/C/man2/shmget.2:214
9763 msgid ""
9764 "No segment exists for the given I<key>, and B<IPC_CREAT> was not specified."
9765 msgstr ""
9766 "指定された I<key> に対応するセグメントが存在せず、 B<IPC_CREAT> も指定されて"
9767 "いなかった。"
9768
9769 #. type: Plain text
9770 #: build/C/man2/shmget.2:217
9771 msgid "No memory could be allocated for segment overhead."
9772 msgstr "セグメントの管理情報 (overhead) に割り当てるメモリがなかった。"
9773
9774 #. type: Plain text
9775 #: build/C/man2/shmget.2:225
9776 msgid ""
9777 "All possible shared memory IDs have been taken (B<SHMMNI>), or allocating a "
9778 "segment of the requested I<size> would cause the system to exceed the system-"
9779 "wide limit on shared memory (B<SHMALL>)."
9780 msgstr ""
9781 "システム全体の共有メモリ・セグメント数の制限 (B<SHMMNI>)  に達した、または要"
9782 "求された I<size> のセグメントの割り当てが システム全体の共有メモリサイズの制"
9783 "限 (B<SHMALL>)  を超過した。"
9784
9785 #. type: Plain text
9786 #: build/C/man2/shmget.2:232
9787 msgid ""
9788 "The B<SHM_HUGETLB> flag was specified, but the caller was not privileged "
9789 "(did not have the B<CAP_IPC_LOCK> capability)."
9790 msgstr ""
9791 "B<SHM_HUGETLB> フラグが指定されたが、呼び出し元には権限がなかった "
9792 "(B<CAP_IPC_LOCK> ケーパビリティを持っていなかった)。"
9793
9794 #. type: Plain text
9795 #: build/C/man2/shmget.2:238
9796 msgid "B<SHM_HUGETLB> is a nonportable Linux extension."
9797 msgstr "B<SHM_HUGETLB> は Linux での拡張であり、移植性はない。"
9798
9799 #. type: Plain text
9800 #: build/C/man2/shmget.2:261
9801 msgid ""
9802 "B<IPC_PRIVATE> isn't a flag field but a I<key_t> type.  If this special "
9803 "value is used for I<key>, the system call ignores everything but the least "
9804 "significant 9 bits of I<shmflg> and creates a new shared memory segment (on "
9805 "success)."
9806 msgstr ""
9807 "B<IPC_PRIVATE> はフラグではなく I<key_t> 型である。 この特別な値が I<key> に"
9808 "使用された場合は、 B<shmget>()  は I<shmflg> の下位 9 ビットを除いた全てを無"
9809 "視し、 (成功すれば) 新しい共有メモリ・セグメントを作成する。"
9810
9811 #. type: Plain text
9812 #: build/C/man2/shmget.2:265
9813 msgid ""
9814 "The following limits on shared memory segment resources affect the B<shmget>"
9815 "()  call:"
9816 msgstr ""
9817 "B<shmget>()  コールに影響する共有メモリ・セグメント資源の制限は以下の通りであ"
9818 "る:"
9819
9820 #. type: TP
9821 #: build/C/man2/shmget.2:265
9822 #, no-wrap
9823 msgid "B<SHMALL>"
9824 msgstr "B<SHMALL>"
9825
9826 #. type: Plain text
9827 #: build/C/man2/shmget.2:270
9828 msgid ""
9829 "System wide maximum of shared memory pages (on Linux, this limit can be read "
9830 "and modified via I</proc/sys/kernel/shmall>)."
9831 msgstr ""
9832 "システム全体の共有メモリ・ページの最大数 (Linux では、この上限値は I</proc/"
9833 "sys/kernel/shmall> 経由で参照したり、変更したりできる)。"
9834
9835 #. type: TP
9836 #: build/C/man2/shmget.2:270
9837 #, no-wrap
9838 msgid "B<SHMMAX>"
9839 msgstr "B<SHMMAX>"
9840
9841 #. type: Plain text
9842 #: build/C/man2/shmget.2:275
9843 msgid ""
9844 "Maximum size in bytes for a shared memory segment: policy dependent (on "
9845 "Linux, this limit can be read and modified via I</proc/sys/kernel/shmmax>)."
9846 msgstr ""
9847 "共有メモリ・セグメントのバイト単位の大きさの上限: 方針依存 (Linux では、この"
9848 "上限値は I</proc/sys/kernel/shmmax> 経由で参照したり、変更したりできる)。"
9849
9850 #. type: TP
9851 #: build/C/man2/shmget.2:275
9852 #, no-wrap
9853 msgid "B<SHMMIN>"
9854 msgstr "B<SHMMIN>"
9855
9856 #. type: Plain text
9857 #: build/C/man2/shmget.2:281
9858 msgid ""
9859 "Minimum size in bytes for a shared memory segment: implementation dependent "
9860 "(currently 1 byte, though B<PAGE_SIZE> is the effective minimum size)."
9861 msgstr ""
9862 "共有メモリ・セグメントのバイト単位の大きさの下限: 実装依存 (現在は 1 バイトだ"
9863 "が、実質的な最小サイズは B<PAGE_SIZE> である)。"
9864
9865 #. type: TP
9866 #: build/C/man2/shmget.2:281
9867 #, no-wrap
9868 msgid "B<SHMMNI>"
9869 msgstr "B<SHMMNI>"
9870
9871 #.  Kernels between 2.4.x and 2.6.8 had an off-by-one error that meant
9872 #.  that we could create one more segment than SHMMNI -- MTK
9873 #.  This /proc file is not available in Linux 2.2 and earlier -- MTK
9874 #. type: Plain text
9875 #: build/C/man2/shmget.2:290
9876 msgid ""
9877 "System wide maximum number of shared memory segments: implementation "
9878 "dependent (currently 4096, was 128 before Linux 2.3.99; on Linux, this limit "
9879 "can be read and modified via I</proc/sys/kernel/shmmni>)."
9880 msgstr ""
9881 "システム全体の共有メモリーの数の上限: 実装依存 (現在は 4096。Linux 2.3.99 よ"
9882 "り前では 128。 Linux では、この上限値は I</proc/sys/kernel/shmmni> 経由で参照"
9883 "したり、変更したりできる)。"
9884
9885 #. type: Plain text
9886 #: build/C/man2/shmget.2:294
9887 msgid ""
9888 "The implementation has no specific limits for the per-process maximum number "
9889 "of shared memory segments (B<SHMSEG>)."
9890 msgstr ""
9891 "プロセス当りの共有メモリ・セグメントの個数の最大値 (B<SHMSEG>)  に関する実装"
9892 "上の制限はない。"
9893
9894 #. type: Plain text
9895 #: build/C/man2/shmget.2:300
9896 msgid ""
9897 "Until version 2.3.30 Linux would return B<EIDRM> for a B<shmget>()  on a "
9898 "shared memory segment scheduled for deletion."
9899 msgstr ""
9900 "バージョン 2.3.30 までは、Linux は 削除が予定されている共有メモリ・セグメント"
9901 "に対して B<shmget>()  が行われると B<EIDRM> を返していた。"
9902
9903 #. type: Plain text
9904 #: build/C/man2/shmget.2:306
9905 msgid ""
9906 "The name choice B<IPC_PRIVATE> was perhaps unfortunate, B<IPC_NEW> would "
9907 "more clearly show its function."
9908 msgstr ""
9909 "B<IPC_PRIVATE> という名前を選んだのはおそらく失敗であろう。 B<IPC_NEW> の方が"
9910 "より明確にその機能を表しているだろう。"
9911
9912 #. type: Plain text
9913 #: build/C/man2/shmget.2:314
9914 msgid ""
9915 "B<shmat>(2), B<shmctl>(2), B<shmdt>(2), B<ftok>(3), B<capabilities>(7), "
9916 "B<shm_overview>(7), B<svipc>(7)"
9917 msgstr ""
9918 "B<shmat>(2), B<shmctl>(2), B<shmdt>(2), B<ftok>(3), B<capabilities>(7), "
9919 "B<shm_overview>(7), B<svipc>(7)"
9920
9921 #. type: TH
9922 #: build/C/man2/shmop.2:41
9923 #, no-wrap
9924 msgid "SHMOP"
9925 msgstr "SHMOP"
9926
9927 #. type: Plain text
9928 #: build/C/man2/shmop.2:44
9929 msgid "shmat, shmdt - System V shared memory operations"
9930 msgstr "shmat, shmdt - System V 共有メモリ (shared memory) の操作"
9931
9932 #. type: Plain text
9933 #: build/C/man2/shmop.2:48
9934 #, no-wrap
9935 msgid ""
9936 "B<#include E<lt>sys/types.hE<gt>>\n"
9937 "B<#include E<lt>sys/shm.hE<gt>>\n"
9938 msgstr ""
9939 "B<#include E<lt>sys/types.hE<gt>>\n"
9940 "B<#include E<lt>sys/shm.hE<gt>>\n"
9941
9942 #. type: Plain text
9943 #: build/C/man2/shmop.2:50
9944 #, no-wrap
9945 msgid "B<void *shmat(int >I<shmid>B<, const void *>I<shmaddr>B<, int >I<shmflg>B<);>\n"
9946 msgstr "B<void *shmat(int >I<shmid>B<, const void *>I<shmaddr>B<, int >I<shmflg>B<);>\n"
9947
9948 #. type: Plain text
9949 #: build/C/man2/shmop.2:52
9950 #, no-wrap
9951 msgid "B<int shmdt(const void *>I<shmaddr>B<);>\n"
9952 msgstr "B<int shmdt(const void *>I<shmaddr>B<);>\n"
9953
9954 #. type: Plain text
9955 #: build/C/man2/shmop.2:61
9956 msgid ""
9957 "B<shmat>()  attaches the System V shared memory segment identified by "
9958 "I<shmid> to the address space of the calling process.  The attaching address "
9959 "is specified by I<shmaddr> with one of the following criteria:"
9960 msgstr ""
9961 "B<shmat>()  は I<shmid> で指定された System V 共有メモリ・セグメント (shared "
9962 "memory segment) を コールしたプロセスのアドレス空間に付加 (attach) する。 付"
9963 "加するアドレスは I<shmaddr> に以下のどれかの形式で指定する:"
9964
9965 #. type: Plain text
9966 #: build/C/man2/shmop.2:67
9967 msgid ""
9968 "If I<shmaddr> is NULL, the system chooses a suitable (unused) address at "
9969 "which to attach the segment."
9970 msgstr ""
9971 "I<shmaddr> が NULL ならば、システムはセグメントを付加するための 適切な (使用"
9972 "されていない) アドレスを選択する。"
9973
9974 #. type: Plain text
9975 #: build/C/man2/shmop.2:82
9976 msgid ""
9977 "If I<shmaddr> isn't NULL and B<SHM_RND> is specified in I<shmflg>, the "
9978 "attach occurs at the address equal to I<shmaddr> rounded down to the nearest "
9979 "multiple of B<SHMLBA>.  Otherwise I<shmaddr> must be a page-aligned address "
9980 "at which the attach occurs."
9981 msgstr ""
9982 "I<shmaddr> が NULL でなく B<SHM_RND> が I<shmflg> に指定されている場合は、 "
9983 "I<shmaddr> を B<SHMLBA> の倍数へと切り捨てた (rounding down) のと等しいアドレ"
9984 "スへ付加する。 その他の場合は I<shmaddr> は付加を行なうアドレスで、ページ境界"
9985 "を指している必要がある。"
9986
9987 #. type: Plain text
9988 #: build/C/man2/shmop.2:92
9989 msgid ""
9990 "If B<SHM_RDONLY> is specified in I<shmflg>, the segment is attached for "
9991 "reading and the process must have read permission for the segment.  "
9992 "Otherwise the segment is attached for read and write and the process must "
9993 "have read and write permission for the segment.  There is no notion of a "
9994 "write-only shared memory segment."
9995 msgstr ""
9996 "B<SHM_RDONLY> が I<shmflg> に指定されていた場合は、 セグメントは読み込み専用"
9997 "に付加され、プロセスはそのセグメントへの 読み込み許可を持たなければならな"
9998 "い。 そうでなければそのセグメントは読み込みと書き込みのために付加され、 プロ"
9999 "セスはそのセグメントに読み込みと書き込みの許可を持つ必要がある。 書き込み専用"
10000 "の共有メモリ・セグメントという概念は存在しない。"
10001
10002 #. type: Plain text
10003 #: build/C/man2/shmop.2:107
10004 msgid ""
10005 "The (Linux-specific)  B<SHM_REMAP> flag may be specified in I<shmflg> to "
10006 "indicate that the mapping of the segment should replace any existing mapping "
10007 "in the range starting at I<shmaddr> and continuing for the size of the "
10008 "segment.  (Normally an B<EINVAL> error would result if a mapping already "
10009 "exists in this address range.)  In this case, I<shmaddr> must not be NULL."
10010 msgstr ""
10011 "(Linux 特有の)  B<SHM_REMAP> フラグが I<shmflg> に指定された場合は、 セグメン"
10012 "トのマッピングを既存のマッピングに置き換える。 マッピングの範囲は、 "
10013 "I<shmaddr> から始まりセグメントのサイズ分だけある (通常 B<EINVAL> エラーは、"
10014 "このアドレス範囲にマッピングが既に存在するために起る)。 このフラグを指定する"
10015 "場合は、 I<shmaddr> が NULL であってはならない。"
10016
10017 #. type: Plain text
10018 #: build/C/man2/shmop.2:114
10019 msgid ""
10020 "The B<brk>(2)  value of the calling process is not altered by the attach.  "
10021 "The segment will automatically be detached at process exit.  The same "
10022 "segment may be attached as a read and as a read-write one, and more than "
10023 "once, in the process's address space."
10024 msgstr ""
10025 "呼び出したプロセスの B<brk>(2)  の値は付加によって変化しない。 そのセグメント"
10026 "はプロセスが終了 (exit) したら自動的に分離 (detach) される。 同じセグメントを"
10027 "プロセスのアドレス空間に、読み込み専用および読み書き両用 として付加でき、また"
10028 "複数回付加することもできる。"
10029
10030 #. type: Plain text
10031 #: build/C/man2/shmop.2:122
10032 msgid ""
10033 "A successful B<shmat>()  call updates the members of the I<shmid_ds> "
10034 "structure (see B<shmctl>(2))  associated with the shared memory segment as "
10035 "follows:"
10036 msgstr ""
10037 "成功した B<shmat>()  コールは共有メモリ・セグメントに関連する I<shmid_ds> 構"
10038 "造体 (B<shmctl>(2)  を参照) のメンバーを以下のように更新する:"
10039
10040 #. type: Plain text
10041 #: build/C/man2/shmop.2:125
10042 msgid "I<shm_atime> is set to the current time."
10043 msgstr "I<shm_atime> には現在の時刻を設定する。"
10044
10045 #. type: Plain text
10046 #: build/C/man2/shmop.2:128 build/C/man2/shmop.2:154
10047 msgid "I<shm_lpid> is set to the process-ID of the calling process."
10048 msgstr "I<shm_lpid> には呼び出したプロセスのプロセス ID が設定される。"
10049
10050 #. type: Plain text
10051 #: build/C/man2/shmop.2:131
10052 msgid "I<shm_nattch> is incremented by one."
10053 msgstr "I<shm_nattch> を 1 増加させる。"
10054
10055 #. type: Plain text
10056 #: build/C/man2/shmop.2:142
10057 msgid ""
10058 "B<shmdt>()  detaches the shared memory segment located at the address "
10059 "specified by I<shmaddr> from the address space of the calling process.  The "
10060 "to-be-detached segment must be currently attached with I<shmaddr> equal to "
10061 "the value returned by the attaching B<shmat>()  call."
10062 msgstr ""
10063 "B<shmdt>()  は呼び出したプロセスのアドレス空間から I<shmaddr> で指定されたア"
10064 "ドレスに配置された共有メモリ・セグメントを分離 (detach) する。 分離する共有メ"
10065 "モリ・セグメントは、現在 I<shmaddr> に付加されているものでなければならない。 "
10066 "I<shmaddr> は、それを付加した時に B<shmat>()  が返した値に等しくなければなら"
10067 "ない。"
10068
10069 #. type: Plain text
10070 #: build/C/man2/shmop.2:148
10071 msgid ""
10072 "On a successful B<shmdt>()  call the system updates the members of the "
10073 "I<shmid_ds> structure associated with the shared memory segment as follows:"
10074 msgstr ""
10075 "成功した B<shmdt>()  コールはその共有メモリ・セグメントに関連する "
10076 "I<shmid_ds> 構造体のメンバーを以下のように更新する:"
10077
10078 #. type: Plain text
10079 #: build/C/man2/shmop.2:151
10080 msgid "I<shm_dtime> is set to the current time."
10081 msgstr "I<shm_dtime> には現在の時刻が設定される。"
10082
10083 #. type: Plain text
10084 #: build/C/man2/shmop.2:159
10085 msgid ""
10086 "I<shm_nattch> is decremented by one.  If it becomes 0 and the segment is "
10087 "marked for deletion, the segment is deleted."
10088 msgstr ""
10089 "I<shm_nattch> を 1 減少させる。 もし 0 になり、削除マークがあった場合は その"
10090 "セグメントは削除される。"
10091
10092 #. type: Plain text
10093 #: build/C/man2/shmop.2:163
10094 msgid ""
10095 "After a B<fork>(2)  the child inherits the attached shared memory segments."
10096 msgstr ""
10097 "B<fork>(2)  した後、子プロセスは付加された共有メモリ・セグメントを継承する。"
10098
10099 #. type: Plain text
10100 #: build/C/man2/shmop.2:167
10101 msgid ""
10102 "After an B<execve>(2)  all attached shared memory segments are detached from "
10103 "the process."
10104 msgstr ""
10105 "B<exec>(2)  した後、全ての付加された共有メモリ・セグメントはプロセスから分離"
10106 "される。"
10107
10108 #. type: Plain text
10109 #: build/C/man2/shmop.2:171
10110 msgid ""
10111 "Upon B<_exit>(2)  all attached shared memory segments are detached from the "
10112 "process."
10113 msgstr ""
10114 "B<exit>(2)  において、全ての付加された共有メモリ・セグメントはプロセスから分"
10115 "離される。"
10116
10117 #. type: Plain text
10118 #: build/C/man2/shmop.2:179
10119 msgid ""
10120 "On success B<shmat>()  returns the address of the attached shared memory "
10121 "segment; on error I<(void\\ *)\\ -1> is returned, and I<errno> is set to "
10122 "indicate the cause of the error."
10123 msgstr ""
10124 "B<shmat>()  は、成功した場合、 付加された共有メモリ・セグメントのアドレスを返"
10125 "す。 エラーの場合、 I<(void\\ *)\\ -1> を返し、 I<errno> にエラーの原因を示す"
10126 "値を設定する。"
10127
10128 #. type: Plain text
10129 #: build/C/man2/shmop.2:185
10130 msgid ""
10131 "On success B<shmdt>()  returns 0; on error -1 is returned, and I<errno> is "
10132 "set to indicate the cause of the error."
10133 msgstr ""
10134 "B<shmdt>()  は、成功すると 0 を返す。 エラーの場合、-1 を返し、 I<errno> にエ"
10135 "ラーの原因を示す値を設定する。"
10136
10137 #. type: Plain text
10138 #: build/C/man2/shmop.2:191
10139 msgid "When B<shmat>()  fails, I<errno> is set to one of the following:"
10140 msgstr ""
10141 "B<shmat>()  が失敗した場合、 I<errno> に以下の値のどれかを設定して返す:"
10142
10143 #. type: Plain text
10144 #: build/C/man2/shmop.2:197
10145 msgid ""
10146 "The calling process does not have the required permissions for the requested "
10147 "attach type, and does not have the B<CAP_IPC_OWNER> capability."
10148 msgstr ""
10149 "呼び出したプロセスに要求された種類の付加に必要な許可がなく、 "
10150 "B<CAP_IPC_OWNER> ケーパビリティ (capability) がない。"
10151
10152 #. type: Plain text
10153 #: build/C/man2/shmop.2:214
10154 msgid ""
10155 "Invalid I<shmid> value, unaligned (i.e., not page-aligned and B<SHM_RND> was "
10156 "not specified) or invalid I<shmaddr> value, or can't attach segment at "
10157 "I<shmaddr>, or B<SHM_REMAP> was specified and I<shmaddr> was NULL."
10158 msgstr ""
10159 "I<shmid> の値が不正である。 I<shmaddr> の値が境界違反 (unaligned) (つまり、"
10160 "ページ境界に合っておらず、 B<SHM_RND> が指定されていない) または が不正であ"
10161 "る。 I<shmaddr> へのセグメントの付加に失敗した。 または B<SHM_REMAP> が指定さ"
10162 "れているが、 I<shmaddr> が NULL であった。"
10163
10164 #. type: Plain text
10165 #: build/C/man2/shmop.2:217
10166 msgid "Could not allocate memory for the descriptor or for the page tables."
10167 msgstr ""
10168 "ディスクリプター (descriptor) やページ・テーブルのためのメモリを 割り当てるこ"
10169 "とができない。"
10170
10171 #. type: Plain text
10172 #: build/C/man2/shmop.2:223
10173 msgid "When B<shmdt>()  fails, I<errno> is set as follows:"
10174 msgstr "B<shmdt>()  が失敗した場合、 B<EINVAL> は以下のようにセットされる:"
10175
10176 #.  The following since 2.6.17-rc1:
10177 #. type: Plain text
10178 #: build/C/man2/shmop.2:231
10179 msgid ""
10180 "There is no shared memory segment attached at I<shmaddr>; or, I<shmaddr> is "
10181 "not aligned on a page boundary."
10182 msgstr ""
10183 "I<shmaddr> に付加された共有メモリ・セグメントが存在しない。 もしくは、 "
10184 "I<shmaddr> がページ境界に合っていない。"
10185
10186 #. type: Plain text
10187 #: build/C/man2/shmop.2:250
10188 msgid ""
10189 "In SVID 3 (or perhaps earlier)  the type of the I<shmaddr> argument was "
10190 "changed from I<char\\ *> into I<const void\\ *>, and the returned type of "
10191 "B<shmat>()  from I<char\\ *> into I<void\\ *>.  (Linux libc4 and libc5 have "
10192 "the I<char\\ *> prototypes; glibc2 has I<void\\ *>.)"
10193 msgstr ""
10194 "SVID 3 で (たぶんそれより前だと思うが)  I<shmaddr> 引き数の型は I<char\\ *> "
10195 "から I<const void\\ *> に、I<shmat>() の返り値の型は I<char\\ *> から I<void"
10196 "\\ *> に変更された (Linux では libc4 と libc5 のプロトタイプは I<char\\ *> で"
10197 "あり、glibc2 のプロトタイプは I<void\\ *> である)。"
10198
10199 #. type: Plain text
10200 #: build/C/man2/shmop.2:262
10201 msgid ""
10202 "Using B<shmat>()  with I<shmaddr> equal to NULL is the preferred, portable "
10203 "way of attaching a shared memory segment.  Be aware that the shared memory "
10204 "segment attached in this way may be attached at different addresses in "
10205 "different processes.  Therefore, any pointers maintained within the shared "
10206 "memory must be made relative (typically to the starting address of the "
10207 "segment), rather than absolute."
10208 msgstr ""
10209 "共有メモリセグメントを付加する場合の移植性の高い方法としては、 I<shmaddr> を "
10210 "NULL にして B<shmat>()  を使用するのがよい。 このような方法で付加される共有メ"
10211 "モリセグメントは、 プロセスが異なれば別のアドレスに付加される、という点に注意"
10212 "すること。 よって共有メモリ内で管理されるポインタは、 絶対アドレスではなく、 "
10213 "(一般的にはセグメントの開始アドレスからの)  相対アドレスで作成するべきであ"
10214 "る。"
10215
10216 #. type: Plain text
10217 #: build/C/man2/shmop.2:267
10218 msgid ""
10219 "On Linux, it is possible to attach a shared memory segment even if it is "
10220 "already marked to be deleted.  However, POSIX.1-2001 does not specify this "
10221 "behavior and many other implementations do not support it."
10222 msgstr ""
10223 "Linux では共有メモリセグメントに既に削除マークが付けられていても、 その共有メ"
10224 "モリセグメントを付加することができる。 しかし POSIX.1-2001 ではこのような動作"
10225 "を指定しておらず、 他の多くの実装もこれをサポートしていない。"
10226
10227 #. type: Plain text
10228 #: build/C/man2/shmop.2:270
10229 msgid "The following system parameter affects B<shmat>():"
10230 msgstr "以下のシステム・パラメーターは、 B<shmat>()  に影響する:"
10231
10232 #.  FIXME A good explanation of the rationale for the existence
10233 #.  of SHMLBA would be useful here
10234 #. type: TP
10235 #: build/C/man2/shmop.2:270
10236 #, no-wrap
10237 msgid "B<SHMLBA>"
10238 msgstr "B<SHMLBA>"
10239
10240 #.  FIXME That last sentence isn't true for all Linux
10241 #.  architectures (i.e., SHMLBA != PAGE_SIZE for some architectures)
10242 #.  -- MTK, Nov 04
10243 #. type: Plain text
10244 #: build/C/man2/shmop.2:283
10245 msgid ""
10246 "Segment low boundary address multiple.  Must be page aligned.  For the "
10247 "current implementation the B<SHMLBA> value is B<PAGE_SIZE>."
10248 msgstr ""
10249 "セグメントの境界アドレスの最小倍数。ページ境界に合ってなければならない。 現在"
10250 "の実装では B<SHMLBA> の値は B<PAGE_SIZE> である。"
10251
10252 #. type: Plain text
10253 #: build/C/man2/shmop.2:287
10254 msgid ""
10255 "The implementation places no intrinsic limit on the per-process maximum "
10256 "number of shared memory segments (B<SHMSEG>)."
10257 msgstr ""
10258 "現在の実装では、プロセスごとの 共有メモリ・セグメントの最大数 (B<SHMSEG>)  に"
10259 "関する実装依存の制限はない。"
10260
10261 #. type: Plain text
10262 #: build/C/man2/shmop.2:295
10263 msgid ""
10264 "B<brk>(2), B<mmap>(2), B<shmctl>(2), B<shmget>(2), B<capabilities>(7), "
10265 "B<shm_overview>(7), B<svipc>(7)"
10266 msgstr ""
10267 "B<brk>(2), B<mmap>(2), B<shmctl>(2), B<shmget>(2), B<capabilities>(7), "
10268 "B<shm_overview>(7), B<svipc>(7)"
10269
10270 #. type: TH
10271 #: build/C/man2/subpage_prot.2:30
10272 #, no-wrap
10273 msgid "SUBPAGE_PROT"
10274 msgstr "SUBPAGE_PROT"
10275
10276 #. type: TH
10277 #: build/C/man2/subpage_prot.2:30
10278 #, no-wrap
10279 msgid "2012-07-13"
10280 msgstr "2012-07-13"
10281
10282 #. type: Plain text
10283 #: build/C/man2/subpage_prot.2:33
10284 msgid "subpage_prot - define a subpage protection for an address range"
10285 msgstr ""
10286
10287 #. type: Plain text
10288 #: build/C/man2/subpage_prot.2:37
10289 #, no-wrap
10290 msgid ""
10291 "B<long subpage_prot(unsigned long >I<addr>B<, unsigned long >I<len>B<,>\n"
10292 "B<                  uint32_t *>I<map>B<);>\n"
10293 msgstr ""
10294 "B<long subpage_prot(unsigned long >I<addr>B<, unsigned long >I<len>B<,>\n"
10295 "B<                  uint32_t *>I<map>B<);>\n"
10296
10297 #. type: Plain text
10298 #: build/C/man2/subpage_prot.2:41
10299 msgid "I<Note>: There is no glibc wrapper for this system call; see NOTES."
10300 msgstr ""
10301 "I<注>: このシステムコールには glibc のラッパー関数は存在しない。「注意」の節"
10302 "を参照。"
10303
10304 #. type: Plain text
10305 #: build/C/man2/subpage_prot.2:47
10306 msgid ""
10307 "The PowerPC-specific B<subpage_prot>()  system call provides the facility to "
10308 "control the access permissions on individual 4kB subpages on systems "
10309 "configured with a page size of 64kB."
10310 msgstr ""
10311
10312 #. type: Plain text
10313 #: build/C/man2/subpage_prot.2:54
10314 msgid ""
10315 "The protection map is applied to the memory pages in the region starting at "
10316 "I<addr> and continuing for I<len> bytes.  Both of these arguments must be "
10317 "aligned to a 64-kB boundary."
10318 msgstr ""
10319
10320 #. type: Plain text
10321 #: build/C/man2/subpage_prot.2:66
10322 msgid ""
10323 "The protection map is specified in the buffer pointed to by I<map>.  The map "
10324 "has 2 bits per 4kB subpage; thus each 32-bit word specifies the protections "
10325 "of 16 4kB subpages inside a 64kB page (so, the number of 32-bit words "
10326 "pointed to by I<map> should equate to the number of 64-kB pages specified by "
10327 "I<len>).  Each 2-bit field in the protection map is either 0 to allow any "
10328 "access, 1 to prevent writes, or 2 or 3 to prevent all accesses."
10329 msgstr ""
10330
10331 #. type: Plain text
10332 #: build/C/man2/subpage_prot.2:71
10333 msgid ""
10334 "On success, B<subpage_prot>()  returns 0.  Otherwise, one of the error codes "
10335 "specified below is returned."
10336 msgstr ""
10337
10338 #. type: Plain text
10339 #: build/C/man2/subpage_prot.2:77
10340 msgid "The buffer referred to by I<map> is not accessible."
10341 msgstr ""
10342
10343 #. type: Plain text
10344 #: build/C/man2/subpage_prot.2:87
10345 msgid ""
10346 "The I<addr> or I<len> arguments are incorrect.  Both of these arguments must "
10347 "be aligned to a multiple of the system page size, and they must not refer to "
10348 "a region outside of the address space of the process or to a region that "
10349 "consists of huge pages."
10350 msgstr ""
10351
10352 #. type: Plain text
10353 #: build/C/man2/subpage_prot.2:90 build/C/man2/sync_file_range.2:166
10354 msgid "Out of memory."
10355 msgstr "メモリ不足である。"
10356
10357 #. type: Plain text
10358 #: build/C/man2/subpage_prot.2:96
10359 msgid ""
10360 "This system call is provided on the PowerPC architecture since Linux "
10361 "2.6.25.  The system call is provided only if the kernel is configured with "
10362 "B<CONFIG_PPC_64K_PAGES>.  No library support is provided."
10363 msgstr ""
10364
10365 #. type: Plain text
10366 #: build/C/man2/subpage_prot.2:101
10367 msgid ""
10368 "Glibc does not provide a wrapper for this system call; call it using "
10369 "B<syscall>(2)."
10370 msgstr ""
10371
10372 #. type: Plain text
10373 #: build/C/man2/subpage_prot.2:106
10374 msgid ""
10375 "Normal page protections (at the 64-kB page level) also apply; the subpage "
10376 "protection mechanism is an additional constraint, so putting 0 in a 2-bit "
10377 "field won't allow writes to a page that is otherwise write-protected."
10378 msgstr ""
10379
10380 #. type: SS
10381 #: build/C/man2/subpage_prot.2:106
10382 #, no-wrap
10383 msgid "Rationale"
10384 msgstr ""
10385
10386 #.  In the initial implementation, it was the case that:
10387 #.      In fact the whole process is switched to use 4k hardware pages when the
10388 #.      subpage_prot system call is used, but this could be improved in future
10389 #.      to switch only the affected segments.
10390 #.  But Paul Mackerass says (Oct 2010): I'm pretty sure we now only switch
10391 #.  the affected segment, not the whole process.
10392 #. type: Plain text
10393 #: build/C/man2/subpage_prot.2:128
10394 msgid ""
10395 "This system call is provided to assist writing emulators that operate using "
10396 "64-kB pages on PowerPC systems.  When emulating systems such as x86, which "
10397 "uses a smaller page size, the emulator can no longer use the memory-"
10398 "management unit (MMU)  and normal system calls for controlling page "
10399 "protections.  (The emulator could emulate the MMU by checking and possibly "
10400 "remapping the address for each memory access in software, but that is "
10401 "slow.)  The idea is that the emulator supplies an array of protection masks "
10402 "to apply to a specified range of virtual addresses.  These masks are applied "
10403 "at the level where hardware page-table entries (PTEs)  are inserted into the "
10404 "hardware page table based on the Linux PTEs, so the Linux PTEs are not "
10405 "affected.  Implicit in this is that the regions of the address space that "
10406 "are protected are switched to use 4-kB hardware pages rather than 64-kB "
10407 "hardware pages (on machines with hardware 64-kB page support)."
10408 msgstr ""
10409
10410 #. type: Plain text
10411 #: build/C/man2/subpage_prot.2:131
10412 msgid "B<mprotect>(2), B<syscall>(2)"
10413 msgstr "B<mprotect>(2), B<syscall>(2)"
10414
10415 #. type: Plain text
10416 #: build/C/man2/subpage_prot.2:134
10417 msgid "I<Documentation/vm/hugetlbpage.txt> in the Linux kernel source tree"
10418 msgstr "Linux カーネルソースの I<Documentation/vm/hugetlbpage.txt>"
10419
10420 #. type: TH
10421 #: build/C/man2/sync_file_range.2:30
10422 #, no-wrap
10423 msgid "SYNC_FILE_RANGE"
10424 msgstr "SYNC_FILE_RANGE"
10425
10426 #. type: Plain text
10427 #: build/C/man2/sync_file_range.2:33
10428 msgid "sync_file_range - sync a file segment with disk"
10429 msgstr "sync_file_range - ファイルセグメントをディスクと同期する"
10430
10431 #. type: Plain text
10432 #: build/C/man2/sync_file_range.2:37
10433 #, no-wrap
10434 msgid ""
10435 "B<#define _GNU_SOURCE>         /* See feature_test_macros(7) */\n"
10436 "B<#include E<lt>fcntl.hE<gt>>\n"
10437 msgstr ""
10438 "B<#define _GNU_SOURCE>         /* feature_test_macros(7) 参照 */\n"
10439 "B<#include E<lt>fcntl.hE<gt>>\n"
10440
10441 #. type: Plain text
10442 #: build/C/man2/sync_file_range.2:40
10443 #, no-wrap
10444 msgid ""
10445 "B<int sync_file_range(int >I<fd>B<, off64_t >I<offset>B<, off64_t >I<nbytes>B<,>\n"
10446 "B<                    unsigned int >I<flags>B<);>\n"
10447 msgstr ""
10448 "B<int sync_file_range(int >I<fd>B<, off64_t >I<offset>B<, off64_t >I<nbytes>B<,>\n"
10449 "B<                    unsigned int >I<flags>B<);>\n"
10450
10451 #. type: Plain text
10452 #: build/C/man2/sync_file_range.2:47
10453 msgid ""
10454 "B<sync_file_range>()  permits fine control when synchronizing the open file "
10455 "referred to by the file descriptor I<fd> with disk."
10456 msgstr ""
10457 "B<sync_file_range>()  を使うと、ファイルディスクリプタ I<fd> で参照されるオー"
10458 "プンされたファイルのディスクとの同期に関して、 きめ細かな制御が可能となる。"
10459
10460 #. type: Plain text
10461 #: build/C/man2/sync_file_range.2:61
10462 msgid ""
10463 "I<offset> is the starting byte of the file range to be synchronized.  "
10464 "I<nbytes> specifies the length of the range to be synchronized, in bytes; if "
10465 "I<nbytes> is zero, then all bytes from I<offset> through to the end of file "
10466 "are synchronized.  Synchronization is in units of the system page size: "
10467 "I<offset> is rounded down to a page boundary; I<(offset+nbytes-1)> is "
10468 "rounded up to a page boundary."
10469 msgstr ""
10470 "I<offset> は、同期を行うファイルの領域の開始バイトである。 I<nbytes> には同期"
10471 "を行う領域の長さをバイト単位で指定する。 I<nbytes> が 0 の場合は、 I<offset> "
10472 "からファイル末尾までの全バイトを同期する。 同期はシステムのページサイズの単位"
10473 "で行われる。 I<offset> はページ境界にあわせて切り下げられ、 I<(offset"
10474 "+nbytes-1)> はページ境界にあわせて切り上げられる。"
10475
10476 #. type: Plain text
10477 #: build/C/man2/sync_file_range.2:65
10478 msgid "The I<flags> bit-mask argument can include any of the following values:"
10479 msgstr "ビットマスク引き数 I<flags> には以下の値を指定することができる:"
10480
10481 #. type: TP
10482 #: build/C/man2/sync_file_range.2:65
10483 #, no-wrap
10484 msgid "B<SYNC_FILE_RANGE_WAIT_BEFORE>"
10485 msgstr "B<SYNC_FILE_RANGE_WAIT_BEFORE>"
10486
10487 #. type: Plain text
10488 #: build/C/man2/sync_file_range.2:70
10489 msgid ""
10490 "Wait upon write-out of all pages in the specified range that have already "
10491 "been submitted to the device driver for write-out before performing any "
10492 "write."
10493 msgstr ""
10494 "何らかの書き込みを行う前に、指定された領域のページで 書き出しを行うようにデバ"
10495 "イスドライバにすでに要求が発行されている ページの書き出しが全て完了するのを待"
10496 "つ。"
10497
10498 #. type: TP
10499 #: build/C/man2/sync_file_range.2:70 build/C/man2/sync_file_range.2:120
10500 #, no-wrap
10501 msgid "B<SYNC_FILE_RANGE_WRITE>"
10502 msgstr "B<SYNC_FILE_RANGE_WRITE>"
10503
10504 #. type: Plain text
10505 #: build/C/man2/sync_file_range.2:76
10506 msgid ""
10507 "Initiate write-out of all dirty pages in the specified range which are not "
10508 "presently submitted write-out.  Note that even this may block if you attempt "
10509 "to write more than request queue size."
10510 msgstr ""
10511 "指定された領域のページで、書き出し要求が発行されていない 全ての dirty (キャッ"
10512 "シュだけが変更されている) ページの 書き出しを開始する。 リクエストキューの大"
10513 "きさより多く書き込もうとした場合には、 この処理は停止 (block) する可能性があ"
10514 "る点に注意すること。"
10515
10516 #. type: TP
10517 #: build/C/man2/sync_file_range.2:76
10518 #, no-wrap
10519 msgid "B<SYNC_FILE_RANGE_WAIT_AFTER>"
10520 msgstr "B<SYNC_FILE_RANGE_WAIT_AFTER>"
10521
10522 #. type: Plain text
10523 #: build/C/man2/sync_file_range.2:80
10524 msgid ""
10525 "Wait upon write-out of all pages in the range after performing any write."
10526 msgstr ""
10527 "何らかの書き込み後に、指定された領域の全てのページの 書き出しが行われるのを待"
10528 "つ。"
10529
10530 #. type: Plain text
10531 #: build/C/man2/sync_file_range.2:84
10532 msgid "Specifying I<flags> as 0 is permitted, as a no-op."
10533 msgstr "I<flags> に 0 を指定した場合、何もしないことを表す。"
10534
10535 #. type: SS
10536 #: build/C/man2/sync_file_range.2:84
10537 #, no-wrap
10538 msgid "Warning"
10539 msgstr "警告"
10540
10541 #. type: Plain text
10542 #: build/C/man2/sync_file_range.2:100
10543 #, fuzzy
10544 #| msgid ""
10545 #| "This system call is extremely dangerous and should not be used in "
10546 #| "portable programs.  None of these operations writes out the file's "
10547 #| "metadata.  Therefore, unless the application is strictly performing "
10548 #| "overwrites of already-instantiated disk blocks, there are no guarantees "
10549 #| "that the data will be available after a crash.  There is no user "
10550 #| "interface to know if a write is purely an overwrite.  On file systems "
10551 #| "using copy-on-write semantics (e.g., I<btrfs>)  an overwrite of existing "
10552 #| "allocated blocks is impossible.  When writing into preallocated space, "
10553 #| "many file systems also require calls into the block allocator, which this "
10554 #| "system call does not sync out to disk.  This system call does not flush "
10555 #| "disk write caches and thus does not provide any data integrity on systems "
10556 #| "with volatile disk write caches."
10557 msgid ""
10558 "This system call is extremely dangerous and should not be used in portable "
10559 "programs.  None of these operations writes out the file's metadata.  "
10560 "Therefore, unless the application is strictly performing overwrites of "
10561 "already-instantiated disk blocks, there are no guarantees that the data will "
10562 "be available after a crash.  There is no user interface to know if a write "
10563 "is purely an overwrite.  On filesystems using copy-on-write semantics (e.g., "
10564 "I<btrfs>)  an overwrite of existing allocated blocks is impossible.  When "
10565 "writing into preallocated space, many filesystems also require calls into "
10566 "the block allocator, which this system call does not sync out to disk.  This "
10567 "system call does not flush disk write caches and thus does not provide any "
10568 "data integrity on systems with volatile disk write caches."
10569 msgstr ""
10570 "このシステムコールは非常に危険であり、 移植性が必要なプログラムで使用すべきで"
10571 "はない。 これらの操作ではどれもファイルのメタデータの書き出しを行わない。 し"
10572 "たがって、アプリケーションにより作成済みのディスクブロックの 上書きの実行が確"
10573 "実に行われない限り、クラッシュの後でもデータが 利用できる保証はない。 書き込"
10574 "みが上書きだけであるかを知るためのユーザインタフェースは存在しない。 "
10575 "(I<btrfs> などの) copy-on-write 動作を使ったファイルシステムでは、 既存の割り"
10576 "当て済みのブロックに対する上書き自体ができない。 前もって割り当てられた領域に"
10577 "書き込みを行う場合、 多くのファイルシステムでは block allocator への書き込み"
10578 "も必要となるが、 このシステムコールは block allocator のディスクへの同期を行"
10579 "わない。 このシステムコールはディスク書き込みキャッシュのフラッシュを 行わな"
10580 "いので、揮発性のディスク書き込みキャッシュを使ったシステムでは このシステム"
10581 "コールではデータの一貫性を確保できないことになる。"
10582
10583 #. type: SS
10584 #: build/C/man2/sync_file_range.2:100
10585 #, no-wrap
10586 msgid "Some details"
10587 msgstr "詳細"
10588
10589 #. type: Plain text
10590 #: build/C/man2/sync_file_range.2:108
10591 msgid ""
10592 "B<SYNC_FILE_RANGE_WAIT_BEFORE> and B<SYNC_FILE_RANGE_WAIT_AFTER> will detect "
10593 "any I/O errors or B<ENOSPC> conditions and will return these to the caller."
10594 msgstr ""
10595 "B<SYNC_FILE_RANGE_WAIT_BEFORE> と B<SYNC_FILE_RANGE_WAIT_AFTER> は I/O エラー"
10596 "や B<ENOSPC> 状態を検出し、呼び出し元にこれらの情報を返す。"
10597
10598 #. type: Plain text
10599 #: build/C/man2/sync_file_range.2:112
10600 msgid "Useful combinations of the I<flags> bits are:"
10601 msgstr "I<flags> の役に立つビットの組み合わせを以下に示す:"
10602
10603 #. type: TP
10604 #: build/C/man2/sync_file_range.2:112
10605 #, no-wrap
10606 msgid "B<SYNC_FILE_RANGE_WAIT_BEFORE | SYNC_FILE_RANGE_WRITE>"
10607 msgstr "B<SYNC_FILE_RANGE_WAIT_BEFORE | SYNC_FILE_RANGE_WRITE>"
10608
10609 #. type: Plain text
10610 #: build/C/man2/sync_file_range.2:120
10611 msgid ""
10612 "Ensures that all pages in the specified range which were dirty when "
10613 "B<sync_file_range>()  was called are placed under write-out.  This is a "
10614 "start-write-for-data-integrity operation."
10615 msgstr ""
10616 "指定された範囲内のページで、 B<sync_file_range>()  が呼び出された際に dirty "
10617 "であった全てのページが、 確実に書き出し対象となるようにする。 これは、start-"
10618 "write-for-data-integrity 操作 (データ完全性確保のための書き込み開始の操作) で"
10619 "ある。"
10620
10621 #. type: Plain text
10622 #: build/C/man2/sync_file_range.2:127
10623 msgid ""
10624 "Start write-out of all dirty pages in the specified range which are not "
10625 "presently under write-out.  This is an asynchronous flush-to-disk "
10626 "operation.  This is not suitable for data integrity operations."
10627 msgstr ""
10628 "指定された範囲内のページで、現在書き出し中でない全ての dirty ページの 書き出"
10629 "しを開始する。これは非同期のディスクへのフラッシュ (flush-to-disk)  操作であ"
10630 "る。データ完全性確保が必要な操作としては適切ではない。"
10631
10632 #. type: TP
10633 #: build/C/man2/sync_file_range.2:127
10634 #, no-wrap
10635 msgid "B<SYNC_FILE_RANGE_WAIT_BEFORE> (or B<SYNC_FILE_RANGE_WAIT_AFTER>)"
10636 msgstr "B<SYNC_FILE_RANGE_WAIT_BEFORE> (or B<SYNC_FILE_RANGE_WAIT_AFTER>)"
10637
10638 #. type: Plain text
10639 #: build/C/man2/sync_file_range.2:134
10640 msgid ""
10641 "Wait for completion of write-out of all pages in the specified range.  This "
10642 "can be used after an earlier B<SYNC_FILE_RANGE_WAIT_BEFORE | "
10643 "SYNC_FILE_RANGE_WRITE> operation to wait for completion of that operation, "
10644 "and obtain its result."
10645 msgstr ""
10646 "指定された範囲内の全てのページの書き出しの完了を待つ。 このフラグは、前に行わ"
10647 "れた操作 B<SYNC_FILE_RANGE_WAIT_BEFORE | SYNC_FILE_RANGE_WRITE> の後に使用で"
10648 "き、この操作の完了を待ち、結果を取得することができる。"
10649
10650 #. type: TP
10651 #: build/C/man2/sync_file_range.2:134
10652 #, no-wrap
10653 msgid "B<SYNC_FILE_RANGE_WAIT_BEFORE | SYNC_FILE_RANGE_WRITE | SYNC_FILE_RANGE_WAIT_AFTER>"
10654 msgstr "B<SYNC_FILE_RANGE_WAIT_BEFORE | SYNC_FILE_RANGE_WRITE | SYNC_FILE_RANGE_WAIT_AFTER>"
10655
10656 #. type: Plain text
10657 #: build/C/man2/sync_file_range.2:141
10658 msgid ""
10659 "This is a write-for-data-integrity operation that will ensure that all pages "
10660 "in the specified range which were dirty when B<sync_file_range>()  was "
10661 "called are committed to disk."
10662 msgstr ""
10663 "これは write-for-data-integrity 操作 (データ完全性確保のための書き込み) であ"
10664 "り、指定された範囲内の、 B<sync_file_range>()  が呼ばれた時点で dirty な全て"
10665 "のページが ディスクに格納されることが保証される。"
10666
10667 #. type: Plain text
10668 #: build/C/man2/sync_file_range.2:147
10669 msgid ""
10670 "On success, B<sync_file_range>()  returns 0; on failure -1 is returned and "
10671 "I<errno> is set to indicate the error."
10672 msgstr ""
10673 "成功の場合、 B<sync_file_range>()  は 0 を返す。失敗の場合、-1 を返し、 "
10674 "I<error> にエラーを示す値を設定する。"
10675
10676 #. type: Plain text
10677 #: build/C/man2/sync_file_range.2:152
10678 msgid "I<fd> is not a valid file descriptor."
10679 msgstr "I<fd> が有効なファイルディスクリプタではない。"
10680
10681 #. type: Plain text
10682 #: build/C/man2/sync_file_range.2:160
10683 msgid ""
10684 "I<flags> specifies an invalid bit; or I<offset> or I<nbytes> is invalid."
10685 msgstr ""
10686 "I<flags> に不正なビットが指定されている。または I<offset> か I<nbytes> が不正"
10687 "である。"
10688
10689 #. type: Plain text
10690 #: build/C/man2/sync_file_range.2:163
10691 msgid "I/O error."
10692 msgstr "I/O エラー。"
10693
10694 #. type: Plain text
10695 #: build/C/man2/sync_file_range.2:169
10696 msgid "Out of disk space."
10697 msgstr "ディスク領域不足である。"
10698
10699 #.  FIXME . (bug?) Actually, how can 'fd' refer to a symbolic link (S_ISLNK)?
10700 #.  (In user space at least) it isn't possible to obtain a file descriptor
10701 #.  for a symbolic link.
10702 #. type: Plain text
10703 #: build/C/man2/sync_file_range.2:177
10704 msgid ""
10705 "I<fd> refers to something other than a regular file, a block device, a "
10706 "directory, or a symbolic link."
10707 msgstr ""
10708 "I<fd> が、通常のファイル、ブロックデバイス、ディレクトリ、シンボリックリンク "
10709 "以外のものを指している。"
10710
10711 #. type: Plain text
10712 #: build/C/man2/sync_file_range.2:180
10713 msgid "B<sync_file_range>()  appeared on Linux in kernel 2.6.17."
10714 msgstr "B<sync_file_range>()  はカーネル 2.6.17 で Linux に登場した。"
10715
10716 #. type: Plain text
10717 #: build/C/man2/sync_file_range.2:183
10718 msgid ""
10719 "This system call is Linux-specific, and should be avoided in portable "
10720 "programs."
10721 msgstr ""
10722 "このシステムコールは Linux 独自であり、 移植性が必要なプログラムでは使用を避"
10723 "けるべきである。"
10724
10725 #.  See kernel commit edd5cd4a9424f22b0fa08bef5e299d41befd5622
10726 #. type: Plain text
10727 #: build/C/man2/sync_file_range.2:200
10728 msgid ""
10729 "Some architectures (e.g., PowerPC, ARM)  need 64-bit arguments to be aligned "
10730 "in a suitable pair of registers.  On such architectures, the call signature "
10731 "of B<sync_file_range>()  shown in the SYNOPSIS would force a register to be "
10732 "wasted as padding between the I<fd> and I<offset> arguments.  (See B<syscall>"
10733 "(2)  for details.)  Therefore, these architectures define a different system "
10734 "call that orders the arguments suitably:"
10735 msgstr ""
10736 "いくつかのアーキテクチャ (例えば、 PowerPC や ARM) では、 64 ビットの引き数は"
10737 "適切なレジスタの組に割り当てる必要がある。 このようなアーキテクチャでは、 "
10738 "「書式」に書かれている B<sync_file_range>() の呼び出しシグネチャーで、 引き"
10739 "数 I<fd> と I<offset> の間のパディング (詰めもの) でレジスタが一つ消費されて"
10740 "しまう (詳細は B<syscall>(2) 参照)。 そのため、 これらのアーキテクチャでは引"
10741 "き数が適切な順序になった別のシステムコールが定義されている。"
10742
10743 #. type: Plain text
10744 #: build/C/man2/sync_file_range.2:205
10745 #, no-wrap
10746 msgid ""
10747 "B<int sync_file_range2(int >I<fd>B<, unsigned int >I<flags>B<,>\n"
10748 "B<                     off64_t >I<offset>B<, off64_t >I<nbytes>B<);>\n"
10749 msgstr ""
10750 "B<int sync_file_range2(int >I<fd>B<, unsigned int >I<flags>B<,>\n"
10751 "B<                     off64_t >I<offset>B<, off64_t >I<nbytes>B<);>\n"
10752
10753 #. type: Plain text
10754 #: build/C/man2/sync_file_range.2:210
10755 msgid ""
10756 "The behavior of this system call is otherwise exactly the same as "
10757 "B<sync_file_range>()."
10758 msgstr ""
10759 "上記の点以外は、このシステムコールの動作は B<sync_file_range>() と\n"
10760 "全く同じである。このシステムコールに対するライブラリによるサポートは\n"
10761 "glibc では提供されていない。"
10762
10763 #. type: Plain text
10764 #: build/C/man2/sync_file_range.2:221
10765 msgid ""
10766 "A system call with this signature first appeared on the ARM architecture in "
10767 "Linux 2.6.20, with the name B<arm_sync_file_range>().  It was renamed in "
10768 "Linux 2.6.22, when the analogous system call was added for PowerPC.  On "
10769 "architectures where glibc support is provided, glibc transparently wraps "
10770 "B<sync_file_range2>()  under the name B<sync_file_range>()."
10771 msgstr ""
10772 "このバージョンのシステムコールは、Linux 2.6.20 で ARM アーキテクチャで\n"
10773 "初めて登場し、 B<arm_sync_file_range>() という名前であった。\n"
10774 "Linux 2.6.22 で、同様のシステムコールが PowerPC 用に追加された際に、\n"
10775 "システムコールの名前が変更された。\n"
10776 "glibc によるサポートが提供されているアーキテクチャでは、\n"
10777 "glibc のラッパー関数は B<sync_file_range>() という名前で\n"
10778 "B<sync_file_range2>() を適切に使用するようになっている。"
10779
10780 #. type: Plain text
10781 #: build/C/man2/sync_file_range.2:226
10782 msgid "B<fdatasync>(2), B<fsync>(2), B<msync>(2), B<sync>(2)"
10783 msgstr "B<fdatasync>(2), B<fsync>(2), B<msync>(2), B<sync>(2)"
10784
10785 #~ msgid "2012-03-23"
10786 #~ msgstr "2012-03-23"
10787
10788 #~ msgid "2008-01-24"
10789 #~ msgstr "2008-01-24"
10790
10791 #~ msgid "B<fallocate>()  returns zero on success, and -1 on failure."
10792 #~ msgstr "B<fallocate>()  は成功すると 0 を返し、エラーの場合は -1 を返す。"
10793
10794 #~ msgid "On success, B<malloc_info>()  returns 0; on error, it returns -1."
10795 #~ msgstr "B<malloc_info>() は成功すると 0 を返す。エラーの場合は -1 を返す。"
10796
10797 #~ msgid "2012-05-31"
10798 #~ msgstr "2012-05-31"
10799
10800 #~ msgid ""
10801 #~ "A valid segment identifier, I<shmid>, is returned on success, -1 on error."
10802 #~ msgstr ""
10803 #~ "成功した場合、有効なセグメント識別子 I<shmid> が返される。エラーの場合、 "
10804 #~ "-1 が返される。"
10805
10806 #~ msgid ""
10807 #~ "The ARM architecture needs 64-bit arguments to be aligned in a suitable "
10808 #~ "pair of registers.  On this architecture, the call signature of "
10809 #~ "B<posix_fadvise>()  is flawed, since it forces a register to be wasted as "
10810 #~ "padding between the I<fd> and I<len> arguments.  Therefore, since Linux "
10811 #~ "2.6.14, ARM defines a different system call that orders the arguments "
10812 #~ "suitably:"
10813 #~ msgstr ""
10814 #~ "ARM アーキテクチャでは、64 ビットの引き数は適切なレジスタの組に割り当て\n"
10815 #~ "る必要がある。このアーキテクチャでは、B<posix_fadvise>() の呼び出し方に\n"
10816 #~ "は欠陥があり、それはこのシステムコールでは引き数 I<fd> と I<len> の間の\n"
10817 #~ "パディング (詰めもの) でレジスタが一つ消費されてしまうというものである。\n"
10818 #~ "そのため、Linux 2.6.14 以降では、ARM では引き数が適切な順序になった別の\n"
10819 #~ "システムコールが定義されている。"
10820
10821 #~ msgid ""
10822 #~ "The behavior of this system call is otherwise exactly the same as "
10823 #~ "B<posix_fadvise>().  No library support is provided for this system call "
10824 #~ "in glibc."
10825 #~ msgstr ""
10826 #~ "上記の点以外は、このシステムコールの動作は B<posix_fadvise>() と全く\n"
10827 #~ "同じである。このシステムコールに対するライブラリによるサポートは glibc\n"
10828 #~ "では提供されていない。"
10829
10830 #~ msgid ""
10831 #~ "The I<mode> is not supported by the file system containing the file "
10832 #~ "referred to by I<fd>."
10833 #~ msgstr ""
10834 #~ "I<fd> が参照するファイルを含むファイルシステムが I<mode> をサポートしてい"
10835 #~ "ない。"
10836
10837 #~ msgid ""
10838 #~ "The function B<mtrace>()  installs handlers for B<malloc>(3), B<realloc>"
10839 #~ "(3)  and B<free>(3).  The function B<muntrace>()  disables these handlers."
10840 #~ msgstr ""
10841 #~ "関数 B<mtrace>()  は、 B<malloc>(3), B<realloc>(3), B<free>(3)  のハンドラ"
10842 #~ "を組み込む。 関数 B<muntrace>()  はこれらのハンドラを解除する。"
10843
10844 #~ msgid ""
10845 #~ "The environment variable B<MALLOC_TRACE> defines a file where B<mtrace>"
10846 #~ "()  writes its output.  This file must be writable to the user or "
10847 #~ "B<mtrace>()  will do nothing.  If the file is not empty it will be "
10848 #~ "truncated."
10849 #~ msgstr ""
10850 #~ "環境変数 B<MALLOC_TRACE> は B<mtrace>()  が出力を書き出すファイルを指定す"
10851 #~ "る。 ユーザが書き込み権限を持つファイルを指定しなければならない。 書き込み"
10852 #~ "権限がない場合、 B<mtrace>()  は何もしない。 ファイルが空でない場合、ファ"
10853 #~ "イルの元の内容を上書きする。"
10854
10855 #~ msgid ""
10856 #~ "The output of B<mtrace>()  will be ASCII but not in a friendly format.  "
10857 #~ "So glibc comes with a perl-script called mtrace to make sense of it."
10858 #~ msgstr ""
10859 #~ "B<mtrace>()  の出力は ASCII 形式だが、人が読みやすいフォーマットではな"
10860 #~ "い。 そこで、glibc には mtrace 出力を分かりやすい形式に変換する perl スク"
10861 #~ "リプトが付属している。"
10862
10863 #~ msgid ""
10864 #~ "This flag allocates and initializes to zero the disk space within the "
10865 #~ "range specified by I<offset> and I<len>.  After a successful call, "
10866 #~ "subsequent writes into this range are guaranteed not to fail because of "
10867 #~ "lack of disk space.  Preallocating zeroed blocks beyond the end of the "
10868 #~ "file is useful for optimizing append workloads.  Preallocating blocks "
10869 #~ "does not change the file size (as reported by B<stat>(2))  even if it is "
10870 #~ "less than I<offset>+I<len>."
10871 #~ msgstr ""
10872 #~ "このフラグは、 I<offset> と I<len> で指定された領域のディスク空間を割り当"
10873 #~ "て、その空間を 0 で初期化する。 呼び出しが成功すると、それに続いてこの領域"
10874 #~ "への書き込みが行われるが、 ディスク空間の不足による書き込み失敗が発生しな"
10875 #~ "いことが保証される。 ファイル末尾より後ろの領域について 0 で埋めたブロック"
10876 #~ "を前もって 割り当てておくことは、追記 (append) の作業負荷を最適化するのに "
10877 #~ "有用である。 ファイルサイズが I<offset>+I<len> よりも小さい場合であって"
10878 #~ "も、ブロックの前もっての割り当てにより (B<stat>(2)  が返す) ファイルサイズ"
10879 #~ "は変更されることはない。"
10880
10881 #~ msgid ""
10882 #~ "(Linux 2.6.9 and later) the caller was not privileged (B<CAP_IPC_LOCK>)  "
10883 #~ "and its B<RLIMIT_MEMLOCK> soft resource limit was 0."
10884 #~ msgstr ""
10885 #~ "(Linux 2.6.9 以降) 呼び出し元は特権 (B<CAP_IPC_LOCK>)  を持たず、ソフト資"
10886 #~ "源制限 B<RLIMIT_MEMLOCK> が 0 である。"
10887
10888 #~ msgid ""
10889 #~ "(Linux 2.6.8 and earlier)  The calling process has insufficient privilege "
10890 #~ "to call B<munlockall>().  Under Linux the B<CAP_IPC_LOCK> capability is "
10891 #~ "required."
10892 #~ msgstr ""
10893 #~ "(Linux 2.6.8 以前)  呼び出し元プロセスが B<munlockall>()  を呼び出すのに必"
10894 #~ "要な特権を所有していなかった。 Linux では、 B<CAP_IPC_LOCK> ケーパビリティ"
10895 #~ "が必要である。"
10896
10897 #~ msgid ""
10898 #~ "B<posix_fadvise>()  appeared in kernel 2.5.60.  Glibc support has been "
10899 #~ "provided since version 2.2."
10900 #~ msgstr ""
10901 #~ "B<posix_fadvise>()  はカーネル 2.5.60 で登場した。 glibc でのサポートは "
10902 #~ "glibc バージョン 2.2 以降で行われている。"