OSDN Git Service

LDP: Update POT and ja.po to LDP v3.75
[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: 2015-01-01 22:50+0900\n"
10 "PO-Revision-Date: 2014-06-08 02:30+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:39 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:39
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:40
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:42
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:48
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 "リを解放したときに、 そのメモリは初めて実際に解放される)。 "
202 "B<alloc_hugepages>()  の I<addr> 引き数はヒントであり、カーネルはそれに従うか"
203 "もしれないし、 従わないかもしれない。 アドレスは正しく配置されなければならな"
204 "い。"
205
206 #. type: Plain text
207 #: build/C/man2/alloc_hugepages.2:86
208 msgid ""
209 "The I<len> argument is the length of the required segment.  It must be a "
210 "multiple of the huge page size."
211 msgstr ""
212 "I<len> 引き数は要求されたセグメントの長さである。 これはヒュージページのサイ"
213 "ズの倍数にしなければならない。"
214
215 #. type: Plain text
216 #: build/C/man2/alloc_hugepages.2:94
217 msgid ""
218 "The I<prot> argument specifies the memory protection of the segment.  It is "
219 "one of B<PROT_READ>, B<PROT_WRITE>, B<PROT_EXEC>."
220 msgstr ""
221 "I<prot> 引き数はセグメントのメモリ保護を指定する。 これは B<PROT_READ>, "
222 "B<PROT_WRITE>, B<PROT_EXEC> のいずれかである。"
223
224 #. type: Plain text
225 #: build/C/man2/alloc_hugepages.2:109
226 msgid ""
227 "The I<flag> argument is ignored, unless I<key> is positive.  In that case, "
228 "if I<flag> is B<IPC_CREAT>, then a new huge page segment is created when "
229 "none with the given key existed.  If this flag is not set, then B<ENOENT> is "
230 "returned when no segment with the given key exists."
231 msgstr ""
232 "I<key> が正でない限り、 I<flag> 引き数は無視される。 I<key> が正で、かつ "
233 "I<flag> が B<IPC_CREAT> であり、かつ指定された I<key> で (セグメントが) 何も"
234 "存在しない場合、 新しいヒュージページセグメントが作成される。 I<flag> が設定"
235 "されておらず、かつ指定された I<key> のセグメントが存在しない場合、 B<ENOENT> "
236 "が返される。"
237
238 #. type: SH
239 #: build/C/man2/alloc_hugepages.2:109 build/C/man3/alloca.3:60
240 #: build/C/man2/cacheflush.2:53 build/C/man2/fallocate.2:228
241 #: build/C/man2/madvise.2:268 build/C/man3/malloc_get_state.3:61
242 #: build/C/man3/malloc_info.3:48 build/C/man3/malloc_trim.3:51
243 #: build/C/man3/malloc_usable_size.3:40 build/C/man3/mallopt.3:379
244 #: build/C/man3/mcheck.3:129 build/C/man2/mlock.2:116 build/C/man2/mmap.2:375
245 #: build/C/man2/mmap2.2:54 build/C/man2/mprotect.2:77
246 #: build/C/man2/mremap.2:127 build/C/man2/msync.2:68
247 #: build/C/man2/posix_fadvise.2:87 build/C/man3/posix_fallocate.3:66
248 #: build/C/man3/posix_memalign.3:142 build/C/man2/readahead.2:66
249 #: build/C/man2/remap_file_pages.2:132 build/C/man3/shm_open.3:171
250 #: build/C/man2/shmctl.2:283 build/C/man2/shmget.2:183
251 #: build/C/man2/shmop.2:168 build/C/man2/subpage_prot.2:66
252 #: build/C/man2/sync_file_range.2:141
253 #, no-wrap
254 msgid "RETURN VALUE"
255 msgstr "返り値"
256
257 #. type: Plain text
258 #: build/C/man2/alloc_hugepages.2:118
259 msgid ""
260 "On success, B<alloc_hugepages>()  returns the allocated virtual address, and "
261 "B<free_hugepages>()  returns zero.  On error, -1 is returned, and I<errno> "
262 "is set appropriately."
263 msgstr ""
264 "成功した場合、 B<alloc_hugepages>()  は割り当てられた仮想アドレスを返し、 "
265 "B<free_hugepages>()  は 0 を返す。 失敗した場合、-1 を返し、 I<errno> が適切"
266 "に設定される。"
267
268 #. type: SH
269 #: build/C/man2/alloc_hugepages.2:118 build/C/man2/cacheflush.2:59
270 #: build/C/man2/fallocate.2:235 build/C/man2/madvise.2:275
271 #: build/C/man3/malloc_info.3:55 build/C/man3/malloc_trim.3:56
272 #: build/C/man3/mallopt.3:384 build/C/man2/mlock.2:122 build/C/man2/mmap.2:392
273 #: build/C/man2/mmap2.2:61 build/C/man2/mprotect.2:84
274 #: build/C/man2/mremap.2:135 build/C/man2/msync.2:73
275 #: build/C/man2/posix_fadvise.2:90 build/C/man3/posix_fallocate.3:72
276 #: build/C/man3/posix_memalign.3:157 build/C/man2/readahead.2:72
277 #: build/C/man2/remap_file_pages.2:139 build/C/man3/shm_open.3:180
278 #: build/C/man2/shmctl.2:305 build/C/man2/shmget.2:188
279 #: build/C/man2/shmop.2:182 build/C/man2/subpage_prot.2:71
280 #: build/C/man2/sync_file_range.2:147
281 #, no-wrap
282 msgid "ERRORS"
283 msgstr "エラー"
284
285 #. type: TP
286 #: build/C/man2/alloc_hugepages.2:119 build/C/man2/fallocate.2:319
287 #, no-wrap
288 msgid "B<ENOSYS>"
289 msgstr "B<ENOSYS>"
290
291 #. type: Plain text
292 #: build/C/man2/alloc_hugepages.2:122
293 msgid "The system call is not supported on this kernel."
294 msgstr "このシステムコールはカーネルでサポートされていない。"
295
296 #. type: SH
297 #: build/C/man2/alloc_hugepages.2:122
298 #, no-wrap
299 msgid "FILES"
300 msgstr "ファイル"
301
302 #. type: Plain text
303 #: build/C/man2/alloc_hugepages.2:126
304 msgid ""
305 "I</proc/sys/vm/nr_hugepages> Number of configured hugetlb pages.  This can "
306 "be read and written."
307 msgstr ""
308 "I</proc/sys/vm/nr_hugepages> 設定された hugetlb ページの数。 このファイルは読"
309 "み書きできる。"
310
311 #. type: Plain text
312 #: build/C/man2/alloc_hugepages.2:130
313 msgid ""
314 "I</proc/meminfo> Gives info on the number of configured hugetlb pages and on "
315 "their size in the three variables HugePages_Total, HugePages_Free, "
316 "Hugepagesize."
317 msgstr ""
318 "I</proc/meminfo> 設定された hugetlb ページの数と、 3 つの変数 "
319 "HugePages_Total, HugePages_Free, Hugepagesize の サイズについての情報を提供す"
320 "る。"
321
322 #. type: SH
323 #: build/C/man2/alloc_hugepages.2:130 build/C/man3/alloca.3:70
324 #: build/C/man2/cacheflush.2:75 build/C/man2/fallocate.2:370
325 #: build/C/man2/madvise.2:325 build/C/man3/mallinfo.3:110
326 #: build/C/man3/malloc_get_state.3:86 build/C/man3/malloc_hook.3:80
327 #: build/C/man3/malloc_info.3:63 build/C/man3/malloc_stats.3:55
328 #: build/C/man3/malloc_trim.3:60 build/C/man3/malloc_usable_size.3:53
329 #: build/C/man3/mallopt.3:392 build/C/man3/mcheck.3:145
330 #: build/C/man2/mlock.2:186 build/C/man2/mmap.2:495 build/C/man2/mmap2.2:77
331 #: build/C/man2/mprotect.2:112 build/C/man2/mremap.2:185
332 #: build/C/man2/msync.2:96 build/C/man3/mtrace.3:78
333 #: build/C/man2/posix_fadvise.2:112 build/C/man3/posix_fallocate.3:108
334 #: build/C/man3/posix_memalign.3:182 build/C/man2/readahead.2:88
335 #: build/C/man2/remap_file_pages.2:161 build/C/man3/shm_open.3:251
336 #: build/C/man7/shm_overview.7:101 build/C/man2/shmctl.2:377
337 #: build/C/man2/shmget.2:248 build/C/man2/shmop.2:228
338 #: build/C/man2/subpage_prot.2:96 build/C/man2/sync_file_range.2:180
339 #, no-wrap
340 msgid "CONFORMING TO"
341 msgstr "準拠"
342
343 #. type: Plain text
344 #: build/C/man2/alloc_hugepages.2:133
345 msgid ""
346 "These calls are specific to Linux on Intel processors, and should not be "
347 "used in programs intended to be portable."
348 msgstr ""
349 "このシステムコールは Intel プロセッサ上の Linux に固有のものであり、 移植性が"
350 "必要なプログラムで使うべきでない。"
351
352 #. type: SH
353 #: build/C/man2/alloc_hugepages.2:133 build/C/man3/alloca.3:78
354 #: build/C/man2/madvise.2:347 build/C/man3/malloc_get_state.3:88
355 #: build/C/man3/malloc_hook.3:82 build/C/man3/malloc_info.3:65
356 #: build/C/man3/malloc_stats.3:57 build/C/man3/malloc_trim.3:62
357 #: build/C/man3/malloc_usable_size.3:55 build/C/man3/mcheck.3:147
358 #: build/C/man2/mlock.2:213 build/C/man2/mmap.2:513 build/C/man2/mmap2.2:79
359 #: build/C/man2/mprotect.2:121 build/C/man2/mremap.2:191
360 #: build/C/man2/msync.2:120 build/C/man3/mtrace.3:80
361 #: build/C/man2/posix_fadvise.2:121 build/C/man3/posix_memalign.3:221
362 #: build/C/man2/readahead.2:93 build/C/man2/remap_file_pages.2:165
363 #: build/C/man3/shm_open.3:257 build/C/man7/shm_overview.7:103
364 #: build/C/man2/shmctl.2:382 build/C/man2/shmget.2:256
365 #: build/C/man2/shmop.2:243 build/C/man2/subpage_prot.2:98
366 #: build/C/man2/sync_file_range.2:183
367 #, no-wrap
368 msgid "NOTES"
369 msgstr "注意"
370
371 #. type: Plain text
372 #: build/C/man2/alloc_hugepages.2:141
373 msgid ""
374 "These system calls are gone; they existed only in Linux 2.5.36 through to "
375 "2.5.54.  Now the hugetlbfs filesystem can be used instead.  Memory backed by "
376 "huge pages (if the CPU supports them) is obtained by using B<mmap>(2)  to "
377 "map files in this virtual filesystem."
378 msgstr ""
379 "これらのシステムコールはなくなった。 これらは Linux 2.5.36 から 2.5.54 にのみ"
380 "存在する。 代わりに今は hugetlbfs ファイルシステムを使うことができる。 (CPU "
381 "がサポートしている場合) ヒュージページを持つメモリは、 B<mmap>(2)  を使ってこ"
382 "の仮想ファイルシステムでファイルをマップすることで取得できる。"
383
384 #. type: Plain text
385 #: build/C/man2/alloc_hugepages.2:145
386 msgid ""
387 "The maximal number of huge pages can be specified using the B<hugepages=> "
388 "boot parameter."
389 msgstr ""
390 "ヒュージページの最大数は、 B<hugepages=> 起動パラメータを使って指定できる。"
391
392 #. type: SH
393 #: build/C/man2/alloc_hugepages.2:150 build/C/man3/alloca.3:162
394 #: build/C/man2/cacheflush.2:89 build/C/man2/fallocate.2:378
395 #: build/C/man2/madvise.2:381 build/C/man3/mallinfo.3:279
396 #: build/C/man3/malloc_get_state.3:114 build/C/man3/malloc_hook.3:142
397 #: build/C/man3/malloc_info.3:262 build/C/man3/malloc_stats.3:67
398 #: build/C/man3/malloc_trim.3:82 build/C/man3/malloc_usable_size.3:69
399 #: build/C/man3/mallopt.3:568 build/C/man3/mcheck.3:208
400 #: build/C/man2/mlock.2:343 build/C/man2/mmap.2:736 build/C/man2/mmap2.2:101
401 #: build/C/man2/mprotect.2:228 build/C/man2/mremap.2:214
402 #: build/C/man2/msync.2:151 build/C/man3/mtrace.3:172
403 #: build/C/man2/posix_fadvise.2:197 build/C/man3/posix_fallocate.3:138
404 #: build/C/man3/posix_memalign.3:277 build/C/man2/readahead.2:113
405 #: build/C/man2/remap_file_pages.2:183 build/C/man3/shm_open.3:282
406 #: build/C/man7/shm_overview.7:127 build/C/man2/shmctl.2:435
407 #: build/C/man2/shmget.2:391 build/C/man2/shmop.2:301
408 #: build/C/man2/subpage_prot.2:134 build/C/man2/sync_file_range.2:227
409 #, no-wrap
410 msgid "COLOPHON"
411 msgstr "この文書について"
412
413 #. type: Plain text
414 #: build/C/man2/alloc_hugepages.2:158 build/C/man3/alloca.3:170
415 #: build/C/man2/cacheflush.2:97 build/C/man2/fallocate.2:386
416 #: build/C/man2/madvise.2:389 build/C/man3/mallinfo.3:287
417 #: build/C/man3/malloc_get_state.3:122 build/C/man3/malloc_hook.3:150
418 #: build/C/man3/malloc_info.3:270 build/C/man3/malloc_stats.3:75
419 #: build/C/man3/malloc_trim.3:90 build/C/man3/malloc_usable_size.3:77
420 #: build/C/man3/mallopt.3:576 build/C/man3/mcheck.3:216
421 #: build/C/man2/mlock.2:351 build/C/man2/mmap.2:744 build/C/man2/mmap2.2:109
422 #: build/C/man2/mprotect.2:236 build/C/man2/mremap.2:222
423 #: build/C/man2/msync.2:159 build/C/man3/mtrace.3:180
424 #: build/C/man2/posix_fadvise.2:205 build/C/man3/posix_fallocate.3:146
425 #: build/C/man3/posix_memalign.3:285 build/C/man2/readahead.2:121
426 #: build/C/man2/remap_file_pages.2:191 build/C/man3/shm_open.3:290
427 #: build/C/man7/shm_overview.7:135 build/C/man2/shmctl.2:443
428 #: build/C/man2/shmget.2:399 build/C/man2/shmop.2:309
429 #: build/C/man2/subpage_prot.2:142 build/C/man2/sync_file_range.2:235
430 #, fuzzy
431 #| msgid ""
432 #| "This page is part of release 3.68 of the Linux I<man-pages> project.  A "
433 #| "description of the project, information about reporting bugs, and the "
434 #| "latest version of this page, can be found at \\%http://www.kernel.org/doc/"
435 #| "man-pages/."
436 msgid ""
437 "This page is part of release 3.75 of the Linux I<man-pages> project.  A "
438 "description of the project, information about reporting bugs, and the latest "
439 "version of this page, can be found at \\%http://www.kernel.org/doc/man-"
440 "pages/."
441 msgstr ""
442 "この man ページは Linux I<man-pages> プロジェクトのリリース 3.68 の一部\n"
443 "である。プロジェクトの説明とバグ報告に関する情報は\n"
444 "http://www.kernel.org/doc/man-pages/ に書かれている。"
445
446 #. type: TH
447 #: build/C/man3/alloca.3:43
448 #, no-wrap
449 msgid "ALLOCA"
450 msgstr "ALLOCA"
451
452 #. type: TH
453 #: build/C/man3/alloca.3:43
454 #, no-wrap
455 msgid "2013-10-07"
456 msgstr "2013-10-07"
457
458 #. type: TH
459 #: build/C/man3/alloca.3:43 build/C/man3/malloc_get_state.3:25
460 #: build/C/man3/malloc_hook.3:10 build/C/man3/malloc_info.3:25
461 #: build/C/man3/malloc_usable_size.3:25 build/C/man3/mcheck.3:25
462 #: build/C/man3/mtrace.3:25 build/C/man3/posix_fallocate.3:25
463 #: build/C/man3/posix_memalign.3:29
464 #, no-wrap
465 msgid "GNU"
466 msgstr "GNU"
467
468 #. type: Plain text
469 #: build/C/man3/alloca.3:46
470 msgid "alloca - allocate memory that is automatically freed"
471 msgstr "alloca - 自動的に解放されるメモリを割り当てる"
472
473 #. type: Plain text
474 #: build/C/man3/alloca.3:48
475 msgid "B<#include E<lt>alloca.hE<gt>>"
476 msgstr "B<#include E<lt>alloca.hE<gt>>"
477
478 #. type: Plain text
479 #: build/C/man3/alloca.3:50
480 msgid "B<void *alloca(size_t >I<size>B<);>"
481 msgstr "B<void *alloca(size_t >I<size>B<);>"
482
483 #. type: Plain text
484 #: build/C/man3/alloca.3:60
485 msgid ""
486 "The B<alloca>()  function allocates I<size> bytes of space in the stack "
487 "frame of the caller.  This temporary space is automatically freed when the "
488 "function that called B<alloca>()  returns to its caller."
489 msgstr ""
490 "B<alloca>()  関数は、 I<size> バイトの領域を呼出元のスタック・フレームに割り"
491 "付ける。 この一時的な領域は、 B<alloca>()  を呼び出した関数が呼出元に返るとき"
492 "に自動的に解放される。"
493
494 #. type: Plain text
495 #: build/C/man3/alloca.3:65
496 msgid ""
497 "The B<alloca>()  function returns a pointer to the beginning of the "
498 "allocated space.  If the allocation causes stack overflow, program behavior "
499 "is undefined."
500 msgstr ""
501 "B<alloca>()  関数は、割り付けた領域の始まりを指すポインタを返す。 割り付けに"
502 "よってスタックオーバーフローが起った場合の プログラムの動作は定義されていな"
503 "い。"
504
505 #. type: SH
506 #: build/C/man3/alloca.3:65 build/C/man3/malloc_usable_size.3:48
507 #: build/C/man3/posix_fallocate.3:103
508 #, no-wrap
509 msgid "ATTRIBUTES"
510 msgstr "属性"
511
512 #. type: SS
513 #: build/C/man3/alloca.3:66 build/C/man3/malloc_usable_size.3:49
514 #: build/C/man3/posix_fallocate.3:104
515 #, no-wrap
516 msgid "Multithreading (see pthreads(7))"
517 msgstr "マルチスレッディング (pthreads(7) 参照)"
518
519 #. type: Plain text
520 #: build/C/man3/alloca.3:70
521 msgid "The B<alloca>()  function is thread-safe."
522 msgstr "B<alloca>() 関数はスレッドセーフである。"
523
524 #. type: Plain text
525 #: build/C/man3/alloca.3:72
526 msgid "This function is not in POSIX.1-2001."
527 msgstr "この関数は POSIX.1-2001 にはない。"
528
529 #. type: Plain text
530 #: build/C/man3/alloca.3:78
531 msgid ""
532 "There is evidence that the B<alloca>()  function appeared in 32V, PWB, "
533 "PWB.2, 3BSD, and 4BSD.  There is a man page for it in 4.3BSD.  Linux uses "
534 "the GNU version."
535 msgstr ""
536 "32V, PWB, PWB.2, 3BSD, 4BSD に B<alloca>()  関数が登場した証拠がある。 "
537 "4.3BSD には、マニュアルページがある。 Linux は、GNU 版を使っている。 この関数"
538 "は POSIX.1-2001 にはない。"
539
540 #. type: Plain text
541 #: build/C/man3/alloca.3:93
542 msgid ""
543 "The B<alloca>()  function is machine- and compiler-dependent.  For certain "
544 "applications, its use can improve efficiency compared to the use of "
545 "B<malloc>(3)  plus B<free>(3).  In certain cases, it can also simplify "
546 "memory deallocation in applications that use B<longjmp>(3)  or "
547 "B<siglongjmp>(3).  Otherwise, its use is discouraged."
548 msgstr ""
549 "B<alloca>()  関数は、機種とコンパイラに依存する。 特定のアプリケーションで"
550 "は、この関数を使うと B<malloc>(3)  と B<free>(3)  を組み合わせて使った場合に"
551 "比べて効率を改善することができる。 特定の場合では、この関数を使うことで、 "
552 "B<longjmp>(3)  や B<siglongjmp>(3)  を使うアプリケーションでのメモリの開放を"
553 "簡単にすることができる。 それ以外の場合では、この関数の使用は推奨されない。"
554
555 #. type: Plain text
556 #: build/C/man3/alloca.3:102
557 msgid ""
558 "Because the space allocated by B<alloca>()  is allocated within the stack "
559 "frame, that space is automatically freed if the function return is jumped "
560 "over by a call to B<longjmp>(3)  or B<siglongjmp>(3)."
561 msgstr ""
562 "B<alloca>()  により割り当てられる空間はスタックフレームから割り当てらるの"
563 "で、 関数の戻り先が B<longjmp>(3)  や B<siglongjmp>(3)  の呼び出しによりジャ"
564 "ンプした場合には、 割り当てられた空間は自動的に解放される。"
565
566 #. type: Plain text
567 #: build/C/man3/alloca.3:107
568 msgid "Do not attempt to B<free>(3)  space allocated by B<alloca>()!"
569 msgstr ""
570 "B<alloca>()  で割り当てられた空間を B<free>(3)  しようとすることのないよう"
571 "に!"
572
573 #. type: SS
574 #: build/C/man3/alloca.3:107
575 #, no-wrap
576 msgid "Notes on the GNU version"
577 msgstr "GNU 版についての注意"
578
579 #. type: Plain text
580 #: build/C/man3/alloca.3:129
581 msgid ""
582 "Normally, B<gcc>(1)  translates calls to B<alloca>()  with inlined code.  "
583 "This is not done when either the I<-ansi>, I<-std=c89>, I<-std=c99>, or the "
584 "I<-std=c11> option is given B<and> the header I<E<lt>alloca.hE<gt>> is not "
585 "included.  Otherwise, (without an -ansi or -std=c* option) the glibc version "
586 "of I<E<lt>stdlib.hE<gt>> includes I<E<lt>alloca.hE<gt>> and that contains "
587 "the lines:"
588 msgstr ""
589 "通常 B<gcc>(1) は B<alloca>()  の呼び出しをインラインコードに変換する。 I<-"
590 "ansi>, I<-std=c89>, I<-std=c99>, I<-std=c11> のいずれかのオプションが指定さ"
591 "れ、B<かつ> I<E<lt>alloca.hE<gt>> がインクルードされていない場合、 この変換は"
592 "行われない。 それ以外の場合 (-ansi オプションも -std=c* オプションも指定され"
593 "ない場合) には、 glibc 版の I<E<lt>stdlib.hE<gt>> は I<E<lt>alloca.hE<gt>> を"
594 "インクルードするが、このファイルには以下の行が含まれており、"
595
596 #. type: Plain text
597 #: build/C/man3/alloca.3:134
598 #, no-wrap
599 msgid ""
600 "    #ifdef  __GNUC__\n"
601 "    #define alloca(size)   __builtin_alloca (size)\n"
602 "    #endif\n"
603 msgstr ""
604 "    #ifdef  __GNUC__\n"
605 "    #define alloca(size)   __builtin_alloca (size)\n"
606 "    #endif\n"
607
608 #. type: Plain text
609 #: build/C/man3/alloca.3:137
610 msgid "with messy consequences if one has a private version of this function."
611 msgstr "独自版の __builtin_alloca (size) 関数がある場合、厄介な結果になる。"
612
613 #. type: Plain text
614 #: build/C/man3/alloca.3:141
615 msgid ""
616 "The fact that the code is inlined means that it is impossible to take the "
617 "address of this function, or to change its behavior by linking with a "
618 "different library."
619 msgstr ""
620 "このコードはインライン化されているので、 この関数のアドレスを取得したり、 他"
621 "のライブラリをリンクして動作を変更することはできない。"
622
623 #. type: Plain text
624 #: build/C/man3/alloca.3:145
625 msgid ""
626 "The inlined code often consists of a single instruction adjusting the stack "
627 "pointer, and does not check for stack overflow.  Thus, there is no NULL "
628 "error return."
629 msgstr ""
630 "通常このインラインコードはスタックポインタを移動する 1 つの命令 "
631 "(instruction) から構成されており、 スタックオーバーフローをチェックしない。 "
632 "よって NULL エラーが返されることはない。"
633
634 #. type: SH
635 #: build/C/man3/alloca.3:145 build/C/man2/cacheflush.2:82
636 #: build/C/man3/mallinfo.3:114 build/C/man3/mallopt.3:406
637 #: build/C/man2/mlock.2:311 build/C/man2/mmap.2:586 build/C/man3/mtrace.3:102
638 #: build/C/man2/posix_fadvise.2:186 build/C/man2/readahead.2:98
639 #: build/C/man2/shmget.2:377
640 #, no-wrap
641 msgid "BUGS"
642 msgstr "バグ"
643
644 #. type: Plain text
645 #: build/C/man3/alloca.3:150
646 msgid ""
647 "There is no error indication if the stack frame cannot be extended.  "
648 "(However, after a failed allocation, the program is likely to receive a "
649 "B<SIGSEGV> signal if it attempts to access the unallocated space.)"
650 msgstr ""
651 "スタックフレームが拡張できなかった場合、エラー通知は行われない。 (しかしなが"
652 "ら、割り当てに失敗した後で、プログラムが割り当てられなかった 空間にアクセスし"
653 "ようとした場合に B<SIGSEGV> シグナルを受信することだろう。)"
654
655 #. type: Plain text
656 #: build/C/man3/alloca.3:158
657 msgid ""
658 "On many systems B<alloca>()  cannot be used inside the list of arguments of "
659 "a function call, because the stack space reserved by B<alloca>()  would "
660 "appear on the stack in the middle of the space for the function arguments."
661 msgstr ""
662 "多くのシステムにおいて、関数コールの引き数のリスト内では B<alloca>()  が使え"
663 "ない。 これは、 B<alloca>()  によって予約されるスタック領域が、 関数引き数に"
664 "使われるスタック領域の中に現れてしまうためである。"
665
666 #. type: SH
667 #: build/C/man3/alloca.3:158 build/C/man2/fallocate.2:373
668 #: build/C/man2/madvise.2:372 build/C/man3/mallinfo.3:270
669 #: build/C/man3/malloc_get_state.3:111 build/C/man3/malloc_hook.3:137
670 #: build/C/man3/malloc_info.3:256 build/C/man3/malloc_stats.3:61
671 #: build/C/man3/malloc_trim.3:78 build/C/man3/malloc_usable_size.3:67
672 #: build/C/man3/mallopt.3:554 build/C/man3/mcheck.3:204
673 #: build/C/man2/mlock.2:336 build/C/man2/mmap.2:711 build/C/man2/mmap2.2:95
674 #: build/C/man2/mprotect.2:225 build/C/man2/mremap.2:199
675 #: build/C/man2/msync.2:147 build/C/man3/mtrace.3:167
676 #: build/C/man2/posix_fadvise.2:191 build/C/man3/posix_fallocate.3:133
677 #: build/C/man3/posix_memalign.3:272 build/C/man2/readahead.2:107
678 #: build/C/man2/remap_file_pages.2:176 build/C/man3/shm_open.3:271
679 #: build/C/man7/shm_overview.7:114 build/C/man2/shmctl.2:428
680 #: build/C/man2/shmget.2:383 build/C/man2/shmop.2:293
681 #: build/C/man2/subpage_prot.2:128 build/C/man2/sync_file_range.2:222
682 #, no-wrap
683 msgid "SEE ALSO"
684 msgstr "関連項目"
685
686 #. type: Plain text
687 #: build/C/man3/alloca.3:162
688 msgid "B<brk>(2), B<longjmp>(3), B<malloc>(3)"
689 msgstr "B<brk>(2), B<longjmp>(3), B<malloc>(3)"
690
691 #. type: TH
692 #: build/C/man2/cacheflush.2:25
693 #, no-wrap
694 msgid "CACHEFLUSH"
695 msgstr "CACHEFLUSH"
696
697 #. type: TH
698 #: build/C/man2/cacheflush.2:25
699 #, no-wrap
700 msgid "2007-05-26"
701 msgstr "2007-05-26"
702
703 #. type: Plain text
704 #: build/C/man2/cacheflush.2:28
705 msgid "cacheflush - flush contents of instruction and/or data cache"
706 msgstr "cacheflush - 命令キャッシュやデータキャッシュの内容をフラッシュする"
707
708 #. type: Plain text
709 #: build/C/man2/cacheflush.2:31
710 #, no-wrap
711 msgid "B<#include E<lt>asm/cachectl.hE<gt>>\n"
712 msgstr "B<#include E<lt>asm/cachectl.hE<gt>>\n"
713
714 #. type: Plain text
715 #: build/C/man2/cacheflush.2:33
716 #, no-wrap
717 msgid "B<int cacheflush(char *>I<addr>B<, int >I<nbytes>B<, int >I<cache>B<);>\n"
718 msgstr "B<int cacheflush(char *>I<addr>B<, int >I<nbytes>B<, int >I<cache>B<);>\n"
719
720 #. type: Plain text
721 #: build/C/man2/cacheflush.2:43
722 msgid ""
723 "B<cacheflush>()  flushes the contents of the indicated cache(s) for the user "
724 "addresses in the range I<addr> to I<(addr+nbytes-1)>.  I<cache> may be one "
725 "of:"
726 msgstr ""
727 "B<cacheflush>()  は I<addr> から I<(addr+nbytes-1)> の範囲のユーザアドレスに"
728 "対応する 指定されたキャッシュをフラッシュする。 I<cache> には以下のいずれかを"
729 "指定する:"
730
731 #. type: TP
732 #: build/C/man2/cacheflush.2:43
733 #, no-wrap
734 msgid "B<ICACHE>"
735 msgstr "B<ICACHE>"
736
737 #. type: Plain text
738 #: build/C/man2/cacheflush.2:46
739 msgid "Flush the instruction cache."
740 msgstr "命令 (instruction) キャッシュをフラッシュする。"
741
742 #. type: TP
743 #: build/C/man2/cacheflush.2:46
744 #, no-wrap
745 msgid "B<DCACHE>"
746 msgstr "B<DCACHE>"
747
748 #. type: Plain text
749 #: build/C/man2/cacheflush.2:49
750 msgid "Write back to memory and invalidate the affected valid cache lines."
751 msgstr "変更があったキャッシュラインをメモリに書き戻し、無効にする。"
752
753 #. type: TP
754 #: build/C/man2/cacheflush.2:49
755 #, no-wrap
756 msgid "B<BCACHE>"
757 msgstr "B<BCACHE>"
758
759 #. type: Plain text
760 #: build/C/man2/cacheflush.2:53
761 msgid "Same as B<(ICACHE|DCACHE)>."
762 msgstr "B<(ICACHE|DCACHE)> と同じ。"
763
764 #. type: Plain text
765 #: build/C/man2/cacheflush.2:59
766 msgid ""
767 "B<cacheflush>()  returns 0 on success or -1 on error.  If errors are "
768 "detected, I<errno> will indicate the error."
769 msgstr ""
770 "B<cacheflush>()  は成功した場合は 0 を、失敗した場合は -1 を返す。エラーが検"
771 "出された場合は I<errno> にエラーが指示される。"
772
773 #. type: TP
774 #: build/C/man2/cacheflush.2:60 build/C/man2/mmap2.2:62
775 #: build/C/man2/mremap.2:142 build/C/man2/shmctl.2:314
776 #: build/C/man2/subpage_prot.2:72
777 #, no-wrap
778 msgid "B<EFAULT>"
779 msgstr "B<EFAULT>"
780
781 #. type: Plain text
782 #: build/C/man2/cacheflush.2:67
783 msgid ""
784 "Some or all of the address range I<addr> to I<(addr+nbytes-1)> is not "
785 "accessible."
786 msgstr ""
787 "I<addr> から I<(addr+nbytes-1)> の範囲のアドレスの全てまたは一部が アクセス可"
788 "能ではない。"
789
790 #. type: TP
791 #: build/C/man2/cacheflush.2:67 build/C/man2/fallocate.2:247
792 #: build/C/man2/fallocate.2:259 build/C/man2/fallocate.2:269
793 #: build/C/man2/fallocate.2:279 build/C/man2/fallocate.2:287
794 #: build/C/man2/madvise.2:282 build/C/man3/malloc_info.3:56
795 #: build/C/man2/mlock.2:157 build/C/man2/mlock.2:164 build/C/man2/mlock.2:176
796 #: build/C/man2/mmap.2:421 build/C/man2/mmap.2:429 build/C/man2/mmap.2:434
797 #: build/C/man2/mmap2.2:65 build/C/man2/mprotect.2:94
798 #: build/C/man2/mremap.2:151 build/C/man2/msync.2:80
799 #: build/C/man2/posix_fadvise.2:94 build/C/man3/posix_fallocate.3:81
800 #: build/C/man3/posix_memalign.3:158 build/C/man2/readahead.2:77
801 #: build/C/man2/remap_file_pages.2:140 build/C/man2/remap_file_pages.2:147
802 #: build/C/man3/shm_open.3:213 build/C/man2/shmctl.2:328
803 #: build/C/man2/shmget.2:207 build/C/man2/shmget.2:215
804 #: build/C/man2/shmop.2:197 build/C/man2/shmop.2:220
805 #: build/C/man2/subpage_prot.2:77 build/C/man2/sync_file_range.2:152
806 #, no-wrap
807 msgid "B<EINVAL>"
808 msgstr "B<EINVAL>"
809
810 #. type: Plain text
811 #: build/C/man2/cacheflush.2:75
812 msgid "I<cache> is not one of B<ICACHE>, B<DCACHE>, or B<BCACHE>."
813 msgstr "I<cache> パラメータが B<ICACHE>, B<DCACHE>, B<BCACHE> のどれでもない。"
814
815 #.  FIXME The cacheflush() system call was only on MIPS back in 1.2 days,
816 #.  but by now it is on a number of other architectures (but not i386).
817 #.  Investigate the details and update this page.
818 #.  Irix 6.5 appears to have a cacheflush() syscall -- mtk
819 #. type: Plain text
820 #: build/C/man2/cacheflush.2:82
821 msgid ""
822 "This Linux-specific system call is available only on MIPS-based systems.  It "
823 "should not be used in programs intended to be portable."
824 msgstr ""
825 "この Linux 特有のシステムコールは MIPS ベースのシステムでのみ有効である。 移"
826 "植を意図したプログラムで使用すべきではない。"
827
828 #. type: Plain text
829 #: build/C/man2/cacheflush.2:89
830 msgid ""
831 "The current implementation ignores the I<addr> and I<nbytes> arguments.  "
832 "Therefore, the whole cache is always flushed."
833 msgstr ""
834 "現在の実装では、引き数 I<addr> と I<nbytes> は無視される。そのため、 常に全て"
835 "のキャッシュがフラッシュされる。"
836
837 #. type: TH
838 #: build/C/man2/fallocate.2:11
839 #, no-wrap
840 msgid "FALLOCATE"
841 msgstr "FALLOCATE"
842
843 #. type: TH
844 #: build/C/man2/fallocate.2:11 build/C/man3/mallopt.3:26
845 #: build/C/man2/shmop.2:41
846 #, fuzzy, no-wrap
847 #| msgid "2014-05-08"
848 msgid "2014-07-08"
849 msgstr "2014-05-08"
850
851 #. type: Plain text
852 #: build/C/man2/fallocate.2:14
853 msgid "fallocate - manipulate file space"
854 msgstr "fallocate - ファイル空間の操作"
855
856 #. type: Plain text
857 #: build/C/man2/fallocate.2:18 build/C/man2/readahead.2:35
858 #, no-wrap
859 msgid ""
860 "B<#define _GNU_SOURCE>             /* See feature_test_macros(7) */\n"
861 "B<#include E<lt>fcntl.hE<gt>>\n"
862 msgstr ""
863 "B<#define _GNU_SOURCE>             /* feature_test_macros(7) 参照 */\n"
864 "B<#include E<lt>fcntl.hE<gt>>\n"
865
866 #. type: Plain text
867 #: build/C/man2/fallocate.2:21
868 #, no-wrap
869 msgid "B<int fallocate(int >I<fd>B<, int >I<mode>B<, off_t >I<offset>B<, off_t >I<len>B<);>\n"
870 msgstr "B<int fallocate(int >I<fd>B<, int >I<mode>B<, off_t >I<offset>B<, off_t >I<len>B<);>\n"
871
872 #. type: Plain text
873 #: build/C/man2/fallocate.2:27
874 msgid ""
875 "This is a nonportable, Linux-specific system call.  For the portable, "
876 "POSIX.1-specified method of ensuring that space is allocated for a file, see "
877 "B<posix_fallocate>(3)."
878 msgstr ""
879 "このシステムコールは、移植性のない、Linux 固有のシステムコールである。 移植性"
880 "が必要な場合は、ファイルに対してディスク空間を確実に確保するために、 POSIX.1 "
881 "で規定された方法である B<posix_fallocate>(3)  を使うこと。"
882
883 #. type: Plain text
884 #: build/C/man2/fallocate.2:37
885 msgid ""
886 "B<fallocate>()  allows the caller to directly manipulate the allocated disk "
887 "space for the file referred to by I<fd> for the byte range starting at "
888 "I<offset> and continuing for I<len> bytes."
889 msgstr ""
890 "B<fallocate>()  を使うと、 I<fd> が参照するファイルに割り当てられたディスク空"
891 "間を直接操作できる。 操作対象は、 I<offset> から始まる長さ I<len> バイトの領"
892 "域である。"
893
894 #. type: Plain text
895 #: build/C/man2/fallocate.2:42
896 msgid ""
897 "The I<mode> argument determines the operation to be performed on the given "
898 "range.  Details of the supported operations are given in the subsections "
899 "below."
900 msgstr ""
901 "I<mode> 引き数は、指定された領域に対して実行する操作を指定する。\n"
902 "サポートされている操作の詳細は以下のサブセクションで説明する。"
903
904 #. type: SS
905 #: build/C/man2/fallocate.2:42
906 #, no-wrap
907 msgid "Allocating disk space"
908 msgstr "ディスク領域の割り当て"
909
910 #. type: Plain text
911 #: build/C/man2/fallocate.2:65
912 msgid ""
913 "The default operation (i.e., I<mode> is zero) of B<fallocate>()  allocates "
914 "the disk space within the range specified by I<offset> and I<len>.  The file "
915 "size (as reported by B<stat>(2))  will be changed if I<offset>+I<len> is "
916 "greater than the file size.  Any subregion within the range specified by "
917 "I<offset> and I<len> that did not contain data before the call will be "
918 "initialized to zero.  This default behavior closely resembles the behavior "
919 "of the B<posix_fallocate>(3)  library function, and is intended as a method "
920 "of optimally implementing that function."
921 msgstr ""
922 "B<fallocate>() のデフォルトの動作 (つまり I<mode> が 0 の場合) は、 "
923 "I<offset> と I<len> で指定された範囲のディスク領域の割り当てを行う。 "
924 "I<offset>+I<len> がファイルサイズよりも大きかった場合、 (B<stat>(2) で報告さ"
925 "れる) ファイルサイズが変更される。 I<offset> と I<len> で指定される範囲のサブ"
926 "領域で、 呼び出し前にデータを保持していなかった場合、そのサブ領域は 0 で初期"
927 "化される。 このデフォルトの動作は、 ライブラリ関数 B<posix_fallocate>(3) の動"
928 "作と非常に似ている。 これは、 このシステムコールが B<posix_fallocate>(3) を最"
929 "適に実装する手段を提供することを目的としているからである。"
930
931 #. type: Plain text
932 #: build/C/man2/fallocate.2:71
933 msgid ""
934 "After a successful call, subsequent writes into the range specified by "
935 "I<offset> and I<len> are guaranteed not to fail because of lack of disk "
936 "space."
937 msgstr ""
938 "呼び出しが成功した場合、\n"
939 "I<offset> と I<len> で指定された範囲へのそれ以降の書き込みでは、\n"
940 "ディスクの領域不足での書き込み失敗が起こらないことが保証される。"
941
942 #. type: Plain text
943 #: build/C/man2/fallocate.2:82
944 msgid ""
945 "If the B<FALLOC_FL_KEEP_SIZE> flag is specified in I<mode>, the behavior of "
946 "the call is similar, but the file size will not be changed even if I<offset>"
947 "+I<len> is greater than the file size.  Preallocating zeroed blocks beyond "
948 "the end of the file in this manner is useful for optimizing append workloads."
949 msgstr ""
950 "B<FALLOC_FL_KEEP_SIZE> フラグが I<mode> に指定された場合、このシステムコー"
951 "ル\n"
952 "の動作は似ているが、 I<offset>+I<len> がファイルサイズよりも大きい場合で\n"
953 "あってもファイルサイズは変更されない点が異なる。この場合のファイルの末尾\n"
954 "よりも後ろの前もって割り当てられた 0 で埋められたブロックは、ファイルへの\n"
955 "追記を最適化したい場合に役に立つ。"
956
957 #. type: Plain text
958 #: build/C/man2/fallocate.2:86
959 msgid ""
960 "Because allocation is done in block size chunks, B<fallocate>()  may "
961 "allocate a larger range of disk space than was specified."
962 msgstr ""
963 "割り当てはブロックサイズ単位で行われるため、 B<fallocate>() は指定されたよ"
964 "り\n"
965 "も大きなディスク領域を割り当てることがある。"
966
967 #. type: SS
968 #: build/C/man2/fallocate.2:86
969 #, no-wrap
970 msgid "Deallocating file space"
971 msgstr "ファイル空間の割り当て解除"
972
973 #. type: Plain text
974 #: build/C/man2/fallocate.2:101
975 msgid ""
976 "Specifying the B<FALLOC_FL_PUNCH_HOLE> flag (available since Linux 2.6.38) "
977 "in I<mode> deallocates space (i.e., creates a hole)  in the byte range "
978 "starting at I<offset> and continuing for I<len> bytes.  Within the specified "
979 "range, partial filesystem blocks are zeroed, and whole filesystem blocks are "
980 "removed from the file.  After a successful call, subsequent reads from this "
981 "range will return zeroes."
982 msgstr ""
983 "B<FALLOC_FL_PUNCH_HOLE> フラグ (Linux 2.6.38 以降で利用可能) を I<mode> に指"
984 "定すると、 I<offset> で始まる I<len> バイトの領域の空間を解放する (ホールを作"
985 "成する)。 指定された範囲のうち、 部分的に使用しているファイルシステムブロック"
986 "は 0 で埋められ、 全体を使用しているファイルシステムブロックはそのファイルか"
987 "ら削除される。 呼び出しが成功すると、 これ以降のこの範囲からの読み出しでは 0 "
988 "を返す。"
989
990 #. type: Plain text
991 #: build/C/man2/fallocate.2:112
992 msgid ""
993 "The B<FALLOC_FL_PUNCH_HOLE> flag must be ORed with B<FALLOC_FL_KEEP_SIZE> in "
994 "I<mode>; in other words, even when punching off the end of the file, the "
995 "file size (as reported by B<stat>(2))  does not change."
996 msgstr ""
997 "B<FALLOC_FL_PUNCH_HOLE> フラグは B<FALLOC_FL_KEEP_SIZE> と論理和 (OR) をとっ"
998 "て I<mode> に指定しなければならない。 つまり、 ファイル末尾の punch off を"
999 "行った場合でも、 (B<stat>(2) で報告される) ファイルサイズが変化しない。"
1000
1001 #. type: Plain text
1002 #: build/C/man2/fallocate.2:117
1003 msgid ""
1004 "Not all filesystems support B<FALLOC_FL_PUNCH_HOLE>; if a filesystem doesn't "
1005 "support the operation, an error is returned.  The operation is supported on "
1006 "at least the following filesystems:"
1007 msgstr ""
1008 "すべてのファイルシステムで B<FALLOC_FL_PUNCH_HOLE> がサポートされているわけで"
1009 "はない。 ファイルシステムがこの操作をサポートしていない場合は、 エラーが返"
1010 "る。 この操作は少なくとも以下のファイルシステムでサポートされている。"
1011
1012 #. type: IP
1013 #: build/C/man2/fallocate.2:117 build/C/man2/fallocate.2:119
1014 #: build/C/man2/fallocate.2:122 build/C/man2/fallocate.2:124
1015 #: build/C/man2/fallocate.2:222 build/C/man2/fallocate.2:225
1016 #: build/C/man2/madvise.2:286 build/C/man2/madvise.2:292
1017 #: build/C/man2/madvise.2:295 build/C/man2/madvise.2:298
1018 #: build/C/man2/madvise.2:301 build/C/man3/mallopt.3:235
1019 #: build/C/man3/mallopt.3:241 build/C/man2/shmop.2:62 build/C/man2/shmop.2:68
1020 #: build/C/man2/shmop.2:80
1021 #, no-wrap
1022 msgid "*"
1023 msgstr "*"
1024
1025 #. type: Plain text
1026 #: build/C/man2/fallocate.2:119
1027 msgid "XFS (since Linux 2.6.38)"
1028 msgstr "XFS (Linux 2.6.38 以降)"
1029
1030 #.  commit a4bb6b64e39abc0e41ca077725f2a72c868e7622
1031 #. type: Plain text
1032 #: build/C/man2/fallocate.2:122
1033 msgid "ext4 (since Linux 3.0)"
1034 msgstr "ext4 (Linux 3.0 以降)"
1035
1036 #. type: Plain text
1037 #: build/C/man2/fallocate.2:124
1038 msgid "Btrfs (since Linux 3.7)"
1039 msgstr "Btrfs (Linux 3.7 以降)"
1040
1041 #.  commit 83e4fa9c16e4af7122e31be3eca5d57881d236fe
1042 #. type: Plain text
1043 #: build/C/man2/fallocate.2:127
1044 msgid "tmpfs (since Linux 3.5)"
1045 msgstr "tmpfs (Linux 3.5 以降)"
1046
1047 #. type: SS
1048 #: build/C/man2/fallocate.2:127
1049 #, no-wrap
1050 msgid "Collapsing file space"
1051 msgstr "ファイル空間の一部削除"
1052
1053 #.  commit 00f5e61998dd17f5375d9dfc01331f104b83f841
1054 #. type: Plain text
1055 #: build/C/man2/fallocate.2:147
1056 msgid ""
1057 "Specifying the B<FALLOC_FL_COLLAPSE_RANGE> flag (available since Linux 3.15) "
1058 "in I<mode> removes a byte range from a file, without leaving a hole.  The "
1059 "byte range to be collapsed starts at I<offset> and continues for I<len> "
1060 "bytes.  At the completion of the operation, the contents of the file "
1061 "starting at the location I<offset+len> will be appended at the location "
1062 "I<offset>, and the file will be I<len> bytes smaller."
1063 msgstr ""
1064 "B<FALLOC_FL_COLLAPSE_RANGE> フラグ (Linux 3.15 以降で利用可能) を I<mode> に"
1065 "指定すると、 指定したバイト範囲をファイルから削除する。 その際、ホールを残ら"
1066 "ない。 削除されるバイト範囲は I<offset> から始まる I<len> バイトの範囲であ"
1067 "る。 操作が完了すると、 ファイルの I<offset+len> の位置から始まる内容が "
1068 "I<offset> の位置に見えるようになり、 ファイルのサイズは I<len> バイトだけ小さ"
1069 "くなる。"
1070
1071 #. type: Plain text
1072 #: build/C/man2/fallocate.2:161
1073 msgid ""
1074 "A filesystem may place limitations on the granularity of the operation, in "
1075 "order to ensure efficient implementation.  Typically, I<offset> and I<len> "
1076 "must be a multiple of the filesystem logical block size, which varies "
1077 "according to the filesystem type and configuration.  If a filesystem has "
1078 "such a requirement, B<fallocate>()  will fail with the error B<EINVAL> if "
1079 "this requirement is violated."
1080 msgstr ""
1081 "効率的に動作する実装にするため、ファイルシステムはこの操作の粒度に制限を設け"
1082 "ることがある。 通常は I<offset> と I<len> はファイルシステムの論理ブロックサ"
1083 "イズの倍数でなければならない。 論理ブロックサイズはファイルシステムの種類や設"
1084 "定により様々である。 ファイルシステムにこのような要求条件がある場合、 その要"
1085 "求条件が満たされていなければ、 B<fallocate> はエラー B<EINVAL> で失敗する。"
1086
1087 #. type: Plain text
1088 #: build/C/man2/fallocate.2:170
1089 msgid ""
1090 "If the region specified by I<offset> plus I<len> reaches or passes the end "
1091 "of file, an error is returned; instead, use B<ftruncate>(2)  to truncate a "
1092 "file."
1093 msgstr ""
1094 "I<offset> と I<len> で指定された範囲がファイルの末尾かそれより先まで達してい"
1095 "る場合、 エラーが返される。 代わりに、ファイルの切り詰めを行う "
1096 "B<ftruncate>(2) を使用すること。"
1097
1098 #. type: Plain text
1099 #: build/C/man2/fallocate.2:175
1100 msgid ""
1101 "No other flags may be specified in I<mode> in conjunction with "
1102 "B<FALLOC_FL_COLLAPSE_RANGE>."
1103 msgstr ""
1104 "B<FALLOC_FL_COLLAPSE_RANGE> と他のフラグを同時に I<mode> に指定することはでき"
1105 "ない。"
1106
1107 #.  commit 9eb79482a97152930b113b51dff530aba9e28c8e
1108 #.  commit e1d8fb88a64c1f8094b9f6c3b6d2d9e6719c970d
1109 #. type: Plain text
1110 #: build/C/man2/fallocate.2:183
1111 msgid ""
1112 "As at Linux 3.15, B<FALLOC_FL_COLLAPSE_RANGE> is supported by ext4 (only for "
1113 "extent-based files)  and XFS."
1114 msgstr ""
1115 "Linux 3.15 時点では B<FALLOC_FL_COLLAPSE_RANGE> は ext4 (エクステントベースの"
1116 "ファイル) と XFS でサポートされている。"
1117
1118 #. type: SS
1119 #: build/C/man2/fallocate.2:183
1120 #, fuzzy, no-wrap
1121 #| msgid "Deallocating file space"
1122 msgid "Zeroing file space"
1123 msgstr "ファイル空間の割り当て解除"
1124
1125 #.  commit 409332b65d3ed8cfa7a8030f1e9d52f372219642
1126 #. type: Plain text
1127 #: build/C/man2/fallocate.2:199
1128 #, fuzzy
1129 #| msgid ""
1130 #| "Specifying the B<FALLOC_FL_PUNCH_HOLE> flag (available since Linux "
1131 #| "2.6.38) in I<mode> deallocates space (i.e., creates a hole)  in the byte "
1132 #| "range starting at I<offset> and continuing for I<len> bytes.  Within the "
1133 #| "specified range, partial filesystem blocks are zeroed, and whole "
1134 #| "filesystem blocks are removed from the file.  After a successful call, "
1135 #| "subsequent reads from this range will return zeroes."
1136 msgid ""
1137 "Specifying the B<FALLOC_FL_ZERO_RANGE> flag (available since Linux 3.14)  in "
1138 "I<mode> zeroes space in the byte range starting at I<offset> and continuing "
1139 "for I<len> bytes.  Within the specified range, blocks are preallocated for "
1140 "the regions that span the holes in the file.  After a successful call, "
1141 "subsequent reads from this range will return zeroes."
1142 msgstr ""
1143 "B<FALLOC_FL_PUNCH_HOLE> フラグ (Linux 2.6.38 以降で利用可能) を I<mode> に指"
1144 "定すると、 I<offset> で始まる I<len> バイトの領域の空間を解放する (ホールを作"
1145 "成する)。 指定された範囲のうち、 部分的に使用しているファイルシステムブロック"
1146 "は 0 で埋められ、 全体を使用しているファイルシステムブロックはそのファイルか"
1147 "ら削除される。 呼び出しが成功すると、 これ以降のこの範囲からの読み出しでは 0 "
1148 "を返す。"
1149
1150 #. type: Plain text
1151 #: build/C/man2/fallocate.2:205
1152 msgid ""
1153 "Zeroing is done within the filesystem preferably by converting the range "
1154 "into unwritten extents.  This approach means that the specified range will "
1155 "not be physically zeroed out on the device (except for partial blocks at the "
1156 "either end of the range), and I/O is (otherwise) required only to update "
1157 "metadata."
1158 msgstr ""
1159
1160 #. type: Plain text
1161 #: build/C/man2/fallocate.2:217
1162 #, fuzzy
1163 #| msgid ""
1164 #| "If the B<FALLOC_FL_KEEP_SIZE> flag is specified in I<mode>, the behavior "
1165 #| "of the call is similar, but the file size will not be changed even if "
1166 #| "I<offset>+I<len> is greater than the file size.  Preallocating zeroed "
1167 #| "blocks beyond the end of the file in this manner is useful for optimizing "
1168 #| "append workloads."
1169 msgid ""
1170 "If the B<FALLOC_FL_KEEP_SIZE> flag is additionally specified in I<mode>, the "
1171 "behavior of the call is similar, but the file size will not be changed even "
1172 "if I<offset>+I<len> is greater than the file size.  This behavior is the "
1173 "same as when preallocating space with B<FALLOC_FL_KEEP_SIZE> specified."
1174 msgstr ""
1175 "B<FALLOC_FL_KEEP_SIZE> フラグが I<mode> に指定された場合、このシステムコー"
1176 "ル\n"
1177 "の動作は似ているが、 I<offset>+I<len> がファイルサイズよりも大きい場合で\n"
1178 "あってもファイルサイズは変更されない点が異なる。この場合のファイルの末尾\n"
1179 "よりも後ろの前もって割り当てられた 0 で埋められたブロックは、ファイルへの\n"
1180 "追記を最適化したい場合に役に立つ。"
1181
1182 #. type: Plain text
1183 #: build/C/man2/fallocate.2:222
1184 msgid ""
1185 "Not all filesystems support B<FALLOC_FL_ZERO_RANGE>; if a filesystem doesn't "
1186 "support the operation, an error is returned.  The operation is supported on "
1187 "at least the following filesystems:"
1188 msgstr ""
1189 "すべてのファイルシステムで B<FALLOC_FL_ZERO_RANGE> がサポートされているわけで"
1190 "はない。 ファイルシステムがこの操作をサポートしていない場合は、 エラーが返"
1191 "る。 この操作は少なくとも以下のファイルシステムでサポートされている。"
1192
1193 #.  commit 376ba313147b4172f3e8cf620b9fb591f3e8cdfa
1194 #. type: Plain text
1195 #: build/C/man2/fallocate.2:225
1196 msgid "XFS (since Linux 3.14)"
1197 msgstr "XFS (Linux 3.14 以降)"
1198
1199 #.  commit b8a8684502a0fc852afa0056c6bb2a9273f6fcc0
1200 #. type: Plain text
1201 #: build/C/man2/fallocate.2:228
1202 #, fuzzy
1203 #| msgid "ext4 (since Linux 3.0)"
1204 msgid "ext4, for extent-based files (since Linux 3.14)"
1205 msgstr "ext4 (Linux 3.0 以降)"
1206
1207 #. type: Plain text
1208 #: build/C/man2/fallocate.2:235
1209 msgid ""
1210 "On success, B<fallocate>()  returns zero.  On error, -1 is returned and "
1211 "I<errno> is set to indicate the error."
1212 msgstr ""
1213 "成功の場合、 B<fallocate>() は 0 を返す。 エラーの場合、-1 を返し、 I<error> "
1214 "にエラーを示す値を設定する。"
1215
1216 #. type: TP
1217 #: build/C/man2/fallocate.2:236 build/C/man2/madvise.2:279
1218 #: build/C/man2/mmap.2:415 build/C/man2/posix_fadvise.2:91
1219 #: build/C/man3/posix_fallocate.3:73 build/C/man2/readahead.2:73
1220 #: build/C/man2/sync_file_range.2:148
1221 #, no-wrap
1222 msgid "B<EBADF>"
1223 msgstr "B<EBADF>"
1224
1225 #. type: Plain text
1226 #: build/C/man2/fallocate.2:240 build/C/man3/posix_fallocate.3:77
1227 msgid "I<fd> is not a valid file descriptor, or is not opened for writing."
1228 msgstr ""
1229 "I<fd> が有効なファイルディスクリプタでないか、 書き込み用としてオープンされて"
1230 "いない。"
1231
1232 #. type: TP
1233 #: build/C/man2/fallocate.2:240 build/C/man3/posix_fallocate.3:77
1234 #, no-wrap
1235 msgid "B<EFBIG>"
1236 msgstr "B<EFBIG>"
1237
1238 #. type: Plain text
1239 #: build/C/man2/fallocate.2:244
1240 msgid "I<offset>+I<len> exceeds the maximum file size."
1241 msgstr "I<offset + len> がファイルサイズの最大値よりも大きい。"
1242
1243 #. type: TP
1244 #: build/C/man2/fallocate.2:244
1245 #, no-wrap
1246 msgid "B<EINTR>"
1247 msgstr "B<EINTR>"
1248
1249 #. type: Plain text
1250 #: build/C/man2/fallocate.2:247
1251 msgid "A signal was caught during execution."
1252 msgstr "実行中にシグナルが捕捉された。"
1253
1254 #. type: Plain text
1255 #: build/C/man2/fallocate.2:259 build/C/man3/posix_fallocate.3:87
1256 msgid "I<offset> was less than 0, or I<len> was less than or equal to 0."
1257 msgstr "I<offset> が 0 未満だったか、 I<len> が 0 以下だった。"
1258
1259 #. type: Plain text
1260 #: build/C/man2/fallocate.2:269
1261 msgid ""
1262 "I<mode> is B<FALLOC_FL_COLLAPSE_RANGE> and the range specified by I<offset> "
1263 "plus I<len> reaches or passes the end of the file."
1264 msgstr ""
1265 "I<mode> が B<FALLOC_FL_COLLAPSE_RANGE> で、 I<offset> と I<len> で指定された"
1266 "範囲がファイルの末尾かそれより先まで達している。"
1267
1268 #. type: Plain text
1269 #: build/C/man2/fallocate.2:279
1270 msgid ""
1271 "I<mode> is B<FALLOC_FL_COLLAPSE_RANGE>, but either I<offset> or I<len> is "
1272 "not a multiple of the filesystem block size."
1273 msgstr ""
1274 "I<mode> が B<FALLOC_FL_COLLAPSE_RANGE> だが、 I<offset> か I<len> のいずれか"
1275 "がファイルシステムのブロックサイズの倍数ではない。"
1276
1277 #. type: Plain text
1278 #: build/C/man2/fallocate.2:287
1279 msgid ""
1280 "I<mode> contains both B<FALLOC_FL_COLLAPSE_RANGE> and other flags; no other "
1281 "flags are permitted with B<FALLOC_FL_COLLAPSE_RANGE>."
1282 msgstr ""
1283 "I<mode> に B<FALLOC_FL_COLLAPSE_RANGE> と他のフラグの両方が指定されている。 "
1284 "B<FALLOC_FL_COLLAPSE_RANGE> と他のフラグを一緒に使うことができない。"
1285
1286 #.  There was a inconsistency in 3.15-rc1, that should be resolved so that all
1287 #.  filesystems use this error for this case. (Tytso says ex4 will change.)
1288 #.  http://thread.gmane.org/gmane.comp.file-systems.xfs.general/60485/focus=5521
1289 #.  From: Michael Kerrisk (man-pages <mtk.manpages@...>
1290 #.  Subject: Re: [PATCH v5 10/10] manpage: update FALLOC_FL_COLLAPSE_RANGE flag in fallocate
1291 #.  Newsgroups: gmane.linux.man, gmane.linux.file-systems
1292 #.  Date: 2014-04-17 13:40:05 GMT
1293 #. type: Plain text
1294 #: build/C/man2/fallocate.2:304
1295 msgid ""
1296 "I<mode> is B<FALLOC_FL_COLLAPSE_RANGE> or B<FALLOC_FL_ZERO_RANGE>, but the "
1297 "file referred to by I<fd> is not a regular file."
1298 msgstr ""
1299 "I<mode> が B<FALLOC_FL_COLLAPSE_RANGE> か B<FALLOC_FL_ZERO_RANGE> だが、 "
1300 "I<fd> が参照しているファイルが通常のファイルではない。"
1301
1302 #. type: TP
1303 #: build/C/man2/fallocate.2:304 build/C/man2/madvise.2:310
1304 #: build/C/man2/sync_file_range.2:160
1305 #, no-wrap
1306 msgid "B<EIO>"
1307 msgstr "B<EIO>"
1308
1309 #. type: Plain text
1310 #: build/C/man2/fallocate.2:307
1311 msgid "An I/O error occurred while reading from or writing to a filesystem."
1312 msgstr "ファイルシステムとの読み書き中に入出力エラーが発生した。"
1313
1314 #. type: TP
1315 #: build/C/man2/fallocate.2:307 build/C/man2/mmap.2:450
1316 #: build/C/man3/posix_fallocate.3:87
1317 #, no-wrap
1318 msgid "B<ENODEV>"
1319 msgstr "B<ENODEV>"
1320
1321 #. type: Plain text
1322 #: build/C/man2/fallocate.2:314
1323 msgid ""
1324 "I<fd> does not refer to a regular file or a directory.  (If I<fd> is a pipe "
1325 "or FIFO, a different error results.)"
1326 msgstr ""
1327 "I<fd> が通常のファイルかディレクトリを参照していない (I<fd> がパイプや FIFO "
1328 "を参照している場合、別のエラーが発生する)。"
1329
1330 #. type: TP
1331 #: build/C/man2/fallocate.2:314 build/C/man3/posix_fallocate.3:91
1332 #: build/C/man2/shmget.2:233 build/C/man2/sync_file_range.2:166
1333 #, no-wrap
1334 msgid "B<ENOSPC>"
1335 msgstr "B<ENOSPC>"
1336
1337 #. type: Plain text
1338 #: build/C/man2/fallocate.2:319 build/C/man3/posix_fallocate.3:96
1339 msgid ""
1340 "There is not enough space left on the device containing the file referred to "
1341 "by I<fd>."
1342 msgstr "I<fd> が参照するファイルを含むデバイスに十分な空き領域がない。"
1343
1344 #. type: Plain text
1345 #: build/C/man2/fallocate.2:323
1346 msgid "This kernel does not implement B<fallocate>()."
1347 msgstr "このカーネルでは B<fallocate>() は実装されていない。"
1348
1349 #. type: TP
1350 #: build/C/man2/fallocate.2:323
1351 #, no-wrap
1352 msgid "B<EOPNOTSUPP>"
1353 msgstr "B<EOPNOTSUPP>"
1354
1355 #. type: Plain text
1356 #: build/C/man2/fallocate.2:332
1357 msgid ""
1358 "The filesystem containing the file referred to by I<fd> does not support "
1359 "this operation; or the I<mode> is not supported by the filesystem containing "
1360 "the file referred to by I<fd>."
1361 msgstr ""
1362 "I<fd> が参照するファイルを含むファイルシステムが 指定された操作を\n"
1363 "サポートしていない。 I<fd> が参照するファイルを含むファイルシステムが\n"
1364 "I<mode> をサポートしていない。"
1365
1366 #. type: TP
1367 #: build/C/man2/fallocate.2:332 build/C/man2/mlock.2:143
1368 #: build/C/man2/mlock.2:182 build/C/man2/mmap.2:458 build/C/man2/shmctl.2:353
1369 #: build/C/man2/shmget.2:241
1370 #, no-wrap
1371 msgid "B<EPERM>"
1372 msgstr "B<EPERM>"
1373
1374 #. type: Plain text
1375 #: build/C/man2/fallocate.2:350
1376 msgid ""
1377 "The file referred to by I<fd> is marked immutable (see B<chattr>(1)).  Or: "
1378 "I<mode> specifies B<FALLOC_FL_PUNCH_HOLE> or B<FALLOC_FL_COLLAPSE_RANGE> and "
1379 "the file referred to by I<fd> is marked append-only (see B<chattr>(1))."
1380 msgstr ""
1381 "I<fd> が参照するファイルに変更不可 (immutable) の属性が付いている "
1382 "(B<chattr>(1) 参照)。 I<mode> に B<FALLOC_FL_PUNCH_HOLE> か "
1383 "B<FALLOC_FL_COLLAPSE_RANGE> が指定されたが、 I<fd> が参照するファイルに追加の"
1384 "み (append-only) の属性が付いている (B<chattr>(1) 参照)。"
1385
1386 #. type: TP
1387 #: build/C/man2/fallocate.2:350 build/C/man2/posix_fadvise.2:97
1388 #: build/C/man3/posix_fallocate.3:96 build/C/man2/sync_file_range.2:169
1389 #, no-wrap
1390 msgid "B<ESPIPE>"
1391 msgstr "B<ESPIPE>"
1392
1393 #. type: Plain text
1394 #: build/C/man2/fallocate.2:354
1395 msgid "I<fd> refers to a pipe or FIFO."
1396 msgstr "I<fd> がパイプか FIFO を参照している。"
1397
1398 #. type: TP
1399 #: build/C/man2/fallocate.2:354 build/C/man2/mmap.2:467
1400 #, no-wrap
1401 msgid "B<ETXTBSY>"
1402 msgstr "B<ETXTBSY>"
1403
1404 #. type: Plain text
1405 #: build/C/man2/fallocate.2:362
1406 msgid ""
1407 "I<mode> specifies B<FALLOC_FL_COLLAPSE_RANGE>, but the file referred to by "
1408 "I<fd> is currently being executed."
1409 msgstr ""
1410 "I<mode> に B<FALLOC_FL_COLLAPSE_RANGE> が指定されたが、 I<fd> が参照するファ"
1411 "イルは現在実行中である。"
1412
1413 #. type: SH
1414 #: build/C/man2/fallocate.2:362 build/C/man3/malloc_info.3:60
1415 #: build/C/man3/mcheck.3:134 build/C/man2/mmap2.2:74
1416 #: build/C/man2/posix_fadvise.2:104 build/C/man3/posix_fallocate.3:100
1417 #: build/C/man3/posix_memalign.3:167 build/C/man2/readahead.2:83
1418 #: build/C/man2/remap_file_pages.2:156 build/C/man3/shm_open.3:249
1419 #: build/C/man2/subpage_prot.2:90 build/C/man2/sync_file_range.2:177
1420 #, no-wrap
1421 msgid "VERSIONS"
1422 msgstr "バージョン"
1423
1424 #.  See http://sourceware.org/bugzilla/show_bug.cgi?id=14964
1425 #. type: Plain text
1426 #: build/C/man2/fallocate.2:370
1427 msgid ""
1428 "B<fallocate>()  is available on Linux since kernel 2.6.23.  Support is "
1429 "provided by glibc since version 2.10.  The B<FALLOC_FL_*> flags are defined "
1430 "in glibc headers only since version 2.18."
1431 msgstr ""
1432 "B<fallocate>()  はカーネル 2.6.23 以降の Linux で利用可能である。 glibc での"
1433 "対応はバージョン 3.10 以降で行われている。 B<FALLOC_FL_*> が glibc のヘッダ"
1434 "ファイルで定義されているのは、バージョン 2.18 以降のみである。"
1435
1436 #. type: Plain text
1437 #: build/C/man2/fallocate.2:373
1438 msgid "B<fallocate>()  is Linux-specific."
1439 msgstr "B<fallocate>()  は Linux 固有である。"
1440
1441 #. type: Plain text
1442 #: build/C/man2/fallocate.2:378
1443 msgid ""
1444 "B<fallocate>(1), B<ftruncate>(2), B<posix_fadvise>(3), B<posix_fallocate>(3)"
1445 msgstr ""
1446 "B<fallocate>(1), B<ftruncate>(2), B<posix_fadvise>(3), B<posix_fallocate>(3)"
1447
1448 #. type: TH
1449 #: build/C/man2/madvise.2:35
1450 #, no-wrap
1451 msgid "MADVISE"
1452 msgstr "MADVISE"
1453
1454 #. type: TH
1455 #: build/C/man2/madvise.2:35 build/C/man2/msync.2:25
1456 #, no-wrap
1457 msgid "2014-04-20"
1458 msgstr "2014-04-20"
1459
1460 #. type: Plain text
1461 #: build/C/man2/madvise.2:38
1462 msgid "madvise - give advice about use of memory"
1463 msgstr "madvise - メモリ利用に関するアドバイスを与える"
1464
1465 #. type: Plain text
1466 #: build/C/man2/madvise.2:40 build/C/man2/msync.2:30
1467 #: build/C/man3/shm_open.3:31
1468 msgid "B<#include E<lt>sys/mman.hE<gt>>"
1469 msgstr "B<#include E<lt>sys/mman.hE<gt>>"
1470
1471 #. type: Plain text
1472 #: build/C/man2/madvise.2:42
1473 msgid ""
1474 "B<int madvise(void *>I<addr>B<, size_t >I<length>B<, int >I<advice>B<);>"
1475 msgstr ""
1476 "B<int madvise(void *>I<addr>B<, size_t >I<length>B<, int >I<advice>B<);>"
1477
1478 #. type: Plain text
1479 #: build/C/man2/madvise.2:46 build/C/man2/posix_fadvise.2:43
1480 #: build/C/man3/posix_fallocate.3:39 build/C/man3/posix_memalign.3:49
1481 msgid ""
1482 "Feature Test Macro Requirements for glibc (see B<feature_test_macros>(7)):"
1483 msgstr "glibc 向けの機能検査マクロの要件 (B<feature_test_macros>(7)  参照):"
1484
1485 #. type: Plain text
1486 #: build/C/man2/madvise.2:50
1487 msgid "B<madvise>(): _BSD_SOURCE"
1488 msgstr "B<madvise>(): _BSD_SOURCE"
1489
1490 #. type: Plain text
1491 #: build/C/man2/madvise.2:68
1492 msgid ""
1493 "The B<madvise>()  system call advises the kernel about how to handle paging "
1494 "input/output in the address range beginning at address I<addr> and with size "
1495 "I<length> bytes.  It allows an application to tell the kernel how it expects "
1496 "to use some mapped or shared memory areas, so that the kernel can choose "
1497 "appropriate read-ahead and caching techniques.  This call does not influence "
1498 "the semantics of the application (except in the case of B<MADV_DONTNEED>), "
1499 "but may influence its performance.  The kernel is free to ignore the advice."
1500 msgstr ""
1501 "B<madvise>()  システムコールは、アドレス I<addr> からはじまる I<length> バイ"
1502 "トのメモリブロックのページング入出力をどう扱えば良いか、 カーネルにアドバイス"
1503 "する。 これを用いると、 アプリケーションからカーネルに、 マップされたメモリや"
1504 "共有メモリをどのように扱ってほしいか伝えることができ、 カーネルはそれに応じて"
1505 "先読みやキャッシュなどの適切な手法を選択できる。 このコールはアプリケーション"
1506 "の動作そのものには影響しない (B<MADV_DONTNEED> の場合は別) が、 性能には影響"
1507 "しうる。 なおこのアドバイスを受け入れるかどうかはカーネルに任される。"
1508
1509 #. type: Plain text
1510 #: build/C/man2/madvise.2:72
1511 msgid "The advice is indicated in the I<advice> argument which can be"
1512 msgstr ""
1513 "アドバイスは引き数 I<advice> によって与える。以下のいずれかを指定できる。"
1514
1515 #. type: TP
1516 #: build/C/man2/madvise.2:72
1517 #, no-wrap
1518 msgid "B<MADV_NORMAL>"
1519 msgstr "B<MADV_NORMAL>"
1520
1521 #. type: Plain text
1522 #: build/C/man2/madvise.2:76
1523 msgid "No special treatment.  This is the default."
1524 msgstr "特別な扱いは行わない。これがデフォルトである。"
1525
1526 #. type: TP
1527 #: build/C/man2/madvise.2:76
1528 #, no-wrap
1529 msgid "B<MADV_RANDOM>"
1530 msgstr "B<MADV_RANDOM>"
1531
1532 #. type: Plain text
1533 #: build/C/man2/madvise.2:80
1534 msgid ""
1535 "Expect page references in random order.  (Hence, read ahead may be less "
1536 "useful than normally.)"
1537 msgstr ""
1538 "ページ参照はランダムな順序で行われそうだ。 (したがって、先読みはあまり効果が"
1539 "なさそうだ。)"
1540
1541 #. type: TP
1542 #: build/C/man2/madvise.2:80
1543 #, no-wrap
1544 msgid "B<MADV_SEQUENTIAL>"
1545 msgstr "B<MADV_SEQUENTIAL>"
1546
1547 #. type: Plain text
1548 #: build/C/man2/madvise.2:85
1549 msgid ""
1550 "Expect page references in sequential order.  (Hence, pages in the given "
1551 "range can be aggressively read ahead, and may be freed soon after they are "
1552 "accessed.)"
1553 msgstr ""
1554 "ページ参照はシーケンシャルな順序で行われそうだ。 (したがって与えた範囲のペー"
1555 "ジは積極的に先読みしておくと良いだろう。 またアクセスが終わったら速やかに解放"
1556 "して良い。)"
1557
1558 #. type: TP
1559 #: build/C/man2/madvise.2:85
1560 #, no-wrap
1561 msgid "B<MADV_WILLNEED>"
1562 msgstr "B<MADV_WILLNEED>"
1563
1564 #. type: Plain text
1565 #: build/C/man2/madvise.2:89
1566 msgid ""
1567 "Expect access in the near future.  (Hence, it might be a good idea to read "
1568 "some pages ahead.)"
1569 msgstr ""
1570 "近い将来にアクセスされそうだ。 (したがってこれらのページを今のうちに先読みし"
1571 "ておくといいだろう。)"
1572
1573 #. type: TP
1574 #: build/C/man2/madvise.2:89
1575 #, no-wrap
1576 msgid "B<MADV_DONTNEED>"
1577 msgstr "B<MADV_DONTNEED>"
1578
1579 #. type: Plain text
1580 #: build/C/man2/madvise.2:100
1581 msgid ""
1582 "Do not expect access in the near future.  (For the time being, the "
1583 "application is finished with the given range, so the kernel can free "
1584 "resources associated with it.)  Subsequent accesses of pages in this range "
1585 "will succeed, but will result either in reloading of the memory contents "
1586 "from the underlying mapped file (see B<mmap>(2))  or zero-fill-on-demand "
1587 "pages for mappings without an underlying file."
1588 msgstr ""
1589 "しばらくアクセスはなさそうだ。 (現時点でアプリケーションは与えた範囲の処理を"
1590 "終えている。 したがってカーネルはこれに関連するリソースを解放して良い。)  こ"
1591 "れ以降この範囲のページへのアクセスがあると、 成功はするが、メモリの内容をマッ"
1592 "プ元のファイルからロードし直すことになる (B<mmap>(2)  を見よ) か、 または元"
1593 "ファイルがないマップページでは アクセスがあったときに 0 埋めが行われることに"
1594 "なる。"
1595
1596 #. type: TP
1597 #: build/C/man2/madvise.2:100
1598 #, no-wrap
1599 msgid "B<MADV_REMOVE> (since Linux 2.6.16)"
1600 msgstr "B<MADV_REMOVE> (Linux 2.6.16 以降)"
1601
1602 #.  2.6.18-rc5
1603 #.  Databases want to use this feature to drop a section of their
1604 #.  bufferpool (shared memory segments) - without writing back to
1605 #.  disk/swap space.  This feature is also useful for supporting
1606 #.  hot-plug memory on UML.
1607 #. type: Plain text
1608 #: build/C/man2/madvise.2:113
1609 msgid ""
1610 "Free up a given range of pages and its associated backing store.  Currently, "
1611 "only shmfs/tmpfs supports this; other filesystems return with the error "
1612 "B<ENOSYS>."
1613 msgstr ""
1614 "指定された範囲のページと関連するバッキングストアを解放する。 現在のところ、 "
1615 "shmfs/tmpfs だけがこれに対応している。 他のファイルシステムでは B<ENOSYS> が"
1616 "返される。"
1617
1618 #. type: TP
1619 #: build/C/man2/madvise.2:113
1620 #, no-wrap
1621 msgid "B<MADV_DONTFORK> (since Linux 2.6.16)"
1622 msgstr "B<MADV_DONTFORK> (Linux 2.6.16 以降)"
1623
1624 #.  See http://lwn.net/Articles/171941/
1625 #.  [PATCH] madvise MADV_DONTFORK/MADV_DOFORK
1626 #.  Currently, copy-on-write may change the physical address of
1627 #.  a page even if the user requested that the page is pinned in
1628 #.  memory (either by mlock or by get_user_pages).  This happens
1629 #.  if the process forks meanwhile, and the parent writes to that
1630 #.  page.  As a result, the page is orphaned: in case of
1631 #.  get_user_pages, the application will never see any data hardware
1632 #.  DMA's into this page after the COW.  In case of mlock'd memory,
1633 #.  the parent is not getting the realtime/security benefits of mlock.
1634 #.  In particular, this affects the Infiniband modules which do DMA from
1635 #.  and into user pages all the time.
1636 #.  This patch adds madvise options to control whether memory range is
1637 #.  inherited across fork. Useful e.g. for when hardware is doing DMA
1638 #.  from/into these pages.  Could also be useful to an application
1639 #.  wanting to speed up its forks by cutting large areas out of
1640 #.  consideration.
1641 #.  SEE ALSO: http://lwn.net/Articles/171941/
1642 #.  "Tweaks to madvise() and posix_fadvise()", 14 Feb 2006
1643 #. type: Plain text
1644 #: build/C/man2/madvise.2:144
1645 msgid ""
1646 "Do not make the pages in this range available to the child after a "
1647 "B<fork>(2).  This is useful to prevent copy-on-write semantics from changing "
1648 "the physical location of a page(s) if the parent writes to it after a "
1649 "B<fork>(2).  (Such page relocations cause problems for hardware that DMAs "
1650 "into the page(s).)"
1651 msgstr ""
1652 "B<fork>(2)  が行われた後、指定された範囲のページを子プロセスが利用できないよ"
1653 "うにする。 この機能は、書き込み時コピー (copy-on-write) 方式で、 B<fork>(2)  "
1654 "の後で親プロセスがページに書き込みを行った場合に ページの物理位置が変化しない"
1655 "ようにするのに有効である (ページの再配置はハードウェアがそのページに DMA 転送"
1656 "を行うような場合に 問題を起こすことがある)。"
1657
1658 #. type: TP
1659 #: build/C/man2/madvise.2:144
1660 #, no-wrap
1661 msgid "B<MADV_DOFORK> (since Linux 2.6.16)"
1662 msgstr "B<MADV_DOFORK> (Linux 2.6.16 以降)"
1663
1664 #. type: Plain text
1665 #: build/C/man2/madvise.2:150
1666 msgid ""
1667 "Undo the effect of B<MADV_DONTFORK>, restoring the default behavior, whereby "
1668 "a mapping is inherited across B<fork>(2)."
1669 msgstr ""
1670 "B<MADV_DONTFORK> の影響を取り消し、デフォルトの動作に戻す。 つまり、 "
1671 "B<fork>(2)  の前後でマッピングは継承されるようになる。"
1672
1673 #. type: TP
1674 #: build/C/man2/madvise.2:150
1675 #, no-wrap
1676 msgid "B<MADV_HWPOISON> (since Linux 2.6.32)"
1677 msgstr "B<MADV_HWPOISON> (Linux 2.6.32 以降)"
1678
1679 #. type: Plain text
1680 #: build/C/man2/madvise.2:162
1681 msgid ""
1682 "Poison a page and handle it like a hardware memory corruption.  This "
1683 "operation is available only for privileged (B<CAP_SYS_ADMIN>)  processes.  "
1684 "This operation may result in the calling process receiving a B<SIGBUS> and "
1685 "the page being unmapped.  This feature is intended for testing of memory "
1686 "error-handling code; it is available only if the kernel was configured with "
1687 "B<CONFIG_MEMORY_FAILURE>."
1688 msgstr ""
1689 "ページに毒入れを行い、ハードウェアメモリの破損のようにそのページを取り扱う。 "
1690 "この操作は特権 (B<CAP_SYS_ADMIN> を持った) プロセスだけが利用できる。 この操"
1691 "作の結果、呼び出したプロセスは B<SIGBUS> を受け取り、そのページはアンマップさ"
1692 "れる。 この機能はメモリのエラー処理コードをテストするためのものである。 カー"
1693 "ネルで B<CONFIG_MEMORY_FAILURE> が有効になっている場合にのみ利用可能である。"
1694
1695 #. type: TP
1696 #: build/C/man2/madvise.2:162
1697 #, no-wrap
1698 msgid "B<MADV_SOFT_OFFLINE> (since Linux 2.6.33)"
1699 msgstr "B<MADV_SOFT_OFFLINE> (Linux 2.6.33 以降)"
1700
1701 #. type: Plain text
1702 #: build/C/man2/madvise.2:180
1703 msgid ""
1704 "Soft offline the pages in the range specified by I<addr> and I<length>.  The "
1705 "memory of each page in the specified range is preserved (i.e., when next "
1706 "accessed, the same content will be visible, but in a new physical page "
1707 "frame), and the original page is offlined (i.e., no longer used, and taken "
1708 "out of normal memory management).  The effect of the B<MADV_SOFT_OFFLINE> "
1709 "operation is invisible to (i.e., does not change the semantics of)  the "
1710 "calling process.  This feature is intended for testing of memory error-"
1711 "handling code; it is available only if the kernel was configured with "
1712 "B<CONFIG_MEMORY_FAILURE>."
1713 msgstr ""
1714 "I<addr> と I<length> で指定された範囲のページをソフトオフラインにする。 指定"
1715 "された範囲の各ページのメモリの内容は保持され (すなわち、次にアクセスされた際"
1716 "に、同じ内容が見えるが、新しい物理ページフレームになる)、 元のフレームはオフ"
1717 "ラインになる (すなわち、 そのフレームは使用される、通常のメモリ管理からは取り"
1718 "除かれる)。 B<MADV_SOFT_OFFLINE> 操作の影響は呼び出したプロセスには見えない "
1719 "(つまり呼び出したプロセスの動作は変化しない)。 この機能はメモリのエラー処理"
1720 "コードをテストすることを目的に作られた。 カーネルで B<CONFIG_MEMORY_FAILURE> "
1721 "が有効になっている場合にのみ利用可能である。"
1722
1723 #. type: TP
1724 #: build/C/man2/madvise.2:180
1725 #, no-wrap
1726 msgid "B<MADV_MERGEABLE> (since Linux 2.6.32)"
1727 msgstr "B<MADV_MERGEABLE> (Linux 2.6.32 以降)"
1728
1729 #. type: Plain text
1730 #: build/C/man2/madvise.2:205
1731 msgid ""
1732 "Enable Kernel Samepage Merging (KSM) for the pages in the range specified by "
1733 "I<addr> and I<length>.  The kernel regularly scans those areas of user "
1734 "memory that have been marked as mergeable, looking for pages with identical "
1735 "content.  These are replaced by a single write-protected page (which is "
1736 "automatically copied if a process later wants to update the content of the "
1737 "page).  KSM merges only private anonymous pages (see B<mmap>(2)).  The KSM "
1738 "feature is intended for applications that generate many instances of the "
1739 "same data (e.g., virtualization systems such as KVM).  It can consume a lot "
1740 "of processing power; use with care.  See the Linux kernel source file "
1741 "I<Documentation/vm/ksm.txt> for more details.  The B<MADV_MERGEABLE> and "
1742 "B<MADV_UNMERGEABLE> operations are available only if the kernel was "
1743 "configured with B<CONFIG_KSM>."
1744 msgstr ""
1745 "Kernel Samepage Merging (KSM; カーネルによる同じページの統合) を I<addr> と "
1746 "I<length> で指定された領域に対して有効にする。 カーネルは、 統合可能の印がつ"
1747 "いたユーザーメモリの領域を定期的にスキャンし、内容が全く同じページを探す。 内"
1748 "容が全く同じページがあれば、それらのページは書き込み保護 (write-protected) が"
1749 "かかった一つのページで置き換えられる (プロセスが後でページの内容を更新しよう"
1750 "とした際には自動的にページのコピーが行われる)。 KSM はプライベートな無名ペー"
1751 "ジ (anonymous pages) だけを統合する (B<mmap>(2) 参照)。 KSM 機能は、 同じデー"
1752 "タのインスタンスを大量に生成するアプリケーション (KVM などの仮想化システム) "
1753 "での利用を想定している。 この機能はプロセッシング能力を大量に消費する場合があ"
1754 "り、注意して使用すること。 詳細は Linux カーネルソースファイル "
1755 "I<Documentation/vm/ksm.txt> を参照。 B<MADV_MERGEABLE> と "
1756 "B<MADV_UNMERGEABLE> は、 カーネルで B<CONFIG_KSM> オプションを有効になってい"
1757 "る場合にのみ利用できる。"
1758
1759 #. type: TP
1760 #: build/C/man2/madvise.2:205
1761 #, no-wrap
1762 msgid "B<MADV_UNMERGEABLE> (since Linux 2.6.32)"
1763 msgstr "B<MADV_UNMERGEABLE> (Linux 2.6.32 以降)"
1764
1765 #. type: Plain text
1766 #: build/C/man2/madvise.2:214
1767 msgid ""
1768 "Undo the effect of an earlier B<MADV_MERGEABLE> operation on the specified "
1769 "address range; KSM unmerges whatever pages it had merged in the address "
1770 "range specified by I<addr> and I<length>."
1771 msgstr ""
1772 "指定されたアドレス範囲に関して、それ以前に行われた B<MADV_MERGEABLE> 操作の効"
1773 "果を取り消す。 KSM は、  I<addr> と I<length> で指定されたアドレス範囲の統合"
1774 "済みのすべてのページの統合解除を行う。"
1775
1776 #. type: TP
1777 #: build/C/man2/madvise.2:214
1778 #, no-wrap
1779 msgid "B<MADV_HUGEPAGE> (since Linux 2.6.38)"
1780 msgstr "B<MADV_HUGEPAGE> (Linux 2.6.38 以降)"
1781
1782 #.  http://lwn.net/Articles/358904/
1783 #.  https://lwn.net/Articles/423584/
1784 #. type: Plain text
1785 #: build/C/man2/madvise.2:243
1786 msgid ""
1787 "Enables Transparent Huge Pages (THP) for pages in the range specified by "
1788 "I<addr> and I<length>.  Currently, Transparent Huge Pages work only with "
1789 "private anonymous pages (see B<mmap>(2)).  The kernel will regularly scan "
1790 "the areas marked as huge page candidates to replace them with huge pages.  "
1791 "The kernel will also allocate huge pages directly when the region is "
1792 "naturally aligned to the huge page size (see B<posix_memalign>(2)).  This "
1793 "feature is primarily aimed at applications that use large mappings of data "
1794 "and access large regions of that memory at a time (e.g., virtualization "
1795 "systems such as QEMU).  It can very easily waste memory (e.g., a 2MB mapping "
1796 "that only ever accesses 1 byte will result in 2MB of wired memory instead of "
1797 "one 4KB page).  See the Linux kernel source file I<Documentation/vm/"
1798 "transhuge.txt> for more details.  The B<MADV_HUGEPAGE> and "
1799 "B<MADV_NOHUGEPAGE> operations are available only if the kernel was "
1800 "configured with B<CONFIG_TRANSPARENT_HUGEPAGE>."
1801 msgstr ""
1802 "Transparent Huge Pages (THP) を I<addr> と I<length> で指定された領域に対して"
1803 "有効にする。 現在のところ、Transparent Huge Pages はプライベートな無名ページ "
1804 "(anonymous pages) についてのみ機能する。 カーネルは定期的にヒュージページ "
1805 "(huge page) 候補の印がついたページをスキャンし、ヒュージページと置き換える。 "
1806 "また、カーネルはその領域がヒュージページのサイズに合っている場合、ヒュージ"
1807 "ページを直接割り当てる (B<posix_memalign>(2) 参照)。 この機能は、大きなデータ"
1808 "マッピングを使用し、一度にそのメモリの大きな範囲にアクセスするようなアプリ"
1809 "ケーション (例えば QEMU のような仮想化システム) で使うことを主に想定されてい"
1810 "る。 この機能は非常に簡単にメモリを浪費してしまう (例えば、1 バイトしかアクセ"
1811 "スしない 2MB のマッピングが、 4KB ページではなく 2MB の実際のメモリを使ってし"
1812 "まう)。 詳細は Linux カーネルソースファイル I<Documentation/vm/transhuge."
1813 "txt> を参照。 B<MADV_HUGEPAGE> と B<MADV_NOHUGEPAGE> は、 カーネルで "
1814 "B<CONFIG_TRANSPARENT_HUGEPAGE> オプションを有効になっている場合にのみ利用でき"
1815 "る。"
1816
1817 #. type: TP
1818 #: build/C/man2/madvise.2:243
1819 #, no-wrap
1820 msgid "B<MADV_NOHUGEPAGE> (since Linux 2.6.38)"
1821 msgstr "B<MADV_NOHUGEPAGE> (Linux 2.6.38 以降)"
1822
1823 #. type: Plain text
1824 #: build/C/man2/madvise.2:250
1825 msgid ""
1826 "Ensures that memory in the address range specified by I<addr> and I<length> "
1827 "will not be collapsed into huge pages."
1828 msgstr ""
1829 "I<addr> と I<length> で指定されたアドレス範囲のメモリがヒュージページに組み込"
1830 "まれないようにする。"
1831
1832 #. type: TP
1833 #: build/C/man2/madvise.2:250
1834 #, no-wrap
1835 msgid "B<MADV_DONTDUMP> (since Linux 3.4)"
1836 msgstr "B<MADV_DONTDUMP> (Linux 3.4 以降)"
1837
1838 #. type: Plain text
1839 #: build/C/man2/madvise.2:264
1840 msgid ""
1841 "Exclude from a core dump those pages in the range specified by I<addr> and "
1842 "I<length>.  This is useful in applications that have large areas of memory "
1843 "that are known not to be useful in a core dump.  The effect of "
1844 "B<MADV_DONTDUMP> takes precedence over the bit mask that is set via the I</"
1845 "proc/PID/coredump_filter> file (see B<core>(5))."
1846 msgstr ""
1847 "コアダンプから I<addr> と I<length> で指定された範囲のページを除外する。 これ"
1848 "は、 コアダンプに含めても役に立たないことが分かっている大きなメモリ領域がある"
1849 "アプリケーションで有用である。 B<MADV_DONTDUMP> の効果は I</proc/PID/"
1850 "coredump_filter> ファイル経由で設定されたビットマスクよりも優先される "
1851 "(B<core>(5) 参照)。"
1852
1853 #. type: TP
1854 #: build/C/man2/madvise.2:264
1855 #, no-wrap
1856 msgid "B<MADV_DODUMP> (since Linux 3.4)"
1857 msgstr "B<MADV_DODUMP> (Linux 3.4 以降)"
1858
1859 #. type: Plain text
1860 #: build/C/man2/madvise.2:268
1861 msgid "Undo the effect of an earlier B<MADV_DONTDUMP>."
1862 msgstr "以前の B<MADV_DONTDUMP> の効果を取り消す。"
1863
1864 #. type: Plain text
1865 #: build/C/man2/madvise.2:275
1866 msgid ""
1867 "On success B<madvise>()  returns zero.  On error, it returns -1 and I<errno> "
1868 "is set appropriately."
1869 msgstr ""
1870 "B<madvise>()  は成功すると 0 を返す。 エラーが起こると -1 を返し、 I<errno> "
1871 "を適切な値に設定する。"
1872
1873 #. type: TP
1874 #: build/C/man2/madvise.2:276 build/C/man2/mlock.2:154 build/C/man2/mmap.2:411
1875 #: build/C/man2/mremap.2:136
1876 #, no-wrap
1877 msgid "B<EAGAIN>"
1878 msgstr "B<EAGAIN>"
1879
1880 #. type: Plain text
1881 #: build/C/man2/madvise.2:279
1882 msgid "A kernel resource was temporarily unavailable."
1883 msgstr "何らかのカーネルリソースが一時的に利用できなかった。"
1884
1885 #. type: Plain text
1886 #: build/C/man2/madvise.2:282
1887 msgid "The map exists, but the area maps something that isn't a file."
1888 msgstr "指定したマップは存在するが、ファイルではないところをマップしている。"
1889
1890 #. type: Plain text
1891 #: build/C/man2/madvise.2:285
1892 msgid "This error can occur for the following reasons:"
1893 msgstr "このエラーは以下の理由で発生する。"
1894
1895 #.  .I len
1896 #.  is zero,
1897 #. type: Plain text
1898 #: build/C/man2/madvise.2:292
1899 msgid "The value I<len> is negative."
1900 msgstr "I<len> が負の値である。"
1901
1902 #. type: Plain text
1903 #: build/C/man2/madvise.2:295
1904 msgid "I<addr> is not page-aligned."
1905 msgstr "I<addr> がページ境界ではない。"
1906
1907 #. type: Plain text
1908 #: build/C/man2/madvise.2:298
1909 msgid "I<advice> is not a valid value"
1910 msgstr "I<advice> が有効な値でない。"
1911
1912 #. type: Plain text
1913 #: build/C/man2/madvise.2:301
1914 msgid ""
1915 "The application is attempting to release locked or shared pages (with "
1916 "B<MADV_DONTNEED>)."
1917 msgstr ""
1918 "アプリケーションがロックされたページや共有ページを (B<MADV_DONTNEED> で) 解"
1919 "放\n"
1920 "しようとしている。"
1921
1922 #. type: Plain text
1923 #: build/C/man2/madvise.2:309
1924 msgid ""
1925 "B<MADV_MERGEABLE> or B<MADV_UNMERGEABLE> was specified in I<advice>, but the "
1926 "kernel was not configured with B<CONFIG_KSM>."
1927 msgstr ""
1928 "I<advice> に B<MADV_MERGEABLE> か B<MADV_UNMERGEABLE> が指定されたが、 カーネ"
1929 "ルの設定が B<CONFIG_KSM> が有効になっていなかった。"
1930
1931 #. type: Plain text
1932 #: build/C/man2/madvise.2:316
1933 msgid ""
1934 "(for B<MADV_WILLNEED>)  Paging in this area would exceed the process's "
1935 "maximum resident set size."
1936 msgstr ""
1937 "(B<MADV_WILLNEED> の場合) この範囲のページングを行うと、 プロセスの RSS "
1938 "(resident set size) の最大値を越えてしまう。"
1939
1940 #. type: TP
1941 #: build/C/man2/madvise.2:316 build/C/man2/madvise.2:321
1942 #: build/C/man2/mlock.2:123 build/C/man2/mlock.2:131 build/C/man2/mlock.2:169
1943 #: build/C/man2/mmap.2:454 build/C/man2/mprotect.2:99
1944 #: build/C/man2/mprotect.2:102 build/C/man2/mremap.2:179
1945 #: build/C/man2/msync.2:93 build/C/man3/posix_memalign.3:164
1946 #: build/C/man2/shmctl.2:337 build/C/man2/shmget.2:230
1947 #: build/C/man2/shmop.2:211 build/C/man2/subpage_prot.2:87
1948 #: build/C/man2/sync_file_range.2:163
1949 #, no-wrap
1950 msgid "B<ENOMEM>"
1951 msgstr "B<ENOMEM>"
1952
1953 #. type: Plain text
1954 #: build/C/man2/madvise.2:321
1955 msgid "(for B<MADV_WILLNEED>)  Not enough memory: paging in failed."
1956 msgstr "(B<MADV_WILLNEED> の場合) メモリが足りず、ページングに失敗した。"
1957
1958 #. type: Plain text
1959 #: build/C/man2/madvise.2:325
1960 msgid ""
1961 "Addresses in the specified range are not currently mapped, or are outside "
1962 "the address space of the process."
1963 msgstr ""
1964 "指定した範囲のアドレスが、現在マップされていない。 あるいはプロセスのアドレス"
1965 "空間の内部にない。"
1966
1967 #.  FIXME . Write a posix_madvise(3) page.
1968 #. type: Plain text
1969 #: build/C/man2/madvise.2:338
1970 msgid ""
1971 "POSIX.1b.  POSIX.1-2001 describes B<posix_madvise>(3)  with constants "
1972 "B<POSIX_MADV_NORMAL>, B<POSIX_MADV_RANDOM>, and so on, with a behavior close "
1973 "to that described here.  There is a similar B<posix_fadvise>(2)  for file "
1974 "access."
1975 msgstr ""
1976 "POSIX.1b.  POSIX.1-2001 では、 B<posix_madvise>(3)  を B<POSIX_MADV_NORMAL>, "
1977 "B<POSIX_MADV_RANDOM> などの定数とともに記述していた (それぞれの振る舞いはここ"
1978 "で述べたものに近い)。 ファイルアクセスに対しても B<posix_fadvise>(2)  という"
1979 "類似の関数が存在する。"
1980
1981 #. type: Plain text
1982 #: build/C/man2/madvise.2:347
1983 msgid ""
1984 "B<MADV_REMOVE>, B<MADV_DONTFORK>, B<MADV_DOFORK>, B<MADV_HWPOISON>, "
1985 "B<MADV_MERGEABLE>, and B<MADV_UNMERGEABLE> are Linux-specific."
1986 msgstr ""
1987 "B<MADV_REMOVE>, B<MADV_DONTFORK>, B<MADV_DOFORK>, B<MADV_HWPOISON>,\n"
1988 "B<MADV_MERGEABLE>, B<MADV_UNMERGEABLE> は Linux 固有である。"
1989
1990 #. type: SS
1991 #: build/C/man2/madvise.2:348 build/C/man2/mlock.2:274
1992 #: build/C/man2/shmget.2:371
1993 #, no-wrap
1994 msgid "Linux notes"
1995 msgstr "Linux での注意"
1996
1997 #. type: Plain text
1998 #: build/C/man2/madvise.2:356
1999 msgid ""
2000 "The current Linux implementation (2.4.0) views this system call more as a "
2001 "command than as advice and hence may return an error when it cannot do what "
2002 "it usually would do in response to this advice.  (See the ERRORS description "
2003 "above.)  This is nonstandard behavior."
2004 msgstr ""
2005 "現在の Linux の実装 (2.4.0) では、 このシステムコールをアドバイスというよりは"
2006 "命令と見ている。 したがってこのアドバイスに対して通常行われる動作が不可能な場"
2007 "合は、 エラーを返すことがある (上記の エラー の記述を参照)。 この振舞いは標準"
2008 "とは異なる。"
2009
2010 #.  .SH HISTORY
2011 #.  The
2012 #.  .BR madvise ()
2013 #.  function first appeared in 4.4BSD.
2014 #. type: Plain text
2015 #: build/C/man2/madvise.2:372
2016 msgid ""
2017 "The Linux implementation requires that the address I<addr> be page-aligned, "
2018 "and allows I<length> to be zero.  If there are some parts of the specified "
2019 "address range that are not mapped, the Linux version of B<madvise>()  "
2020 "ignores them and applies the call to the rest (but returns B<ENOMEM> from "
2021 "the system call, as it should)."
2022 msgstr ""
2023 "Linux の実装では I<addr> のアドレスはページ境界の値でなければならない。また "
2024 "I<length> は 0 であっても構わない。 また Linux 版の B<madvise>()  では、指定"
2025 "されたアドレス範囲にマップされていない部分があると、 これらを無視して残りの部"
2026 "分にアドバイスを適用する (しかしシステムコールに対してはちゃんと B<ENOMEM> を"
2027 "返す)。"
2028
2029 #. type: Plain text
2030 #: build/C/man2/madvise.2:381
2031 msgid ""
2032 "B<getrlimit>(2), B<mincore>(2), B<mmap>(2), B<mprotect>(2), B<msync>(2), "
2033 "B<munmap>(2), B<prctl>(2), B<core>(5)"
2034 msgstr ""
2035 "B<getrlimit>(2), B<mincore>(2), B<mmap>(2), B<mprotect>(2), B<msync>(2), "
2036 "B<munmap>(2), B<prctl>(2), B<core>(5)"
2037
2038 #. type: TH
2039 #: build/C/man3/mallinfo.3:26
2040 #, no-wrap
2041 msgid "MALLINFO"
2042 msgstr "MALLINFO"
2043
2044 #. type: TH
2045 #: build/C/man3/mallinfo.3:26 build/C/man3/malloc_stats.3:26
2046 #, no-wrap
2047 msgid "2012-05-06"
2048 msgstr "2012-05-06"
2049
2050 #. type: Plain text
2051 #: build/C/man3/mallinfo.3:29
2052 msgid "mallinfo - obtain memory allocation information"
2053 msgstr "mallinfo - メモリ割り当て情報を取得する"
2054
2055 #. type: Plain text
2056 #: build/C/man3/mallinfo.3:31 build/C/man3/malloc_stats.3:31
2057 #: build/C/man3/malloc_trim.3:31 build/C/man3/malloc_usable_size.3:30
2058 #: build/C/man3/mallopt.3:31
2059 msgid "B<#include E<lt>malloc.hE<gt>>"
2060 msgstr "B<#include E<lt>malloc.hE<gt>>"
2061
2062 #. type: Plain text
2063 #: build/C/man3/mallinfo.3:33
2064 msgid "B<struct mallinfo mallinfo(void);>"
2065 msgstr "B<struct mallinfo mallinfo(void);>"
2066
2067 #. type: Plain text
2068 #: build/C/man3/mallinfo.3:41
2069 msgid ""
2070 "The B<mallinfo>()  function returns a copy of a structure containing "
2071 "information about memory allocations performed by B<malloc>(3)  and related "
2072 "functions.  This structure is defined as follows:"
2073 msgstr ""
2074 "B<mallinfo>() 関数は、 B<malloc>(3) や一連の関数により実行されたメモリ\n"
2075 "割り当てに関する情報を格納した構造体のコピーを返す。\n"
2076 "この構造体は以下のように定義されている。"
2077
2078 #. type: Plain text
2079 #: build/C/man3/mallinfo.3:56
2080 #, no-wrap
2081 msgid ""
2082 "struct mallinfo {\n"
2083 "    int arena;     /* Non-mmapped space allocated (bytes) */\n"
2084 "    int ordblks;   /* Number of free chunks */\n"
2085 "    int smblks;    /* Number of free fastbin blocks */\n"
2086 "    int hblks;     /* Number of mmapped regions */\n"
2087 "    int hblkhd;    /* Space allocated in mmapped regions (bytes) */\n"
2088 "    int usmblks;   /* Maximum total allocated space (bytes) */\n"
2089 "    int fsmblks;   /* Space in freed fastbin blocks (bytes) */\n"
2090 "    int uordblks;  /* Total allocated space (bytes) */\n"
2091 "    int fordblks;  /* Total free space (bytes) */\n"
2092 "    int keepcost;  /* Top-most, releasable space (bytes) */\n"
2093 "};\n"
2094 msgstr ""
2095 "struct mallinfo {\n"
2096 "    int arena;     /* Non-mmapped space allocated (bytes) */\n"
2097 "    int ordblks;   /* Number of free chunks */\n"
2098 "    int smblks;    /* Number of free fastbin blocks */\n"
2099 "    int hblks;     /* Number of mmapped regions */\n"
2100 "    int hblkhd;    /* Space allocated in mmapped regions (bytes) */\n"
2101 "    int usmblks;   /* Maximum total allocated space (bytes) */\n"
2102 "    int fsmblks;   /* Space in freed fastbin blocks (bytes) */\n"
2103 "    int uordblks;  /* Total allocated space (bytes) */\n"
2104 "    int fordblks;  /* Total free space (bytes) */\n"
2105 "    int keepcost;  /* Top-most, releasable space (bytes) */\n"
2106 "};\n"
2107
2108 #. type: Plain text
2109 #: build/C/man3/mallinfo.3:62
2110 msgid ""
2111 "The fields of the I<mallinfo> structure contain the following information:"
2112 msgstr "I<mallinfo> 構造体の各フィールドには以下の情報が格納される。"
2113
2114 #. type: TP
2115 #: build/C/man3/mallinfo.3:62
2116 #, no-wrap
2117 msgid "I<arena>"
2118 msgstr "I<arena>"
2119
2120 #. type: Plain text
2121 #: build/C/man3/mallinfo.3:68
2122 msgid ""
2123 "The total amount of memory allocated by means other than B<mmap>(2)  (i.e., "
2124 "memory allocated on the heap).  This figure includes both in-use blocks and "
2125 "blocks on the free list."
2126 msgstr ""
2127
2128 #. type: TP
2129 #: build/C/man3/mallinfo.3:68
2130 #, no-wrap
2131 msgid "I<ordblks>"
2132 msgstr "I<ordblks>"
2133
2134 #. type: Plain text
2135 #: build/C/man3/mallinfo.3:71
2136 msgid "The number of ordinary (i.e., non-fastbin) free blocks."
2137 msgstr ""
2138
2139 #. type: TP
2140 #: build/C/man3/mallinfo.3:71
2141 #, no-wrap
2142 msgid "I<smblks>"
2143 msgstr "I<smblks>"
2144
2145 #. type: Plain text
2146 #: build/C/man3/mallinfo.3:75
2147 msgid "The number of fastbin free blocks (see B<mallopt>(3))."
2148 msgstr ""
2149
2150 #. type: TP
2151 #: build/C/man3/mallinfo.3:75
2152 #, no-wrap
2153 msgid "I<hblks>"
2154 msgstr "I<hblks>"
2155
2156 #. type: Plain text
2157 #: build/C/man3/mallinfo.3:83
2158 msgid ""
2159 "The number of blocks currently allocated using B<mmap>(2).  (See the "
2160 "discussion of B<M_MMAP_THRESHOLD> in B<mallopt>(3).)"
2161 msgstr ""
2162
2163 #. type: TP
2164 #: build/C/man3/mallinfo.3:83
2165 #, no-wrap
2166 msgid "I<hblkhd>"
2167 msgstr "I<hblkhd>"
2168
2169 #. type: Plain text
2170 #: build/C/man3/mallinfo.3:87
2171 msgid "The number of bytes in blocks currently allocated using B<mmap>(2)."
2172 msgstr ""
2173
2174 #. type: TP
2175 #: build/C/man3/mallinfo.3:87
2176 #, no-wrap
2177 msgid "I<usmblks>"
2178 msgstr "I<usmblks>"
2179
2180 #. type: Plain text
2181 #: build/C/man3/mallinfo.3:92
2182 msgid ""
2183 "The \"highwater mark\" for allocated space\\(emthat is, the maximum amount "
2184 "of space that was ever allocated.  This field is maintained only in "
2185 "nonthreading environments."
2186 msgstr ""
2187
2188 #. type: TP
2189 #: build/C/man3/mallinfo.3:92
2190 #, no-wrap
2191 msgid "I<fsmblks>"
2192 msgstr "I<fsmblks>"
2193
2194 #. type: Plain text
2195 #: build/C/man3/mallinfo.3:95
2196 msgid "The total number of bytes in fastbin free blocks."
2197 msgstr ""
2198
2199 #. type: TP
2200 #: build/C/man3/mallinfo.3:95
2201 #, no-wrap
2202 msgid "I<uordblks>"
2203 msgstr "I<uordblks>"
2204
2205 #. type: Plain text
2206 #: build/C/man3/mallinfo.3:98
2207 msgid "The total number of bytes used by in-use allocations."
2208 msgstr ""
2209
2210 #. type: TP
2211 #: build/C/man3/mallinfo.3:98
2212 #, no-wrap
2213 msgid "I<fordblks>"
2214 msgstr "I<fordblks>"
2215
2216 #. type: Plain text
2217 #: build/C/man3/mallinfo.3:101
2218 msgid "The total number of bytes in free blocks."
2219 msgstr ""
2220
2221 #. type: TP
2222 #: build/C/man3/mallinfo.3:101
2223 #, no-wrap
2224 msgid "I<keepcost>"
2225 msgstr "I<keepcost>"
2226
2227 #.  .SH VERSIONS
2228 #.  Available already in glibc 2.0, possibly earlier
2229 #. type: Plain text
2230 #: build/C/man3/mallinfo.3:110
2231 msgid ""
2232 "The total amount of releasable free space at the top of the heap.  This is "
2233 "the maximum number of bytes that could ideally (i.e., ignoring page "
2234 "alignment restrictions, and so on) be released by B<malloc_trim>(3)."
2235 msgstr ""
2236
2237 #. type: Plain text
2238 #: build/C/man3/mallinfo.3:114
2239 msgid ""
2240 "This function is not specified by POSIX or the C standards.  A similar "
2241 "function exists on many System V derivatives, and was specified in the SVID."
2242 msgstr ""
2243
2244 #.  FIXME . http://sourceware.org/bugzilla/show_bug.cgi?id=208
2245 #.  See the 24 Aug 2011 mail by Paul Pluzhnikov:
2246 #.      "[patch] Fix mallinfo() to accumulate results for all arenas"
2247 #.  on libc-alpha@sourceware.org
2248 #. type: Plain text
2249 #: build/C/man3/mallinfo.3:126
2250 msgid ""
2251 "B<Information is returned for only the main memory allocation area.> "
2252 "Allocations in other arenas are excluded.  See B<malloc_stats>(3)  and "
2253 "B<malloc_info>(3)  for alternatives that include information about other "
2254 "arenas."
2255 msgstr ""
2256
2257 #. type: Plain text
2258 #: build/C/man3/mallinfo.3:134
2259 msgid ""
2260 "The fields of the I<mallinfo> structure are typed as I<int>.  However, "
2261 "because some internal bookkeeping values may be of type I<long>, the "
2262 "reported values may wrap around zero and thus be inaccurate."
2263 msgstr ""
2264
2265 #. type: SH
2266 #: build/C/man3/mallinfo.3:134 build/C/man3/malloc_hook.3:89
2267 #: build/C/man3/malloc_info.3:84 build/C/man3/mallopt.3:454
2268 #: build/C/man3/mcheck.3:159 build/C/man2/mmap.2:629
2269 #: build/C/man2/mprotect.2:147 build/C/man3/mtrace.3:108
2270 #, no-wrap
2271 msgid "EXAMPLE"
2272 msgstr "例"
2273
2274 #. type: Plain text
2275 #: build/C/man3/mallinfo.3:140
2276 msgid ""
2277 "The program below employs B<mallinfo>()  to retrieve memory allocation "
2278 "statistics before and after allocating and freeing some blocks of memory.  "
2279 "The statistics are displayed on standard output."
2280 msgstr ""
2281
2282 #. type: Plain text
2283 #: build/C/man3/mallinfo.3:144
2284 msgid ""
2285 "The first two command-line arguments specify the number and size of blocks "
2286 "to be allocated with B<malloc>(3)."
2287 msgstr ""
2288
2289 #. type: Plain text
2290 #: build/C/man3/mallinfo.3:158
2291 msgid ""
2292 "The remaining three arguments specify which of the allocated blocks should "
2293 "be freed with B<free>(3).  These three arguments are optional, and specify "
2294 "(in order): the step size to be used in the loop that frees blocks (the "
2295 "default is 1, meaning free all blocks in the range); the ordinal position of "
2296 "the first block to be freed (default 0, meaning the first allocated block); "
2297 "and a number one greater than the ordinal position of the last block to be "
2298 "freed (default is one greater than the maximum block number).  If these "
2299 "three arguments are omitted, then the defaults cause all allocated blocks to "
2300 "be freed."
2301 msgstr ""
2302
2303 #. type: Plain text
2304 #: build/C/man3/mallinfo.3:162
2305 msgid ""
2306 "In the following example run of the program, 1000 allocations of 100 bytes "
2307 "are performed, and then every second allocated block is freed:"
2308 msgstr ""
2309
2310 #. type: Plain text
2311 #: build/C/man3/mallinfo.3:177
2312 #, no-wrap
2313 msgid ""
2314 "$ B<./a.out 1000 100 2>\n"
2315 "============== Before allocating blocks ==============\n"
2316 "Total non-mmapped bytes (arena):       0\n"
2317 "# of free chunks (ordblks):            1\n"
2318 "# of free fastbin blocks (smblks):     0\n"
2319 "# of mapped regions (hblks):           0\n"
2320 "Bytes in mapped regions (hblkhd):      0\n"
2321 "Max. total allocated space (usmblks):  0\n"
2322 "Free bytes held in fastbins (fsmblks): 0\n"
2323 "Total allocated space (uordblks):      0\n"
2324 "Total free space (fordblks):           0\n"
2325 "Topmost releasable block (keepcost):   0\n"
2326 msgstr ""
2327 "$ B<./a.out 1000 100 2>\n"
2328 "============== Before allocating blocks ==============\n"
2329 "Total non-mmapped bytes (arena):       0\n"
2330 "# of free chunks (ordblks):            1\n"
2331 "# of free fastbin blocks (smblks):     0\n"
2332 "# of mapped regions (hblks):           0\n"
2333 "Bytes in mapped regions (hblkhd):      0\n"
2334 "Max. total allocated space (usmblks):  0\n"
2335 "Free bytes held in fastbins (fsmblks): 0\n"
2336 "Total allocated space (uordblks):      0\n"
2337 "Total free space (fordblks):           0\n"
2338 "Topmost releasable block (keepcost):   0\n"
2339
2340 #. type: Plain text
2341 #: build/C/man3/mallinfo.3:189
2342 #, no-wrap
2343 msgid ""
2344 "============== After allocating blocks ==============\n"
2345 "Total non-mmapped bytes (arena):       135168\n"
2346 "# of free chunks (ordblks):            1\n"
2347 "# of free fastbin blocks (smblks):     0\n"
2348 "# of mapped regions (hblks):           0\n"
2349 "Bytes in mapped regions (hblkhd):      0\n"
2350 "Max. total allocated space (usmblks):  0\n"
2351 "Free bytes held in fastbins (fsmblks): 0\n"
2352 "Total allocated space (uordblks):      104000\n"
2353 "Total free space (fordblks):           31168\n"
2354 "Topmost releasable block (keepcost):   31168\n"
2355 msgstr ""
2356 "============== After allocating blocks ==============\n"
2357 "Total non-mmapped bytes (arena):       135168\n"
2358 "# of free chunks (ordblks):            1\n"
2359 "# of free fastbin blocks (smblks):     0\n"
2360 "# of mapped regions (hblks):           0\n"
2361 "Bytes in mapped regions (hblkhd):      0\n"
2362 "Max. total allocated space (usmblks):  0\n"
2363 "Free bytes held in fastbins (fsmblks): 0\n"
2364 "Total allocated space (uordblks):      104000\n"
2365 "Total free space (fordblks):           31168\n"
2366 "Topmost releasable block (keepcost):   31168\n"
2367
2368 #. type: Plain text
2369 #: build/C/man3/mallinfo.3:201
2370 #, no-wrap
2371 msgid ""
2372 "============== After freeing blocks ==============\n"
2373 "Total non-mmapped bytes (arena):       135168\n"
2374 "# of free chunks (ordblks):            501\n"
2375 "# of free fastbin blocks (smblks):     0\n"
2376 "# of mapped regions (hblks):           0\n"
2377 "Bytes in mapped regions (hblkhd):      0\n"
2378 "Max. total allocated space (usmblks):  0\n"
2379 "Free bytes held in fastbins (fsmblks): 0\n"
2380 "Total allocated space (uordblks):      52000\n"
2381 "Total free space (fordblks):           83168\n"
2382 "Topmost releasable block (keepcost):   31168\n"
2383 msgstr ""
2384 "============== After freeing blocks ==============\n"
2385 "Total non-mmapped bytes (arena):       135168\n"
2386 "# of free chunks (ordblks):            501\n"
2387 "# of free fastbin blocks (smblks):     0\n"
2388 "# of mapped regions (hblks):           0\n"
2389 "Bytes in mapped regions (hblkhd):      0\n"
2390 "Max. total allocated space (usmblks):  0\n"
2391 "Free bytes held in fastbins (fsmblks): 0\n"
2392 "Total allocated space (uordblks):      52000\n"
2393 "Total free space (fordblks):           83168\n"
2394 "Topmost releasable block (keepcost):   31168\n"
2395
2396 #. type: SS
2397 #: build/C/man3/mallinfo.3:203 build/C/man3/malloc_info.3:167
2398 #: build/C/man3/mallopt.3:520 build/C/man3/mcheck.3:176
2399 #: build/C/man2/mmap.2:641 build/C/man2/mprotect.2:164
2400 #, no-wrap
2401 msgid "Program source"
2402 msgstr "プログラムのソース"
2403
2404 #. type: Plain text
2405 #: build/C/man3/mallinfo.3:208
2406 #, no-wrap
2407 msgid ""
2408 "#include E<lt>malloc.hE<gt>\n"
2409 "#include \"tlpi_hdr.h\"\n"
2410 msgstr ""
2411 "#include E<lt>malloc.hE<gt>\n"
2412 "#include \"tlpi_hdr.h\"\n"
2413
2414 #. type: Plain text
2415 #: build/C/man3/mallinfo.3:213
2416 #, no-wrap
2417 msgid ""
2418 "static void\n"
2419 "display_mallinfo(void)\n"
2420 "{\n"
2421 "    struct mallinfo mi;\n"
2422 msgstr ""
2423 "static void\n"
2424 "display_mallinfo(void)\n"
2425 "{\n"
2426 "    struct mallinfo mi;\n"
2427
2428 #. type: Plain text
2429 #: build/C/man3/mallinfo.3:215
2430 #, no-wrap
2431 msgid "    mi = mallinfo();\n"
2432 msgstr "    mi = mallinfo();\n"
2433
2434 #. type: Plain text
2435 #: build/C/man3/mallinfo.3:227
2436 #, no-wrap
2437 msgid ""
2438 "    printf(\"Total non-mmapped bytes (arena):       %d\\en\", mi.arena);\n"
2439 "    printf(\"# of free chunks (ordblks):            %d\\en\", mi.ordblks);\n"
2440 "    printf(\"# of free fastbin blocks (smblks):     %d\\en\", mi.smblks);\n"
2441 "    printf(\"# of mapped regions (hblks):           %d\\en\", mi.hblks);\n"
2442 "    printf(\"Bytes in mapped regions (hblkhd):      %d\\en\", mi.hblkhd);\n"
2443 "    printf(\"Max. total allocated space (usmblks):  %d\\en\", mi.usmblks);\n"
2444 "    printf(\"Free bytes held in fastbins (fsmblks): %d\\en\", mi.fsmblks);\n"
2445 "    printf(\"Total allocated space (uordblks):      %d\\en\", mi.uordblks);\n"
2446 "    printf(\"Total free space (fordblks):           %d\\en\", mi.fordblks);\n"
2447 "    printf(\"Topmost releasable block (keepcost):   %d\\en\", mi.keepcost);\n"
2448 "}\n"
2449 msgstr ""
2450 "    printf(\"Total non-mmapped bytes (arena):       %d\\en\", mi.arena);\n"
2451 "    printf(\"# of free chunks (ordblks):            %d\\en\", mi.ordblks);\n"
2452 "    printf(\"# of free fastbin blocks (smblks):     %d\\en\", mi.smblks);\n"
2453 "    printf(\"# of mapped regions (hblks):           %d\\en\", mi.hblks);\n"
2454 "    printf(\"Bytes in mapped regions (hblkhd):      %d\\en\", mi.hblkhd);\n"
2455 "    printf(\"Max. total allocated space (usmblks):  %d\\en\", mi.usmblks);\n"
2456 "    printf(\"Free bytes held in fastbins (fsmblks): %d\\en\", mi.fsmblks);\n"
2457 "    printf(\"Total allocated space (uordblks):      %d\\en\", mi.uordblks);\n"
2458 "    printf(\"Total free space (fordblks):           %d\\en\", mi.fordblks);\n"
2459 "    printf(\"Topmost releasable block (keepcost):   %d\\en\", mi.keepcost);\n"
2460 "}\n"
2461
2462 #. type: Plain text
2463 #: build/C/man3/mallinfo.3:235
2464 #, no-wrap
2465 msgid ""
2466 "int\n"
2467 "main(int argc, char *argv[])\n"
2468 "{\n"
2469 "#define MAX_ALLOCS 2000000\n"
2470 "    char *alloc[MAX_ALLOCS];\n"
2471 "    int numBlocks, j, freeBegin, freeEnd, freeStep;\n"
2472 "    size_t blockSize;\n"
2473 msgstr ""
2474 "int\n"
2475 "main(int argc, char *argv[])\n"
2476 "{\n"
2477 "#define MAX_ALLOCS 2000000\n"
2478 "    char *alloc[MAX_ALLOCS];\n"
2479 "    int numBlocks, j, freeBegin, freeEnd, freeStep;\n"
2480 "    size_t blockSize;\n"
2481
2482 #. type: Plain text
2483 #: build/C/man3/mallinfo.3:239
2484 #, no-wrap
2485 msgid ""
2486 "    if (argc E<lt> 3 || strcmp(argv[1], \"--help\") == 0)\n"
2487 "        usageErr(\"%s num-blocks block-size [free-step [start-free \"\n"
2488 "                \"[end-free]]]\\en\", argv[0]);\n"
2489 msgstr ""
2490 "    if (argc E<lt> 3 || strcmp(argv[1], \"--help\") == 0)\n"
2491 "        usageErr(\"%s num-blocks block-size [free-step [start-free \"\n"
2492 "                \"[end-free]]]\\en\", argv[0]);\n"
2493
2494 #. type: Plain text
2495 #: build/C/man3/mallinfo.3:245
2496 #, no-wrap
2497 msgid ""
2498 "    numBlocks = atoi(argv[1]);\n"
2499 "    blockSize = atoi(argv[2]);\n"
2500 "    freeStep = (argc E<gt> 3) ? atoi(argv[3]) : 1;\n"
2501 "    freeBegin = (argc E<gt> 4) ? atoi(argv[4]) : 0;\n"
2502 "    freeEnd = (argc E<gt> 5) ? atoi(argv[5]) : numBlocks;\n"
2503 msgstr ""
2504 "    numBlocks = atoi(argv[1]);\n"
2505 "    blockSize = atoi(argv[2]);\n"
2506 "    freeStep = (argc E<gt> 3) ? atoi(argv[3]) : 1;\n"
2507 "    freeBegin = (argc E<gt> 4) ? atoi(argv[4]) : 0;\n"
2508 "    freeEnd = (argc E<gt> 5) ? atoi(argv[5]) : numBlocks;\n"
2509
2510 #. type: Plain text
2511 #: build/C/man3/mallinfo.3:248
2512 #, no-wrap
2513 msgid ""
2514 "    printf(\"============== Before allocating blocks ==============\\en\");\n"
2515 "    display_mallinfo();\n"
2516 msgstr ""
2517 "    printf(\"============== Before allocating blocks ==============\\en\");\n"
2518 "    display_mallinfo();\n"
2519
2520 #. type: Plain text
2521 #: build/C/man3/mallinfo.3:252
2522 #, no-wrap
2523 msgid ""
2524 "    for (j = 0; j E<lt> numBlocks; j++) {\n"
2525 "        if (numBlocks E<gt>= MAX_ALLOCS)\n"
2526 "            fatal(\"Too many allocations\");\n"
2527 msgstr ""
2528 "    for (j = 0; j E<lt> numBlocks; j++) {\n"
2529 "        if (numBlocks E<gt>= MAX_ALLOCS)\n"
2530 "            fatal(\"Too many allocations\");\n"
2531
2532 #. type: Plain text
2533 #: build/C/man3/mallinfo.3:257
2534 #, no-wrap
2535 msgid ""
2536 "        alloc[j] = malloc(blockSize);\n"
2537 "        if (alloc[j] == NULL)\n"
2538 "            errExit(\"malloc\");\n"
2539 "    }\n"
2540 msgstr ""
2541 "        alloc[j] = malloc(blockSize);\n"
2542 "        if (alloc[j] == NULL)\n"
2543 "            errExit(\"malloc\");\n"
2544 "    }\n"
2545
2546 #. type: Plain text
2547 #: build/C/man3/mallinfo.3:260
2548 #, no-wrap
2549 msgid ""
2550 "    printf(\"\\en============== After allocating blocks ==============\\en\");\n"
2551 "    display_mallinfo();\n"
2552 msgstr ""
2553 "    printf(\"\\en============== After allocating blocks ==============\\en\");\n"
2554 "    display_mallinfo();\n"
2555
2556 #. type: Plain text
2557 #: build/C/man3/mallinfo.3:263
2558 #, no-wrap
2559 msgid ""
2560 "    for (j = freeBegin; j E<lt> freeEnd; j += freeStep)\n"
2561 "        free(alloc[j]);\n"
2562 msgstr ""
2563 "    for (j = freeBegin; j E<lt> freeEnd; j += freeStep)\n"
2564 "        free(alloc[j]);\n"
2565
2566 #. type: Plain text
2567 #: build/C/man3/mallinfo.3:266
2568 #, no-wrap
2569 msgid ""
2570 "    printf(\"\\en============== After freeing blocks ==============\\en\");\n"
2571 "    display_mallinfo();\n"
2572 msgstr ""
2573 "    printf(\"\\en============== After freeing blocks ==============\\en\");\n"
2574 "    display_mallinfo();\n"
2575
2576 #. type: Plain text
2577 #: build/C/man3/mallinfo.3:269 build/C/man3/malloc_info.3:255
2578 #: build/C/man3/mallopt.3:553 build/C/man3/mcheck.3:203
2579 #: build/C/man2/mmap.2:710
2580 #, no-wrap
2581 msgid ""
2582 "    exit(EXIT_SUCCESS);\n"
2583 "}\n"
2584 msgstr ""
2585 "    exit(EXIT_SUCCESS);\n"
2586 "}\n"
2587
2588 #. type: Plain text
2589 #: build/C/man3/mallinfo.3:279
2590 msgid ""
2591 "B<mmap>(2), B<malloc>(3), B<malloc_info>(3), B<malloc_stats>(3), "
2592 "B<malloc_trim>(3), B<mallopt>(3)"
2593 msgstr ""
2594 "B<mmap>(2), B<malloc>(3), B<malloc_info>(3), B<malloc_stats>(3), "
2595 "B<malloc_trim>(3), B<mallopt>(3)"
2596
2597 #. type: TH
2598 #: build/C/man3/malloc_get_state.3:25
2599 #, no-wrap
2600 msgid "MALLOC_GET_STATE"
2601 msgstr "MALLOC_GET_STATE"
2602
2603 #. type: TH
2604 #: build/C/man3/malloc_get_state.3:25 build/C/man3/malloc_usable_size.3:25
2605 #, fuzzy, no-wrap
2606 #| msgid "2014-01-11"
2607 msgid "2014-06-13"
2608 msgstr "2014-01-11"
2609
2610 #. type: Plain text
2611 #: build/C/man3/malloc_get_state.3:28
2612 msgid ""
2613 "malloc_get_state, malloc_set_state - record and restore state of malloc "
2614 "implementation"
2615 msgstr ""
2616
2617 #. type: Plain text
2618 #: build/C/man3/malloc_get_state.3:31 build/C/man3/malloc_hook.3:18
2619 #: build/C/man3/malloc_info.3:31 build/C/man3/posix_memalign.3:41
2620 #, no-wrap
2621 msgid "B<#include E<lt>malloc.hE<gt>>\n"
2622 msgstr "B<#include E<lt>malloc.hE<gt>>\n"
2623
2624 #. type: Plain text
2625 #: build/C/man3/malloc_get_state.3:33
2626 #, no-wrap
2627 msgid "B<void* malloc_get_state(void);>\n"
2628 msgstr "B<void* malloc_get_state(void);>\n"
2629
2630 #. type: Plain text
2631 #: build/C/man3/malloc_get_state.3:35
2632 #, no-wrap
2633 msgid "B<int malloc_set_state(void *>I<state>B<);>\n"
2634 msgstr "B<int malloc_set_state(void *>I<state>B<);>\n"
2635
2636 #. type: Plain text
2637 #: build/C/man3/malloc_get_state.3:53
2638 msgid ""
2639 "The B<malloc_get_state>()  function records the current state of all "
2640 "B<malloc>(3)  internal bookkeeping variables (but not the actual contents of "
2641 "the heap or the state of B<malloc_hook>(3)  functions pointers).  The state "
2642 "is recorded in a system-dependent opaque data structure dynamically "
2643 "allocated via B<malloc>(3), and a pointer to that data structure is returned "
2644 "as the function result.  (It is the caller's responsibility to B<free>(3)  "
2645 "this memory.)"
2646 msgstr ""
2647
2648 #. type: Plain text
2649 #: build/C/man3/malloc_get_state.3:61
2650 msgid ""
2651 "The B<malloc_set_state>()  function restores the state of all B<malloc>(3)  "
2652 "internal bookkeeping variables to the values recorded in the opaque data "
2653 "structure pointed to by I<state>."
2654 msgstr ""
2655
2656 #. type: Plain text
2657 #: build/C/man3/malloc_get_state.3:68
2658 msgid ""
2659 "On success, B<malloc_get_state>()  returns a pointer to a newly allocated "
2660 "opaque data structure.  On error (for example, memory could not be allocated "
2661 "for the data structure), B<malloc_get_state>()  returns NULL."
2662 msgstr ""
2663
2664 #.  if(ms->magic != MALLOC_STATE_MAGIC) return -1;
2665 #.  /* Must fail if the major version is too high. */
2666 #.  if((ms->version & ~0xffl) > (MALLOC_STATE_VERSION & ~0xffl)) return -2;
2667 #. type: Plain text
2668 #: build/C/man3/malloc_get_state.3:86
2669 msgid ""
2670 "On success, B<malloc_set_state>()  returns 0.  If the implementation detects "
2671 "that I<state> does not point to a correctly formed data structure, "
2672 "B<malloc_set_state>()  returns -1.  If the implementation detects that the "
2673 "version of the data structure referred to by I<state> is a more recent "
2674 "version than this implementation knows about, B<malloc_set_state>()  returns "
2675 "-2."
2676 msgstr ""
2677
2678 #. type: Plain text
2679 #: build/C/man3/malloc_get_state.3:88 build/C/man3/malloc_hook.3:82
2680 #: build/C/man3/mcheck.3:147 build/C/man3/mtrace.3:80
2681 msgid "These functions are GNU extensions."
2682 msgstr "これらの関数は GNU による拡張である。"
2683
2684 #. type: Plain text
2685 #: build/C/man3/malloc_get_state.3:94
2686 msgid ""
2687 "These functions are useful when using this B<malloc>(3)  implementation as "
2688 "part of a shared library, and the heap contents are saved/restored via some "
2689 "other method.  This technique is used by GNU Emacs to implement its \"dumping"
2690 "\" function."
2691 msgstr ""
2692
2693 #.  i.e., calls __malloc_check_init()
2694 #.  i.e., malloc checking is not already in use
2695 #.  and the caller requested malloc checking
2696 #. type: Plain text
2697 #: build/C/man3/malloc_get_state.3:111
2698 msgid ""
2699 "Hook function pointers are never saved or restored by these functions, with "
2700 "two exceptions: if malloc checking (see B<mallopt>(3))  was in use when "
2701 "B<malloc_get_state>()  was called, then B<malloc_set_state>()  resets malloc "
2702 "checking hooks if possible; if malloc checking was not in use in the "
2703 "recorded state, but the caller has requested malloc checking, then the hooks "
2704 "are reset to 0."
2705 msgstr ""
2706
2707 #. type: Plain text
2708 #: build/C/man3/malloc_get_state.3:114
2709 msgid "B<malloc>(3), B<mallopt>(3)"
2710 msgstr "B<malloc>(3), B<mallopt>(3)"
2711
2712 #. type: TH
2713 #: build/C/man3/malloc_hook.3:10
2714 #, no-wrap
2715 msgid "MALLOC_HOOK"
2716 msgstr "MALLOC_HOOK"
2717
2718 #. type: TH
2719 #: build/C/man3/malloc_hook.3:10
2720 #, no-wrap
2721 msgid "2010-10-13"
2722 msgstr "2010-10-13"
2723
2724 #. type: Plain text
2725 #: build/C/man3/malloc_hook.3:15
2726 msgid ""
2727 "__malloc_hook, __malloc_initialize_hook, __memalign_hook, __free_hook, "
2728 "__realloc_hook, __after_morecore_hook - malloc debugging variables"
2729 msgstr ""
2730 "__malloc_hook, __malloc_initialize_hook, __memalign_hook, __free_hook, "
2731 "__realloc_hook, __after_morecore_hook - malloc デバッグ用の変数"
2732
2733 #. type: Plain text
2734 #: build/C/man3/malloc_hook.3:20
2735 #, no-wrap
2736 msgid "B<void *(*__malloc_hook)(size_t >I<size>B<, const void *>I<caller>B<);>\n"
2737 msgstr "B<void *(*__malloc_hook)(size_t >I<size>B<, const void *>I<caller>B<);>\n"
2738
2739 #. type: Plain text
2740 #: build/C/man3/malloc_hook.3:23
2741 #, no-wrap
2742 msgid "B<void *(*__realloc_hook)(void *>I<ptr>B<, size_t >I<size>B<, const void *>I<caller>B<);>\n"
2743 msgstr "B<void *(*__realloc_hook)(void *>I<ptr>B<, size_t >I<size>B<, const void *>I<caller>B<);>\n"
2744
2745 #. type: Plain text
2746 #: build/C/man3/malloc_hook.3:26
2747 #, no-wrap
2748 msgid ""
2749 "B<void *(*__memalign_hook)(size_t >I<alignment>B<, size_t >I<size>B<,>\n"
2750 "B<                         const void *>I<caller>B<);>\n"
2751 msgstr ""
2752 "B<void *(*__memalign_hook)(size_t >I<alignment>B<, size_t >I<size>B<,>\n"
2753 "B<                         const void *>I<caller>B<);>\n"
2754
2755 #. type: Plain text
2756 #: build/C/man3/malloc_hook.3:28
2757 #, no-wrap
2758 msgid "B<void (*__free_hook)(void *>I<ptr>B<, const void *>I<caller>B<);>\n"
2759 msgstr "B<void (*__free_hook)(void *>I<ptr>B<, const void *>I<caller>B<);>\n"
2760
2761 #. type: Plain text
2762 #: build/C/man3/malloc_hook.3:30
2763 #, no-wrap
2764 msgid "B<void (*__malloc_initialize_hook)(void);>\n"
2765 msgstr "B<void (*__malloc_initialize_hook)(void);>\n"
2766
2767 #. type: Plain text
2768 #: build/C/man3/malloc_hook.3:32
2769 #, no-wrap
2770 msgid "B<void (*__after_morecore_hook)(void);>\n"
2771 msgstr "B<void (*__after_morecore_hook)(void);>\n"
2772
2773 #. type: Plain text
2774 #: build/C/man3/malloc_hook.3:43
2775 msgid ""
2776 "The GNU C library lets you modify the behavior of B<malloc>(3), "
2777 "B<realloc>(3), and B<free>(3)  by specifying appropriate hook functions.  "
2778 "You can use these hooks to help you debug programs that use dynamic memory "
2779 "allocation, for example."
2780 msgstr ""
2781 "GNU C ライブラリでは、適切なフック関数 (hook function) を指定することで "
2782 "B<malloc>(3), B<realloc>(3), B<free>(3)  の動作を変更することができる。例え"
2783 "ば、動的にメモリ割り当てを行う プログラムのデバッグにこれらのフックを使うこと"
2784 "ができる。"
2785
2786 #. type: Plain text
2787 #: build/C/man3/malloc_hook.3:50
2788 msgid ""
2789 "The variable B<__malloc_initialize_hook> points at a function that is called "
2790 "once when the malloc implementation is initialized.  This is a weak "
2791 "variable, so it can be overridden in the application with a definition like "
2792 "the following:"
2793 msgstr ""
2794 "変数 B<__malloc_initialize_hook> は malloc の実装が初期化される際に一度だけ呼"
2795 "ばれる関数へのポインタである。 この変数は書き換え可能 (weak) であり、アプリ"
2796 "ケーション内で 以下のような定義で上書きできる:"
2797
2798 #. type: Plain text
2799 #: build/C/man3/malloc_hook.3:53
2800 #, no-wrap
2801 msgid "    void (*__malloc_initialize_hook)(void) = my_init_hook;\n"
2802 msgstr "    void (*__malloc_initialize_hook)(void) = my_init_hook;\n"
2803
2804 #. type: Plain text
2805 #: build/C/man3/malloc_hook.3:58
2806 msgid ""
2807 "Now the function I<my_init_hook>()  can do the initialization of all hooks."
2808 msgstr ""
2809 "なお、関数 I<my_init_hook>()  で全てのフックの初期化をすることができる。"
2810
2811 #. type: Plain text
2812 #: build/C/man3/malloc_hook.3:74
2813 msgid ""
2814 "The four functions pointed to by B<__malloc_hook>, B<__realloc_hook>, "
2815 "B<__memalign_hook>, B<__free_hook> have a prototype like the functions "
2816 "B<malloc>(3), B<realloc>(3), B<memalign>(3), B<free>(3), respectively, "
2817 "except that they have a final argument I<caller> that gives the address of "
2818 "the caller of B<malloc>(3), etc."
2819 msgstr ""
2820 "B<__malloc_hook>, B<__realloc_hook>, B<__memalign_hook>, B<__free_hook> で指"
2821 "される 4 つの関数は、各々 B<malloc>(3), B<realloc>(3), B<memalign>(3), "
2822 "B<free>(3)  とよく似たプロトタイプを持っているが、 一番最後の引き数 "
2823 "I<caller> をとる点が異なる。 引き数 I<caller> には、 B<malloc>(3)  などの呼び"
2824 "出し元 (caller) のアドレスが格納される。"
2825
2826 #. type: Plain text
2827 #: build/C/man3/malloc_hook.3:80
2828 msgid ""
2829 "The variable B<__after_morecore_hook> points at a function that is called "
2830 "each time after B<sbrk>(2)  was asked for more memory."
2831 msgstr ""
2832 "変数 B<__after_morecore_hook> は、領域の追加要求があり B<sbrk>(2)  が呼ばれた"
2833 "後で毎回呼び出される関数へのポインタである。"
2834
2835 #.  https://bugzilla.redhat.com/show_bug.cgi?id=450187
2836 #.  http://sourceware.org/bugzilla/show_bug.cgi?id=9957
2837 #. type: Plain text
2838 #: build/C/man3/malloc_hook.3:89
2839 msgid ""
2840 "The use of these hook functions is not safe in multithreaded programs, and "
2841 "they are now deprecated.  Programmers should instead preempt calls to the "
2842 "relevant functions by defining and exporting functions such as \"malloc\" "
2843 "and \"free\"."
2844 msgstr ""
2845 "マルチスレッドプログラムでは、 これらのフック関数の使用は安全ではなく、 今で"
2846 "は非推奨である。 プログラマは、 \"malloc\" や \"free\" のような関数を定義して"
2847 "公開して、 関連する関数を呼び出すようにすべきである。"
2848
2849 #. type: Plain text
2850 #: build/C/man3/malloc_hook.3:91
2851 msgid "Here is a short example of how to use these variables."
2852 msgstr "これらの変数の使い方の簡単な例を以下に示す。"
2853
2854 #. type: Plain text
2855 #: build/C/man3/malloc_hook.3:95
2856 #, no-wrap
2857 msgid ""
2858 "#include E<lt>stdio.hE<gt>\n"
2859 "#include E<lt>malloc.hE<gt>\n"
2860 msgstr ""
2861 "#include E<lt>stdio.hE<gt>\n"
2862 "#include E<lt>malloc.hE<gt>\n"
2863
2864 #. type: Plain text
2865 #: build/C/man3/malloc_hook.3:99
2866 #, no-wrap
2867 msgid ""
2868 "/* Prototypes for our hooks.  */\n"
2869 "static void my_init_hook(void);\n"
2870 "static void *my_malloc_hook(size_t, const void *);\n"
2871 msgstr ""
2872 "/* 使おうとするフックのプロトタイプ宣言 */\n"
2873 "static void my_init_hook(void);\n"
2874 "static void *my_malloc_hook(size_t, const void *);\n"
2875
2876 #. type: Plain text
2877 #: build/C/man3/malloc_hook.3:102
2878 #, no-wrap
2879 msgid ""
2880 "/* Variables to save original hooks. */\n"
2881 "static void *(*old_malloc_hook)(size_t, const void *);\n"
2882 msgstr ""
2883 "/* 元々のフックを保存するための変数 */\n"
2884 "static void *(*old_malloc_hook)(size_t, const void *);\n"
2885
2886 #. type: Plain text
2887 #: build/C/man3/malloc_hook.3:105
2888 #, no-wrap
2889 msgid ""
2890 "/* Override initializing hook from the C library. */\n"
2891 "void (*__malloc_initialize_hook) (void) = my_init_hook;\n"
2892 msgstr ""
2893 "/* C ライブラリから呼ばれる初期化フックを上書きする */\n"
2894 "void (*__malloc_initialize_hook) (void) = my_init_hook;\n"
2895
2896 #. type: Plain text
2897 #: build/C/man3/malloc_hook.3:112
2898 #, no-wrap
2899 msgid ""
2900 "static void\n"
2901 "my_init_hook(void)\n"
2902 "{\n"
2903 "    old_malloc_hook = __malloc_hook;\n"
2904 "    __malloc_hook = my_malloc_hook;\n"
2905 "}\n"
2906 msgstr ""
2907 "static void\n"
2908 "my_init_hook(void)\n"
2909 "{\n"
2910 "    old_malloc_hook = __malloc_hook;\n"
2911 "    __malloc_hook = my_malloc_hook;\n"
2912 "}\n"
2913
2914 #. type: Plain text
2915 #: build/C/man3/malloc_hook.3:117
2916 #, no-wrap
2917 msgid ""
2918 "static void *\n"
2919 "my_malloc_hook(size_t size, const void *caller)\n"
2920 "{\n"
2921 "    void *result;\n"
2922 msgstr ""
2923 "static void *\n"
2924 "my_malloc_hook(size_t size, const void *caller)\n"
2925 "{\n"
2926 "    void *result;\n"
2927
2928 #. type: Plain text
2929 #: build/C/man3/malloc_hook.3:120
2930 #, no-wrap
2931 msgid ""
2932 "    /* Restore all old hooks */\n"
2933 "    __malloc_hook = old_malloc_hook;\n"
2934 msgstr ""
2935 "    /* 元々のフックを全て戻す */\n"
2936 "    __malloc_hook = old_malloc_hook;\n"
2937
2938 #. type: Plain text
2939 #: build/C/man3/malloc_hook.3:123
2940 #, no-wrap
2941 msgid ""
2942 "    /* Call recursively */\n"
2943 "    result = malloc(size);\n"
2944 msgstr ""
2945 "    /* malloc の再帰的呼び出し */\n"
2946 "    result = malloc(size);\n"
2947
2948 #. type: Plain text
2949 #: build/C/man3/malloc_hook.3:126
2950 #, no-wrap
2951 msgid ""
2952 "    /* Save underlying hooks */\n"
2953 "    old_malloc_hook = __malloc_hook;\n"
2954 msgstr ""
2955 "    /* 現在設定されているフック (underlying hook) を保存する */\n"
2956 "    old_malloc_hook = __malloc_hook;\n"
2957
2958 #. type: Plain text
2959 #: build/C/man3/malloc_hook.3:130
2960 #, no-wrap
2961 msgid ""
2962 "    /* printf() might call malloc(), so protect it too. */\n"
2963 "    printf(\"malloc(%u) called from %p returns %p\\en\",\n"
2964 "            (unsigned int) size, caller, result);\n"
2965 msgstr ""
2966 "    /* printf() は malloc() を呼び出す可能性があるので\n"
2967 "        ここでもガードを行う (元々のフックのままにしておく) */\n"
2968 "    printf(\"malloc(%u) called from %p returns %p\\en\",\n"
2969 "            (unsigned int) size, caller, result);\n"
2970
2971 #. type: Plain text
2972 #: build/C/man3/malloc_hook.3:133
2973 #, no-wrap
2974 msgid ""
2975 "    /* Restore our own hooks */\n"
2976 "    __malloc_hook = my_malloc_hook;\n"
2977 msgstr ""
2978 "    /* ユーザが使おうとするフックを再設定する */\n"
2979 "    __malloc_hook = my_malloc_hook;\n"
2980
2981 #. type: Plain text
2982 #: build/C/man3/malloc_hook.3:136
2983 #, no-wrap
2984 msgid ""
2985 "    return result;\n"
2986 "}\n"
2987 msgstr ""
2988 "    return result;\n"
2989 "}\n"
2990
2991 #. type: Plain text
2992 #: build/C/man3/malloc_hook.3:142
2993 msgid "B<mallinfo>(3), B<malloc>(3), B<mcheck>(3), B<mtrace>(3)"
2994 msgstr "B<mallinfo>(3), B<malloc>(3), B<mcheck>(3), B<mtrace>(3)"
2995
2996 #. type: TH
2997 #: build/C/man3/malloc_info.3:25
2998 #, no-wrap
2999 msgid "MALLOC_INFO"
3000 msgstr "MALLOC_INFO"
3001
3002 #. type: TH
3003 #: build/C/man3/malloc_info.3:25
3004 #, no-wrap
3005 msgid "2013-04-19"
3006 msgstr "2013-04-19"
3007
3008 #. type: Plain text
3009 #: build/C/man3/malloc_info.3:28
3010 msgid "malloc_info - export malloc state to a stream"
3011 msgstr "malloc_info - malloc の状態をストリームに出力する"
3012
3013 #. type: Plain text
3014 #: build/C/man3/malloc_info.3:33
3015 #, no-wrap
3016 msgid "B<int malloc_info(int >I<options>B<, FILE *>I<fp>B<);>\n"
3017 msgstr "B<int malloc_info(int >I<options>B<, FILE *>I<fp>B<);>\n"
3018
3019 #. type: Plain text
3020 #: build/C/man3/malloc_info.3:44
3021 msgid ""
3022 "The B<malloc_info>()  function exports an XML string that describes the "
3023 "current state of the memory-allocation implementation in the caller.  The "
3024 "string is printed on the file stream I<fp>.  The exported string includes "
3025 "information about all arenas (see B<malloc>(3))."
3026 msgstr ""
3027 "B<malloc_info>() 関数は、 呼び出し元のメモリ割り当て実装の現在の状態を表す "
3028 "XML 文字列を出力する。 文字列は、 ファイルストリーム I<fp> に出力される。 出"
3029 "力された文字列には、 全ての割り当て領域の情報が含まれる (B<malloc>(3) 参照)。"
3030
3031 #. type: Plain text
3032 #: build/C/man3/malloc_info.3:48
3033 msgid "As currently implemented, I<options> must be zero."
3034 msgstr "現在の実装では、 I<options> は 0 でなければならない。"
3035
3036 #. type: Plain text
3037 #: build/C/man3/malloc_info.3:55
3038 msgid ""
3039 "On success, B<malloc_info>()  returns 0; on error, it returns -1, with "
3040 "I<errno> set to indicate the cause."
3041 msgstr ""
3042 "B<malloc_info>() は、成功すると 0 を返す。 エラーの場合、-1 を返し、 "
3043 "I<errno> にエラーの原因を示す値を設定する。"
3044
3045 #. type: Plain text
3046 #: build/C/man3/malloc_info.3:60
3047 msgid "I<options> was nonzero."
3048 msgstr "I<options> が 0 でなかった。"
3049
3050 #. type: Plain text
3051 #: build/C/man3/malloc_info.3:63
3052 msgid "B<malloc_info>()  was added to glibc in version 2.10."
3053 msgstr "B<malloc_info>() は glibc バージョン 2.10 で追加された。"
3054
3055 #. type: Plain text
3056 #: build/C/man3/malloc_info.3:65 build/C/man3/malloc_stats.3:57
3057 #: build/C/man3/malloc_trim.3:62 build/C/man3/malloc_usable_size.3:55
3058 msgid "This function is a GNU extension."
3059 msgstr "この関数は GNU による拡張である。"
3060
3061 #. type: Plain text
3062 #: build/C/man3/malloc_info.3:71
3063 msgid ""
3064 "The memory-allocation information is provided as an XML string (rather than "
3065 "a C structure)  because the information may change over time (according to "
3066 "changes in the underlying implementation).  The output XML string includes a "
3067 "version field."
3068 msgstr ""
3069 "メモリ割り当て情報は (C の構造体ではなく) XML 文字列として提供される。 これ"
3070 "は、 この情報は時間をたつと (内部で使用している実装によって) 変わる可能性があ"
3071 "るからである。 出力される XML 文字列にはバージョンフィールドが付いている。"
3072
3073 #. type: Plain text
3074 #: build/C/man3/malloc_info.3:77
3075 msgid ""
3076 "The B<open_memstream>(3)  function can be used to send the output of "
3077 "B<malloc_info>()  directly into a buffer in memory, rather than to a file."
3078 msgstr ""
3079 "B<open_memstream>(3) 関数を使うと、 B<malloc_info>() の出力を、 ファイルでは"
3080 "なくメモリ内のバッファに直接送ることができる。"
3081
3082 #. type: Plain text
3083 #: build/C/man3/malloc_info.3:84
3084 msgid ""
3085 "The B<malloc_info>()  function is designed to address deficiencies in "
3086 "B<malloc_stats>(3)  and B<mallinfo>(3)."
3087 msgstr ""
3088 "B<malloc_info>() 関数は、 B<malloc_stats>(3) と B<mallinfo>(3) の不備を解決す"
3089 "るために設定された。"
3090
3091 #. type: Plain text
3092 #: build/C/man3/malloc_info.3:95
3093 msgid ""
3094 "The program below takes up to four command-line arguments, of which the "
3095 "first three are mandatory.  The first argument specifies the number of "
3096 "threads that the program should create.  All of the threads, including the "
3097 "main thread, allocate the number of blocks of memory specified by the second "
3098 "argument.  The third argument controls the size of the blocks to be "
3099 "allocated.  The main thread creates blocks of this size, the second thread "
3100 "created by the program allocates blocks of twice this size, the third thread "
3101 "allocates blocks of three times this size, and so on."
3102 msgstr ""
3103 "以下のプログラムは最大で 4 つのコマンドライン引数を取り、 最初の 3 つは必須で"
3104 "ある。 最初の引数は、このプログラムが生成するスレッド数を指定する。 メインス"
3105 "レッドを含む全てのスレッドが第 2 引数で指定した数のメモリブロックの割り当てを"
3106 "行う。 第 3 引数は割り当てるブロックのサイズを制御する。 メインスレッドはこの"
3107 "サイズのブロックを作成し、 このプログラムが生成する 2 番目のスレッドはこのサ"
3108 "イズの 2 倍のサイズのブロックを、 3 番目のスレッドはこのサイズの 3 倍のサイズ"
3109 "のブロックを割り当て、 以下同様である。"
3110
3111 #. type: Plain text
3112 #: build/C/man3/malloc_info.3:102
3113 msgid ""
3114 "The program calls B<malloc_info>()  twice to display the memory-allocation "
3115 "state.  The first call takes place before any threads are created or memory "
3116 "allocated.  The second call is performed after all threads have allocated "
3117 "memory."
3118 msgstr ""
3119 "このプログラムは B<malloc_info>() を 2 回呼び出し、メモリ割り当て状態を表示す"
3120 "る。 最初の呼び出しはスレッドの生成もメモリの割り当ても行われる前に実行され"
3121 "る。 2 回目の呼び出しは全てのスレッドがメモリ割り当てを行った後に実行される。"
3122
3123 #. type: Plain text
3124 #: build/C/man3/malloc_info.3:110
3125 msgid ""
3126 "In the following example, the command-line arguments specify the creation of "
3127 "one additional thread, and both the main thread and the additional thread "
3128 "allocate 10000 blocks of memory.  After the blocks of memory have been "
3129 "allocated, B<malloc_info>()  shows the state of two allocation arenas."
3130 msgstr ""
3131 "以下の例では、 コマンドライン引数で、 追加でスレッドを一つ生成し、メインス"
3132 "レッドと追加のスレッドの両方が 10000 個のメモリブロックを割り当てるように指定"
3133 "している。 メモリブロックの割り当て後の B<malloc_info>() では、 2 つの割り当"
3134 "て領域の状態が表示されている。"
3135
3136 #. type: Plain text
3137 #: build/C/man3/malloc_info.3:135
3138 #, no-wrap
3139 msgid ""
3140 "$ B<getconf GNU_LIBC_VERSION>\n"
3141 "glibc 2.13\n"
3142 "$ B<./a.out 1 10000 100>\n"
3143 "============ Before allocating blocks ============\n"
3144 "E<lt>malloc version=\"1\"E<gt>\n"
3145 "E<lt>heap nr=\"0\"E<gt>\n"
3146 "E<lt>sizesE<gt>\n"
3147 "E<lt>/sizesE<gt>\n"
3148 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
3149 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
3150 "E<lt>system type=\"current\" size=\"135168\"/E<gt>\n"
3151 "E<lt>system type=\"max\" size=\"135168\"/E<gt>\n"
3152 "E<lt>aspace type=\"total\" size=\"135168\"/E<gt>\n"
3153 "E<lt>aspace type=\"mprotect\" size=\"135168\"/E<gt>\n"
3154 "E<lt>/heapE<gt>\n"
3155 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
3156 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
3157 "E<lt>system type=\"current\" size=\"135168\"/E<gt>\n"
3158 "E<lt>system type=\"max\" size=\"135168\"/E<gt>\n"
3159 "E<lt>aspace type=\"total\" size=\"135168\"/E<gt>\n"
3160 "E<lt>aspace type=\"mprotect\" size=\"135168\"/E<gt>\n"
3161 "E<lt>/mallocE<gt>\n"
3162 msgstr ""
3163 "$ B<getconf GNU_LIBC_VERSION>\n"
3164 "glibc 2.13\n"
3165 "$ B<./a.out 1 10000 100>\n"
3166 "============ Before allocating blocks ============\n"
3167 "E<lt>malloc version=\"1\"E<gt>\n"
3168 "E<lt>heap nr=\"0\"E<gt>\n"
3169 "E<lt>sizesE<gt>\n"
3170 "E<lt>/sizesE<gt>\n"
3171 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
3172 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
3173 "E<lt>system type=\"current\" size=\"135168\"/E<gt>\n"
3174 "E<lt>system type=\"max\" size=\"135168\"/E<gt>\n"
3175 "E<lt>aspace type=\"total\" size=\"135168\"/E<gt>\n"
3176 "E<lt>aspace type=\"mprotect\" size=\"135168\"/E<gt>\n"
3177 "E<lt>/heapE<gt>\n"
3178 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
3179 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
3180 "E<lt>system type=\"current\" size=\"135168\"/E<gt>\n"
3181 "E<lt>system type=\"max\" size=\"135168\"/E<gt>\n"
3182 "E<lt>aspace type=\"total\" size=\"135168\"/E<gt>\n"
3183 "E<lt>aspace type=\"mprotect\" size=\"135168\"/E<gt>\n"
3184 "E<lt>/mallocE<gt>\n"
3185
3186 #. type: Plain text
3187 #: build/C/man3/malloc_info.3:165
3188 #, no-wrap
3189 msgid ""
3190 "============ After allocating blocks ============\n"
3191 "E<lt>malloc version=\"1\"E<gt>\n"
3192 "E<lt>heap nr=\"0\"E<gt>\n"
3193 "E<lt>sizesE<gt>\n"
3194 "E<lt>/sizesE<gt>\n"
3195 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
3196 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
3197 "E<lt>system type=\"current\" size=\"1081344\"/E<gt>\n"
3198 "E<lt>system type=\"max\" size=\"1081344\"/E<gt>\n"
3199 "E<lt>aspace type=\"total\" size=\"1081344\"/E<gt>\n"
3200 "E<lt>aspace type=\"mprotect\" size=\"1081344\"/E<gt>\n"
3201 "E<lt>/heapE<gt>\n"
3202 "E<lt>heap nr=\"1\"E<gt>\n"
3203 "E<lt>sizesE<gt>\n"
3204 "E<lt>/sizesE<gt>\n"
3205 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
3206 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
3207 "E<lt>system type=\"current\" size=\"1032192\"/E<gt>\n"
3208 "E<lt>system type=\"max\" size=\"1032192\"/E<gt>\n"
3209 "E<lt>aspace type=\"total\" size=\"1032192\"/E<gt>\n"
3210 "E<lt>aspace type=\"mprotect\" size=\"1032192\"/E<gt>\n"
3211 "E<lt>/heapE<gt>\n"
3212 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
3213 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
3214 "E<lt>system type=\"current\" size=\"2113536\"/E<gt>\n"
3215 "E<lt>system type=\"max\" size=\"2113536\"/E<gt>\n"
3216 "E<lt>aspace type=\"total\" size=\"2113536\"/E<gt>\n"
3217 "E<lt>aspace type=\"mprotect\" size=\"2113536\"/E<gt>\n"
3218 "E<lt>/mallocE<gt>\n"
3219 msgstr ""
3220 "============ After allocating blocks ============\n"
3221 "E<lt>malloc version=\"1\"E<gt>\n"
3222 "E<lt>heap nr=\"0\"E<gt>\n"
3223 "E<lt>sizesE<gt>\n"
3224 "E<lt>/sizesE<gt>\n"
3225 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
3226 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
3227 "E<lt>system type=\"current\" size=\"1081344\"/E<gt>\n"
3228 "E<lt>system type=\"max\" size=\"1081344\"/E<gt>\n"
3229 "E<lt>aspace type=\"total\" size=\"1081344\"/E<gt>\n"
3230 "E<lt>aspace type=\"mprotect\" size=\"1081344\"/E<gt>\n"
3231 "E<lt>/heapE<gt>\n"
3232 "E<lt>heap nr=\"1\"E<gt>\n"
3233 "E<lt>sizesE<gt>\n"
3234 "E<lt>/sizesE<gt>\n"
3235 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
3236 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
3237 "E<lt>system type=\"current\" size=\"1032192\"/E<gt>\n"
3238 "E<lt>system type=\"max\" size=\"1032192\"/E<gt>\n"
3239 "E<lt>aspace type=\"total\" size=\"1032192\"/E<gt>\n"
3240 "E<lt>aspace type=\"mprotect\" size=\"1032192\"/E<gt>\n"
3241 "E<lt>/heapE<gt>\n"
3242 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
3243 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
3244 "E<lt>system type=\"current\" size=\"2113536\"/E<gt>\n"
3245 "E<lt>system type=\"max\" size=\"2113536\"/E<gt>\n"
3246 "E<lt>aspace type=\"total\" size=\"2113536\"/E<gt>\n"
3247 "E<lt>aspace type=\"mprotect\" size=\"2113536\"/E<gt>\n"
3248 "E<lt>/mallocE<gt>\n"
3249
3250 #. type: Plain text
3251 #: build/C/man3/malloc_info.3:175
3252 #, no-wrap
3253 msgid ""
3254 "#include E<lt>unistd.hE<gt>\n"
3255 "#include E<lt>stdlib.hE<gt>\n"
3256 "#include E<lt>pthread.hE<gt>\n"
3257 "#include E<lt>malloc.hE<gt>\n"
3258 "#include E<lt>errno.hE<gt>\n"
3259 msgstr ""
3260 "#include E<lt>unistd.hE<gt>\n"
3261 "#include E<lt>stdlib.hE<gt>\n"
3262 "#include E<lt>pthread.hE<gt>\n"
3263 "#include E<lt>malloc.hE<gt>\n"
3264 "#include E<lt>errno.hE<gt>\n"
3265
3266 #. type: Plain text
3267 #: build/C/man3/malloc_info.3:178
3268 #, no-wrap
3269 msgid ""
3270 "static size_t blockSize;\n"
3271 "static int numThreads, numBlocks;\n"
3272 msgstr ""
3273 "static size_t blockSize;\n"
3274 "static int numThreads, numBlocks;\n"
3275
3276 #. type: Plain text
3277 #: build/C/man3/malloc_info.3:181
3278 #, no-wrap
3279 msgid ""
3280 "#define errExit(msg)    do { perror(msg); exit(EXIT_FAILURE); \\e\n"
3281 "                        } while (0)\n"
3282 msgstr ""
3283 "#define errExit(msg)    do { perror(msg); exit(EXIT_FAILURE); \\e\n"
3284 "                        } while (0)\n"
3285
3286 #. type: Plain text
3287 #: build/C/man3/malloc_info.3:187
3288 #, no-wrap
3289 msgid ""
3290 "static void *\n"
3291 "thread_func(void *arg)\n"
3292 "{\n"
3293 "    int j;\n"
3294 "    int tn = (int) arg;\n"
3295 msgstr ""
3296 "static void *\n"
3297 "thread_func(void *arg)\n"
3298 "{\n"
3299 "    int j;\n"
3300 "    int tn = (int) arg;\n"
3301
3302 #. type: Plain text
3303 #: build/C/man3/malloc_info.3:190
3304 #, no-wrap
3305 msgid ""
3306 "    /* The multiplier \\(aq(2 + tn)\\(aq ensures that each thread (including\n"
3307 "       the main thread) allocates a different amount of memory */\n"
3308 msgstr ""
3309 "    /* The multiplier \\(aq(2 + tn)\\(aq ensures that each thread (including\n"
3310 "       the main thread) allocates a different amount of memory */\n"
3311
3312 #. type: Plain text
3313 #: build/C/man3/malloc_info.3:194
3314 #, no-wrap
3315 msgid ""
3316 "    for (j = 0; j E<lt> numBlocks; j++)\n"
3317 "        if (malloc(blockSize * (2 + tn)) == NULL)\n"
3318 "            errExit(\"malloc-thread\");\n"
3319 msgstr ""
3320 "    for (j = 0; j E<lt> numBlocks; j++)\n"
3321 "        if (malloc(blockSize * (2 + tn)) == NULL)\n"
3322 "            errExit(\"malloc-thread\");\n"
3323
3324 #. type: Plain text
3325 #: build/C/man3/malloc_info.3:198
3326 #, no-wrap
3327 msgid ""
3328 "    sleep(100);         /* Sleep until main thread terminates */\n"
3329 "    return NULL;\n"
3330 "}\n"
3331 msgstr ""
3332 "    sleep(100);         /* Sleep until main thread terminates */\n"
3333 "    return NULL;\n"
3334 "}\n"
3335
3336 #. type: Plain text
3337 #: build/C/man3/malloc_info.3:204
3338 #, no-wrap
3339 msgid ""
3340 "int\n"
3341 "main(int argc, char *argv[])\n"
3342 "{\n"
3343 "    int j, tn, sleepTime;\n"
3344 "    pthread_t *thr;\n"
3345 msgstr ""
3346 "int\n"
3347 "main(int argc, char *argv[])\n"
3348 "{\n"
3349 "    int j, tn, sleepTime;\n"
3350 "    pthread_t *thr;\n"
3351
3352 #. type: Plain text
3353 #: build/C/man3/malloc_info.3:211
3354 #, no-wrap
3355 msgid ""
3356 "    if (argc E<lt> 4) {\n"
3357 "        fprintf(stderr,\n"
3358 "                \"%s num-threads num-blocks block-size [sleep-time]\\en\",\n"
3359 "                argv[0]);\n"
3360 "        exit(EXIT_FAILURE);\n"
3361 "    }\n"
3362 msgstr ""
3363 "    if (argc E<lt> 4) {\n"
3364 "        fprintf(stderr,\n"
3365 "                \"%s num-threads num-blocks block-size [sleep-time]\\en\",\n"
3366 "                argv[0]);\n"
3367 "        exit(EXIT_FAILURE);\n"
3368 "    }\n"
3369
3370 #. type: Plain text
3371 #: build/C/man3/malloc_info.3:216
3372 #, no-wrap
3373 msgid ""
3374 "    numThreads = atoi(argv[1]);\n"
3375 "    numBlocks = atoi(argv[2]);\n"
3376 "    blockSize = atoi(argv[3]);\n"
3377 "    sleepTime = (argc E<gt> 4) ? atoi(argv[4]) : 0;\n"
3378 msgstr ""
3379 "    numThreads = atoi(argv[1]);\n"
3380 "    numBlocks = atoi(argv[2]);\n"
3381 "    blockSize = atoi(argv[3]);\n"
3382 "    sleepTime = (argc E<gt> 4) ? atoi(argv[4]) : 0;\n"
3383
3384 #. type: Plain text
3385 #: build/C/man3/malloc_info.3:220
3386 #, no-wrap
3387 msgid ""
3388 "    thr = calloc(numThreads, sizeof(pthread_t));\n"
3389 "    if (thr == NULL)\n"
3390 "        errExit(\"calloc\");\n"
3391 msgstr ""
3392 "    thr = calloc(numThreads, sizeof(pthread_t));\n"
3393 "    if (thr == NULL)\n"
3394 "        errExit(\"calloc\");\n"
3395
3396 #. type: Plain text
3397 #: build/C/man3/malloc_info.3:223
3398 #, no-wrap
3399 msgid ""
3400 "    printf(\"============ Before allocating blocks ============\\en\");\n"
3401 "    malloc_info(0, stdout);\n"
3402 msgstr ""
3403 "    printf(\"============ Before allocating blocks ============\\en\");\n"
3404 "    malloc_info(0, stdout);\n"
3405
3406 #. type: Plain text
3407 #: build/C/man3/malloc_info.3:225
3408 #, no-wrap
3409 msgid "    /* Create threads that allocate different amounts of memory */\n"
3410 msgstr "    /* Create threads that allocate different amounts of memory */\n"
3411
3412 #. type: Plain text
3413 #: build/C/man3/malloc_info.3:231
3414 #, no-wrap
3415 msgid ""
3416 "    for (tn = 0; tn E<lt> numThreads; tn++) {\n"
3417 "        errno = pthread_create(&thr[tn], NULL, thread_func,\n"
3418 "                               (void *) tn);\n"
3419 "        if (errno != 0)\n"
3420 "            errExit(\"pthread_create\");\n"
3421 msgstr ""
3422 "    for (tn = 0; tn E<lt> numThreads; tn++) {\n"
3423 "        errno = pthread_create(&thr[tn], NULL, thread_func,\n"
3424 "                               (void *) tn);\n"
3425 "        if (errno != 0)\n"
3426 "            errExit(\"pthread_create\");\n"
3427
3428 #. type: Plain text
3429 #: build/C/man3/malloc_info.3:236
3430 #, no-wrap
3431 msgid ""
3432 "        /* If we add a sleep interval after the start-up of each\n"
3433 "           thread, the threads likely won\\(aqt contend for malloc\n"
3434 "           mutexes, and therefore additional arenas won\\(aqt be\n"
3435 "           allocated (see malloc(3)). */\n"
3436 msgstr ""
3437 "        /* If we add a sleep interval after the start-up of each\n"
3438 "           thread, the threads likely won\\(aqt contend for malloc\n"
3439 "           mutexes, and therefore additional arenas won\\(aqt be\n"
3440 "           allocated (see malloc(3)). */\n"
3441
3442 #. type: Plain text
3443 #: build/C/man3/malloc_info.3:240
3444 #, no-wrap
3445 msgid ""
3446 "        if (sleepTime E<gt> 0)\n"
3447 "            sleep(sleepTime);\n"
3448 "    }\n"
3449 msgstr ""
3450 "        if (sleepTime E<gt> 0)\n"
3451 "            sleep(sleepTime);\n"
3452 "    }\n"
3453
3454 #. type: Plain text
3455 #: build/C/man3/malloc_info.3:242
3456 #, no-wrap
3457 msgid "    /* The main thread also allocates some memory */\n"
3458 msgstr "    /* The main thread also allocates some memory */\n"
3459
3460 #. type: Plain text
3461 #: build/C/man3/malloc_info.3:246
3462 #, no-wrap
3463 msgid ""
3464 "    for (j = 0; j E<lt> numBlocks; j++)\n"
3465 "        if (malloc(blockSize) == NULL)\n"
3466 "            errExit(\"malloc\");\n"
3467 msgstr ""
3468 "    for (j = 0; j E<lt> numBlocks; j++)\n"
3469 "        if (malloc(blockSize) == NULL)\n"
3470 "            errExit(\"malloc\");\n"
3471
3472 #. type: Plain text
3473 #: build/C/man3/malloc_info.3:249
3474 #, no-wrap
3475 msgid ""
3476 "    sleep(2);           /* Give all threads a chance to\n"
3477 "                           complete allocations */\n"
3478 msgstr ""
3479 "    sleep(2);           /* Give all threads a chance to\n"
3480 "                           complete allocations */\n"
3481
3482 #. type: Plain text
3483 #: build/C/man3/malloc_info.3:252
3484 #, no-wrap
3485 msgid ""
3486 "    printf(\"\\en============ After allocating blocks ============\\en\");\n"
3487 "    malloc_info(0, stdout);\n"
3488 msgstr ""
3489 "    printf(\"\\en============ After allocating blocks ============\\en\");\n"
3490 "    malloc_info(0, stdout);\n"
3491
3492 #. type: Plain text
3493 #: build/C/man3/malloc_info.3:262
3494 msgid ""
3495 "B<mallinfo>(3), B<malloc>(3), B<malloc_stats>(3), B<mallopt>(3), "
3496 "B<open_memstream>(3)"
3497 msgstr ""
3498 "B<mallinfo>(3), B<malloc>(3), B<malloc_stats>(3), B<mallopt>(3), "
3499 "B<open_memstream>(3)"
3500
3501 #. type: TH
3502 #: build/C/man3/malloc_stats.3:26
3503 #, no-wrap
3504 msgid "MALLOC_STATS"
3505 msgstr "MALLOC_STATS"
3506
3507 #. type: Plain text
3508 #: build/C/man3/malloc_stats.3:29
3509 msgid "malloc_stats - print memory allocation statistics"
3510 msgstr "malloc_stats - メモリ割り当ての統計を表示する"
3511
3512 #. type: Plain text
3513 #: build/C/man3/malloc_stats.3:33
3514 msgid "B<void malloc_stats(void);>"
3515 msgstr "B<void malloc_stats(void);>"
3516
3517 #.  .SH VERSIONS
3518 #.  Available already in glibc 2.0, possibly earlier
3519 #. type: Plain text
3520 #: build/C/man3/malloc_stats.3:55
3521 msgid ""
3522 "The B<malloc_stats>()  function prints (on standard error) statistics about "
3523 "memory allocated by B<malloc>(3)  and related functions.  For each arena "
3524 "(allocation area), this function prints the total amount of memory allocated "
3525 "and the total number of bytes consumed by in-use allocations.  (These two "
3526 "values correspond to the I<arena> and I<uordblks> fields retrieved by "
3527 "B<mallinfo>(3).)  In addition, the function prints the sum of these two "
3528 "statistics for all arenas, and the maximum number of blocks and bytes that "
3529 "were ever simultaneously allocated using B<mmap>(2)."
3530 msgstr ""
3531 "B<malloc_stats>() 関数は B<malloc>(3) や関連する関数により割り当てられたメモ"
3532 "リに関する統計を (標準エラーに) 出力する。 各領域 (割り当てエリア) につい"
3533 "て、 この関数は割り当てられているメモリの総量と現在の割り当てが使用している総"
3534 "バイト数を出力する (これらの二つの値は B<mallinfo>(3) で取得できる I<arena> "
3535 "と I<uordblks> フィールドに対応している)。 また、この関数は、 すべての領域の"
3536 "これら二つの統計情報の合計値と、 B<mmap>(2) を使って同時に割り当てられたブ"
3537 "ロック数とバイト数の最大値を表示する。"
3538
3539 #. type: Plain text
3540 #: build/C/man3/malloc_stats.3:61
3541 msgid ""
3542 "More detailed information about memory allocations in the main arena can be "
3543 "obtained using B<mallinfo>(3)."
3544 msgstr ""
3545 "B<mallinfo>(3) を使用すると、 メイン領域のメモリ割り当てに関するより詳細な情"
3546 "報を取得できる。"
3547
3548 #. type: Plain text
3549 #: build/C/man3/malloc_stats.3:67
3550 msgid ""
3551 "B<mmap>(2), B<mallinfo>(3), B<malloc>(3), B<malloc_info>(3), B<mallopt>(3)"
3552 msgstr ""
3553 "B<mmap>(2), B<mallinfo>(3), B<malloc>(3), B<malloc_info>(3), B<mallopt>(3)"
3554
3555 #. type: TH
3556 #: build/C/man3/malloc_trim.3:26
3557 #, no-wrap
3558 msgid "MALLOC_TRIM"
3559 msgstr "MALLOC_TRIM"
3560
3561 #. type: TH
3562 #: build/C/man3/malloc_trim.3:26 build/C/man2/remap_file_pages.2:28
3563 #, no-wrap
3564 msgid "2014-05-28"
3565 msgstr "2014-05-28"
3566
3567 #. type: Plain text
3568 #: build/C/man3/malloc_trim.3:29
3569 msgid "malloc_trim - release free memory from the top of the heap"
3570 msgstr ""
3571
3572 #. type: Plain text
3573 #: build/C/man3/malloc_trim.3:33
3574 msgid "B<int malloc_trim(size_t >I<pad>B<);>"
3575 msgstr "B<int malloc_trim(size_t >I<pad>B<);>"
3576
3577 #. type: Plain text
3578 #: build/C/man3/malloc_trim.3:40
3579 msgid ""
3580 "The B<malloc_trim>()  function attempts to release free memory at the top of "
3581 "the heap (by calling B<sbrk>(2)  with a suitable argument)."
3582 msgstr ""
3583
3584 #. type: Plain text
3585 #: build/C/man3/malloc_trim.3:51
3586 msgid ""
3587 "The I<pad> argument specifies the amount of free space to leave untrimmed at "
3588 "the top of the heap.  If this argument is 0, only the minimum amount of "
3589 "memory is maintained at the top of the heap (i.e., one page or less).  A "
3590 "nonzero argument can be used to maintain some trailing space at the top of "
3591 "the heap in order to allow future allocations to be made without having to "
3592 "extend the heap with B<sbrk>(2)."
3593 msgstr ""
3594
3595 #. type: Plain text
3596 #: build/C/man3/malloc_trim.3:56
3597 msgid ""
3598 "The B<malloc_trim>()  function returns 1 if memory was actually released "
3599 "back to the system, or 0 if it was not possible to release any memory."
3600 msgstr ""
3601
3602 #.  .SH VERSIONS
3603 #.  Available already in glibc 2.0, possibly earlier
3604 #. type: Plain text
3605 #: build/C/man3/malloc_trim.3:60
3606 msgid "No errors are defined."
3607 msgstr ""
3608
3609 #. type: Plain text
3610 #: build/C/man3/malloc_trim.3:71
3611 msgid ""
3612 "This function is automatically called by B<free>(3)  in certain "
3613 "circumstances; see the discussion of B<M_TOP_PAD> and B<M_TRIM_THRESHOLD> in "
3614 "B<mallopt>(3)."
3615 msgstr ""
3616
3617 #. type: Plain text
3618 #: build/C/man3/malloc_trim.3:74
3619 msgid ""
3620 "This function cannot release free memory located at places other than the "
3621 "top of the heap."
3622 msgstr ""
3623
3624 #.  malloc/malloc.c::mTRIm():
3625 #.      return result | (av == &main_arena ? sYSTRIm (pad, av) : 0);
3626 #. type: Plain text
3627 #: build/C/man3/malloc_trim.3:78
3628 msgid "This function releases only memory in the main arena."
3629 msgstr ""
3630
3631 #. type: Plain text
3632 #: build/C/man3/malloc_trim.3:82
3633 msgid "B<sbrk>(2), B<malloc>(3), B<mallopt>(3)"
3634 msgstr "B<sbrk>(2), B<malloc>(3), B<mallopt>(3)"
3635
3636 #. type: TH
3637 #: build/C/man3/malloc_usable_size.3:25
3638 #, no-wrap
3639 msgid "MALLOC_USABLE_SIZE"
3640 msgstr "MALLOC_USABLE_SIZE"
3641
3642 #. type: Plain text
3643 #: build/C/man3/malloc_usable_size.3:28
3644 msgid "malloc_usable_size - obtain size of block of memory allocated from heap"
3645 msgstr ""
3646
3647 #. type: Plain text
3648 #: build/C/man3/malloc_usable_size.3:32
3649 msgid "B<size_t malloc_usable_size (void *>I<ptr>B<);>"
3650 msgstr "B<size_t malloc_usable_size (void *>I<ptr>B<);>"
3651
3652 #. type: Plain text
3653 #: build/C/man3/malloc_usable_size.3:40
3654 msgid ""
3655 "The B<malloc_usable_size>()  function returns the number of usable bytes in "
3656 "the block pointed to by I<ptr>, a pointer to a block of memory allocated by "
3657 "B<malloc>(3)  or a related function."
3658 msgstr ""
3659
3660 #. type: Plain text
3661 #: build/C/man3/malloc_usable_size.3:48
3662 msgid ""
3663 "B<malloc_usable_size>()  returns the number of usable bytes in the block of "
3664 "allocated memory pointed to by I<ptr>.  If I<ptr> is NULL, 0 is returned."
3665 msgstr ""
3666
3667 #. type: Plain text
3668 #: build/C/man3/malloc_usable_size.3:53
3669 #, fuzzy
3670 #| msgid "The B<alloca>()  function is thread-safe."
3671 msgid "The B<malloc_usable_size>()  function is thread-safe."
3672 msgstr "B<alloca>() 関数はスレッドセーフである。"
3673
3674 #. type: Plain text
3675 #: build/C/man3/malloc_usable_size.3:65
3676 msgid ""
3677 "The value returned by B<malloc_usable_size>()  may be greater than the "
3678 "requested size of the allocation because of alignment and minimum size "
3679 "constraints.  Although the excess bytes can be overwritten by the "
3680 "application without ill effects, this is not good programming practice: the "
3681 "number of excess bytes in an allocation depends on the underlying "
3682 "implementation."
3683 msgstr ""
3684
3685 #. type: Plain text
3686 #: build/C/man3/malloc_usable_size.3:67
3687 msgid "The main use of this function is for debugging and introspection."
3688 msgstr ""
3689
3690 #. type: Plain text
3691 #: build/C/man3/malloc_usable_size.3:69
3692 msgid "B<malloc>(3)"
3693 msgstr "B<malloc>(3)"
3694
3695 #. type: TH
3696 #: build/C/man3/mallopt.3:26
3697 #, no-wrap
3698 msgid "MALLOPT"
3699 msgstr "MALLOPT"
3700
3701 #. type: Plain text
3702 #: build/C/man3/mallopt.3:29
3703 msgid "mallopt - set memory allocation parameters"
3704 msgstr "mallopt - メモリ割り当てパラメータを設定する"
3705
3706 #. type: Plain text
3707 #: build/C/man3/mallopt.3:33
3708 msgid "B<int mallopt(int >I<param>B<, int >I<value>B<);>"
3709 msgstr "B<int mallopt(int >I<param>B<, int >I<value>B<);>"
3710
3711 #. type: Plain text
3712 #: build/C/man3/mallopt.3:44
3713 msgid ""
3714 "The B<mallopt>()  function adjusts parameters that control the behavior of "
3715 "the memory-allocation functions (see B<malloc>(3)).  The I<param> argument "
3716 "specifies the parameter to be modified, and I<value> specifies the new value "
3717 "for that parameter."
3718 msgstr ""
3719 "B<mallopt>() 関数は、メモリ割り当て関数 (B<malloc>(3) を参照) の動作を\n"
3720 "制御するパラメータの調整を行う。\n"
3721 "I<param> 引き数で変更するパラメータを指定し、\n"
3722 "I<value> 引き数でそのパラメータの新しい値を指定する。"
3723
3724 #. type: Plain text
3725 #: build/C/man3/mallopt.3:47
3726 msgid "The following values can be specified for I<param>:"
3727 msgstr "I<param> には以下の値を指定することができる。"
3728
3729 #. type: TP
3730 #: build/C/man3/mallopt.3:47
3731 #, no-wrap
3732 msgid "B<M_CHECK_ACTION>"
3733 msgstr "B<M_CHECK_ACTION>"
3734
3735 #. type: Plain text
3736 #: build/C/man3/mallopt.3:53
3737 msgid ""
3738 "Setting this parameter controls how glibc responds when various kinds of "
3739 "programming errors are detected (e.g., freeing the same pointer twice).  The "
3740 "3 least significant bits (2, 1, and 0) of the value assigned to this "
3741 "parameter determine the glibc behavior, as follows:"
3742 msgstr ""
3743
3744 #. type: TP
3745 #: build/C/man3/mallopt.3:54
3746 #, no-wrap
3747 msgid "Bit 0"
3748 msgstr "Bit 0"
3749
3750 #. type: Plain text
3751 #: build/C/man3/mallopt.3:64
3752 msgid ""
3753 "If this bit is set, then print a one-line message on I<stderr> that provides "
3754 "details about the error.  The message starts with the string \"***\\ glibc "
3755 "detected\\ ***\", followed by the program name, the name of the memory-"
3756 "allocation function in which the error was detected, a brief description of "
3757 "the error, and the memory address where the error was detected."
3758 msgstr ""
3759
3760 #. type: TP
3761 #: build/C/man3/mallopt.3:64
3762 #, no-wrap
3763 msgid "Bit 1"
3764 msgstr "Bit 1"
3765
3766 #. type: Plain text
3767 #: build/C/man3/mallopt.3:79
3768 msgid ""
3769 "If this bit is set, then, after printing any error message specified by bit "
3770 "0, the program is terminated by calling B<abort>(3).  In glibc versions "
3771 "since 2.4, if bit 0 is also set, then, between printing the error message "
3772 "and aborting, the program also prints a stack trace in the manner of "
3773 "B<backtrace>(3), and prints the process's memory mapping in the style of I</"
3774 "proc/[pid]/maps> (see B<proc>(5))."
3775 msgstr ""
3776
3777 #. type: TP
3778 #: build/C/man3/mallopt.3:79
3779 #, no-wrap
3780 msgid "Bit 2 (since glibc 2.4)"
3781 msgstr "Bit 2 (glibc 2.4 以降)"
3782
3783 #. type: Plain text
3784 #: build/C/man3/mallopt.3:86
3785 msgid ""
3786 "This bit has an effect only if bit 0 is also set.  If this bit is set, then "
3787 "the one-line message describing the error is simplified to contain just the "
3788 "name of the function where the error was detected and the brief description "
3789 "of the error."
3790 msgstr ""
3791
3792 #. type: Plain text
3793 #: build/C/man3/mallopt.3:91
3794 msgid "The remaining bits in I<value> are ignored."
3795 msgstr ""
3796
3797 #. type: Plain text
3798 #: build/C/man3/mallopt.3:95
3799 msgid ""
3800 "Combining the above details, the following numeric values are meaningful for "
3801 "B<M_CHECK_ACTION>:"
3802 msgstr ""
3803
3804 #. type: IP
3805 #: build/C/man3/mallopt.3:96
3806 #, no-wrap
3807 msgid "0"
3808 msgstr "0"
3809
3810 #. type: Plain text
3811 #: build/C/man3/mallopt.3:98
3812 msgid "Ignore error conditions; continue execution (with undefined results)."
3813 msgstr ""
3814
3815 #. type: IP
3816 #: build/C/man3/mallopt.3:98
3817 #, no-wrap
3818 msgid "1"
3819 msgstr "1"
3820
3821 #. type: Plain text
3822 #: build/C/man3/mallopt.3:100
3823 msgid "Print a detailed error message and continue execution."
3824 msgstr ""
3825
3826 #. type: IP
3827 #: build/C/man3/mallopt.3:100
3828 #, no-wrap
3829 msgid "2"
3830 msgstr "2"
3831
3832 #. type: Plain text
3833 #: build/C/man3/mallopt.3:102
3834 msgid "Abort the program."
3835 msgstr ""
3836
3837 #. type: IP
3838 #: build/C/man3/mallopt.3:102
3839 #, no-wrap
3840 msgid "3"
3841 msgstr "3"
3842
3843 #. type: Plain text
3844 #: build/C/man3/mallopt.3:105
3845 msgid ""
3846 "Print detailed error message, stack trace, and memory mappings, and abort "
3847 "the program."
3848 msgstr ""
3849
3850 #. type: IP
3851 #: build/C/man3/mallopt.3:105
3852 #, no-wrap
3853 msgid "5"
3854 msgstr "5"
3855
3856 #. type: Plain text
3857 #: build/C/man3/mallopt.3:107
3858 msgid "Print a simple error message and continue execution."
3859 msgstr ""
3860
3861 #. type: IP
3862 #: build/C/man3/mallopt.3:107
3863 #, no-wrap
3864 msgid "7"
3865 msgstr "7"
3866
3867 #. type: Plain text
3868 #: build/C/man3/mallopt.3:110
3869 msgid ""
3870 "Print simple error message, stack trace, and memory mappings, and abort the "
3871 "program."
3872 msgstr ""
3873
3874 #. type: Plain text
3875 #: build/C/man3/mallopt.3:116
3876 msgid ""
3877 "Since glibc 2.3.4, the default value for the B<M_CHECK_ACTION> parameter is "
3878 "3.  In glibc version 2.3.3 and earlier, the default value is 1."
3879 msgstr ""
3880
3881 #. type: Plain text
3882 #: build/C/man3/mallopt.3:121
3883 msgid ""
3884 "Using a nonzero B<M_CHECK_ACTION> value can be useful because otherwise a "
3885 "crash may happen much later, and the true cause of the problem is then very "
3886 "hard to track down."
3887 msgstr ""
3888
3889 #. type: TP
3890 #: build/C/man3/mallopt.3:121
3891 #, no-wrap
3892 msgid "B<M_MMAP_MAX>"
3893 msgstr "B<M_MMAP_MAX>"
3894
3895 #.  The following text adapted from comments in the glibc source:
3896 #. type: Plain text
3897 #: build/C/man3/mallopt.3:131
3898 msgid ""
3899 "This parameter specifies the maximum number of allocation requests that may "
3900 "be simultaneously serviced using B<mmap>(2).  This parameter exists because "
3901 "some systems have a limited number of internal tables for use by B<mmap>(2), "
3902 "and using more than a few of them may degrade performance."
3903 msgstr ""
3904
3905 #. type: Plain text
3906 #: build/C/man3/mallopt.3:138
3907 msgid ""
3908 "The default value is 65,536, a value which has no special significance and "
3909 "which servers only as a safeguard.  Setting this parameter to 0 disables the "
3910 "use of B<mmap>(2)  for servicing large allocation requests."
3911 msgstr ""
3912
3913 #. type: TP
3914 #: build/C/man3/mallopt.3:138
3915 #, no-wrap
3916 msgid "B<M_MMAP_THRESHOLD>"
3917 msgstr "B<M_MMAP_THRESHOLD>"
3918
3919 #. type: Plain text
3920 #: build/C/man3/mallopt.3:147
3921 msgid ""
3922 "For allocations greater than or equal to the limit specified (in bytes) by "
3923 "B<M_MMAP_THRESHOLD> that can't be satisfied from the free list, the memory-"
3924 "allocation functions employ B<mmap>(2)  instead of increasing the program "
3925 "break using B<sbrk>(2)."
3926 msgstr ""
3927
3928 #. type: Plain text
3929 #: build/C/man3/mallopt.3:167
3930 msgid ""
3931 "Allocating memory using B<mmap>(2)  has the significant advantage that the "
3932 "allocated memory blocks can always be independently released back to the "
3933 "system.  (By contrast, the heap can be trimmed only if memory is freed at "
3934 "the top end.)  On the other hand, there are some disadvantages to the use of "
3935 "B<mmap>(2): deallocated space is not placed on the free list for reuse by "
3936 "later allocations; memory may be wasted because B<mmap>(2)  allocations must "
3937 "be page-aligned; and the kernel must perform the expensive task of zeroing "
3938 "out memory allocated via B<mmap>(2).  Balancing these factors leads to a "
3939 "default setting of 128*1024 for the B<M_MMAP_THRESHOLD> parameter."
3940 msgstr ""
3941
3942 #. type: Plain text
3943 #: build/C/man3/mallopt.3:174
3944 msgid ""
3945 "The lower limit for this parameter is 0.  The upper limit is "
3946 "B<DEFAULT_MMAP_THRESHOLD_MAX>: 512*1024 on 32-bit systems or "
3947 "I<4*1024*1024*sizeof(long)> on 64-bit systems."
3948 msgstr ""
3949
3950 #. type: Plain text
3951 #: build/C/man3/mallopt.3:192
3952 msgid ""
3953 "I<Note:> Nowadays, glibc uses a dynamic mmap threshold by default.  The "
3954 "initial value of the threshold is 128*1024, but when blocks larger than the "
3955 "current threshold and less than or equal to B<DEFAULT_MMAP_THRESHOLD_MAX> "
3956 "are freed, the threshold is adjusted upward to the size of the freed block.  "
3957 "When dynamic mmap thresholding is in effect, the threshold for trimming the "
3958 "heap is also dynamically adjusted to be twice the dynamic mmap threshold.  "
3959 "Dynamic adjustment of the mmap threshold is disabled if any of the "
3960 "B<M_TRIM_THRESHOLD>, B<M_TOP_PAD>, B<M_MMAP_THRESHOLD>, or B<M_MMAP_MAX> "
3961 "parameters is set."
3962 msgstr ""
3963
3964 #. type: TP
3965 #: build/C/man3/mallopt.3:192
3966 #, no-wrap
3967 msgid "B<M_MXFAST> (since glibc 2.3)"
3968 msgstr "B<M_MXFAST> (glibc 2.3 以降)"
3969
3970 #.  The following text adapted from comments in the glibc sources:
3971 #. type: Plain text
3972 #: build/C/man3/mallopt.3:212
3973 msgid ""
3974 "Set the upper limit for memory allocation requests that are satisfied using "
3975 "\"fastbins\".  (The measurement unit for this parameter is bytes.)  Fastbins "
3976 "are storage areas that hold deallocated blocks of memory of the same size "
3977 "without merging adjacent free blocks.  Subsequent reallocation of blocks of "
3978 "the same size can be handled very quickly by allocating from the fastbin, "
3979 "although memory fragmentation and the overall memory footprint of the "
3980 "program can increase.  The default value for this parameter is "
3981 "I<64*sizeof(size_t)/4> (i.e., 64 on 32-bit architectures).  The range for "
3982 "this parameter is 0 to I<80*sizeof(size_t)/4>.  Setting B<M_MXFAST> to 0 "
3983 "disables the use of fastbins."
3984 msgstr ""
3985
3986 #. type: TP
3987 #: build/C/man3/mallopt.3:212
3988 #, no-wrap
3989 msgid "B<M_PERTURB> (since glibc 2.4)"
3990 msgstr "B<M_PERTURB> (glibc 2.4 以降)"
3991
3992 #. type: Plain text
3993 #: build/C/man3/mallopt.3:227
3994 msgid ""
3995 "If this parameter is set to a nonzero value, then bytes of allocated memory "
3996 "(other than allocations via B<calloc>(3))  are initialized to the complement "
3997 "of the value in the least significant byte of I<value>, and when allocated "
3998 "memory is released using B<free>(3), the freed bytes are set to the least "
3999 "significant byte of I<value>.  This can be useful for detecting errors where "
4000 "programs incorrectly rely on allocated memory being initialized to zero, or "
4001 "reuse values in memory that has already been freed."
4002 msgstr ""
4003
4004 #. type: TP
4005 #: build/C/man3/mallopt.3:227
4006 #, no-wrap
4007 msgid "B<M_TOP_PAD>"
4008 msgstr "B<M_TOP_PAD>"
4009
4010 #. type: Plain text
4011 #: build/C/man3/mallopt.3:234
4012 msgid ""
4013 "This parameter defines the amount of padding to employ when calling "
4014 "B<sbrk>(2)  to modify the program break.  (The measurement unit for this "
4015 "parameter is bytes.)  This parameter has an effect in the following "
4016 "circumstances:"
4017 msgstr ""
4018
4019 #. type: Plain text
4020 #: build/C/man3/mallopt.3:241
4021 msgid ""
4022 "When the program break is increased, then B<M_TOP_PAD> bytes are added to "
4023 "the B<sbrk>(2)  request."
4024 msgstr ""
4025
4026 #. type: Plain text
4027 #: build/C/man3/mallopt.3:247
4028 msgid ""
4029 "When the heap is trimmed as a consequence of calling B<free>(3)  (see the "
4030 "discussion of B<M_TRIM_THRESHOLD>)  this much free space is preserved at the "
4031 "top of the heap."
4032 msgstr ""
4033
4034 #. type: Plain text
4035 #: build/C/man3/mallopt.3:251
4036 msgid ""
4037 "In either case, the amount of padding is always rounded to a system page "
4038 "boundary."
4039 msgstr ""
4040
4041 #. type: Plain text
4042 #: build/C/man3/mallopt.3:258
4043 msgid ""
4044 "Modifying B<M_TOP_PAD> is a trade-off between increasing the number of "
4045 "system calls (when the parameter is set low)  and wasting unused memory at "
4046 "the top of the heap (when the parameter is set high)."
4047 msgstr ""
4048
4049 #.  DEFAULT_TOP_PAD in glibc source
4050 #. type: Plain text
4051 #: build/C/man3/mallopt.3:261
4052 msgid "The default value for this parameter is 128*1024."
4053 msgstr ""
4054
4055 #. type: TP
4056 #: build/C/man3/mallopt.3:261
4057 #, no-wrap
4058 msgid "B<M_TRIM_THRESHOLD>"
4059 msgstr "B<M_TRIM_THRESHOLD>"
4060
4061 #. type: Plain text
4062 #: build/C/man3/mallopt.3:277
4063 msgid ""
4064 "When the amount of contiguous free memory at the top of the heap grows "
4065 "sufficiently large, B<free>(3)  employs B<sbrk>(2)  to release this memory "
4066 "back to the system.  (This can be useful in programs that continue to "
4067 "execute for a long period after freeing a significant amount of memory.)  "
4068 "The B<M_TRIM_THRESHOLD> parameter specifies the minimum size (in bytes) that "
4069 "this block of memory must reach before B<sbrk>(2)  is used to trim the heap."
4070 msgstr ""
4071
4072 #. type: Plain text
4073 #: build/C/man3/mallopt.3:282
4074 msgid ""
4075 "The default value for this parameter is 128*1024.  Setting "
4076 "B<M_TRIM_THRESHOLD> to -1 disables trimming completely."
4077 msgstr ""
4078
4079 #
4080 #
4081 #
4082 #.  FIXME Do the arena parameters need to be documented?
4083 #.  .TP
4084 #.  .BR M_ARENA_TEST " (since glibc 2.10)"
4085 #.  .TP
4086 #.  .BR M_ARENA_MAX " (since glibc 2.10)"
4087 #.  Environment variables
4088 #.      MALLOC_ARENA_MAX_
4089 #.      MALLOC_ARENA_TEST_
4090 #.  http://udrepper.livejournal.com/20948.html describes some details
4091 #.      of the MALLOC_ARENA_* environment variables.
4092 #.  These macros aren't enabled in production releases until 2.15?
4093 #.  (see glibc malloc/Makefile)
4094 #. type: Plain text
4095 #: build/C/man3/mallopt.3:305
4096 msgid ""
4097 "Modifying B<M_TRIM_THRESHOLD> is a trade-off between increasing the number "
4098 "of system calls (when the parameter is set low)  and wasting unused memory "
4099 "at the top of the heap (when the parameter is set high)."
4100 msgstr ""
4101
4102 #. type: SS
4103 #: build/C/man3/mallopt.3:305
4104 #, no-wrap
4105 msgid "Environment variables"
4106 msgstr "環境変数"
4107
4108 #. type: Plain text
4109 #: build/C/man3/mallopt.3:320
4110 msgid ""
4111 "A number of environment variables can be defined to modify some of the same "
4112 "parameters as are controlled by B<mallopt>().  Using these variables has the "
4113 "advantage that the source code of the program need not be changed.  To be "
4114 "effective, these variables must be defined before the first call to a memory-"
4115 "allocation function.  (If the same parameters are adjusted via B<mallopt>(), "
4116 "then the B<mallopt>()  settings take precedence.)  For security reasons, "
4117 "these variables are ignored in set-user-ID and set-group-ID programs."
4118 msgstr ""
4119
4120 #. type: Plain text
4121 #: build/C/man3/mallopt.3:323
4122 msgid ""
4123 "The environment variables are as follows (note the trailing underscore at "
4124 "the end of the name of each variable):"
4125 msgstr ""
4126
4127 #. type: TP
4128 #: build/C/man3/mallopt.3:323
4129 #, no-wrap
4130 msgid "B<MALLOC_CHECK_>"
4131 msgstr "B<MALLOC_CHECK_>"
4132
4133 #.  On glibc 2.12/x86, a simple malloc()+free() loop is about 70% slower
4134 #.  when MALLOC_CHECK_ was set.
4135 #. type: Plain text
4136 #: build/C/man3/mallopt.3:340
4137 msgid ""
4138 "This environment variable controls the same parameter as B<mallopt>()  "
4139 "B<M_CHECK_ACTION>.  If this variable is set to a nonzero value, then a "
4140 "special implementation of the memory-allocation functions is used.  (This is "
4141 "accomplished using the B<malloc_hook>(3)  feature.)  This implementation "
4142 "performs additional error checking, but is slower than the standard set of "
4143 "memory-allocation functions.  (This implementation does not detect all "
4144 "possible errors; memory leaks can still occur.)"
4145 msgstr ""
4146
4147 #. type: Plain text
4148 #: build/C/man3/mallopt.3:345
4149 msgid ""
4150 "The value assigned to this environment variable should be a single digit, "
4151 "whose meaning is as described for B<M_CHECK_ACTION>.  Any characters beyond "
4152 "the initial digit are ignored."
4153 msgstr ""
4154
4155 #. type: Plain text
4156 #: build/C/man3/mallopt.3:354
4157 msgid ""
4158 "For security reasons, the effect of B<MALLOC_CHECK_> is disabled by default "
4159 "for set-user-ID and set-group-ID programs.  However, if the file I</etc/suid-"
4160 "debug> exists (the content of the file is irrelevant), then B<MALLOC_CHECK_> "
4161 "also has an effect for set-user-ID and set-group-ID programs."
4162 msgstr ""
4163
4164 #. type: TP
4165 #: build/C/man3/mallopt.3:354
4166 #, no-wrap
4167 msgid "B<MALLOC_MMAP_MAX_>"
4168 msgstr "B<MALLOC_MMAP_MAX_>"
4169
4170 #. type: Plain text
4171 #: build/C/man3/mallopt.3:359
4172 msgid "Controls the same parameter as B<mallopt>()  B<M_MMAP_MAX>."
4173 msgstr ""
4174
4175 #. type: TP
4176 #: build/C/man3/mallopt.3:359
4177 #, no-wrap
4178 msgid "B<MALLOC_MMAP_THRESHOLD_>"
4179 msgstr "B<MALLOC_MMAP_THRESHOLD_>"
4180
4181 #. type: Plain text
4182 #: build/C/man3/mallopt.3:364
4183 msgid "Controls the same parameter as B<mallopt>()  B<M_MMAP_THRESHOLD>."
4184 msgstr ""
4185
4186 #. type: TP
4187 #: build/C/man3/mallopt.3:364
4188 #, no-wrap
4189 msgid "B<MALLOC_PERTURB_>"
4190 msgstr "B<MALLOC_PERTURB_>"
4191
4192 #. type: Plain text
4193 #: build/C/man3/mallopt.3:369
4194 msgid "Controls the same parameter as B<mallopt>()  B<M_PERTURB>."
4195 msgstr ""
4196
4197 #. type: TP
4198 #: build/C/man3/mallopt.3:369
4199 #, no-wrap
4200 msgid "B<MALLOC_TRIM_THRESHOLD_>"
4201 msgstr "B<MALLOC_TRIM_THRESHOLD_>"
4202
4203 #. type: Plain text
4204 #: build/C/man3/mallopt.3:374
4205 msgid "Controls the same parameter as B<mallopt>()  B<M_TRIM_THRESHOLD>."
4206 msgstr ""
4207
4208 #. type: TP
4209 #: build/C/man3/mallopt.3:374
4210 #, no-wrap
4211 msgid "B<MALLOC_TOP_PAD_>"
4212 msgstr "B<MALLOC_TOP_PAD_>"
4213
4214 #. type: Plain text
4215 #: build/C/man3/mallopt.3:379
4216 msgid "Controls the same parameter as B<mallopt>()  B<M_TOP_PAD>."
4217 msgstr ""
4218
4219 #. type: Plain text
4220 #: build/C/man3/mallopt.3:384
4221 msgid "On success, B<mallopt>()  returns 1.  On error, it returns 0."
4222 msgstr "B<mallopt>()  は成功すると 1 を返す。エラーの場合は 0 を返す。"
4223
4224 #.  .SH VERSIONS
4225 #.  Available already in glibc 2.0, possibly earlier
4226 #. type: Plain text
4227 #: build/C/man3/mallopt.3:392
4228 msgid "On error, I<errno> is I<not> set."
4229 msgstr "エラーの場合、I<errno> は設定I<されない>。"
4230
4231 #.  .SH NOTES
4232 #. type: Plain text
4233 #: build/C/man3/mallopt.3:406
4234 msgid ""
4235 "This function is not specified by POSIX or the C standards.  A similar "
4236 "function exists on many System V derivatives, but the range of values for "
4237 "I<param> varies across systems.  The SVID defined options B<M_MXFAST>, "
4238 "B<M_NLBLKS>, B<M_GRAIN>, and B<M_KEEP>, but only the first of these is "
4239 "implemented in glibc."
4240 msgstr ""
4241
4242 #. type: Plain text
4243 #: build/C/man3/mallopt.3:410
4244 msgid "Specifying an invalid value for I<param> does not generate an error."
4245 msgstr ""
4246
4247 #.  FIXME . This looks buggy:
4248 #.  setting the M_MXFAST limit rounds up:    (s + SIZE_SZ) & ~MALLOC_ALIGN_MASK)
4249 #.  malloc requests are rounded up:
4250 #.     (req) + SIZE_SZ + MALLOC_ALIGN_MASK) & ~MALLOC_ALIGN_MASK
4251 #.  http://sources.redhat.com/bugzilla/show_bug.cgi?id=12129
4252 #. type: Plain text
4253 #: build/C/man3/mallopt.3:418
4254 msgid ""
4255 "A calculation error within the glibc implementation means that a call of the "
4256 "form:"
4257 msgstr ""
4258
4259 #. type: Plain text
4260 #: build/C/man3/mallopt.3:421
4261 #, no-wrap
4262 msgid "    mallopt(M_MXFAST, n)\n"
4263 msgstr "    mallopt(M_MXFAST, n)\n"
4264
4265 #.  Bins are multiples of 2 * sizeof(size_t) + sizeof(size_t)
4266 #. type: Plain text
4267 #: build/C/man3/mallopt.3:433
4268 msgid ""
4269 "does not result in fastbins being employed for all allocations of size up to "
4270 "I<n>.  To ensure desired results, I<n> should be rounded up to the next "
4271 "multiple greater than or equal to I<(2k+1)*sizeof(size_t)>, where I<k> is an "
4272 "integer."
4273 msgstr ""
4274
4275 #.  FIXME . http://sources.redhat.com/bugzilla/show_bug.cgi?id=12140
4276 #. type: Plain text
4277 #: build/C/man3/mallopt.3:454
4278 msgid ""
4279 "If B<mallopt>()  is used to set B<M_PERTURB>, then, as expected, the bytes "
4280 "of allocated memory are initialized to the complement of the byte in "
4281 "I<value>, and when that memory is freed, the bytes of the region are "
4282 "initialized to the byte specified in I<value>.  However, there is an off-by-"
4283 "I<sizeof(size_t)> error in the implementation: instead of initializing "
4284 "precisely the block of memory being freed by the call I<free(p)>, the block "
4285 "starting at I<p+sizeof(size_t)> is initialized."
4286 msgstr ""
4287
4288 #. type: Plain text
4289 #: build/C/man3/mallopt.3:463
4290 msgid ""
4291 "The program below demonstrates the use of B<M_CHECK_ACTION>.  If the program "
4292 "is supplied with an (integer) command-line argument, then that argument is "
4293 "used to set the B<M_CHECK_ACTION> parameter.  The program then allocates a "
4294 "block of memory, and frees it twice (an error)."
4295 msgstr ""
4296
4297 #. type: Plain text
4298 #: build/C/man3/mallopt.3:467
4299 msgid ""
4300 "The following shell session shows what happens when we run this program "
4301 "under glibc, with the default value for B<M_CHECK_ACTION>:"
4302 msgstr ""
4303
4304 #. type: Plain text
4305 #: build/C/man3/mallopt.3:487
4306 #, no-wrap
4307 msgid ""
4308 "$ B<./a.out>\n"
4309 "main(): returned from first free() call\n"
4310 "*** glibc detected *** ./a.out: double free or corruption (top): 0x09d30008 ***\n"
4311 "======= Backtrace: =========\n"
4312 "/lib/libc.so.6(+0x6c501)[0x523501]\n"
4313 "/lib/libc.so.6(+0x6dd70)[0x524d70]\n"
4314 "/lib/libc.so.6(cfree+0x6d)[0x527e5d]\n"
4315 "\\&./a.out[0x80485db]\n"
4316 "/lib/libc.so.6(__libc_start_main+0xe7)[0x4cdce7]\n"
4317 "\\&./a.out[0x8048471]\n"
4318 "======= Memory map: ========\n"
4319 "001e4000-001fe000 r-xp 00000000 08:06 1083555    /lib/libgcc_s.so.1\n"
4320 "001fe000-001ff000 r--p 00019000 08:06 1083555    /lib/libgcc_s.so.1\n"
4321 "[some lines omitted]\n"
4322 "b7814000-b7817000 rw-p 00000000 00:00 0\n"
4323 "bff53000-bff74000 rw-p 00000000 00:00 0          [stack]\n"
4324 "Aborted (core dumped)\n"
4325 msgstr ""
4326 "$ B<./a.out>\n"
4327 "main(): returned from first free() call\n"
4328 "*** glibc detected *** ./a.out: double free or corruption (top): 0x09d30008 ***\n"
4329 "======= Backtrace: =========\n"
4330 "/lib/libc.so.6(+0x6c501)[0x523501]\n"
4331 "/lib/libc.so.6(+0x6dd70)[0x524d70]\n"
4332 "/lib/libc.so.6(cfree+0x6d)[0x527e5d]\n"
4333 "\\&./a.out[0x80485db]\n"
4334 "/lib/libc.so.6(__libc_start_main+0xe7)[0x4cdce7]\n"
4335 "\\&./a.out[0x8048471]\n"
4336 "======= Memory map: ========\n"
4337 "001e4000-001fe000 r-xp 00000000 08:06 1083555    /lib/libgcc_s.so.1\n"
4338 "001fe000-001ff000 r--p 00019000 08:06 1083555    /lib/libgcc_s.so.1\n"
4339 "[some lines omitted]\n"
4340 "b7814000-b7817000 rw-p 00000000 00:00 0\n"
4341 "bff53000-bff74000 rw-p 00000000 00:00 0          [stack]\n"
4342 "Aborted (core dumped)\n"
4343
4344 #. type: Plain text
4345 #: build/C/man3/mallopt.3:492
4346 msgid ""
4347 "The following runs show the results when employing other values for "
4348 "B<M_CHECK_ACTION>:"
4349 msgstr ""
4350
4351 #. type: Plain text
4352 #: build/C/man3/mallopt.3:505
4353 #, no-wrap
4354 msgid ""
4355 "$ B<./a.out 1>             # Diagnose error and continue\n"
4356 "main(): returned from first free() call\n"
4357 "*** glibc detected *** ./a.out: double free or corruption (top): 0x09cbe008 ***\n"
4358 "main(): returned from second free() call\n"
4359 "$ B<./a.out 2>             # Abort without error message\n"
4360 "main(): returned from first free() call\n"
4361 "Aborted (core dumped)\n"
4362 "$ B<./a.out 0>             # Ignore error and continue\n"
4363 "main(): returned from first free() call\n"
4364 "main(): returned from second free() call\n"
4365 msgstr ""
4366 "$ B<./a.out 1>             # Diagnose error and continue\n"
4367 "main(): returned from first free() call\n"
4368 "*** glibc detected *** ./a.out: double free or corruption (top): 0x09cbe008 ***\n"
4369 "main(): returned from second free() call\n"
4370 "$ B<./a.out 2>             # Abort without error message\n"
4371 "main(): returned from first free() call\n"
4372 "Aborted (core dumped)\n"
4373 "$ B<./a.out 0>             # Ignore error and continue\n"
4374 "main(): returned from first free() call\n"
4375 "main(): returned from second free() call\n"
4376
4377 #. type: Plain text
4378 #: build/C/man3/mallopt.3:511
4379 msgid ""
4380 "The next run shows how to set the same parameter using the B<MALLOC_CHECK_> "
4381 "environment variable:"
4382 msgstr ""
4383
4384 #. type: Plain text
4385 #: build/C/man3/mallopt.3:518
4386 #, no-wrap
4387 msgid ""
4388 "$ B<MALLOC_CHECK_=1 ./a.out>\n"
4389 "main(): returned from first free() call\n"
4390 "*** glibc detected *** ./a.out: free(): invalid pointer: 0x092c2008 ***\n"
4391 "main(): returned from second free() call\n"
4392 msgstr ""
4393 "$ B<MALLOC_CHECK_=1 ./a.out>\n"
4394 "main(): returned from first free() call\n"
4395 "*** glibc detected *** ./a.out: free(): invalid pointer: 0x092c2008 ***\n"
4396 "main(): returned from second free() call\n"
4397
4398 #. type: Plain text
4399 #: build/C/man3/mallopt.3:526
4400 #, no-wrap
4401 msgid ""
4402 "#include E<lt>malloc.hE<gt>\n"
4403 "#include E<lt>stdio.hE<gt>\n"
4404 "#include E<lt>stdlib.hE<gt>\n"
4405 msgstr ""
4406 "#include E<lt>malloc.hE<gt>\n"
4407 "#include E<lt>stdio.hE<gt>\n"
4408 "#include E<lt>stdlib.hE<gt>\n"
4409
4410 #. type: Plain text
4411 #: build/C/man3/mallopt.3:531 build/C/man3/mcheck.3:187
4412 #, no-wrap
4413 msgid ""
4414 "int\n"
4415 "main(int argc, char *argv[])\n"
4416 "{\n"
4417 "    char *p;\n"
4418 msgstr ""
4419 "int\n"
4420 "main(int argc, char *argv[])\n"
4421 "{\n"
4422 "    char *p;\n"
4423
4424 #. type: Plain text
4425 #: build/C/man3/mallopt.3:538
4426 #, no-wrap
4427 msgid ""
4428 "    if (argc E<gt> 1) {\n"
4429 "        if (mallopt(M_CHECK_ACTION, atoi(argv[1])) != 1) {\n"
4430 "            fprintf(stderr, \"mallopt() failed\");\n"
4431 "            exit(EXIT_FAILURE);\n"
4432 "        }\n"
4433 "    }\n"
4434 msgstr ""
4435 "    if (argc E<gt> 1) {\n"
4436 "        if (mallopt(M_CHECK_ACTION, atoi(argv[1])) != 1) {\n"
4437 "            fprintf(stderr, \"mallopt() failed\");\n"
4438 "            exit(EXIT_FAILURE);\n"
4439 "        }\n"
4440 "    }\n"
4441
4442 #. type: Plain text
4443 #: build/C/man3/mallopt.3:544
4444 #, no-wrap
4445 msgid ""
4446 "    p = malloc(1000);\n"
4447 "    if (p == NULL) {\n"
4448 "        fprintf(stderr, \"malloc() failed\");\n"
4449 "        exit(EXIT_FAILURE);\n"
4450 "    }\n"
4451 msgstr ""
4452 "    p = malloc(1000);\n"
4453 "    if (p == NULL) {\n"
4454 "        fprintf(stderr, \"malloc() failed\");\n"
4455 "        exit(EXIT_FAILURE);\n"
4456 "    }\n"
4457
4458 #. type: Plain text
4459 #: build/C/man3/mallopt.3:547
4460 #, no-wrap
4461 msgid ""
4462 "    free(p);\n"
4463 "    printf(\"main(): returned from first free() call\\en\");\n"
4464 msgstr ""
4465 "    free(p);\n"
4466 "    printf(\"main(): returned from first free() call\\en\");\n"
4467
4468 #. type: Plain text
4469 #: build/C/man3/mallopt.3:550
4470 #, no-wrap
4471 msgid ""
4472 "    free(p);\n"
4473 "    printf(\"main(): returned from second free() call\\en\");\n"
4474 msgstr ""
4475 "    free(p);\n"
4476 "    printf(\"main(): returned from second free() call\\en\");\n"
4477
4478 #. type: Plain text
4479 #: build/C/man3/mallopt.3:568
4480 msgid ""
4481 "B<mmap>(2), B<sbrk>(2), B<mallinfo>(3), B<malloc>(3), B<malloc_hook>(3), "
4482 "B<malloc_info>(3), B<malloc_stats>(3), B<malloc_trim>(3), B<mcheck>(3), "
4483 "B<mtrace>(3), B<posix_memalign>(3)"
4484 msgstr ""
4485 "B<mmap>(2), B<sbrk>(2), B<mallinfo>(3), B<malloc>(3), B<malloc_hook>(3), "
4486 "B<malloc_info>(3), B<malloc_stats>(3), B<malloc_trim>(3), B<mcheck>(3), "
4487 "B<mtrace>(3), B<posix_memalign>(3)"
4488
4489 #. type: TH
4490 #: build/C/man3/mcheck.3:25
4491 #, no-wrap
4492 msgid "MCHECK"
4493 msgstr "MCHECK"
4494
4495 #. type: TH
4496 #: build/C/man3/mcheck.3:25
4497 #, no-wrap
4498 msgid "2014-01-11"
4499 msgstr "2014-01-11"
4500
4501 #. type: Plain text
4502 #: build/C/man3/mcheck.3:28
4503 msgid ""
4504 "mcheck, mcheck_check_all, mcheck_pedantic, mprobe - heap consistency checking"
4505 msgstr ""
4506
4507 #. type: Plain text
4508 #: build/C/man3/mcheck.3:31
4509 #, no-wrap
4510 msgid "B<#include E<lt>mcheck.hE<gt>>\n"
4511 msgstr "B<#include E<lt>mcheck.hE<gt>>\n"
4512
4513 #. type: Plain text
4514 #: build/C/man3/mcheck.3:33
4515 #, no-wrap
4516 msgid "B<int mcheck(void (*>I<abortfunc>B<)(enum mcheck_status >I<mstatus>B<));>\n"
4517 msgstr ""
4518
4519 #. type: Plain text
4520 #: build/C/man3/mcheck.3:35
4521 #, no-wrap
4522 msgid "B<int mcheck_pedantic(void (*>I<abortfunc>B<)(enum mcheck_status >I<mstatus>B<));>\n"
4523 msgstr ""
4524
4525 #. type: Plain text
4526 #: build/C/man3/mcheck.3:37
4527 #, no-wrap
4528 msgid "B<void mcheck_check_all(void);>\n"
4529 msgstr "B<void mcheck_check_all(void);>\n"
4530
4531 #. type: Plain text
4532 #: build/C/man3/mcheck.3:39
4533 #, no-wrap
4534 msgid "B<enum mcheck_status mprobe(void *>I<ptr>B<);>\n"
4535 msgstr "B<enum mcheck_status mprobe(void *>I<ptr>B<);>\n"
4536
4537 #. type: Plain text
4538 #: build/C/man3/mcheck.3:51
4539 msgid ""
4540 "The B<mcheck>()  function installs a set of debugging hooks for the "
4541 "B<malloc>(3)  family of memory-allocation functions.  These hooks cause "
4542 "certain consistency checks to be performed on the state of the heap.  The "
4543 "checks can detect application errors such as freeing a block of memory more "
4544 "than once or corrupting the bookkeeping data structures that immediately "
4545 "precede a block of allocated memory."
4546 msgstr ""
4547
4548 #. type: Plain text
4549 #: build/C/man3/mcheck.3:63
4550 msgid ""
4551 "To be effective, the B<mcheck>()  function must be called before the first "
4552 "call to B<malloc>(3)  or a related function.  In cases where this is "
4553 "difficult to ensure, linking the program with I<-lmcheck> inserts an "
4554 "implicit call to B<mcheck>()  (with a NULL argument)  before the first call "
4555 "to a memory-allocation function."
4556 msgstr ""
4557
4558 #. type: Plain text
4559 #: build/C/man3/mcheck.3:71
4560 msgid ""
4561 "The B<mcheck_pedantic>()  function is similar to B<mcheck>(), but performs "
4562 "checks on all allocated blocks whenever one of the memory-allocation "
4563 "functions is called.  This can be very slow!"
4564 msgstr ""
4565
4566 #. type: Plain text
4567 #: build/C/man3/mcheck.3:78
4568 msgid ""
4569 "The B<mcheck_check_all>()  function causes an immediate check on all "
4570 "allocated blocks.  This call is effective only if B<mcheck>()  is called "
4571 "beforehand."
4572 msgstr ""
4573
4574 #. type: Plain text
4575 #: build/C/man3/mcheck.3:91
4576 msgid ""
4577 "If the system detects an inconsistency in the heap, the caller-supplied "
4578 "function pointed to by I<abortfunc> is invoked with a single argument "
4579 "argument, I<mstatus>, that indicates what type of inconsistency was "
4580 "detected.  If I<abortfunc> is NULL, a default function prints an error "
4581 "message on I<stderr> and calls B<abort>(3)."
4582 msgstr ""
4583
4584 #. type: Plain text
4585 #: build/C/man3/mcheck.3:103
4586 msgid ""
4587 "The B<mprobe>()  function performs a consistency check on the block of "
4588 "allocated memory pointed to by I<ptr>.  The B<mcheck>()  function should be "
4589 "called beforehand (otherwise B<mprobe>()  returns B<MCHECK_DISABLED>)."
4590 msgstr ""
4591
4592 #. type: Plain text
4593 #: build/C/man3/mcheck.3:111
4594 msgid ""
4595 "The following list describes the values returned by B<mprobe>()  or passed "
4596 "as the I<mstatus> argument when I<abortfunc> is invoked:"
4597 msgstr ""
4598
4599 #. type: TP
4600 #: build/C/man3/mcheck.3:111
4601 #, no-wrap
4602 msgid "B<MCHECK_DISABLED> (B<mprobe>() only)"
4603 msgstr ""
4604
4605 #. type: Plain text
4606 #: build/C/man3/mcheck.3:116
4607 msgid ""
4608 "B<mcheck>()  was not called before the first memory allocation function was "
4609 "called.  Consistency checking is not possible."
4610 msgstr ""
4611
4612 #. type: TP
4613 #: build/C/man3/mcheck.3:116
4614 #, no-wrap
4615 msgid "B<MCHECK_OK> (B<mprobe>() only)"
4616 msgstr ""
4617
4618 #. type: Plain text
4619 #: build/C/man3/mcheck.3:119
4620 msgid "No inconsistency detected."
4621 msgstr ""
4622
4623 #. type: TP
4624 #: build/C/man3/mcheck.3:119
4625 #, no-wrap
4626 msgid "B<MCHECK_HEAD>"
4627 msgstr "B<MCHECK_HEAD>"
4628
4629 #. type: Plain text
4630 #: build/C/man3/mcheck.3:122
4631 msgid "Memory preceding an allocated block was clobbered."
4632 msgstr ""
4633
4634 #. type: TP
4635 #: build/C/man3/mcheck.3:122
4636 #, no-wrap
4637 msgid "B<MCHECK_TAIL>"
4638 msgstr "B<MCHECK_TAIL>"
4639
4640 #. type: Plain text
4641 #: build/C/man3/mcheck.3:125
4642 msgid "Memory following an allocated block was clobbered."
4643 msgstr ""
4644
4645 #. type: TP
4646 #: build/C/man3/mcheck.3:125
4647 #, no-wrap
4648 msgid "B<MCHECK_FREE>"
4649 msgstr "B<MCHECK_FREE>"
4650
4651 #. type: Plain text
4652 #: build/C/man3/mcheck.3:129
4653 msgid "A block of memory was freed twice."
4654 msgstr ""
4655
4656 #. type: Plain text
4657 #: build/C/man3/mcheck.3:134
4658 msgid ""
4659 "B<mcheck>()  and B<mcheck_pedantic>()  return 0 on success, or -1 on error."
4660 msgstr ""
4661
4662 #. type: Plain text
4663 #: build/C/man3/mcheck.3:145
4664 msgid ""
4665 "The B<mcheck_pedantic>()  and B<mcheck_check_all>()  functions are available "
4666 "since glibc 2.2.  The B<mcheck>()  and B<mprobe>()  functions are present "
4667 "since at least glibc 2.0"
4668 msgstr ""
4669
4670 #.  But is MALLOC_CHECK_ slower?
4671 #. type: Plain text
4672 #: build/C/man3/mcheck.3:159
4673 msgid ""
4674 "Linking a program with I<-lmcheck> and using the B<MALLOC_CHECK_> "
4675 "environment variable (described in B<mallopt>(3))  cause the same kinds of "
4676 "errors to be detected.  But, using B<MALLOC_CHECK_> does not require the "
4677 "application to be relinked."
4678 msgstr ""
4679
4680 #. type: Plain text
4681 #: build/C/man3/mcheck.3:165
4682 msgid ""
4683 "The program below calls B<mcheck>()  with a NULL argument and then frees the "
4684 "same block of memory twice.  The following shell session demonstrates what "
4685 "happens when running the program:"
4686 msgstr ""
4687
4688 #. type: Plain text
4689 #: build/C/man3/mcheck.3:170
4690 #, no-wrap
4691 msgid ""
4692 "$B< ./a.out>\n"
4693 "About to free\n"
4694 msgstr ""
4695
4696 #. type: Plain text
4697 #: build/C/man3/mcheck.3:174
4698 #, no-wrap
4699 msgid ""
4700 "About to free a second time\n"
4701 "block freed twice\n"
4702 "Aborted (core dumped)\n"
4703 msgstr ""
4704
4705 #. type: Plain text
4706 #: build/C/man3/mcheck.3:182
4707 #, no-wrap
4708 msgid ""
4709 "#include E<lt>stdlib.hE<gt>\n"
4710 "#include E<lt>stdio.hE<gt>\n"
4711 "#include E<lt>mcheck.hE<gt>\n"
4712 msgstr ""
4713 "#include E<lt>stdlib.hE<gt>\n"
4714 "#include E<lt>stdio.hE<gt>\n"
4715 "#include E<lt>mcheck.hE<gt>\n"
4716
4717 #. type: Plain text
4718 #: build/C/man3/mcheck.3:190
4719 #, no-wrap
4720 msgid ""
4721 "    if (mcheck(NULL) != 0) {\n"
4722 "        fprintf(stderr, \"mcheck() failed\\en\");\n"
4723 msgstr ""
4724
4725 #. type: Plain text
4726 #: build/C/man3/mcheck.3:193
4727 #, no-wrap
4728 msgid ""
4729 "        exit(EXIT_FAILURE);\n"
4730 "    }\n"
4731 msgstr ""
4732 "        exit(EXIT_FAILURE);\n"
4733 "    }\n"
4734
4735 #. type: Plain text
4736 #: build/C/man3/mcheck.3:195
4737 #, no-wrap
4738 msgid "    p = malloc(1000);\n"
4739 msgstr "    p = malloc(1000);\n"
4740
4741 #. type: Plain text
4742 #: build/C/man3/mcheck.3:200
4743 #, no-wrap
4744 msgid ""
4745 "    fprintf(stderr, \"About to free\\en\");\n"
4746 "    free(p);\n"
4747 "    fprintf(stderr, \"\\enAbout to free a second time\\en\");\n"
4748 "    free(p);\n"
4749 msgstr ""
4750
4751 #. type: Plain text
4752 #: build/C/man3/mcheck.3:208
4753 msgid "B<malloc>(3), B<mallopt>(3), B<mtrace>(3)"
4754 msgstr "B<malloc>(3), B<mallopt>(3), B<mtrace>(3)"
4755
4756 #. type: TH
4757 #: build/C/man2/mlock.2:26
4758 #, no-wrap
4759 msgid "MLOCK"
4760 msgstr "MLOCK"
4761
4762 #. type: TH
4763 #: build/C/man2/mlock.2:26
4764 #, no-wrap
4765 msgid "2014-04-14"
4766 msgstr "2014-04-14"
4767
4768 #. type: Plain text
4769 #: build/C/man2/mlock.2:29
4770 msgid "mlock, munlock, mlockall, munlockall - lock and unlock memory"
4771 msgstr "mlock - メモリのロックとロック解除を行う"
4772
4773 #. type: Plain text
4774 #: build/C/man2/mlock.2:32 build/C/man2/mmap.2:46 build/C/man2/mmap2.2:35
4775 #: build/C/man2/mprotect.2:45 build/C/man2/mremap.2:38
4776 #, no-wrap
4777 msgid "B<#include E<lt>sys/mman.hE<gt>>\n"
4778 msgstr "B<#include E<lt>sys/mman.hE<gt>>\n"
4779
4780 #. type: Plain text
4781 #: build/C/man2/mlock.2:35
4782 #, no-wrap
4783 msgid ""
4784 "B<int mlock(const void *>I<addr>B<, size_t >I<len>B<);>\n"
4785 "B<int munlock(const void *>I<addr>B<, size_t >I<len>B<);>\n"
4786 msgstr ""
4787 "B<int mlock(const void *>I<addr>B<, size_t >I<len>B<);>\n"
4788 "B<int munlock(const void *>I<addr>B<, size_t >I<len>B<);>\n"
4789
4790 #. type: Plain text
4791 #: build/C/man2/mlock.2:38
4792 #, no-wrap
4793 msgid ""
4794 "B<int mlockall(int >I<flags>B<);>\n"
4795 "B<int munlockall(void);>\n"
4796 msgstr ""
4797 "B<int mlockall(int >I<flags>B<);>\n"
4798 "B<int munlockall(void);>\n"
4799
4800 #. type: Plain text
4801 #: build/C/man2/mlock.2:54
4802 msgid ""
4803 "B<mlock>()  and B<mlockall>()  respectively lock part or all of the calling "
4804 "process's virtual address space into RAM, preventing that memory from being "
4805 "paged to the swap area.  B<munlock>()  and B<munlockall>()  perform the "
4806 "converse operation, respectively unlocking part or all of the calling "
4807 "process's virtual address space, so that pages in the specified virtual "
4808 "address range may once more to be swapped out if required by the kernel "
4809 "memory manager.  Memory locking and unlocking are performed in units of "
4810 "whole pages."
4811 msgstr ""
4812 "B<mlock>()  と B<mlockall>()  はそれぞれ、呼び出し元プロセスの仮想アドレス空"
4813 "間の一部または全部を RAM 上にロックし、メモリがスワップエリアにページングされ"
4814 "るのを防ぐ。 B<munlock>()  と B<munlockall>()  は逆の操作で、それぞれ呼び出し"
4815 "元プロセスの仮想アドレス空間の一部または全部を ロック解除する。つまり、指定さ"
4816 "れた仮想アドレス範囲のページは カーネルメモリマネージャーから要求されればス"
4817 "ワップアウトするようになる。 メモリのロックとロック解除はページ単位で行われ"
4818 "る。"
4819
4820 #. type: SS
4821 #: build/C/man2/mlock.2:54
4822 #, no-wrap
4823 msgid "mlock() and munlock()"
4824 msgstr "mlock() と munlock()"
4825
4826 #. type: Plain text
4827 #: build/C/man2/mlock.2:64
4828 msgid ""
4829 "B<mlock>()  locks pages in the address range starting at I<addr> and "
4830 "continuing for I<len> bytes.  All pages that contain a part of the specified "
4831 "address range are guaranteed to be resident in RAM when the call returns "
4832 "successfully; the pages are guaranteed to stay in RAM until later unlocked."
4833 msgstr ""
4834 "B<mlock>()  は I<addr> から始まる長さ I<len> バイトのアドレス範囲のページを"
4835 "ロックする。 呼び出しが成功した場合には、 指定されたアドレス範囲を含む全ての"
4836 "ページは RAM に残り続けることが保証される。 これらのページは後でロック解除さ"
4837 "れるまで RAM に残り続けることが保証される。"
4838
4839 #. type: Plain text
4840 #: build/C/man2/mlock.2:73
4841 msgid ""
4842 "B<munlock>()  unlocks pages in the address range starting at I<addr> and "
4843 "continuing for I<len> bytes.  After this call, all pages that contain a part "
4844 "of the specified memory range can be moved to external swap space again by "
4845 "the kernel."
4846 msgstr ""
4847 "B<munlock>()  は、 I<addr> から始まる長さ I<len> バイトのアドレス範囲のページ"
4848 "のロックを解除する。 この呼び出しを行った後は、カーネルが、指定されたメモリ範"
4849 "囲を含む 全てのページを外部のスワップ空間に移動できるようになる。"
4850
4851 #. type: SS
4852 #: build/C/man2/mlock.2:73
4853 #, no-wrap
4854 msgid "mlockall() and munlockall()"
4855 msgstr "mlockall() と munlockall()"
4856
4857 #. type: Plain text
4858 #: build/C/man2/mlock.2:83
4859 msgid ""
4860 "B<mlockall>()  locks all pages mapped into the address space of the calling "
4861 "process.  This includes the pages of the code, data and stack segment, as "
4862 "well as shared libraries, user space kernel data, shared memory, and memory-"
4863 "mapped files.  All mapped pages are guaranteed to be resident in RAM when "
4864 "the call returns successfully; the pages are guaranteed to stay in RAM until "
4865 "later unlocked."
4866 msgstr ""
4867 "B<mlockall>()  は呼び出し元プロセスのアドレス空間にマップされている全てのペー"
4868 "ジを ロックする。これにはコード、データ、スタックの 各セグメント、共有ライブ"
4869 "ラリ、カーネルのユーザー空間データ、 共有メモリ、メモリ・マップされたファイル"
4870 "が含まれる。 システム・コールが成功した場合には全てのマップされたページは "
4871 "RAM に 残ることを保証される。 これらのページは後でロック解除されるまで RAM に"
4872 "残り続けることが保証される。"
4873
4874 #. type: Plain text
4875 #: build/C/man2/mlock.2:88
4876 msgid ""
4877 "The I<flags> argument is constructed as the bitwise OR of one or more of the "
4878 "following constants:"
4879 msgstr "I<flags> 引数は以下の内容の一つまたは複数のビット OR から構成される:"
4880
4881 #. type: TP
4882 #: build/C/man2/mlock.2:88
4883 #, no-wrap
4884 msgid "B<MCL_CURRENT>"
4885 msgstr "B<MCL_CURRENT>"
4886
4887 #. type: Plain text
4888 #: build/C/man2/mlock.2:92
4889 msgid ""
4890 "Lock all pages which are currently mapped into the address space of the "
4891 "process."
4892 msgstr ""
4893 "現在、プロセスのアドレス空間にマップされている全てのページをロックする。"
4894
4895 #. type: TP
4896 #: build/C/man2/mlock.2:92
4897 #, no-wrap
4898 msgid "B<MCL_FUTURE>"
4899 msgstr "B<MCL_FUTURE>"
4900
4901 #. type: Plain text
4902 #: build/C/man2/mlock.2:99
4903 msgid ""
4904 "Lock all pages which will become mapped into the address space of the "
4905 "process in the future.  These could be for instance new pages required by a "
4906 "growing heap and stack as well as new memory-mapped files or shared memory "
4907 "regions."
4908 msgstr ""
4909 "将来、プロセスのアドレス空間にマップされる全てのページをロックする。 例えば、"
4910 "ヒープ (heap) やスタックの成長により新しく必要になったページだけで なく、新し"
4911 "くメモリマップされたファイルや共有メモリ領域もロックされる。"
4912
4913 #. type: Plain text
4914 #: build/C/man2/mlock.2:112
4915 msgid ""
4916 "If B<MCL_FUTURE> has been specified, then a later system call (e.g., "
4917 "B<mmap>(2), B<sbrk>(2), B<malloc>(3)), may fail if it would cause the number "
4918 "of locked bytes to exceed the permitted maximum (see below).  In the same "
4919 "circumstances, stack growth may likewise fail: the kernel will deny stack "
4920 "expansion and deliver a B<SIGSEGV> signal to the process."
4921 msgstr ""
4922 "B<MCL_FUTURE> が指定されていると、以後のシステムコール (例えば、 B<mmap>(2), "
4923 "B<sbrk>(2), B<malloc>(3))  は、ロックするバイト数が許可された最大値 (下記参"
4924 "照) を超えた場合に 失敗する可能性がある。 同様に、スタックの成長も失敗する可"
4925 "能性がある。 その場合、カーネルはスタックの拡張を拒否し、 B<SIGSEGV> をプロセ"
4926 "スに送る。"
4927
4928 #. type: Plain text
4929 #: build/C/man2/mlock.2:116
4930 msgid ""
4931 "B<munlockall>()  unlocks all pages mapped into the address space of the "
4932 "calling process."
4933 msgstr ""
4934 "B<munlockall>()  は、呼び出し元プロセスのアドレス空間にマッピングされている "
4935 "全てのページをロック解除する。"
4936
4937 #. type: Plain text
4938 #: build/C/man2/mlock.2:122
4939 msgid ""
4940 "On success these system calls return 0.  On error, -1 is returned, I<errno> "
4941 "is set appropriately, and no changes are made to any locks in the address "
4942 "space of the process."
4943 msgstr ""
4944 "成功した場合は、これらのシステムコールはゼロを返す。 エラーの場合は -1 が返さ"
4945 "れ、 I<errno> が適切に設定され、プロセスのアドレス空間におけるロックは変更さ"
4946 "れない。"
4947
4948 #. type: Plain text
4949 #: build/C/man2/mlock.2:131
4950 msgid ""
4951 "(Linux 2.6.9 and later) the caller had a nonzero B<RLIMIT_MEMLOCK> soft "
4952 "resource limit, but tried to lock more memory than the limit permitted.  "
4953 "This limit is not enforced if the process is privileged (B<CAP_IPC_LOCK>)."
4954 msgstr ""
4955 "(Linux 2.6.9 以降) 呼び出し元は非ゼロの ソフト資源制限 B<RLIMIT_MEMLOCK> を持"
4956 "つが、制限が許可している以上のメモリをロックしようとした。 この制限は、プロセ"
4957 "スが特権 (B<CAP_IPC_LOCK>)  を持っている場合は適用されない。"
4958
4959 #.  In the case of mlock(), this check is somewhat buggy: it doesn't
4960 #.  take into account whether the to-be-locked range overlaps with
4961 #.  already locked pages.  Thus, suppose we allocate
4962 #.  (num_physpages / 4 + 1) of memory, and lock those pages once using
4963 #.  mlock(), and then lock the *same* page range a second time.
4964 #.  In the case, the second mlock() call will fail, since the check
4965 #.  calculates that the process is trying to lock (num_physpages / 2 + 2)
4966 #.  pages, which of course is not true.  (MTK, Nov 04, kernel 2.4.28)
4967 #. type: Plain text
4968 #: build/C/man2/mlock.2:143
4969 msgid ""
4970 "(Linux 2.4 and earlier) the calling process tried to lock more than half of "
4971 "RAM."
4972 msgstr ""
4973 "(Linux 2.4 以前) 呼び出し元プロセスが RAM の半分以上をロックしようとした。"
4974
4975 #. SVr4 documents an additional EAGAIN error code.
4976 #. type: Plain text
4977 #: build/C/man2/mlock.2:149
4978 msgid ""
4979 "The caller is not privileged, but needs privilege (B<CAP_IPC_LOCK>)  to "
4980 "perform the requested operation."
4981 msgstr ""
4982 "呼び出し側が特権を持っていないが、\n"
4983 "要求された操作を実行するには特権 (B<CAP_IPC_LOCK>) が必要である。"
4984
4985 #. type: Plain text
4986 #: build/C/man2/mlock.2:154
4987 msgid "For B<mlock>()  and B<munlock>():"
4988 msgstr "B<mlock>()  と B<munlock>()  用として:"
4989
4990 #. type: Plain text
4991 #: build/C/man2/mlock.2:157
4992 msgid "Some or all of the specified address range could not be locked."
4993 msgstr "指定されたアドレス範囲の一部または全てをロックすることができなかった。"
4994
4995 #. type: Plain text
4996 #: build/C/man2/mlock.2:164
4997 msgid ""
4998 "The result of the addition I<start>+I<len> was less than I<start> (e.g., the "
4999 "addition may have resulted in an overflow)."
5000 msgstr ""
5001 "I<start>+I<len> の加算の結果が I<start> よりも小さかった\n"
5002 "(例えば、加算でオーバーフローが発生したなど)。"
5003
5004 #. type: Plain text
5005 #: build/C/man2/mlock.2:169
5006 msgid "(Not on Linux)  I<addr> was not a multiple of the page size."
5007 msgstr ""
5008 "(Linux ではこの意味で使われない)  I<addr> がページサイズの倍数ではない。"
5009
5010 #. type: Plain text
5011 #: build/C/man2/mlock.2:173
5012 msgid ""
5013 "Some of the specified address range does not correspond to mapped pages in "
5014 "the address space of the process."
5015 msgstr ""
5016 "指定されたアドレス範囲がプロセスのアドレス空間にマップされたページと 一致しな"
5017 "い。"
5018
5019 #. type: Plain text
5020 #: build/C/man2/mlock.2:176
5021 msgid "For B<mlockall>():"
5022 msgstr "B<mlockall>()  用として:"
5023
5024 #. type: Plain text
5025 #: build/C/man2/mlock.2:179
5026 msgid "Unknown I<flags> were specified."
5027 msgstr "未知の I<flags> が指定された。"
5028
5029 #. type: Plain text
5030 #: build/C/man2/mlock.2:182
5031 msgid "For B<munlockall>():"
5032 msgstr "B<munlockall>()  用として:"
5033
5034 #. type: Plain text
5035 #: build/C/man2/mlock.2:186
5036 msgid ""
5037 "(Linux 2.6.8 and earlier) The caller was not privileged (B<CAP_IPC_LOCK>)."
5038 msgstr ""
5039 "(Linux 2.6.8 以前) 呼び出し元が権限 (B<CAP_IPC_LOCK>)  を持っていない。"
5040
5041 #. type: Plain text
5042 #: build/C/man2/mlock.2:188
5043 msgid "POSIX.1-2001, SVr4."
5044 msgstr "POSIX.1-2001, SVr4."
5045
5046 #. type: SH
5047 #: build/C/man2/mlock.2:188 build/C/man2/mmap.2:499 build/C/man2/msync.2:105
5048 #, no-wrap
5049 msgid "AVAILABILITY"
5050 msgstr "可用性"
5051
5052 #. type: Plain text
5053 #: build/C/man2/mlock.2:200
5054 msgid ""
5055 "On POSIX systems on which B<mlock>()  and B<munlock>()  are available, "
5056 "B<_POSIX_MEMLOCK_RANGE> is defined in I<E<lt>unistd.hE<gt>> and the number "
5057 "of bytes in a page can be determined from the constant B<PAGESIZE> (if "
5058 "defined) in I<E<lt>limits.hE<gt>> or by calling I<sysconf(_SC_PAGESIZE)>."
5059 msgstr ""
5060 "B<mlock>()  と B<munlock>()  が使用可能な POSIX システムでは "
5061 "B<_POSIX_MEMLOCK_RANGE> が I<E<lt>unistd.hE<gt>> で定義されている。 また、"
5062 "ページあたりのバイト数は、 I<E<lt>limits.hE<gt>> で定義される定数 "
5063 "B<PAGESIZE> から (定義されている場合)、もしくは I<sysconf(_SC_PAGESIZE)> を呼"
5064 "び出すことで決定できる。"
5065
5066 #.  POSIX.1-2001: It shall be defined to -1 or 0 or 200112L.
5067 #.  -1: unavailable, 0: ask using sysconf().
5068 #.  glibc defines it to 1.
5069 #. type: Plain text
5070 #: build/C/man2/mlock.2:213
5071 msgid ""
5072 "On POSIX systems on which B<mlockall>()  and B<munlockall>()  are available, "
5073 "B<_POSIX_MEMLOCK> is defined in I<E<lt>unistd.hE<gt>> to a value greater "
5074 "than 0.  (See also B<sysconf>(3).)"
5075 msgstr ""
5076 "B<mlockall>()  と B<munlockall>()  が利用可能な POSIX システムでは、 "
5077 "B<_POSIX_MEMLOCK> は I<E<lt>unistd.hE<gt>> で 0 より大きい値に定義されている "
5078 "(B<sysconf>(3)  も参照のこと)。"
5079
5080 #. type: Plain text
5081 #: build/C/man2/mlock.2:231
5082 msgid ""
5083 "Memory locking has two main applications: real-time algorithms and high-"
5084 "security data processing.  Real-time applications require deterministic "
5085 "timing, and, like scheduling, paging is one major cause of unexpected "
5086 "program execution delays.  Real-time applications will usually also switch "
5087 "to a real-time scheduler with B<sched_setscheduler>(2).  Cryptographic "
5088 "security software often handles critical bytes like passwords or secret keys "
5089 "as data structures.  As a result of paging, these secrets could be "
5090 "transferred onto a persistent swap store medium, where they might be "
5091 "accessible to the enemy long after the security software has erased the "
5092 "secrets in RAM and terminated.  (But be aware that the suspend mode on "
5093 "laptops and some desktop computers will save a copy of the system's RAM to "
5094 "disk, regardless of memory locks.)"
5095 msgstr ""
5096 "メモリのロックの用途としては主に二つある: リアルタイム アルゴリズムと高いセ"
5097 "キュリティの必要なデータ処理である。リアルタイムの アプリケーションは決定的な"
5098 "タイミングやスケジューリングを必要とするが、 ページングは予期しないプログラム"
5099 "の実行遅延をもたらす主要な要因となる。 リアルタイムのアプリケーションはたいて"
5100 "いは B<sched_setscheduler>(2)  でリアルタイムスケジューラに変更される。 暗号"
5101 "やセキュリティのソフトウェアはしばしばパスワードや秘密鍵のデータの ような重要"
5102 "なバイト列を扱う。ページングの結果、これらの秘密が スワップ用の固定媒体に転送"
5103 "されるかもしれない。そして、セキュリティ・ ソフトウェアが RAM 上の秘密を削除"
5104 "して終了したずっと後になっても、 このスワップされたデータには敵がアクセスでき"
5105 "る可能性がある (しかし、ラップトップといくつかのデスクトップコンピュータの サ"
5106 "スペンドモードはシステムの RAM の内容をメモリのロックに関わらず ディスクに保"
5107 "存することに注意)。"
5108
5109 #. type: Plain text
5110 #: build/C/man2/mlock.2:244
5111 msgid ""
5112 "Real-time processes that are using B<mlockall>()  to prevent delays on page "
5113 "faults should reserve enough locked stack pages before entering the time-"
5114 "critical section, so that no page fault can be caused by function calls.  "
5115 "This can be achieved by calling a function that allocates a sufficiently "
5116 "large automatic variable (an array) and writes to the memory occupied by "
5117 "this array in order to touch these stack pages.  This way, enough pages will "
5118 "be mapped for the stack and can be locked into RAM.  The dummy writes ensure "
5119 "that not even copy-on-write page faults can occur in the critical section."
5120 msgstr ""
5121 "リアルタイムプロセスが B<mlockall>()  を使ってページフォールトによる遅延を防"
5122 "ごうとする場合、 関数呼び出しによってページフォールトが発生しないように、 時"
5123 "間制限の厳しい部分 (time-critical section) に入る前に 十分な量のロックされた"
5124 "スタックを確保しておく必要がある。 これを実現するには、十分な大きさの自動変"
5125 "数 (の配列) を確保し、 これらのスタック用のページがメモリ上に確保されるように"
5126 "この配列に 書き込みを行う関数を用意し、これを呼び出せばよい。こうすること"
5127 "で、 十分な量のページがスタックにマッピングされ、RAM にロックされる。 ダミー"
5128 "の書き込みを行うことによって、 時間制限の厳しい部分 (critical section) 内では"
5129 "書き込み時コピーによる ページフォールトさえも発生しないことが保証される。"
5130
5131 #. type: Plain text
5132 #: build/C/man2/mlock.2:257
5133 msgid ""
5134 "Memory locks are not inherited by a child created via B<fork>(2)  and are "
5135 "automatically removed (unlocked) during an B<execve>(2)  or when the process "
5136 "terminates.  The B<mlockall>()  B<MCL_FUTURE> setting is not inherited by a "
5137 "child created via B<fork>(2)  and is cleared during an B<execve>(2)."
5138 msgstr ""
5139 "メモリロックは B<fork>(2)  で作成された子プロセスには継承されず、 "
5140 "B<execve>(2)  が呼ばれたり、プロセスが終了した場合は 自動的に削除される (ロッ"
5141 "ク解除される)。 B<mlockall>() の B<MCL_FUTURE> 設定は B<fork>(2) で作成された"
5142 "子プロセスには継承されず、 B<execve>(2) の中でクリアされる。"
5143
5144 #. type: Plain text
5145 #: build/C/man2/mlock.2:261
5146 msgid ""
5147 "The memory lock on an address range is automatically removed if the address "
5148 "range is unmapped via B<munmap>(2)."
5149 msgstr ""
5150 "あるアドレス範囲に対するメモリロックは、そのアドレス範囲が B<munmap>(2)  に"
5151 "よってアンマップされた場合は削除される。"
5152
5153 #. type: Plain text
5154 #: build/C/man2/mlock.2:274
5155 msgid ""
5156 "Memory locks do not stack, that is, pages which have been locked several "
5157 "times by calls to B<mlock>()  or B<mlockall>()  will be unlocked by a single "
5158 "call to B<munlock>()  for the corresponding range or by B<munlockall>().  "
5159 "Pages which are mapped to several locations or by several processes stay "
5160 "locked into RAM as long as they are locked at least at one location or by at "
5161 "least one process."
5162 msgstr ""
5163 "メモリのロックは累積しない。 すなわち複数回 B<mlock>()  や B<mlockall>()  を"
5164 "呼び出してロックされたページでも、 対応する範囲に対して B<munlock>()  を 1 回"
5165 "呼び出したり B<munlockall>()  を呼び出したりするだけでロック解除される。 複数"
5166 "の場所や複数のプロセスにマップされているページは、少なくとも一つの場所、 一つ"
5167 "のプロセスでロックされている限りは RAM に残り続ける。"
5168
5169 #. type: Plain text
5170 #: build/C/man2/mlock.2:285
5171 msgid ""
5172 "Under Linux, B<mlock>()  and B<munlock>()  automatically round I<addr> down "
5173 "to the nearest page boundary.  However, POSIX.1-2001 allows an "
5174 "implementation to require that I<addr> is page aligned, so portable "
5175 "applications should ensure this."
5176 msgstr ""
5177 "Linux では、 B<mlock>()  と B<munlock>()  は自動的に I<addr> を端数切り捨てに"
5178 "より一番近いページ境界へと丸める。 しかし POSIX.1-2001 は I<addr> がページ境"
5179 "界に合っていることを要求する実装も許している。 そのため移植性を意図したアプリ"
5180 "ケーションではきちんと境界に合わせた方が良い。"
5181
5182 #. type: Plain text
5183 #: build/C/man2/mlock.2:298
5184 msgid ""
5185 "The I<VmLck> field of the Linux-specific I</proc/PID/status> file shows how "
5186 "many kilobytes of memory the process with ID I<PID> has locked using "
5187 "B<mlock>(), B<mlockall>(), and B<mmap>(2)  B<MAP_LOCKED>."
5188 msgstr ""
5189 "Linux 固有の I</proc/PID/status> ファイルの I<VmLck> フィールドには、\n"
5190 "B<mlock>(), B<mlockall>() および B<mmap>(2) B<MAP_LOCKED> を使って、\n"
5191 "ID が I<PID> のプロセスがロックしているメモリ量 (キロバイト単位) が\n"
5192 "表示される。"
5193
5194 #. type: SS
5195 #: build/C/man2/mlock.2:298
5196 #, no-wrap
5197 msgid "Limits and permissions"
5198 msgstr "制限と権限"
5199
5200 #. type: Plain text
5201 #: build/C/man2/mlock.2:305
5202 msgid ""
5203 "In Linux 2.6.8 and earlier, a process must be privileged (B<CAP_IPC_LOCK>)  "
5204 "in order to lock memory and the B<RLIMIT_MEMLOCK> soft resource limit "
5205 "defines a limit on how much memory the process may lock."
5206 msgstr ""
5207 "Linux 2.6.8 以前では、メモリをロックするためには特権 (B<CAP_IPC_LOCK>)  が必"
5208 "要で、 ソフト資源制限 B<RLIMIT_MEMLOCK> はプロセスがどれだけのメモリをロック"
5209 "できるかの制限を定義する。"
5210
5211 #. type: Plain text
5212 #: build/C/man2/mlock.2:311
5213 msgid ""
5214 "Since Linux 2.6.9, no limits are placed on the amount of memory that a "
5215 "privileged process can lock and the B<RLIMIT_MEMLOCK> soft resource limit "
5216 "instead defines a limit on how much memory an unprivileged process may lock."
5217 msgstr ""
5218 "Linux 2.6.9 以降では、特権を持つプロセスがロックできるメモリ量は無制限とな"
5219 "り、 代わりにソフト資源制限 B<RLIMIT_MEMLOCK> は特権を持たないプロセスがロッ"
5220 "クできるメモリ量の制限を定義する。"
5221
5222 #. type: Plain text
5223 #: build/C/man2/mlock.2:319
5224 msgid ""
5225 "In the 2.4 series Linux kernels up to and including 2.4.17, a bug caused the "
5226 "B<mlockall>()  B<MCL_FUTURE> flag to be inherited across a B<fork>(2).  This "
5227 "was rectified in kernel 2.4.18."
5228 msgstr ""
5229 "2.4.17 までの 2.4 シリーズの Linux カーネルには、 B<mlockall>()  "
5230 "B<MCL_FUTURE> フラグが B<fork>(2)  で継承されると言うバグがある。 これはカー"
5231 "ネル 2.4.18 で修正された。"
5232
5233 #.  See the following LKML thread:
5234 #.  http://marc.theaimsgroup.com/?l=linux-kernel&m=113801392825023&w=2
5235 #.  "Rationale for RLIMIT_MEMLOCK"
5236 #.  23 Jan 2006
5237 #. type: Plain text
5238 #: build/C/man2/mlock.2:336
5239 msgid ""
5240 "Since kernel 2.6.9, if a privileged process calls I<mlockall(MCL_FUTURE)> "
5241 "and later drops privileges (loses the B<CAP_IPC_LOCK> capability by, for "
5242 "example, setting its effective UID to a nonzero value), then subsequent "
5243 "memory allocations (e.g., B<mmap>(2), B<brk>(2))  will fail if the "
5244 "B<RLIMIT_MEMLOCK> resource limit is encountered."
5245 msgstr ""
5246 "カーネル 2.6.9 以降では、特権を持ったプロセスが I<mlockall(MCL_FUTURE)> を呼"
5247 "び出した後で、特権をなくした場合 (例えば、 実効 UID を 0 以外の値に変更するな"
5248 "どにより、 B<CAP_IPC_LOCK> ケーパビリティを失った場合)、リソース上限 "
5249 "B<RLIMIT_MEMLOCK> に達すると、それ以降のメモリ割り当て (例えば B<mmap>(2), "
5250 "B<brk>(2))  は失敗する。"
5251
5252 #. type: Plain text
5253 #: build/C/man2/mlock.2:343
5254 msgid ""
5255 "B<mmap>(2), B<setrlimit>(2), B<shmctl>(2), B<sysconf>(3), B<proc>(5), "
5256 "B<capabilities>(7)"
5257 msgstr ""
5258 "B<mmap>(2), B<setrlimit>(2), B<shmctl>(2), B<sysconf>(3), B<proc>(5),\n"
5259 "B<capabilities>(7)"
5260
5261 #. type: TH
5262 #: build/C/man2/mmap.2:40
5263 #, no-wrap
5264 msgid "MMAP"
5265 msgstr "MMAP"
5266
5267 #. type: TH
5268 #: build/C/man2/mmap.2:40 build/C/man2/sync_file_range.2:30
5269 #, fuzzy, no-wrap
5270 #| msgid "2014-01-11"
5271 msgid "2014-08-19"
5272 msgstr "2014-01-11"
5273
5274 #. type: Plain text
5275 #: build/C/man2/mmap.2:43
5276 msgid "mmap, munmap - map or unmap files or devices into memory"
5277 msgstr "mmap, munmap - ファイルやデバイスをメモリにマップ/アンマップする"
5278
5279 #. type: Plain text
5280 #: build/C/man2/mmap.2:51
5281 #, no-wrap
5282 msgid ""
5283 "B<void *mmap(void *>I<addr>B<, size_t >I<length>B<, int >I<prot>B<, int >I<flags>B<,>\n"
5284 "B<           int >I<fd>B<, off_t >I<offset>B<);>\n"
5285 "B<int munmap(void *>I<addr>B<, size_t >I<length>B<);>\n"
5286 msgstr ""
5287 "B<void *mmap(void *>I<addr>B<, size_t >I<length>B<, int >I<prot>B<, int >I<flags>B<,>\n"
5288 "B<           int >I<fd>B<, off_t >I<offset>B<);>\n"
5289 "B<int munmap(void *>I<addr>B<, size_t >I<length>B<);>\n"
5290
5291 #. type: Plain text
5292 #: build/C/man2/mmap.2:54
5293 msgid "See NOTES for information on feature test macro requirements."
5294 msgstr "機能検査マクロの要件に関する情報は「注意」の節を参照。"
5295
5296 #. type: Plain text
5297 #: build/C/man2/mmap.2:63
5298 msgid ""
5299 "B<mmap>()  creates a new mapping in the virtual address space of the calling "
5300 "process.  The starting address for the new mapping is specified in I<addr>.  "
5301 "The I<length> argument specifies the length of the mapping."
5302 msgstr ""
5303 "B<mmap>()  は、新しいマッピングを呼び出し元プロセスの仮想アドレス空間に作成す"
5304 "る。 新しいマッピングの開始アドレスは I<addr> で指定される。マッピングの長さ"
5305 "は I<length> 引き数で指定される。"
5306
5307 #.  Before Linux 2.6.24, the address was rounded up to the next page
5308 #.  boundary; since 2.6.24, it is rounded down!
5309 #. type: Plain text
5310 #: build/C/man2/mmap.2:77
5311 msgid ""
5312 "If I<addr> is NULL, then the kernel chooses the address at which to create "
5313 "the mapping; this is the most portable method of creating a new mapping.  If "
5314 "I<addr> is not NULL, then the kernel takes it as a hint about where to place "
5315 "the mapping; on Linux, the mapping will be created at a nearby page "
5316 "boundary.  The address of the new mapping is returned as the result of the "
5317 "call."
5318 msgstr ""
5319 "I<addr> が NULL の場合、カーネルがマッピングを作成するアドレスを選択する。 こ"
5320 "の方法は最も移植性のある新しいマッピングの作成方法である。 I<addr> が NULL で"
5321 "ない場合、カーネルはマッピングをどこに配置するかのヒントとして I<addr> を使用"
5322 "する。Linux では、マッピングはすぐ近くのページ境界に作成される。 新しいマッピ"
5323 "ングのアドレスは、呼び出しの返り値として返される。"
5324
5325 #. type: Plain text
5326 #: build/C/man2/mmap.2:89
5327 msgid ""
5328 "The contents of a file mapping (as opposed to an anonymous mapping; see "
5329 "B<MAP_ANONYMOUS> below), are initialized using I<length> bytes starting at "
5330 "offset I<offset> in the file (or other object) referred to by the file "
5331 "descriptor I<fd>.  I<offset> must be a multiple of the page size as returned "
5332 "by I<sysconf(_SC_PAGE_SIZE)>."
5333 msgstr ""
5334 "ファイルマッピングの内容は、 ファイルディスクリプタ I<fd> で参照されるファイ"
5335 "ル (もしくは他のオブジェクト) のオフセット I<offset> から開始される "
5336 "I<length> バイトのデータで初期化される (ファイルマッピングは無名マッピングの"
5337 "反対語である。 B<MAP_ANONYMOUS> を参照)。 I<offset> は "
5338 "I<sysconf(_SC_PAGE_SIZE)> が返すページサイズの倍数でなければならない。"
5339
5340 #. type: Plain text
5341 #: build/C/man2/mmap.2:97
5342 msgid ""
5343 "The I<prot> argument describes the desired memory protection of the mapping "
5344 "(and must not conflict with the open mode of the file).  It is either "
5345 "B<PROT_NONE> or the bitwise OR of one or more of the following flags:"
5346 msgstr ""
5347 "引き数 I<prot> には、マッピングのメモリ保護をどのように行なうかを指定する "
5348 "(ファイルのオープンモードと矛盾してはいけない)。 I<prot> には、 B<PROT_NONE> "
5349 "か、以下のフラグをひとつ以上ビット毎の論理和 (OR) をとったものを 指定できる。"
5350
5351 #. type: TP
5352 #: build/C/man2/mmap.2:97 build/C/man2/mprotect.2:74
5353 #, no-wrap
5354 msgid "B<PROT_EXEC>"
5355 msgstr "B<PROT_EXEC>"
5356
5357 #. type: Plain text
5358 #: build/C/man2/mmap.2:100
5359 msgid "Pages may be executed."
5360 msgstr "ページは実行可能である。"
5361
5362 #. type: TP
5363 #: build/C/man2/mmap.2:100 build/C/man2/mprotect.2:68
5364 #, no-wrap
5365 msgid "B<PROT_READ>"
5366 msgstr "B<PROT_READ>"
5367
5368 #. type: Plain text
5369 #: build/C/man2/mmap.2:103
5370 msgid "Pages may be read."
5371 msgstr "ページは読み込み可能である。"
5372
5373 #. type: TP
5374 #: build/C/man2/mmap.2:103 build/C/man2/mprotect.2:71
5375 #, no-wrap
5376 msgid "B<PROT_WRITE>"
5377 msgstr "B<PROT_WRITE>"
5378
5379 #. type: Plain text
5380 #: build/C/man2/mmap.2:106
5381 msgid "Pages may be written."
5382 msgstr "ページに書き込み可能である。"
5383
5384 #. type: TP
5385 #: build/C/man2/mmap.2:106 build/C/man2/mprotect.2:65
5386 #, no-wrap
5387 msgid "B<PROT_NONE>"
5388 msgstr "B<PROT_NONE>"
5389
5390 #. type: Plain text
5391 #: build/C/man2/mmap.2:109
5392 msgid "Pages may not be accessed."
5393 msgstr "ページにはアクセスできない。"
5394
5395 #. type: Plain text
5396 #: build/C/man2/mmap.2:118
5397 msgid ""
5398 "The I<flags> argument determines whether updates to the mapping are visible "
5399 "to other processes mapping the same region, and whether updates are carried "
5400 "through to the underlying file.  This behavior is determined by including "
5401 "exactly one of the following values in I<flags>:"
5402 msgstr ""
5403 "I<flags> 引き数により、マッピングに対する更新が同じ領域をマッピングしている "
5404 "他のプロセスに見えるか、更新がマッピング元のファイルを通じて 伝えられるか、が"
5405 "決定される。この動作は、以下の値のいずれか一つだけ (複数は指定できない) を "
5406 "I<flags> に含めることで指定する。"
5407
5408 #. type: TP
5409 #: build/C/man2/mmap.2:118
5410 #, no-wrap
5411 msgid "B<MAP_SHARED>"
5412 msgstr "B<MAP_SHARED>"
5413
5414 #. type: Plain text
5415 #: build/C/man2/mmap.2:128
5416 msgid ""
5417 "Share this mapping.  Updates to the mapping are visible to other processes "
5418 "that map this file, and are carried through to the underlying file.  The "
5419 "file may not actually be updated until B<msync>(2)  or B<munmap>()  is "
5420 "called."
5421 msgstr ""
5422 "このマッピングを共有する。 マッピングに対する更新はこのファイルをマッピングし"
5423 "ている他のプロセス から見える。更新はマッピング元のファイルを通じて伝えられ"
5424 "る。 ただし、ファイルの実際の更新は B<msync>(2)  または B<munmap>()  が呼ばれ"
5425 "るまで行われないこともある。"
5426
5427 #. type: TP
5428 #: build/C/man2/mmap.2:128
5429 #, no-wrap
5430 msgid "B<MAP_PRIVATE>"
5431 msgstr "B<MAP_PRIVATE>"
5432
5433 #. type: Plain text
5434 #: build/C/man2/mmap.2:137
5435 msgid ""
5436 "Create a private copy-on-write mapping.  Updates to the mapping are not "
5437 "visible to other processes mapping the same file, and are not carried "
5438 "through to the underlying file.  It is unspecified whether changes made to "
5439 "the file after the B<mmap>()  call are visible in the mapped region."
5440 msgstr ""
5441 "プライベートな copy-on-write (書き込み時コピー) マップを生成する。 マッピング"
5442 "に対する更新は同じファイルをマッピングしている他のプロセス には見えず、更新が"
5443 "マッピング元のファイルを通じて伝えられることもない。 B<mmap>()  の呼び出し後"
5444 "にマッピング元のファイルに対して行われた変更が、 マップ領域に反映されるかどう"
5445 "かは規定されていない。"
5446
5447 #. type: Plain text
5448 #: build/C/man2/mmap.2:139
5449 msgid "Both of these flags are described in POSIX.1-2001."
5450 msgstr "上記の二つのフラグは POSIX.1-2001 で規定されている。"
5451
5452 #. type: Plain text
5453 #: build/C/man2/mmap.2:142
5454 msgid ""
5455 "In addition, zero or more of the following values can be ORed in I<flags>:"
5456 msgstr ""
5457 "さらに、以下の値のうち 0 個以上をビット毎の論理和 (OR) で I<flags> に指定する"
5458 "ことができる。"
5459
5460 #. type: TP
5461 #: build/C/man2/mmap.2:142
5462 #, no-wrap
5463 msgid "B<MAP_32BIT> (since Linux 2.4.20, 2.6)"
5464 msgstr "B<MAP_32BIT> (Linux 2.4.20, 2.6 以降)"
5465
5466 #.  See http://lwn.net/Articles/294642 "Tangled up in threads", 19 Aug 08
5467 #. type: Plain text
5468 #: build/C/man2/mmap.2:158
5469 msgid ""
5470 "Put the mapping into the first 2 Gigabytes of the process address space.  "
5471 "This flag is supported only on x86-64, for 64-bit programs.  It was added to "
5472 "allow thread stacks to be allocated somewhere in the first 2GB of memory, so "
5473 "as to improve context-switch performance on some early 64-bit processors.  "
5474 "Modern x86-64 processors no longer have this performance problem, so use of "
5475 "this flag is not required on those systems.  The B<MAP_32BIT> flag is "
5476 "ignored when B<MAP_FIXED> is set."
5477 msgstr ""
5478 "マッピングをプロセスのアドレス空間の先頭 2 ギガバイト以内に配置する。 このフ"
5479 "ラグがサポートされているのは x86-64 アーキテクチャ上の 64 ビットプログラムの"
5480 "みである。 このフラグが追加されたのは、スレッドのスタックをメモリの先頭 2GB "
5481 "以内の どこかに割り当てることで、初期のいくつかの 64 ビットプロセッサにおけ"
5482 "る コンテキストスイッチの性能問題を改善するためである。 最近の x86-64 プロ"
5483 "セッサではこの性能問題はもはや存在せず、 そのようなシステムではこのフラグを使"
5484 "用する必要はない。 B<MAP_FIXED> がセットされている場合は、 B<MAP_32BIT> フラ"
5485 "グは無視される。"
5486
5487 #. type: TP
5488 #: build/C/man2/mmap.2:158
5489 #, no-wrap
5490 msgid "B<MAP_ANON>"
5491 msgstr "B<MAP_ANON>"
5492
5493 #. type: Plain text
5494 #: build/C/man2/mmap.2:163
5495 msgid "Synonym for B<MAP_ANONYMOUS>.  Deprecated."
5496 msgstr "B<MAP_ANONYMOUS> の同義語。非推奨。"
5497
5498 #. type: TP
5499 #: build/C/man2/mmap.2:163
5500 #, no-wrap
5501 msgid "B<MAP_ANONYMOUS>"
5502 msgstr "B<MAP_ANONYMOUS>"
5503
5504 #. type: Plain text
5505 #: build/C/man2/mmap.2:185
5506 msgid ""
5507 "The mapping is not backed by any file; its contents are initialized to "
5508 "zero.  The I<fd> and I<offset> arguments are ignored; however, some "
5509 "implementations require I<fd> to be -1 if B<MAP_ANONYMOUS> (or B<MAP_ANON>)  "
5510 "is specified, and portable applications should ensure this.  The use of "
5511 "B<MAP_ANONYMOUS> in conjunction with B<MAP_SHARED> is supported on Linux "
5512 "only since kernel 2.4."
5513 msgstr ""
5514 "マッピングはどのファイルとも関連付けされない。 マッピングの内容は 0 で初期化"
5515 "される。 引き数 I<fd> と I<offset> は無視される。 ただし、実装によっては "
5516 "B<MAP_ANONYMOUS> (もしくは B<MAP_ANON>)  が指定された場合、 I<fd> を -1 にす"
5517 "る必要があり、 移植性が必要なアプリケーションでは必ず I<fd> を -1 にすべきで"
5518 "ある。 B<MAP_ANONYMOUS> と B<MAP_SHARED> を組み合わせての利用は カーネル 2.4 "
5519 "以降の Linux でのみサポートされている。"
5520
5521 #. type: TP
5522 #: build/C/man2/mmap.2:185
5523 #, no-wrap
5524 msgid "B<MAP_DENYWRITE>"
5525 msgstr "B<MAP_DENYWRITE>"
5526
5527 #.  Introduced in 1.1.36, removed in 1.3.24.
5528 #. type: Plain text
5529 #: build/C/man2/mmap.2:193
5530 msgid ""
5531 "This flag is ignored.  (Long ago, it signaled that attempts to write to the "
5532 "underlying file should fail with B<ETXTBUSY>.  But this was a source of "
5533 "denial-of-service attacks.)"
5534 msgstr ""
5535 "このフラグは無視される (ずっと前は、マップ元のファイルへの書き込みを行おうと"
5536 "すると、エラー B<ETXTBUSY> で失敗するようにシグナルが設定されていたが、これ"
5537 "は denial-of-service (サービス拒否) 攻撃の原因となった)。"
5538
5539 #. type: TP
5540 #: build/C/man2/mmap.2:193
5541 #, no-wrap
5542 msgid "B<MAP_EXECUTABLE>"
5543 msgstr "B<MAP_EXECUTABLE>"
5544
5545 #.  Introduced in 1.1.38, removed in 1.3.24. Flag tested in proc_follow_link.
5546 #.  (Long ago, it signaled that the underlying file is an executable.
5547 #.  However, that information was not really used anywhere.)
5548 #.  Linus talked about DOS related to MAP_EXECUTABLE, but he was thinking of
5549 #.  MAP_DENYWRITE?
5550 #. type: Plain text
5551 #: build/C/man2/mmap.2:201
5552 msgid "This flag is ignored."
5553 msgstr "このフラグは無視される。"
5554
5555 #. type: TP
5556 #: build/C/man2/mmap.2:201
5557 #, no-wrap
5558 msgid "B<MAP_FILE>"
5559 msgstr "B<MAP_FILE>"
5560
5561 #.  On some systems, this was required as the opposite of
5562 #.  MAP_ANONYMOUS -- mtk, 1 May 2007
5563 #. type: Plain text
5564 #: build/C/man2/mmap.2:207
5565 msgid "Compatibility flag.  Ignored."
5566 msgstr "互換性のためのフラグ。無視される。"
5567
5568 #. type: TP
5569 #: build/C/man2/mmap.2:207
5570 #, no-wrap
5571 msgid "B<MAP_FIXED>"
5572 msgstr "B<MAP_FIXED>"
5573
5574 #. type: Plain text
5575 #: build/C/man2/mmap.2:225
5576 msgid ""
5577 "Don't interpret I<addr> as a hint: place the mapping at exactly that "
5578 "address.  I<addr> must be a multiple of the page size.  If the memory region "
5579 "specified by I<addr> and I<len> overlaps pages of any existing mapping(s), "
5580 "then the overlapped part of the existing mapping(s) will be discarded.  If "
5581 "the specified address cannot be used, B<mmap>()  will fail.  Because "
5582 "requiring a fixed address for a mapping is less portable, the use of this "
5583 "option is discouraged."
5584 msgstr ""
5585 "I<addr> をアドレスのヒントとして使用するのではなく、 I<addr> で指定されたアド"
5586 "レスをそのまま使用してマッピングを配置する。 I<addr> はページサイズの倍数でな"
5587 "ければならない。 I<addr> と I<len> で指定されたメモリ領域が既存のマッピングの"
5588 "ページと重なる場合、 既存のマッピングの重なった部分は捨てられる。 もし指定さ"
5589 "れたアドレスが使用できない場合、 B<mmap>()  は失敗する。 マッピングに対して固"
5590 "定アドレスを要求するのは移植性の面で劣るので、 このオプションは使用しないこと"
5591 "を推奨する。"
5592
5593 #. type: TP
5594 #: build/C/man2/mmap.2:225
5595 #, no-wrap
5596 msgid "B<MAP_GROWSDOWN>"
5597 msgstr "B<MAP_GROWSDOWN>"
5598
5599 #. type: Plain text
5600 #: build/C/man2/mmap.2:230
5601 msgid ""
5602 "Used for stacks.  Indicates to the kernel virtual memory system that the "
5603 "mapping should extend downward in memory."
5604 msgstr ""
5605 "スタック用に使用される。マッピングをメモリ内で逆向きに行うことを カーネル仮想"
5606 "メモリシステムに指示する。 (訳注:マッピングは通常はメモリ・アドレスが増加す"
5607 "る向きに行うが、 このオプションを指定すると逆向きにマッピングを行う)"
5608
5609 #. type: TP
5610 #: build/C/man2/mmap.2:230
5611 #, no-wrap
5612 msgid "B<MAP_HUGETLB> (since Linux 2.6.32)"
5613 msgstr "B<MAP_HUGETLB> (Linux 2.6.32 以降)"
5614
5615 #. type: Plain text
5616 #: build/C/man2/mmap.2:236
5617 msgid ""
5618 "Allocate the mapping using \"huge pages.\" See the Linux kernel source file "
5619 "I<Documentation/vm/hugetlbpage.txt> for further information."
5620 msgstr ""
5621 "\"huge page\" を使ってマッピングを割り当てる。詳しい情報は、Linux カーネル"
5622 "ソースの I<Documentation/vm/hugetlbpage.txt> を参照。"
5623
5624 #. type: TP
5625 #: build/C/man2/mmap.2:236
5626 #, no-wrap
5627 msgid "B<MAP_LOCKED> (since Linux 2.5.37)"
5628 msgstr "B<MAP_LOCKED> (Linux 2.5.37 以降)"
5629
5630 #.  If set, the mapped pages will not be swapped out.
5631 #. type: Plain text
5632 #: build/C/man2/mmap.2:242
5633 msgid ""
5634 "Lock the pages of the mapped region into memory in the manner of "
5635 "B<mlock>(2).  This flag is ignored in older kernels."
5636 msgstr ""
5637 "マップされた領域のページを B<mlock>(2)  の方法でメモリ内にロックする。 それ以"
5638 "前のカーネルでは、このフラグは無視される。"
5639
5640 #. type: TP
5641 #: build/C/man2/mmap.2:242
5642 #, no-wrap
5643 msgid "B<MAP_NONBLOCK> (since Linux 2.5.46)"
5644 msgstr "B<MAP_NONBLOCK> (Linux 2.5.46 以降)"
5645
5646 #. type: Plain text
5647 #: build/C/man2/mmap.2:257
5648 msgid ""
5649 "Only meaningful in conjunction with B<MAP_POPULATE>.  Don't perform read-"
5650 "ahead: create page tables entries only for pages that are already present in "
5651 "RAM.  Since Linux 2.6.23, this flag causes B<MAP_POPULATE> to do nothing.  "
5652 "One day the combination of B<MAP_POPULATE> and B<MAP_NONBLOCK> may be "
5653 "reimplemented."
5654 msgstr ""
5655 "B<MAP_POPULATE> と組み合わせた場合のみ意味を持つ。 read-ahead (前もって読み込"
5656 "むこと) を実行しない。 単に、すでに RAM 上に存在するページに対してのみページ"
5657 "テーブルエントリを作成する。 Linux 2.6.23 以降では、このフラグは "
5658 "B<MAP_POPULATE> に何の影響も与えない。 いつか B<MAP_POPULATE> と "
5659 "B<MAP_NONBLOCK> を組み合わせた場合の動作は実装し直されるかもしれない。"
5660
5661 #. type: TP
5662 #: build/C/man2/mmap.2:257
5663 #, no-wrap
5664 msgid "B<MAP_NORESERVE>"
5665 msgstr "B<MAP_NORESERVE>"
5666
5667 #. type: Plain text
5668 #: build/C/man2/mmap.2:272
5669 msgid ""
5670 "Do not reserve swap space for this mapping.  When swap space is reserved, "
5671 "one has the guarantee that it is possible to modify the mapping.  When swap "
5672 "space is not reserved one might get B<SIGSEGV> upon a write if no physical "
5673 "memory is available.  See also the discussion of the file I</proc/sys/vm/"
5674 "overcommit_memory> in B<proc>(5).  In kernels before 2.6, this flag had "
5675 "effect only for private writable mappings."
5676 msgstr ""
5677 "このマッピングに対するスワップ空間の予約を行わない。 スワップ空間を予約した場"
5678 "合は、このマッピングの変更が必ず可能なことが 保証される。予約を行わなかった場"
5679 "合、物理メモリに空きがないと 書き込み時に B<SIGSEGV> エラーを受け取ることがあ"
5680 "る。 B<proc>(5)  の I</proc/sys/vm/overcommit_memory> ファイルについての議論"
5681 "も参照。 バージョン 2.6 より前のカーネルでは、このフラグは書き込み可能な プラ"
5682 "イベート・マッピングについてのみ効果があった。"
5683
5684 #. type: TP
5685 #: build/C/man2/mmap.2:272
5686 #, no-wrap
5687 msgid "B<MAP_POPULATE> (since Linux 2.5.46)"
5688 msgstr "B<MAP_POPULATE> (Linux 2.5.46 以降)"
5689
5690 #. type: Plain text
5691 #: build/C/man2/mmap.2:279
5692 msgid ""
5693 "Populate (prefault) page tables for a mapping.  For a file mapping, this "
5694 "causes read-ahead on the file.  Later accesses to the mapping will not be "
5695 "blocked by page faults.  B<MAP_POPULATE> is supported for private mappings "
5696 "only since Linux 2.6.23."
5697 msgstr ""
5698 "マッピング用のページテーブルを配置 (populate) する ファイルマッピングの場合に"
5699 "は、これによりファイルが先読み (read-ahead)  が行われる。この以後は、マッピン"
5700 "グに対するアクセスがページフォールトで ブロックされることがなくなる。 Linux "
5701 "2.6.23 以降でのみプライベート・マッピングについて B<MAP_POPULATE> がサポート"
5702 "されている。"
5703
5704 #. type: TP
5705 #: build/C/man2/mmap.2:279
5706 #, no-wrap
5707 msgid "B<MAP_STACK> (since Linux 2.6.27)"
5708 msgstr "B<MAP_STACK> (Linux 2.6.27 以降)"
5709
5710 #.  See http://lwn.net/Articles/294642 "Tangled up in threads", 19 Aug 08
5711 #.  commit cd98a04a59e2f94fa64d5bf1e26498d27427d5e7
5712 #.  http://thread.gmane.org/gmane.linux.kernel/720412
5713 #.  "pthread_create() slow for many threads; also time to revisit 64b
5714 #.   context switch optimization?"
5715 #. type: Plain text
5716 #: build/C/man2/mmap.2:292
5717 msgid ""
5718 "Allocate the mapping at an address suitable for a process or thread stack.  "
5719 "This flag is currently a no-op, but is used in the glibc threading "
5720 "implementation so that if some architectures require special treatment for "
5721 "stack allocations, support can later be transparently implemented for glibc."
5722 msgstr ""
5723 "プロセスやスレッドのスタックに適したアドレスにマッピングを割り当てる。 現在の"
5724 "ところ、このフラグは何もしないが、 glibc のスレッド実装では使用されている。 "
5725 "これは、いくつかのアーキテクチャではスタックの割り当てに関して特別な扱い が必"
5726 "要な場合に、glibc にそのサポートを後で透過的に実装できるようにする ためであ"
5727 "る。"
5728
5729 #. type: TP
5730 #: build/C/man2/mmap.2:292
5731 #, no-wrap
5732 msgid "B<MAP_UNINITIALIZED> (since Linux 2.6.33)"
5733 msgstr "B<MAP_UNINITIALIZED> (Linux 2.6.33 以降)"
5734
5735 #. type: Plain text
5736 #: build/C/man2/mmap.2:302
5737 msgid ""
5738 "Don't clear anonymous pages.  This flag is intended to improve performance "
5739 "on embedded devices.  This flag is honored only if the kernel was configured "
5740 "with the B<CONFIG_MMAP_ALLOW_UNINITIALIZED> option.  Because of the security "
5741 "implications, that option is normally enabled only on embedded devices (i."
5742 "e., devices where one has complete control of the contents of user memory)."
5743 msgstr ""
5744 "無名ページ (anonymous page) のクリアを行わない。このフラグは組み込みデバイ"
5745 "ス\n"
5746 "での性能向上を目的に作られてものである。カーネルの設定で\n"
5747 "B<CONFIG_MMAP_ALLOW_UNINITIALIZED> オプションが有効になっている場合のみ、\n"
5748 "このフラグは効果を持つ。\n"
5749 "セキュリティ面の考慮から、このオプションは通常組み込みデバイス (すなわち、\n"
5750 "ユーザメモリの内容を完全に制御化におけるデバイス) においてのみ有効にされる。"
5751
5752 #. type: Plain text
5753 #: build/C/man2/mmap.2:310
5754 msgid ""
5755 "Of the above flags, only B<MAP_FIXED> is specified in POSIX.1-2001.  "
5756 "However, most systems also support B<MAP_ANONYMOUS> (or its synonym "
5757 "B<MAP_ANON>)."
5758 msgstr ""
5759 "上記のフラグの中では、 B<MAP_FIXED> だけが POSIX.1-2001 で規定されている。 し"
5760 "かしながら、ほとんどのシステムで B<MAP_ANONYMOUS> (またはその同義語である "
5761 "B<MAP_ANON>)  もサポートされている。"
5762
5763 #. type: Plain text
5764 #: build/C/man2/mmap.2:317
5765 msgid ""
5766 "Some systems document the additional flags B<MAP_AUTOGROW>, "
5767 "B<MAP_AUTORESRV>, B<MAP_COPY>, and B<MAP_LOCAL>."
5768 msgstr ""
5769 "いくつかのシステムでは、上記以外にフラグとして B<MAP_AUTOGROW>, "
5770 "B<MAP_AUTORESRV>, B<MAP_COPY>, B<MAP_LOCAL> が規定されている。"
5771
5772 #. type: Plain text
5773 #: build/C/man2/mmap.2:323
5774 msgid ""
5775 "Memory mapped by B<mmap>()  is preserved across B<fork>(2), with the same "
5776 "attributes."
5777 msgstr ""
5778 "B<mmap>()  によってマップされたメモリの属性は B<fork>(2)  の際に継承される。"
5779
5780 #. type: Plain text
5781 #: build/C/man2/mmap.2:331
5782 msgid ""
5783 "A file is mapped in multiples of the page size.  For a file that is not a "
5784 "multiple of the page size, the remaining memory is zeroed when mapped, and "
5785 "writes to that region are not written out to the file.  The effect of "
5786 "changing the size of the underlying file of a mapping on the pages that "
5787 "correspond to added or removed regions of the file is unspecified."
5788 msgstr ""
5789 "ファイルはページサイズの整数倍の領域にマップされる。サイズがページサイズの 整"
5790 "数倍でないファイルの場合、マップ時に残りの領域は 0 で埋められ、この領域へ 書"
5791 "きこみを行ってもファイルに書き出されることはない。マッピングを行った元 ファイ"
5792 "ルのサイズを変更した場合、元ファイルの追加されたり削除された領域に対応 する"
5793 "マップされたページに対してどのような影響があるかは規定されていない。"
5794
5795 #. type: SS
5796 #: build/C/man2/mmap.2:331
5797 #, no-wrap
5798 msgid "munmap()"
5799 msgstr "munmap()"
5800
5801 #. type: Plain text
5802 #: build/C/man2/mmap.2:341
5803 msgid ""
5804 "The B<munmap>()  system call deletes the mappings for the specified address "
5805 "range, and causes further references to addresses within the range to "
5806 "generate invalid memory references.  The region is also automatically "
5807 "unmapped when the process is terminated.  On the other hand, closing the "
5808 "file descriptor does not unmap the region."
5809 msgstr ""
5810 "システムコール B<munmap>()  は指定されたアドレス範囲のマップを消去し、 これ以"
5811 "降のその範囲内へのメモリ参照は不正となる。 この領域は、プロセスが終了したとき"
5812 "にも自動的にアンマップされる。 一方、ファイル記述子をクローズしても、この領域"
5813 "はアンマップされない。"
5814
5815 #. type: Plain text
5816 #: build/C/man2/mmap.2:351
5817 msgid ""
5818 "The address I<addr> must be a multiple of the page size.  All pages "
5819 "containing a part of the indicated range are unmapped, and subsequent "
5820 "references to these pages will generate B<SIGSEGV>.  It is not an error if "
5821 "the indicated range does not contain any mapped pages."
5822 msgstr ""
5823 "I<addr> アドレスはページサイズの整数倍でなければならない。指定された範囲の一"
5824 "部分を 含む全てのページはアンマップされ、これ以降にこれらのページへの参照があ"
5825 "ると B<SIGSEGV> が発生する。 指定した範囲内にマップされたページが一つも含まれ"
5826 "ていない場合でも エラーにならない。"
5827
5828 #. type: SS
5829 #: build/C/man2/mmap.2:351
5830 #, no-wrap
5831 msgid "Timestamps changes for file-backed mappings"
5832 msgstr "ファイルと関連付けられたマッピングに対するタイムスタンプの更新"
5833
5834 #. type: Plain text
5835 #: build/C/man2/mmap.2:358
5836 msgid ""
5837 "For file-backed mappings, the I<st_atime> field for the mapped file may be "
5838 "updated at any time between the B<mmap>()  and the corresponding unmapping; "
5839 "the first reference to a mapped page will update the field if it has not "
5840 "been already."
5841 msgstr ""
5842 "ファイルと関連付けられたマッピングの場合、マッピングされたファイルの "
5843 "I<st_atime> フィールドは、 B<mmap>()  されてからアンマップ (unmap) されるまで"
5844 "の間に更新されることがある。 それまでに更新が行われていなければ、マップされた"
5845 "ページへの最初の参照があった 際に更新される。"
5846
5847 #. type: Plain text
5848 #: build/C/man2/mmap.2:375
5849 msgid ""
5850 "The I<st_ctime> and I<st_mtime> field for a file mapped with B<PROT_WRITE> "
5851 "and B<MAP_SHARED> will be updated after a write to the mapped region, and "
5852 "before a subsequent B<msync>(2)  with the B<MS_SYNC> or B<MS_ASYNC> flag, if "
5853 "one occurs."
5854 msgstr ""
5855 "B<PROT_WRITE> と B<MAP_SHARED> の両方を指定してマップされたファイルの場合、書"
5856 "き込みがあると、 I<st_ctime> と I<st_mtime> の両フィールドは、マップされた領"
5857 "域への書き込みより後で、 B<MS_SYNC> または B<MS_ASYNC> フラグを指定して "
5858 "B<msync>(2)  が呼ばれる前までに更新される。"
5859
5860 #. type: Plain text
5861 #: build/C/man2/mmap.2:392
5862 msgid ""
5863 "On success, B<mmap>()  returns a pointer to the mapped area.  On error, the "
5864 "value B<MAP_FAILED> (that is, I<(void\\ *)\\ -1>)  is returned, and I<errno> "
5865 "is set appropriately.  On success, B<munmap>()  returns 0, on failure -1, "
5866 "and I<errno> is set (probably to B<EINVAL>)."
5867 msgstr ""
5868 "B<mmap>()  は成功するとマップされた領域へのポインタを返す。 失敗すると値 "
5869 "B<MAP_FAILED> (つまり I<(void\\ *)\\ -1>)  を返し、 I<errno> がエラーの内容に"
5870 "したがってセットされる。 B<munmap>()  は成功すると 0 を返す。失敗すると -1 を"
5871 "返し、 I<errno> がセットされる (多くの場合 B<EINVAL> になるだろう)。"
5872
5873 #. type: TP
5874 #: build/C/man2/mmap.2:393 build/C/man2/mprotect.2:85
5875 #: build/C/man3/shm_open.3:187 build/C/man3/shm_open.3:192
5876 #: build/C/man2/shmctl.2:306 build/C/man2/shmget.2:192
5877 #: build/C/man2/shmop.2:188
5878 #, no-wrap
5879 msgid "B<EACCES>"
5880 msgstr "B<EACCES>"
5881
5882 #. type: Plain text
5883 #: build/C/man2/mmap.2:411
5884 msgid ""
5885 "A file descriptor refers to a non-regular file.  Or a file mapping was "
5886 "requested, but I<fd> is not open for reading.  Or B<MAP_SHARED> was "
5887 "requested and B<PROT_WRITE> is set, but I<fd> is not open in read/write "
5888 "(B<O_RDWR>)  mode.  Or B<PROT_WRITE> is set, but the file is append-only."
5889 msgstr ""
5890 "以下のいずれかの場合。 ファイル記述子の参照先が通常のファイルではない (non-"
5891 "regular file) 。 ファイルマッピングを要求したが I<fd> は読み込み用にオープン"
5892 "されていない。 B<MAP_SHARED> を要求して B<PROT_WRITE> をセットしたが I<fd> は"
5893 "読み書きモード (B<O_RDWR>)  でオープンされていない、 B<PROT_WRITE> をセットし"
5894 "たが、ファイルは追加 (append) 専用である。"
5895
5896 #. type: Plain text
5897 #: build/C/man2/mmap.2:415
5898 msgid ""
5899 "The file has been locked, or too much memory has been locked (see "
5900 "B<setrlimit>(2))."
5901 msgstr ""
5902 "ファイルがロックされている。またはロックされているメモリが多すぎる "
5903 "(B<setrlimit>(2)  を参照)。"
5904
5905 #. type: Plain text
5906 #: build/C/man2/mmap.2:421
5907 msgid ""
5908 "I<fd> is not a valid file descriptor (and B<MAP_ANONYMOUS> was not set)."
5909 msgstr ""
5910 "I<fd> が有効なファイル記述子 (file descriptor) ではない (かつ "
5911 "B<MAP_ANONYMOUS> がセットされていない)。"
5912
5913 #. type: Plain text
5914 #: build/C/man2/mmap.2:429
5915 msgid ""
5916 "We don't like I<addr>, I<length>, or I<offset> (e.g., they are too large, or "
5917 "not aligned on a page boundary)."
5918 msgstr ""
5919 "I<addr> か I<length> か I<offset> が適切でない (例えば、大きすぎるとか、ペー"
5920 "ジ境界にアラインメントされていない)。"
5921
5922 #. type: Plain text
5923 #: build/C/man2/mmap.2:434
5924 msgid "(since Linux 2.6.12)  I<length> was 0."
5925 msgstr "(Linux 2.6.12 以降)  I<length> が 0 であった。"
5926
5927 #. type: Plain text
5928 #: build/C/man2/mmap.2:442
5929 msgid ""
5930 "I<flags> contained neither B<MAP_PRIVATE> or B<MAP_SHARED>, or contained "
5931 "both of these values."
5932 msgstr ""
5933 "I<flags> に B<MAP_PRIVATE> と B<MAP_SHARED> のどちらも含まれていなかった、も"
5934 "しくは その両方が含まれていた。"
5935
5936 #. type: TP
5937 #: build/C/man2/mmap.2:442 build/C/man3/shm_open.3:229
5938 #: build/C/man2/shmget.2:221
5939 #, no-wrap
5940 msgid "B<ENFILE>"
5941 msgstr "B<ENFILE>"
5942
5943 #.  [2.6.7] shmem_zero_setup()-->shmem_file_setup()-->get_empty_filp()
5944 #. type: Plain text
5945 #: build/C/man2/mmap.2:450 build/C/man2/shmget.2:225
5946 msgid "The system limit on the total number of open files has been reached."
5947 msgstr "システム全体でオープンされているファイルの総数が上限に達した。"
5948
5949 #. type: Plain text
5950 #: build/C/man2/mmap.2:454
5951 msgid ""
5952 "The underlying filesystem of the specified file does not support memory "
5953 "mapping."
5954 msgstr ""
5955 "指定されたファイルが置かれているファイルシステムがメモリマッピングをサポート "
5956 "していない。"
5957
5958 #. type: Plain text
5959 #: build/C/man2/mmap.2:458
5960 msgid ""
5961 "No memory is available, or the process's maximum number of mappings would "
5962 "have been exceeded."
5963 msgstr ""
5964 "メモリに空きがない、または処理中のプロセスのマッピング数が最大数を超過した。"
5965
5966 #.  (Since 2.4.25 / 2.6.0.)
5967 #. type: Plain text
5968 #: build/C/man2/mmap.2:467
5969 msgid ""
5970 "The I<prot> argument asks for B<PROT_EXEC> but the mapped area belongs to a "
5971 "file on a filesystem that was mounted no-exec."
5972 msgstr ""
5973 "I<prot> 引き数は B<PROT_EXEC> を行うように指定されているが、 no-exec でマウン"
5974 "トされたファイルシステム上のファイルに マップ領域が対応している。"
5975
5976 #. type: Plain text
5977 #: build/C/man2/mmap.2:473
5978 msgid ""
5979 "B<MAP_DENYWRITE> was set but the object specified by I<fd> is open for "
5980 "writing."
5981 msgstr ""
5982 "B<MAP_DENYWRITE> がセットされているが I<fd> で指定されているオブジェクトは書"
5983 "き込み用に開かれている。"
5984
5985 #. type: TP
5986 #: build/C/man2/mmap.2:473 build/C/man2/shmctl.2:348
5987 #, no-wrap
5988 msgid "B<EOVERFLOW>"
5989 msgstr "B<EOVERFLOW>"
5990
5991 #. type: Plain text
5992 #: build/C/man2/mmap.2:485
5993 msgid ""
5994 "On 32-bit architecture together with the large file extension (i.e., using "
5995 "64-bit I<off_t>): the number of pages used for I<length> plus number of "
5996 "pages used for I<offset> would overflow I<unsigned long> (32 bits)."
5997 msgstr ""
5998 "32 ビットアーキテクチャで large file 拡張を使っている場合 (つまり 64 ビット"
5999 "の I<off_t> を使う場合)、 I<length> で使うページ数と I<offset> で使うページ数"
6000 "を足した値は I<unsigned long> (32 ビット) を超えてしまう (オーバーフローして"
6001 "しまう) 場合がある。"
6002
6003 #. type: Plain text
6004 #: build/C/man2/mmap.2:487
6005 msgid "Use of a mapped region can result in these signals:"
6006 msgstr "マップ領域を利用する際に、以下のシグナルが発生することがある:"
6007
6008 #. type: TP
6009 #: build/C/man2/mmap.2:487
6010 #, no-wrap
6011 msgid "B<SIGSEGV>"
6012 msgstr "B<SIGSEGV>"
6013
6014 #. type: Plain text
6015 #: build/C/man2/mmap.2:490
6016 msgid "Attempted write into a region mapped as read-only."
6017 msgstr "読み込み専用で mmap された領域へ書き込みを行おうとした。"
6018
6019 #. type: TP
6020 #: build/C/man2/mmap.2:490
6021 #, no-wrap
6022 msgid "B<SIGBUS>"
6023 msgstr "B<SIGBUS>"
6024
6025 #. type: Plain text
6026 #: build/C/man2/mmap.2:495
6027 msgid ""
6028 "Attempted access to a portion of the buffer that does not correspond to the "
6029 "file (for example, beyond the end of the file, including the case where "
6030 "another process has truncated the file)."
6031 msgstr ""
6032 "バッファのうち、ファイルに関連づけられていない部分 (例えばファイル末尾を越え"
6033 "た部分など。これには 他のプロセスがファイルを切り詰めた場合なども含まれる)  "
6034 "にアクセスしようとした。"
6035
6036 #.  SVr4 documents additional error codes ENXIO and ENODEV.
6037 #.  SUSv2 documents additional error codes EMFILE and EOVERFLOW.
6038 #. type: Plain text
6039 #: build/C/man2/mmap.2:499
6040 msgid "SVr4, 4.4BSD, POSIX.1-2001."
6041 msgstr "SVr4, 4.4BSD, POSIX.1-2001."
6042
6043 #.  POSIX.1-2001: It shall be defined to -1 or 0 or 200112L.
6044 #.  -1: unavailable, 0: ask using sysconf().
6045 #.  glibc defines it to 1.
6046 #. type: Plain text
6047 #: build/C/man2/mmap.2:513
6048 #, fuzzy
6049 #| msgid ""
6050 #| "On POSIX systems on which B<mmap>(), B<msync>(2)  and B<munmap>()  are "
6051 #| "available, B<_POSIX_MAPPED_FILES> is defined in I<E<lt>unistd.hE<gt>> to "
6052 #| "a value greater than 0.  (See also B<sysconf>(3).)"
6053 msgid ""
6054 "On POSIX systems on which B<mmap>(), B<msync>(2), and B<munmap>()  are "
6055 "available, B<_POSIX_MAPPED_FILES> is defined in I<E<lt>unistd.hE<gt>> to a "
6056 "value greater than 0.  (See also B<sysconf>(3).)"
6057 msgstr ""
6058 "B<mmap>(), B<msync>(2)  B<munmap>()  が利用可能な POSIX システムでは、 "
6059 "B<_POSIX_MAPPED_FILES> は E<lt>unistd.hE<gt> で 0 より大きな値に定義される "
6060 "(B<sysconf>(3)  も参照のこと)。"
6061
6062 #. type: Plain text
6063 #: build/C/man2/mmap.2:526
6064 msgid ""
6065 "On some hardware architectures (e.g., i386), B<PROT_WRITE> implies "
6066 "B<PROT_READ>.  It is architecture dependent whether B<PROT_READ> implies "
6067 "B<PROT_EXEC> or not.  Portable programs should always set B<PROT_EXEC> if "
6068 "they intend to execute code in the new mapping."
6069 msgstr ""
6070 "(i386 などの) いくつかのアーキテクチャでは、 B<PROT_WRITE> をセットすると、暗"
6071 "黙のうちに B<PROT_READ> がセットされる。 B<PROT_READ> をセットした際に暗黙の"
6072 "うちに B<PROT_EXEC> がセットされるかどうかは、アーキテクチャ依存である。 移植"
6073 "性を考慮したプログラムでは、 新規にマップした領域でコードを実行したい場合は、"
6074 "常に B<PROT_EXEC> をセットすべきである。"
6075
6076 #. type: Plain text
6077 #: build/C/man2/mmap.2:541
6078 msgid ""
6079 "The portable way to create a mapping is to specify I<addr> as 0 (NULL), and "
6080 "omit B<MAP_FIXED> from I<flags>.  In this case, the system chooses the "
6081 "address for the mapping; the address is chosen so as not to conflict with "
6082 "any existing mapping, and will not be 0.  If the B<MAP_FIXED> flag is "
6083 "specified, and I<addr> is 0 (NULL), then the mapped address will be 0 (NULL)."
6084 msgstr ""
6085 "マッピングを作成する移植性のある方法は、 I<addr> に 0 (NULL) を指定し、 "
6086 "I<flags> から B<MAP_FIXED> を外すことである。 この場合、システムがマッピング"
6087 "用のアドレスの選択を行う。 アドレスは既存のマッピングと衝突しないように、 か"
6088 "つ 0 にならないように選択される。 B<MAP_FIXED> フラグが指定され、かつ "
6089 "I<addr> が 0 (NULL)  の場合には、マップされるアドレスが 0 (NULL) になる。"
6090
6091 #. type: Plain text
6092 #: build/C/man2/mmap.2:571
6093 msgid ""
6094 "Certain I<flags> constants are defined only if either B<_BSD_SOURCE> or "
6095 "B<_SVID_SOURCE> is defined.  (Requiring B<_GNU_SOURCE> also suffices, and "
6096 "requiring that macro specifically would have been more logical, since these "
6097 "flags are all Linux-specific.)  The relevant flags are: B<MAP_32BIT>, "
6098 "B<MAP_ANONYMOUS> (and the synonym B<MAP_ANON>), B<MAP_DENYWRITE>, "
6099 "B<MAP_EXECUTABLE>, B<MAP_FILE>, B<MAP_GROWSDOWN>, B<MAP_HUGETLB>, "
6100 "B<MAP_LOCKED>, B<MAP_NONBLOCK>, B<MAP_NORESERVE>, B<MAP_POPULATE>, and "
6101 "B<MAP_STACK>."
6102 msgstr ""
6103 "特定の I<flags> 定数は B<_BSD_SOURCE> か B<_SVID_SOURCE> のいずれかが定義され"
6104 "た場合にのみ定義される。 (B<_GNU_SOURCE> も定義されている必要がある。これらの"
6105 "フラグはすべて Linux 固有のものなので、 特に B<_GNU_SOURCE> を必要とする点は"
6106 "もっと論理的に決められるべきであった。) 関係するフラグは B<MAP_32BIT>, "
6107 "B<MAP_ANONYMOUS> (とその同義語の B<MAP_ANON>), B<MAP_DENYWRITE>, "
6108 "B<MAP_EXECUTABLE>, B<MAP_FILE>, B<MAP_GROWSDOWN>, B<MAP_HUGETLB>, "
6109 "B<MAP_LOCKED>, B<MAP_NONBLOCK>, B<MAP_NORESERVE>, B<MAP_POPULATE>, "
6110 "B<MAP_STACK> である。"
6111
6112 #. type: SS
6113 #: build/C/man2/mmap.2:571
6114 #, no-wrap
6115 msgid "C library/kernel ABI differences"
6116 msgstr ""
6117
6118 #.  Since around glibc 2.1/2.2, depending on the platform.
6119 #. type: Plain text
6120 #: build/C/man2/mmap.2:586
6121 msgid ""
6122 "This page describes the interface provided by the glibc B<mmap>()  wrapper "
6123 "function.  Originally, this function invoked a system call of the same "
6124 "name.  Since kernel 2.4, that system call has been superseded by "
6125 "B<mmap2>(2), and nowadays the glibc B<mmap>()  wrapper function invokes "
6126 "B<mmap2>(2)  with a suitably adjusted value for I<offset>."
6127 msgstr ""
6128 "このページでは glibc の B<mmap>() のラッパー関数が提供するインターフェース"
6129 "に\n"
6130 "ついて説明している。元々は、この関数は同じ名前のシステムコールを起動してい"
6131 "た。\n"
6132 "カーネル 2.4 以降、このシステムコールは B<mmap2>(2) に取って代わられ、現在\n"
6133 "では、 glibc の B<mmap>() のラッパー関数は I<offset> を適切に調整してから\n"
6134 "B<mmap2>(2) を起動する。"
6135
6136 #. type: Plain text
6137 #: build/C/man2/mmap.2:591
6138 msgid ""
6139 "On Linux there are no guarantees like those suggested above under "
6140 "B<MAP_NORESERVE>.  By default, any process can be killed at any moment when "
6141 "the system runs out of memory."
6142 msgstr ""
6143 "Linux においては、上記の B<MAP_NORESERVE> で述べられているような保証はない。 "
6144 "デフォルトでは、システムがメモリを使い切った場合には、 どのプロセスがいつ強制"
6145 "終了されるか分からないからである。"
6146
6147 #. type: Plain text
6148 #: build/C/man2/mmap.2:598
6149 msgid ""
6150 "In kernels before 2.6.7, the B<MAP_POPULATE> flag has effect only if I<prot> "
6151 "is specified as B<PROT_NONE>."
6152 msgstr ""
6153 "2.6.7 より前のカーネルでは、 I<prot> に B<PROT_NONE> が指定された場合にの"
6154 "み、 B<MAP_POPULATE> フラグが効力を持つ。"
6155
6156 #. type: Plain text
6157 #: build/C/man2/mmap.2:613
6158 msgid ""
6159 "SUSv3 specifies that B<mmap>()  should fail if I<length> is 0.  However, in "
6160 "kernels before 2.6.12, B<mmap>()  succeeded in this case: no mapping was "
6161 "created and the call returned I<addr>.  Since kernel 2.6.12, B<mmap>()  "
6162 "fails with the error B<EINVAL> for this case."
6163 msgstr ""
6164 "SUSv3 では、 I<length> が 0 の場合、 B<mmap>()  は失敗すると規定されている。"
6165 "しかしながら、2.6.12 より前のカーネルでは、 この場合に B<mmap>()  は成功して"
6166 "いた (マッピングは作成されず、 I<addr> が返されていた)。 カーネル 2.6.12 以降"
6167 "では、 B<mmap>()  はエラー B<EINVAL> で失敗する。"
6168
6169 #. type: Plain text
6170 #: build/C/man2/mmap.2:629
6171 msgid ""
6172 "POSIX specifies that the system shall always zero fill any partial page at "
6173 "the end of the object and that system will never write any modification of "
6174 "the object beyond its end.  On Linux, when you write data to such partial "
6175 "page after the end of the object, the data stays in the page cache even "
6176 "after the file is closed and unmapped and even though the data is never "
6177 "written to the file itself, subsequent mappings may see the modified "
6178 "content.  In some cases, this could be fixed by calling B<msync>(2)  before "
6179 "the unmap takes place; however, this doesn't work on tmpfs (for example, "
6180 "when using POSIX shared memory interface documented in B<shm_overview>(7))."
6181 msgstr ""
6182 "POSIX では、 システムはオブジェクト末尾の部分ページを常に 0 で埋め、 末尾より"
6183 "後ろのオブジェクトを決して変更してはならない、と規定している。 Linux では、 "
6184 "オブジェクト末尾より後ろの部分ページにデータを書き込んだ場合、 そのファイルを"
6185 "クローズしてアンマップした後であってもページキャッシュにデータが残り続け、 "
6186 "データがファイル自体に書き込まれていなくても、 それ以降のマッピングで変更され"
6187 "た内容が見える可能性がある。 いくつかの場合では、 アンマップを行う前に "
6188 "B<msync>(2) を呼び出すことで、 この状況を修正することができる。 しかし、 これ"
6189 "は tmpfs では機能しない (例えば、 B<shm_overview>(7) で説明されている POSIX "
6190 "共有メモリインターフェースを使った場合)。"
6191
6192 #. type: Plain text
6193 #: build/C/man2/mmap.2:641
6194 msgid ""
6195 "The following program prints part of the file specified in its first command-"
6196 "line argument to standard output.  The range of bytes to be printed is "
6197 "specified via offset and length values in the second and third command-line "
6198 "arguments.  The program creates a memory mapping of the required pages of "
6199 "the file and then uses B<write>(2)  to output the desired bytes."
6200 msgstr ""
6201 "以下のプログラムは、一番目のコマンドライン引き数で指定された ファイルの一部を"
6202 "標準出力に表示する。 表示する範囲は、二番目、三番目のコマンドライン引き数で渡"
6203 "される オフセットと長さで指定される。 このプログラムは、指定されたファイルの"
6204 "必要なページのメモリ・ マッピングを作成し、 B<write>(2)  を使って所望のバイト"
6205 "を出力する。"
6206
6207 #. type: Plain text
6208 #: build/C/man2/mmap.2:649
6209 #, no-wrap
6210 msgid ""
6211 "#include E<lt>sys/mman.hE<gt>\n"
6212 "#include E<lt>sys/stat.hE<gt>\n"
6213 "#include E<lt>fcntl.hE<gt>\n"
6214 "#include E<lt>stdio.hE<gt>\n"
6215 "#include E<lt>stdlib.hE<gt>\n"
6216 "#include E<lt>unistd.hE<gt>\n"
6217 msgstr ""
6218 "#include E<lt>sys/mman.hE<gt>\n"
6219 "#include E<lt>sys/stat.hE<gt>\n"
6220 "#include E<lt>fcntl.hE<gt>\n"
6221 "#include E<lt>stdio.hE<gt>\n"
6222 "#include E<lt>stdlib.hE<gt>\n"
6223 "#include E<lt>unistd.hE<gt>\n"
6224
6225 #. type: Plain text
6226 #: build/C/man2/mmap.2:652 build/C/man2/mprotect.2:177
6227 #, no-wrap
6228 msgid ""
6229 "#define handle_error(msg) \\e\n"
6230 "    do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
6231 msgstr ""
6232 "#define handle_error(msg) \\e\n"
6233 "    do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
6234
6235 #. type: Plain text
6236 #: build/C/man2/mmap.2:662
6237 #, no-wrap
6238 msgid ""
6239 "int\n"
6240 "main(int argc, char *argv[])\n"
6241 "{\n"
6242 "    char *addr;\n"
6243 "    int fd;\n"
6244 "    struct stat sb;\n"
6245 "    off_t offset, pa_offset;\n"
6246 "    size_t length;\n"
6247 "    ssize_t s;\n"
6248 msgstr ""
6249 "int\n"
6250 "main(int argc, char *argv[])\n"
6251 "{\n"
6252 "    char *addr;\n"
6253 "    int fd;\n"
6254 "    struct stat sb;\n"
6255 "    off_t offset, pa_offset;\n"
6256 "    size_t length;\n"
6257 "    ssize_t s;\n"
6258
6259 #. type: Plain text
6260 #: build/C/man2/mmap.2:667
6261 #, no-wrap
6262 msgid ""
6263 "    if (argc E<lt> 3 || argc E<gt> 4) {\n"
6264 "        fprintf(stderr, \"%s file offset [length]\\en\", argv[0]);\n"
6265 "        exit(EXIT_FAILURE);\n"
6266 "    }\n"
6267 msgstr ""
6268 "    if (argc E<lt> 3 || argc E<gt> 4) {\n"
6269 "        fprintf(stderr, \"%s file offset [length]\\en\", argv[0]);\n"
6270 "        exit(EXIT_FAILURE);\n"
6271 "    }\n"
6272
6273 #. type: Plain text
6274 #: build/C/man2/mmap.2:671
6275 #, no-wrap
6276 msgid ""
6277 "    fd = open(argv[1], O_RDONLY);\n"
6278 "    if (fd == -1)\n"
6279 "        handle_error(\"open\");\n"
6280 msgstr ""
6281 "    fd = open(argv[1], O_RDONLY);\n"
6282 "    if (fd == -1)\n"
6283 "        handle_error(\"open\");\n"
6284
6285 #. type: Plain text
6286 #: build/C/man2/mmap.2:674
6287 #, no-wrap
6288 msgid ""
6289 "    if (fstat(fd, &sb) == -1)           /* To obtain file size */\n"
6290 "        handle_error(\"fstat\");\n"
6291 msgstr ""
6292 "    if (fstat(fd, &sb) == -1)           /* To obtain file size */\n"
6293 "        handle_error(\"fstat\");\n"
6294
6295 #. type: Plain text
6296 #: build/C/man2/mmap.2:678
6297 #, no-wrap
6298 msgid ""
6299 "    offset = atoi(argv[2]);\n"
6300 "    pa_offset = offset & ~(sysconf(_SC_PAGE_SIZE) - 1);\n"
6301 "        /* offset for mmap() must be page aligned */\n"
6302 msgstr ""
6303 "    offset = atoi(argv[2]);\n"
6304 "    pa_offset = offset & ~(sysconf(_SC_PAGE_SIZE) - 1);\n"
6305 "        /* offset for mmap() must be page aligned */\n"
6306
6307 #. type: Plain text
6308 #: build/C/man2/mmap.2:683
6309 #, no-wrap
6310 msgid ""
6311 "    if (offset E<gt>= sb.st_size) {\n"
6312 "        fprintf(stderr, \"offset is past end of file\\en\");\n"
6313 "        exit(EXIT_FAILURE);\n"
6314 "    }\n"
6315 msgstr ""
6316 "    if (offset E<gt>= sb.st_size) {\n"
6317 "        fprintf(stderr, \"offset is past end of file\\en\");\n"
6318 "        exit(EXIT_FAILURE);\n"
6319 "    }\n"
6320
6321 #. type: Plain text
6322 #: build/C/man2/mmap.2:689
6323 #, no-wrap
6324 msgid ""
6325 "    if (argc == 4) {\n"
6326 "        length = atoi(argv[3]);\n"
6327 "        if (offset + length E<gt> sb.st_size)\n"
6328 "            length = sb.st_size - offset;\n"
6329 "                /* Can\\(aqt display bytes past end of file */\n"
6330 msgstr ""
6331 "    if (argc == 4) {\n"
6332 "        length = atoi(argv[3]);\n"
6333 "        if (offset + length E<gt> sb.st_size)\n"
6334 "            length = sb.st_size - offset;\n"
6335 "                /* Can\\(aqt display bytes past end of file */\n"
6336
6337 #. type: Plain text
6338 #: build/C/man2/mmap.2:693
6339 #, no-wrap
6340 msgid ""
6341 "    } else {    /* No length arg ==E<gt> display to end of file */\n"
6342 "        length = sb.st_size - offset;\n"
6343 "    }\n"
6344 msgstr ""
6345 "    } else {    /* No length arg ==E<gt> display to end of file */\n"
6346 "        length = sb.st_size - offset;\n"
6347 "    }\n"
6348
6349 #. type: Plain text
6350 #: build/C/man2/mmap.2:698
6351 #, no-wrap
6352 msgid ""
6353 "    addr = mmap(NULL, length + offset - pa_offset, PROT_READ,\n"
6354 "                MAP_PRIVATE, fd, pa_offset);\n"
6355 "    if (addr == MAP_FAILED)\n"
6356 "        handle_error(\"mmap\");\n"
6357 msgstr ""
6358 "    addr = mmap(NULL, length + offset - pa_offset, PROT_READ,\n"
6359 "                MAP_PRIVATE, fd, pa_offset);\n"
6360 "    if (addr == MAP_FAILED)\n"
6361 "        handle_error(\"mmap\");\n"
6362
6363 #. type: Plain text
6364 #: build/C/man2/mmap.2:703
6365 #, no-wrap
6366 msgid ""
6367 "    s = write(STDOUT_FILENO, addr + offset - pa_offset, length);\n"
6368 "    if (s != length) {\n"
6369 "        if (s == -1)\n"
6370 "            handle_error(\"write\");\n"
6371 msgstr ""
6372 "    s = write(STDOUT_FILENO, addr + offset - pa_offset, length);\n"
6373 "    if (s != length) {\n"
6374 "        if (s == -1)\n"
6375 "            handle_error(\"write\");\n"
6376
6377 #. type: Plain text
6378 #: build/C/man2/mmap.2:707
6379 #, no-wrap
6380 msgid ""
6381 "        fprintf(stderr, \"partial write\");\n"
6382 "        exit(EXIT_FAILURE);\n"
6383 "    }\n"
6384 msgstr ""
6385 "        fprintf(stderr, \"partial write\");\n"
6386 "        exit(EXIT_FAILURE);\n"
6387 "    }\n"
6388
6389 #. type: Plain text
6390 #: build/C/man2/mmap.2:724
6391 msgid ""
6392 "B<getpagesize>(2), B<mincore>(2), B<mlock>(2), B<mmap2>(2), B<mprotect>(2), "
6393 "B<mremap>(2), B<msync>(2), B<remap_file_pages>(2), B<setrlimit>(2), "
6394 "B<shmat>(2), B<shm_open>(3), B<shm_overview>(7)"
6395 msgstr ""
6396 "B<getpagesize>(2), B<mincore>(2), B<mlock>(2), B<mmap2>(2), B<mprotect>(2), "
6397 "B<mremap>(2), B<msync>(2), B<remap_file_pages>(2), B<setrlimit>(2), "
6398 "B<shmat>(2), B<shm_open>(3), B<shm_overview>(7)"
6399
6400 #. type: Plain text
6401 #: build/C/man2/mmap.2:731
6402 msgid ""
6403 "The descriptions of the following files in B<proc>(5): I</proc/[pid]/maps>, "
6404 "I</proc/[pid]/map_files>, and I</proc/[pid]/smaps>."
6405 msgstr ""
6406 "B<proc>(5) の I</proc/[pid]/maps>, I</proc/[pid]/map_files>, I</proc/[pid]/"
6407 "smaps> の説明。"
6408
6409 #. type: Plain text
6410 #: build/C/man2/mmap.2:736 build/C/man2/msync.2:151
6411 msgid "B.O. Gallmeister, POSIX.4, O'Reilly, pp. 128-129 and 389-391."
6412 msgstr "B.O. Gallmeister, POSIX.4, O'Reilly, pp. 128-129 and 389-391."
6413
6414 #. type: TH
6415 #: build/C/man2/mmap2.2:29
6416 #, no-wrap
6417 msgid "MMAP2"
6418 msgstr "MMAP2"
6419
6420 #. type: TH
6421 #: build/C/man2/mmap2.2:29
6422 #, no-wrap
6423 msgid "2014-02-25"
6424 msgstr "2014-02-25"
6425
6426 #. type: Plain text
6427 #: build/C/man2/mmap2.2:32
6428 msgid "mmap2 - map files or devices into memory"
6429 msgstr "mmap2 - ファイルやデバイスをメモリにマップする"
6430
6431 #. type: Plain text
6432 #: build/C/man2/mmap2.2:38
6433 #, no-wrap
6434 msgid ""
6435 "B<void *mmap2(void *>I<addr>B<, size_t >I<length>B<, int >I<prot>B<,>\n"
6436 "B<             int >I<flags>B<, int >I<fd>B<, off_t >I<pgoffset>B<);>\n"
6437 msgstr ""
6438 "B<void *mmap2(void *>I<addr>B<, size_t >I<length>B<, int >I<prot>B<,>\n"
6439 "B<            int >I<flags>B<, int >I<fd>B<, off_t >I<pgoffset>B<);>\n"
6440
6441 #. type: Plain text
6442 #: build/C/man2/mmap2.2:43
6443 msgid ""
6444 "This is probably not the system call that you are interested in; instead, "
6445 "see B<mmap>(2), which describes the glibc wrapper function that invokes this "
6446 "system call."
6447 msgstr ""
6448 "これはおそらくあなたが興味のあるシステムコールではないだろう。代わりに\n"
6449 "B<mmap>(2) を見るとよい。そのページにはこのシステムコールを起動する glibc "
6450 "の\n"
6451 "ラッパー関数についての説明がある。"
6452
6453 #. type: Plain text
6454 #: build/C/man2/mmap2.2:54
6455 msgid ""
6456 "The B<mmap2>()  system call provides the same interface as B<mmap>(2), "
6457 "except that the final argument specifies the offset into the file in 4096-"
6458 "byte units (instead of bytes, as is done by B<mmap>(2)).  This enables "
6459 "applications that use a 32-bit I<off_t> to map large files (up to 2^44 "
6460 "bytes)."
6461 msgstr ""
6462 "B<mmap2>() システムコールは B<mmap>(2) と同じインターフェースを提供する。た"
6463 "だ\n"
6464 "し、最後の引き数には、ファイルのオフセットを (B<mmap>(2) が行っている、バイ"
6465 "ト\n"
6466 "単位ではなく) 4096 バイトを単位として指定する。 これにより、32 ビットの\n"
6467 "I<off_t> を使うアプリケーションで (2^44 バイトまでの) 大きなファイルをマッ"
6468 "プ\n"
6469 "できるようになる。"
6470
6471 #. type: Plain text
6472 #: build/C/man2/mmap2.2:61
6473 msgid ""
6474 "On success, B<mmap2>()  returns a pointer to the mapped area.  On error, -1 "
6475 "is returned and I<errno> is set appropriately."
6476 msgstr ""
6477 "成功した場合、 B<mmap2>()  はマップされた領域へのポインタを返す。 エラーの場"
6478 "合は -1 が返されて、 I<errno> が適切に設定される。"
6479
6480 #. type: Plain text
6481 #: build/C/man2/mmap2.2:65
6482 msgid "Problem with getting the data from user space."
6483 msgstr "ユーザ空間からデータを取得するときに問題があった。"
6484
6485 #. type: Plain text
6486 #: build/C/man2/mmap2.2:70
6487 msgid ""
6488 "(Various platforms where the page size is not 4096 bytes.)  I<offset\\ *\\ "
6489 "4096> is not a multiple of the system page size."
6490 msgstr ""
6491 "(ページサイズが 4096 バイトでないプラットフォームにおいて)  I<offset\\ *\\ "
6492 "4096> がシステムのページサイズの倍数ではない。"
6493
6494 #. type: Plain text
6495 #: build/C/man2/mmap2.2:74
6496 msgid "B<mmap2>()  can also return any of the errors described in B<mmap>(2)."
6497 msgstr "B<mmap2>() は B<mmap>(2) に載っているエラーを返すこともある。"
6498
6499 #. type: Plain text
6500 #: build/C/man2/mmap2.2:77
6501 msgid "B<mmap2>()  is available since Linux 2.3.31."
6502 msgstr "B<mmap2>()  は、Linux 2.3.31 以降で使用可能である。"
6503
6504 #. type: Plain text
6505 #: build/C/man2/mmap2.2:79 build/C/man2/subpage_prot.2:98
6506 msgid "This system call is Linux-specific."
6507 msgstr "このシステムコールは Linux 独自である。"
6508
6509 #. type: Plain text
6510 #: build/C/man2/mmap2.2:86
6511 msgid ""
6512 "On architectures where this system call is present, the glibc B<mmap>()  "
6513 "wrapper function invokes this system call rather than the B<mmap>(2)  system "
6514 "call."
6515 msgstr ""
6516 "このシステムコールが存在するアーキテクチャーでは、glibc の B<mmap>()  のラッ"
6517 "パー関数は、 B<mmap>(2)  システムコールではなく、このシステムコール "
6518 "(B<mmap2>(2))  を起動する。"
6519
6520 #. type: Plain text
6521 #: build/C/man2/mmap2.2:88
6522 msgid "This system call does not exist on x86-64."
6523 msgstr "このシステムコールは x86-64 には存在しない。"
6524
6525 #.  ia64 can have page sizes ranging from 4kB to 64kB.
6526 #.  On cris, it looks like the unit might also be the page size,
6527 #.  which is 8192 bytes. -- mtk, June 2007
6528 #. type: Plain text
6529 #: build/C/man2/mmap2.2:95
6530 msgid ""
6531 "On ia64, the unit for I<offset> is actually the system page size, rather "
6532 "than 4096 bytes."
6533 msgstr ""
6534 "ia64 では、 I<offset> の単位は、実際にはシステムのページサイズであり、 4096 "
6535 "バイトではない。"
6536
6537 #. type: Plain text
6538 #: build/C/man2/mmap2.2:101
6539 msgid ""
6540 "B<getpagesize>(2), B<mmap>(2), B<mremap>(2), B<msync>(2), B<shm_open>(3)"
6541 msgstr ""
6542 "B<getpagesize>(2), B<mmap>(2), B<mremap>(2), B<msync>(2), B<shm_open>(3)"
6543
6544 #. type: TH
6545 #: build/C/man2/mprotect.2:39
6546 #, no-wrap
6547 msgid "MPROTECT"
6548 msgstr "MPROTECT"
6549
6550 #. type: TH
6551 #: build/C/man2/mprotect.2:39
6552 #, no-wrap
6553 msgid "2014-01-05"
6554 msgstr "2014-01-05"
6555
6556 #. type: Plain text
6557 #: build/C/man2/mprotect.2:42
6558 msgid "mprotect - set protection on a region of memory"
6559 msgstr "mprotect - メモリ領域の保護を設定する"
6560
6561 #. type: Plain text
6562 #: build/C/man2/mprotect.2:47
6563 #, no-wrap
6564 msgid "B<int mprotect(void *>I<addr>B<, size_t >I<len>B<, int >I<prot>B<);>\n"
6565 msgstr "B<int mprotect(void *>I<addr>B<, size_t >I<len>B<, int >I<prot>B<);>\n"
6566
6567 #. type: Plain text
6568 #: build/C/man2/mprotect.2:55
6569 msgid ""
6570 "B<mprotect>()  changes protection for the calling process's memory page(s)  "
6571 "containing any part of the address range in the interval [I<addr>,\\ I<addr>"
6572 "+I<len>-1].  I<addr> must be aligned to a page boundary."
6573 msgstr ""
6574 "B<mprotect>()  は、区間 [I<addr>,\\ I<addr>+I<len>-1] のアドレス範囲を含む 呼"
6575 "び出し元のプロセスのメモリページのアクセス保護を変更する。 I<addr> はページ境"
6576 "界に一致していなければならない。"
6577
6578 #. type: Plain text
6579 #: build/C/man2/mprotect.2:60
6580 msgid ""
6581 "If the calling process tries to access memory in a manner that violates the "
6582 "protection, then the kernel generates a B<SIGSEGV> signal for the process."
6583 msgstr ""
6584 "呼び出し元のプロセスがアクセス保護に違反するようなメモリアクセスを 行おうとす"
6585 "ると、カーネルはシグナル B<SIGSEGV> をそのプロセスに対して生成する。"
6586
6587 #. type: Plain text
6588 #: build/C/man2/mprotect.2:65
6589 msgid ""
6590 "I<prot> is either B<PROT_NONE> or a bitwise-or of the other values in the "
6591 "following list:"
6592 msgstr ""
6593 "I<prot> には、 B<PROT_NONE> か、以下のリストの B<PROT_NONE> 以外の値をビット"
6594 "毎の論理和 (bitwize-or) で指定する:"
6595
6596 #. type: Plain text
6597 #: build/C/man2/mprotect.2:68
6598 msgid "The memory cannot be accessed at all."
6599 msgstr "そのメモリには全くアクセスできない。"
6600
6601 #. type: Plain text
6602 #: build/C/man2/mprotect.2:71
6603 msgid "The memory can be read."
6604 msgstr "そのメモリを読み取ることができる。"
6605
6606 #. type: Plain text
6607 #: build/C/man2/mprotect.2:74
6608 msgid "The memory can be modified."
6609 msgstr "そのメモリを変更できる。"
6610
6611 #. type: Plain text
6612 #: build/C/man2/mprotect.2:77
6613 msgid "The memory can be executed."
6614 msgstr "そのメモリは実行可能である。"
6615
6616 #. type: Plain text
6617 #: build/C/man2/mprotect.2:84
6618 msgid ""
6619 "On success, B<mprotect>()  returns zero.  On error, -1 is returned, and "
6620 "I<errno> is set appropriately."
6621 msgstr ""
6622 "成功した場合、 B<mprotect>()  は 0 を返す。エラーの場合は -1 が返り、 "
6623 "I<errno> が適切に設定される。"
6624
6625 #. type: Plain text
6626 #: build/C/man2/mprotect.2:94
6627 msgid ""
6628 "The memory cannot be given the specified access.  This can happen, for "
6629 "example, if you B<mmap>(2)  a file to which you have read-only access, then "
6630 "ask B<mprotect>()  to mark it B<PROT_WRITE>."
6631 msgstr ""
6632 "指定されたアクセスをメモリに設定することができない。 これは、例えば ファイル"
6633 "を読み取り専用で B<mmap>(2)  しており、その領域に対して B<mprotect>()  を呼び"
6634 "出して B<PROT_WRITE> に設定しようとした場合に発生する。"
6635
6636 #.  Or: both PROT_GROWSUP and PROT_GROWSDOWN were specified in 'prot'.
6637 #. type: Plain text
6638 #: build/C/man2/mprotect.2:99
6639 msgid ""
6640 "I<addr> is not a valid pointer, or not a multiple of the system page size."
6641 msgstr ""
6642 "I<addr> が有効なポインタでないか、 システムのページサイズの倍数でない。"
6643
6644 #. type: Plain text
6645 #: build/C/man2/mprotect.2:102
6646 msgid "Internal kernel structures could not be allocated."
6647 msgstr "カーネル内部の構造体を割り当てることができなかった。"
6648
6649 #. type: Plain text
6650 #: build/C/man2/mprotect.2:112
6651 msgid ""
6652 "Addresses in the range [I<addr>, I<addr>+I<len>-1] are invalid for the "
6653 "address space of the process, or specify one or more pages that are not "
6654 "mapped.  (Before kernel 2.4.19, the error B<EFAULT> was incorrectly produced "
6655 "for these cases.)"
6656 msgstr ""
6657 "[I<addr>, I<addr>+I<len>-1] という範囲のアドレスがプロセスのアドレス空間とし"
6658 "て不正であるか、 その範囲のアドレスがマップされていない 1 つ以上のページを指"
6659 "している (カーネル 2.4.19 より前では、この状況でエラー B<EFAULT> が間違って生"
6660 "成されていた)。"
6661
6662 #.  SVr4 defines an additional error
6663 #.  code EAGAIN. The SVr4 error conditions don't map neatly onto Linux's.
6664 #. type: Plain text
6665 #: build/C/man2/mprotect.2:121
6666 msgid ""
6667 "SVr4, POSIX.1-2001.  POSIX says that the behavior of B<mprotect>()  is "
6668 "unspecified if it is applied to a region of memory that was not obtained via "
6669 "B<mmap>(2)."
6670 msgstr ""
6671 "SVr4, POSIX.1-2001.  POSIX では、 B<mmap>(2)  経由で獲得していないメモリ領域"
6672 "に対して B<mprotect>()  を行った場合の B<mprotect>()  の動作は未定義であると"
6673 "されている。"
6674
6675 #. type: Plain text
6676 #: build/C/man2/mprotect.2:128
6677 msgid ""
6678 "On Linux it is always permissible to call B<mprotect>()  on any address in a "
6679 "process's address space (except for the kernel vsyscall area).  In "
6680 "particular it can be used to change existing code mappings to be writable."
6681 msgstr ""
6682 "Linux では、(カーネル vsyscall 領域以外の)  任意のプロセスアドレス空間に対し"
6683 "て B<mprotect>()  を呼び出すことが、常に許されている。 これは特に既存のコード"
6684 "マッピングを書き込み可能にするために使われる。"
6685
6686 #. type: Plain text
6687 #: build/C/man2/mprotect.2:138
6688 msgid ""
6689 "Whether B<PROT_EXEC> has any effect different from B<PROT_READ> is "
6690 "architecture- and kernel version-dependent.  On some hardware architectures "
6691 "(e.g., i386), B<PROT_WRITE> implies B<PROT_READ>."
6692 msgstr ""
6693 "B<PROT_EXEC> が B<PROT_READ> と異なる影響を持つか否かは、アーキテクチャとカー"
6694 "ネルのバージョンに依存する。 (i386 などの) いくつかのアーキテクチャでは、 "
6695 "B<PROT_WRITE> をセットすると、暗黙のうちに B<PROT_READ> がセットされる。"
6696
6697 #. type: Plain text
6698 #: build/C/man2/mprotect.2:147
6699 msgid ""
6700 "POSIX.1-2001 says that an implementation may permit access other than that "
6701 "specified in I<prot>, but at a minimum can allow write access only if "
6702 "B<PROT_WRITE> has been set, and must not allow any access if B<PROT_NONE> "
6703 "has been set."
6704 msgstr ""
6705 "POSIX.1-2001 では、 I<prot> で指定されていないアクセスを許可する実装を認めて"
6706 "いる。 ただし、最低限、 B<PROT_WRITE> がセットされている場合にのみ書き込みア"
6707 "クセスが許可され、 B<PROT_NONE> がセットされている場合にはアクセスは許可され"
6708 "ない点だけは 満たす必要がある。"
6709
6710 #. type: Plain text
6711 #: build/C/man2/mprotect.2:153
6712 msgid ""
6713 "The program below allocates four pages of memory, makes the third of these "
6714 "pages read-only, and then executes a loop that walks upward through the "
6715 "allocated region modifying bytes."
6716 msgstr ""
6717 "以下のプログラムは、メモリページを 4つ確保し、そのうち 3番目のページを 読み込"
6718 "み専用に設定する。その後で、確保した領域のアドレスの小さい方から 大きな方に向"
6719 "かって順番にバイト値を変更するループを実行する。"
6720
6721 #. type: Plain text
6722 #: build/C/man2/mprotect.2:156
6723 msgid ""
6724 "An example of what we might see when running the program is the following:"
6725 msgstr "プログラムを実行した場合の一例を以下に示す。"
6726
6727 #. type: Plain text
6728 #: build/C/man2/mprotect.2:162
6729 #, no-wrap
6730 msgid ""
6731 "$B< ./a.out>\n"
6732 "Start of region:        0x804c000\n"
6733 "Got SIGSEGV at address: 0x804e000\n"
6734 msgstr ""
6735 "$B< ./a.out>\n"
6736 "Start of region:        0x804c000\n"
6737 "Got SIGSEGV at address: 0x804e000\n"
6738
6739 #. type: Plain text
6740 #: build/C/man2/mprotect.2:174
6741 #, no-wrap
6742 msgid ""
6743 "#include E<lt>unistd.hE<gt>\n"
6744 "#include E<lt>signal.hE<gt>\n"
6745 "#include E<lt>stdio.hE<gt>\n"
6746 "#include E<lt>malloc.hE<gt>\n"
6747 "#include E<lt>stdlib.hE<gt>\n"
6748 "#include E<lt>errno.hE<gt>\n"
6749 "#include E<lt>sys/mman.hE<gt>\n"
6750 msgstr ""
6751 "#include E<lt>unistd.hE<gt>\n"
6752 "#include E<lt>signal.hE<gt>\n"
6753 "#include E<lt>stdio.hE<gt>\n"
6754 "#include E<lt>malloc.hE<gt>\n"
6755 "#include E<lt>stdlib.hE<gt>\n"
6756 "#include E<lt>errno.hE<gt>\n"
6757 "#include E<lt>sys/mman.hE<gt>\n"
6758
6759 #. type: Plain text
6760 #: build/C/man2/mprotect.2:179
6761 #, no-wrap
6762 msgid "static char *buffer;\n"
6763 msgstr "static char *buffer;\n"
6764
6765 #. type: Plain text
6766 #: build/C/man2/mprotect.2:187
6767 #, no-wrap
6768 msgid ""
6769 "static void\n"
6770 "handler(int sig, siginfo_t *si, void *unused)\n"
6771 "{\n"
6772 "    printf(\"Got SIGSEGV at address: 0x%lx\\en\",\n"
6773 "            (long) si-E<gt>si_addr);\n"
6774 "    exit(EXIT_FAILURE);\n"
6775 "}\n"
6776 msgstr ""
6777 "static void\n"
6778 "handler(int sig, siginfo_t *si, void *unused)\n"
6779 "{\n"
6780 "    printf(\"Got SIGSEGV at address: 0x%lx\\en\",\n"
6781 "            (long) si-E<gt>si_addr);\n"
6782 "    exit(EXIT_FAILURE);\n"
6783 "}\n"
6784
6785 #. type: Plain text
6786 #: build/C/man2/mprotect.2:194
6787 #, no-wrap
6788 msgid ""
6789 "int\n"
6790 "main(int argc, char *argv[])\n"
6791 "{\n"
6792 "    char *p;\n"
6793 "    int pagesize;\n"
6794 "    struct sigaction sa;\n"
6795 msgstr ""
6796 "int\n"
6797 "main(void)\n"
6798 "{\n"
6799 "    char *p;\n"
6800 "    int pagesize;\n"
6801 "    struct sigaction sa;\n"
6802
6803 #. type: Plain text
6804 #: build/C/man2/mprotect.2:200
6805 #, no-wrap
6806 msgid ""
6807 "    sa.sa_flags = SA_SIGINFO;\n"
6808 "    sigemptyset(&sa.sa_mask);\n"
6809 "    sa.sa_sigaction = handler;\n"
6810 "    if (sigaction(SIGSEGV, &sa, NULL) == -1)\n"
6811 "        handle_error(\"sigaction\");\n"
6812 msgstr ""
6813 "    sa.sa_flags = SA_SIGINFO;\n"
6814 "    sigemptyset(&sa.sa_mask);\n"
6815 "    sa.sa_sigaction = handler;\n"
6816 "    if (sigaction(SIGSEGV, &sa, NULL) == -1)\n"
6817 "        handle_error(\"sigaction\");\n"
6818
6819 #. type: Plain text
6820 #: build/C/man2/mprotect.2:204
6821 #, no-wrap
6822 msgid ""
6823 "    pagesize = sysconf(_SC_PAGE_SIZE);\n"
6824 "    if (pagesize == -1)\n"
6825 "        handle_error(\"sysconf\");\n"
6826 msgstr ""
6827 "    pagesize = sysconf(_SC_PAGE_SIZE);\n"
6828 "    if (pagesize == -1)\n"
6829 "        handle_error(\"sysconf\");\n"
6830
6831 #. type: Plain text
6832 #: build/C/man2/mprotect.2:207
6833 #, no-wrap
6834 msgid ""
6835 "    /* Allocate a buffer aligned on a page boundary;\n"
6836 "       initial protection is PROT_READ | PROT_WRITE */\n"
6837 msgstr ""
6838 "    /* Allocate a buffer aligned on a page boundary;\n"
6839 "       initial protection is PROT_READ | PROT_WRITE */\n"
6840
6841 #. type: Plain text
6842 #: build/C/man2/mprotect.2:211
6843 #, no-wrap
6844 msgid ""
6845 "    buffer = memalign(pagesize, 4 * pagesize);\n"
6846 "    if (buffer == NULL)\n"
6847 "        handle_error(\"memalign\");\n"
6848 msgstr ""
6849 "    buffer = memalign(pagesize, 4 * pagesize);\n"
6850 "    if (buffer == NULL)\n"
6851 "        handle_error(\"memalign\");\n"
6852
6853 #. type: Plain text
6854 #: build/C/man2/mprotect.2:213
6855 #, no-wrap
6856 msgid "    printf(\"Start of region:        0x%lx\\en\", (long) buffer);\n"
6857 msgstr "    printf(\"Start of region:        0x%lx\\en\", (long) buffer);\n"
6858
6859 #. type: Plain text
6860 #: build/C/man2/mprotect.2:217
6861 #, no-wrap
6862 msgid ""
6863 "    if (mprotect(buffer + pagesize * 2, pagesize,\n"
6864 "                PROT_READ) == -1)\n"
6865 "        handle_error(\"mprotect\");\n"
6866 msgstr ""
6867 "    if (mprotect(buffer + pagesize * 2, pagesize,\n"
6868 "                PROT_READ) == -1)\n"
6869 "        handle_error(\"mprotect\");\n"
6870
6871 #. type: Plain text
6872 #: build/C/man2/mprotect.2:220
6873 #, no-wrap
6874 msgid ""
6875 "    for (p = buffer ; ; )\n"
6876 "        *(p++) = \\(aqa\\(aq;\n"
6877 msgstr ""
6878 "    for (p = buffer ; ; )\n"
6879 "        *(p++) = \\(aqa\\(aq;\n"
6880
6881 #. type: Plain text
6882 #: build/C/man2/mprotect.2:224
6883 #, no-wrap
6884 msgid ""
6885 "    printf(\"Loop completed\\en\");     /* Should never happen */\n"
6886 "    exit(EXIT_SUCCESS);\n"
6887 "}\n"
6888 msgstr ""
6889 "    printf(\"Loop completed\\en\");     /* Should never happen */\n"
6890 "    exit(EXIT_SUCCESS);\n"
6891 "}\n"
6892
6893 #. type: Plain text
6894 #: build/C/man2/mprotect.2:228
6895 msgid "B<mmap>(2), B<sysconf>(3)"
6896 msgstr "B<mmap>(2), B<sysconf>(3)"
6897
6898 #. type: TH
6899 #: build/C/man2/mremap.2:30
6900 #, no-wrap
6901 msgid "MREMAP"
6902 msgstr "MREMAP"
6903
6904 #. type: TH
6905 #: build/C/man2/mremap.2:30
6906 #, no-wrap
6907 msgid "2010-06-10"
6908 msgstr "2010-06-10"
6909
6910 #. type: Plain text
6911 #: build/C/man2/mremap.2:33
6912 msgid "mremap - remap a virtual memory address"
6913 msgstr "mremap - 仮想メモリ・アドレスを再マッピングする"
6914
6915 #. type: Plain text
6916 #: build/C/man2/mremap.2:36
6917 #, no-wrap
6918 msgid "B<#define _GNU_SOURCE>         /* See feature_test_macros(7) */\n"
6919 msgstr "B<#define _GNU_SOURCE>         /* feature_test_macros(7) 参照 */\n"
6920
6921 #. type: Plain text
6922 #: build/C/man2/mremap.2:41
6923 #, no-wrap
6924 msgid ""
6925 "B<void *mremap(void *>I<old_address>B<, size_t >I<old_size>B<,>\n"
6926 "B<             size_t >I<new_size>B<, int >I<flags>B<, ... /* void *>I<new_address>B< */);>\n"
6927 msgstr ""
6928 "B<void *mremap(void *>I<old_address>B<, size_t >I<old_size>B<,>\n"
6929 "B<             size_t >I<new_size>B<, int >I<flags>B<, ... /* void *>I<new_address>B< */);>\n"
6930
6931 #. type: Plain text
6932 #: build/C/man2/mremap.2:47
6933 msgid ""
6934 "B<mremap>()  expands (or shrinks) an existing memory mapping, potentially "
6935 "moving it at the same time (controlled by the I<flags> argument and the "
6936 "available virtual address space)."
6937 msgstr ""
6938 "B<mremap>()  は既存のメモリ・マッピングの拡張 (または縮小) を行う。 同時に移"
6939 "動されることもある (I<flags> 引き数と利用可能な仮想アドレス空間によって決ま"
6940 "る)。"
6941
6942 #. type: Plain text
6943 #: build/C/man2/mremap.2:61
6944 msgid ""
6945 "I<old_address> is the old address of the virtual memory block that you want "
6946 "to expand (or shrink).  Note that I<old_address> has to be page aligned.  "
6947 "I<old_size> is the old size of the virtual memory block.  I<new_size> is the "
6948 "requested size of the virtual memory block after the resize.  An optional "
6949 "fifth argument, I<new_address>, may be provided; see the description of "
6950 "B<MREMAP_FIXED> below."
6951 msgstr ""
6952 "I<old_address> は拡張 (または縮小) しようとする仮想メモリ・ブロック の元のア"
6953 "ドレスである。I<old_address> はページ境界に合っていなければ ならない点に注意"
6954 "すること。I<old_size> は元の仮想メモリ・ブロックの サイズである。 "
6955 "I<new_size> は要求する変更後の仮想メモリ・ブロックのサイズである。 5 番目の引"
6956 "き数として I<new_address> を指定することができる。下記の B<MREMAP_FIXED> の説"
6957 "明を参照のこと。"
6958
6959 #. type: Plain text
6960 #: build/C/man2/mremap.2:73
6961 msgid ""
6962 "In Linux the memory is divided into pages.  A user process has (one or)  "
6963 "several linear virtual memory segments.  Each virtual memory segment has one "
6964 "or more mappings to real memory pages (in the page table).  Each virtual "
6965 "memory segment has its own protection (access rights), which may cause a "
6966 "segmentation violation if the memory is accessed incorrectly (e.g., writing "
6967 "to a read-only segment).  Accessing virtual memory outside of the segments "
6968 "will also cause a segmentation violation."
6969 msgstr ""
6970 "Linux ではメモリはページに分割される。ユーザー・プロセスは (一つまたは)  複数"
6971 "のリニアな仮想メモリセグメントを持つ。 それぞれの仮想メモリセグメントは一つ以"
6972 "上の実メモリ・ページ にマッピングされている (マッピング情報はページ・テーブル"
6973 "で管理される)。 仮想メモリセグメントにはセグメント毎の保護 (アクセス権) が設"
6974 "定されており、 メモリが不正にアクセスされた場合 (例えば読み込み専用のセグメン"
6975 "トに 書き込んだ場合)、セグメンテーション侵害 (segmentation violation) を 引き"
6976 "起こす。また、セグメント外の仮想メモリにアクセスした場合にも セグメンテーショ"
6977 "ン侵害が発生する。"
6978
6979 #. type: Plain text
6980 #: build/C/man2/mremap.2:81
6981 msgid ""
6982 "B<mremap>()  uses the Linux page table scheme.  B<mremap>()  changes the "
6983 "mapping between virtual addresses and memory pages.  This can be used to "
6984 "implement a very efficient B<realloc>(3)."
6985 msgstr ""
6986 "B<mremap>()  は Linux のページ・テーブル方式を使用する。 B<mremap>()  は仮想"
6987 "アドレスとメモリ・ページのマッピングを変更する。これは非常に効率的な "
6988 "B<realloc>(3)  を実装するのに使用されている。"
6989
6990 #. type: Plain text
6991 #: build/C/man2/mremap.2:83
6992 msgid "The I<flags> bit-mask argument may be 0, or include the following flag:"
6993 msgstr "I<flags> ビットマスク引数は 0 または以下のフラグを含む:"
6994
6995 #. type: TP
6996 #: build/C/man2/mremap.2:83
6997 #, no-wrap
6998 msgid "B<MREMAP_MAYMOVE>"
6999 msgstr "B<MREMAP_MAYMOVE>"
7000
7001 #. type: Plain text
7002 #: build/C/man2/mremap.2:95
7003 msgid ""
7004 "By default, if there is not sufficient space to expand a mapping at its "
7005 "current location, then B<mremap>()  fails.  If this flag is specified, then "
7006 "the kernel is permitted to relocate the mapping to a new virtual address, if "
7007 "necessary.  If the mapping is relocated, then absolute pointers into the old "
7008 "mapping location become invalid (offsets relative to the starting address of "
7009 "the mapping should be employed)."
7010 msgstr ""
7011 "デフォルトでは、現在の位置にマッピングを拡張するための 十分な空きがなければ "
7012 "B<mremap>()  は失敗する。 このフラグが指定されると、カーネルは必要があれば"
7013 "マッピングを 新しい仮想アドレスに再配置することができる マッピングが再配置さ"
7014 "れると、古いマッピング位置への絶対ポインタは 無効になる (マッピングの開始アド"
7015 "レスからの相対オフセットは有効のままである)。"
7016
7017 #. type: TP
7018 #: build/C/man2/mremap.2:95
7019 #, no-wrap
7020 msgid "B<MREMAP_FIXED> (since Linux 2.3.31)"
7021 msgstr "B<MREMAP_FIXED> (Linux 2.3.31 以降)"
7022
7023 #. type: Plain text
7024 #: build/C/man2/mremap.2:117
7025 msgid ""
7026 "This flag serves a similar purpose to the B<MAP_FIXED> flag of B<mmap>(2).  "
7027 "If this flag is specified, then B<mremap>()  accepts a fifth argument, I<void"
7028 "\\ *new_address>, which specifies a page-aligned address to which the "
7029 "mapping must be moved.  Any previous mapping at the address range specified "
7030 "by I<new_address> and I<new_size> is unmapped.  If B<MREMAP_FIXED> is "
7031 "specified, then B<MREMAP_MAYMOVE> must also be specified."
7032 msgstr ""
7033 "このフラグは B<mmap>(2)  の B<MAP_FIXED> フラグと似たような目的で用いられ"
7034 "る。 このフラグが指定されると、 B<mremap>()  は 5 番目の引き数 I<void\\ "
7035 "*new_address> を受け取り、この引数はマッピングが移動されるべきアドレスを指定"
7036 "する。 このアドレスはページ境界に合っていなければならない。 I<new_address> "
7037 "と I<new_size> で指定されるアドレス範囲に過去のマッピングがあった場合、 その"
7038 "マッピングはアンマップされる (unmapped)。 B<MREMAP_FIXED> を指定した場合は、 "
7039 "B<MREMAP_MAYMOVE> も指定しなければならない。"
7040
7041 #. type: Plain text
7042 #: build/C/man2/mremap.2:127
7043 msgid ""
7044 "If the memory segment specified by I<old_address> and I<old_size> is locked "
7045 "(using B<mlock>(2)  or similar), then this lock is maintained when the "
7046 "segment is resized and/or relocated.  As a consequence, the amount of memory "
7047 "locked by the process may change."
7048 msgstr ""
7049 "I<old_address> と I<old_size> で指定されるメモリセグメントが (B<mlock>(2)  や"
7050 "同様のもので) ロックされている場合、セグメントのサイズが変わったり 再配置され"
7051 "たりした時にロックも維持される。 その結果、プロセスによってロックされるメモリ"
7052 "の量は変化する。"
7053
7054 #. type: Plain text
7055 #: build/C/man2/mremap.2:135
7056 msgid ""
7057 "On success B<mremap>()  returns a pointer to the new virtual memory area.  "
7058 "On error, the value B<MAP_FAILED> (that is, I<(void\\ *)\\ -1>) is returned, "
7059 "and I<errno> is set appropriately."
7060 msgstr ""
7061 "成功した場合は B<mremap>()  は新しい仮想メモリ領域へのポインタを返す。 エラー"
7062 "の場合は B<MAP_FAILED> (すなわち I<(void\\ *)\\ -1>) が返され、 I<errno> が適"
7063 "切に設定される。"
7064
7065 #. type: Plain text
7066 #: build/C/man2/mremap.2:142
7067 msgid ""
7068 "The caller tried to expand a memory segment that is locked, but this was not "
7069 "possible without exceeding the B<RLIMIT_MEMLOCK> resource limit."
7070 msgstr ""
7071 "呼び出し元がロックされているメモリセグメントを拡張しようとしたが、 "
7072 "B<RLIMIT_MEMLOCK> リソース制限を越えずにこれを行うことができない。"
7073
7074 #. type: Plain text
7075 #: build/C/man2/mremap.2:151
7076 msgid ""
7077 "\"Segmentation fault.\" Some address in the range I<old_address> to "
7078 "I<old_address>+I<old_size> is an invalid virtual memory address for this "
7079 "process.  You can also get B<EFAULT> even if there exist mappings that cover "
7080 "the whole address space requested, but those mappings are of different types."
7081 msgstr ""
7082 "「セグメンテーション違反(segmentation fault)」 I<old_address> から "
7083 "I<old_address>+I<old_size> の 範囲のアドレスのどれかがこのプロセスにおいて不"
7084 "正な仮想メモリ・アドレスである。 たとえ要求したアドレス空間全体を含むような"
7085 "マッピングがあったとしても、 それらのマッピングが異なった型ならば B<EFAULT> "
7086 "を受け取るだろう。"
7087
7088 #. type: Plain text
7089 #: build/C/man2/mremap.2:179
7090 msgid ""
7091 "An invalid argument was given.  Possible causes are: I<old_address> was not "
7092 "page aligned; a value other than B<MREMAP_MAYMOVE> or B<MREMAP_FIXED> was "
7093 "specified in I<flags>; I<new_size> was zero; I<new_size> or I<new_address> "
7094 "was invalid; or the new address range specified by I<new_address> and "
7095 "I<new_size> overlapped the old address range specified by I<old_address> and "
7096 "I<old_size>; or B<MREMAP_FIXED> was specified without also specifying "
7097 "B<MREMAP_MAYMOVE>."
7098 msgstr ""
7099 "不正な引き数が与えられた。 可能性のある原因は以下の通りである: たいていは "
7100 "I<old_address> がページ境界に 合ってない; I<flags> に B<MREMAP_MAYMOVE> また"
7101 "は B<MREMAP_FIXED> 以外の値が指定されている; I<new_size> がゼロ; I<new_size> "
7102 "または I<new_address> の値が不正; I<new_address> と I<new_size> で指定される"
7103 "新しいアドレス範囲が I<old_address> と I<old_size> で指定される古いアドレス範"
7104 "囲と重なっている; B<MREMAP_FIXED> が指定されているが B<MREMAP_MAYMOVE> が指定"
7105 "されていない。"
7106
7107 #. type: Plain text
7108 #: build/C/man2/mremap.2:185
7109 msgid ""
7110 "The memory area cannot be expanded at the current virtual address, and the "
7111 "B<MREMAP_MAYMOVE> flag is not set in I<flags>.  Or, there is not enough "
7112 "(virtual) memory available."
7113 msgstr ""
7114 "現在の仮想アドレスではメモリ領域が拡張できず、 B<MREMAP_MAYMOVE> フラグが "
7115 "I<flags> に設定されていない。 または十分な (仮想) メモリが存在しない。"
7116
7117 #.  4.2BSD had a (never actually implemented)
7118 #.  .BR mremap (2)
7119 #.  call with completely different semantics.
7120 #. type: Plain text
7121 #: build/C/man2/mremap.2:191
7122 msgid ""
7123 "This call is Linux-specific, and should not be used in programs intended to "
7124 "be portable."
7125 msgstr ""
7126 "このコールは Linux 特有であり、移植を意図したプログラムで 使用すべきではな"
7127 "い。"
7128
7129 #. type: Plain text
7130 #: build/C/man2/mremap.2:199
7131 msgid ""
7132 "Prior to version 2.4, glibc did not expose the definition of "
7133 "B<MREMAP_FIXED>, and the prototype for B<mremap>()  did not allow for the "
7134 "I<new_address> argument."
7135 msgstr ""
7136 "バージョン 2.4 より前の glibc では、 B<MREMAP_FIXED> の定義は公開されておら"
7137 "ず、 B<mremap>()  のプロトタイプは I<new_address> 引き数を取らなかった。"
7138
7139 #. type: Plain text
7140 #: build/C/man2/mremap.2:208
7141 msgid ""
7142 "B<brk>(2), B<getpagesize>(2), B<getrlimit>(2), B<mlock>(2), B<mmap>(2), "
7143 "B<sbrk>(2), B<malloc>(3), B<realloc>(3)"
7144 msgstr ""
7145 "B<brk>(2), B<getpagesize>(2), B<getrlimit>(2), B<mlock>(2), B<mmap>(2), "
7146 "B<sbrk>(2), B<realloc>(3), B<malloc>(3)"
7147
7148 #. type: Plain text
7149 #: build/C/man2/mremap.2:214
7150 msgid ""
7151 "Your favorite text book on operating systems for more information on paged "
7152 "memory (e.g., I<Modern Operating Systems> by Andrew S. Tanenbaum, I<Inside "
7153 "Linux> by Randolf Bentson, I<The Design of the UNIX Operating System> by "
7154 "Maurice J. Bach)"
7155 msgstr ""
7156 "ページ分割されたメモリについてもっと詳しく知りたいならば、あなたのお気に入り"
7157 "のオペレーティングシステムの教科書を参照してほしい (例えば、 I<Modern "
7158 "Operating Systems> by Andrew S. Tanenbaum, I<Inside Linux> by Randolf "
7159 "Bentson, I<The Design of the UNIX Operating System> by Maurice J. Bach.)"
7160
7161 #. type: TH
7162 #: build/C/man2/msync.2:25
7163 #, no-wrap
7164 msgid "MSYNC"
7165 msgstr "MSYNC"
7166
7167 #. type: Plain text
7168 #: build/C/man2/msync.2:28
7169 msgid "msync - synchronize a file with a memory map"
7170 msgstr "msync - ファイルをマップしたメモリと同期させる"
7171
7172 #. type: Plain text
7173 #: build/C/man2/msync.2:32
7174 msgid "B<int msync(void *>I<addr>B<, size_t >I<length>B<, int >I<flags>B<);>"
7175 msgstr "B<int msync(void *>I<addr>B<, size_t >I<length>B<, int >I<flags>B<);>"
7176
7177 #. type: Plain text
7178 #: build/C/man2/msync.2:48
7179 msgid ""
7180 "B<msync>()  flushes changes made to the in-core copy of a file that was "
7181 "mapped into memory using B<mmap>(2)  back to the filesystem.  Without use of "
7182 "this call there is no guarantee that changes are written back before "
7183 "B<munmap>(2)  is called.  To be more precise, the part of the file that "
7184 "corresponds to the memory area starting at I<addr> and having length "
7185 "I<length> is updated."
7186 msgstr ""
7187 "B<msync>()  は B<mmap>(2)  を使ってメモリにマップされたファイルの、 メモリ上"
7188 "のコピーになされた変更をファイルシステムに反映させる。 この関数を使用しない"
7189 "と、 B<munmap>(2)  が呼び出されるまで変更が書き戻される保証はない。 より正確"
7190 "には、ファイルのうち I<addr> から始まり長さ I<length> のメモリ領域に対応する"
7191 "部分が更新される。"
7192
7193 #. type: Plain text
7194 #: build/C/man2/msync.2:68
7195 msgid ""
7196 "The I<flags> argument may have the bits B<MS_ASYNC>, B<MS_SYNC>, and "
7197 "B<MS_INVALIDATE> set, but not both B<MS_ASYNC> and B<MS_SYNC>.  B<MS_ASYNC> "
7198 "specifies that an update be scheduled, but the call returns immediately.  "
7199 "B<MS_SYNC> asks for an update and waits for it to complete.  "
7200 "B<MS_INVALIDATE> asks to invalidate other mappings of the same file (so that "
7201 "they can be updated with the fresh values just written)."
7202 msgstr ""
7203 "I<flags> 引数にはビット B<MS_ASYNC>, B<MS_SYNC>, B<MS_INVALIDATE> を設定する"
7204 "ことができるが、 B<MS_ASYNC> と B<MS_SYNC> を同時に指定することはできない。 "
7205 "B<MS_ASYNC> は更新を予定に組み込むことを表し、呼び出しは直ちに返る。 "
7206 "B<MS_SYNC> は更新を要求し、更新が完了するまで待つ。 B<MS_INVALIDATE> は(たっ"
7207 "た今書き込んだ新しい値でマッピングを更新することができるように)  同じファイル"
7208 "に対する他のマッピングを無効にすることを要求する。"
7209
7210 #. type: Plain text
7211 #: build/C/man2/msync.2:73
7212 msgid ""
7213 "On success, zero is returned.  On error, -1 is returned, and I<errno> is set "
7214 "appropriately."
7215 msgstr ""
7216 "成功した場合、 0 が返る。エラーの場合、 -1 が返り、 I<errno> が適切に設定され"
7217 "る。"
7218
7219 #. type: TP
7220 #: build/C/man2/msync.2:74
7221 #, no-wrap
7222 msgid "B<EBUSY>"
7223 msgstr "B<EBUSY>"
7224
7225 #. type: Plain text
7226 #: build/C/man2/msync.2:80
7227 msgid ""
7228 "B<MS_INVALIDATE> was specified in I<flags>, and a memory lock exists for the "
7229 "specified address range."
7230 msgstr ""
7231 "I flags に B<MS_INVALIDATE> が指定されたが、指定されたアドレス範囲にロックが"
7232 "存在する。"
7233
7234 #. type: Plain text
7235 #: build/C/man2/msync.2:93
7236 msgid ""
7237 "I<addr> is not a multiple of PAGESIZE; or any bit other than B<MS_ASYNC> | "
7238 "B<MS_INVALIDATE> | B<MS_SYNC> is set in I<flags>; or both B<MS_SYNC> and "
7239 "B<MS_ASYNC> are set in I<flags>."
7240 msgstr ""
7241 "I<addr> が PAGESIZE の倍数でない。または、 I<flags> に B<MS_ASYNC>、"
7242 "B<MS_INVALIDATE>、B<MS_SYNC> 以外のビットが設定された。 または、 I<flags> に "
7243 "B<MS_SYNC> と B<MS_ASYNC> の両方が設定された。"
7244
7245 #. type: Plain text
7246 #: build/C/man2/msync.2:96
7247 msgid "The indicated memory (or part of it) was not mapped."
7248 msgstr "指定されたメモリ (またはその一部) がマップされていない。"
7249
7250 #. type: Plain text
7251 #: build/C/man2/msync.2:98 build/C/man3/posix_fallocate.3:110
7252 #: build/C/man3/shm_open.3:253 build/C/man7/shm_overview.7:103
7253 msgid "POSIX.1-2001."
7254 msgstr "POSIX.1-2001."
7255
7256 #. type: Plain text
7257 #: build/C/man2/msync.2:105
7258 msgid ""
7259 "This call was introduced in Linux 1.3.21, and then used B<EFAULT> instead of "
7260 "B<ENOMEM>.  In Linux 2.4.19, this was changed to the POSIX value B<ENOMEM>."
7261 msgstr ""
7262 "この関数は Linux 1.3.21 で導入されたが、 B<ENOMEM> ではなく B<EFAULT> が使わ"
7263 "れていた。 これは Linux 2.4.19 で POSIX における値 B<ENOMEM> に変更された。"
7264
7265 #.  POSIX.1-2001: It shall be defined to -1 or 0 or 200112L.
7266 #.  -1: unavailable, 0: ask using sysconf().
7267 #.  glibc defines them to 1.
7268 #. type: Plain text
7269 #: build/C/man2/msync.2:120
7270 msgid ""
7271 "On POSIX systems on which B<msync>()  is available, both "
7272 "B<_POSIX_MAPPED_FILES> and B<_POSIX_SYNCHRONIZED_IO> are defined in "
7273 "I<E<lt>unistd.hE<gt>> to a value greater than 0.  (See also B<sysconf>(3).)"
7274 msgstr ""
7275 "B<msync>()  が使用可能な POSIX システムでは B<_POSIX_MAPPED_FILES> と "
7276 "B<_POSIX_SYNCHRONIZED_IO> の両方が I<E<lt>unistd.hE<gt>> で 0 より大きい値に"
7277 "定義される。 (B<sysconf>(3)  を参照すること。 )"
7278
7279 #.  commit 204ec841fbea3e5138168edbc3a76d46747cc987
7280 #. type: Plain text
7281 #: build/C/man2/msync.2:147
7282 msgid ""
7283 "According to POSIX, either B<MS_SYNC> or B<MS_ASYNC> must be specified in "
7284 "I<flags>, and indeed failure to include one of these flags will cause "
7285 "B<msync>()  to fail on some systems.  However, Linux permits a call to "
7286 "B<msync>()  that specifies neither of these flags, with semantics that are "
7287 "(currently) equivalent to specifying B<MS_ASYNC>.  (Since Linux 2.6.19, "
7288 "B<MS_ASYNC> is in fact a no-op, since the kernel properly tracks dirty pages "
7289 "and flushes them to storage as necessary.)  Notwithstanding the Linux "
7290 "behavior, portable, future-proof applications should ensure that they "
7291 "specify either B<MS_SYNC> or B<MS_ASYNC> in I<flags>."
7292 msgstr ""
7293 "POSIX では B<MS_SYNC> と B<MS_ASYNC> のいずれかは必ず I<flags> に指定しなけれ"
7294 "ばならないとされており、 実際にこれらのフラグのいずれかを指定しなかった場合 "
7295 "B<msync>() が失敗するシステムもある。 しかし、 Linux ではこれらのフラグのいず"
7296 "れも指定せずに B<msync>() を呼び出すことができ、 その場合の動作は (現在のとこ"
7297 "ろ) B<MS_ASYNC> を指定した場合と等価である。 (Linux 2.6.19 以降では "
7298 "B<MS_ASYNC> は実際には no-op (何もしない命令) である。 これはカーネルが正し"
7299 "く dirty ページを追跡し、必要に応じてストレージにそれらをフラッシュするからで"
7300 "ある。) Linux の動作に関係なく、アプリケーションの移植性を考慮し、将来も確実"
7301 "に動くようにするには、 B<MS_SYNC> か B<MS_ASYNC> のいずれかを必ず I<flags> に"
7302 "指定するようにすべきである。"
7303
7304 #. type: TP
7305 #: build/C/man2/msync.2:149 build/C/man7/shm_overview.7:46
7306 #, no-wrap
7307 msgid "B<mmap>(2)"
7308 msgstr "B<mmap>(2)"
7309
7310 #. type: TH
7311 #: build/C/man3/mtrace.3:25
7312 #, no-wrap
7313 msgid "MTRACE"
7314 msgstr "MTRACE"
7315
7316 #. type: TH
7317 #: build/C/man3/mtrace.3:25
7318 #, no-wrap
7319 msgid "2012-04-18"
7320 msgstr "2012-04-18"
7321
7322 #. type: Plain text
7323 #: build/C/man3/mtrace.3:28
7324 msgid "mtrace, muntrace - malloc tracing"
7325 msgstr "mtrace, muntrace - malloc のトレース"
7326
7327 #. type: Plain text
7328 #: build/C/man3/mtrace.3:30
7329 msgid "B<#include E<lt>mcheck.hE<gt>>"
7330 msgstr "B<#include E<lt>mcheck.hE<gt>>"
7331
7332 #. type: Plain text
7333 #: build/C/man3/mtrace.3:32
7334 msgid "B<void mtrace(void);>"
7335 msgstr "B<void mtrace(void);>"
7336
7337 #. type: Plain text
7338 #: build/C/man3/mtrace.3:34
7339 msgid "B<void muntrace(void);>"
7340 msgstr "B<void muntrace(void);>"
7341
7342 #. type: Plain text
7343 #: build/C/man3/mtrace.3:46
7344 msgid ""
7345 "The B<mtrace>()  function installs hook functions for the memory-allocation "
7346 "functions (B<malloc>(3), B<realloc>(3)  B<memalign>(3), B<free>(3)).  These "
7347 "hook functions record tracing information about memory allocation and "
7348 "deallocation.  The tracing information can be used to discover memory leaks "
7349 "and attempts to free nonallocated memory in a program."
7350 msgstr ""
7351
7352 #. type: Plain text
7353 #: build/C/man3/mtrace.3:57
7354 msgid ""
7355 "The B<muntrace>()  function disables the hook functions installed by "
7356 "B<mtrace>(), so that tracing information is no longer recorded for the "
7357 "memory-allocation functions.  If no hook functions were successfully "
7358 "installed by B<mtrace>(), B<muntrace>()  does nothing."
7359 msgstr ""
7360
7361 #. type: Plain text
7362 #: build/C/man3/mtrace.3:65
7363 msgid ""
7364 "When B<mtrace>()  is called, it checks the value of the environment variable "
7365 "B<MALLOC_TRACE>, which should contain the pathname of a file in which the "
7366 "tracing information is to be recorded.  If the pathname is successfully "
7367 "opened, it is truncated to zero length."
7368 msgstr ""
7369
7370 #. type: Plain text
7371 #: build/C/man3/mtrace.3:78
7372 msgid ""
7373 "If B<MALLOC_TRACE> is not set, or the pathname it specifies is invalid or "
7374 "not writable, then no hook functions are installed, and B<mtrace>()  has no "
7375 "effect.  In set-user-ID and set-group-ID programs, B<MALLOC_TRACE> is "
7376 "ignored, and B<mtrace>()  has no effect."
7377 msgstr ""
7378
7379 #. type: Plain text
7380 #: build/C/man3/mtrace.3:86
7381 msgid ""
7382 "In normal usage, B<mtrace>()  is called once at the start of execution of a "
7383 "program, and B<muntrace>()  is never called."
7384 msgstr ""
7385
7386 #. type: Plain text
7387 #: build/C/man3/mtrace.3:96
7388 msgid ""
7389 "The tracing output produced after a call to B<mtrace>()  is textual, but not "
7390 "designed to be human readable.  The GNU C library provides a Perl script, "
7391 "B<mtrace>(1), that interprets the trace log and produces human-readable "
7392 "output.  For best results, the traced program should be compiled with "
7393 "debugging enabled, so that line-number information is recorded in the "
7394 "executable."
7395 msgstr ""
7396
7397 #. type: Plain text
7398 #: build/C/man3/mtrace.3:102
7399 msgid ""
7400 "The tracing performed by B<mtrace>()  incurs a performance penalty (if "
7401 "B<MALLOC_TRACE> points to a valid, writable pathname)."
7402 msgstr ""
7403
7404 #. type: Plain text
7405 #: build/C/man3/mtrace.3:108
7406 msgid ""
7407 "The line-number information produced by B<mtrace>(1)  is not always precise: "
7408 "the line number references may refer to the previous or following "
7409 "(nonblank)  line of the source code."
7410 msgstr ""
7411
7412 #. type: Plain text
7413 #: build/C/man3/mtrace.3:115
7414 msgid ""
7415 "The shell session below demonstrates the use of the B<mtrace>()  function "
7416 "and the B<mtrace>(1)  command in a program that has memory leaks at two "
7417 "different locations.  The demonstration uses the following program:"
7418 msgstr ""
7419
7420 #. type: Plain text
7421 #: build/C/man3/mtrace.3:122
7422 #, no-wrap
7423 msgid ""
7424 "$ B<cat t_mtrace.c>\n"
7425 "#include E<lt>mcheck.hE<gt>\n"
7426 "#include E<lt>stdlib.hE<gt>\n"
7427 "#include E<lt>stdio.hE<gt>\n"
7428 msgstr ""
7429 "$ B<cat t_mtrace.c>\n"
7430 "#include E<lt>mcheck.hE<gt>\n"
7431 "#include E<lt>stdlib.hE<gt>\n"
7432 "#include E<lt>stdio.hE<gt>\n"
7433
7434 #. type: Plain text
7435 #: build/C/man3/mtrace.3:127
7436 #, no-wrap
7437 msgid ""
7438 "int\n"
7439 "main(int argc, char *argv[])\n"
7440 "{\n"
7441 "    int j;\n"
7442 msgstr ""
7443 "int\n"
7444 "main(int argc, char *argv[])\n"
7445 "{\n"
7446 "    int j;\n"
7447
7448 #. type: Plain text
7449 #: build/C/man3/mtrace.3:129
7450 #, no-wrap
7451 msgid "    mtrace();\n"
7452 msgstr "    mtrace();\n"
7453
7454 #. type: Plain text
7455 #: build/C/man3/mtrace.3:132
7456 #, no-wrap
7457 msgid ""
7458 "    for (j = 0; j E<lt> 2; j++)\n"
7459 "        malloc(100);            /* Never freed--a memory leak */\n"
7460 msgstr ""
7461 "    for (j = 0; j E<lt> 2; j++)\n"
7462 "        malloc(100);            /* Never freed--a memory leak */\n"
7463
7464 #. type: Plain text
7465 #: build/C/man3/mtrace.3:136
7466 #, no-wrap
7467 msgid ""
7468 "    calloc(16, 16);             /* Never freed--a memory leak */\n"
7469 "    exit(EXIT_SUCCESS);\n"
7470 "}\n"
7471 msgstr ""
7472 "    calloc(16, 16);             /* Never freed--a memory leak */\n"
7473 "    exit(EXIT_SUCCESS);\n"
7474 "}\n"
7475
7476 #. type: Plain text
7477 #: build/C/man3/mtrace.3:142
7478 msgid ""
7479 "When we run the program as follows, we see that B<mtrace>()  diagnosed "
7480 "memory leaks at two different locations in the program:"
7481 msgstr ""
7482
7483 #. type: Plain text
7484 #: build/C/man3/mtrace.3:155
7485 #, no-wrap
7486 msgid ""
7487 "$ B<cc -g t_mtrace.c -o t_mtrace>\n"
7488 "$ B<export MALLOC_TRACE=/tmp/t>\n"
7489 "$ B<./t_mtrace>\n"
7490 "$ B<mtrace ./t_mtrace $MALLOC_TRACE>\n"
7491 "Memory not freed:\n"
7492 "-----------------\n"
7493 "   Address     Size     Caller\n"
7494 "0x084c9378     0x64  at /home/cecilia/t_mtrace.c:12\n"
7495 "0x084c93e0     0x64  at /home/cecilia/t_mtrace.c:12\n"
7496 "0x084c9448    0x100  at /home/cecilia/t_mtrace.c:16\n"
7497 msgstr ""
7498 "$ B<cc -g t_mtrace.c -o t_mtrace>\n"
7499 "$ B<export MALLOC_TRACE=/tmp/t>\n"
7500 "$ B<./t_mtrace>\n"
7501 "$ B<mtrace ./t_mtrace $MALLOC_TRACE>\n"
7502 "Memory not freed:\n"
7503 "-----------------\n"
7504 "   Address     Size     Caller\n"
7505 "0x084c9378     0x64  at /home/cecilia/t_mtrace.c:12\n"
7506 "0x084c93e0     0x64  at /home/cecilia/t_mtrace.c:12\n"
7507 "0x084c9448    0x100  at /home/cecilia/t_mtrace.c:16\n"
7508
7509 #. type: Plain text
7510 #: build/C/man3/mtrace.3:167
7511 msgid ""
7512 "The first two messages about unfreed memory correspond to the two "
7513 "B<malloc>(3)  calls inside the I<for> loop.  The final message corresponds "
7514 "to the call to B<calloc>(3)  (which in turn calls B<malloc>(3))."
7515 msgstr ""
7516
7517 #. type: Plain text
7518 #: build/C/man3/mtrace.3:172
7519 msgid "B<mtrace>(1), B<malloc>(3), B<malloc_hook>(3), B<mcheck>(3)"
7520 msgstr "B<mtrace>(1), B<malloc>(3), B<malloc_hook>(3), B<mcheck>(3)"
7521
7522 #. type: TH
7523 #: build/C/man2/posix_fadvise.2:28
7524 #, no-wrap
7525 msgid "POSIX_FADVISE"
7526 msgstr "POSIX_FADVISE"
7527
7528 #. type: TH
7529 #: build/C/man2/posix_fadvise.2:28
7530 #, no-wrap
7531 msgid "2014-05-03"
7532 msgstr "2014-05-03"
7533
7534 #. type: Plain text
7535 #: build/C/man2/posix_fadvise.2:31
7536 msgid "posix_fadvise - predeclare an access pattern for file data"
7537 msgstr "posix_fadvise - ファイルデータのアクセスパターンをあらかじめ宣言する"
7538
7539 #. type: Plain text
7540 #: build/C/man2/posix_fadvise.2:34 build/C/man3/posix_fallocate.3:31
7541 #, no-wrap
7542 msgid "B<#include E<lt>fcntl.hE<gt>>\n"
7543 msgstr "B<#include E<lt>fcntl.hE<gt>>\n"
7544
7545 #. type: Plain text
7546 #: build/C/man2/posix_fadvise.2:37
7547 #, no-wrap
7548 msgid "B<int posix_fadvise(int >I<fd>B<, off_t >I<offset>B<, off_t >I<len>B<, int >I<advice>B<);>\n"
7549 msgstr "B<int posix_fadvise(int >I<fd>B<, off_t >I<offset>B<, off_t >I<len>B<, int >I<advice>B<);>\n"
7550
7551 #. type: Plain text
7552 #: build/C/man2/posix_fadvise.2:46
7553 msgid "B<posix_fadvise>():"
7554 msgstr "B<posix_fadvise>():"
7555
7556 #. type: Plain text
7557 #: build/C/man2/posix_fadvise.2:48 build/C/man3/posix_fallocate.3:44
7558 msgid "_XOPEN_SOURCE\\ E<gt>=\\ 600 || _POSIX_C_SOURCE\\ E<gt>=\\ 200112L"
7559 msgstr "_XOPEN_SOURCE\\ E<gt>=\\ 600 || _POSIX_C_SOURCE\\ E<gt>=\\ 200112L"
7560
7561 #. type: Plain text
7562 #: build/C/man2/posix_fadvise.2:56
7563 msgid ""
7564 "Programs can use B<posix_fadvise>()  to announce an intention to access file "
7565 "data in a specific pattern in the future, thus allowing the kernel to "
7566 "perform appropriate optimizations."
7567 msgstr ""
7568 "プログラムは、将来特定のパターンでファイルデータに アクセスする意思を伝えるた"
7569 "めに B<posix_fadvise>()  を使うことができる。 これにより、カーネルが適切な最"
7570 "適化を実行することが可能になる。"
7571
7572 #. type: Plain text
7573 #: build/C/man2/posix_fadvise.2:63
7574 msgid ""
7575 "The I<advice> applies to a (not necessarily existent) region starting at "
7576 "I<offset> and extending for I<len> bytes (or until the end of the file if "
7577 "I<len> is 0) within the file referred to by I<fd>.  The I<advice> is not "
7578 "binding; it merely constitutes an expectation on behalf of the application."
7579 msgstr ""
7580 "I<advice> は I<fd> が参照しているファイルの I<offset> から始まる I<len> バ"
7581 "イ\n"
7582 "トの範囲内 (I<len> が 0 の場合はファイルの終りまで) の (必ずしも存在しない)\n"
7583 "領域に適用される。 I<advice> は義務づけではない。 I<advice> は単にアプリ"
7584 "ケー\n"
7585 "ションのために可能性を構成するだけである。"
7586
7587 #. type: Plain text
7588 #: build/C/man2/posix_fadvise.2:65
7589 msgid "Permissible values for I<advice> include:"
7590 msgstr "I<advice> に許される値には、以下のものが含まれる:"
7591
7592 #. type: TP
7593 #: build/C/man2/posix_fadvise.2:65
7594 #, no-wrap
7595 msgid "B<POSIX_FADV_NORMAL>"
7596 msgstr "B<POSIX_FADV_NORMAL>"
7597
7598 #. type: Plain text
7599 #: build/C/man2/posix_fadvise.2:71
7600 msgid ""
7601 "Indicates that the application has no advice to give about its access "
7602 "pattern for the specified data.  If no advice is given for an open file, "
7603 "this is the default assumption."
7604 msgstr ""
7605 "指定されたデータのアクセスパターンを指示するアドバイスを アプリケーションが何"
7606 "も持っていないことを示す。 オープンされたファイルにアドバイスが指定されない場"
7607 "合、 これがデフォルトで仮定される。"
7608
7609 #. type: TP
7610 #: build/C/man2/posix_fadvise.2:71
7611 #, no-wrap
7612 msgid "B<POSIX_FADV_SEQUENTIAL>"
7613 msgstr "B<POSIX_FADV_SEQUENTIAL>"
7614
7615 #. type: Plain text
7616 #: build/C/man2/posix_fadvise.2:75
7617 msgid ""
7618 "The application expects to access the specified data sequentially (with "
7619 "lower offsets read before higher ones)."
7620 msgstr ""
7621 "アプリケーションは指定されたデータがシーケンシャルに (大きなオフセットの前に"
7622 "小さなオフセットのデータを読むように)  アクセスされることを期待する。"
7623
7624 #. type: TP
7625 #: build/C/man2/posix_fadvise.2:75
7626 #, no-wrap
7627 msgid "B<POSIX_FADV_RANDOM>"
7628 msgstr "B<POSIX_FADV_RANDOM>"
7629
7630 #. type: Plain text
7631 #: build/C/man2/posix_fadvise.2:78
7632 msgid "The specified data will be accessed in random order."
7633 msgstr "指定されたデータがランダムな順番でアクセスされる。"
7634
7635 #. type: TP
7636 #: build/C/man2/posix_fadvise.2:78
7637 #, no-wrap
7638 msgid "B<POSIX_FADV_NOREUSE>"
7639 msgstr "B<POSIX_FADV_NOREUSE>"
7640
7641 #. type: Plain text
7642 #: build/C/man2/posix_fadvise.2:81
7643 msgid "The specified data will be accessed only once."
7644 msgstr "指定されたデータは 1 度しかアクセスされない。"
7645
7646 #. type: TP
7647 #: build/C/man2/posix_fadvise.2:81
7648 #, no-wrap
7649 msgid "B<POSIX_FADV_WILLNEED>"
7650 msgstr "B<POSIX_FADV_WILLNEED>"
7651
7652 #. type: Plain text
7653 #: build/C/man2/posix_fadvise.2:84
7654 msgid "The specified data will be accessed in the near future."
7655 msgstr "指定されたデータは近い将来アクセスされる。"
7656
7657 #. type: TP
7658 #: build/C/man2/posix_fadvise.2:84
7659 #, no-wrap
7660 msgid "B<POSIX_FADV_DONTNEED>"
7661 msgstr "B<POSIX_FADV_DONTNEED>"
7662
7663 #. type: Plain text
7664 #: build/C/man2/posix_fadvise.2:87
7665 msgid "The specified data will not be accessed in the near future."
7666 msgstr "指定されたデータは近い将来アクセスされない。"
7667
7668 #. type: Plain text
7669 #: build/C/man2/posix_fadvise.2:90
7670 msgid "On success, zero is returned.  On error, an error number is returned."
7671 msgstr "成功した場合は 0 が返される。 失敗した場合はエラー番号が返される。"
7672
7673 #. type: Plain text
7674 #: build/C/man2/posix_fadvise.2:94
7675 msgid "The I<fd> argument was not a valid file descriptor."
7676 msgstr "I<fd> 引き数が有効なファイルディスクリプタでない。"
7677
7678 #. type: Plain text
7679 #: build/C/man2/posix_fadvise.2:97
7680 msgid "An invalid value was specified for I<advice>."
7681 msgstr "無効な値が I<advice> に指定された。"
7682
7683 #. type: Plain text
7684 #: build/C/man2/posix_fadvise.2:104
7685 msgid ""
7686 "The specified file descriptor refers to a pipe or FIFO.  (Linux actually "
7687 "returns B<EINVAL> in this case.)"
7688 msgstr ""
7689 "指定されたファイルディスクリプタがパイプまたは FIFO を参照している (この場"
7690 "合、Linux は実際には B<EINVAL> を返す)。"
7691
7692 #.  of fadvise64_64()
7693 #. type: Plain text
7694 #: build/C/man2/posix_fadvise.2:112
7695 msgid ""
7696 "Kernel support first appeared in Linux 2.5.60; the underlying system call is "
7697 "called B<fadvise64>().  Library support has been provided since glibc "
7698 "version 2.2, via the wrapper function B<posix_fadvise>()."
7699 msgstr ""
7700 "カーネルによるサポートは Linux 2.5.60 で最初に登場し、\n"
7701 "対応するシステムコールは B<fadvise64>() という名前である。\n"
7702 "ライブラリによるサポートは glibc バージョン 2.2 以降で提供されており、\n"
7703 "ラッパー関数は B<posix_fadvise>() という名前である。"
7704
7705 #. type: Plain text
7706 #: build/C/man2/posix_fadvise.2:121
7707 msgid ""
7708 "POSIX.1-2001.  Note that the type of the I<len> argument was changed from "
7709 "I<size_t> to I<off_t> in POSIX.1-2003 TC1."
7710 msgstr ""
7711 "POSIX.1-2001.  I<len> 引き数の型が POSIX.1-2003 TC1 において I<size_t> から "
7712 "I<off_t> に変更された点に注意すること。"
7713
7714 #. type: Plain text
7715 #: build/C/man2/posix_fadvise.2:127
7716 msgid ""
7717 "Under Linux, B<POSIX_FADV_NORMAL> sets the readahead window to the default "
7718 "size for the backing device; B<POSIX_FADV_SEQUENTIAL> doubles this size, and "
7719 "B<POSIX_FADV_RANDOM> disables file readahead entirely.  These changes affect "
7720 "the entire file, not just the specified region (but other open file handles "
7721 "to the same file are unaffected)."
7722 msgstr ""
7723 "Linux では、B<POSIX_FADV_NORMAL> はバッキングデバイスの デフォルトサイズに先"
7724 "読み (readahead) ウインドウを設定する。 B<POSIX_FADV_SEQUENTIAL> はこのサイズ"
7725 "を 2 倍し、 B<POSIX_FADV_RANDOM> は先読みを全く無効にする。 これらの変更は"
7726 "ファイル全体に影響し、指定された領域のみに影響するわけではない (しかし同じ"
7727 "ファイルに対する他のオープンファイルハンドルは影響を受けない)。"
7728
7729 #. type: Plain text
7730 #: build/C/man2/posix_fadvise.2:134
7731 msgid ""
7732 "B<POSIX_FADV_WILLNEED> initiates a nonblocking read of the specified region "
7733 "into the page cache.  The amount of data read may be decreased by the kernel "
7734 "depending on virtual memory load.  (A few megabytes will usually be fully "
7735 "satisfied, and more is rarely useful.)"
7736 msgstr ""
7737 "B<POSIX_FADV_WILLNEED> は、 ページキャッシュに指定領域のブロックされない読み"
7738 "込みを開始する。 読み込まれるデータの総量は、 仮想メモリの負荷に依ってカーネ"
7739 "ルが減らすかもしれない (数メガバイトであれば通常は全く十分であり、 それより多"
7740 "くてもめったに役に立たない)。"
7741
7742 #. type: Plain text
7743 #: build/C/man2/posix_fadvise.2:138
7744 msgid ""
7745 "In kernels before 2.6.18, B<POSIX_FADV_NOREUSE> had the same semantics as "
7746 "B<POSIX_FADV_WILLNEED>.  This was probably a bug; since kernel 2.6.18, this "
7747 "flag is a no-op."
7748 msgstr ""
7749 "2.6.18 より前のカーネルでは、B<POSIX_FADV_NOREUSE> は B<POSIX_FADV_WILLNEED> "
7750 "と同じ意味であった。 これは多分バグであった。 カーネル 2.6.18 以降では、この"
7751 "フラグは何も行わない。"
7752
7753 #. type: Plain text
7754 #: build/C/man2/posix_fadvise.2:146
7755 msgid ""
7756 "B<POSIX_FADV_DONTNEED> attempts to free cached pages associated with the "
7757 "specified region.  This is useful, for example, while streaming large "
7758 "files.  A program may periodically request the kernel to free cached data "
7759 "that has already been used, so that more useful cached pages are not "
7760 "discarded instead."
7761 msgstr ""
7762 "B<POSIX_FADV_DONTNEED> は指定された領域に関連付けられた キャッシュページを解"
7763 "放しようとする。 例えば、これは大きなファイルをストリーミングするときに役立"
7764 "つ。 プログラムは、使用済みのキャッシュされたデータを解放するように、 定期的"
7765 "にカーネルに要求するかもしれない。 そうすることにより、さらに有効なキャッシュ"
7766 "されたページが、 代わりに破棄されることはない。"
7767
7768 #. type: Plain text
7769 #: build/C/man2/posix_fadvise.2:154
7770 msgid ""
7771 "Pages that have not yet been written out will be unaffected, so if the "
7772 "application wishes to guarantee that pages will be released, it should call "
7773 "B<fsync>(2)  or B<fdatasync>(2)  first."
7774 msgstr ""
7775 "まだ書き出されていないページは影響を受けないので、 そのページの解放が保証され"
7776 "ることをアプリケーションが望んでいるなら、 最初に B<fsync>(2)  または "
7777 "B<fdatasync>(2)  を呼ぶべきである。"
7778
7779 #. type: SS
7780 #: build/C/man2/posix_fadvise.2:154
7781 #, no-wrap
7782 msgid "Architecture-specific variants"
7783 msgstr "アーキテクチャ固有の派生バージョン"
7784
7785 #. type: Plain text
7786 #: build/C/man2/posix_fadvise.2:171
7787 msgid ""
7788 "Some architectures require 64-bit arguments to be aligned in a suitable pair "
7789 "of registers (see B<syscall>(2)  for further detail).  On such "
7790 "architectures, the call signature of B<posix_fadvise>()  shown in the "
7791 "SYNOPSIS would force a register to be wasted as padding between the I<fd> "
7792 "and I<offset> arguments.  Therefore, these architectures define a version of "
7793 "the system call that orders the arguments suitably, but otherwise is "
7794 "otherwise exactly the same as B<posix_fadvise>()."
7795 msgstr ""
7796 "いくつかのアーキテクチャでは、 64 ビットの引き数は適切なレジスタの組に割り当"
7797 "てる必要がある (B<syscall>(2) 参照)。 このようなアーキテクチャでは、 「書式」"
7798 "に書かれている  B<posix_fadvise>() の呼び出しシグネチャーで、 引き数 I<fd> "
7799 "と I<offset> の間のパディング (詰めもの) でレジスタが一つ消費されてしまう。 "
7800 "そのため、 これらのアーキテクチャでは引き数が適切な順序になった別のシステム"
7801 "コールが定義されているが、 それ以外は B<posix_fadvise>() と全く同じである。"
7802
7803 #. type: Plain text
7804 #: build/C/man2/posix_fadvise.2:173
7805 msgid "For example, since Linux 2.6.14, ARM has the following system call:"
7806 msgstr ""
7807 "例えば、 Linux 2.6.14 以降では、 ARM には以下のシステムコールが存在する。"
7808
7809 #. type: Plain text
7810 #: build/C/man2/posix_fadvise.2:178
7811 #, no-wrap
7812 msgid ""
7813 "B<long arm_fadvise64_64(int >I<fd>B<, int >I<advice>B<,>\n"
7814 "B<                      loff_t >I<offset>B<, loff_t >I<len>B<);>\n"
7815 msgstr ""
7816 "B<long arm_fadvise64_64(int >I<fd>B<, int >I<advice>B<,>\n"
7817 "B<                      loff_t >I<offset>B<, loff_t >I<len>B<);>\n"
7818
7819 #. type: Plain text
7820 #: build/C/man2/posix_fadvise.2:186
7821 msgid ""
7822 "These architecture-specific details are generally hidden from applications "
7823 "by the glibc B<posix_fadvise>()  wrapper function, which invokes the "
7824 "appropriate architecture-specific system call."
7825 msgstr ""
7826 "通常、 glibc の B<posix_fadvise>() ラッパー関数により、 これらのアーキテク"
7827 "チャ固有の詳細はアプリケーションには見えない。 glibc のラッパー関数では、適切"
7828 "なアーキテクチャ固有のシステムコールが呼び出される。"
7829
7830 #. type: Plain text
7831 #: build/C/man2/posix_fadvise.2:191
7832 msgid ""
7833 "In kernels before 2.6.6, if I<len> was specified as 0, then this was "
7834 "interpreted literally as \"zero bytes\", rather than as meaning \"all bytes "
7835 "through to the end of the file\"."
7836 msgstr ""
7837 "2.6.6 より前のカーネルでは、 I<len> に 0 が指定された場合、 「ファイルの終り"
7838 "までの全てのバイト」という意味ではなく、 文字通り「0 バイト」として解釈されて"
7839 "いた。"
7840
7841 #.  FIXME . Write a posix_fadvise(3) page.
7842 #. type: Plain text
7843 #: build/C/man2/posix_fadvise.2:197
7844 msgid ""
7845 "B<readahead>(2), B<sync_file_range>(2), B<posix_fallocate>(3), "
7846 "B<posix_madvise>(3)"
7847 msgstr ""
7848 "B<readahead>(2), B<sync_file_range>(2), B<posix_fallocate>(3),\n"
7849 "B<posix_madvise>(3)"
7850
7851 #. type: TH
7852 #: build/C/man3/posix_fallocate.3:25
7853 #, no-wrap
7854 msgid "POSIX_FALLOCATE"
7855 msgstr "POSIX_FALLOCATE"
7856
7857 #. type: TH
7858 #: build/C/man3/posix_fallocate.3:25
7859 #, fuzzy, no-wrap
7860 #| msgid "2014-05-03"
7861 msgid "2014-06-03"
7862 msgstr "2014-05-03"
7863
7864 #. type: Plain text
7865 #: build/C/man3/posix_fallocate.3:28
7866 msgid "posix_fallocate - allocate file space"
7867 msgstr "posix_fallocate - ファイルのスペースを確保する"
7868
7869 #. type: Plain text
7870 #: build/C/man3/posix_fallocate.3:33
7871 #, no-wrap
7872 msgid "B<int posix_fallocate(int >I<fd>B<, off_t >I<offset>B<, off_t >I<len>B<);>\n"
7873 msgstr "B<int posix_fallocate(int >I<fd>B<, off_t >I<offset>B<, off_t >I<len>B<);>\n"
7874
7875 #. type: Plain text
7876 #: build/C/man3/posix_fallocate.3:42
7877 msgid "B<posix_fallocate>():"
7878 msgstr "B<posix_fallocate>():"
7879
7880 #. type: Plain text
7881 #: build/C/man3/posix_fallocate.3:61
7882 msgid ""
7883 "The function B<posix_fallocate>()  ensures that disk space is allocated for "
7884 "the file referred to by the descriptor I<fd> for the bytes in the range "
7885 "starting at I<offset> and continuing for I<len> bytes.  After a successful "
7886 "call to B<posix_fallocate>(), subsequent writes to bytes in the specified "
7887 "range are guaranteed not to fail because of lack of disk space."
7888 msgstr ""
7889 "関数 B<posix_fallocate>()  は、ディスクリプタ I<fd> で参照されるファイルに対"
7890 "して、ディスクスペースを確実に確保する。 ディスクスペースは I<offset> から始"
7891 "まる I<len> バイトの範囲のバイトである。 B<posix_fallocate>()  の呼び出しが成"
7892 "功した後、指定された範囲のバイトに対する書き込みは、 ディスクスペースの不足で"
7893 "失敗しないことが保証される。"
7894
7895 #. type: Plain text
7896 #: build/C/man3/posix_fallocate.3:66
7897 msgid ""
7898 "If the size of the file is less than I<offset>+I<len>, then the file is "
7899 "increased to this size; otherwise the file size is left unchanged."
7900 msgstr ""
7901 "ファイルのサイズが I<offset>+I<len> より小さい場合、ファイルはこのサイズにな"
7902 "るように拡大される。 それ以外の場合、ファイルサイズは変わらない。"
7903
7904 #. type: Plain text
7905 #: build/C/man3/posix_fallocate.3:72
7906 msgid ""
7907 "B<posix_fallocate>()  returns zero on success, or an error number on "
7908 "failure.  Note that I<errno> is not set."
7909 msgstr ""
7910 "B<posix_fallocate>()  は成功した場合、0 を返す。 失敗した場合、エラー番号を返"
7911 "す。 I<errno> が設定されない点に注意すること。"
7912
7913 #. type: Plain text
7914 #: build/C/man3/posix_fallocate.3:81
7915 msgid "I<offset+len> exceeds the maximum file size."
7916 msgstr "I<offset+len> が最大ファイルサイズを超えている。"
7917
7918 #. type: Plain text
7919 #: build/C/man3/posix_fallocate.3:91
7920 msgid "I<fd> does not refer to a regular file."
7921 msgstr "I<fd> が通常のファイルとして参照されていない。"
7922
7923 #. type: Plain text
7924 #: build/C/man3/posix_fallocate.3:100
7925 msgid "I<fd> refers to a pipe."
7926 msgstr "I<fd> がパイプを参照している。"
7927
7928 #. type: Plain text
7929 #: build/C/man3/posix_fallocate.3:103
7930 msgid "B<posix_fallocate>()  is available since glibc 2.1.94."
7931 msgstr "B<posix_fallocate>()  は glibc 2.1.94 以降で利用可能である。"
7932
7933 #. type: Plain text
7934 #: build/C/man3/posix_fallocate.3:108
7935 #, fuzzy
7936 #| msgid "The B<alloca>()  function is thread-safe."
7937 msgid "The B<posix_fallocate>()  function is thread-safe."
7938 msgstr "B<alloca>() 関数はスレッドセーフである。"
7939
7940 #. type: Plain text
7941 #: build/C/man3/posix_fallocate.3:133
7942 msgid ""
7943 "POSIX.1-2008 says that an implementation I<shall> give the B<EINVAL> error "
7944 "if I<len> was 0, or I<offset> was less than 0.  POSIX.1-2001 says that an "
7945 "implementation I<shall> give the B<EINVAL> error if I<len> is less than 0, "
7946 "or I<offset> was less than 0, and I<may> give the error if I<len> equals "
7947 "zero."
7948 msgstr ""
7949 "POSIX.1-2008 では、 I<len> が 0 の場合、もしくは I<offset> が 0 未満の場合、 "
7950 "B<EINVAL> エラーを返すものとされている。 POSIX.1-2001 では、 I<len> が 0 未満"
7951 "の場合、もしくは I<offset> が 0 未満の場合、 B<EINVAL> エラーを返すものとされ"
7952 "ている。また、 I<len> が 0 の場合、 B<EINVAL> エラーを返してもよいとされてい"
7953 "る。"
7954
7955 #. type: Plain text
7956 #: build/C/man3/posix_fallocate.3:138
7957 msgid "B<fallocate>(1), B<fallocate>(2), B<lseek>(2), B<posix_fadvise>(2)"
7958 msgstr "B<fallocate>(1), B<fallocate>(2), B<lseek>(2), B<posix_fadvise>(2)"
7959
7960 #. type: TH
7961 #: build/C/man3/posix_memalign.3:29
7962 #, no-wrap
7963 msgid "POSIX_MEMALIGN"
7964 msgstr "POSIX_MEMALIGN"
7965
7966 #. type: TH
7967 #: build/C/man3/posix_memalign.3:29
7968 #, no-wrap
7969 msgid "2013-09-02"
7970 msgstr "2013-09-02"
7971
7972 #. type: Plain text
7973 #: build/C/man3/posix_memalign.3:32
7974 msgid ""
7975 "posix_memalign, aligned_alloc, memalign, valloc, pvalloc - allocate aligned "
7976 "memory"
7977 msgstr ""
7978 "posix_memalign, aligned_alloc, memalign, valloc, pvalloc - アラインメント\n"
7979 "されたメモリの割り当てを行う"
7980
7981 #. type: Plain text
7982 #: build/C/man3/posix_memalign.3:35
7983 #, no-wrap
7984 msgid "B<#include E<lt>stdlib.hE<gt>>\n"
7985 msgstr "B<#include E<lt>stdlib.hE<gt>>\n"
7986
7987 #. type: Plain text
7988 #: build/C/man3/posix_memalign.3:39
7989 #, no-wrap
7990 msgid ""
7991 "B<int posix_memalign(void **>I<memptr>B<, size_t >I<alignment>B<, size_t >I<size>B<);>\n"
7992 "B<void *aligned_alloc(size_t >I<alignment>B<, size_t >I<size>B<);>\n"
7993 "B<void *valloc(size_t >I<size>B<);>\n"
7994 msgstr ""
7995 "B<int posix_memalign(void **>I<memptr>B<, size_t >I<alignment>B<, size_t >I<size>B<);>\n"
7996 "B<void *aligned_alloc(size_t >I<alignment>B<, size_t >I<size>B<);>\n"
7997 "B<void *valloc(size_t >I<size>B<);>\n"
7998
7999 #. type: Plain text
8000 #: build/C/man3/posix_memalign.3:44
8001 #, no-wrap
8002 msgid ""
8003 "B<void *memalign(size_t >I<alignment>B<, size_t >I<size>B<);>\n"
8004 "B<void *pvalloc(size_t >I<size>B<);>\n"
8005 msgstr ""
8006 "B<void *memalign(size_t >I<alignment>B<, size_t >I<size>B<);>\n"
8007 "B<void *pvalloc(size_t >I<size>B<);>\n"
8008
8009 #. type: Plain text
8010 #: build/C/man3/posix_memalign.3:54
8011 msgid ""
8012 "B<posix_memalign>(): _POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ "
8013 "E<gt>=\\ 600"
8014 msgstr ""
8015 "B<posix_memalign>(): _POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ "
8016 "E<gt>=\\ 600"
8017
8018 #. type: Plain text
8019 #: build/C/man3/posix_memalign.3:57
8020 msgid "B<aligned_alloc>(): _ISOC11_SOURCE"
8021 msgstr "B<aligned_alloc>(): _ISOC11_SOURCE"
8022
8023 #. type: Plain text
8024 #: build/C/man3/posix_memalign.3:59
8025 msgid "B<valloc>():"
8026 msgstr "B<valloc>():"
8027
8028 #. type: TP
8029 #: build/C/man3/posix_memalign.3:62
8030 #, no-wrap
8031 msgid "Since glibc 2.12:"
8032 msgstr "glibc 2.12 以降:"
8033
8034 #. type: Plain text
8035 #: build/C/man3/posix_memalign.3:69
8036 #, no-wrap
8037 msgid ""
8038 "_BSD_SOURCE ||\n"
8039 "    (_XOPEN_SOURCE\\ E<gt>=\\ 500 ||\n"
8040 "        _XOPEN_SOURCE\\ &&\\ _XOPEN_SOURCE_EXTENDED) &&\n"
8041 "    !(_POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ E<gt>=\\ 600)\n"
8042 msgstr ""
8043 "_BSD_SOURCE ||\n"
8044 "    (_XOPEN_SOURCE\\ E<gt>=\\ 500 ||\n"
8045 "        _XOPEN_SOURCE\\ &&\\ _XOPEN_SOURCE_EXTENDED) &&\n"
8046 "    !(_POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ E<gt>=\\ 600)\n"
8047
8048 #. type: TP
8049 #: build/C/man3/posix_memalign.3:71
8050 #, no-wrap
8051 msgid "Before glibc 2.12:"
8052 msgstr "glibc 2.12 より前:"
8053
8054 #. type: Plain text
8055 #: build/C/man3/posix_memalign.3:75
8056 msgid ""
8057 "_BSD_SOURCE || _XOPEN_SOURCE\\ E<gt>=\\ 500 || _XOPEN_SOURCE\\ &&\\ "
8058 "_XOPEN_SOURCE_EXTENDED"
8059 msgstr ""
8060 "_BSD_SOURCE || _XOPEN_SOURCE\\ E<gt>=\\ 500 || _XOPEN_SOURCE\\ &&\\ "
8061 "_XOPEN_SOURCE_EXTENDED"
8062
8063 #. type: Plain text
8064 #: build/C/man3/posix_memalign.3:82
8065 msgid ""
8066 "(The (nonstandard) header file I<E<lt>malloc.hE<gt>> also exposes the "
8067 "declaration of B<valloc>(); no feature test macros are required.)"
8068 msgstr ""
8069 "((非標準の) ヘッダファイル I<E<lt>malloc.hE<gt>> も\n"
8070 "B<valloc>() の宣言も公開する。機能検査マクロは不要である。"
8071
8072 #.  glibc does this:
8073 #. type: Plain text
8074 #: build/C/man3/posix_memalign.3:104
8075 msgid ""
8076 "The function B<posix_memalign>()  allocates I<size> bytes and places the "
8077 "address of the allocated memory in I<*memptr>.  The address of the allocated "
8078 "memory will be a multiple of I<alignment>, which must be a power of two and "
8079 "a multiple of I<sizeof(void\\ *)>.  If I<size> is 0, then the value placed "
8080 "in I<*memptr> is either NULL, or a unique pointer value that can later be "
8081 "successfully passed to B<free>(3)."
8082 msgstr ""
8083 "関数 B<posix_memalign>()  は、 I<size> バイトのメモリを割り当て、割り当てられ"
8084 "たメモリのアドレスを I<*memptr> に設定する。 割り当てられたメモリのアドレス"
8085 "は I<alignment> の倍数になっているはずである。 I<alignment> は 2 のべき乗で、"
8086 "かつ I<sizeof(void\\ *)> の倍数でなければならない。 I<size> が 0 の場合、 "
8087 "I<*memptr> には NULL か一意なポインタ値が書かれる。 このポインタ値は、後で "
8088 "B<free>(3)  に問題なく渡すことができる。"
8089
8090 #.  The behavior of memalign() for size==0 is as for posix_memalign()
8091 #.  but no standards govern this.
8092 #. type: Plain text
8093 #: build/C/man3/posix_memalign.3:115
8094 msgid ""
8095 "The obsolete function B<memalign>()  allocates I<size> bytes and returns a "
8096 "pointer to the allocated memory.  The memory address will be a multiple of "
8097 "I<alignment>, which must be a power of two."
8098 msgstr ""
8099 "廃止された関数である B<memalign>() は、 I<size> バイトのメモリを割り当て、\n"
8100 "割り当てられたメモリへのポインタを返す。 メモリのアドレスは I<alignment> \n"
8101 "の倍数になっているはずである。 I<alignment> は 2 のべき乗でなければならない。"
8102
8103 #. type: Plain text
8104 #: build/C/man3/posix_memalign.3:124
8105 msgid ""
8106 "The function B<aligned_alloc>()  is the same as B<memalign>(), except for "
8107 "the added restriction that I<size> should be a multiple of I<alignment>."
8108 msgstr ""
8109 "関数 B<aligned_alloc>() は B<memalign>() と同じだが、I<size> が "
8110 "I<alignment>\n"
8111 "の倍数でなければならないという追加の制限がある点が異なる。"
8112
8113 #. type: Plain text
8114 #: build/C/man3/posix_memalign.3:133
8115 msgid ""
8116 "The obsolete function B<valloc>()  allocates I<size> bytes and returns a "
8117 "pointer to the allocated memory.  The memory address will be a multiple of "
8118 "the page size.  It is equivalent to I<memalign(sysconf(_SC_PAGESIZE),size)>."
8119 msgstr ""
8120 "廃止された関数である B<valloc>()  は I<size> バイトのメモリを割り当て、割り当"
8121 "てられたメモリへのポインタを返す。 メモリのアドレスはページサイズの倍数になっ"
8122 "ているはずである。 これは I<memalign(sysconf(_SC_PAGESIZE),size)> と等価であ"
8123 "る。"
8124
8125 #. type: Plain text
8126 #: build/C/man3/posix_memalign.3:140
8127 msgid ""
8128 "The obsolete function B<pvalloc>()  is similar to B<valloc>(), but rounds "
8129 "the size of the allocation up to the next multiple of the system page size."
8130 msgstr ""
8131 "廃止された関数 B<pvalloc>() は B<valloc>() と同様だが、\n"
8132 "割り当てられるサイズがシステムのページサイズの倍数に切り上げられる。"
8133
8134 #. type: Plain text
8135 #: build/C/man3/posix_memalign.3:142
8136 msgid "For all of these functions, the memory is not zeroed."
8137 msgstr "これらの関数はいずれもメモリのゼロクリアを行わない。"
8138
8139 #. type: Plain text
8140 #: build/C/man3/posix_memalign.3:149
8141 msgid ""
8142 "B<aligned_alloc>(), B<memalign>(), B<valloc>(), and B<pvalloc>()  return a "
8143 "pointer to the allocated memory, or NULL if the request fails."
8144 msgstr ""
8145 "B<aligned_alloc>(), B<memalign>(), B<valloc>(), B<pvalloc>() は割り当てられ"
8146 "た\n"
8147 "メモリへのポインタを返す。 割り当てに失敗した場合は NULL を返す。"
8148
8149 #. type: Plain text
8150 #: build/C/man3/posix_memalign.3:157
8151 msgid ""
8152 "B<posix_memalign>()  returns zero on success, or one of the error values "
8153 "listed in the next section on failure.  The value of I<errno> is "
8154 "indeterminate after a call to B<posix_memalign>()."
8155 msgstr ""
8156 "B<posix_memalign>()  は成功した場合は 0 を返し、 失敗した場合は次のセクション"
8157 "に記載されたエラー値のいずれかを返す。 B<posix_memalign>() の呼び出し後は "
8158 "I<errno> の値は不定である。"
8159
8160 #. type: Plain text
8161 #: build/C/man3/posix_memalign.3:164
8162 msgid ""
8163 "The I<alignment> argument was not a power of two, or was not a multiple of "
8164 "I<sizeof(void\\ *)>."
8165 msgstr ""
8166 "I<alignment> 引き数が 2 のべき乗でなかったか、 I<sizeof(void\\ *)> の倍数でな"
8167 "かった。"
8168
8169 #. type: Plain text
8170 #: build/C/man3/posix_memalign.3:167
8171 msgid "There was insufficient memory to fulfill the allocation request."
8172 msgstr "割り当て要求を満たすのに十分なメモリがなかった。"
8173
8174 #. type: Plain text
8175 #: build/C/man3/posix_memalign.3:174
8176 msgid ""
8177 "The functions B<memalign>(), B<valloc>(), and B<pvalloc>()  have been "
8178 "available in all Linux libc libraries."
8179 msgstr ""
8180 "関数 B<memalign>(), B<valloc>(), B<pvalloc>() は\n"
8181 "すべての Linux libc ライブラリで使用可能である。"
8182
8183 #. type: Plain text
8184 #: build/C/man3/posix_memalign.3:178
8185 msgid "The function B<aligned_alloc>()  was added to glibc in version 2.16."
8186 msgstr "関数 B<aligned_alloc>() は glibc バージョン 2.16 で追加された。"
8187
8188 #. type: Plain text
8189 #: build/C/man3/posix_memalign.3:182
8190 msgid "The function B<posix_memalign>()  is available since glibc 2.1.91."
8191 msgstr "関数 B<posix_fallocate>() は glibc 2.1.91 以降で利用可能である。"
8192
8193 #. type: Plain text
8194 #: build/C/man3/posix_memalign.3:189
8195 msgid ""
8196 "The function B<valloc>()  appeared in 3.0BSD.  It is documented as being "
8197 "obsolete in 4.3BSD, and as legacy in SUSv2.  It does not appear in "
8198 "POSIX.1-2001."
8199 msgstr ""
8200 "関数 B<valloc>() は 3.0BSD で登場した。4.3BSD では廃止されたと記載されてお"
8201 "り、\n"
8202 "SUSv2 では過去の名残だと記載されている。 POSIX.1-2001 には存在しない。"
8203
8204 #. type: Plain text
8205 #: build/C/man3/posix_memalign.3:193
8206 msgid "The function B<pvalloc>()  is a GNU extension."
8207 msgstr "関数 B<pvalloc>() は GNU による拡張である。"
8208
8209 #. type: Plain text
8210 #: build/C/man3/posix_memalign.3:197
8211 msgid "The function B<memalign>()  appears in SunOS 4.1.3 but not in 4.4BSD."
8212 msgstr "関数 B<memalign>() は SunOS 4.1.3 で登場したが、4.4BSD にはない。"
8213
8214 #. type: Plain text
8215 #: build/C/man3/posix_memalign.3:201
8216 msgid "The function B<posix_memalign>()  comes from POSIX.1d."
8217 msgstr "関数 B<posix_memalign>() は POSIX.1d に由来する。"
8218
8219 #. type: Plain text
8220 #: build/C/man3/posix_memalign.3:206
8221 msgid "The function B<aligned_alloc>()  is specified in the C11 standard."
8222 msgstr "関数 I<aligned_alloc>() は C11 標準で規定されている。"
8223
8224 #. type: SS
8225 #: build/C/man3/posix_memalign.3:206
8226 #, no-wrap
8227 msgid "Headers"
8228 msgstr "ヘッダ"
8229
8230 #. type: Plain text
8231 #: build/C/man3/posix_memalign.3:210
8232 msgid ""
8233 "Everybody agrees that B<posix_memalign>()  is declared in I<E<lt>stdlib."
8234 "hE<gt>>."
8235 msgstr ""
8236 "B<posix_memalign>()  の宣言を I<E<lt>stdlib.hE<gt>> で行うことに関しては、 皆"
8237 "の意見が一致している。"
8238
8239 #. type: Plain text
8240 #: build/C/man3/posix_memalign.3:214
8241 msgid ""
8242 "On some systems B<memalign>()  is declared in I<E<lt>stdlib.hE<gt>> instead "
8243 "of I<E<lt>malloc.hE<gt>>."
8244 msgstr ""
8245 "いくつかのシステムでは、 B<memalign>()  は I<E<lt>malloc.hE<gt>> ではなく "
8246 "I<E<lt>stdlib.hE<gt>> で宣言されている。"
8247
8248 #. type: Plain text
8249 #: build/C/man3/posix_memalign.3:221
8250 msgid ""
8251 "According to SUSv2, B<valloc>()  is declared in I<E<lt>stdlib.hE<gt>>.  "
8252 "Libc4,5 and glibc declare it in I<E<lt>malloc.hE<gt>>, and also in "
8253 "I<E<lt>stdlib.hE<gt>> if suitable feature test macros are defined (see "
8254 "above)."
8255 msgstr ""
8256 "SUSv2 によると、 B<valloc>() は I<E<lt>stdlib.hE<gt>> で宣言される。 "
8257 "libc4,5\n"
8258 "や glibc では I<E<lt>malloc.hE<gt>> で宣言されており、 さらに適切な機能検査\n"
8259 "マクロが定義された場合には I<E<lt>stdlib.hE<gt>> でも宣言される(上記を参照)。"
8260
8261 #. type: Plain text
8262 #: build/C/man3/posix_memalign.3:230
8263 msgid ""
8264 "On many systems there are alignment restrictions, for example, on buffers "
8265 "used for direct block device I/O.  POSIX specifies the I<pathconf(path,"
8266 "_PC_REC_XFER_ALIGN)> call that tells what alignment is needed.  Now one can "
8267 "use B<posix_memalign>()  to satisfy this requirement."
8268 msgstr ""
8269 "多くのシステムでは、アラインメントに関して制限がある。例えば、 ブロックデバイ"
8270 "スに対するダイレクト I/O に使用するバッファには アラインメントに関する制限が"
8271 "ある。 POSIX では、どんなアラインメントが必要かを知るために I<pathconf(path,"
8272 "_PC_REC_XFER_ALIGN)> コールを規定している。ここで B<posix_memalign>()  を使う"
8273 "と、この必要条件を満たすことができる。"
8274
8275 #. type: Plain text
8276 #: build/C/man3/posix_memalign.3:239
8277 msgid ""
8278 "B<posix_memalign>()  verifies that I<alignment> matches the requirements "
8279 "detailed above.  B<memalign>()  may not check that the I<alignment> argument "
8280 "is correct."
8281 msgstr ""
8282 "B<posix_memalign>() は I<alignment> が上で詳細に述べた必要条件を満たすか\n"
8283 "どうかを確かめる。 B<memalign>() は I<alignment> 引き数が正しいかどうかの\n"
8284 "確認を行わないかもしれない。"
8285
8286 #.  Other systems allow passing the result of
8287 #.  .IR valloc ()
8288 #.  to
8289 #.  .IR free (3),
8290 #.  but not to
8291 #.  .IR realloc (3).
8292 #. type: Plain text
8293 #: build/C/man3/posix_memalign.3:267
8294 msgid ""
8295 "POSIX requires that memory obtained from B<posix_memalign>()  can be freed "
8296 "using B<free>(3).  Some systems provide no way to reclaim memory allocated "
8297 "with B<memalign>()  or B<valloc>()  (because one can pass to B<free>(3)  "
8298 "only a pointer obtained from B<malloc>(3), while, for example, "
8299 "B<memalign>()  would call B<malloc>(3)  and then align the obtained value).  "
8300 "The glibc implementation allows memory obtained from any of these functions "
8301 "to be reclaimed with B<free>(3)."
8302 msgstr ""
8303 "POSIX では B<posix_memalign>() によって獲得したメモリは B<free>(3) を\n"
8304 "使って解放することができる必要がある。 いくつかのシステムでは\n"
8305 "B<memalign>() やB<valloc>() で割り当てられたメモリを再利用する手段が\n"
8306 "提供されていない(なぜなら B<free>(3) に渡すことができるのは\n"
8307 "B<malloc>(3) から受け取ったポインタだけだが、例えば B<memalign>() は\n"
8308 "B<malloc>(3) を呼び出し、得た値をアラインメントしてしまうからである)。\n"
8309 "glibc の実装では、 ここに述べた関数のいずれで獲得したメモリも\n"
8310 "B<free>(3) で再利用することができる。"
8311
8312 #. type: Plain text
8313 #: build/C/man3/posix_memalign.3:272
8314 msgid ""
8315 "The glibc B<malloc>(3)  always returns 8-byte aligned memory addresses, so "
8316 "these functions are needed only if you require larger alignment values."
8317 msgstr ""
8318 "glibc の B<malloc>(3) は常に 8 バイトにアラインメントされたメモリアドレスを\n"
8319 "返すので、ここで述べた関数が必要になるのは 8 バイトよりも大きなアラインメン"
8320 "ト\n"
8321 "が必要な場合だけである。"
8322
8323 #. type: Plain text
8324 #: build/C/man3/posix_memalign.3:277
8325 msgid "B<brk>(2), B<getpagesize>(2), B<free>(3), B<malloc>(3)"
8326 msgstr "B<brk>(2), B<getpagesize>(2), B<free>(3), B<malloc>(3)"
8327
8328 #. type: TH
8329 #: build/C/man2/readahead.2:28
8330 #, no-wrap
8331 msgid "READAHEAD"
8332 msgstr "READAHEAD"
8333
8334 #. type: TH
8335 #: build/C/man2/readahead.2:28
8336 #, no-wrap
8337 msgid "2014-03-15"
8338 msgstr "2014-03-15"
8339
8340 #. type: Plain text
8341 #: build/C/man2/readahead.2:31
8342 msgid "readahead - initiate file readahead into page cache"
8343 msgstr "readahead - 前もってファイルをページ・キャッシュに読み込む"
8344
8345 #. type: Plain text
8346 #: build/C/man2/readahead.2:37
8347 #, no-wrap
8348 msgid "B<ssize_t readahead(int >I<fd>B<, off64_t >I<offset>B<, size_t >I<count>B<);>\n"
8349 msgstr "B<ssize_t readahead(int >I<fd>B<, off64_t >I<offset>B<, size_t >I<count>B<);>\n"
8350
8351 #. type: Plain text
8352 #: build/C/man2/readahead.2:44
8353 msgid ""
8354 "B<readahead>()  initiates readahead on a file so that subsequent reads from "
8355 "that file will be satisfied from the cache, and not block on disk I/O "
8356 "(assuming the readahead was initiated early enough and that other activity "
8357 "on the system did not in the meantime flush pages from the cache)."
8358 msgstr ""
8359 "B<readahead>() はファイルの先読みを行い、そのファイルに対する後の読み込みが"
8360 "キャッシュから行われ、ディスク I/O で停止しないようにする (この条件を満たせる"
8361 "のは、先読みは十分早く行われ、システムの他の動作によりその後にキャッシュから"
8362 "ページがフラッシュされない場合である)。"
8363
8364 #. type: Plain text
8365 #: build/C/man2/readahead.2:66
8366 msgid ""
8367 "The I<fd> argument is a file descriptor identifying the file which is to be "
8368 "read.  The I<offset> argument specifies the starting point from which data "
8369 "is to be read and I<count> specifies the number of bytes to be read.  I/O is "
8370 "performed in whole pages, so that I<offset> is effectively rounded down to a "
8371 "page boundary and bytes are read up to the next page boundary greater than "
8372 "or equal to I<(offset+count)>.  B<readahead>()  does not read beyond the end "
8373 "of the file.  The current file offset of the open file referred to by I<fd> "
8374 "is left unchanged."
8375 msgstr ""
8376 "I<fd> 引き数は読み込みを行うファイルを識別するファイル・ディスクリプタであ"
8377 "る。 I<offset> 引き数はデータの読み込み開始位置を指定し、 I<count> は読み込む"
8378 "データのバイト数を指定する。 ディスク I/O はページ単位で実行されるので、 実際"
8379 "には I<offset> はページ境界に切り下げられ、読み込みバイト数は I<(offset"
8380 "+count)> より小さくない次のページ境界まで切り上げられる。 B<readahead>()  は"
8381 "ファイルの末尾を越えた範囲まで読み出しを行うことはない。 I<fd> で参照された"
8382 "オープン済のファイルのファイルオフセットの現在値は 変更されない。"
8383
8384 #. type: Plain text
8385 #: build/C/man2/readahead.2:72
8386 msgid ""
8387 "On success, B<readahead>()  returns 0; on failure, -1 is returned, with "
8388 "I<errno> set to indicate the cause of the error."
8389 msgstr ""
8390 "B<readahead>()  は成功すると 0 を返す。失敗した場合 -1 を返し、 I<errno> にエ"
8391 "ラーの原因を示す値を設定する。"
8392
8393 #. type: Plain text
8394 #: build/C/man2/readahead.2:77
8395 msgid "I<fd> is not a valid file descriptor or is not open for reading."
8396 msgstr ""
8397 "I<fd> が有効なファイル・ディスクリプタでない、または 読み込み用にオープンされ"
8398 "ていない。"
8399
8400 #. type: Plain text
8401 #: build/C/man2/readahead.2:83
8402 msgid ""
8403 "I<fd> does not refer to a file type to which B<readahead>()  can be applied."
8404 msgstr ""
8405 "I<fd> が参照しているファイルが、 B<readahead>()  を行うことができないタイプの"
8406 "ファイルであった。"
8407
8408 #. type: Plain text
8409 #: build/C/man2/readahead.2:88
8410 msgid ""
8411 "The B<readahead>()  system call appeared in Linux 2.4.13; glibc support has "
8412 "been provided since version 2.3."
8413 msgstr ""
8414 "B<readahead>()  システムコールは Linux 2.4.13 で登場した。 glibc でのサポート"
8415 "は glibc バージョン 2.3 以降で行われている。"
8416
8417 #. type: Plain text
8418 #: build/C/man2/readahead.2:93
8419 msgid ""
8420 "The B<readahead>()  system call is Linux-specific, and its use should be "
8421 "avoided in portable applications."
8422 msgstr ""
8423 "B<readahead>()  システムコールは Linux 固有であり、移植を考慮したプログラムで"
8424 "は 使用を避けるべきである。"
8425
8426 #. type: Plain text
8427 #: build/C/man2/readahead.2:98
8428 msgid ""
8429 "On some 32-bit architectures, the calling signature for this system call "
8430 "differs, for the reasons described in B<syscall>(2)."
8431 msgstr ""
8432 "いくつかの 32 ビットアーキテクチャでは、このシステムコールの呼び出しシグネ"
8433 "チャーが違っている。 理由は B<syscall>(2) で説明されている。"
8434
8435 #. type: Plain text
8436 #: build/C/man2/readahead.2:107
8437 msgid ""
8438 "B<readahead>()  attempts to schedule the reads in the background and return "
8439 "immediately.  However, it may block while it reads the filesystem metadata "
8440 "needed to locate the requested blocks.  This occurs frequently with ext[234] "
8441 "on large files using indirect blocks instead of extents, giving the "
8442 "appearance that the call blocks until the requested data has been read."
8443 msgstr ""
8444 "B<readahead>() は読み込みをバックグラウンドで行うようにスケジューリングを行"
8445 "い、すぐに返る。 しかしながら、要求されたブロックの位置を知るために必要なファ"
8446 "イルシステムのメタデータを読み込む間は B<readahead>() は停止することがある。 "
8447 "これは ext[234] で大きなファイルをエクステントではなく間接ブロックを使う場合"
8448 "にしばしば発生し、 要求したデータが読み込まれるまで呼び出しが停止しているよう"
8449 "に見える。"
8450
8451 #. type: Plain text
8452 #: build/C/man2/readahead.2:113
8453 msgid "B<lseek>(2), B<madvise>(2), B<mmap>(2), B<posix_fadvise>(2), B<read>(2)"
8454 msgstr ""
8455 "B<lseek>(2), B<madvise>(2), B<mmap>(2), B<posix_fadvise>(2), B<read>(2)"
8456
8457 #. type: TH
8458 #: build/C/man2/remap_file_pages.2:28
8459 #, no-wrap
8460 msgid "REMAP_FILE_PAGES"
8461 msgstr "REMAP_FILE_PAGES"
8462
8463 #. type: Plain text
8464 #: build/C/man2/remap_file_pages.2:31
8465 msgid "remap_file_pages - create a nonlinear file mapping"
8466 msgstr "remap_file_pages - 非線形ファイルマッピングを作成する。"
8467
8468 #. type: Plain text
8469 #: build/C/man2/remap_file_pages.2:35
8470 #, no-wrap
8471 msgid ""
8472 "B<#define _GNU_SOURCE>         /* See feature_test_macros(7) */\n"
8473 "B<#include E<lt>sys/mman.hE<gt>>\n"
8474 msgstr ""
8475 "B<#define _GNU_SOURCE>         /* feature_test_macros(7) 参照 */\n"
8476 "B<#include E<lt>sys/mman.hE<gt>>\n"
8477
8478 #. type: Plain text
8479 #: build/C/man2/remap_file_pages.2:38
8480 #, no-wrap
8481 msgid ""
8482 "B<int remap_file_pages(void *>I<addr>B<, size_t >I<size>B<, int >I<prot>B<,>\n"
8483 "B<                     size_t >I<pgoff>B<, int >I<flags>B<);>\n"
8484 msgstr ""
8485 "B<int remap_file_pages(void *>I<addr>B<, size_t >I<size>B<, int >I<prot>B<,>\n"
8486 "B<                     size_t >I<pgoff>B<, int >I<flags>B<);>\n"
8487
8488 #.  commit 33041a0d76d3c3e0aff28ac95a2ffdedf1282dbc
8489 #.  http://lwn.net/Articles/597632/
8490 #. type: Plain text
8491 #: build/C/man2/remap_file_pages.2:47
8492 msgid ""
8493 "B<Note>: this system call is (since Linux 3.16) deprecated and will "
8494 "eventually be replaced by a slower in-kernel emulation.  Those few "
8495 "applications that use this system call should consider migrating to "
8496 "alternatives."
8497 msgstr ""
8498
8499 #. type: Plain text
8500 #: build/C/man2/remap_file_pages.2:59
8501 msgid ""
8502 "The B<remap_file_pages>()  system call is used to create a nonlinear "
8503 "mapping, that is, a mapping in which the pages of the file are mapped into a "
8504 "nonsequential order in memory.  The advantage of using "
8505 "B<remap_file_pages>()  over using repeated calls to B<mmap>(2)  is that the "
8506 "former approach does not require the kernel to create additional VMA "
8507 "(Virtual Memory Area) data structures."
8508 msgstr ""
8509 "B<remap_file_pages>()  システムコールは非線形なマッピング、 つまりファイルの"
8510 "ページがメモリ上で連続しない順番でマップされる マッピングを作成するために使わ"
8511 "れる。 B<remap_file_pages>()  を使う方が B<mmap>(2)  を繰り返して使うより優れ"
8512 "ている点は、 前者の方法ではカーネルが VMA (Virtual Memory Area, 仮想メモリ領"
8513 "域)  データ構造体を追加で作成する必要がないことである。"
8514
8515 #. type: Plain text
8516 #: build/C/man2/remap_file_pages.2:61
8517 msgid "To create a nonlinear mapping we perform the following steps:"
8518 msgstr "非線形マッピングを作成するためには、 以下のようなステップを実行する:"
8519
8520 #. type: TP
8521 #: build/C/man2/remap_file_pages.2:61
8522 #, no-wrap
8523 msgid "1."
8524 msgstr "1."
8525
8526 #. type: Plain text
8527 #: build/C/man2/remap_file_pages.2:69
8528 msgid ""
8529 "Use B<mmap>(2)  to create a mapping (which is initially linear).  This "
8530 "mapping must be created with the B<MAP_SHARED> flag."
8531 msgstr ""
8532 "B<mmap>(2)  を使い、マッピングを作成する (このマッピングは最初は線形であ"
8533 "る)。 このマッピングは B<MAP_SHARED> フラグを指定して作成されなければならな"
8534 "い。"
8535
8536 #. type: TP
8537 #: build/C/man2/remap_file_pages.2:69
8538 #, no-wrap
8539 msgid "2."
8540 msgstr "2."
8541
8542 #. type: Plain text
8543 #: build/C/man2/remap_file_pages.2:77
8544 msgid ""
8545 "Use one or more calls to B<remap_file_pages>()  to rearrange the "
8546 "correspondence between the pages of the mapping and the pages of the file.  "
8547 "It is possible to map the same page of a file into multiple locations within "
8548 "the mapped region."
8549 msgstr ""
8550 "B<remap_file_pages>()  を 1 回以上呼び出して、 マッピングのページとファイルの"
8551 "ページの対応関係を再構成する。 ファイルの同じページをマッピング領域の複数の場"
8552 "所に マップすることが可能である。"
8553
8554 #. type: Plain text
8555 #: build/C/man2/remap_file_pages.2:88
8556 msgid ""
8557 "The I<pgoff> and I<size> arguments specify the region of the file that is to "
8558 "be relocated within the mapping: I<pgoff> is a file offset in units of the "
8559 "system page size; I<size> is the length of the region in bytes."
8560 msgstr ""
8561 "I<pgoff> と I<size> 引き数は、マッピング内で再配置されるファイルの領域を指定"
8562 "する。 I<pgoff> はファイルオフセットであり、単位はシステムのページサイズであ"
8563 "る。 I<size> は領域の長さであり、単位はバイトである。"
8564
8565 #. type: Plain text
8566 #: build/C/man2/remap_file_pages.2:106
8567 msgid ""
8568 "The I<addr> argument serves two purposes.  First, it identifies the mapping "
8569 "whose pages we want to rearrange.  Thus, I<addr> must be an address that "
8570 "falls within a region previously mapped by a call to B<mmap>(2).  Second, "
8571 "I<addr> specifies the address at which the file pages identified by I<pgoff> "
8572 "and I<size> will be placed."
8573 msgstr ""
8574 "I<addr> 引き数は 2 つの目的で使われる。 第 1 の目的は、この引き数によって再編"
8575 "成したいページの マッピングを識別することである。 よって I<addr> は "
8576 "B<mmap>(2)  の呼び出しで過去にマップされた領域内のアドレスでなければならな"
8577 "い。 第 2 の目的は、 I<pgoff> と I<size> で識別されるファイルページが置かれる"
8578 "予定のアドレスを、 I<addr> によって指定することである。"
8579
8580 #.  This rounding is weird, and not consistent with the treatment of
8581 #.  the analogous arguments for munmap()/mprotect() and for mlock().
8582 #.  MTK, 14 Sep 2005
8583 #. type: Plain text
8584 #: build/C/man2/remap_file_pages.2:120
8585 msgid ""
8586 "The values specified in I<addr> and I<size> should be multiples of the "
8587 "system page size.  If they are not, then the kernel rounds I<both> values "
8588 "I<down> to the nearest multiple of the page size."
8589 msgstr ""
8590 "I<addr> と I<size> に指定する値は、システムのページサイズの倍数とすべきであ"
8591 "る。 それ以外の場合、カーネルは「両方」の値を 最も近いページサイズの倍数へ"
8592 "「切り下げる」。"
8593
8594 #. type: Plain text
8595 #: build/C/man2/remap_file_pages.2:124
8596 msgid "The I<prot> argument must be specified as 0."
8597 msgstr "I<prot> 引き数は 0 に指定されなければならない。"
8598
8599 #. type: Plain text
8600 #: build/C/man2/remap_file_pages.2:132
8601 msgid ""
8602 "The I<flags> argument has the same meaning as for B<mmap>(2), but all flags "
8603 "other than B<MAP_NONBLOCK> are ignored."
8604 msgstr ""
8605 "I<flags> 引き数は B<mmap>(2)  のものと同じ意味であるが、 B<MAP_NONBLOCK> 以外"
8606 "の全てのフラグは無視される。"
8607
8608 #. type: Plain text
8609 #: build/C/man2/remap_file_pages.2:139
8610 msgid ""
8611 "On success, B<remap_file_pages>()  returns 0.  On error, -1 is returned, and "
8612 "I<errno> is set appropriately."
8613 msgstr ""
8614 "成功した場合、 B<remap_file_pages>()  は 0 を返す。 エラーの場合、-1 が返さ"
8615 "れ、 I<errno> が適切に設定される。"
8616
8617 #. type: Plain text
8618 #: build/C/man2/remap_file_pages.2:147
8619 msgid ""
8620 "I<addr> does not refer to a valid mapping created with the B<MAP_SHARED> "
8621 "flag."
8622 msgstr ""
8623 "I<addr> が B<MAP_SHARED> フラグを指定して作成された有効なマッピングを参照して"
8624 "いない。"
8625
8626 #.  And possibly others from vma->vm_ops->populate()
8627 #. type: Plain text
8628 #: build/C/man2/remap_file_pages.2:156
8629 msgid "I<addr>, I<size>, I<prot>, or I<pgoff> is invalid."
8630 msgstr "I<addr>, I<size>, I<prot>, I<pgoff> のいずれかが不正である。"
8631
8632 #. type: Plain text
8633 #: build/C/man2/remap_file_pages.2:161
8634 msgid ""
8635 "The B<remap_file_pages>()  system call appeared in Linux 2.5.46; glibc "
8636 "support was added in version 2.3.3."
8637 msgstr ""
8638 "B<remap_file_pages>()  システムコールは Linux 2.5.46 で登場した。 glibc での"
8639 "サポートは glibc バージョン 2.3.3 で追加された。"
8640
8641 #. type: Plain text
8642 #: build/C/man2/remap_file_pages.2:165
8643 msgid "The B<remap_file_pages>()  system call is Linux-specific."
8644 msgstr "B<remap_file_pages>()  システムコールは Linux 固有のものである。"
8645
8646 #.  commit 3ee6dafc677a68e461a7ddafc94a580ebab80735
8647 #. type: Plain text
8648 #: build/C/man2/remap_file_pages.2:176
8649 msgid ""
8650 "Since Linux 2.6.23, B<remap_file_pages>()  creates non-linear mappings only "
8651 "on in-memory file systems such as tmpfs, hugetlbfs or ramfs.  On filesystems "
8652 "with a backing store, B<remap_file_pages>()  is not much more efficient than "
8653 "using B<mmap>(2)  to adjust which parts of the file are mapped to which "
8654 "addresses."
8655 msgstr ""
8656
8657 #. type: Plain text
8658 #: build/C/man2/remap_file_pages.2:183
8659 msgid ""
8660 "B<getpagesize>(2), B<mmap>(2), B<mmap2>(2), B<mprotect>(2), B<mremap>(2), "
8661 "B<msync>(2)"
8662 msgstr ""
8663 "B<getpagesize>(2), B<mmap>(2), B<mmap2>(2), B<mprotect>(2), B<mremap>(2), "
8664 "B<msync>(2)"
8665
8666 #. type: TH
8667 #: build/C/man3/shm_open.3:26
8668 #, no-wrap
8669 msgid "SHM_OPEN"
8670 msgstr "SHM_OPEN"
8671
8672 #. type: TH
8673 #: build/C/man3/shm_open.3:26
8674 #, no-wrap
8675 msgid "2009-02-25"
8676 msgstr "2009-02-25"
8677
8678 #. type: Plain text
8679 #: build/C/man3/shm_open.3:29
8680 msgid ""
8681 "shm_open, shm_unlink - create/open or unlink POSIX shared memory objects"
8682 msgstr ""
8683 "shm_open, shm_unlink - POSIX 共有メモリ・オブジェクトの作成/オープン/削除を行"
8684 "う"
8685
8686 #. type: Plain text
8687 #: build/C/man3/shm_open.3:33
8688 msgid "B<#include E<lt>sys/stat.hE<gt>> /* For mode constants */"
8689 msgstr "B<#include E<lt>sys/stat.hE<gt>> /* mode 定数用 */"
8690
8691 #. type: Plain text
8692 #: build/C/man3/shm_open.3:35
8693 msgid "B<#include E<lt>fcntl.hE<gt>> /* For O_* constants */"
8694 msgstr "B<#include E<lt>fcntl.hE<gt>> /* O_* 定数の定義用 */"
8695
8696 #. type: Plain text
8697 #: build/C/man3/shm_open.3:37
8698 msgid ""
8699 "B<int shm_open(const char *>I<name>B<, int >I<oflag>B<, mode_t >I<mode>B<);>"
8700 msgstr ""
8701 "B<int shm_open(const char *>I<name>B<, int >I<oflag>B<, mode_t >I<mode>B<);>"
8702
8703 #. type: Plain text
8704 #: build/C/man3/shm_open.3:39
8705 msgid "B<int shm_unlink(const char *>I<name>B<);>"
8706 msgstr "B<int shm_unlink(const char *>I<name>B<);>"
8707
8708 #. type: Plain text
8709 #: build/C/man3/shm_open.3:41
8710 msgid "Link with I<-lrt>."
8711 msgstr "I<-lrt> でリンクする。"
8712
8713 #. type: Plain text
8714 #: build/C/man3/shm_open.3:53
8715 msgid ""
8716 "B<shm_open>()  creates and opens a new, or opens an existing, POSIX shared "
8717 "memory object.  A POSIX shared memory object is in effect a handle which can "
8718 "be used by unrelated processes to B<mmap>(2)  the same region of shared "
8719 "memory.  The B<shm_unlink>()  function performs the converse operation, "
8720 "removing an object previously created by B<shm_open>()."
8721 msgstr ""
8722 "B<shm_open>()  は、POSIX 共有メモリ・オブジェクトを新規に作成/オープンした"
8723 "り、 すでに存在するオブジェクトをオープンしたりする。 POSIX 共有メモリ・オブ"
8724 "ジェクトは、実際には、関係のないプロセスが 共有メモリの同じ領域を "
8725 "B<mmap>(2)  するために使用することができる手段である。 B<shm_unlink>()  は、"
8726 "逆の操作、つまり以前に B<shm_open>()  で作成されたオブジェクトの削除を行う。"
8727
8728 #.  glibc allows the initial slash to be omitted, and makes
8729 #.  multiple initial slashes equivalent to a single slash.
8730 #.  This differs from the implementation of POSIX message queues.
8731 #.  glibc allows subdirectory components in the name, in which
8732 #.  case the subdirectory must exist under /dev/shm, and allow the
8733 #.  required permissions if a user wants to create a shared memory
8734 #.  object in that subdirectory.
8735 #. type: Plain text
8736 #: build/C/man3/shm_open.3:74
8737 msgid ""
8738 "The operation of B<shm_open>()  is analogous to that of B<open>(2).  I<name> "
8739 "specifies the shared memory object to be created or opened.  For portable "
8740 "use, a shared memory object should be identified by a name of the form I</"
8741 "somename>; that is, a null-terminated string of up to B<NAME_MAX> (i.e., "
8742 "255) characters consisting of an initial slash, followed by one or more "
8743 "characters, none of which are slashes."
8744 msgstr ""
8745 "B<shm_open>()  の動作は B<open>(2)  とよく似ている。 I<name> で作成したりオー"
8746 "プンしたりする共有メモリ・オブジェクトを指定する。 移植性を持たせるためには、"
8747 "共有メモリ・オブジェクトは I</somename> という形式の名前で識別し、 その名前"
8748 "は、最大で B<NAME_MAX> (すなわち 255) 文字のヌル終端された文字列で、 スラッ"
8749 "シュで始まり、スラッシュ以外の文字が 1 文字以上続く形式 にすべきである。"
8750
8751 #. type: Plain text
8752 #: build/C/man3/shm_open.3:81
8753 msgid ""
8754 "I<oflag> is a bit mask created by ORing together exactly one of B<O_RDONLY> "
8755 "or B<O_RDWR> and any of the other flags listed here:"
8756 msgstr ""
8757 "I<oflag> はビットマスクで、 B<O_RDONLY> と B<O_RDWR> のいずれか一方と、以下に"
8758 "述べる他のフラグの論理和をとったもの を指定する。"
8759
8760 #. type: TP
8761 #: build/C/man3/shm_open.3:81
8762 #, no-wrap
8763 msgid "B<O_RDONLY>"
8764 msgstr "B<O_RDONLY>"
8765
8766 #. type: Plain text
8767 #: build/C/man3/shm_open.3:89
8768 msgid ""
8769 "Open the object for read access.  A shared memory object opened in this way "
8770 "can be B<mmap>(2)ed only for read (B<PROT_READ>)  access."
8771 msgstr ""
8772 "読み出しアクセス用にオブジェクトをオープンする。 このフラグを指定してオープン"
8773 "された共有メモリ・オブジェクトは、 読み出し (B<PROT_READ>) アクセスでのみ "
8774 "B<mmap>(2)  することができる。"
8775
8776 #. type: TP
8777 #: build/C/man3/shm_open.3:89
8778 #, no-wrap
8779 msgid "B<O_RDWR>"
8780 msgstr "B<O_RDWR>"
8781
8782 #. type: Plain text
8783 #: build/C/man3/shm_open.3:92
8784 msgid "Open the object for read-write access."
8785 msgstr "読み書きアクセス用にオブジェクトをオープンする。"
8786
8787 #. type: TP
8788 #: build/C/man3/shm_open.3:92
8789 #, no-wrap
8790 msgid "B<O_CREAT>"
8791 msgstr "B<O_CREAT>"
8792
8793 #.  In truth it is actually the filesystem IDs on Linux, but these
8794 #.  are nearly always the same as the effective IDs.  (MTK, Jul 05)
8795 #. type: Plain text
8796 #: build/C/man3/shm_open.3:112
8797 msgid ""
8798 "Create the shared memory object if it does not exist.  The user and group "
8799 "ownership of the object are taken from the corresponding effective IDs of "
8800 "the calling process, and the object's permission bits are set according to "
8801 "the low-order 9 bits of I<mode>, except that those bits set in the process "
8802 "file mode creation mask (see B<umask>(2))  are cleared for the new object.  "
8803 "A set of macro constants which can be used to define I<mode> is listed in "
8804 "B<open>(2).  (Symbolic definitions of these constants can be obtained by "
8805 "including I<E<lt>sys/stat.hE<gt>>.)"
8806 msgstr ""
8807 "存在しない場合、共有メモリ・オブジェクトを作成する。 オブジェクトのユーザとグ"
8808 "ループの所有権は、 呼び出し元プロセスの対応する実効 ID が使われ、 オブジェク"
8809 "トの許可ビットは I<mode> の下位 9 ビットに基づいて設定される。ただし、 ファイ"
8810 "ルモード作成マスク (B<umask>(2)  参照) に設定されている値は、新規オブジェクト"
8811 "に関してはクリアされる。 I<mode> を定義するために使用できるマクロ定数(群)は "
8812 "B<open>(2)  に記載されている (これらの定数のシンボル定義は I<E<lt>sys/stat."
8813 "hE<gt>> のインクルードにより得られる)。"
8814
8815 #. type: Plain text
8816 #: build/C/man3/shm_open.3:118
8817 msgid ""
8818 "A new shared memory object initially has zero length\\(emthe size of the "
8819 "object can be set using B<ftruncate>(2).  The newly allocated bytes of a "
8820 "shared memory object are automatically initialized to 0."
8821 msgstr ""
8822 "新規に作成された共有メモリ・オブジェクトは長さ 0 で初期化される。 オブジェク"
8823 "トの大きさは B<ftruncate>(2)  を使って設定できる。 共有メモリ・オブジェクトと"
8824 "して新規に確保されたバイトは自動的に 0 に初期化される。"
8825
8826 #. type: TP
8827 #: build/C/man3/shm_open.3:118
8828 #, no-wrap
8829 msgid "B<O_EXCL>"
8830 msgstr "B<O_EXCL>"
8831
8832 #. type: Plain text
8833 #: build/C/man3/shm_open.3:127
8834 msgid ""
8835 "If B<O_CREAT> was also specified, and a shared memory object with the given "
8836 "I<name> already exists, return an error.  The check for the existence of the "
8837 "object, and its creation if it does not exist, are performed atomically."
8838 msgstr ""
8839 "B<O_CREAT> が一緒に指定されており、 I<name> で指定された共有メモリ・オブジェ"
8840 "クトが既に存在した場合、 エラーを返す。 オブジェクトの存在確認と、存在しな"
8841 "かった場合のオブジェクト作成は、 必ず一連の操作として実行される (performed "
8842 "atomically)。"
8843
8844 #. type: TP
8845 #: build/C/man3/shm_open.3:127
8846 #, no-wrap
8847 msgid "B<O_TRUNC>"
8848 msgstr "B<O_TRUNC>"
8849
8850 #. type: Plain text
8851 #: build/C/man3/shm_open.3:130
8852 msgid "If the shared memory object already exists, truncate it to zero bytes."
8853 msgstr ""
8854 "共有メモリ・オブジェクトがすでに存在した場合、 そのオブジェクトを 0 バイトに"
8855 "切り詰める。"
8856
8857 #. type: Plain text
8858 #: build/C/man3/shm_open.3:133
8859 msgid ""
8860 "Definitions of these flag values can be obtained by including I<E<lt>fcntl."
8861 "hE<gt>>."
8862 msgstr ""
8863 "これらのフラグ値の定義は I<E<lt>fcntl.hE<gt>> のインクルードにより得られる。"
8864
8865 #. type: Plain text
8866 #: build/C/man3/shm_open.3:144
8867 msgid ""
8868 "On successful completion B<shm_open>()  returns a new file descriptor "
8869 "referring to the shared memory object.  This file descriptor is guaranteed "
8870 "to be the lowest-numbered file descriptor not previously opened within the "
8871 "process.  The B<FD_CLOEXEC> flag (see B<fcntl>(2))  is set for the file "
8872 "descriptor."
8873 msgstr ""
8874 "成功して完了した場合、 B<shm_open>()  は共有メモリ・オブジェクトを参照する新"
8875 "しいファイル・ディスクリプタを返す。 このファイル・ディスクリプタは、そのプロ"
8876 "セス内で過去にオープンされていない ファイル・ディスクリプタの中で最も小さな数"
8877 "になることが保証される。 B<FD_CLOEXEC> フラグ (B<fcntl>(2)  を参照) が、この"
8878 "ファイル・ディスクリプタに設定される。"
8879
8880 #. type: Plain text
8881 #: build/C/man3/shm_open.3:153
8882 msgid ""
8883 "The file descriptor is normally used in subsequent calls to B<ftruncate>(2)  "
8884 "(for a newly created object) and B<mmap>(2).  After a call to B<mmap>(2)  "
8885 "the file descriptor may be closed without affecting the memory mapping."
8886 msgstr ""
8887 "通常、これらのファイル・ディスクリプタは、この後続けて実行される "
8888 "B<ftruncate>(2)  (新規に作成されたオブジェクトの場合のみ) と B<mmap>(2)  の呼"
8889 "び出しに使用される。 B<mmap>(2)  を呼び出した後は、ファイル・ディスクリプタを"
8890 "クローズしてもよく、 クローズしてもメモリ・マッピングに影響を与えることはな"
8891 "い。"
8892
8893 #. type: Plain text
8894 #: build/C/man3/shm_open.3:171
8895 msgid ""
8896 "The operation of B<shm_unlink>()  is analogous to B<unlink>(2): it removes a "
8897 "shared memory object name, and, once all processes have unmapped the object, "
8898 "de-allocates and destroys the contents of the associated memory region.  "
8899 "After a successful B<shm_unlink>(), attempts to B<shm_open>()  an object "
8900 "with the same I<name> will fail (unless B<O_CREAT> was specified, in which "
8901 "case a new, distinct object is created)."
8902 msgstr ""
8903 "B<shm_unlink>()  の動作は B<unlink>(2)  とよく似ている: 共有メモリ・オブジェ"
8904 "クト名を削除し、すべてのプロセスが処理対象の オブジェクトをアンマップした時点"
8905 "でオブジェクトの割り当てを解除し、 対応するメモリ領域の内容を破棄する。 "
8906 "B<shm_unlink>()  が成功した後で、同じ I<name> を持つオブジェクトに対して "
8907 "B<shm_open>()  を行うと、 (B<O_CREAT> が指定されていない場合) 失敗する。 "
8908 "(B<O_CREAT> が指定されている場合、新しく別のオブジェクトが作成される)。"
8909
8910 #. type: Plain text
8911 #: build/C/man3/shm_open.3:180
8912 msgid ""
8913 "On success, B<shm_open>()  returns a nonnegative file descriptor.  On "
8914 "failure, B<shm_open>()  returns -1.  B<shm_unlink>()  returns 0 on success, "
8915 "or -1 on error."
8916 msgstr ""
8917 "成功した場合、 B<shm_open>()  は非負のファイル・ディスクリプタを返す。 失敗し"
8918 "た場合、 B<shm_open>()  は -1 を返す。 B<shm_unlink>()  は、成功した場合 0 "
8919 "を、エラーが起こった場合 -1 を返す。"
8920
8921 #. type: Plain text
8922 #: build/C/man3/shm_open.3:187
8923 msgid ""
8924 "On failure, I<errno> is set to indicate the cause of the error.  Values "
8925 "which may appear in I<errno> include the following:"
8926 msgstr ""
8927 "失敗した場合、エラーの原因を示すため I<errno> が設定される。 I<errno> に設定"
8928 "される値は以下の通りである:"
8929
8930 #. type: Plain text
8931 #: build/C/man3/shm_open.3:192
8932 msgid "Permission to B<shm_unlink>()  the shared memory object was denied."
8933 msgstr "共有メモリオブジェクトを B<shm_unlink>()  する権限がなかった。"
8934
8935 #. type: Plain text
8936 #: build/C/man3/shm_open.3:202
8937 msgid ""
8938 "Permission was denied to B<shm_open>()  I<name> in the specified I<mode>, or "
8939 "B<O_TRUNC> was specified and the caller does not have write permission on "
8940 "the object."
8941 msgstr ""
8942 "指定された I<mode> で I<name> を B<shm_open>()  する権限がなかった。もしく"
8943 "は、 B<O_TRUNC> が指定されたが、呼び出し元にはそのオブジェクトに対する書き込"
8944 "み権限が なかった。"
8945
8946 #. type: TP
8947 #: build/C/man3/shm_open.3:202 build/C/man2/shmget.2:198
8948 #, no-wrap
8949 msgid "B<EEXIST>"
8950 msgstr "B<EEXIST>"
8951
8952 #. type: Plain text
8953 #: build/C/man3/shm_open.3:213
8954 msgid ""
8955 "Both B<O_CREAT> and B<O_EXCL> were specified to B<shm_open>()  and the "
8956 "shared memory object specified by I<name> already exists."
8957 msgstr ""
8958 "B<O_CREAT> と B<O_EXCL> の両方が B<shm_open>()  に指定されたが、 I<name> で指"
8959 "定された共有メモリ・オブジェクトが既に存在した。"
8960
8961 #. type: Plain text
8962 #: build/C/man3/shm_open.3:220
8963 msgid "The I<name> argument to B<shm_open>()  was invalid."
8964 msgstr "B<shm_open>()  に与えられた I<name> 引き数が不正であった。"
8965
8966 #. type: TP
8967 #: build/C/man3/shm_open.3:220
8968 #, no-wrap
8969 msgid "B<EMFILE>"
8970 msgstr "B<EMFILE>"
8971
8972 #. type: Plain text
8973 #: build/C/man3/shm_open.3:223
8974 msgid "The process already has the maximum number of files open."
8975 msgstr "プロセスがオープン可能なファイル数の上限にすでに達していた。"
8976
8977 #. type: TP
8978 #: build/C/man3/shm_open.3:223
8979 #, no-wrap
8980 msgid "B<ENAMETOOLONG>"
8981 msgstr "B<ENAMETOOLONG>"
8982
8983 #. type: Plain text
8984 #: build/C/man3/shm_open.3:229
8985 msgid "The length of I<name> exceeds B<PATH_MAX>."
8986 msgstr "I<name> の長さが B<PATH_MAX> を越えている。"
8987
8988 #. type: Plain text
8989 #: build/C/man3/shm_open.3:233
8990 msgid ""
8991 "The limit on the total number of files open on the system has been reached."
8992 msgstr "ファイルシステムでオープンできるファイル数の上限に達した。"
8993
8994 #. type: TP
8995 #: build/C/man3/shm_open.3:233 build/C/man3/shm_open.3:242
8996 #: build/C/man2/shmget.2:225
8997 #, no-wrap
8998 msgid "B<ENOENT>"
8999 msgstr "B<ENOENT>"
9000
9001 #. type: Plain text
9002 #: build/C/man3/shm_open.3:242
9003 msgid ""
9004 "An attempt was made to B<shm_open>()  a I<name> that did not exist, and "
9005 "B<O_CREAT> was not specified."
9006 msgstr ""
9007 "存在していない I<name> のオブジェクトを B<shm_open>()  しようとしたが、 "
9008 "B<O_CREAT> が指定されていなかった。"
9009
9010 #. type: Plain text
9011 #: build/C/man3/shm_open.3:249
9012 msgid ""
9013 "An attempt was to made to B<shm_unlink>()  a I<name> that does not exist."
9014 msgstr "存在しない I<name> のオブジェクトを B<shm_unlink>()  しようとした。"
9015
9016 #. type: Plain text
9017 #: build/C/man3/shm_open.3:251
9018 msgid "These functions are provided in glibc 2.2 and later."
9019 msgstr "これらの関数は glibc 2.2 以降で提供されている。"
9020
9021 #. type: Plain text
9022 #: build/C/man3/shm_open.3:257
9023 msgid ""
9024 "POSIX.1-2001 says that the group ownership of a newly created shared memory "
9025 "object is set to either the calling process's effective group ID or \"a "
9026 "system default group ID\"."
9027 msgstr ""
9028 "POSIX.1-2001 には、新規に作成される共有メモリオブジェクトのグループ所有権"
9029 "は、 呼び出し元プロセスの実効グループ ID か 「システムのデフォルトのグループ "
9030 "ID」 のどちらかに設定される、と書かれている。"
9031
9032 #. type: Plain text
9033 #: build/C/man3/shm_open.3:266
9034 msgid ""
9035 "POSIX leaves the behavior of the combination of B<O_RDONLY> and B<O_TRUNC> "
9036 "unspecified.  On Linux, this will successfully truncate an existing shared "
9037 "memory object\\(emthis may not be so on other UNIX systems."
9038 msgstr ""
9039 "POSIX は B<O_RDONLY> と B<O_TRUNC> が一緒に指定された場合の動作を未定義にして"
9040 "いる。Linux では、 既存の共有メモリ・オブジェクトに対する切り詰め (truncate) "
9041 "は成功する。 しかし、他の UNIX システムでも同じであるとは限らない。"
9042
9043 #. type: Plain text
9044 #: build/C/man3/shm_open.3:271
9045 msgid ""
9046 "The POSIX shared memory object implementation on Linux 2.4 makes use of a "
9047 "dedicated filesystem, which is normally mounted under I</dev/shm>."
9048 msgstr ""
9049 "Linux 2.4 における POSIX 共有メモリ・オブジェクトの実装は 専用のファイルシス"
9050 "テムを使用する。そのファイルシステムは通常 I</dev/shm> にマウントされる。"
9051
9052 #. type: Plain text
9053 #: build/C/man3/shm_open.3:282
9054 msgid ""
9055 "B<close>(2), B<fchmod>(2), B<fchown>(2), B<fcntl>(2), B<fstat>(2), "
9056 "B<ftruncate>(2), B<mmap>(2), B<open>(2), B<umask>(2), B<shm_overview>(7)"
9057 msgstr ""
9058 "B<close>(2), B<fchmod>(2), B<fchown>(2), B<fcntl>(2), B<fstat>(2), "
9059 "B<ftruncate>(2), B<mmap>(2), B<open>(2), B<umask>(2), B<shm_overview>(7)"
9060
9061 #. type: TH
9062 #: build/C/man7/shm_overview.7:27
9063 #, no-wrap
9064 msgid "SHM_OVERVIEW"
9065 msgstr "SHM_OVERVIEW"
9066
9067 #. type: TH
9068 #: build/C/man7/shm_overview.7:27
9069 #, no-wrap
9070 msgid "2010-09-10"
9071 msgstr "2010-09-10"
9072
9073 #. type: Plain text
9074 #: build/C/man7/shm_overview.7:30
9075 msgid "shm_overview - overview of POSIX shared memory"
9076 msgstr "shm_overview - POSIX 共有メモリの概要"
9077
9078 #. type: Plain text
9079 #: build/C/man7/shm_overview.7:33
9080 msgid ""
9081 "The POSIX shared memory API allows processes to communicate information by "
9082 "sharing a region of memory."
9083 msgstr ""
9084 "POSIX 共有メモリ API を使用すると、メモリのある領域を共有して、 プロセス間で"
9085 "情報をやり取りすることができる。"
9086
9087 #. type: Plain text
9088 #: build/C/man7/shm_overview.7:35
9089 msgid "The interfaces employed in the API are:"
9090 msgstr "この API では以下のインターフェースが採用されている。"
9091
9092 #. type: TP
9093 #: build/C/man7/shm_overview.7:35
9094 #, no-wrap
9095 msgid "B<shm_open>(3)"
9096 msgstr "B<shm_open>(3)"
9097
9098 #. type: Plain text
9099 #: build/C/man7/shm_overview.7:42
9100 msgid ""
9101 "Create and open a new object, or open an existing object.  This is analogous "
9102 "to B<open>(2).  The call returns a file descriptor for use by the other "
9103 "interfaces listed below."
9104 msgstr ""
9105 "新しいオブジェクトを生成しオープンする、もしくは 既存のオブジェクトをオープン"
9106 "する。これは B<open>(2)  と同じである。下記にある他のインターフェースで使用す"
9107 "る ファイルディスクリプタを返す。"
9108
9109 #. type: TP
9110 #: build/C/man7/shm_overview.7:42
9111 #, no-wrap
9112 msgid "B<ftruncate>(2)"
9113 msgstr "B<ftruncate>(2)"
9114
9115 #. type: Plain text
9116 #: build/C/man7/shm_overview.7:46
9117 msgid ""
9118 "Set the size of the shared memory object.  (A newly created shared memory "
9119 "object has a length of zero.)"
9120 msgstr "共有メモリオブジェクトの大きさを設定する。"
9121
9122 #. type: Plain text
9123 #: build/C/man7/shm_overview.7:50
9124 msgid ""
9125 "Map the shared memory object into the virtual address space of the calling "
9126 "process."
9127 msgstr ""
9128 "呼び出したプロセスの仮想アドレス空間に共有メモリオブジェクトを マップする。"
9129
9130 #. type: TP
9131 #: build/C/man7/shm_overview.7:50
9132 #, no-wrap
9133 msgid "B<munmap>(2)"
9134 msgstr "B<munmap>(2)"
9135
9136 #. type: Plain text
9137 #: build/C/man7/shm_overview.7:54
9138 msgid ""
9139 "Unmap the shared memory object from the virtual address space of the calling "
9140 "process."
9141 msgstr ""
9142 "呼び出したプロセスの仮想アドレス空間から 共有メモリオブジェクトをアンマップす"
9143 "る。"
9144
9145 #. type: TP
9146 #: build/C/man7/shm_overview.7:54
9147 #, no-wrap
9148 msgid "B<shm_unlink>(3)"
9149 msgstr "B<shm_unlink>(3)"
9150
9151 #. type: Plain text
9152 #: build/C/man7/shm_overview.7:57
9153 msgid "Remove a shared memory object name."
9154 msgstr "共有メモリオブジェクト名を削除する。"
9155
9156 #. type: TP
9157 #: build/C/man7/shm_overview.7:57
9158 #, no-wrap
9159 msgid "B<close>(2)"
9160 msgstr "B<close>(2)"
9161
9162 #. type: Plain text
9163 #: build/C/man7/shm_overview.7:62
9164 msgid ""
9165 "Close the file descriptor allocated by B<shm_open>(3)  when it is no longer "
9166 "needed."
9167 msgstr ""
9168 "B<shm_open>(3)  で割り当てられたファイルディスクリプタが不要になった際に、 そ"
9169 "のファイルディスクリプタをクローズする。"
9170
9171 #. type: TP
9172 #: build/C/man7/shm_overview.7:62
9173 #, no-wrap
9174 msgid "B<fstat>(2)"
9175 msgstr "B<fstat>(2)"
9176
9177 #. type: Plain text
9178 #: build/C/man7/shm_overview.7:76
9179 msgid ""
9180 "Obtain a I<stat> structure that describes the shared memory object.  Among "
9181 "the information returned by this call are the object's size (I<st_size>), "
9182 "permissions (I<st_mode>), owner (I<st_uid>), and group (I<st_gid>)."
9183 msgstr ""
9184 "その共有メモリオブジェクトについての情報が入った I<stat> 構造体を取得する。 "
9185 "このシステムコールが返す情報には、オブジェクトのサイズ (I<st_size>)、 許可属"
9186 "性 (I<st_mode>)、 所有者 (I<st_uid>)、 グループ (I<st_gid>)  がある。"
9187
9188 #. type: TP
9189 #: build/C/man7/shm_overview.7:76
9190 #, no-wrap
9191 msgid "B<fchown>(2)"
9192 msgstr "B<fchown>(2)"
9193
9194 #. type: Plain text
9195 #: build/C/man7/shm_overview.7:79
9196 msgid "To change the ownership of a shared memory object."
9197 msgstr "共有メモリオブジェクトの所有権を変更する。"
9198
9199 #. type: TP
9200 #: build/C/man7/shm_overview.7:79
9201 #, no-wrap
9202 msgid "B<fchmod>(2)"
9203 msgstr "B<fchmod>(2)"
9204
9205 #. type: Plain text
9206 #: build/C/man7/shm_overview.7:82
9207 msgid "To change the permissions of a shared memory object."
9208 msgstr "共有メモリオブジェクトの許可属性を変更する。"
9209
9210 #. type: SS
9211 #: build/C/man7/shm_overview.7:82
9212 #, no-wrap
9213 msgid "Versions"
9214 msgstr "Versions"
9215
9216 #. type: Plain text
9217 #: build/C/man7/shm_overview.7:84
9218 msgid "POSIX shared memory is supported since Linux 2.4 and glibc 2.2."
9219 msgstr "POSIX 共有メモリは Linux 2.4 と glibc 2.2 以降でサポートされている。"
9220
9221 #. type: SS
9222 #: build/C/man7/shm_overview.7:84
9223 #, no-wrap
9224 msgid "Persistence"
9225 msgstr "持続性"
9226
9227 #. type: Plain text
9228 #: build/C/man7/shm_overview.7:89
9229 msgid ""
9230 "POSIX shared memory objects have kernel persistence: a shared memory object "
9231 "will exist until the system is shut down, or until all processes have "
9232 "unmapped the object and it has been deleted with B<shm_unlink>(3)"
9233 msgstr ""
9234 "POSIX 共有メモリオブジェクトはカーネル内で保持される。 共有メモリオブジェクト"
9235 "は、システムがシャットダウンされるか、 全てのプロセスがそのオブジェクトをアン"
9236 "マップし、 B<shm_unlink>(3)  で削除されるまで、存在し続ける。"
9237
9238 #. type: SS
9239 #: build/C/man7/shm_overview.7:89
9240 #, no-wrap
9241 msgid "Linking"
9242 msgstr "リンク"
9243
9244 #. type: Plain text
9245 #: build/C/man7/shm_overview.7:94
9246 msgid ""
9247 "Programs using the POSIX shared memory API must be compiled with I<cc -lrt> "
9248 "to link against the real-time library, I<librt>."
9249 msgstr ""
9250 "POSIX 共有メモリ API を使用したプログラムは I<cc -lrt> でコンパイルし、リアル"
9251 "タイムライブラリ I<librt> とリンクしなければならない。"
9252
9253 #. type: SS
9254 #: build/C/man7/shm_overview.7:94
9255 #, no-wrap
9256 msgid "Accessing shared memory objects via the filesystem"
9257 msgstr "ファイルシステム経由での共有メモリオブジェクトへのアクセス"
9258
9259 #. type: Plain text
9260 #: build/C/man7/shm_overview.7:101
9261 msgid ""
9262 "On Linux, shared memory objects are created in a (I<tmpfs>)  virtual "
9263 "filesystem, normally mounted under I</dev/shm>.  Since kernel 2.6.19, Linux "
9264 "supports the use of access control lists (ACLs)  to control the permissions "
9265 "of objects in the virtual filesystem."
9266 msgstr ""
9267 "Linux では、共有メモリオブジェクトは通常 I</dev/shm> 以下にマウントされる仮想"
9268 "ファイルシステム (I<tmpfs>)  内に作成される。 カーネル 2.6.19 以降の Linux で"
9269 "は、 仮想ファイルシステム内のオブジェクトの許可属性の制御に、 アクセス制御リ"
9270 "スト (ACL; access control lists) を使うことができる。"
9271
9272 #. type: Plain text
9273 #: build/C/man7/shm_overview.7:106
9274 msgid ""
9275 "Typically, processes must synchronize their access to a shared memory "
9276 "object, using, for example, POSIX semaphores."
9277 msgstr ""
9278 "通常は、共有メモリオブジェクトにアクセスするプロセスは、 POSIX セマフォなどを"
9279 "使ってプロセス間で同期をとらなければならない。"
9280
9281 #. type: Plain text
9282 #: build/C/man7/shm_overview.7:114
9283 msgid ""
9284 "System V shared memory (B<shmget>(2), B<shmop>(2), etc.) is an older shared "
9285 "memory API.  POSIX shared memory provides a simpler, and better designed "
9286 "interface; on the other hand POSIX shared memory is somewhat less widely "
9287 "available (especially on older systems) than System V shared memory."
9288 msgstr ""
9289 "System V 共有メモリ (B<shmget>(2), B<shmop>(2)  など) は古い共有メモリ API で"
9290 "ある。 POSIX 共有メモリは、より簡単で、うまく設計されたインタフェースを提供し"
9291 "ている。 一方で、POSIX 共有メモリは System V 共有メモリと比べると 利用できる"
9292 "システムが少ない (特に、古いシステムでは少ない)。"
9293
9294 #. type: Plain text
9295 #: build/C/man7/shm_overview.7:127
9296 msgid ""
9297 "B<fchmod>(2), B<fchown>(2), B<fstat>(2), B<ftruncate>(2), B<mmap>(2), "
9298 "B<mprotect>(2), B<munmap>(2), B<shmget>(2), B<shmop>(2), B<shm_open>(3), "
9299 "B<shm_unlink>(3), B<sem_overview>(7)"
9300 msgstr ""
9301 "B<fchmod>(2), B<fchown>(2), B<fstat>(2), B<ftruncate>(2), B<mmap>(2), "
9302 "B<mprotect>(2), B<munmap>(2), B<shmget>(2), B<shmop>(2), B<shm_open>(3), "
9303 "B<shm_unlink>(3), B<sem_overview>(7)"
9304
9305 #. type: TH
9306 #: build/C/man2/shmctl.2:45
9307 #, no-wrap
9308 msgid "SHMCTL"
9309 msgstr "SHMCTL"
9310
9311 #. type: TH
9312 #: build/C/man2/shmctl.2:45
9313 #, no-wrap
9314 msgid "2014-02-07"
9315 msgstr "2014-02-07"
9316
9317 #. type: Plain text
9318 #: build/C/man2/shmctl.2:48
9319 msgid "shmctl - System V shared memory control"
9320 msgstr "shmctl - System V 共有メモリ (shared memory) を制御する"
9321
9322 #. type: Plain text
9323 #: build/C/man2/shmctl.2:51 build/C/man2/shmget.2:44
9324 msgid "B<#include E<lt>sys/ipc.hE<gt>>"
9325 msgstr "B<#include E<lt>sys/ipc.hE<gt>>"
9326
9327 #. type: Plain text
9328 #: build/C/man2/shmctl.2:53 build/C/man2/shmget.2:46
9329 msgid "B<#include E<lt>sys/shm.hE<gt>>"
9330 msgstr "B<#include E<lt>sys/shm.hE<gt>>"
9331
9332 #. type: Plain text
9333 #: build/C/man2/shmctl.2:55
9334 msgid ""
9335 "B<int shmctl(int >I<shmid>B<, int >I<cmd>B<, struct shmid_ds *>I<buf>B<);>"
9336 msgstr ""
9337 "B<int shmctl(int >I<shmid>B<, int >I<cmd>B<, struct shmid_ds *>I<buf>B<);>"
9338
9339 #. type: Plain text
9340 #: build/C/man2/shmctl.2:62
9341 msgid ""
9342 "B<shmctl>()  performs the control operation specified by I<cmd> on the System"
9343 "\\ V shared memory segment whose identifier is given in I<shmid>."
9344 msgstr ""
9345 "B<shmctl>()  は、識別子が I<shmid> の System\\ V 共有メモリ・セグメントに対し"
9346 "て I<cmd> で指示した制御命令を実行する。"
9347
9348 #. type: Plain text
9349 #: build/C/man2/shmctl.2:67
9350 msgid ""
9351 "The I<buf> argument is a pointer to a I<shmid_ds> structure, defined in "
9352 "I<E<lt>sys/shm.hE<gt>> as follows:"
9353 msgstr ""
9354 "I<buf> 引き数は、 I<shmid_ds> 構造体へのポインタである。 この構造体は "
9355 "I<E<lt>sys/shm.hE<gt>> で以下のように定義されている"
9356
9357 #. type: Plain text
9358 #: build/C/man2/shmctl.2:81
9359 #, no-wrap
9360 msgid ""
9361 "struct shmid_ds {\n"
9362 "    struct ipc_perm shm_perm;    /* Ownership and permissions */\n"
9363 "    size_t          shm_segsz;   /* Size of segment (bytes) */\n"
9364 "    time_t          shm_atime;   /* Last attach time */\n"
9365 "    time_t          shm_dtime;   /* Last detach time */\n"
9366 "    time_t          shm_ctime;   /* Last change time */\n"
9367 "    pid_t           shm_cpid;    /* PID of creator */\n"
9368 "    pid_t           shm_lpid;    /* PID of last shmat(2)/shmdt(2) */\n"
9369 "    shmatt_t        shm_nattch;  /* No. of current attaches */\n"
9370 "    ...\n"
9371 "};\n"
9372 msgstr ""
9373 "struct shmid_ds {\n"
9374 "    struct ipc_perm shm_perm;    /* 所有権と許可 */\n"
9375 "    size_t          shm_segsz;   /* セグメントのサイズ (バイト) */\n"
9376 "    time_t          shm_atime;   /* 最後の付加 (attach) の時刻 */\n"
9377 "    time_t          shm_dtime;   /* 最後の分離 (detach) の時刻 */\n"
9378 "    time_t          shm_ctime;   /* 最後に変更が行われた時刻 */\n"
9379 "    pid_t           shm_cpid;    /* 作成者 (creator) の PID */\n"
9380 "    pid_t           shm_lpid;    /* 最後の shmat(2)/shmdt(2) の PID */\n"
9381 "    shmatt_t        shm_nattch;  /* 現在付加されている数 */\n"
9382 "    ...\n"
9383 "};\n"
9384
9385 #. type: Plain text
9386 #: build/C/man2/shmctl.2:89
9387 msgid ""
9388 "The I<ipc_perm> structure is defined as follows (the highlighted fields are "
9389 "settable using B<IPC_SET>):"
9390 msgstr ""
9391 "I<ipc_perm> 構造体は以下のように定義されている (強調されたフィールドは "
9392 "B<IPC_SET> を使って設定可能である):"
9393
9394 #. type: Plain text
9395 #: build/C/man2/shmctl.2:102
9396 #, no-wrap
9397 msgid ""
9398 "struct ipc_perm {\n"
9399 "    key_t          __key;    /* Key supplied to shmget(2) */\n"
9400 "    uid_t          B<uid>;      /* Effective UID of owner */\n"
9401 "    gid_t          B<gid>;      /* Effective GID of owner */\n"
9402 "    uid_t          cuid;     /* Effective UID of creator */\n"
9403 "    gid_t          cgid;     /* Effective GID of creator */\n"
9404 "    unsigned short B<mode>;     /* B<Permissions> + SHM_DEST and\n"
9405 "                                SHM_LOCKED flags */\n"
9406 "    unsigned short __seq;    /* Sequence number */\n"
9407 "};\n"
9408 msgstr ""
9409 "struct ipc_perm {\n"
9410 "    key_t          __key;    /* shmget(2) に与えられるキー */\n"
9411 "    uid_t          B<uid>;      /* 所有者の実効 UID */\n"
9412 "    gid_t          B<gid>;      /* 所有者の実効 GID */\n"
9413 "    uid_t          cuid;     /* 作成者の実効 UID */\n"
9414 "    gid_t          cgid;     /* 作成者の実効 GID */\n"
9415 "    unsigned short B<mode>;     /* B<許可> + SHM_DEST と\n"
9416 "                                SHM_LOCKED フラグ */\n"
9417 "    unsigned short __seq;    /* シーケンス番号 */\n"
9418 "};\n"
9419
9420 #. type: Plain text
9421 #: build/C/man2/shmctl.2:108
9422 msgid "Valid values for I<cmd> are:"
9423 msgstr "I<cmd> として有効な値は以下の通り:"
9424
9425 #. type: TP
9426 #: build/C/man2/shmctl.2:109
9427 #, no-wrap
9428 msgid "B<IPC_STAT>"
9429 msgstr "B<IPC_STAT>"
9430
9431 #. type: Plain text
9432 #: build/C/man2/shmctl.2:118
9433 msgid ""
9434 "Copy information from the kernel data structure associated with I<shmid> "
9435 "into the I<shmid_ds> structure pointed to by I<buf>.  The caller must have "
9436 "read permission on the shared memory segment."
9437 msgstr ""
9438 "I<shmid> に関連づけられたカーネルデータ構造体の情報を I<buf> で指された "
9439 "I<shmid_ds> 構造体にコピーする。 呼び出し元は共有メモリ・セグメントに対する "
9440 "読み込み許可を持たなければならない。"
9441
9442 #. type: TP
9443 #: build/C/man2/shmctl.2:118
9444 #, no-wrap
9445 msgid "B<IPC_SET>"
9446 msgstr "B<IPC_SET>"
9447
9448 #. type: Plain text
9449 #: build/C/man2/shmctl.2:136
9450 msgid ""
9451 "Write the values of some members of the I<shmid_ds> structure pointed to by "
9452 "I<buf> to the kernel data structure associated with this shared memory "
9453 "segment, updating also its I<shm_ctime> member.  The following fields can be "
9454 "changed: I<shm_perm.uid>, I<shm_perm.gid>, and (the least significant 9 bits "
9455 "of) I<shm_perm.mode>.  The effective UID of the calling process must match "
9456 "the owner (I<shm_perm.uid>)  or creator (I<shm_perm.cuid>)  of the shared "
9457 "memory segment, or the caller must be privileged."
9458 msgstr ""
9459 "I<buf> によって指される I<shmid_ds> 構造体のいくつかのメンバーの値を、 この共"
9460 "有メモリ・セグメントに関連づけられたカーネルデータ構造体に書き込み、 "
9461 "I<shm_ctime> メンバーも更新する。 以下のフィールドは変更できる。 I<shm_perm."
9462 "uid>, I<shm_perm.gid>, I<shm_perm.mode> (の最下位 9 ビット)。 呼び出したプロ"
9463 "セスの実効 UID が所有者 (I<shm_perm.uid>)  または作成者 (I<shm_perm.cuid>)  "
9464 "と一致するか、呼び出し元が特権を持たなければならない。"
9465
9466 #. type: TP
9467 #: build/C/man2/shmctl.2:136
9468 #, no-wrap
9469 msgid "B<IPC_RMID>"
9470 msgstr "B<IPC_RMID>"
9471
9472 #. type: Plain text
9473 #: build/C/man2/shmctl.2:149
9474 msgid ""
9475 "Mark the segment to be destroyed.  The segment will only actually be "
9476 "destroyed after the last process detaches it (i.e., when the I<shm_nattch> "
9477 "member of the associated structure I<shmid_ds> is zero).  The caller must be "
9478 "the owner or creator of the segment, or be privileged.  The I<buf> argument "
9479 "is ignored."
9480 msgstr ""
9481 "セグメントに破棄済みのマークを付ける。 セグメントは、実際には最後プロセスがセ"
9482 "グメントを分離した (関連する I<shmid_ds> 構造体の I<shm_nattch> メンバーが 0 "
9483 "になった) 後でのみ破棄される。 呼び出し元はそのセグメントの所有者か作成者であ"
9484 "るか、特権を持たなければならない。 I<buf> 引き数は無視される。"
9485
9486 #. type: Plain text
9487 #: build/C/man2/shmctl.2:157
9488 msgid ""
9489 "If a segment has been marked for destruction, then the (nonstandard)  "
9490 "B<SHM_DEST> flag of the I<shm_perm.mode> field in the associated data "
9491 "structure retrieved by B<IPC_STAT> will be set."
9492 msgstr ""
9493 "セグメントに破棄のマークが付けられると、 関連するデータ構造体において "
9494 "I<shm_perm.mode> フィールドの (標準ではない)  B<SHM_DEST> フラグが設定され"
9495 "る。 このデータ構造体は B<IPC_STAT> で取得される。"
9496
9497 #. type: Plain text
9498 #: build/C/man2/shmctl.2:160
9499 msgid ""
9500 "The caller I<must> ensure that a segment is eventually destroyed; otherwise "
9501 "its pages that were faulted in will remain in memory or swap."
9502 msgstr ""
9503 "呼び出し元は最終的にはセグメントを忘れずに破棄I<しなければならない>。 そうで"
9504 "なれば、フォールト (fault) されたページは メモリかスワップ (swap) に残り続け"
9505 "る。"
9506
9507 #. type: Plain text
9508 #: build/C/man2/shmctl.2:165
9509 msgid ""
9510 "See also the description of I</proc/sys/kernel/shm_rmid_forced> in "
9511 "B<proc>(5)."
9512 msgstr "B<proc>(5) の I</proc/sys/kernel/shm_rmid_forced> の説明も参照のこと。"
9513
9514 #. type: TP
9515 #: build/C/man2/shmctl.2:165
9516 #, no-wrap
9517 msgid "B<IPC_INFO> (Linux-specific)"
9518 msgstr "B<IPC_INFO> (Linux 固有)"
9519
9520 #. type: Plain text
9521 #: build/C/man2/shmctl.2:178
9522 msgid ""
9523 "Return information about system-wide shared memory limits and parameters in "
9524 "the structure pointed to by I<buf>.  This structure is of type I<shminfo> "
9525 "(thus, a cast is required), defined in I<E<lt>sys/shm.hE<gt>> if the "
9526 "B<_GNU_SOURCE> feature test macro is defined:"
9527 msgstr ""
9528 "システム全体での共有メモリの制限とパラメータに関する情報を、 I<buf> が指す構"
9529 "造体に入れて返す。 この構造体は I<shminfo> 型である (そのためキャストが必要で"
9530 "ある)。 I<shminfo> は B<_GNU_SOURCE> 機能検査マクロが定義された場合に "
9531 "I<E<lt>sys/shm.hE<gt>> で以下のように定義される:"
9532
9533 #. type: Plain text
9534 #: build/C/man2/shmctl.2:192
9535 #, no-wrap
9536 msgid ""
9537 "struct shminfo {\n"
9538 "    unsigned long shmmax; /* Maximum segment size */\n"
9539 "    unsigned long shmmin; /* Minimum segment size;\n"
9540 "                             always 1 */\n"
9541 "    unsigned long shmmni; /* Maximum number of segments */\n"
9542 "    unsigned long shmseg; /* Maximum number of segments\n"
9543 "                             that a process can attach;\n"
9544 "                             unused within kernel */\n"
9545 "    unsigned long shmall; /* Maximum number of pages of\n"
9546 "                             shared memory, system-wide */\n"
9547 "};\n"
9548 msgstr ""
9549 "struct  shminfo {\n"
9550 "    unsigned long shmmax; /* 最大セグメントサイズ */\n"
9551 "    unsigned long shmmin; /* 最小セグメントサイズ。\n"
9552 "                             常に 1 */\n"
9553 "    unsigned long shmmni; /* 最大セグメント数 */\n"
9554 "    unsigned long shmseg; /* プロセスが付加できる\n"
9555 "                             セグメントの最大数。\n"
9556 "                             カーネル内では未使用 */\n"
9557 "    unsigned long shmall; /* 共有メモリの最大ページ数。\n"
9558 "                             システム全体での値 */\n"
9559 "};\n"
9560
9561 #. type: Plain text
9562 #: build/C/man2/shmctl.2:205
9563 msgid ""
9564 "The I<shmmni>, I<shmmax>, and I<shmall> settings can be changed via I</proc> "
9565 "files of the same name; see B<proc>(5)  for details."
9566 msgstr ""
9567 "設定 I<shmmni>, I<shmmax>, I<shmall> は I</proc> にある同じ名前のファイル経由"
9568 "で変更可能である。 詳しくは B<proc>(5)  を参照。"
9569
9570 #. type: TP
9571 #: build/C/man2/shmctl.2:205
9572 #, no-wrap
9573 msgid "B<SHM_INFO> (Linux-specific)"
9574 msgstr "B<SHM_INFO> (Linux 固有)"
9575
9576 #. type: Plain text
9577 #: build/C/man2/shmctl.2:216
9578 msgid ""
9579 "Return a I<shm_info> structure whose fields contain information about system "
9580 "resources consumed by shared memory.  This structure is defined in "
9581 "I<E<lt>sys/shm.hE<gt>> if the B<_GNU_SOURCE> feature test macro is defined:"
9582 msgstr ""
9583 "共有メモリが消費しているシステム資源に関する情報を 格納した I<shm_info> 構造"
9584 "体を返す。 この構造体は、 B<_GNU_SOURCE> 機能検査マクロが定義された場合に "
9585 "I<E<lt>sys/shm.hE<gt>> で以下のように定義される:"
9586
9587 #. type: Plain text
9588 #: build/C/man2/shmctl.2:233
9589 #, no-wrap
9590 msgid ""
9591 "struct shm_info {\n"
9592 "    int           used_ids; /* # of currently existing\n"
9593 "                               segments */\n"
9594 "    unsigned long shm_tot;  /* Total number of shared\n"
9595 "                               memory pages */\n"
9596 "    unsigned long shm_rss;  /* # of resident shared\n"
9597 "                               memory pages */\n"
9598 "    unsigned long shm_swp;  /* # of swapped shared\n"
9599 "                               memory pages */\n"
9600 "    unsigned long swap_attempts;\n"
9601 "                            /* Unused since Linux 2.4 */\n"
9602 "    unsigned long swap_successes;\n"
9603 "                            /* Unused since Linux 2.4 */\n"
9604 "};\n"
9605 msgstr ""
9606 "struct shm_info {\n"
9607 "    int           used_ids; /* 現在存在するセグメント数 */\n"
9608 "    unsigned long shm_tot;  /* 共有メモリのページ総数 */\n"
9609 "    unsigned long shm_rss;  /* メモリ上にある (スワップされて\n"
9610 "                               いない) 共有メモリページ数 */\n"
9611 "    unsigned long shm_swp;  /* スワップされている共有メモリ\n"
9612 "                               ページ数 */\n"
9613 "    unsigned long swap_attempts;\n"
9614 "                            /* Linux 2.4 以降では未使用 */\n"
9615 "    unsigned long swap_successes;\n"
9616 "                            /* Linux 2.4 以降では未使用 */\n"
9617 "};\n"
9618
9619 #. type: TP
9620 #: build/C/man2/shmctl.2:235
9621 #, no-wrap
9622 msgid "B<SHM_STAT> (Linux-specific)"
9623 msgstr "B<SHM_STAT> (Linux 固有)"
9624
9625 #. type: Plain text
9626 #: build/C/man2/shmctl.2:246
9627 msgid ""
9628 "Return a I<shmid_ds> structure as for B<IPC_STAT>.  However, the I<shmid> "
9629 "argument is not a segment identifier, but instead an index into the kernel's "
9630 "internal array that maintains information about all shared memory segments "
9631 "on the system."
9632 msgstr ""
9633 "B<IPC_STAT> と同じく I<shmid_ds> 構造体を返す。 但し、 I<shmid> 引き数は、セ"
9634 "グメント識別子ではなく、システム上の全ての共有メモリ セグメントに関する情報を"
9635 "管理するカーネルの内部配列へのインデックス である。"
9636
9637 #. type: Plain text
9638 #: build/C/man2/shmctl.2:249
9639 msgid ""
9640 "The caller can prevent or allow swapping of a shared memory segment with the "
9641 "following I<cmd> values:"
9642 msgstr ""
9643 "呼び出し元は、I<cmd> に以下の値を指定することで、共有メモリ・セグメントが ス"
9644 "ワップされることを防止したり、許可したりできる:"
9645
9646 #. type: TP
9647 #: build/C/man2/shmctl.2:250
9648 #, no-wrap
9649 msgid "B<SHM_LOCK> (Linux-specific)"
9650 msgstr "B<SHM_LOCK> (Linux 固有)"
9651
9652 #. type: Plain text
9653 #: build/C/man2/shmctl.2:262
9654 msgid ""
9655 "Prevent swapping of the shared memory segment.  The caller must fault in any "
9656 "pages that are required to be present after locking is enabled.  If a "
9657 "segment has been locked, then the (nonstandard)  B<SHM_LOCKED> flag of the "
9658 "I<shm_perm.mode> field in the associated data structure retrieved by "
9659 "B<IPC_STAT> will be set."
9660 msgstr ""
9661 "共有メモリ・セグメントをスワップすることを防止する。 ロックが有効になった後、"
9662 "呼び出し元は、 存在することが要求された全てのページをフォールトさせなければな"
9663 "らない。 セグメントがロックされると、 関連するデータ構造体において "
9664 "I<shm_perm.mode> フィールドの (標準的ではない)  B<SHM_LOCKED> フラグが設定さ"
9665 "れる。 このデータ構造体は B<IPC_STAT> で取得される。"
9666
9667 #. type: TP
9668 #: build/C/man2/shmctl.2:262
9669 #, no-wrap
9670 msgid "B<SHM_UNLOCK> (Linux-specific)"
9671 msgstr "B<SHM_UNLOCK> (Linux 固有)"
9672
9673 #. type: Plain text
9674 #: build/C/man2/shmctl.2:265
9675 msgid "Unlock the segment, allowing it to be swapped out."
9676 msgstr "セグメントのロックを解除し、スワップ・アウトすることを可能にする。"
9677
9678 #.  There was some weirdness in 2.6.9: SHM_LOCK and SHM_UNLOCK could
9679 #.  be applied to a segment, regardless of ownership of the segment.
9680 #.  This was a botch-up in the move to RLIMIT_MEMLOCK, and was fixed
9681 #.  in 2.6.10.  MTK, May 2005
9682 #. type: Plain text
9683 #: build/C/man2/shmctl.2:283
9684 msgid ""
9685 "In kernels before 2.6.10, only a privileged process could employ B<SHM_LOCK> "
9686 "and B<SHM_UNLOCK>.  Since kernel 2.6.10, an unprivileged process can employ "
9687 "these operations if its effective UID matches the owner or creator UID of "
9688 "the segment, and (for B<SHM_LOCK>)  the amount of memory to be locked falls "
9689 "within the B<RLIMIT_MEMLOCK> resource limit (see B<setrlimit>(2))."
9690 msgstr ""
9691 "2.6.10 より前のカーネルでは、特権プロセスだけが B<SHM_LOCK> と B<SHM_UNLOCK> "
9692 "を利用することができた。 2.6.10 以降のカーネルでは、非特権プロセスであっても"
9693 "次の条件を満たせば これらの操作を利用することができる。その条件とは、プロセス"
9694 "の実効 UID がそのセグメントの所有者もしくは作成者の UID と一致し、 "
9695 "(B<SHM_LOCK> の場合には) ロックするメモリの合計が B<RLIMIT_MEMLOCK> リソース"
9696 "上限 (B<setrlimit>(2)  参照) の範囲内に入っていることである。"
9697
9698 #. type: Plain text
9699 #: build/C/man2/shmctl.2:301
9700 msgid ""
9701 "A successful B<IPC_INFO> or B<SHM_INFO> operation returns the index of the "
9702 "highest used entry in the kernel's internal array recording information "
9703 "about all shared memory segments.  (This information can be used with "
9704 "repeated B<SHM_STAT> operations to obtain information about all shared "
9705 "memory segments on the system.)  A successful B<SHM_STAT> operation returns "
9706 "the identifier of the shared memory segment whose index was given in "
9707 "I<shmid>.  Other operations return 0 on success."
9708 msgstr ""
9709 "B<IPC_INFO> と B<SHM_INFO> 操作は、成功すると、全ての共有メモリセグメントに関"
9710 "する情報を 管理しているカーネルの内部配列の使用中エントリのインデックスの う"
9711 "ち最大値を返す (この情報は、システムの全ての共有メモリセグメントに関する情報"
9712 "を 取得するために、 B<SHM_STAT> 操作を繰り返し実行する際に使用できる)。 "
9713 "B<SHM_STAT> 操作は、成功すると、 I<shmid> で指定されたインデックスを持つ共有"
9714 "メモリセグメントの識別子を返す。 他の操作は、成功の場合 0 を返す。"
9715
9716 #. type: Plain text
9717 #: build/C/man2/shmctl.2:305
9718 msgid "On error, -1 is returned, and I<errno> is set appropriately."
9719 msgstr "エラーの場合は -1 を返し、 I<errno> を適切に設定する。"
9720
9721 #. type: Plain text
9722 #: build/C/man2/shmctl.2:314
9723 msgid ""
9724 "B<IPC_STAT> or B<SHM_STAT> is requested and I<shm_perm.mode> does not allow "
9725 "read access for I<shmid>, and the calling process does not have the "
9726 "B<CAP_IPC_OWNER> capability."
9727 msgstr ""
9728 "B<IPC_STAT> または B<SHM_STAT> が要求され、 I<shm_perm.mode> が I<shmid> への"
9729 "読み込みアクセスを許しておらず、 かつ呼び出したプロセスが B<CAP_IPC_OWNER> "
9730 "ケーパビリティ (capability) を持っていない。"
9731
9732 #. type: Plain text
9733 #: build/C/man2/shmctl.2:325
9734 msgid ""
9735 "The argument I<cmd> has value B<IPC_SET> or B<IPC_STAT> but the address "
9736 "pointed to by I<buf> isn't accessible."
9737 msgstr ""
9738 "I<cmd> 引き数に B<IPC_SET> か B<IPC_STAT> が指定されたが I<buf> で指されてい"
9739 "るアドレスにアクセスできない。"
9740
9741 #. type: TP
9742 #: build/C/man2/shmctl.2:325 build/C/man2/shmop.2:194
9743 #, no-wrap
9744 msgid "B<EIDRM>"
9745 msgstr "B<EIDRM>"
9746
9747 #. type: Plain text
9748 #: build/C/man2/shmctl.2:328 build/C/man2/shmop.2:197
9749 msgid "I<shmid> points to a removed identifier."
9750 msgstr "I<shmid> が削除 (remove) された識別子 (identifier) を指している。"
9751
9752 #. type: Plain text
9753 #: build/C/man2/shmctl.2:337
9754 msgid ""
9755 "I<shmid> is not a valid identifier, or I<cmd> is not a valid command.  Or: "
9756 "for a B<SHM_STAT> operation, the index value specified in I<shmid> referred "
9757 "to an array slot that is currently unused."
9758 msgstr ""
9759 "I<shmid> が有効な識別子でないか、 I<cmd> が有効なコマンドでない。 もしくは、 "
9760 "B<SHM_STAT> 操作の場合に、 I<shmid> で指定されたインデックス値が現在未使用の"
9761 "配列のスロットを参照していた。"
9762
9763 #. type: Plain text
9764 #: build/C/man2/shmctl.2:348
9765 msgid ""
9766 "(In kernels since 2.6.9), B<SHM_LOCK> was specified and the size of the to-"
9767 "be-locked segment would mean that the total bytes in locked shared memory "
9768 "segments would exceed the limit for the real user ID of the calling "
9769 "process.  This limit is defined by the B<RLIMIT_MEMLOCK> soft resource limit "
9770 "(see B<setrlimit>(2))."
9771 msgstr ""
9772 "(2.6.9 以降のカーネルにおいて)  B<SHM_LOCK> が指定され、 ロックされる予定のセ"
9773 "グメントのサイズ (ロックされる共有メモリ・セグメントの合計バイト数) が、 呼び"
9774 "出したプロセスの実ユーザー ID についての制限を超えた。 この制限は "
9775 "B<RLIMIT_MEMLOCK> ソフト資源制限で定義される (B<setrlimit>(2)  を参照)。"
9776
9777 #. type: Plain text
9778 #: build/C/man2/shmctl.2:353
9779 msgid ""
9780 "B<IPC_STAT> is attempted, and the GID or UID value is too large to be stored "
9781 "in the structure pointed to by I<buf>."
9782 msgstr ""
9783 "B<IPC_STAT> が試みられ、GID や UID の値が I<buf> で指示される構造体に格納する"
9784 "には大き過ぎる。"
9785
9786 #. type: Plain text
9787 #: build/C/man2/shmctl.2:365
9788 msgid ""
9789 "B<IPC_SET> or B<IPC_RMID> is attempted, and the effective user ID of the "
9790 "calling process is not that of the creator (found in I<shm_perm.cuid>), or "
9791 "the owner (found in I<shm_perm.uid>), and the process was not privileged "
9792 "(Linux: did not have the B<CAP_SYS_ADMIN> capability)."
9793 msgstr ""
9794 "B<IPC_SET> か B<IPC_RMID> が試みられ、 呼び出したプロセスの実効ユーザー ID が"
9795 "作成者 (I<shm_perm.cuid>)  でも所有者 (I<shm_perm.uid>)  でもなく、プロセスが"
9796 "特権を持たない (Linux では B<CAP_SYS_ADMIN> ケーパビリティを持たない)。"
9797
9798 #. type: Plain text
9799 #: build/C/man2/shmctl.2:377
9800 msgid ""
9801 "Or (in kernels before 2.6.9), B<SHM_LOCK> or B<SHM_UNLOCK> was specified, "
9802 "but the process was not privileged (Linux: did not have the B<CAP_IPC_LOCK> "
9803 "capability).  (Since Linux 2.6.9, this error can also occur if the "
9804 "B<RLIMIT_MEMLOCK> is 0 and the caller is not privileged.)"
9805 msgstr ""
9806 "または (2.6.9 より前のカーネルで)  B<SHM_LOCK> または B<SHM_UNLOCK> が指定さ"
9807 "れているが、プロセスが特権を持たない (Linux では B<CAP_IPC_LOCK> ケーパビリ"
9808 "ティを持たない)。 (Linux 2.6.9 以降では、 B<RLIMIT_MEMLOCK> が 0 で呼び出し元"
9809 "が特権を持たない場合にも、このエラーが起こる。)"
9810
9811 #.  SVr4 documents an additional error condition EMFILE.
9812 #. type: Plain text
9813 #: build/C/man2/shmctl.2:382 build/C/man2/shmget.2:251
9814 #: build/C/man2/shmop.2:231
9815 msgid "SVr4, POSIX.1-2001."
9816 msgstr "SVr4, POSIX.1-2001."
9817
9818 #.  Like Linux, the FreeBSD man pages still document
9819 #.  the inclusion of these header files.
9820 #. type: Plain text
9821 #: build/C/man2/shmctl.2:395 build/C/man2/shmget.2:269
9822 msgid ""
9823 "The inclusion of I<E<lt>sys/types.hE<gt>> and I<E<lt>sys/ipc.hE<gt>> isn't "
9824 "required on Linux or by any version of POSIX.  However, some old "
9825 "implementations required the inclusion of these header files, and the SVID "
9826 "also documented their inclusion.  Applications intended to be portable to "
9827 "such old systems may need to include these header files."
9828 msgstr ""
9829 "Linux や POSIX の全てのバージョンでは、 I<E<lt>sys/types.hE<gt>> と "
9830 "I<E<lt>sys/ipc.hE<gt>> のインクルードは必要ない。しかしながら、いくつかの古い"
9831 "実装ではこれらのヘッダファイルのインクルードが必要であり、 SVID でもこれらの"
9832 "インクルードをするように記載されている。このような古いシステムへの移植性を意"
9833 "図したアプリケーションではこれらのファイルをインクルードする必要があるかもし"
9834 "れない。"
9835
9836 #. type: Plain text
9837 #: build/C/man2/shmctl.2:407
9838 msgid ""
9839 "The B<IPC_INFO>, B<SHM_STAT> and B<SHM_INFO> operations are used by the "
9840 "B<ipcs>(1)  program to provide information on allocated resources.  In the "
9841 "future, these may modified or moved to a I</proc> filesystem interface."
9842 msgstr ""
9843 "B<IPC_INFO>, B<SHM_STAT>, B<SHM_INFO> 操作は、 B<ipcs>(1)  プログラムで割り当"
9844 "て済の資源に関する情報を提供するために 使用されている。将来、これらの操作は変"
9845 "更されたり、 I</proc> ファイルシステムのインタフェースに移動されるかもしれな"
9846 "い。"
9847
9848 #. type: Plain text
9849 #: build/C/man2/shmctl.2:415
9850 msgid ""
9851 "Linux permits a process to attach (B<shmat>(2))  a shared memory segment "
9852 "that has already been marked for deletion using I<shmctl(IPC_RMID)>.  This "
9853 "feature is not available on other UNIX implementations; portable "
9854 "applications should avoid relying on it."
9855 msgstr ""
9856 "Linux では、 I<shmctl(IPC_RMID)> を使ってすでに削除マークがつけられている共有"
9857 "メモリ・セグメントを あるプロセスが付加 (attach)  (B<shmat>(2))  することを許"
9858 "可している。 この機能は他の UNIX の実装では利用できない。 移植性を考慮したア"
9859 "プリケーションではこれに依存しないようにすべきである。"
9860
9861 #. type: Plain text
9862 #: build/C/man2/shmctl.2:428
9863 msgid ""
9864 "Various fields in a I<struct shmid_ds> were typed as I<short> under Linux "
9865 "2.2 and have become I<long> under Linux 2.4.  To take advantage of this, a "
9866 "recompilation under glibc-2.1.91 or later should suffice.  (The kernel "
9867 "distinguishes old and new calls by an B<IPC_64> flag in I<cmd>.)"
9868 msgstr ""
9869 "I<構造体 shmid_ds> 内の多くのフィールドは、 Linux 2.2 では I<short> 型だった"
9870 "が、Linux 2.4 では I<long> 型になった。 この利点を生かすには、glibc-2.1.91 以"
9871 "降の環境下で 再コンパイルすれば十分である。 カーネルは新しい形式の呼び出しと"
9872 "古い形式の呼び出しを I<cmd> 内の B<IPC_64> フラグで区別する。"
9873
9874 #. type: Plain text
9875 #: build/C/man2/shmctl.2:435
9876 msgid ""
9877 "B<mlock>(2), B<setrlimit>(2), B<shmget>(2), B<shmop>(2), B<capabilities>(7), "
9878 "B<svipc>(7)"
9879 msgstr ""
9880 "B<mlock>(2), B<setrlimit>(2), B<shmget>(2), B<shmop>(2), B<capabilities>(7), "
9881 "B<shm_overview>(7), B<svipc>(7)"
9882
9883 #. type: TH
9884 #: build/C/man2/shmget.2:38
9885 #, no-wrap
9886 msgid "SHMGET"
9887 msgstr "SHMGET"
9888
9889 #. type: TH
9890 #: build/C/man2/shmget.2:38
9891 #, fuzzy, no-wrap
9892 #| msgid "2013-10-07"
9893 msgid "2014-10-02"
9894 msgstr "2013-10-07"
9895
9896 #. type: Plain text
9897 #: build/C/man2/shmget.2:41
9898 msgid "shmget - allocates a System V shared memory segment"
9899 msgstr "shmget - System V 共有メモリ・セグメントを割り当てる"
9900
9901 #. type: Plain text
9902 #: build/C/man2/shmget.2:48
9903 msgid "B<int shmget(key_t >I<key>B<, size_t >I<size>B<, int >I<shmflg>B<);>"
9904 msgstr "B<int shmget(key_t >I<key>B<, size_t >I<size>B<, int >I<shmflg>B<);>"
9905
9906 #. type: Plain text
9907 #: build/C/man2/shmget.2:72
9908 msgid ""
9909 "B<shmget>()  returns the identifier of the System\\ V shared memory segment "
9910 "associated with the value of the argument I<key>.  A new shared memory "
9911 "segment, with size equal to the value of I<size> rounded up to a multiple of "
9912 "B<PAGE_SIZE>, is created if I<key> has the value B<IPC_PRIVATE> or I<key> "
9913 "isn't B<IPC_PRIVATE>, no shared memory segment corresponding to I<key> "
9914 "exists, and B<IPC_CREAT> is specified in I<shmflg>."
9915 msgstr ""
9916 "B<shmget>()  は I<key> 引き数に対応する System\\ V 共有メモリ・セグメントの識"
9917 "別子を返す。 I<key> の値が B<IPC_PRIVATE> の場合、もしくは I<key> に対応する"
9918 "共有メモリ・セグメントが存在せず、 I<shmflg> に B<IPC_CREAT> が指定されていた"
9919 "場合、 新しい共有メモリ・セグメントを作成する。 作成される共有メモリ・セグメ"
9920 "ントは、 I<size> 引き数の値を B<PAGE_SIZE> の倍数へと切り上げた (round up) 大"
9921 "きさとなる。"
9922
9923 #. type: Plain text
9924 #: build/C/man2/shmget.2:91
9925 msgid ""
9926 "If I<shmflg> specifies both B<IPC_CREAT> and B<IPC_EXCL> and a shared memory "
9927 "segment already exists for I<key>, then B<shmget>()  fails with I<errno> set "
9928 "to B<EEXIST>.  (This is analogous to the effect of the combination B<O_CREAT "
9929 "| O_EXCL> for B<open>(2).)"
9930 msgstr ""
9931 "I<shmflg> に B<IPC_CREAT> と B<IPC_EXCL> の両方が指定された場合、 I<key> に対"
9932 "応する共有メモリ・セグメントが既に存在すると、 B<shmget>()  は失敗し、 "
9933 "I<errno> に B<EEXIST> が設定される (これは B<open>(2)  に B<O_CREAT | "
9934 "O_EXCL> を指定した場合の動作と同じである)。"
9935
9936 #. type: Plain text
9937 #: build/C/man2/shmget.2:95
9938 msgid "The value I<shmflg> is composed of:"
9939 msgstr "I<shmflg> は以下の内容から構成される:"
9940
9941 #. type: TP
9942 #: build/C/man2/shmget.2:95
9943 #, no-wrap
9944 msgid "B<IPC_CREAT>"
9945 msgstr "B<IPC_CREAT>"
9946
9947 #. type: Plain text
9948 #: build/C/man2/shmget.2:102
9949 msgid ""
9950 "Create a new segment.  If this flag is not used, then B<shmget>()  will find "
9951 "the segment associated with I<key> and check to see if the user has "
9952 "permission to access the segment."
9953 msgstr ""
9954 "新しいセグメントを作成する。このフラグが指定されなかった場合、 B<shmget>()  "
9955 "は I<key> に対応するセグメントを探し、 ユーザがそのセグメントにアクセスする許"
9956 "可があるかどうかをチェックする。"
9957
9958 #. type: TP
9959 #: build/C/man2/shmget.2:102
9960 #, no-wrap
9961 msgid "B<IPC_EXCL>"
9962 msgstr "B<IPC_EXCL>"
9963
9964 #. type: Plain text
9965 #: build/C/man2/shmget.2:108
9966 #, fuzzy
9967 #| msgid ""
9968 #| "used with B<IPC_CREAT> to ensure failure if the segment already exists."
9969 msgid ""
9970 "This flag is used with B<IPC_CREAT> to ensure that this call creates the "
9971 "segment.  If the segment already exists, the call fails."
9972 msgstr ""
9973 "B<IPC_CREAT> と共に使用し、セグメントが既に存在した場合には 失敗することを保"
9974 "証する。"
9975
9976 #. type: TP
9977 #: build/C/man2/shmget.2:108
9978 #, no-wrap
9979 msgid "B<SHM_HUGETLB> (since Linux 2.6)"
9980 msgstr "B<SHM_HUGETLB> (Linux 2.6 以降)"
9981
9982 #. type: Plain text
9983 #: build/C/man2/shmget.2:114
9984 msgid ""
9985 "Allocate the segment using \"huge pages.\" See the Linux kernel source file "
9986 "I<Documentation/vm/hugetlbpage.txt> for further information."
9987 msgstr ""
9988 "\"ヒュージページ (huge page)\" を使うセグメントを割り当てる。詳細な情報は、"
9989 "Linux カーネルソースのファイル I<Documentation/vm/hugetlbpage.txt> を参照。"
9990
9991 #. type: TP
9992 #: build/C/man2/shmget.2:114
9993 #, no-wrap
9994 msgid "B<SHM_NORESERVE> (since Linux 2.6.15)"
9995 msgstr "B<SHM_NORESERVE> (Linux 2.6.15 以降)"
9996
9997 #.  As at 2.6.17-rc2, this flag has no effect if SHM_HUGETLB was also
9998 #.  specified.
9999 #. type: Plain text
10000 #: build/C/man2/shmget.2:133
10001 msgid ""
10002 "This flag serves the same purpose as the B<mmap>(2)  B<MAP_NORESERVE> flag.  "
10003 "Do not reserve swap space for this segment.  When swap space is reserved, "
10004 "one has the guarantee that it is possible to modify the segment.  When swap "
10005 "space is not reserved one might get B<SIGSEGV> upon a write if no physical "
10006 "memory is available.  See also the discussion of the file I</proc/sys/vm/"
10007 "overcommit_memory> in B<proc>(5)."
10008 msgstr ""
10009 "このフラグは、 B<mmap>(2)  の B<MAP_NORESERVE> フラグと同じ役割を果たす。 こ"
10010 "のセグメントに対するスワップ空間の予約を行わない。 スワップ空間を予約した場合"
10011 "は、そのセグメントの変更が必ず成功することが 保証される。スワップ空間の予約を"
10012 "行わなかった場合は、物理メモリに空きが ないと書き込み時に B<SIGSEGV> を受け取"
10013 "る可能性がある。 B<proc>(5)  にある I</proc/sys/vm/overcommit_memory> ファイ"
10014 "ルに関する議論も参照のこと。"
10015
10016 #. type: Plain text
10017 #: build/C/man2/shmget.2:143
10018 #, fuzzy
10019 #| msgid ""
10020 #| "(least significant 9 bits)  specifying the permissions granted to the "
10021 #| "owner, group, and world.  These bits have the same format, and the same "
10022 #| "meaning, as the I<mode> argument of B<open>(2).  Presently, the execute "
10023 #| "permissions are not used by the system."
10024 msgid ""
10025 "In addition to the above flags, the least significant 9 bits of I<shmflg> "
10026 "specify the permissions granted to the owner, group, and others.  These bits "
10027 "have the same format, and the same meaning, as the I<mode> argument of "
10028 "B<open>(2).  Presently, execute permissions are not used by the system."
10029 msgstr ""
10030 "(下位 9 ビット)  所有者、グループ、他人 (world) への許可を指定する。 これらの"
10031 "ビットは B<open>(2)  の I<mode> 引き数と同じ形式で同じ意味を持つ。 今のとこ"
10032 "ろ、システムは実行 (execute) 許可を参照しない。"
10033
10034 #. type: Plain text
10035 #: build/C/man2/shmget.2:151
10036 msgid ""
10037 "When a new shared memory segment is created, its contents are initialized to "
10038 "zero values, and its associated data structure, I<shmid_ds> (see "
10039 "B<shmctl>(2)), is initialized as follows:"
10040 msgstr ""
10041 "共有メモリ・セグメントが新たに作成される際、 共有メモリ・セグメントの内容は "
10042 "0 で初期化され、 関連情報を保持するデータ構造体 I<shmid_ds> は以下のように初"
10043 "期化される。"
10044
10045 #. type: Plain text
10046 #: build/C/man2/shmget.2:156
10047 msgid ""
10048 "I<shm_perm.cuid> and I<shm_perm.uid> are set to the effective user ID of the "
10049 "calling process."
10050 msgstr ""
10051 "I<shm_perm.cuid> と I<shm_perm.uid> に呼び出し元プロセスの実効 (effective) "
10052 "ユーザーID を設定する。"
10053
10054 #. type: Plain text
10055 #: build/C/man2/shmget.2:161
10056 msgid ""
10057 "I<shm_perm.cgid> and I<shm_perm.gid> are set to the effective group ID of "
10058 "the calling process."
10059 msgstr ""
10060 "I<shm_perm.cgid> と I<shm_perm.gid> に呼び出し元プロセスの実効グループID を設"
10061 "定する。"
10062
10063 #. type: Plain text
10064 #: build/C/man2/shmget.2:166
10065 msgid ""
10066 "The least significant 9 bits of I<shm_perm.mode> are set to the least "
10067 "significant 9 bit of I<shmflg>."
10068 msgstr ""
10069 "I<shm_perm.mode> の下位 9 ビットに I<shmflg> の下位 9 ビットを設定する。"
10070
10071 #. type: Plain text
10072 #: build/C/man2/shmget.2:170
10073 msgid "I<shm_segsz> is set to the value of I<size>."
10074 msgstr "I<shm_segsz> に I<size> の値を設定する。"
10075
10076 #. type: Plain text
10077 #: build/C/man2/shmget.2:177
10078 msgid ""
10079 "I<shm_lpid>, I<shm_nattch>, I<shm_atime>, and I<shm_dtime> are set to 0."
10080 msgstr ""
10081 "I<shm_lpid>, I<shm_nattch>, I<shm_atime>, I<shm_dtime> に 0 を設定する。"
10082
10083 #. type: Plain text
10084 #: build/C/man2/shmget.2:180
10085 msgid "I<shm_ctime> is set to the current time."
10086 msgstr "I<shm_ctime> に現在の時刻を設定する。"
10087
10088 #. type: Plain text
10089 #: build/C/man2/shmget.2:183
10090 msgid ""
10091 "If the shared memory segment already exists, the permissions are verified, "
10092 "and a check is made to see if it is marked for destruction."
10093 msgstr ""
10094 "共有メモリ・セグメントが既に存在する場合、アクセス許可の検査と、 破壊 "
10095 "(destruction) マークがつけられていないかのチェックが行われる。"
10096
10097 #. type: Plain text
10098 #: build/C/man2/shmget.2:188
10099 msgid ""
10100 "On success, a valid shared memory identifier is returned.  On error, -1 is "
10101 "returned, and I<errno> is set to indicate the error."
10102 msgstr ""
10103 "成功の場合、有効な共有メモリ・セグメントの識別子が返される。 エラーの場合、 "
10104 "-1 が返り、 I<error> にエラーを示す値が設定される。"
10105
10106 #. type: Plain text
10107 #: build/C/man2/shmget.2:192
10108 msgid "On failure, I<errno> is set to one of the following:"
10109 msgstr "失敗した場合は I<errno> が以下のどれかに設定される:"
10110
10111 #. type: Plain text
10112 #: build/C/man2/shmget.2:198
10113 msgid ""
10114 "The user does not have permission to access the shared memory segment, and "
10115 "does not have the B<CAP_IPC_OWNER> capability."
10116 msgstr ""
10117 "ユーザーはその共有メモリ・セグメントへのアクセス許可を持たず、 "
10118 "B<CAP_IPC_OWNER> ケーパビリティも持っていない。"
10119
10120 #. type: Plain text
10121 #: build/C/man2/shmget.2:207
10122 #, fuzzy
10123 #| msgid ""
10124 #| "Both B<O_CREAT> and B<O_EXCL> were specified to B<shm_open>()  and the "
10125 #| "shared memory object specified by I<name> already exists."
10126 msgid ""
10127 "B<IPC_CREAT> and B<IPC_EXCL> were specified in I<shmflg>, but a shared "
10128 "memory segment already exists for I<key>."
10129 msgstr ""
10130 "B<O_CREAT> と B<O_EXCL> の両方が B<shm_open>()  に指定されたが、 I<name> で指"
10131 "定された共有メモリ・オブジェクトが既に存在した。"
10132
10133 #. type: Plain text
10134 #: build/C/man2/shmget.2:215
10135 msgid ""
10136 "A new segment was to be created and I<size> is less than B<SHMIN> or greater "
10137 "than B<SHMMAX>."
10138 msgstr ""
10139
10140 #. type: Plain text
10141 #: build/C/man2/shmget.2:221
10142 #, fuzzy
10143 #| msgid ""
10144 #| "A new segment was to be created and I<size> E<lt> B<SHMMIN> or I<size> "
10145 #| "E<gt> B<SHMMAX>, or no new segment was to be created, a segment with "
10146 #| "given key existed, but I<size> is greater than the size of that segment."
10147 msgid ""
10148 "A segment for the given I<key> exists, but I<size> is greater than the size "
10149 "of that segment."
10150 msgstr ""
10151 "新しいセグメントを作成しようとした際に I<size> E<lt> B<SHMMIN> または "
10152 "I<size> E<gt> B<SHMMAX> であった。 もしくは、指定されたキーに対応するセグメン"
10153 "トが既に存在して、新しい セグメントを作成しようとはしなかったが、I<size> が存"
10154 "在するセグメントの サイズよりも大きかった。"
10155
10156 #. type: Plain text
10157 #: build/C/man2/shmget.2:230
10158 msgid ""
10159 "No segment exists for the given I<key>, and B<IPC_CREAT> was not specified."
10160 msgstr ""
10161 "指定された I<key> に対応するセグメントが存在せず、 B<IPC_CREAT> も指定されて"
10162 "いなかった。"
10163
10164 #. type: Plain text
10165 #: build/C/man2/shmget.2:233
10166 msgid "No memory could be allocated for segment overhead."
10167 msgstr "セグメントの管理情報 (overhead) に割り当てるメモリがなかった。"
10168
10169 #. type: Plain text
10170 #: build/C/man2/shmget.2:241
10171 msgid ""
10172 "All possible shared memory IDs have been taken (B<SHMMNI>), or allocating a "
10173 "segment of the requested I<size> would cause the system to exceed the system-"
10174 "wide limit on shared memory (B<SHMALL>)."
10175 msgstr ""
10176 "システム全体の共有メモリ・セグメント数の制限 (B<SHMMNI>)  に達した、または要"
10177 "求された I<size> のセグメントの割り当てが システム全体の共有メモリサイズの制"
10178 "限 (B<SHMALL>)  を超過した。"
10179
10180 #. type: Plain text
10181 #: build/C/man2/shmget.2:248
10182 msgid ""
10183 "The B<SHM_HUGETLB> flag was specified, but the caller was not privileged "
10184 "(did not have the B<CAP_IPC_LOCK> capability)."
10185 msgstr ""
10186 "B<SHM_HUGETLB> フラグが指定されたが、呼び出し元には権限がなかった "
10187 "(B<CAP_IPC_LOCK> ケーパビリティを持っていなかった)。"
10188
10189 #. type: Plain text
10190 #: build/C/man2/shmget.2:256
10191 msgid "B<SHM_HUGETLB> and B<SHM_NORESERVE> are Linux extensions."
10192 msgstr "B<SHM_HUGETLB> と B<SHM_NORESERVE> は Linux での拡張である。"
10193
10194 #. type: Plain text
10195 #: build/C/man2/shmget.2:280
10196 msgid ""
10197 "B<IPC_PRIVATE> isn't a flag field but a I<key_t> type.  If this special "
10198 "value is used for I<key>, the system call ignores all but the least "
10199 "significant 9 bits of I<shmflg> and creates a new shared memory segment."
10200 msgstr ""
10201 "B<IPC_PRIVATE> はフラグではなく I<key_t> 型である。 この特別な値が I<key> に"
10202 "使用された場合は、 B<shmget>()  は I<shmflg> の下位 9 ビットを除いた全てを無"
10203 "視し、 新しい共有メモリ・セグメントを作成する。"
10204
10205 #. type: SS
10206 #: build/C/man2/shmget.2:280
10207 #, no-wrap
10208 msgid "Shared memory limits"
10209 msgstr ""
10210
10211 #. type: Plain text
10212 #: build/C/man2/shmget.2:284
10213 msgid ""
10214 "The following limits on shared memory segment resources affect the "
10215 "B<shmget>()  call:"
10216 msgstr ""
10217 "B<shmget>()  コールに影響する共有メモリ・セグメント資源の制限は以下の通りであ"
10218 "る:"
10219
10220 #. type: TP
10221 #: build/C/man2/shmget.2:284
10222 #, no-wrap
10223 msgid "B<SHMALL>"
10224 msgstr "B<SHMALL>"
10225
10226 #. type: Plain text
10227 #: build/C/man2/shmget.2:289
10228 #, fuzzy
10229 #| msgid "The system limit on the total number of open files has been reached."
10230 msgid "System-wide limit on the number of I<pages> of shared memory."
10231 msgstr "システム全体でオープンされているファイルの総数が上限に達した。"
10232
10233 #.  commit 060028bac94bf60a65415d1d55a359c3a17d5c31
10234 #. type: Plain text
10235 #: build/C/man2/shmget.2:295
10236 #, fuzzy
10237 #| msgid ""
10238 #| "On Linux, this limit can be read and modified via I</proc/sys/kernel/"
10239 #| "shmall>."
10240 msgid ""
10241 "On Linux, this limit can be read and modified via I</proc/sys/kernel/"
10242 "shmall>.  Since Linux 3.16, the default value for this limit is:"
10243 msgstr ""
10244 "Linux では、この上限値は I</proc/sys/kernel/shmall> 経由で参照したり、変更し"
10245 "たりできる。"
10246
10247 #. type: Plain text
10248 #: build/C/man2/shmget.2:297 build/C/man2/shmget.2:332
10249 #, no-wrap
10250 msgid "    ULONG_MAX - 2^24\n"
10251 msgstr ""
10252
10253 #. type: Plain text
10254 #: build/C/man2/shmget.2:308
10255 msgid ""
10256 "The effect of this value (which is suitable for both 32-bit and 64-bit "
10257 "systems)  is to impose no limitation on allocations.  This value, rather "
10258 "than B<ULONG_MAX>, was chosen as the default to prevent some cases where "
10259 "historical applications simply raised the existing limit without first "
10260 "checking its current value.  Such applications would cause the value to "
10261 "overflow if the limit was set at B<ULONG_MAX>."
10262 msgstr ""
10263
10264 #. type: Plain text
10265 #: build/C/man2/shmget.2:311
10266 msgid "From Linux 2.4 up to Linux 3.15, the default value for this limit was:"
10267 msgstr ""
10268
10269 #. type: Plain text
10270 #: build/C/man2/shmget.2:313
10271 #, no-wrap
10272 msgid "    SHMMAX / PAGE_SIZE * (SHMMNI / 16)\n"
10273 msgstr "    SHMMAX / PAGE_SIZE * (SHMMNI / 16)\n"
10274
10275 #. type: Plain text
10276 #: build/C/man2/shmget.2:321
10277 msgid ""
10278 "If B<SHMMAX> and B<SHMMNI> were not modified, then multiplying the result of "
10279 "this formula by the page size (to get a value in bytes) yielded a value of 8 "
10280 "GB as the limit on the total memory used by all shared memory segments."
10281 msgstr ""
10282
10283 #. type: TP
10284 #: build/C/man2/shmget.2:321
10285 #, no-wrap
10286 msgid "B<SHMMAX>"
10287 msgstr "B<SHMMAX>"
10288
10289 #. type: Plain text
10290 #: build/C/man2/shmget.2:324
10291 #, fuzzy
10292 #| msgid "shmget - allocates a System V shared memory segment"
10293 msgid "Maximum size in bytes for a shared memory segment."
10294 msgstr "shmget - System V 共有メモリ・セグメントを割り当てる"
10295
10296 #.  commit 060028bac94bf60a65415d1d55a359c3a17d5c31
10297 #. type: Plain text
10298 #: build/C/man2/shmget.2:330
10299 #, fuzzy
10300 #| msgid ""
10301 #| "On Linux, this limit can be read and modified via I</proc/sys/kernel/"
10302 #| "shmmax>."
10303 msgid ""
10304 "On Linux, this limit can be read and modified via I</proc/sys/kernel/"
10305 "shmmax>.  Since Linux 3.16, the default value for this limit is:"
10306 msgstr ""
10307 "Linux では、この上限値は I</proc/sys/kernel/shmmax> 経由で参照したり、変更し"
10308 "たりできる。"
10309
10310 #. type: Plain text
10311 #: build/C/man2/shmget.2:341
10312 msgid ""
10313 "The effect of this value (which is suitable for both 32-bit and 64-bit "
10314 "systems)  is to impose no limitation on allocations.  See the description of "
10315 "B<SHMALL> for a discussion of why this default value (rather than "
10316 "B<ULONG_MAX>)  is used."
10317 msgstr ""
10318
10319 #. type: Plain text
10320 #: build/C/man2/shmget.2:344
10321 #, fuzzy
10322 #| msgid ""
10323 #| "Maximum size in bytes for a shared memory segment.  Since Linux 2.2, the "
10324 #| "default value of this limit is 0x2000000 (32MB)."
10325 msgid ""
10326 "From Linux 2.2 up to Linux 3.15, the default value of this limit was "
10327 "0x2000000 (32MB)."
10328 msgstr ""
10329 "共有メモリ・セグメントの最大バイト数。 Linux 2.2 以降では、 この上限値のデ"
10330 "フォルトは 0x2000000 (32MB) である。"
10331
10332 #. type: Plain text
10333 #: build/C/man2/shmget.2:350
10334 msgid ""
10335 "Because it is not possible to map just part of a shared memory segment, the "
10336 "amount of virtual memory places another limit on the maximum size of a "
10337 "usable segment: for example, on i386 the largest segments that can be mapped "
10338 "have a size of around 2.8 GB, and on x86_64 the limit is around 127 TB."
10339 msgstr ""
10340
10341 #. type: TP
10342 #: build/C/man2/shmget.2:350
10343 #, no-wrap
10344 msgid "B<SHMMIN>"
10345 msgstr "B<SHMMIN>"
10346
10347 #. type: Plain text
10348 #: build/C/man2/shmget.2:356
10349 msgid ""
10350 "Minimum size in bytes for a shared memory segment: implementation dependent "
10351 "(currently 1 byte, though B<PAGE_SIZE> is the effective minimum size)."
10352 msgstr ""
10353 "共有メモリ・セグメントのバイト単位の大きさの下限: 実装依存 (現在は 1 バイトだ"
10354 "が、実質的な最小サイズは B<PAGE_SIZE> である)。"
10355
10356 #. type: TP
10357 #: build/C/man2/shmget.2:356
10358 #, no-wrap
10359 msgid "B<SHMMNI>"
10360 msgstr "B<SHMMNI>"
10361
10362 #. type: Plain text
10363 #: build/C/man2/shmget.2:361
10364 msgid ""
10365 "System-wide limit on the number of shared memory segments.  In Linux 2.2, "
10366 "the default value for this limit was 128; since Linux 2.4, the default value "
10367 "is 4096."
10368 msgstr ""
10369 "システム全体の共有メモリ・セグメント数の上限値。 この上限値のデフォルトは、 "
10370 "Linux 2.2 以降では 128、 Linux 2.4 以降で 4096 である。"
10371
10372 #.  Kernels between 2.4.x and 2.6.8 had an off-by-one error that meant
10373 #.  that we could create one more segment than SHMMNI -- MTK
10374 #.  This /proc file is not available in Linux 2.2 and earlier -- MTK
10375 #. type: Plain text
10376 #: build/C/man2/shmget.2:367
10377 msgid ""
10378 "On Linux, this limit can be read and modified via I</proc/sys/kernel/shmmni>."
10379 msgstr ""
10380 "Linux では、この上限値は I</proc/sys/kernel/shmmni> 経由で参照したり、変更し"
10381 "たりできる。"
10382
10383 #. type: Plain text
10384 #: build/C/man2/shmget.2:371
10385 msgid ""
10386 "The implementation has no specific limits for the per-process maximum number "
10387 "of shared memory segments (B<SHMSEG>)."
10388 msgstr ""
10389 "プロセス当りの共有メモリ・セグメントの個数の最大値 (B<SHMSEG>)  に関する実装"
10390 "上の制限はない。"
10391
10392 #. type: Plain text
10393 #: build/C/man2/shmget.2:377
10394 msgid ""
10395 "Until version 2.3.30, Linux would return B<EIDRM> for a B<shmget>()  on a "
10396 "shared memory segment scheduled for deletion."
10397 msgstr ""
10398 "バージョン 2.3.30 までは、Linux は 削除が予定されている共有メモリ・セグメント"
10399 "に対して B<shmget>()  が行われると B<EIDRM> を返していた。"
10400
10401 #. type: Plain text
10402 #: build/C/man2/shmget.2:383
10403 msgid ""
10404 "The name choice B<IPC_PRIVATE> was perhaps unfortunate, B<IPC_NEW> would "
10405 "more clearly show its function."
10406 msgstr ""
10407 "B<IPC_PRIVATE> という名前を選んだのはおそらく失敗であろう。 B<IPC_NEW> の方が"
10408 "より明確にその機能を表しているだろう。"
10409
10410 #. type: Plain text
10411 #: build/C/man2/shmget.2:391
10412 msgid ""
10413 "B<shmat>(2), B<shmctl>(2), B<shmdt>(2), B<ftok>(3), B<capabilities>(7), "
10414 "B<shm_overview>(7), B<svipc>(7)"
10415 msgstr ""
10416 "B<shmat>(2), B<shmctl>(2), B<shmdt>(2), B<ftok>(3), B<capabilities>(7), "
10417 "B<shm_overview>(7), B<svipc>(7)"
10418
10419 #. type: TH
10420 #: build/C/man2/shmop.2:41
10421 #, no-wrap
10422 msgid "SHMOP"
10423 msgstr "SHMOP"
10424
10425 #. type: Plain text
10426 #: build/C/man2/shmop.2:44
10427 msgid "shmat, shmdt - System V shared memory operations"
10428 msgstr "shmat, shmdt - System V 共有メモリ (shared memory) の操作"
10429
10430 #. type: Plain text
10431 #: build/C/man2/shmop.2:48
10432 #, no-wrap
10433 msgid ""
10434 "B<#include E<lt>sys/types.hE<gt>>\n"
10435 "B<#include E<lt>sys/shm.hE<gt>>\n"
10436 msgstr ""
10437 "B<#include E<lt>sys/types.hE<gt>>\n"
10438 "B<#include E<lt>sys/shm.hE<gt>>\n"
10439
10440 #. type: Plain text
10441 #: build/C/man2/shmop.2:50
10442 #, no-wrap
10443 msgid "B<void *shmat(int >I<shmid>B<, const void *>I<shmaddr>B<, int >I<shmflg>B<);>\n"
10444 msgstr "B<void *shmat(int >I<shmid>B<, const void *>I<shmaddr>B<, int >I<shmflg>B<);>\n"
10445
10446 #. type: Plain text
10447 #: build/C/man2/shmop.2:52
10448 #, no-wrap
10449 msgid "B<int shmdt(const void *>I<shmaddr>B<);>\n"
10450 msgstr "B<int shmdt(const void *>I<shmaddr>B<);>\n"
10451
10452 #. type: SS
10453 #: build/C/man2/shmop.2:54
10454 #, no-wrap
10455 msgid "shmat()"
10456 msgstr ""
10457
10458 #. type: Plain text
10459 #: build/C/man2/shmop.2:62
10460 msgid ""
10461 "B<shmat>()  attaches the System\\ V shared memory segment identified by "
10462 "I<shmid> to the address space of the calling process.  The attaching address "
10463 "is specified by I<shmaddr> with one of the following criteria:"
10464 msgstr ""
10465 "B<shmat>()  は I<shmid> で指定された System\\ V 共有メモリ・セグメント "
10466 "(shared memory segment) を コールしたプロセスのアドレス空間に付加 (attach) す"
10467 "る。 付加するアドレスは I<shmaddr> に以下のどれかの形式で指定する:"
10468
10469 #. type: Plain text
10470 #: build/C/man2/shmop.2:68
10471 msgid ""
10472 "If I<shmaddr> is NULL, the system chooses a suitable (unused) address at "
10473 "which to attach the segment."
10474 msgstr ""
10475 "I<shmaddr> が NULL ならば、システムはセグメントを付加するための 適切な (使用"
10476 "されていない) アドレスを選択する。"
10477
10478 #. type: Plain text
10479 #: build/C/man2/shmop.2:80
10480 msgid ""
10481 "If I<shmaddr> isn't NULL and B<SHM_RND> is specified in I<shmflg>, the "
10482 "attach occurs at the address equal to I<shmaddr> rounded down to the nearest "
10483 "multiple of B<SHMLBA>."
10484 msgstr ""
10485 "I<shmaddr> が NULL でなく B<SHM_RND> が I<shmflg> に指定されている場合は、 "
10486 "I<shmaddr> を B<SHMLBA> の倍数へと切り捨てた (rounding down) のと等しいアドレ"
10487 "スへ付加する。"
10488
10489 #. type: Plain text
10490 #: build/C/man2/shmop.2:84
10491 msgid ""
10492 "Otherwise, I<shmaddr> must be a page-aligned address at which the attach "
10493 "occurs."
10494 msgstr ""
10495 "その他の場合は I<shmaddr> は付加を行なうアドレスで、ページ境界を指している必"
10496 "要がある。"
10497
10498 #. type: Plain text
10499 #: build/C/man2/shmop.2:90
10500 msgid ""
10501 "In addition to B<SHM_RND>, the following flags may be specified in the "
10502 "I<shmflg> bit-mask argument:"
10503 msgstr ""
10504
10505 #. type: TP
10506 #: build/C/man2/shmop.2:90
10507 #, no-wrap
10508 msgid "B<SHM_EXEC> (Linux-specific; since Linux 2.6.9)"
10509 msgstr "B<SHM_EXEC> (Linux 固有; Linux 2.6.9 以降)"
10510
10511 #. type: Plain text
10512 #: build/C/man2/shmop.2:94
10513 msgid ""
10514 "Allow the contents of the segment to be executed.  The caller must have "
10515 "execute permission on the segment."
10516 msgstr ""
10517
10518 #. type: TP
10519 #: build/C/man2/shmop.2:94
10520 #, no-wrap
10521 msgid "B<SHM_RDONLY>"
10522 msgstr "B<SHM_RDONLY>"
10523
10524 #. type: Plain text
10525 #: build/C/man2/shmop.2:102
10526 #, fuzzy
10527 #| msgid ""
10528 #| "If B<SHM_RDONLY> is specified in I<shmflg>, the segment is attached for "
10529 #| "reading and the process must have read permission for the segment.  "
10530 #| "Otherwise the segment is attached for read and write and the process must "
10531 #| "have read and write permission for the segment.  There is no notion of a "
10532 #| "write-only shared memory segment."
10533 msgid ""
10534 "Attach the segment for read-only access.  The process must have read "
10535 "permission for the segment.  If this flag is not specified, the segment is "
10536 "attached for read and write access, and the process must have read and write "
10537 "permission for the segment.  There is no notion of a write-only shared "
10538 "memory segment."
10539 msgstr ""
10540 "B<SHM_RDONLY> が I<shmflg> に指定されていた場合は、 セグメントは読み込み専用"
10541 "に付加され、プロセスはそのセグメントへの 読み込み許可を持たなければならな"
10542 "い。 そうでなければそのセグメントは読み込みと書き込みのために付加され、 プロ"
10543 "セスはそのセグメントに読み込みと書き込みの許可を持つ必要がある。 書き込み専用"
10544 "の共有メモリ・セグメントという概念は存在しない。"
10545
10546 #. type: TP
10547 #: build/C/man2/shmop.2:102
10548 #, no-wrap
10549 msgid "B<SHM_REMAP> (Linux-specific)"
10550 msgstr "B<SHM_REMAP> (Linux 固有)"
10551
10552 #. type: Plain text
10553 #: build/C/man2/shmop.2:115
10554 #, fuzzy
10555 #| msgid ""
10556 #| "The (Linux-specific)  B<SHM_REMAP> flag may be specified in I<shmflg> to "
10557 #| "indicate that the mapping of the segment should replace any existing "
10558 #| "mapping in the range starting at I<shmaddr> and continuing for the size "
10559 #| "of the segment.  (Normally an B<EINVAL> error would result if a mapping "
10560 #| "already exists in this address range.)  In this case, I<shmaddr> must not "
10561 #| "be NULL."
10562 msgid ""
10563 "This flag specifies that the mapping of the segment should replace any "
10564 "existing mapping in the range starting at I<shmaddr> and continuing for the "
10565 "size of the segment.  (Normally, an B<EINVAL> error would result if a "
10566 "mapping already exists in this address range.)  In this case, I<shmaddr> "
10567 "must not be NULL."
10568 msgstr ""
10569 "(Linux 特有の)  B<SHM_REMAP> フラグが I<shmflg> に指定された場合は、 セグメン"
10570 "トのマッピングを既存のマッピングに置き換える。 マッピングの範囲は、 "
10571 "I<shmaddr> から始まりセグメントのサイズ分だけある (通常 B<EINVAL> エラーは、"
10572 "このアドレス範囲にマッピングが既に存在するために起る)。 このフラグを指定する"
10573 "場合は、 I<shmaddr> が NULL であってはならない。"
10574
10575 #. type: Plain text
10576 #: build/C/man2/shmop.2:122
10577 msgid ""
10578 "The B<brk>(2)  value of the calling process is not altered by the attach.  "
10579 "The segment will automatically be detached at process exit.  The same "
10580 "segment may be attached as a read and as a read-write one, and more than "
10581 "once, in the process's address space."
10582 msgstr ""
10583 "呼び出したプロセスの B<brk>(2)  の値は付加によって変化しない。 そのセグメント"
10584 "はプロセスが終了 (exit) したら自動的に分離 (detach) される。 同じセグメントを"
10585 "プロセスのアドレス空間に、読み込み専用および読み書き両用 として付加でき、また"
10586 "複数回付加することもできる。"
10587
10588 #. type: Plain text
10589 #: build/C/man2/shmop.2:130
10590 msgid ""
10591 "A successful B<shmat>()  call updates the members of the I<shmid_ds> "
10592 "structure (see B<shmctl>(2))  associated with the shared memory segment as "
10593 "follows:"
10594 msgstr ""
10595 "成功した B<shmat>()  コールは共有メモリ・セグメントに関連する I<shmid_ds> 構"
10596 "造体 (B<shmctl>(2)  を参照) のメンバーを以下のように更新する:"
10597
10598 #. type: Plain text
10599 #: build/C/man2/shmop.2:133
10600 msgid "I<shm_atime> is set to the current time."
10601 msgstr "I<shm_atime> には現在の時刻を設定する。"
10602
10603 #. type: Plain text
10604 #: build/C/man2/shmop.2:136 build/C/man2/shmop.2:163
10605 msgid "I<shm_lpid> is set to the process-ID of the calling process."
10606 msgstr "I<shm_lpid> には呼び出したプロセスのプロセス ID が設定される。"
10607
10608 #. type: Plain text
10609 #: build/C/man2/shmop.2:140
10610 msgid "I<shm_nattch> is incremented by one."
10611 msgstr "I<shm_nattch> を 1 増加させる。"
10612
10613 #. type: SS
10614 #: build/C/man2/shmop.2:140
10615 #, no-wrap
10616 msgid "shmdt()"
10617 msgstr ""
10618
10619 #. type: Plain text
10620 #: build/C/man2/shmop.2:151
10621 msgid ""
10622 "B<shmdt>()  detaches the shared memory segment located at the address "
10623 "specified by I<shmaddr> from the address space of the calling process.  The "
10624 "to-be-detached segment must be currently attached with I<shmaddr> equal to "
10625 "the value returned by the attaching B<shmat>()  call."
10626 msgstr ""
10627 "B<shmdt>()  は呼び出したプロセスのアドレス空間から I<shmaddr> で指定されたア"
10628 "ドレスに配置された共有メモリ・セグメントを分離 (detach) する。 分離する共有メ"
10629 "モリ・セグメントは、現在 I<shmaddr> に付加されているものでなければならない。 "
10630 "I<shmaddr> は、それを付加した時に B<shmat>()  が返した値に等しくなければなら"
10631 "ない。"
10632
10633 #. type: Plain text
10634 #: build/C/man2/shmop.2:157
10635 msgid ""
10636 "On a successful B<shmdt>()  call, the system updates the members of the "
10637 "I<shmid_ds> structure associated with the shared memory segment as follows:"
10638 msgstr ""
10639 "成功した B<shmdt>()  コールはその共有メモリ・セグメントに関連する "
10640 "I<shmid_ds> 構造体のメンバーを以下のように更新する:"
10641
10642 #. type: Plain text
10643 #: build/C/man2/shmop.2:160
10644 msgid "I<shm_dtime> is set to the current time."
10645 msgstr "I<shm_dtime> には現在の時刻が設定される。"
10646
10647 #. type: Plain text
10648 #: build/C/man2/shmop.2:168
10649 msgid ""
10650 "I<shm_nattch> is decremented by one.  If it becomes 0 and the segment is "
10651 "marked for deletion, the segment is deleted."
10652 msgstr ""
10653 "I<shm_nattch> を 1 減少させる。 もし 0 になり、削除マークがあった場合は その"
10654 "セグメントは削除される。"
10655
10656 #. type: Plain text
10657 #: build/C/man2/shmop.2:176
10658 msgid ""
10659 "On success, B<shmat>()  returns the address of the attached shared memory "
10660 "segment; on error, I<(void\\ *)\\ -1> is returned, and I<errno> is set to "
10661 "indicate the cause of the error."
10662 msgstr ""
10663 "B<shmat>()  は、成功した場合、 付加された共有メモリ・セグメントのアドレスを返"
10664 "す。 エラーの場合、 I<(void\\ *)\\ -1> を返し、 I<errno> にエラーの原因を示す"
10665 "値を設定する。"
10666
10667 #. type: Plain text
10668 #: build/C/man2/shmop.2:182
10669 msgid ""
10670 "On success, B<shmdt>()  returns 0; on error -1 is returned, and I<errno> is "
10671 "set to indicate the cause of the error."
10672 msgstr ""
10673 "B<shmdt>()  は、成功すると 0 を返す。 エラーの場合、-1 を返し、 I<errno> にエ"
10674 "ラーの原因を示す値を設定する。"
10675
10676 #. type: Plain text
10677 #: build/C/man2/shmop.2:188
10678 msgid "When B<shmat>()  fails, I<errno> is set to one of the following:"
10679 msgstr ""
10680 "B<shmat>()  が失敗した場合、 I<errno> に以下の値のどれかを設定して返す:"
10681
10682 #. type: Plain text
10683 #: build/C/man2/shmop.2:194
10684 msgid ""
10685 "The calling process does not have the required permissions for the requested "
10686 "attach type, and does not have the B<CAP_IPC_OWNER> capability."
10687 msgstr ""
10688 "呼び出したプロセスに要求された種類の付加に必要な許可がなく、 "
10689 "B<CAP_IPC_OWNER> ケーパビリティ (capability) がない。"
10690
10691 #. type: Plain text
10692 #: build/C/man2/shmop.2:211
10693 msgid ""
10694 "Invalid I<shmid> value, unaligned (i.e., not page-aligned and B<SHM_RND> was "
10695 "not specified) or invalid I<shmaddr> value, or can't attach segment at "
10696 "I<shmaddr>, or B<SHM_REMAP> was specified and I<shmaddr> was NULL."
10697 msgstr ""
10698 "I<shmid> の値が不正である。 I<shmaddr> の値が境界違反 (unaligned) (つまり、"
10699 "ページ境界に合っておらず、 B<SHM_RND> が指定されていない) または が不正であ"
10700 "る。 I<shmaddr> へのセグメントの付加に失敗した。 または B<SHM_REMAP> が指定さ"
10701 "れているが、 I<shmaddr> が NULL であった。"
10702
10703 #. type: Plain text
10704 #: build/C/man2/shmop.2:214
10705 msgid "Could not allocate memory for the descriptor or for the page tables."
10706 msgstr ""
10707 "ディスクリプター (descriptor) やページ・テーブルのためのメモリを 割り当てるこ"
10708 "とができない。"
10709
10710 #. type: Plain text
10711 #: build/C/man2/shmop.2:220
10712 msgid "When B<shmdt>()  fails, I<errno> is set as follows:"
10713 msgstr "B<shmdt>()  が失敗した場合、 B<EINVAL> は以下のようにセットされる:"
10714
10715 #.  The following since 2.6.17-rc1:
10716 #. type: Plain text
10717 #: build/C/man2/shmop.2:228
10718 msgid ""
10719 "There is no shared memory segment attached at I<shmaddr>; or, I<shmaddr> is "
10720 "not aligned on a page boundary."
10721 msgstr ""
10722 "I<shmaddr> に付加された共有メモリ・セグメントが存在しない。 もしくは、 "
10723 "I<shmaddr> がページ境界に合っていない。"
10724
10725 #. type: Plain text
10726 #: build/C/man2/shmop.2:243
10727 #, fuzzy
10728 #| msgid ""
10729 #| "In SVID 3 (or perhaps earlier), the type of the I<shmaddr> argument was "
10730 #| "changed from I<char\\ *> into I<const void\\ *>, and the returned type of "
10731 #| "B<shmat>()  from I<char\\ *> into I<void\\ *>.  (Linux libc4 and libc5 "
10732 #| "have the I<char\\ *> prototypes; glibc2 has I<void\\ *>.)"
10733 msgid ""
10734 "In SVID 3 (or perhaps earlier), the type of the I<shmaddr> argument was "
10735 "changed from I<char\\ *> into I<const void\\ *>, and the returned type of "
10736 "B<shmat>()  from I<char\\ *> into I<void\\ *>."
10737 msgstr ""
10738 "SVID 3 で (たぶんそれより前だと思うが)  I<shmaddr> 引き数の型は I<char\\ *> "
10739 "から I<const void\\ *> に、I<shmat>() の返り値の型は I<char\\ *> から I<void"
10740 "\\ *> に変更された (Linux では libc4 と libc5 のプロトタイプは I<char\\ *> で"
10741 "あり、glibc2 のプロトタイプは I<void\\ *> である)。"
10742
10743 #. type: Plain text
10744 #: build/C/man2/shmop.2:248
10745 msgid ""
10746 "After a B<fork>(2), the child inherits the attached shared memory segments."
10747 msgstr ""
10748 "B<fork>(2)  した後、子プロセスは付加された共有メモリ・セグメントを継承する。"
10749
10750 #. type: Plain text
10751 #: build/C/man2/shmop.2:252
10752 msgid ""
10753 "After an B<execve>(2), all attached shared memory segments are detached from "
10754 "the process."
10755 msgstr ""
10756 "B<exec>(2)  した後、全ての付加された共有メモリ・セグメントはプロセスから分離"
10757 "される。"
10758
10759 #. type: Plain text
10760 #: build/C/man2/shmop.2:256
10761 msgid ""
10762 "Upon B<_exit>(2), all attached shared memory segments are detached from the "
10763 "process."
10764 msgstr ""
10765 "B<exit>(2)  において、全ての付加された共有メモリ・セグメントはプロセスから分"
10766 "離される。"
10767
10768 #. type: Plain text
10769 #: build/C/man2/shmop.2:268
10770 msgid ""
10771 "Using B<shmat>()  with I<shmaddr> equal to NULL is the preferred, portable "
10772 "way of attaching a shared memory segment.  Be aware that the shared memory "
10773 "segment attached in this way may be attached at different addresses in "
10774 "different processes.  Therefore, any pointers maintained within the shared "
10775 "memory must be made relative (typically to the starting address of the "
10776 "segment), rather than absolute."
10777 msgstr ""
10778 "共有メモリセグメントを付加する場合の移植性の高い方法としては、 I<shmaddr> を "
10779 "NULL にして B<shmat>()  を使用するのがよい。 このような方法で付加される共有メ"
10780 "モリセグメントは、 プロセスが異なれば別のアドレスに付加される、という点に注意"
10781 "すること。 よって共有メモリ内で管理されるポインタは、 絶対アドレスではなく、 "
10782 "(一般的にはセグメントの開始アドレスからの)  相対アドレスで作成するべきであ"
10783 "る。"
10784
10785 #. type: Plain text
10786 #: build/C/man2/shmop.2:273
10787 msgid ""
10788 "On Linux, it is possible to attach a shared memory segment even if it is "
10789 "already marked to be deleted.  However, POSIX.1-2001 does not specify this "
10790 "behavior and many other implementations do not support it."
10791 msgstr ""
10792 "Linux では共有メモリセグメントに既に削除マークが付けられていても、 その共有メ"
10793 "モリセグメントを付加することができる。 しかし POSIX.1-2001 ではこのような動作"
10794 "を指定しておらず、 他の多くの実装もこれをサポートしていない。"
10795
10796 #. type: Plain text
10797 #: build/C/man2/shmop.2:276
10798 msgid "The following system parameter affects B<shmat>():"
10799 msgstr "以下のシステム・パラメーターは、 B<shmat>()  に影響する:"
10800
10801 #. type: TP
10802 #: build/C/man2/shmop.2:276
10803 #, no-wrap
10804 msgid "B<SHMLBA>"
10805 msgstr "B<SHMLBA>"
10806
10807 #. type: Plain text
10808 #: build/C/man2/shmop.2:289
10809 msgid ""
10810 "Segment low boundary address multiple.  When explicitly specifying an attach "
10811 "address in a call to B<shmat>(), the caller should ensure that the address "
10812 "is a multiple of this value.  This is necessary on some architectures, in "
10813 "order either to ensure good CPU cache performance or to ensure that "
10814 "different attaches of the same segment have consistent views within the CPU "
10815 "cache.  B<SHMLBA> is normally some multiple of the system page size (on many "
10816 "Linux architectures, it is the same as the system page size)."
10817 msgstr ""
10818
10819 #. type: Plain text
10820 #: build/C/man2/shmop.2:293
10821 msgid ""
10822 "The implementation places no intrinsic per-process limit on the number of "
10823 "shared memory segments (B<SHMSEG>)."
10824 msgstr ""
10825 "現在の実装では、プロセスごとの 共有メモリ・セグメントの最大数 (B<SHMSEG>)  に"
10826 "関する実装依存の制限はない。"
10827
10828 #. type: Plain text
10829 #: build/C/man2/shmop.2:301
10830 msgid ""
10831 "B<brk>(2), B<mmap>(2), B<shmctl>(2), B<shmget>(2), B<capabilities>(7), "
10832 "B<shm_overview>(7), B<svipc>(7)"
10833 msgstr ""
10834 "B<brk>(2), B<mmap>(2), B<shmctl>(2), B<shmget>(2), B<capabilities>(7), "
10835 "B<shm_overview>(7), B<svipc>(7)"
10836
10837 #. type: TH
10838 #: build/C/man2/subpage_prot.2:30
10839 #, no-wrap
10840 msgid "SUBPAGE_PROT"
10841 msgstr "SUBPAGE_PROT"
10842
10843 #. type: TH
10844 #: build/C/man2/subpage_prot.2:30
10845 #, no-wrap
10846 msgid "2012-07-13"
10847 msgstr "2012-07-13"
10848
10849 #. type: Plain text
10850 #: build/C/man2/subpage_prot.2:33
10851 msgid "subpage_prot - define a subpage protection for an address range"
10852 msgstr ""
10853
10854 #. type: Plain text
10855 #: build/C/man2/subpage_prot.2:37
10856 #, no-wrap
10857 msgid ""
10858 "B<long subpage_prot(unsigned long >I<addr>B<, unsigned long >I<len>B<,>\n"
10859 "B<                  uint32_t *>I<map>B<);>\n"
10860 msgstr ""
10861 "B<long subpage_prot(unsigned long >I<addr>B<, unsigned long >I<len>B<,>\n"
10862 "B<                  uint32_t *>I<map>B<);>\n"
10863
10864 #. type: Plain text
10865 #: build/C/man2/subpage_prot.2:41
10866 msgid "I<Note>: There is no glibc wrapper for this system call; see NOTES."
10867 msgstr ""
10868 "I<注>: このシステムコールには glibc のラッパー関数は存在しない。「注意」の節"
10869 "を参照。"
10870
10871 #. type: Plain text
10872 #: build/C/man2/subpage_prot.2:47
10873 msgid ""
10874 "The PowerPC-specific B<subpage_prot>()  system call provides the facility to "
10875 "control the access permissions on individual 4kB subpages on systems "
10876 "configured with a page size of 64kB."
10877 msgstr ""
10878
10879 #. type: Plain text
10880 #: build/C/man2/subpage_prot.2:54
10881 msgid ""
10882 "The protection map is applied to the memory pages in the region starting at "
10883 "I<addr> and continuing for I<len> bytes.  Both of these arguments must be "
10884 "aligned to a 64-kB boundary."
10885 msgstr ""
10886
10887 #. type: Plain text
10888 #: build/C/man2/subpage_prot.2:66
10889 msgid ""
10890 "The protection map is specified in the buffer pointed to by I<map>.  The map "
10891 "has 2 bits per 4kB subpage; thus each 32-bit word specifies the protections "
10892 "of 16 4kB subpages inside a 64kB page (so, the number of 32-bit words "
10893 "pointed to by I<map> should equate to the number of 64-kB pages specified by "
10894 "I<len>).  Each 2-bit field in the protection map is either 0 to allow any "
10895 "access, 1 to prevent writes, or 2 or 3 to prevent all accesses."
10896 msgstr ""
10897
10898 #. type: Plain text
10899 #: build/C/man2/subpage_prot.2:71
10900 msgid ""
10901 "On success, B<subpage_prot>()  returns 0.  Otherwise, one of the error codes "
10902 "specified below is returned."
10903 msgstr ""
10904
10905 #. type: Plain text
10906 #: build/C/man2/subpage_prot.2:77
10907 msgid "The buffer referred to by I<map> is not accessible."
10908 msgstr ""
10909
10910 #. type: Plain text
10911 #: build/C/man2/subpage_prot.2:87
10912 msgid ""
10913 "The I<addr> or I<len> arguments are incorrect.  Both of these arguments must "
10914 "be aligned to a multiple of the system page size, and they must not refer to "
10915 "a region outside of the address space of the process or to a region that "
10916 "consists of huge pages."
10917 msgstr ""
10918
10919 #. type: Plain text
10920 #: build/C/man2/subpage_prot.2:90 build/C/man2/sync_file_range.2:166
10921 msgid "Out of memory."
10922 msgstr "メモリ不足である。"
10923
10924 #. type: Plain text
10925 #: build/C/man2/subpage_prot.2:96
10926 msgid ""
10927 "This system call is provided on the PowerPC architecture since Linux "
10928 "2.6.25.  The system call is provided only if the kernel is configured with "
10929 "B<CONFIG_PPC_64K_PAGES>.  No library support is provided."
10930 msgstr ""
10931
10932 #. type: Plain text
10933 #: build/C/man2/subpage_prot.2:101
10934 msgid ""
10935 "Glibc does not provide a wrapper for this system call; call it using "
10936 "B<syscall>(2)."
10937 msgstr ""
10938
10939 #. type: Plain text
10940 #: build/C/man2/subpage_prot.2:106
10941 msgid ""
10942 "Normal page protections (at the 64-kB page level) also apply; the subpage "
10943 "protection mechanism is an additional constraint, so putting 0 in a 2-bit "
10944 "field won't allow writes to a page that is otherwise write-protected."
10945 msgstr ""
10946
10947 #. type: SS
10948 #: build/C/man2/subpage_prot.2:106
10949 #, no-wrap
10950 msgid "Rationale"
10951 msgstr ""
10952
10953 #.  In the initial implementation, it was the case that:
10954 #.      In fact the whole process is switched to use 4k hardware pages when the
10955 #.      subpage_prot system call is used, but this could be improved in future
10956 #.      to switch only the affected segments.
10957 #.  But Paul Mackerass says (Oct 2010): I'm pretty sure we now only switch
10958 #.  the affected segment, not the whole process.
10959 #. type: Plain text
10960 #: build/C/man2/subpage_prot.2:128
10961 msgid ""
10962 "This system call is provided to assist writing emulators that operate using "
10963 "64-kB pages on PowerPC systems.  When emulating systems such as x86, which "
10964 "uses a smaller page size, the emulator can no longer use the memory-"
10965 "management unit (MMU)  and normal system calls for controlling page "
10966 "protections.  (The emulator could emulate the MMU by checking and possibly "
10967 "remapping the address for each memory access in software, but that is "
10968 "slow.)  The idea is that the emulator supplies an array of protection masks "
10969 "to apply to a specified range of virtual addresses.  These masks are applied "
10970 "at the level where hardware page-table entries (PTEs)  are inserted into the "
10971 "hardware page table based on the Linux PTEs, so the Linux PTEs are not "
10972 "affected.  Implicit in this is that the regions of the address space that "
10973 "are protected are switched to use 4-kB hardware pages rather than 64-kB "
10974 "hardware pages (on machines with hardware 64-kB page support)."
10975 msgstr ""
10976
10977 #. type: Plain text
10978 #: build/C/man2/subpage_prot.2:131
10979 msgid "B<mprotect>(2), B<syscall>(2)"
10980 msgstr "B<mprotect>(2), B<syscall>(2)"
10981
10982 #. type: Plain text
10983 #: build/C/man2/subpage_prot.2:134
10984 msgid "I<Documentation/vm/hugetlbpage.txt> in the Linux kernel source tree"
10985 msgstr "Linux カーネルソースの I<Documentation/vm/hugetlbpage.txt>"
10986
10987 #. type: TH
10988 #: build/C/man2/sync_file_range.2:30
10989 #, no-wrap
10990 msgid "SYNC_FILE_RANGE"
10991 msgstr "SYNC_FILE_RANGE"
10992
10993 #. type: Plain text
10994 #: build/C/man2/sync_file_range.2:33
10995 msgid "sync_file_range - sync a file segment with disk"
10996 msgstr "sync_file_range - ファイルセグメントをディスクと同期する"
10997
10998 #. type: Plain text
10999 #: build/C/man2/sync_file_range.2:37
11000 #, no-wrap
11001 msgid ""
11002 "B<#define _GNU_SOURCE>         /* See feature_test_macros(7) */\n"
11003 "B<#include E<lt>fcntl.hE<gt>>\n"
11004 msgstr ""
11005 "B<#define _GNU_SOURCE>         /* feature_test_macros(7) 参照 */\n"
11006 "B<#include E<lt>fcntl.hE<gt>>\n"
11007
11008 #. type: Plain text
11009 #: build/C/man2/sync_file_range.2:40
11010 #, no-wrap
11011 msgid ""
11012 "B<int sync_file_range(int >I<fd>B<, off64_t >I<offset>B<, off64_t >I<nbytes>B<,>\n"
11013 "B<                    unsigned int >I<flags>B<);>\n"
11014 msgstr ""
11015 "B<int sync_file_range(int >I<fd>B<, off64_t >I<offset>B<, off64_t >I<nbytes>B<,>\n"
11016 "B<                    unsigned int >I<flags>B<);>\n"
11017
11018 #. type: Plain text
11019 #: build/C/man2/sync_file_range.2:47
11020 msgid ""
11021 "B<sync_file_range>()  permits fine control when synchronizing the open file "
11022 "referred to by the file descriptor I<fd> with disk."
11023 msgstr ""
11024 "B<sync_file_range>()  を使うと、ファイルディスクリプタ I<fd> で参照されるオー"
11025 "プンされたファイルのディスクとの同期に関して、 きめ細かな制御が可能となる。"
11026
11027 #. type: Plain text
11028 #: build/C/man2/sync_file_range.2:61
11029 msgid ""
11030 "I<offset> is the starting byte of the file range to be synchronized.  "
11031 "I<nbytes> specifies the length of the range to be synchronized, in bytes; if "
11032 "I<nbytes> is zero, then all bytes from I<offset> through to the end of file "
11033 "are synchronized.  Synchronization is in units of the system page size: "
11034 "I<offset> is rounded down to a page boundary; I<(offset+nbytes-1)> is "
11035 "rounded up to a page boundary."
11036 msgstr ""
11037 "I<offset> は、同期を行うファイルの領域の開始バイトである。 I<nbytes> には同期"
11038 "を行う領域の長さをバイト単位で指定する。 I<nbytes> が 0 の場合は、 I<offset> "
11039 "からファイル末尾までの全バイトを同期する。 同期はシステムのページサイズの単位"
11040 "で行われる。 I<offset> はページ境界にあわせて切り下げられ、 I<(offset"
11041 "+nbytes-1)> はページ境界にあわせて切り上げられる。"
11042
11043 #. type: Plain text
11044 #: build/C/man2/sync_file_range.2:65
11045 msgid "The I<flags> bit-mask argument can include any of the following values:"
11046 msgstr "ビットマスク引き数 I<flags> には以下の値を指定することができる:"
11047
11048 #. type: TP
11049 #: build/C/man2/sync_file_range.2:65
11050 #, no-wrap
11051 msgid "B<SYNC_FILE_RANGE_WAIT_BEFORE>"
11052 msgstr "B<SYNC_FILE_RANGE_WAIT_BEFORE>"
11053
11054 #. type: Plain text
11055 #: build/C/man2/sync_file_range.2:70
11056 msgid ""
11057 "Wait upon write-out of all pages in the specified range that have already "
11058 "been submitted to the device driver for write-out before performing any "
11059 "write."
11060 msgstr ""
11061 "何らかの書き込みを行う前に、指定された領域のページで 書き出しを行うようにデバ"
11062 "イスドライバにすでに要求が発行されている ページの書き出しが全て完了するのを待"
11063 "つ。"
11064
11065 #. type: TP
11066 #: build/C/man2/sync_file_range.2:70 build/C/man2/sync_file_range.2:120
11067 #, no-wrap
11068 msgid "B<SYNC_FILE_RANGE_WRITE>"
11069 msgstr "B<SYNC_FILE_RANGE_WRITE>"
11070
11071 #. type: Plain text
11072 #: build/C/man2/sync_file_range.2:76
11073 msgid ""
11074 "Initiate write-out of all dirty pages in the specified range which are not "
11075 "presently submitted write-out.  Note that even this may block if you attempt "
11076 "to write more than request queue size."
11077 msgstr ""
11078 "指定された領域のページで、書き出し要求が発行されていない 全ての dirty (キャッ"
11079 "シュだけが変更されている) ページの 書き出しを開始する。 リクエストキューの大"
11080 "きさより多く書き込もうとした場合には、 この処理は停止 (block) する可能性があ"
11081 "る点に注意すること。"
11082
11083 #. type: TP
11084 #: build/C/man2/sync_file_range.2:76
11085 #, no-wrap
11086 msgid "B<SYNC_FILE_RANGE_WAIT_AFTER>"
11087 msgstr "B<SYNC_FILE_RANGE_WAIT_AFTER>"
11088
11089 #. type: Plain text
11090 #: build/C/man2/sync_file_range.2:80
11091 msgid ""
11092 "Wait upon write-out of all pages in the range after performing any write."
11093 msgstr ""
11094 "何らかの書き込み後に、指定された領域の全てのページの 書き出しが行われるのを待"
11095 "つ。"
11096
11097 #. type: Plain text
11098 #: build/C/man2/sync_file_range.2:84
11099 msgid "Specifying I<flags> as 0 is permitted, as a no-op."
11100 msgstr "I<flags> に 0 を指定した場合、何もしないことを表す。"
11101
11102 #. type: SS
11103 #: build/C/man2/sync_file_range.2:84
11104 #, no-wrap
11105 msgid "Warning"
11106 msgstr "警告"
11107
11108 #. type: Plain text
11109 #: build/C/man2/sync_file_range.2:100
11110 msgid ""
11111 "This system call is extremely dangerous and should not be used in portable "
11112 "programs.  None of these operations writes out the file's metadata.  "
11113 "Therefore, unless the application is strictly performing overwrites of "
11114 "already-instantiated disk blocks, there are no guarantees that the data will "
11115 "be available after a crash.  There is no user interface to know if a write "
11116 "is purely an overwrite.  On filesystems using copy-on-write semantics (e.g., "
11117 "I<btrfs>)  an overwrite of existing allocated blocks is impossible.  When "
11118 "writing into preallocated space, many filesystems also require calls into "
11119 "the block allocator, which this system call does not sync out to disk.  This "
11120 "system call does not flush disk write caches and thus does not provide any "
11121 "data integrity on systems with volatile disk write caches."
11122 msgstr ""
11123 "このシステムコールは非常に危険であり、 移植性が必要なプログラムで使用すべきで"
11124 "はない。 これらの操作ではどれもファイルのメタデータの書き出しを行わない。 し"
11125 "たがって、アプリケーションにより作成済みのディスクブロックの 上書きの実行が確"
11126 "実に行われない限り、クラッシュの後でもデータが 利用できる保証はない。 書き込"
11127 "みが上書きだけであるかを知るためのユーザインタフェースは存在しない。 "
11128 "(I<btrfs> などの) copy-on-write 動作を使ったファイルシステムでは、 既存の割り"
11129 "当て済みのブロックに対する上書き自体ができない。 前もって割り当てられた領域に"
11130 "書き込みを行う場合、 多くのファイルシステムでは block allocator への書き込み"
11131 "も必要となるが、 このシステムコールは block allocator のディスクへの同期を行"
11132 "わない。 このシステムコールはディスク書き込みキャッシュのフラッシュを 行わな"
11133 "いので、揮発性のディスク書き込みキャッシュを使ったシステムでは このシステム"
11134 "コールではデータの一貫性を確保できないことになる。"
11135
11136 #. type: SS
11137 #: build/C/man2/sync_file_range.2:100
11138 #, no-wrap
11139 msgid "Some details"
11140 msgstr "詳細"
11141
11142 #. type: Plain text
11143 #: build/C/man2/sync_file_range.2:108
11144 msgid ""
11145 "B<SYNC_FILE_RANGE_WAIT_BEFORE> and B<SYNC_FILE_RANGE_WAIT_AFTER> will detect "
11146 "any I/O errors or B<ENOSPC> conditions and will return these to the caller."
11147 msgstr ""
11148 "B<SYNC_FILE_RANGE_WAIT_BEFORE> と B<SYNC_FILE_RANGE_WAIT_AFTER> は I/O エラー"
11149 "や B<ENOSPC> 状態を検出し、呼び出し元にこれらの情報を返す。"
11150
11151 #. type: Plain text
11152 #: build/C/man2/sync_file_range.2:112
11153 msgid "Useful combinations of the I<flags> bits are:"
11154 msgstr "I<flags> の役に立つビットの組み合わせを以下に示す:"
11155
11156 #. type: TP
11157 #: build/C/man2/sync_file_range.2:112
11158 #, no-wrap
11159 msgid "B<SYNC_FILE_RANGE_WAIT_BEFORE | SYNC_FILE_RANGE_WRITE>"
11160 msgstr "B<SYNC_FILE_RANGE_WAIT_BEFORE | SYNC_FILE_RANGE_WRITE>"
11161
11162 #. type: Plain text
11163 #: build/C/man2/sync_file_range.2:120
11164 msgid ""
11165 "Ensures that all pages in the specified range which were dirty when "
11166 "B<sync_file_range>()  was called are placed under write-out.  This is a "
11167 "start-write-for-data-integrity operation."
11168 msgstr ""
11169 "指定された範囲内のページで、 B<sync_file_range>()  が呼び出された際に dirty "
11170 "であった全てのページが、 確実に書き出し対象となるようにする。 これは、start-"
11171 "write-for-data-integrity 操作 (データ完全性確保のための書き込み開始の操作) で"
11172 "ある。"
11173
11174 #. type: Plain text
11175 #: build/C/man2/sync_file_range.2:127
11176 msgid ""
11177 "Start write-out of all dirty pages in the specified range which are not "
11178 "presently under write-out.  This is an asynchronous flush-to-disk "
11179 "operation.  This is not suitable for data integrity operations."
11180 msgstr ""
11181 "指定された範囲内のページで、現在書き出し中でない全ての dirty ページの 書き出"
11182 "しを開始する。これは非同期のディスクへのフラッシュ (flush-to-disk)  操作であ"
11183 "る。データ完全性確保が必要な操作としては適切ではない。"
11184
11185 #. type: TP
11186 #: build/C/man2/sync_file_range.2:127
11187 #, no-wrap
11188 msgid "B<SYNC_FILE_RANGE_WAIT_BEFORE> (or B<SYNC_FILE_RANGE_WAIT_AFTER>)"
11189 msgstr "B<SYNC_FILE_RANGE_WAIT_BEFORE> (or B<SYNC_FILE_RANGE_WAIT_AFTER>)"
11190
11191 #. type: Plain text
11192 #: build/C/man2/sync_file_range.2:134
11193 msgid ""
11194 "Wait for completion of write-out of all pages in the specified range.  This "
11195 "can be used after an earlier B<SYNC_FILE_RANGE_WAIT_BEFORE | "
11196 "SYNC_FILE_RANGE_WRITE> operation to wait for completion of that operation, "
11197 "and obtain its result."
11198 msgstr ""
11199 "指定された範囲内の全てのページの書き出しの完了を待つ。 このフラグは、前に行わ"
11200 "れた操作 B<SYNC_FILE_RANGE_WAIT_BEFORE | SYNC_FILE_RANGE_WRITE> の後に使用で"
11201 "き、この操作の完了を待ち、結果を取得することができる。"
11202
11203 #. type: TP
11204 #: build/C/man2/sync_file_range.2:134
11205 #, no-wrap
11206 msgid "B<SYNC_FILE_RANGE_WAIT_BEFORE | SYNC_FILE_RANGE_WRITE | SYNC_FILE_RANGE_WAIT_AFTER>"
11207 msgstr "B<SYNC_FILE_RANGE_WAIT_BEFORE | SYNC_FILE_RANGE_WRITE | SYNC_FILE_RANGE_WAIT_AFTER>"
11208
11209 #. type: Plain text
11210 #: build/C/man2/sync_file_range.2:141
11211 msgid ""
11212 "This is a write-for-data-integrity operation that will ensure that all pages "
11213 "in the specified range which were dirty when B<sync_file_range>()  was "
11214 "called are committed to disk."
11215 msgstr ""
11216 "これは write-for-data-integrity 操作 (データ完全性確保のための書き込み) であ"
11217 "り、指定された範囲内の、 B<sync_file_range>()  が呼ばれた時点で dirty な全て"
11218 "のページが ディスクに格納されることが保証される。"
11219
11220 #. type: Plain text
11221 #: build/C/man2/sync_file_range.2:147
11222 msgid ""
11223 "On success, B<sync_file_range>()  returns 0; on failure -1 is returned and "
11224 "I<errno> is set to indicate the error."
11225 msgstr ""
11226 "成功の場合、 B<sync_file_range>()  は 0 を返す。失敗の場合、-1 を返し、 "
11227 "I<error> にエラーを示す値を設定する。"
11228
11229 #. type: Plain text
11230 #: build/C/man2/sync_file_range.2:152
11231 msgid "I<fd> is not a valid file descriptor."
11232 msgstr "I<fd> が有効なファイルディスクリプタではない。"
11233
11234 #. type: Plain text
11235 #: build/C/man2/sync_file_range.2:160
11236 msgid ""
11237 "I<flags> specifies an invalid bit; or I<offset> or I<nbytes> is invalid."
11238 msgstr ""
11239 "I<flags> に不正なビットが指定されている。または I<offset> か I<nbytes> が不正"
11240 "である。"
11241
11242 #. type: Plain text
11243 #: build/C/man2/sync_file_range.2:163
11244 msgid "I/O error."
11245 msgstr "I/O エラー。"
11246
11247 #. type: Plain text
11248 #: build/C/man2/sync_file_range.2:169
11249 msgid "Out of disk space."
11250 msgstr "ディスク領域不足である。"
11251
11252 #.  FIXME . (bug?) Actually, how can 'fd' refer to a symbolic link (S_ISLNK)?
11253 #.  (In user space at least) it isn't possible to obtain a file descriptor
11254 #.  for a symbolic link.
11255 #. type: Plain text
11256 #: build/C/man2/sync_file_range.2:177
11257 msgid ""
11258 "I<fd> refers to something other than a regular file, a block device, a "
11259 "directory, or a symbolic link."
11260 msgstr ""
11261 "I<fd> が、通常のファイル、ブロックデバイス、ディレクトリ、シンボリックリンク "
11262 "以外のものを指している。"
11263
11264 #. type: Plain text
11265 #: build/C/man2/sync_file_range.2:180
11266 msgid "B<sync_file_range>()  appeared on Linux in kernel 2.6.17."
11267 msgstr "B<sync_file_range>()  はカーネル 2.6.17 で Linux に登場した。"
11268
11269 #. type: Plain text
11270 #: build/C/man2/sync_file_range.2:183
11271 msgid ""
11272 "This system call is Linux-specific, and should be avoided in portable "
11273 "programs."
11274 msgstr ""
11275 "このシステムコールは Linux 独自であり、 移植性が必要なプログラムでは使用を避"
11276 "けるべきである。"
11277
11278 #. type: SS
11279 #: build/C/man2/sync_file_range.2:184
11280 #, no-wrap
11281 msgid "sync_file_range2()"
11282 msgstr ""
11283
11284 #.  See kernel commit edd5cd4a9424f22b0fa08bef5e299d41befd5622
11285 #. type: Plain text
11286 #: build/C/man2/sync_file_range.2:201
11287 msgid ""
11288 "Some architectures (e.g., PowerPC, ARM)  need 64-bit arguments to be aligned "
11289 "in a suitable pair of registers.  On such architectures, the call signature "
11290 "of B<sync_file_range>()  shown in the SYNOPSIS would force a register to be "
11291 "wasted as padding between the I<fd> and I<offset> arguments.  (See "
11292 "B<syscall>(2)  for details.)  Therefore, these architectures define a "
11293 "different system call that orders the arguments suitably:"
11294 msgstr ""
11295 "いくつかのアーキテクチャ (例えば、 PowerPC や ARM) では、 64 ビットの引き数は"
11296 "適切なレジスタの組に割り当てる必要がある。 このようなアーキテクチャでは、 "
11297 "「書式」に書かれている B<sync_file_range>() の呼び出しシグネチャーで、 引き"
11298 "数 I<fd> と I<offset> の間のパディング (詰めもの) でレジスタが一つ消費されて"
11299 "しまう (詳細は B<syscall>(2) 参照)。 そのため、 これらのアーキテクチャでは引"
11300 "き数が適切な順序になった別のシステムコールが定義されている。"
11301
11302 #. type: Plain text
11303 #: build/C/man2/sync_file_range.2:206
11304 #, no-wrap
11305 msgid ""
11306 "B<int sync_file_range2(int >I<fd>B<, unsigned int >I<flags>B<,>\n"
11307 "B<                     off64_t >I<offset>B<, off64_t >I<nbytes>B<);>\n"
11308 msgstr ""
11309 "B<int sync_file_range2(int >I<fd>B<, unsigned int >I<flags>B<,>\n"
11310 "B<                     off64_t >I<offset>B<, off64_t >I<nbytes>B<);>\n"
11311
11312 #. type: Plain text
11313 #: build/C/man2/sync_file_range.2:211
11314 msgid ""
11315 "The behavior of this system call is otherwise exactly the same as "
11316 "B<sync_file_range>()."
11317 msgstr ""
11318 "上記の点以外は、このシステムコールの動作は B<sync_file_range>() と\n"
11319 "全く同じである。このシステムコールに対するライブラリによるサポートは\n"
11320 "glibc では提供されていない。"
11321
11322 #. type: Plain text
11323 #: build/C/man2/sync_file_range.2:222
11324 msgid ""
11325 "A system call with this signature first appeared on the ARM architecture in "
11326 "Linux 2.6.20, with the name B<arm_sync_file_range>().  It was renamed in "
11327 "Linux 2.6.22, when the analogous system call was added for PowerPC.  On "
11328 "architectures where glibc support is provided, glibc transparently wraps "
11329 "B<sync_file_range2>()  under the name B<sync_file_range>()."
11330 msgstr ""
11331 "このバージョンのシステムコールは、Linux 2.6.20 で ARM アーキテクチャで\n"
11332 "初めて登場し、 B<arm_sync_file_range>() という名前であった。\n"
11333 "Linux 2.6.22 で、同様のシステムコールが PowerPC 用に追加された際に、\n"
11334 "システムコールの名前が変更された。\n"
11335 "glibc によるサポートが提供されているアーキテクチャでは、\n"
11336 "glibc のラッパー関数は B<sync_file_range>() という名前で\n"
11337 "B<sync_file_range2>() を適切に使用するようになっている。"
11338
11339 #. type: Plain text
11340 #: build/C/man2/sync_file_range.2:227
11341 msgid "B<fdatasync>(2), B<fsync>(2), B<msync>(2), B<sync>(2)"
11342 msgstr "B<fdatasync>(2), B<fsync>(2), B<msync>(2), B<sync>(2)"
11343
11344 #~ msgid "2012-05-04"
11345 #~ msgstr "2012-05-04"
11346
11347 #~ msgid "2012-03-29"
11348 #~ msgstr "2012-03-29"
11349
11350 #~ msgid "2012-04-30"
11351 #~ msgstr "2012-04-30"
11352
11353 #~ msgid "2014-04-06"
11354 #~ msgstr "2014-04-06"
11355
11356 #~ msgid "2013-02-12"
11357 #~ msgstr "2013-02-12"
11358
11359 #~ msgid "2014-05-21"
11360 #~ msgstr "2014-05-21"
11361
11362 #~ msgid ""
11363 #~ "System-wide limit on the number of shared memory pages.  Since Linux 2.4, "
11364 #~ "the default value for this limit is"
11365 #~ msgstr ""
11366 #~ "システム全体の共有メモリ・ページ数の上限値。 Linux 2.2 以降では、この上限"
11367 #~ "値のデフォルトは以下である。"
11368
11369 #~ msgid "2014-04-28"
11370 #~ msgstr "2014-04-28"
11371
11372 #~ msgid ""
11373 #~ "Segment low boundary address multiple.  Must be page aligned.  For the "
11374 #~ "current implementation, the B<SHMLBA> value is B<PAGE_SIZE>."
11375 #~ msgstr ""
11376 #~ "セグメントの境界アドレスの最小倍数。ページ境界に合ってなければならない。 "
11377 #~ "現在の実装では B<SHMLBA> の値は B<PAGE_SIZE> である。"
11378
11379 #~ msgid "2013-04-01"
11380 #~ msgstr "2013-04-01"
11381
11382 #~ msgid "2014-05-10"
11383 #~ msgstr "2014-05-10"
11384
11385 #~ msgid "2008-04-22"
11386 #~ msgstr "2008-04-22"
11387
11388 #~ msgid "I<mode_flags>"
11389 #~ msgstr "I<mode_flags>"
11390
11391 #~ msgid "B<IPC_CREAT | IPC_EXCL> was specified and the segment exists."
11392 #~ msgstr ""
11393 #~ "B<IPC_CREAT | IPC_EXCL> が指定されていたが、そのセグメントが既に存在する。"
11394
11395 #~ msgid ""
11396 #~ "Assuming a 4kB page size, this formula yields (since Linux 2.4) the value "
11397 #~ "2^20 (2,097,152)."
11398 #~ msgstr ""
11399 #~ "4kB ページサイズと仮定すると、 (Linux 2.4 以降では) この式の結果は 2^20 "
11400 #~ "(2,097,152) になる。"
11401
11402 #~ msgid ""
11403 #~ "Maximum size in bytes for a shared memory segment: policy dependent (on "
11404 #~ "Linux, this limit can be read and modified via I</proc/sys/kernel/"
11405 #~ "shmmax>)."
11406 #~ msgstr ""
11407 #~ "共有メモリ・セグメントのバイト単位の大きさの上限: 方針依存 (Linux では、こ"
11408 #~ "の上限値は I</proc/sys/kernel/shmmax> 経由で参照したり、変更したりでき"
11409 #~ "る)。"
11410
11411 #~ msgid ""
11412 #~ "System wide maximum number of shared memory segments: implementation "
11413 #~ "dependent (currently 4096, was 128 before Linux 2.3.99; on Linux, this "
11414 #~ "limit can be read and modified via I</proc/sys/kernel/shmmni>)."
11415 #~ msgstr ""
11416 #~ "システム全体の共有メモリーの数の上限: 実装依存 (現在は 4096。Linux 2.3.99 "
11417 #~ "より前では 128。 Linux では、この上限値は I</proc/sys/kernel/shmmni> 経由"
11418 #~ "で参照したり、変更したりできる)。"
11419
11420 #~ msgid ""
11421 #~ "A valid segment identifier, I<shmid>, is returned on success, -1 on error."
11422 #~ msgstr ""
11423 #~ "成功した場合、有効なセグメント識別子 I<shmid> が返される。エラーの場合、 "
11424 #~ "-1 が返される。"
11425
11426 #~ msgid ""
11427 #~ "The ARM architecture needs 64-bit arguments to be aligned in a suitable "
11428 #~ "pair of registers.  On this architecture, the call signature of "
11429 #~ "B<posix_fadvise>()  is flawed, since it forces a register to be wasted as "
11430 #~ "padding between the I<fd> and I<len> arguments.  Therefore, since Linux "
11431 #~ "2.6.14, ARM defines a different system call that orders the arguments "
11432 #~ "suitably:"
11433 #~ msgstr ""
11434 #~ "ARM アーキテクチャでは、64 ビットの引き数は適切なレジスタの組に割り当て\n"
11435 #~ "る必要がある。このアーキテクチャでは、B<posix_fadvise>() の呼び出し方に\n"
11436 #~ "は欠陥があり、それはこのシステムコールでは引き数 I<fd> と I<len> の間の\n"
11437 #~ "パディング (詰めもの) でレジスタが一つ消費されてしまうというものである。\n"
11438 #~ "そのため、Linux 2.6.14 以降では、ARM では引き数が適切な順序になった別の\n"
11439 #~ "システムコールが定義されている。"
11440
11441 #~ msgid ""
11442 #~ "The behavior of this system call is otherwise exactly the same as "
11443 #~ "B<posix_fadvise>().  No library support is provided for this system call "
11444 #~ "in glibc."
11445 #~ msgstr ""
11446 #~ "上記の点以外は、このシステムコールの動作は B<posix_fadvise>() と全く\n"
11447 #~ "同じである。このシステムコールに対するライブラリによるサポートは glibc\n"
11448 #~ "では提供されていない。"
11449
11450 #~ msgid ""
11451 #~ "The I<mode> is not supported by the file system containing the file "
11452 #~ "referred to by I<fd>."
11453 #~ msgstr ""
11454 #~ "I<fd> が参照するファイルを含むファイルシステムが I<mode> をサポートしてい"
11455 #~ "ない。"
11456
11457 #~ msgid ""
11458 #~ "The function B<mtrace>()  installs handlers for B<malloc>(3), "
11459 #~ "B<realloc>(3)  and B<free>(3).  The function B<muntrace>()  disables "
11460 #~ "these handlers."
11461 #~ msgstr ""
11462 #~ "関数 B<mtrace>()  は、 B<malloc>(3), B<realloc>(3), B<free>(3)  のハンドラ"
11463 #~ "を組み込む。 関数 B<muntrace>()  はこれらのハンドラを解除する。"
11464
11465 #~ msgid ""
11466 #~ "The environment variable B<MALLOC_TRACE> defines a file where "
11467 #~ "B<mtrace>()  writes its output.  This file must be writable to the user "
11468 #~ "or B<mtrace>()  will do nothing.  If the file is not empty it will be "
11469 #~ "truncated."
11470 #~ msgstr ""
11471 #~ "環境変数 B<MALLOC_TRACE> は B<mtrace>()  が出力を書き出すファイルを指定す"
11472 #~ "る。 ユーザが書き込み権限を持つファイルを指定しなければならない。 書き込み"
11473 #~ "権限がない場合、 B<mtrace>()  は何もしない。 ファイルが空でない場合、ファ"
11474 #~ "イルの元の内容を上書きする。"
11475
11476 #~ msgid ""
11477 #~ "The output of B<mtrace>()  will be ASCII but not in a friendly format.  "
11478 #~ "So glibc comes with a perl-script called mtrace to make sense of it."
11479 #~ msgstr ""
11480 #~ "B<mtrace>()  の出力は ASCII 形式だが、人が読みやすいフォーマットではな"
11481 #~ "い。 そこで、glibc には mtrace 出力を分かりやすい形式に変換する perl スク"
11482 #~ "リプトが付属している。"
11483
11484 #~ msgid ""
11485 #~ "This flag allocates and initializes to zero the disk space within the "
11486 #~ "range specified by I<offset> and I<len>.  After a successful call, "
11487 #~ "subsequent writes into this range are guaranteed not to fail because of "
11488 #~ "lack of disk space.  Preallocating zeroed blocks beyond the end of the "
11489 #~ "file is useful for optimizing append workloads.  Preallocating blocks "
11490 #~ "does not change the file size (as reported by B<stat>(2))  even if it is "
11491 #~ "less than I<offset>+I<len>."
11492 #~ msgstr ""
11493 #~ "このフラグは、 I<offset> と I<len> で指定された領域のディスク空間を割り当"
11494 #~ "て、その空間を 0 で初期化する。 呼び出しが成功すると、それに続いてこの領域"
11495 #~ "への書き込みが行われるが、 ディスク空間の不足による書き込み失敗が発生しな"
11496 #~ "いことが保証される。 ファイル末尾より後ろの領域について 0 で埋めたブロック"
11497 #~ "を前もって 割り当てておくことは、追記 (append) の作業負荷を最適化するのに "
11498 #~ "有用である。 ファイルサイズが I<offset>+I<len> よりも小さい場合であって"
11499 #~ "も、ブロックの前もっての割り当てにより (B<stat>(2)  が返す) ファイルサイズ"
11500 #~ "は変更されることはない。"