OSDN Git Service

LDP: Update POT and ja.po to LDP v3.68
[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: 2014-06-08 01:30+0900\n"
10 "PO-Revision-Date: 2014-06-07 01:31+0900\n"
11 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
12 "Language-Team: LANGUAGE <LL@li.org>\n"
13 "Language: \n"
14 "MIME-Version: 1.0\n"
15 "Content-Type: text/plain; charset=UTF-8\n"
16 "Content-Transfer-Encoding: 8bit\n"
17
18 #. type: TH
19 #: build/C/man2/alloc_hugepages.2:25
20 #, no-wrap
21 msgid "ALLOC_HUGEPAGES"
22 msgstr "ALLOC_HUGEPAGES"
23
24 #. type: TH
25 #: build/C/man2/alloc_hugepages.2:25
26 #, no-wrap
27 msgid "2007-05-31"
28 msgstr "2007-05-31"
29
30 #. type: TH
31 #: build/C/man2/alloc_hugepages.2:25 build/C/man2/cacheflush.2:25
32 #: build/C/man2/fallocate.2:11 build/C/man2/madvise.2:35
33 #: build/C/man3/mallinfo.3:26 build/C/man3/malloc_stats.3:26
34 #: build/C/man3/malloc_trim.3:26 build/C/man3/mallopt.3:26
35 #: build/C/man2/mlock.2:26 build/C/man2/mmap.2:40 build/C/man2/mmap2.2:29
36 #: build/C/man2/mprotect.2:38 build/C/man2/mremap.2:30 build/C/man2/msync.2:25
37 #: build/C/man2/posix_fadvise.2:28 build/C/man2/readahead.2:28
38 #: build/C/man2/remap_file_pages.2:28 build/C/man3/shm_open.3:26
39 #: build/C/man7/shm_overview.7:27 build/C/man2/shmctl.2:45
40 #: build/C/man2/shmget.2:38 build/C/man2/shmop.2:41
41 #: build/C/man2/subpage_prot.2:30 build/C/man2/sync_file_range.2:30
42 #, no-wrap
43 msgid "Linux"
44 msgstr "Linux"
45
46 #. type: TH
47 #: build/C/man2/alloc_hugepages.2:25 build/C/man3/alloca.3:43
48 #: build/C/man2/cacheflush.2:25 build/C/man2/fallocate.2:11
49 #: build/C/man2/madvise.2:35 build/C/man3/mallinfo.3:26
50 #: build/C/man3/malloc_get_state.3:25 build/C/man3/malloc_hook.3:10
51 #: build/C/man3/malloc_info.3:25 build/C/man3/malloc_stats.3:26
52 #: build/C/man3/malloc_trim.3:26 build/C/man3/malloc_usable_size.3:25
53 #: build/C/man3/mallopt.3:26 build/C/man3/mcheck.3:25 build/C/man2/mlock.2:26
54 #: build/C/man2/mmap.2:40 build/C/man2/mmap2.2:29 build/C/man2/mprotect.2:38
55 #: build/C/man2/mremap.2:30 build/C/man2/msync.2:25 build/C/man3/mtrace.3:25
56 #: build/C/man2/posix_fadvise.2:28 build/C/man3/posix_fallocate.3:25
57 #: build/C/man3/posix_memalign.3:29 build/C/man2/readahead.2:28
58 #: build/C/man2/remap_file_pages.2:28 build/C/man3/shm_open.3:26
59 #: build/C/man7/shm_overview.7:27 build/C/man2/shmctl.2:45
60 #: build/C/man2/shmget.2:38 build/C/man2/shmop.2:41
61 #: build/C/man2/subpage_prot.2:30 build/C/man2/sync_file_range.2:30
62 #, no-wrap
63 msgid "Linux Programmer's Manual"
64 msgstr "Linux Programmer's Manual"
65
66 #. type: SH
67 #: build/C/man2/alloc_hugepages.2:26 build/C/man3/alloca.3:44
68 #: build/C/man2/cacheflush.2:26 build/C/man2/fallocate.2:12
69 #: build/C/man2/madvise.2:36 build/C/man3/mallinfo.3:27
70 #: build/C/man3/malloc_get_state.3:26 build/C/man3/malloc_hook.3:11
71 #: build/C/man3/malloc_info.3:26 build/C/man3/malloc_stats.3:27
72 #: build/C/man3/malloc_trim.3:27 build/C/man3/malloc_usable_size.3:26
73 #: build/C/man3/mallopt.3:27 build/C/man3/mcheck.3:26 build/C/man2/mlock.2:27
74 #: build/C/man2/mmap.2:41 build/C/man2/mmap2.2:30 build/C/man2/mprotect.2:39
75 #: build/C/man2/mremap.2:31 build/C/man2/msync.2:26 build/C/man3/mtrace.3:26
76 #: build/C/man2/posix_fadvise.2:29 build/C/man3/posix_fallocate.3:26
77 #: build/C/man3/posix_memalign.3:30 build/C/man2/readahead.2:29
78 #: build/C/man2/remap_file_pages.2:29 build/C/man3/shm_open.3:27
79 #: build/C/man7/shm_overview.7:28 build/C/man2/shmctl.2:46
80 #: build/C/man2/shmget.2:39 build/C/man2/shmop.2:42
81 #: build/C/man2/subpage_prot.2:31 build/C/man2/sync_file_range.2:31
82 #, no-wrap
83 msgid "NAME"
84 msgstr "名前"
85
86 #. type: Plain text
87 #: build/C/man2/alloc_hugepages.2:28
88 msgid "alloc_hugepages, free_hugepages - allocate or free huge pages"
89 msgstr ""
90 "alloc_hugepages, free_hugepages - 大きなサイズのページの割り当てと解放を行う"
91
92 #. type: SH
93 #: build/C/man2/alloc_hugepages.2:28 build/C/man3/alloca.3:46
94 #: build/C/man2/cacheflush.2:28 build/C/man2/fallocate.2:14
95 #: build/C/man2/madvise.2:38 build/C/man3/mallinfo.3:29
96 #: build/C/man3/malloc_get_state.3:28 build/C/man3/malloc_hook.3:15
97 #: build/C/man3/malloc_info.3:28 build/C/man3/malloc_stats.3:29
98 #: build/C/man3/malloc_trim.3:29 build/C/man3/malloc_usable_size.3:28
99 #: build/C/man3/mallopt.3:29 build/C/man3/mcheck.3:28 build/C/man2/mlock.2:29
100 #: build/C/man2/mmap.2:43 build/C/man2/mmap2.2:32 build/C/man2/mprotect.2:41
101 #: build/C/man2/mremap.2:33 build/C/man2/msync.2:28 build/C/man3/mtrace.3:28
102 #: build/C/man2/posix_fadvise.2:31 build/C/man3/posix_fallocate.3:28
103 #: build/C/man3/posix_memalign.3:32 build/C/man2/readahead.2:31
104 #: build/C/man2/remap_file_pages.2:31 build/C/man3/shm_open.3:29
105 #: build/C/man2/shmctl.2:48 build/C/man2/shmget.2:41 build/C/man2/shmop.2:44
106 #: build/C/man2/subpage_prot.2:33 build/C/man2/sync_file_range.2:33
107 #, no-wrap
108 msgid "SYNOPSIS"
109 msgstr "書式"
110
111 #.  asmlinkage unsigned long sys_alloc_hugepages(int key, unsigned long addr,
112 #.  unsigned long len, int prot, int flag);
113 #. type: Plain text
114 #: build/C/man2/alloc_hugepages.2:34
115 #, no-wrap
116 msgid ""
117 "B<void *alloc_hugepages(int >I<key>B<, void *>I<addr>B<, size_t >I<len>B<,>\n"
118 "B<                      int >I<prot>B<, int >I<flag>B<);>\n"
119 msgstr ""
120 "B<void *alloc_hugepages(int >I<key>B<, void *>I<addr>B<, size_t >I<len>B<,>\n"
121 "B<                      int >I<prot>B<, int >I<flag>B<);>\n"
122
123 #.  asmlinkage int sys_free_hugepages(unsigned long addr);
124 #. type: Plain text
125 #: build/C/man2/alloc_hugepages.2:37
126 #, no-wrap
127 msgid "B<int free_hugepages(void *>I<addr>B<);>\n"
128 msgstr "B<int free_hugepages(void *>I<addr>B<);>\n"
129
130 #. type: SH
131 #: build/C/man2/alloc_hugepages.2:38 build/C/man3/alloca.3:50
132 #: build/C/man2/cacheflush.2:34 build/C/man2/fallocate.2:22
133 #: build/C/man2/madvise.2:50 build/C/man3/mallinfo.3:33
134 #: build/C/man3/malloc_get_state.3:36 build/C/man3/malloc_hook.3:33
135 #: build/C/man3/malloc_info.3:34 build/C/man3/malloc_stats.3:33
136 #: build/C/man3/malloc_trim.3:33 build/C/man3/malloc_usable_size.3:32
137 #: build/C/man3/mallopt.3:33 build/C/man3/mcheck.3:40 build/C/man2/mlock.2:39
138 #: build/C/man2/mmap.2:54 build/C/man2/mmap2.2:39 build/C/man2/mprotect.2:47
139 #: build/C/man2/mremap.2:42 build/C/man2/msync.2:32 build/C/man3/mtrace.3:34
140 #: build/C/man2/posix_fadvise.2:50 build/C/man3/posix_fallocate.3:46
141 #: build/C/man3/posix_memalign.3:84 build/C/man2/readahead.2:38
142 #: build/C/man2/remap_file_pages.2:39 build/C/man3/shm_open.3:41
143 #: build/C/man7/shm_overview.7:30 build/C/man2/shmctl.2:56
144 #: build/C/man2/shmget.2:49 build/C/man2/shmop.2:53
145 #: build/C/man2/subpage_prot.2:41 build/C/man2/sync_file_range.2:41
146 #, no-wrap
147 msgid "DESCRIPTION"
148 msgstr "説明"
149
150 #. type: Plain text
151 #: build/C/man2/alloc_hugepages.2:49
152 msgid ""
153 "The system calls B<alloc_hugepages>()  and B<free_hugepages>()  were "
154 "introduced in Linux 2.5.36 and removed again in 2.5.54.  They existed only "
155 "on i386 and ia64 (when built with B<CONFIG_HUGETLB_PAGE>).  In Linux 2.4.20, "
156 "the syscall numbers exist, but the calls fail with the error B<ENOSYS>."
157 msgstr ""
158 "システムコール B<alloc_hugepages>()  と B<free_hugepages>()  は Linux 2.5.36 "
159 "で導入され、2.5.54 で再び削除された。 これらのシステムコールは i386 と ia64 "
160 "のみで (かつ B<CONFIG_HUGETLB_PAGE> を指定してビルドされた場合に) 存在する。 "
161 "Linux 2.4.20 では syscall 番号が存在するが、 呼び出すとエラー B<ENOSYS> で失"
162 "敗する。"
163
164 #. type: Plain text
165 #: build/C/man2/alloc_hugepages.2:57
166 msgid ""
167 "On i386 the memory management hardware knows about ordinary pages (4 KiB)  "
168 "and huge pages (2 or 4 MiB).  Similarly ia64 knows about huge pages of "
169 "several sizes.  These system calls serve to map huge pages into the "
170 "process's memory or to free them again.  Huge pages are locked into memory, "
171 "and are not swapped."
172 msgstr ""
173 "i386 では、メモリ管理ハードウェアは通常のページ (4 KiB) と 大きなサイズのペー"
174 "ジ (以下、ヒュージページ; 2MiB または 4 MiB) を 扱うことができる。 同様に、"
175 "ia64 もいくつかのサイズのヒュージページを扱うことができる。 これらのシステム"
176 "コールは、ヒュージページをプロセスのメモリにマップしたり、 再び解放したりす"
177 "る。 ヒュージページはメモリ内にロックされ、スワップされない。"
178
179 #. type: Plain text
180 #: build/C/man2/alloc_hugepages.2:66
181 msgid ""
182 "The I<key> argument is an identifier.  When zero the pages are private, and "
183 "not inherited by children.  When positive the pages are shared with other "
184 "applications using the same I<key>, and inherited by child processes."
185 msgstr ""
186 "I<key> 引き数は識別子である。 0 の場合、ページは非公開になり、子プロセスに継"
187 "承されない。 正の場合、ページは同じ I<key> を使う他のアプリケーションと共有さ"
188 "れ、子プロセスに継承される。"
189
190 #. type: Plain text
191 #: build/C/man2/alloc_hugepages.2:81
192 msgid ""
193 "The I<addr> argument of B<free_hugepages>()  tells which page is being "
194 "freed: it was the return value of a call to B<alloc_hugepages>().  (The "
195 "memory is first actually freed when all users have released it.)  The "
196 "I<addr> argument of B<alloc_hugepages>()  is a hint, that the kernel may or "
197 "may not follow.  Addresses must be properly aligned."
198 msgstr ""
199 "B<free_hugepages>()  の I<addr> 引き数は、どのページを解放するかを指定する: "
200 "I<addr> は B<alloc_hugepages>()  の呼び出しの返り値である (全てのユーザがメモ"
201 "リを解放したときに、 そのメモリは初めて実際に解放される)。 "
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:78
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:124 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:85
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:131 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:48
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:113 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:103
334 #: build/C/man3/posix_memalign.3:182 build/C/man2/readahead.2:88
335 #: build/C/man2/remap_file_pages.2:153 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:50 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:122 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:157
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:247 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:64
399 #: build/C/man3/mallopt.3:580 build/C/man3/mcheck.3:208
400 #: build/C/man2/mlock.2:343 build/C/man2/mmap.2:735 build/C/man2/mmap2.2:101
401 #: build/C/man2/mprotect.2:229 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:133
404 #: build/C/man3/posix_memalign.3:277 build/C/man2/readahead.2:113
405 #: build/C/man2/remap_file_pages.2:175 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:350 build/C/man2/shmop.2:305
408 #: build/C/man2/subpage_prot.2:134 build/C/man2/sync_file_range.2:226
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:72
420 #: build/C/man3/mallopt.3:588 build/C/man3/mcheck.3:216
421 #: build/C/man2/mlock.2:351 build/C/man2/mmap.2:743 build/C/man2/mmap2.2:109
422 #: build/C/man2/mprotect.2:237 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:141
425 #: build/C/man3/posix_memalign.3:285 build/C/man2/readahead.2:121
426 #: build/C/man2/remap_file_pages.2:183 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:358 build/C/man2/shmop.2:313
429 #: build/C/man2/subpage_prot.2:142 build/C/man2/sync_file_range.2:234
430 #, fuzzy
431 #| msgid ""
432 #| "This page is part of release 3.67 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.68 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.67 の一部\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
507 #, no-wrap
508 msgid "ATTRIBUTES"
509 msgstr "属性"
510
511 #. type: SS
512 #: build/C/man3/alloca.3:66
513 #, no-wrap
514 msgid "Multithreading (see pthreads(7))"
515 msgstr "マルチスレッディング (pthreads(7) 参照)"
516
517 #. type: Plain text
518 #: build/C/man3/alloca.3:70
519 msgid "The B<alloca>()  function is thread-safe."
520 msgstr "B<alloca>() 関数はスレッドセーフである。"
521
522 #. type: Plain text
523 #: build/C/man3/alloca.3:72
524 msgid "This function is not in POSIX.1-2001."
525 msgstr "この関数は POSIX.1-2001 にはない。"
526
527 #. type: Plain text
528 #: build/C/man3/alloca.3:78
529 msgid ""
530 "There is evidence that the B<alloca>()  function appeared in 32V, PWB, "
531 "PWB.2, 3BSD, and 4BSD.  There is a man page for it in 4.3BSD.  Linux uses "
532 "the GNU version."
533 msgstr ""
534 "32V, PWB, PWB.2, 3BSD, 4BSD に B<alloca>()  関数が登場した証拠がある。 "
535 "4.3BSD には、マニュアルページがある。 Linux は、GNU 版を使っている。 この関数"
536 "は POSIX.1-2001 にはない。"
537
538 #. type: Plain text
539 #: build/C/man3/alloca.3:93
540 msgid ""
541 "The B<alloca>()  function is machine- and compiler-dependent.  For certain "
542 "applications, its use can improve efficiency compared to the use of "
543 "B<malloc>(3)  plus B<free>(3).  In certain cases, it can also simplify "
544 "memory deallocation in applications that use B<longjmp>(3)  or "
545 "B<siglongjmp>(3).  Otherwise, its use is discouraged."
546 msgstr ""
547 "B<alloca>()  関数は、機種とコンパイラに依存する。 特定のアプリケーションで"
548 "は、この関数を使うと B<malloc>(3)  と B<free>(3)  を組み合わせて使った場合に"
549 "比べて効率を改善することができる。 特定の場合では、この関数を使うことで、 "
550 "B<longjmp>(3)  や B<siglongjmp>(3)  を使うアプリケーションでのメモリの開放を"
551 "簡単にすることができる。 それ以外の場合では、この関数の使用は推奨されない。"
552
553 #. type: Plain text
554 #: build/C/man3/alloca.3:102
555 msgid ""
556 "Because the space allocated by B<alloca>()  is allocated within the stack "
557 "frame, that space is automatically freed if the function return is jumped "
558 "over by a call to B<longjmp>(3)  or B<siglongjmp>(3)."
559 msgstr ""
560 "B<alloca>()  により割り当てられる空間はスタックフレームから割り当てらるの"
561 "で、 関数の戻り先が B<longjmp>(3)  や B<siglongjmp>(3)  の呼び出しによりジャ"
562 "ンプした場合には、 割り当てられた空間は自動的に解放される。"
563
564 #. type: Plain text
565 #: build/C/man3/alloca.3:107
566 msgid "Do not attempt to B<free>(3)  space allocated by B<alloca>()!"
567 msgstr ""
568 "B<alloca>()  で割り当てられた空間を B<free>(3)  しようとすることのないよう"
569 "に!"
570
571 #. type: SS
572 #: build/C/man3/alloca.3:107
573 #, no-wrap
574 msgid "Notes on the GNU version"
575 msgstr "GNU 版についての注意"
576
577 #. type: Plain text
578 #: build/C/man3/alloca.3:129
579 msgid ""
580 "Normally, B<gcc>(1)  translates calls to B<alloca>()  with inlined code.  "
581 "This is not done when either the I<-ansi>, I<-std=c89>, I<-std=c99>, or the "
582 "I<-std=c11> option is given B<and> the header I<E<lt>alloca.hE<gt>> is not "
583 "included.  Otherwise, (without an -ansi or -std=c* option) the glibc version "
584 "of I<E<lt>stdlib.hE<gt>> includes I<E<lt>alloca.hE<gt>> and that contains "
585 "the lines:"
586 msgstr ""
587 "通常 B<gcc>(1) は B<alloca>()  の呼び出しをインラインコードに変換する。 I<-"
588 "ansi>, I<-std=c89>, I<-std=c99>, I<-std=c11> のいずれかのオプションが指定さ"
589 "れ、B<かつ> I<E<lt>alloca.hE<gt>> がインクルードされていない場合、 この変換は"
590 "行われない。 それ以外の場合 (-ansi オプションも -std=c* オプションも指定され"
591 "ない場合) には、 glibc 版の I<E<lt>stdlib.hE<gt>> は I<E<lt>alloca.hE<gt>> を"
592 "インクルードするが、このファイルには以下の行が含まれており、"
593
594 #. type: Plain text
595 #: build/C/man3/alloca.3:134
596 #, no-wrap
597 msgid ""
598 "    #ifdef  __GNUC__\n"
599 "    #define alloca(size)   __builtin_alloca (size)\n"
600 "    #endif\n"
601 msgstr ""
602 "    #ifdef  __GNUC__\n"
603 "    #define alloca(size)   __builtin_alloca (size)\n"
604 "    #endif\n"
605
606 #. type: Plain text
607 #: build/C/man3/alloca.3:137
608 msgid "with messy consequences if one has a private version of this function."
609 msgstr "独自版の __builtin_alloca (size) 関数がある場合、厄介な結果になる。"
610
611 #. type: Plain text
612 #: build/C/man3/alloca.3:141
613 msgid ""
614 "The fact that the code is inlined means that it is impossible to take the "
615 "address of this function, or to change its behavior by linking with a "
616 "different library."
617 msgstr ""
618 "このコードはインライン化されているので、 この関数のアドレスを取得したり、 他"
619 "のライブラリをリンクして動作を変更することはできない。"
620
621 #. type: Plain text
622 #: build/C/man3/alloca.3:145
623 msgid ""
624 "The inlined code often consists of a single instruction adjusting the stack "
625 "pointer, and does not check for stack overflow.  Thus, there is no NULL "
626 "error return."
627 msgstr ""
628 "通常このインラインコードはスタックポインタを移動する 1 つの命令 "
629 "(instruction) から構成されており、 スタックオーバーフローをチェックしない。 "
630 "よって NULL エラーが返されることはない。"
631
632 #. type: SH
633 #: build/C/man3/alloca.3:145 build/C/man2/cacheflush.2:82
634 #: build/C/man3/mallinfo.3:114 build/C/man3/mallopt.3:406
635 #: build/C/man2/mlock.2:311 build/C/man2/mmap.2:585 build/C/man3/mtrace.3:102
636 #: build/C/man2/posix_fadvise.2:186 build/C/man2/readahead.2:98
637 #: build/C/man2/shmget.2:336
638 #, no-wrap
639 msgid "BUGS"
640 msgstr "バグ"
641
642 #. type: Plain text
643 #: build/C/man3/alloca.3:150
644 msgid ""
645 "There is no error indication if the stack frame cannot be extended.  "
646 "(However, after a failed allocation, the program is likely to receive a "
647 "B<SIGSEGV> signal if it attempts to access the unallocated space.)"
648 msgstr ""
649 "スタックフレームが拡張できなかった場合、エラー通知は行われない。 (しかしなが"
650 "ら、割り当てに失敗した後で、プログラムが割り当てられなかった 空間にアクセスし"
651 "ようとした場合に B<SIGSEGV> シグナルを受信することだろう。)"
652
653 #. type: Plain text
654 #: build/C/man3/alloca.3:158
655 msgid ""
656 "On many systems B<alloca>()  cannot be used inside the list of arguments of "
657 "a function call, because the stack space reserved by B<alloca>()  would "
658 "appear on the stack in the middle of the space for the function arguments."
659 msgstr ""
660 "多くのシステムにおいて、関数コールの引き数のリスト内では B<alloca>()  が使え"
661 "ない。 これは、 B<alloca>()  によって予約されるスタック領域が、 関数引き数に"
662 "使われるスタック領域の中に現れてしまうためである。"
663
664 #. type: SH
665 #: build/C/man3/alloca.3:158 build/C/man2/fallocate.2:373
666 #: build/C/man2/madvise.2:372 build/C/man3/mallinfo.3:270
667 #: build/C/man3/malloc_get_state.3:111 build/C/man3/malloc_hook.3:137
668 #: build/C/man3/malloc_info.3:256 build/C/man3/malloc_stats.3:61
669 #: build/C/man3/malloc_trim.3:78 build/C/man3/malloc_usable_size.3:62
670 #: build/C/man3/mallopt.3:566 build/C/man3/mcheck.3:204
671 #: build/C/man2/mlock.2:336 build/C/man2/mmap.2:710 build/C/man2/mmap2.2:95
672 #: build/C/man2/mprotect.2:226 build/C/man2/mremap.2:199
673 #: build/C/man2/msync.2:147 build/C/man3/mtrace.3:167
674 #: build/C/man2/posix_fadvise.2:191 build/C/man3/posix_fallocate.3:128
675 #: build/C/man3/posix_memalign.3:272 build/C/man2/readahead.2:107
676 #: build/C/man2/remap_file_pages.2:168 build/C/man3/shm_open.3:271
677 #: build/C/man7/shm_overview.7:114 build/C/man2/shmctl.2:428
678 #: build/C/man2/shmget.2:342 build/C/man2/shmop.2:297
679 #: build/C/man2/subpage_prot.2:128 build/C/man2/sync_file_range.2:221
680 #, no-wrap
681 msgid "SEE ALSO"
682 msgstr "関連項目"
683
684 #. type: Plain text
685 #: build/C/man3/alloca.3:162
686 msgid "B<brk>(2), B<longjmp>(3), B<malloc>(3)"
687 msgstr "B<brk>(2), B<longjmp>(3), B<malloc>(3)"
688
689 #. type: TH
690 #: build/C/man2/cacheflush.2:25
691 #, no-wrap
692 msgid "CACHEFLUSH"
693 msgstr "CACHEFLUSH"
694
695 #. type: TH
696 #: build/C/man2/cacheflush.2:25
697 #, no-wrap
698 msgid "2007-05-26"
699 msgstr "2007-05-26"
700
701 #. type: Plain text
702 #: build/C/man2/cacheflush.2:28
703 msgid "cacheflush - flush contents of instruction and/or data cache"
704 msgstr "cacheflush - 命令キャッシュやデータキャッシュの内容をフラッシュする"
705
706 #. type: Plain text
707 #: build/C/man2/cacheflush.2:31
708 #, no-wrap
709 msgid "B<#include E<lt>asm/cachectl.hE<gt>>\n"
710 msgstr "B<#include E<lt>asm/cachectl.hE<gt>>\n"
711
712 #. type: Plain text
713 #: build/C/man2/cacheflush.2:33
714 #, no-wrap
715 msgid "B<int cacheflush(char *>I<addr>B<, int >I<nbytes>B<, int >I<cache>B<);>\n"
716 msgstr "B<int cacheflush(char *>I<addr>B<, int >I<nbytes>B<, int >I<cache>B<);>\n"
717
718 #. type: Plain text
719 #: build/C/man2/cacheflush.2:43
720 msgid ""
721 "B<cacheflush>()  flushes the contents of the indicated cache(s) for the user "
722 "addresses in the range I<addr> to I<(addr+nbytes-1)>.  I<cache> may be one "
723 "of:"
724 msgstr ""
725 "B<cacheflush>()  は I<addr> から I<(addr+nbytes-1)> の範囲のユーザアドレスに"
726 "対応する 指定されたキャッシュをフラッシュする。 I<cache> には以下のいずれかを"
727 "指定する:"
728
729 #. type: TP
730 #: build/C/man2/cacheflush.2:43
731 #, no-wrap
732 msgid "B<ICACHE>"
733 msgstr "B<ICACHE>"
734
735 #. type: Plain text
736 #: build/C/man2/cacheflush.2:46
737 msgid "Flush the instruction cache."
738 msgstr "命令 (instruction) キャッシュをフラッシュする。"
739
740 #. type: TP
741 #: build/C/man2/cacheflush.2:46
742 #, no-wrap
743 msgid "B<DCACHE>"
744 msgstr "B<DCACHE>"
745
746 #. type: Plain text
747 #: build/C/man2/cacheflush.2:49
748 msgid "Write back to memory and invalidate the affected valid cache lines."
749 msgstr "変更があったキャッシュラインをメモリに書き戻し、無効にする。"
750
751 #. type: TP
752 #: build/C/man2/cacheflush.2:49
753 #, no-wrap
754 msgid "B<BCACHE>"
755 msgstr "B<BCACHE>"
756
757 #. type: Plain text
758 #: build/C/man2/cacheflush.2:53
759 msgid "Same as B<(ICACHE|DCACHE)>."
760 msgstr "B<(ICACHE|DCACHE)> と同じ。"
761
762 #. type: Plain text
763 #: build/C/man2/cacheflush.2:59
764 msgid ""
765 "B<cacheflush>()  returns 0 on success or -1 on error.  If errors are "
766 "detected, I<errno> will indicate the error."
767 msgstr ""
768 "B<cacheflush>()  は成功した場合は 0 を、失敗した場合は -1 を返す。エラーが検"
769 "出された場合は I<errno> にエラーが指示される。"
770
771 #. type: TP
772 #: build/C/man2/cacheflush.2:60 build/C/man2/mmap2.2:62
773 #: build/C/man2/mremap.2:142 build/C/man2/shmctl.2:314
774 #: build/C/man2/subpage_prot.2:72
775 #, no-wrap
776 msgid "B<EFAULT>"
777 msgstr "B<EFAULT>"
778
779 #. type: Plain text
780 #: build/C/man2/cacheflush.2:67
781 msgid ""
782 "Some or all of the address range I<addr> to I<(addr+nbytes-1)> is not "
783 "accessible."
784 msgstr ""
785 "I<addr> から I<(addr+nbytes-1)> の範囲のアドレスの全てまたは一部が アクセス可"
786 "能ではない。"
787
788 #. type: TP
789 #: build/C/man2/cacheflush.2:67 build/C/man2/fallocate.2:247
790 #: build/C/man2/fallocate.2:259 build/C/man2/fallocate.2:269
791 #: build/C/man2/fallocate.2:279 build/C/man2/fallocate.2:287
792 #: build/C/man2/madvise.2:282 build/C/man3/malloc_info.3:56
793 #: build/C/man2/mlock.2:157 build/C/man2/mlock.2:164 build/C/man2/mlock.2:176
794 #: build/C/man2/mmap.2:421 build/C/man2/mmap.2:429 build/C/man2/mmap.2:434
795 #: build/C/man2/mmap2.2:65 build/C/man2/mprotect.2:95
796 #: build/C/man2/mremap.2:151 build/C/man2/msync.2:80
797 #: build/C/man2/posix_fadvise.2:94 build/C/man3/posix_fallocate.3:81
798 #: build/C/man3/posix_memalign.3:158 build/C/man2/readahead.2:77
799 #: build/C/man2/remap_file_pages.2:132 build/C/man2/remap_file_pages.2:139
800 #: build/C/man3/shm_open.3:213 build/C/man2/shmctl.2:328
801 #: build/C/man2/shmget.2:207 build/C/man2/shmget.2:215
802 #: build/C/man2/shmop.2:197 build/C/man2/shmop.2:220
803 #: build/C/man2/subpage_prot.2:77 build/C/man2/sync_file_range.2:152
804 #, no-wrap
805 msgid "B<EINVAL>"
806 msgstr "B<EINVAL>"
807
808 #. type: Plain text
809 #: build/C/man2/cacheflush.2:75
810 msgid "I<cache> is not one of B<ICACHE>, B<DCACHE>, or B<BCACHE>."
811 msgstr "I<cache> パラメータが B<ICACHE>, B<DCACHE>, B<BCACHE> のどれでもない。"
812
813 #.  FIXME This system call was only on MIPS back in 1.2 days, but
814 #.  by now it is on a number of other architectures (but not i386).
815 #.  Investigate the details and update this page.
816 #.  Irix 6.5 appears to have a cacheflush() syscall -- mtk
817 #. type: Plain text
818 #: build/C/man2/cacheflush.2:82
819 msgid ""
820 "This Linux-specific system call is available only on MIPS-based systems.  It "
821 "should not be used in programs intended to be portable."
822 msgstr ""
823 "この Linux 特有のシステムコールは MIPS ベースのシステムでのみ有効である。 移"
824 "植を意図したプログラムで使用すべきではない。"
825
826 #. type: Plain text
827 #: build/C/man2/cacheflush.2:89
828 msgid ""
829 "The current implementation ignores the I<addr> and I<nbytes> arguments.  "
830 "Therefore, the whole cache is always flushed."
831 msgstr ""
832 "現在の実装では、引き数 I<addr> と I<nbytes> は無視される。そのため、 常に全て"
833 "のキャッシュがフラッシュされる。"
834
835 #. type: TH
836 #: build/C/man2/fallocate.2:11
837 #, no-wrap
838 msgid "FALLOCATE"
839 msgstr "FALLOCATE"
840
841 #. type: TH
842 #: build/C/man2/fallocate.2:11
843 #, no-wrap
844 msgid "2014-05-08"
845 msgstr "2014-05-08"
846
847 #. type: Plain text
848 #: build/C/man2/fallocate.2:14
849 msgid "fallocate - manipulate file space"
850 msgstr "fallocate - ファイル空間の操作"
851
852 #. type: Plain text
853 #: build/C/man2/fallocate.2:18 build/C/man2/readahead.2:35
854 #, no-wrap
855 msgid ""
856 "B<#define _GNU_SOURCE>             /* See feature_test_macros(7) */\n"
857 "B<#include E<lt>fcntl.hE<gt>>\n"
858 msgstr ""
859 "B<#define _GNU_SOURCE>             /* feature_test_macros(7) 参照 */\n"
860 "B<#include E<lt>fcntl.hE<gt>>\n"
861
862 #. type: Plain text
863 #: build/C/man2/fallocate.2:21
864 #, no-wrap
865 msgid "B<int fallocate(int >I<fd>B<, int >I<mode>B<, off_t >I<offset>B<, off_t >I<len>B<);>\n"
866 msgstr "B<int fallocate(int >I<fd>B<, int >I<mode>B<, off_t >I<offset>B<, off_t >I<len>B<);>\n"
867
868 #. type: Plain text
869 #: build/C/man2/fallocate.2:27
870 msgid ""
871 "This is a nonportable, Linux-specific system call.  For the portable, "
872 "POSIX.1-specified method of ensuring that space is allocated for a file, see "
873 "B<posix_fallocate>(3)."
874 msgstr ""
875 "このシステムコールは、移植性のない、Linux 固有のシステムコールである。 移植性"
876 "が必要な場合は、ファイルに対してディスク空間を確実に確保するために、 POSIX.1 "
877 "で規定された方法である B<posix_fallocate>(3)  を使うこと。"
878
879 #. type: Plain text
880 #: build/C/man2/fallocate.2:37
881 msgid ""
882 "B<fallocate>()  allows the caller to directly manipulate the allocated disk "
883 "space for the file referred to by I<fd> for the byte range starting at "
884 "I<offset> and continuing for I<len> bytes."
885 msgstr ""
886 "B<fallocate>()  を使うと、 I<fd> が参照するファイルに割り当てられたディスク空"
887 "間を直接操作できる。 操作対象は、 I<offset> から始まる長さ I<len> バイトの領"
888 "域である。"
889
890 #. type: Plain text
891 #: build/C/man2/fallocate.2:42
892 msgid ""
893 "The I<mode> argument determines the operation to be performed on the given "
894 "range.  Details of the supported operations are given in the subsections "
895 "below."
896 msgstr ""
897 "I<mode> 引き数は、指定された領域に対して実行する操作を指定する。\n"
898 "サポートされている操作の詳細は以下のサブセクションで説明する。"
899
900 #. type: SS
901 #: build/C/man2/fallocate.2:42
902 #, no-wrap
903 msgid "Allocating disk space"
904 msgstr "ディスク領域の割り当て"
905
906 #. type: Plain text
907 #: build/C/man2/fallocate.2:65
908 msgid ""
909 "The default operation (i.e., I<mode> is zero) of B<fallocate>()  allocates "
910 "the disk space within the range specified by I<offset> and I<len>.  The file "
911 "size (as reported by B<stat>(2))  will be changed if I<offset>+I<len> is "
912 "greater than the file size.  Any subregion within the range specified by "
913 "I<offset> and I<len> that did not contain data before the call will be "
914 "initialized to zero.  This default behavior closely resembles the behavior "
915 "of the B<posix_fallocate>(3)  library function, and is intended as a method "
916 "of optimally implementing that function."
917 msgstr ""
918 "B<fallocate>() のデフォルトの動作 (つまり I<mode> が 0 の場合) は、 "
919 "I<offset> と I<len> で指定された範囲のディスク領域の割り当てを行う。 "
920 "I<offset>+I<len> がファイルサイズよりも大きかった場合、 (B<stat>(2) で報告さ"
921 "れる) ファイルサイズが変更される。 I<offset> と I<len> で指定される範囲のサブ"
922 "領域で、 呼び出し前にデータを保持していなかった場合、そのサブ領域は 0 で初期"
923 "化される。 このデフォルトの動作は、 ライブラリ関数 B<posix_fallocate>(3) の動"
924 "作と非常に似ている。 これは、 このシステムコールが B<posix_fallocate>(3) を最"
925 "適に実装する手段を提供することを目的としているからである。"
926
927 #. type: Plain text
928 #: build/C/man2/fallocate.2:71
929 msgid ""
930 "After a successful call, subsequent writes into the range specified by "
931 "I<offset> and I<len> are guaranteed not to fail because of lack of disk "
932 "space."
933 msgstr ""
934 "呼び出しが成功した場合、\n"
935 "I<offset> と I<len> で指定された範囲へのそれ以降の書き込みでは、\n"
936 "ディスクの領域不足での書き込み失敗が起こらないことが保証される。"
937
938 #. type: Plain text
939 #: build/C/man2/fallocate.2:82
940 msgid ""
941 "If the B<FALLOC_FL_KEEP_SIZE> flag is specified in I<mode>, the behavior of "
942 "the call is similar, but the file size will not be changed even if I<offset>"
943 "+I<len> is greater than the file size.  Preallocating zeroed blocks beyond "
944 "the end of the file in this manner is useful for optimizing append workloads."
945 msgstr ""
946 "B<FALLOC_FL_KEEP_SIZE> フラグが I<mode> に指定された場合、このシステムコー"
947 "ル\n"
948 "の動作は似ているが、 I<offset>+I<len> がファイルサイズよりも大きい場合で\n"
949 "あってもファイルサイズは変更されない点が異なる。この場合のファイルの末尾\n"
950 "よりも後ろの前もって割り当てられた 0 で埋められたブロックは、ファイルへの\n"
951 "追記を最適化したい場合に役に立つ。"
952
953 #. type: Plain text
954 #: build/C/man2/fallocate.2:86
955 msgid ""
956 "Because allocation is done in block size chunks, B<fallocate>()  may "
957 "allocate a larger range of disk space than was specified."
958 msgstr ""
959 "割り当てはブロックサイズ単位で行われるため、 B<fallocate>() は指定されたよ"
960 "り\n"
961 "も大きなディスク領域を割り当てることがある。"
962
963 #. type: SS
964 #: build/C/man2/fallocate.2:86
965 #, no-wrap
966 msgid "Deallocating file space"
967 msgstr "ファイル空間の割り当て解除"
968
969 #. type: Plain text
970 #: build/C/man2/fallocate.2:101
971 msgid ""
972 "Specifying the B<FALLOC_FL_PUNCH_HOLE> flag (available since Linux 2.6.38) "
973 "in I<mode> deallocates space (i.e., creates a hole)  in the byte range "
974 "starting at I<offset> and continuing for I<len> bytes.  Within the specified "
975 "range, partial filesystem blocks are zeroed, and whole filesystem blocks are "
976 "removed from the file.  After a successful call, subsequent reads from this "
977 "range will return zeroes."
978 msgstr ""
979 "B<FALLOC_FL_PUNCH_HOLE> フラグ (Linux 2.6.38 以降で利用可能) を I<mode> に指"
980 "定すると、 I<offset> で始まる I<len> バイトの領域の空間を解放する (ホールを作"
981 "成する)。 指定された範囲のうち、 部分的に使用しているファイルシステムブロック"
982 "は 0 で埋められ、 全体を使用しているファイルシステムブロックはそのファイルか"
983 "ら削除される。 呼び出しが成功すると、 これ以降のこの範囲からの読み出しでは 0 "
984 "を返す。"
985
986 #. type: Plain text
987 #: build/C/man2/fallocate.2:112
988 msgid ""
989 "The B<FALLOC_FL_PUNCH_HOLE> flag must be ORed with B<FALLOC_FL_KEEP_SIZE> in "
990 "I<mode>; in other words, even when punching off the end of the file, the "
991 "file size (as reported by B<stat>(2))  does not change."
992 msgstr ""
993 "B<FALLOC_FL_PUNCH_HOLE> フラグは B<FALLOC_FL_KEEP_SIZE> と論理和 (OR) をとっ"
994 "て I<mode> に指定しなければならない。 つまり、 ファイル末尾の punch off を"
995 "行った場合でも、 (B<stat>(2) で報告される) ファイルサイズが変化しない。"
996
997 #. type: Plain text
998 #: build/C/man2/fallocate.2:117
999 msgid ""
1000 "Not all filesystems support B<FALLOC_FL_PUNCH_HOLE>; if a filesystem doesn't "
1001 "support the operation, an error is returned.  The operation is supported on "
1002 "at least the following filesystems:"
1003 msgstr ""
1004 "すべてのファイルシステムで B<FALLOC_FL_PUNCH_HOLE> がサポートされているわけで"
1005 "はない。 ファイルシステムがこの操作をサポートしていない場合は、 エラーが返"
1006 "る。 この操作は少なくとも以下のファイルシステムでサポートされている。"
1007
1008 #. type: IP
1009 #: build/C/man2/fallocate.2:117 build/C/man2/fallocate.2:119
1010 #: build/C/man2/fallocate.2:122 build/C/man2/fallocate.2:124
1011 #: build/C/man2/fallocate.2:222 build/C/man2/fallocate.2:225
1012 #: build/C/man2/madvise.2:286 build/C/man2/madvise.2:292
1013 #: build/C/man2/madvise.2:295 build/C/man2/madvise.2:298
1014 #: build/C/man2/madvise.2:301 build/C/man3/mallopt.3:235
1015 #: build/C/man3/mallopt.3:241 build/C/man2/shmop.2:62 build/C/man2/shmop.2:68
1016 #: build/C/man2/shmop.2:80
1017 #, no-wrap
1018 msgid "*"
1019 msgstr "*"
1020
1021 #. type: Plain text
1022 #: build/C/man2/fallocate.2:119
1023 msgid "XFS (since Linux 2.6.38)"
1024 msgstr "XFS (Linux 2.6.38 以降)"
1025
1026 #.  commit a4bb6b64e39abc0e41ca077725f2a72c868e7622
1027 #. type: Plain text
1028 #: build/C/man2/fallocate.2:122
1029 msgid "ext4 (since Linux 3.0)"
1030 msgstr "ext4 (Linux 3.0 以降)"
1031
1032 #. type: Plain text
1033 #: build/C/man2/fallocate.2:124
1034 msgid "Btrfs (since Linux 3.7)"
1035 msgstr "Btrfs (Linux 3.7 以降)"
1036
1037 #.  commit 83e4fa9c16e4af7122e31be3eca5d57881d236fe
1038 #. type: Plain text
1039 #: build/C/man2/fallocate.2:127
1040 msgid "tmpfs (since Linux 3.5)"
1041 msgstr "tmpfs (Linux 3.5 以降)"
1042
1043 #. type: SS
1044 #: build/C/man2/fallocate.2:127
1045 #, no-wrap
1046 msgid "Collapsing file space"
1047 msgstr "ファイル空間の一部削除"
1048
1049 #.  commit 00f5e61998dd17f5375d9dfc01331f104b83f841
1050 #. type: Plain text
1051 #: build/C/man2/fallocate.2:147
1052 msgid ""
1053 "Specifying the B<FALLOC_FL_COLLAPSE_RANGE> flag (available since Linux 3.15) "
1054 "in I<mode> removes a byte range from a file, without leaving a hole.  The "
1055 "byte range to be collapsed starts at I<offset> and continues for I<len> "
1056 "bytes.  At the completion of the operation, the contents of the file "
1057 "starting at the location I<offset+len> will be appended at the location "
1058 "I<offset>, and the file will be I<len> bytes smaller."
1059 msgstr ""
1060 "B<FALLOC_FL_COLLAPSE_RANGE> フラグ (Linux 3.15 以降で利用可能) を I<mode> に"
1061 "指定すると、 指定したバイト範囲をファイルから削除する。 その際、ホールを残ら"
1062 "ない。 削除されるバイト範囲は I<offset> から始まる I<len> バイトの範囲であ"
1063 "る。 操作が完了すると、 ファイルの I<offset+len> の位置から始まる内容が "
1064 "I<offset> の位置に見えるようになり、 ファイルのサイズは I<len> バイトだけ小さ"
1065 "くなる。"
1066
1067 #. type: Plain text
1068 #: build/C/man2/fallocate.2:161
1069 msgid ""
1070 "A filesystem may place limitations on the granularity of the operation, in "
1071 "order to ensure efficient implementation.  Typically, I<offset> and I<len> "
1072 "must be a multiple of the filesystem logical block size, which varies "
1073 "according to the filesystem type and configuration.  If a filesystem has "
1074 "such a requirement, B<fallocate>()  will fail with the error B<EINVAL> if "
1075 "this requirement is violated."
1076 msgstr ""
1077 "効率的に動作する実装にするため、ファイルシステムはこの操作の粒度に制限を設け"
1078 "ることがある。 通常は I<offset> と I<len> はファイルシステムの論理ブロックサ"
1079 "イズの倍数でなければならない。 論理ブロックサイズはファイルシステムの種類や設"
1080 "定により様々である。 ファイルシステムにこのような要求条件がある場合、 その要"
1081 "求条件が満たされていなければ、 B<fallocate> はエラー B<EINVAL> で失敗する。"
1082
1083 #. type: Plain text
1084 #: build/C/man2/fallocate.2:170
1085 msgid ""
1086 "If the region specified by I<offset> plus I<len> reaches or passes the end "
1087 "of file, an error is returned; instead, use B<ftruncate>(2)  to truncate a "
1088 "file."
1089 msgstr ""
1090 "I<offset> と I<len> で指定された範囲がファイルの末尾かそれより先まで達してい"
1091 "る場合、 エラーが返される。 代わりに、ファイルの切り詰めを行う "
1092 "B<ftruncate>(2) を使用すること。"
1093
1094 #. type: Plain text
1095 #: build/C/man2/fallocate.2:175
1096 msgid ""
1097 "No other flags may be specified in I<mode> in conjunction with "
1098 "B<FALLOC_FL_COLLAPSE_RANGE>."
1099 msgstr ""
1100 "B<FALLOC_FL_COLLAPSE_RANGE> と他のフラグを同時に I<mode> に指定することはでき"
1101 "ない。"
1102
1103 #.  commit 9eb79482a97152930b113b51dff530aba9e28c8e
1104 #.  commit e1d8fb88a64c1f8094b9f6c3b6d2d9e6719c970d
1105 #. type: Plain text
1106 #: build/C/man2/fallocate.2:183
1107 msgid ""
1108 "As at Linux 3.15, B<FALLOC_FL_COLLAPSE_RANGE> is supported by ext4 (only for "
1109 "extent-based files)  and XFS."
1110 msgstr ""
1111 "Linux 3.15 時点では B<FALLOC_FL_COLLAPSE_RANGE> は ext4 (エクステントベースの"
1112 "ファイル) と XFS でサポートされている。"
1113
1114 #. type: SS
1115 #: build/C/man2/fallocate.2:183
1116 #, fuzzy, no-wrap
1117 #| msgid "Deallocating file space"
1118 msgid "Zeroing file space"
1119 msgstr "ファイル空間の割り当て解除"
1120
1121 #.  commit 409332b65d3ed8cfa7a8030f1e9d52f372219642
1122 #. type: Plain text
1123 #: build/C/man2/fallocate.2:199
1124 #, fuzzy
1125 #| msgid ""
1126 #| "Specifying the B<FALLOC_FL_PUNCH_HOLE> flag (available since Linux "
1127 #| "2.6.38) in I<mode> deallocates space (i.e., creates a hole)  in the byte "
1128 #| "range starting at I<offset> and continuing for I<len> bytes.  Within the "
1129 #| "specified range, partial filesystem blocks are zeroed, and whole "
1130 #| "filesystem blocks are removed from the file.  After a successful call, "
1131 #| "subsequent reads from this range will return zeroes."
1132 msgid ""
1133 "Specifying the B<FALLOC_FL_ZERO_RANGE> flag (available since Linux 3.14)  in "
1134 "I<mode> zeroes space in the byte range starting at I<offset> and continuing "
1135 "for I<len> bytes.  Within the specified range, blocks are preallocated for "
1136 "the regions that span the holes in the file.  After a successful call, "
1137 "subsequent reads from this range will return zeroes."
1138 msgstr ""
1139 "B<FALLOC_FL_PUNCH_HOLE> フラグ (Linux 2.6.38 以降で利用可能) を I<mode> に指"
1140 "定すると、 I<offset> で始まる I<len> バイトの領域の空間を解放する (ホールを作"
1141 "成する)。 指定された範囲のうち、 部分的に使用しているファイルシステムブロック"
1142 "は 0 で埋められ、 全体を使用しているファイルシステムブロックはそのファイルか"
1143 "ら削除される。 呼び出しが成功すると、 これ以降のこの範囲からの読み出しでは 0 "
1144 "を返す。"
1145
1146 #. type: Plain text
1147 #: build/C/man2/fallocate.2:205
1148 msgid ""
1149 "Zeroing is done within the filesystem preferably by converting the range "
1150 "into unwritten extents.  This approach means that the specified range will "
1151 "not be physically zeroed out on the device (except for partial blocks at the "
1152 "either end of the range), and I/O is (otherwise) required only to update "
1153 "metadata."
1154 msgstr ""
1155
1156 #. type: Plain text
1157 #: build/C/man2/fallocate.2:217
1158 #, fuzzy
1159 #| msgid ""
1160 #| "If the B<FALLOC_FL_KEEP_SIZE> flag is specified in I<mode>, the behavior "
1161 #| "of the call is similar, but the file size will not be changed even if "
1162 #| "I<offset>+I<len> is greater than the file size.  Preallocating zeroed "
1163 #| "blocks beyond the end of the file in this manner is useful for optimizing "
1164 #| "append workloads."
1165 msgid ""
1166 "If the B<FALLOC_FL_KEEP_SIZE> flag is additionally specified in I<mode>, the "
1167 "behavior of the call is similar, but the file size will not be changed even "
1168 "if I<offset>+I<len> is greater than the file size.  This behaviour is the "
1169 "same as when preallocating space with B<FALLOC_FL_KEEP_SIZE> specified."
1170 msgstr ""
1171 "B<FALLOC_FL_KEEP_SIZE> フラグが I<mode> に指定された場合、このシステムコー"
1172 "ル\n"
1173 "の動作は似ているが、 I<offset>+I<len> がファイルサイズよりも大きい場合で\n"
1174 "あってもファイルサイズは変更されない点が異なる。この場合のファイルの末尾\n"
1175 "よりも後ろの前もって割り当てられた 0 で埋められたブロックは、ファイルへの\n"
1176 "追記を最適化したい場合に役に立つ。"
1177
1178 #. type: Plain text
1179 #: build/C/man2/fallocate.2:222
1180 msgid ""
1181 "Not all filesystems support B<FALLOC_FL_ZERO_RANGE>; if a filesystem doesn't "
1182 "support the operation, an error is returned.  The operation is supported on "
1183 "at least the following filesystems:"
1184 msgstr ""
1185 "すべてのファイルシステムで B<FALLOC_FL_ZERO_RANGE> がサポートされているわけで"
1186 "はない。 ファイルシステムがこの操作をサポートしていない場合は、 エラーが返"
1187 "る。 この操作は少なくとも以下のファイルシステムでサポートされている。"
1188
1189 #.  commit 376ba313147b4172f3e8cf620b9fb591f3e8cdfa
1190 #. type: Plain text
1191 #: build/C/man2/fallocate.2:225
1192 msgid "XFS (since Linux 3.14)"
1193 msgstr "XFS (Linux 3.14 以降)"
1194
1195 #.  commit b8a8684502a0fc852afa0056c6bb2a9273f6fcc0
1196 #. type: Plain text
1197 #: build/C/man2/fallocate.2:228
1198 #, fuzzy
1199 #| msgid "ext4 (since Linux 3.0)"
1200 msgid "ext4, for extent-based files (since Linux 3.14)"
1201 msgstr "ext4 (Linux 3.0 以降)"
1202
1203 #. type: Plain text
1204 #: build/C/man2/fallocate.2:235
1205 msgid ""
1206 "On success, B<fallocate>()  returns zero.  On error, -1 is returned and "
1207 "I<errno> is set to indicate the error."
1208 msgstr ""
1209 "成功の場合、 B<fallocate>() は 0 を返す。 エラーの場合、-1 を返し、 I<error> "
1210 "にエラーを示す値を設定する。"
1211
1212 #. type: TP
1213 #: build/C/man2/fallocate.2:236 build/C/man2/madvise.2:279
1214 #: build/C/man2/mmap.2:415 build/C/man2/posix_fadvise.2:91
1215 #: build/C/man3/posix_fallocate.3:73 build/C/man2/readahead.2:73
1216 #: build/C/man2/sync_file_range.2:148
1217 #, no-wrap
1218 msgid "B<EBADF>"
1219 msgstr "B<EBADF>"
1220
1221 #. type: Plain text
1222 #: build/C/man2/fallocate.2:240 build/C/man3/posix_fallocate.3:77
1223 msgid "I<fd> is not a valid file descriptor, or is not opened for writing."
1224 msgstr ""
1225 "I<fd> が有効なファイルディスクリプタでないか、 書き込み用としてオープンされて"
1226 "いない。"
1227
1228 #. type: TP
1229 #: build/C/man2/fallocate.2:240 build/C/man3/posix_fallocate.3:77
1230 #, no-wrap
1231 msgid "B<EFBIG>"
1232 msgstr "B<EFBIG>"
1233
1234 #. type: Plain text
1235 #: build/C/man2/fallocate.2:244
1236 msgid "I<offset>+I<len> exceeds the maximum file size."
1237 msgstr "I<offset + len> がファイルサイズの最大値よりも大きい。"
1238
1239 #. type: TP
1240 #: build/C/man2/fallocate.2:244
1241 #, no-wrap
1242 msgid "B<EINTR>"
1243 msgstr "B<EINTR>"
1244
1245 #. type: Plain text
1246 #: build/C/man2/fallocate.2:247
1247 msgid "A signal was caught during execution."
1248 msgstr "実行中にシグナルが捕捉された。"
1249
1250 #. type: Plain text
1251 #: build/C/man2/fallocate.2:259 build/C/man3/posix_fallocate.3:87
1252 msgid "I<offset> was less than 0, or I<len> was less than or equal to 0."
1253 msgstr "I<offset> が 0 未満だったか、 I<len> が 0 以下だった。"
1254
1255 #. type: Plain text
1256 #: build/C/man2/fallocate.2:269
1257 msgid ""
1258 "I<mode> is B<FALLOC_FL_COLLAPSE_RANGE> and the range specified by I<offset> "
1259 "plus I<len> reaches or passes the end of the file."
1260 msgstr ""
1261 "I<mode> が B<FALLOC_FL_COLLAPSE_RANGE> で、 I<offset> と I<len> で指定された"
1262 "範囲がファイルの末尾かそれより先まで達している。"
1263
1264 #. type: Plain text
1265 #: build/C/man2/fallocate.2:279
1266 msgid ""
1267 "I<mode> is B<FALLOC_FL_COLLAPSE_RANGE>, but either I<offset> or I<len> is "
1268 "not a multiple of the filesystem block size."
1269 msgstr ""
1270 "I<mode> が B<FALLOC_FL_COLLAPSE_RANGE> だが、 I<offset> か I<len> のいずれか"
1271 "がファイルシステムのブロックサイズの倍数ではない。"
1272
1273 #. type: Plain text
1274 #: build/C/man2/fallocate.2:287
1275 msgid ""
1276 "I<mode> contains both B<FALLOC_FL_COLLAPSE_RANGE> and other flags; no other "
1277 "flags are permitted with B<FALLOC_FL_COLLAPSE_RANGE>."
1278 msgstr ""
1279 "I<mode> に B<FALLOC_FL_COLLAPSE_RANGE> と他のフラグの両方が指定されている。 "
1280 "B<FALLOC_FL_COLLAPSE_RANGE> と他のフラグを一緒に使うことができない。"
1281
1282 #.  There was a inconsistency in 3.15-rc1, that should be resolved so that all
1283 #.  filesystems use this error for this case. (Tytso says ex4 will change.)
1284 #.  http://thread.gmane.org/gmane.comp.file-systems.xfs.general/60485/focus=5521
1285 #.  From: Michael Kerrisk (man-pages <mtk.manpages@...>
1286 #.  Subject: Re: [PATCH v5 10/10] manpage: update FALLOC_FL_COLLAPSE_RANGE flag in fallocate
1287 #.  Newsgroups: gmane.linux.man, gmane.linux.file-systems
1288 #.  Date: 2014-04-17 13:40:05 GMT
1289 #. type: Plain text
1290 #: build/C/man2/fallocate.2:304
1291 msgid ""
1292 "I<mode> is B<FALLOC_FL_COLLAPSE_RANGE> or B<FALLOC_FL_ZERO_RANGE>, but the "
1293 "file referred to by I<fd> is not a regular file."
1294 msgstr ""
1295 "I<mode> が B<FALLOC_FL_COLLAPSE_RANGE> か B<FALLOC_FL_ZERO_RANGE> だが、 "
1296 "I<fd> が参照しているファイルが通常のファイルではない。"
1297
1298 #. type: TP
1299 #: build/C/man2/fallocate.2:304 build/C/man2/madvise.2:310
1300 #: build/C/man2/sync_file_range.2:160
1301 #, no-wrap
1302 msgid "B<EIO>"
1303 msgstr "B<EIO>"
1304
1305 #. type: Plain text
1306 #: build/C/man2/fallocate.2:307
1307 msgid "An I/O error occurred while reading from or writing to a filesystem."
1308 msgstr "ファイルシステムとの読み書き中に入出力エラーが発生した。"
1309
1310 #. type: TP
1311 #: build/C/man2/fallocate.2:307 build/C/man2/mmap.2:450
1312 #: build/C/man3/posix_fallocate.3:87
1313 #, no-wrap
1314 msgid "B<ENODEV>"
1315 msgstr "B<ENODEV>"
1316
1317 #. type: Plain text
1318 #: build/C/man2/fallocate.2:314
1319 msgid ""
1320 "I<fd> does not refer to a regular file or a directory.  (If I<fd> is a pipe "
1321 "or FIFO, a different error results.)"
1322 msgstr ""
1323 "I<fd> が通常のファイルかディレクトリを参照していない (I<fd> がパイプや FIFO "
1324 "を参照している場合、別のエラーが発生する)。"
1325
1326 #. type: TP
1327 #: build/C/man2/fallocate.2:314 build/C/man3/posix_fallocate.3:91
1328 #: build/C/man2/shmget.2:233 build/C/man2/sync_file_range.2:166
1329 #, no-wrap
1330 msgid "B<ENOSPC>"
1331 msgstr "B<ENOSPC>"
1332
1333 #. type: Plain text
1334 #: build/C/man2/fallocate.2:319 build/C/man3/posix_fallocate.3:96
1335 msgid ""
1336 "There is not enough space left on the device containing the file referred to "
1337 "by I<fd>."
1338 msgstr "I<fd> が参照するファイルを含むデバイスに十分な空き領域がない。"
1339
1340 #. type: Plain text
1341 #: build/C/man2/fallocate.2:323
1342 msgid "This kernel does not implement B<fallocate>()."
1343 msgstr "このカーネルでは B<fallocate>() は実装されていない。"
1344
1345 #. type: TP
1346 #: build/C/man2/fallocate.2:323
1347 #, no-wrap
1348 msgid "B<EOPNOTSUPP>"
1349 msgstr "B<EOPNOTSUPP>"
1350
1351 #. type: Plain text
1352 #: build/C/man2/fallocate.2:332
1353 msgid ""
1354 "The filesystem containing the file referred to by I<fd> does not support "
1355 "this operation; or the I<mode> is not supported by the filesystem containing "
1356 "the file referred to by I<fd>."
1357 msgstr ""
1358 "I<fd> が参照するファイルを含むファイルシステムが 指定された操作を\n"
1359 "サポートしていない。 I<fd> が参照するファイルを含むファイルシステムが\n"
1360 "I<mode> をサポートしていない。"
1361
1362 #. type: TP
1363 #: build/C/man2/fallocate.2:332 build/C/man2/mlock.2:143
1364 #: build/C/man2/mlock.2:182 build/C/man2/mmap.2:458 build/C/man2/shmctl.2:353
1365 #: build/C/man2/shmget.2:241
1366 #, no-wrap
1367 msgid "B<EPERM>"
1368 msgstr "B<EPERM>"
1369
1370 #. type: Plain text
1371 #: build/C/man2/fallocate.2:350
1372 msgid ""
1373 "The file referred to by I<fd> is marked immutable (see B<chattr>(1)).  Or: "
1374 "I<mode> specifies B<FALLOC_FL_PUNCH_HOLE> or B<FALLOC_FL_COLLAPSE_RANGE> and "
1375 "the file referred to by I<fd> is marked append-only (see B<chattr>(1))."
1376 msgstr ""
1377 "I<fd> が参照するファイルに変更不可 (immutable) の属性が付いている "
1378 "(B<chattr>(1) 参照)。 I<mode> に B<FALLOC_FL_PUNCH_HOLE> か "
1379 "B<FALLOC_FL_COLLAPSE_RANGE> が指定されたが、 I<fd> が参照するファイルに追加の"
1380 "み (append-only) の属性が付いている (B<chattr>(1) 参照)。"
1381
1382 #. type: TP
1383 #: build/C/man2/fallocate.2:350 build/C/man2/posix_fadvise.2:97
1384 #: build/C/man3/posix_fallocate.3:96 build/C/man2/sync_file_range.2:169
1385 #, no-wrap
1386 msgid "B<ESPIPE>"
1387 msgstr "B<ESPIPE>"
1388
1389 #. type: Plain text
1390 #: build/C/man2/fallocate.2:354
1391 msgid "I<fd> refers to a pipe or FIFO."
1392 msgstr "I<fd> がパイプか FIFO を参照している。"
1393
1394 #. type: TP
1395 #: build/C/man2/fallocate.2:354 build/C/man2/mmap.2:467
1396 #, no-wrap
1397 msgid "B<ETXTBSY>"
1398 msgstr "B<ETXTBSY>"
1399
1400 #. type: Plain text
1401 #: build/C/man2/fallocate.2:362
1402 msgid ""
1403 "I<mode> specifies B<FALLOC_FL_COLLAPSE_RANGE>, but the file referred to by "
1404 "I<fd> is currently being executed."
1405 msgstr ""
1406 "I<mode> に B<FALLOC_FL_COLLAPSE_RANGE> が指定されたが、 I<fd> が参照するファ"
1407 "イルは現在実行中である。"
1408
1409 #. type: SH
1410 #: build/C/man2/fallocate.2:362 build/C/man3/malloc_info.3:60
1411 #: build/C/man3/mcheck.3:134 build/C/man2/mmap2.2:74
1412 #: build/C/man2/posix_fadvise.2:104 build/C/man3/posix_fallocate.3:100
1413 #: build/C/man3/posix_memalign.3:167 build/C/man2/readahead.2:83
1414 #: build/C/man2/remap_file_pages.2:148 build/C/man3/shm_open.3:249
1415 #: build/C/man2/subpage_prot.2:90 build/C/man2/sync_file_range.2:177
1416 #, no-wrap
1417 msgid "VERSIONS"
1418 msgstr "バージョン"
1419
1420 #.  See http://sourceware.org/bugzilla/show_bug.cgi?id=14964
1421 #. type: Plain text
1422 #: build/C/man2/fallocate.2:370
1423 msgid ""
1424 "B<fallocate>()  is available on Linux since kernel 2.6.23.  Support is "
1425 "provided by glibc since version 2.10.  The B<FALLOC_FL_*> flags are defined "
1426 "in glibc headers only since version 2.18."
1427 msgstr ""
1428 "B<fallocate>()  はカーネル 2.6.23 以降の Linux で利用可能である。 glibc での"
1429 "対応はバージョン 3.10 以降で行われている。 B<FALLOC_FL_*> が glibc のヘッダ"
1430 "ファイルで定義されているのは、バージョン 2.18 以降のみである。"
1431
1432 #. type: Plain text
1433 #: build/C/man2/fallocate.2:373
1434 msgid "B<fallocate>()  is Linux-specific."
1435 msgstr "B<fallocate>()  は Linux 固有である。"
1436
1437 #. type: Plain text
1438 #: build/C/man2/fallocate.2:378
1439 msgid ""
1440 "B<fallocate>(1), B<ftruncate>(2), B<posix_fadvise>(3), B<posix_fallocate>(3)"
1441 msgstr ""
1442 "B<fallocate>(1), B<ftruncate>(2), B<posix_fadvise>(3), B<posix_fallocate>(3)"
1443
1444 #. type: TH
1445 #: build/C/man2/madvise.2:35
1446 #, no-wrap
1447 msgid "MADVISE"
1448 msgstr "MADVISE"
1449
1450 #. type: TH
1451 #: build/C/man2/madvise.2:35 build/C/man2/msync.2:25
1452 #, no-wrap
1453 msgid "2014-04-20"
1454 msgstr "2014-04-20"
1455
1456 #. type: Plain text
1457 #: build/C/man2/madvise.2:38
1458 msgid "madvise - give advice about use of memory"
1459 msgstr "madvise - メモリ利用に関するアドバイスを与える"
1460
1461 #. type: Plain text
1462 #: build/C/man2/madvise.2:40 build/C/man2/msync.2:30
1463 #: build/C/man3/shm_open.3:31
1464 msgid "B<#include E<lt>sys/mman.hE<gt>>"
1465 msgstr "B<#include E<lt>sys/mman.hE<gt>>"
1466
1467 #. type: Plain text
1468 #: build/C/man2/madvise.2:42
1469 msgid ""
1470 "B<int madvise(void *>I<addr>B<, size_t >I<length>B<, int >I<advice>B<);>"
1471 msgstr ""
1472 "B<int madvise(void *>I<addr>B<, size_t >I<length>B<, int >I<advice>B<);>"
1473
1474 #. type: Plain text
1475 #: build/C/man2/madvise.2:46 build/C/man2/posix_fadvise.2:43
1476 #: build/C/man3/posix_fallocate.3:39 build/C/man3/posix_memalign.3:49
1477 msgid ""
1478 "Feature Test Macro Requirements for glibc (see B<feature_test_macros>(7)):"
1479 msgstr "glibc 向けの機能検査マクロの要件 (B<feature_test_macros>(7)  参照):"
1480
1481 #. type: Plain text
1482 #: build/C/man2/madvise.2:50
1483 msgid "B<madvise>(): _BSD_SOURCE"
1484 msgstr "B<madvise>(): _BSD_SOURCE"
1485
1486 #. type: Plain text
1487 #: build/C/man2/madvise.2:68
1488 msgid ""
1489 "The B<madvise>()  system call advises the kernel about how to handle paging "
1490 "input/output in the address range beginning at address I<addr> and with size "
1491 "I<length> bytes.  It allows an application to tell the kernel how it expects "
1492 "to use some mapped or shared memory areas, so that the kernel can choose "
1493 "appropriate read-ahead and caching techniques.  This call does not influence "
1494 "the semantics of the application (except in the case of B<MADV_DONTNEED>), "
1495 "but may influence its performance.  The kernel is free to ignore the advice."
1496 msgstr ""
1497 "B<madvise>()  システムコールは、アドレス I<addr> からはじまる I<length> バイ"
1498 "トのメモリブロックのページング入出力をどう扱えば良いか、 カーネルにアドバイス"
1499 "する。 これを用いると、 アプリケーションからカーネルに、 マップされたメモリや"
1500 "共有メモリをどのように扱ってほしいか伝えることができ、 カーネルはそれに応じて"
1501 "先読みやキャッシュなどの適切な手法を選択できる。 このコールはアプリケーション"
1502 "の動作そのものには影響しない (B<MADV_DONTNEED> の場合は別) が、 性能には影響"
1503 "しうる。 なおこのアドバイスを受け入れるかどうかはカーネルに任される。"
1504
1505 #. type: Plain text
1506 #: build/C/man2/madvise.2:72
1507 msgid "The advice is indicated in the I<advice> argument which can be"
1508 msgstr ""
1509 "アドバイスは引き数 I<advice> によって与える。以下のいずれかを指定できる。"
1510
1511 #. type: TP
1512 #: build/C/man2/madvise.2:72
1513 #, no-wrap
1514 msgid "B<MADV_NORMAL>"
1515 msgstr "B<MADV_NORMAL>"
1516
1517 #. type: Plain text
1518 #: build/C/man2/madvise.2:76
1519 msgid "No special treatment.  This is the default."
1520 msgstr "特別な扱いは行わない。これがデフォルトである。"
1521
1522 #. type: TP
1523 #: build/C/man2/madvise.2:76
1524 #, no-wrap
1525 msgid "B<MADV_RANDOM>"
1526 msgstr "B<MADV_RANDOM>"
1527
1528 #. type: Plain text
1529 #: build/C/man2/madvise.2:80
1530 msgid ""
1531 "Expect page references in random order.  (Hence, read ahead may be less "
1532 "useful than normally.)"
1533 msgstr ""
1534 "ページ参照はランダムな順序で行われそうだ。 (したがって、先読みはあまり効果が"
1535 "なさそうだ。)"
1536
1537 #. type: TP
1538 #: build/C/man2/madvise.2:80
1539 #, no-wrap
1540 msgid "B<MADV_SEQUENTIAL>"
1541 msgstr "B<MADV_SEQUENTIAL>"
1542
1543 #. type: Plain text
1544 #: build/C/man2/madvise.2:85
1545 msgid ""
1546 "Expect page references in sequential order.  (Hence, pages in the given "
1547 "range can be aggressively read ahead, and may be freed soon after they are "
1548 "accessed.)"
1549 msgstr ""
1550 "ページ参照はシーケンシャルな順序で行われそうだ。 (したがって与えた範囲のペー"
1551 "ジは積極的に先読みしておくと良いだろう。 またアクセスが終わったら速やかに解放"
1552 "して良い。)"
1553
1554 #. type: TP
1555 #: build/C/man2/madvise.2:85
1556 #, no-wrap
1557 msgid "B<MADV_WILLNEED>"
1558 msgstr "B<MADV_WILLNEED>"
1559
1560 #. type: Plain text
1561 #: build/C/man2/madvise.2:89
1562 msgid ""
1563 "Expect access in the near future.  (Hence, it might be a good idea to read "
1564 "some pages ahead.)"
1565 msgstr ""
1566 "近い将来にアクセスされそうだ。 (したがってこれらのページを今のうちに先読みし"
1567 "ておくといいだろう。)"
1568
1569 #. type: TP
1570 #: build/C/man2/madvise.2:89
1571 #, no-wrap
1572 msgid "B<MADV_DONTNEED>"
1573 msgstr "B<MADV_DONTNEED>"
1574
1575 #. type: Plain text
1576 #: build/C/man2/madvise.2:100
1577 msgid ""
1578 "Do not expect access in the near future.  (For the time being, the "
1579 "application is finished with the given range, so the kernel can free "
1580 "resources associated with it.)  Subsequent accesses of pages in this range "
1581 "will succeed, but will result either in reloading of the memory contents "
1582 "from the underlying mapped file (see B<mmap>(2))  or zero-fill-on-demand "
1583 "pages for mappings without an underlying file."
1584 msgstr ""
1585 "しばらくアクセスはなさそうだ。 (現時点でアプリケーションは与えた範囲の処理を"
1586 "終えている。 したがってカーネルはこれに関連するリソースを解放して良い。)  こ"
1587 "れ以降この範囲のページへのアクセスがあると、 成功はするが、メモリの内容をマッ"
1588 "プ元のファイルからロードし直すことになる (B<mmap>(2)  を見よ) か、 または元"
1589 "ファイルがないマップページでは アクセスがあったときに 0 埋めが行われることに"
1590 "なる。"
1591
1592 #. type: TP
1593 #: build/C/man2/madvise.2:100
1594 #, no-wrap
1595 msgid "B<MADV_REMOVE> (since Linux 2.6.16)"
1596 msgstr "B<MADV_REMOVE> (Linux 2.6.16 以降)"
1597
1598 #.  2.6.18-rc5
1599 #.  Databases want to use this feature to drop a section of their
1600 #.  bufferpool (shared memory segments) - without writing back to
1601 #.  disk/swap space.  This feature is also useful for supporting
1602 #.  hot-plug memory on UML.
1603 #. type: Plain text
1604 #: build/C/man2/madvise.2:113
1605 msgid ""
1606 "Free up a given range of pages and its associated backing store.  Currently, "
1607 "only shmfs/tmpfs supports this; other filesystems return with the error "
1608 "B<ENOSYS>."
1609 msgstr ""
1610 "指定された範囲のページと関連するバッキングストアを解放する。 現在のところ、 "
1611 "shmfs/tmpfs だけがこれに対応している。 他のファイルシステムでは B<ENOSYS> が"
1612 "返される。"
1613
1614 #. type: TP
1615 #: build/C/man2/madvise.2:113
1616 #, no-wrap
1617 msgid "B<MADV_DONTFORK> (since Linux 2.6.16)"
1618 msgstr "B<MADV_DONTFORK> (Linux 2.6.16 以降)"
1619
1620 #.  See http://lwn.net/Articles/171941/
1621 #.  [PATCH] madvise MADV_DONTFORK/MADV_DOFORK
1622 #.  Currently, copy-on-write may change the physical address of
1623 #.  a page even if the user requested that the page is pinned in
1624 #.  memory (either by mlock or by get_user_pages).  This happens
1625 #.  if the process forks meanwhile, and the parent writes to that
1626 #.  page.  As a result, the page is orphaned: in case of
1627 #.  get_user_pages, the application will never see any data hardware
1628 #.  DMA's into this page after the COW.  In case of mlock'd memory,
1629 #.  the parent is not getting the realtime/security benefits of mlock.
1630 #.  In particular, this affects the Infiniband modules which do DMA from
1631 #.  and into user pages all the time.
1632 #.  This patch adds madvise options to control whether memory range is
1633 #.  inherited across fork. Useful e.g. for when hardware is doing DMA
1634 #.  from/into these pages.  Could also be useful to an application
1635 #.  wanting to speed up its forks by cutting large areas out of
1636 #.  consideration.
1637 #.  SEE ALSO: http://lwn.net/Articles/171941/
1638 #.  "Tweaks to madvise() and posix_fadvise()", 14 Feb 2006
1639 #. type: Plain text
1640 #: build/C/man2/madvise.2:144
1641 msgid ""
1642 "Do not make the pages in this range available to the child after a "
1643 "B<fork>(2).  This is useful to prevent copy-on-write semantics from changing "
1644 "the physical location of a page(s) if the parent writes to it after a "
1645 "B<fork>(2).  (Such page relocations cause problems for hardware that DMAs "
1646 "into the page(s).)"
1647 msgstr ""
1648 "B<fork>(2)  が行われた後、指定された範囲のページを子プロセスが利用できないよ"
1649 "うにする。 この機能は、書き込み時コピー (copy-on-write) 方式で、 B<fork>(2)  "
1650 "の後で親プロセスがページに書き込みを行った場合に ページの物理位置が変化しない"
1651 "ようにするのに有効である (ページの再配置はハードウェアがそのページに DMA 転送"
1652 "を行うような場合に 問題を起こすことがある)。"
1653
1654 #. type: TP
1655 #: build/C/man2/madvise.2:144
1656 #, no-wrap
1657 msgid "B<MADV_DOFORK> (since Linux 2.6.16)"
1658 msgstr "B<MADV_DOFORK> (Linux 2.6.16 以降)"
1659
1660 #. type: Plain text
1661 #: build/C/man2/madvise.2:150
1662 msgid ""
1663 "Undo the effect of B<MADV_DONTFORK>, restoring the default behavior, whereby "
1664 "a mapping is inherited across B<fork>(2)."
1665 msgstr ""
1666 "B<MADV_DONTFORK> の影響を取り消し、デフォルトの動作に戻す。 つまり、 "
1667 "B<fork>(2)  の前後でマッピングは継承されるようになる。"
1668
1669 #. type: TP
1670 #: build/C/man2/madvise.2:150
1671 #, no-wrap
1672 msgid "B<MADV_HWPOISON> (since Linux 2.6.32)"
1673 msgstr "B<MADV_HWPOISON> (Linux 2.6.32 以降)"
1674
1675 #. type: Plain text
1676 #: build/C/man2/madvise.2:162
1677 msgid ""
1678 "Poison a page and handle it like a hardware memory corruption.  This "
1679 "operation is available only for privileged (B<CAP_SYS_ADMIN>)  processes.  "
1680 "This operation may result in the calling process receiving a B<SIGBUS> and "
1681 "the page being unmapped.  This feature is intended for testing of memory "
1682 "error-handling code; it is available only if the kernel was configured with "
1683 "B<CONFIG_MEMORY_FAILURE>."
1684 msgstr ""
1685 "ページに毒入れを行い、ハードウェアメモリの破損のようにそのページを取り扱う。 "
1686 "この操作は特権 (B<CAP_SYS_ADMIN> を持った) プロセスだけが利用できる。 この操"
1687 "作の結果、呼び出したプロセスは B<SIGBUS> を受け取り、そのページはアンマップさ"
1688 "れる。 この機能はメモリのエラー処理コードをテストするためのものである。 カー"
1689 "ネルで B<CONFIG_MEMORY_FAILURE> が有効になっている場合にのみ利用可能である。"
1690
1691 #. type: TP
1692 #: build/C/man2/madvise.2:162
1693 #, no-wrap
1694 msgid "B<MADV_SOFT_OFFLINE> (since Linux 2.6.33)"
1695 msgstr "B<MADV_SOFT_OFFLINE> (Linux 2.6.33 以降)"
1696
1697 #. type: Plain text
1698 #: build/C/man2/madvise.2:180
1699 msgid ""
1700 "Soft offline the pages in the range specified by I<addr> and I<length>.  The "
1701 "memory of each page in the specified range is preserved (i.e., when next "
1702 "accessed, the same content will be visible, but in a new physical page "
1703 "frame), and the original page is offlined (i.e., no longer used, and taken "
1704 "out of normal memory management).  The effect of the B<MADV_SOFT_OFFLINE> "
1705 "operation is invisible to (i.e., does not change the semantics of)  the "
1706 "calling process.  This feature is intended for testing of memory error-"
1707 "handling code; it is available only if the kernel was configured with "
1708 "B<CONFIG_MEMORY_FAILURE>."
1709 msgstr ""
1710 "I<addr> と I<length> で指定された範囲のページをソフトオフラインにする。 指定"
1711 "された範囲の各ページのメモリの内容は保持され (すなわち、次にアクセスされた際"
1712 "に、同じ内容が見えるが、新しい物理ページフレームになる)、 元のフレームはオフ"
1713 "ラインになる (すなわち、 そのフレームは使用される、通常のメモリ管理からは取り"
1714 "除かれる)。 B<MADV_SOFT_OFFLINE> 操作の影響は呼び出したプロセスには見えない "
1715 "(つまり呼び出したプロセスの動作は変化しない)。 この機能はメモリのエラー処理"
1716 "コードをテストすることを目的に作られた。 カーネルで B<CONFIG_MEMORY_FAILURE> "
1717 "が有効になっている場合にのみ利用可能である。"
1718
1719 #. type: TP
1720 #: build/C/man2/madvise.2:180
1721 #, no-wrap
1722 msgid "B<MADV_MERGEABLE> (since Linux 2.6.32)"
1723 msgstr "B<MADV_MERGEABLE> (Linux 2.6.32 以降)"
1724
1725 #. type: Plain text
1726 #: build/C/man2/madvise.2:205
1727 msgid ""
1728 "Enable Kernel Samepage Merging (KSM) for the pages in the range specified by "
1729 "I<addr> and I<length>.  The kernel regularly scans those areas of user "
1730 "memory that have been marked as mergeable, looking for pages with identical "
1731 "content.  These are replaced by a single write-protected page (which is "
1732 "automatically copied if a process later wants to update the content of the "
1733 "page).  KSM merges only private anonymous pages (see B<mmap>(2)).  The KSM "
1734 "feature is intended for applications that generate many instances of the "
1735 "same data (e.g., virtualization systems such as KVM).  It can consume a lot "
1736 "of processing power; use with care.  See the Linux kernel source file "
1737 "I<Documentation/vm/ksm.txt> for more details.  The B<MADV_MERGEABLE> and "
1738 "B<MADV_UNMERGEABLE> operations are available only if the kernel was "
1739 "configured with B<CONFIG_KSM>."
1740 msgstr ""
1741 "Kernel Samepage Merging (KSM; カーネルによる同じページの統合) を I<addr> と "
1742 "I<length> で指定された領域に対して有効にする。 カーネルは、 統合可能の印がつ"
1743 "いたユーザーメモリの領域を定期的にスキャンし、内容が全く同じページを探す。 内"
1744 "容が全く同じページがあれば、それらのページは書き込み保護 (write-protected) が"
1745 "かかった一つのページで置き換えられる (プロセスが後でページの内容を更新しよう"
1746 "とした際には自動的にページのコピーが行われる)。 KSM はプライベートな無名ペー"
1747 "ジ (anonymous pages) だけを統合する (B<mmap>(2) 参照)。 KSM 機能は、 同じデー"
1748 "タのインスタンスを大量に生成するアプリケーション (KVM などの仮想化システム) "
1749 "での利用を想定している。 この機能はプロセッシング能力を大量に消費する場合があ"
1750 "り、注意して使用すること。 詳細は Linux カーネルソースファイル "
1751 "I<Documentation/vm/ksm.txt> を参照。 B<MADV_MERGEABLE> と "
1752 "B<MADV_UNMERGEABLE> は、 カーネルで B<CONFIG_KSM> オプションを有効になってい"
1753 "る場合にのみ利用できる。"
1754
1755 #. type: TP
1756 #: build/C/man2/madvise.2:205
1757 #, no-wrap
1758 msgid "B<MADV_UNMERGEABLE> (since Linux 2.6.32)"
1759 msgstr "B<MADV_UNMERGEABLE> (Linux 2.6.32 以降)"
1760
1761 #. type: Plain text
1762 #: build/C/man2/madvise.2:214
1763 msgid ""
1764 "Undo the effect of an earlier B<MADV_MERGEABLE> operation on the specified "
1765 "address range; KSM unmerges whatever pages it had merged in the address "
1766 "range specified by I<addr> and I<length>."
1767 msgstr ""
1768 "指定されたアドレス範囲に関して、それ以前に行われた B<MADV_MERGEABLE> 操作の効"
1769 "果を取り消す。 KSM は、  I<addr> と I<length> で指定されたアドレス範囲の統合"
1770 "済みのすべてのページの統合解除を行う。"
1771
1772 #. type: TP
1773 #: build/C/man2/madvise.2:214
1774 #, no-wrap
1775 msgid "B<MADV_HUGEPAGE> (since Linux 2.6.38)"
1776 msgstr "B<MADV_HUGEPAGE> (Linux 2.6.38 以降)"
1777
1778 #.  http://lwn.net/Articles/358904/
1779 #.  https://lwn.net/Articles/423584/
1780 #. type: Plain text
1781 #: build/C/man2/madvise.2:243
1782 msgid ""
1783 "Enables Transparent Huge Pages (THP) for pages in the range specified by "
1784 "I<addr> and I<length>.  Currently, Transparent Huge Pages work only with "
1785 "private anonymous pages (see B<mmap>(2)).  The kernel will regularly scan "
1786 "the areas marked as huge page candidates to replace them with huge pages.  "
1787 "The kernel will also allocate huge pages directly when the region is "
1788 "naturally aligned to the huge page size (see B<posix_memalign>(2)).  This "
1789 "feature is primarily aimed at applications that use large mappings of data "
1790 "and access large regions of that memory at a time (e.g., virtualization "
1791 "systems such as QEMU).  It can very easily waste memory (e.g., a 2MB mapping "
1792 "that only ever accesses 1 byte will result in 2MB of wired memory instead of "
1793 "one 4KB page).  See the Linux kernel source file I<Documentation/vm/"
1794 "transhuge.txt> for more details.  The B<MADV_HUGEPAGE> and "
1795 "B<MADV_NOHUGEPAGE> operations are available only if the kernel was "
1796 "configured with B<CONFIG_TRANSPARENT_HUGEPAGE>."
1797 msgstr ""
1798 "Transparent Huge Pages (THP) を I<addr> と I<length> で指定された領域に対して"
1799 "有効にする。 現在のところ、Transparent Huge Pages はプライベートな無名ページ "
1800 "(anonymous pages) についてのみ機能する。 カーネルは定期的にヒュージページ "
1801 "(huge page) 候補の印がついたページをスキャンし、ヒュージページと置き換える。 "
1802 "また、カーネルはその領域がヒュージページのサイズに合っている場合、ヒュージ"
1803 "ページを直接割り当てる (B<posix_memalign>(2) 参照)。 この機能は、大きなデータ"
1804 "マッピングを使用し、一度にそのメモリの大きな範囲にアクセスするようなアプリ"
1805 "ケーション (例えば QEMU のような仮想化システム) で使うことを主に想定されてい"
1806 "る。 この機能は非常に簡単にメモリを浪費してしまう (例えば、1 バイトしかアクセ"
1807 "スしない 2MB のマッピングが、 4KB ページではなく 2MB の実際のメモリを使ってし"
1808 "まう)。 詳細は Linux カーネルソースファイル I<Documentation/vm/transhuge."
1809 "txt> を参照。 B<MADV_HUGEPAGE> と B<MADV_NOHUGEPAGE> は、 カーネルで "
1810 "B<CONFIG_TRANSPARENT_HUGEPAGE> オプションを有効になっている場合にのみ利用でき"
1811 "る。"
1812
1813 #. type: TP
1814 #: build/C/man2/madvise.2:243
1815 #, no-wrap
1816 msgid "B<MADV_NOHUGEPAGE> (since Linux 2.6.38)"
1817 msgstr "B<MADV_NOHUGEPAGE> (Linux 2.6.38 以降)"
1818
1819 #. type: Plain text
1820 #: build/C/man2/madvise.2:250
1821 msgid ""
1822 "Ensures that memory in the address range specified by I<addr> and I<length> "
1823 "will not be collapsed into huge pages."
1824 msgstr ""
1825 "I<addr> と I<length> で指定されたアドレス範囲のメモリがヒュージページに組み込"
1826 "まれないようにする。"
1827
1828 #. type: TP
1829 #: build/C/man2/madvise.2:250
1830 #, no-wrap
1831 msgid "B<MADV_DONTDUMP> (since Linux 3.4)"
1832 msgstr "B<MADV_DONTDUMP> (Linux 3.4 以降)"
1833
1834 #. type: Plain text
1835 #: build/C/man2/madvise.2:264
1836 msgid ""
1837 "Exclude from a core dump those pages in the range specified by I<addr> and "
1838 "I<length>.  This is useful in applications that have large areas of memory "
1839 "that are known not to be useful in a core dump.  The effect of "
1840 "B<MADV_DONTDUMP> takes precedence over the bit mask that is set via the I</"
1841 "proc/PID/coredump_filter> file (see B<core>(5))."
1842 msgstr ""
1843 "コアダンプから I<addr> と I<length> で指定された範囲のページを除外する。 これ"
1844 "は、 コアダンプに含めても役に立たないことが分かっている大きなメモリ領域がある"
1845 "アプリケーションで有用である。 B<MADV_DONTDUMP> の効果は I</proc/PID/"
1846 "coredump_filter> ファイル経由で設定されたビットマスクよりも優先される "
1847 "(B<core>(5) 参照)。"
1848
1849 #. type: TP
1850 #: build/C/man2/madvise.2:264
1851 #, no-wrap
1852 msgid "B<MADV_DODUMP> (since Linux 3.4)"
1853 msgstr "B<MADV_DODUMP> (Linux 3.4 以降)"
1854
1855 #. type: Plain text
1856 #: build/C/man2/madvise.2:268
1857 msgid "Undo the effect of an earlier B<MADV_DONTDUMP>."
1858 msgstr "以前の B<MADV_DONTDUMP> の効果を取り消す。"
1859
1860 #. type: Plain text
1861 #: build/C/man2/madvise.2:275
1862 msgid ""
1863 "On success B<madvise>()  returns zero.  On error, it returns -1 and I<errno> "
1864 "is set appropriately."
1865 msgstr ""
1866 "B<madvise>()  は成功すると 0 を返す。 エラーが起こると -1 を返し、 I<errno> "
1867 "を適切な値に設定する。"
1868
1869 #. type: TP
1870 #: build/C/man2/madvise.2:276 build/C/man2/mlock.2:154 build/C/man2/mmap.2:411
1871 #: build/C/man2/mremap.2:136
1872 #, no-wrap
1873 msgid "B<EAGAIN>"
1874 msgstr "B<EAGAIN>"
1875
1876 #. type: Plain text
1877 #: build/C/man2/madvise.2:279
1878 msgid "A kernel resource was temporarily unavailable."
1879 msgstr "何らかのカーネルリソースが一時的に利用できなかった。"
1880
1881 #. type: Plain text
1882 #: build/C/man2/madvise.2:282
1883 msgid "The map exists, but the area maps something that isn't a file."
1884 msgstr "指定したマップは存在するが、ファイルではないところをマップしている。"
1885
1886 #. type: Plain text
1887 #: build/C/man2/madvise.2:285
1888 msgid "This error can occur for the following reasons:"
1889 msgstr "このエラーは以下の理由で発生する。"
1890
1891 #.  .I len
1892 #.  is zero,
1893 #. type: Plain text
1894 #: build/C/man2/madvise.2:292
1895 msgid "The value I<len> is negative."
1896 msgstr "I<len> が負の値である。"
1897
1898 #. type: Plain text
1899 #: build/C/man2/madvise.2:295
1900 msgid "I<addr> is not page-aligned."
1901 msgstr "I<addr> がページ境界ではない。"
1902
1903 #. type: Plain text
1904 #: build/C/man2/madvise.2:298
1905 msgid "I<advice> is not a valid value"
1906 msgstr "I<advice> が有効な値でない。"
1907
1908 #. type: Plain text
1909 #: build/C/man2/madvise.2:301
1910 msgid ""
1911 "The application is attempting to release locked or shared pages (with "
1912 "B<MADV_DONTNEED>)."
1913 msgstr ""
1914 "アプリケーションがロックされたページや共有ページを (B<MADV_DONTNEED> で) 解"
1915 "放\n"
1916 "しようとしている。"
1917
1918 #. type: Plain text
1919 #: build/C/man2/madvise.2:309
1920 msgid ""
1921 "B<MADV_MERGEABLE> or B<MADV_UNMERGEABLE> was specified in I<advice>, but the "
1922 "kernel was not configured with B<CONFIG_KSM>."
1923 msgstr ""
1924 "I<advice> に B<MADV_MERGEABLE> か B<MADV_UNMERGEABLE> が指定されたが、 カーネ"
1925 "ルの設定が B<CONFIG_KSM> が有効になっていなかった。"
1926
1927 #. type: Plain text
1928 #: build/C/man2/madvise.2:316
1929 msgid ""
1930 "(for B<MADV_WILLNEED>)  Paging in this area would exceed the process's "
1931 "maximum resident set size."
1932 msgstr ""
1933 "(B<MADV_WILLNEED> の場合) この範囲のページングを行うと、 プロセスの RSS "
1934 "(resident set size) の最大値を越えてしまう。"
1935
1936 #. type: TP
1937 #: build/C/man2/madvise.2:316 build/C/man2/madvise.2:321
1938 #: build/C/man2/mlock.2:123 build/C/man2/mlock.2:131 build/C/man2/mlock.2:169
1939 #: build/C/man2/mmap.2:454 build/C/man2/mprotect.2:100
1940 #: build/C/man2/mprotect.2:103 build/C/man2/mremap.2:179
1941 #: build/C/man2/msync.2:93 build/C/man3/posix_memalign.3:164
1942 #: build/C/man2/shmctl.2:337 build/C/man2/shmget.2:230
1943 #: build/C/man2/shmop.2:211 build/C/man2/subpage_prot.2:87
1944 #: build/C/man2/sync_file_range.2:163
1945 #, no-wrap
1946 msgid "B<ENOMEM>"
1947 msgstr "B<ENOMEM>"
1948
1949 #. type: Plain text
1950 #: build/C/man2/madvise.2:321
1951 msgid "(for B<MADV_WILLNEED>)  Not enough memory: paging in failed."
1952 msgstr "(B<MADV_WILLNEED> の場合) メモリが足りず、ページングに失敗した。"
1953
1954 #. type: Plain text
1955 #: build/C/man2/madvise.2:325
1956 msgid ""
1957 "Addresses in the specified range are not currently mapped, or are outside "
1958 "the address space of the process."
1959 msgstr ""
1960 "指定した範囲のアドレスが、現在マップされていない。 あるいはプロセスのアドレス"
1961 "空間の内部にない。"
1962
1963 #.  FIXME . Write a posix_madvise(3) page.
1964 #. type: Plain text
1965 #: build/C/man2/madvise.2:338
1966 msgid ""
1967 "POSIX.1b.  POSIX.1-2001 describes B<posix_madvise>(3)  with constants "
1968 "B<POSIX_MADV_NORMAL>, B<POSIX_MADV_RANDOM>, and so on, with a behavior close "
1969 "to that described here.  There is a similar B<posix_fadvise>(2)  for file "
1970 "access."
1971 msgstr ""
1972 "POSIX.1b.  POSIX.1-2001 では、 B<posix_madvise>(3)  を B<POSIX_MADV_NORMAL>, "
1973 "B<POSIX_MADV_RANDOM> などの定数とともに記述していた (それぞれの振る舞いはここ"
1974 "で述べたものに近い)。 ファイルアクセスに対しても B<posix_fadvise>(2)  という"
1975 "類似の関数が存在する。"
1976
1977 #. type: Plain text
1978 #: build/C/man2/madvise.2:347
1979 msgid ""
1980 "B<MADV_REMOVE>, B<MADV_DONTFORK>, B<MADV_DOFORK>, B<MADV_HWPOISON>, "
1981 "B<MADV_MERGEABLE>, and B<MADV_UNMERGEABLE> are Linux-specific."
1982 msgstr ""
1983 "B<MADV_REMOVE>, B<MADV_DONTFORK>, B<MADV_DOFORK>, B<MADV_HWPOISON>,\n"
1984 "B<MADV_MERGEABLE>, B<MADV_UNMERGEABLE> は Linux 固有である。"
1985
1986 #. type: SS
1987 #: build/C/man2/madvise.2:348 build/C/man2/mlock.2:274
1988 #: build/C/man2/shmget.2:330
1989 #, no-wrap
1990 msgid "Linux notes"
1991 msgstr "Linux での注意"
1992
1993 #. type: Plain text
1994 #: build/C/man2/madvise.2:356
1995 msgid ""
1996 "The current Linux implementation (2.4.0) views this system call more as a "
1997 "command than as advice and hence may return an error when it cannot do what "
1998 "it usually would do in response to this advice.  (See the ERRORS description "
1999 "above.)  This is nonstandard behavior."
2000 msgstr ""
2001 "現在の Linux の実装 (2.4.0) では、 このシステムコールをアドバイスというよりは"
2002 "命令と見ている。 したがってこのアドバイスに対して通常行われる動作が不可能な場"
2003 "合は、 エラーを返すことがある (上記の エラー の記述を参照)。 この振舞いは標準"
2004 "とは異なる。"
2005
2006 #.  .SH HISTORY
2007 #.  The
2008 #.  .BR madvise ()
2009 #.  function first appeared in 4.4BSD.
2010 #. type: Plain text
2011 #: build/C/man2/madvise.2:372
2012 msgid ""
2013 "The Linux implementation requires that the address I<addr> be page-aligned, "
2014 "and allows I<length> to be zero.  If there are some parts of the specified "
2015 "address range that are not mapped, the Linux version of B<madvise>()  "
2016 "ignores them and applies the call to the rest (but returns B<ENOMEM> from "
2017 "the system call, as it should)."
2018 msgstr ""
2019 "Linux の実装では I<addr> のアドレスはページ境界の値でなければならない。また "
2020 "I<length> は 0 であっても構わない。 また Linux 版の B<madvise>()  では、指定"
2021 "されたアドレス範囲にマップされていない部分があると、 これらを無視して残りの部"
2022 "分にアドバイスを適用する (しかしシステムコールに対してはちゃんと B<ENOMEM> を"
2023 "返す)。"
2024
2025 #. type: Plain text
2026 #: build/C/man2/madvise.2:381
2027 msgid ""
2028 "B<getrlimit>(2), B<mincore>(2), B<mmap>(2), B<mprotect>(2), B<msync>(2), "
2029 "B<munmap>(2), B<prctl>(2), B<core>(5)"
2030 msgstr ""
2031 "B<getrlimit>(2), B<mincore>(2), B<mmap>(2), B<mprotect>(2), B<msync>(2), "
2032 "B<munmap>(2), B<prctl>(2), B<core>(5)"
2033
2034 #. type: TH
2035 #: build/C/man3/mallinfo.3:26
2036 #, no-wrap
2037 msgid "MALLINFO"
2038 msgstr "MALLINFO"
2039
2040 #. type: TH
2041 #: build/C/man3/mallinfo.3:26 build/C/man3/malloc_stats.3:26
2042 #, no-wrap
2043 msgid "2012-05-06"
2044 msgstr "2012-05-06"
2045
2046 #. type: Plain text
2047 #: build/C/man3/mallinfo.3:29
2048 msgid "mallinfo - obtain memory allocation information"
2049 msgstr "mallinfo - メモリ割り当て情報を取得する"
2050
2051 #. type: Plain text
2052 #: build/C/man3/mallinfo.3:31 build/C/man3/malloc_stats.3:31
2053 #: build/C/man3/malloc_trim.3:31 build/C/man3/malloc_usable_size.3:30
2054 #: build/C/man3/mallopt.3:31
2055 msgid "B<#include E<lt>malloc.hE<gt>>"
2056 msgstr "B<#include E<lt>malloc.hE<gt>>"
2057
2058 #. type: Plain text
2059 #: build/C/man3/mallinfo.3:33
2060 msgid "B<struct mallinfo mallinfo(void);>"
2061 msgstr "B<struct mallinfo mallinfo(void);>"
2062
2063 #. type: Plain text
2064 #: build/C/man3/mallinfo.3:41
2065 msgid ""
2066 "The B<mallinfo>()  function returns a copy of a structure containing "
2067 "information about memory allocations performed by B<malloc>(3)  and related "
2068 "functions.  This structure is defined as follows:"
2069 msgstr ""
2070 "B<mallinfo>() 関数は、 B<malloc>(3) や一連の関数により実行されたメモリ\n"
2071 "割り当てに関する情報を格納した構造体のコピーを返す。\n"
2072 "この構造体は以下のように定義されている。"
2073
2074 #. type: Plain text
2075 #: build/C/man3/mallinfo.3:56
2076 #, no-wrap
2077 msgid ""
2078 "struct mallinfo {\n"
2079 "    int arena;     /* Non-mmapped space allocated (bytes) */\n"
2080 "    int ordblks;   /* Number of free chunks */\n"
2081 "    int smblks;    /* Number of free fastbin blocks */\n"
2082 "    int hblks;     /* Number of mmapped regions */\n"
2083 "    int hblkhd;    /* Space allocated in mmapped regions (bytes) */\n"
2084 "    int usmblks;   /* Maximum total allocated space (bytes) */\n"
2085 "    int fsmblks;   /* Space in freed fastbin blocks (bytes) */\n"
2086 "    int uordblks;  /* Total allocated space (bytes) */\n"
2087 "    int fordblks;  /* Total free space (bytes) */\n"
2088 "    int keepcost;  /* Top-most, releasable space (bytes) */\n"
2089 "};\n"
2090 msgstr ""
2091 "struct mallinfo {\n"
2092 "    int arena;     /* Non-mmapped space allocated (bytes) */\n"
2093 "    int ordblks;   /* Number of free chunks */\n"
2094 "    int smblks;    /* Number of free fastbin blocks */\n"
2095 "    int hblks;     /* Number of mmapped regions */\n"
2096 "    int hblkhd;    /* Space allocated in mmapped regions (bytes) */\n"
2097 "    int usmblks;   /* Maximum total allocated space (bytes) */\n"
2098 "    int fsmblks;   /* Space in freed fastbin blocks (bytes) */\n"
2099 "    int uordblks;  /* Total allocated space (bytes) */\n"
2100 "    int fordblks;  /* Total free space (bytes) */\n"
2101 "    int keepcost;  /* Top-most, releasable space (bytes) */\n"
2102 "};\n"
2103
2104 #. type: Plain text
2105 #: build/C/man3/mallinfo.3:62
2106 msgid ""
2107 "The fields of the I<mallinfo> structure contain the following information:"
2108 msgstr "I<mallinfo> 構造体の各フィールドには以下の情報が格納される。"
2109
2110 #. type: TP
2111 #: build/C/man3/mallinfo.3:62
2112 #, no-wrap
2113 msgid "I<arena>"
2114 msgstr "I<arena>"
2115
2116 #. type: Plain text
2117 #: build/C/man3/mallinfo.3:68
2118 msgid ""
2119 "The total amount of memory allocated by means other than B<mmap>(2)  (i.e., "
2120 "memory allocated on the heap).  This figure includes both in-use blocks and "
2121 "blocks on the free list."
2122 msgstr ""
2123
2124 #. type: TP
2125 #: build/C/man3/mallinfo.3:68
2126 #, no-wrap
2127 msgid "I<ordblks>"
2128 msgstr "I<ordblks>"
2129
2130 #. type: Plain text
2131 #: build/C/man3/mallinfo.3:71
2132 msgid "The number of ordinary (i.e., non-fastbin) free blocks."
2133 msgstr ""
2134
2135 #. type: TP
2136 #: build/C/man3/mallinfo.3:71
2137 #, no-wrap
2138 msgid "I<smblks>"
2139 msgstr "I<smblks>"
2140
2141 #. type: Plain text
2142 #: build/C/man3/mallinfo.3:75
2143 msgid "The number of fastbin free blocks (see B<mallopt>(3))."
2144 msgstr ""
2145
2146 #. type: TP
2147 #: build/C/man3/mallinfo.3:75
2148 #, no-wrap
2149 msgid "I<hblks>"
2150 msgstr "I<hblks>"
2151
2152 #. type: Plain text
2153 #: build/C/man3/mallinfo.3:83
2154 msgid ""
2155 "The number of blocks currently allocated using B<mmap>(2).  (See the "
2156 "discussion of B<M_MMAP_THRESHOLD> in B<mallopt>(3).)"
2157 msgstr ""
2158
2159 #. type: TP
2160 #: build/C/man3/mallinfo.3:83
2161 #, no-wrap
2162 msgid "I<hblkhd>"
2163 msgstr "I<hblkhd>"
2164
2165 #. type: Plain text
2166 #: build/C/man3/mallinfo.3:87
2167 msgid "The number of bytes in blocks currently allocated using B<mmap>(2)."
2168 msgstr ""
2169
2170 #. type: TP
2171 #: build/C/man3/mallinfo.3:87
2172 #, no-wrap
2173 msgid "I<usmblks>"
2174 msgstr "I<usmblks>"
2175
2176 #. type: Plain text
2177 #: build/C/man3/mallinfo.3:92
2178 msgid ""
2179 "The \"highwater mark\" for allocated space\\(emthat is, the maximum amount "
2180 "of space that was ever allocated.  This field is maintained only in "
2181 "nonthreading environments."
2182 msgstr ""
2183
2184 #. type: TP
2185 #: build/C/man3/mallinfo.3:92
2186 #, no-wrap
2187 msgid "I<fsmblks>"
2188 msgstr "I<fsmblks>"
2189
2190 #. type: Plain text
2191 #: build/C/man3/mallinfo.3:95
2192 msgid "The total number of bytes in fastbin free blocks."
2193 msgstr ""
2194
2195 #. type: TP
2196 #: build/C/man3/mallinfo.3:95
2197 #, no-wrap
2198 msgid "I<uordblks>"
2199 msgstr "I<uordblks>"
2200
2201 #. type: Plain text
2202 #: build/C/man3/mallinfo.3:98
2203 msgid "The total number of bytes used by in-use allocations."
2204 msgstr ""
2205
2206 #. type: TP
2207 #: build/C/man3/mallinfo.3:98
2208 #, no-wrap
2209 msgid "I<fordblks>"
2210 msgstr "I<fordblks>"
2211
2212 #. type: Plain text
2213 #: build/C/man3/mallinfo.3:101
2214 msgid "The total number of bytes in free blocks."
2215 msgstr ""
2216
2217 #. type: TP
2218 #: build/C/man3/mallinfo.3:101
2219 #, no-wrap
2220 msgid "I<keepcost>"
2221 msgstr "I<keepcost>"
2222
2223 #.  .SH VERSIONS
2224 #.  Available already in glibc 2.0, possibly earlier
2225 #. type: Plain text
2226 #: build/C/man3/mallinfo.3:110
2227 msgid ""
2228 "The total amount of releasable free space at the top of the heap.  This is "
2229 "the maximum number of bytes that could ideally (i.e., ignoring page "
2230 "alignment restrictions, and so on) be released by B<malloc_trim>(3)."
2231 msgstr ""
2232
2233 #. type: Plain text
2234 #: build/C/man3/mallinfo.3:114
2235 msgid ""
2236 "This function is not specified by POSIX or the C standards.  A similar "
2237 "function exists on many System V derivatives, and was specified in the SVID."
2238 msgstr ""
2239
2240 #.  FIXME http://sourceware.org/bugzilla/show_bug.cgi?id=208
2241 #.  See the 24 Aug 2011 mail by Paul Pluzhnikov:
2242 #.      "[patch] Fix mallinfo() to accumulate results for all arenas"
2243 #.  on libc-alpha@sourceware.org
2244 #. type: Plain text
2245 #: build/C/man3/mallinfo.3:126
2246 msgid ""
2247 "B<Information is returned for only the main memory allocation area.> "
2248 "Allocations in other arenas are excluded.  See B<malloc_stats>(3)  and "
2249 "B<malloc_info>(3)  for alternatives that include information about other "
2250 "arenas."
2251 msgstr ""
2252
2253 #. type: Plain text
2254 #: build/C/man3/mallinfo.3:134
2255 msgid ""
2256 "The fields of the I<mallinfo> structure are typed as I<int>.  However, "
2257 "because some internal bookkeeping values may be of type I<long>, the "
2258 "reported values may wrap around zero and thus be inaccurate."
2259 msgstr ""
2260
2261 #. type: SH
2262 #: build/C/man3/mallinfo.3:134 build/C/man3/malloc_hook.3:89
2263 #: build/C/man3/malloc_info.3:84 build/C/man3/mallopt.3:466
2264 #: build/C/man3/mcheck.3:159 build/C/man2/mmap.2:628
2265 #: build/C/man2/mprotect.2:148 build/C/man3/mtrace.3:108
2266 #, no-wrap
2267 msgid "EXAMPLE"
2268 msgstr "例"
2269
2270 #. type: Plain text
2271 #: build/C/man3/mallinfo.3:140
2272 msgid ""
2273 "The program below employs B<mallinfo>()  to retrieve memory allocation "
2274 "statistics before and after allocating and freeing some blocks of memory.  "
2275 "The statistics are displayed on standard output."
2276 msgstr ""
2277
2278 #. type: Plain text
2279 #: build/C/man3/mallinfo.3:144
2280 msgid ""
2281 "The first two command-line arguments specify the number and size of blocks "
2282 "to be allocated with B<malloc>(3)."
2283 msgstr ""
2284
2285 #. type: Plain text
2286 #: build/C/man3/mallinfo.3:158
2287 msgid ""
2288 "The remaining three arguments specify which of the allocated blocks should "
2289 "be freed with B<free>(3).  These three arguments are optional, and specify "
2290 "(in order): the step size to be used in the loop that frees blocks (the "
2291 "default is 1, meaning free all blocks in the range); the ordinal position of "
2292 "the first block to be freed (default 0, meaning the first allocated block); "
2293 "and a number one greater than the ordinal position of the last block to be "
2294 "freed (default is one greater than the maximum block number).  If these "
2295 "three arguments are omitted, then the defaults cause all allocated blocks to "
2296 "be freed."
2297 msgstr ""
2298
2299 #. type: Plain text
2300 #: build/C/man3/mallinfo.3:162
2301 msgid ""
2302 "In the following example run of the program, 1000 allocations of 100 bytes "
2303 "are performed, and then every second allocated block is freed:"
2304 msgstr ""
2305
2306 #. type: Plain text
2307 #: build/C/man3/mallinfo.3:177
2308 #, no-wrap
2309 msgid ""
2310 "$ B<./a.out 1000 100 2>\n"
2311 "============== Before allocating blocks ==============\n"
2312 "Total non-mmapped bytes (arena):       0\n"
2313 "# of free chunks (ordblks):            1\n"
2314 "# of free fastbin blocks (smblks):     0\n"
2315 "# of mapped regions (hblks):           0\n"
2316 "Bytes in mapped regions (hblkhd):      0\n"
2317 "Max. total allocated space (usmblks):  0\n"
2318 "Free bytes held in fastbins (fsmblks): 0\n"
2319 "Total allocated space (uordblks):      0\n"
2320 "Total free space (fordblks):           0\n"
2321 "Topmost releasable block (keepcost):   0\n"
2322 msgstr ""
2323 "$ B<./a.out 1000 100 2>\n"
2324 "============== Before allocating blocks ==============\n"
2325 "Total non-mmapped bytes (arena):       0\n"
2326 "# of free chunks (ordblks):            1\n"
2327 "# of free fastbin blocks (smblks):     0\n"
2328 "# of mapped regions (hblks):           0\n"
2329 "Bytes in mapped regions (hblkhd):      0\n"
2330 "Max. total allocated space (usmblks):  0\n"
2331 "Free bytes held in fastbins (fsmblks): 0\n"
2332 "Total allocated space (uordblks):      0\n"
2333 "Total free space (fordblks):           0\n"
2334 "Topmost releasable block (keepcost):   0\n"
2335
2336 #. type: Plain text
2337 #: build/C/man3/mallinfo.3:189
2338 #, no-wrap
2339 msgid ""
2340 "============== After allocating blocks ==============\n"
2341 "Total non-mmapped bytes (arena):       135168\n"
2342 "# of free chunks (ordblks):            1\n"
2343 "# of free fastbin blocks (smblks):     0\n"
2344 "# of mapped regions (hblks):           0\n"
2345 "Bytes in mapped regions (hblkhd):      0\n"
2346 "Max. total allocated space (usmblks):  0\n"
2347 "Free bytes held in fastbins (fsmblks): 0\n"
2348 "Total allocated space (uordblks):      104000\n"
2349 "Total free space (fordblks):           31168\n"
2350 "Topmost releasable block (keepcost):   31168\n"
2351 msgstr ""
2352 "============== After allocating blocks ==============\n"
2353 "Total non-mmapped bytes (arena):       135168\n"
2354 "# of free chunks (ordblks):            1\n"
2355 "# of free fastbin blocks (smblks):     0\n"
2356 "# of mapped regions (hblks):           0\n"
2357 "Bytes in mapped regions (hblkhd):      0\n"
2358 "Max. total allocated space (usmblks):  0\n"
2359 "Free bytes held in fastbins (fsmblks): 0\n"
2360 "Total allocated space (uordblks):      104000\n"
2361 "Total free space (fordblks):           31168\n"
2362 "Topmost releasable block (keepcost):   31168\n"
2363
2364 #. type: Plain text
2365 #: build/C/man3/mallinfo.3:201
2366 #, no-wrap
2367 msgid ""
2368 "============== After freeing blocks ==============\n"
2369 "Total non-mmapped bytes (arena):       135168\n"
2370 "# of free chunks (ordblks):            501\n"
2371 "# of free fastbin blocks (smblks):     0\n"
2372 "# of mapped regions (hblks):           0\n"
2373 "Bytes in mapped regions (hblkhd):      0\n"
2374 "Max. total allocated space (usmblks):  0\n"
2375 "Free bytes held in fastbins (fsmblks): 0\n"
2376 "Total allocated space (uordblks):      52000\n"
2377 "Total free space (fordblks):           83168\n"
2378 "Topmost releasable block (keepcost):   31168\n"
2379 msgstr ""
2380 "============== After freeing blocks ==============\n"
2381 "Total non-mmapped bytes (arena):       135168\n"
2382 "# of free chunks (ordblks):            501\n"
2383 "# of free fastbin blocks (smblks):     0\n"
2384 "# of mapped regions (hblks):           0\n"
2385 "Bytes in mapped regions (hblkhd):      0\n"
2386 "Max. total allocated space (usmblks):  0\n"
2387 "Free bytes held in fastbins (fsmblks): 0\n"
2388 "Total allocated space (uordblks):      52000\n"
2389 "Total free space (fordblks):           83168\n"
2390 "Topmost releasable block (keepcost):   31168\n"
2391
2392 #. type: SS
2393 #: build/C/man3/mallinfo.3:203 build/C/man3/malloc_info.3:167
2394 #: build/C/man3/mallopt.3:532 build/C/man3/mcheck.3:176
2395 #: build/C/man2/mmap.2:640 build/C/man2/mprotect.2:165
2396 #, no-wrap
2397 msgid "Program source"
2398 msgstr "プログラムのソース"
2399
2400 #. type: Plain text
2401 #: build/C/man3/mallinfo.3:208
2402 #, no-wrap
2403 msgid ""
2404 "#include E<lt>malloc.hE<gt>\n"
2405 "#include \"tlpi_hdr.h\"\n"
2406 msgstr ""
2407 "#include E<lt>malloc.hE<gt>\n"
2408 "#include \"tlpi_hdr.h\"\n"
2409
2410 #. type: Plain text
2411 #: build/C/man3/mallinfo.3:213
2412 #, no-wrap
2413 msgid ""
2414 "static void\n"
2415 "display_mallinfo(void)\n"
2416 "{\n"
2417 "    struct mallinfo mi;\n"
2418 msgstr ""
2419 "static void\n"
2420 "display_mallinfo(void)\n"
2421 "{\n"
2422 "    struct mallinfo mi;\n"
2423
2424 #. type: Plain text
2425 #: build/C/man3/mallinfo.3:215
2426 #, no-wrap
2427 msgid "    mi = mallinfo();\n"
2428 msgstr "    mi = mallinfo();\n"
2429
2430 #. type: Plain text
2431 #: build/C/man3/mallinfo.3:227
2432 #, no-wrap
2433 msgid ""
2434 "    printf(\"Total non-mmapped bytes (arena):       %d\\en\", mi.arena);\n"
2435 "    printf(\"# of free chunks (ordblks):            %d\\en\", mi.ordblks);\n"
2436 "    printf(\"# of free fastbin blocks (smblks):     %d\\en\", mi.smblks);\n"
2437 "    printf(\"# of mapped regions (hblks):           %d\\en\", mi.hblks);\n"
2438 "    printf(\"Bytes in mapped regions (hblkhd):      %d\\en\", mi.hblkhd);\n"
2439 "    printf(\"Max. total allocated space (usmblks):  %d\\en\", mi.usmblks);\n"
2440 "    printf(\"Free bytes held in fastbins (fsmblks): %d\\en\", mi.fsmblks);\n"
2441 "    printf(\"Total allocated space (uordblks):      %d\\en\", mi.uordblks);\n"
2442 "    printf(\"Total free space (fordblks):           %d\\en\", mi.fordblks);\n"
2443 "    printf(\"Topmost releasable block (keepcost):   %d\\en\", mi.keepcost);\n"
2444 "}\n"
2445 msgstr ""
2446 "    printf(\"Total non-mmapped bytes (arena):       %d\\en\", mi.arena);\n"
2447 "    printf(\"# of free chunks (ordblks):            %d\\en\", mi.ordblks);\n"
2448 "    printf(\"# of free fastbin blocks (smblks):     %d\\en\", mi.smblks);\n"
2449 "    printf(\"# of mapped regions (hblks):           %d\\en\", mi.hblks);\n"
2450 "    printf(\"Bytes in mapped regions (hblkhd):      %d\\en\", mi.hblkhd);\n"
2451 "    printf(\"Max. total allocated space (usmblks):  %d\\en\", mi.usmblks);\n"
2452 "    printf(\"Free bytes held in fastbins (fsmblks): %d\\en\", mi.fsmblks);\n"
2453 "    printf(\"Total allocated space (uordblks):      %d\\en\", mi.uordblks);\n"
2454 "    printf(\"Total free space (fordblks):           %d\\en\", mi.fordblks);\n"
2455 "    printf(\"Topmost releasable block (keepcost):   %d\\en\", mi.keepcost);\n"
2456 "}\n"
2457
2458 #. type: Plain text
2459 #: build/C/man3/mallinfo.3:235
2460 #, no-wrap
2461 msgid ""
2462 "int\n"
2463 "main(int argc, char *argv[])\n"
2464 "{\n"
2465 "#define MAX_ALLOCS 2000000\n"
2466 "    char *alloc[MAX_ALLOCS];\n"
2467 "    int numBlocks, j, freeBegin, freeEnd, freeStep;\n"
2468 "    size_t blockSize;\n"
2469 msgstr ""
2470 "int\n"
2471 "main(int argc, char *argv[])\n"
2472 "{\n"
2473 "#define MAX_ALLOCS 2000000\n"
2474 "    char *alloc[MAX_ALLOCS];\n"
2475 "    int numBlocks, j, freeBegin, freeEnd, freeStep;\n"
2476 "    size_t blockSize;\n"
2477
2478 #. type: Plain text
2479 #: build/C/man3/mallinfo.3:239
2480 #, no-wrap
2481 msgid ""
2482 "    if (argc E<lt> 3 || strcmp(argv[1], \"--help\") == 0)\n"
2483 "        usageErr(\"%s num-blocks block-size [free-step [start-free \"\n"
2484 "                \"[end-free]]]\\en\", argv[0]);\n"
2485 msgstr ""
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
2490 #. type: Plain text
2491 #: build/C/man3/mallinfo.3:245
2492 #, no-wrap
2493 msgid ""
2494 "    numBlocks = atoi(argv[1]);\n"
2495 "    blockSize = atoi(argv[2]);\n"
2496 "    freeStep = (argc E<gt> 3) ? atoi(argv[3]) : 1;\n"
2497 "    freeBegin = (argc E<gt> 4) ? atoi(argv[4]) : 0;\n"
2498 "    freeEnd = (argc E<gt> 5) ? atoi(argv[5]) : numBlocks;\n"
2499 msgstr ""
2500 "    numBlocks = atoi(argv[1]);\n"
2501 "    blockSize = atoi(argv[2]);\n"
2502 "    freeStep = (argc E<gt> 3) ? atoi(argv[3]) : 1;\n"
2503 "    freeBegin = (argc E<gt> 4) ? atoi(argv[4]) : 0;\n"
2504 "    freeEnd = (argc E<gt> 5) ? atoi(argv[5]) : numBlocks;\n"
2505
2506 #. type: Plain text
2507 #: build/C/man3/mallinfo.3:248
2508 #, no-wrap
2509 msgid ""
2510 "    printf(\"============== Before allocating blocks ==============\\en\");\n"
2511 "    display_mallinfo();\n"
2512 msgstr ""
2513 "    printf(\"============== Before allocating blocks ==============\\en\");\n"
2514 "    display_mallinfo();\n"
2515
2516 #. type: Plain text
2517 #: build/C/man3/mallinfo.3:252
2518 #, no-wrap
2519 msgid ""
2520 "    for (j = 0; j E<lt> numBlocks; j++) {\n"
2521 "        if (numBlocks E<gt>= MAX_ALLOCS)\n"
2522 "            fatal(\"Too many allocations\");\n"
2523 msgstr ""
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
2528 #. type: Plain text
2529 #: build/C/man3/mallinfo.3:257
2530 #, no-wrap
2531 msgid ""
2532 "        alloc[j] = malloc(blockSize);\n"
2533 "        if (alloc[j] == NULL)\n"
2534 "            errExit(\"malloc\");\n"
2535 "    }\n"
2536 msgstr ""
2537 "        alloc[j] = malloc(blockSize);\n"
2538 "        if (alloc[j] == NULL)\n"
2539 "            errExit(\"malloc\");\n"
2540 "    }\n"
2541
2542 #. type: Plain text
2543 #: build/C/man3/mallinfo.3:260
2544 #, no-wrap
2545 msgid ""
2546 "    printf(\"\\en============== After allocating blocks ==============\\en\");\n"
2547 "    display_mallinfo();\n"
2548 msgstr ""
2549 "    printf(\"\\en============== After allocating blocks ==============\\en\");\n"
2550 "    display_mallinfo();\n"
2551
2552 #. type: Plain text
2553 #: build/C/man3/mallinfo.3:263
2554 #, no-wrap
2555 msgid ""
2556 "    for (j = freeBegin; j E<lt> freeEnd; j += freeStep)\n"
2557 "        free(alloc[j]);\n"
2558 msgstr ""
2559 "    for (j = freeBegin; j E<lt> freeEnd; j += freeStep)\n"
2560 "        free(alloc[j]);\n"
2561
2562 #. type: Plain text
2563 #: build/C/man3/mallinfo.3:266
2564 #, no-wrap
2565 msgid ""
2566 "    printf(\"\\en============== After freeing blocks ==============\\en\");\n"
2567 "    display_mallinfo();\n"
2568 msgstr ""
2569 "    printf(\"\\en============== After freeing blocks ==============\\en\");\n"
2570 "    display_mallinfo();\n"
2571
2572 #. type: Plain text
2573 #: build/C/man3/mallinfo.3:269 build/C/man3/malloc_info.3:255
2574 #: build/C/man3/mallopt.3:565 build/C/man3/mcheck.3:203
2575 #: build/C/man2/mmap.2:709
2576 #, no-wrap
2577 msgid ""
2578 "    exit(EXIT_SUCCESS);\n"
2579 "}\n"
2580 msgstr ""
2581 "    exit(EXIT_SUCCESS);\n"
2582 "}\n"
2583
2584 #. type: Plain text
2585 #: build/C/man3/mallinfo.3:279
2586 msgid ""
2587 "B<mmap>(2), B<malloc>(3), B<malloc_info>(3), B<malloc_stats>(3), "
2588 "B<malloc_trim>(3), B<mallopt>(3)"
2589 msgstr ""
2590 "B<mmap>(2), B<malloc>(3), B<malloc_info>(3), B<malloc_stats>(3), "
2591 "B<malloc_trim>(3), B<mallopt>(3)"
2592
2593 #. type: TH
2594 #: build/C/man3/malloc_get_state.3:25
2595 #, no-wrap
2596 msgid "MALLOC_GET_STATE"
2597 msgstr "MALLOC_GET_STATE"
2598
2599 #. type: TH
2600 #: build/C/man3/malloc_get_state.3:25
2601 #, no-wrap
2602 msgid "2012-05-04"
2603 msgstr "2012-05-04"
2604
2605 #. type: Plain text
2606 #: build/C/man3/malloc_get_state.3:28
2607 msgid ""
2608 "malloc_get_state, malloc_set_state - record and restore state of malloc "
2609 "implementation"
2610 msgstr ""
2611
2612 #. type: Plain text
2613 #: build/C/man3/malloc_get_state.3:31 build/C/man3/posix_memalign.3:35
2614 #, no-wrap
2615 msgid "B<#include E<lt>stdlib.hE<gt>>\n"
2616 msgstr "B<#include E<lt>stdlib.hE<gt>>\n"
2617
2618 #. type: Plain text
2619 #: build/C/man3/malloc_get_state.3:33
2620 #, no-wrap
2621 msgid "B<void* malloc_get_state(void);>\n"
2622 msgstr "B<void* malloc_get_state(void);>\n"
2623
2624 #. type: Plain text
2625 #: build/C/man3/malloc_get_state.3:35
2626 #, no-wrap
2627 msgid "B<int malloc_set_state(void *>I<state>B<);>\n"
2628 msgstr "B<int malloc_set_state(void *>I<state>B<);>\n"
2629
2630 #. type: Plain text
2631 #: build/C/man3/malloc_get_state.3:53
2632 msgid ""
2633 "The B<malloc_get_state>()  function records the current state of all "
2634 "B<malloc>(3)  internal bookkeeping variables (but not the actual contents of "
2635 "the heap or the state of B<malloc_hook>(3)  functions pointers).  The state "
2636 "is recorded in a system-dependent opaque data structure dynamically "
2637 "allocated via B<malloc>(3), and a pointer to that data structure is returned "
2638 "as the function result.  (It is the caller's responsibility to B<free>(3)  "
2639 "this memory.)"
2640 msgstr ""
2641
2642 #. type: Plain text
2643 #: build/C/man3/malloc_get_state.3:61
2644 msgid ""
2645 "The B<malloc_set_state>()  function restores the state of all B<malloc>(3)  "
2646 "internal bookkeeping variables to the values recorded in the opaque data "
2647 "structure pointed to by I<state>."
2648 msgstr ""
2649
2650 #. type: Plain text
2651 #: build/C/man3/malloc_get_state.3:68
2652 msgid ""
2653 "On success, B<malloc_get_state>()  returns a pointer to a newly allocated "
2654 "opaque data structure.  On error (for example, memory could not be allocated "
2655 "for the data structure), B<malloc_get_state>()  returns NULL."
2656 msgstr ""
2657
2658 #.  if(ms->magic != MALLOC_STATE_MAGIC) return -1;
2659 #.  /* Must fail if the major version is too high. */
2660 #.  if((ms->version & ~0xffl) > (MALLOC_STATE_VERSION & ~0xffl)) return -2;
2661 #. type: Plain text
2662 #: build/C/man3/malloc_get_state.3:86
2663 msgid ""
2664 "On success, B<malloc_set_state>()  returns 0.  If the implementation detects "
2665 "that I<state> does not point to a correctly formed data structure, "
2666 "B<malloc_set_state>()  returns -1.  If the implementation detects that the "
2667 "version of the data structure referred to by I<state> is a more recent "
2668 "version than this implementation knows about, B<malloc_set_state>()  returns "
2669 "-2."
2670 msgstr ""
2671
2672 #. type: Plain text
2673 #: build/C/man3/malloc_get_state.3:88 build/C/man3/malloc_hook.3:82
2674 #: build/C/man3/mcheck.3:147 build/C/man3/mtrace.3:80
2675 msgid "These functions are GNU extensions."
2676 msgstr "これらの関数は GNU による拡張である。"
2677
2678 #. type: Plain text
2679 #: build/C/man3/malloc_get_state.3:94
2680 msgid ""
2681 "These functions are useful when using this B<malloc>(3)  implementation as "
2682 "part of a shared library, and the heap contents are saved/restored via some "
2683 "other method.  This technique is used by GNU Emacs to implement its \"dumping"
2684 "\" function."
2685 msgstr ""
2686
2687 #.  i.e., calls __malloc_check_init()
2688 #.  i.e., malloc checking is not already in use
2689 #.  and the caller requested malloc checking
2690 #. type: Plain text
2691 #: build/C/man3/malloc_get_state.3:111
2692 msgid ""
2693 "Hook function pointers are never saved or restored by these functions, with "
2694 "two exceptions: if malloc checking (see B<mallopt>(3))  was in use when "
2695 "B<malloc_get_state>()  was called, then B<malloc_set_state>()  resets malloc "
2696 "checking hooks if possible; if malloc checking was not in use in the "
2697 "recorded state, but the caller has requested malloc checking, then the hooks "
2698 "are reset to 0."
2699 msgstr ""
2700
2701 #. type: Plain text
2702 #: build/C/man3/malloc_get_state.3:114
2703 msgid "B<malloc>(3), B<mallopt>(3)"
2704 msgstr "B<malloc>(3), B<mallopt>(3)"
2705
2706 #. type: TH
2707 #: build/C/man3/malloc_hook.3:10
2708 #, no-wrap
2709 msgid "MALLOC_HOOK"
2710 msgstr "MALLOC_HOOK"
2711
2712 #. type: TH
2713 #: build/C/man3/malloc_hook.3:10
2714 #, no-wrap
2715 msgid "2010-10-13"
2716 msgstr "2010-10-13"
2717
2718 #. type: Plain text
2719 #: build/C/man3/malloc_hook.3:15
2720 msgid ""
2721 "__malloc_hook, __malloc_initialize_hook, __memalign_hook, __free_hook, "
2722 "__realloc_hook, __after_morecore_hook - malloc debugging variables"
2723 msgstr ""
2724 "__malloc_hook, __malloc_initialize_hook, __memalign_hook, __free_hook, "
2725 "__realloc_hook, __after_morecore_hook - malloc デバッグ用の変数"
2726
2727 #. type: Plain text
2728 #: build/C/man3/malloc_hook.3:18 build/C/man3/malloc_info.3:31
2729 #: build/C/man3/posix_memalign.3:41
2730 #, no-wrap
2731 msgid "B<#include E<lt>malloc.hE<gt>>\n"
2732 msgstr "B<#include E<lt>malloc.hE<gt>>\n"
2733
2734 #. type: Plain text
2735 #: build/C/man3/malloc_hook.3:20
2736 #, no-wrap
2737 msgid "B<void *(*__malloc_hook)(size_t >I<size>B<, const void *>I<caller>B<);>\n"
2738 msgstr "B<void *(*__malloc_hook)(size_t >I<size>B<, const void *>I<caller>B<);>\n"
2739
2740 #. type: Plain text
2741 #: build/C/man3/malloc_hook.3:23
2742 #, no-wrap
2743 msgid "B<void *(*__realloc_hook)(void *>I<ptr>B<, size_t >I<size>B<, const void *>I<caller>B<);>\n"
2744 msgstr "B<void *(*__realloc_hook)(void *>I<ptr>B<, size_t >I<size>B<, const void *>I<caller>B<);>\n"
2745
2746 #. type: Plain text
2747 #: build/C/man3/malloc_hook.3:26
2748 #, no-wrap
2749 msgid ""
2750 "B<void *(*__memalign_hook)(size_t >I<alignment>B<, size_t >I<size>B<,>\n"
2751 "B<                         const void *>I<caller>B<);>\n"
2752 msgstr ""
2753 "B<void *(*__memalign_hook)(size_t >I<alignment>B<, size_t >I<size>B<,>\n"
2754 "B<                         const void *>I<caller>B<);>\n"
2755
2756 #. type: Plain text
2757 #: build/C/man3/malloc_hook.3:28
2758 #, no-wrap
2759 msgid "B<void (*__free_hook)(void *>I<ptr>B<, const void *>I<caller>B<);>\n"
2760 msgstr "B<void (*__free_hook)(void *>I<ptr>B<, const void *>I<caller>B<);>\n"
2761
2762 #. type: Plain text
2763 #: build/C/man3/malloc_hook.3:30
2764 #, no-wrap
2765 msgid "B<void (*__malloc_initialize_hook)(void);>\n"
2766 msgstr "B<void (*__malloc_initialize_hook)(void);>\n"
2767
2768 #. type: Plain text
2769 #: build/C/man3/malloc_hook.3:32
2770 #, no-wrap
2771 msgid "B<void (*__after_morecore_hook)(void);>\n"
2772 msgstr "B<void (*__after_morecore_hook)(void);>\n"
2773
2774 #. type: Plain text
2775 #: build/C/man3/malloc_hook.3:43
2776 msgid ""
2777 "The GNU C library lets you modify the behavior of B<malloc>(3), "
2778 "B<realloc>(3), and B<free>(3)  by specifying appropriate hook functions.  "
2779 "You can use these hooks to help you debug programs that use dynamic memory "
2780 "allocation, for example."
2781 msgstr ""
2782 "GNU C ライブラリでは、適切なフック関数 (hook function) を指定することで "
2783 "B<malloc>(3), B<realloc>(3), B<free>(3)  の動作を変更することができる。例え"
2784 "ば、動的にメモリ割り当てを行う プログラムのデバッグにこれらのフックを使うこと"
2785 "ができる。"
2786
2787 #. type: Plain text
2788 #: build/C/man3/malloc_hook.3:50
2789 msgid ""
2790 "The variable B<__malloc_initialize_hook> points at a function that is called "
2791 "once when the malloc implementation is initialized.  This is a weak "
2792 "variable, so it can be overridden in the application with a definition like "
2793 "the following:"
2794 msgstr ""
2795 "変数 B<__malloc_initialize_hook> は malloc の実装が初期化される際に一度だけ呼"
2796 "ばれる関数へのポインタである。 この変数は書き換え可能 (weak) であり、アプリ"
2797 "ケーション内で 以下のような定義で上書きできる:"
2798
2799 #. type: Plain text
2800 #: build/C/man3/malloc_hook.3:53
2801 #, no-wrap
2802 msgid "    void (*__malloc_initialize_hook)(void) = my_init_hook;\n"
2803 msgstr "    void (*__malloc_initialize_hook)(void) = my_init_hook;\n"
2804
2805 #. type: Plain text
2806 #: build/C/man3/malloc_hook.3:58
2807 msgid ""
2808 "Now the function I<my_init_hook>()  can do the initialization of all hooks."
2809 msgstr ""
2810 "なお、関数 I<my_init_hook>()  で全てのフックの初期化をすることができる。"
2811
2812 #. type: Plain text
2813 #: build/C/man3/malloc_hook.3:74
2814 msgid ""
2815 "The four functions pointed to by B<__malloc_hook>, B<__realloc_hook>, "
2816 "B<__memalign_hook>, B<__free_hook> have a prototype like the functions "
2817 "B<malloc>(3), B<realloc>(3), B<memalign>(3), B<free>(3), respectively, "
2818 "except that they have a final argument I<caller> that gives the address of "
2819 "the caller of B<malloc>(3), etc."
2820 msgstr ""
2821 "B<__malloc_hook>, B<__realloc_hook>, B<__memalign_hook>, B<__free_hook> で指"
2822 "される 4 つの関数は、各々 B<malloc>(3), B<realloc>(3), B<memalign>(3), "
2823 "B<free>(3)  とよく似たプロトタイプを持っているが、 一番最後の引き数 "
2824 "I<caller> をとる点が異なる。 引き数 I<caller> には、 B<malloc>(3)  などの呼び"
2825 "出し元 (caller) のアドレスが格納される。"
2826
2827 #. type: Plain text
2828 #: build/C/man3/malloc_hook.3:80
2829 msgid ""
2830 "The variable B<__after_morecore_hook> points at a function that is called "
2831 "each time after B<sbrk>(2)  was asked for more memory."
2832 msgstr ""
2833 "変数 B<__after_morecore_hook> は、領域の追加要求があり B<sbrk>(2)  が呼ばれた"
2834 "後で毎回呼び出される関数へのポインタである。"
2835
2836 #.  https://bugzilla.redhat.com/show_bug.cgi?id=450187
2837 #.  http://sourceware.org/bugzilla/show_bug.cgi?id=9957
2838 #. type: Plain text
2839 #: build/C/man3/malloc_hook.3:89
2840 msgid ""
2841 "The use of these hook functions is not safe in multithreaded programs, and "
2842 "they are now deprecated.  Programmers should instead preempt calls to the "
2843 "relevant functions by defining and exporting functions such as \"malloc\" "
2844 "and \"free\"."
2845 msgstr ""
2846 "マルチスレッドプログラムでは、 これらのフック関数の使用は安全ではなく、 今で"
2847 "は非推奨である。 プログラマは、 \"malloc\" や \"free\" のような関数を定義して"
2848 "公開して、 関連する関数を呼び出すようにすべきである。"
2849
2850 #. type: Plain text
2851 #: build/C/man3/malloc_hook.3:91
2852 msgid "Here is a short example of how to use these variables."
2853 msgstr "これらの変数の使い方の簡単な例を以下に示す。"
2854
2855 #. type: Plain text
2856 #: build/C/man3/malloc_hook.3:95
2857 #, no-wrap
2858 msgid ""
2859 "#include E<lt>stdio.hE<gt>\n"
2860 "#include E<lt>malloc.hE<gt>\n"
2861 msgstr ""
2862 "#include E<lt>stdio.hE<gt>\n"
2863 "#include E<lt>malloc.hE<gt>\n"
2864
2865 #. type: Plain text
2866 #: build/C/man3/malloc_hook.3:99
2867 #, no-wrap
2868 msgid ""
2869 "/* Prototypes for our hooks.  */\n"
2870 "static void my_init_hook(void);\n"
2871 "static void *my_malloc_hook(size_t, const void *);\n"
2872 msgstr ""
2873 "/* 使おうとするフックのプロトタイプ宣言 */\n"
2874 "static void my_init_hook(void);\n"
2875 "static void *my_malloc_hook(size_t, const void *);\n"
2876
2877 #. type: Plain text
2878 #: build/C/man3/malloc_hook.3:102
2879 #, no-wrap
2880 msgid ""
2881 "/* Variables to save original hooks. */\n"
2882 "static void *(*old_malloc_hook)(size_t, const void *);\n"
2883 msgstr ""
2884 "/* 元々のフックを保存するための変数 */\n"
2885 "static void *(*old_malloc_hook)(size_t, const void *);\n"
2886
2887 #. type: Plain text
2888 #: build/C/man3/malloc_hook.3:105
2889 #, no-wrap
2890 msgid ""
2891 "/* Override initializing hook from the C library. */\n"
2892 "void (*__malloc_initialize_hook) (void) = my_init_hook;\n"
2893 msgstr ""
2894 "/* C ライブラリから呼ばれる初期化フックを上書きする */\n"
2895 "void (*__malloc_initialize_hook) (void) = my_init_hook;\n"
2896
2897 #. type: Plain text
2898 #: build/C/man3/malloc_hook.3:112
2899 #, no-wrap
2900 msgid ""
2901 "static void\n"
2902 "my_init_hook(void)\n"
2903 "{\n"
2904 "    old_malloc_hook = __malloc_hook;\n"
2905 "    __malloc_hook = my_malloc_hook;\n"
2906 "}\n"
2907 msgstr ""
2908 "static void\n"
2909 "my_init_hook(void)\n"
2910 "{\n"
2911 "    old_malloc_hook = __malloc_hook;\n"
2912 "    __malloc_hook = my_malloc_hook;\n"
2913 "}\n"
2914
2915 #. type: Plain text
2916 #: build/C/man3/malloc_hook.3:117
2917 #, no-wrap
2918 msgid ""
2919 "static void *\n"
2920 "my_malloc_hook(size_t size, const void *caller)\n"
2921 "{\n"
2922 "    void *result;\n"
2923 msgstr ""
2924 "static void *\n"
2925 "my_malloc_hook(size_t size, const void *caller)\n"
2926 "{\n"
2927 "    void *result;\n"
2928
2929 #. type: Plain text
2930 #: build/C/man3/malloc_hook.3:120
2931 #, no-wrap
2932 msgid ""
2933 "    /* Restore all old hooks */\n"
2934 "    __malloc_hook = old_malloc_hook;\n"
2935 msgstr ""
2936 "    /* 元々のフックを全て戻す */\n"
2937 "    __malloc_hook = old_malloc_hook;\n"
2938
2939 #. type: Plain text
2940 #: build/C/man3/malloc_hook.3:123
2941 #, no-wrap
2942 msgid ""
2943 "    /* Call recursively */\n"
2944 "    result = malloc(size);\n"
2945 msgstr ""
2946 "    /* malloc の再帰的呼び出し */\n"
2947 "    result = malloc(size);\n"
2948
2949 #. type: Plain text
2950 #: build/C/man3/malloc_hook.3:126
2951 #, no-wrap
2952 msgid ""
2953 "    /* Save underlying hooks */\n"
2954 "    old_malloc_hook = __malloc_hook;\n"
2955 msgstr ""
2956 "    /* 現在設定されているフック (underlying hook) を保存する */\n"
2957 "    old_malloc_hook = __malloc_hook;\n"
2958
2959 #. type: Plain text
2960 #: build/C/man3/malloc_hook.3:130
2961 #, no-wrap
2962 msgid ""
2963 "    /* printf() might call malloc(), so protect it too. */\n"
2964 "    printf(\"malloc(%u) called from %p returns %p\\en\",\n"
2965 "            (unsigned int) size, caller, result);\n"
2966 msgstr ""
2967 "    /* printf() は malloc() を呼び出す可能性があるので\n"
2968 "        ここでもガードを行う (元々のフックのままにしておく) */\n"
2969 "    printf(\"malloc(%u) called from %p returns %p\\en\",\n"
2970 "            (unsigned int) size, caller, result);\n"
2971
2972 #. type: Plain text
2973 #: build/C/man3/malloc_hook.3:133
2974 #, no-wrap
2975 msgid ""
2976 "    /* Restore our own hooks */\n"
2977 "    __malloc_hook = my_malloc_hook;\n"
2978 msgstr ""
2979 "    /* ユーザが使おうとするフックを再設定する */\n"
2980 "    __malloc_hook = my_malloc_hook;\n"
2981
2982 #. type: Plain text
2983 #: build/C/man3/malloc_hook.3:136
2984 #, no-wrap
2985 msgid ""
2986 "    return result;\n"
2987 "}\n"
2988 msgstr ""
2989 "    return result;\n"
2990 "}\n"
2991
2992 #. type: Plain text
2993 #: build/C/man3/malloc_hook.3:142
2994 msgid "B<mallinfo>(3), B<malloc>(3), B<mcheck>(3), B<mtrace>(3)"
2995 msgstr "B<mallinfo>(3), B<malloc>(3), B<mcheck>(3), B<mtrace>(3)"
2996
2997 #. type: TH
2998 #: build/C/man3/malloc_info.3:25
2999 #, no-wrap
3000 msgid "MALLOC_INFO"
3001 msgstr "MALLOC_INFO"
3002
3003 #. type: TH
3004 #: build/C/man3/malloc_info.3:25
3005 #, no-wrap
3006 msgid "2013-04-19"
3007 msgstr "2013-04-19"
3008
3009 #. type: Plain text
3010 #: build/C/man3/malloc_info.3:28
3011 msgid "malloc_info - export malloc state to a stream"
3012 msgstr "malloc_info - malloc の状態をストリームに出力する"
3013
3014 #. type: Plain text
3015 #: build/C/man3/malloc_info.3:33
3016 #, no-wrap
3017 msgid "B<int malloc_info(int >I<options>B<, FILE *>I<fp>B<);>\n"
3018 msgstr "B<int malloc_info(int >I<options>B<, FILE *>I<fp>B<);>\n"
3019
3020 #. type: Plain text
3021 #: build/C/man3/malloc_info.3:44
3022 msgid ""
3023 "The B<malloc_info>()  function exports an XML string that describes the "
3024 "current state of the memory-allocation implementation in the caller.  The "
3025 "string is printed on the file stream I<fp>.  The exported string includes "
3026 "information about all arenas (see B<malloc>(3))."
3027 msgstr ""
3028 "B<malloc_info>() 関数は、 呼び出し元のメモリ割り当て実装の現在の状態を表す "
3029 "XML 文字列を出力する。 文字列は、 ファイルストリーム I<fp> に出力される。 出"
3030 "力された文字列には、 全ての割り当て領域の情報が含まれる (B<malloc>(3) 参照)。"
3031
3032 #. type: Plain text
3033 #: build/C/man3/malloc_info.3:48
3034 msgid "As currently implemented, I<options> must be zero."
3035 msgstr "現在の実装では、 I<options> は 0 でなければならない。"
3036
3037 #. type: Plain text
3038 #: build/C/man3/malloc_info.3:55
3039 msgid ""
3040 "On success, B<malloc_info>()  returns 0; on error, it returns -1, with "
3041 "I<errno> set to indicate the cause."
3042 msgstr ""
3043 "B<malloc_info>() は、成功すると 0 を返す。 エラーの場合、-1 を返し、 "
3044 "I<errno> にエラーの原因を示す値を設定する。"
3045
3046 #. type: Plain text
3047 #: build/C/man3/malloc_info.3:60
3048 msgid "I<options> was nonzero."
3049 msgstr "I<options> が 0 でなかった。"
3050
3051 #. type: Plain text
3052 #: build/C/man3/malloc_info.3:63
3053 msgid "B<malloc_info>()  was added to glibc in version 2.10."
3054 msgstr "B<malloc_info>() は glibc バージョン 2.10 で追加された。"
3055
3056 #. type: Plain text
3057 #: build/C/man3/malloc_info.3:65 build/C/man3/malloc_stats.3:57
3058 #: build/C/man3/malloc_trim.3:62 build/C/man3/malloc_usable_size.3:50
3059 msgid "This function is a GNU extension."
3060 msgstr "この関数は GNU による拡張である。"
3061
3062 #. type: Plain text
3063 #: build/C/man3/malloc_info.3:71
3064 msgid ""
3065 "The memory-allocation information is provided as an XML string (rather than "
3066 "a C structure)  because the information may change over time (according to "
3067 "changes in the underlying implementation).  The output XML string includes a "
3068 "version field."
3069 msgstr ""
3070 "メモリ割り当て情報は (C の構造体ではなく) XML 文字列として提供される。 これ"
3071 "は、 この情報は時間をたつと (内部で使用している実装によって) 変わる可能性があ"
3072 "るからである。 出力される XML 文字列にはバージョンフィールドが付いている。"
3073
3074 #. type: Plain text
3075 #: build/C/man3/malloc_info.3:77
3076 msgid ""
3077 "The B<open_memstream>(3)  function can be used to send the output of "
3078 "B<malloc_info>()  directly into a buffer in memory, rather than to a file."
3079 msgstr ""
3080 "B<open_memstream>(3) 関数を使うと、 B<malloc_info>() の出力を、 ファイルでは"
3081 "なくメモリ内のバッファに直接送ることができる。"
3082
3083 #. type: Plain text
3084 #: build/C/man3/malloc_info.3:84
3085 msgid ""
3086 "The B<malloc_info>()  function is designed to address deficiencies in "
3087 "B<malloc_stats>(3)  and B<mallinfo>(3)."
3088 msgstr ""
3089 "B<malloc_info>() 関数は、 B<malloc_stats>(3) と B<mallinfo>(3) の不備を解決す"
3090 "るために設定された。"
3091
3092 #. type: Plain text
3093 #: build/C/man3/malloc_info.3:95
3094 msgid ""
3095 "The program below takes up to four command-line arguments, of which the "
3096 "first three are mandatory.  The first argument specifies the number of "
3097 "threads that the program should create.  All of the threads, including the "
3098 "main thread, allocate the number of blocks of memory specified by the second "
3099 "argument.  The third argument controls the size of the blocks to be "
3100 "allocated.  The main thread creates blocks of this size, the second thread "
3101 "created by the program allocates blocks of twice this size, the third thread "
3102 "allocates blocks of three times this size, and so on."
3103 msgstr ""
3104 "以下のプログラムは最大で 4 つのコマンドライン引数を取り、 最初の 3 つは必須で"
3105 "ある。 最初の引数は、このプログラムが生成するスレッド数を指定する。 メインス"
3106 "レッドを含む全てのスレッドが第 2 引数で指定した数のメモリブロックの割り当てを"
3107 "行う。 第 3 引数は割り当てるブロックのサイズを制御する。 メインスレッドはこの"
3108 "サイズのブロックを作成し、 このプログラムが生成する 2 番目のスレッドはこのサ"
3109 "イズの 2 倍のサイズのブロックを、 3 番目のスレッドはこのサイズの 3 倍のサイズ"
3110 "のブロックを割り当て、 以下同様である。"
3111
3112 #. type: Plain text
3113 #: build/C/man3/malloc_info.3:102
3114 msgid ""
3115 "The program calls B<malloc_info>()  twice to display the memory-allocation "
3116 "state.  The first call takes place before any threads are created or memory "
3117 "allocated.  The second call is performed after all threads have allocated "
3118 "memory."
3119 msgstr ""
3120 "このプログラムは B<malloc_info>() を 2 回呼び出し、メモリ割り当て状態を表示す"
3121 "る。 最初の呼び出しはスレッドの生成もメモリの割り当ても行われる前に実行され"
3122 "る。 2 回目の呼び出しは全てのスレッドがメモリ割り当てを行った後に実行される。"
3123
3124 #. type: Plain text
3125 #: build/C/man3/malloc_info.3:110
3126 msgid ""
3127 "In the following example, the command-line arguments specify the creation of "
3128 "one additional thread, and both the main thread and the additional thread "
3129 "allocate 10000 blocks of memory.  After the blocks of memory have been "
3130 "allocated, B<malloc_info>()  shows the state of two allocation arenas."
3131 msgstr ""
3132 "以下の例では、 コマンドライン引数で、 追加でスレッドを一つ生成し、メインス"
3133 "レッドと追加のスレッドの両方が 10000 個のメモリブロックを割り当てるように指定"
3134 "している。 メモリブロックの割り当て後の B<malloc_info>() では、 2 つの割り当"
3135 "て領域の状態が表示されている。"
3136
3137 #. type: Plain text
3138 #: build/C/man3/malloc_info.3:135
3139 #, no-wrap
3140 msgid ""
3141 "$ B<getconf GNU_LIBC_VERSION>\n"
3142 "glibc 2.13\n"
3143 "$ B<./a.out 1 10000 100>\n"
3144 "============ Before allocating blocks ============\n"
3145 "E<lt>malloc version=\"1\"E<gt>\n"
3146 "E<lt>heap nr=\"0\"E<gt>\n"
3147 "E<lt>sizesE<gt>\n"
3148 "E<lt>/sizesE<gt>\n"
3149 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
3150 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
3151 "E<lt>system type=\"current\" size=\"135168\"/E<gt>\n"
3152 "E<lt>system type=\"max\" size=\"135168\"/E<gt>\n"
3153 "E<lt>aspace type=\"total\" size=\"135168\"/E<gt>\n"
3154 "E<lt>aspace type=\"mprotect\" size=\"135168\"/E<gt>\n"
3155 "E<lt>/heapE<gt>\n"
3156 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
3157 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
3158 "E<lt>system type=\"current\" size=\"135168\"/E<gt>\n"
3159 "E<lt>system type=\"max\" size=\"135168\"/E<gt>\n"
3160 "E<lt>aspace type=\"total\" size=\"135168\"/E<gt>\n"
3161 "E<lt>aspace type=\"mprotect\" size=\"135168\"/E<gt>\n"
3162 "E<lt>/mallocE<gt>\n"
3163 msgstr ""
3164 "$ B<getconf GNU_LIBC_VERSION>\n"
3165 "glibc 2.13\n"
3166 "$ B<./a.out 1 10000 100>\n"
3167 "============ Before allocating blocks ============\n"
3168 "E<lt>malloc version=\"1\"E<gt>\n"
3169 "E<lt>heap nr=\"0\"E<gt>\n"
3170 "E<lt>sizesE<gt>\n"
3171 "E<lt>/sizesE<gt>\n"
3172 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
3173 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
3174 "E<lt>system type=\"current\" size=\"135168\"/E<gt>\n"
3175 "E<lt>system type=\"max\" size=\"135168\"/E<gt>\n"
3176 "E<lt>aspace type=\"total\" size=\"135168\"/E<gt>\n"
3177 "E<lt>aspace type=\"mprotect\" size=\"135168\"/E<gt>\n"
3178 "E<lt>/heapE<gt>\n"
3179 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
3180 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
3181 "E<lt>system type=\"current\" size=\"135168\"/E<gt>\n"
3182 "E<lt>system type=\"max\" size=\"135168\"/E<gt>\n"
3183 "E<lt>aspace type=\"total\" size=\"135168\"/E<gt>\n"
3184 "E<lt>aspace type=\"mprotect\" size=\"135168\"/E<gt>\n"
3185 "E<lt>/mallocE<gt>\n"
3186
3187 #. type: Plain text
3188 #: build/C/man3/malloc_info.3:165
3189 #, no-wrap
3190 msgid ""
3191 "============ After allocating blocks ============\n"
3192 "E<lt>malloc version=\"1\"E<gt>\n"
3193 "E<lt>heap nr=\"0\"E<gt>\n"
3194 "E<lt>sizesE<gt>\n"
3195 "E<lt>/sizesE<gt>\n"
3196 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
3197 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
3198 "E<lt>system type=\"current\" size=\"1081344\"/E<gt>\n"
3199 "E<lt>system type=\"max\" size=\"1081344\"/E<gt>\n"
3200 "E<lt>aspace type=\"total\" size=\"1081344\"/E<gt>\n"
3201 "E<lt>aspace type=\"mprotect\" size=\"1081344\"/E<gt>\n"
3202 "E<lt>/heapE<gt>\n"
3203 "E<lt>heap nr=\"1\"E<gt>\n"
3204 "E<lt>sizesE<gt>\n"
3205 "E<lt>/sizesE<gt>\n"
3206 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
3207 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
3208 "E<lt>system type=\"current\" size=\"1032192\"/E<gt>\n"
3209 "E<lt>system type=\"max\" size=\"1032192\"/E<gt>\n"
3210 "E<lt>aspace type=\"total\" size=\"1032192\"/E<gt>\n"
3211 "E<lt>aspace type=\"mprotect\" size=\"1032192\"/E<gt>\n"
3212 "E<lt>/heapE<gt>\n"
3213 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
3214 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
3215 "E<lt>system type=\"current\" size=\"2113536\"/E<gt>\n"
3216 "E<lt>system type=\"max\" size=\"2113536\"/E<gt>\n"
3217 "E<lt>aspace type=\"total\" size=\"2113536\"/E<gt>\n"
3218 "E<lt>aspace type=\"mprotect\" size=\"2113536\"/E<gt>\n"
3219 "E<lt>/mallocE<gt>\n"
3220 msgstr ""
3221 "============ After allocating blocks ============\n"
3222 "E<lt>malloc version=\"1\"E<gt>\n"
3223 "E<lt>heap nr=\"0\"E<gt>\n"
3224 "E<lt>sizesE<gt>\n"
3225 "E<lt>/sizesE<gt>\n"
3226 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
3227 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
3228 "E<lt>system type=\"current\" size=\"1081344\"/E<gt>\n"
3229 "E<lt>system type=\"max\" size=\"1081344\"/E<gt>\n"
3230 "E<lt>aspace type=\"total\" size=\"1081344\"/E<gt>\n"
3231 "E<lt>aspace type=\"mprotect\" size=\"1081344\"/E<gt>\n"
3232 "E<lt>/heapE<gt>\n"
3233 "E<lt>heap nr=\"1\"E<gt>\n"
3234 "E<lt>sizesE<gt>\n"
3235 "E<lt>/sizesE<gt>\n"
3236 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
3237 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
3238 "E<lt>system type=\"current\" size=\"1032192\"/E<gt>\n"
3239 "E<lt>system type=\"max\" size=\"1032192\"/E<gt>\n"
3240 "E<lt>aspace type=\"total\" size=\"1032192\"/E<gt>\n"
3241 "E<lt>aspace type=\"mprotect\" size=\"1032192\"/E<gt>\n"
3242 "E<lt>/heapE<gt>\n"
3243 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
3244 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
3245 "E<lt>system type=\"current\" size=\"2113536\"/E<gt>\n"
3246 "E<lt>system type=\"max\" size=\"2113536\"/E<gt>\n"
3247 "E<lt>aspace type=\"total\" size=\"2113536\"/E<gt>\n"
3248 "E<lt>aspace type=\"mprotect\" size=\"2113536\"/E<gt>\n"
3249 "E<lt>/mallocE<gt>\n"
3250
3251 #. type: Plain text
3252 #: build/C/man3/malloc_info.3:175
3253 #, no-wrap
3254 msgid ""
3255 "#include E<lt>unistd.hE<gt>\n"
3256 "#include E<lt>stdlib.hE<gt>\n"
3257 "#include E<lt>pthread.hE<gt>\n"
3258 "#include E<lt>malloc.hE<gt>\n"
3259 "#include E<lt>errno.hE<gt>\n"
3260 msgstr ""
3261 "#include E<lt>unistd.hE<gt>\n"
3262 "#include E<lt>stdlib.hE<gt>\n"
3263 "#include E<lt>pthread.hE<gt>\n"
3264 "#include E<lt>malloc.hE<gt>\n"
3265 "#include E<lt>errno.hE<gt>\n"
3266
3267 #. type: Plain text
3268 #: build/C/man3/malloc_info.3:178
3269 #, no-wrap
3270 msgid ""
3271 "static size_t blockSize;\n"
3272 "static int numThreads, numBlocks;\n"
3273 msgstr ""
3274 "static size_t blockSize;\n"
3275 "static int numThreads, numBlocks;\n"
3276
3277 #. type: Plain text
3278 #: build/C/man3/malloc_info.3:181
3279 #, no-wrap
3280 msgid ""
3281 "#define errExit(msg)    do { perror(msg); exit(EXIT_FAILURE); \\e\n"
3282 "                        } while (0)\n"
3283 msgstr ""
3284 "#define errExit(msg)    do { perror(msg); exit(EXIT_FAILURE); \\e\n"
3285 "                        } while (0)\n"
3286
3287 #. type: Plain text
3288 #: build/C/man3/malloc_info.3:187
3289 #, no-wrap
3290 msgid ""
3291 "static void *\n"
3292 "thread_func(void *arg)\n"
3293 "{\n"
3294 "    int j;\n"
3295 "    int tn = (int) arg;\n"
3296 msgstr ""
3297 "static void *\n"
3298 "thread_func(void *arg)\n"
3299 "{\n"
3300 "    int j;\n"
3301 "    int tn = (int) arg;\n"
3302
3303 #. type: Plain text
3304 #: build/C/man3/malloc_info.3:190
3305 #, no-wrap
3306 msgid ""
3307 "    /* The multiplier \\(aq(2 + tn)\\(aq ensures that each thread (including\n"
3308 "       the main thread) allocates a different amount of memory */\n"
3309 msgstr ""
3310 "    /* The multiplier \\(aq(2 + tn)\\(aq ensures that each thread (including\n"
3311 "       the main thread) allocates a different amount of memory */\n"
3312
3313 #. type: Plain text
3314 #: build/C/man3/malloc_info.3:194
3315 #, no-wrap
3316 msgid ""
3317 "    for (j = 0; j E<lt> numBlocks; j++)\n"
3318 "        if (malloc(blockSize * (2 + tn)) == NULL)\n"
3319 "            errExit(\"malloc-thread\");\n"
3320 msgstr ""
3321 "    for (j = 0; j E<lt> numBlocks; j++)\n"
3322 "        if (malloc(blockSize * (2 + tn)) == NULL)\n"
3323 "            errExit(\"malloc-thread\");\n"
3324
3325 #. type: Plain text
3326 #: build/C/man3/malloc_info.3:198
3327 #, no-wrap
3328 msgid ""
3329 "    sleep(100);         /* Sleep until main thread terminates */\n"
3330 "    return NULL;\n"
3331 "}\n"
3332 msgstr ""
3333 "    sleep(100);         /* Sleep until main thread terminates */\n"
3334 "    return NULL;\n"
3335 "}\n"
3336
3337 #. type: Plain text
3338 #: build/C/man3/malloc_info.3:204
3339 #, no-wrap
3340 msgid ""
3341 "int\n"
3342 "main(int argc, char *argv[])\n"
3343 "{\n"
3344 "    int j, tn, sleepTime;\n"
3345 "    pthread_t *thr;\n"
3346 msgstr ""
3347 "int\n"
3348 "main(int argc, char *argv[])\n"
3349 "{\n"
3350 "    int j, tn, sleepTime;\n"
3351 "    pthread_t *thr;\n"
3352
3353 #. type: Plain text
3354 #: build/C/man3/malloc_info.3:211
3355 #, no-wrap
3356 msgid ""
3357 "    if (argc E<lt> 4) {\n"
3358 "        fprintf(stderr,\n"
3359 "                \"%s num-threads num-blocks block-size [sleep-time]\\en\",\n"
3360 "                argv[0]);\n"
3361 "        exit(EXIT_FAILURE);\n"
3362 "    }\n"
3363 msgstr ""
3364 "    if (argc E<lt> 4) {\n"
3365 "        fprintf(stderr,\n"
3366 "                \"%s num-threads num-blocks block-size [sleep-time]\\en\",\n"
3367 "                argv[0]);\n"
3368 "        exit(EXIT_FAILURE);\n"
3369 "    }\n"
3370
3371 #. type: Plain text
3372 #: build/C/man3/malloc_info.3:216
3373 #, no-wrap
3374 msgid ""
3375 "    numThreads = atoi(argv[1]);\n"
3376 "    numBlocks = atoi(argv[2]);\n"
3377 "    blockSize = atoi(argv[3]);\n"
3378 "    sleepTime = (argc E<gt> 4) ? atoi(argv[4]) : 0;\n"
3379 msgstr ""
3380 "    numThreads = atoi(argv[1]);\n"
3381 "    numBlocks = atoi(argv[2]);\n"
3382 "    blockSize = atoi(argv[3]);\n"
3383 "    sleepTime = (argc E<gt> 4) ? atoi(argv[4]) : 0;\n"
3384
3385 #. type: Plain text
3386 #: build/C/man3/malloc_info.3:220
3387 #, no-wrap
3388 msgid ""
3389 "    thr = calloc(numThreads, sizeof(pthread_t));\n"
3390 "    if (thr == NULL)\n"
3391 "        errExit(\"calloc\");\n"
3392 msgstr ""
3393 "    thr = calloc(numThreads, sizeof(pthread_t));\n"
3394 "    if (thr == NULL)\n"
3395 "        errExit(\"calloc\");\n"
3396
3397 #. type: Plain text
3398 #: build/C/man3/malloc_info.3:223
3399 #, no-wrap
3400 msgid ""
3401 "    printf(\"============ Before allocating blocks ============\\en\");\n"
3402 "    malloc_info(0, stdout);\n"
3403 msgstr ""
3404 "    printf(\"============ Before allocating blocks ============\\en\");\n"
3405 "    malloc_info(0, stdout);\n"
3406
3407 #. type: Plain text
3408 #: build/C/man3/malloc_info.3:225
3409 #, no-wrap
3410 msgid "    /* Create threads that allocate different amounts of memory */\n"
3411 msgstr "    /* Create threads that allocate different amounts of memory */\n"
3412
3413 #. type: Plain text
3414 #: build/C/man3/malloc_info.3:231
3415 #, no-wrap
3416 msgid ""
3417 "    for (tn = 0; tn E<lt> numThreads; tn++) {\n"
3418 "        errno = pthread_create(&thr[tn], NULL, thread_func,\n"
3419 "                               (void *) tn);\n"
3420 "        if (errno != 0)\n"
3421 "            errExit(\"pthread_create\");\n"
3422 msgstr ""
3423 "    for (tn = 0; tn E<lt> numThreads; tn++) {\n"
3424 "        errno = pthread_create(&thr[tn], NULL, thread_func,\n"
3425 "                               (void *) tn);\n"
3426 "        if (errno != 0)\n"
3427 "            errExit(\"pthread_create\");\n"
3428
3429 #. type: Plain text
3430 #: build/C/man3/malloc_info.3:236
3431 #, no-wrap
3432 msgid ""
3433 "        /* If we add a sleep interval after the start-up of each\n"
3434 "           thread, the threads likely won\\(aqt contend for malloc\n"
3435 "           mutexes, and therefore additional arenas won\\(aqt be\n"
3436 "           allocated (see malloc(3)). */\n"
3437 msgstr ""
3438 "        /* If we add a sleep interval after the start-up of each\n"
3439 "           thread, the threads likely won\\(aqt contend for malloc\n"
3440 "           mutexes, and therefore additional arenas won\\(aqt be\n"
3441 "           allocated (see malloc(3)). */\n"
3442
3443 #. type: Plain text
3444 #: build/C/man3/malloc_info.3:240
3445 #, no-wrap
3446 msgid ""
3447 "        if (sleepTime E<gt> 0)\n"
3448 "            sleep(sleepTime);\n"
3449 "    }\n"
3450 msgstr ""
3451 "        if (sleepTime E<gt> 0)\n"
3452 "            sleep(sleepTime);\n"
3453 "    }\n"
3454
3455 #. type: Plain text
3456 #: build/C/man3/malloc_info.3:242
3457 #, no-wrap
3458 msgid "    /* The main thread also allocates some memory */\n"
3459 msgstr "    /* The main thread also allocates some memory */\n"
3460
3461 #. type: Plain text
3462 #: build/C/man3/malloc_info.3:246
3463 #, no-wrap
3464 msgid ""
3465 "    for (j = 0; j E<lt> numBlocks; j++)\n"
3466 "        if (malloc(blockSize) == NULL)\n"
3467 "            errExit(\"malloc\");\n"
3468 msgstr ""
3469 "    for (j = 0; j E<lt> numBlocks; j++)\n"
3470 "        if (malloc(blockSize) == NULL)\n"
3471 "            errExit(\"malloc\");\n"
3472
3473 #. type: Plain text
3474 #: build/C/man3/malloc_info.3:249
3475 #, no-wrap
3476 msgid ""
3477 "    sleep(2);           /* Give all threads a chance to\n"
3478 "                           complete allocations */\n"
3479 msgstr ""
3480 "    sleep(2);           /* Give all threads a chance to\n"
3481 "                           complete allocations */\n"
3482
3483 #. type: Plain text
3484 #: build/C/man3/malloc_info.3:252
3485 #, no-wrap
3486 msgid ""
3487 "    printf(\"\\en============ After allocating blocks ============\\en\");\n"
3488 "    malloc_info(0, stdout);\n"
3489 msgstr ""
3490 "    printf(\"\\en============ After allocating blocks ============\\en\");\n"
3491 "    malloc_info(0, stdout);\n"
3492
3493 #. type: Plain text
3494 #: build/C/man3/malloc_info.3:262
3495 msgid ""
3496 "B<mallinfo>(3), B<malloc>(3), B<malloc_stats>(3), B<mallopt>(3), "
3497 "B<open_memstream>(3)"
3498 msgstr ""
3499 "B<mallinfo>(3), B<malloc>(3), B<malloc_stats>(3), B<mallopt>(3), "
3500 "B<open_memstream>(3)"
3501
3502 #. type: TH
3503 #: build/C/man3/malloc_stats.3:26
3504 #, no-wrap
3505 msgid "MALLOC_STATS"
3506 msgstr "MALLOC_STATS"
3507
3508 #. type: Plain text
3509 #: build/C/man3/malloc_stats.3:29
3510 msgid "malloc_stats - print memory allocation statistics"
3511 msgstr "malloc_stats - メモリ割り当ての統計を表示する"
3512
3513 #. type: Plain text
3514 #: build/C/man3/malloc_stats.3:33
3515 msgid "B<void malloc_stats(void);>"
3516 msgstr "B<void malloc_stats(void);>"
3517
3518 #.  .SH VERSIONS
3519 #.  Available already in glibc 2.0, possibly earlier
3520 #. type: Plain text
3521 #: build/C/man3/malloc_stats.3:55
3522 msgid ""
3523 "The B<malloc_stats>()  function prints (on standard error) statistics about "
3524 "memory allocated by B<malloc>(3)  and related functions.  For each arena "
3525 "(allocation area), this function prints the total amount of memory allocated "
3526 "and the total number of bytes consumed by in-use allocations.  (These two "
3527 "values correspond to the I<arena> and I<uordblks> fields retrieved by "
3528 "B<mallinfo>(3).)  In addition, the function prints the sum of these two "
3529 "statistics for all arenas, and the maximum number of blocks and bytes that "
3530 "were ever simultaneously allocated using B<mmap>(2)."
3531 msgstr ""
3532 "B<malloc_stats>() 関数は B<malloc>(3) や関連する関数により割り当てられたメモ"
3533 "リに関する統計を (標準エラーに) 出力する。 各領域 (割り当てエリア) につい"
3534 "て、 この関数は割り当てられているメモリの総量と現在の割り当てが使用している総"
3535 "バイト数を出力する (これらの二つの値は B<mallinfo>(3) で取得できる I<arena> "
3536 "と I<uordblks> フィールドに対応している)。 また、この関数は、 すべての領域の"
3537 "これら二つの統計情報の合計値と、 B<mmap>(2) を使って同時に割り当てられたブ"
3538 "ロック数とバイト数の最大値を表示する。"
3539
3540 #. type: Plain text
3541 #: build/C/man3/malloc_stats.3:61
3542 msgid ""
3543 "More detailed information about memory allocations in the main arena can be "
3544 "obtained using B<mallinfo>(3)."
3545 msgstr ""
3546 "B<mallinfo>(3) を使用すると、 メイン領域のメモリ割り当てに関するより詳細な情"
3547 "報を取得できる。"
3548
3549 #. type: Plain text
3550 #: build/C/man3/malloc_stats.3:67
3551 msgid ""
3552 "B<mmap>(2), B<mallinfo>(3), B<malloc>(3), B<malloc_info>(3), B<mallopt>(3)"
3553 msgstr ""
3554 "B<mmap>(2), B<mallinfo>(3), B<malloc>(3), B<malloc_info>(3), B<mallopt>(3)"
3555
3556 #. type: TH
3557 #: build/C/man3/malloc_trim.3:26
3558 #, no-wrap
3559 msgid "MALLOC_TRIM"
3560 msgstr "MALLOC_TRIM"
3561
3562 #. type: TH
3563 #: build/C/man3/malloc_trim.3:26 build/C/man2/remap_file_pages.2:28
3564 #, fuzzy, no-wrap
3565 #| msgid "2014-05-21"
3566 msgid "2014-05-28"
3567 msgstr "2014-05-21"
3568
3569 #. type: Plain text
3570 #: build/C/man3/malloc_trim.3:29
3571 msgid "malloc_trim - release free memory from the top of the heap"
3572 msgstr ""
3573
3574 #. type: Plain text
3575 #: build/C/man3/malloc_trim.3:33
3576 #, fuzzy
3577 #| msgid "B<void malloc_trim(size_t >I<pad>B<);>"
3578 msgid "B<int malloc_trim(size_t >I<pad>B<);>"
3579 msgstr "B<void malloc_trim(size_t >I<pad>B<);>"
3580
3581 #. type: Plain text
3582 #: build/C/man3/malloc_trim.3:40
3583 msgid ""
3584 "The B<malloc_trim>()  function attempts to release free memory at the top of "
3585 "the heap (by calling B<sbrk>(2)  with a suitable argument)."
3586 msgstr ""
3587
3588 #. type: Plain text
3589 #: build/C/man3/malloc_trim.3:51
3590 msgid ""
3591 "The I<pad> argument specifies the amount of free space to leave untrimmed at "
3592 "the top of the heap.  If this argument is 0, only the minimum amount of "
3593 "memory is maintained at the top of the heap (i.e., one page or less).  A "
3594 "nonzero argument can be used to maintain some trailing space at the top of "
3595 "the heap in order to allow future allocations to be made without having to "
3596 "extend the heap with B<sbrk>(2)."
3597 msgstr ""
3598
3599 #. type: Plain text
3600 #: build/C/man3/malloc_trim.3:56
3601 msgid ""
3602 "The B<malloc_trim>()  function returns 1 if memory was actually released "
3603 "back to the system, or 0 if it was not possible to release any memory."
3604 msgstr ""
3605
3606 #.  .SH VERSIONS
3607 #.  Available already in glibc 2.0, possibly earlier
3608 #. type: Plain text
3609 #: build/C/man3/malloc_trim.3:60
3610 msgid "No errors are defined."
3611 msgstr ""
3612
3613 #. type: Plain text
3614 #: build/C/man3/malloc_trim.3:71
3615 msgid ""
3616 "This function is automatically called by B<free>(3)  in certain "
3617 "circumstances; see the discussion of B<M_TOP_PAD> and B<M_TRIM_THRESHOLD> in "
3618 "B<mallopt>(3)."
3619 msgstr ""
3620
3621 #. type: Plain text
3622 #: build/C/man3/malloc_trim.3:74
3623 msgid ""
3624 "This function cannot release free memory located at places other than the "
3625 "top of the heap."
3626 msgstr ""
3627
3628 #.  malloc/malloc.c::mTRIm():
3629 #.      return result | (av == &main_arena ? sYSTRIm (pad, av) : 0);
3630 #. type: Plain text
3631 #: build/C/man3/malloc_trim.3:78
3632 msgid "This function releases only memory in the main arena."
3633 msgstr ""
3634
3635 #. type: Plain text
3636 #: build/C/man3/malloc_trim.3:82
3637 msgid "B<sbrk>(2), B<malloc>(3), B<mallopt>(3)"
3638 msgstr "B<sbrk>(2), B<malloc>(3), B<mallopt>(3)"
3639
3640 #. type: TH
3641 #: build/C/man3/malloc_usable_size.3:25
3642 #, no-wrap
3643 msgid "MALLOC_USABLE_SIZE"
3644 msgstr "MALLOC_USABLE_SIZE"
3645
3646 #. type: TH
3647 #: build/C/man3/malloc_usable_size.3:25
3648 #, no-wrap
3649 msgid "2012-03-29"
3650 msgstr "2012-03-29"
3651
3652 #. type: Plain text
3653 #: build/C/man3/malloc_usable_size.3:28
3654 msgid "malloc_usable_size - obtain size of block of memory allocated from heap"
3655 msgstr ""
3656
3657 #. type: Plain text
3658 #: build/C/man3/malloc_usable_size.3:32
3659 msgid "B<size_t malloc_usable_size (void *>I<ptr>B<);>"
3660 msgstr "B<size_t malloc_usable_size (void *>I<ptr>B<);>"
3661
3662 #. type: Plain text
3663 #: build/C/man3/malloc_usable_size.3:40
3664 msgid ""
3665 "The B<malloc_usable_size>()  function returns the number of usable bytes in "
3666 "the block pointed to by I<ptr>, a pointer to a block of memory allocated by "
3667 "B<malloc>(3)  or a related function."
3668 msgstr ""
3669
3670 #. type: Plain text
3671 #: build/C/man3/malloc_usable_size.3:48
3672 msgid ""
3673 "B<malloc_usable_size>()  returns the number of usable bytes in the block of "
3674 "allocated memory pointed to by I<ptr>.  If I<ptr> is NULL, 0 is returned."
3675 msgstr ""
3676
3677 #. type: Plain text
3678 #: build/C/man3/malloc_usable_size.3:60
3679 msgid ""
3680 "The value returned by B<malloc_usable_size>()  may be greater than the "
3681 "requested size of the allocation because of alignment and minimum size "
3682 "constraints.  Although the excess bytes can be overwritten by the "
3683 "application without ill effects, this is not good programming practice: the "
3684 "number of excess bytes in an allocation depends on the underlying "
3685 "implementation."
3686 msgstr ""
3687
3688 #. type: Plain text
3689 #: build/C/man3/malloc_usable_size.3:62
3690 msgid "The main use of this function is for debugging and introspection."
3691 msgstr ""
3692
3693 #. type: Plain text
3694 #: build/C/man3/malloc_usable_size.3:64
3695 msgid "B<malloc>(3)"
3696 msgstr "B<malloc>(3)"
3697
3698 #. type: TH
3699 #: build/C/man3/mallopt.3:26
3700 #, no-wrap
3701 msgid "MALLOPT"
3702 msgstr "MALLOPT"
3703
3704 #. type: TH
3705 #: build/C/man3/mallopt.3:26
3706 #, no-wrap
3707 msgid "2012-04-30"
3708 msgstr "2012-04-30"
3709
3710 #. type: Plain text
3711 #: build/C/man3/mallopt.3:29
3712 msgid "mallopt - set memory allocation parameters"
3713 msgstr "mallopt - メモリ割り当てパラメータを設定する"
3714
3715 #. type: Plain text
3716 #: build/C/man3/mallopt.3:33
3717 msgid "B<int mallopt(int >I<param>B<, int >I<value>B<);>"
3718 msgstr "B<int mallopt(int >I<param>B<, int >I<value>B<);>"
3719
3720 #. type: Plain text
3721 #: build/C/man3/mallopt.3:44
3722 msgid ""
3723 "The B<mallopt>()  function adjusts parameters that control the behavior of "
3724 "the memory-allocation functions (see B<malloc>(3)).  The I<param> argument "
3725 "specifies the parameter to be modified, and I<value> specifies the new value "
3726 "for that parameter."
3727 msgstr ""
3728 "B<mallopt>() 関数は、メモリ割り当て関数 (B<malloc>(3) を参照) の動作を\n"
3729 "制御するパラメータの調整を行う。\n"
3730 "I<param> 引き数で変更するパラメータを指定し、\n"
3731 "I<value> 引き数でそのパラメータの新しい値を指定する。"
3732
3733 #. type: Plain text
3734 #: build/C/man3/mallopt.3:47
3735 msgid "The following values can be specified for I<param>:"
3736 msgstr "I<param> には以下の値を指定することができる。"
3737
3738 #. type: TP
3739 #: build/C/man3/mallopt.3:47
3740 #, no-wrap
3741 msgid "B<M_CHECK_ACTION>"
3742 msgstr "B<M_CHECK_ACTION>"
3743
3744 #. type: Plain text
3745 #: build/C/man3/mallopt.3:53
3746 msgid ""
3747 "Setting this parameter controls how glibc responds when various kinds of "
3748 "programming errors are detected (e.g., freeing the same pointer twice).  The "
3749 "3 least significant bits (2, 1, and 0) of the value assigned to this "
3750 "parameter determine the glibc behavior, as follows:"
3751 msgstr ""
3752
3753 #. type: TP
3754 #: build/C/man3/mallopt.3:54
3755 #, no-wrap
3756 msgid "Bit 0"
3757 msgstr "Bit 0"
3758
3759 #. type: Plain text
3760 #: build/C/man3/mallopt.3:64
3761 msgid ""
3762 "If this bit is set, then print a one-line message on I<stderr> that provides "
3763 "details about the error.  The message starts with the string \"***\\ glibc "
3764 "detected\\ ***\", followed by the program name, the name of the memory-"
3765 "allocation function in which the error was detected, a brief description of "
3766 "the error, and the memory address where the error was detected."
3767 msgstr ""
3768
3769 #. type: TP
3770 #: build/C/man3/mallopt.3:64
3771 #, no-wrap
3772 msgid "Bit 1"
3773 msgstr "Bit 1"
3774
3775 #. type: Plain text
3776 #: build/C/man3/mallopt.3:79
3777 msgid ""
3778 "If this bit is set, then, after printing any error message specified by bit "
3779 "0, the program is terminated by calling B<abort>(3).  In glibc versions "
3780 "since 2.4, if bit 0 is also set, then, between printing the error message "
3781 "and aborting, the program also prints a stack trace in the manner of "
3782 "B<backtrace>(3), and prints the process's memory mapping in the style of I</"
3783 "proc/[pid]/maps> (see B<proc>(5))."
3784 msgstr ""
3785
3786 #. type: TP
3787 #: build/C/man3/mallopt.3:79
3788 #, no-wrap
3789 msgid "Bit 2 (since glibc 2.4)"
3790 msgstr "Bit 2 (glibc 2.4 以降)"
3791
3792 #. type: Plain text
3793 #: build/C/man3/mallopt.3:86
3794 msgid ""
3795 "This bit has an effect only if bit 0 is also set.  If this bit is set, then "
3796 "the one-line message describing the error is simplified to contain just the "
3797 "name of the function where the error was detected and the brief description "
3798 "of the error."
3799 msgstr ""
3800
3801 #. type: Plain text
3802 #: build/C/man3/mallopt.3:91
3803 msgid "The remaining bits in I<value> are ignored."
3804 msgstr ""
3805
3806 #. type: Plain text
3807 #: build/C/man3/mallopt.3:95
3808 msgid ""
3809 "Combining the above details, the following numeric values are meaningful for "
3810 "B<M_CHECK_ACTION>:"
3811 msgstr ""
3812
3813 #. type: IP
3814 #: build/C/man3/mallopt.3:96
3815 #, no-wrap
3816 msgid "0"
3817 msgstr "0"
3818
3819 #. type: Plain text
3820 #: build/C/man3/mallopt.3:98
3821 msgid "Ignore error conditions; continue execution (with undefined results)."
3822 msgstr ""
3823
3824 #. type: IP
3825 #: build/C/man3/mallopt.3:98
3826 #, no-wrap
3827 msgid "1"
3828 msgstr "1"
3829
3830 #. type: Plain text
3831 #: build/C/man3/mallopt.3:100
3832 msgid "Print a detailed error message and continue execution."
3833 msgstr ""
3834
3835 #. type: IP
3836 #: build/C/man3/mallopt.3:100
3837 #, no-wrap
3838 msgid "2"
3839 msgstr "2"
3840
3841 #. type: Plain text
3842 #: build/C/man3/mallopt.3:102
3843 msgid "Abort the program."
3844 msgstr ""
3845
3846 #. type: IP
3847 #: build/C/man3/mallopt.3:102
3848 #, no-wrap
3849 msgid "3"
3850 msgstr "3"
3851
3852 #. type: Plain text
3853 #: build/C/man3/mallopt.3:105
3854 msgid ""
3855 "Print detailed error message, stack trace, and memory mappings, and abort "
3856 "the program."
3857 msgstr ""
3858
3859 #. type: IP
3860 #: build/C/man3/mallopt.3:105
3861 #, no-wrap
3862 msgid "5"
3863 msgstr "5"
3864
3865 #. type: Plain text
3866 #: build/C/man3/mallopt.3:107
3867 msgid "Print a simple error message and continue execution."
3868 msgstr ""
3869
3870 #. type: IP
3871 #: build/C/man3/mallopt.3:107
3872 #, no-wrap
3873 msgid "7"
3874 msgstr "7"
3875
3876 #. type: Plain text
3877 #: build/C/man3/mallopt.3:110
3878 msgid ""
3879 "Print simple error message, stack trace, and memory mappings, and abort the "
3880 "program."
3881 msgstr ""
3882
3883 #. type: Plain text
3884 #: build/C/man3/mallopt.3:116
3885 msgid ""
3886 "Since glibc 2.3.4, the default value for the B<M_CHECK_ACTION> parameter is "
3887 "3.  In glibc version 2.3.3 and earlier, the default value is 1."
3888 msgstr ""
3889
3890 #. type: Plain text
3891 #: build/C/man3/mallopt.3:121
3892 msgid ""
3893 "Using a nonzero B<M_CHECK_ACTION> value can be useful because otherwise a "
3894 "crash may happen much later, and the true cause of the problem is then very "
3895 "hard to track down."
3896 msgstr ""
3897
3898 #. type: TP
3899 #: build/C/man3/mallopt.3:121
3900 #, no-wrap
3901 msgid "B<M_MMAP_MAX>"
3902 msgstr "B<M_MMAP_MAX>"
3903
3904 #.  The following text adapted from comments in the glibc source:
3905 #. type: Plain text
3906 #: build/C/man3/mallopt.3:131
3907 msgid ""
3908 "This parameter specifies the maximum number of allocation requests that may "
3909 "be simultaneously serviced using B<mmap>(2).  This parameter exists because "
3910 "some systems have a limited number of internal tables for use by B<mmap>(2), "
3911 "and using more than a few of them may degrade performance."
3912 msgstr ""
3913
3914 #. type: Plain text
3915 #: build/C/man3/mallopt.3:138
3916 msgid ""
3917 "The default value is 65,536, a value which has no special significance and "
3918 "which servers only as a safeguard.  Setting this parameter to 0 disables the "
3919 "use of B<mmap>(2)  for servicing large allocation requests."
3920 msgstr ""
3921
3922 #. type: TP
3923 #: build/C/man3/mallopt.3:138
3924 #, no-wrap
3925 msgid "B<M_MMAP_THRESHOLD>"
3926 msgstr "B<M_MMAP_THRESHOLD>"
3927
3928 #. type: Plain text
3929 #: build/C/man3/mallopt.3:147
3930 msgid ""
3931 "For allocations greater than or equal to the limit specified (in bytes) by "
3932 "B<M_MMAP_THRESHOLD> that can't be satisfied from the free list, the memory-"
3933 "allocation functions employ B<mmap>(2)  instead of increasing the program "
3934 "break using B<sbrk>(2)."
3935 msgstr ""
3936
3937 #. type: Plain text
3938 #: build/C/man3/mallopt.3:167
3939 msgid ""
3940 "Allocating memory using B<mmap>(2)  has the significant advantage that the "
3941 "allocated memory blocks can always be independently released back to the "
3942 "system.  (By contrast, the heap can be trimmed only if memory is freed at "
3943 "the top end.)  On the other hand, there are some disadvantages to the use of "
3944 "B<mmap>(2): deallocated space is not placed on the free list for reuse by "
3945 "later allocations; memory may be wasted because B<mmap>(2)  allocations must "
3946 "be page-aligned; and the kernel must perform the expensive task of zeroing "
3947 "out memory allocated via B<mmap>(2).  Balancing these factors leads to a "
3948 "default setting of 128*1024 for the B<M_MMAP_THRESHOLD> parameter."
3949 msgstr ""
3950
3951 #. type: Plain text
3952 #: build/C/man3/mallopt.3:174
3953 msgid ""
3954 "The lower limit for this parameter is 0.  The upper limit is "
3955 "B<DEFAULT_MMAP_THRESHOLD_MAX>: 512*1024 on 32-bit systems or "
3956 "I<4*1024*1024*sizeof(long)> on 64-bit systems."
3957 msgstr ""
3958
3959 #. type: Plain text
3960 #: build/C/man3/mallopt.3:192
3961 msgid ""
3962 "I<Note:> Nowadays, glibc uses a dynamic mmap threshold by default.  The "
3963 "initial value of the threshold is 128*1024, but when blocks larger than the "
3964 "current threshold and less than or equal to B<DEFAULT_MMAP_THRESHOLD_MAX> "
3965 "are freed, the threshold is adjusted upward to the size of the freed block.  "
3966 "When dynamic mmap thresholding is in effect, the threshold for trimming the "
3967 "heap is also dynamically adjusted to be twice the dynamic mmap threshold.  "
3968 "Dynamic adjustment of the mmap threshold is disabled if any of the "
3969 "B<M_TRIM_THRESHOLD>, B<M_TOP_PAD>, B<M_MMAP_THRESHOLD>, or B<M_MMAP_MAX> "
3970 "parameters is set."
3971 msgstr ""
3972
3973 #. type: TP
3974 #: build/C/man3/mallopt.3:192
3975 #, no-wrap
3976 msgid "B<M_MXFAST> (since glibc 2.3)"
3977 msgstr "B<M_MXFAST> (glibc 2.3 以降)"
3978
3979 #.  The following text adapted from comments in the glibc sources:
3980 #. type: Plain text
3981 #: build/C/man3/mallopt.3:212
3982 msgid ""
3983 "Set the upper limit for memory allocation requests that are satisfied using "
3984 "\"fastbins\".  (The measurement unit for this parameter is bytes.)  Fastbins "
3985 "are storage areas that hold deallocated blocks of memory of the same size "
3986 "without merging adjacent free blocks.  Subsequent reallocation of blocks of "
3987 "the same size can be handled very quickly by allocating from the fastbin, "
3988 "although memory fragmentation and the overall memory footprint of the "
3989 "program can increase.  The default value for this parameter is "
3990 "I<64*sizeof(size_t)/4> (i.e., 64 on 32-bit architectures).  The range for "
3991 "this parameter is 0 to I<80*sizeof(size_t)/4>.  Setting B<M_MXFAST> to 0 "
3992 "disables the use of fastbins."
3993 msgstr ""
3994
3995 #. type: TP
3996 #: build/C/man3/mallopt.3:212
3997 #, no-wrap
3998 msgid "B<M_PERTURB> (since glibc 2.4)"
3999 msgstr "B<M_PERTURB> (glibc 2.4 以降)"
4000
4001 #. type: Plain text
4002 #: build/C/man3/mallopt.3:227
4003 msgid ""
4004 "If this parameter is set to a nonzero value, then bytes of allocated memory "
4005 "(other than allocations via B<calloc>(3))  are initialized to the complement "
4006 "of the value in the least significant byte of I<value>, and when allocated "
4007 "memory is released using B<free>(3), the freed bytes are set to the least "
4008 "significant byte of I<value>.  This can be useful for detecting errors where "
4009 "programs incorrectly rely on allocated memory being initialized to zero, or "
4010 "reuse values in memory that has already been freed."
4011 msgstr ""
4012
4013 #. type: TP
4014 #: build/C/man3/mallopt.3:227
4015 #, no-wrap
4016 msgid "B<M_TOP_PAD>"
4017 msgstr "B<M_TOP_PAD>"
4018
4019 #. type: Plain text
4020 #: build/C/man3/mallopt.3:234
4021 msgid ""
4022 "This parameter defines the amount of padding to employ when calling "
4023 "B<sbrk>(2)  to modify the program break.  (The measurement unit for this "
4024 "parameter is bytes.)  This parameter has an effect in the following "
4025 "circumstances:"
4026 msgstr ""
4027
4028 #. type: Plain text
4029 #: build/C/man3/mallopt.3:241
4030 msgid ""
4031 "When the program break is increased, then B<M_TOP_PAD> bytes are added to "
4032 "the B<sbrk>(2)  request."
4033 msgstr ""
4034
4035 #. type: Plain text
4036 #: build/C/man3/mallopt.3:247
4037 msgid ""
4038 "When the heap is trimmed as a consequence of calling B<free>(3)  (see the "
4039 "discussion of B<M_TRIM_THRESHOLD>)  this much free space is preserved at the "
4040 "top of the heap."
4041 msgstr ""
4042
4043 #. type: Plain text
4044 #: build/C/man3/mallopt.3:251
4045 msgid ""
4046 "In either case, the amount of padding is always rounded to a system page "
4047 "boundary."
4048 msgstr ""
4049
4050 #. type: Plain text
4051 #: build/C/man3/mallopt.3:258
4052 msgid ""
4053 "Modifying B<M_TOP_PAD> is a trade-off between increasing the number of "
4054 "system calls (when the parameter is set low)  and wasting unused memory at "
4055 "the top of the heap (when the parameter is set high)."
4056 msgstr ""
4057
4058 #.  DEFAULT_TOP_PAD in glibc source
4059 #. type: Plain text
4060 #: build/C/man3/mallopt.3:261
4061 msgid "The default value for this parameter is 128*1024."
4062 msgstr ""
4063
4064 #. type: TP
4065 #: build/C/man3/mallopt.3:261
4066 #, no-wrap
4067 msgid "B<M_TRIM_THRESHOLD>"
4068 msgstr "B<M_TRIM_THRESHOLD>"
4069
4070 #. type: Plain text
4071 #: build/C/man3/mallopt.3:277
4072 msgid ""
4073 "When the amount of contiguous free memory at the top of the heap grows "
4074 "sufficiently large, B<free>(3)  employs B<sbrk>(2)  to release this memory "
4075 "back to the system.  (This can be useful in programs that continue to "
4076 "execute for a long period after freeing a significant amount of memory.)  "
4077 "The B<M_TRIM_THRESHOLD> parameter specifies the minimum size (in bytes) that "
4078 "this block of memory must reach before B<sbrk>(2)  is used to trim the heap."
4079 msgstr ""
4080
4081 #. type: Plain text
4082 #: build/C/man3/mallopt.3:282
4083 msgid ""
4084 "The default value for this parameter is 128*1024.  Setting "
4085 "B<M_TRIM_THRESHOLD> to -1 disables trimming completely."
4086 msgstr ""
4087
4088 #
4089 #
4090 #
4091 #.  FIXME Do the arena parameters need to be documented?
4092 #.  .TP
4093 #.  .BR M_ARENA_TEST " (since glibc 2.10)"
4094 #.  .TP
4095 #.  .BR M_ARENA_MAX " (since glibc 2.10)"
4096 #.  Environment variables
4097 #.      MALLOC_ARENA_MAX_
4098 #.      MALLOC_ARENA_TEST_
4099 #.  http://udrepper.livejournal.com/20948.html describes some details
4100 #.      of the MALLOC_ARENA_* environment variables.
4101 #.  These macros aren't enabled in production releases until 2.15?
4102 #.  (see glibc malloc/Makefile)
4103 #. type: Plain text
4104 #: build/C/man3/mallopt.3:305
4105 msgid ""
4106 "Modifying B<M_TRIM_THRESHOLD> is a trade-off between increasing the number "
4107 "of system calls (when the parameter is set low)  and wasting unused memory "
4108 "at the top of the heap (when the parameter is set high)."
4109 msgstr ""
4110
4111 #. type: SS
4112 #: build/C/man3/mallopt.3:305
4113 #, no-wrap
4114 msgid "Environment variables"
4115 msgstr "環境変数"
4116
4117 #. type: Plain text
4118 #: build/C/man3/mallopt.3:320
4119 msgid ""
4120 "A number of environment variables can be defined to modify some of the same "
4121 "parameters as are controlled by B<mallopt>().  Using these variables has the "
4122 "advantage that the source code of the program need not be changed.  To be "
4123 "effective, these variables must be defined before the first call to a memory-"
4124 "allocation function.  (If the same parameters are adjusted via B<mallopt>(), "
4125 "then the B<mallopt>()  settings take precedence.)  For security reasons, "
4126 "these variables are ignored in set-user-ID and set-group-ID programs."
4127 msgstr ""
4128
4129 #. type: Plain text
4130 #: build/C/man3/mallopt.3:323
4131 msgid ""
4132 "The environment variables are as follows (note the trailing underscore at "
4133 "the end of the name of each variable):"
4134 msgstr ""
4135
4136 #. type: TP
4137 #: build/C/man3/mallopt.3:323
4138 #, no-wrap
4139 msgid "B<MALLOC_CHECK_>"
4140 msgstr "B<MALLOC_CHECK_>"
4141
4142 #.  On glibc 2.12/x86, a simple malloc()+free() loop is about 70% slower
4143 #.  when MALLOC_CHECK_ was set.
4144 #. type: Plain text
4145 #: build/C/man3/mallopt.3:340
4146 msgid ""
4147 "This environment variable controls the same parameter as B<mallopt>()  "
4148 "B<M_CHECK_ACTION>.  If this variable is set to a nonzero value, then a "
4149 "special implementation of the memory-allocation functions is used.  (This is "
4150 "accomplished using the B<malloc_hook>(3)  feature.)  This implementation "
4151 "performs additional error checking, but is slower than the standard set of "
4152 "memory-allocation functions.  (This implementation does not detect all "
4153 "possible errors; memory leaks can still occur.)"
4154 msgstr ""
4155
4156 #. type: Plain text
4157 #: build/C/man3/mallopt.3:345
4158 msgid ""
4159 "The value assigned to this environment variable should be a single digit, "
4160 "whose meaning is as described for B<M_CHECK_ACTION>.  Any characters beyond "
4161 "the initial digit are ignored."
4162 msgstr ""
4163
4164 #. type: Plain text
4165 #: build/C/man3/mallopt.3:354
4166 msgid ""
4167 "For security reasons, the effect of B<MALLOC_CHECK_> is disabled by default "
4168 "for set-user-ID and set-group-ID programs.  However, if the file I</etc/suid-"
4169 "debug> exists (the content of the file is irrelevant), then B<MALLOC_CHECK_> "
4170 "also has an effect for set-user-ID and set-group-ID programs."
4171 msgstr ""
4172
4173 #. type: TP
4174 #: build/C/man3/mallopt.3:354
4175 #, no-wrap
4176 msgid "B<MALLOC_MMAP_MAX_>"
4177 msgstr "B<MALLOC_MMAP_MAX_>"
4178
4179 #. type: Plain text
4180 #: build/C/man3/mallopt.3:359
4181 msgid "Controls the same parameter as B<mallopt>()  B<M_MMAP_MAX>."
4182 msgstr ""
4183
4184 #. type: TP
4185 #: build/C/man3/mallopt.3:359
4186 #, no-wrap
4187 msgid "B<MALLOC_MMAP_THRESHOLD_>"
4188 msgstr "B<MALLOC_MMAP_THRESHOLD_>"
4189
4190 #. type: Plain text
4191 #: build/C/man3/mallopt.3:364
4192 msgid "Controls the same parameter as B<mallopt>()  B<M_MMAP_THRESHOLD>."
4193 msgstr ""
4194
4195 #. type: TP
4196 #: build/C/man3/mallopt.3:364
4197 #, no-wrap
4198 msgid "B<MALLOC_PERTURB_>"
4199 msgstr "B<MALLOC_PERTURB_>"
4200
4201 #. type: Plain text
4202 #: build/C/man3/mallopt.3:369
4203 msgid "Controls the same parameter as B<mallopt>()  B<M_PERTURB>."
4204 msgstr ""
4205
4206 #. type: TP
4207 #: build/C/man3/mallopt.3:369
4208 #, no-wrap
4209 msgid "B<MALLOC_TRIM_THRESHOLD_>"
4210 msgstr "B<MALLOC_TRIM_THRESHOLD_>"
4211
4212 #. type: Plain text
4213 #: build/C/man3/mallopt.3:374
4214 msgid "Controls the same parameter as B<mallopt>()  B<M_TRIM_THRESHOLD>."
4215 msgstr ""
4216
4217 #. type: TP
4218 #: build/C/man3/mallopt.3:374
4219 #, no-wrap
4220 msgid "B<MALLOC_TOP_PAD_>"
4221 msgstr "B<MALLOC_TOP_PAD_>"
4222
4223 #. type: Plain text
4224 #: build/C/man3/mallopt.3:379
4225 msgid "Controls the same parameter as B<mallopt>()  B<M_TOP_PAD>."
4226 msgstr ""
4227
4228 #. type: Plain text
4229 #: build/C/man3/mallopt.3:384
4230 msgid "On success, B<mallopt>()  returns 1.  On error, it returns 0."
4231 msgstr "B<mallopt>()  は成功すると 1 を返す。エラーの場合は 0 を返す。"
4232
4233 #.  .SH VERSIONS
4234 #.  Available already in glibc 2.0, possibly earlier
4235 #. type: Plain text
4236 #: build/C/man3/mallopt.3:392
4237 msgid "On error, I<errno> is I<not> set."
4238 msgstr "エラーの場合、I<errno> は設定I<されない>。"
4239
4240 #.  .SH NOTES
4241 #. type: Plain text
4242 #: build/C/man3/mallopt.3:406
4243 msgid ""
4244 "This function is not specified by POSIX or the C standards.  A similar "
4245 "function exists on many System V derivatives, but the range of values for "
4246 "I<param> varies across systems.  The SVID defined options B<M_MXFAST>, "
4247 "B<M_NLBLKS>, B<M_GRAIN>, and B<M_KEEP>, but only the first of these is "
4248 "implemented in glibc."
4249 msgstr ""
4250
4251 #. type: Plain text
4252 #: build/C/man3/mallopt.3:410
4253 msgid "Specifying an invalid value for I<param> does not generate an error."
4254 msgstr ""
4255
4256 #.  FIXME This looks buggy:
4257 #.  setting the M_MXFAST limit rounds up:    (s + SIZE_SZ) & ~MALLOC_ALIGN_MASK)
4258 #.  malloc requests are rounded up:
4259 #.     (req) + SIZE_SZ + MALLOC_ALIGN_MASK) & ~MALLOC_ALIGN_MASK
4260 #.  http://sources.redhat.com/bugzilla/show_bug.cgi?id=12129
4261 #. type: Plain text
4262 #: build/C/man3/mallopt.3:418
4263 msgid ""
4264 "A calculation error within the glibc implementation means that a call of the "
4265 "form:"
4266 msgstr ""
4267
4268 #. type: Plain text
4269 #: build/C/man3/mallopt.3:421
4270 #, no-wrap
4271 msgid "    mallopt(M_MXFAST, n)\n"
4272 msgstr "    mallopt(M_MXFAST, n)\n"
4273
4274 #.  Bins are multiples of 2 * sizeof(size_t) + sizeof(size_t)
4275 #. type: Plain text
4276 #: build/C/man3/mallopt.3:433
4277 msgid ""
4278 "does not result in fastbins being employed for all allocations of size up to "
4279 "I<n>.  To ensure desired results, I<n> should be rounded up to the next "
4280 "multiple greater than or equal to I<(2k+1)*sizeof(size_t)>, where I<k> is an "
4281 "integer."
4282 msgstr ""
4283
4284 #.  FIXME MALLOC_MMAP_THRESHOLD_ and MALLOC_MMAP_MAX_
4285 #.  do have an effect for set-user-ID programs (but not
4286 #.  set-group-ID programs).
4287 #.  http://sources.redhat.com/bugzilla/show_bug.cgi?id=12155
4288 #. type: Plain text
4289 #: build/C/man3/mallopt.3:445
4290 msgid ""
4291 "The B<MALLOC_MMAP_THRESHOLD_> and B<MALLOC_MMAP_MAX_> variables are I<not> "
4292 "ignored in set-group-ID programs."
4293 msgstr ""
4294
4295 #.  FIXME http://sources.redhat.com/bugzilla/show_bug.cgi?id=12140
4296 #. type: Plain text
4297 #: build/C/man3/mallopt.3:466
4298 msgid ""
4299 "If B<mallopt>()  is used to set B<M_PERTURB>, then, as expected, the bytes "
4300 "of allocated memory are initialized to the complement of the byte in "
4301 "I<value>, and when that memory is freed, the bytes of the region are "
4302 "initialized to the byte specified in I<value>.  However, there is an off-by-"
4303 "I<sizeof(size_t)> error in the implementation: instead of initializing "
4304 "precisely the block of memory being freed by the call I<free(p)>, the block "
4305 "starting at I<p+sizeof(size_t)> is initialized."
4306 msgstr ""
4307
4308 #. type: Plain text
4309 #: build/C/man3/mallopt.3:475
4310 msgid ""
4311 "The program below demonstrates the use of B<M_CHECK_ACTION>.  If the program "
4312 "is supplied with an (integer) command-line argument, then that argument is "
4313 "used to set the B<M_CHECK_ACTION> parameter.  The program then allocates a "
4314 "block of memory, and frees it twice (an error)."
4315 msgstr ""
4316
4317 #. type: Plain text
4318 #: build/C/man3/mallopt.3:479
4319 msgid ""
4320 "The following shell session shows what happens when we run this program "
4321 "under glibc, with the default value for B<M_CHECK_ACTION>:"
4322 msgstr ""
4323
4324 #. type: Plain text
4325 #: build/C/man3/mallopt.3:499
4326 #, no-wrap
4327 msgid ""
4328 "$ B<./a.out>\n"
4329 "main(): returned from first free() call\n"
4330 "*** glibc detected *** ./a.out: double free or corruption (top): 0x09d30008 ***\n"
4331 "======= Backtrace: =========\n"
4332 "/lib/libc.so.6(+0x6c501)[0x523501]\n"
4333 "/lib/libc.so.6(+0x6dd70)[0x524d70]\n"
4334 "/lib/libc.so.6(cfree+0x6d)[0x527e5d]\n"
4335 "\\&./a.out[0x80485db]\n"
4336 "/lib/libc.so.6(__libc_start_main+0xe7)[0x4cdce7]\n"
4337 "\\&./a.out[0x8048471]\n"
4338 "======= Memory map: ========\n"
4339 "001e4000-001fe000 r-xp 00000000 08:06 1083555    /lib/libgcc_s.so.1\n"
4340 "001fe000-001ff000 r--p 00019000 08:06 1083555    /lib/libgcc_s.so.1\n"
4341 "[some lines omitted]\n"
4342 "b7814000-b7817000 rw-p 00000000 00:00 0\n"
4343 "bff53000-bff74000 rw-p 00000000 00:00 0          [stack]\n"
4344 "Aborted (core dumped)\n"
4345 msgstr ""
4346 "$ B<./a.out>\n"
4347 "main(): returned from first free() call\n"
4348 "*** glibc detected *** ./a.out: double free or corruption (top): 0x09d30008 ***\n"
4349 "======= Backtrace: =========\n"
4350 "/lib/libc.so.6(+0x6c501)[0x523501]\n"
4351 "/lib/libc.so.6(+0x6dd70)[0x524d70]\n"
4352 "/lib/libc.so.6(cfree+0x6d)[0x527e5d]\n"
4353 "\\&./a.out[0x80485db]\n"
4354 "/lib/libc.so.6(__libc_start_main+0xe7)[0x4cdce7]\n"
4355 "\\&./a.out[0x8048471]\n"
4356 "======= Memory map: ========\n"
4357 "001e4000-001fe000 r-xp 00000000 08:06 1083555    /lib/libgcc_s.so.1\n"
4358 "001fe000-001ff000 r--p 00019000 08:06 1083555    /lib/libgcc_s.so.1\n"
4359 "[some lines omitted]\n"
4360 "b7814000-b7817000 rw-p 00000000 00:00 0\n"
4361 "bff53000-bff74000 rw-p 00000000 00:00 0          [stack]\n"
4362 "Aborted (core dumped)\n"
4363
4364 #. type: Plain text
4365 #: build/C/man3/mallopt.3:504
4366 msgid ""
4367 "The following runs show the results when employing other values for "
4368 "B<M_CHECK_ACTION>:"
4369 msgstr ""
4370
4371 #. type: Plain text
4372 #: build/C/man3/mallopt.3:517
4373 #, no-wrap
4374 msgid ""
4375 "$ B<./a.out 1>             # Diagnose error and continue\n"
4376 "main(): returned from first free() call\n"
4377 "*** glibc detected *** ./a.out: double free or corruption (top): 0x09cbe008 ***\n"
4378 "main(): returned from second free() call\n"
4379 "$ B<./a.out 2>             # Abort without error message\n"
4380 "main(): returned from first free() call\n"
4381 "Aborted (core dumped)\n"
4382 "$ B<./a.out 0>             # Ignore error and continue\n"
4383 "main(): returned from first free() call\n"
4384 "main(): returned from second free() call\n"
4385 msgstr ""
4386 "$ B<./a.out 1>             # Diagnose error and continue\n"
4387 "main(): returned from first free() call\n"
4388 "*** glibc detected *** ./a.out: double free or corruption (top): 0x09cbe008 ***\n"
4389 "main(): returned from second free() call\n"
4390 "$ B<./a.out 2>             # Abort without error message\n"
4391 "main(): returned from first free() call\n"
4392 "Aborted (core dumped)\n"
4393 "$ B<./a.out 0>             # Ignore error and continue\n"
4394 "main(): returned from first free() call\n"
4395 "main(): returned from second free() call\n"
4396
4397 #. type: Plain text
4398 #: build/C/man3/mallopt.3:523
4399 msgid ""
4400 "The next run shows how to set the same parameter using the B<MALLOC_CHECK_> "
4401 "environment variable:"
4402 msgstr ""
4403
4404 #. type: Plain text
4405 #: build/C/man3/mallopt.3:530
4406 #, no-wrap
4407 msgid ""
4408 "$ B<MALLOC_CHECK_=1 ./a.out>\n"
4409 "main(): returned from first free() call\n"
4410 "*** glibc detected *** ./a.out: free(): invalid pointer: 0x092c2008 ***\n"
4411 "main(): returned from second free() call\n"
4412 msgstr ""
4413 "$ B<MALLOC_CHECK_=1 ./a.out>\n"
4414 "main(): returned from first free() call\n"
4415 "*** glibc detected *** ./a.out: free(): invalid pointer: 0x092c2008 ***\n"
4416 "main(): returned from second free() call\n"
4417
4418 #. type: Plain text
4419 #: build/C/man3/mallopt.3:538
4420 #, no-wrap
4421 msgid ""
4422 "#include E<lt>malloc.hE<gt>\n"
4423 "#include E<lt>stdio.hE<gt>\n"
4424 "#include E<lt>stdlib.hE<gt>\n"
4425 msgstr ""
4426 "#include E<lt>malloc.hE<gt>\n"
4427 "#include E<lt>stdio.hE<gt>\n"
4428 "#include E<lt>stdlib.hE<gt>\n"
4429
4430 #. type: Plain text
4431 #: build/C/man3/mallopt.3:543 build/C/man3/mcheck.3:187
4432 #, no-wrap
4433 msgid ""
4434 "int\n"
4435 "main(int argc, char *argv[])\n"
4436 "{\n"
4437 "    char *p;\n"
4438 msgstr ""
4439 "int\n"
4440 "main(int argc, char *argv[])\n"
4441 "{\n"
4442 "    char *p;\n"
4443
4444 #. type: Plain text
4445 #: build/C/man3/mallopt.3:550
4446 #, no-wrap
4447 msgid ""
4448 "    if (argc E<gt> 1) {\n"
4449 "        if (mallopt(M_CHECK_ACTION, atoi(argv[1])) != 1) {\n"
4450 "            fprintf(stderr, \"mallopt() failed\");\n"
4451 "            exit(EXIT_FAILURE);\n"
4452 "        }\n"
4453 "    }\n"
4454 msgstr ""
4455 "    if (argc E<gt> 1) {\n"
4456 "        if (mallopt(M_CHECK_ACTION, atoi(argv[1])) != 1) {\n"
4457 "            fprintf(stderr, \"mallopt() failed\");\n"
4458 "            exit(EXIT_FAILURE);\n"
4459 "        }\n"
4460 "    }\n"
4461
4462 #. type: Plain text
4463 #: build/C/man3/mallopt.3:556
4464 #, no-wrap
4465 msgid ""
4466 "    p = malloc(1000);\n"
4467 "    if (p == NULL) {\n"
4468 "        fprintf(stderr, \"malloc() failed\");\n"
4469 "        exit(EXIT_FAILURE);\n"
4470 "    }\n"
4471 msgstr ""
4472 "    p = malloc(1000);\n"
4473 "    if (p == NULL) {\n"
4474 "        fprintf(stderr, \"malloc() failed\");\n"
4475 "        exit(EXIT_FAILURE);\n"
4476 "    }\n"
4477
4478 #. type: Plain text
4479 #: build/C/man3/mallopt.3:559
4480 #, no-wrap
4481 msgid ""
4482 "    free(p);\n"
4483 "    printf(\"main(): returned from first free() call\\en\");\n"
4484 msgstr ""
4485 "    free(p);\n"
4486 "    printf(\"main(): returned from first free() call\\en\");\n"
4487
4488 #. type: Plain text
4489 #: build/C/man3/mallopt.3:562
4490 #, no-wrap
4491 msgid ""
4492 "    free(p);\n"
4493 "    printf(\"main(): returned from second free() call\\en\");\n"
4494 msgstr ""
4495 "    free(p);\n"
4496 "    printf(\"main(): returned from second free() call\\en\");\n"
4497
4498 #. type: Plain text
4499 #: build/C/man3/mallopt.3:580
4500 msgid ""
4501 "B<mmap>(2), B<sbrk>(2), B<mallinfo>(3), B<malloc>(3), B<malloc_hook>(3), "
4502 "B<malloc_info>(3), B<malloc_stats>(3), B<malloc_trim>(3), B<mcheck>(3), "
4503 "B<mtrace>(3), B<posix_memalign>(3)"
4504 msgstr ""
4505 "B<mmap>(2), B<sbrk>(2), B<mallinfo>(3), B<malloc>(3), B<malloc_hook>(3), "
4506 "B<malloc_info>(3), B<malloc_stats>(3), B<malloc_trim>(3), B<mcheck>(3), "
4507 "B<mtrace>(3), B<posix_memalign>(3)"
4508
4509 #. type: TH
4510 #: build/C/man3/mcheck.3:25
4511 #, no-wrap
4512 msgid "MCHECK"
4513 msgstr "MCHECK"
4514
4515 #. type: TH
4516 #: build/C/man3/mcheck.3:25
4517 #, no-wrap
4518 msgid "2014-01-11"
4519 msgstr "2014-01-11"
4520
4521 #. type: Plain text
4522 #: build/C/man3/mcheck.3:28
4523 msgid ""
4524 "mcheck, mcheck_check_all, mcheck_pedantic, mprobe - heap consistency checking"
4525 msgstr ""
4526
4527 #. type: Plain text
4528 #: build/C/man3/mcheck.3:31
4529 #, no-wrap
4530 msgid "B<#include E<lt>mcheck.hE<gt>>\n"
4531 msgstr "B<#include E<lt>mcheck.hE<gt>>\n"
4532
4533 #. type: Plain text
4534 #: build/C/man3/mcheck.3:33
4535 #, no-wrap
4536 msgid "B<int mcheck(void (*>I<abortfunc>B<)(enum mcheck_status >I<mstatus>B<));>\n"
4537 msgstr ""
4538
4539 #. type: Plain text
4540 #: build/C/man3/mcheck.3:35
4541 #, no-wrap
4542 msgid "B<int mcheck_pedantic(void (*>I<abortfunc>B<)(enum mcheck_status >I<mstatus>B<));>\n"
4543 msgstr ""
4544
4545 #. type: Plain text
4546 #: build/C/man3/mcheck.3:37
4547 #, no-wrap
4548 msgid "B<void mcheck_check_all(void);>\n"
4549 msgstr "B<void mcheck_check_all(void);>\n"
4550
4551 #. type: Plain text
4552 #: build/C/man3/mcheck.3:39
4553 #, no-wrap
4554 msgid "B<enum mcheck_status mprobe(void *>I<ptr>B<);>\n"
4555 msgstr "B<enum mcheck_status mprobe(void *>I<ptr>B<);>\n"
4556
4557 #. type: Plain text
4558 #: build/C/man3/mcheck.3:51
4559 msgid ""
4560 "The B<mcheck>()  function installs a set of debugging hooks for the "
4561 "B<malloc>(3)  family of memory-allocation functions.  These hooks cause "
4562 "certain consistency checks to be performed on the state of the heap.  The "
4563 "checks can detect application errors such as freeing a block of memory more "
4564 "than once or corrupting the bookkeeping data structures that immediately "
4565 "precede a block of allocated memory."
4566 msgstr ""
4567
4568 #. type: Plain text
4569 #: build/C/man3/mcheck.3:63
4570 msgid ""
4571 "To be effective, the B<mcheck>()  function must be called before the first "
4572 "call to B<malloc>(3)  or a related function.  In cases where this is "
4573 "difficult to ensure, linking the program with I<-lmcheck> inserts an "
4574 "implicit call to B<mcheck>()  (with a NULL argument)  before the first call "
4575 "to a memory-allocation function."
4576 msgstr ""
4577
4578 #. type: Plain text
4579 #: build/C/man3/mcheck.3:71
4580 msgid ""
4581 "The B<mcheck_pedantic>()  function is similar to B<mcheck>(), but performs "
4582 "checks on all allocated blocks whenever one of the memory-allocation "
4583 "functions is called.  This can be very slow!"
4584 msgstr ""
4585
4586 #. type: Plain text
4587 #: build/C/man3/mcheck.3:78
4588 msgid ""
4589 "The B<mcheck_check_all>()  function causes an immediate check on all "
4590 "allocated blocks.  This call is effective only if B<mcheck>()  is called "
4591 "beforehand."
4592 msgstr ""
4593
4594 #. type: Plain text
4595 #: build/C/man3/mcheck.3:91
4596 msgid ""
4597 "If the system detects an inconsistency in the heap, the caller-supplied "
4598 "function pointed to by I<abortfunc> is invoked with a single argument "
4599 "argument, I<mstatus>, that indicates what type of inconsistency was "
4600 "detected.  If I<abortfunc> is NULL, a default function prints an error "
4601 "message on I<stderr> and calls B<abort>(3)."
4602 msgstr ""
4603
4604 #. type: Plain text
4605 #: build/C/man3/mcheck.3:103
4606 msgid ""
4607 "The B<mprobe>()  function performs a consistency check on the block of "
4608 "allocated memory pointed to by I<ptr>.  The B<mcheck>()  function should be "
4609 "called beforehand (otherwise B<mprobe>()  returns B<MCHECK_DISABLED>)."
4610 msgstr ""
4611
4612 #. type: Plain text
4613 #: build/C/man3/mcheck.3:111
4614 msgid ""
4615 "The following list describes the values returned by B<mprobe>()  or passed "
4616 "as the I<mstatus> argument when I<abortfunc> is invoked:"
4617 msgstr ""
4618
4619 #. type: TP
4620 #: build/C/man3/mcheck.3:111
4621 #, no-wrap
4622 msgid "B<MCHECK_DISABLED> (B<mprobe>() only)"
4623 msgstr ""
4624
4625 #. type: Plain text
4626 #: build/C/man3/mcheck.3:116
4627 msgid ""
4628 "B<mcheck>()  was not called before the first memory allocation function was "
4629 "called.  Consistency checking is not possible."
4630 msgstr ""
4631
4632 #. type: TP
4633 #: build/C/man3/mcheck.3:116
4634 #, no-wrap
4635 msgid "B<MCHECK_OK> (B<mprobe>() only)"
4636 msgstr ""
4637
4638 #. type: Plain text
4639 #: build/C/man3/mcheck.3:119
4640 msgid "No inconsistency detected."
4641 msgstr ""
4642
4643 #. type: TP
4644 #: build/C/man3/mcheck.3:119
4645 #, no-wrap
4646 msgid "B<MCHECK_HEAD>"
4647 msgstr "B<MCHECK_HEAD>"
4648
4649 #. type: Plain text
4650 #: build/C/man3/mcheck.3:122
4651 msgid "Memory preceding an allocated block was clobbered."
4652 msgstr ""
4653
4654 #. type: TP
4655 #: build/C/man3/mcheck.3:122
4656 #, no-wrap
4657 msgid "B<MCHECK_TAIL>"
4658 msgstr "B<MCHECK_TAIL>"
4659
4660 #. type: Plain text
4661 #: build/C/man3/mcheck.3:125
4662 msgid "Memory following an allocated block was clobbered."
4663 msgstr ""
4664
4665 #. type: TP
4666 #: build/C/man3/mcheck.3:125
4667 #, no-wrap
4668 msgid "B<MCHECK_FREE>"
4669 msgstr "B<MCHECK_FREE>"
4670
4671 #. type: Plain text
4672 #: build/C/man3/mcheck.3:129
4673 msgid "A block of memory was freed twice."
4674 msgstr ""
4675
4676 #. type: Plain text
4677 #: build/C/man3/mcheck.3:134
4678 msgid ""
4679 "B<mcheck>()  and B<mcheck_pedantic>()  return 0 on success, or -1 on error."
4680 msgstr ""
4681
4682 #. type: Plain text
4683 #: build/C/man3/mcheck.3:145
4684 msgid ""
4685 "The B<mcheck_pedantic>()  and B<mcheck_check_all>()  functions are available "
4686 "since glibc 2.2.  The B<mcheck>()  and B<mprobe>()  functions are present "
4687 "since at least glibc 2.0"
4688 msgstr ""
4689
4690 #.  But is MALLOC_CHECK_ slower?
4691 #. type: Plain text
4692 #: build/C/man3/mcheck.3:159
4693 msgid ""
4694 "Linking a program with I<-lmcheck> and using the B<MALLOC_CHECK_> "
4695 "environment variable (described in B<mallopt>(3))  cause the same kinds of "
4696 "errors to be detected.  But, using B<MALLOC_CHECK_> does not require the "
4697 "application to be relinked."
4698 msgstr ""
4699
4700 #. type: Plain text
4701 #: build/C/man3/mcheck.3:165
4702 msgid ""
4703 "The program below calls B<mcheck>()  with a NULL argument and then frees the "
4704 "same block of memory twice.  The following shell session demonstrates what "
4705 "happens when running the program:"
4706 msgstr ""
4707
4708 #. type: Plain text
4709 #: build/C/man3/mcheck.3:170
4710 #, no-wrap
4711 msgid ""
4712 "$B< ./a.out>\n"
4713 "About to free\n"
4714 msgstr ""
4715
4716 #. type: Plain text
4717 #: build/C/man3/mcheck.3:174
4718 #, no-wrap
4719 msgid ""
4720 "About to free a second time\n"
4721 "block freed twice\n"
4722 "Aborted (core dumped)\n"
4723 msgstr ""
4724
4725 #. type: Plain text
4726 #: build/C/man3/mcheck.3:182
4727 #, no-wrap
4728 msgid ""
4729 "#include E<lt>stdlib.hE<gt>\n"
4730 "#include E<lt>stdio.hE<gt>\n"
4731 "#include E<lt>mcheck.hE<gt>\n"
4732 msgstr ""
4733 "#include E<lt>stdlib.hE<gt>\n"
4734 "#include E<lt>stdio.hE<gt>\n"
4735 "#include E<lt>mcheck.hE<gt>\n"
4736
4737 #. type: Plain text
4738 #: build/C/man3/mcheck.3:190
4739 #, no-wrap
4740 msgid ""
4741 "    if (mcheck(NULL) != 0) {\n"
4742 "        fprintf(stderr, \"mcheck() failed\\en\");\n"
4743 msgstr ""
4744
4745 #. type: Plain text
4746 #: build/C/man3/mcheck.3:193
4747 #, no-wrap
4748 msgid ""
4749 "        exit(EXIT_FAILURE);\n"
4750 "    }\n"
4751 msgstr ""
4752 "        exit(EXIT_FAILURE);\n"
4753 "    }\n"
4754
4755 #. type: Plain text
4756 #: build/C/man3/mcheck.3:195
4757 #, no-wrap
4758 msgid "    p = malloc(1000);\n"
4759 msgstr "    p = malloc(1000);\n"
4760
4761 #. type: Plain text
4762 #: build/C/man3/mcheck.3:200
4763 #, no-wrap
4764 msgid ""
4765 "    fprintf(stderr, \"About to free\\en\");\n"
4766 "    free(p);\n"
4767 "    fprintf(stderr, \"\\enAbout to free a second time\\en\");\n"
4768 "    free(p);\n"
4769 msgstr ""
4770
4771 #. type: Plain text
4772 #: build/C/man3/mcheck.3:208
4773 msgid "B<malloc>(3), B<mallopt>(3), B<mtrace>(3)"
4774 msgstr "B<malloc>(3), B<mallopt>(3), B<mtrace>(3)"
4775
4776 #. type: TH
4777 #: build/C/man2/mlock.2:26
4778 #, no-wrap
4779 msgid "MLOCK"
4780 msgstr "MLOCK"
4781
4782 #. type: TH
4783 #: build/C/man2/mlock.2:26
4784 #, no-wrap
4785 msgid "2014-04-14"
4786 msgstr "2014-04-14"
4787
4788 #. type: Plain text
4789 #: build/C/man2/mlock.2:29
4790 msgid "mlock, munlock, mlockall, munlockall - lock and unlock memory"
4791 msgstr "mlock - メモリのロックとロック解除を行う"
4792
4793 #. type: Plain text
4794 #: build/C/man2/mlock.2:32 build/C/man2/mmap.2:46 build/C/man2/mmap2.2:35
4795 #: build/C/man2/mprotect.2:44 build/C/man2/mremap.2:38
4796 #, no-wrap
4797 msgid "B<#include E<lt>sys/mman.hE<gt>>\n"
4798 msgstr "B<#include E<lt>sys/mman.hE<gt>>\n"
4799
4800 #. type: Plain text
4801 #: build/C/man2/mlock.2:35
4802 #, no-wrap
4803 msgid ""
4804 "B<int mlock(const void *>I<addr>B<, size_t >I<len>B<);>\n"
4805 "B<int munlock(const void *>I<addr>B<, size_t >I<len>B<);>\n"
4806 msgstr ""
4807 "B<int mlock(const void *>I<addr>B<, size_t >I<len>B<);>\n"
4808 "B<int munlock(const void *>I<addr>B<, size_t >I<len>B<);>\n"
4809
4810 #. type: Plain text
4811 #: build/C/man2/mlock.2:38
4812 #, no-wrap
4813 msgid ""
4814 "B<int mlockall(int >I<flags>B<);>\n"
4815 "B<int munlockall(void);>\n"
4816 msgstr ""
4817 "B<int mlockall(int >I<flags>B<);>\n"
4818 "B<int munlockall(void);>\n"
4819
4820 #. type: Plain text
4821 #: build/C/man2/mlock.2:54
4822 msgid ""
4823 "B<mlock>()  and B<mlockall>()  respectively lock part or all of the calling "
4824 "process's virtual address space into RAM, preventing that memory from being "
4825 "paged to the swap area.  B<munlock>()  and B<munlockall>()  perform the "
4826 "converse operation, respectively unlocking part or all of the calling "
4827 "process's virtual address space, so that pages in the specified virtual "
4828 "address range may once more to be swapped out if required by the kernel "
4829 "memory manager.  Memory locking and unlocking are performed in units of "
4830 "whole pages."
4831 msgstr ""
4832 "B<mlock>()  と B<mlockall>()  はそれぞれ、呼び出し元プロセスの仮想アドレス空"
4833 "間の一部または全部を RAM 上にロックし、メモリがスワップエリアにページングされ"
4834 "るのを防ぐ。 B<munlock>()  と B<munlockall>()  は逆の操作で、それぞれ呼び出し"
4835 "元プロセスの仮想アドレス空間の一部または全部を ロック解除する。つまり、指定さ"
4836 "れた仮想アドレス範囲のページは カーネルメモリマネージャーから要求されればス"
4837 "ワップアウトするようになる。 メモリのロックとロック解除はページ単位で行われ"
4838 "る。"
4839
4840 #. type: SS
4841 #: build/C/man2/mlock.2:54
4842 #, no-wrap
4843 msgid "mlock() and munlock()"
4844 msgstr "mlock() と munlock()"
4845
4846 #. type: Plain text
4847 #: build/C/man2/mlock.2:64
4848 msgid ""
4849 "B<mlock>()  locks pages in the address range starting at I<addr> and "
4850 "continuing for I<len> bytes.  All pages that contain a part of the specified "
4851 "address range are guaranteed to be resident in RAM when the call returns "
4852 "successfully; the pages are guaranteed to stay in RAM until later unlocked."
4853 msgstr ""
4854 "B<mlock>()  は I<addr> から始まる長さ I<len> バイトのアドレス範囲のページを"
4855 "ロックする。 呼び出しが成功した場合には、 指定されたアドレス範囲を含む全ての"
4856 "ページは RAM に残り続けることが保証される。 これらのページは後でロック解除さ"
4857 "れるまで RAM に残り続けることが保証される。"
4858
4859 #. type: Plain text
4860 #: build/C/man2/mlock.2:73
4861 msgid ""
4862 "B<munlock>()  unlocks pages in the address range starting at I<addr> and "
4863 "continuing for I<len> bytes.  After this call, all pages that contain a part "
4864 "of the specified memory range can be moved to external swap space again by "
4865 "the kernel."
4866 msgstr ""
4867 "B<munlock>()  は、 I<addr> から始まる長さ I<len> バイトのアドレス範囲のページ"
4868 "のロックを解除する。 この呼び出しを行った後は、カーネルが、指定されたメモリ範"
4869 "囲を含む 全てのページを外部のスワップ空間に移動できるようになる。"
4870
4871 #. type: SS
4872 #: build/C/man2/mlock.2:73
4873 #, no-wrap
4874 msgid "mlockall() and munlockall()"
4875 msgstr "mlockall() と munlockall()"
4876
4877 #. type: Plain text
4878 #: build/C/man2/mlock.2:83
4879 msgid ""
4880 "B<mlockall>()  locks all pages mapped into the address space of the calling "
4881 "process.  This includes the pages of the code, data and stack segment, as "
4882 "well as shared libraries, user space kernel data, shared memory, and memory-"
4883 "mapped files.  All mapped pages are guaranteed to be resident in RAM when "
4884 "the call returns successfully; the pages are guaranteed to stay in RAM until "
4885 "later unlocked."
4886 msgstr ""
4887 "B<mlockall>()  は呼び出し元プロセスのアドレス空間にマップされている全てのペー"
4888 "ジを ロックする。これにはコード、データ、スタックの 各セグメント、共有ライブ"
4889 "ラリ、カーネルのユーザー空間データ、 共有メモリ、メモリ・マップされたファイル"
4890 "が含まれる。 システム・コールが成功した場合には全てのマップされたページは "
4891 "RAM に 残ることを保証される。 これらのページは後でロック解除されるまで RAM に"
4892 "残り続けることが保証される。"
4893
4894 #. type: Plain text
4895 #: build/C/man2/mlock.2:88
4896 msgid ""
4897 "The I<flags> argument is constructed as the bitwise OR of one or more of the "
4898 "following constants:"
4899 msgstr "I<flags> 引数は以下の内容の一つまたは複数のビット OR から構成される:"
4900
4901 #. type: TP
4902 #: build/C/man2/mlock.2:88
4903 #, no-wrap
4904 msgid "B<MCL_CURRENT>"
4905 msgstr "B<MCL_CURRENT>"
4906
4907 #. type: Plain text
4908 #: build/C/man2/mlock.2:92
4909 msgid ""
4910 "Lock all pages which are currently mapped into the address space of the "
4911 "process."
4912 msgstr ""
4913 "現在、プロセスのアドレス空間にマップされている全てのページをロックする。"
4914
4915 #. type: TP
4916 #: build/C/man2/mlock.2:92
4917 #, no-wrap
4918 msgid "B<MCL_FUTURE>"
4919 msgstr "B<MCL_FUTURE>"
4920
4921 #. type: Plain text
4922 #: build/C/man2/mlock.2:99
4923 msgid ""
4924 "Lock all pages which will become mapped into the address space of the "
4925 "process in the future.  These could be for instance new pages required by a "
4926 "growing heap and stack as well as new memory-mapped files or shared memory "
4927 "regions."
4928 msgstr ""
4929 "将来、プロセスのアドレス空間にマップされる全てのページをロックする。 例えば、"
4930 "ヒープ (heap) やスタックの成長により新しく必要になったページだけで なく、新し"
4931 "くメモリマップされたファイルや共有メモリ領域もロックされる。"
4932
4933 #. type: Plain text
4934 #: build/C/man2/mlock.2:112
4935 msgid ""
4936 "If B<MCL_FUTURE> has been specified, then a later system call (e.g., "
4937 "B<mmap>(2), B<sbrk>(2), B<malloc>(3)), may fail if it would cause the number "
4938 "of locked bytes to exceed the permitted maximum (see below).  In the same "
4939 "circumstances, stack growth may likewise fail: the kernel will deny stack "
4940 "expansion and deliver a B<SIGSEGV> signal to the process."
4941 msgstr ""
4942 "B<MCL_FUTURE> が指定されていると、以後のシステムコール (例えば、 B<mmap>(2), "
4943 "B<sbrk>(2), B<malloc>(3))  は、ロックするバイト数が許可された最大値 (下記参"
4944 "照) を超えた場合に 失敗する可能性がある。 同様に、スタックの成長も失敗する可"
4945 "能性がある。 その場合、カーネルはスタックの拡張を拒否し、 B<SIGSEGV> をプロセ"
4946 "スに送る。"
4947
4948 #. type: Plain text
4949 #: build/C/man2/mlock.2:116
4950 msgid ""
4951 "B<munlockall>()  unlocks all pages mapped into the address space of the "
4952 "calling process."
4953 msgstr ""
4954 "B<munlockall>()  は、呼び出し元プロセスのアドレス空間にマッピングされている "
4955 "全てのページをロック解除する。"
4956
4957 #. type: Plain text
4958 #: build/C/man2/mlock.2:122
4959 msgid ""
4960 "On success these system calls return 0.  On error, -1 is returned, I<errno> "
4961 "is set appropriately, and no changes are made to any locks in the address "
4962 "space of the process."
4963 msgstr ""
4964 "成功した場合は、これらのシステムコールはゼロを返す。 エラーの場合は -1 が返さ"
4965 "れ、 I<errno> が適切に設定され、プロセスのアドレス空間におけるロックは変更さ"
4966 "れない。"
4967
4968 #. type: Plain text
4969 #: build/C/man2/mlock.2:131
4970 msgid ""
4971 "(Linux 2.6.9 and later) the caller had a nonzero B<RLIMIT_MEMLOCK> soft "
4972 "resource limit, but tried to lock more memory than the limit permitted.  "
4973 "This limit is not enforced if the process is privileged (B<CAP_IPC_LOCK>)."
4974 msgstr ""
4975 "(Linux 2.6.9 以降) 呼び出し元は非ゼロの ソフト資源制限 B<RLIMIT_MEMLOCK> を持"
4976 "つが、制限が許可している以上のメモリをロックしようとした。 この制限は、プロセ"
4977 "スが特権 (B<CAP_IPC_LOCK>)  を持っている場合は適用されない。"
4978
4979 #.  In the case of mlock(), this check is somewhat buggy: it doesn't
4980 #.  take into account whether the to-be-locked range overlaps with
4981 #.  already locked pages.  Thus, suppose we allocate
4982 #.  (num_physpages / 4 + 1) of memory, and lock those pages once using
4983 #.  mlock(), and then lock the *same* page range a second time.
4984 #.  In the case, the second mlock() call will fail, since the check
4985 #.  calculates that the process is trying to lock (num_physpages / 2 + 2)
4986 #.  pages, which of course is not true.  (MTK, Nov 04, kernel 2.4.28)
4987 #. type: Plain text
4988 #: build/C/man2/mlock.2:143
4989 msgid ""
4990 "(Linux 2.4 and earlier) the calling process tried to lock more than half of "
4991 "RAM."
4992 msgstr ""
4993 "(Linux 2.4 以前) 呼び出し元プロセスが RAM の半分以上をロックしようとした。"
4994
4995 #. SVr4 documents an additional EAGAIN error code.
4996 #. type: Plain text
4997 #: build/C/man2/mlock.2:149
4998 msgid ""
4999 "The caller is not privileged, but needs privilege (B<CAP_IPC_LOCK>)  to "
5000 "perform the requested operation."
5001 msgstr ""
5002 "呼び出し側が特権を持っていないが、\n"
5003 "要求された操作を実行するには特権 (B<CAP_IPC_LOCK>) が必要である。"
5004
5005 #. type: Plain text
5006 #: build/C/man2/mlock.2:154
5007 msgid "For B<mlock>()  and B<munlock>():"
5008 msgstr "B<mlock>()  と B<munlock>()  用として:"
5009
5010 #. type: Plain text
5011 #: build/C/man2/mlock.2:157
5012 msgid "Some or all of the specified address range could not be locked."
5013 msgstr "指定されたアドレス範囲の一部または全てをロックすることができなかった。"
5014
5015 #. type: Plain text
5016 #: build/C/man2/mlock.2:164
5017 msgid ""
5018 "The result of the addition I<start>+I<len> was less than I<start> (e.g., the "
5019 "addition may have resulted in an overflow)."
5020 msgstr ""
5021 "I<start>+I<len> の加算の結果が I<start> よりも小さかった\n"
5022 "(例えば、加算でオーバーフローが発生したなど)。"
5023
5024 #. type: Plain text
5025 #: build/C/man2/mlock.2:169
5026 msgid "(Not on Linux)  I<addr> was not a multiple of the page size."
5027 msgstr ""
5028 "(Linux ではこの意味で使われない)  I<addr> がページサイズの倍数ではない。"
5029
5030 #. type: Plain text
5031 #: build/C/man2/mlock.2:173
5032 msgid ""
5033 "Some of the specified address range does not correspond to mapped pages in "
5034 "the address space of the process."
5035 msgstr ""
5036 "指定されたアドレス範囲がプロセスのアドレス空間にマップされたページと 一致しな"
5037 "い。"
5038
5039 #. type: Plain text
5040 #: build/C/man2/mlock.2:176
5041 msgid "For B<mlockall>():"
5042 msgstr "B<mlockall>()  用として:"
5043
5044 #. type: Plain text
5045 #: build/C/man2/mlock.2:179
5046 msgid "Unknown I<flags> were specified."
5047 msgstr "未知の I<flags> が指定された。"
5048
5049 #. type: Plain text
5050 #: build/C/man2/mlock.2:182
5051 msgid "For B<munlockall>():"
5052 msgstr "B<munlockall>()  用として:"
5053
5054 #. type: Plain text
5055 #: build/C/man2/mlock.2:186
5056 msgid ""
5057 "(Linux 2.6.8 and earlier) The caller was not privileged (B<CAP_IPC_LOCK>)."
5058 msgstr ""
5059 "(Linux 2.6.8 以前) 呼び出し元が権限 (B<CAP_IPC_LOCK>)  を持っていない。"
5060
5061 #. type: Plain text
5062 #: build/C/man2/mlock.2:188
5063 msgid "POSIX.1-2001, SVr4."
5064 msgstr "POSIX.1-2001, SVr4."
5065
5066 #. type: SH
5067 #: build/C/man2/mlock.2:188 build/C/man2/mmap.2:499 build/C/man2/msync.2:105
5068 #, no-wrap
5069 msgid "AVAILABILITY"
5070 msgstr "可用性"
5071
5072 #. type: Plain text
5073 #: build/C/man2/mlock.2:200
5074 msgid ""
5075 "On POSIX systems on which B<mlock>()  and B<munlock>()  are available, "
5076 "B<_POSIX_MEMLOCK_RANGE> is defined in I<E<lt>unistd.hE<gt>> and the number "
5077 "of bytes in a page can be determined from the constant B<PAGESIZE> (if "
5078 "defined) in I<E<lt>limits.hE<gt>> or by calling I<sysconf(_SC_PAGESIZE)>."
5079 msgstr ""
5080 "B<mlock>()  と B<munlock>()  が使用可能な POSIX システムでは "
5081 "B<_POSIX_MEMLOCK_RANGE> が I<E<lt>unistd.hE<gt>> で定義されている。 また、"
5082 "ページあたりのバイト数は、 I<E<lt>limits.hE<gt>> で定義される定数 "
5083 "B<PAGESIZE> から (定義されている場合)、もしくは I<sysconf(_SC_PAGESIZE)> を呼"
5084 "び出すことで決定できる。"
5085
5086 #.  POSIX.1-2001: It shall be defined to -1 or 0 or 200112L.
5087 #.  -1: unavailable, 0: ask using sysconf().
5088 #.  glibc defines it to 1.
5089 #. type: Plain text
5090 #: build/C/man2/mlock.2:213
5091 msgid ""
5092 "On POSIX systems on which B<mlockall>()  and B<munlockall>()  are available, "
5093 "B<_POSIX_MEMLOCK> is defined in I<E<lt>unistd.hE<gt>> to a value greater "
5094 "than 0.  (See also B<sysconf>(3).)"
5095 msgstr ""
5096 "B<mlockall>()  と B<munlockall>()  が利用可能な POSIX システムでは、 "
5097 "B<_POSIX_MEMLOCK> は I<E<lt>unistd.hE<gt>> で 0 より大きい値に定義されている "
5098 "(B<sysconf>(3)  も参照のこと)。"
5099
5100 #. type: Plain text
5101 #: build/C/man2/mlock.2:231
5102 msgid ""
5103 "Memory locking has two main applications: real-time algorithms and high-"
5104 "security data processing.  Real-time applications require deterministic "
5105 "timing, and, like scheduling, paging is one major cause of unexpected "
5106 "program execution delays.  Real-time applications will usually also switch "
5107 "to a real-time scheduler with B<sched_setscheduler>(2).  Cryptographic "
5108 "security software often handles critical bytes like passwords or secret keys "
5109 "as data structures.  As a result of paging, these secrets could be "
5110 "transferred onto a persistent swap store medium, where they might be "
5111 "accessible to the enemy long after the security software has erased the "
5112 "secrets in RAM and terminated.  (But be aware that the suspend mode on "
5113 "laptops and some desktop computers will save a copy of the system's RAM to "
5114 "disk, regardless of memory locks.)"
5115 msgstr ""
5116 "メモリのロックの用途としては主に二つある: リアルタイム アルゴリズムと高いセ"
5117 "キュリティの必要なデータ処理である。リアルタイムの アプリケーションは決定的な"
5118 "タイミングやスケジューリングを必要とするが、 ページングは予期しないプログラム"
5119 "の実行遅延をもたらす主要な要因となる。 リアルタイムのアプリケーションはたいて"
5120 "いは B<sched_setscheduler>(2)  でリアルタイムスケジューラに変更される。 暗号"
5121 "やセキュリティのソフトウェアはしばしばパスワードや秘密鍵のデータの ような重要"
5122 "なバイト列を扱う。ページングの結果、これらの秘密が スワップ用の固定媒体に転送"
5123 "されるかもしれない。そして、セキュリティ・ ソフトウェアが RAM 上の秘密を削除"
5124 "して終了したずっと後になっても、 このスワップされたデータには敵がアクセスでき"
5125 "る可能性がある (しかし、ラップトップといくつかのデスクトップコンピュータの サ"
5126 "スペンドモードはシステムの RAM の内容をメモリのロックに関わらず ディスクに保"
5127 "存することに注意)。"
5128
5129 #. type: Plain text
5130 #: build/C/man2/mlock.2:244
5131 msgid ""
5132 "Real-time processes that are using B<mlockall>()  to prevent delays on page "
5133 "faults should reserve enough locked stack pages before entering the time-"
5134 "critical section, so that no page fault can be caused by function calls.  "
5135 "This can be achieved by calling a function that allocates a sufficiently "
5136 "large automatic variable (an array) and writes to the memory occupied by "
5137 "this array in order to touch these stack pages.  This way, enough pages will "
5138 "be mapped for the stack and can be locked into RAM.  The dummy writes ensure "
5139 "that not even copy-on-write page faults can occur in the critical section."
5140 msgstr ""
5141 "リアルタイムプロセスが B<mlockall>()  を使ってページフォールトによる遅延を防"
5142 "ごうとする場合、 関数呼び出しによってページフォールトが発生しないように、 時"
5143 "間制限の厳しい部分 (time-critical section) に入る前に 十分な量のロックされた"
5144 "スタックを確保しておく必要がある。 これを実現するには、十分な大きさの自動変"
5145 "数 (の配列) を確保し、 これらのスタック用のページがメモリ上に確保されるように"
5146 "この配列に 書き込みを行う関数を用意し、これを呼び出せばよい。こうすること"
5147 "で、 十分な量のページがスタックにマッピングされ、RAM にロックされる。 ダミー"
5148 "の書き込みを行うことによって、 時間制限の厳しい部分 (critical section) 内では"
5149 "書き込み時コピーによる ページフォールトさえも発生しないことが保証される。"
5150
5151 #. type: Plain text
5152 #: build/C/man2/mlock.2:257
5153 msgid ""
5154 "Memory locks are not inherited by a child created via B<fork>(2)  and are "
5155 "automatically removed (unlocked) during an B<execve>(2)  or when the process "
5156 "terminates.  The B<mlockall>()  B<MCL_FUTURE> setting is not inherited by a "
5157 "child created via B<fork>(2)  and is cleared during an B<execve>(2)."
5158 msgstr ""
5159 "メモリロックは B<fork>(2)  で作成された子プロセスには継承されず、 "
5160 "B<execve>(2)  が呼ばれたり、プロセスが終了した場合は 自動的に削除される (ロッ"
5161 "ク解除される)。 B<mlockall>() の B<MCL_FUTURE> 設定は B<fork>(2) で作成された"
5162 "子プロセスには継承されず、 B<execve>(2) の中でクリアされる。"
5163
5164 #. type: Plain text
5165 #: build/C/man2/mlock.2:261
5166 msgid ""
5167 "The memory lock on an address range is automatically removed if the address "
5168 "range is unmapped via B<munmap>(2)."
5169 msgstr ""
5170 "あるアドレス範囲に対するメモリロックは、そのアドレス範囲が B<munmap>(2)  に"
5171 "よってアンマップされた場合は削除される。"
5172
5173 #. type: Plain text
5174 #: build/C/man2/mlock.2:274
5175 msgid ""
5176 "Memory locks do not stack, that is, pages which have been locked several "
5177 "times by calls to B<mlock>()  or B<mlockall>()  will be unlocked by a single "
5178 "call to B<munlock>()  for the corresponding range or by B<munlockall>().  "
5179 "Pages which are mapped to several locations or by several processes stay "
5180 "locked into RAM as long as they are locked at least at one location or by at "
5181 "least one process."
5182 msgstr ""
5183 "メモリのロックは累積しない。 すなわち複数回 B<mlock>()  や B<mlockall>()  を"
5184 "呼び出してロックされたページでも、 対応する範囲に対して B<munlock>()  を 1 回"
5185 "呼び出したり B<munlockall>()  を呼び出したりするだけでロック解除される。 複数"
5186 "の場所や複数のプロセスにマップされているページは、少なくとも一つの場所、 一つ"
5187 "のプロセスでロックされている限りは RAM に残り続ける。"
5188
5189 #. type: Plain text
5190 #: build/C/man2/mlock.2:285
5191 msgid ""
5192 "Under Linux, B<mlock>()  and B<munlock>()  automatically round I<addr> down "
5193 "to the nearest page boundary.  However, POSIX.1-2001 allows an "
5194 "implementation to require that I<addr> is page aligned, so portable "
5195 "applications should ensure this."
5196 msgstr ""
5197 "Linux では、 B<mlock>()  と B<munlock>()  は自動的に I<addr> を端数切り捨てに"
5198 "より一番近いページ境界へと丸める。 しかし POSIX.1-2001 は I<addr> がページ境"
5199 "界に合っていることを要求する実装も許している。 そのため移植性を意図したアプリ"
5200 "ケーションではきちんと境界に合わせた方が良い。"
5201
5202 #. type: Plain text
5203 #: build/C/man2/mlock.2:298
5204 msgid ""
5205 "The I<VmLck> field of the Linux-specific I</proc/PID/status> file shows how "
5206 "many kilobytes of memory the process with ID I<PID> has locked using "
5207 "B<mlock>(), B<mlockall>(), and B<mmap>(2)  B<MAP_LOCKED>."
5208 msgstr ""
5209 "Linux 固有の I</proc/PID/status> ファイルの I<VmLck> フィールドには、\n"
5210 "B<mlock>(), B<mlockall>() および B<mmap>(2) B<MAP_LOCKED> を使って、\n"
5211 "ID が I<PID> のプロセスがロックしているメモリ量 (キロバイト単位) が\n"
5212 "表示される。"
5213
5214 #. type: SS
5215 #: build/C/man2/mlock.2:298
5216 #, no-wrap
5217 msgid "Limits and permissions"
5218 msgstr "制限と権限"
5219
5220 #. type: Plain text
5221 #: build/C/man2/mlock.2:305
5222 msgid ""
5223 "In Linux 2.6.8 and earlier, a process must be privileged (B<CAP_IPC_LOCK>)  "
5224 "in order to lock memory and the B<RLIMIT_MEMLOCK> soft resource limit "
5225 "defines a limit on how much memory the process may lock."
5226 msgstr ""
5227 "Linux 2.6.8 以前では、メモリをロックするためには特権 (B<CAP_IPC_LOCK>)  が必"
5228 "要で、 ソフト資源制限 B<RLIMIT_MEMLOCK> はプロセスがどれだけのメモリをロック"
5229 "できるかの制限を定義する。"
5230
5231 #. type: Plain text
5232 #: build/C/man2/mlock.2:311
5233 msgid ""
5234 "Since Linux 2.6.9, no limits are placed on the amount of memory that a "
5235 "privileged process can lock and the B<RLIMIT_MEMLOCK> soft resource limit "
5236 "instead defines a limit on how much memory an unprivileged process may lock."
5237 msgstr ""
5238 "Linux 2.6.9 以降では、特権を持つプロセスがロックできるメモリ量は無制限とな"
5239 "り、 代わりにソフト資源制限 B<RLIMIT_MEMLOCK> は特権を持たないプロセスがロッ"
5240 "クできるメモリ量の制限を定義する。"
5241
5242 #. type: Plain text
5243 #: build/C/man2/mlock.2:319
5244 msgid ""
5245 "In the 2.4 series Linux kernels up to and including 2.4.17, a bug caused the "
5246 "B<mlockall>()  B<MCL_FUTURE> flag to be inherited across a B<fork>(2).  This "
5247 "was rectified in kernel 2.4.18."
5248 msgstr ""
5249 "2.4.17 までの 2.4 シリーズの Linux カーネルには、 B<mlockall>()  "
5250 "B<MCL_FUTURE> フラグが B<fork>(2)  で継承されると言うバグがある。 これはカー"
5251 "ネル 2.4.18 で修正された。"
5252
5253 #.  See the following LKML thread:
5254 #.  http://marc.theaimsgroup.com/?l=linux-kernel&m=113801392825023&w=2
5255 #.  "Rationale for RLIMIT_MEMLOCK"
5256 #.  23 Jan 2006
5257 #. type: Plain text
5258 #: build/C/man2/mlock.2:336
5259 msgid ""
5260 "Since kernel 2.6.9, if a privileged process calls I<mlockall(MCL_FUTURE)> "
5261 "and later drops privileges (loses the B<CAP_IPC_LOCK> capability by, for "
5262 "example, setting its effective UID to a nonzero value), then subsequent "
5263 "memory allocations (e.g., B<mmap>(2), B<brk>(2))  will fail if the "
5264 "B<RLIMIT_MEMLOCK> resource limit is encountered."
5265 msgstr ""
5266 "カーネル 2.6.9 以降では、特権を持ったプロセスが I<mlockall(MCL_FUTURE)> を呼"
5267 "び出した後で、特権をなくした場合 (例えば、 実効 UID を 0 以外の値に変更するな"
5268 "どにより、 B<CAP_IPC_LOCK> ケーパビリティを失った場合)、リソース上限 "
5269 "B<RLIMIT_MEMLOCK> に達すると、それ以降のメモリ割り当て (例えば B<mmap>(2), "
5270 "B<brk>(2))  は失敗する。"
5271
5272 #. type: Plain text
5273 #: build/C/man2/mlock.2:343
5274 msgid ""
5275 "B<mmap>(2), B<setrlimit>(2), B<shmctl>(2), B<sysconf>(3), B<proc>(5), "
5276 "B<capabilities>(7)"
5277 msgstr ""
5278 "B<mmap>(2), B<setrlimit>(2), B<shmctl>(2), B<sysconf>(3), B<proc>(5),\n"
5279 "B<capabilities>(7)"
5280
5281 #. type: TH
5282 #: build/C/man2/mmap.2:40
5283 #, no-wrap
5284 msgid "MMAP"
5285 msgstr "MMAP"
5286
5287 #. type: TH
5288 #: build/C/man2/mmap.2:40
5289 #, no-wrap
5290 msgid "2014-04-06"
5291 msgstr "2014-04-06"
5292
5293 #. type: Plain text
5294 #: build/C/man2/mmap.2:43
5295 msgid "mmap, munmap - map or unmap files or devices into memory"
5296 msgstr "mmap, munmap - ファイルやデバイスをメモリにマップ/アンマップする"
5297
5298 #. type: Plain text
5299 #: build/C/man2/mmap.2:51
5300 #, no-wrap
5301 msgid ""
5302 "B<void *mmap(void *>I<addr>B<, size_t >I<length>B<, int >I<prot>B<, int >I<flags>B<,>\n"
5303 "B<           int >I<fd>B<, off_t >I<offset>B<);>\n"
5304 "B<int munmap(void *>I<addr>B<, size_t >I<length>B<);>\n"
5305 msgstr ""
5306 "B<void *mmap(void *>I<addr>B<, size_t >I<length>B<, int >I<prot>B<, int >I<flags>B<,>\n"
5307 "B<           int >I<fd>B<, off_t >I<offset>B<);>\n"
5308 "B<int munmap(void *>I<addr>B<, size_t >I<length>B<);>\n"
5309
5310 #. type: Plain text
5311 #: build/C/man2/mmap.2:54
5312 msgid "See NOTES for information on feature test macro requirements."
5313 msgstr "機能検査マクロの要件に関する情報は「注意」の節を参照。"
5314
5315 #. type: Plain text
5316 #: build/C/man2/mmap.2:63
5317 msgid ""
5318 "B<mmap>()  creates a new mapping in the virtual address space of the calling "
5319 "process.  The starting address for the new mapping is specified in I<addr>.  "
5320 "The I<length> argument specifies the length of the mapping."
5321 msgstr ""
5322 "B<mmap>()  は、新しいマッピングを呼び出し元プロセスの仮想アドレス空間に作成す"
5323 "る。 新しいマッピングの開始アドレスは I<addr> で指定される。マッピングの長さ"
5324 "は I<length> 引き数で指定される。"
5325
5326 #.  Before Linux 2.6.24, the address was rounded up to the next page
5327 #.  boundary; since 2.6.24, it is rounded down!
5328 #. type: Plain text
5329 #: build/C/man2/mmap.2:77
5330 msgid ""
5331 "If I<addr> is NULL, then the kernel chooses the address at which to create "
5332 "the mapping; this is the most portable method of creating a new mapping.  If "
5333 "I<addr> is not NULL, then the kernel takes it as a hint about where to place "
5334 "the mapping; on Linux, the mapping will be created at a nearby page "
5335 "boundary.  The address of the new mapping is returned as the result of the "
5336 "call."
5337 msgstr ""
5338 "I<addr> が NULL の場合、カーネルがマッピングを作成するアドレスを選択する。 こ"
5339 "の方法は最も移植性のある新しいマッピングの作成方法である。 I<addr> が NULL で"
5340 "ない場合、カーネルはマッピングをどこに配置するかのヒントとして I<addr> を使用"
5341 "する。Linux では、マッピングはすぐ近くのページ境界に作成される。 新しいマッピ"
5342 "ングのアドレスは、呼び出しの返り値として返される。"
5343
5344 #. type: Plain text
5345 #: build/C/man2/mmap.2:89
5346 msgid ""
5347 "The contents of a file mapping (as opposed to an anonymous mapping; see "
5348 "B<MAP_ANONYMOUS> below), are initialized using I<length> bytes starting at "
5349 "offset I<offset> in the file (or other object) referred to by the file "
5350 "descriptor I<fd>.  I<offset> must be a multiple of the page size as returned "
5351 "by I<sysconf(_SC_PAGE_SIZE)>."
5352 msgstr ""
5353 "ファイルマッピングの内容は、 ファイルディスクリプタ I<fd> で参照されるファイ"
5354 "ル (もしくは他のオブジェクト) のオフセット I<offset> から開始される "
5355 "I<length> バイトのデータで初期化される (ファイルマッピングは無名マッピングの"
5356 "反対語である。 B<MAP_ANONYMOUS> を参照)。 I<offset> は "
5357 "I<sysconf(_SC_PAGE_SIZE)> が返すページサイズの倍数でなければならない。"
5358
5359 #. type: Plain text
5360 #: build/C/man2/mmap.2:97
5361 msgid ""
5362 "The I<prot> argument describes the desired memory protection of the mapping "
5363 "(and must not conflict with the open mode of the file).  It is either "
5364 "B<PROT_NONE> or the bitwise OR of one or more of the following flags:"
5365 msgstr ""
5366 "引き数 I<prot> には、マッピングのメモリ保護をどのように行なうかを指定する "
5367 "(ファイルのオープンモードと矛盾してはいけない)。 I<prot> には、 B<PROT_NONE> "
5368 "か、以下のフラグをひとつ以上ビット毎の論理和 (OR) をとったものを 指定できる。"
5369
5370 #. type: TP
5371 #: build/C/man2/mmap.2:97 build/C/man2/mprotect.2:73
5372 #, no-wrap
5373 msgid "B<PROT_EXEC>"
5374 msgstr "B<PROT_EXEC>"
5375
5376 #. type: Plain text
5377 #: build/C/man2/mmap.2:100
5378 msgid "Pages may be executed."
5379 msgstr "ページは実行可能である。"
5380
5381 #. type: TP
5382 #: build/C/man2/mmap.2:100 build/C/man2/mprotect.2:67
5383 #, no-wrap
5384 msgid "B<PROT_READ>"
5385 msgstr "B<PROT_READ>"
5386
5387 #. type: Plain text
5388 #: build/C/man2/mmap.2:103
5389 msgid "Pages may be read."
5390 msgstr "ページは読み込み可能である。"
5391
5392 #. type: TP
5393 #: build/C/man2/mmap.2:103 build/C/man2/mprotect.2:70
5394 #, no-wrap
5395 msgid "B<PROT_WRITE>"
5396 msgstr "B<PROT_WRITE>"
5397
5398 #. type: Plain text
5399 #: build/C/man2/mmap.2:106
5400 msgid "Pages may be written."
5401 msgstr "ページに書き込み可能である。"
5402
5403 #. type: TP
5404 #: build/C/man2/mmap.2:106 build/C/man2/mprotect.2:64
5405 #, no-wrap
5406 msgid "B<PROT_NONE>"
5407 msgstr "B<PROT_NONE>"
5408
5409 #. type: Plain text
5410 #: build/C/man2/mmap.2:109
5411 msgid "Pages may not be accessed."
5412 msgstr "ページにはアクセスできない。"
5413
5414 #. type: Plain text
5415 #: build/C/man2/mmap.2:118
5416 msgid ""
5417 "The I<flags> argument determines whether updates to the mapping are visible "
5418 "to other processes mapping the same region, and whether updates are carried "
5419 "through to the underlying file.  This behavior is determined by including "
5420 "exactly one of the following values in I<flags>:"
5421 msgstr ""
5422 "I<flags> 引き数により、マッピングに対する更新が同じ領域をマッピングしている "
5423 "他のプロセスに見えるか、更新がマッピング元のファイルを通じて 伝えられるか、が"
5424 "決定される。この動作は、以下の値のいずれか一つだけ (複数は指定できない) を "
5425 "I<flags> に含めることで指定する。"
5426
5427 #. type: TP
5428 #: build/C/man2/mmap.2:118
5429 #, no-wrap
5430 msgid "B<MAP_SHARED>"
5431 msgstr "B<MAP_SHARED>"
5432
5433 #. type: Plain text
5434 #: build/C/man2/mmap.2:128
5435 msgid ""
5436 "Share this mapping.  Updates to the mapping are visible to other processes "
5437 "that map this file, and are carried through to the underlying file.  The "
5438 "file may not actually be updated until B<msync>(2)  or B<munmap>()  is "
5439 "called."
5440 msgstr ""
5441 "このマッピングを共有する。 マッピングに対する更新はこのファイルをマッピングし"
5442 "ている他のプロセス から見える。更新はマッピング元のファイルを通じて伝えられ"
5443 "る。 ただし、ファイルの実際の更新は B<msync>(2)  または B<munmap>()  が呼ばれ"
5444 "るまで行われないこともある。"
5445
5446 #. type: TP
5447 #: build/C/man2/mmap.2:128
5448 #, no-wrap
5449 msgid "B<MAP_PRIVATE>"
5450 msgstr "B<MAP_PRIVATE>"
5451
5452 #. type: Plain text
5453 #: build/C/man2/mmap.2:137
5454 msgid ""
5455 "Create a private copy-on-write mapping.  Updates to the mapping are not "
5456 "visible to other processes mapping the same file, and are not carried "
5457 "through to the underlying file.  It is unspecified whether changes made to "
5458 "the file after the B<mmap>()  call are visible in the mapped region."
5459 msgstr ""
5460 "プライベートな copy-on-write (書き込み時コピー) マップを生成する。 マッピング"
5461 "に対する更新は同じファイルをマッピングしている他のプロセス には見えず、更新が"
5462 "マッピング元のファイルを通じて伝えられることもない。 B<mmap>()  の呼び出し後"
5463 "にマッピング元のファイルに対して行われた変更が、 マップ領域に反映されるかどう"
5464 "かは規定されていない。"
5465
5466 #. type: Plain text
5467 #: build/C/man2/mmap.2:139
5468 msgid "Both of these flags are described in POSIX.1-2001."
5469 msgstr "上記の二つのフラグは POSIX.1-2001 で規定されている。"
5470
5471 #. type: Plain text
5472 #: build/C/man2/mmap.2:142
5473 msgid ""
5474 "In addition, zero or more of the following values can be ORed in I<flags>:"
5475 msgstr ""
5476 "さらに、以下の値のうち 0 個以上をビット毎の論理和 (OR) で I<flags> に指定する"
5477 "ことができる。"
5478
5479 #. type: TP
5480 #: build/C/man2/mmap.2:142
5481 #, no-wrap
5482 msgid "B<MAP_32BIT> (since Linux 2.4.20, 2.6)"
5483 msgstr "B<MAP_32BIT> (Linux 2.4.20, 2.6 以降)"
5484
5485 #.  See http://lwn.net/Articles/294642 "Tangled up in threads", 19 Aug 08
5486 #. type: Plain text
5487 #: build/C/man2/mmap.2:158
5488 msgid ""
5489 "Put the mapping into the first 2 Gigabytes of the process address space.  "
5490 "This flag is supported only on x86-64, for 64-bit programs.  It was added to "
5491 "allow thread stacks to be allocated somewhere in the first 2GB of memory, so "
5492 "as to improve context-switch performance on some early 64-bit processors.  "
5493 "Modern x86-64 processors no longer have this performance problem, so use of "
5494 "this flag is not required on those systems.  The B<MAP_32BIT> flag is "
5495 "ignored when B<MAP_FIXED> is set."
5496 msgstr ""
5497 "マッピングをプロセスのアドレス空間の先頭 2 ギガバイト以内に配置する。 このフ"
5498 "ラグがサポートされているのは x86-64 アーキテクチャ上の 64 ビットプログラムの"
5499 "みである。 このフラグが追加されたのは、スレッドのスタックをメモリの先頭 2GB "
5500 "以内の どこかに割り当てることで、初期のいくつかの 64 ビットプロセッサにおけ"
5501 "る コンテキストスイッチの性能問題を改善するためである。 最近の x86-64 プロ"
5502 "セッサではこの性能問題はもはや存在せず、 そのようなシステムではこのフラグを使"
5503 "用する必要はない。 B<MAP_FIXED> がセットされている場合は、 B<MAP_32BIT> フラ"
5504 "グは無視される。"
5505
5506 #. type: TP
5507 #: build/C/man2/mmap.2:158
5508 #, no-wrap
5509 msgid "B<MAP_ANON>"
5510 msgstr "B<MAP_ANON>"
5511
5512 #. type: Plain text
5513 #: build/C/man2/mmap.2:163
5514 msgid "Synonym for B<MAP_ANONYMOUS>.  Deprecated."
5515 msgstr "B<MAP_ANONYMOUS> の同義語。非推奨。"
5516
5517 #. type: TP
5518 #: build/C/man2/mmap.2:163
5519 #, no-wrap
5520 msgid "B<MAP_ANONYMOUS>"
5521 msgstr "B<MAP_ANONYMOUS>"
5522
5523 #. type: Plain text
5524 #: build/C/man2/mmap.2:185
5525 msgid ""
5526 "The mapping is not backed by any file; its contents are initialized to "
5527 "zero.  The I<fd> and I<offset> arguments are ignored; however, some "
5528 "implementations require I<fd> to be -1 if B<MAP_ANONYMOUS> (or B<MAP_ANON>)  "
5529 "is specified, and portable applications should ensure this.  The use of "
5530 "B<MAP_ANONYMOUS> in conjunction with B<MAP_SHARED> is supported on Linux "
5531 "only since kernel 2.4."
5532 msgstr ""
5533 "マッピングはどのファイルとも関連付けされない。 マッピングの内容は 0 で初期化"
5534 "される。 引き数 I<fd> と I<offset> は無視される。 ただし、実装によっては "
5535 "B<MAP_ANONYMOUS> (もしくは B<MAP_ANON>)  が指定された場合、 I<fd> を -1 にす"
5536 "る必要があり、 移植性が必要なアプリケーションでは必ず I<fd> を -1 にすべきで"
5537 "ある。 B<MAP_ANONYMOUS> と B<MAP_SHARED> を組み合わせての利用は カーネル 2.4 "
5538 "以降の Linux でのみサポートされている。"
5539
5540 #. type: TP
5541 #: build/C/man2/mmap.2:185
5542 #, no-wrap
5543 msgid "B<MAP_DENYWRITE>"
5544 msgstr "B<MAP_DENYWRITE>"
5545
5546 #.  Introduced in 1.1.36, removed in 1.3.24.
5547 #. type: Plain text
5548 #: build/C/man2/mmap.2:193
5549 msgid ""
5550 "This flag is ignored.  (Long ago, it signaled that attempts to write to the "
5551 "underlying file should fail with B<ETXTBUSY>.  But this was a source of "
5552 "denial-of-service attacks.)"
5553 msgstr ""
5554 "このフラグは無視される (ずっと前は、マップ元のファイルへの書き込みを行おうと"
5555 "すると、エラー B<ETXTBUSY> で失敗するようにシグナルが設定されていたが、これ"
5556 "は denial-of-service (サービス拒否) 攻撃の原因となった)。"
5557
5558 #. type: TP
5559 #: build/C/man2/mmap.2:193
5560 #, no-wrap
5561 msgid "B<MAP_EXECUTABLE>"
5562 msgstr "B<MAP_EXECUTABLE>"
5563
5564 #.  Introduced in 1.1.38, removed in 1.3.24. Flag tested in proc_follow_link.
5565 #.  (Long ago, it signaled that the underlying file is an executable.
5566 #.  However, that information was not really used anywhere.)
5567 #.  Linus talked about DOS related to MAP_EXECUTABLE, but he was thinking of
5568 #.  MAP_DENYWRITE?
5569 #. type: Plain text
5570 #: build/C/man2/mmap.2:201
5571 msgid "This flag is ignored."
5572 msgstr "このフラグは無視される。"
5573
5574 #. type: TP
5575 #: build/C/man2/mmap.2:201
5576 #, no-wrap
5577 msgid "B<MAP_FILE>"
5578 msgstr "B<MAP_FILE>"
5579
5580 #.  On some systems, this was required as the opposite of
5581 #.  MAP_ANONYMOUS -- mtk, 1 May 2007
5582 #. type: Plain text
5583 #: build/C/man2/mmap.2:207
5584 msgid "Compatibility flag.  Ignored."
5585 msgstr "互換性のためのフラグ。無視される。"
5586
5587 #. type: TP
5588 #: build/C/man2/mmap.2:207
5589 #, no-wrap
5590 msgid "B<MAP_FIXED>"
5591 msgstr "B<MAP_FIXED>"
5592
5593 #. type: Plain text
5594 #: build/C/man2/mmap.2:225
5595 msgid ""
5596 "Don't interpret I<addr> as a hint: place the mapping at exactly that "
5597 "address.  I<addr> must be a multiple of the page size.  If the memory region "
5598 "specified by I<addr> and I<len> overlaps pages of any existing mapping(s), "
5599 "then the overlapped part of the existing mapping(s) will be discarded.  If "
5600 "the specified address cannot be used, B<mmap>()  will fail.  Because "
5601 "requiring a fixed address for a mapping is less portable, the use of this "
5602 "option is discouraged."
5603 msgstr ""
5604 "I<addr> をアドレスのヒントとして使用するのではなく、 I<addr> で指定されたアド"
5605 "レスをそのまま使用してマッピングを配置する。 I<addr> はページサイズの倍数でな"
5606 "ければならない。 I<addr> と I<len> で指定されたメモリ領域が既存のマッピングの"
5607 "ページと重なる場合、 既存のマッピングの重なった部分は捨てられる。 もし指定さ"
5608 "れたアドレスが使用できない場合、 B<mmap>()  は失敗する。 マッピングに対して固"
5609 "定アドレスを要求するのは移植性の面で劣るので、 このオプションは使用しないこと"
5610 "を推奨する。"
5611
5612 #. type: TP
5613 #: build/C/man2/mmap.2:225
5614 #, no-wrap
5615 msgid "B<MAP_GROWSDOWN>"
5616 msgstr "B<MAP_GROWSDOWN>"
5617
5618 #. type: Plain text
5619 #: build/C/man2/mmap.2:230
5620 msgid ""
5621 "Used for stacks.  Indicates to the kernel virtual memory system that the "
5622 "mapping should extend downward in memory."
5623 msgstr ""
5624 "スタック用に使用される。マッピングをメモリ内で逆向きに行うことを カーネル仮想"
5625 "メモリシステムに指示する。 (訳注:マッピングは通常はメモリ・アドレスが増加す"
5626 "る向きに行うが、 このオプションを指定すると逆向きにマッピングを行う)"
5627
5628 #. type: TP
5629 #: build/C/man2/mmap.2:230
5630 #, no-wrap
5631 msgid "B<MAP_HUGETLB> (since Linux 2.6.32)"
5632 msgstr "B<MAP_HUGETLB> (Linux 2.6.32 以降)"
5633
5634 #. type: Plain text
5635 #: build/C/man2/mmap.2:236
5636 msgid ""
5637 "Allocate the mapping using \"huge pages.\" See the Linux kernel source file "
5638 "I<Documentation/vm/hugetlbpage.txt> for further information."
5639 msgstr ""
5640 "\"huge page\" を使ってマッピングを割り当てる。詳しい情報は、Linux カーネル"
5641 "ソースの I<Documentation/vm/hugetlbpage.txt> を参照。"
5642
5643 #. type: TP
5644 #: build/C/man2/mmap.2:236
5645 #, no-wrap
5646 msgid "B<MAP_LOCKED> (since Linux 2.5.37)"
5647 msgstr "B<MAP_LOCKED> (Linux 2.5.37 以降)"
5648
5649 #.  If set, the mapped pages will not be swapped out.
5650 #. type: Plain text
5651 #: build/C/man2/mmap.2:242
5652 msgid ""
5653 "Lock the pages of the mapped region into memory in the manner of "
5654 "B<mlock>(2).  This flag is ignored in older kernels."
5655 msgstr ""
5656 "マップされた領域のページを B<mlock>(2)  の方法でメモリ内にロックする。 それ以"
5657 "前のカーネルでは、このフラグは無視される。"
5658
5659 #. type: TP
5660 #: build/C/man2/mmap.2:242
5661 #, no-wrap
5662 msgid "B<MAP_NONBLOCK> (since Linux 2.5.46)"
5663 msgstr "B<MAP_NONBLOCK> (Linux 2.5.46 以降)"
5664
5665 #. type: Plain text
5666 #: build/C/man2/mmap.2:257
5667 msgid ""
5668 "Only meaningful in conjunction with B<MAP_POPULATE>.  Don't perform read-"
5669 "ahead: create page tables entries only for pages that are already present in "
5670 "RAM.  Since Linux 2.6.23, this flag causes B<MAP_POPULATE> to do nothing.  "
5671 "One day the combination of B<MAP_POPULATE> and B<MAP_NONBLOCK> may be "
5672 "reimplemented."
5673 msgstr ""
5674 "B<MAP_POPULATE> と組み合わせた場合のみ意味を持つ。 read-ahead (前もって読み込"
5675 "むこと) を実行しない。 単に、すでに RAM 上に存在するページに対してのみページ"
5676 "テーブルエントリを作成する。 Linux 2.6.23 以降では、このフラグは "
5677 "B<MAP_POPULATE> に何の影響も与えない。 いつか B<MAP_POPULATE> と "
5678 "B<MAP_NONBLOCK> を組み合わせた場合の動作は実装し直されるかもしれない。"
5679
5680 #. type: TP
5681 #: build/C/man2/mmap.2:257
5682 #, no-wrap
5683 msgid "B<MAP_NORESERVE>"
5684 msgstr "B<MAP_NORESERVE>"
5685
5686 #. type: Plain text
5687 #: build/C/man2/mmap.2:272
5688 msgid ""
5689 "Do not reserve swap space for this mapping.  When swap space is reserved, "
5690 "one has the guarantee that it is possible to modify the mapping.  When swap "
5691 "space is not reserved one might get B<SIGSEGV> upon a write if no physical "
5692 "memory is available.  See also the discussion of the file I</proc/sys/vm/"
5693 "overcommit_memory> in B<proc>(5).  In kernels before 2.6, this flag had "
5694 "effect only for private writable mappings."
5695 msgstr ""
5696 "このマッピングに対するスワップ空間の予約を行わない。 スワップ空間を予約した場"
5697 "合は、このマッピングの変更が必ず可能なことが 保証される。予約を行わなかった場"
5698 "合、物理メモリに空きがないと 書き込み時に B<SIGSEGV> エラーを受け取ることがあ"
5699 "る。 B<proc>(5)  の I</proc/sys/vm/overcommit_memory> ファイルについての議論"
5700 "も参照。 バージョン 2.6 より前のカーネルでは、このフラグは書き込み可能な プラ"
5701 "イベート・マッピングについてのみ効果があった。"
5702
5703 #. type: TP
5704 #: build/C/man2/mmap.2:272
5705 #, no-wrap
5706 msgid "B<MAP_POPULATE> (since Linux 2.5.46)"
5707 msgstr "B<MAP_POPULATE> (Linux 2.5.46 以降)"
5708
5709 #. type: Plain text
5710 #: build/C/man2/mmap.2:279
5711 msgid ""
5712 "Populate (prefault) page tables for a mapping.  For a file mapping, this "
5713 "causes read-ahead on the file.  Later accesses to the mapping will not be "
5714 "blocked by page faults.  B<MAP_POPULATE> is supported for private mappings "
5715 "only since Linux 2.6.23."
5716 msgstr ""
5717 "マッピング用のページテーブルを配置 (populate) する ファイルマッピングの場合に"
5718 "は、これによりファイルが先読み (read-ahead)  が行われる。この以後は、マッピン"
5719 "グに対するアクセスがページフォールトで ブロックされることがなくなる。 Linux "
5720 "2.6.23 以降でのみプライベート・マッピングについて B<MAP_POPULATE> がサポート"
5721 "されている。"
5722
5723 #. type: TP
5724 #: build/C/man2/mmap.2:279
5725 #, no-wrap
5726 msgid "B<MAP_STACK> (since Linux 2.6.27)"
5727 msgstr "B<MAP_STACK> (Linux 2.6.27 以降)"
5728
5729 #.  See http://lwn.net/Articles/294642 "Tangled up in threads", 19 Aug 08
5730 #.  commit cd98a04a59e2f94fa64d5bf1e26498d27427d5e7
5731 #.  http://thread.gmane.org/gmane.linux.kernel/720412
5732 #.  "pthread_create() slow for many threads; also time to revisit 64b
5733 #.   context switch optimization?"
5734 #. type: Plain text
5735 #: build/C/man2/mmap.2:292
5736 msgid ""
5737 "Allocate the mapping at an address suitable for a process or thread stack.  "
5738 "This flag is currently a no-op, but is used in the glibc threading "
5739 "implementation so that if some architectures require special treatment for "
5740 "stack allocations, support can later be transparently implemented for glibc."
5741 msgstr ""
5742 "プロセスやスレッドのスタックに適したアドレスにマッピングを割り当てる。 現在の"
5743 "ところ、このフラグは何もしないが、 glibc のスレッド実装では使用されている。 "
5744 "これは、いくつかのアーキテクチャではスタックの割り当てに関して特別な扱い が必"
5745 "要な場合に、glibc にそのサポートを後で透過的に実装できるようにする ためであ"
5746 "る。"
5747
5748 #. type: TP
5749 #: build/C/man2/mmap.2:292
5750 #, no-wrap
5751 msgid "B<MAP_UNINITIALIZED> (since Linux 2.6.33)"
5752 msgstr "B<MAP_UNINITIALIZED> (Linux 2.6.33 以降)"
5753
5754 #. type: Plain text
5755 #: build/C/man2/mmap.2:302
5756 msgid ""
5757 "Don't clear anonymous pages.  This flag is intended to improve performance "
5758 "on embedded devices.  This flag is honored only if the kernel was configured "
5759 "with the B<CONFIG_MMAP_ALLOW_UNINITIALIZED> option.  Because of the security "
5760 "implications, that option is normally enabled only on embedded devices (i."
5761 "e., devices where one has complete control of the contents of user memory)."
5762 msgstr ""
5763 "無名ページ (anonymous page) のクリアを行わない。このフラグは組み込みデバイ"
5764 "ス\n"
5765 "での性能向上を目的に作られてものである。カーネルの設定で\n"
5766 "B<CONFIG_MMAP_ALLOW_UNINITIALIZED> オプションが有効になっている場合のみ、\n"
5767 "このフラグは効果を持つ。\n"
5768 "セキュリティ面の考慮から、このオプションは通常組み込みデバイス (すなわち、\n"
5769 "ユーザメモリの内容を完全に制御化におけるデバイス) においてのみ有効にされる。"
5770
5771 #. type: Plain text
5772 #: build/C/man2/mmap.2:310
5773 msgid ""
5774 "Of the above flags, only B<MAP_FIXED> is specified in POSIX.1-2001.  "
5775 "However, most systems also support B<MAP_ANONYMOUS> (or its synonym "
5776 "B<MAP_ANON>)."
5777 msgstr ""
5778 "上記のフラグの中では、 B<MAP_FIXED> だけが POSIX.1-2001 で規定されている。 し"
5779 "かしながら、ほとんどのシステムで B<MAP_ANONYMOUS> (またはその同義語である "
5780 "B<MAP_ANON>)  もサポートされている。"
5781
5782 #. type: Plain text
5783 #: build/C/man2/mmap.2:317
5784 msgid ""
5785 "Some systems document the additional flags B<MAP_AUTOGROW>, "
5786 "B<MAP_AUTORESRV>, B<MAP_COPY>, and B<MAP_LOCAL>."
5787 msgstr ""
5788 "いくつかのシステムでは、上記以外にフラグとして B<MAP_AUTOGROW>, "
5789 "B<MAP_AUTORESRV>, B<MAP_COPY>, B<MAP_LOCAL> が規定されている。"
5790
5791 #. type: Plain text
5792 #: build/C/man2/mmap.2:323
5793 msgid ""
5794 "Memory mapped by B<mmap>()  is preserved across B<fork>(2), with the same "
5795 "attributes."
5796 msgstr ""
5797 "B<mmap>()  によってマップされたメモリの属性は B<fork>(2)  の際に継承される。"
5798
5799 #. type: Plain text
5800 #: build/C/man2/mmap.2:331
5801 msgid ""
5802 "A file is mapped in multiples of the page size.  For a file that is not a "
5803 "multiple of the page size, the remaining memory is zeroed when mapped, and "
5804 "writes to that region are not written out to the file.  The effect of "
5805 "changing the size of the underlying file of a mapping on the pages that "
5806 "correspond to added or removed regions of the file is unspecified."
5807 msgstr ""
5808 "ファイルはページサイズの整数倍の領域にマップされる。サイズがページサイズの 整"
5809 "数倍でないファイルの場合、マップ時に残りの領域は 0 で埋められ、この領域へ 書"
5810 "きこみを行ってもファイルに書き出されることはない。マッピングを行った元 ファイ"
5811 "ルのサイズを変更した場合、元ファイルの追加されたり削除された領域に対応 する"
5812 "マップされたページに対してどのような影響があるかは規定されていない。"
5813
5814 #. type: SS
5815 #: build/C/man2/mmap.2:331
5816 #, no-wrap
5817 msgid "munmap()"
5818 msgstr "munmap()"
5819
5820 #. type: Plain text
5821 #: build/C/man2/mmap.2:341
5822 msgid ""
5823 "The B<munmap>()  system call deletes the mappings for the specified address "
5824 "range, and causes further references to addresses within the range to "
5825 "generate invalid memory references.  The region is also automatically "
5826 "unmapped when the process is terminated.  On the other hand, closing the "
5827 "file descriptor does not unmap the region."
5828 msgstr ""
5829 "システムコール B<munmap>()  は指定されたアドレス範囲のマップを消去し、 これ以"
5830 "降のその範囲内へのメモリ参照は不正となる。 この領域は、プロセスが終了したとき"
5831 "にも自動的にアンマップされる。 一方、ファイル記述子をクローズしても、この領域"
5832 "はアンマップされない。"
5833
5834 #. type: Plain text
5835 #: build/C/man2/mmap.2:351
5836 msgid ""
5837 "The address I<addr> must be a multiple of the page size.  All pages "
5838 "containing a part of the indicated range are unmapped, and subsequent "
5839 "references to these pages will generate B<SIGSEGV>.  It is not an error if "
5840 "the indicated range does not contain any mapped pages."
5841 msgstr ""
5842 "I<addr> アドレスはページサイズの整数倍でなければならない。指定された範囲の一"
5843 "部分を 含む全てのページはアンマップされ、これ以降にこれらのページへの参照があ"
5844 "ると B<SIGSEGV> が発生する。 指定した範囲内にマップされたページが一つも含まれ"
5845 "ていない場合でも エラーにならない。"
5846
5847 #. type: SS
5848 #: build/C/man2/mmap.2:351
5849 #, no-wrap
5850 msgid "Timestamps changes for file-backed mappings"
5851 msgstr "ファイルと関連付けられたマッピングに対するタイムスタンプの更新"
5852
5853 #. type: Plain text
5854 #: build/C/man2/mmap.2:358
5855 msgid ""
5856 "For file-backed mappings, the I<st_atime> field for the mapped file may be "
5857 "updated at any time between the B<mmap>()  and the corresponding unmapping; "
5858 "the first reference to a mapped page will update the field if it has not "
5859 "been already."
5860 msgstr ""
5861 "ファイルと関連付けられたマッピングの場合、マッピングされたファイルの "
5862 "I<st_atime> フィールドは、 B<mmap>()  されてからアンマップ (unmap) されるまで"
5863 "の間に更新されることがある。 それまでに更新が行われていなければ、マップされた"
5864 "ページへの最初の参照があった 際に更新される。"
5865
5866 #. type: Plain text
5867 #: build/C/man2/mmap.2:375
5868 msgid ""
5869 "The I<st_ctime> and I<st_mtime> field for a file mapped with B<PROT_WRITE> "
5870 "and B<MAP_SHARED> will be updated after a write to the mapped region, and "
5871 "before a subsequent B<msync>(2)  with the B<MS_SYNC> or B<MS_ASYNC> flag, if "
5872 "one occurs."
5873 msgstr ""
5874 "B<PROT_WRITE> と B<MAP_SHARED> の両方を指定してマップされたファイルの場合、書"
5875 "き込みがあると、 I<st_ctime> と I<st_mtime> の両フィールドは、マップされた領"
5876 "域への書き込みより後で、 B<MS_SYNC> または B<MS_ASYNC> フラグを指定して "
5877 "B<msync>(2)  が呼ばれる前までに更新される。"
5878
5879 #. type: Plain text
5880 #: build/C/man2/mmap.2:392
5881 msgid ""
5882 "On success, B<mmap>()  returns a pointer to the mapped area.  On error, the "
5883 "value B<MAP_FAILED> (that is, I<(void\\ *)\\ -1>)  is returned, and I<errno> "
5884 "is set appropriately.  On success, B<munmap>()  returns 0, on failure -1, "
5885 "and I<errno> is set (probably to B<EINVAL>)."
5886 msgstr ""
5887 "B<mmap>()  は成功するとマップされた領域へのポインタを返す。 失敗すると値 "
5888 "B<MAP_FAILED> (つまり I<(void\\ *)\\ -1>)  を返し、 I<errno> がエラーの内容に"
5889 "したがってセットされる。 B<munmap>()  は成功すると 0 を返す。失敗すると -1 を"
5890 "返し、 I<errno> がセットされる (多くの場合 B<EINVAL> になるだろう)。"
5891
5892 #. type: TP
5893 #: build/C/man2/mmap.2:393 build/C/man2/mprotect.2:86
5894 #: build/C/man3/shm_open.3:187 build/C/man3/shm_open.3:192
5895 #: build/C/man2/shmctl.2:306 build/C/man2/shmget.2:192
5896 #: build/C/man2/shmop.2:188
5897 #, no-wrap
5898 msgid "B<EACCES>"
5899 msgstr "B<EACCES>"
5900
5901 #. type: Plain text
5902 #: build/C/man2/mmap.2:411
5903 msgid ""
5904 "A file descriptor refers to a non-regular file.  Or a file mapping was "
5905 "requested, but I<fd> is not open for reading.  Or B<MAP_SHARED> was "
5906 "requested and B<PROT_WRITE> is set, but I<fd> is not open in read/write "
5907 "(B<O_RDWR>)  mode.  Or B<PROT_WRITE> is set, but the file is append-only."
5908 msgstr ""
5909 "以下のいずれかの場合。 ファイル記述子の参照先が通常のファイルではない (non-"
5910 "regular file) 。 ファイルマッピングを要求したが I<fd> は読み込み用にオープン"
5911 "されていない。 B<MAP_SHARED> を要求して B<PROT_WRITE> をセットしたが I<fd> は"
5912 "読み書きモード (B<O_RDWR>)  でオープンされていない、 B<PROT_WRITE> をセットし"
5913 "たが、ファイルは追加 (append) 専用である。"
5914
5915 #. type: Plain text
5916 #: build/C/man2/mmap.2:415
5917 msgid ""
5918 "The file has been locked, or too much memory has been locked (see "
5919 "B<setrlimit>(2))."
5920 msgstr ""
5921 "ファイルがロックされている。またはロックされているメモリが多すぎる "
5922 "(B<setrlimit>(2)  を参照)。"
5923
5924 #. type: Plain text
5925 #: build/C/man2/mmap.2:421
5926 msgid ""
5927 "I<fd> is not a valid file descriptor (and B<MAP_ANONYMOUS> was not set)."
5928 msgstr ""
5929 "I<fd> が有効なファイル記述子 (file descriptor) ではない (かつ "
5930 "B<MAP_ANONYMOUS> がセットされていない)。"
5931
5932 #. type: Plain text
5933 #: build/C/man2/mmap.2:429
5934 msgid ""
5935 "We don't like I<addr>, I<length>, or I<offset> (e.g., they are too large, or "
5936 "not aligned on a page boundary)."
5937 msgstr ""
5938 "I<addr> か I<length> か I<offset> が適切でない (例えば、大きすぎるとか、ペー"
5939 "ジ境界にアラインメントされていない)。"
5940
5941 #. type: Plain text
5942 #: build/C/man2/mmap.2:434
5943 msgid "(since Linux 2.6.12)  I<length> was 0."
5944 msgstr "(Linux 2.6.12 以降)  I<length> が 0 であった。"
5945
5946 #. type: Plain text
5947 #: build/C/man2/mmap.2:442
5948 msgid ""
5949 "I<flags> contained neither B<MAP_PRIVATE> or B<MAP_SHARED>, or contained "
5950 "both of these values."
5951 msgstr ""
5952 "I<flags> に B<MAP_PRIVATE> と B<MAP_SHARED> のどちらも含まれていなかった、も"
5953 "しくは その両方が含まれていた。"
5954
5955 #. type: TP
5956 #: build/C/man2/mmap.2:442 build/C/man3/shm_open.3:229
5957 #: build/C/man2/shmget.2:221
5958 #, no-wrap
5959 msgid "B<ENFILE>"
5960 msgstr "B<ENFILE>"
5961
5962 #.  [2.6.7] shmem_zero_setup()-->shmem_file_setup()-->get_empty_filp()
5963 #. type: Plain text
5964 #: build/C/man2/mmap.2:450 build/C/man2/shmget.2:225
5965 msgid "The system limit on the total number of open files has been reached."
5966 msgstr "システム全体でオープンされているファイルの総数が上限に達した。"
5967
5968 #. type: Plain text
5969 #: build/C/man2/mmap.2:454
5970 msgid ""
5971 "The underlying filesystem of the specified file does not support memory "
5972 "mapping."
5973 msgstr ""
5974 "指定されたファイルが置かれているファイルシステムがメモリマッピングをサポート "
5975 "していない。"
5976
5977 #. type: Plain text
5978 #: build/C/man2/mmap.2:458
5979 msgid ""
5980 "No memory is available, or the process's maximum number of mappings would "
5981 "have been exceeded."
5982 msgstr ""
5983 "メモリに空きがない、または処理中のプロセスのマッピング数が最大数を超過した。"
5984
5985 #.  (Since 2.4.25 / 2.6.0.)
5986 #. type: Plain text
5987 #: build/C/man2/mmap.2:467
5988 msgid ""
5989 "The I<prot> argument asks for B<PROT_EXEC> but the mapped area belongs to a "
5990 "file on a filesystem that was mounted no-exec."
5991 msgstr ""
5992 "I<prot> 引き数は B<PROT_EXEC> を行うように指定されているが、 no-exec でマウン"
5993 "トされたファイルシステム上のファイルに マップ領域が対応している。"
5994
5995 #. type: Plain text
5996 #: build/C/man2/mmap.2:473
5997 msgid ""
5998 "B<MAP_DENYWRITE> was set but the object specified by I<fd> is open for "
5999 "writing."
6000 msgstr ""
6001 "B<MAP_DENYWRITE> がセットされているが I<fd> で指定されているオブジェクトは書"
6002 "き込み用に開かれている。"
6003
6004 #. type: TP
6005 #: build/C/man2/mmap.2:473 build/C/man2/shmctl.2:348
6006 #, no-wrap
6007 msgid "B<EOVERFLOW>"
6008 msgstr "B<EOVERFLOW>"
6009
6010 #. type: Plain text
6011 #: build/C/man2/mmap.2:485
6012 msgid ""
6013 "On 32-bit architecture together with the large file extension (i.e., using "
6014 "64-bit I<off_t>): the number of pages used for I<length> plus number of "
6015 "pages used for I<offset> would overflow I<unsigned long> (32 bits)."
6016 msgstr ""
6017 "32 ビットアーキテクチャで large file 拡張を使っている場合 (つまり 64 ビット"
6018 "の I<off_t> を使う場合)、 I<length> で使うページ数と I<offset> で使うページ数"
6019 "を足した値は I<unsigned long> (32 ビット) を超えてしまう (オーバーフローして"
6020 "しまう) 場合がある。"
6021
6022 #. type: Plain text
6023 #: build/C/man2/mmap.2:487
6024 msgid "Use of a mapped region can result in these signals:"
6025 msgstr "マップ領域を利用する際に、以下のシグナルが発生することがある:"
6026
6027 #. type: TP
6028 #: build/C/man2/mmap.2:487
6029 #, no-wrap
6030 msgid "B<SIGSEGV>"
6031 msgstr "B<SIGSEGV>"
6032
6033 #. type: Plain text
6034 #: build/C/man2/mmap.2:490
6035 msgid "Attempted write into a region mapped as read-only."
6036 msgstr "読み込み専用で mmap された領域へ書き込みを行おうとした。"
6037
6038 #. type: TP
6039 #: build/C/man2/mmap.2:490
6040 #, no-wrap
6041 msgid "B<SIGBUS>"
6042 msgstr "B<SIGBUS>"
6043
6044 #. type: Plain text
6045 #: build/C/man2/mmap.2:495
6046 msgid ""
6047 "Attempted access to a portion of the buffer that does not correspond to the "
6048 "file (for example, beyond the end of the file, including the case where "
6049 "another process has truncated the file)."
6050 msgstr ""
6051 "バッファのうち、ファイルに関連づけられていない部分 (例えばファイル末尾を越え"
6052 "た部分など。これには 他のプロセスがファイルを切り詰めた場合なども含まれる)  "
6053 "にアクセスしようとした。"
6054
6055 #.  SVr4 documents additional error codes ENXIO and ENODEV.
6056 #.  SUSv2 documents additional error codes EMFILE and EOVERFLOW.
6057 #. type: Plain text
6058 #: build/C/man2/mmap.2:499
6059 msgid "SVr4, 4.4BSD, POSIX.1-2001."
6060 msgstr "SVr4, 4.4BSD, POSIX.1-2001."
6061
6062 #.  POSIX.1-2001: It shall be defined to -1 or 0 or 200112L.
6063 #.  -1: unavailable, 0: ask using sysconf().
6064 #.  glibc defines it to 1.
6065 #. type: Plain text
6066 #: build/C/man2/mmap.2:513
6067 msgid ""
6068 "On POSIX systems on which B<mmap>(), B<msync>(2)  and B<munmap>()  are "
6069 "available, B<_POSIX_MAPPED_FILES> is defined in I<E<lt>unistd.hE<gt>> to a "
6070 "value greater than 0.  (See also B<sysconf>(3).)"
6071 msgstr ""
6072 "B<mmap>(), B<msync>(2)  B<munmap>()  が利用可能な POSIX システムでは、 "
6073 "B<_POSIX_MAPPED_FILES> は E<lt>unistd.hE<gt> で 0 より大きな値に定義される "
6074 "(B<sysconf>(3)  も参照のこと)。"
6075
6076 #.  Since around glibc 2.1/2.2, depending on the platform.
6077 #. type: Plain text
6078 #: build/C/man2/mmap.2:528
6079 msgid ""
6080 "This page describes the interface provided by the glibc B<mmap>()  wrapper "
6081 "function.  Originally, this function invoked a system call of the same "
6082 "name.  Since kernel 2.4, that system call has been superseded by "
6083 "B<mmap2>(2), and nowadays the glibc B<mmap>()  wrapper function invokes "
6084 "B<mmap2>(2)  with a suitably adjusted value for I<offset>."
6085 msgstr ""
6086 "このページでは glibc の B<mmap>() のラッパー関数が提供するインターフェース"
6087 "に\n"
6088 "ついて説明している。元々は、この関数は同じ名前のシステムコールを起動してい"
6089 "た。\n"
6090 "カーネル 2.4 以降、このシステムコールは B<mmap2>(2) に取って代わられ、現在\n"
6091 "では、 glibc の B<mmap>() のラッパー関数は I<offset> を適切に調整してから\n"
6092 "B<mmap2>(2) を起動する。"
6093
6094 #. type: Plain text
6095 #: build/C/man2/mmap.2:541
6096 msgid ""
6097 "On some hardware architectures (e.g., i386), B<PROT_WRITE> implies "
6098 "B<PROT_READ>.  It is architecture dependent whether B<PROT_READ> implies "
6099 "B<PROT_EXEC> or not.  Portable programs should always set B<PROT_EXEC> if "
6100 "they intend to execute code in the new mapping."
6101 msgstr ""
6102 "(i386 などの) いくつかのアーキテクチャでは、 B<PROT_WRITE> をセットすると、暗"
6103 "黙のうちに B<PROT_READ> がセットされる。 B<PROT_READ> をセットした際に暗黙の"
6104 "うちに B<PROT_EXEC> がセットされるかどうかは、アーキテクチャ依存である。 移植"
6105 "性を考慮したプログラムでは、 新規にマップした領域でコードを実行したい場合は、"
6106 "常に B<PROT_EXEC> をセットすべきである。"
6107
6108 #. type: Plain text
6109 #: build/C/man2/mmap.2:556
6110 msgid ""
6111 "The portable way to create a mapping is to specify I<addr> as 0 (NULL), and "
6112 "omit B<MAP_FIXED> from I<flags>.  In this case, the system chooses the "
6113 "address for the mapping; the address is chosen so as not to conflict with "
6114 "any existing mapping, and will not be 0.  If the B<MAP_FIXED> flag is "
6115 "specified, and I<addr> is 0 (NULL), then the mapped address will be 0 (NULL)."
6116 msgstr ""
6117 "マッピングを作成する移植性のある方法は、 I<addr> に 0 (NULL) を指定し、 "
6118 "I<flags> から B<MAP_FIXED> を外すことである。 この場合、システムがマッピング"
6119 "用のアドレスの選択を行う。 アドレスは既存のマッピングと衝突しないように、 か"
6120 "つ 0 にならないように選択される。 B<MAP_FIXED> フラグが指定され、かつ "
6121 "I<addr> が 0 (NULL)  の場合には、マップされるアドレスが 0 (NULL) になる。"
6122
6123 #. type: Plain text
6124 #: build/C/man2/mmap.2:585
6125 msgid ""
6126 "Certain I<flags> constants are defined only if either B<_BSD_SOURCE> or "
6127 "B<_SVID_SOURCE> is defined.  (Requiring B<_GNU_SOURCE> also suffices, and "
6128 "requiring that macro specifically would have been more logical, since these "
6129 "flags are all Linux-specific.)  The relevant flags are: B<MAP_32BIT>, "
6130 "B<MAP_ANONYMOUS> (and the synonym B<MAP_ANON>), B<MAP_DENYWRITE>, "
6131 "B<MAP_EXECUTABLE>, B<MAP_FILE>, B<MAP_GROWSDOWN>, B<MAP_HUGETLB>, "
6132 "B<MAP_LOCKED>, B<MAP_NONBLOCK>, B<MAP_NORESERVE>, B<MAP_POPULATE>, and "
6133 "B<MAP_STACK>."
6134 msgstr ""
6135 "特定の I<flags> 定数は B<_BSD_SOURCE> か B<_SVID_SOURCE> のいずれかが定義され"
6136 "た場合にのみ定義される。 (B<_GNU_SOURCE> も定義されている必要がある。これらの"
6137 "フラグはすべて Linux 固有のものなので、 特に B<_GNU_SOURCE> を必要とする点は"
6138 "もっと論理的に決められるべきであった。) 関係するフラグは B<MAP_32BIT>, "
6139 "B<MAP_ANONYMOUS> (とその同義語の B<MAP_ANON>), B<MAP_DENYWRITE>, "
6140 "B<MAP_EXECUTABLE>, B<MAP_FILE>, B<MAP_GROWSDOWN>, B<MAP_HUGETLB>, "
6141 "B<MAP_LOCKED>, B<MAP_NONBLOCK>, B<MAP_NORESERVE>, B<MAP_POPULATE>, "
6142 "B<MAP_STACK> である。"
6143
6144 #. type: Plain text
6145 #: build/C/man2/mmap.2:590
6146 msgid ""
6147 "On Linux there are no guarantees like those suggested above under "
6148 "B<MAP_NORESERVE>.  By default, any process can be killed at any moment when "
6149 "the system runs out of memory."
6150 msgstr ""
6151 "Linux においては、上記の B<MAP_NORESERVE> で述べられているような保証はない。 "
6152 "デフォルトでは、システムがメモリを使い切った場合には、 どのプロセスがいつ強制"
6153 "終了されるか分からないからである。"
6154
6155 #. type: Plain text
6156 #: build/C/man2/mmap.2:597
6157 msgid ""
6158 "In kernels before 2.6.7, the B<MAP_POPULATE> flag has effect only if I<prot> "
6159 "is specified as B<PROT_NONE>."
6160 msgstr ""
6161 "2.6.7 より前のカーネルでは、 I<prot> に B<PROT_NONE> が指定された場合にの"
6162 "み、 B<MAP_POPULATE> フラグが効力を持つ。"
6163
6164 #. type: Plain text
6165 #: build/C/man2/mmap.2:612
6166 msgid ""
6167 "SUSv3 specifies that B<mmap>()  should fail if I<length> is 0.  However, in "
6168 "kernels before 2.6.12, B<mmap>()  succeeded in this case: no mapping was "
6169 "created and the call returned I<addr>.  Since kernel 2.6.12, B<mmap>()  "
6170 "fails with the error B<EINVAL> for this case."
6171 msgstr ""
6172 "SUSv3 では、 I<length> が 0 の場合、 B<mmap>()  は失敗すると規定されている。"
6173 "しかしながら、2.6.12 より前のカーネルでは、 この場合に B<mmap>()  は成功して"
6174 "いた (マッピングは作成されず、 I<addr> が返されていた)。 カーネル 2.6.12 以降"
6175 "では、 B<mmap>()  はエラー B<EINVAL> で失敗する。"
6176
6177 #. type: Plain text
6178 #: build/C/man2/mmap.2:628
6179 msgid ""
6180 "POSIX specifies that the system shall always zero fill any partial page at "
6181 "the end of the object and that system will never write any modification of "
6182 "the object beyond its end.  On Linux, when you write data to such partial "
6183 "page after the end of the object, the data stays in the page cache even "
6184 "after the file is closed and unmapped and even though the data is never "
6185 "written to the file itself, subsequent mappings may see the modified "
6186 "content.  In some cases, this could be fixed by calling B<msync>(2)  before "
6187 "the unmap takes place; however, this doesn't work on tmpfs (for example, "
6188 "when using POSIX shared memory interface documented in B<shm_overview>(7))."
6189 msgstr ""
6190 "POSIX では、 システムはオブジェクト末尾の部分ページを常に 0 で埋め、 末尾より"
6191 "後ろのオブジェクトを決して変更してはならない、と規定している。 Linux では、 "
6192 "オブジェクト末尾より後ろの部分ページにデータを書き込んだ場合、 そのファイルを"
6193 "クローズしてアンマップした後であってもページキャッシュにデータが残り続け、 "
6194 "データがファイル自体に書き込まれていなくても、 それ以降のマッピングで変更され"
6195 "た内容が見える可能性がある。 いくつかの場合では、 アンマップを行う前に "
6196 "B<msync>(2) を呼び出すことで、 この状況を修正することができる。 しかし、 これ"
6197 "は tmpfs では機能しない (例えば、 B<shm_overview>(7) で説明されている POSIX "
6198 "共有メモリインターフェースを使った場合)。"
6199
6200 #. type: Plain text
6201 #: build/C/man2/mmap.2:640
6202 msgid ""
6203 "The following program prints part of the file specified in its first command-"
6204 "line argument to standard output.  The range of bytes to be printed is "
6205 "specified via offset and length values in the second and third command-line "
6206 "arguments.  The program creates a memory mapping of the required pages of "
6207 "the file and then uses B<write>(2)  to output the desired bytes."
6208 msgstr ""
6209 "以下のプログラムは、一番目のコマンドライン引き数で指定された ファイルの一部を"
6210 "標準出力に表示する。 表示する範囲は、二番目、三番目のコマンドライン引き数で渡"
6211 "される オフセットと長さで指定される。 このプログラムは、指定されたファイルの"
6212 "必要なページのメモリ・ マッピングを作成し、 B<write>(2)  を使って所望のバイト"
6213 "を出力する。"
6214
6215 #. type: Plain text
6216 #: build/C/man2/mmap.2:648
6217 #, no-wrap
6218 msgid ""
6219 "#include E<lt>sys/mman.hE<gt>\n"
6220 "#include E<lt>sys/stat.hE<gt>\n"
6221 "#include E<lt>fcntl.hE<gt>\n"
6222 "#include E<lt>stdio.hE<gt>\n"
6223 "#include E<lt>stdlib.hE<gt>\n"
6224 "#include E<lt>unistd.hE<gt>\n"
6225 msgstr ""
6226 "#include E<lt>sys/mman.hE<gt>\n"
6227 "#include E<lt>sys/stat.hE<gt>\n"
6228 "#include E<lt>fcntl.hE<gt>\n"
6229 "#include E<lt>stdio.hE<gt>\n"
6230 "#include E<lt>stdlib.hE<gt>\n"
6231 "#include E<lt>unistd.hE<gt>\n"
6232
6233 #. type: Plain text
6234 #: build/C/man2/mmap.2:651 build/C/man2/mprotect.2:178
6235 #, no-wrap
6236 msgid ""
6237 "#define handle_error(msg) \\e\n"
6238 "    do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
6239 msgstr ""
6240 "#define handle_error(msg) \\e\n"
6241 "    do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
6242
6243 #. type: Plain text
6244 #: build/C/man2/mmap.2:661
6245 #, no-wrap
6246 msgid ""
6247 "int\n"
6248 "main(int argc, char *argv[])\n"
6249 "{\n"
6250 "    char *addr;\n"
6251 "    int fd;\n"
6252 "    struct stat sb;\n"
6253 "    off_t offset, pa_offset;\n"
6254 "    size_t length;\n"
6255 "    ssize_t s;\n"
6256 msgstr ""
6257 "int\n"
6258 "main(int argc, char *argv[])\n"
6259 "{\n"
6260 "    char *addr;\n"
6261 "    int fd;\n"
6262 "    struct stat sb;\n"
6263 "    off_t offset, pa_offset;\n"
6264 "    size_t length;\n"
6265 "    ssize_t s;\n"
6266
6267 #. type: Plain text
6268 #: build/C/man2/mmap.2:666
6269 #, no-wrap
6270 msgid ""
6271 "    if (argc E<lt> 3 || argc E<gt> 4) {\n"
6272 "        fprintf(stderr, \"%s file offset [length]\\en\", argv[0]);\n"
6273 "        exit(EXIT_FAILURE);\n"
6274 "    }\n"
6275 msgstr ""
6276 "    if (argc E<lt> 3 || argc E<gt> 4) {\n"
6277 "        fprintf(stderr, \"%s file offset [length]\\en\", argv[0]);\n"
6278 "        exit(EXIT_FAILURE);\n"
6279 "    }\n"
6280
6281 #. type: Plain text
6282 #: build/C/man2/mmap.2:670
6283 #, no-wrap
6284 msgid ""
6285 "    fd = open(argv[1], O_RDONLY);\n"
6286 "    if (fd == -1)\n"
6287 "        handle_error(\"open\");\n"
6288 msgstr ""
6289 "    fd = open(argv[1], O_RDONLY);\n"
6290 "    if (fd == -1)\n"
6291 "        handle_error(\"open\");\n"
6292
6293 #. type: Plain text
6294 #: build/C/man2/mmap.2:673
6295 #, no-wrap
6296 msgid ""
6297 "    if (fstat(fd, &sb) == -1)           /* To obtain file size */\n"
6298 "        handle_error(\"fstat\");\n"
6299 msgstr ""
6300 "    if (fstat(fd, &sb) == -1)           /* To obtain file size */\n"
6301 "        handle_error(\"fstat\");\n"
6302
6303 #. type: Plain text
6304 #: build/C/man2/mmap.2:677
6305 #, no-wrap
6306 msgid ""
6307 "    offset = atoi(argv[2]);\n"
6308 "    pa_offset = offset & ~(sysconf(_SC_PAGE_SIZE) - 1);\n"
6309 "        /* offset for mmap() must be page aligned */\n"
6310 msgstr ""
6311 "    offset = atoi(argv[2]);\n"
6312 "    pa_offset = offset & ~(sysconf(_SC_PAGE_SIZE) - 1);\n"
6313 "        /* offset for mmap() must be page aligned */\n"
6314
6315 #. type: Plain text
6316 #: build/C/man2/mmap.2:682
6317 #, no-wrap
6318 msgid ""
6319 "    if (offset E<gt>= sb.st_size) {\n"
6320 "        fprintf(stderr, \"offset is past end of file\\en\");\n"
6321 "        exit(EXIT_FAILURE);\n"
6322 "    }\n"
6323 msgstr ""
6324 "    if (offset E<gt>= sb.st_size) {\n"
6325 "        fprintf(stderr, \"offset is past end of file\\en\");\n"
6326 "        exit(EXIT_FAILURE);\n"
6327 "    }\n"
6328
6329 #. type: Plain text
6330 #: build/C/man2/mmap.2:688
6331 #, no-wrap
6332 msgid ""
6333 "    if (argc == 4) {\n"
6334 "        length = atoi(argv[3]);\n"
6335 "        if (offset + length E<gt> sb.st_size)\n"
6336 "            length = sb.st_size - offset;\n"
6337 "                /* Can\\(aqt display bytes past end of file */\n"
6338 msgstr ""
6339 "    if (argc == 4) {\n"
6340 "        length = atoi(argv[3]);\n"
6341 "        if (offset + length E<gt> sb.st_size)\n"
6342 "            length = sb.st_size - offset;\n"
6343 "                /* Can\\(aqt display bytes past end of file */\n"
6344
6345 #. type: Plain text
6346 #: build/C/man2/mmap.2:692
6347 #, no-wrap
6348 msgid ""
6349 "    } else {    /* No length arg ==E<gt> display to end of file */\n"
6350 "        length = sb.st_size - offset;\n"
6351 "    }\n"
6352 msgstr ""
6353 "    } else {    /* No length arg ==E<gt> display to end of file */\n"
6354 "        length = sb.st_size - offset;\n"
6355 "    }\n"
6356
6357 #. type: Plain text
6358 #: build/C/man2/mmap.2:697
6359 #, no-wrap
6360 msgid ""
6361 "    addr = mmap(NULL, length + offset - pa_offset, PROT_READ,\n"
6362 "                MAP_PRIVATE, fd, pa_offset);\n"
6363 "    if (addr == MAP_FAILED)\n"
6364 "        handle_error(\"mmap\");\n"
6365 msgstr ""
6366 "    addr = mmap(NULL, length + offset - pa_offset, PROT_READ,\n"
6367 "                MAP_PRIVATE, fd, pa_offset);\n"
6368 "    if (addr == MAP_FAILED)\n"
6369 "        handle_error(\"mmap\");\n"
6370
6371 #. type: Plain text
6372 #: build/C/man2/mmap.2:702
6373 #, no-wrap
6374 msgid ""
6375 "    s = write(STDOUT_FILENO, addr + offset - pa_offset, length);\n"
6376 "    if (s != length) {\n"
6377 "        if (s == -1)\n"
6378 "            handle_error(\"write\");\n"
6379 msgstr ""
6380 "    s = write(STDOUT_FILENO, addr + offset - pa_offset, length);\n"
6381 "    if (s != length) {\n"
6382 "        if (s == -1)\n"
6383 "            handle_error(\"write\");\n"
6384
6385 #. type: Plain text
6386 #: build/C/man2/mmap.2:706
6387 #, no-wrap
6388 msgid ""
6389 "        fprintf(stderr, \"partial write\");\n"
6390 "        exit(EXIT_FAILURE);\n"
6391 "    }\n"
6392 msgstr ""
6393 "        fprintf(stderr, \"partial write\");\n"
6394 "        exit(EXIT_FAILURE);\n"
6395 "    }\n"
6396
6397 #. type: Plain text
6398 #: build/C/man2/mmap.2:723
6399 msgid ""
6400 "B<getpagesize>(2), B<mincore>(2), B<mlock>(2), B<mmap2>(2), B<mprotect>(2), "
6401 "B<mremap>(2), B<msync>(2), B<remap_file_pages>(2), B<setrlimit>(2), "
6402 "B<shmat>(2), B<shm_open>(3), B<shm_overview>(7)"
6403 msgstr ""
6404 "B<getpagesize>(2), B<mincore>(2), B<mlock>(2), B<mmap2>(2), B<mprotect>(2), "
6405 "B<mremap>(2), B<msync>(2), B<remap_file_pages>(2), B<setrlimit>(2), "
6406 "B<shmat>(2), B<shm_open>(3), B<shm_overview>(7)"
6407
6408 #. type: Plain text
6409 #: build/C/man2/mmap.2:730
6410 msgid ""
6411 "The descriptions of the following files in B<proc>(5): I</proc/[pid]/maps>, "
6412 "I</proc/[pid]/map_files>, and I</proc/[pid]/smaps>."
6413 msgstr ""
6414 "B<proc>(5) の I</proc/[pid]/maps>, I</proc/[pid]/map_files>, I</proc/[pid]/"
6415 "smaps> の説明。"
6416
6417 #. type: Plain text
6418 #: build/C/man2/mmap.2:735 build/C/man2/msync.2:151
6419 msgid "B.O. Gallmeister, POSIX.4, O'Reilly, pp. 128-129 and 389-391."
6420 msgstr "B.O. Gallmeister, POSIX.4, O'Reilly, pp. 128-129 and 389-391."
6421
6422 #. type: TH
6423 #: build/C/man2/mmap2.2:29
6424 #, no-wrap
6425 msgid "MMAP2"
6426 msgstr "MMAP2"
6427
6428 #. type: TH
6429 #: build/C/man2/mmap2.2:29
6430 #, no-wrap
6431 msgid "2014-02-25"
6432 msgstr "2014-02-25"
6433
6434 #. type: Plain text
6435 #: build/C/man2/mmap2.2:32
6436 msgid "mmap2 - map files or devices into memory"
6437 msgstr "mmap2 - ファイルやデバイスをメモリにマップする"
6438
6439 #. type: Plain text
6440 #: build/C/man2/mmap2.2:38
6441 #, no-wrap
6442 msgid ""
6443 "B<void *mmap2(void *>I<addr>B<, size_t >I<length>B<, int >I<prot>B<,>\n"
6444 "B<             int >I<flags>B<, int >I<fd>B<, off_t >I<pgoffset>B<);>\n"
6445 msgstr ""
6446 "B<void *mmap2(void *>I<addr>B<, size_t >I<length>B<, int >I<prot>B<,>\n"
6447 "B<            int >I<flags>B<, int >I<fd>B<, off_t >I<pgoffset>B<);>\n"
6448
6449 #. type: Plain text
6450 #: build/C/man2/mmap2.2:43
6451 msgid ""
6452 "This is probably not the system call that you are interested in; instead, "
6453 "see B<mmap>(2), which describes the glibc wrapper function that invokes this "
6454 "system call."
6455 msgstr ""
6456 "これはおそらくあなたが興味のあるシステムコールではないだろう。代わりに\n"
6457 "B<mmap>(2) を見るとよい。そのページにはこのシステムコールを起動する glibc "
6458 "の\n"
6459 "ラッパー関数についての説明がある。"
6460
6461 #. type: Plain text
6462 #: build/C/man2/mmap2.2:54
6463 msgid ""
6464 "The B<mmap2>()  system call provides the same interface as B<mmap>(2), "
6465 "except that the final argument specifies the offset into the file in 4096-"
6466 "byte units (instead of bytes, as is done by B<mmap>(2)).  This enables "
6467 "applications that use a 32-bit I<off_t> to map large files (up to 2^44 "
6468 "bytes)."
6469 msgstr ""
6470 "B<mmap2>() システムコールは B<mmap>(2) と同じインターフェースを提供する。た"
6471 "だ\n"
6472 "し、最後の引き数には、ファイルのオフセットを (B<mmap>(2) が行っている、バイ"
6473 "ト\n"
6474 "単位ではなく) 4096 バイトを単位として指定する。 これにより、32 ビットの\n"
6475 "I<off_t> を使うアプリケーションで (2^44 バイトまでの) 大きなファイルをマッ"
6476 "プ\n"
6477 "できるようになる。"
6478
6479 #. type: Plain text
6480 #: build/C/man2/mmap2.2:61
6481 msgid ""
6482 "On success, B<mmap2>()  returns a pointer to the mapped area.  On error, -1 "
6483 "is returned and I<errno> is set appropriately."
6484 msgstr ""
6485 "成功した場合、 B<mmap2>()  はマップされた領域へのポインタを返す。 エラーの場"
6486 "合は -1 が返されて、 I<errno> が適切に設定される。"
6487
6488 #. type: Plain text
6489 #: build/C/man2/mmap2.2:65
6490 msgid "Problem with getting the data from user space."
6491 msgstr "ユーザ空間からデータを取得するときに問題があった。"
6492
6493 #. type: Plain text
6494 #: build/C/man2/mmap2.2:70
6495 msgid ""
6496 "(Various platforms where the page size is not 4096 bytes.)  I<offset\\ *\\ "
6497 "4096> is not a multiple of the system page size."
6498 msgstr ""
6499 "(ページサイズが 4096 バイトでないプラットフォームにおいて)  I<offset\\ *\\ "
6500 "4096> がシステムのページサイズの倍数ではない。"
6501
6502 #. type: Plain text
6503 #: build/C/man2/mmap2.2:74
6504 msgid "B<mmap2>()  can also return any of the errors described in B<mmap>(2)."
6505 msgstr "B<mmap2>() は B<mmap>(2) に載っているエラーを返すこともある。"
6506
6507 #. type: Plain text
6508 #: build/C/man2/mmap2.2:77
6509 msgid "B<mmap2>()  is available since Linux 2.3.31."
6510 msgstr "B<mmap2>()  は、Linux 2.3.31 以降で使用可能である。"
6511
6512 #. type: Plain text
6513 #: build/C/man2/mmap2.2:79 build/C/man2/subpage_prot.2:98
6514 msgid "This system call is Linux-specific."
6515 msgstr "このシステムコールは Linux 独自である。"
6516
6517 #. type: Plain text
6518 #: build/C/man2/mmap2.2:86
6519 msgid ""
6520 "On architectures where this system call is present, the glibc B<mmap>()  "
6521 "wrapper function invokes this system call rather than the B<mmap>(2)  system "
6522 "call."
6523 msgstr ""
6524 "このシステムコールが存在するアーキテクチャーでは、glibc の B<mmap>()  のラッ"
6525 "パー関数は、 B<mmap>(2)  システムコールではなく、このシステムコール "
6526 "(B<mmap2>(2))  を起動する。"
6527
6528 #. type: Plain text
6529 #: build/C/man2/mmap2.2:88
6530 msgid "This system call does not exist on x86-64."
6531 msgstr "このシステムコールは x86-64 には存在しない。"
6532
6533 #.  ia64 can have page sizes ranging from 4kB to 64kB.
6534 #.  On cris, it looks like the unit might also be the page size,
6535 #.  which is 8192 bytes. -- mtk, June 2007
6536 #. type: Plain text
6537 #: build/C/man2/mmap2.2:95
6538 msgid ""
6539 "On ia64, the unit for I<offset> is actually the system page size, rather "
6540 "than 4096 bytes."
6541 msgstr ""
6542 "ia64 では、 I<offset> の単位は、実際にはシステムのページサイズであり、 4096 "
6543 "バイトではない。"
6544
6545 #. type: Plain text
6546 #: build/C/man2/mmap2.2:101
6547 msgid ""
6548 "B<getpagesize>(2), B<mmap>(2), B<mremap>(2), B<msync>(2), B<shm_open>(3)"
6549 msgstr ""
6550 "B<getpagesize>(2), B<mmap>(2), B<mremap>(2), B<msync>(2), B<shm_open>(3)"
6551
6552 #. type: TH
6553 #: build/C/man2/mprotect.2:38
6554 #, no-wrap
6555 msgid "MPROTECT"
6556 msgstr "MPROTECT"
6557
6558 #. type: TH
6559 #: build/C/man2/mprotect.2:38
6560 #, no-wrap
6561 msgid "2014-01-05"
6562 msgstr "2014-01-05"
6563
6564 #. type: Plain text
6565 #: build/C/man2/mprotect.2:41
6566 msgid "mprotect - set protection on a region of memory"
6567 msgstr "mprotect - メモリ領域の保護を設定する"
6568
6569 #. type: Plain text
6570 #: build/C/man2/mprotect.2:46
6571 #, no-wrap
6572 msgid "B<int mprotect(void *>I<addr>B<, size_t >I<len>B<, int >I<prot>B<);>\n"
6573 msgstr "B<int mprotect(void *>I<addr>B<, size_t >I<len>B<, int >I<prot>B<);>\n"
6574
6575 #. type: Plain text
6576 #: build/C/man2/mprotect.2:54
6577 msgid ""
6578 "B<mprotect>()  changes protection for the calling process's memory page(s)  "
6579 "containing any part of the address range in the interval [I<addr>,\\ I<addr>"
6580 "+I<len>-1].  I<addr> must be aligned to a page boundary."
6581 msgstr ""
6582 "B<mprotect>()  は、区間 [I<addr>,\\ I<addr>+I<len>-1] のアドレス範囲を含む 呼"
6583 "び出し元のプロセスのメモリページのアクセス保護を変更する。 I<addr> はページ境"
6584 "界に一致していなければならない。"
6585
6586 #. type: Plain text
6587 #: build/C/man2/mprotect.2:59
6588 msgid ""
6589 "If the calling process tries to access memory in a manner that violates the "
6590 "protection, then the kernel generates a B<SIGSEGV> signal for the process."
6591 msgstr ""
6592 "呼び出し元のプロセスがアクセス保護に違反するようなメモリアクセスを 行おうとす"
6593 "ると、カーネルはシグナル B<SIGSEGV> をそのプロセスに対して生成する。"
6594
6595 #. type: Plain text
6596 #: build/C/man2/mprotect.2:64
6597 msgid ""
6598 "I<prot> is either B<PROT_NONE> or a bitwise-or of the other values in the "
6599 "following list:"
6600 msgstr ""
6601 "I<prot> には、 B<PROT_NONE> か、以下のリストの B<PROT_NONE> 以外の値をビット"
6602 "毎の論理和 (bitwize-or) で指定する:"
6603
6604 #. type: Plain text
6605 #: build/C/man2/mprotect.2:67
6606 msgid "The memory cannot be accessed at all."
6607 msgstr "そのメモリには全くアクセスできない。"
6608
6609 #. type: Plain text
6610 #: build/C/man2/mprotect.2:70
6611 msgid "The memory can be read."
6612 msgstr "そのメモリを読み取ることができる。"
6613
6614 #. type: Plain text
6615 #: build/C/man2/mprotect.2:73
6616 msgid "The memory can be modified."
6617 msgstr "そのメモリを変更できる。"
6618
6619 #.  FIXME
6620 #.  Document PROT_GROWSUP and PROT_GROWSDOWN
6621 #. type: Plain text
6622 #: build/C/man2/mprotect.2:78
6623 msgid "The memory can be executed."
6624 msgstr "そのメモリは実行可能である。"
6625
6626 #. type: Plain text
6627 #: build/C/man2/mprotect.2:85
6628 msgid ""
6629 "On success, B<mprotect>()  returns zero.  On error, -1 is returned, and "
6630 "I<errno> is set appropriately."
6631 msgstr ""
6632 "成功した場合、 B<mprotect>()  は 0 を返す。エラーの場合は -1 が返り、 "
6633 "I<errno> が適切に設定される。"
6634
6635 #. type: Plain text
6636 #: build/C/man2/mprotect.2:95
6637 msgid ""
6638 "The memory cannot be given the specified access.  This can happen, for "
6639 "example, if you B<mmap>(2)  a file to which you have read-only access, then "
6640 "ask B<mprotect>()  to mark it B<PROT_WRITE>."
6641 msgstr ""
6642 "指定されたアクセスをメモリに設定することができない。 これは、例えば ファイル"
6643 "を読み取り専用で B<mmap>(2)  しており、その領域に対して B<mprotect>()  を呼び"
6644 "出して B<PROT_WRITE> に設定しようとした場合に発生する。"
6645
6646 #.  Or: both PROT_GROWSUP and PROT_GROWSDOWN were specified in 'prot'.
6647 #. type: Plain text
6648 #: build/C/man2/mprotect.2:100
6649 msgid ""
6650 "I<addr> is not a valid pointer, or not a multiple of the system page size."
6651 msgstr ""
6652 "I<addr> が有効なポインタでないか、 システムのページサイズの倍数でない。"
6653
6654 #. type: Plain text
6655 #: build/C/man2/mprotect.2:103
6656 msgid "Internal kernel structures could not be allocated."
6657 msgstr "カーネル内部の構造体を割り当てることができなかった。"
6658
6659 #. type: Plain text
6660 #: build/C/man2/mprotect.2:113
6661 msgid ""
6662 "Addresses in the range [I<addr>, I<addr>+I<len>-1] are invalid for the "
6663 "address space of the process, or specify one or more pages that are not "
6664 "mapped.  (Before kernel 2.4.19, the error B<EFAULT> was incorrectly produced "
6665 "for these cases.)"
6666 msgstr ""
6667 "[I<addr>, I<addr>+I<len>-1] という範囲のアドレスがプロセスのアドレス空間とし"
6668 "て不正であるか、 その範囲のアドレスがマップされていない 1 つ以上のページを指"
6669 "している (カーネル 2.4.19 より前では、この状況でエラー B<EFAULT> が間違って生"
6670 "成されていた)。"
6671
6672 #.  SVr4 defines an additional error
6673 #.  code EAGAIN. The SVr4 error conditions don't map neatly onto Linux's.
6674 #. type: Plain text
6675 #: build/C/man2/mprotect.2:122
6676 msgid ""
6677 "SVr4, POSIX.1-2001.  POSIX says that the behavior of B<mprotect>()  is "
6678 "unspecified if it is applied to a region of memory that was not obtained via "
6679 "B<mmap>(2)."
6680 msgstr ""
6681 "SVr4, POSIX.1-2001.  POSIX では、 B<mmap>(2)  経由で獲得していないメモリ領域"
6682 "に対して B<mprotect>()  を行った場合の B<mprotect>()  の動作は未定義であると"
6683 "されている。"
6684
6685 #. type: Plain text
6686 #: build/C/man2/mprotect.2:129
6687 msgid ""
6688 "On Linux it is always permissible to call B<mprotect>()  on any address in a "
6689 "process's address space (except for the kernel vsyscall area).  In "
6690 "particular it can be used to change existing code mappings to be writable."
6691 msgstr ""
6692 "Linux では、(カーネル vsyscall 領域以外の)  任意のプロセスアドレス空間に対し"
6693 "て B<mprotect>()  を呼び出すことが、常に許されている。 これは特に既存のコード"
6694 "マッピングを書き込み可能にするために使われる。"
6695
6696 #. type: Plain text
6697 #: build/C/man2/mprotect.2:139
6698 msgid ""
6699 "Whether B<PROT_EXEC> has any effect different from B<PROT_READ> is "
6700 "architecture- and kernel version-dependent.  On some hardware architectures "
6701 "(e.g., i386), B<PROT_WRITE> implies B<PROT_READ>."
6702 msgstr ""
6703 "B<PROT_EXEC> が B<PROT_READ> と異なる影響を持つか否かは、アーキテクチャとカー"
6704 "ネルのバージョンに依存する。 (i386 などの) いくつかのアーキテクチャでは、 "
6705 "B<PROT_WRITE> をセットすると、暗黙のうちに B<PROT_READ> がセットされる。"
6706
6707 #. type: Plain text
6708 #: build/C/man2/mprotect.2:148
6709 msgid ""
6710 "POSIX.1-2001 says that an implementation may permit access other than that "
6711 "specified in I<prot>, but at a minimum can allow write access only if "
6712 "B<PROT_WRITE> has been set, and must not allow any access if B<PROT_NONE> "
6713 "has been set."
6714 msgstr ""
6715 "POSIX.1-2001 では、 I<prot> で指定されていないアクセスを許可する実装を認めて"
6716 "いる。 ただし、最低限、 B<PROT_WRITE> がセットされている場合にのみ書き込みア"
6717 "クセスが許可され、 B<PROT_NONE> がセットされている場合にはアクセスは許可され"
6718 "ない点だけは 満たす必要がある。"
6719
6720 #. type: Plain text
6721 #: build/C/man2/mprotect.2:154
6722 msgid ""
6723 "The program below allocates four pages of memory, makes the third of these "
6724 "pages read-only, and then executes a loop that walks upward through the "
6725 "allocated region modifying bytes."
6726 msgstr ""
6727 "以下のプログラムは、メモリページを 4つ確保し、そのうち 3番目のページを 読み込"
6728 "み専用に設定する。その後で、確保した領域のアドレスの小さい方から 大きな方に向"
6729 "かって順番にバイト値を変更するループを実行する。"
6730
6731 #. type: Plain text
6732 #: build/C/man2/mprotect.2:157
6733 msgid ""
6734 "An example of what we might see when running the program is the following:"
6735 msgstr "プログラムを実行した場合の一例を以下に示す。"
6736
6737 #. type: Plain text
6738 #: build/C/man2/mprotect.2:163
6739 #, no-wrap
6740 msgid ""
6741 "$B< ./a.out>\n"
6742 "Start of region:        0x804c000\n"
6743 "Got SIGSEGV at address: 0x804e000\n"
6744 msgstr ""
6745 "$B< ./a.out>\n"
6746 "Start of region:        0x804c000\n"
6747 "Got SIGSEGV at address: 0x804e000\n"
6748
6749 #. type: Plain text
6750 #: build/C/man2/mprotect.2:175
6751 #, no-wrap
6752 msgid ""
6753 "#include E<lt>unistd.hE<gt>\n"
6754 "#include E<lt>signal.hE<gt>\n"
6755 "#include E<lt>stdio.hE<gt>\n"
6756 "#include E<lt>malloc.hE<gt>\n"
6757 "#include E<lt>stdlib.hE<gt>\n"
6758 "#include E<lt>errno.hE<gt>\n"
6759 "#include E<lt>sys/mman.hE<gt>\n"
6760 msgstr ""
6761 "#include E<lt>unistd.hE<gt>\n"
6762 "#include E<lt>signal.hE<gt>\n"
6763 "#include E<lt>stdio.hE<gt>\n"
6764 "#include E<lt>malloc.hE<gt>\n"
6765 "#include E<lt>stdlib.hE<gt>\n"
6766 "#include E<lt>errno.hE<gt>\n"
6767 "#include E<lt>sys/mman.hE<gt>\n"
6768
6769 #. type: Plain text
6770 #: build/C/man2/mprotect.2:180
6771 #, no-wrap
6772 msgid "static char *buffer;\n"
6773 msgstr "static char *buffer;\n"
6774
6775 #. type: Plain text
6776 #: build/C/man2/mprotect.2:188
6777 #, no-wrap
6778 msgid ""
6779 "static void\n"
6780 "handler(int sig, siginfo_t *si, void *unused)\n"
6781 "{\n"
6782 "    printf(\"Got SIGSEGV at address: 0x%lx\\en\",\n"
6783 "            (long) si-E<gt>si_addr);\n"
6784 "    exit(EXIT_FAILURE);\n"
6785 "}\n"
6786 msgstr ""
6787 "static void\n"
6788 "handler(int sig, siginfo_t *si, void *unused)\n"
6789 "{\n"
6790 "    printf(\"Got SIGSEGV at address: 0x%lx\\en\",\n"
6791 "            (long) si-E<gt>si_addr);\n"
6792 "    exit(EXIT_FAILURE);\n"
6793 "}\n"
6794
6795 #. type: Plain text
6796 #: build/C/man2/mprotect.2:195
6797 #, no-wrap
6798 msgid ""
6799 "int\n"
6800 "main(int argc, char *argv[])\n"
6801 "{\n"
6802 "    char *p;\n"
6803 "    int pagesize;\n"
6804 "    struct sigaction sa;\n"
6805 msgstr ""
6806 "int\n"
6807 "main(void)\n"
6808 "{\n"
6809 "    char *p;\n"
6810 "    int pagesize;\n"
6811 "    struct sigaction sa;\n"
6812
6813 #. type: Plain text
6814 #: build/C/man2/mprotect.2:201
6815 #, no-wrap
6816 msgid ""
6817 "    sa.sa_flags = SA_SIGINFO;\n"
6818 "    sigemptyset(&sa.sa_mask);\n"
6819 "    sa.sa_sigaction = handler;\n"
6820 "    if (sigaction(SIGSEGV, &sa, NULL) == -1)\n"
6821 "        handle_error(\"sigaction\");\n"
6822 msgstr ""
6823 "    sa.sa_flags = SA_SIGINFO;\n"
6824 "    sigemptyset(&sa.sa_mask);\n"
6825 "    sa.sa_sigaction = handler;\n"
6826 "    if (sigaction(SIGSEGV, &sa, NULL) == -1)\n"
6827 "        handle_error(\"sigaction\");\n"
6828
6829 #. type: Plain text
6830 #: build/C/man2/mprotect.2:205
6831 #, no-wrap
6832 msgid ""
6833 "    pagesize = sysconf(_SC_PAGE_SIZE);\n"
6834 "    if (pagesize == -1)\n"
6835 "        handle_error(\"sysconf\");\n"
6836 msgstr ""
6837 "    pagesize = sysconf(_SC_PAGE_SIZE);\n"
6838 "    if (pagesize == -1)\n"
6839 "        handle_error(\"sysconf\");\n"
6840
6841 #. type: Plain text
6842 #: build/C/man2/mprotect.2:208
6843 #, no-wrap
6844 msgid ""
6845 "    /* Allocate a buffer aligned on a page boundary;\n"
6846 "       initial protection is PROT_READ | PROT_WRITE */\n"
6847 msgstr ""
6848 "    /* Allocate a buffer aligned on a page boundary;\n"
6849 "       initial protection is PROT_READ | PROT_WRITE */\n"
6850
6851 #. type: Plain text
6852 #: build/C/man2/mprotect.2:212
6853 #, no-wrap
6854 msgid ""
6855 "    buffer = memalign(pagesize, 4 * pagesize);\n"
6856 "    if (buffer == NULL)\n"
6857 "        handle_error(\"memalign\");\n"
6858 msgstr ""
6859 "    buffer = memalign(pagesize, 4 * pagesize);\n"
6860 "    if (buffer == NULL)\n"
6861 "        handle_error(\"memalign\");\n"
6862
6863 #. type: Plain text
6864 #: build/C/man2/mprotect.2:214
6865 #, no-wrap
6866 msgid "    printf(\"Start of region:        0x%lx\\en\", (long) buffer);\n"
6867 msgstr "    printf(\"Start of region:        0x%lx\\en\", (long) buffer);\n"
6868
6869 #. type: Plain text
6870 #: build/C/man2/mprotect.2:218
6871 #, no-wrap
6872 msgid ""
6873 "    if (mprotect(buffer + pagesize * 2, pagesize,\n"
6874 "                PROT_READ) == -1)\n"
6875 "        handle_error(\"mprotect\");\n"
6876 msgstr ""
6877 "    if (mprotect(buffer + pagesize * 2, pagesize,\n"
6878 "                PROT_READ) == -1)\n"
6879 "        handle_error(\"mprotect\");\n"
6880
6881 #. type: Plain text
6882 #: build/C/man2/mprotect.2:221
6883 #, no-wrap
6884 msgid ""
6885 "    for (p = buffer ; ; )\n"
6886 "        *(p++) = \\(aqa\\(aq;\n"
6887 msgstr ""
6888 "    for (p = buffer ; ; )\n"
6889 "        *(p++) = \\(aqa\\(aq;\n"
6890
6891 #. type: Plain text
6892 #: build/C/man2/mprotect.2:225
6893 #, no-wrap
6894 msgid ""
6895 "    printf(\"Loop completed\\en\");     /* Should never happen */\n"
6896 "    exit(EXIT_SUCCESS);\n"
6897 "}\n"
6898 msgstr ""
6899 "    printf(\"Loop completed\\en\");     /* Should never happen */\n"
6900 "    exit(EXIT_SUCCESS);\n"
6901 "}\n"
6902
6903 #. type: Plain text
6904 #: build/C/man2/mprotect.2:229
6905 msgid "B<mmap>(2), B<sysconf>(3)"
6906 msgstr "B<mmap>(2), B<sysconf>(3)"
6907
6908 #. type: TH
6909 #: build/C/man2/mremap.2:30
6910 #, no-wrap
6911 msgid "MREMAP"
6912 msgstr "MREMAP"
6913
6914 #. type: TH
6915 #: build/C/man2/mremap.2:30
6916 #, no-wrap
6917 msgid "2010-06-10"
6918 msgstr "2010-06-10"
6919
6920 #. type: Plain text
6921 #: build/C/man2/mremap.2:33
6922 msgid "mremap - remap a virtual memory address"
6923 msgstr "mremap - 仮想メモリ・アドレスを再マッピングする"
6924
6925 #. type: Plain text
6926 #: build/C/man2/mremap.2:36
6927 #, no-wrap
6928 msgid "B<#define _GNU_SOURCE>         /* See feature_test_macros(7) */\n"
6929 msgstr "B<#define _GNU_SOURCE>         /* feature_test_macros(7) 参照 */\n"
6930
6931 #. type: Plain text
6932 #: build/C/man2/mremap.2:41
6933 #, no-wrap
6934 msgid ""
6935 "B<void *mremap(void *>I<old_address>B<, size_t >I<old_size>B<,>\n"
6936 "B<             size_t >I<new_size>B<, int >I<flags>B<, ... /* void *>I<new_address>B< */);>\n"
6937 msgstr ""
6938 "B<void *mremap(void *>I<old_address>B<, size_t >I<old_size>B<,>\n"
6939 "B<             size_t >I<new_size>B<, int >I<flags>B<, ... /* void *>I<new_address>B< */);>\n"
6940
6941 #. type: Plain text
6942 #: build/C/man2/mremap.2:47
6943 msgid ""
6944 "B<mremap>()  expands (or shrinks) an existing memory mapping, potentially "
6945 "moving it at the same time (controlled by the I<flags> argument and the "
6946 "available virtual address space)."
6947 msgstr ""
6948 "B<mremap>()  は既存のメモリ・マッピングの拡張 (または縮小) を行う。 同時に移"
6949 "動されることもある (I<flags> 引き数と利用可能な仮想アドレス空間によって決ま"
6950 "る)。"
6951
6952 #. type: Plain text
6953 #: build/C/man2/mremap.2:61
6954 msgid ""
6955 "I<old_address> is the old address of the virtual memory block that you want "
6956 "to expand (or shrink).  Note that I<old_address> has to be page aligned.  "
6957 "I<old_size> is the old size of the virtual memory block.  I<new_size> is the "
6958 "requested size of the virtual memory block after the resize.  An optional "
6959 "fifth argument, I<new_address>, may be provided; see the description of "
6960 "B<MREMAP_FIXED> below."
6961 msgstr ""
6962 "I<old_address> は拡張 (または縮小) しようとする仮想メモリ・ブロック の元のア"
6963 "ドレスである。I<old_address> はページ境界に合っていなければ ならない点に注意"
6964 "すること。I<old_size> は元の仮想メモリ・ブロックの サイズである。 "
6965 "I<new_size> は要求する変更後の仮想メモリ・ブロックのサイズである。 5 番目の引"
6966 "き数として I<new_address> を指定することができる。下記の B<MREMAP_FIXED> の説"
6967 "明を参照のこと。"
6968
6969 #. type: Plain text
6970 #: build/C/man2/mremap.2:73
6971 msgid ""
6972 "In Linux the memory is divided into pages.  A user process has (one or)  "
6973 "several linear virtual memory segments.  Each virtual memory segment has one "
6974 "or more mappings to real memory pages (in the page table).  Each virtual "
6975 "memory segment has its own protection (access rights), which may cause a "
6976 "segmentation violation if the memory is accessed incorrectly (e.g., writing "
6977 "to a read-only segment).  Accessing virtual memory outside of the segments "
6978 "will also cause a segmentation violation."
6979 msgstr ""
6980 "Linux ではメモリはページに分割される。ユーザー・プロセスは (一つまたは)  複数"
6981 "のリニアな仮想メモリセグメントを持つ。 それぞれの仮想メモリセグメントは一つ以"
6982 "上の実メモリ・ページ にマッピングされている (マッピング情報はページ・テーブル"
6983 "で管理される)。 仮想メモリセグメントにはセグメント毎の保護 (アクセス権) が設"
6984 "定されており、 メモリが不正にアクセスされた場合 (例えば読み込み専用のセグメン"
6985 "トに 書き込んだ場合)、セグメンテーション侵害 (segmentation violation) を 引き"
6986 "起こす。また、セグメント外の仮想メモリにアクセスした場合にも セグメンテーショ"
6987 "ン侵害が発生する。"
6988
6989 #. type: Plain text
6990 #: build/C/man2/mremap.2:81
6991 msgid ""
6992 "B<mremap>()  uses the Linux page table scheme.  B<mremap>()  changes the "
6993 "mapping between virtual addresses and memory pages.  This can be used to "
6994 "implement a very efficient B<realloc>(3)."
6995 msgstr ""
6996 "B<mremap>()  は Linux のページ・テーブル方式を使用する。 B<mremap>()  は仮想"
6997 "アドレスとメモリ・ページのマッピングを変更する。これは非常に効率的な "
6998 "B<realloc>(3)  を実装するのに使用されている。"
6999
7000 #. type: Plain text
7001 #: build/C/man2/mremap.2:83
7002 msgid "The I<flags> bit-mask argument may be 0, or include the following flag:"
7003 msgstr "I<flags> ビットマスク引数は 0 または以下のフラグを含む:"
7004
7005 #. type: TP
7006 #: build/C/man2/mremap.2:83
7007 #, no-wrap
7008 msgid "B<MREMAP_MAYMOVE>"
7009 msgstr "B<MREMAP_MAYMOVE>"
7010
7011 #. type: Plain text
7012 #: build/C/man2/mremap.2:95
7013 msgid ""
7014 "By default, if there is not sufficient space to expand a mapping at its "
7015 "current location, then B<mremap>()  fails.  If this flag is specified, then "
7016 "the kernel is permitted to relocate the mapping to a new virtual address, if "
7017 "necessary.  If the mapping is relocated, then absolute pointers into the old "
7018 "mapping location become invalid (offsets relative to the starting address of "
7019 "the mapping should be employed)."
7020 msgstr ""
7021 "デフォルトでは、現在の位置にマッピングを拡張するための 十分な空きがなければ "
7022 "B<mremap>()  は失敗する。 このフラグが指定されると、カーネルは必要があれば"
7023 "マッピングを 新しい仮想アドレスに再配置することができる マッピングが再配置さ"
7024 "れると、古いマッピング位置への絶対ポインタは 無効になる (マッピングの開始アド"
7025 "レスからの相対オフセットは有効のままである)。"
7026
7027 #. type: TP
7028 #: build/C/man2/mremap.2:95
7029 #, no-wrap
7030 msgid "B<MREMAP_FIXED> (since Linux 2.3.31)"
7031 msgstr "B<MREMAP_FIXED> (Linux 2.3.31 以降)"
7032
7033 #. type: Plain text
7034 #: build/C/man2/mremap.2:117
7035 msgid ""
7036 "This flag serves a similar purpose to the B<MAP_FIXED> flag of B<mmap>(2).  "
7037 "If this flag is specified, then B<mremap>()  accepts a fifth argument, I<void"
7038 "\\ *new_address>, which specifies a page-aligned address to which the "
7039 "mapping must be moved.  Any previous mapping at the address range specified "
7040 "by I<new_address> and I<new_size> is unmapped.  If B<MREMAP_FIXED> is "
7041 "specified, then B<MREMAP_MAYMOVE> must also be specified."
7042 msgstr ""
7043 "このフラグは B<mmap>(2)  の B<MAP_FIXED> フラグと似たような目的で用いられ"
7044 "る。 このフラグが指定されると、 B<mremap>()  は 5 番目の引き数 I<void\\ "
7045 "*new_address> を受け取り、この引数はマッピングが移動されるべきアドレスを指定"
7046 "する。 このアドレスはページ境界に合っていなければならない。 I<new_address> "
7047 "と I<new_size> で指定されるアドレス範囲に過去のマッピングがあった場合、 その"
7048 "マッピングはアンマップされる (unmapped)。 B<MREMAP_FIXED> を指定した場合は、 "
7049 "B<MREMAP_MAYMOVE> も指定しなければならない。"
7050
7051 #. type: Plain text
7052 #: build/C/man2/mremap.2:127
7053 msgid ""
7054 "If the memory segment specified by I<old_address> and I<old_size> is locked "
7055 "(using B<mlock>(2)  or similar), then this lock is maintained when the "
7056 "segment is resized and/or relocated.  As a consequence, the amount of memory "
7057 "locked by the process may change."
7058 msgstr ""
7059 "I<old_address> と I<old_size> で指定されるメモリセグメントが (B<mlock>(2)  や"
7060 "同様のもので) ロックされている場合、セグメントのサイズが変わったり 再配置され"
7061 "たりした時にロックも維持される。 その結果、プロセスによってロックされるメモリ"
7062 "の量は変化する。"
7063
7064 #. type: Plain text
7065 #: build/C/man2/mremap.2:135
7066 msgid ""
7067 "On success B<mremap>()  returns a pointer to the new virtual memory area.  "
7068 "On error, the value B<MAP_FAILED> (that is, I<(void\\ *)\\ -1>) is returned, "
7069 "and I<errno> is set appropriately."
7070 msgstr ""
7071 "成功した場合は B<mremap>()  は新しい仮想メモリ領域へのポインタを返す。 エラー"
7072 "の場合は B<MAP_FAILED> (すなわち I<(void\\ *)\\ -1>) が返され、 I<errno> が適"
7073 "切に設定される。"
7074
7075 #. type: Plain text
7076 #: build/C/man2/mremap.2:142
7077 msgid ""
7078 "The caller tried to expand a memory segment that is locked, but this was not "
7079 "possible without exceeding the B<RLIMIT_MEMLOCK> resource limit."
7080 msgstr ""
7081 "呼び出し元がロックされているメモリセグメントを拡張しようとしたが、 "
7082 "B<RLIMIT_MEMLOCK> リソース制限を越えずにこれを行うことができない。"
7083
7084 #. type: Plain text
7085 #: build/C/man2/mremap.2:151
7086 msgid ""
7087 "\"Segmentation fault.\" Some address in the range I<old_address> to "
7088 "I<old_address>+I<old_size> is an invalid virtual memory address for this "
7089 "process.  You can also get B<EFAULT> even if there exist mappings that cover "
7090 "the whole address space requested, but those mappings are of different types."
7091 msgstr ""
7092 "「セグメンテーション違反(segmentation fault)」 I<old_address> から "
7093 "I<old_address>+I<old_size> の 範囲のアドレスのどれかがこのプロセスにおいて不"
7094 "正な仮想メモリ・アドレスである。 たとえ要求したアドレス空間全体を含むような"
7095 "マッピングがあったとしても、 それらのマッピングが異なった型ならば B<EFAULT> "
7096 "を受け取るだろう。"
7097
7098 #. type: Plain text
7099 #: build/C/man2/mremap.2:179
7100 msgid ""
7101 "An invalid argument was given.  Possible causes are: I<old_address> was not "
7102 "page aligned; a value other than B<MREMAP_MAYMOVE> or B<MREMAP_FIXED> was "
7103 "specified in I<flags>; I<new_size> was zero; I<new_size> or I<new_address> "
7104 "was invalid; or the new address range specified by I<new_address> and "
7105 "I<new_size> overlapped the old address range specified by I<old_address> and "
7106 "I<old_size>; or B<MREMAP_FIXED> was specified without also specifying "
7107 "B<MREMAP_MAYMOVE>."
7108 msgstr ""
7109 "不正な引き数が与えられた。 可能性のある原因は以下の通りである: たいていは "
7110 "I<old_address> がページ境界に 合ってない; I<flags> に B<MREMAP_MAYMOVE> また"
7111 "は B<MREMAP_FIXED> 以外の値が指定されている; I<new_size> がゼロ; I<new_size> "
7112 "または I<new_address> の値が不正; I<new_address> と I<new_size> で指定される"
7113 "新しいアドレス範囲が I<old_address> と I<old_size> で指定される古いアドレス範"
7114 "囲と重なっている; B<MREMAP_FIXED> が指定されているが B<MREMAP_MAYMOVE> が指定"
7115 "されていない。"
7116
7117 #. type: Plain text
7118 #: build/C/man2/mremap.2:185
7119 msgid ""
7120 "The memory area cannot be expanded at the current virtual address, and the "
7121 "B<MREMAP_MAYMOVE> flag is not set in I<flags>.  Or, there is not enough "
7122 "(virtual) memory available."
7123 msgstr ""
7124 "現在の仮想アドレスではメモリ領域が拡張できず、 B<MREMAP_MAYMOVE> フラグが "
7125 "I<flags> に設定されていない。 または十分な (仮想) メモリが存在しない。"
7126
7127 #.  4.2BSD had a (never actually implemented)
7128 #.  .BR mremap (2)
7129 #.  call with completely different semantics.
7130 #. type: Plain text
7131 #: build/C/man2/mremap.2:191
7132 msgid ""
7133 "This call is Linux-specific, and should not be used in programs intended to "
7134 "be portable."
7135 msgstr ""
7136 "このコールは Linux 特有であり、移植を意図したプログラムで 使用すべきではな"
7137 "い。"
7138
7139 #. type: Plain text
7140 #: build/C/man2/mremap.2:199
7141 msgid ""
7142 "Prior to version 2.4, glibc did not expose the definition of "
7143 "B<MREMAP_FIXED>, and the prototype for B<mremap>()  did not allow for the "
7144 "I<new_address> argument."
7145 msgstr ""
7146 "バージョン 2.4 より前の glibc では、 B<MREMAP_FIXED> の定義は公開されておら"
7147 "ず、 B<mremap>()  のプロトタイプは I<new_address> 引き数を取らなかった。"
7148
7149 #. type: Plain text
7150 #: build/C/man2/mremap.2:208
7151 msgid ""
7152 "B<brk>(2), B<getpagesize>(2), B<getrlimit>(2), B<mlock>(2), B<mmap>(2), "
7153 "B<sbrk>(2), B<malloc>(3), B<realloc>(3)"
7154 msgstr ""
7155 "B<brk>(2), B<getpagesize>(2), B<getrlimit>(2), B<mlock>(2), B<mmap>(2), "
7156 "B<sbrk>(2), B<realloc>(3), B<malloc>(3)"
7157
7158 #. type: Plain text
7159 #: build/C/man2/mremap.2:214
7160 msgid ""
7161 "Your favorite text book on operating systems for more information on paged "
7162 "memory (e.g., I<Modern Operating Systems> by Andrew S. Tanenbaum, I<Inside "
7163 "Linux> by Randolf Bentson, I<The Design of the UNIX Operating System> by "
7164 "Maurice J. Bach)"
7165 msgstr ""
7166 "ページ分割されたメモリについてもっと詳しく知りたいならば、あなたのお気に入り"
7167 "のオペレーティングシステムの教科書を参照してほしい (例えば、 I<Modern "
7168 "Operating Systems> by Andrew S. Tanenbaum, I<Inside Linux> by Randolf "
7169 "Bentson, I<The Design of the UNIX Operating System> by Maurice J. Bach.)"
7170
7171 #. type: TH
7172 #: build/C/man2/msync.2:25
7173 #, no-wrap
7174 msgid "MSYNC"
7175 msgstr "MSYNC"
7176
7177 #. type: Plain text
7178 #: build/C/man2/msync.2:28
7179 msgid "msync - synchronize a file with a memory map"
7180 msgstr "msync - ファイルをマップしたメモリと同期させる"
7181
7182 #. type: Plain text
7183 #: build/C/man2/msync.2:32
7184 msgid "B<int msync(void *>I<addr>B<, size_t >I<length>B<, int >I<flags>B<);>"
7185 msgstr "B<int msync(void *>I<addr>B<, size_t >I<length>B<, int >I<flags>B<);>"
7186
7187 #. type: Plain text
7188 #: build/C/man2/msync.2:48
7189 msgid ""
7190 "B<msync>()  flushes changes made to the in-core copy of a file that was "
7191 "mapped into memory using B<mmap>(2)  back to the filesystem.  Without use of "
7192 "this call there is no guarantee that changes are written back before "
7193 "B<munmap>(2)  is called.  To be more precise, the part of the file that "
7194 "corresponds to the memory area starting at I<addr> and having length "
7195 "I<length> is updated."
7196 msgstr ""
7197 "B<msync>()  は B<mmap>(2)  を使ってメモリにマップされたファイルの、 メモリ上"
7198 "のコピーになされた変更をファイルシステムに反映させる。 この関数を使用しない"
7199 "と、 B<munmap>(2)  が呼び出されるまで変更が書き戻される保証はない。 より正確"
7200 "には、ファイルのうち I<addr> から始まり長さ I<length> のメモリ領域に対応する"
7201 "部分が更新される。"
7202
7203 #. type: Plain text
7204 #: build/C/man2/msync.2:68
7205 msgid ""
7206 "The I<flags> argument may have the bits B<MS_ASYNC>, B<MS_SYNC>, and "
7207 "B<MS_INVALIDATE> set, but not both B<MS_ASYNC> and B<MS_SYNC>.  B<MS_ASYNC> "
7208 "specifies that an update be scheduled, but the call returns immediately.  "
7209 "B<MS_SYNC> asks for an update and waits for it to complete.  "
7210 "B<MS_INVALIDATE> asks to invalidate other mappings of the same file (so that "
7211 "they can be updated with the fresh values just written)."
7212 msgstr ""
7213 "I<flags> 引数にはビット B<MS_ASYNC>, B<MS_SYNC>, B<MS_INVALIDATE> を設定する"
7214 "ことができるが、 B<MS_ASYNC> と B<MS_SYNC> を同時に指定することはできない。 "
7215 "B<MS_ASYNC> は更新を予定に組み込むことを表し、呼び出しは直ちに返る。 "
7216 "B<MS_SYNC> は更新を要求し、更新が完了するまで待つ。 B<MS_INVALIDATE> は(たっ"
7217 "た今書き込んだ新しい値でマッピングを更新することができるように)  同じファイル"
7218 "に対する他のマッピングを無効にすることを要求する。"
7219
7220 #. type: Plain text
7221 #: build/C/man2/msync.2:73
7222 msgid ""
7223 "On success, zero is returned.  On error, -1 is returned, and I<errno> is set "
7224 "appropriately."
7225 msgstr ""
7226 "成功した場合、 0 が返る。エラーの場合、 -1 が返り、 I<errno> が適切に設定され"
7227 "る。"
7228
7229 #. type: TP
7230 #: build/C/man2/msync.2:74
7231 #, no-wrap
7232 msgid "B<EBUSY>"
7233 msgstr "B<EBUSY>"
7234
7235 #. type: Plain text
7236 #: build/C/man2/msync.2:80
7237 msgid ""
7238 "B<MS_INVALIDATE> was specified in I<flags>, and a memory lock exists for the "
7239 "specified address range."
7240 msgstr ""
7241 "I flags に B<MS_INVALIDATE> が指定されたが、指定されたアドレス範囲にロックが"
7242 "存在する。"
7243
7244 #. type: Plain text
7245 #: build/C/man2/msync.2:93
7246 msgid ""
7247 "I<addr> is not a multiple of PAGESIZE; or any bit other than B<MS_ASYNC> | "
7248 "B<MS_INVALIDATE> | B<MS_SYNC> is set in I<flags>; or both B<MS_SYNC> and "
7249 "B<MS_ASYNC> are set in I<flags>."
7250 msgstr ""
7251 "I<addr> が PAGESIZE の倍数でない。または、 I<flags> に B<MS_ASYNC>、"
7252 "B<MS_INVALIDATE>、B<MS_SYNC> 以外のビットが設定された。 または、 I<flags> に "
7253 "B<MS_SYNC> と B<MS_ASYNC> の両方が設定された。"
7254
7255 #. type: Plain text
7256 #: build/C/man2/msync.2:96
7257 msgid "The indicated memory (or part of it) was not mapped."
7258 msgstr "指定されたメモリ (またはその一部) がマップされていない。"
7259
7260 #. type: Plain text
7261 #: build/C/man2/msync.2:98 build/C/man3/posix_fallocate.3:105
7262 #: build/C/man3/shm_open.3:253 build/C/man7/shm_overview.7:103
7263 msgid "POSIX.1-2001."
7264 msgstr "POSIX.1-2001."
7265
7266 #. type: Plain text
7267 #: build/C/man2/msync.2:105
7268 msgid ""
7269 "This call was introduced in Linux 1.3.21, and then used B<EFAULT> instead of "
7270 "B<ENOMEM>.  In Linux 2.4.19, this was changed to the POSIX value B<ENOMEM>."
7271 msgstr ""
7272 "この関数は Linux 1.3.21 で導入されたが、 B<ENOMEM> ではなく B<EFAULT> が使わ"
7273 "れていた。 これは Linux 2.4.19 で POSIX における値 B<ENOMEM> に変更された。"
7274
7275 #.  POSIX.1-2001: It shall be defined to -1 or 0 or 200112L.
7276 #.  -1: unavailable, 0: ask using sysconf().
7277 #.  glibc defines them to 1.
7278 #. type: Plain text
7279 #: build/C/man2/msync.2:120
7280 msgid ""
7281 "On POSIX systems on which B<msync>()  is available, both "
7282 "B<_POSIX_MAPPED_FILES> and B<_POSIX_SYNCHRONIZED_IO> are defined in "
7283 "I<E<lt>unistd.hE<gt>> to a value greater than 0.  (See also B<sysconf>(3).)"
7284 msgstr ""
7285 "B<msync>()  が使用可能な POSIX システムでは B<_POSIX_MAPPED_FILES> と "
7286 "B<_POSIX_SYNCHRONIZED_IO> の両方が I<E<lt>unistd.hE<gt>> で 0 より大きい値に"
7287 "定義される。 (B<sysconf>(3)  を参照すること。 )"
7288
7289 #.  commit 204ec841fbea3e5138168edbc3a76d46747cc987
7290 #. type: Plain text
7291 #: build/C/man2/msync.2:147
7292 msgid ""
7293 "According to POSIX, either B<MS_SYNC> or B<MS_ASYNC> must be specified in "
7294 "I<flags>, and indeed failure to include one of these flags will cause "
7295 "B<msync>()  to fail on some systems.  However, Linux permits a call to "
7296 "B<msync>()  that specifies neither of these flags, with semantics that are "
7297 "(currently) equivalent to specifying B<MS_ASYNC>.  (Since Linux 2.6.19, "
7298 "B<MS_ASYNC> is in fact a no-op, since the kernel properly tracks dirty pages "
7299 "and flushes them to storage as necessary.)  Notwithstanding the Linux "
7300 "behavior, portable, future-proof applications should ensure that they "
7301 "specify either B<MS_SYNC> or B<MS_ASYNC> in I<flags>."
7302 msgstr ""
7303 "POSIX では B<MS_SYNC> と B<MS_ASYNC> のいずれかは必ず I<flags> に指定しなけれ"
7304 "ばならないとされており、 実際にこれらのフラグのいずれかを指定しなかった場合 "
7305 "B<msync>() が失敗するシステムもある。 しかし、 Linux ではこれらのフラグのいず"
7306 "れも指定せずに B<msync>() を呼び出すことができ、 その場合の動作は (現在のとこ"
7307 "ろ) B<MS_ASYNC> を指定した場合と等価である。 (Linux 2.6.19 以降では "
7308 "B<MS_ASYNC> は実際には no-op (何もしない命令) である。 これはカーネルが正し"
7309 "く dirty ページを追跡し、必要に応じてストレージにそれらをフラッシュするからで"
7310 "ある。) Linux の動作に関係なく、アプリケーションの移植性を考慮し、将来も確実"
7311 "に動くようにするには、 B<MS_SYNC> か B<MS_ASYNC> のいずれかを必ず I<flags> に"
7312 "指定するようにすべきである。"
7313
7314 #. type: TP
7315 #: build/C/man2/msync.2:149 build/C/man7/shm_overview.7:46
7316 #, no-wrap
7317 msgid "B<mmap>(2)"
7318 msgstr "B<mmap>(2)"
7319
7320 #. type: TH
7321 #: build/C/man3/mtrace.3:25
7322 #, no-wrap
7323 msgid "MTRACE"
7324 msgstr "MTRACE"
7325
7326 #. type: TH
7327 #: build/C/man3/mtrace.3:25
7328 #, no-wrap
7329 msgid "2012-04-18"
7330 msgstr "2012-04-18"
7331
7332 #. type: Plain text
7333 #: build/C/man3/mtrace.3:28
7334 msgid "mtrace, muntrace - malloc tracing"
7335 msgstr "mtrace, muntrace - malloc のトレース"
7336
7337 #. type: Plain text
7338 #: build/C/man3/mtrace.3:30
7339 msgid "B<#include E<lt>mcheck.hE<gt>>"
7340 msgstr "B<#include E<lt>mcheck.hE<gt>>"
7341
7342 #. type: Plain text
7343 #: build/C/man3/mtrace.3:32
7344 msgid "B<void mtrace(void);>"
7345 msgstr "B<void mtrace(void);>"
7346
7347 #. type: Plain text
7348 #: build/C/man3/mtrace.3:34
7349 msgid "B<void muntrace(void);>"
7350 msgstr "B<void muntrace(void);>"
7351
7352 #. type: Plain text
7353 #: build/C/man3/mtrace.3:46
7354 msgid ""
7355 "The B<mtrace>()  function installs hook functions for the memory-allocation "
7356 "functions (B<malloc>(3), B<realloc>(3)  B<memalign>(3), B<free>(3)).  These "
7357 "hook functions record tracing information about memory allocation and "
7358 "deallocation.  The tracing information can be used to discover memory leaks "
7359 "and attempts to free nonallocated memory in a program."
7360 msgstr ""
7361
7362 #. type: Plain text
7363 #: build/C/man3/mtrace.3:57
7364 msgid ""
7365 "The B<muntrace>()  function disables the hook functions installed by "
7366 "B<mtrace>(), so that tracing information is no longer recorded for the "
7367 "memory-allocation functions.  If no hook functions were successfully "
7368 "installed by B<mtrace>(), B<muntrace>()  does nothing."
7369 msgstr ""
7370
7371 #. type: Plain text
7372 #: build/C/man3/mtrace.3:65
7373 msgid ""
7374 "When B<mtrace>()  is called, it checks the value of the environment variable "
7375 "B<MALLOC_TRACE>, which should contain the pathname of a file in which the "
7376 "tracing information is to be recorded.  If the pathname is successfully "
7377 "opened, it is truncated to zero length."
7378 msgstr ""
7379
7380 #. type: Plain text
7381 #: build/C/man3/mtrace.3:78
7382 msgid ""
7383 "If B<MALLOC_TRACE> is not set, or the pathname it specifies is invalid or "
7384 "not writable, then no hook functions are installed, and B<mtrace>()  has no "
7385 "effect.  In set-user-ID and set-group-ID programs, B<MALLOC_TRACE> is "
7386 "ignored, and B<mtrace>()  has no effect."
7387 msgstr ""
7388
7389 #. type: Plain text
7390 #: build/C/man3/mtrace.3:86
7391 msgid ""
7392 "In normal usage, B<mtrace>()  is called once at the start of execution of a "
7393 "program, and B<muntrace>()  is never called."
7394 msgstr ""
7395
7396 #. type: Plain text
7397 #: build/C/man3/mtrace.3:96
7398 msgid ""
7399 "The tracing output produced after a call to B<mtrace>()  is textual, but not "
7400 "designed to be human readable.  The GNU C library provides a Perl script, "
7401 "B<mtrace>(1), that interprets the trace log and produces human-readable "
7402 "output.  For best results, the traced program should be compiled with "
7403 "debugging enabled, so that line-number information is recorded in the "
7404 "executable."
7405 msgstr ""
7406
7407 #. type: Plain text
7408 #: build/C/man3/mtrace.3:102
7409 msgid ""
7410 "The tracing performed by B<mtrace>()  incurs a performance penalty (if "
7411 "B<MALLOC_TRACE> points to a valid, writable pathname)."
7412 msgstr ""
7413
7414 #. type: Plain text
7415 #: build/C/man3/mtrace.3:108
7416 msgid ""
7417 "The line-number information produced by B<mtrace>(1)  is not always precise: "
7418 "the line number references may refer to the previous or following "
7419 "(nonblank)  line of the source code."
7420 msgstr ""
7421
7422 #. type: Plain text
7423 #: build/C/man3/mtrace.3:115
7424 msgid ""
7425 "The shell session below demonstrates the use of the B<mtrace>()  function "
7426 "and the B<mtrace>(1)  command in a program that has memory leaks at two "
7427 "different locations.  The demonstration uses the following program:"
7428 msgstr ""
7429
7430 #. type: Plain text
7431 #: build/C/man3/mtrace.3:122
7432 #, no-wrap
7433 msgid ""
7434 "$ B<cat t_mtrace.c>\n"
7435 "#include E<lt>mcheck.hE<gt>\n"
7436 "#include E<lt>stdlib.hE<gt>\n"
7437 "#include E<lt>stdio.hE<gt>\n"
7438 msgstr ""
7439 "$ B<cat t_mtrace.c>\n"
7440 "#include E<lt>mcheck.hE<gt>\n"
7441 "#include E<lt>stdlib.hE<gt>\n"
7442 "#include E<lt>stdio.hE<gt>\n"
7443
7444 #. type: Plain text
7445 #: build/C/man3/mtrace.3:127
7446 #, no-wrap
7447 msgid ""
7448 "int\n"
7449 "main(int argc, char *argv[])\n"
7450 "{\n"
7451 "    int j;\n"
7452 msgstr ""
7453 "int\n"
7454 "main(int argc, char *argv[])\n"
7455 "{\n"
7456 "    int j;\n"
7457
7458 #. type: Plain text
7459 #: build/C/man3/mtrace.3:129
7460 #, no-wrap
7461 msgid "    mtrace();\n"
7462 msgstr "    mtrace();\n"
7463
7464 #. type: Plain text
7465 #: build/C/man3/mtrace.3:132
7466 #, no-wrap
7467 msgid ""
7468 "    for (j = 0; j E<lt> 2; j++)\n"
7469 "        malloc(100);            /* Never freed--a memory leak */\n"
7470 msgstr ""
7471 "    for (j = 0; j E<lt> 2; j++)\n"
7472 "        malloc(100);            /* Never freed--a memory leak */\n"
7473
7474 #. type: Plain text
7475 #: build/C/man3/mtrace.3:136
7476 #, no-wrap
7477 msgid ""
7478 "    calloc(16, 16);             /* Never freed--a memory leak */\n"
7479 "    exit(EXIT_SUCCESS);\n"
7480 "}\n"
7481 msgstr ""
7482 "    calloc(16, 16);             /* Never freed--a memory leak */\n"
7483 "    exit(EXIT_SUCCESS);\n"
7484 "}\n"
7485
7486 #. type: Plain text
7487 #: build/C/man3/mtrace.3:142
7488 msgid ""
7489 "When we run the program as follows, we see that B<mtrace>()  diagnosed "
7490 "memory leaks at two different locations in the program:"
7491 msgstr ""
7492
7493 #. type: Plain text
7494 #: build/C/man3/mtrace.3:155
7495 #, no-wrap
7496 msgid ""
7497 "$ B<cc -g t_mtrace.c -o t_mtrace>\n"
7498 "$ B<export MALLOC_TRACE=/tmp/t>\n"
7499 "$ B<./t_mtrace>\n"
7500 "$ B<mtrace ./t_mtrace $MALLOC_TRACE>\n"
7501 "Memory not freed:\n"
7502 "-----------------\n"
7503 "   Address     Size     Caller\n"
7504 "0x084c9378     0x64  at /home/cecilia/t_mtrace.c:12\n"
7505 "0x084c93e0     0x64  at /home/cecilia/t_mtrace.c:12\n"
7506 "0x084c9448    0x100  at /home/cecilia/t_mtrace.c:16\n"
7507 msgstr ""
7508 "$ B<cc -g t_mtrace.c -o t_mtrace>\n"
7509 "$ B<export MALLOC_TRACE=/tmp/t>\n"
7510 "$ B<./t_mtrace>\n"
7511 "$ B<mtrace ./t_mtrace $MALLOC_TRACE>\n"
7512 "Memory not freed:\n"
7513 "-----------------\n"
7514 "   Address     Size     Caller\n"
7515 "0x084c9378     0x64  at /home/cecilia/t_mtrace.c:12\n"
7516 "0x084c93e0     0x64  at /home/cecilia/t_mtrace.c:12\n"
7517 "0x084c9448    0x100  at /home/cecilia/t_mtrace.c:16\n"
7518
7519 #. type: Plain text
7520 #: build/C/man3/mtrace.3:167
7521 msgid ""
7522 "The first two messages about unfreed memory correspond to the two "
7523 "B<malloc>(3)  calls inside the I<for> loop.  The final message corresponds "
7524 "to the call to B<calloc>(3)  (which in turn calls B<malloc>(3))."
7525 msgstr ""
7526
7527 #. type: Plain text
7528 #: build/C/man3/mtrace.3:172
7529 msgid "B<mtrace>(1), B<malloc>(3), B<malloc_hook>(3), B<mcheck>(3)"
7530 msgstr "B<mtrace>(1), B<malloc>(3), B<malloc_hook>(3), B<mcheck>(3)"
7531
7532 #. type: TH
7533 #: build/C/man2/posix_fadvise.2:28
7534 #, no-wrap
7535 msgid "POSIX_FADVISE"
7536 msgstr "POSIX_FADVISE"
7537
7538 #. type: TH
7539 #: build/C/man2/posix_fadvise.2:28
7540 #, no-wrap
7541 msgid "2014-05-03"
7542 msgstr "2014-05-03"
7543
7544 #. type: Plain text
7545 #: build/C/man2/posix_fadvise.2:31
7546 msgid "posix_fadvise - predeclare an access pattern for file data"
7547 msgstr "posix_fadvise - ファイルデータのアクセスパターンをあらかじめ宣言する"
7548
7549 #. type: Plain text
7550 #: build/C/man2/posix_fadvise.2:34 build/C/man3/posix_fallocate.3:31
7551 #, no-wrap
7552 msgid "B<#include E<lt>fcntl.hE<gt>>\n"
7553 msgstr "B<#include E<lt>fcntl.hE<gt>>\n"
7554
7555 #. type: Plain text
7556 #: build/C/man2/posix_fadvise.2:37
7557 #, no-wrap
7558 msgid "B<int posix_fadvise(int >I<fd>B<, off_t >I<offset>B<, off_t >I<len>B<, int >I<advice>B<);>\n"
7559 msgstr "B<int posix_fadvise(int >I<fd>B<, off_t >I<offset>B<, off_t >I<len>B<, int >I<advice>B<);>\n"
7560
7561 #. type: Plain text
7562 #: build/C/man2/posix_fadvise.2:46
7563 msgid "B<posix_fadvise>():"
7564 msgstr "B<posix_fadvise>():"
7565
7566 #. type: Plain text
7567 #: build/C/man2/posix_fadvise.2:48 build/C/man3/posix_fallocate.3:44
7568 msgid "_XOPEN_SOURCE\\ E<gt>=\\ 600 || _POSIX_C_SOURCE\\ E<gt>=\\ 200112L"
7569 msgstr "_XOPEN_SOURCE\\ E<gt>=\\ 600 || _POSIX_C_SOURCE\\ E<gt>=\\ 200112L"
7570
7571 #. type: Plain text
7572 #: build/C/man2/posix_fadvise.2:56
7573 msgid ""
7574 "Programs can use B<posix_fadvise>()  to announce an intention to access file "
7575 "data in a specific pattern in the future, thus allowing the kernel to "
7576 "perform appropriate optimizations."
7577 msgstr ""
7578 "プログラムは、将来特定のパターンでファイルデータに アクセスする意思を伝えるた"
7579 "めに B<posix_fadvise>()  を使うことができる。 これにより、カーネルが適切な最"
7580 "適化を実行することが可能になる。"
7581
7582 #. type: Plain text
7583 #: build/C/man2/posix_fadvise.2:63
7584 msgid ""
7585 "The I<advice> applies to a (not necessarily existent) region starting at "
7586 "I<offset> and extending for I<len> bytes (or until the end of the file if "
7587 "I<len> is 0) within the file referred to by I<fd>.  The I<advice> is not "
7588 "binding; it merely constitutes an expectation on behalf of the application."
7589 msgstr ""
7590 "I<advice> は I<fd> が参照しているファイルの I<offset> から始まる I<len> バ"
7591 "イ\n"
7592 "トの範囲内 (I<len> が 0 の場合はファイルの終りまで) の (必ずしも存在しない)\n"
7593 "領域に適用される。 I<advice> は義務づけではない。 I<advice> は単にアプリ"
7594 "ケー\n"
7595 "ションのために可能性を構成するだけである。"
7596
7597 #. type: Plain text
7598 #: build/C/man2/posix_fadvise.2:65
7599 msgid "Permissible values for I<advice> include:"
7600 msgstr "I<advice> に許される値には、以下のものが含まれる:"
7601
7602 #. type: TP
7603 #: build/C/man2/posix_fadvise.2:65
7604 #, no-wrap
7605 msgid "B<POSIX_FADV_NORMAL>"
7606 msgstr "B<POSIX_FADV_NORMAL>"
7607
7608 #. type: Plain text
7609 #: build/C/man2/posix_fadvise.2:71
7610 msgid ""
7611 "Indicates that the application has no advice to give about its access "
7612 "pattern for the specified data.  If no advice is given for an open file, "
7613 "this is the default assumption."
7614 msgstr ""
7615 "指定されたデータのアクセスパターンを指示するアドバイスを アプリケーションが何"
7616 "も持っていないことを示す。 オープンされたファイルにアドバイスが指定されない場"
7617 "合、 これがデフォルトで仮定される。"
7618
7619 #. type: TP
7620 #: build/C/man2/posix_fadvise.2:71
7621 #, no-wrap
7622 msgid "B<POSIX_FADV_SEQUENTIAL>"
7623 msgstr "B<POSIX_FADV_SEQUENTIAL>"
7624
7625 #. type: Plain text
7626 #: build/C/man2/posix_fadvise.2:75
7627 msgid ""
7628 "The application expects to access the specified data sequentially (with "
7629 "lower offsets read before higher ones)."
7630 msgstr ""
7631 "アプリケーションは指定されたデータがシーケンシャルに (大きなオフセットの前に"
7632 "小さなオフセットのデータを読むように)  アクセスされることを期待する。"
7633
7634 #. type: TP
7635 #: build/C/man2/posix_fadvise.2:75
7636 #, no-wrap
7637 msgid "B<POSIX_FADV_RANDOM>"
7638 msgstr "B<POSIX_FADV_RANDOM>"
7639
7640 #. type: Plain text
7641 #: build/C/man2/posix_fadvise.2:78
7642 msgid "The specified data will be accessed in random order."
7643 msgstr "指定されたデータがランダムな順番でアクセスされる。"
7644
7645 #. type: TP
7646 #: build/C/man2/posix_fadvise.2:78
7647 #, no-wrap
7648 msgid "B<POSIX_FADV_NOREUSE>"
7649 msgstr "B<POSIX_FADV_NOREUSE>"
7650
7651 #. type: Plain text
7652 #: build/C/man2/posix_fadvise.2:81
7653 msgid "The specified data will be accessed only once."
7654 msgstr "指定されたデータは 1 度しかアクセスされない。"
7655
7656 #. type: TP
7657 #: build/C/man2/posix_fadvise.2:81
7658 #, no-wrap
7659 msgid "B<POSIX_FADV_WILLNEED>"
7660 msgstr "B<POSIX_FADV_WILLNEED>"
7661
7662 #. type: Plain text
7663 #: build/C/man2/posix_fadvise.2:84
7664 msgid "The specified data will be accessed in the near future."
7665 msgstr "指定されたデータは近い将来アクセスされる。"
7666
7667 #. type: TP
7668 #: build/C/man2/posix_fadvise.2:84
7669 #, no-wrap
7670 msgid "B<POSIX_FADV_DONTNEED>"
7671 msgstr "B<POSIX_FADV_DONTNEED>"
7672
7673 #. type: Plain text
7674 #: build/C/man2/posix_fadvise.2:87
7675 msgid "The specified data will not be accessed in the near future."
7676 msgstr "指定されたデータは近い将来アクセスされない。"
7677
7678 #. type: Plain text
7679 #: build/C/man2/posix_fadvise.2:90
7680 msgid "On success, zero is returned.  On error, an error number is returned."
7681 msgstr "成功した場合は 0 が返される。 失敗した場合はエラー番号が返される。"
7682
7683 #. type: Plain text
7684 #: build/C/man2/posix_fadvise.2:94
7685 msgid "The I<fd> argument was not a valid file descriptor."
7686 msgstr "I<fd> 引き数が有効なファイルディスクリプタでない。"
7687
7688 #. type: Plain text
7689 #: build/C/man2/posix_fadvise.2:97
7690 msgid "An invalid value was specified for I<advice>."
7691 msgstr "無効な値が I<advice> に指定された。"
7692
7693 #. type: Plain text
7694 #: build/C/man2/posix_fadvise.2:104
7695 msgid ""
7696 "The specified file descriptor refers to a pipe or FIFO.  (Linux actually "
7697 "returns B<EINVAL> in this case.)"
7698 msgstr ""
7699 "指定されたファイルディスクリプタがパイプまたは FIFO を参照している (この場"
7700 "合、Linux は実際には B<EINVAL> を返す)。"
7701
7702 #.  of fadvise64_64()
7703 #. type: Plain text
7704 #: build/C/man2/posix_fadvise.2:112
7705 msgid ""
7706 "Kernel support first appeared in Linux 2.5.60; the underlying system call is "
7707 "called B<fadvise64>().  Library support has been provided since glibc "
7708 "version 2.2, via the wrapper function B<posix_fadvise>()."
7709 msgstr ""
7710 "カーネルによるサポートは Linux 2.5.60 で最初に登場し、\n"
7711 "対応するシステムコールは B<fadvise64>() という名前である。\n"
7712 "ライブラリによるサポートは glibc バージョン 2.2 以降で提供されており、\n"
7713 "ラッパー関数は B<posix_fadvise>() という名前である。"
7714
7715 #. type: Plain text
7716 #: build/C/man2/posix_fadvise.2:121
7717 msgid ""
7718 "POSIX.1-2001.  Note that the type of the I<len> argument was changed from "
7719 "I<size_t> to I<off_t> in POSIX.1-2003 TC1."
7720 msgstr ""
7721 "POSIX.1-2001.  I<len> 引き数の型が POSIX.1-2003 TC1 において I<size_t> から "
7722 "I<off_t> に変更された点に注意すること。"
7723
7724 #. type: Plain text
7725 #: build/C/man2/posix_fadvise.2:127
7726 msgid ""
7727 "Under Linux, B<POSIX_FADV_NORMAL> sets the readahead window to the default "
7728 "size for the backing device; B<POSIX_FADV_SEQUENTIAL> doubles this size, and "
7729 "B<POSIX_FADV_RANDOM> disables file readahead entirely.  These changes affect "
7730 "the entire file, not just the specified region (but other open file handles "
7731 "to the same file are unaffected)."
7732 msgstr ""
7733 "Linux では、B<POSIX_FADV_NORMAL> はバッキングデバイスの デフォルトサイズに先"
7734 "読み (readahead) ウインドウを設定する。 B<POSIX_FADV_SEQUENTIAL> はこのサイズ"
7735 "を 2 倍し、 B<POSIX_FADV_RANDOM> は先読みを全く無効にする。 これらの変更は"
7736 "ファイル全体に影響し、指定された領域のみに影響するわけではない (しかし同じ"
7737 "ファイルに対する他のオープンファイルハンドルは影響を受けない)。"
7738
7739 #. type: Plain text
7740 #: build/C/man2/posix_fadvise.2:134
7741 msgid ""
7742 "B<POSIX_FADV_WILLNEED> initiates a nonblocking read of the specified region "
7743 "into the page cache.  The amount of data read may be decreased by the kernel "
7744 "depending on virtual memory load.  (A few megabytes will usually be fully "
7745 "satisfied, and more is rarely useful.)"
7746 msgstr ""
7747 "B<POSIX_FADV_WILLNEED> は、 ページキャッシュに指定領域のブロックされない読み"
7748 "込みを開始する。 読み込まれるデータの総量は、 仮想メモリの負荷に依ってカーネ"
7749 "ルが減らすかもしれない (数メガバイトであれば通常は全く十分であり、 それより多"
7750 "くてもめったに役に立たない)。"
7751
7752 #. type: Plain text
7753 #: build/C/man2/posix_fadvise.2:138
7754 msgid ""
7755 "In kernels before 2.6.18, B<POSIX_FADV_NOREUSE> had the same semantics as "
7756 "B<POSIX_FADV_WILLNEED>.  This was probably a bug; since kernel 2.6.18, this "
7757 "flag is a no-op."
7758 msgstr ""
7759 "2.6.18 より前のカーネルでは、B<POSIX_FADV_NOREUSE> は B<POSIX_FADV_WILLNEED> "
7760 "と同じ意味であった。 これは多分バグであった。 カーネル 2.6.18 以降では、この"
7761 "フラグは何も行わない。"
7762
7763 #. type: Plain text
7764 #: build/C/man2/posix_fadvise.2:146
7765 msgid ""
7766 "B<POSIX_FADV_DONTNEED> attempts to free cached pages associated with the "
7767 "specified region.  This is useful, for example, while streaming large "
7768 "files.  A program may periodically request the kernel to free cached data "
7769 "that has already been used, so that more useful cached pages are not "
7770 "discarded instead."
7771 msgstr ""
7772 "B<POSIX_FADV_DONTNEED> は指定された領域に関連付けられた キャッシュページを解"
7773 "放しようとする。 例えば、これは大きなファイルをストリーミングするときに役立"
7774 "つ。 プログラムは、使用済みのキャッシュされたデータを解放するように、 定期的"
7775 "にカーネルに要求するかもしれない。 そうすることにより、さらに有効なキャッシュ"
7776 "されたページが、 代わりに破棄されることはない。"
7777
7778 #. type: Plain text
7779 #: build/C/man2/posix_fadvise.2:154
7780 msgid ""
7781 "Pages that have not yet been written out will be unaffected, so if the "
7782 "application wishes to guarantee that pages will be released, it should call "
7783 "B<fsync>(2)  or B<fdatasync>(2)  first."
7784 msgstr ""
7785 "まだ書き出されていないページは影響を受けないので、 そのページの解放が保証され"
7786 "ることをアプリケーションが望んでいるなら、 最初に B<fsync>(2)  または "
7787 "B<fdatasync>(2)  を呼ぶべきである。"
7788
7789 #. type: SS
7790 #: build/C/man2/posix_fadvise.2:154
7791 #, no-wrap
7792 msgid "Architecture-specific variants"
7793 msgstr "アーキテクチャ固有の派生バージョン"
7794
7795 #. type: Plain text
7796 #: build/C/man2/posix_fadvise.2:171
7797 msgid ""
7798 "Some architectures require 64-bit arguments to be aligned in a suitable pair "
7799 "of registers (see B<syscall>(2)  for further detail).  On such "
7800 "architectures, the call signature of B<posix_fadvise>()  shown in the "
7801 "SYNOPSIS would force a register to be wasted as padding between the I<fd> "
7802 "and I<offset> arguments.  Therefore, these architectures define a version of "
7803 "the system call that orders the arguments suitably, but otherwise is "
7804 "otherwise exactly the same as B<posix_fadvise>()."
7805 msgstr ""
7806 "いくつかのアーキテクチャでは、 64 ビットの引き数は適切なレジスタの組に割り当"
7807 "てる必要がある (B<syscall>(2) 参照)。 このようなアーキテクチャでは、 「書式」"
7808 "に書かれている  B<posix_fadvise>() の呼び出しシグネチャーで、 引き数 I<fd> "
7809 "と I<offset> の間のパディング (詰めもの) でレジスタが一つ消費されてしまう。 "
7810 "そのため、 これらのアーキテクチャでは引き数が適切な順序になった別のシステム"
7811 "コールが定義されているが、 それ以外は B<posix_fadvise>() と全く同じである。"
7812
7813 #. type: Plain text
7814 #: build/C/man2/posix_fadvise.2:173
7815 msgid "For example, since Linux 2.6.14, ARM has the following system call:"
7816 msgstr ""
7817 "例えば、 Linux 2.6.14 以降では、 ARM には以下のシステムコールが存在する。"
7818
7819 #. type: Plain text
7820 #: build/C/man2/posix_fadvise.2:178
7821 #, no-wrap
7822 msgid ""
7823 "B<long arm_fadvise64_64(int >I<fd>B<, int >I<advice>B<,>\n"
7824 "B<                      loff_t >I<offset>B<, loff_t >I<len>B<);>\n"
7825 msgstr ""
7826 "B<long arm_fadvise64_64(int >I<fd>B<, int >I<advice>B<,>\n"
7827 "B<                      loff_t >I<offset>B<, loff_t >I<len>B<);>\n"
7828
7829 #. type: Plain text
7830 #: build/C/man2/posix_fadvise.2:186
7831 msgid ""
7832 "These architecture-specific details are generally hidden from applications "
7833 "by the glibc B<posix_fadvise>()  wrapper function, which invokes the "
7834 "appropriate architecture-specific system call."
7835 msgstr ""
7836 "通常、 glibc の B<posix_fadvise>() ラッパー関数により、 これらのアーキテク"
7837 "チャ固有の詳細はアプリケーションには見えない。 glibc のラッパー関数では、適切"
7838 "なアーキテクチャ固有のシステムコールが呼び出される。"
7839
7840 #. type: Plain text
7841 #: build/C/man2/posix_fadvise.2:191
7842 msgid ""
7843 "In kernels before 2.6.6, if I<len> was specified as 0, then this was "
7844 "interpreted literally as \"zero bytes\", rather than as meaning \"all bytes "
7845 "through to the end of the file\"."
7846 msgstr ""
7847 "2.6.6 より前のカーネルでは、 I<len> に 0 が指定された場合、 「ファイルの終り"
7848 "までの全てのバイト」という意味ではなく、 文字通り「0 バイト」として解釈されて"
7849 "いた。"
7850
7851 #.  FIXME . Write a posix_fadvise(3) page.
7852 #. type: Plain text
7853 #: build/C/man2/posix_fadvise.2:197
7854 msgid ""
7855 "B<readahead>(2), B<sync_file_range>(2), B<posix_fallocate>(3), "
7856 "B<posix_madvise>(3)"
7857 msgstr ""
7858 "B<readahead>(2), B<sync_file_range>(2), B<posix_fallocate>(3),\n"
7859 "B<posix_madvise>(3)"
7860
7861 #. type: TH
7862 #: build/C/man3/posix_fallocate.3:25
7863 #, no-wrap
7864 msgid "POSIX_FALLOCATE"
7865 msgstr "POSIX_FALLOCATE"
7866
7867 #. type: TH
7868 #: build/C/man3/posix_fallocate.3:25
7869 #, no-wrap
7870 msgid "2013-02-12"
7871 msgstr "2013-02-12"
7872
7873 #. type: Plain text
7874 #: build/C/man3/posix_fallocate.3:28
7875 msgid "posix_fallocate - allocate file space"
7876 msgstr "posix_fallocate - ファイルのスペースを確保する"
7877
7878 #. type: Plain text
7879 #: build/C/man3/posix_fallocate.3:33
7880 #, no-wrap
7881 msgid "B<int posix_fallocate(int >I<fd>B<, off_t >I<offset>B<, off_t >I<len>B<);>\n"
7882 msgstr "B<int posix_fallocate(int >I<fd>B<, off_t >I<offset>B<, off_t >I<len>B<);>\n"
7883
7884 #. type: Plain text
7885 #: build/C/man3/posix_fallocate.3:42
7886 msgid "B<posix_fallocate>():"
7887 msgstr "B<posix_fallocate>():"
7888
7889 #. type: Plain text
7890 #: build/C/man3/posix_fallocate.3:61
7891 msgid ""
7892 "The function B<posix_fallocate>()  ensures that disk space is allocated for "
7893 "the file referred to by the descriptor I<fd> for the bytes in the range "
7894 "starting at I<offset> and continuing for I<len> bytes.  After a successful "
7895 "call to B<posix_fallocate>(), subsequent writes to bytes in the specified "
7896 "range are guaranteed not to fail because of lack of disk space."
7897 msgstr ""
7898 "関数 B<posix_fallocate>()  は、ディスクリプタ I<fd> で参照されるファイルに対"
7899 "して、ディスクスペースを確実に確保する。 ディスクスペースは I<offset> から始"
7900 "まる I<len> バイトの範囲のバイトである。 B<posix_fallocate>()  の呼び出しが成"
7901 "功した後、指定された範囲のバイトに対する書き込みは、 ディスクスペースの不足で"
7902 "失敗しないことが保証される。"
7903
7904 #. type: Plain text
7905 #: build/C/man3/posix_fallocate.3:66
7906 msgid ""
7907 "If the size of the file is less than I<offset>+I<len>, then the file is "
7908 "increased to this size; otherwise the file size is left unchanged."
7909 msgstr ""
7910 "ファイルのサイズが I<offset>+I<len> より小さい場合、ファイルはこのサイズにな"
7911 "るように拡大される。 それ以外の場合、ファイルサイズは変わらない。"
7912
7913 #. type: Plain text
7914 #: build/C/man3/posix_fallocate.3:72
7915 msgid ""
7916 "B<posix_fallocate>()  returns zero on success, or an error number on "
7917 "failure.  Note that I<errno> is not set."
7918 msgstr ""
7919 "B<posix_fallocate>()  は成功した場合、0 を返す。 失敗した場合、エラー番号を返"
7920 "す。 I<errno> が設定されない点に注意すること。"
7921
7922 #. type: Plain text
7923 #: build/C/man3/posix_fallocate.3:81
7924 msgid "I<offset+len> exceeds the maximum file size."
7925 msgstr "I<offset+len> が最大ファイルサイズを超えている。"
7926
7927 #. type: Plain text
7928 #: build/C/man3/posix_fallocate.3:91
7929 msgid "I<fd> does not refer to a regular file."
7930 msgstr "I<fd> が通常のファイルとして参照されていない。"
7931
7932 #. type: Plain text
7933 #: build/C/man3/posix_fallocate.3:100
7934 msgid "I<fd> refers to a pipe."
7935 msgstr "I<fd> がパイプを参照している。"
7936
7937 #. type: Plain text
7938 #: build/C/man3/posix_fallocate.3:103
7939 msgid "B<posix_fallocate>()  is available since glibc 2.1.94."
7940 msgstr "B<posix_fallocate>()  は glibc 2.1.94 以降で利用可能である。"
7941
7942 #. type: Plain text
7943 #: build/C/man3/posix_fallocate.3:128
7944 msgid ""
7945 "POSIX.1-2008 says that an implementation I<shall> give the B<EINVAL> error "
7946 "if I<len> was 0, or I<offset> was less than 0.  POSIX.1-2001 says that an "
7947 "implementation I<shall> give the B<EINVAL> error if I<len> is less than 0, "
7948 "or I<offset> was less than 0, and I<may> give the error if I<len> equals "
7949 "zero."
7950 msgstr ""
7951 "POSIX.1-2008 では、 I<len> が 0 の場合、もしくは I<offset> が 0 未満の場合、 "
7952 "B<EINVAL> エラーを返すものとされている。 POSIX.1-2001 では、 I<len> が 0 未満"
7953 "の場合、もしくは I<offset> が 0 未満の場合、 B<EINVAL> エラーを返すものとされ"
7954 "ている。また、 I<len> が 0 の場合、 B<EINVAL> エラーを返してもよいとされてい"
7955 "る。"
7956
7957 #. type: Plain text
7958 #: build/C/man3/posix_fallocate.3:133
7959 msgid "B<fallocate>(1), B<fallocate>(2), B<lseek>(2), B<posix_fadvise>(2)"
7960 msgstr "B<fallocate>(1), B<fallocate>(2), B<lseek>(2), B<posix_fadvise>(2)"
7961
7962 #. type: TH
7963 #: build/C/man3/posix_memalign.3:29
7964 #, no-wrap
7965 msgid "POSIX_MEMALIGN"
7966 msgstr "POSIX_MEMALIGN"
7967
7968 #. type: TH
7969 #: build/C/man3/posix_memalign.3:29
7970 #, no-wrap
7971 msgid "2013-09-02"
7972 msgstr "2013-09-02"
7973
7974 #. type: Plain text
7975 #: build/C/man3/posix_memalign.3:32
7976 msgid ""
7977 "posix_memalign, aligned_alloc, memalign, valloc, pvalloc - allocate aligned "
7978 "memory"
7979 msgstr ""
7980 "posix_memalign, aligned_alloc, memalign, valloc, pvalloc - アラインメント\n"
7981 "されたメモリの割り当てを行う"
7982
7983 #. type: Plain text
7984 #: build/C/man3/posix_memalign.3:39
7985 #, no-wrap
7986 msgid ""
7987 "B<int posix_memalign(void **>I<memptr>B<, size_t >I<alignment>B<, size_t >I<size>B<);>\n"
7988 "B<void *aligned_alloc(size_t >I<alignment>B<, size_t >I<size>B<);>\n"
7989 "B<void *valloc(size_t >I<size>B<);>\n"
7990 msgstr ""
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
7995 #. type: Plain text
7996 #: build/C/man3/posix_memalign.3:44
7997 #, no-wrap
7998 msgid ""
7999 "B<void *memalign(size_t >I<alignment>B<, size_t >I<size>B<);>\n"
8000 "B<void *pvalloc(size_t >I<size>B<);>\n"
8001 msgstr ""
8002 "B<void *memalign(size_t >I<alignment>B<, size_t >I<size>B<);>\n"
8003 "B<void *pvalloc(size_t >I<size>B<);>\n"
8004
8005 #. type: Plain text
8006 #: build/C/man3/posix_memalign.3:54
8007 msgid ""
8008 "B<posix_memalign>(): _POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ "
8009 "E<gt>=\\ 600"
8010 msgstr ""
8011 "B<posix_memalign>(): _POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ "
8012 "E<gt>=\\ 600"
8013
8014 #. type: Plain text
8015 #: build/C/man3/posix_memalign.3:57
8016 msgid "B<aligned_alloc>(): _ISOC11_SOURCE"
8017 msgstr "B<aligned_alloc>(): _ISOC11_SOURCE"
8018
8019 #. type: Plain text
8020 #: build/C/man3/posix_memalign.3:59
8021 msgid "B<valloc>():"
8022 msgstr "B<valloc>():"
8023
8024 #. type: TP
8025 #: build/C/man3/posix_memalign.3:62
8026 #, no-wrap
8027 msgid "Since glibc 2.12:"
8028 msgstr "glibc 2.12 以降:"
8029
8030 #. type: Plain text
8031 #: build/C/man3/posix_memalign.3:69
8032 #, no-wrap
8033 msgid ""
8034 "_BSD_SOURCE ||\n"
8035 "    (_XOPEN_SOURCE\\ E<gt>=\\ 500 ||\n"
8036 "        _XOPEN_SOURCE\\ &&\\ _XOPEN_SOURCE_EXTENDED) &&\n"
8037 "    !(_POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ E<gt>=\\ 600)\n"
8038 msgstr ""
8039 "_BSD_SOURCE ||\n"
8040 "    (_XOPEN_SOURCE\\ E<gt>=\\ 500 ||\n"
8041 "        _XOPEN_SOURCE\\ &&\\ _XOPEN_SOURCE_EXTENDED) &&\n"
8042 "    !(_POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ E<gt>=\\ 600)\n"
8043
8044 #. type: TP
8045 #: build/C/man3/posix_memalign.3:71
8046 #, no-wrap
8047 msgid "Before glibc 2.12:"
8048 msgstr "glibc 2.12 より前:"
8049
8050 #. type: Plain text
8051 #: build/C/man3/posix_memalign.3:75
8052 msgid ""
8053 "_BSD_SOURCE || _XOPEN_SOURCE\\ E<gt>=\\ 500 || _XOPEN_SOURCE\\ &&\\ "
8054 "_XOPEN_SOURCE_EXTENDED"
8055 msgstr ""
8056 "_BSD_SOURCE || _XOPEN_SOURCE\\ E<gt>=\\ 500 || _XOPEN_SOURCE\\ &&\\ "
8057 "_XOPEN_SOURCE_EXTENDED"
8058
8059 #. type: Plain text
8060 #: build/C/man3/posix_memalign.3:82
8061 msgid ""
8062 "(The (nonstandard) header file I<E<lt>malloc.hE<gt>> also exposes the "
8063 "declaration of B<valloc>(); no feature test macros are required.)"
8064 msgstr ""
8065 "((非標準の) ヘッダファイル I<E<lt>malloc.hE<gt>> も\n"
8066 "B<valloc>() の宣言も公開する。機能検査マクロは不要である。"
8067
8068 #.  glibc does this:
8069 #. type: Plain text
8070 #: build/C/man3/posix_memalign.3:104
8071 msgid ""
8072 "The function B<posix_memalign>()  allocates I<size> bytes and places the "
8073 "address of the allocated memory in I<*memptr>.  The address of the allocated "
8074 "memory will be a multiple of I<alignment>, which must be a power of two and "
8075 "a multiple of I<sizeof(void\\ *)>.  If I<size> is 0, then the value placed "
8076 "in I<*memptr> is either NULL, or a unique pointer value that can later be "
8077 "successfully passed to B<free>(3)."
8078 msgstr ""
8079 "関数 B<posix_memalign>()  は、 I<size> バイトのメモリを割り当て、割り当てられ"
8080 "たメモリのアドレスを I<*memptr> に設定する。 割り当てられたメモリのアドレス"
8081 "は I<alignment> の倍数になっているはずである。 I<alignment> は 2 のべき乗で、"
8082 "かつ I<sizeof(void\\ *)> の倍数でなければならない。 I<size> が 0 の場合、 "
8083 "I<*memptr> には NULL か一意なポインタ値が書かれる。 このポインタ値は、後で "
8084 "B<free>(3)  に問題なく渡すことができる。"
8085
8086 #.  The behavior of memalign() for size==0 is as for posix_memalign()
8087 #.  but no standards govern this.
8088 #. type: Plain text
8089 #: build/C/man3/posix_memalign.3:115
8090 msgid ""
8091 "The obsolete function B<memalign>()  allocates I<size> bytes and returns a "
8092 "pointer to the allocated memory.  The memory address will be a multiple of "
8093 "I<alignment>, which must be a power of two."
8094 msgstr ""
8095 "廃止された関数である B<memalign>() は、 I<size> バイトのメモリを割り当て、\n"
8096 "割り当てられたメモリへのポインタを返す。 メモリのアドレスは I<alignment> \n"
8097 "の倍数になっているはずである。 I<alignment> は 2 のべき乗でなければならない。"
8098
8099 #. type: Plain text
8100 #: build/C/man3/posix_memalign.3:124
8101 msgid ""
8102 "The function B<aligned_alloc>()  is the same as B<memalign>(), except for "
8103 "the added restriction that I<size> should be a multiple of I<alignment>."
8104 msgstr ""
8105 "関数 B<aligned_alloc>() は B<memalign>() と同じだが、I<size> が "
8106 "I<alignment>\n"
8107 "の倍数でなければならないという追加の制限がある点が異なる。"
8108
8109 #. type: Plain text
8110 #: build/C/man3/posix_memalign.3:133
8111 msgid ""
8112 "The obsolete function B<valloc>()  allocates I<size> bytes and returns a "
8113 "pointer to the allocated memory.  The memory address will be a multiple of "
8114 "the page size.  It is equivalent to I<memalign(sysconf(_SC_PAGESIZE),size)>."
8115 msgstr ""
8116 "廃止された関数である B<valloc>()  は I<size> バイトのメモリを割り当て、割り当"
8117 "てられたメモリへのポインタを返す。 メモリのアドレスはページサイズの倍数になっ"
8118 "ているはずである。 これは I<memalign(sysconf(_SC_PAGESIZE),size)> と等価であ"
8119 "る。"
8120
8121 #. type: Plain text
8122 #: build/C/man3/posix_memalign.3:140
8123 msgid ""
8124 "The obsolete function B<pvalloc>()  is similar to B<valloc>(), but rounds "
8125 "the size of the allocation up to the next multiple of the system page size."
8126 msgstr ""
8127 "廃止された関数 B<pvalloc>() は B<valloc>() と同様だが、\n"
8128 "割り当てられるサイズがシステムのページサイズの倍数に切り上げられる。"
8129
8130 #. type: Plain text
8131 #: build/C/man3/posix_memalign.3:142
8132 msgid "For all of these functions, the memory is not zeroed."
8133 msgstr "これらの関数はいずれもメモリのゼロクリアを行わない。"
8134
8135 #. type: Plain text
8136 #: build/C/man3/posix_memalign.3:149
8137 msgid ""
8138 "B<aligned_alloc>(), B<memalign>(), B<valloc>(), and B<pvalloc>()  return a "
8139 "pointer to the allocated memory, or NULL if the request fails."
8140 msgstr ""
8141 "B<aligned_alloc>(), B<memalign>(), B<valloc>(), B<pvalloc>() は割り当てられ"
8142 "た\n"
8143 "メモリへのポインタを返す。 割り当てに失敗した場合は NULL を返す。"
8144
8145 #. type: Plain text
8146 #: build/C/man3/posix_memalign.3:157
8147 msgid ""
8148 "B<posix_memalign>()  returns zero on success, or one of the error values "
8149 "listed in the next section on failure.  The value of I<errno> is "
8150 "indeterminate after a call to B<posix_memalign>()."
8151 msgstr ""
8152 "B<posix_memalign>()  は成功した場合は 0 を返し、 失敗した場合は次のセクション"
8153 "に記載されたエラー値のいずれかを返す。 B<posix_memalign>() の呼び出し後は "
8154 "I<errno> の値は不定である。"
8155
8156 #. type: Plain text
8157 #: build/C/man3/posix_memalign.3:164
8158 msgid ""
8159 "The I<alignment> argument was not a power of two, or was not a multiple of "
8160 "I<sizeof(void\\ *)>."
8161 msgstr ""
8162 "I<alignment> 引き数が 2 のべき乗でなかったか、 I<sizeof(void\\ *)> の倍数でな"
8163 "かった。"
8164
8165 #. type: Plain text
8166 #: build/C/man3/posix_memalign.3:167
8167 msgid "There was insufficient memory to fulfill the allocation request."
8168 msgstr "割り当て要求を満たすのに十分なメモリがなかった。"
8169
8170 #. type: Plain text
8171 #: build/C/man3/posix_memalign.3:174
8172 msgid ""
8173 "The functions B<memalign>(), B<valloc>(), and B<pvalloc>()  have been "
8174 "available in all Linux libc libraries."
8175 msgstr ""
8176 "関数 B<memalign>(), B<valloc>(), B<pvalloc>() は\n"
8177 "すべての Linux libc ライブラリで使用可能である。"
8178
8179 #. type: Plain text
8180 #: build/C/man3/posix_memalign.3:178
8181 msgid "The function B<aligned_alloc>()  was added to glibc in version 2.16."
8182 msgstr "関数 B<aligned_alloc>() は glibc バージョン 2.16 で追加された。"
8183
8184 #. type: Plain text
8185 #: build/C/man3/posix_memalign.3:182
8186 msgid "The function B<posix_memalign>()  is available since glibc 2.1.91."
8187 msgstr "関数 B<posix_fallocate>() は glibc 2.1.91 以降で利用可能である。"
8188
8189 #. type: Plain text
8190 #: build/C/man3/posix_memalign.3:189
8191 msgid ""
8192 "The function B<valloc>()  appeared in 3.0BSD.  It is documented as being "
8193 "obsolete in 4.3BSD, and as legacy in SUSv2.  It does not appear in "
8194 "POSIX.1-2001."
8195 msgstr ""
8196 "関数 B<valloc>() は 3.0BSD で登場した。4.3BSD では廃止されたと記載されてお"
8197 "り、\n"
8198 "SUSv2 では過去の名残だと記載されている。 POSIX.1-2001 には存在しない。"
8199
8200 #. type: Plain text
8201 #: build/C/man3/posix_memalign.3:193
8202 msgid "The function B<pvalloc>()  is a GNU extension."
8203 msgstr "関数 B<pvalloc>() は GNU による拡張である。"
8204
8205 #. type: Plain text
8206 #: build/C/man3/posix_memalign.3:197
8207 msgid "The function B<memalign>()  appears in SunOS 4.1.3 but not in 4.4BSD."
8208 msgstr "関数 B<memalign>() は SunOS 4.1.3 で登場したが、4.4BSD にはない。"
8209
8210 #. type: Plain text
8211 #: build/C/man3/posix_memalign.3:201
8212 msgid "The function B<posix_memalign>()  comes from POSIX.1d."
8213 msgstr "関数 B<posix_memalign>() は POSIX.1d に由来する。"
8214
8215 #. type: Plain text
8216 #: build/C/man3/posix_memalign.3:206
8217 msgid "The function B<aligned_alloc>()  is specified in the C11 standard."
8218 msgstr "関数 I<aligned_alloc>() は C11 標準で規定されている。"
8219
8220 #. type: SS
8221 #: build/C/man3/posix_memalign.3:206
8222 #, no-wrap
8223 msgid "Headers"
8224 msgstr "ヘッダ"
8225
8226 #. type: Plain text
8227 #: build/C/man3/posix_memalign.3:210
8228 msgid ""
8229 "Everybody agrees that B<posix_memalign>()  is declared in I<E<lt>stdlib."
8230 "hE<gt>>."
8231 msgstr ""
8232 "B<posix_memalign>()  の宣言を I<E<lt>stdlib.hE<gt>> で行うことに関しては、 皆"
8233 "の意見が一致している。"
8234
8235 #. type: Plain text
8236 #: build/C/man3/posix_memalign.3:214
8237 msgid ""
8238 "On some systems B<memalign>()  is declared in I<E<lt>stdlib.hE<gt>> instead "
8239 "of I<E<lt>malloc.hE<gt>>."
8240 msgstr ""
8241 "いくつかのシステムでは、 B<memalign>()  は I<E<lt>malloc.hE<gt>> ではなく "
8242 "I<E<lt>stdlib.hE<gt>> で宣言されている。"
8243
8244 #. type: Plain text
8245 #: build/C/man3/posix_memalign.3:221
8246 msgid ""
8247 "According to SUSv2, B<valloc>()  is declared in I<E<lt>stdlib.hE<gt>>.  "
8248 "Libc4,5 and glibc declare it in I<E<lt>malloc.hE<gt>>, and also in "
8249 "I<E<lt>stdlib.hE<gt>> if suitable feature test macros are defined (see "
8250 "above)."
8251 msgstr ""
8252 "SUSv2 によると、 B<valloc>() は I<E<lt>stdlib.hE<gt>> で宣言される。 "
8253 "libc4,5\n"
8254 "や glibc では I<E<lt>malloc.hE<gt>> で宣言されており、 さらに適切な機能検査\n"
8255 "マクロが定義された場合には I<E<lt>stdlib.hE<gt>> でも宣言される(上記を参照)。"
8256
8257 #. type: Plain text
8258 #: build/C/man3/posix_memalign.3:230
8259 msgid ""
8260 "On many systems there are alignment restrictions, for example, on buffers "
8261 "used for direct block device I/O.  POSIX specifies the I<pathconf(path,"
8262 "_PC_REC_XFER_ALIGN)> call that tells what alignment is needed.  Now one can "
8263 "use B<posix_memalign>()  to satisfy this requirement."
8264 msgstr ""
8265 "多くのシステムでは、アラインメントに関して制限がある。例えば、 ブロックデバイ"
8266 "スに対するダイレクト I/O に使用するバッファには アラインメントに関する制限が"
8267 "ある。 POSIX では、どんなアラインメントが必要かを知るために I<pathconf(path,"
8268 "_PC_REC_XFER_ALIGN)> コールを規定している。ここで B<posix_memalign>()  を使う"
8269 "と、この必要条件を満たすことができる。"
8270
8271 #. type: Plain text
8272 #: build/C/man3/posix_memalign.3:239
8273 msgid ""
8274 "B<posix_memalign>()  verifies that I<alignment> matches the requirements "
8275 "detailed above.  B<memalign>()  may not check that the I<alignment> argument "
8276 "is correct."
8277 msgstr ""
8278 "B<posix_memalign>() は I<alignment> が上で詳細に述べた必要条件を満たすか\n"
8279 "どうかを確かめる。 B<memalign>() は I<alignment> 引き数が正しいかどうかの\n"
8280 "確認を行わないかもしれない。"
8281
8282 #.  Other systems allow passing the result of
8283 #.  .IR valloc ()
8284 #.  to
8285 #.  .IR free (3),
8286 #.  but not to
8287 #.  .IR realloc (3).
8288 #. type: Plain text
8289 #: build/C/man3/posix_memalign.3:267
8290 msgid ""
8291 "POSIX requires that memory obtained from B<posix_memalign>()  can be freed "
8292 "using B<free>(3).  Some systems provide no way to reclaim memory allocated "
8293 "with B<memalign>()  or B<valloc>()  (because one can pass to B<free>(3)  "
8294 "only a pointer obtained from B<malloc>(3), while, for example, "
8295 "B<memalign>()  would call B<malloc>(3)  and then align the obtained value).  "
8296 "The glibc implementation allows memory obtained from any of these functions "
8297 "to be reclaimed with B<free>(3)."
8298 msgstr ""
8299 "POSIX では B<posix_memalign>() によって獲得したメモリは B<free>(3) を\n"
8300 "使って解放することができる必要がある。 いくつかのシステムでは\n"
8301 "B<memalign>() やB<valloc>() で割り当てられたメモリを再利用する手段が\n"
8302 "提供されていない(なぜなら B<free>(3) に渡すことができるのは\n"
8303 "B<malloc>(3) から受け取ったポインタだけだが、例えば B<memalign>() は\n"
8304 "B<malloc>(3) を呼び出し、得た値をアラインメントしてしまうからである)。\n"
8305 "glibc の実装では、 ここに述べた関数のいずれで獲得したメモリも\n"
8306 "B<free>(3) で再利用することができる。"
8307
8308 #. type: Plain text
8309 #: build/C/man3/posix_memalign.3:272
8310 msgid ""
8311 "The glibc B<malloc>(3)  always returns 8-byte aligned memory addresses, so "
8312 "these functions are needed only if you require larger alignment values."
8313 msgstr ""
8314 "glibc の B<malloc>(3) は常に 8 バイトにアラインメントされたメモリアドレスを\n"
8315 "返すので、ここで述べた関数が必要になるのは 8 バイトよりも大きなアラインメン"
8316 "ト\n"
8317 "が必要な場合だけである。"
8318
8319 #. type: Plain text
8320 #: build/C/man3/posix_memalign.3:277
8321 msgid "B<brk>(2), B<getpagesize>(2), B<free>(3), B<malloc>(3)"
8322 msgstr "B<brk>(2), B<getpagesize>(2), B<free>(3), B<malloc>(3)"
8323
8324 #. type: TH
8325 #: build/C/man2/readahead.2:28
8326 #, no-wrap
8327 msgid "READAHEAD"
8328 msgstr "READAHEAD"
8329
8330 #. type: TH
8331 #: build/C/man2/readahead.2:28
8332 #, no-wrap
8333 msgid "2014-03-15"
8334 msgstr "2014-03-15"
8335
8336 #. type: Plain text
8337 #: build/C/man2/readahead.2:31
8338 msgid "readahead - initiate file readahead into page cache"
8339 msgstr "readahead - 前もってファイルをページ・キャッシュに読み込む"
8340
8341 #. type: Plain text
8342 #: build/C/man2/readahead.2:37
8343 #, no-wrap
8344 msgid "B<ssize_t readahead(int >I<fd>B<, off64_t >I<offset>B<, size_t >I<count>B<);>\n"
8345 msgstr "B<ssize_t readahead(int >I<fd>B<, off64_t >I<offset>B<, size_t >I<count>B<);>\n"
8346
8347 #. type: Plain text
8348 #: build/C/man2/readahead.2:44
8349 msgid ""
8350 "B<readahead>()  initiates readahead on a file so that subsequent reads from "
8351 "that file will be satisfied from the cache, and not block on disk I/O "
8352 "(assuming the readahead was initiated early enough and that other activity "
8353 "on the system did not in the meantime flush pages from the cache)."
8354 msgstr ""
8355 "B<readahead>() はファイルの先読みを行い、そのファイルに対する後の読み込みが"
8356 "キャッシュから行われ、ディスク I/O で停止しないようにする (この条件を満たせる"
8357 "のは、先読みは十分早く行われ、システムの他の動作によりその後にキャッシュから"
8358 "ページがフラッシュされない場合である)。"
8359
8360 #. type: Plain text
8361 #: build/C/man2/readahead.2:66
8362 msgid ""
8363 "The I<fd> argument is a file descriptor identifying the file which is to be "
8364 "read.  The I<offset> argument specifies the starting point from which data "
8365 "is to be read and I<count> specifies the number of bytes to be read.  I/O is "
8366 "performed in whole pages, so that I<offset> is effectively rounded down to a "
8367 "page boundary and bytes are read up to the next page boundary greater than "
8368 "or equal to I<(offset+count)>.  B<readahead>()  does not read beyond the end "
8369 "of the file.  The current file offset of the open file referred to by I<fd> "
8370 "is left unchanged."
8371 msgstr ""
8372 "I<fd> 引き数は読み込みを行うファイルを識別するファイル・ディスクリプタであ"
8373 "る。 I<offset> 引き数はデータの読み込み開始位置を指定し、 I<count> は読み込む"
8374 "データのバイト数を指定する。 ディスク I/O はページ単位で実行されるので、 実際"
8375 "には I<offset> はページ境界に切り下げられ、読み込みバイト数は I<(offset"
8376 "+count)> より小さくない次のページ境界まで切り上げられる。 B<readahead>()  は"
8377 "ファイルの末尾を越えた範囲まで読み出しを行うことはない。 I<fd> で参照された"
8378 "オープン済のファイルのファイルオフセットの現在値は 変更されない。"
8379
8380 #. type: Plain text
8381 #: build/C/man2/readahead.2:72
8382 msgid ""
8383 "On success, B<readahead>()  returns 0; on failure, -1 is returned, with "
8384 "I<errno> set to indicate the cause of the error."
8385 msgstr ""
8386 "B<readahead>()  は成功すると 0 を返す。失敗した場合 -1 を返し、 I<errno> にエ"
8387 "ラーの原因を示す値を設定する。"
8388
8389 #. type: Plain text
8390 #: build/C/man2/readahead.2:77
8391 msgid "I<fd> is not a valid file descriptor or is not open for reading."
8392 msgstr ""
8393 "I<fd> が有効なファイル・ディスクリプタでない、または 読み込み用にオープンされ"
8394 "ていない。"
8395
8396 #. type: Plain text
8397 #: build/C/man2/readahead.2:83
8398 msgid ""
8399 "I<fd> does not refer to a file type to which B<readahead>()  can be applied."
8400 msgstr ""
8401 "I<fd> が参照しているファイルが、 B<readahead>()  を行うことができないタイプの"
8402 "ファイルであった。"
8403
8404 #. type: Plain text
8405 #: build/C/man2/readahead.2:88
8406 msgid ""
8407 "The B<readahead>()  system call appeared in Linux 2.4.13; glibc support has "
8408 "been provided since version 2.3."
8409 msgstr ""
8410 "B<readahead>()  システムコールは Linux 2.4.13 で登場した。 glibc でのサポート"
8411 "は glibc バージョン 2.3 以降で行われている。"
8412
8413 #. type: Plain text
8414 #: build/C/man2/readahead.2:93
8415 msgid ""
8416 "The B<readahead>()  system call is Linux-specific, and its use should be "
8417 "avoided in portable applications."
8418 msgstr ""
8419 "B<readahead>()  システムコールは Linux 固有であり、移植を考慮したプログラムで"
8420 "は 使用を避けるべきである。"
8421
8422 #. type: Plain text
8423 #: build/C/man2/readahead.2:98
8424 msgid ""
8425 "On some 32-bit architectures, the calling signature for this system call "
8426 "differs, for the reasons described in B<syscall>(2)."
8427 msgstr ""
8428 "いくつかの 32 ビットアーキテクチャでは、このシステムコールの呼び出しシグネ"
8429 "チャーが違っている。 理由は B<syscall>(2) で説明されている。"
8430
8431 #. type: Plain text
8432 #: build/C/man2/readahead.2:107
8433 msgid ""
8434 "B<readahead>()  attempts to schedule the reads in the background and return "
8435 "immediately.  However, it may block while it reads the filesystem metadata "
8436 "needed to locate the requested blocks.  This occurs frequently with ext[234] "
8437 "on large files using indirect blocks instead of extents, giving the "
8438 "appearance that the call blocks until the requested data has been read."
8439 msgstr ""
8440 "B<readahead>() は読み込みをバックグラウンドで行うようにスケジューリングを行"
8441 "い、すぐに返る。 しかしながら、要求されたブロックの位置を知るために必要なファ"
8442 "イルシステムのメタデータを読み込む間は B<readahead>() は停止することがある。 "
8443 "これは ext[234] で大きなファイルをエクステントではなく間接ブロックを使う場合"
8444 "にしばしば発生し、 要求したデータが読み込まれるまで呼び出しが停止しているよう"
8445 "に見える。"
8446
8447 #. type: Plain text
8448 #: build/C/man2/readahead.2:113
8449 msgid "B<lseek>(2), B<madvise>(2), B<mmap>(2), B<posix_fadvise>(2), B<read>(2)"
8450 msgstr ""
8451 "B<lseek>(2), B<madvise>(2), B<mmap>(2), B<posix_fadvise>(2), B<read>(2)"
8452
8453 #. type: TH
8454 #: build/C/man2/remap_file_pages.2:28
8455 #, no-wrap
8456 msgid "REMAP_FILE_PAGES"
8457 msgstr "REMAP_FILE_PAGES"
8458
8459 #. type: Plain text
8460 #: build/C/man2/remap_file_pages.2:31
8461 msgid "remap_file_pages - create a nonlinear file mapping"
8462 msgstr "remap_file_pages - 非線形ファイルマッピングを作成する。"
8463
8464 #. type: Plain text
8465 #: build/C/man2/remap_file_pages.2:35
8466 #, no-wrap
8467 msgid ""
8468 "B<#define _GNU_SOURCE>         /* See feature_test_macros(7) */\n"
8469 "B<#include E<lt>sys/mman.hE<gt>>\n"
8470 msgstr ""
8471 "B<#define _GNU_SOURCE>         /* feature_test_macros(7) 参照 */\n"
8472 "B<#include E<lt>sys/mman.hE<gt>>\n"
8473
8474 #. type: Plain text
8475 #: build/C/man2/remap_file_pages.2:38
8476 #, fuzzy, no-wrap
8477 #| msgid ""
8478 #| "B<int remap_file_pages(void *>I<addr>B<, size_t >I<size>B<, int >I<prot>B<,>\n"
8479 #| "B<                     ssize_t >I<pgoff>B<, int >I<flags>B<);>\n"
8480 msgid ""
8481 "B<int remap_file_pages(void *>I<addr>B<, size_t >I<size>B<, int >I<prot>B<,>\n"
8482 "B<                     size_t >I<pgoff>B<, int >I<flags>B<);>\n"
8483 msgstr ""
8484 "B<int remap_file_pages(void *>I<addr>B<, size_t >I<size>B<, int >I<prot>B<,>\n"
8485 "B<                     ssize_t >I<pgoff>B<, int >I<flags>B<);>\n"
8486
8487 #. type: Plain text
8488 #: build/C/man2/remap_file_pages.2:51
8489 msgid ""
8490 "The B<remap_file_pages>()  system call is used to create a nonlinear "
8491 "mapping, that is, a mapping in which the pages of the file are mapped into a "
8492 "nonsequential order in memory.  The advantage of using "
8493 "B<remap_file_pages>()  over using repeated calls to B<mmap>(2)  is that the "
8494 "former approach does not require the kernel to create additional VMA "
8495 "(Virtual Memory Area) data structures."
8496 msgstr ""
8497 "B<remap_file_pages>()  システムコールは非線形なマッピング、 つまりファイルの"
8498 "ページがメモリ上で連続しない順番でマップされる マッピングを作成するために使わ"
8499 "れる。 B<remap_file_pages>()  を使う方が B<mmap>(2)  を繰り返して使うより優れ"
8500 "ている点は、 前者の方法ではカーネルが VMA (Virtual Memory Area, 仮想メモリ領"
8501 "域)  データ構造体を追加で作成する必要がないことである。"
8502
8503 #. type: Plain text
8504 #: build/C/man2/remap_file_pages.2:53
8505 msgid "To create a nonlinear mapping we perform the following steps:"
8506 msgstr "非線形マッピングを作成するためには、 以下のようなステップを実行する:"
8507
8508 #. type: TP
8509 #: build/C/man2/remap_file_pages.2:53
8510 #, no-wrap
8511 msgid "1."
8512 msgstr "1."
8513
8514 #. type: Plain text
8515 #: build/C/man2/remap_file_pages.2:61
8516 msgid ""
8517 "Use B<mmap>(2)  to create a mapping (which is initially linear).  This "
8518 "mapping must be created with the B<MAP_SHARED> flag."
8519 msgstr ""
8520 "B<mmap>(2)  を使い、マッピングを作成する (このマッピングは最初は線形であ"
8521 "る)。 このマッピングは B<MAP_SHARED> フラグを指定して作成されなければならな"
8522 "い。"
8523
8524 #. type: TP
8525 #: build/C/man2/remap_file_pages.2:61
8526 #, no-wrap
8527 msgid "2."
8528 msgstr "2."
8529
8530 #. type: Plain text
8531 #: build/C/man2/remap_file_pages.2:69
8532 msgid ""
8533 "Use one or more calls to B<remap_file_pages>()  to rearrange the "
8534 "correspondence between the pages of the mapping and the pages of the file.  "
8535 "It is possible to map the same page of a file into multiple locations within "
8536 "the mapped region."
8537 msgstr ""
8538 "B<remap_file_pages>()  を 1 回以上呼び出して、 マッピングのページとファイルの"
8539 "ページの対応関係を再構成する。 ファイルの同じページをマッピング領域の複数の場"
8540 "所に マップすることが可能である。"
8541
8542 #. type: Plain text
8543 #: build/C/man2/remap_file_pages.2:80
8544 msgid ""
8545 "The I<pgoff> and I<size> arguments specify the region of the file that is to "
8546 "be relocated within the mapping: I<pgoff> is a file offset in units of the "
8547 "system page size; I<size> is the length of the region in bytes."
8548 msgstr ""
8549 "I<pgoff> と I<size> 引き数は、マッピング内で再配置されるファイルの領域を指定"
8550 "する。 I<pgoff> はファイルオフセットであり、単位はシステムのページサイズであ"
8551 "る。 I<size> は領域の長さであり、単位はバイトである。"
8552
8553 #. type: Plain text
8554 #: build/C/man2/remap_file_pages.2:98
8555 msgid ""
8556 "The I<addr> argument serves two purposes.  First, it identifies the mapping "
8557 "whose pages we want to rearrange.  Thus, I<addr> must be an address that "
8558 "falls within a region previously mapped by a call to B<mmap>(2).  Second, "
8559 "I<addr> specifies the address at which the file pages identified by I<pgoff> "
8560 "and I<size> will be placed."
8561 msgstr ""
8562 "I<addr> 引き数は 2 つの目的で使われる。 第 1 の目的は、この引き数によって再編"
8563 "成したいページの マッピングを識別することである。 よって I<addr> は "
8564 "B<mmap>(2)  の呼び出しで過去にマップされた領域内のアドレスでなければならな"
8565 "い。 第 2 の目的は、 I<pgoff> と I<size> で識別されるファイルページが置かれる"
8566 "予定のアドレスを、 I<addr> によって指定することである。"
8567
8568 #.  This rounding is weird, and not consistent with the treatment of
8569 #.  the analogous arguments for munmap()/mprotect() and for mlock().
8570 #.  MTK, 14 Sep 2005
8571 #. type: Plain text
8572 #: build/C/man2/remap_file_pages.2:112
8573 msgid ""
8574 "The values specified in I<addr> and I<size> should be multiples of the "
8575 "system page size.  If they are not, then the kernel rounds I<both> values "
8576 "I<down> to the nearest multiple of the page size."
8577 msgstr ""
8578 "I<addr> と I<size> に指定する値は、システムのページサイズの倍数とすべきであ"
8579 "る。 それ以外の場合、カーネルは「両方」の値を 最も近いページサイズの倍数へ"
8580 "「切り下げる」。"
8581
8582 #. type: Plain text
8583 #: build/C/man2/remap_file_pages.2:116
8584 msgid "The I<prot> argument must be specified as 0."
8585 msgstr "I<prot> 引き数は 0 に指定されなければならない。"
8586
8587 #. type: Plain text
8588 #: build/C/man2/remap_file_pages.2:124
8589 msgid ""
8590 "The I<flags> argument has the same meaning as for B<mmap>(2), but all flags "
8591 "other than B<MAP_NONBLOCK> are ignored."
8592 msgstr ""
8593 "I<flags> 引き数は B<mmap>(2)  のものと同じ意味であるが、 B<MAP_NONBLOCK> 以外"
8594 "の全てのフラグは無視される。"
8595
8596 #. type: Plain text
8597 #: build/C/man2/remap_file_pages.2:131
8598 msgid ""
8599 "On success, B<remap_file_pages>()  returns 0.  On error, -1 is returned, and "
8600 "I<errno> is set appropriately."
8601 msgstr ""
8602 "成功した場合、 B<remap_file_pages>()  は 0 を返す。 エラーの場合、-1 が返さ"
8603 "れ、 I<errno> が適切に設定される。"
8604
8605 #. type: Plain text
8606 #: build/C/man2/remap_file_pages.2:139
8607 msgid ""
8608 "I<addr> does not refer to a valid mapping created with the B<MAP_SHARED> "
8609 "flag."
8610 msgstr ""
8611 "I<addr> が B<MAP_SHARED> フラグを指定して作成された有効なマッピングを参照して"
8612 "いない。"
8613
8614 #.  And possibly others from vma->vm_ops->populate()
8615 #. type: Plain text
8616 #: build/C/man2/remap_file_pages.2:148
8617 msgid "I<addr>, I<size>, I<prot>, or I<pgoff> is invalid."
8618 msgstr "I<addr>, I<size>, I<prot>, I<pgoff> のいずれかが不正である。"
8619
8620 #. type: Plain text
8621 #: build/C/man2/remap_file_pages.2:153
8622 msgid ""
8623 "The B<remap_file_pages>()  system call appeared in Linux 2.5.46; glibc "
8624 "support was added in version 2.3.3."
8625 msgstr ""
8626 "B<remap_file_pages>()  システムコールは Linux 2.5.46 で登場した。 glibc での"
8627 "サポートは glibc バージョン 2.3.3 で追加された。"
8628
8629 #. type: Plain text
8630 #: build/C/man2/remap_file_pages.2:157
8631 msgid "The B<remap_file_pages>()  system call is Linux-specific."
8632 msgstr "B<remap_file_pages>()  システムコールは Linux 固有のものである。"
8633
8634 #.  commit 3ee6dafc677a68e461a7ddafc94a580ebab80735
8635 #. type: Plain text
8636 #: build/C/man2/remap_file_pages.2:168
8637 msgid ""
8638 "Since Linux 2.6.23, B<remap_file_pages>()  creates non-linear mappings only "
8639 "on in-memory file systems such as tmpfs, hugetlbfs or ramfs.  On filesystems "
8640 "with a backing store, B<remap_file_pages>()  is not much more efficient than "
8641 "using B<mmap>(2)  to adjust which parts of the file are mapped to which "
8642 "addresses."
8643 msgstr ""
8644
8645 #. type: Plain text
8646 #: build/C/man2/remap_file_pages.2:175
8647 msgid ""
8648 "B<getpagesize>(2), B<mmap>(2), B<mmap2>(2), B<mprotect>(2), B<mremap>(2), "
8649 "B<msync>(2)"
8650 msgstr ""
8651 "B<getpagesize>(2), B<mmap>(2), B<mmap2>(2), B<mprotect>(2), B<mremap>(2), "
8652 "B<msync>(2)"
8653
8654 #. type: TH
8655 #: build/C/man3/shm_open.3:26
8656 #, no-wrap
8657 msgid "SHM_OPEN"
8658 msgstr "SHM_OPEN"
8659
8660 #. type: TH
8661 #: build/C/man3/shm_open.3:26
8662 #, no-wrap
8663 msgid "2009-02-25"
8664 msgstr "2009-02-25"
8665
8666 #. type: Plain text
8667 #: build/C/man3/shm_open.3:29
8668 msgid ""
8669 "shm_open, shm_unlink - create/open or unlink POSIX shared memory objects"
8670 msgstr ""
8671 "shm_open, shm_unlink - POSIX 共有メモリ・オブジェクトの作成/オープン/削除を行"
8672 "う"
8673
8674 #. type: Plain text
8675 #: build/C/man3/shm_open.3:33
8676 msgid "B<#include E<lt>sys/stat.hE<gt>> /* For mode constants */"
8677 msgstr "B<#include E<lt>sys/stat.hE<gt>> /* mode 定数用 */"
8678
8679 #. type: Plain text
8680 #: build/C/man3/shm_open.3:35
8681 msgid "B<#include E<lt>fcntl.hE<gt>> /* For O_* constants */"
8682 msgstr "B<#include E<lt>fcntl.hE<gt>> /* O_* 定数の定義用 */"
8683
8684 #. type: Plain text
8685 #: build/C/man3/shm_open.3:37
8686 msgid ""
8687 "B<int shm_open(const char *>I<name>B<, int >I<oflag>B<, mode_t >I<mode>B<);>"
8688 msgstr ""
8689 "B<int shm_open(const char *>I<name>B<, int >I<oflag>B<, mode_t >I<mode>B<);>"
8690
8691 #. type: Plain text
8692 #: build/C/man3/shm_open.3:39
8693 msgid "B<int shm_unlink(const char *>I<name>B<);>"
8694 msgstr "B<int shm_unlink(const char *>I<name>B<);>"
8695
8696 #. type: Plain text
8697 #: build/C/man3/shm_open.3:41
8698 msgid "Link with I<-lrt>."
8699 msgstr "I<-lrt> でリンクする。"
8700
8701 #. type: Plain text
8702 #: build/C/man3/shm_open.3:53
8703 msgid ""
8704 "B<shm_open>()  creates and opens a new, or opens an existing, POSIX shared "
8705 "memory object.  A POSIX shared memory object is in effect a handle which can "
8706 "be used by unrelated processes to B<mmap>(2)  the same region of shared "
8707 "memory.  The B<shm_unlink>()  function performs the converse operation, "
8708 "removing an object previously created by B<shm_open>()."
8709 msgstr ""
8710 "B<shm_open>()  は、POSIX 共有メモリ・オブジェクトを新規に作成/オープンした"
8711 "り、 すでに存在するオブジェクトをオープンしたりする。 POSIX 共有メモリ・オブ"
8712 "ジェクトは、実際には、関係のないプロセスが 共有メモリの同じ領域を "
8713 "B<mmap>(2)  するために使用することができる手段である。 B<shm_unlink>()  は、"
8714 "逆の操作、つまり以前に B<shm_open>()  で作成されたオブジェクトの削除を行う。"
8715
8716 #.  glibc allows the initial slash to be omitted, and makes
8717 #.  multiple initial slashes equivalent to a single slash.
8718 #.  This differs from the implementation of POSIX message queues.
8719 #.  glibc allows subdirectory components in the name, in which
8720 #.  case the subdirectory must exist under /dev/shm, and allow the
8721 #.  required permissions if a user wants to create a shared memory
8722 #.  object in that subdirectory.
8723 #. type: Plain text
8724 #: build/C/man3/shm_open.3:74
8725 msgid ""
8726 "The operation of B<shm_open>()  is analogous to that of B<open>(2).  I<name> "
8727 "specifies the shared memory object to be created or opened.  For portable "
8728 "use, a shared memory object should be identified by a name of the form I</"
8729 "somename>; that is, a null-terminated string of up to B<NAME_MAX> (i.e., "
8730 "255) characters consisting of an initial slash, followed by one or more "
8731 "characters, none of which are slashes."
8732 msgstr ""
8733 "B<shm_open>()  の動作は B<open>(2)  とよく似ている。 I<name> で作成したりオー"
8734 "プンしたりする共有メモリ・オブジェクトを指定する。 移植性を持たせるためには、"
8735 "共有メモリ・オブジェクトは I</somename> という形式の名前で識別し、 その名前"
8736 "は、最大で B<NAME_MAX> (すなわち 255) 文字のヌル終端された文字列で、 スラッ"
8737 "シュで始まり、スラッシュ以外の文字が 1 文字以上続く形式 にすべきである。"
8738
8739 #. type: Plain text
8740 #: build/C/man3/shm_open.3:81
8741 msgid ""
8742 "I<oflag> is a bit mask created by ORing together exactly one of B<O_RDONLY> "
8743 "or B<O_RDWR> and any of the other flags listed here:"
8744 msgstr ""
8745 "I<oflag> はビットマスクで、 B<O_RDONLY> と B<O_RDWR> のいずれか一方と、以下に"
8746 "述べる他のフラグの論理和をとったもの を指定する。"
8747
8748 #. type: TP
8749 #: build/C/man3/shm_open.3:81
8750 #, no-wrap
8751 msgid "B<O_RDONLY>"
8752 msgstr "B<O_RDONLY>"
8753
8754 #. type: Plain text
8755 #: build/C/man3/shm_open.3:89
8756 msgid ""
8757 "Open the object for read access.  A shared memory object opened in this way "
8758 "can be B<mmap>(2)ed only for read (B<PROT_READ>)  access."
8759 msgstr ""
8760 "読み出しアクセス用にオブジェクトをオープンする。 このフラグを指定してオープン"
8761 "された共有メモリ・オブジェクトは、 読み出し (B<PROT_READ>) アクセスでのみ "
8762 "B<mmap>(2)  することができる。"
8763
8764 #. type: TP
8765 #: build/C/man3/shm_open.3:89
8766 #, no-wrap
8767 msgid "B<O_RDWR>"
8768 msgstr "B<O_RDWR>"
8769
8770 #. type: Plain text
8771 #: build/C/man3/shm_open.3:92
8772 msgid "Open the object for read-write access."
8773 msgstr "読み書きアクセス用にオブジェクトをオープンする。"
8774
8775 #. type: TP
8776 #: build/C/man3/shm_open.3:92
8777 #, no-wrap
8778 msgid "B<O_CREAT>"
8779 msgstr "B<O_CREAT>"
8780
8781 #.  In truth it is actually the filesystem IDs on Linux, but these
8782 #.  are nearly always the same as the effective IDs.  (MTK, Jul 05)
8783 #. type: Plain text
8784 #: build/C/man3/shm_open.3:112
8785 msgid ""
8786 "Create the shared memory object if it does not exist.  The user and group "
8787 "ownership of the object are taken from the corresponding effective IDs of "
8788 "the calling process, and the object's permission bits are set according to "
8789 "the low-order 9 bits of I<mode>, except that those bits set in the process "
8790 "file mode creation mask (see B<umask>(2))  are cleared for the new object.  "
8791 "A set of macro constants which can be used to define I<mode> is listed in "
8792 "B<open>(2).  (Symbolic definitions of these constants can be obtained by "
8793 "including I<E<lt>sys/stat.hE<gt>>.)"
8794 msgstr ""
8795 "存在しない場合、共有メモリ・オブジェクトを作成する。 オブジェクトのユーザとグ"
8796 "ループの所有権は、 呼び出し元プロセスの対応する実効 ID が使われ、 オブジェク"
8797 "トの許可ビットは I<mode> の下位 9 ビットに基づいて設定される。ただし、 ファイ"
8798 "ルモード作成マスク (B<umask>(2)  参照) に設定されている値は、新規オブジェクト"
8799 "に関してはクリアされる。 I<mode> を定義するために使用できるマクロ定数(群)は "
8800 "B<open>(2)  に記載されている (これらの定数のシンボル定義は I<E<lt>sys/stat."
8801 "hE<gt>> のインクルードにより得られる)。"
8802
8803 #. type: Plain text
8804 #: build/C/man3/shm_open.3:118
8805 msgid ""
8806 "A new shared memory object initially has zero length\\(emthe size of the "
8807 "object can be set using B<ftruncate>(2).  The newly allocated bytes of a "
8808 "shared memory object are automatically initialized to 0."
8809 msgstr ""
8810 "新規に作成された共有メモリ・オブジェクトは長さ 0 で初期化される。 オブジェク"
8811 "トの大きさは B<ftruncate>(2)  を使って設定できる。 共有メモリ・オブジェクトと"
8812 "して新規に確保されたバイトは自動的に 0 に初期化される。"
8813
8814 #. type: TP
8815 #: build/C/man3/shm_open.3:118
8816 #, no-wrap
8817 msgid "B<O_EXCL>"
8818 msgstr "B<O_EXCL>"
8819
8820 #. type: Plain text
8821 #: build/C/man3/shm_open.3:127
8822 msgid ""
8823 "If B<O_CREAT> was also specified, and a shared memory object with the given "
8824 "I<name> already exists, return an error.  The check for the existence of the "
8825 "object, and its creation if it does not exist, are performed atomically."
8826 msgstr ""
8827 "B<O_CREAT> が一緒に指定されており、 I<name> で指定された共有メモリ・オブジェ"
8828 "クトが既に存在した場合、 エラーを返す。 オブジェクトの存在確認と、存在しな"
8829 "かった場合のオブジェクト作成は、 必ず一連の操作として実行される (performed "
8830 "atomically)。"
8831
8832 #. type: TP
8833 #: build/C/man3/shm_open.3:127
8834 #, no-wrap
8835 msgid "B<O_TRUNC>"
8836 msgstr "B<O_TRUNC>"
8837
8838 #. type: Plain text
8839 #: build/C/man3/shm_open.3:130
8840 msgid "If the shared memory object already exists, truncate it to zero bytes."
8841 msgstr ""
8842 "共有メモリ・オブジェクトがすでに存在した場合、 そのオブジェクトを 0 バイトに"
8843 "切り詰める。"
8844
8845 #. type: Plain text
8846 #: build/C/man3/shm_open.3:133
8847 msgid ""
8848 "Definitions of these flag values can be obtained by including I<E<lt>fcntl."
8849 "hE<gt>>."
8850 msgstr ""
8851 "これらのフラグ値の定義は I<E<lt>fcntl.hE<gt>> のインクルードにより得られる。"
8852
8853 #. type: Plain text
8854 #: build/C/man3/shm_open.3:144
8855 msgid ""
8856 "On successful completion B<shm_open>()  returns a new file descriptor "
8857 "referring to the shared memory object.  This file descriptor is guaranteed "
8858 "to be the lowest-numbered file descriptor not previously opened within the "
8859 "process.  The B<FD_CLOEXEC> flag (see B<fcntl>(2))  is set for the file "
8860 "descriptor."
8861 msgstr ""
8862 "成功して完了した場合、 B<shm_open>()  は共有メモリ・オブジェクトを参照する新"
8863 "しいファイル・ディスクリプタを返す。 このファイル・ディスクリプタは、そのプロ"
8864 "セス内で過去にオープンされていない ファイル・ディスクリプタの中で最も小さな数"
8865 "になることが保証される。 B<FD_CLOEXEC> フラグ (B<fcntl>(2)  を参照) が、この"
8866 "ファイル・ディスクリプタに設定される。"
8867
8868 #. type: Plain text
8869 #: build/C/man3/shm_open.3:153
8870 msgid ""
8871 "The file descriptor is normally used in subsequent calls to B<ftruncate>(2)  "
8872 "(for a newly created object) and B<mmap>(2).  After a call to B<mmap>(2)  "
8873 "the file descriptor may be closed without affecting the memory mapping."
8874 msgstr ""
8875 "通常、これらのファイル・ディスクリプタは、この後続けて実行される "
8876 "B<ftruncate>(2)  (新規に作成されたオブジェクトの場合のみ) と B<mmap>(2)  の呼"
8877 "び出しに使用される。 B<mmap>(2)  を呼び出した後は、ファイル・ディスクリプタを"
8878 "クローズしてもよく、 クローズしてもメモリ・マッピングに影響を与えることはな"
8879 "い。"
8880
8881 #. type: Plain text
8882 #: build/C/man3/shm_open.3:171
8883 msgid ""
8884 "The operation of B<shm_unlink>()  is analogous to B<unlink>(2): it removes a "
8885 "shared memory object name, and, once all processes have unmapped the object, "
8886 "de-allocates and destroys the contents of the associated memory region.  "
8887 "After a successful B<shm_unlink>(), attempts to B<shm_open>()  an object "
8888 "with the same I<name> will fail (unless B<O_CREAT> was specified, in which "
8889 "case a new, distinct object is created)."
8890 msgstr ""
8891 "B<shm_unlink>()  の動作は B<unlink>(2)  とよく似ている: 共有メモリ・オブジェ"
8892 "クト名を削除し、すべてのプロセスが処理対象の オブジェクトをアンマップした時点"
8893 "でオブジェクトの割り当てを解除し、 対応するメモリ領域の内容を破棄する。 "
8894 "B<shm_unlink>()  が成功した後で、同じ I<name> を持つオブジェクトに対して "
8895 "B<shm_open>()  を行うと、 (B<O_CREAT> が指定されていない場合) 失敗する。 "
8896 "(B<O_CREAT> が指定されている場合、新しく別のオブジェクトが作成される)。"
8897
8898 #. type: Plain text
8899 #: build/C/man3/shm_open.3:180
8900 msgid ""
8901 "On success, B<shm_open>()  returns a nonnegative file descriptor.  On "
8902 "failure, B<shm_open>()  returns -1.  B<shm_unlink>()  returns 0 on success, "
8903 "or -1 on error."
8904 msgstr ""
8905 "成功した場合、 B<shm_open>()  は非負のファイル・ディスクリプタを返す。 失敗し"
8906 "た場合、 B<shm_open>()  は -1 を返す。 B<shm_unlink>()  は、成功した場合 0 "
8907 "を、エラーが起こった場合 -1 を返す。"
8908
8909 #. type: Plain text
8910 #: build/C/man3/shm_open.3:187
8911 msgid ""
8912 "On failure, I<errno> is set to indicate the cause of the error.  Values "
8913 "which may appear in I<errno> include the following:"
8914 msgstr ""
8915 "失敗した場合、エラーの原因を示すため I<errno> が設定される。 I<errno> に設定"
8916 "される値は以下の通りである:"
8917
8918 #. type: Plain text
8919 #: build/C/man3/shm_open.3:192
8920 msgid "Permission to B<shm_unlink>()  the shared memory object was denied."
8921 msgstr "共有メモリオブジェクトを B<shm_unlink>()  する権限がなかった。"
8922
8923 #. type: Plain text
8924 #: build/C/man3/shm_open.3:202
8925 msgid ""
8926 "Permission was denied to B<shm_open>()  I<name> in the specified I<mode>, or "
8927 "B<O_TRUNC> was specified and the caller does not have write permission on "
8928 "the object."
8929 msgstr ""
8930 "指定された I<mode> で I<name> を B<shm_open>()  する権限がなかった。もしく"
8931 "は、 B<O_TRUNC> が指定されたが、呼び出し元にはそのオブジェクトに対する書き込"
8932 "み権限が なかった。"
8933
8934 #. type: TP
8935 #: build/C/man3/shm_open.3:202 build/C/man2/shmget.2:198
8936 #, no-wrap
8937 msgid "B<EEXIST>"
8938 msgstr "B<EEXIST>"
8939
8940 #. type: Plain text
8941 #: build/C/man3/shm_open.3:213
8942 msgid ""
8943 "Both B<O_CREAT> and B<O_EXCL> were specified to B<shm_open>()  and the "
8944 "shared memory object specified by I<name> already exists."
8945 msgstr ""
8946 "B<O_CREAT> と B<O_EXCL> の両方が B<shm_open>()  に指定されたが、 I<name> で指"
8947 "定された共有メモリ・オブジェクトが既に存在した。"
8948
8949 #. type: Plain text
8950 #: build/C/man3/shm_open.3:220
8951 msgid "The I<name> argument to B<shm_open>()  was invalid."
8952 msgstr "B<shm_open>()  に与えられた I<name> 引き数が不正であった。"
8953
8954 #. type: TP
8955 #: build/C/man3/shm_open.3:220
8956 #, no-wrap
8957 msgid "B<EMFILE>"
8958 msgstr "B<EMFILE>"
8959
8960 #. type: Plain text
8961 #: build/C/man3/shm_open.3:223
8962 msgid "The process already has the maximum number of files open."
8963 msgstr "プロセスがオープン可能なファイル数の上限にすでに達していた。"
8964
8965 #. type: TP
8966 #: build/C/man3/shm_open.3:223
8967 #, no-wrap
8968 msgid "B<ENAMETOOLONG>"
8969 msgstr "B<ENAMETOOLONG>"
8970
8971 #. type: Plain text
8972 #: build/C/man3/shm_open.3:229
8973 msgid "The length of I<name> exceeds B<PATH_MAX>."
8974 msgstr "I<name> の長さが B<PATH_MAX> を越えている。"
8975
8976 #. type: Plain text
8977 #: build/C/man3/shm_open.3:233
8978 msgid ""
8979 "The limit on the total number of files open on the system has been reached."
8980 msgstr "ファイルシステムでオープンできるファイル数の上限に達した。"
8981
8982 #. type: TP
8983 #: build/C/man3/shm_open.3:233 build/C/man3/shm_open.3:242
8984 #: build/C/man2/shmget.2:225
8985 #, no-wrap
8986 msgid "B<ENOENT>"
8987 msgstr "B<ENOENT>"
8988
8989 #. type: Plain text
8990 #: build/C/man3/shm_open.3:242
8991 msgid ""
8992 "An attempt was made to B<shm_open>()  a I<name> that did not exist, and "
8993 "B<O_CREAT> was not specified."
8994 msgstr ""
8995 "存在していない I<name> のオブジェクトを B<shm_open>()  しようとしたが、 "
8996 "B<O_CREAT> が指定されていなかった。"
8997
8998 #. type: Plain text
8999 #: build/C/man3/shm_open.3:249
9000 msgid ""
9001 "An attempt was to made to B<shm_unlink>()  a I<name> that does not exist."
9002 msgstr "存在しない I<name> のオブジェクトを B<shm_unlink>()  しようとした。"
9003
9004 #. type: Plain text
9005 #: build/C/man3/shm_open.3:251
9006 msgid "These functions are provided in glibc 2.2 and later."
9007 msgstr "これらの関数は glibc 2.2 以降で提供されている。"
9008
9009 #. type: Plain text
9010 #: build/C/man3/shm_open.3:257
9011 msgid ""
9012 "POSIX.1-2001 says that the group ownership of a newly created shared memory "
9013 "object is set to either the calling process's effective group ID or \"a "
9014 "system default group ID\"."
9015 msgstr ""
9016 "POSIX.1-2001 には、新規に作成される共有メモリオブジェクトのグループ所有権"
9017 "は、 呼び出し元プロセスの実効グループ ID か 「システムのデフォルトのグループ "
9018 "ID」 のどちらかに設定される、と書かれている。"
9019
9020 #. type: Plain text
9021 #: build/C/man3/shm_open.3:266
9022 msgid ""
9023 "POSIX leaves the behavior of the combination of B<O_RDONLY> and B<O_TRUNC> "
9024 "unspecified.  On Linux, this will successfully truncate an existing shared "
9025 "memory object\\(emthis may not be so on other UNIX systems."
9026 msgstr ""
9027 "POSIX は B<O_RDONLY> と B<O_TRUNC> が一緒に指定された場合の動作を未定義にして"
9028 "いる。Linux では、 既存の共有メモリ・オブジェクトに対する切り詰め (truncate) "
9029 "は成功する。 しかし、他の UNIX システムでも同じであるとは限らない。"
9030
9031 #. type: Plain text
9032 #: build/C/man3/shm_open.3:271
9033 msgid ""
9034 "The POSIX shared memory object implementation on Linux 2.4 makes use of a "
9035 "dedicated filesystem, which is normally mounted under I</dev/shm>."
9036 msgstr ""
9037 "Linux 2.4 における POSIX 共有メモリ・オブジェクトの実装は 専用のファイルシス"
9038 "テムを使用する。そのファイルシステムは通常 I</dev/shm> にマウントされる。"
9039
9040 #. type: Plain text
9041 #: build/C/man3/shm_open.3:282
9042 msgid ""
9043 "B<close>(2), B<fchmod>(2), B<fchown>(2), B<fcntl>(2), B<fstat>(2), "
9044 "B<ftruncate>(2), B<mmap>(2), B<open>(2), B<umask>(2), B<shm_overview>(7)"
9045 msgstr ""
9046 "B<close>(2), B<fchmod>(2), B<fchown>(2), B<fcntl>(2), B<fstat>(2), "
9047 "B<ftruncate>(2), B<mmap>(2), B<open>(2), B<umask>(2), B<shm_overview>(7)"
9048
9049 #. type: TH
9050 #: build/C/man7/shm_overview.7:27
9051 #, no-wrap
9052 msgid "SHM_OVERVIEW"
9053 msgstr "SHM_OVERVIEW"
9054
9055 #. type: TH
9056 #: build/C/man7/shm_overview.7:27
9057 #, no-wrap
9058 msgid "2010-09-10"
9059 msgstr "2010-09-10"
9060
9061 #. type: Plain text
9062 #: build/C/man7/shm_overview.7:30
9063 msgid "shm_overview - overview of POSIX shared memory"
9064 msgstr "shm_overview - POSIX 共有メモリの概要"
9065
9066 #. type: Plain text
9067 #: build/C/man7/shm_overview.7:33
9068 msgid ""
9069 "The POSIX shared memory API allows processes to communicate information by "
9070 "sharing a region of memory."
9071 msgstr ""
9072 "POSIX 共有メモリ API を使用すると、メモリのある領域を共有して、 プロセス間で"
9073 "情報をやり取りすることができる。"
9074
9075 #. type: Plain text
9076 #: build/C/man7/shm_overview.7:35
9077 msgid "The interfaces employed in the API are:"
9078 msgstr "この API では以下のインターフェースが採用されている。"
9079
9080 #. type: TP
9081 #: build/C/man7/shm_overview.7:35
9082 #, no-wrap
9083 msgid "B<shm_open>(3)"
9084 msgstr "B<shm_open>(3)"
9085
9086 #. type: Plain text
9087 #: build/C/man7/shm_overview.7:42
9088 msgid ""
9089 "Create and open a new object, or open an existing object.  This is analogous "
9090 "to B<open>(2).  The call returns a file descriptor for use by the other "
9091 "interfaces listed below."
9092 msgstr ""
9093 "新しいオブジェクトを生成しオープンする、もしくは 既存のオブジェクトをオープン"
9094 "する。これは B<open>(2)  と同じである。下記にある他のインターフェースで使用す"
9095 "る ファイルディスクリプタを返す。"
9096
9097 #. type: TP
9098 #: build/C/man7/shm_overview.7:42
9099 #, no-wrap
9100 msgid "B<ftruncate>(2)"
9101 msgstr "B<ftruncate>(2)"
9102
9103 #. type: Plain text
9104 #: build/C/man7/shm_overview.7:46
9105 msgid ""
9106 "Set the size of the shared memory object.  (A newly created shared memory "
9107 "object has a length of zero.)"
9108 msgstr "共有メモリオブジェクトの大きさを設定する。"
9109
9110 #. type: Plain text
9111 #: build/C/man7/shm_overview.7:50
9112 msgid ""
9113 "Map the shared memory object into the virtual address space of the calling "
9114 "process."
9115 msgstr ""
9116 "呼び出したプロセスの仮想アドレス空間に共有メモリオブジェクトを マップする。"
9117
9118 #. type: TP
9119 #: build/C/man7/shm_overview.7:50
9120 #, no-wrap
9121 msgid "B<munmap>(2)"
9122 msgstr "B<munmap>(2)"
9123
9124 #. type: Plain text
9125 #: build/C/man7/shm_overview.7:54
9126 msgid ""
9127 "Unmap the shared memory object from the virtual address space of the calling "
9128 "process."
9129 msgstr ""
9130 "呼び出したプロセスの仮想アドレス空間から 共有メモリオブジェクトをアンマップす"
9131 "る。"
9132
9133 #. type: TP
9134 #: build/C/man7/shm_overview.7:54
9135 #, no-wrap
9136 msgid "B<shm_unlink>(3)"
9137 msgstr "B<shm_unlink>(3)"
9138
9139 #. type: Plain text
9140 #: build/C/man7/shm_overview.7:57
9141 msgid "Remove a shared memory object name."
9142 msgstr "共有メモリオブジェクト名を削除する。"
9143
9144 #. type: TP
9145 #: build/C/man7/shm_overview.7:57
9146 #, no-wrap
9147 msgid "B<close>(2)"
9148 msgstr "B<close>(2)"
9149
9150 #. type: Plain text
9151 #: build/C/man7/shm_overview.7:62
9152 msgid ""
9153 "Close the file descriptor allocated by B<shm_open>(3)  when it is no longer "
9154 "needed."
9155 msgstr ""
9156 "B<shm_open>(3)  で割り当てられたファイルディスクリプタが不要になった際に、 そ"
9157 "のファイルディスクリプタをクローズする。"
9158
9159 #. type: TP
9160 #: build/C/man7/shm_overview.7:62
9161 #, no-wrap
9162 msgid "B<fstat>(2)"
9163 msgstr "B<fstat>(2)"
9164
9165 #. type: Plain text
9166 #: build/C/man7/shm_overview.7:76
9167 msgid ""
9168 "Obtain a I<stat> structure that describes the shared memory object.  Among "
9169 "the information returned by this call are the object's size (I<st_size>), "
9170 "permissions (I<st_mode>), owner (I<st_uid>), and group (I<st_gid>)."
9171 msgstr ""
9172 "その共有メモリオブジェクトについての情報が入った I<stat> 構造体を取得する。 "
9173 "このシステムコールが返す情報には、オブジェクトのサイズ (I<st_size>)、 許可属"
9174 "性 (I<st_mode>)、 所有者 (I<st_uid>)、 グループ (I<st_gid>)  がある。"
9175
9176 #. type: TP
9177 #: build/C/man7/shm_overview.7:76
9178 #, no-wrap
9179 msgid "B<fchown>(2)"
9180 msgstr "B<fchown>(2)"
9181
9182 #. type: Plain text
9183 #: build/C/man7/shm_overview.7:79
9184 msgid "To change the ownership of a shared memory object."
9185 msgstr "共有メモリオブジェクトの所有権を変更する。"
9186
9187 #. type: TP
9188 #: build/C/man7/shm_overview.7:79
9189 #, no-wrap
9190 msgid "B<fchmod>(2)"
9191 msgstr "B<fchmod>(2)"
9192
9193 #. type: Plain text
9194 #: build/C/man7/shm_overview.7:82
9195 msgid "To change the permissions of a shared memory object."
9196 msgstr "共有メモリオブジェクトの許可属性を変更する。"
9197
9198 #. type: SS
9199 #: build/C/man7/shm_overview.7:82
9200 #, no-wrap
9201 msgid "Versions"
9202 msgstr "Versions"
9203
9204 #. type: Plain text
9205 #: build/C/man7/shm_overview.7:84
9206 msgid "POSIX shared memory is supported since Linux 2.4 and glibc 2.2."
9207 msgstr "POSIX 共有メモリは Linux 2.4 と glibc 2.2 以降でサポートされている。"
9208
9209 #. type: SS
9210 #: build/C/man7/shm_overview.7:84
9211 #, no-wrap
9212 msgid "Persistence"
9213 msgstr "持続性"
9214
9215 #. type: Plain text
9216 #: build/C/man7/shm_overview.7:89
9217 msgid ""
9218 "POSIX shared memory objects have kernel persistence: a shared memory object "
9219 "will exist until the system is shut down, or until all processes have "
9220 "unmapped the object and it has been deleted with B<shm_unlink>(3)"
9221 msgstr ""
9222 "POSIX 共有メモリオブジェクトはカーネル内で保持される。 共有メモリオブジェクト"
9223 "は、システムがシャットダウンされるか、 全てのプロセスがそのオブジェクトをアン"
9224 "マップし、 B<shm_unlink>(3)  で削除されるまで、存在し続ける。"
9225
9226 #. type: SS
9227 #: build/C/man7/shm_overview.7:89
9228 #, no-wrap
9229 msgid "Linking"
9230 msgstr "リンク"
9231
9232 #. type: Plain text
9233 #: build/C/man7/shm_overview.7:94
9234 msgid ""
9235 "Programs using the POSIX shared memory API must be compiled with I<cc -lrt> "
9236 "to link against the real-time library, I<librt>."
9237 msgstr ""
9238 "POSIX 共有メモリ API を使用したプログラムは I<cc -lrt> でコンパイルし、リアル"
9239 "タイムライブラリ I<librt> とリンクしなければならない。"
9240
9241 #. type: SS
9242 #: build/C/man7/shm_overview.7:94
9243 #, no-wrap
9244 msgid "Accessing shared memory objects via the filesystem"
9245 msgstr "ファイルシステム経由での共有メモリオブジェクトへのアクセス"
9246
9247 #. type: Plain text
9248 #: build/C/man7/shm_overview.7:101
9249 msgid ""
9250 "On Linux, shared memory objects are created in a (I<tmpfs>)  virtual "
9251 "filesystem, normally mounted under I</dev/shm>.  Since kernel 2.6.19, Linux "
9252 "supports the use of access control lists (ACLs)  to control the permissions "
9253 "of objects in the virtual filesystem."
9254 msgstr ""
9255 "Linux では、共有メモリオブジェクトは通常 I</dev/shm> 以下にマウントされる仮想"
9256 "ファイルシステム (I<tmpfs>)  内に作成される。 カーネル 2.6.19 以降の Linux で"
9257 "は、 仮想ファイルシステム内のオブジェクトの許可属性の制御に、 アクセス制御リ"
9258 "スト (ACL; access control lists) を使うことができる。"
9259
9260 #. type: Plain text
9261 #: build/C/man7/shm_overview.7:106
9262 msgid ""
9263 "Typically, processes must synchronize their access to a shared memory "
9264 "object, using, for example, POSIX semaphores."
9265 msgstr ""
9266 "通常は、共有メモリオブジェクトにアクセスするプロセスは、 POSIX セマフォなどを"
9267 "使ってプロセス間で同期をとらなければならない。"
9268
9269 #. type: Plain text
9270 #: build/C/man7/shm_overview.7:114
9271 msgid ""
9272 "System V shared memory (B<shmget>(2), B<shmop>(2), etc.) is an older shared "
9273 "memory API.  POSIX shared memory provides a simpler, and better designed "
9274 "interface; on the other hand POSIX shared memory is somewhat less widely "
9275 "available (especially on older systems) than System V shared memory."
9276 msgstr ""
9277 "System V 共有メモリ (B<shmget>(2), B<shmop>(2)  など) は古い共有メモリ API で"
9278 "ある。 POSIX 共有メモリは、より簡単で、うまく設計されたインタフェースを提供し"
9279 "ている。 一方で、POSIX 共有メモリは System V 共有メモリと比べると 利用できる"
9280 "システムが少ない (特に、古いシステムでは少ない)。"
9281
9282 #. type: Plain text
9283 #: build/C/man7/shm_overview.7:127
9284 msgid ""
9285 "B<fchmod>(2), B<fchown>(2), B<fstat>(2), B<ftruncate>(2), B<mmap>(2), "
9286 "B<mprotect>(2), B<munmap>(2), B<shmget>(2), B<shmop>(2), B<shm_open>(3), "
9287 "B<shm_unlink>(3), B<sem_overview>(7)"
9288 msgstr ""
9289 "B<fchmod>(2), B<fchown>(2), B<fstat>(2), B<ftruncate>(2), B<mmap>(2), "
9290 "B<mprotect>(2), B<munmap>(2), B<shmget>(2), B<shmop>(2), B<shm_open>(3), "
9291 "B<shm_unlink>(3), B<sem_overview>(7)"
9292
9293 #. type: TH
9294 #: build/C/man2/shmctl.2:45
9295 #, no-wrap
9296 msgid "SHMCTL"
9297 msgstr "SHMCTL"
9298
9299 #. type: TH
9300 #: build/C/man2/shmctl.2:45
9301 #, no-wrap
9302 msgid "2014-02-07"
9303 msgstr "2014-02-07"
9304
9305 #. type: Plain text
9306 #: build/C/man2/shmctl.2:48
9307 msgid "shmctl - System V shared memory control"
9308 msgstr "shmctl - System V 共有メモリ (shared memory) を制御する"
9309
9310 #. type: Plain text
9311 #: build/C/man2/shmctl.2:51 build/C/man2/shmget.2:44
9312 msgid "B<#include E<lt>sys/ipc.hE<gt>>"
9313 msgstr "B<#include E<lt>sys/ipc.hE<gt>>"
9314
9315 #. type: Plain text
9316 #: build/C/man2/shmctl.2:53 build/C/man2/shmget.2:46
9317 msgid "B<#include E<lt>sys/shm.hE<gt>>"
9318 msgstr "B<#include E<lt>sys/shm.hE<gt>>"
9319
9320 #. type: Plain text
9321 #: build/C/man2/shmctl.2:55
9322 msgid ""
9323 "B<int shmctl(int >I<shmid>B<, int >I<cmd>B<, struct shmid_ds *>I<buf>B<);>"
9324 msgstr ""
9325 "B<int shmctl(int >I<shmid>B<, int >I<cmd>B<, struct shmid_ds *>I<buf>B<);>"
9326
9327 #. type: Plain text
9328 #: build/C/man2/shmctl.2:62
9329 msgid ""
9330 "B<shmctl>()  performs the control operation specified by I<cmd> on the System"
9331 "\\ V shared memory segment whose identifier is given in I<shmid>."
9332 msgstr ""
9333 "B<shmctl>()  は、識別子が I<shmid> の System\\ V 共有メモリ・セグメントに対し"
9334 "て I<cmd> で指示した制御命令を実行する。"
9335
9336 #. type: Plain text
9337 #: build/C/man2/shmctl.2:67
9338 msgid ""
9339 "The I<buf> argument is a pointer to a I<shmid_ds> structure, defined in "
9340 "I<E<lt>sys/shm.hE<gt>> as follows:"
9341 msgstr ""
9342 "I<buf> 引き数は、 I<shmid_ds> 構造体へのポインタである。 この構造体は "
9343 "I<E<lt>sys/shm.hE<gt>> で以下のように定義されている"
9344
9345 #. type: Plain text
9346 #: build/C/man2/shmctl.2:81
9347 #, no-wrap
9348 msgid ""
9349 "struct shmid_ds {\n"
9350 "    struct ipc_perm shm_perm;    /* Ownership and permissions */\n"
9351 "    size_t          shm_segsz;   /* Size of segment (bytes) */\n"
9352 "    time_t          shm_atime;   /* Last attach time */\n"
9353 "    time_t          shm_dtime;   /* Last detach time */\n"
9354 "    time_t          shm_ctime;   /* Last change time */\n"
9355 "    pid_t           shm_cpid;    /* PID of creator */\n"
9356 "    pid_t           shm_lpid;    /* PID of last shmat(2)/shmdt(2) */\n"
9357 "    shmatt_t        shm_nattch;  /* No. of current attaches */\n"
9358 "    ...\n"
9359 "};\n"
9360 msgstr ""
9361 "struct shmid_ds {\n"
9362 "    struct ipc_perm shm_perm;    /* 所有権と許可 */\n"
9363 "    size_t          shm_segsz;   /* セグメントのサイズ (バイト) */\n"
9364 "    time_t          shm_atime;   /* 最後の付加 (attach) の時刻 */\n"
9365 "    time_t          shm_dtime;   /* 最後の分離 (detach) の時刻 */\n"
9366 "    time_t          shm_ctime;   /* 最後に変更が行われた時刻 */\n"
9367 "    pid_t           shm_cpid;    /* 作成者 (creator) の PID */\n"
9368 "    pid_t           shm_lpid;    /* 最後の shmat(2)/shmdt(2) の PID */\n"
9369 "    shmatt_t        shm_nattch;  /* 現在付加されている数 */\n"
9370 "    ...\n"
9371 "};\n"
9372
9373 #. type: Plain text
9374 #: build/C/man2/shmctl.2:89
9375 msgid ""
9376 "The I<ipc_perm> structure is defined as follows (the highlighted fields are "
9377 "settable using B<IPC_SET>):"
9378 msgstr ""
9379 "I<ipc_perm> 構造体は以下のように定義されている (強調されたフィールドは "
9380 "B<IPC_SET> を使って設定可能である):"
9381
9382 #. type: Plain text
9383 #: build/C/man2/shmctl.2:102
9384 #, no-wrap
9385 msgid ""
9386 "struct ipc_perm {\n"
9387 "    key_t          __key;    /* Key supplied to shmget(2) */\n"
9388 "    uid_t          B<uid>;      /* Effective UID of owner */\n"
9389 "    gid_t          B<gid>;      /* Effective GID of owner */\n"
9390 "    uid_t          cuid;     /* Effective UID of creator */\n"
9391 "    gid_t          cgid;     /* Effective GID of creator */\n"
9392 "    unsigned short B<mode>;     /* B<Permissions> + SHM_DEST and\n"
9393 "                                SHM_LOCKED flags */\n"
9394 "    unsigned short __seq;    /* Sequence number */\n"
9395 "};\n"
9396 msgstr ""
9397 "struct ipc_perm {\n"
9398 "    key_t          __key;    /* shmget(2) に与えられるキー */\n"
9399 "    uid_t          B<uid>;      /* 所有者の実効 UID */\n"
9400 "    gid_t          B<gid>;      /* 所有者の実効 GID */\n"
9401 "    uid_t          cuid;     /* 作成者の実効 UID */\n"
9402 "    gid_t          cgid;     /* 作成者の実効 GID */\n"
9403 "    unsigned short B<mode>;     /* B<許可> + SHM_DEST と\n"
9404 "                                SHM_LOCKED フラグ */\n"
9405 "    unsigned short __seq;    /* シーケンス番号 */\n"
9406 "};\n"
9407
9408 #. type: Plain text
9409 #: build/C/man2/shmctl.2:108
9410 msgid "Valid values for I<cmd> are:"
9411 msgstr "I<cmd> として有効な値は以下の通り:"
9412
9413 #. type: TP
9414 #: build/C/man2/shmctl.2:109
9415 #, no-wrap
9416 msgid "B<IPC_STAT>"
9417 msgstr "B<IPC_STAT>"
9418
9419 #. type: Plain text
9420 #: build/C/man2/shmctl.2:118
9421 msgid ""
9422 "Copy information from the kernel data structure associated with I<shmid> "
9423 "into the I<shmid_ds> structure pointed to by I<buf>.  The caller must have "
9424 "read permission on the shared memory segment."
9425 msgstr ""
9426 "I<shmid> に関連づけられたカーネルデータ構造体の情報を I<buf> で指された "
9427 "I<shmid_ds> 構造体にコピーする。 呼び出し元は共有メモリ・セグメントに対する "
9428 "読み込み許可を持たなければならない。"
9429
9430 #. type: TP
9431 #: build/C/man2/shmctl.2:118
9432 #, no-wrap
9433 msgid "B<IPC_SET>"
9434 msgstr "B<IPC_SET>"
9435
9436 #. type: Plain text
9437 #: build/C/man2/shmctl.2:136
9438 msgid ""
9439 "Write the values of some members of the I<shmid_ds> structure pointed to by "
9440 "I<buf> to the kernel data structure associated with this shared memory "
9441 "segment, updating also its I<shm_ctime> member.  The following fields can be "
9442 "changed: I<shm_perm.uid>, I<shm_perm.gid>, and (the least significant 9 bits "
9443 "of) I<shm_perm.mode>.  The effective UID of the calling process must match "
9444 "the owner (I<shm_perm.uid>)  or creator (I<shm_perm.cuid>)  of the shared "
9445 "memory segment, or the caller must be privileged."
9446 msgstr ""
9447 "I<buf> によって指される I<shmid_ds> 構造体のいくつかのメンバーの値を、 この共"
9448 "有メモリ・セグメントに関連づけられたカーネルデータ構造体に書き込み、 "
9449 "I<shm_ctime> メンバーも更新する。 以下のフィールドは変更できる。 I<shm_perm."
9450 "uid>, I<shm_perm.gid>, I<shm_perm.mode> (の最下位 9 ビット)。 呼び出したプロ"
9451 "セスの実効 UID が所有者 (I<shm_perm.uid>)  または作成者 (I<shm_perm.cuid>)  "
9452 "と一致するか、呼び出し元が特権を持たなければならない。"
9453
9454 #. type: TP
9455 #: build/C/man2/shmctl.2:136
9456 #, no-wrap
9457 msgid "B<IPC_RMID>"
9458 msgstr "B<IPC_RMID>"
9459
9460 #. type: Plain text
9461 #: build/C/man2/shmctl.2:149
9462 msgid ""
9463 "Mark the segment to be destroyed.  The segment will only actually be "
9464 "destroyed after the last process detaches it (i.e., when the I<shm_nattch> "
9465 "member of the associated structure I<shmid_ds> is zero).  The caller must be "
9466 "the owner or creator of the segment, or be privileged.  The I<buf> argument "
9467 "is ignored."
9468 msgstr ""
9469 "セグメントに破棄済みのマークを付ける。 セグメントは、実際には最後プロセスがセ"
9470 "グメントを分離した (関連する I<shmid_ds> 構造体の I<shm_nattch> メンバーが 0 "
9471 "になった) 後でのみ破棄される。 呼び出し元はそのセグメントの所有者か作成者であ"
9472 "るか、特権を持たなければならない。 I<buf> 引き数は無視される。"
9473
9474 #. type: Plain text
9475 #: build/C/man2/shmctl.2:157
9476 msgid ""
9477 "If a segment has been marked for destruction, then the (nonstandard)  "
9478 "B<SHM_DEST> flag of the I<shm_perm.mode> field in the associated data "
9479 "structure retrieved by B<IPC_STAT> will be set."
9480 msgstr ""
9481 "セグメントに破棄のマークが付けられると、 関連するデータ構造体において "
9482 "I<shm_perm.mode> フィールドの (標準ではない)  B<SHM_DEST> フラグが設定され"
9483 "る。 このデータ構造体は B<IPC_STAT> で取得される。"
9484
9485 #. type: Plain text
9486 #: build/C/man2/shmctl.2:160
9487 msgid ""
9488 "The caller I<must> ensure that a segment is eventually destroyed; otherwise "
9489 "its pages that were faulted in will remain in memory or swap."
9490 msgstr ""
9491 "呼び出し元は最終的にはセグメントを忘れずに破棄I<しなければならない>。 そうで"
9492 "なれば、フォールト (fault) されたページは メモリかスワップ (swap) に残り続け"
9493 "る。"
9494
9495 #. type: Plain text
9496 #: build/C/man2/shmctl.2:165
9497 msgid ""
9498 "See also the description of I</proc/sys/kernel/shm_rmid_forced> in "
9499 "B<proc>(5)."
9500 msgstr "B<proc>(5) の I</proc/sys/kernel/shm_rmid_forced> の説明も参照のこと。"
9501
9502 #. type: TP
9503 #: build/C/man2/shmctl.2:165
9504 #, no-wrap
9505 msgid "B<IPC_INFO> (Linux-specific)"
9506 msgstr "B<IPC_INFO> (Linux 固有)"
9507
9508 #. type: Plain text
9509 #: build/C/man2/shmctl.2:178
9510 msgid ""
9511 "Return information about system-wide shared memory limits and parameters in "
9512 "the structure pointed to by I<buf>.  This structure is of type I<shminfo> "
9513 "(thus, a cast is required), defined in I<E<lt>sys/shm.hE<gt>> if the "
9514 "B<_GNU_SOURCE> feature test macro is defined:"
9515 msgstr ""
9516 "システム全体での共有メモリの制限とパラメータに関する情報を、 I<buf> が指す構"
9517 "造体に入れて返す。 この構造体は I<shminfo> 型である (そのためキャストが必要で"
9518 "ある)。 I<shminfo> は B<_GNU_SOURCE> 機能検査マクロが定義された場合に "
9519 "I<E<lt>sys/shm.hE<gt>> で以下のように定義される:"
9520
9521 #. type: Plain text
9522 #: build/C/man2/shmctl.2:192
9523 #, no-wrap
9524 msgid ""
9525 "struct shminfo {\n"
9526 "    unsigned long shmmax; /* Maximum segment size */\n"
9527 "    unsigned long shmmin; /* Minimum segment size;\n"
9528 "                             always 1 */\n"
9529 "    unsigned long shmmni; /* Maximum number of segments */\n"
9530 "    unsigned long shmseg; /* Maximum number of segments\n"
9531 "                             that a process can attach;\n"
9532 "                             unused within kernel */\n"
9533 "    unsigned long shmall; /* Maximum number of pages of\n"
9534 "                             shared memory, system-wide */\n"
9535 "};\n"
9536 msgstr ""
9537 "struct  shminfo {\n"
9538 "    unsigned long shmmax; /* 最大セグメントサイズ */\n"
9539 "    unsigned long shmmin; /* 最小セグメントサイズ。\n"
9540 "                             常に 1 */\n"
9541 "    unsigned long shmmni; /* 最大セグメント数 */\n"
9542 "    unsigned long shmseg; /* プロセスが付加できる\n"
9543 "                             セグメントの最大数。\n"
9544 "                             カーネル内では未使用 */\n"
9545 "    unsigned long shmall; /* 共有メモリの最大ページ数。\n"
9546 "                             システム全体での値 */\n"
9547 "};\n"
9548
9549 #. type: Plain text
9550 #: build/C/man2/shmctl.2:205
9551 msgid ""
9552 "The I<shmmni>, I<shmmax>, and I<shmall> settings can be changed via I</proc> "
9553 "files of the same name; see B<proc>(5)  for details."
9554 msgstr ""
9555 "設定 I<shmmni>, I<shmmax>, I<shmall> は I</proc> にある同じ名前のファイル経由"
9556 "で変更可能である。 詳しくは B<proc>(5)  を参照。"
9557
9558 #. type: TP
9559 #: build/C/man2/shmctl.2:205
9560 #, no-wrap
9561 msgid "B<SHM_INFO> (Linux-specific)"
9562 msgstr "B<SHM_INFO> (Linux 固有)"
9563
9564 #. type: Plain text
9565 #: build/C/man2/shmctl.2:216
9566 msgid ""
9567 "Return a I<shm_info> structure whose fields contain information about system "
9568 "resources consumed by shared memory.  This structure is defined in "
9569 "I<E<lt>sys/shm.hE<gt>> if the B<_GNU_SOURCE> feature test macro is defined:"
9570 msgstr ""
9571 "共有メモリが消費しているシステム資源に関する情報を 格納した I<shm_info> 構造"
9572 "体を返す。 この構造体は、 B<_GNU_SOURCE> 機能検査マクロが定義された場合に "
9573 "I<E<lt>sys/shm.hE<gt>> で以下のように定義される:"
9574
9575 #. type: Plain text
9576 #: build/C/man2/shmctl.2:233
9577 #, no-wrap
9578 msgid ""
9579 "struct shm_info {\n"
9580 "    int           used_ids; /* # of currently existing\n"
9581 "                               segments */\n"
9582 "    unsigned long shm_tot;  /* Total number of shared\n"
9583 "                               memory pages */\n"
9584 "    unsigned long shm_rss;  /* # of resident shared\n"
9585 "                               memory pages */\n"
9586 "    unsigned long shm_swp;  /* # of swapped shared\n"
9587 "                               memory pages */\n"
9588 "    unsigned long swap_attempts;\n"
9589 "                            /* Unused since Linux 2.4 */\n"
9590 "    unsigned long swap_successes;\n"
9591 "                            /* Unused since Linux 2.4 */\n"
9592 "};\n"
9593 msgstr ""
9594 "struct shm_info {\n"
9595 "    int           used_ids; /* 現在存在するセグメント数 */\n"
9596 "    unsigned long shm_tot;  /* 共有メモリのページ総数 */\n"
9597 "    unsigned long shm_rss;  /* メモリ上にある (スワップされて\n"
9598 "                               いない) 共有メモリページ数 */\n"
9599 "    unsigned long shm_swp;  /* スワップされている共有メモリ\n"
9600 "                               ページ数 */\n"
9601 "    unsigned long swap_attempts;\n"
9602 "                            /* Linux 2.4 以降では未使用 */\n"
9603 "    unsigned long swap_successes;\n"
9604 "                            /* Linux 2.4 以降では未使用 */\n"
9605 "};\n"
9606
9607 #. type: TP
9608 #: build/C/man2/shmctl.2:235
9609 #, no-wrap
9610 msgid "B<SHM_STAT> (Linux-specific)"
9611 msgstr "B<SHM_STAT> (Linux 固有)"
9612
9613 #. type: Plain text
9614 #: build/C/man2/shmctl.2:246
9615 msgid ""
9616 "Return a I<shmid_ds> structure as for B<IPC_STAT>.  However, the I<shmid> "
9617 "argument is not a segment identifier, but instead an index into the kernel's "
9618 "internal array that maintains information about all shared memory segments "
9619 "on the system."
9620 msgstr ""
9621 "B<IPC_STAT> と同じく I<shmid_ds> 構造体を返す。 但し、 I<shmid> 引き数は、セ"
9622 "グメント識別子ではなく、システム上の全ての共有メモリ セグメントに関する情報を"
9623 "管理するカーネルの内部配列へのインデックス である。"
9624
9625 #. type: Plain text
9626 #: build/C/man2/shmctl.2:249
9627 msgid ""
9628 "The caller can prevent or allow swapping of a shared memory segment with the "
9629 "following I<cmd> values:"
9630 msgstr ""
9631 "呼び出し元は、I<cmd> に以下の値を指定することで、共有メモリ・セグメントが ス"
9632 "ワップされることを防止したり、許可したりできる:"
9633
9634 #. type: TP
9635 #: build/C/man2/shmctl.2:250
9636 #, no-wrap
9637 msgid "B<SHM_LOCK> (Linux-specific)"
9638 msgstr "B<SHM_LOCK> (Linux 固有)"
9639
9640 #. type: Plain text
9641 #: build/C/man2/shmctl.2:262
9642 msgid ""
9643 "Prevent swapping of the shared memory segment.  The caller must fault in any "
9644 "pages that are required to be present after locking is enabled.  If a "
9645 "segment has been locked, then the (nonstandard)  B<SHM_LOCKED> flag of the "
9646 "I<shm_perm.mode> field in the associated data structure retrieved by "
9647 "B<IPC_STAT> will be set."
9648 msgstr ""
9649 "共有メモリ・セグメントをスワップすることを防止する。 ロックが有効になった後、"
9650 "呼び出し元は、 存在することが要求された全てのページをフォールトさせなければな"
9651 "らない。 セグメントがロックされると、 関連するデータ構造体において "
9652 "I<shm_perm.mode> フィールドの (標準的ではない)  B<SHM_LOCKED> フラグが設定さ"
9653 "れる。 このデータ構造体は B<IPC_STAT> で取得される。"
9654
9655 #. type: TP
9656 #: build/C/man2/shmctl.2:262
9657 #, no-wrap
9658 msgid "B<SHM_UNLOCK> (Linux-specific)"
9659 msgstr "B<SHM_UNLOCK> (Linux 固有)"
9660
9661 #. type: Plain text
9662 #: build/C/man2/shmctl.2:265
9663 msgid "Unlock the segment, allowing it to be swapped out."
9664 msgstr "セグメントのロックを解除し、スワップ・アウトすることを可能にする。"
9665
9666 #.  There was some weirdness in 2.6.9: SHM_LOCK and SHM_UNLOCK could
9667 #.  be applied to a segment, regardless of ownership of the segment.
9668 #.  This was a botch-up in the move to RLIMIT_MEMLOCK, and was fixed
9669 #.  in 2.6.10.  MTK, May 2005
9670 #. type: Plain text
9671 #: build/C/man2/shmctl.2:283
9672 msgid ""
9673 "In kernels before 2.6.10, only a privileged process could employ B<SHM_LOCK> "
9674 "and B<SHM_UNLOCK>.  Since kernel 2.6.10, an unprivileged process can employ "
9675 "these operations if its effective UID matches the owner or creator UID of "
9676 "the segment, and (for B<SHM_LOCK>)  the amount of memory to be locked falls "
9677 "within the B<RLIMIT_MEMLOCK> resource limit (see B<setrlimit>(2))."
9678 msgstr ""
9679 "2.6.10 より前のカーネルでは、特権プロセスだけが B<SHM_LOCK> と B<SHM_UNLOCK> "
9680 "を利用することができた。 2.6.10 以降のカーネルでは、非特権プロセスであっても"
9681 "次の条件を満たせば これらの操作を利用することができる。その条件とは、プロセス"
9682 "の実効 UID がそのセグメントの所有者もしくは作成者の UID と一致し、 "
9683 "(B<SHM_LOCK> の場合には) ロックするメモリの合計が B<RLIMIT_MEMLOCK> リソース"
9684 "上限 (B<setrlimit>(2)  参照) の範囲内に入っていることである。"
9685
9686 #. type: Plain text
9687 #: build/C/man2/shmctl.2:301
9688 msgid ""
9689 "A successful B<IPC_INFO> or B<SHM_INFO> operation returns the index of the "
9690 "highest used entry in the kernel's internal array recording information "
9691 "about all shared memory segments.  (This information can be used with "
9692 "repeated B<SHM_STAT> operations to obtain information about all shared "
9693 "memory segments on the system.)  A successful B<SHM_STAT> operation returns "
9694 "the identifier of the shared memory segment whose index was given in "
9695 "I<shmid>.  Other operations return 0 on success."
9696 msgstr ""
9697 "B<IPC_INFO> と B<SHM_INFO> 操作は、成功すると、全ての共有メモリセグメントに関"
9698 "する情報を 管理しているカーネルの内部配列の使用中エントリのインデックスの う"
9699 "ち最大値を返す (この情報は、システムの全ての共有メモリセグメントに関する情報"
9700 "を 取得するために、 B<SHM_STAT> 操作を繰り返し実行する際に使用できる)。 "
9701 "B<SHM_STAT> 操作は、成功すると、 I<shmid> で指定されたインデックスを持つ共有"
9702 "メモリセグメントの識別子を返す。 他の操作は、成功の場合 0 を返す。"
9703
9704 #. type: Plain text
9705 #: build/C/man2/shmctl.2:305
9706 msgid "On error, -1 is returned, and I<errno> is set appropriately."
9707 msgstr "エラーの場合は -1 を返し、 I<errno> を適切に設定する。"
9708
9709 #. type: Plain text
9710 #: build/C/man2/shmctl.2:314
9711 msgid ""
9712 "B<IPC_STAT> or B<SHM_STAT> is requested and I<shm_perm.mode> does not allow "
9713 "read access for I<shmid>, and the calling process does not have the "
9714 "B<CAP_IPC_OWNER> capability."
9715 msgstr ""
9716 "B<IPC_STAT> または B<SHM_STAT> が要求され、 I<shm_perm.mode> が I<shmid> への"
9717 "読み込みアクセスを許しておらず、 かつ呼び出したプロセスが B<CAP_IPC_OWNER> "
9718 "ケーパビリティ (capability) を持っていない。"
9719
9720 #. type: Plain text
9721 #: build/C/man2/shmctl.2:325
9722 msgid ""
9723 "The argument I<cmd> has value B<IPC_SET> or B<IPC_STAT> but the address "
9724 "pointed to by I<buf> isn't accessible."
9725 msgstr ""
9726 "I<cmd> 引き数に B<IPC_SET> か B<IPC_STAT> が指定されたが I<buf> で指されてい"
9727 "るアドレスにアクセスできない。"
9728
9729 #. type: TP
9730 #: build/C/man2/shmctl.2:325 build/C/man2/shmop.2:194
9731 #, no-wrap
9732 msgid "B<EIDRM>"
9733 msgstr "B<EIDRM>"
9734
9735 #. type: Plain text
9736 #: build/C/man2/shmctl.2:328 build/C/man2/shmop.2:197
9737 msgid "I<shmid> points to a removed identifier."
9738 msgstr "I<shmid> が削除 (remove) された識別子 (identifier) を指している。"
9739
9740 #. type: Plain text
9741 #: build/C/man2/shmctl.2:337
9742 msgid ""
9743 "I<shmid> is not a valid identifier, or I<cmd> is not a valid command.  Or: "
9744 "for a B<SHM_STAT> operation, the index value specified in I<shmid> referred "
9745 "to an array slot that is currently unused."
9746 msgstr ""
9747 "I<shmid> が有効な識別子でないか、 I<cmd> が有効なコマンドでない。 もしくは、 "
9748 "B<SHM_STAT> 操作の場合に、 I<shmid> で指定されたインデックス値が現在未使用の"
9749 "配列のスロットを参照していた。"
9750
9751 #. type: Plain text
9752 #: build/C/man2/shmctl.2:348
9753 msgid ""
9754 "(In kernels since 2.6.9), B<SHM_LOCK> was specified and the size of the to-"
9755 "be-locked segment would mean that the total bytes in locked shared memory "
9756 "segments would exceed the limit for the real user ID of the calling "
9757 "process.  This limit is defined by the B<RLIMIT_MEMLOCK> soft resource limit "
9758 "(see B<setrlimit>(2))."
9759 msgstr ""
9760 "(2.6.9 以降のカーネルにおいて)  B<SHM_LOCK> が指定され、 ロックされる予定のセ"
9761 "グメントのサイズ (ロックされる共有メモリ・セグメントの合計バイト数) が、 呼び"
9762 "出したプロセスの実ユーザー ID についての制限を超えた。 この制限は "
9763 "B<RLIMIT_MEMLOCK> ソフト資源制限で定義される (B<setrlimit>(2)  を参照)。"
9764
9765 #. type: Plain text
9766 #: build/C/man2/shmctl.2:353
9767 msgid ""
9768 "B<IPC_STAT> is attempted, and the GID or UID value is too large to be stored "
9769 "in the structure pointed to by I<buf>."
9770 msgstr ""
9771 "B<IPC_STAT> が試みられ、GID や UID の値が I<buf> で指示される構造体に格納する"
9772 "には大き過ぎる。"
9773
9774 #. type: Plain text
9775 #: build/C/man2/shmctl.2:365
9776 msgid ""
9777 "B<IPC_SET> or B<IPC_RMID> is attempted, and the effective user ID of the "
9778 "calling process is not that of the creator (found in I<shm_perm.cuid>), or "
9779 "the owner (found in I<shm_perm.uid>), and the process was not privileged "
9780 "(Linux: did not have the B<CAP_SYS_ADMIN> capability)."
9781 msgstr ""
9782 "B<IPC_SET> か B<IPC_RMID> が試みられ、 呼び出したプロセスの実効ユーザー ID が"
9783 "作成者 (I<shm_perm.cuid>)  でも所有者 (I<shm_perm.uid>)  でもなく、プロセスが"
9784 "特権を持たない (Linux では B<CAP_SYS_ADMIN> ケーパビリティを持たない)。"
9785
9786 #. type: Plain text
9787 #: build/C/man2/shmctl.2:377
9788 msgid ""
9789 "Or (in kernels before 2.6.9), B<SHM_LOCK> or B<SHM_UNLOCK> was specified, "
9790 "but the process was not privileged (Linux: did not have the B<CAP_IPC_LOCK> "
9791 "capability).  (Since Linux 2.6.9, this error can also occur if the "
9792 "B<RLIMIT_MEMLOCK> is 0 and the caller is not privileged.)"
9793 msgstr ""
9794 "または (2.6.9 より前のカーネルで)  B<SHM_LOCK> または B<SHM_UNLOCK> が指定さ"
9795 "れているが、プロセスが特権を持たない (Linux では B<CAP_IPC_LOCK> ケーパビリ"
9796 "ティを持たない)。 (Linux 2.6.9 以降では、 B<RLIMIT_MEMLOCK> が 0 で呼び出し元"
9797 "が特権を持たない場合にも、このエラーが起こる。)"
9798
9799 #.  SVr4 documents an additional error condition EMFILE.
9800 #. type: Plain text
9801 #: build/C/man2/shmctl.2:382 build/C/man2/shmget.2:251
9802 #: build/C/man2/shmop.2:231
9803 msgid "SVr4, POSIX.1-2001."
9804 msgstr "SVr4, POSIX.1-2001."
9805
9806 #.  Like Linux, the FreeBSD man pages still document
9807 #.  the inclusion of these header files.
9808 #. type: Plain text
9809 #: build/C/man2/shmctl.2:395 build/C/man2/shmget.2:269
9810 msgid ""
9811 "The inclusion of I<E<lt>sys/types.hE<gt>> and I<E<lt>sys/ipc.hE<gt>> isn't "
9812 "required on Linux or by any version of POSIX.  However, some old "
9813 "implementations required the inclusion of these header files, and the SVID "
9814 "also documented their inclusion.  Applications intended to be portable to "
9815 "such old systems may need to include these header files."
9816 msgstr ""
9817 "Linux や POSIX の全てのバージョンでは、 I<E<lt>sys/types.hE<gt>> と "
9818 "I<E<lt>sys/ipc.hE<gt>> のインクルードは必要ない。しかしながら、いくつかの古い"
9819 "実装ではこれらのヘッダファイルのインクルードが必要であり、 SVID でもこれらの"
9820 "インクルードをするように記載されている。このような古いシステムへの移植性を意"
9821 "図したアプリケーションではこれらのファイルをインクルードする必要があるかもし"
9822 "れない。"
9823
9824 #. type: Plain text
9825 #: build/C/man2/shmctl.2:407
9826 msgid ""
9827 "The B<IPC_INFO>, B<SHM_STAT> and B<SHM_INFO> operations are used by the "
9828 "B<ipcs>(1)  program to provide information on allocated resources.  In the "
9829 "future, these may modified or moved to a I</proc> filesystem interface."
9830 msgstr ""
9831 "B<IPC_INFO>, B<SHM_STAT>, B<SHM_INFO> 操作は、 B<ipcs>(1)  プログラムで割り当"
9832 "て済の資源に関する情報を提供するために 使用されている。将来、これらの操作は変"
9833 "更されたり、 I</proc> ファイルシステムのインタフェースに移動されるかもしれな"
9834 "い。"
9835
9836 #. type: Plain text
9837 #: build/C/man2/shmctl.2:415
9838 msgid ""
9839 "Linux permits a process to attach (B<shmat>(2))  a shared memory segment "
9840 "that has already been marked for deletion using I<shmctl(IPC_RMID)>.  This "
9841 "feature is not available on other UNIX implementations; portable "
9842 "applications should avoid relying on it."
9843 msgstr ""
9844 "Linux では、 I<shmctl(IPC_RMID)> を使ってすでに削除マークがつけられている共有"
9845 "メモリ・セグメントを あるプロセスが付加 (attach)  (B<shmat>(2))  することを許"
9846 "可している。 この機能は他の UNIX の実装では利用できない。 移植性を考慮したア"
9847 "プリケーションではこれに依存しないようにすべきである。"
9848
9849 #. type: Plain text
9850 #: build/C/man2/shmctl.2:428
9851 msgid ""
9852 "Various fields in a I<struct shmid_ds> were typed as I<short> under Linux "
9853 "2.2 and have become I<long> under Linux 2.4.  To take advantage of this, a "
9854 "recompilation under glibc-2.1.91 or later should suffice.  (The kernel "
9855 "distinguishes old and new calls by an B<IPC_64> flag in I<cmd>.)"
9856 msgstr ""
9857 "I<構造体 shmid_ds> 内の多くのフィールドは、 Linux 2.2 では I<short> 型だった"
9858 "が、Linux 2.4 では I<long> 型になった。 この利点を生かすには、glibc-2.1.91 以"
9859 "降の環境下で 再コンパイルすれば十分である。 カーネルは新しい形式の呼び出しと"
9860 "古い形式の呼び出しを I<cmd> 内の B<IPC_64> フラグで区別する。"
9861
9862 #. type: Plain text
9863 #: build/C/man2/shmctl.2:435
9864 msgid ""
9865 "B<mlock>(2), B<setrlimit>(2), B<shmget>(2), B<shmop>(2), B<capabilities>(7), "
9866 "B<svipc>(7)"
9867 msgstr ""
9868 "B<mlock>(2), B<setrlimit>(2), B<shmget>(2), B<shmop>(2), B<capabilities>(7), "
9869 "B<shm_overview>(7), B<svipc>(7)"
9870
9871 #. type: TH
9872 #: build/C/man2/shmget.2:38
9873 #, no-wrap
9874 msgid "SHMGET"
9875 msgstr "SHMGET"
9876
9877 #. type: TH
9878 #: build/C/man2/shmget.2:38
9879 #, no-wrap
9880 msgid "2014-05-21"
9881 msgstr "2014-05-21"
9882
9883 #. type: Plain text
9884 #: build/C/man2/shmget.2:41
9885 msgid "shmget - allocates a System V shared memory segment"
9886 msgstr "shmget - System V 共有メモリ・セグメントを割り当てる"
9887
9888 #. type: Plain text
9889 #: build/C/man2/shmget.2:48
9890 msgid "B<int shmget(key_t >I<key>B<, size_t >I<size>B<, int >I<shmflg>B<);>"
9891 msgstr "B<int shmget(key_t >I<key>B<, size_t >I<size>B<, int >I<shmflg>B<);>"
9892
9893 #. type: Plain text
9894 #: build/C/man2/shmget.2:72
9895 msgid ""
9896 "B<shmget>()  returns the identifier of the System\\ V shared memory segment "
9897 "associated with the value of the argument I<key>.  A new shared memory "
9898 "segment, with size equal to the value of I<size> rounded up to a multiple of "
9899 "B<PAGE_SIZE>, is created if I<key> has the value B<IPC_PRIVATE> or I<key> "
9900 "isn't B<IPC_PRIVATE>, no shared memory segment corresponding to I<key> "
9901 "exists, and B<IPC_CREAT> is specified in I<shmflg>."
9902 msgstr ""
9903 "B<shmget>()  は I<key> 引き数に対応する System\\ V 共有メモリ・セグメントの識"
9904 "別子を返す。 I<key> の値が B<IPC_PRIVATE> の場合、もしくは I<key> に対応する"
9905 "共有メモリ・セグメントが存在せず、 I<shmflg> に B<IPC_CREAT> が指定されていた"
9906 "場合、 新しい共有メモリ・セグメントを作成する。 作成される共有メモリ・セグメ"
9907 "ントは、 I<size> 引き数の値を B<PAGE_SIZE> の倍数へと切り上げた (round up) 大"
9908 "きさとなる。"
9909
9910 #. type: Plain text
9911 #: build/C/man2/shmget.2:91
9912 msgid ""
9913 "If I<shmflg> specifies both B<IPC_CREAT> and B<IPC_EXCL> and a shared memory "
9914 "segment already exists for I<key>, then B<shmget>()  fails with I<errno> set "
9915 "to B<EEXIST>.  (This is analogous to the effect of the combination B<O_CREAT "
9916 "| O_EXCL> for B<open>(2).)"
9917 msgstr ""
9918 "I<shmflg> に B<IPC_CREAT> と B<IPC_EXCL> の両方が指定された場合、 I<key> に対"
9919 "応する共有メモリ・セグメントが既に存在すると、 B<shmget>()  は失敗し、 "
9920 "I<errno> に B<EEXIST> が設定される (これは B<open>(2)  に B<O_CREAT | "
9921 "O_EXCL> を指定した場合の動作と同じである)。"
9922
9923 #. type: Plain text
9924 #: build/C/man2/shmget.2:95
9925 msgid "The value I<shmflg> is composed of:"
9926 msgstr "I<shmflg> は以下の内容から構成される:"
9927
9928 #. type: TP
9929 #: build/C/man2/shmget.2:95
9930 #, no-wrap
9931 msgid "B<IPC_CREAT>"
9932 msgstr "B<IPC_CREAT>"
9933
9934 #. type: Plain text
9935 #: build/C/man2/shmget.2:102
9936 msgid ""
9937 "Create a new segment.  If this flag is not used, then B<shmget>()  will find "
9938 "the segment associated with I<key> and check to see if the user has "
9939 "permission to access the segment."
9940 msgstr ""
9941 "新しいセグメントを作成する。このフラグが指定されなかった場合、 B<shmget>()  "
9942 "は I<key> に対応するセグメントを探し、 ユーザがそのセグメントにアクセスする許"
9943 "可があるかどうかをチェックする。"
9944
9945 #. type: TP
9946 #: build/C/man2/shmget.2:102
9947 #, no-wrap
9948 msgid "B<IPC_EXCL>"
9949 msgstr "B<IPC_EXCL>"
9950
9951 #. type: Plain text
9952 #: build/C/man2/shmget.2:108
9953 #, fuzzy
9954 #| msgid ""
9955 #| "used with B<IPC_CREAT> to ensure failure if the segment already exists."
9956 msgid ""
9957 "This flag is used with B<IPC_CREAT> to ensure that this call creates the "
9958 "segment.  If the segment already exists, the call fails."
9959 msgstr ""
9960 "B<IPC_CREAT> と共に使用し、セグメントが既に存在した場合には 失敗することを保"
9961 "証する。"
9962
9963 #. type: TP
9964 #: build/C/man2/shmget.2:108
9965 #, no-wrap
9966 msgid "B<SHM_HUGETLB> (since Linux 2.6)"
9967 msgstr "B<SHM_HUGETLB> (Linux 2.6 以降)"
9968
9969 #. type: Plain text
9970 #: build/C/man2/shmget.2:114
9971 msgid ""
9972 "Allocate the segment using \"huge pages.\" See the Linux kernel source file "
9973 "I<Documentation/vm/hugetlbpage.txt> for further information."
9974 msgstr ""
9975 "\"ヒュージページ (huge page)\" を使うセグメントを割り当てる。詳細な情報は、"
9976 "Linux カーネルソースのファイル I<Documentation/vm/hugetlbpage.txt> を参照。"
9977
9978 #. type: TP
9979 #: build/C/man2/shmget.2:114
9980 #, no-wrap
9981 msgid "B<SHM_NORESERVE> (since Linux 2.6.15)"
9982 msgstr "B<SHM_NORESERVE> (Linux 2.6.15 以降)"
9983
9984 #.  As at 2.6.17-rc2, this flag has no effect if SHM_HUGETLB was also
9985 #.  specified.
9986 #. type: Plain text
9987 #: build/C/man2/shmget.2:133
9988 msgid ""
9989 "This flag serves the same purpose as the B<mmap>(2)  B<MAP_NORESERVE> flag.  "
9990 "Do not reserve swap space for this segment.  When swap space is reserved, "
9991 "one has the guarantee that it is possible to modify the segment.  When swap "
9992 "space is not reserved one might get B<SIGSEGV> upon a write if no physical "
9993 "memory is available.  See also the discussion of the file I</proc/sys/vm/"
9994 "overcommit_memory> in B<proc>(5)."
9995 msgstr ""
9996 "このフラグは、 B<mmap>(2)  の B<MAP_NORESERVE> フラグと同じ役割を果たす。 こ"
9997 "のセグメントに対するスワップ空間の予約を行わない。 スワップ空間を予約した場合"
9998 "は、そのセグメントの変更が必ず成功することが 保証される。スワップ空間の予約を"
9999 "行わなかった場合は、物理メモリに空きが ないと書き込み時に B<SIGSEGV> を受け取"
10000 "る可能性がある。 B<proc>(5)  にある I</proc/sys/vm/overcommit_memory> ファイ"
10001 "ルに関する議論も参照のこと。"
10002
10003 #. type: Plain text
10004 #: build/C/man2/shmget.2:143
10005 #, fuzzy
10006 #| msgid ""
10007 #| "(least significant 9 bits)  specifying the permissions granted to the "
10008 #| "owner, group, and world.  These bits have the same format, and the same "
10009 #| "meaning, as the I<mode> argument of B<open>(2).  Presently, the execute "
10010 #| "permissions are not used by the system."
10011 msgid ""
10012 "In addition to the above flags, the least significant 9 bits of I<shmflg> "
10013 "specify the permissions granted to the owner, group, and others.  These bits "
10014 "have the same format, and the same meaning, as the I<mode> argument of "
10015 "B<open>(2).  Presently, execute permissions are not used by the system."
10016 msgstr ""
10017 "(下位 9 ビット)  所有者、グループ、他人 (world) への許可を指定する。 これらの"
10018 "ビットは B<open>(2)  の I<mode> 引き数と同じ形式で同じ意味を持つ。 今のとこ"
10019 "ろ、システムは実行 (execute) 許可を参照しない。"
10020
10021 #. type: Plain text
10022 #: build/C/man2/shmget.2:151
10023 msgid ""
10024 "When a new shared memory segment is created, its contents are initialized to "
10025 "zero values, and its associated data structure, I<shmid_ds> (see "
10026 "B<shmctl>(2)), is initialized as follows:"
10027 msgstr ""
10028 "共有メモリ・セグメントが新たに作成される際、 共有メモリ・セグメントの内容は "
10029 "0 で初期化され、 関連情報を保持するデータ構造体 I<shmid_ds> は以下のように初"
10030 "期化される。"
10031
10032 #. type: Plain text
10033 #: build/C/man2/shmget.2:156
10034 msgid ""
10035 "I<shm_perm.cuid> and I<shm_perm.uid> are set to the effective user ID of the "
10036 "calling process."
10037 msgstr ""
10038 "I<shm_perm.cuid> と I<shm_perm.uid> に呼び出し元プロセスの実効 (effective) "
10039 "ユーザーID を設定する。"
10040
10041 #. type: Plain text
10042 #: build/C/man2/shmget.2:161
10043 msgid ""
10044 "I<shm_perm.cgid> and I<shm_perm.gid> are set to the effective group ID of "
10045 "the calling process."
10046 msgstr ""
10047 "I<shm_perm.cgid> と I<shm_perm.gid> に呼び出し元プロセスの実効グループID を設"
10048 "定する。"
10049
10050 #. type: Plain text
10051 #: build/C/man2/shmget.2:166
10052 msgid ""
10053 "The least significant 9 bits of I<shm_perm.mode> are set to the least "
10054 "significant 9 bit of I<shmflg>."
10055 msgstr ""
10056 "I<shm_perm.mode> の下位 9 ビットに I<shmflg> の下位 9 ビットを設定する。"
10057
10058 #. type: Plain text
10059 #: build/C/man2/shmget.2:170
10060 msgid "I<shm_segsz> is set to the value of I<size>."
10061 msgstr "I<shm_segsz> に I<size> の値を設定する。"
10062
10063 #. type: Plain text
10064 #: build/C/man2/shmget.2:177
10065 msgid ""
10066 "I<shm_lpid>, I<shm_nattch>, I<shm_atime>, and I<shm_dtime> are set to 0."
10067 msgstr ""
10068 "I<shm_lpid>, I<shm_nattch>, I<shm_atime>, I<shm_dtime> に 0 を設定する。"
10069
10070 #. type: Plain text
10071 #: build/C/man2/shmget.2:180
10072 msgid "I<shm_ctime> is set to the current time."
10073 msgstr "I<shm_ctime> に現在の時刻を設定する。"
10074
10075 #. type: Plain text
10076 #: build/C/man2/shmget.2:183
10077 msgid ""
10078 "If the shared memory segment already exists, the permissions are verified, "
10079 "and a check is made to see if it is marked for destruction."
10080 msgstr ""
10081 "共有メモリ・セグメントが既に存在する場合、アクセス許可の検査と、 破壊 "
10082 "(destruction) マークがつけられていないかのチェックが行われる。"
10083
10084 #. type: Plain text
10085 #: build/C/man2/shmget.2:188
10086 msgid ""
10087 "On success, a valid shared memory identifier is returned.  On error, -1 is "
10088 "returned, and I<errno> is set to indicate the error."
10089 msgstr ""
10090 "成功の場合、有効な共有メモリ・セグメントの識別子が返される。 エラーの場合、 "
10091 "-1 が返り、 I<error> にエラーを示す値が設定される。"
10092
10093 #. type: Plain text
10094 #: build/C/man2/shmget.2:192
10095 msgid "On failure, I<errno> is set to one of the following:"
10096 msgstr "失敗した場合は I<errno> が以下のどれかに設定される:"
10097
10098 #. type: Plain text
10099 #: build/C/man2/shmget.2:198
10100 msgid ""
10101 "The user does not have permission to access the shared memory segment, and "
10102 "does not have the B<CAP_IPC_OWNER> capability."
10103 msgstr ""
10104 "ユーザーはその共有メモリ・セグメントへのアクセス許可を持たず、 "
10105 "B<CAP_IPC_OWNER> ケーパビリティも持っていない。"
10106
10107 #. type: Plain text
10108 #: build/C/man2/shmget.2:207
10109 #, fuzzy
10110 #| msgid ""
10111 #| "Both B<O_CREAT> and B<O_EXCL> were specified to B<shm_open>()  and the "
10112 #| "shared memory object specified by I<name> already exists."
10113 msgid ""
10114 "B<IPC_CREAT> and B<IPC_EXCL> were specified in I<shmflg>, but a shared "
10115 "memory segment already exists for I<key>."
10116 msgstr ""
10117 "B<O_CREAT> と B<O_EXCL> の両方が B<shm_open>()  に指定されたが、 I<name> で指"
10118 "定された共有メモリ・オブジェクトが既に存在した。"
10119
10120 #. type: Plain text
10121 #: build/C/man2/shmget.2:215
10122 msgid ""
10123 "A new segment was to be created and I<size> is less than B<SHMIN> or greater "
10124 "than B<SHMMAX>."
10125 msgstr ""
10126
10127 #. type: Plain text
10128 #: build/C/man2/shmget.2:221
10129 #, fuzzy
10130 #| msgid ""
10131 #| "A new segment was to be created and I<size> E<lt> B<SHMMIN> or I<size> "
10132 #| "E<gt> B<SHMMAX>, or no new segment was to be created, a segment with "
10133 #| "given key existed, but I<size> is greater than the size of that segment."
10134 msgid ""
10135 "A segment for the given I<key> exists, but I<size> is greater than the size "
10136 "of that segment."
10137 msgstr ""
10138 "新しいセグメントを作成しようとした際に I<size> E<lt> B<SHMMIN> または "
10139 "I<size> E<gt> B<SHMMAX> であった。 もしくは、指定されたキーに対応するセグメン"
10140 "トが既に存在して、新しい セグメントを作成しようとはしなかったが、I<size> が存"
10141 "在するセグメントの サイズよりも大きかった。"
10142
10143 #. type: Plain text
10144 #: build/C/man2/shmget.2:230
10145 msgid ""
10146 "No segment exists for the given I<key>, and B<IPC_CREAT> was not specified."
10147 msgstr ""
10148 "指定された I<key> に対応するセグメントが存在せず、 B<IPC_CREAT> も指定されて"
10149 "いなかった。"
10150
10151 #. type: Plain text
10152 #: build/C/man2/shmget.2:233
10153 msgid "No memory could be allocated for segment overhead."
10154 msgstr "セグメントの管理情報 (overhead) に割り当てるメモリがなかった。"
10155
10156 #. type: Plain text
10157 #: build/C/man2/shmget.2:241
10158 msgid ""
10159 "All possible shared memory IDs have been taken (B<SHMMNI>), or allocating a "
10160 "segment of the requested I<size> would cause the system to exceed the system-"
10161 "wide limit on shared memory (B<SHMALL>)."
10162 msgstr ""
10163 "システム全体の共有メモリ・セグメント数の制限 (B<SHMMNI>)  に達した、または要"
10164 "求された I<size> のセグメントの割り当てが システム全体の共有メモリサイズの制"
10165 "限 (B<SHMALL>)  を超過した。"
10166
10167 #. type: Plain text
10168 #: build/C/man2/shmget.2:248
10169 msgid ""
10170 "The B<SHM_HUGETLB> flag was specified, but the caller was not privileged "
10171 "(did not have the B<CAP_IPC_LOCK> capability)."
10172 msgstr ""
10173 "B<SHM_HUGETLB> フラグが指定されたが、呼び出し元には権限がなかった "
10174 "(B<CAP_IPC_LOCK> ケーパビリティを持っていなかった)。"
10175
10176 #. type: Plain text
10177 #: build/C/man2/shmget.2:256
10178 msgid "B<SHM_HUGETLB> and B<SHM_NORESERVE> are Linux extensions."
10179 msgstr "B<SHM_HUGETLB> と B<SHM_NORESERVE> は Linux での拡張である。"
10180
10181 #. type: Plain text
10182 #: build/C/man2/shmget.2:280
10183 msgid ""
10184 "B<IPC_PRIVATE> isn't a flag field but a I<key_t> type.  If this special "
10185 "value is used for I<key>, the system call ignores all but the least "
10186 "significant 9 bits of I<shmflg> and creates a new shared memory segment."
10187 msgstr ""
10188 "B<IPC_PRIVATE> はフラグではなく I<key_t> 型である。 この特別な値が I<key> に"
10189 "使用された場合は、 B<shmget>()  は I<shmflg> の下位 9 ビットを除いた全てを無"
10190 "視し、 新しい共有メモリ・セグメントを作成する。"
10191
10192 #. type: SS
10193 #: build/C/man2/shmget.2:280
10194 #, no-wrap
10195 msgid "Shared memory limits"
10196 msgstr ""
10197
10198 #. type: Plain text
10199 #: build/C/man2/shmget.2:284
10200 msgid ""
10201 "The following limits on shared memory segment resources affect the "
10202 "B<shmget>()  call:"
10203 msgstr ""
10204 "B<shmget>()  コールに影響する共有メモリ・セグメント資源の制限は以下の通りであ"
10205 "る:"
10206
10207 #. type: TP
10208 #: build/C/man2/shmget.2:284
10209 #, no-wrap
10210 msgid "B<SHMALL>"
10211 msgstr "B<SHMALL>"
10212
10213 #. type: Plain text
10214 #: build/C/man2/shmget.2:288
10215 msgid ""
10216 "System-wide limit on the number of shared memory pages.  Since Linux 2.4, "
10217 "the default value for this limit is"
10218 msgstr ""
10219 "システム全体の共有メモリ・ページ数の上限値。 Linux 2.2 以降では、この上限値の"
10220 "デフォルトは以下である。"
10221
10222 #. type: Plain text
10223 #: build/C/man2/shmget.2:290
10224 #, no-wrap
10225 msgid "    SHMMAX / PAGE_SIZE * (SHMMNI / 16)\n"
10226 msgstr "    SHMMAX / PAGE_SIZE * (SHMMNI / 16)\n"
10227
10228 #. type: Plain text
10229 #: build/C/man2/shmget.2:299
10230 msgid ""
10231 "If B<SHMMAX> and B<SHMMNI> are not modified, this yields a limit for the "
10232 "total memory used by all shared memory segments of 8 GB: With a 4kB page "
10233 "size, this formula yields the value 2^21 (2,097,152), with 8kB page size, it "
10234 "yields 2^20 (1048576)."
10235 msgstr ""
10236
10237 #. type: Plain text
10238 #: build/C/man2/shmget.2:302
10239 msgid ""
10240 "On Linux, this limit can be read and modified via I</proc/sys/kernel/shmall>."
10241 msgstr ""
10242 "Linux では、この上限値は I</proc/sys/kernel/shmall> 経由で参照したり、変更し"
10243 "たりできる。"
10244
10245 #. type: TP
10246 #: build/C/man2/shmget.2:302
10247 #, no-wrap
10248 msgid "B<SHMMAX>"
10249 msgstr "B<SHMMAX>"
10250
10251 #. type: Plain text
10252 #: build/C/man2/shmget.2:306
10253 msgid ""
10254 "Maximum size in bytes for a shared memory segment.  Since Linux 2.2, the "
10255 "default value of this limit is 0x2000000 (32MB)."
10256 msgstr ""
10257 "共有メモリ・セグメントの最大バイト数。 Linux 2.2 以降では、 この上限値のデ"
10258 "フォルトは 0x2000000 (32MB) である。"
10259
10260 #. type: Plain text
10261 #: build/C/man2/shmget.2:309
10262 msgid ""
10263 "On Linux, this limit can be read and modified via I</proc/sys/kernel/shmmax>."
10264 msgstr ""
10265 "Linux では、この上限値は I</proc/sys/kernel/shmmax> 経由で参照したり、変更し"
10266 "たりできる。"
10267
10268 #. type: TP
10269 #: build/C/man2/shmget.2:309
10270 #, no-wrap
10271 msgid "B<SHMMIN>"
10272 msgstr "B<SHMMIN>"
10273
10274 #. type: Plain text
10275 #: build/C/man2/shmget.2:315
10276 msgid ""
10277 "Minimum size in bytes for a shared memory segment: implementation dependent "
10278 "(currently 1 byte, though B<PAGE_SIZE> is the effective minimum size)."
10279 msgstr ""
10280 "共有メモリ・セグメントのバイト単位の大きさの下限: 実装依存 (現在は 1 バイトだ"
10281 "が、実質的な最小サイズは B<PAGE_SIZE> である)。"
10282
10283 #. type: TP
10284 #: build/C/man2/shmget.2:315
10285 #, no-wrap
10286 msgid "B<SHMMNI>"
10287 msgstr "B<SHMMNI>"
10288
10289 #. type: Plain text
10290 #: build/C/man2/shmget.2:320
10291 msgid ""
10292 "System-wide limit on the number of shared memory segments.  In Linux 2.2, "
10293 "the default value for this limit was 128; since Linux 2.4, the default value "
10294 "is 4096."
10295 msgstr ""
10296 "システム全体の共有メモリ・セグメント数の上限値。 この上限値のデフォルトは、 "
10297 "Linux 2.2 以降では 128、 Linux 2.4 以降で 4096 である。"
10298
10299 #.  Kernels between 2.4.x and 2.6.8 had an off-by-one error that meant
10300 #.  that we could create one more segment than SHMMNI -- MTK
10301 #.  This /proc file is not available in Linux 2.2 and earlier -- MTK
10302 #. type: Plain text
10303 #: build/C/man2/shmget.2:326
10304 msgid ""
10305 "On Linux, this limit can be read and modified via I</proc/sys/kernel/shmmni>."
10306 msgstr ""
10307 "Linux では、この上限値は I</proc/sys/kernel/shmmni> 経由で参照したり、変更し"
10308 "たりできる。"
10309
10310 #. type: Plain text
10311 #: build/C/man2/shmget.2:330
10312 msgid ""
10313 "The implementation has no specific limits for the per-process maximum number "
10314 "of shared memory segments (B<SHMSEG>)."
10315 msgstr ""
10316 "プロセス当りの共有メモリ・セグメントの個数の最大値 (B<SHMSEG>)  に関する実装"
10317 "上の制限はない。"
10318
10319 #. type: Plain text
10320 #: build/C/man2/shmget.2:336
10321 msgid ""
10322 "Until version 2.3.30, Linux would return B<EIDRM> for a B<shmget>()  on a "
10323 "shared memory segment scheduled for deletion."
10324 msgstr ""
10325 "バージョン 2.3.30 までは、Linux は 削除が予定されている共有メモリ・セグメント"
10326 "に対して B<shmget>()  が行われると B<EIDRM> を返していた。"
10327
10328 #. type: Plain text
10329 #: build/C/man2/shmget.2:342
10330 msgid ""
10331 "The name choice B<IPC_PRIVATE> was perhaps unfortunate, B<IPC_NEW> would "
10332 "more clearly show its function."
10333 msgstr ""
10334 "B<IPC_PRIVATE> という名前を選んだのはおそらく失敗であろう。 B<IPC_NEW> の方が"
10335 "より明確にその機能を表しているだろう。"
10336
10337 #. type: Plain text
10338 #: build/C/man2/shmget.2:350
10339 msgid ""
10340 "B<shmat>(2), B<shmctl>(2), B<shmdt>(2), B<ftok>(3), B<capabilities>(7), "
10341 "B<shm_overview>(7), B<svipc>(7)"
10342 msgstr ""
10343 "B<shmat>(2), B<shmctl>(2), B<shmdt>(2), B<ftok>(3), B<capabilities>(7), "
10344 "B<shm_overview>(7), B<svipc>(7)"
10345
10346 #. type: TH
10347 #: build/C/man2/shmop.2:41
10348 #, no-wrap
10349 msgid "SHMOP"
10350 msgstr "SHMOP"
10351
10352 #. type: TH
10353 #: build/C/man2/shmop.2:41
10354 #, no-wrap
10355 msgid "2014-04-28"
10356 msgstr "2014-04-28"
10357
10358 #. type: Plain text
10359 #: build/C/man2/shmop.2:44
10360 msgid "shmat, shmdt - System V shared memory operations"
10361 msgstr "shmat, shmdt - System V 共有メモリ (shared memory) の操作"
10362
10363 #. type: Plain text
10364 #: build/C/man2/shmop.2:48
10365 #, no-wrap
10366 msgid ""
10367 "B<#include E<lt>sys/types.hE<gt>>\n"
10368 "B<#include E<lt>sys/shm.hE<gt>>\n"
10369 msgstr ""
10370 "B<#include E<lt>sys/types.hE<gt>>\n"
10371 "B<#include E<lt>sys/shm.hE<gt>>\n"
10372
10373 #. type: Plain text
10374 #: build/C/man2/shmop.2:50
10375 #, no-wrap
10376 msgid "B<void *shmat(int >I<shmid>B<, const void *>I<shmaddr>B<, int >I<shmflg>B<);>\n"
10377 msgstr "B<void *shmat(int >I<shmid>B<, const void *>I<shmaddr>B<, int >I<shmflg>B<);>\n"
10378
10379 #. type: Plain text
10380 #: build/C/man2/shmop.2:52
10381 #, no-wrap
10382 msgid "B<int shmdt(const void *>I<shmaddr>B<);>\n"
10383 msgstr "B<int shmdt(const void *>I<shmaddr>B<);>\n"
10384
10385 #. type: SS
10386 #: build/C/man2/shmop.2:54
10387 #, no-wrap
10388 msgid "shmat()"
10389 msgstr ""
10390
10391 #. type: Plain text
10392 #: build/C/man2/shmop.2:62
10393 msgid ""
10394 "B<shmat>()  attaches the System\\ V shared memory segment identified by "
10395 "I<shmid> to the address space of the calling process.  The attaching address "
10396 "is specified by I<shmaddr> with one of the following criteria:"
10397 msgstr ""
10398 "B<shmat>()  は I<shmid> で指定された System\\ V 共有メモリ・セグメント "
10399 "(shared memory segment) を コールしたプロセスのアドレス空間に付加 (attach) す"
10400 "る。 付加するアドレスは I<shmaddr> に以下のどれかの形式で指定する:"
10401
10402 #. type: Plain text
10403 #: build/C/man2/shmop.2:68
10404 msgid ""
10405 "If I<shmaddr> is NULL, the system chooses a suitable (unused) address at "
10406 "which to attach the segment."
10407 msgstr ""
10408 "I<shmaddr> が NULL ならば、システムはセグメントを付加するための 適切な (使用"
10409 "されていない) アドレスを選択する。"
10410
10411 #. type: Plain text
10412 #: build/C/man2/shmop.2:80
10413 msgid ""
10414 "If I<shmaddr> isn't NULL and B<SHM_RND> is specified in I<shmflg>, the "
10415 "attach occurs at the address equal to I<shmaddr> rounded down to the nearest "
10416 "multiple of B<SHMLBA>."
10417 msgstr ""
10418 "I<shmaddr> が NULL でなく B<SHM_RND> が I<shmflg> に指定されている場合は、 "
10419 "I<shmaddr> を B<SHMLBA> の倍数へと切り捨てた (rounding down) のと等しいアドレ"
10420 "スへ付加する。"
10421
10422 #. type: Plain text
10423 #: build/C/man2/shmop.2:84
10424 msgid ""
10425 "Otherwise, I<shmaddr> must be a page-aligned address at which the attach "
10426 "occurs."
10427 msgstr ""
10428 "その他の場合は I<shmaddr> は付加を行なうアドレスで、ページ境界を指している必"
10429 "要がある。"
10430
10431 #. type: Plain text
10432 #: build/C/man2/shmop.2:90
10433 msgid ""
10434 "In addition to B<SHM_RND>, the following flags may be specified in the "
10435 "I<shmflg> bit-mask argument:"
10436 msgstr ""
10437
10438 #. type: TP
10439 #: build/C/man2/shmop.2:90
10440 #, no-wrap
10441 msgid "B<SHM_EXEC> (Linux-specific; since Linux 2.6.9)"
10442 msgstr "B<SHM_EXEC> (Linux 固有; Linux 2.6.9 以降)"
10443
10444 #. type: Plain text
10445 #: build/C/man2/shmop.2:94
10446 msgid ""
10447 "Allow the contents of the segment to be executed.  The caller must have "
10448 "execute permission on the segment."
10449 msgstr ""
10450
10451 #. type: TP
10452 #: build/C/man2/shmop.2:94
10453 #, no-wrap
10454 msgid "B<SHM_RDONLY>"
10455 msgstr "B<SHM_RDONLY>"
10456
10457 #. type: Plain text
10458 #: build/C/man2/shmop.2:102
10459 #, fuzzy
10460 #| msgid ""
10461 #| "If B<SHM_RDONLY> is specified in I<shmflg>, the segment is attached for "
10462 #| "reading and the process must have read permission for the segment.  "
10463 #| "Otherwise the segment is attached for read and write and the process must "
10464 #| "have read and write permission for the segment.  There is no notion of a "
10465 #| "write-only shared memory segment."
10466 msgid ""
10467 "Attach the segment for read-only access.  The process must have read "
10468 "permission for the segment.  If this flag is not specified, the segment is "
10469 "attached for read and write access, and the process must have read and write "
10470 "permission for the segment.  There is no notion of a write-only shared "
10471 "memory segment."
10472 msgstr ""
10473 "B<SHM_RDONLY> が I<shmflg> に指定されていた場合は、 セグメントは読み込み専用"
10474 "に付加され、プロセスはそのセグメントへの 読み込み許可を持たなければならな"
10475 "い。 そうでなければそのセグメントは読み込みと書き込みのために付加され、 プロ"
10476 "セスはそのセグメントに読み込みと書き込みの許可を持つ必要がある。 書き込み専用"
10477 "の共有メモリ・セグメントという概念は存在しない。"
10478
10479 #. type: TP
10480 #: build/C/man2/shmop.2:102
10481 #, no-wrap
10482 msgid "B<SHM_REMAP> (Linux-specific)"
10483 msgstr "B<SHM_REMAP> (Linux 固有)"
10484
10485 #. type: Plain text
10486 #: build/C/man2/shmop.2:115
10487 #, fuzzy
10488 #| msgid ""
10489 #| "The (Linux-specific)  B<SHM_REMAP> flag may be specified in I<shmflg> to "
10490 #| "indicate that the mapping of the segment should replace any existing "
10491 #| "mapping in the range starting at I<shmaddr> and continuing for the size "
10492 #| "of the segment.  (Normally an B<EINVAL> error would result if a mapping "
10493 #| "already exists in this address range.)  In this case, I<shmaddr> must not "
10494 #| "be NULL."
10495 msgid ""
10496 "This flag specifies that the mapping of the segment should replace any "
10497 "existing mapping in the range starting at I<shmaddr> and continuing for the "
10498 "size of the segment.  (Normally, an B<EINVAL> error would result if a "
10499 "mapping already exists in this address range.)  In this case, I<shmaddr> "
10500 "must not be NULL."
10501 msgstr ""
10502 "(Linux 特有の)  B<SHM_REMAP> フラグが I<shmflg> に指定された場合は、 セグメン"
10503 "トのマッピングを既存のマッピングに置き換える。 マッピングの範囲は、 "
10504 "I<shmaddr> から始まりセグメントのサイズ分だけある (通常 B<EINVAL> エラーは、"
10505 "このアドレス範囲にマッピングが既に存在するために起る)。 このフラグを指定する"
10506 "場合は、 I<shmaddr> が NULL であってはならない。"
10507
10508 #. type: Plain text
10509 #: build/C/man2/shmop.2:122
10510 msgid ""
10511 "The B<brk>(2)  value of the calling process is not altered by the attach.  "
10512 "The segment will automatically be detached at process exit.  The same "
10513 "segment may be attached as a read and as a read-write one, and more than "
10514 "once, in the process's address space."
10515 msgstr ""
10516 "呼び出したプロセスの B<brk>(2)  の値は付加によって変化しない。 そのセグメント"
10517 "はプロセスが終了 (exit) したら自動的に分離 (detach) される。 同じセグメントを"
10518 "プロセスのアドレス空間に、読み込み専用および読み書き両用 として付加でき、また"
10519 "複数回付加することもできる。"
10520
10521 #. type: Plain text
10522 #: build/C/man2/shmop.2:130
10523 msgid ""
10524 "A successful B<shmat>()  call updates the members of the I<shmid_ds> "
10525 "structure (see B<shmctl>(2))  associated with the shared memory segment as "
10526 "follows:"
10527 msgstr ""
10528 "成功した B<shmat>()  コールは共有メモリ・セグメントに関連する I<shmid_ds> 構"
10529 "造体 (B<shmctl>(2)  を参照) のメンバーを以下のように更新する:"
10530
10531 #. type: Plain text
10532 #: build/C/man2/shmop.2:133
10533 msgid "I<shm_atime> is set to the current time."
10534 msgstr "I<shm_atime> には現在の時刻を設定する。"
10535
10536 #. type: Plain text
10537 #: build/C/man2/shmop.2:136 build/C/man2/shmop.2:163
10538 msgid "I<shm_lpid> is set to the process-ID of the calling process."
10539 msgstr "I<shm_lpid> には呼び出したプロセスのプロセス ID が設定される。"
10540
10541 #. type: Plain text
10542 #: build/C/man2/shmop.2:140
10543 msgid "I<shm_nattch> is incremented by one."
10544 msgstr "I<shm_nattch> を 1 増加させる。"
10545
10546 #. type: SS
10547 #: build/C/man2/shmop.2:140
10548 #, no-wrap
10549 msgid "shmdt()"
10550 msgstr ""
10551
10552 #. type: Plain text
10553 #: build/C/man2/shmop.2:151
10554 msgid ""
10555 "B<shmdt>()  detaches the shared memory segment located at the address "
10556 "specified by I<shmaddr> from the address space of the calling process.  The "
10557 "to-be-detached segment must be currently attached with I<shmaddr> equal to "
10558 "the value returned by the attaching B<shmat>()  call."
10559 msgstr ""
10560 "B<shmdt>()  は呼び出したプロセスのアドレス空間から I<shmaddr> で指定されたア"
10561 "ドレスに配置された共有メモリ・セグメントを分離 (detach) する。 分離する共有メ"
10562 "モリ・セグメントは、現在 I<shmaddr> に付加されているものでなければならない。 "
10563 "I<shmaddr> は、それを付加した時に B<shmat>()  が返した値に等しくなければなら"
10564 "ない。"
10565
10566 #. type: Plain text
10567 #: build/C/man2/shmop.2:157
10568 msgid ""
10569 "On a successful B<shmdt>()  call, the system updates the members of the "
10570 "I<shmid_ds> structure associated with the shared memory segment as follows:"
10571 msgstr ""
10572 "成功した B<shmdt>()  コールはその共有メモリ・セグメントに関連する "
10573 "I<shmid_ds> 構造体のメンバーを以下のように更新する:"
10574
10575 #. type: Plain text
10576 #: build/C/man2/shmop.2:160
10577 msgid "I<shm_dtime> is set to the current time."
10578 msgstr "I<shm_dtime> には現在の時刻が設定される。"
10579
10580 #. type: Plain text
10581 #: build/C/man2/shmop.2:168
10582 msgid ""
10583 "I<shm_nattch> is decremented by one.  If it becomes 0 and the segment is "
10584 "marked for deletion, the segment is deleted."
10585 msgstr ""
10586 "I<shm_nattch> を 1 減少させる。 もし 0 になり、削除マークがあった場合は その"
10587 "セグメントは削除される。"
10588
10589 #. type: Plain text
10590 #: build/C/man2/shmop.2:176
10591 msgid ""
10592 "On success, B<shmat>()  returns the address of the attached shared memory "
10593 "segment; on error, I<(void\\ *)\\ -1> is returned, and I<errno> is set to "
10594 "indicate the cause of the error."
10595 msgstr ""
10596 "B<shmat>()  は、成功した場合、 付加された共有メモリ・セグメントのアドレスを返"
10597 "す。 エラーの場合、 I<(void\\ *)\\ -1> を返し、 I<errno> にエラーの原因を示す"
10598 "値を設定する。"
10599
10600 #. type: Plain text
10601 #: build/C/man2/shmop.2:182
10602 msgid ""
10603 "On success, B<shmdt>()  returns 0; on error -1 is returned, and I<errno> is "
10604 "set to indicate the cause of the error."
10605 msgstr ""
10606 "B<shmdt>()  は、成功すると 0 を返す。 エラーの場合、-1 を返し、 I<errno> にエ"
10607 "ラーの原因を示す値を設定する。"
10608
10609 #. type: Plain text
10610 #: build/C/man2/shmop.2:188
10611 msgid "When B<shmat>()  fails, I<errno> is set to one of the following:"
10612 msgstr ""
10613 "B<shmat>()  が失敗した場合、 I<errno> に以下の値のどれかを設定して返す:"
10614
10615 #. type: Plain text
10616 #: build/C/man2/shmop.2:194
10617 msgid ""
10618 "The calling process does not have the required permissions for the requested "
10619 "attach type, and does not have the B<CAP_IPC_OWNER> capability."
10620 msgstr ""
10621 "呼び出したプロセスに要求された種類の付加に必要な許可がなく、 "
10622 "B<CAP_IPC_OWNER> ケーパビリティ (capability) がない。"
10623
10624 #. type: Plain text
10625 #: build/C/man2/shmop.2:211
10626 msgid ""
10627 "Invalid I<shmid> value, unaligned (i.e., not page-aligned and B<SHM_RND> was "
10628 "not specified) or invalid I<shmaddr> value, or can't attach segment at "
10629 "I<shmaddr>, or B<SHM_REMAP> was specified and I<shmaddr> was NULL."
10630 msgstr ""
10631 "I<shmid> の値が不正である。 I<shmaddr> の値が境界違反 (unaligned) (つまり、"
10632 "ページ境界に合っておらず、 B<SHM_RND> が指定されていない) または が不正であ"
10633 "る。 I<shmaddr> へのセグメントの付加に失敗した。 または B<SHM_REMAP> が指定さ"
10634 "れているが、 I<shmaddr> が NULL であった。"
10635
10636 #. type: Plain text
10637 #: build/C/man2/shmop.2:214
10638 msgid "Could not allocate memory for the descriptor or for the page tables."
10639 msgstr ""
10640 "ディスクリプター (descriptor) やページ・テーブルのためのメモリを 割り当てるこ"
10641 "とができない。"
10642
10643 #. type: Plain text
10644 #: build/C/man2/shmop.2:220
10645 msgid "When B<shmdt>()  fails, I<errno> is set as follows:"
10646 msgstr "B<shmdt>()  が失敗した場合、 B<EINVAL> は以下のようにセットされる:"
10647
10648 #.  The following since 2.6.17-rc1:
10649 #. type: Plain text
10650 #: build/C/man2/shmop.2:228
10651 msgid ""
10652 "There is no shared memory segment attached at I<shmaddr>; or, I<shmaddr> is "
10653 "not aligned on a page boundary."
10654 msgstr ""
10655 "I<shmaddr> に付加された共有メモリ・セグメントが存在しない。 もしくは、 "
10656 "I<shmaddr> がページ境界に合っていない。"
10657
10658 #. type: Plain text
10659 #: build/C/man2/shmop.2:247
10660 msgid ""
10661 "In SVID 3 (or perhaps earlier), the type of the I<shmaddr> argument was "
10662 "changed from I<char\\ *> into I<const void\\ *>, and the returned type of "
10663 "B<shmat>()  from I<char\\ *> into I<void\\ *>.  (Linux libc4 and libc5 have "
10664 "the I<char\\ *> prototypes; glibc2 has I<void\\ *>.)"
10665 msgstr ""
10666 "SVID 3 で (たぶんそれより前だと思うが)  I<shmaddr> 引き数の型は I<char\\ *> "
10667 "から I<const void\\ *> に、I<shmat>() の返り値の型は I<char\\ *> から I<void"
10668 "\\ *> に変更された (Linux では libc4 と libc5 のプロトタイプは I<char\\ *> で"
10669 "あり、glibc2 のプロトタイプは I<void\\ *> である)。"
10670
10671 #. type: Plain text
10672 #: build/C/man2/shmop.2:252
10673 msgid ""
10674 "After a B<fork>(2), the child inherits the attached shared memory segments."
10675 msgstr ""
10676 "B<fork>(2)  した後、子プロセスは付加された共有メモリ・セグメントを継承する。"
10677
10678 #. type: Plain text
10679 #: build/C/man2/shmop.2:256
10680 msgid ""
10681 "After an B<execve>(2), all attached shared memory segments are detached from "
10682 "the process."
10683 msgstr ""
10684 "B<exec>(2)  した後、全ての付加された共有メモリ・セグメントはプロセスから分離"
10685 "される。"
10686
10687 #. type: Plain text
10688 #: build/C/man2/shmop.2:260
10689 msgid ""
10690 "Upon B<_exit>(2), all attached shared memory segments are detached from the "
10691 "process."
10692 msgstr ""
10693 "B<exit>(2)  において、全ての付加された共有メモリ・セグメントはプロセスから分"
10694 "離される。"
10695
10696 #. type: Plain text
10697 #: build/C/man2/shmop.2:272
10698 msgid ""
10699 "Using B<shmat>()  with I<shmaddr> equal to NULL is the preferred, portable "
10700 "way of attaching a shared memory segment.  Be aware that the shared memory "
10701 "segment attached in this way may be attached at different addresses in "
10702 "different processes.  Therefore, any pointers maintained within the shared "
10703 "memory must be made relative (typically to the starting address of the "
10704 "segment), rather than absolute."
10705 msgstr ""
10706 "共有メモリセグメントを付加する場合の移植性の高い方法としては、 I<shmaddr> を "
10707 "NULL にして B<shmat>()  を使用するのがよい。 このような方法で付加される共有メ"
10708 "モリセグメントは、 プロセスが異なれば別のアドレスに付加される、という点に注意"
10709 "すること。 よって共有メモリ内で管理されるポインタは、 絶対アドレスではなく、 "
10710 "(一般的にはセグメントの開始アドレスからの)  相対アドレスで作成するべきであ"
10711 "る。"
10712
10713 #. type: Plain text
10714 #: build/C/man2/shmop.2:277
10715 msgid ""
10716 "On Linux, it is possible to attach a shared memory segment even if it is "
10717 "already marked to be deleted.  However, POSIX.1-2001 does not specify this "
10718 "behavior and many other implementations do not support it."
10719 msgstr ""
10720 "Linux では共有メモリセグメントに既に削除マークが付けられていても、 その共有メ"
10721 "モリセグメントを付加することができる。 しかし POSIX.1-2001 ではこのような動作"
10722 "を指定しておらず、 他の多くの実装もこれをサポートしていない。"
10723
10724 #. type: Plain text
10725 #: build/C/man2/shmop.2:280
10726 msgid "The following system parameter affects B<shmat>():"
10727 msgstr "以下のシステム・パラメーターは、 B<shmat>()  に影響する:"
10728
10729 #.  FIXME A good explanation of the rationale for the existence
10730 #.  of SHMLBA would be useful here
10731 #. type: TP
10732 #: build/C/man2/shmop.2:280
10733 #, no-wrap
10734 msgid "B<SHMLBA>"
10735 msgstr "B<SHMLBA>"
10736
10737 #.  FIXME That last sentence isn't true for all Linux
10738 #.  architectures (i.e., SHMLBA != PAGE_SIZE for some architectures)
10739 #.  -- MTK, Nov 04
10740 #. type: Plain text
10741 #: build/C/man2/shmop.2:293
10742 msgid ""
10743 "Segment low boundary address multiple.  Must be page aligned.  For the "
10744 "current implementation, the B<SHMLBA> value is B<PAGE_SIZE>."
10745 msgstr ""
10746 "セグメントの境界アドレスの最小倍数。ページ境界に合ってなければならない。 現在"
10747 "の実装では B<SHMLBA> の値は B<PAGE_SIZE> である。"
10748
10749 #. type: Plain text
10750 #: build/C/man2/shmop.2:297
10751 msgid ""
10752 "The implementation places no intrinsic per-process limit on the number of "
10753 "shared memory segments (B<SHMSEG>)."
10754 msgstr ""
10755 "現在の実装では、プロセスごとの 共有メモリ・セグメントの最大数 (B<SHMSEG>)  に"
10756 "関する実装依存の制限はない。"
10757
10758 #. type: Plain text
10759 #: build/C/man2/shmop.2:305
10760 msgid ""
10761 "B<brk>(2), B<mmap>(2), B<shmctl>(2), B<shmget>(2), B<capabilities>(7), "
10762 "B<shm_overview>(7), B<svipc>(7)"
10763 msgstr ""
10764 "B<brk>(2), B<mmap>(2), B<shmctl>(2), B<shmget>(2), B<capabilities>(7), "
10765 "B<shm_overview>(7), B<svipc>(7)"
10766
10767 #. type: TH
10768 #: build/C/man2/subpage_prot.2:30
10769 #, no-wrap
10770 msgid "SUBPAGE_PROT"
10771 msgstr "SUBPAGE_PROT"
10772
10773 #. type: TH
10774 #: build/C/man2/subpage_prot.2:30
10775 #, no-wrap
10776 msgid "2012-07-13"
10777 msgstr "2012-07-13"
10778
10779 #. type: Plain text
10780 #: build/C/man2/subpage_prot.2:33
10781 msgid "subpage_prot - define a subpage protection for an address range"
10782 msgstr ""
10783
10784 #. type: Plain text
10785 #: build/C/man2/subpage_prot.2:37
10786 #, no-wrap
10787 msgid ""
10788 "B<long subpage_prot(unsigned long >I<addr>B<, unsigned long >I<len>B<,>\n"
10789 "B<                  uint32_t *>I<map>B<);>\n"
10790 msgstr ""
10791 "B<long subpage_prot(unsigned long >I<addr>B<, unsigned long >I<len>B<,>\n"
10792 "B<                  uint32_t *>I<map>B<);>\n"
10793
10794 #. type: Plain text
10795 #: build/C/man2/subpage_prot.2:41
10796 msgid "I<Note>: There is no glibc wrapper for this system call; see NOTES."
10797 msgstr ""
10798 "I<注>: このシステムコールには glibc のラッパー関数は存在しない。「注意」の節"
10799 "を参照。"
10800
10801 #. type: Plain text
10802 #: build/C/man2/subpage_prot.2:47
10803 msgid ""
10804 "The PowerPC-specific B<subpage_prot>()  system call provides the facility to "
10805 "control the access permissions on individual 4kB subpages on systems "
10806 "configured with a page size of 64kB."
10807 msgstr ""
10808
10809 #. type: Plain text
10810 #: build/C/man2/subpage_prot.2:54
10811 msgid ""
10812 "The protection map is applied to the memory pages in the region starting at "
10813 "I<addr> and continuing for I<len> bytes.  Both of these arguments must be "
10814 "aligned to a 64-kB boundary."
10815 msgstr ""
10816
10817 #. type: Plain text
10818 #: build/C/man2/subpage_prot.2:66
10819 msgid ""
10820 "The protection map is specified in the buffer pointed to by I<map>.  The map "
10821 "has 2 bits per 4kB subpage; thus each 32-bit word specifies the protections "
10822 "of 16 4kB subpages inside a 64kB page (so, the number of 32-bit words "
10823 "pointed to by I<map> should equate to the number of 64-kB pages specified by "
10824 "I<len>).  Each 2-bit field in the protection map is either 0 to allow any "
10825 "access, 1 to prevent writes, or 2 or 3 to prevent all accesses."
10826 msgstr ""
10827
10828 #. type: Plain text
10829 #: build/C/man2/subpage_prot.2:71
10830 msgid ""
10831 "On success, B<subpage_prot>()  returns 0.  Otherwise, one of the error codes "
10832 "specified below is returned."
10833 msgstr ""
10834
10835 #. type: Plain text
10836 #: build/C/man2/subpage_prot.2:77
10837 msgid "The buffer referred to by I<map> is not accessible."
10838 msgstr ""
10839
10840 #. type: Plain text
10841 #: build/C/man2/subpage_prot.2:87
10842 msgid ""
10843 "The I<addr> or I<len> arguments are incorrect.  Both of these arguments must "
10844 "be aligned to a multiple of the system page size, and they must not refer to "
10845 "a region outside of the address space of the process or to a region that "
10846 "consists of huge pages."
10847 msgstr ""
10848
10849 #. type: Plain text
10850 #: build/C/man2/subpage_prot.2:90 build/C/man2/sync_file_range.2:166
10851 msgid "Out of memory."
10852 msgstr "メモリ不足である。"
10853
10854 #. type: Plain text
10855 #: build/C/man2/subpage_prot.2:96
10856 msgid ""
10857 "This system call is provided on the PowerPC architecture since Linux "
10858 "2.6.25.  The system call is provided only if the kernel is configured with "
10859 "B<CONFIG_PPC_64K_PAGES>.  No library support is provided."
10860 msgstr ""
10861
10862 #. type: Plain text
10863 #: build/C/man2/subpage_prot.2:101
10864 msgid ""
10865 "Glibc does not provide a wrapper for this system call; call it using "
10866 "B<syscall>(2)."
10867 msgstr ""
10868
10869 #. type: Plain text
10870 #: build/C/man2/subpage_prot.2:106
10871 msgid ""
10872 "Normal page protections (at the 64-kB page level) also apply; the subpage "
10873 "protection mechanism is an additional constraint, so putting 0 in a 2-bit "
10874 "field won't allow writes to a page that is otherwise write-protected."
10875 msgstr ""
10876
10877 #. type: SS
10878 #: build/C/man2/subpage_prot.2:106
10879 #, no-wrap
10880 msgid "Rationale"
10881 msgstr ""
10882
10883 #.  In the initial implementation, it was the case that:
10884 #.      In fact the whole process is switched to use 4k hardware pages when the
10885 #.      subpage_prot system call is used, but this could be improved in future
10886 #.      to switch only the affected segments.
10887 #.  But Paul Mackerass says (Oct 2010): I'm pretty sure we now only switch
10888 #.  the affected segment, not the whole process.
10889 #. type: Plain text
10890 #: build/C/man2/subpage_prot.2:128
10891 msgid ""
10892 "This system call is provided to assist writing emulators that operate using "
10893 "64-kB pages on PowerPC systems.  When emulating systems such as x86, which "
10894 "uses a smaller page size, the emulator can no longer use the memory-"
10895 "management unit (MMU)  and normal system calls for controlling page "
10896 "protections.  (The emulator could emulate the MMU by checking and possibly "
10897 "remapping the address for each memory access in software, but that is "
10898 "slow.)  The idea is that the emulator supplies an array of protection masks "
10899 "to apply to a specified range of virtual addresses.  These masks are applied "
10900 "at the level where hardware page-table entries (PTEs)  are inserted into the "
10901 "hardware page table based on the Linux PTEs, so the Linux PTEs are not "
10902 "affected.  Implicit in this is that the regions of the address space that "
10903 "are protected are switched to use 4-kB hardware pages rather than 64-kB "
10904 "hardware pages (on machines with hardware 64-kB page support)."
10905 msgstr ""
10906
10907 #. type: Plain text
10908 #: build/C/man2/subpage_prot.2:131
10909 msgid "B<mprotect>(2), B<syscall>(2)"
10910 msgstr "B<mprotect>(2), B<syscall>(2)"
10911
10912 #. type: Plain text
10913 #: build/C/man2/subpage_prot.2:134
10914 msgid "I<Documentation/vm/hugetlbpage.txt> in the Linux kernel source tree"
10915 msgstr "Linux カーネルソースの I<Documentation/vm/hugetlbpage.txt>"
10916
10917 #. type: TH
10918 #: build/C/man2/sync_file_range.2:30
10919 #, no-wrap
10920 msgid "SYNC_FILE_RANGE"
10921 msgstr "SYNC_FILE_RANGE"
10922
10923 #. type: TH
10924 #: build/C/man2/sync_file_range.2:30
10925 #, no-wrap
10926 msgid "2013-04-01"
10927 msgstr "2013-04-01"
10928
10929 #. type: Plain text
10930 #: build/C/man2/sync_file_range.2:33
10931 msgid "sync_file_range - sync a file segment with disk"
10932 msgstr "sync_file_range - ファイルセグメントをディスクと同期する"
10933
10934 #. type: Plain text
10935 #: build/C/man2/sync_file_range.2:37
10936 #, no-wrap
10937 msgid ""
10938 "B<#define _GNU_SOURCE>         /* See feature_test_macros(7) */\n"
10939 "B<#include E<lt>fcntl.hE<gt>>\n"
10940 msgstr ""
10941 "B<#define _GNU_SOURCE>         /* feature_test_macros(7) 参照 */\n"
10942 "B<#include E<lt>fcntl.hE<gt>>\n"
10943
10944 #. type: Plain text
10945 #: build/C/man2/sync_file_range.2:40
10946 #, no-wrap
10947 msgid ""
10948 "B<int sync_file_range(int >I<fd>B<, off64_t >I<offset>B<, off64_t >I<nbytes>B<,>\n"
10949 "B<                    unsigned int >I<flags>B<);>\n"
10950 msgstr ""
10951 "B<int sync_file_range(int >I<fd>B<, off64_t >I<offset>B<, off64_t >I<nbytes>B<,>\n"
10952 "B<                    unsigned int >I<flags>B<);>\n"
10953
10954 #. type: Plain text
10955 #: build/C/man2/sync_file_range.2:47
10956 msgid ""
10957 "B<sync_file_range>()  permits fine control when synchronizing the open file "
10958 "referred to by the file descriptor I<fd> with disk."
10959 msgstr ""
10960 "B<sync_file_range>()  を使うと、ファイルディスクリプタ I<fd> で参照されるオー"
10961 "プンされたファイルのディスクとの同期に関して、 きめ細かな制御が可能となる。"
10962
10963 #. type: Plain text
10964 #: build/C/man2/sync_file_range.2:61
10965 msgid ""
10966 "I<offset> is the starting byte of the file range to be synchronized.  "
10967 "I<nbytes> specifies the length of the range to be synchronized, in bytes; if "
10968 "I<nbytes> is zero, then all bytes from I<offset> through to the end of file "
10969 "are synchronized.  Synchronization is in units of the system page size: "
10970 "I<offset> is rounded down to a page boundary; I<(offset+nbytes-1)> is "
10971 "rounded up to a page boundary."
10972 msgstr ""
10973 "I<offset> は、同期を行うファイルの領域の開始バイトである。 I<nbytes> には同期"
10974 "を行う領域の長さをバイト単位で指定する。 I<nbytes> が 0 の場合は、 I<offset> "
10975 "からファイル末尾までの全バイトを同期する。 同期はシステムのページサイズの単位"
10976 "で行われる。 I<offset> はページ境界にあわせて切り下げられ、 I<(offset"
10977 "+nbytes-1)> はページ境界にあわせて切り上げられる。"
10978
10979 #. type: Plain text
10980 #: build/C/man2/sync_file_range.2:65
10981 msgid "The I<flags> bit-mask argument can include any of the following values:"
10982 msgstr "ビットマスク引き数 I<flags> には以下の値を指定することができる:"
10983
10984 #. type: TP
10985 #: build/C/man2/sync_file_range.2:65
10986 #, no-wrap
10987 msgid "B<SYNC_FILE_RANGE_WAIT_BEFORE>"
10988 msgstr "B<SYNC_FILE_RANGE_WAIT_BEFORE>"
10989
10990 #. type: Plain text
10991 #: build/C/man2/sync_file_range.2:70
10992 msgid ""
10993 "Wait upon write-out of all pages in the specified range that have already "
10994 "been submitted to the device driver for write-out before performing any "
10995 "write."
10996 msgstr ""
10997 "何らかの書き込みを行う前に、指定された領域のページで 書き出しを行うようにデバ"
10998 "イスドライバにすでに要求が発行されている ページの書き出しが全て完了するのを待"
10999 "つ。"
11000
11001 #. type: TP
11002 #: build/C/man2/sync_file_range.2:70 build/C/man2/sync_file_range.2:120
11003 #, no-wrap
11004 msgid "B<SYNC_FILE_RANGE_WRITE>"
11005 msgstr "B<SYNC_FILE_RANGE_WRITE>"
11006
11007 #. type: Plain text
11008 #: build/C/man2/sync_file_range.2:76
11009 msgid ""
11010 "Initiate write-out of all dirty pages in the specified range which are not "
11011 "presently submitted write-out.  Note that even this may block if you attempt "
11012 "to write more than request queue size."
11013 msgstr ""
11014 "指定された領域のページで、書き出し要求が発行されていない 全ての dirty (キャッ"
11015 "シュだけが変更されている) ページの 書き出しを開始する。 リクエストキューの大"
11016 "きさより多く書き込もうとした場合には、 この処理は停止 (block) する可能性があ"
11017 "る点に注意すること。"
11018
11019 #. type: TP
11020 #: build/C/man2/sync_file_range.2:76
11021 #, no-wrap
11022 msgid "B<SYNC_FILE_RANGE_WAIT_AFTER>"
11023 msgstr "B<SYNC_FILE_RANGE_WAIT_AFTER>"
11024
11025 #. type: Plain text
11026 #: build/C/man2/sync_file_range.2:80
11027 msgid ""
11028 "Wait upon write-out of all pages in the range after performing any write."
11029 msgstr ""
11030 "何らかの書き込み後に、指定された領域の全てのページの 書き出しが行われるのを待"
11031 "つ。"
11032
11033 #. type: Plain text
11034 #: build/C/man2/sync_file_range.2:84
11035 msgid "Specifying I<flags> as 0 is permitted, as a no-op."
11036 msgstr "I<flags> に 0 を指定した場合、何もしないことを表す。"
11037
11038 #. type: SS
11039 #: build/C/man2/sync_file_range.2:84
11040 #, no-wrap
11041 msgid "Warning"
11042 msgstr "警告"
11043
11044 #. type: Plain text
11045 #: build/C/man2/sync_file_range.2:100
11046 msgid ""
11047 "This system call is extremely dangerous and should not be used in portable "
11048 "programs.  None of these operations writes out the file's metadata.  "
11049 "Therefore, unless the application is strictly performing overwrites of "
11050 "already-instantiated disk blocks, there are no guarantees that the data will "
11051 "be available after a crash.  There is no user interface to know if a write "
11052 "is purely an overwrite.  On filesystems using copy-on-write semantics (e.g., "
11053 "I<btrfs>)  an overwrite of existing allocated blocks is impossible.  When "
11054 "writing into preallocated space, many filesystems also require calls into "
11055 "the block allocator, which this system call does not sync out to disk.  This "
11056 "system call does not flush disk write caches and thus does not provide any "
11057 "data integrity on systems with volatile disk write caches."
11058 msgstr ""
11059 "このシステムコールは非常に危険であり、 移植性が必要なプログラムで使用すべきで"
11060 "はない。 これらの操作ではどれもファイルのメタデータの書き出しを行わない。 し"
11061 "たがって、アプリケーションにより作成済みのディスクブロックの 上書きの実行が確"
11062 "実に行われない限り、クラッシュの後でもデータが 利用できる保証はない。 書き込"
11063 "みが上書きだけであるかを知るためのユーザインタフェースは存在しない。 "
11064 "(I<btrfs> などの) copy-on-write 動作を使ったファイルシステムでは、 既存の割り"
11065 "当て済みのブロックに対する上書き自体ができない。 前もって割り当てられた領域に"
11066 "書き込みを行う場合、 多くのファイルシステムでは block allocator への書き込み"
11067 "も必要となるが、 このシステムコールは block allocator のディスクへの同期を行"
11068 "わない。 このシステムコールはディスク書き込みキャッシュのフラッシュを 行わな"
11069 "いので、揮発性のディスク書き込みキャッシュを使ったシステムでは このシステム"
11070 "コールではデータの一貫性を確保できないことになる。"
11071
11072 #. type: SS
11073 #: build/C/man2/sync_file_range.2:100
11074 #, no-wrap
11075 msgid "Some details"
11076 msgstr "詳細"
11077
11078 #. type: Plain text
11079 #: build/C/man2/sync_file_range.2:108
11080 msgid ""
11081 "B<SYNC_FILE_RANGE_WAIT_BEFORE> and B<SYNC_FILE_RANGE_WAIT_AFTER> will detect "
11082 "any I/O errors or B<ENOSPC> conditions and will return these to the caller."
11083 msgstr ""
11084 "B<SYNC_FILE_RANGE_WAIT_BEFORE> と B<SYNC_FILE_RANGE_WAIT_AFTER> は I/O エラー"
11085 "や B<ENOSPC> 状態を検出し、呼び出し元にこれらの情報を返す。"
11086
11087 #. type: Plain text
11088 #: build/C/man2/sync_file_range.2:112
11089 msgid "Useful combinations of the I<flags> bits are:"
11090 msgstr "I<flags> の役に立つビットの組み合わせを以下に示す:"
11091
11092 #. type: TP
11093 #: build/C/man2/sync_file_range.2:112
11094 #, no-wrap
11095 msgid "B<SYNC_FILE_RANGE_WAIT_BEFORE | SYNC_FILE_RANGE_WRITE>"
11096 msgstr "B<SYNC_FILE_RANGE_WAIT_BEFORE | SYNC_FILE_RANGE_WRITE>"
11097
11098 #. type: Plain text
11099 #: build/C/man2/sync_file_range.2:120
11100 msgid ""
11101 "Ensures that all pages in the specified range which were dirty when "
11102 "B<sync_file_range>()  was called are placed under write-out.  This is a "
11103 "start-write-for-data-integrity operation."
11104 msgstr ""
11105 "指定された範囲内のページで、 B<sync_file_range>()  が呼び出された際に dirty "
11106 "であった全てのページが、 確実に書き出し対象となるようにする。 これは、start-"
11107 "write-for-data-integrity 操作 (データ完全性確保のための書き込み開始の操作) で"
11108 "ある。"
11109
11110 #. type: Plain text
11111 #: build/C/man2/sync_file_range.2:127
11112 msgid ""
11113 "Start write-out of all dirty pages in the specified range which are not "
11114 "presently under write-out.  This is an asynchronous flush-to-disk "
11115 "operation.  This is not suitable for data integrity operations."
11116 msgstr ""
11117 "指定された範囲内のページで、現在書き出し中でない全ての dirty ページの 書き出"
11118 "しを開始する。これは非同期のディスクへのフラッシュ (flush-to-disk)  操作であ"
11119 "る。データ完全性確保が必要な操作としては適切ではない。"
11120
11121 #. type: TP
11122 #: build/C/man2/sync_file_range.2:127
11123 #, no-wrap
11124 msgid "B<SYNC_FILE_RANGE_WAIT_BEFORE> (or B<SYNC_FILE_RANGE_WAIT_AFTER>)"
11125 msgstr "B<SYNC_FILE_RANGE_WAIT_BEFORE> (or B<SYNC_FILE_RANGE_WAIT_AFTER>)"
11126
11127 #. type: Plain text
11128 #: build/C/man2/sync_file_range.2:134
11129 msgid ""
11130 "Wait for completion of write-out of all pages in the specified range.  This "
11131 "can be used after an earlier B<SYNC_FILE_RANGE_WAIT_BEFORE | "
11132 "SYNC_FILE_RANGE_WRITE> operation to wait for completion of that operation, "
11133 "and obtain its result."
11134 msgstr ""
11135 "指定された範囲内の全てのページの書き出しの完了を待つ。 このフラグは、前に行わ"
11136 "れた操作 B<SYNC_FILE_RANGE_WAIT_BEFORE | SYNC_FILE_RANGE_WRITE> の後に使用で"
11137 "き、この操作の完了を待ち、結果を取得することができる。"
11138
11139 #. type: TP
11140 #: build/C/man2/sync_file_range.2:134
11141 #, no-wrap
11142 msgid "B<SYNC_FILE_RANGE_WAIT_BEFORE | SYNC_FILE_RANGE_WRITE | SYNC_FILE_RANGE_WAIT_AFTER>"
11143 msgstr "B<SYNC_FILE_RANGE_WAIT_BEFORE | SYNC_FILE_RANGE_WRITE | SYNC_FILE_RANGE_WAIT_AFTER>"
11144
11145 #. type: Plain text
11146 #: build/C/man2/sync_file_range.2:141
11147 msgid ""
11148 "This is a write-for-data-integrity operation that will ensure that all pages "
11149 "in the specified range which were dirty when B<sync_file_range>()  was "
11150 "called are committed to disk."
11151 msgstr ""
11152 "これは write-for-data-integrity 操作 (データ完全性確保のための書き込み) であ"
11153 "り、指定された範囲内の、 B<sync_file_range>()  が呼ばれた時点で dirty な全て"
11154 "のページが ディスクに格納されることが保証される。"
11155
11156 #. type: Plain text
11157 #: build/C/man2/sync_file_range.2:147
11158 msgid ""
11159 "On success, B<sync_file_range>()  returns 0; on failure -1 is returned and "
11160 "I<errno> is set to indicate the error."
11161 msgstr ""
11162 "成功の場合、 B<sync_file_range>()  は 0 を返す。失敗の場合、-1 を返し、 "
11163 "I<error> にエラーを示す値を設定する。"
11164
11165 #. type: Plain text
11166 #: build/C/man2/sync_file_range.2:152
11167 msgid "I<fd> is not a valid file descriptor."
11168 msgstr "I<fd> が有効なファイルディスクリプタではない。"
11169
11170 #. type: Plain text
11171 #: build/C/man2/sync_file_range.2:160
11172 msgid ""
11173 "I<flags> specifies an invalid bit; or I<offset> or I<nbytes> is invalid."
11174 msgstr ""
11175 "I<flags> に不正なビットが指定されている。または I<offset> か I<nbytes> が不正"
11176 "である。"
11177
11178 #. type: Plain text
11179 #: build/C/man2/sync_file_range.2:163
11180 msgid "I/O error."
11181 msgstr "I/O エラー。"
11182
11183 #. type: Plain text
11184 #: build/C/man2/sync_file_range.2:169
11185 msgid "Out of disk space."
11186 msgstr "ディスク領域不足である。"
11187
11188 #.  FIXME . (bug?) Actually, how can 'fd' refer to a symbolic link (S_ISLNK)?
11189 #.  (In user space at least) it isn't possible to obtain a file descriptor
11190 #.  for a symbolic link.
11191 #. type: Plain text
11192 #: build/C/man2/sync_file_range.2:177
11193 msgid ""
11194 "I<fd> refers to something other than a regular file, a block device, a "
11195 "directory, or a symbolic link."
11196 msgstr ""
11197 "I<fd> が、通常のファイル、ブロックデバイス、ディレクトリ、シンボリックリンク "
11198 "以外のものを指している。"
11199
11200 #. type: Plain text
11201 #: build/C/man2/sync_file_range.2:180
11202 msgid "B<sync_file_range>()  appeared on Linux in kernel 2.6.17."
11203 msgstr "B<sync_file_range>()  はカーネル 2.6.17 で Linux に登場した。"
11204
11205 #. type: Plain text
11206 #: build/C/man2/sync_file_range.2:183
11207 msgid ""
11208 "This system call is Linux-specific, and should be avoided in portable "
11209 "programs."
11210 msgstr ""
11211 "このシステムコールは Linux 独自であり、 移植性が必要なプログラムでは使用を避"
11212 "けるべきである。"
11213
11214 #.  See kernel commit edd5cd4a9424f22b0fa08bef5e299d41befd5622
11215 #. type: Plain text
11216 #: build/C/man2/sync_file_range.2:200
11217 msgid ""
11218 "Some architectures (e.g., PowerPC, ARM)  need 64-bit arguments to be aligned "
11219 "in a suitable pair of registers.  On such architectures, the call signature "
11220 "of B<sync_file_range>()  shown in the SYNOPSIS would force a register to be "
11221 "wasted as padding between the I<fd> and I<offset> arguments.  (See "
11222 "B<syscall>(2)  for details.)  Therefore, these architectures define a "
11223 "different system call that orders the arguments suitably:"
11224 msgstr ""
11225 "いくつかのアーキテクチャ (例えば、 PowerPC や ARM) では、 64 ビットの引き数は"
11226 "適切なレジスタの組に割り当てる必要がある。 このようなアーキテクチャでは、 "
11227 "「書式」に書かれている B<sync_file_range>() の呼び出しシグネチャーで、 引き"
11228 "数 I<fd> と I<offset> の間のパディング (詰めもの) でレジスタが一つ消費されて"
11229 "しまう (詳細は B<syscall>(2) 参照)。 そのため、 これらのアーキテクチャでは引"
11230 "き数が適切な順序になった別のシステムコールが定義されている。"
11231
11232 #. type: Plain text
11233 #: build/C/man2/sync_file_range.2:205
11234 #, no-wrap
11235 msgid ""
11236 "B<int sync_file_range2(int >I<fd>B<, unsigned int >I<flags>B<,>\n"
11237 "B<                     off64_t >I<offset>B<, off64_t >I<nbytes>B<);>\n"
11238 msgstr ""
11239 "B<int sync_file_range2(int >I<fd>B<, unsigned int >I<flags>B<,>\n"
11240 "B<                     off64_t >I<offset>B<, off64_t >I<nbytes>B<);>\n"
11241
11242 #. type: Plain text
11243 #: build/C/man2/sync_file_range.2:210
11244 msgid ""
11245 "The behavior of this system call is otherwise exactly the same as "
11246 "B<sync_file_range>()."
11247 msgstr ""
11248 "上記の点以外は、このシステムコールの動作は B<sync_file_range>() と\n"
11249 "全く同じである。このシステムコールに対するライブラリによるサポートは\n"
11250 "glibc では提供されていない。"
11251
11252 #. type: Plain text
11253 #: build/C/man2/sync_file_range.2:221
11254 msgid ""
11255 "A system call with this signature first appeared on the ARM architecture in "
11256 "Linux 2.6.20, with the name B<arm_sync_file_range>().  It was renamed in "
11257 "Linux 2.6.22, when the analogous system call was added for PowerPC.  On "
11258 "architectures where glibc support is provided, glibc transparently wraps "
11259 "B<sync_file_range2>()  under the name B<sync_file_range>()."
11260 msgstr ""
11261 "このバージョンのシステムコールは、Linux 2.6.20 で ARM アーキテクチャで\n"
11262 "初めて登場し、 B<arm_sync_file_range>() という名前であった。\n"
11263 "Linux 2.6.22 で、同様のシステムコールが PowerPC 用に追加された際に、\n"
11264 "システムコールの名前が変更された。\n"
11265 "glibc によるサポートが提供されているアーキテクチャでは、\n"
11266 "glibc のラッパー関数は B<sync_file_range>() という名前で\n"
11267 "B<sync_file_range2>() を適切に使用するようになっている。"
11268
11269 #. type: Plain text
11270 #: build/C/man2/sync_file_range.2:226
11271 msgid "B<fdatasync>(2), B<fsync>(2), B<msync>(2), B<sync>(2)"
11272 msgstr "B<fdatasync>(2), B<fsync>(2), B<msync>(2), B<sync>(2)"
11273
11274 #~ msgid "2014-05-10"
11275 #~ msgstr "2014-05-10"
11276
11277 #~ msgid "2008-04-22"
11278 #~ msgstr "2008-04-22"
11279
11280 #~ msgid "I<mode_flags>"
11281 #~ msgstr "I<mode_flags>"
11282
11283 #~ msgid "B<IPC_CREAT | IPC_EXCL> was specified and the segment exists."
11284 #~ msgstr ""
11285 #~ "B<IPC_CREAT | IPC_EXCL> が指定されていたが、そのセグメントが既に存在する。"
11286
11287 #~ msgid ""
11288 #~ "Assuming a 4kB page size, this formula yields (since Linux 2.4) the value "
11289 #~ "2^20 (2,097,152)."
11290 #~ msgstr ""
11291 #~ "4kB ページサイズと仮定すると、 (Linux 2.4 以降では) この式の結果は 2^20 "
11292 #~ "(2,097,152) になる。"
11293
11294 #~ msgid ""
11295 #~ "Maximum size in bytes for a shared memory segment: policy dependent (on "
11296 #~ "Linux, this limit can be read and modified via I</proc/sys/kernel/"
11297 #~ "shmmax>)."
11298 #~ msgstr ""
11299 #~ "共有メモリ・セグメントのバイト単位の大きさの上限: 方針依存 (Linux では、こ"
11300 #~ "の上限値は I</proc/sys/kernel/shmmax> 経由で参照したり、変更したりでき"
11301 #~ "る)。"
11302
11303 #~ msgid ""
11304 #~ "System wide maximum number of shared memory segments: implementation "
11305 #~ "dependent (currently 4096, was 128 before Linux 2.3.99; on Linux, this "
11306 #~ "limit can be read and modified via I</proc/sys/kernel/shmmni>)."
11307 #~ msgstr ""
11308 #~ "システム全体の共有メモリーの数の上限: 実装依存 (現在は 4096。Linux 2.3.99 "
11309 #~ "より前では 128。 Linux では、この上限値は I</proc/sys/kernel/shmmni> 経由"
11310 #~ "で参照したり、変更したりできる)。"
11311
11312 #~ msgid ""
11313 #~ "A valid segment identifier, I<shmid>, is returned on success, -1 on error."
11314 #~ msgstr ""
11315 #~ "成功した場合、有効なセグメント識別子 I<shmid> が返される。エラーの場合、 "
11316 #~ "-1 が返される。"
11317
11318 #~ msgid ""
11319 #~ "The ARM architecture needs 64-bit arguments to be aligned in a suitable "
11320 #~ "pair of registers.  On this architecture, the call signature of "
11321 #~ "B<posix_fadvise>()  is flawed, since it forces a register to be wasted as "
11322 #~ "padding between the I<fd> and I<len> arguments.  Therefore, since Linux "
11323 #~ "2.6.14, ARM defines a different system call that orders the arguments "
11324 #~ "suitably:"
11325 #~ msgstr ""
11326 #~ "ARM アーキテクチャでは、64 ビットの引き数は適切なレジスタの組に割り当て\n"
11327 #~ "る必要がある。このアーキテクチャでは、B<posix_fadvise>() の呼び出し方に\n"
11328 #~ "は欠陥があり、それはこのシステムコールでは引き数 I<fd> と I<len> の間の\n"
11329 #~ "パディング (詰めもの) でレジスタが一つ消費されてしまうというものである。\n"
11330 #~ "そのため、Linux 2.6.14 以降では、ARM では引き数が適切な順序になった別の\n"
11331 #~ "システムコールが定義されている。"
11332
11333 #~ msgid ""
11334 #~ "The behavior of this system call is otherwise exactly the same as "
11335 #~ "B<posix_fadvise>().  No library support is provided for this system call "
11336 #~ "in glibc."
11337 #~ msgstr ""
11338 #~ "上記の点以外は、このシステムコールの動作は B<posix_fadvise>() と全く\n"
11339 #~ "同じである。このシステムコールに対するライブラリによるサポートは glibc\n"
11340 #~ "では提供されていない。"
11341
11342 #~ msgid ""
11343 #~ "The I<mode> is not supported by the file system containing the file "
11344 #~ "referred to by I<fd>."
11345 #~ msgstr ""
11346 #~ "I<fd> が参照するファイルを含むファイルシステムが I<mode> をサポートしてい"
11347 #~ "ない。"
11348
11349 #~ msgid ""
11350 #~ "The function B<mtrace>()  installs handlers for B<malloc>(3), "
11351 #~ "B<realloc>(3)  and B<free>(3).  The function B<muntrace>()  disables "
11352 #~ "these handlers."
11353 #~ msgstr ""
11354 #~ "関数 B<mtrace>()  は、 B<malloc>(3), B<realloc>(3), B<free>(3)  のハンドラ"
11355 #~ "を組み込む。 関数 B<muntrace>()  はこれらのハンドラを解除する。"
11356
11357 #~ msgid ""
11358 #~ "The environment variable B<MALLOC_TRACE> defines a file where "
11359 #~ "B<mtrace>()  writes its output.  This file must be writable to the user "
11360 #~ "or B<mtrace>()  will do nothing.  If the file is not empty it will be "
11361 #~ "truncated."
11362 #~ msgstr ""
11363 #~ "環境変数 B<MALLOC_TRACE> は B<mtrace>()  が出力を書き出すファイルを指定す"
11364 #~ "る。 ユーザが書き込み権限を持つファイルを指定しなければならない。 書き込み"
11365 #~ "権限がない場合、 B<mtrace>()  は何もしない。 ファイルが空でない場合、ファ"
11366 #~ "イルの元の内容を上書きする。"
11367
11368 #~ msgid ""
11369 #~ "The output of B<mtrace>()  will be ASCII but not in a friendly format.  "
11370 #~ "So glibc comes with a perl-script called mtrace to make sense of it."
11371 #~ msgstr ""
11372 #~ "B<mtrace>()  の出力は ASCII 形式だが、人が読みやすいフォーマットではな"
11373 #~ "い。 そこで、glibc には mtrace 出力を分かりやすい形式に変換する perl スク"
11374 #~ "リプトが付属している。"
11375
11376 #~ msgid ""
11377 #~ "This flag allocates and initializes to zero the disk space within the "
11378 #~ "range specified by I<offset> and I<len>.  After a successful call, "
11379 #~ "subsequent writes into this range are guaranteed not to fail because of "
11380 #~ "lack of disk space.  Preallocating zeroed blocks beyond the end of the "
11381 #~ "file is useful for optimizing append workloads.  Preallocating blocks "
11382 #~ "does not change the file size (as reported by B<stat>(2))  even if it is "
11383 #~ "less than I<offset>+I<len>."
11384 #~ msgstr ""
11385 #~ "このフラグは、 I<offset> と I<len> で指定された領域のディスク空間を割り当"
11386 #~ "て、その空間を 0 で初期化する。 呼び出しが成功すると、それに続いてこの領域"
11387 #~ "への書き込みが行われるが、 ディスク空間の不足による書き込み失敗が発生しな"
11388 #~ "いことが保証される。 ファイル末尾より後ろの領域について 0 で埋めたブロック"
11389 #~ "を前もって 割り当てておくことは、追記 (append) の作業負荷を最適化するのに "
11390 #~ "有用である。 ファイルサイズが I<offset>+I<len> よりも小さい場合であって"
11391 #~ "も、ブロックの前もっての割り当てにより (B<stat>(2)  が返す) ファイルサイズ"
11392 #~ "は変更されることはない。"