OSDN Git Service

Update minor changes in LDP 3.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-08 02:30+0900\n"
11 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
12 "Language-Team: LANGUAGE <LL@li.org>\n"
13 "Language: \n"
14 "MIME-Version: 1.0\n"
15 "Content-Type: text/plain; charset=UTF-8\n"
16 "Content-Transfer-Encoding: 8bit\n"
17
18 #. type: TH
19 #: build/C/man2/alloc_hugepages.2:25
20 #, no-wrap
21 msgid "ALLOC_HUGEPAGES"
22 msgstr "ALLOC_HUGEPAGES"
23
24 #. type: TH
25 #: build/C/man2/alloc_hugepages.2:25
26 #, no-wrap
27 msgid "2007-05-31"
28 msgstr "2007-05-31"
29
30 #. type: TH
31 #: build/C/man2/alloc_hugepages.2:25 build/C/man2/cacheflush.2:25
32 #: build/C/man2/fallocate.2:11 build/C/man2/madvise.2:35
33 #: build/C/man3/mallinfo.3:26 build/C/man3/malloc_stats.3:26
34 #: build/C/man3/malloc_trim.3:26 build/C/man3/mallopt.3:26
35 #: build/C/man2/mlock.2:26 build/C/man2/mmap.2:40 build/C/man2/mmap2.2:29
36 #: build/C/man2/mprotect.2: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 msgid ""
431 "This page is part of release 3.68 of the Linux I<man-pages> project.  A "
432 "description of the project, information about reporting bugs, and the latest "
433 "version of this page, can be found at \\%http://www.kernel.org/doc/man-"
434 "pages/."
435 msgstr ""
436 "この man ページは Linux I<man-pages> プロジェクトのリリース 3.68 の一部\n"
437 "である。プロジェクトの説明とバグ報告に関する情報は\n"
438 "http://www.kernel.org/doc/man-pages/ に書かれている。"
439
440 #. type: TH
441 #: build/C/man3/alloca.3:43
442 #, no-wrap
443 msgid "ALLOCA"
444 msgstr "ALLOCA"
445
446 #. type: TH
447 #: build/C/man3/alloca.3:43
448 #, no-wrap
449 msgid "2013-10-07"
450 msgstr "2013-10-07"
451
452 #. type: TH
453 #: build/C/man3/alloca.3:43 build/C/man3/malloc_get_state.3:25
454 #: build/C/man3/malloc_hook.3:10 build/C/man3/malloc_info.3:25
455 #: build/C/man3/malloc_usable_size.3:25 build/C/man3/mcheck.3:25
456 #: build/C/man3/mtrace.3:25 build/C/man3/posix_fallocate.3:25
457 #: build/C/man3/posix_memalign.3:29
458 #, no-wrap
459 msgid "GNU"
460 msgstr "GNU"
461
462 #. type: Plain text
463 #: build/C/man3/alloca.3:46
464 msgid "alloca - allocate memory that is automatically freed"
465 msgstr "alloca - 自動的に解放されるメモリを割り当てる"
466
467 #. type: Plain text
468 #: build/C/man3/alloca.3:48
469 msgid "B<#include E<lt>alloca.hE<gt>>"
470 msgstr "B<#include E<lt>alloca.hE<gt>>"
471
472 #. type: Plain text
473 #: build/C/man3/alloca.3:50
474 msgid "B<void *alloca(size_t >I<size>B<);>"
475 msgstr "B<void *alloca(size_t >I<size>B<);>"
476
477 #. type: Plain text
478 #: build/C/man3/alloca.3:60
479 msgid ""
480 "The B<alloca>()  function allocates I<size> bytes of space in the stack "
481 "frame of the caller.  This temporary space is automatically freed when the "
482 "function that called B<alloca>()  returns to its caller."
483 msgstr ""
484 "B<alloca>()  関数は、 I<size> バイトの領域を呼出元のスタック・フレームに割り"
485 "付ける。 この一時的な領域は、 B<alloca>()  を呼び出した関数が呼出元に返るとき"
486 "に自動的に解放される。"
487
488 #. type: Plain text
489 #: build/C/man3/alloca.3:65
490 msgid ""
491 "The B<alloca>()  function returns a pointer to the beginning of the "
492 "allocated space.  If the allocation causes stack overflow, program behavior "
493 "is undefined."
494 msgstr ""
495 "B<alloca>()  関数は、割り付けた領域の始まりを指すポインタを返す。 割り付けに"
496 "よってスタックオーバーフローが起った場合の プログラムの動作は定義されていな"
497 "い。"
498
499 #. type: SH
500 #: build/C/man3/alloca.3:65
501 #, no-wrap
502 msgid "ATTRIBUTES"
503 msgstr "属性"
504
505 #. type: SS
506 #: build/C/man3/alloca.3:66
507 #, no-wrap
508 msgid "Multithreading (see pthreads(7))"
509 msgstr "マルチスレッディング (pthreads(7) 参照)"
510
511 #. type: Plain text
512 #: build/C/man3/alloca.3:70
513 msgid "The B<alloca>()  function is thread-safe."
514 msgstr "B<alloca>() 関数はスレッドセーフである。"
515
516 #. type: Plain text
517 #: build/C/man3/alloca.3:72
518 msgid "This function is not in POSIX.1-2001."
519 msgstr "この関数は POSIX.1-2001 にはない。"
520
521 #. type: Plain text
522 #: build/C/man3/alloca.3:78
523 msgid ""
524 "There is evidence that the B<alloca>()  function appeared in 32V, PWB, "
525 "PWB.2, 3BSD, and 4BSD.  There is a man page for it in 4.3BSD.  Linux uses "
526 "the GNU version."
527 msgstr ""
528 "32V, PWB, PWB.2, 3BSD, 4BSD に B<alloca>()  関数が登場した証拠がある。 "
529 "4.3BSD には、マニュアルページがある。 Linux は、GNU 版を使っている。 この関数"
530 "は POSIX.1-2001 にはない。"
531
532 #. type: Plain text
533 #: build/C/man3/alloca.3:93
534 msgid ""
535 "The B<alloca>()  function is machine- and compiler-dependent.  For certain "
536 "applications, its use can improve efficiency compared to the use of "
537 "B<malloc>(3)  plus B<free>(3).  In certain cases, it can also simplify "
538 "memory deallocation in applications that use B<longjmp>(3)  or "
539 "B<siglongjmp>(3).  Otherwise, its use is discouraged."
540 msgstr ""
541 "B<alloca>()  関数は、機種とコンパイラに依存する。 特定のアプリケーションで"
542 "は、この関数を使うと B<malloc>(3)  と B<free>(3)  を組み合わせて使った場合に"
543 "比べて効率を改善することができる。 特定の場合では、この関数を使うことで、 "
544 "B<longjmp>(3)  や B<siglongjmp>(3)  を使うアプリケーションでのメモリの開放を"
545 "簡単にすることができる。 それ以外の場合では、この関数の使用は推奨されない。"
546
547 #. type: Plain text
548 #: build/C/man3/alloca.3:102
549 msgid ""
550 "Because the space allocated by B<alloca>()  is allocated within the stack "
551 "frame, that space is automatically freed if the function return is jumped "
552 "over by a call to B<longjmp>(3)  or B<siglongjmp>(3)."
553 msgstr ""
554 "B<alloca>()  により割り当てられる空間はスタックフレームから割り当てらるの"
555 "で、 関数の戻り先が B<longjmp>(3)  や B<siglongjmp>(3)  の呼び出しによりジャ"
556 "ンプした場合には、 割り当てられた空間は自動的に解放される。"
557
558 #. type: Plain text
559 #: build/C/man3/alloca.3:107
560 msgid "Do not attempt to B<free>(3)  space allocated by B<alloca>()!"
561 msgstr ""
562 "B<alloca>()  で割り当てられた空間を B<free>(3)  しようとすることのないよう"
563 "に!"
564
565 #. type: SS
566 #: build/C/man3/alloca.3:107
567 #, no-wrap
568 msgid "Notes on the GNU version"
569 msgstr "GNU 版についての注意"
570
571 #. type: Plain text
572 #: build/C/man3/alloca.3:129
573 msgid ""
574 "Normally, B<gcc>(1)  translates calls to B<alloca>()  with inlined code.  "
575 "This is not done when either the I<-ansi>, I<-std=c89>, I<-std=c99>, or the "
576 "I<-std=c11> option is given B<and> the header I<E<lt>alloca.hE<gt>> is not "
577 "included.  Otherwise, (without an -ansi or -std=c* option) the glibc version "
578 "of I<E<lt>stdlib.hE<gt>> includes I<E<lt>alloca.hE<gt>> and that contains "
579 "the lines:"
580 msgstr ""
581 "通常 B<gcc>(1) は B<alloca>()  の呼び出しをインラインコードに変換する。 I<-"
582 "ansi>, I<-std=c89>, I<-std=c99>, I<-std=c11> のいずれかのオプションが指定さ"
583 "れ、B<かつ> I<E<lt>alloca.hE<gt>> がインクルードされていない場合、 この変換は"
584 "行われない。 それ以外の場合 (-ansi オプションも -std=c* オプションも指定され"
585 "ない場合) には、 glibc 版の I<E<lt>stdlib.hE<gt>> は I<E<lt>alloca.hE<gt>> を"
586 "インクルードするが、このファイルには以下の行が含まれており、"
587
588 #. type: Plain text
589 #: build/C/man3/alloca.3:134
590 #, no-wrap
591 msgid ""
592 "    #ifdef  __GNUC__\n"
593 "    #define alloca(size)   __builtin_alloca (size)\n"
594 "    #endif\n"
595 msgstr ""
596 "    #ifdef  __GNUC__\n"
597 "    #define alloca(size)   __builtin_alloca (size)\n"
598 "    #endif\n"
599
600 #. type: Plain text
601 #: build/C/man3/alloca.3:137
602 msgid "with messy consequences if one has a private version of this function."
603 msgstr "独自版の __builtin_alloca (size) 関数がある場合、厄介な結果になる。"
604
605 #. type: Plain text
606 #: build/C/man3/alloca.3:141
607 msgid ""
608 "The fact that the code is inlined means that it is impossible to take the "
609 "address of this function, or to change its behavior by linking with a "
610 "different library."
611 msgstr ""
612 "このコードはインライン化されているので、 この関数のアドレスを取得したり、 他"
613 "のライブラリをリンクして動作を変更することはできない。"
614
615 #. type: Plain text
616 #: build/C/man3/alloca.3:145
617 msgid ""
618 "The inlined code often consists of a single instruction adjusting the stack "
619 "pointer, and does not check for stack overflow.  Thus, there is no NULL "
620 "error return."
621 msgstr ""
622 "通常このインラインコードはスタックポインタを移動する 1 つの命令 "
623 "(instruction) から構成されており、 スタックオーバーフローをチェックしない。 "
624 "よって NULL エラーが返されることはない。"
625
626 #. type: SH
627 #: build/C/man3/alloca.3:145 build/C/man2/cacheflush.2:82
628 #: build/C/man3/mallinfo.3:114 build/C/man3/mallopt.3:406
629 #: build/C/man2/mlock.2:311 build/C/man2/mmap.2:585 build/C/man3/mtrace.3:102
630 #: build/C/man2/posix_fadvise.2:186 build/C/man2/readahead.2:98
631 #: build/C/man2/shmget.2:336
632 #, no-wrap
633 msgid "BUGS"
634 msgstr "バグ"
635
636 #. type: Plain text
637 #: build/C/man3/alloca.3:150
638 msgid ""
639 "There is no error indication if the stack frame cannot be extended.  "
640 "(However, after a failed allocation, the program is likely to receive a "
641 "B<SIGSEGV> signal if it attempts to access the unallocated space.)"
642 msgstr ""
643 "スタックフレームが拡張できなかった場合、エラー通知は行われない。 (しかしなが"
644 "ら、割り当てに失敗した後で、プログラムが割り当てられなかった 空間にアクセスし"
645 "ようとした場合に B<SIGSEGV> シグナルを受信することだろう。)"
646
647 #. type: Plain text
648 #: build/C/man3/alloca.3:158
649 msgid ""
650 "On many systems B<alloca>()  cannot be used inside the list of arguments of "
651 "a function call, because the stack space reserved by B<alloca>()  would "
652 "appear on the stack in the middle of the space for the function arguments."
653 msgstr ""
654 "多くのシステムにおいて、関数コールの引き数のリスト内では B<alloca>()  が使え"
655 "ない。 これは、 B<alloca>()  によって予約されるスタック領域が、 関数引き数に"
656 "使われるスタック領域の中に現れてしまうためである。"
657
658 #. type: SH
659 #: build/C/man3/alloca.3:158 build/C/man2/fallocate.2:373
660 #: build/C/man2/madvise.2:372 build/C/man3/mallinfo.3:270
661 #: build/C/man3/malloc_get_state.3:111 build/C/man3/malloc_hook.3:137
662 #: build/C/man3/malloc_info.3:256 build/C/man3/malloc_stats.3:61
663 #: build/C/man3/malloc_trim.3:78 build/C/man3/malloc_usable_size.3:62
664 #: build/C/man3/mallopt.3:566 build/C/man3/mcheck.3:204
665 #: build/C/man2/mlock.2:336 build/C/man2/mmap.2:710 build/C/man2/mmap2.2:95
666 #: build/C/man2/mprotect.2:226 build/C/man2/mremap.2:199
667 #: build/C/man2/msync.2:147 build/C/man3/mtrace.3:167
668 #: build/C/man2/posix_fadvise.2:191 build/C/man3/posix_fallocate.3:128
669 #: build/C/man3/posix_memalign.3:272 build/C/man2/readahead.2:107
670 #: build/C/man2/remap_file_pages.2:168 build/C/man3/shm_open.3:271
671 #: build/C/man7/shm_overview.7:114 build/C/man2/shmctl.2:428
672 #: build/C/man2/shmget.2:342 build/C/man2/shmop.2:297
673 #: build/C/man2/subpage_prot.2:128 build/C/man2/sync_file_range.2:221
674 #, no-wrap
675 msgid "SEE ALSO"
676 msgstr "関連項目"
677
678 #. type: Plain text
679 #: build/C/man3/alloca.3:162
680 msgid "B<brk>(2), B<longjmp>(3), B<malloc>(3)"
681 msgstr "B<brk>(2), B<longjmp>(3), B<malloc>(3)"
682
683 #. type: TH
684 #: build/C/man2/cacheflush.2:25
685 #, no-wrap
686 msgid "CACHEFLUSH"
687 msgstr "CACHEFLUSH"
688
689 #. type: TH
690 #: build/C/man2/cacheflush.2:25
691 #, no-wrap
692 msgid "2007-05-26"
693 msgstr "2007-05-26"
694
695 #. type: Plain text
696 #: build/C/man2/cacheflush.2:28
697 msgid "cacheflush - flush contents of instruction and/or data cache"
698 msgstr "cacheflush - 命令キャッシュやデータキャッシュの内容をフラッシュする"
699
700 #. type: Plain text
701 #: build/C/man2/cacheflush.2:31
702 #, no-wrap
703 msgid "B<#include E<lt>asm/cachectl.hE<gt>>\n"
704 msgstr "B<#include E<lt>asm/cachectl.hE<gt>>\n"
705
706 #. type: Plain text
707 #: build/C/man2/cacheflush.2:33
708 #, no-wrap
709 msgid "B<int cacheflush(char *>I<addr>B<, int >I<nbytes>B<, int >I<cache>B<);>\n"
710 msgstr "B<int cacheflush(char *>I<addr>B<, int >I<nbytes>B<, int >I<cache>B<);>\n"
711
712 #. type: Plain text
713 #: build/C/man2/cacheflush.2:43
714 msgid ""
715 "B<cacheflush>()  flushes the contents of the indicated cache(s) for the user "
716 "addresses in the range I<addr> to I<(addr+nbytes-1)>.  I<cache> may be one "
717 "of:"
718 msgstr ""
719 "B<cacheflush>()  は I<addr> から I<(addr+nbytes-1)> の範囲のユーザアドレスに"
720 "対応する 指定されたキャッシュをフラッシュする。 I<cache> には以下のいずれかを"
721 "指定する:"
722
723 #. type: TP
724 #: build/C/man2/cacheflush.2:43
725 #, no-wrap
726 msgid "B<ICACHE>"
727 msgstr "B<ICACHE>"
728
729 #. type: Plain text
730 #: build/C/man2/cacheflush.2:46
731 msgid "Flush the instruction cache."
732 msgstr "命令 (instruction) キャッシュをフラッシュする。"
733
734 #. type: TP
735 #: build/C/man2/cacheflush.2:46
736 #, no-wrap
737 msgid "B<DCACHE>"
738 msgstr "B<DCACHE>"
739
740 #. type: Plain text
741 #: build/C/man2/cacheflush.2:49
742 msgid "Write back to memory and invalidate the affected valid cache lines."
743 msgstr "変更があったキャッシュラインをメモリに書き戻し、無効にする。"
744
745 #. type: TP
746 #: build/C/man2/cacheflush.2:49
747 #, no-wrap
748 msgid "B<BCACHE>"
749 msgstr "B<BCACHE>"
750
751 #. type: Plain text
752 #: build/C/man2/cacheflush.2:53
753 msgid "Same as B<(ICACHE|DCACHE)>."
754 msgstr "B<(ICACHE|DCACHE)> と同じ。"
755
756 #. type: Plain text
757 #: build/C/man2/cacheflush.2:59
758 msgid ""
759 "B<cacheflush>()  returns 0 on success or -1 on error.  If errors are "
760 "detected, I<errno> will indicate the error."
761 msgstr ""
762 "B<cacheflush>()  は成功した場合は 0 を、失敗した場合は -1 を返す。エラーが検"
763 "出された場合は I<errno> にエラーが指示される。"
764
765 #. type: TP
766 #: build/C/man2/cacheflush.2:60 build/C/man2/mmap2.2:62
767 #: build/C/man2/mremap.2:142 build/C/man2/shmctl.2:314
768 #: build/C/man2/subpage_prot.2:72
769 #, no-wrap
770 msgid "B<EFAULT>"
771 msgstr "B<EFAULT>"
772
773 #. type: Plain text
774 #: build/C/man2/cacheflush.2:67
775 msgid ""
776 "Some or all of the address range I<addr> to I<(addr+nbytes-1)> is not "
777 "accessible."
778 msgstr ""
779 "I<addr> から I<(addr+nbytes-1)> の範囲のアドレスの全てまたは一部が アクセス可"
780 "能ではない。"
781
782 #. type: TP
783 #: build/C/man2/cacheflush.2:67 build/C/man2/fallocate.2:247
784 #: build/C/man2/fallocate.2:259 build/C/man2/fallocate.2:269
785 #: build/C/man2/fallocate.2:279 build/C/man2/fallocate.2:287
786 #: build/C/man2/madvise.2:282 build/C/man3/malloc_info.3:56
787 #: build/C/man2/mlock.2:157 build/C/man2/mlock.2:164 build/C/man2/mlock.2:176
788 #: build/C/man2/mmap.2:421 build/C/man2/mmap.2:429 build/C/man2/mmap.2:434
789 #: build/C/man2/mmap2.2:65 build/C/man2/mprotect.2:95
790 #: build/C/man2/mremap.2:151 build/C/man2/msync.2:80
791 #: build/C/man2/posix_fadvise.2:94 build/C/man3/posix_fallocate.3:81
792 #: build/C/man3/posix_memalign.3:158 build/C/man2/readahead.2:77
793 #: build/C/man2/remap_file_pages.2:132 build/C/man2/remap_file_pages.2:139
794 #: build/C/man3/shm_open.3:213 build/C/man2/shmctl.2:328
795 #: build/C/man2/shmget.2:207 build/C/man2/shmget.2:215
796 #: build/C/man2/shmop.2:197 build/C/man2/shmop.2:220
797 #: build/C/man2/subpage_prot.2:77 build/C/man2/sync_file_range.2:152
798 #, no-wrap
799 msgid "B<EINVAL>"
800 msgstr "B<EINVAL>"
801
802 #. type: Plain text
803 #: build/C/man2/cacheflush.2:75
804 msgid "I<cache> is not one of B<ICACHE>, B<DCACHE>, or B<BCACHE>."
805 msgstr "I<cache> パラメータが B<ICACHE>, B<DCACHE>, B<BCACHE> のどれでもない。"
806
807 #.  FIXME This system call was only on MIPS back in 1.2 days, but
808 #.  by now it is on a number of other architectures (but not i386).
809 #.  Investigate the details and update this page.
810 #.  Irix 6.5 appears to have a cacheflush() syscall -- mtk
811 #. type: Plain text
812 #: build/C/man2/cacheflush.2:82
813 msgid ""
814 "This Linux-specific system call is available only on MIPS-based systems.  It "
815 "should not be used in programs intended to be portable."
816 msgstr ""
817 "この Linux 特有のシステムコールは MIPS ベースのシステムでのみ有効である。 移"
818 "植を意図したプログラムで使用すべきではない。"
819
820 #. type: Plain text
821 #: build/C/man2/cacheflush.2:89
822 msgid ""
823 "The current implementation ignores the I<addr> and I<nbytes> arguments.  "
824 "Therefore, the whole cache is always flushed."
825 msgstr ""
826 "現在の実装では、引き数 I<addr> と I<nbytes> は無視される。そのため、 常に全て"
827 "のキャッシュがフラッシュされる。"
828
829 #. type: TH
830 #: build/C/man2/fallocate.2:11
831 #, no-wrap
832 msgid "FALLOCATE"
833 msgstr "FALLOCATE"
834
835 #. type: TH
836 #: build/C/man2/fallocate.2:11
837 #, no-wrap
838 msgid "2014-05-08"
839 msgstr "2014-05-08"
840
841 #. type: Plain text
842 #: build/C/man2/fallocate.2:14
843 msgid "fallocate - manipulate file space"
844 msgstr "fallocate - ファイル空間の操作"
845
846 #. type: Plain text
847 #: build/C/man2/fallocate.2:18 build/C/man2/readahead.2:35
848 #, no-wrap
849 msgid ""
850 "B<#define _GNU_SOURCE>             /* See feature_test_macros(7) */\n"
851 "B<#include E<lt>fcntl.hE<gt>>\n"
852 msgstr ""
853 "B<#define _GNU_SOURCE>             /* feature_test_macros(7) 参照 */\n"
854 "B<#include E<lt>fcntl.hE<gt>>\n"
855
856 #. type: Plain text
857 #: build/C/man2/fallocate.2:21
858 #, no-wrap
859 msgid "B<int fallocate(int >I<fd>B<, int >I<mode>B<, off_t >I<offset>B<, off_t >I<len>B<);>\n"
860 msgstr "B<int fallocate(int >I<fd>B<, int >I<mode>B<, off_t >I<offset>B<, off_t >I<len>B<);>\n"
861
862 #. type: Plain text
863 #: build/C/man2/fallocate.2:27
864 msgid ""
865 "This is a nonportable, Linux-specific system call.  For the portable, "
866 "POSIX.1-specified method of ensuring that space is allocated for a file, see "
867 "B<posix_fallocate>(3)."
868 msgstr ""
869 "このシステムコールは、移植性のない、Linux 固有のシステムコールである。 移植性"
870 "が必要な場合は、ファイルに対してディスク空間を確実に確保するために、 POSIX.1 "
871 "で規定された方法である B<posix_fallocate>(3)  を使うこと。"
872
873 #. type: Plain text
874 #: build/C/man2/fallocate.2:37
875 msgid ""
876 "B<fallocate>()  allows the caller to directly manipulate the allocated disk "
877 "space for the file referred to by I<fd> for the byte range starting at "
878 "I<offset> and continuing for I<len> bytes."
879 msgstr ""
880 "B<fallocate>()  を使うと、 I<fd> が参照するファイルに割り当てられたディスク空"
881 "間を直接操作できる。 操作対象は、 I<offset> から始まる長さ I<len> バイトの領"
882 "域である。"
883
884 #. type: Plain text
885 #: build/C/man2/fallocate.2:42
886 msgid ""
887 "The I<mode> argument determines the operation to be performed on the given "
888 "range.  Details of the supported operations are given in the subsections "
889 "below."
890 msgstr ""
891 "I<mode> 引き数は、指定された領域に対して実行する操作を指定する。\n"
892 "サポートされている操作の詳細は以下のサブセクションで説明する。"
893
894 #. type: SS
895 #: build/C/man2/fallocate.2:42
896 #, no-wrap
897 msgid "Allocating disk space"
898 msgstr "ディスク領域の割り当て"
899
900 #. type: Plain text
901 #: build/C/man2/fallocate.2:65
902 msgid ""
903 "The default operation (i.e., I<mode> is zero) of B<fallocate>()  allocates "
904 "the disk space within the range specified by I<offset> and I<len>.  The file "
905 "size (as reported by B<stat>(2))  will be changed if I<offset>+I<len> is "
906 "greater than the file size.  Any subregion within the range specified by "
907 "I<offset> and I<len> that did not contain data before the call will be "
908 "initialized to zero.  This default behavior closely resembles the behavior "
909 "of the B<posix_fallocate>(3)  library function, and is intended as a method "
910 "of optimally implementing that function."
911 msgstr ""
912 "B<fallocate>() のデフォルトの動作 (つまり I<mode> が 0 の場合) は、 "
913 "I<offset> と I<len> で指定された範囲のディスク領域の割り当てを行う。 "
914 "I<offset>+I<len> がファイルサイズよりも大きかった場合、 (B<stat>(2) で報告さ"
915 "れる) ファイルサイズが変更される。 I<offset> と I<len> で指定される範囲のサブ"
916 "領域で、 呼び出し前にデータを保持していなかった場合、そのサブ領域は 0 で初期"
917 "化される。 このデフォルトの動作は、 ライブラリ関数 B<posix_fallocate>(3) の動"
918 "作と非常に似ている。 これは、 このシステムコールが B<posix_fallocate>(3) を最"
919 "適に実装する手段を提供することを目的としているからである。"
920
921 #. type: Plain text
922 #: build/C/man2/fallocate.2:71
923 msgid ""
924 "After a successful call, subsequent writes into the range specified by "
925 "I<offset> and I<len> are guaranteed not to fail because of lack of disk "
926 "space."
927 msgstr ""
928 "呼び出しが成功した場合、\n"
929 "I<offset> と I<len> で指定された範囲へのそれ以降の書き込みでは、\n"
930 "ディスクの領域不足での書き込み失敗が起こらないことが保証される。"
931
932 #. type: Plain text
933 #: build/C/man2/fallocate.2:82
934 msgid ""
935 "If the B<FALLOC_FL_KEEP_SIZE> flag is specified in I<mode>, the behavior of "
936 "the call is similar, but the file size will not be changed even if I<offset>"
937 "+I<len> is greater than the file size.  Preallocating zeroed blocks beyond "
938 "the end of the file in this manner is useful for optimizing append workloads."
939 msgstr ""
940 "B<FALLOC_FL_KEEP_SIZE> フラグが I<mode> に指定された場合、このシステムコー"
941 "ル\n"
942 "の動作は似ているが、 I<offset>+I<len> がファイルサイズよりも大きい場合で\n"
943 "あってもファイルサイズは変更されない点が異なる。この場合のファイルの末尾\n"
944 "よりも後ろの前もって割り当てられた 0 で埋められたブロックは、ファイルへの\n"
945 "追記を最適化したい場合に役に立つ。"
946
947 #. type: Plain text
948 #: build/C/man2/fallocate.2:86
949 msgid ""
950 "Because allocation is done in block size chunks, B<fallocate>()  may "
951 "allocate a larger range of disk space than was specified."
952 msgstr ""
953 "割り当てはブロックサイズ単位で行われるため、 B<fallocate>() は指定されたよ"
954 "り\n"
955 "も大きなディスク領域を割り当てることがある。"
956
957 #. type: SS
958 #: build/C/man2/fallocate.2:86
959 #, no-wrap
960 msgid "Deallocating file space"
961 msgstr "ファイル空間の割り当て解除"
962
963 #. type: Plain text
964 #: build/C/man2/fallocate.2:101
965 msgid ""
966 "Specifying the B<FALLOC_FL_PUNCH_HOLE> flag (available since Linux 2.6.38) "
967 "in I<mode> deallocates space (i.e., creates a hole)  in the byte range "
968 "starting at I<offset> and continuing for I<len> bytes.  Within the specified "
969 "range, partial filesystem blocks are zeroed, and whole filesystem blocks are "
970 "removed from the file.  After a successful call, subsequent reads from this "
971 "range will return zeroes."
972 msgstr ""
973 "B<FALLOC_FL_PUNCH_HOLE> フラグ (Linux 2.6.38 以降で利用可能) を I<mode> に指"
974 "定すると、 I<offset> で始まる I<len> バイトの領域の空間を解放する (ホールを作"
975 "成する)。 指定された範囲のうち、 部分的に使用しているファイルシステムブロック"
976 "は 0 で埋められ、 全体を使用しているファイルシステムブロックはそのファイルか"
977 "ら削除される。 呼び出しが成功すると、 これ以降のこの範囲からの読み出しでは 0 "
978 "を返す。"
979
980 #. type: Plain text
981 #: build/C/man2/fallocate.2:112
982 msgid ""
983 "The B<FALLOC_FL_PUNCH_HOLE> flag must be ORed with B<FALLOC_FL_KEEP_SIZE> in "
984 "I<mode>; in other words, even when punching off the end of the file, the "
985 "file size (as reported by B<stat>(2))  does not change."
986 msgstr ""
987 "B<FALLOC_FL_PUNCH_HOLE> フラグは B<FALLOC_FL_KEEP_SIZE> と論理和 (OR) をとっ"
988 "て I<mode> に指定しなければならない。 つまり、 ファイル末尾の punch off を"
989 "行った場合でも、 (B<stat>(2) で報告される) ファイルサイズが変化しない。"
990
991 #. type: Plain text
992 #: build/C/man2/fallocate.2:117
993 msgid ""
994 "Not all filesystems support B<FALLOC_FL_PUNCH_HOLE>; if a filesystem doesn't "
995 "support the operation, an error is returned.  The operation is supported on "
996 "at least the following filesystems:"
997 msgstr ""
998 "すべてのファイルシステムで B<FALLOC_FL_PUNCH_HOLE> がサポートされているわけで"
999 "はない。 ファイルシステムがこの操作をサポートしていない場合は、 エラーが返"
1000 "る。 この操作は少なくとも以下のファイルシステムでサポートされている。"
1001
1002 #. type: IP
1003 #: build/C/man2/fallocate.2:117 build/C/man2/fallocate.2:119
1004 #: build/C/man2/fallocate.2:122 build/C/man2/fallocate.2:124
1005 #: build/C/man2/fallocate.2:222 build/C/man2/fallocate.2:225
1006 #: build/C/man2/madvise.2:286 build/C/man2/madvise.2:292
1007 #: build/C/man2/madvise.2:295 build/C/man2/madvise.2:298
1008 #: build/C/man2/madvise.2:301 build/C/man3/mallopt.3:235
1009 #: build/C/man3/mallopt.3:241 build/C/man2/shmop.2:62 build/C/man2/shmop.2:68
1010 #: build/C/man2/shmop.2:80
1011 #, no-wrap
1012 msgid "*"
1013 msgstr "*"
1014
1015 #. type: Plain text
1016 #: build/C/man2/fallocate.2:119
1017 msgid "XFS (since Linux 2.6.38)"
1018 msgstr "XFS (Linux 2.6.38 以降)"
1019
1020 #.  commit a4bb6b64e39abc0e41ca077725f2a72c868e7622
1021 #. type: Plain text
1022 #: build/C/man2/fallocate.2:122
1023 msgid "ext4 (since Linux 3.0)"
1024 msgstr "ext4 (Linux 3.0 以降)"
1025
1026 #. type: Plain text
1027 #: build/C/man2/fallocate.2:124
1028 msgid "Btrfs (since Linux 3.7)"
1029 msgstr "Btrfs (Linux 3.7 以降)"
1030
1031 #.  commit 83e4fa9c16e4af7122e31be3eca5d57881d236fe
1032 #. type: Plain text
1033 #: build/C/man2/fallocate.2:127
1034 msgid "tmpfs (since Linux 3.5)"
1035 msgstr "tmpfs (Linux 3.5 以降)"
1036
1037 #. type: SS
1038 #: build/C/man2/fallocate.2:127
1039 #, no-wrap
1040 msgid "Collapsing file space"
1041 msgstr "ファイル空間の一部削除"
1042
1043 #.  commit 00f5e61998dd17f5375d9dfc01331f104b83f841
1044 #. type: Plain text
1045 #: build/C/man2/fallocate.2:147
1046 msgid ""
1047 "Specifying the B<FALLOC_FL_COLLAPSE_RANGE> flag (available since Linux 3.15) "
1048 "in I<mode> removes a byte range from a file, without leaving a hole.  The "
1049 "byte range to be collapsed starts at I<offset> and continues for I<len> "
1050 "bytes.  At the completion of the operation, the contents of the file "
1051 "starting at the location I<offset+len> will be appended at the location "
1052 "I<offset>, and the file will be I<len> bytes smaller."
1053 msgstr ""
1054 "B<FALLOC_FL_COLLAPSE_RANGE> フラグ (Linux 3.15 以降で利用可能) を I<mode> に"
1055 "指定すると、 指定したバイト範囲をファイルから削除する。 その際、ホールを残ら"
1056 "ない。 削除されるバイト範囲は I<offset> から始まる I<len> バイトの範囲であ"
1057 "る。 操作が完了すると、 ファイルの I<offset+len> の位置から始まる内容が "
1058 "I<offset> の位置に見えるようになり、 ファイルのサイズは I<len> バイトだけ小さ"
1059 "くなる。"
1060
1061 #. type: Plain text
1062 #: build/C/man2/fallocate.2:161
1063 msgid ""
1064 "A filesystem may place limitations on the granularity of the operation, in "
1065 "order to ensure efficient implementation.  Typically, I<offset> and I<len> "
1066 "must be a multiple of the filesystem logical block size, which varies "
1067 "according to the filesystem type and configuration.  If a filesystem has "
1068 "such a requirement, B<fallocate>()  will fail with the error B<EINVAL> if "
1069 "this requirement is violated."
1070 msgstr ""
1071 "効率的に動作する実装にするため、ファイルシステムはこの操作の粒度に制限を設け"
1072 "ることがある。 通常は I<offset> と I<len> はファイルシステムの論理ブロックサ"
1073 "イズの倍数でなければならない。 論理ブロックサイズはファイルシステムの種類や設"
1074 "定により様々である。 ファイルシステムにこのような要求条件がある場合、 その要"
1075 "求条件が満たされていなければ、 B<fallocate> はエラー B<EINVAL> で失敗する。"
1076
1077 #. type: Plain text
1078 #: build/C/man2/fallocate.2:170
1079 msgid ""
1080 "If the region specified by I<offset> plus I<len> reaches or passes the end "
1081 "of file, an error is returned; instead, use B<ftruncate>(2)  to truncate a "
1082 "file."
1083 msgstr ""
1084 "I<offset> と I<len> で指定された範囲がファイルの末尾かそれより先まで達してい"
1085 "る場合、 エラーが返される。 代わりに、ファイルの切り詰めを行う "
1086 "B<ftruncate>(2) を使用すること。"
1087
1088 #. type: Plain text
1089 #: build/C/man2/fallocate.2:175
1090 msgid ""
1091 "No other flags may be specified in I<mode> in conjunction with "
1092 "B<FALLOC_FL_COLLAPSE_RANGE>."
1093 msgstr ""
1094 "B<FALLOC_FL_COLLAPSE_RANGE> と他のフラグを同時に I<mode> に指定することはでき"
1095 "ない。"
1096
1097 #.  commit 9eb79482a97152930b113b51dff530aba9e28c8e
1098 #.  commit e1d8fb88a64c1f8094b9f6c3b6d2d9e6719c970d
1099 #. type: Plain text
1100 #: build/C/man2/fallocate.2:183
1101 msgid ""
1102 "As at Linux 3.15, B<FALLOC_FL_COLLAPSE_RANGE> is supported by ext4 (only for "
1103 "extent-based files)  and XFS."
1104 msgstr ""
1105 "Linux 3.15 時点では B<FALLOC_FL_COLLAPSE_RANGE> は ext4 (エクステントベースの"
1106 "ファイル) と XFS でサポートされている。"
1107
1108 #. type: SS
1109 #: build/C/man2/fallocate.2:183
1110 #, fuzzy, no-wrap
1111 #| msgid "Deallocating file space"
1112 msgid "Zeroing file space"
1113 msgstr "ファイル空間の割り当て解除"
1114
1115 #.  commit 409332b65d3ed8cfa7a8030f1e9d52f372219642
1116 #. type: Plain text
1117 #: build/C/man2/fallocate.2:199
1118 #, fuzzy
1119 #| msgid ""
1120 #| "Specifying the B<FALLOC_FL_PUNCH_HOLE> flag (available since Linux "
1121 #| "2.6.38) in I<mode> deallocates space (i.e., creates a hole)  in the byte "
1122 #| "range starting at I<offset> and continuing for I<len> bytes.  Within the "
1123 #| "specified range, partial filesystem blocks are zeroed, and whole "
1124 #| "filesystem blocks are removed from the file.  After a successful call, "
1125 #| "subsequent reads from this range will return zeroes."
1126 msgid ""
1127 "Specifying the B<FALLOC_FL_ZERO_RANGE> flag (available since Linux 3.14)  in "
1128 "I<mode> zeroes space in the byte range starting at I<offset> and continuing "
1129 "for I<len> bytes.  Within the specified range, blocks are preallocated for "
1130 "the regions that span the holes in the file.  After a successful call, "
1131 "subsequent reads from this range will return zeroes."
1132 msgstr ""
1133 "B<FALLOC_FL_PUNCH_HOLE> フラグ (Linux 2.6.38 以降で利用可能) を I<mode> に指"
1134 "定すると、 I<offset> で始まる I<len> バイトの領域の空間を解放する (ホールを作"
1135 "成する)。 指定された範囲のうち、 部分的に使用しているファイルシステムブロック"
1136 "は 0 で埋められ、 全体を使用しているファイルシステムブロックはそのファイルか"
1137 "ら削除される。 呼び出しが成功すると、 これ以降のこの範囲からの読み出しでは 0 "
1138 "を返す。"
1139
1140 #. type: Plain text
1141 #: build/C/man2/fallocate.2:205
1142 msgid ""
1143 "Zeroing is done within the filesystem preferably by converting the range "
1144 "into unwritten extents.  This approach means that the specified range will "
1145 "not be physically zeroed out on the device (except for partial blocks at the "
1146 "either end of the range), and I/O is (otherwise) required only to update "
1147 "metadata."
1148 msgstr ""
1149
1150 #. type: Plain text
1151 #: build/C/man2/fallocate.2:217
1152 #, fuzzy
1153 #| msgid ""
1154 #| "If the B<FALLOC_FL_KEEP_SIZE> flag is specified in I<mode>, the behavior "
1155 #| "of the call is similar, but the file size will not be changed even if "
1156 #| "I<offset>+I<len> is greater than the file size.  Preallocating zeroed "
1157 #| "blocks beyond the end of the file in this manner is useful for optimizing "
1158 #| "append workloads."
1159 msgid ""
1160 "If the B<FALLOC_FL_KEEP_SIZE> flag is additionally specified in I<mode>, the "
1161 "behavior of the call is similar, but the file size will not be changed even "
1162 "if I<offset>+I<len> is greater than the file size.  This behaviour is the "
1163 "same as when preallocating space with B<FALLOC_FL_KEEP_SIZE> specified."
1164 msgstr ""
1165 "B<FALLOC_FL_KEEP_SIZE> フラグが I<mode> に指定された場合、このシステムコー"
1166 "ル\n"
1167 "の動作は似ているが、 I<offset>+I<len> がファイルサイズよりも大きい場合で\n"
1168 "あってもファイルサイズは変更されない点が異なる。この場合のファイルの末尾\n"
1169 "よりも後ろの前もって割り当てられた 0 で埋められたブロックは、ファイルへの\n"
1170 "追記を最適化したい場合に役に立つ。"
1171
1172 #. type: Plain text
1173 #: build/C/man2/fallocate.2:222
1174 msgid ""
1175 "Not all filesystems support B<FALLOC_FL_ZERO_RANGE>; if a filesystem doesn't "
1176 "support the operation, an error is returned.  The operation is supported on "
1177 "at least the following filesystems:"
1178 msgstr ""
1179 "すべてのファイルシステムで B<FALLOC_FL_ZERO_RANGE> がサポートされているわけで"
1180 "はない。 ファイルシステムがこの操作をサポートしていない場合は、 エラーが返"
1181 "る。 この操作は少なくとも以下のファイルシステムでサポートされている。"
1182
1183 #.  commit 376ba313147b4172f3e8cf620b9fb591f3e8cdfa
1184 #. type: Plain text
1185 #: build/C/man2/fallocate.2:225
1186 msgid "XFS (since Linux 3.14)"
1187 msgstr "XFS (Linux 3.14 以降)"
1188
1189 #.  commit b8a8684502a0fc852afa0056c6bb2a9273f6fcc0
1190 #. type: Plain text
1191 #: build/C/man2/fallocate.2:228
1192 #, fuzzy
1193 #| msgid "ext4 (since Linux 3.0)"
1194 msgid "ext4, for extent-based files (since Linux 3.14)"
1195 msgstr "ext4 (Linux 3.0 以降)"
1196
1197 #. type: Plain text
1198 #: build/C/man2/fallocate.2:235
1199 msgid ""
1200 "On success, B<fallocate>()  returns zero.  On error, -1 is returned and "
1201 "I<errno> is set to indicate the error."
1202 msgstr ""
1203 "成功の場合、 B<fallocate>() は 0 を返す。 エラーの場合、-1 を返し、 I<error> "
1204 "にエラーを示す値を設定する。"
1205
1206 #. type: TP
1207 #: build/C/man2/fallocate.2:236 build/C/man2/madvise.2:279
1208 #: build/C/man2/mmap.2:415 build/C/man2/posix_fadvise.2:91
1209 #: build/C/man3/posix_fallocate.3:73 build/C/man2/readahead.2:73
1210 #: build/C/man2/sync_file_range.2:148
1211 #, no-wrap
1212 msgid "B<EBADF>"
1213 msgstr "B<EBADF>"
1214
1215 #. type: Plain text
1216 #: build/C/man2/fallocate.2:240 build/C/man3/posix_fallocate.3:77
1217 msgid "I<fd> is not a valid file descriptor, or is not opened for writing."
1218 msgstr ""
1219 "I<fd> が有効なファイルディスクリプタでないか、 書き込み用としてオープンされて"
1220 "いない。"
1221
1222 #. type: TP
1223 #: build/C/man2/fallocate.2:240 build/C/man3/posix_fallocate.3:77
1224 #, no-wrap
1225 msgid "B<EFBIG>"
1226 msgstr "B<EFBIG>"
1227
1228 #. type: Plain text
1229 #: build/C/man2/fallocate.2:244
1230 msgid "I<offset>+I<len> exceeds the maximum file size."
1231 msgstr "I<offset + len> がファイルサイズの最大値よりも大きい。"
1232
1233 #. type: TP
1234 #: build/C/man2/fallocate.2:244
1235 #, no-wrap
1236 msgid "B<EINTR>"
1237 msgstr "B<EINTR>"
1238
1239 #. type: Plain text
1240 #: build/C/man2/fallocate.2:247
1241 msgid "A signal was caught during execution."
1242 msgstr "実行中にシグナルが捕捉された。"
1243
1244 #. type: Plain text
1245 #: build/C/man2/fallocate.2:259 build/C/man3/posix_fallocate.3:87
1246 msgid "I<offset> was less than 0, or I<len> was less than or equal to 0."
1247 msgstr "I<offset> が 0 未満だったか、 I<len> が 0 以下だった。"
1248
1249 #. type: Plain text
1250 #: build/C/man2/fallocate.2:269
1251 msgid ""
1252 "I<mode> is B<FALLOC_FL_COLLAPSE_RANGE> and the range specified by I<offset> "
1253 "plus I<len> reaches or passes the end of the file."
1254 msgstr ""
1255 "I<mode> が B<FALLOC_FL_COLLAPSE_RANGE> で、 I<offset> と I<len> で指定された"
1256 "範囲がファイルの末尾かそれより先まで達している。"
1257
1258 #. type: Plain text
1259 #: build/C/man2/fallocate.2:279
1260 msgid ""
1261 "I<mode> is B<FALLOC_FL_COLLAPSE_RANGE>, but either I<offset> or I<len> is "
1262 "not a multiple of the filesystem block size."
1263 msgstr ""
1264 "I<mode> が B<FALLOC_FL_COLLAPSE_RANGE> だが、 I<offset> か I<len> のいずれか"
1265 "がファイルシステムのブロックサイズの倍数ではない。"
1266
1267 #. type: Plain text
1268 #: build/C/man2/fallocate.2:287
1269 msgid ""
1270 "I<mode> contains both B<FALLOC_FL_COLLAPSE_RANGE> and other flags; no other "
1271 "flags are permitted with B<FALLOC_FL_COLLAPSE_RANGE>."
1272 msgstr ""
1273 "I<mode> に B<FALLOC_FL_COLLAPSE_RANGE> と他のフラグの両方が指定されている。 "
1274 "B<FALLOC_FL_COLLAPSE_RANGE> と他のフラグを一緒に使うことができない。"
1275
1276 #.  There was a inconsistency in 3.15-rc1, that should be resolved so that all
1277 #.  filesystems use this error for this case. (Tytso says ex4 will change.)
1278 #.  http://thread.gmane.org/gmane.comp.file-systems.xfs.general/60485/focus=5521
1279 #.  From: Michael Kerrisk (man-pages <mtk.manpages@...>
1280 #.  Subject: Re: [PATCH v5 10/10] manpage: update FALLOC_FL_COLLAPSE_RANGE flag in fallocate
1281 #.  Newsgroups: gmane.linux.man, gmane.linux.file-systems
1282 #.  Date: 2014-04-17 13:40:05 GMT
1283 #. type: Plain text
1284 #: build/C/man2/fallocate.2:304
1285 msgid ""
1286 "I<mode> is B<FALLOC_FL_COLLAPSE_RANGE> or B<FALLOC_FL_ZERO_RANGE>, but the "
1287 "file referred to by I<fd> is not a regular file."
1288 msgstr ""
1289 "I<mode> が B<FALLOC_FL_COLLAPSE_RANGE> か B<FALLOC_FL_ZERO_RANGE> だが、 "
1290 "I<fd> が参照しているファイルが通常のファイルではない。"
1291
1292 #. type: TP
1293 #: build/C/man2/fallocate.2:304 build/C/man2/madvise.2:310
1294 #: build/C/man2/sync_file_range.2:160
1295 #, no-wrap
1296 msgid "B<EIO>"
1297 msgstr "B<EIO>"
1298
1299 #. type: Plain text
1300 #: build/C/man2/fallocate.2:307
1301 msgid "An I/O error occurred while reading from or writing to a filesystem."
1302 msgstr "ファイルシステムとの読み書き中に入出力エラーが発生した。"
1303
1304 #. type: TP
1305 #: build/C/man2/fallocate.2:307 build/C/man2/mmap.2:450
1306 #: build/C/man3/posix_fallocate.3:87
1307 #, no-wrap
1308 msgid "B<ENODEV>"
1309 msgstr "B<ENODEV>"
1310
1311 #. type: Plain text
1312 #: build/C/man2/fallocate.2:314
1313 msgid ""
1314 "I<fd> does not refer to a regular file or a directory.  (If I<fd> is a pipe "
1315 "or FIFO, a different error results.)"
1316 msgstr ""
1317 "I<fd> が通常のファイルかディレクトリを参照していない (I<fd> がパイプや FIFO "
1318 "を参照している場合、別のエラーが発生する)。"
1319
1320 #. type: TP
1321 #: build/C/man2/fallocate.2:314 build/C/man3/posix_fallocate.3:91
1322 #: build/C/man2/shmget.2:233 build/C/man2/sync_file_range.2:166
1323 #, no-wrap
1324 msgid "B<ENOSPC>"
1325 msgstr "B<ENOSPC>"
1326
1327 #. type: Plain text
1328 #: build/C/man2/fallocate.2:319 build/C/man3/posix_fallocate.3:96
1329 msgid ""
1330 "There is not enough space left on the device containing the file referred to "
1331 "by I<fd>."
1332 msgstr "I<fd> が参照するファイルを含むデバイスに十分な空き領域がない。"
1333
1334 #. type: Plain text
1335 #: build/C/man2/fallocate.2:323
1336 msgid "This kernel does not implement B<fallocate>()."
1337 msgstr "このカーネルでは B<fallocate>() は実装されていない。"
1338
1339 #. type: TP
1340 #: build/C/man2/fallocate.2:323
1341 #, no-wrap
1342 msgid "B<EOPNOTSUPP>"
1343 msgstr "B<EOPNOTSUPP>"
1344
1345 #. type: Plain text
1346 #: build/C/man2/fallocate.2:332
1347 msgid ""
1348 "The filesystem containing the file referred to by I<fd> does not support "
1349 "this operation; or the I<mode> is not supported by the filesystem containing "
1350 "the file referred to by I<fd>."
1351 msgstr ""
1352 "I<fd> が参照するファイルを含むファイルシステムが 指定された操作を\n"
1353 "サポートしていない。 I<fd> が参照するファイルを含むファイルシステムが\n"
1354 "I<mode> をサポートしていない。"
1355
1356 #. type: TP
1357 #: build/C/man2/fallocate.2:332 build/C/man2/mlock.2:143
1358 #: build/C/man2/mlock.2:182 build/C/man2/mmap.2:458 build/C/man2/shmctl.2:353
1359 #: build/C/man2/shmget.2:241
1360 #, no-wrap
1361 msgid "B<EPERM>"
1362 msgstr "B<EPERM>"
1363
1364 #. type: Plain text
1365 #: build/C/man2/fallocate.2:350
1366 msgid ""
1367 "The file referred to by I<fd> is marked immutable (see B<chattr>(1)).  Or: "
1368 "I<mode> specifies B<FALLOC_FL_PUNCH_HOLE> or B<FALLOC_FL_COLLAPSE_RANGE> and "
1369 "the file referred to by I<fd> is marked append-only (see B<chattr>(1))."
1370 msgstr ""
1371 "I<fd> が参照するファイルに変更不可 (immutable) の属性が付いている "
1372 "(B<chattr>(1) 参照)。 I<mode> に B<FALLOC_FL_PUNCH_HOLE> か "
1373 "B<FALLOC_FL_COLLAPSE_RANGE> が指定されたが、 I<fd> が参照するファイルに追加の"
1374 "み (append-only) の属性が付いている (B<chattr>(1) 参照)。"
1375
1376 #. type: TP
1377 #: build/C/man2/fallocate.2:350 build/C/man2/posix_fadvise.2:97
1378 #: build/C/man3/posix_fallocate.3:96 build/C/man2/sync_file_range.2:169
1379 #, no-wrap
1380 msgid "B<ESPIPE>"
1381 msgstr "B<ESPIPE>"
1382
1383 #. type: Plain text
1384 #: build/C/man2/fallocate.2:354
1385 msgid "I<fd> refers to a pipe or FIFO."
1386 msgstr "I<fd> がパイプか FIFO を参照している。"
1387
1388 #. type: TP
1389 #: build/C/man2/fallocate.2:354 build/C/man2/mmap.2:467
1390 #, no-wrap
1391 msgid "B<ETXTBSY>"
1392 msgstr "B<ETXTBSY>"
1393
1394 #. type: Plain text
1395 #: build/C/man2/fallocate.2:362
1396 msgid ""
1397 "I<mode> specifies B<FALLOC_FL_COLLAPSE_RANGE>, but the file referred to by "
1398 "I<fd> is currently being executed."
1399 msgstr ""
1400 "I<mode> に B<FALLOC_FL_COLLAPSE_RANGE> が指定されたが、 I<fd> が参照するファ"
1401 "イルは現在実行中である。"
1402
1403 #. type: SH
1404 #: build/C/man2/fallocate.2:362 build/C/man3/malloc_info.3:60
1405 #: build/C/man3/mcheck.3:134 build/C/man2/mmap2.2:74
1406 #: build/C/man2/posix_fadvise.2:104 build/C/man3/posix_fallocate.3:100
1407 #: build/C/man3/posix_memalign.3:167 build/C/man2/readahead.2:83
1408 #: build/C/man2/remap_file_pages.2:148 build/C/man3/shm_open.3:249
1409 #: build/C/man2/subpage_prot.2:90 build/C/man2/sync_file_range.2:177
1410 #, no-wrap
1411 msgid "VERSIONS"
1412 msgstr "バージョン"
1413
1414 #.  See http://sourceware.org/bugzilla/show_bug.cgi?id=14964
1415 #. type: Plain text
1416 #: build/C/man2/fallocate.2:370
1417 msgid ""
1418 "B<fallocate>()  is available on Linux since kernel 2.6.23.  Support is "
1419 "provided by glibc since version 2.10.  The B<FALLOC_FL_*> flags are defined "
1420 "in glibc headers only since version 2.18."
1421 msgstr ""
1422 "B<fallocate>()  はカーネル 2.6.23 以降の Linux で利用可能である。 glibc での"
1423 "対応はバージョン 3.10 以降で行われている。 B<FALLOC_FL_*> が glibc のヘッダ"
1424 "ファイルで定義されているのは、バージョン 2.18 以降のみである。"
1425
1426 #. type: Plain text
1427 #: build/C/man2/fallocate.2:373
1428 msgid "B<fallocate>()  is Linux-specific."
1429 msgstr "B<fallocate>()  は Linux 固有である。"
1430
1431 #. type: Plain text
1432 #: build/C/man2/fallocate.2:378
1433 msgid ""
1434 "B<fallocate>(1), B<ftruncate>(2), B<posix_fadvise>(3), B<posix_fallocate>(3)"
1435 msgstr ""
1436 "B<fallocate>(1), B<ftruncate>(2), B<posix_fadvise>(3), B<posix_fallocate>(3)"
1437
1438 #. type: TH
1439 #: build/C/man2/madvise.2:35
1440 #, no-wrap
1441 msgid "MADVISE"
1442 msgstr "MADVISE"
1443
1444 #. type: TH
1445 #: build/C/man2/madvise.2:35 build/C/man2/msync.2:25
1446 #, no-wrap
1447 msgid "2014-04-20"
1448 msgstr "2014-04-20"
1449
1450 #. type: Plain text
1451 #: build/C/man2/madvise.2:38
1452 msgid "madvise - give advice about use of memory"
1453 msgstr "madvise - メモリ利用に関するアドバイスを与える"
1454
1455 #. type: Plain text
1456 #: build/C/man2/madvise.2:40 build/C/man2/msync.2:30
1457 #: build/C/man3/shm_open.3:31
1458 msgid "B<#include E<lt>sys/mman.hE<gt>>"
1459 msgstr "B<#include E<lt>sys/mman.hE<gt>>"
1460
1461 #. type: Plain text
1462 #: build/C/man2/madvise.2:42
1463 msgid ""
1464 "B<int madvise(void *>I<addr>B<, size_t >I<length>B<, int >I<advice>B<);>"
1465 msgstr ""
1466 "B<int madvise(void *>I<addr>B<, size_t >I<length>B<, int >I<advice>B<);>"
1467
1468 #. type: Plain text
1469 #: build/C/man2/madvise.2:46 build/C/man2/posix_fadvise.2:43
1470 #: build/C/man3/posix_fallocate.3:39 build/C/man3/posix_memalign.3:49
1471 msgid ""
1472 "Feature Test Macro Requirements for glibc (see B<feature_test_macros>(7)):"
1473 msgstr "glibc 向けの機能検査マクロの要件 (B<feature_test_macros>(7)  参照):"
1474
1475 #. type: Plain text
1476 #: build/C/man2/madvise.2:50
1477 msgid "B<madvise>(): _BSD_SOURCE"
1478 msgstr "B<madvise>(): _BSD_SOURCE"
1479
1480 #. type: Plain text
1481 #: build/C/man2/madvise.2:68
1482 msgid ""
1483 "The B<madvise>()  system call advises the kernel about how to handle paging "
1484 "input/output in the address range beginning at address I<addr> and with size "
1485 "I<length> bytes.  It allows an application to tell the kernel how it expects "
1486 "to use some mapped or shared memory areas, so that the kernel can choose "
1487 "appropriate read-ahead and caching techniques.  This call does not influence "
1488 "the semantics of the application (except in the case of B<MADV_DONTNEED>), "
1489 "but may influence its performance.  The kernel is free to ignore the advice."
1490 msgstr ""
1491 "B<madvise>()  システムコールは、アドレス I<addr> からはじまる I<length> バイ"
1492 "トのメモリブロックのページング入出力をどう扱えば良いか、 カーネルにアドバイス"
1493 "する。 これを用いると、 アプリケーションからカーネルに、 マップされたメモリや"
1494 "共有メモリをどのように扱ってほしいか伝えることができ、 カーネルはそれに応じて"
1495 "先読みやキャッシュなどの適切な手法を選択できる。 このコールはアプリケーション"
1496 "の動作そのものには影響しない (B<MADV_DONTNEED> の場合は別) が、 性能には影響"
1497 "しうる。 なおこのアドバイスを受け入れるかどうかはカーネルに任される。"
1498
1499 #. type: Plain text
1500 #: build/C/man2/madvise.2:72
1501 msgid "The advice is indicated in the I<advice> argument which can be"
1502 msgstr ""
1503 "アドバイスは引き数 I<advice> によって与える。以下のいずれかを指定できる。"
1504
1505 #. type: TP
1506 #: build/C/man2/madvise.2:72
1507 #, no-wrap
1508 msgid "B<MADV_NORMAL>"
1509 msgstr "B<MADV_NORMAL>"
1510
1511 #. type: Plain text
1512 #: build/C/man2/madvise.2:76
1513 msgid "No special treatment.  This is the default."
1514 msgstr "特別な扱いは行わない。これがデフォルトである。"
1515
1516 #. type: TP
1517 #: build/C/man2/madvise.2:76
1518 #, no-wrap
1519 msgid "B<MADV_RANDOM>"
1520 msgstr "B<MADV_RANDOM>"
1521
1522 #. type: Plain text
1523 #: build/C/man2/madvise.2:80
1524 msgid ""
1525 "Expect page references in random order.  (Hence, read ahead may be less "
1526 "useful than normally.)"
1527 msgstr ""
1528 "ページ参照はランダムな順序で行われそうだ。 (したがって、先読みはあまり効果が"
1529 "なさそうだ。)"
1530
1531 #. type: TP
1532 #: build/C/man2/madvise.2:80
1533 #, no-wrap
1534 msgid "B<MADV_SEQUENTIAL>"
1535 msgstr "B<MADV_SEQUENTIAL>"
1536
1537 #. type: Plain text
1538 #: build/C/man2/madvise.2:85
1539 msgid ""
1540 "Expect page references in sequential order.  (Hence, pages in the given "
1541 "range can be aggressively read ahead, and may be freed soon after they are "
1542 "accessed.)"
1543 msgstr ""
1544 "ページ参照はシーケンシャルな順序で行われそうだ。 (したがって与えた範囲のペー"
1545 "ジは積極的に先読みしておくと良いだろう。 またアクセスが終わったら速やかに解放"
1546 "して良い。)"
1547
1548 #. type: TP
1549 #: build/C/man2/madvise.2:85
1550 #, no-wrap
1551 msgid "B<MADV_WILLNEED>"
1552 msgstr "B<MADV_WILLNEED>"
1553
1554 #. type: Plain text
1555 #: build/C/man2/madvise.2:89
1556 msgid ""
1557 "Expect access in the near future.  (Hence, it might be a good idea to read "
1558 "some pages ahead.)"
1559 msgstr ""
1560 "近い将来にアクセスされそうだ。 (したがってこれらのページを今のうちに先読みし"
1561 "ておくといいだろう。)"
1562
1563 #. type: TP
1564 #: build/C/man2/madvise.2:89
1565 #, no-wrap
1566 msgid "B<MADV_DONTNEED>"
1567 msgstr "B<MADV_DONTNEED>"
1568
1569 #. type: Plain text
1570 #: build/C/man2/madvise.2:100
1571 msgid ""
1572 "Do not expect access in the near future.  (For the time being, the "
1573 "application is finished with the given range, so the kernel can free "
1574 "resources associated with it.)  Subsequent accesses of pages in this range "
1575 "will succeed, but will result either in reloading of the memory contents "
1576 "from the underlying mapped file (see B<mmap>(2))  or zero-fill-on-demand "
1577 "pages for mappings without an underlying file."
1578 msgstr ""
1579 "しばらくアクセスはなさそうだ。 (現時点でアプリケーションは与えた範囲の処理を"
1580 "終えている。 したがってカーネルはこれに関連するリソースを解放して良い。)  こ"
1581 "れ以降この範囲のページへのアクセスがあると、 成功はするが、メモリの内容をマッ"
1582 "プ元のファイルからロードし直すことになる (B<mmap>(2)  を見よ) か、 または元"
1583 "ファイルがないマップページでは アクセスがあったときに 0 埋めが行われることに"
1584 "なる。"
1585
1586 #. type: TP
1587 #: build/C/man2/madvise.2:100
1588 #, no-wrap
1589 msgid "B<MADV_REMOVE> (since Linux 2.6.16)"
1590 msgstr "B<MADV_REMOVE> (Linux 2.6.16 以降)"
1591
1592 #.  2.6.18-rc5
1593 #.  Databases want to use this feature to drop a section of their
1594 #.  bufferpool (shared memory segments) - without writing back to
1595 #.  disk/swap space.  This feature is also useful for supporting
1596 #.  hot-plug memory on UML.
1597 #. type: Plain text
1598 #: build/C/man2/madvise.2:113
1599 msgid ""
1600 "Free up a given range of pages and its associated backing store.  Currently, "
1601 "only shmfs/tmpfs supports this; other filesystems return with the error "
1602 "B<ENOSYS>."
1603 msgstr ""
1604 "指定された範囲のページと関連するバッキングストアを解放する。 現在のところ、 "
1605 "shmfs/tmpfs だけがこれに対応している。 他のファイルシステムでは B<ENOSYS> が"
1606 "返される。"
1607
1608 #. type: TP
1609 #: build/C/man2/madvise.2:113
1610 #, no-wrap
1611 msgid "B<MADV_DONTFORK> (since Linux 2.6.16)"
1612 msgstr "B<MADV_DONTFORK> (Linux 2.6.16 以降)"
1613
1614 #.  See http://lwn.net/Articles/171941/
1615 #.  [PATCH] madvise MADV_DONTFORK/MADV_DOFORK
1616 #.  Currently, copy-on-write may change the physical address of
1617 #.  a page even if the user requested that the page is pinned in
1618 #.  memory (either by mlock or by get_user_pages).  This happens
1619 #.  if the process forks meanwhile, and the parent writes to that
1620 #.  page.  As a result, the page is orphaned: in case of
1621 #.  get_user_pages, the application will never see any data hardware
1622 #.  DMA's into this page after the COW.  In case of mlock'd memory,
1623 #.  the parent is not getting the realtime/security benefits of mlock.
1624 #.  In particular, this affects the Infiniband modules which do DMA from
1625 #.  and into user pages all the time.
1626 #.  This patch adds madvise options to control whether memory range is
1627 #.  inherited across fork. Useful e.g. for when hardware is doing DMA
1628 #.  from/into these pages.  Could also be useful to an application
1629 #.  wanting to speed up its forks by cutting large areas out of
1630 #.  consideration.
1631 #.  SEE ALSO: http://lwn.net/Articles/171941/
1632 #.  "Tweaks to madvise() and posix_fadvise()", 14 Feb 2006
1633 #. type: Plain text
1634 #: build/C/man2/madvise.2:144
1635 msgid ""
1636 "Do not make the pages in this range available to the child after a "
1637 "B<fork>(2).  This is useful to prevent copy-on-write semantics from changing "
1638 "the physical location of a page(s) if the parent writes to it after a "
1639 "B<fork>(2).  (Such page relocations cause problems for hardware that DMAs "
1640 "into the page(s).)"
1641 msgstr ""
1642 "B<fork>(2)  が行われた後、指定された範囲のページを子プロセスが利用できないよ"
1643 "うにする。 この機能は、書き込み時コピー (copy-on-write) 方式で、 B<fork>(2)  "
1644 "の後で親プロセスがページに書き込みを行った場合に ページの物理位置が変化しない"
1645 "ようにするのに有効である (ページの再配置はハードウェアがそのページに DMA 転送"
1646 "を行うような場合に 問題を起こすことがある)。"
1647
1648 #. type: TP
1649 #: build/C/man2/madvise.2:144
1650 #, no-wrap
1651 msgid "B<MADV_DOFORK> (since Linux 2.6.16)"
1652 msgstr "B<MADV_DOFORK> (Linux 2.6.16 以降)"
1653
1654 #. type: Plain text
1655 #: build/C/man2/madvise.2:150
1656 msgid ""
1657 "Undo the effect of B<MADV_DONTFORK>, restoring the default behavior, whereby "
1658 "a mapping is inherited across B<fork>(2)."
1659 msgstr ""
1660 "B<MADV_DONTFORK> の影響を取り消し、デフォルトの動作に戻す。 つまり、 "
1661 "B<fork>(2)  の前後でマッピングは継承されるようになる。"
1662
1663 #. type: TP
1664 #: build/C/man2/madvise.2:150
1665 #, no-wrap
1666 msgid "B<MADV_HWPOISON> (since Linux 2.6.32)"
1667 msgstr "B<MADV_HWPOISON> (Linux 2.6.32 以降)"
1668
1669 #. type: Plain text
1670 #: build/C/man2/madvise.2:162
1671 msgid ""
1672 "Poison a page and handle it like a hardware memory corruption.  This "
1673 "operation is available only for privileged (B<CAP_SYS_ADMIN>)  processes.  "
1674 "This operation may result in the calling process receiving a B<SIGBUS> and "
1675 "the page being unmapped.  This feature is intended for testing of memory "
1676 "error-handling code; it is available only if the kernel was configured with "
1677 "B<CONFIG_MEMORY_FAILURE>."
1678 msgstr ""
1679 "ページに毒入れを行い、ハードウェアメモリの破損のようにそのページを取り扱う。 "
1680 "この操作は特権 (B<CAP_SYS_ADMIN> を持った) プロセスだけが利用できる。 この操"
1681 "作の結果、呼び出したプロセスは B<SIGBUS> を受け取り、そのページはアンマップさ"
1682 "れる。 この機能はメモリのエラー処理コードをテストするためのものである。 カー"
1683 "ネルで B<CONFIG_MEMORY_FAILURE> が有効になっている場合にのみ利用可能である。"
1684
1685 #. type: TP
1686 #: build/C/man2/madvise.2:162
1687 #, no-wrap
1688 msgid "B<MADV_SOFT_OFFLINE> (since Linux 2.6.33)"
1689 msgstr "B<MADV_SOFT_OFFLINE> (Linux 2.6.33 以降)"
1690
1691 #. type: Plain text
1692 #: build/C/man2/madvise.2:180
1693 msgid ""
1694 "Soft offline the pages in the range specified by I<addr> and I<length>.  The "
1695 "memory of each page in the specified range is preserved (i.e., when next "
1696 "accessed, the same content will be visible, but in a new physical page "
1697 "frame), and the original page is offlined (i.e., no longer used, and taken "
1698 "out of normal memory management).  The effect of the B<MADV_SOFT_OFFLINE> "
1699 "operation is invisible to (i.e., does not change the semantics of)  the "
1700 "calling process.  This feature is intended for testing of memory error-"
1701 "handling code; it is available only if the kernel was configured with "
1702 "B<CONFIG_MEMORY_FAILURE>."
1703 msgstr ""
1704 "I<addr> と I<length> で指定された範囲のページをソフトオフラインにする。 指定"
1705 "された範囲の各ページのメモリの内容は保持され (すなわち、次にアクセスされた際"
1706 "に、同じ内容が見えるが、新しい物理ページフレームになる)、 元のフレームはオフ"
1707 "ラインになる (すなわち、 そのフレームは使用される、通常のメモリ管理からは取り"
1708 "除かれる)。 B<MADV_SOFT_OFFLINE> 操作の影響は呼び出したプロセスには見えない "
1709 "(つまり呼び出したプロセスの動作は変化しない)。 この機能はメモリのエラー処理"
1710 "コードをテストすることを目的に作られた。 カーネルで B<CONFIG_MEMORY_FAILURE> "
1711 "が有効になっている場合にのみ利用可能である。"
1712
1713 #. type: TP
1714 #: build/C/man2/madvise.2:180
1715 #, no-wrap
1716 msgid "B<MADV_MERGEABLE> (since Linux 2.6.32)"
1717 msgstr "B<MADV_MERGEABLE> (Linux 2.6.32 以降)"
1718
1719 #. type: Plain text
1720 #: build/C/man2/madvise.2:205
1721 msgid ""
1722 "Enable Kernel Samepage Merging (KSM) for the pages in the range specified by "
1723 "I<addr> and I<length>.  The kernel regularly scans those areas of user "
1724 "memory that have been marked as mergeable, looking for pages with identical "
1725 "content.  These are replaced by a single write-protected page (which is "
1726 "automatically copied if a process later wants to update the content of the "
1727 "page).  KSM merges only private anonymous pages (see B<mmap>(2)).  The KSM "
1728 "feature is intended for applications that generate many instances of the "
1729 "same data (e.g., virtualization systems such as KVM).  It can consume a lot "
1730 "of processing power; use with care.  See the Linux kernel source file "
1731 "I<Documentation/vm/ksm.txt> for more details.  The B<MADV_MERGEABLE> and "
1732 "B<MADV_UNMERGEABLE> operations are available only if the kernel was "
1733 "configured with B<CONFIG_KSM>."
1734 msgstr ""
1735 "Kernel Samepage Merging (KSM; カーネルによる同じページの統合) を I<addr> と "
1736 "I<length> で指定された領域に対して有効にする。 カーネルは、 統合可能の印がつ"
1737 "いたユーザーメモリの領域を定期的にスキャンし、内容が全く同じページを探す。 内"
1738 "容が全く同じページがあれば、それらのページは書き込み保護 (write-protected) が"
1739 "かかった一つのページで置き換えられる (プロセスが後でページの内容を更新しよう"
1740 "とした際には自動的にページのコピーが行われる)。 KSM はプライベートな無名ペー"
1741 "ジ (anonymous pages) だけを統合する (B<mmap>(2) 参照)。 KSM 機能は、 同じデー"
1742 "タのインスタンスを大量に生成するアプリケーション (KVM などの仮想化システム) "
1743 "での利用を想定している。 この機能はプロセッシング能力を大量に消費する場合があ"
1744 "り、注意して使用すること。 詳細は Linux カーネルソースファイル "
1745 "I<Documentation/vm/ksm.txt> を参照。 B<MADV_MERGEABLE> と "
1746 "B<MADV_UNMERGEABLE> は、 カーネルで B<CONFIG_KSM> オプションを有効になってい"
1747 "る場合にのみ利用できる。"
1748
1749 #. type: TP
1750 #: build/C/man2/madvise.2:205
1751 #, no-wrap
1752 msgid "B<MADV_UNMERGEABLE> (since Linux 2.6.32)"
1753 msgstr "B<MADV_UNMERGEABLE> (Linux 2.6.32 以降)"
1754
1755 #. type: Plain text
1756 #: build/C/man2/madvise.2:214
1757 msgid ""
1758 "Undo the effect of an earlier B<MADV_MERGEABLE> operation on the specified "
1759 "address range; KSM unmerges whatever pages it had merged in the address "
1760 "range specified by I<addr> and I<length>."
1761 msgstr ""
1762 "指定されたアドレス範囲に関して、それ以前に行われた B<MADV_MERGEABLE> 操作の効"
1763 "果を取り消す。 KSM は、  I<addr> と I<length> で指定されたアドレス範囲の統合"
1764 "済みのすべてのページの統合解除を行う。"
1765
1766 #. type: TP
1767 #: build/C/man2/madvise.2:214
1768 #, no-wrap
1769 msgid "B<MADV_HUGEPAGE> (since Linux 2.6.38)"
1770 msgstr "B<MADV_HUGEPAGE> (Linux 2.6.38 以降)"
1771
1772 #.  http://lwn.net/Articles/358904/
1773 #.  https://lwn.net/Articles/423584/
1774 #. type: Plain text
1775 #: build/C/man2/madvise.2:243
1776 msgid ""
1777 "Enables Transparent Huge Pages (THP) for pages in the range specified by "
1778 "I<addr> and I<length>.  Currently, Transparent Huge Pages work only with "
1779 "private anonymous pages (see B<mmap>(2)).  The kernel will regularly scan "
1780 "the areas marked as huge page candidates to replace them with huge pages.  "
1781 "The kernel will also allocate huge pages directly when the region is "
1782 "naturally aligned to the huge page size (see B<posix_memalign>(2)).  This "
1783 "feature is primarily aimed at applications that use large mappings of data "
1784 "and access large regions of that memory at a time (e.g., virtualization "
1785 "systems such as QEMU).  It can very easily waste memory (e.g., a 2MB mapping "
1786 "that only ever accesses 1 byte will result in 2MB of wired memory instead of "
1787 "one 4KB page).  See the Linux kernel source file I<Documentation/vm/"
1788 "transhuge.txt> for more details.  The B<MADV_HUGEPAGE> and "
1789 "B<MADV_NOHUGEPAGE> operations are available only if the kernel was "
1790 "configured with B<CONFIG_TRANSPARENT_HUGEPAGE>."
1791 msgstr ""
1792 "Transparent Huge Pages (THP) を I<addr> と I<length> で指定された領域に対して"
1793 "有効にする。 現在のところ、Transparent Huge Pages はプライベートな無名ページ "
1794 "(anonymous pages) についてのみ機能する。 カーネルは定期的にヒュージページ "
1795 "(huge page) 候補の印がついたページをスキャンし、ヒュージページと置き換える。 "
1796 "また、カーネルはその領域がヒュージページのサイズに合っている場合、ヒュージ"
1797 "ページを直接割り当てる (B<posix_memalign>(2) 参照)。 この機能は、大きなデータ"
1798 "マッピングを使用し、一度にそのメモリの大きな範囲にアクセスするようなアプリ"
1799 "ケーション (例えば QEMU のような仮想化システム) で使うことを主に想定されてい"
1800 "る。 この機能は非常に簡単にメモリを浪費してしまう (例えば、1 バイトしかアクセ"
1801 "スしない 2MB のマッピングが、 4KB ページではなく 2MB の実際のメモリを使ってし"
1802 "まう)。 詳細は Linux カーネルソースファイル I<Documentation/vm/transhuge."
1803 "txt> を参照。 B<MADV_HUGEPAGE> と B<MADV_NOHUGEPAGE> は、 カーネルで "
1804 "B<CONFIG_TRANSPARENT_HUGEPAGE> オプションを有効になっている場合にのみ利用でき"
1805 "る。"
1806
1807 #. type: TP
1808 #: build/C/man2/madvise.2:243
1809 #, no-wrap
1810 msgid "B<MADV_NOHUGEPAGE> (since Linux 2.6.38)"
1811 msgstr "B<MADV_NOHUGEPAGE> (Linux 2.6.38 以降)"
1812
1813 #. type: Plain text
1814 #: build/C/man2/madvise.2:250
1815 msgid ""
1816 "Ensures that memory in the address range specified by I<addr> and I<length> "
1817 "will not be collapsed into huge pages."
1818 msgstr ""
1819 "I<addr> と I<length> で指定されたアドレス範囲のメモリがヒュージページに組み込"
1820 "まれないようにする。"
1821
1822 #. type: TP
1823 #: build/C/man2/madvise.2:250
1824 #, no-wrap
1825 msgid "B<MADV_DONTDUMP> (since Linux 3.4)"
1826 msgstr "B<MADV_DONTDUMP> (Linux 3.4 以降)"
1827
1828 #. type: Plain text
1829 #: build/C/man2/madvise.2:264
1830 msgid ""
1831 "Exclude from a core dump those pages in the range specified by I<addr> and "
1832 "I<length>.  This is useful in applications that have large areas of memory "
1833 "that are known not to be useful in a core dump.  The effect of "
1834 "B<MADV_DONTDUMP> takes precedence over the bit mask that is set via the I</"
1835 "proc/PID/coredump_filter> file (see B<core>(5))."
1836 msgstr ""
1837 "コアダンプから I<addr> と I<length> で指定された範囲のページを除外する。 これ"
1838 "は、 コアダンプに含めても役に立たないことが分かっている大きなメモリ領域がある"
1839 "アプリケーションで有用である。 B<MADV_DONTDUMP> の効果は I</proc/PID/"
1840 "coredump_filter> ファイル経由で設定されたビットマスクよりも優先される "
1841 "(B<core>(5) 参照)。"
1842
1843 #. type: TP
1844 #: build/C/man2/madvise.2:264
1845 #, no-wrap
1846 msgid "B<MADV_DODUMP> (since Linux 3.4)"
1847 msgstr "B<MADV_DODUMP> (Linux 3.4 以降)"
1848
1849 #. type: Plain text
1850 #: build/C/man2/madvise.2:268
1851 msgid "Undo the effect of an earlier B<MADV_DONTDUMP>."
1852 msgstr "以前の B<MADV_DONTDUMP> の効果を取り消す。"
1853
1854 #. type: Plain text
1855 #: build/C/man2/madvise.2:275
1856 msgid ""
1857 "On success B<madvise>()  returns zero.  On error, it returns -1 and I<errno> "
1858 "is set appropriately."
1859 msgstr ""
1860 "B<madvise>()  は成功すると 0 を返す。 エラーが起こると -1 を返し、 I<errno> "
1861 "を適切な値に設定する。"
1862
1863 #. type: TP
1864 #: build/C/man2/madvise.2:276 build/C/man2/mlock.2:154 build/C/man2/mmap.2:411
1865 #: build/C/man2/mremap.2:136
1866 #, no-wrap
1867 msgid "B<EAGAIN>"
1868 msgstr "B<EAGAIN>"
1869
1870 #. type: Plain text
1871 #: build/C/man2/madvise.2:279
1872 msgid "A kernel resource was temporarily unavailable."
1873 msgstr "何らかのカーネルリソースが一時的に利用できなかった。"
1874
1875 #. type: Plain text
1876 #: build/C/man2/madvise.2:282
1877 msgid "The map exists, but the area maps something that isn't a file."
1878 msgstr "指定したマップは存在するが、ファイルではないところをマップしている。"
1879
1880 #. type: Plain text
1881 #: build/C/man2/madvise.2:285
1882 msgid "This error can occur for the following reasons:"
1883 msgstr "このエラーは以下の理由で発生する。"
1884
1885 #.  .I len
1886 #.  is zero,
1887 #. type: Plain text
1888 #: build/C/man2/madvise.2:292
1889 msgid "The value I<len> is negative."
1890 msgstr "I<len> が負の値である。"
1891
1892 #. type: Plain text
1893 #: build/C/man2/madvise.2:295
1894 msgid "I<addr> is not page-aligned."
1895 msgstr "I<addr> がページ境界ではない。"
1896
1897 #. type: Plain text
1898 #: build/C/man2/madvise.2:298
1899 msgid "I<advice> is not a valid value"
1900 msgstr "I<advice> が有効な値でない。"
1901
1902 #. type: Plain text
1903 #: build/C/man2/madvise.2:301
1904 msgid ""
1905 "The application is attempting to release locked or shared pages (with "
1906 "B<MADV_DONTNEED>)."
1907 msgstr ""
1908 "アプリケーションがロックされたページや共有ページを (B<MADV_DONTNEED> で) 解"
1909 "放\n"
1910 "しようとしている。"
1911
1912 #. type: Plain text
1913 #: build/C/man2/madvise.2:309
1914 msgid ""
1915 "B<MADV_MERGEABLE> or B<MADV_UNMERGEABLE> was specified in I<advice>, but the "
1916 "kernel was not configured with B<CONFIG_KSM>."
1917 msgstr ""
1918 "I<advice> に B<MADV_MERGEABLE> か B<MADV_UNMERGEABLE> が指定されたが、 カーネ"
1919 "ルの設定が B<CONFIG_KSM> が有効になっていなかった。"
1920
1921 #. type: Plain text
1922 #: build/C/man2/madvise.2:316
1923 msgid ""
1924 "(for B<MADV_WILLNEED>)  Paging in this area would exceed the process's "
1925 "maximum resident set size."
1926 msgstr ""
1927 "(B<MADV_WILLNEED> の場合) この範囲のページングを行うと、 プロセスの RSS "
1928 "(resident set size) の最大値を越えてしまう。"
1929
1930 #. type: TP
1931 #: build/C/man2/madvise.2:316 build/C/man2/madvise.2:321
1932 #: build/C/man2/mlock.2:123 build/C/man2/mlock.2:131 build/C/man2/mlock.2:169
1933 #: build/C/man2/mmap.2:454 build/C/man2/mprotect.2:100
1934 #: build/C/man2/mprotect.2:103 build/C/man2/mremap.2:179
1935 #: build/C/man2/msync.2:93 build/C/man3/posix_memalign.3:164
1936 #: build/C/man2/shmctl.2:337 build/C/man2/shmget.2:230
1937 #: build/C/man2/shmop.2:211 build/C/man2/subpage_prot.2:87
1938 #: build/C/man2/sync_file_range.2:163
1939 #, no-wrap
1940 msgid "B<ENOMEM>"
1941 msgstr "B<ENOMEM>"
1942
1943 #. type: Plain text
1944 #: build/C/man2/madvise.2:321
1945 msgid "(for B<MADV_WILLNEED>)  Not enough memory: paging in failed."
1946 msgstr "(B<MADV_WILLNEED> の場合) メモリが足りず、ページングに失敗した。"
1947
1948 #. type: Plain text
1949 #: build/C/man2/madvise.2:325
1950 msgid ""
1951 "Addresses in the specified range are not currently mapped, or are outside "
1952 "the address space of the process."
1953 msgstr ""
1954 "指定した範囲のアドレスが、現在マップされていない。 あるいはプロセスのアドレス"
1955 "空間の内部にない。"
1956
1957 #.  FIXME . Write a posix_madvise(3) page.
1958 #. type: Plain text
1959 #: build/C/man2/madvise.2:338
1960 msgid ""
1961 "POSIX.1b.  POSIX.1-2001 describes B<posix_madvise>(3)  with constants "
1962 "B<POSIX_MADV_NORMAL>, B<POSIX_MADV_RANDOM>, and so on, with a behavior close "
1963 "to that described here.  There is a similar B<posix_fadvise>(2)  for file "
1964 "access."
1965 msgstr ""
1966 "POSIX.1b.  POSIX.1-2001 では、 B<posix_madvise>(3)  を B<POSIX_MADV_NORMAL>, "
1967 "B<POSIX_MADV_RANDOM> などの定数とともに記述していた (それぞれの振る舞いはここ"
1968 "で述べたものに近い)。 ファイルアクセスに対しても B<posix_fadvise>(2)  という"
1969 "類似の関数が存在する。"
1970
1971 #. type: Plain text
1972 #: build/C/man2/madvise.2:347
1973 msgid ""
1974 "B<MADV_REMOVE>, B<MADV_DONTFORK>, B<MADV_DOFORK>, B<MADV_HWPOISON>, "
1975 "B<MADV_MERGEABLE>, and B<MADV_UNMERGEABLE> are Linux-specific."
1976 msgstr ""
1977 "B<MADV_REMOVE>, B<MADV_DONTFORK>, B<MADV_DOFORK>, B<MADV_HWPOISON>,\n"
1978 "B<MADV_MERGEABLE>, B<MADV_UNMERGEABLE> は Linux 固有である。"
1979
1980 #. type: SS
1981 #: build/C/man2/madvise.2:348 build/C/man2/mlock.2:274
1982 #: build/C/man2/shmget.2:330
1983 #, no-wrap
1984 msgid "Linux notes"
1985 msgstr "Linux での注意"
1986
1987 #. type: Plain text
1988 #: build/C/man2/madvise.2:356
1989 msgid ""
1990 "The current Linux implementation (2.4.0) views this system call more as a "
1991 "command than as advice and hence may return an error when it cannot do what "
1992 "it usually would do in response to this advice.  (See the ERRORS description "
1993 "above.)  This is nonstandard behavior."
1994 msgstr ""
1995 "現在の Linux の実装 (2.4.0) では、 このシステムコールをアドバイスというよりは"
1996 "命令と見ている。 したがってこのアドバイスに対して通常行われる動作が不可能な場"
1997 "合は、 エラーを返すことがある (上記の エラー の記述を参照)。 この振舞いは標準"
1998 "とは異なる。"
1999
2000 #.  .SH HISTORY
2001 #.  The
2002 #.  .BR madvise ()
2003 #.  function first appeared in 4.4BSD.
2004 #. type: Plain text
2005 #: build/C/man2/madvise.2:372
2006 msgid ""
2007 "The Linux implementation requires that the address I<addr> be page-aligned, "
2008 "and allows I<length> to be zero.  If there are some parts of the specified "
2009 "address range that are not mapped, the Linux version of B<madvise>()  "
2010 "ignores them and applies the call to the rest (but returns B<ENOMEM> from "
2011 "the system call, as it should)."
2012 msgstr ""
2013 "Linux の実装では I<addr> のアドレスはページ境界の値でなければならない。また "
2014 "I<length> は 0 であっても構わない。 また Linux 版の B<madvise>()  では、指定"
2015 "されたアドレス範囲にマップされていない部分があると、 これらを無視して残りの部"
2016 "分にアドバイスを適用する (しかしシステムコールに対してはちゃんと B<ENOMEM> を"
2017 "返す)。"
2018
2019 #. type: Plain text
2020 #: build/C/man2/madvise.2:381
2021 msgid ""
2022 "B<getrlimit>(2), B<mincore>(2), B<mmap>(2), B<mprotect>(2), B<msync>(2), "
2023 "B<munmap>(2), B<prctl>(2), B<core>(5)"
2024 msgstr ""
2025 "B<getrlimit>(2), B<mincore>(2), B<mmap>(2), B<mprotect>(2), B<msync>(2), "
2026 "B<munmap>(2), B<prctl>(2), B<core>(5)"
2027
2028 #. type: TH
2029 #: build/C/man3/mallinfo.3:26
2030 #, no-wrap
2031 msgid "MALLINFO"
2032 msgstr "MALLINFO"
2033
2034 #. type: TH
2035 #: build/C/man3/mallinfo.3:26 build/C/man3/malloc_stats.3:26
2036 #, no-wrap
2037 msgid "2012-05-06"
2038 msgstr "2012-05-06"
2039
2040 #. type: Plain text
2041 #: build/C/man3/mallinfo.3:29
2042 msgid "mallinfo - obtain memory allocation information"
2043 msgstr "mallinfo - メモリ割り当て情報を取得する"
2044
2045 #. type: Plain text
2046 #: build/C/man3/mallinfo.3:31 build/C/man3/malloc_stats.3:31
2047 #: build/C/man3/malloc_trim.3:31 build/C/man3/malloc_usable_size.3:30
2048 #: build/C/man3/mallopt.3:31
2049 msgid "B<#include E<lt>malloc.hE<gt>>"
2050 msgstr "B<#include E<lt>malloc.hE<gt>>"
2051
2052 #. type: Plain text
2053 #: build/C/man3/mallinfo.3:33
2054 msgid "B<struct mallinfo mallinfo(void);>"
2055 msgstr "B<struct mallinfo mallinfo(void);>"
2056
2057 #. type: Plain text
2058 #: build/C/man3/mallinfo.3:41
2059 msgid ""
2060 "The B<mallinfo>()  function returns a copy of a structure containing "
2061 "information about memory allocations performed by B<malloc>(3)  and related "
2062 "functions.  This structure is defined as follows:"
2063 msgstr ""
2064 "B<mallinfo>() 関数は、 B<malloc>(3) や一連の関数により実行されたメモリ\n"
2065 "割り当てに関する情報を格納した構造体のコピーを返す。\n"
2066 "この構造体は以下のように定義されている。"
2067
2068 #. type: Plain text
2069 #: build/C/man3/mallinfo.3:56
2070 #, no-wrap
2071 msgid ""
2072 "struct mallinfo {\n"
2073 "    int arena;     /* Non-mmapped space allocated (bytes) */\n"
2074 "    int ordblks;   /* Number of free chunks */\n"
2075 "    int smblks;    /* Number of free fastbin blocks */\n"
2076 "    int hblks;     /* Number of mmapped regions */\n"
2077 "    int hblkhd;    /* Space allocated in mmapped regions (bytes) */\n"
2078 "    int usmblks;   /* Maximum total allocated space (bytes) */\n"
2079 "    int fsmblks;   /* Space in freed fastbin blocks (bytes) */\n"
2080 "    int uordblks;  /* Total allocated space (bytes) */\n"
2081 "    int fordblks;  /* Total free space (bytes) */\n"
2082 "    int keepcost;  /* Top-most, releasable space (bytes) */\n"
2083 "};\n"
2084 msgstr ""
2085 "struct mallinfo {\n"
2086 "    int arena;     /* Non-mmapped space allocated (bytes) */\n"
2087 "    int ordblks;   /* Number of free chunks */\n"
2088 "    int smblks;    /* Number of free fastbin blocks */\n"
2089 "    int hblks;     /* Number of mmapped regions */\n"
2090 "    int hblkhd;    /* Space allocated in mmapped regions (bytes) */\n"
2091 "    int usmblks;   /* Maximum total allocated space (bytes) */\n"
2092 "    int fsmblks;   /* Space in freed fastbin blocks (bytes) */\n"
2093 "    int uordblks;  /* Total allocated space (bytes) */\n"
2094 "    int fordblks;  /* Total free space (bytes) */\n"
2095 "    int keepcost;  /* Top-most, releasable space (bytes) */\n"
2096 "};\n"
2097
2098 #. type: Plain text
2099 #: build/C/man3/mallinfo.3:62
2100 msgid ""
2101 "The fields of the I<mallinfo> structure contain the following information:"
2102 msgstr "I<mallinfo> 構造体の各フィールドには以下の情報が格納される。"
2103
2104 #. type: TP
2105 #: build/C/man3/mallinfo.3:62
2106 #, no-wrap
2107 msgid "I<arena>"
2108 msgstr "I<arena>"
2109
2110 #. type: Plain text
2111 #: build/C/man3/mallinfo.3:68
2112 msgid ""
2113 "The total amount of memory allocated by means other than B<mmap>(2)  (i.e., "
2114 "memory allocated on the heap).  This figure includes both in-use blocks and "
2115 "blocks on the free list."
2116 msgstr ""
2117
2118 #. type: TP
2119 #: build/C/man3/mallinfo.3:68
2120 #, no-wrap
2121 msgid "I<ordblks>"
2122 msgstr "I<ordblks>"
2123
2124 #. type: Plain text
2125 #: build/C/man3/mallinfo.3:71
2126 msgid "The number of ordinary (i.e., non-fastbin) free blocks."
2127 msgstr ""
2128
2129 #. type: TP
2130 #: build/C/man3/mallinfo.3:71
2131 #, no-wrap
2132 msgid "I<smblks>"
2133 msgstr "I<smblks>"
2134
2135 #. type: Plain text
2136 #: build/C/man3/mallinfo.3:75
2137 msgid "The number of fastbin free blocks (see B<mallopt>(3))."
2138 msgstr ""
2139
2140 #. type: TP
2141 #: build/C/man3/mallinfo.3:75
2142 #, no-wrap
2143 msgid "I<hblks>"
2144 msgstr "I<hblks>"
2145
2146 #. type: Plain text
2147 #: build/C/man3/mallinfo.3:83
2148 msgid ""
2149 "The number of blocks currently allocated using B<mmap>(2).  (See the "
2150 "discussion of B<M_MMAP_THRESHOLD> in B<mallopt>(3).)"
2151 msgstr ""
2152
2153 #. type: TP
2154 #: build/C/man3/mallinfo.3:83
2155 #, no-wrap
2156 msgid "I<hblkhd>"
2157 msgstr "I<hblkhd>"
2158
2159 #. type: Plain text
2160 #: build/C/man3/mallinfo.3:87
2161 msgid "The number of bytes in blocks currently allocated using B<mmap>(2)."
2162 msgstr ""
2163
2164 #. type: TP
2165 #: build/C/man3/mallinfo.3:87
2166 #, no-wrap
2167 msgid "I<usmblks>"
2168 msgstr "I<usmblks>"
2169
2170 #. type: Plain text
2171 #: build/C/man3/mallinfo.3:92
2172 msgid ""
2173 "The \"highwater mark\" for allocated space\\(emthat is, the maximum amount "
2174 "of space that was ever allocated.  This field is maintained only in "
2175 "nonthreading environments."
2176 msgstr ""
2177
2178 #. type: TP
2179 #: build/C/man3/mallinfo.3:92
2180 #, no-wrap
2181 msgid "I<fsmblks>"
2182 msgstr "I<fsmblks>"
2183
2184 #. type: Plain text
2185 #: build/C/man3/mallinfo.3:95
2186 msgid "The total number of bytes in fastbin free blocks."
2187 msgstr ""
2188
2189 #. type: TP
2190 #: build/C/man3/mallinfo.3:95
2191 #, no-wrap
2192 msgid "I<uordblks>"
2193 msgstr "I<uordblks>"
2194
2195 #. type: Plain text
2196 #: build/C/man3/mallinfo.3:98
2197 msgid "The total number of bytes used by in-use allocations."
2198 msgstr ""
2199
2200 #. type: TP
2201 #: build/C/man3/mallinfo.3:98
2202 #, no-wrap
2203 msgid "I<fordblks>"
2204 msgstr "I<fordblks>"
2205
2206 #. type: Plain text
2207 #: build/C/man3/mallinfo.3:101
2208 msgid "The total number of bytes in free blocks."
2209 msgstr ""
2210
2211 #. type: TP
2212 #: build/C/man3/mallinfo.3:101
2213 #, no-wrap
2214 msgid "I<keepcost>"
2215 msgstr "I<keepcost>"
2216
2217 #.  .SH VERSIONS
2218 #.  Available already in glibc 2.0, possibly earlier
2219 #. type: Plain text
2220 #: build/C/man3/mallinfo.3:110
2221 msgid ""
2222 "The total amount of releasable free space at the top of the heap.  This is "
2223 "the maximum number of bytes that could ideally (i.e., ignoring page "
2224 "alignment restrictions, and so on) be released by B<malloc_trim>(3)."
2225 msgstr ""
2226
2227 #. type: Plain text
2228 #: build/C/man3/mallinfo.3:114
2229 msgid ""
2230 "This function is not specified by POSIX or the C standards.  A similar "
2231 "function exists on many System V derivatives, and was specified in the SVID."
2232 msgstr ""
2233
2234 #.  FIXME http://sourceware.org/bugzilla/show_bug.cgi?id=208
2235 #.  See the 24 Aug 2011 mail by Paul Pluzhnikov:
2236 #.      "[patch] Fix mallinfo() to accumulate results for all arenas"
2237 #.  on libc-alpha@sourceware.org
2238 #. type: Plain text
2239 #: build/C/man3/mallinfo.3:126
2240 msgid ""
2241 "B<Information is returned for only the main memory allocation area.> "
2242 "Allocations in other arenas are excluded.  See B<malloc_stats>(3)  and "
2243 "B<malloc_info>(3)  for alternatives that include information about other "
2244 "arenas."
2245 msgstr ""
2246
2247 #. type: Plain text
2248 #: build/C/man3/mallinfo.3:134
2249 msgid ""
2250 "The fields of the I<mallinfo> structure are typed as I<int>.  However, "
2251 "because some internal bookkeeping values may be of type I<long>, the "
2252 "reported values may wrap around zero and thus be inaccurate."
2253 msgstr ""
2254
2255 #. type: SH
2256 #: build/C/man3/mallinfo.3:134 build/C/man3/malloc_hook.3:89
2257 #: build/C/man3/malloc_info.3:84 build/C/man3/mallopt.3:466
2258 #: build/C/man3/mcheck.3:159 build/C/man2/mmap.2:628
2259 #: build/C/man2/mprotect.2:148 build/C/man3/mtrace.3:108
2260 #, no-wrap
2261 msgid "EXAMPLE"
2262 msgstr "例"
2263
2264 #. type: Plain text
2265 #: build/C/man3/mallinfo.3:140
2266 msgid ""
2267 "The program below employs B<mallinfo>()  to retrieve memory allocation "
2268 "statistics before and after allocating and freeing some blocks of memory.  "
2269 "The statistics are displayed on standard output."
2270 msgstr ""
2271
2272 #. type: Plain text
2273 #: build/C/man3/mallinfo.3:144
2274 msgid ""
2275 "The first two command-line arguments specify the number and size of blocks "
2276 "to be allocated with B<malloc>(3)."
2277 msgstr ""
2278
2279 #. type: Plain text
2280 #: build/C/man3/mallinfo.3:158
2281 msgid ""
2282 "The remaining three arguments specify which of the allocated blocks should "
2283 "be freed with B<free>(3).  These three arguments are optional, and specify "
2284 "(in order): the step size to be used in the loop that frees blocks (the "
2285 "default is 1, meaning free all blocks in the range); the ordinal position of "
2286 "the first block to be freed (default 0, meaning the first allocated block); "
2287 "and a number one greater than the ordinal position of the last block to be "
2288 "freed (default is one greater than the maximum block number).  If these "
2289 "three arguments are omitted, then the defaults cause all allocated blocks to "
2290 "be freed."
2291 msgstr ""
2292
2293 #. type: Plain text
2294 #: build/C/man3/mallinfo.3:162
2295 msgid ""
2296 "In the following example run of the program, 1000 allocations of 100 bytes "
2297 "are performed, and then every second allocated block is freed:"
2298 msgstr ""
2299
2300 #. type: Plain text
2301 #: build/C/man3/mallinfo.3:177
2302 #, no-wrap
2303 msgid ""
2304 "$ B<./a.out 1000 100 2>\n"
2305 "============== Before allocating blocks ==============\n"
2306 "Total non-mmapped bytes (arena):       0\n"
2307 "# of free chunks (ordblks):            1\n"
2308 "# of free fastbin blocks (smblks):     0\n"
2309 "# of mapped regions (hblks):           0\n"
2310 "Bytes in mapped regions (hblkhd):      0\n"
2311 "Max. total allocated space (usmblks):  0\n"
2312 "Free bytes held in fastbins (fsmblks): 0\n"
2313 "Total allocated space (uordblks):      0\n"
2314 "Total free space (fordblks):           0\n"
2315 "Topmost releasable block (keepcost):   0\n"
2316 msgstr ""
2317 "$ B<./a.out 1000 100 2>\n"
2318 "============== Before allocating blocks ==============\n"
2319 "Total non-mmapped bytes (arena):       0\n"
2320 "# of free chunks (ordblks):            1\n"
2321 "# of free fastbin blocks (smblks):     0\n"
2322 "# of mapped regions (hblks):           0\n"
2323 "Bytes in mapped regions (hblkhd):      0\n"
2324 "Max. total allocated space (usmblks):  0\n"
2325 "Free bytes held in fastbins (fsmblks): 0\n"
2326 "Total allocated space (uordblks):      0\n"
2327 "Total free space (fordblks):           0\n"
2328 "Topmost releasable block (keepcost):   0\n"
2329
2330 #. type: Plain text
2331 #: build/C/man3/mallinfo.3:189
2332 #, no-wrap
2333 msgid ""
2334 "============== After allocating blocks ==============\n"
2335 "Total non-mmapped bytes (arena):       135168\n"
2336 "# of free chunks (ordblks):            1\n"
2337 "# of free fastbin blocks (smblks):     0\n"
2338 "# of mapped regions (hblks):           0\n"
2339 "Bytes in mapped regions (hblkhd):      0\n"
2340 "Max. total allocated space (usmblks):  0\n"
2341 "Free bytes held in fastbins (fsmblks): 0\n"
2342 "Total allocated space (uordblks):      104000\n"
2343 "Total free space (fordblks):           31168\n"
2344 "Topmost releasable block (keepcost):   31168\n"
2345 msgstr ""
2346 "============== After allocating blocks ==============\n"
2347 "Total non-mmapped bytes (arena):       135168\n"
2348 "# of free chunks (ordblks):            1\n"
2349 "# of free fastbin blocks (smblks):     0\n"
2350 "# of mapped regions (hblks):           0\n"
2351 "Bytes in mapped regions (hblkhd):      0\n"
2352 "Max. total allocated space (usmblks):  0\n"
2353 "Free bytes held in fastbins (fsmblks): 0\n"
2354 "Total allocated space (uordblks):      104000\n"
2355 "Total free space (fordblks):           31168\n"
2356 "Topmost releasable block (keepcost):   31168\n"
2357
2358 #. type: Plain text
2359 #: build/C/man3/mallinfo.3:201
2360 #, no-wrap
2361 msgid ""
2362 "============== After freeing blocks ==============\n"
2363 "Total non-mmapped bytes (arena):       135168\n"
2364 "# of free chunks (ordblks):            501\n"
2365 "# of free fastbin blocks (smblks):     0\n"
2366 "# of mapped regions (hblks):           0\n"
2367 "Bytes in mapped regions (hblkhd):      0\n"
2368 "Max. total allocated space (usmblks):  0\n"
2369 "Free bytes held in fastbins (fsmblks): 0\n"
2370 "Total allocated space (uordblks):      52000\n"
2371 "Total free space (fordblks):           83168\n"
2372 "Topmost releasable block (keepcost):   31168\n"
2373 msgstr ""
2374 "============== After freeing blocks ==============\n"
2375 "Total non-mmapped bytes (arena):       135168\n"
2376 "# of free chunks (ordblks):            501\n"
2377 "# of free fastbin blocks (smblks):     0\n"
2378 "# of mapped regions (hblks):           0\n"
2379 "Bytes in mapped regions (hblkhd):      0\n"
2380 "Max. total allocated space (usmblks):  0\n"
2381 "Free bytes held in fastbins (fsmblks): 0\n"
2382 "Total allocated space (uordblks):      52000\n"
2383 "Total free space (fordblks):           83168\n"
2384 "Topmost releasable block (keepcost):   31168\n"
2385
2386 #. type: SS
2387 #: build/C/man3/mallinfo.3:203 build/C/man3/malloc_info.3:167
2388 #: build/C/man3/mallopt.3:532 build/C/man3/mcheck.3:176
2389 #: build/C/man2/mmap.2:640 build/C/man2/mprotect.2:165
2390 #, no-wrap
2391 msgid "Program source"
2392 msgstr "プログラムのソース"
2393
2394 #. type: Plain text
2395 #: build/C/man3/mallinfo.3:208
2396 #, no-wrap
2397 msgid ""
2398 "#include E<lt>malloc.hE<gt>\n"
2399 "#include \"tlpi_hdr.h\"\n"
2400 msgstr ""
2401 "#include E<lt>malloc.hE<gt>\n"
2402 "#include \"tlpi_hdr.h\"\n"
2403
2404 #. type: Plain text
2405 #: build/C/man3/mallinfo.3:213
2406 #, no-wrap
2407 msgid ""
2408 "static void\n"
2409 "display_mallinfo(void)\n"
2410 "{\n"
2411 "    struct mallinfo mi;\n"
2412 msgstr ""
2413 "static void\n"
2414 "display_mallinfo(void)\n"
2415 "{\n"
2416 "    struct mallinfo mi;\n"
2417
2418 #. type: Plain text
2419 #: build/C/man3/mallinfo.3:215
2420 #, no-wrap
2421 msgid "    mi = mallinfo();\n"
2422 msgstr "    mi = mallinfo();\n"
2423
2424 #. type: Plain text
2425 #: build/C/man3/mallinfo.3:227
2426 #, no-wrap
2427 msgid ""
2428 "    printf(\"Total non-mmapped bytes (arena):       %d\\en\", mi.arena);\n"
2429 "    printf(\"# of free chunks (ordblks):            %d\\en\", mi.ordblks);\n"
2430 "    printf(\"# of free fastbin blocks (smblks):     %d\\en\", mi.smblks);\n"
2431 "    printf(\"# of mapped regions (hblks):           %d\\en\", mi.hblks);\n"
2432 "    printf(\"Bytes in mapped regions (hblkhd):      %d\\en\", mi.hblkhd);\n"
2433 "    printf(\"Max. total allocated space (usmblks):  %d\\en\", mi.usmblks);\n"
2434 "    printf(\"Free bytes held in fastbins (fsmblks): %d\\en\", mi.fsmblks);\n"
2435 "    printf(\"Total allocated space (uordblks):      %d\\en\", mi.uordblks);\n"
2436 "    printf(\"Total free space (fordblks):           %d\\en\", mi.fordblks);\n"
2437 "    printf(\"Topmost releasable block (keepcost):   %d\\en\", mi.keepcost);\n"
2438 "}\n"
2439 msgstr ""
2440 "    printf(\"Total non-mmapped bytes (arena):       %d\\en\", mi.arena);\n"
2441 "    printf(\"# of free chunks (ordblks):            %d\\en\", mi.ordblks);\n"
2442 "    printf(\"# of free fastbin blocks (smblks):     %d\\en\", mi.smblks);\n"
2443 "    printf(\"# of mapped regions (hblks):           %d\\en\", mi.hblks);\n"
2444 "    printf(\"Bytes in mapped regions (hblkhd):      %d\\en\", mi.hblkhd);\n"
2445 "    printf(\"Max. total allocated space (usmblks):  %d\\en\", mi.usmblks);\n"
2446 "    printf(\"Free bytes held in fastbins (fsmblks): %d\\en\", mi.fsmblks);\n"
2447 "    printf(\"Total allocated space (uordblks):      %d\\en\", mi.uordblks);\n"
2448 "    printf(\"Total free space (fordblks):           %d\\en\", mi.fordblks);\n"
2449 "    printf(\"Topmost releasable block (keepcost):   %d\\en\", mi.keepcost);\n"
2450 "}\n"
2451
2452 #. type: Plain text
2453 #: build/C/man3/mallinfo.3:235
2454 #, no-wrap
2455 msgid ""
2456 "int\n"
2457 "main(int argc, char *argv[])\n"
2458 "{\n"
2459 "#define MAX_ALLOCS 2000000\n"
2460 "    char *alloc[MAX_ALLOCS];\n"
2461 "    int numBlocks, j, freeBegin, freeEnd, freeStep;\n"
2462 "    size_t blockSize;\n"
2463 msgstr ""
2464 "int\n"
2465 "main(int argc, char *argv[])\n"
2466 "{\n"
2467 "#define MAX_ALLOCS 2000000\n"
2468 "    char *alloc[MAX_ALLOCS];\n"
2469 "    int numBlocks, j, freeBegin, freeEnd, freeStep;\n"
2470 "    size_t blockSize;\n"
2471
2472 #. type: Plain text
2473 #: build/C/man3/mallinfo.3:239
2474 #, no-wrap
2475 msgid ""
2476 "    if (argc E<lt> 3 || strcmp(argv[1], \"--help\") == 0)\n"
2477 "        usageErr(\"%s num-blocks block-size [free-step [start-free \"\n"
2478 "                \"[end-free]]]\\en\", argv[0]);\n"
2479 msgstr ""
2480 "    if (argc E<lt> 3 || strcmp(argv[1], \"--help\") == 0)\n"
2481 "        usageErr(\"%s num-blocks block-size [free-step [start-free \"\n"
2482 "                \"[end-free]]]\\en\", argv[0]);\n"
2483
2484 #. type: Plain text
2485 #: build/C/man3/mallinfo.3:245
2486 #, no-wrap
2487 msgid ""
2488 "    numBlocks = atoi(argv[1]);\n"
2489 "    blockSize = atoi(argv[2]);\n"
2490 "    freeStep = (argc E<gt> 3) ? atoi(argv[3]) : 1;\n"
2491 "    freeBegin = (argc E<gt> 4) ? atoi(argv[4]) : 0;\n"
2492 "    freeEnd = (argc E<gt> 5) ? atoi(argv[5]) : numBlocks;\n"
2493 msgstr ""
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
2500 #. type: Plain text
2501 #: build/C/man3/mallinfo.3:248
2502 #, no-wrap
2503 msgid ""
2504 "    printf(\"============== Before allocating blocks ==============\\en\");\n"
2505 "    display_mallinfo();\n"
2506 msgstr ""
2507 "    printf(\"============== Before allocating blocks ==============\\en\");\n"
2508 "    display_mallinfo();\n"
2509
2510 #. type: Plain text
2511 #: build/C/man3/mallinfo.3:252
2512 #, no-wrap
2513 msgid ""
2514 "    for (j = 0; j E<lt> numBlocks; j++) {\n"
2515 "        if (numBlocks E<gt>= MAX_ALLOCS)\n"
2516 "            fatal(\"Too many allocations\");\n"
2517 msgstr ""
2518 "    for (j = 0; j E<lt> numBlocks; j++) {\n"
2519 "        if (numBlocks E<gt>= MAX_ALLOCS)\n"
2520 "            fatal(\"Too many allocations\");\n"
2521
2522 #. type: Plain text
2523 #: build/C/man3/mallinfo.3:257
2524 #, no-wrap
2525 msgid ""
2526 "        alloc[j] = malloc(blockSize);\n"
2527 "        if (alloc[j] == NULL)\n"
2528 "            errExit(\"malloc\");\n"
2529 "    }\n"
2530 msgstr ""
2531 "        alloc[j] = malloc(blockSize);\n"
2532 "        if (alloc[j] == NULL)\n"
2533 "            errExit(\"malloc\");\n"
2534 "    }\n"
2535
2536 #. type: Plain text
2537 #: build/C/man3/mallinfo.3:260
2538 #, no-wrap
2539 msgid ""
2540 "    printf(\"\\en============== After allocating blocks ==============\\en\");\n"
2541 "    display_mallinfo();\n"
2542 msgstr ""
2543 "    printf(\"\\en============== After allocating blocks ==============\\en\");\n"
2544 "    display_mallinfo();\n"
2545
2546 #. type: Plain text
2547 #: build/C/man3/mallinfo.3:263
2548 #, no-wrap
2549 msgid ""
2550 "    for (j = freeBegin; j E<lt> freeEnd; j += freeStep)\n"
2551 "        free(alloc[j]);\n"
2552 msgstr ""
2553 "    for (j = freeBegin; j E<lt> freeEnd; j += freeStep)\n"
2554 "        free(alloc[j]);\n"
2555
2556 #. type: Plain text
2557 #: build/C/man3/mallinfo.3:266
2558 #, no-wrap
2559 msgid ""
2560 "    printf(\"\\en============== After freeing blocks ==============\\en\");\n"
2561 "    display_mallinfo();\n"
2562 msgstr ""
2563 "    printf(\"\\en============== After freeing blocks ==============\\en\");\n"
2564 "    display_mallinfo();\n"
2565
2566 #. type: Plain text
2567 #: build/C/man3/mallinfo.3:269 build/C/man3/malloc_info.3:255
2568 #: build/C/man3/mallopt.3:565 build/C/man3/mcheck.3:203
2569 #: build/C/man2/mmap.2:709
2570 #, no-wrap
2571 msgid ""
2572 "    exit(EXIT_SUCCESS);\n"
2573 "}\n"
2574 msgstr ""
2575 "    exit(EXIT_SUCCESS);\n"
2576 "}\n"
2577
2578 #. type: Plain text
2579 #: build/C/man3/mallinfo.3:279
2580 msgid ""
2581 "B<mmap>(2), B<malloc>(3), B<malloc_info>(3), B<malloc_stats>(3), "
2582 "B<malloc_trim>(3), B<mallopt>(3)"
2583 msgstr ""
2584 "B<mmap>(2), B<malloc>(3), B<malloc_info>(3), B<malloc_stats>(3), "
2585 "B<malloc_trim>(3), B<mallopt>(3)"
2586
2587 #. type: TH
2588 #: build/C/man3/malloc_get_state.3:25
2589 #, no-wrap
2590 msgid "MALLOC_GET_STATE"
2591 msgstr "MALLOC_GET_STATE"
2592
2593 #. type: TH
2594 #: build/C/man3/malloc_get_state.3:25
2595 #, no-wrap
2596 msgid "2012-05-04"
2597 msgstr "2012-05-04"
2598
2599 #. type: Plain text
2600 #: build/C/man3/malloc_get_state.3:28
2601 msgid ""
2602 "malloc_get_state, malloc_set_state - record and restore state of malloc "
2603 "implementation"
2604 msgstr ""
2605
2606 #. type: Plain text
2607 #: build/C/man3/malloc_get_state.3:31 build/C/man3/posix_memalign.3:35
2608 #, no-wrap
2609 msgid "B<#include E<lt>stdlib.hE<gt>>\n"
2610 msgstr "B<#include E<lt>stdlib.hE<gt>>\n"
2611
2612 #. type: Plain text
2613 #: build/C/man3/malloc_get_state.3:33
2614 #, no-wrap
2615 msgid "B<void* malloc_get_state(void);>\n"
2616 msgstr "B<void* malloc_get_state(void);>\n"
2617
2618 #. type: Plain text
2619 #: build/C/man3/malloc_get_state.3:35
2620 #, no-wrap
2621 msgid "B<int malloc_set_state(void *>I<state>B<);>\n"
2622 msgstr "B<int malloc_set_state(void *>I<state>B<);>\n"
2623
2624 #. type: Plain text
2625 #: build/C/man3/malloc_get_state.3:53
2626 msgid ""
2627 "The B<malloc_get_state>()  function records the current state of all "
2628 "B<malloc>(3)  internal bookkeeping variables (but not the actual contents of "
2629 "the heap or the state of B<malloc_hook>(3)  functions pointers).  The state "
2630 "is recorded in a system-dependent opaque data structure dynamically "
2631 "allocated via B<malloc>(3), and a pointer to that data structure is returned "
2632 "as the function result.  (It is the caller's responsibility to B<free>(3)  "
2633 "this memory.)"
2634 msgstr ""
2635
2636 #. type: Plain text
2637 #: build/C/man3/malloc_get_state.3:61
2638 msgid ""
2639 "The B<malloc_set_state>()  function restores the state of all B<malloc>(3)  "
2640 "internal bookkeeping variables to the values recorded in the opaque data "
2641 "structure pointed to by I<state>."
2642 msgstr ""
2643
2644 #. type: Plain text
2645 #: build/C/man3/malloc_get_state.3:68
2646 msgid ""
2647 "On success, B<malloc_get_state>()  returns a pointer to a newly allocated "
2648 "opaque data structure.  On error (for example, memory could not be allocated "
2649 "for the data structure), B<malloc_get_state>()  returns NULL."
2650 msgstr ""
2651
2652 #.  if(ms->magic != MALLOC_STATE_MAGIC) return -1;
2653 #.  /* Must fail if the major version is too high. */
2654 #.  if((ms->version & ~0xffl) > (MALLOC_STATE_VERSION & ~0xffl)) return -2;
2655 #. type: Plain text
2656 #: build/C/man3/malloc_get_state.3:86
2657 msgid ""
2658 "On success, B<malloc_set_state>()  returns 0.  If the implementation detects "
2659 "that I<state> does not point to a correctly formed data structure, "
2660 "B<malloc_set_state>()  returns -1.  If the implementation detects that the "
2661 "version of the data structure referred to by I<state> is a more recent "
2662 "version than this implementation knows about, B<malloc_set_state>()  returns "
2663 "-2."
2664 msgstr ""
2665
2666 #. type: Plain text
2667 #: build/C/man3/malloc_get_state.3:88 build/C/man3/malloc_hook.3:82
2668 #: build/C/man3/mcheck.3:147 build/C/man3/mtrace.3:80
2669 msgid "These functions are GNU extensions."
2670 msgstr "これらの関数は GNU による拡張である。"
2671
2672 #. type: Plain text
2673 #: build/C/man3/malloc_get_state.3:94
2674 msgid ""
2675 "These functions are useful when using this B<malloc>(3)  implementation as "
2676 "part of a shared library, and the heap contents are saved/restored via some "
2677 "other method.  This technique is used by GNU Emacs to implement its \"dumping"
2678 "\" function."
2679 msgstr ""
2680
2681 #.  i.e., calls __malloc_check_init()
2682 #.  i.e., malloc checking is not already in use
2683 #.  and the caller requested malloc checking
2684 #. type: Plain text
2685 #: build/C/man3/malloc_get_state.3:111
2686 msgid ""
2687 "Hook function pointers are never saved or restored by these functions, with "
2688 "two exceptions: if malloc checking (see B<mallopt>(3))  was in use when "
2689 "B<malloc_get_state>()  was called, then B<malloc_set_state>()  resets malloc "
2690 "checking hooks if possible; if malloc checking was not in use in the "
2691 "recorded state, but the caller has requested malloc checking, then the hooks "
2692 "are reset to 0."
2693 msgstr ""
2694
2695 #. type: Plain text
2696 #: build/C/man3/malloc_get_state.3:114
2697 msgid "B<malloc>(3), B<mallopt>(3)"
2698 msgstr "B<malloc>(3), B<mallopt>(3)"
2699
2700 #. type: TH
2701 #: build/C/man3/malloc_hook.3:10
2702 #, no-wrap
2703 msgid "MALLOC_HOOK"
2704 msgstr "MALLOC_HOOK"
2705
2706 #. type: TH
2707 #: build/C/man3/malloc_hook.3:10
2708 #, no-wrap
2709 msgid "2010-10-13"
2710 msgstr "2010-10-13"
2711
2712 #. type: Plain text
2713 #: build/C/man3/malloc_hook.3:15
2714 msgid ""
2715 "__malloc_hook, __malloc_initialize_hook, __memalign_hook, __free_hook, "
2716 "__realloc_hook, __after_morecore_hook - malloc debugging variables"
2717 msgstr ""
2718 "__malloc_hook, __malloc_initialize_hook, __memalign_hook, __free_hook, "
2719 "__realloc_hook, __after_morecore_hook - malloc デバッグ用の変数"
2720
2721 #. type: Plain text
2722 #: build/C/man3/malloc_hook.3:18 build/C/man3/malloc_info.3:31
2723 #: build/C/man3/posix_memalign.3:41
2724 #, no-wrap
2725 msgid "B<#include E<lt>malloc.hE<gt>>\n"
2726 msgstr "B<#include E<lt>malloc.hE<gt>>\n"
2727
2728 #. type: Plain text
2729 #: build/C/man3/malloc_hook.3:20
2730 #, no-wrap
2731 msgid "B<void *(*__malloc_hook)(size_t >I<size>B<, const void *>I<caller>B<);>\n"
2732 msgstr "B<void *(*__malloc_hook)(size_t >I<size>B<, const void *>I<caller>B<);>\n"
2733
2734 #. type: Plain text
2735 #: build/C/man3/malloc_hook.3:23
2736 #, no-wrap
2737 msgid "B<void *(*__realloc_hook)(void *>I<ptr>B<, size_t >I<size>B<, const void *>I<caller>B<);>\n"
2738 msgstr "B<void *(*__realloc_hook)(void *>I<ptr>B<, size_t >I<size>B<, const void *>I<caller>B<);>\n"
2739
2740 #. type: Plain text
2741 #: build/C/man3/malloc_hook.3:26
2742 #, no-wrap
2743 msgid ""
2744 "B<void *(*__memalign_hook)(size_t >I<alignment>B<, size_t >I<size>B<,>\n"
2745 "B<                         const void *>I<caller>B<);>\n"
2746 msgstr ""
2747 "B<void *(*__memalign_hook)(size_t >I<alignment>B<, size_t >I<size>B<,>\n"
2748 "B<                         const void *>I<caller>B<);>\n"
2749
2750 #. type: Plain text
2751 #: build/C/man3/malloc_hook.3:28
2752 #, no-wrap
2753 msgid "B<void (*__free_hook)(void *>I<ptr>B<, const void *>I<caller>B<);>\n"
2754 msgstr "B<void (*__free_hook)(void *>I<ptr>B<, const void *>I<caller>B<);>\n"
2755
2756 #. type: Plain text
2757 #: build/C/man3/malloc_hook.3:30
2758 #, no-wrap
2759 msgid "B<void (*__malloc_initialize_hook)(void);>\n"
2760 msgstr "B<void (*__malloc_initialize_hook)(void);>\n"
2761
2762 #. type: Plain text
2763 #: build/C/man3/malloc_hook.3:32
2764 #, no-wrap
2765 msgid "B<void (*__after_morecore_hook)(void);>\n"
2766 msgstr "B<void (*__after_morecore_hook)(void);>\n"
2767
2768 #. type: Plain text
2769 #: build/C/man3/malloc_hook.3:43
2770 msgid ""
2771 "The GNU C library lets you modify the behavior of B<malloc>(3), "
2772 "B<realloc>(3), and B<free>(3)  by specifying appropriate hook functions.  "
2773 "You can use these hooks to help you debug programs that use dynamic memory "
2774 "allocation, for example."
2775 msgstr ""
2776 "GNU C ライブラリでは、適切なフック関数 (hook function) を指定することで "
2777 "B<malloc>(3), B<realloc>(3), B<free>(3)  の動作を変更することができる。例え"
2778 "ば、動的にメモリ割り当てを行う プログラムのデバッグにこれらのフックを使うこと"
2779 "ができる。"
2780
2781 #. type: Plain text
2782 #: build/C/man3/malloc_hook.3:50
2783 msgid ""
2784 "The variable B<__malloc_initialize_hook> points at a function that is called "
2785 "once when the malloc implementation is initialized.  This is a weak "
2786 "variable, so it can be overridden in the application with a definition like "
2787 "the following:"
2788 msgstr ""
2789 "変数 B<__malloc_initialize_hook> は malloc の実装が初期化される際に一度だけ呼"
2790 "ばれる関数へのポインタである。 この変数は書き換え可能 (weak) であり、アプリ"
2791 "ケーション内で 以下のような定義で上書きできる:"
2792
2793 #. type: Plain text
2794 #: build/C/man3/malloc_hook.3:53
2795 #, no-wrap
2796 msgid "    void (*__malloc_initialize_hook)(void) = my_init_hook;\n"
2797 msgstr "    void (*__malloc_initialize_hook)(void) = my_init_hook;\n"
2798
2799 #. type: Plain text
2800 #: build/C/man3/malloc_hook.3:58
2801 msgid ""
2802 "Now the function I<my_init_hook>()  can do the initialization of all hooks."
2803 msgstr ""
2804 "なお、関数 I<my_init_hook>()  で全てのフックの初期化をすることができる。"
2805
2806 #. type: Plain text
2807 #: build/C/man3/malloc_hook.3:74
2808 msgid ""
2809 "The four functions pointed to by B<__malloc_hook>, B<__realloc_hook>, "
2810 "B<__memalign_hook>, B<__free_hook> have a prototype like the functions "
2811 "B<malloc>(3), B<realloc>(3), B<memalign>(3), B<free>(3), respectively, "
2812 "except that they have a final argument I<caller> that gives the address of "
2813 "the caller of B<malloc>(3), etc."
2814 msgstr ""
2815 "B<__malloc_hook>, B<__realloc_hook>, B<__memalign_hook>, B<__free_hook> で指"
2816 "される 4 つの関数は、各々 B<malloc>(3), B<realloc>(3), B<memalign>(3), "
2817 "B<free>(3)  とよく似たプロトタイプを持っているが、 一番最後の引き数 "
2818 "I<caller> をとる点が異なる。 引き数 I<caller> には、 B<malloc>(3)  などの呼び"
2819 "出し元 (caller) のアドレスが格納される。"
2820
2821 #. type: Plain text
2822 #: build/C/man3/malloc_hook.3:80
2823 msgid ""
2824 "The variable B<__after_morecore_hook> points at a function that is called "
2825 "each time after B<sbrk>(2)  was asked for more memory."
2826 msgstr ""
2827 "変数 B<__after_morecore_hook> は、領域の追加要求があり B<sbrk>(2)  が呼ばれた"
2828 "後で毎回呼び出される関数へのポインタである。"
2829
2830 #.  https://bugzilla.redhat.com/show_bug.cgi?id=450187
2831 #.  http://sourceware.org/bugzilla/show_bug.cgi?id=9957
2832 #. type: Plain text
2833 #: build/C/man3/malloc_hook.3:89
2834 msgid ""
2835 "The use of these hook functions is not safe in multithreaded programs, and "
2836 "they are now deprecated.  Programmers should instead preempt calls to the "
2837 "relevant functions by defining and exporting functions such as \"malloc\" "
2838 "and \"free\"."
2839 msgstr ""
2840 "マルチスレッドプログラムでは、 これらのフック関数の使用は安全ではなく、 今で"
2841 "は非推奨である。 プログラマは、 \"malloc\" や \"free\" のような関数を定義して"
2842 "公開して、 関連する関数を呼び出すようにすべきである。"
2843
2844 #. type: Plain text
2845 #: build/C/man3/malloc_hook.3:91
2846 msgid "Here is a short example of how to use these variables."
2847 msgstr "これらの変数の使い方の簡単な例を以下に示す。"
2848
2849 #. type: Plain text
2850 #: build/C/man3/malloc_hook.3:95
2851 #, no-wrap
2852 msgid ""
2853 "#include E<lt>stdio.hE<gt>\n"
2854 "#include E<lt>malloc.hE<gt>\n"
2855 msgstr ""
2856 "#include E<lt>stdio.hE<gt>\n"
2857 "#include E<lt>malloc.hE<gt>\n"
2858
2859 #. type: Plain text
2860 #: build/C/man3/malloc_hook.3:99
2861 #, no-wrap
2862 msgid ""
2863 "/* Prototypes for our hooks.  */\n"
2864 "static void my_init_hook(void);\n"
2865 "static void *my_malloc_hook(size_t, const void *);\n"
2866 msgstr ""
2867 "/* 使おうとするフックのプロトタイプ宣言 */\n"
2868 "static void my_init_hook(void);\n"
2869 "static void *my_malloc_hook(size_t, const void *);\n"
2870
2871 #. type: Plain text
2872 #: build/C/man3/malloc_hook.3:102
2873 #, no-wrap
2874 msgid ""
2875 "/* Variables to save original hooks. */\n"
2876 "static void *(*old_malloc_hook)(size_t, const void *);\n"
2877 msgstr ""
2878 "/* 元々のフックを保存するための変数 */\n"
2879 "static void *(*old_malloc_hook)(size_t, const void *);\n"
2880
2881 #. type: Plain text
2882 #: build/C/man3/malloc_hook.3:105
2883 #, no-wrap
2884 msgid ""
2885 "/* Override initializing hook from the C library. */\n"
2886 "void (*__malloc_initialize_hook) (void) = my_init_hook;\n"
2887 msgstr ""
2888 "/* C ライブラリから呼ばれる初期化フックを上書きする */\n"
2889 "void (*__malloc_initialize_hook) (void) = my_init_hook;\n"
2890
2891 #. type: Plain text
2892 #: build/C/man3/malloc_hook.3:112
2893 #, no-wrap
2894 msgid ""
2895 "static void\n"
2896 "my_init_hook(void)\n"
2897 "{\n"
2898 "    old_malloc_hook = __malloc_hook;\n"
2899 "    __malloc_hook = my_malloc_hook;\n"
2900 "}\n"
2901 msgstr ""
2902 "static void\n"
2903 "my_init_hook(void)\n"
2904 "{\n"
2905 "    old_malloc_hook = __malloc_hook;\n"
2906 "    __malloc_hook = my_malloc_hook;\n"
2907 "}\n"
2908
2909 #. type: Plain text
2910 #: build/C/man3/malloc_hook.3:117
2911 #, no-wrap
2912 msgid ""
2913 "static void *\n"
2914 "my_malloc_hook(size_t size, const void *caller)\n"
2915 "{\n"
2916 "    void *result;\n"
2917 msgstr ""
2918 "static void *\n"
2919 "my_malloc_hook(size_t size, const void *caller)\n"
2920 "{\n"
2921 "    void *result;\n"
2922
2923 #. type: Plain text
2924 #: build/C/man3/malloc_hook.3:120
2925 #, no-wrap
2926 msgid ""
2927 "    /* Restore all old hooks */\n"
2928 "    __malloc_hook = old_malloc_hook;\n"
2929 msgstr ""
2930 "    /* 元々のフックを全て戻す */\n"
2931 "    __malloc_hook = old_malloc_hook;\n"
2932
2933 #. type: Plain text
2934 #: build/C/man3/malloc_hook.3:123
2935 #, no-wrap
2936 msgid ""
2937 "    /* Call recursively */\n"
2938 "    result = malloc(size);\n"
2939 msgstr ""
2940 "    /* malloc の再帰的呼び出し */\n"
2941 "    result = malloc(size);\n"
2942
2943 #. type: Plain text
2944 #: build/C/man3/malloc_hook.3:126
2945 #, no-wrap
2946 msgid ""
2947 "    /* Save underlying hooks */\n"
2948 "    old_malloc_hook = __malloc_hook;\n"
2949 msgstr ""
2950 "    /* 現在設定されているフック (underlying hook) を保存する */\n"
2951 "    old_malloc_hook = __malloc_hook;\n"
2952
2953 #. type: Plain text
2954 #: build/C/man3/malloc_hook.3:130
2955 #, no-wrap
2956 msgid ""
2957 "    /* printf() might call malloc(), so protect it too. */\n"
2958 "    printf(\"malloc(%u) called from %p returns %p\\en\",\n"
2959 "            (unsigned int) size, caller, result);\n"
2960 msgstr ""
2961 "    /* printf() は malloc() を呼び出す可能性があるので\n"
2962 "        ここでもガードを行う (元々のフックのままにしておく) */\n"
2963 "    printf(\"malloc(%u) called from %p returns %p\\en\",\n"
2964 "            (unsigned int) size, caller, result);\n"
2965
2966 #. type: Plain text
2967 #: build/C/man3/malloc_hook.3:133
2968 #, no-wrap
2969 msgid ""
2970 "    /* Restore our own hooks */\n"
2971 "    __malloc_hook = my_malloc_hook;\n"
2972 msgstr ""
2973 "    /* ユーザが使おうとするフックを再設定する */\n"
2974 "    __malloc_hook = my_malloc_hook;\n"
2975
2976 #. type: Plain text
2977 #: build/C/man3/malloc_hook.3:136
2978 #, no-wrap
2979 msgid ""
2980 "    return result;\n"
2981 "}\n"
2982 msgstr ""
2983 "    return result;\n"
2984 "}\n"
2985
2986 #. type: Plain text
2987 #: build/C/man3/malloc_hook.3:142
2988 msgid "B<mallinfo>(3), B<malloc>(3), B<mcheck>(3), B<mtrace>(3)"
2989 msgstr "B<mallinfo>(3), B<malloc>(3), B<mcheck>(3), B<mtrace>(3)"
2990
2991 #. type: TH
2992 #: build/C/man3/malloc_info.3:25
2993 #, no-wrap
2994 msgid "MALLOC_INFO"
2995 msgstr "MALLOC_INFO"
2996
2997 #. type: TH
2998 #: build/C/man3/malloc_info.3:25
2999 #, no-wrap
3000 msgid "2013-04-19"
3001 msgstr "2013-04-19"
3002
3003 #. type: Plain text
3004 #: build/C/man3/malloc_info.3:28
3005 msgid "malloc_info - export malloc state to a stream"
3006 msgstr "malloc_info - malloc の状態をストリームに出力する"
3007
3008 #. type: Plain text
3009 #: build/C/man3/malloc_info.3:33
3010 #, no-wrap
3011 msgid "B<int malloc_info(int >I<options>B<, FILE *>I<fp>B<);>\n"
3012 msgstr "B<int malloc_info(int >I<options>B<, FILE *>I<fp>B<);>\n"
3013
3014 #. type: Plain text
3015 #: build/C/man3/malloc_info.3:44
3016 msgid ""
3017 "The B<malloc_info>()  function exports an XML string that describes the "
3018 "current state of the memory-allocation implementation in the caller.  The "
3019 "string is printed on the file stream I<fp>.  The exported string includes "
3020 "information about all arenas (see B<malloc>(3))."
3021 msgstr ""
3022 "B<malloc_info>() 関数は、 呼び出し元のメモリ割り当て実装の現在の状態を表す "
3023 "XML 文字列を出力する。 文字列は、 ファイルストリーム I<fp> に出力される。 出"
3024 "力された文字列には、 全ての割り当て領域の情報が含まれる (B<malloc>(3) 参照)。"
3025
3026 #. type: Plain text
3027 #: build/C/man3/malloc_info.3:48
3028 msgid "As currently implemented, I<options> must be zero."
3029 msgstr "現在の実装では、 I<options> は 0 でなければならない。"
3030
3031 #. type: Plain text
3032 #: build/C/man3/malloc_info.3:55
3033 msgid ""
3034 "On success, B<malloc_info>()  returns 0; on error, it returns -1, with "
3035 "I<errno> set to indicate the cause."
3036 msgstr ""
3037 "B<malloc_info>() は、成功すると 0 を返す。 エラーの場合、-1 を返し、 "
3038 "I<errno> にエラーの原因を示す値を設定する。"
3039
3040 #. type: Plain text
3041 #: build/C/man3/malloc_info.3:60
3042 msgid "I<options> was nonzero."
3043 msgstr "I<options> が 0 でなかった。"
3044
3045 #. type: Plain text
3046 #: build/C/man3/malloc_info.3:63
3047 msgid "B<malloc_info>()  was added to glibc in version 2.10."
3048 msgstr "B<malloc_info>() は glibc バージョン 2.10 で追加された。"
3049
3050 #. type: Plain text
3051 #: build/C/man3/malloc_info.3:65 build/C/man3/malloc_stats.3:57
3052 #: build/C/man3/malloc_trim.3:62 build/C/man3/malloc_usable_size.3:50
3053 msgid "This function is a GNU extension."
3054 msgstr "この関数は GNU による拡張である。"
3055
3056 #. type: Plain text
3057 #: build/C/man3/malloc_info.3:71
3058 msgid ""
3059 "The memory-allocation information is provided as an XML string (rather than "
3060 "a C structure)  because the information may change over time (according to "
3061 "changes in the underlying implementation).  The output XML string includes a "
3062 "version field."
3063 msgstr ""
3064 "メモリ割り当て情報は (C の構造体ではなく) XML 文字列として提供される。 これ"
3065 "は、 この情報は時間をたつと (内部で使用している実装によって) 変わる可能性があ"
3066 "るからである。 出力される XML 文字列にはバージョンフィールドが付いている。"
3067
3068 #. type: Plain text
3069 #: build/C/man3/malloc_info.3:77
3070 msgid ""
3071 "The B<open_memstream>(3)  function can be used to send the output of "
3072 "B<malloc_info>()  directly into a buffer in memory, rather than to a file."
3073 msgstr ""
3074 "B<open_memstream>(3) 関数を使うと、 B<malloc_info>() の出力を、 ファイルでは"
3075 "なくメモリ内のバッファに直接送ることができる。"
3076
3077 #. type: Plain text
3078 #: build/C/man3/malloc_info.3:84
3079 msgid ""
3080 "The B<malloc_info>()  function is designed to address deficiencies in "
3081 "B<malloc_stats>(3)  and B<mallinfo>(3)."
3082 msgstr ""
3083 "B<malloc_info>() 関数は、 B<malloc_stats>(3) と B<mallinfo>(3) の不備を解決す"
3084 "るために設定された。"
3085
3086 #. type: Plain text
3087 #: build/C/man3/malloc_info.3:95
3088 msgid ""
3089 "The program below takes up to four command-line arguments, of which the "
3090 "first three are mandatory.  The first argument specifies the number of "
3091 "threads that the program should create.  All of the threads, including the "
3092 "main thread, allocate the number of blocks of memory specified by the second "
3093 "argument.  The third argument controls the size of the blocks to be "
3094 "allocated.  The main thread creates blocks of this size, the second thread "
3095 "created by the program allocates blocks of twice this size, the third thread "
3096 "allocates blocks of three times this size, and so on."
3097 msgstr ""
3098 "以下のプログラムは最大で 4 つのコマンドライン引数を取り、 最初の 3 つは必須で"
3099 "ある。 最初の引数は、このプログラムが生成するスレッド数を指定する。 メインス"
3100 "レッドを含む全てのスレッドが第 2 引数で指定した数のメモリブロックの割り当てを"
3101 "行う。 第 3 引数は割り当てるブロックのサイズを制御する。 メインスレッドはこの"
3102 "サイズのブロックを作成し、 このプログラムが生成する 2 番目のスレッドはこのサ"
3103 "イズの 2 倍のサイズのブロックを、 3 番目のスレッドはこのサイズの 3 倍のサイズ"
3104 "のブロックを割り当て、 以下同様である。"
3105
3106 #. type: Plain text
3107 #: build/C/man3/malloc_info.3:102
3108 msgid ""
3109 "The program calls B<malloc_info>()  twice to display the memory-allocation "
3110 "state.  The first call takes place before any threads are created or memory "
3111 "allocated.  The second call is performed after all threads have allocated "
3112 "memory."
3113 msgstr ""
3114 "このプログラムは B<malloc_info>() を 2 回呼び出し、メモリ割り当て状態を表示す"
3115 "る。 最初の呼び出しはスレッドの生成もメモリの割り当ても行われる前に実行され"
3116 "る。 2 回目の呼び出しは全てのスレッドがメモリ割り当てを行った後に実行される。"
3117
3118 #. type: Plain text
3119 #: build/C/man3/malloc_info.3:110
3120 msgid ""
3121 "In the following example, the command-line arguments specify the creation of "
3122 "one additional thread, and both the main thread and the additional thread "
3123 "allocate 10000 blocks of memory.  After the blocks of memory have been "
3124 "allocated, B<malloc_info>()  shows the state of two allocation arenas."
3125 msgstr ""
3126 "以下の例では、 コマンドライン引数で、 追加でスレッドを一つ生成し、メインス"
3127 "レッドと追加のスレッドの両方が 10000 個のメモリブロックを割り当てるように指定"
3128 "している。 メモリブロックの割り当て後の B<malloc_info>() では、 2 つの割り当"
3129 "て領域の状態が表示されている。"
3130
3131 #. type: Plain text
3132 #: build/C/man3/malloc_info.3:135
3133 #, no-wrap
3134 msgid ""
3135 "$ B<getconf GNU_LIBC_VERSION>\n"
3136 "glibc 2.13\n"
3137 "$ B<./a.out 1 10000 100>\n"
3138 "============ Before allocating blocks ============\n"
3139 "E<lt>malloc version=\"1\"E<gt>\n"
3140 "E<lt>heap nr=\"0\"E<gt>\n"
3141 "E<lt>sizesE<gt>\n"
3142 "E<lt>/sizesE<gt>\n"
3143 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
3144 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
3145 "E<lt>system type=\"current\" size=\"135168\"/E<gt>\n"
3146 "E<lt>system type=\"max\" size=\"135168\"/E<gt>\n"
3147 "E<lt>aspace type=\"total\" size=\"135168\"/E<gt>\n"
3148 "E<lt>aspace type=\"mprotect\" size=\"135168\"/E<gt>\n"
3149 "E<lt>/heapE<gt>\n"
3150 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
3151 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
3152 "E<lt>system type=\"current\" size=\"135168\"/E<gt>\n"
3153 "E<lt>system type=\"max\" size=\"135168\"/E<gt>\n"
3154 "E<lt>aspace type=\"total\" size=\"135168\"/E<gt>\n"
3155 "E<lt>aspace type=\"mprotect\" size=\"135168\"/E<gt>\n"
3156 "E<lt>/mallocE<gt>\n"
3157 msgstr ""
3158 "$ B<getconf GNU_LIBC_VERSION>\n"
3159 "glibc 2.13\n"
3160 "$ B<./a.out 1 10000 100>\n"
3161 "============ Before allocating blocks ============\n"
3162 "E<lt>malloc version=\"1\"E<gt>\n"
3163 "E<lt>heap nr=\"0\"E<gt>\n"
3164 "E<lt>sizesE<gt>\n"
3165 "E<lt>/sizesE<gt>\n"
3166 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
3167 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
3168 "E<lt>system type=\"current\" size=\"135168\"/E<gt>\n"
3169 "E<lt>system type=\"max\" size=\"135168\"/E<gt>\n"
3170 "E<lt>aspace type=\"total\" size=\"135168\"/E<gt>\n"
3171 "E<lt>aspace type=\"mprotect\" size=\"135168\"/E<gt>\n"
3172 "E<lt>/heapE<gt>\n"
3173 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
3174 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
3175 "E<lt>system type=\"current\" size=\"135168\"/E<gt>\n"
3176 "E<lt>system type=\"max\" size=\"135168\"/E<gt>\n"
3177 "E<lt>aspace type=\"total\" size=\"135168\"/E<gt>\n"
3178 "E<lt>aspace type=\"mprotect\" size=\"135168\"/E<gt>\n"
3179 "E<lt>/mallocE<gt>\n"
3180
3181 #. type: Plain text
3182 #: build/C/man3/malloc_info.3:165
3183 #, no-wrap
3184 msgid ""
3185 "============ After allocating blocks ============\n"
3186 "E<lt>malloc version=\"1\"E<gt>\n"
3187 "E<lt>heap nr=\"0\"E<gt>\n"
3188 "E<lt>sizesE<gt>\n"
3189 "E<lt>/sizesE<gt>\n"
3190 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
3191 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
3192 "E<lt>system type=\"current\" size=\"1081344\"/E<gt>\n"
3193 "E<lt>system type=\"max\" size=\"1081344\"/E<gt>\n"
3194 "E<lt>aspace type=\"total\" size=\"1081344\"/E<gt>\n"
3195 "E<lt>aspace type=\"mprotect\" size=\"1081344\"/E<gt>\n"
3196 "E<lt>/heapE<gt>\n"
3197 "E<lt>heap nr=\"1\"E<gt>\n"
3198 "E<lt>sizesE<gt>\n"
3199 "E<lt>/sizesE<gt>\n"
3200 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
3201 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
3202 "E<lt>system type=\"current\" size=\"1032192\"/E<gt>\n"
3203 "E<lt>system type=\"max\" size=\"1032192\"/E<gt>\n"
3204 "E<lt>aspace type=\"total\" size=\"1032192\"/E<gt>\n"
3205 "E<lt>aspace type=\"mprotect\" size=\"1032192\"/E<gt>\n"
3206 "E<lt>/heapE<gt>\n"
3207 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
3208 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
3209 "E<lt>system type=\"current\" size=\"2113536\"/E<gt>\n"
3210 "E<lt>system type=\"max\" size=\"2113536\"/E<gt>\n"
3211 "E<lt>aspace type=\"total\" size=\"2113536\"/E<gt>\n"
3212 "E<lt>aspace type=\"mprotect\" size=\"2113536\"/E<gt>\n"
3213 "E<lt>/mallocE<gt>\n"
3214 msgstr ""
3215 "============ After allocating blocks ============\n"
3216 "E<lt>malloc version=\"1\"E<gt>\n"
3217 "E<lt>heap nr=\"0\"E<gt>\n"
3218 "E<lt>sizesE<gt>\n"
3219 "E<lt>/sizesE<gt>\n"
3220 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
3221 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
3222 "E<lt>system type=\"current\" size=\"1081344\"/E<gt>\n"
3223 "E<lt>system type=\"max\" size=\"1081344\"/E<gt>\n"
3224 "E<lt>aspace type=\"total\" size=\"1081344\"/E<gt>\n"
3225 "E<lt>aspace type=\"mprotect\" size=\"1081344\"/E<gt>\n"
3226 "E<lt>/heapE<gt>\n"
3227 "E<lt>heap nr=\"1\"E<gt>\n"
3228 "E<lt>sizesE<gt>\n"
3229 "E<lt>/sizesE<gt>\n"
3230 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
3231 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
3232 "E<lt>system type=\"current\" size=\"1032192\"/E<gt>\n"
3233 "E<lt>system type=\"max\" size=\"1032192\"/E<gt>\n"
3234 "E<lt>aspace type=\"total\" size=\"1032192\"/E<gt>\n"
3235 "E<lt>aspace type=\"mprotect\" size=\"1032192\"/E<gt>\n"
3236 "E<lt>/heapE<gt>\n"
3237 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
3238 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
3239 "E<lt>system type=\"current\" size=\"2113536\"/E<gt>\n"
3240 "E<lt>system type=\"max\" size=\"2113536\"/E<gt>\n"
3241 "E<lt>aspace type=\"total\" size=\"2113536\"/E<gt>\n"
3242 "E<lt>aspace type=\"mprotect\" size=\"2113536\"/E<gt>\n"
3243 "E<lt>/mallocE<gt>\n"
3244
3245 #. type: Plain text
3246 #: build/C/man3/malloc_info.3:175
3247 #, no-wrap
3248 msgid ""
3249 "#include E<lt>unistd.hE<gt>\n"
3250 "#include E<lt>stdlib.hE<gt>\n"
3251 "#include E<lt>pthread.hE<gt>\n"
3252 "#include E<lt>malloc.hE<gt>\n"
3253 "#include E<lt>errno.hE<gt>\n"
3254 msgstr ""
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
3261 #. type: Plain text
3262 #: build/C/man3/malloc_info.3:178
3263 #, no-wrap
3264 msgid ""
3265 "static size_t blockSize;\n"
3266 "static int numThreads, numBlocks;\n"
3267 msgstr ""
3268 "static size_t blockSize;\n"
3269 "static int numThreads, numBlocks;\n"
3270
3271 #. type: Plain text
3272 #: build/C/man3/malloc_info.3:181
3273 #, no-wrap
3274 msgid ""
3275 "#define errExit(msg)    do { perror(msg); exit(EXIT_FAILURE); \\e\n"
3276 "                        } while (0)\n"
3277 msgstr ""
3278 "#define errExit(msg)    do { perror(msg); exit(EXIT_FAILURE); \\e\n"
3279 "                        } while (0)\n"
3280
3281 #. type: Plain text
3282 #: build/C/man3/malloc_info.3:187
3283 #, no-wrap
3284 msgid ""
3285 "static void *\n"
3286 "thread_func(void *arg)\n"
3287 "{\n"
3288 "    int j;\n"
3289 "    int tn = (int) arg;\n"
3290 msgstr ""
3291 "static void *\n"
3292 "thread_func(void *arg)\n"
3293 "{\n"
3294 "    int j;\n"
3295 "    int tn = (int) arg;\n"
3296
3297 #. type: Plain text
3298 #: build/C/man3/malloc_info.3:190
3299 #, no-wrap
3300 msgid ""
3301 "    /* The multiplier \\(aq(2 + tn)\\(aq ensures that each thread (including\n"
3302 "       the main thread) allocates a different amount of memory */\n"
3303 msgstr ""
3304 "    /* The multiplier \\(aq(2 + tn)\\(aq ensures that each thread (including\n"
3305 "       the main thread) allocates a different amount of memory */\n"
3306
3307 #. type: Plain text
3308 #: build/C/man3/malloc_info.3:194
3309 #, no-wrap
3310 msgid ""
3311 "    for (j = 0; j E<lt> numBlocks; j++)\n"
3312 "        if (malloc(blockSize * (2 + tn)) == NULL)\n"
3313 "            errExit(\"malloc-thread\");\n"
3314 msgstr ""
3315 "    for (j = 0; j E<lt> numBlocks; j++)\n"
3316 "        if (malloc(blockSize * (2 + tn)) == NULL)\n"
3317 "            errExit(\"malloc-thread\");\n"
3318
3319 #. type: Plain text
3320 #: build/C/man3/malloc_info.3:198
3321 #, no-wrap
3322 msgid ""
3323 "    sleep(100);         /* Sleep until main thread terminates */\n"
3324 "    return NULL;\n"
3325 "}\n"
3326 msgstr ""
3327 "    sleep(100);         /* Sleep until main thread terminates */\n"
3328 "    return NULL;\n"
3329 "}\n"
3330
3331 #. type: Plain text
3332 #: build/C/man3/malloc_info.3:204
3333 #, no-wrap
3334 msgid ""
3335 "int\n"
3336 "main(int argc, char *argv[])\n"
3337 "{\n"
3338 "    int j, tn, sleepTime;\n"
3339 "    pthread_t *thr;\n"
3340 msgstr ""
3341 "int\n"
3342 "main(int argc, char *argv[])\n"
3343 "{\n"
3344 "    int j, tn, sleepTime;\n"
3345 "    pthread_t *thr;\n"
3346
3347 #. type: Plain text
3348 #: build/C/man3/malloc_info.3:211
3349 #, no-wrap
3350 msgid ""
3351 "    if (argc E<lt> 4) {\n"
3352 "        fprintf(stderr,\n"
3353 "                \"%s num-threads num-blocks block-size [sleep-time]\\en\",\n"
3354 "                argv[0]);\n"
3355 "        exit(EXIT_FAILURE);\n"
3356 "    }\n"
3357 msgstr ""
3358 "    if (argc E<lt> 4) {\n"
3359 "        fprintf(stderr,\n"
3360 "                \"%s num-threads num-blocks block-size [sleep-time]\\en\",\n"
3361 "                argv[0]);\n"
3362 "        exit(EXIT_FAILURE);\n"
3363 "    }\n"
3364
3365 #. type: Plain text
3366 #: build/C/man3/malloc_info.3:216
3367 #, no-wrap
3368 msgid ""
3369 "    numThreads = atoi(argv[1]);\n"
3370 "    numBlocks = atoi(argv[2]);\n"
3371 "    blockSize = atoi(argv[3]);\n"
3372 "    sleepTime = (argc E<gt> 4) ? atoi(argv[4]) : 0;\n"
3373 msgstr ""
3374 "    numThreads = atoi(argv[1]);\n"
3375 "    numBlocks = atoi(argv[2]);\n"
3376 "    blockSize = atoi(argv[3]);\n"
3377 "    sleepTime = (argc E<gt> 4) ? atoi(argv[4]) : 0;\n"
3378
3379 #. type: Plain text
3380 #: build/C/man3/malloc_info.3:220
3381 #, no-wrap
3382 msgid ""
3383 "    thr = calloc(numThreads, sizeof(pthread_t));\n"
3384 "    if (thr == NULL)\n"
3385 "        errExit(\"calloc\");\n"
3386 msgstr ""
3387 "    thr = calloc(numThreads, sizeof(pthread_t));\n"
3388 "    if (thr == NULL)\n"
3389 "        errExit(\"calloc\");\n"
3390
3391 #. type: Plain text
3392 #: build/C/man3/malloc_info.3:223
3393 #, no-wrap
3394 msgid ""
3395 "    printf(\"============ Before allocating blocks ============\\en\");\n"
3396 "    malloc_info(0, stdout);\n"
3397 msgstr ""
3398 "    printf(\"============ Before allocating blocks ============\\en\");\n"
3399 "    malloc_info(0, stdout);\n"
3400
3401 #. type: Plain text
3402 #: build/C/man3/malloc_info.3:225
3403 #, no-wrap
3404 msgid "    /* Create threads that allocate different amounts of memory */\n"
3405 msgstr "    /* Create threads that allocate different amounts of memory */\n"
3406
3407 #. type: Plain text
3408 #: build/C/man3/malloc_info.3:231
3409 #, no-wrap
3410 msgid ""
3411 "    for (tn = 0; tn E<lt> numThreads; tn++) {\n"
3412 "        errno = pthread_create(&thr[tn], NULL, thread_func,\n"
3413 "                               (void *) tn);\n"
3414 "        if (errno != 0)\n"
3415 "            errExit(\"pthread_create\");\n"
3416 msgstr ""
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
3423 #. type: Plain text
3424 #: build/C/man3/malloc_info.3:236
3425 #, no-wrap
3426 msgid ""
3427 "        /* If we add a sleep interval after the start-up of each\n"
3428 "           thread, the threads likely won\\(aqt contend for malloc\n"
3429 "           mutexes, and therefore additional arenas won\\(aqt be\n"
3430 "           allocated (see malloc(3)). */\n"
3431 msgstr ""
3432 "        /* If we add a sleep interval after the start-up of each\n"
3433 "           thread, the threads likely won\\(aqt contend for malloc\n"
3434 "           mutexes, and therefore additional arenas won\\(aqt be\n"
3435 "           allocated (see malloc(3)). */\n"
3436
3437 #. type: Plain text
3438 #: build/C/man3/malloc_info.3:240
3439 #, no-wrap
3440 msgid ""
3441 "        if (sleepTime E<gt> 0)\n"
3442 "            sleep(sleepTime);\n"
3443 "    }\n"
3444 msgstr ""
3445 "        if (sleepTime E<gt> 0)\n"
3446 "            sleep(sleepTime);\n"
3447 "    }\n"
3448
3449 #. type: Plain text
3450 #: build/C/man3/malloc_info.3:242
3451 #, no-wrap
3452 msgid "    /* The main thread also allocates some memory */\n"
3453 msgstr "    /* The main thread also allocates some memory */\n"
3454
3455 #. type: Plain text
3456 #: build/C/man3/malloc_info.3:246
3457 #, no-wrap
3458 msgid ""
3459 "    for (j = 0; j E<lt> numBlocks; j++)\n"
3460 "        if (malloc(blockSize) == NULL)\n"
3461 "            errExit(\"malloc\");\n"
3462 msgstr ""
3463 "    for (j = 0; j E<lt> numBlocks; j++)\n"
3464 "        if (malloc(blockSize) == NULL)\n"
3465 "            errExit(\"malloc\");\n"
3466
3467 #. type: Plain text
3468 #: build/C/man3/malloc_info.3:249
3469 #, no-wrap
3470 msgid ""
3471 "    sleep(2);           /* Give all threads a chance to\n"
3472 "                           complete allocations */\n"
3473 msgstr ""
3474 "    sleep(2);           /* Give all threads a chance to\n"
3475 "                           complete allocations */\n"
3476
3477 #. type: Plain text
3478 #: build/C/man3/malloc_info.3:252
3479 #, no-wrap
3480 msgid ""
3481 "    printf(\"\\en============ After allocating blocks ============\\en\");\n"
3482 "    malloc_info(0, stdout);\n"
3483 msgstr ""
3484 "    printf(\"\\en============ After allocating blocks ============\\en\");\n"
3485 "    malloc_info(0, stdout);\n"
3486
3487 #. type: Plain text
3488 #: build/C/man3/malloc_info.3:262
3489 msgid ""
3490 "B<mallinfo>(3), B<malloc>(3), B<malloc_stats>(3), B<mallopt>(3), "
3491 "B<open_memstream>(3)"
3492 msgstr ""
3493 "B<mallinfo>(3), B<malloc>(3), B<malloc_stats>(3), B<mallopt>(3), "
3494 "B<open_memstream>(3)"
3495
3496 #. type: TH
3497 #: build/C/man3/malloc_stats.3:26
3498 #, no-wrap
3499 msgid "MALLOC_STATS"
3500 msgstr "MALLOC_STATS"
3501
3502 #. type: Plain text
3503 #: build/C/man3/malloc_stats.3:29
3504 msgid "malloc_stats - print memory allocation statistics"
3505 msgstr "malloc_stats - メモリ割り当ての統計を表示する"
3506
3507 #. type: Plain text
3508 #: build/C/man3/malloc_stats.3:33
3509 msgid "B<void malloc_stats(void);>"
3510 msgstr "B<void malloc_stats(void);>"
3511
3512 #.  .SH VERSIONS
3513 #.  Available already in glibc 2.0, possibly earlier
3514 #. type: Plain text
3515 #: build/C/man3/malloc_stats.3:55
3516 msgid ""
3517 "The B<malloc_stats>()  function prints (on standard error) statistics about "
3518 "memory allocated by B<malloc>(3)  and related functions.  For each arena "
3519 "(allocation area), this function prints the total amount of memory allocated "
3520 "and the total number of bytes consumed by in-use allocations.  (These two "
3521 "values correspond to the I<arena> and I<uordblks> fields retrieved by "
3522 "B<mallinfo>(3).)  In addition, the function prints the sum of these two "
3523 "statistics for all arenas, and the maximum number of blocks and bytes that "
3524 "were ever simultaneously allocated using B<mmap>(2)."
3525 msgstr ""
3526 "B<malloc_stats>() 関数は B<malloc>(3) や関連する関数により割り当てられたメモ"
3527 "リに関する統計を (標準エラーに) 出力する。 各領域 (割り当てエリア) につい"
3528 "て、 この関数は割り当てられているメモリの総量と現在の割り当てが使用している総"
3529 "バイト数を出力する (これらの二つの値は B<mallinfo>(3) で取得できる I<arena> "
3530 "と I<uordblks> フィールドに対応している)。 また、この関数は、 すべての領域の"
3531 "これら二つの統計情報の合計値と、 B<mmap>(2) を使って同時に割り当てられたブ"
3532 "ロック数とバイト数の最大値を表示する。"
3533
3534 #. type: Plain text
3535 #: build/C/man3/malloc_stats.3:61
3536 msgid ""
3537 "More detailed information about memory allocations in the main arena can be "
3538 "obtained using B<mallinfo>(3)."
3539 msgstr ""
3540 "B<mallinfo>(3) を使用すると、 メイン領域のメモリ割り当てに関するより詳細な情"
3541 "報を取得できる。"
3542
3543 #. type: Plain text
3544 #: build/C/man3/malloc_stats.3:67
3545 msgid ""
3546 "B<mmap>(2), B<mallinfo>(3), B<malloc>(3), B<malloc_info>(3), B<mallopt>(3)"
3547 msgstr ""
3548 "B<mmap>(2), B<mallinfo>(3), B<malloc>(3), B<malloc_info>(3), B<mallopt>(3)"
3549
3550 #. type: TH
3551 #: build/C/man3/malloc_trim.3:26
3552 #, no-wrap
3553 msgid "MALLOC_TRIM"
3554 msgstr "MALLOC_TRIM"
3555
3556 #. type: TH
3557 #: build/C/man3/malloc_trim.3:26 build/C/man2/remap_file_pages.2:28
3558 #, no-wrap
3559 msgid "2014-05-28"
3560 msgstr "2014-05-28"
3561
3562 #. type: Plain text
3563 #: build/C/man3/malloc_trim.3:29
3564 msgid "malloc_trim - release free memory from the top of the heap"
3565 msgstr ""
3566
3567 #. type: Plain text
3568 #: build/C/man3/malloc_trim.3:33
3569 msgid "B<int malloc_trim(size_t >I<pad>B<);>"
3570 msgstr "B<int malloc_trim(size_t >I<pad>B<);>"
3571
3572 #. type: Plain text
3573 #: build/C/man3/malloc_trim.3:40
3574 msgid ""
3575 "The B<malloc_trim>()  function attempts to release free memory at the top of "
3576 "the heap (by calling B<sbrk>(2)  with a suitable argument)."
3577 msgstr ""
3578
3579 #. type: Plain text
3580 #: build/C/man3/malloc_trim.3:51
3581 msgid ""
3582 "The I<pad> argument specifies the amount of free space to leave untrimmed at "
3583 "the top of the heap.  If this argument is 0, only the minimum amount of "
3584 "memory is maintained at the top of the heap (i.e., one page or less).  A "
3585 "nonzero argument can be used to maintain some trailing space at the top of "
3586 "the heap in order to allow future allocations to be made without having to "
3587 "extend the heap with B<sbrk>(2)."
3588 msgstr ""
3589
3590 #. type: Plain text
3591 #: build/C/man3/malloc_trim.3:56
3592 msgid ""
3593 "The B<malloc_trim>()  function returns 1 if memory was actually released "
3594 "back to the system, or 0 if it was not possible to release any memory."
3595 msgstr ""
3596
3597 #.  .SH VERSIONS
3598 #.  Available already in glibc 2.0, possibly earlier
3599 #. type: Plain text
3600 #: build/C/man3/malloc_trim.3:60
3601 msgid "No errors are defined."
3602 msgstr ""
3603
3604 #. type: Plain text
3605 #: build/C/man3/malloc_trim.3:71
3606 msgid ""
3607 "This function is automatically called by B<free>(3)  in certain "
3608 "circumstances; see the discussion of B<M_TOP_PAD> and B<M_TRIM_THRESHOLD> in "
3609 "B<mallopt>(3)."
3610 msgstr ""
3611
3612 #. type: Plain text
3613 #: build/C/man3/malloc_trim.3:74
3614 msgid ""
3615 "This function cannot release free memory located at places other than the "
3616 "top of the heap."
3617 msgstr ""
3618
3619 #.  malloc/malloc.c::mTRIm():
3620 #.      return result | (av == &main_arena ? sYSTRIm (pad, av) : 0);
3621 #. type: Plain text
3622 #: build/C/man3/malloc_trim.3:78
3623 msgid "This function releases only memory in the main arena."
3624 msgstr ""
3625
3626 #. type: Plain text
3627 #: build/C/man3/malloc_trim.3:82
3628 msgid "B<sbrk>(2), B<malloc>(3), B<mallopt>(3)"
3629 msgstr "B<sbrk>(2), B<malloc>(3), B<mallopt>(3)"
3630
3631 #. type: TH
3632 #: build/C/man3/malloc_usable_size.3:25
3633 #, no-wrap
3634 msgid "MALLOC_USABLE_SIZE"
3635 msgstr "MALLOC_USABLE_SIZE"
3636
3637 #. type: TH
3638 #: build/C/man3/malloc_usable_size.3:25
3639 #, no-wrap
3640 msgid "2012-03-29"
3641 msgstr "2012-03-29"
3642
3643 #. type: Plain text
3644 #: build/C/man3/malloc_usable_size.3:28
3645 msgid "malloc_usable_size - obtain size of block of memory allocated from heap"
3646 msgstr ""
3647
3648 #. type: Plain text
3649 #: build/C/man3/malloc_usable_size.3:32
3650 msgid "B<size_t malloc_usable_size (void *>I<ptr>B<);>"
3651 msgstr "B<size_t malloc_usable_size (void *>I<ptr>B<);>"
3652
3653 #. type: Plain text
3654 #: build/C/man3/malloc_usable_size.3:40
3655 msgid ""
3656 "The B<malloc_usable_size>()  function returns the number of usable bytes in "
3657 "the block pointed to by I<ptr>, a pointer to a block of memory allocated by "
3658 "B<malloc>(3)  or a related function."
3659 msgstr ""
3660
3661 #. type: Plain text
3662 #: build/C/man3/malloc_usable_size.3:48
3663 msgid ""
3664 "B<malloc_usable_size>()  returns the number of usable bytes in the block of "
3665 "allocated memory pointed to by I<ptr>.  If I<ptr> is NULL, 0 is returned."
3666 msgstr ""
3667
3668 #. type: Plain text
3669 #: build/C/man3/malloc_usable_size.3:60
3670 msgid ""
3671 "The value returned by B<malloc_usable_size>()  may be greater than the "
3672 "requested size of the allocation because of alignment and minimum size "
3673 "constraints.  Although the excess bytes can be overwritten by the "
3674 "application without ill effects, this is not good programming practice: the "
3675 "number of excess bytes in an allocation depends on the underlying "
3676 "implementation."
3677 msgstr ""
3678
3679 #. type: Plain text
3680 #: build/C/man3/malloc_usable_size.3:62
3681 msgid "The main use of this function is for debugging and introspection."
3682 msgstr ""
3683
3684 #. type: Plain text
3685 #: build/C/man3/malloc_usable_size.3:64
3686 msgid "B<malloc>(3)"
3687 msgstr "B<malloc>(3)"
3688
3689 #. type: TH
3690 #: build/C/man3/mallopt.3:26
3691 #, no-wrap
3692 msgid "MALLOPT"
3693 msgstr "MALLOPT"
3694
3695 #. type: TH
3696 #: build/C/man3/mallopt.3:26
3697 #, no-wrap
3698 msgid "2012-04-30"
3699 msgstr "2012-04-30"
3700
3701 #. type: Plain text
3702 #: build/C/man3/mallopt.3:29
3703 msgid "mallopt - set memory allocation parameters"
3704 msgstr "mallopt - メモリ割り当てパラメータを設定する"
3705
3706 #. type: Plain text
3707 #: build/C/man3/mallopt.3:33
3708 msgid "B<int mallopt(int >I<param>B<, int >I<value>B<);>"
3709 msgstr "B<int mallopt(int >I<param>B<, int >I<value>B<);>"
3710
3711 #. type: Plain text
3712 #: build/C/man3/mallopt.3:44
3713 msgid ""
3714 "The B<mallopt>()  function adjusts parameters that control the behavior of "
3715 "the memory-allocation functions (see B<malloc>(3)).  The I<param> argument "
3716 "specifies the parameter to be modified, and I<value> specifies the new value "
3717 "for that parameter."
3718 msgstr ""
3719 "B<mallopt>() 関数は、メモリ割り当て関数 (B<malloc>(3) を参照) の動作を\n"
3720 "制御するパラメータの調整を行う。\n"
3721 "I<param> 引き数で変更するパラメータを指定し、\n"
3722 "I<value> 引き数でそのパラメータの新しい値を指定する。"
3723
3724 #. type: Plain text
3725 #: build/C/man3/mallopt.3:47
3726 msgid "The following values can be specified for I<param>:"
3727 msgstr "I<param> には以下の値を指定することができる。"
3728
3729 #. type: TP
3730 #: build/C/man3/mallopt.3:47
3731 #, no-wrap
3732 msgid "B<M_CHECK_ACTION>"
3733 msgstr "B<M_CHECK_ACTION>"
3734
3735 #. type: Plain text
3736 #: build/C/man3/mallopt.3:53
3737 msgid ""
3738 "Setting this parameter controls how glibc responds when various kinds of "
3739 "programming errors are detected (e.g., freeing the same pointer twice).  The "
3740 "3 least significant bits (2, 1, and 0) of the value assigned to this "
3741 "parameter determine the glibc behavior, as follows:"
3742 msgstr ""
3743
3744 #. type: TP
3745 #: build/C/man3/mallopt.3:54
3746 #, no-wrap
3747 msgid "Bit 0"
3748 msgstr "Bit 0"
3749
3750 #. type: Plain text
3751 #: build/C/man3/mallopt.3:64
3752 msgid ""
3753 "If this bit is set, then print a one-line message on I<stderr> that provides "
3754 "details about the error.  The message starts with the string \"***\\ glibc "
3755 "detected\\ ***\", followed by the program name, the name of the memory-"
3756 "allocation function in which the error was detected, a brief description of "
3757 "the error, and the memory address where the error was detected."
3758 msgstr ""
3759
3760 #. type: TP
3761 #: build/C/man3/mallopt.3:64
3762 #, no-wrap
3763 msgid "Bit 1"
3764 msgstr "Bit 1"
3765
3766 #. type: Plain text
3767 #: build/C/man3/mallopt.3:79
3768 msgid ""
3769 "If this bit is set, then, after printing any error message specified by bit "
3770 "0, the program is terminated by calling B<abort>(3).  In glibc versions "
3771 "since 2.4, if bit 0 is also set, then, between printing the error message "
3772 "and aborting, the program also prints a stack trace in the manner of "
3773 "B<backtrace>(3), and prints the process's memory mapping in the style of I</"
3774 "proc/[pid]/maps> (see B<proc>(5))."
3775 msgstr ""
3776
3777 #. type: TP
3778 #: build/C/man3/mallopt.3:79
3779 #, no-wrap
3780 msgid "Bit 2 (since glibc 2.4)"
3781 msgstr "Bit 2 (glibc 2.4 以降)"
3782
3783 #. type: Plain text
3784 #: build/C/man3/mallopt.3:86
3785 msgid ""
3786 "This bit has an effect only if bit 0 is also set.  If this bit is set, then "
3787 "the one-line message describing the error is simplified to contain just the "
3788 "name of the function where the error was detected and the brief description "
3789 "of the error."
3790 msgstr ""
3791
3792 #. type: Plain text
3793 #: build/C/man3/mallopt.3:91
3794 msgid "The remaining bits in I<value> are ignored."
3795 msgstr ""
3796
3797 #. type: Plain text
3798 #: build/C/man3/mallopt.3:95
3799 msgid ""
3800 "Combining the above details, the following numeric values are meaningful for "
3801 "B<M_CHECK_ACTION>:"
3802 msgstr ""
3803
3804 #. type: IP
3805 #: build/C/man3/mallopt.3:96
3806 #, no-wrap
3807 msgid "0"
3808 msgstr "0"
3809
3810 #. type: Plain text
3811 #: build/C/man3/mallopt.3:98
3812 msgid "Ignore error conditions; continue execution (with undefined results)."
3813 msgstr ""
3814
3815 #. type: IP
3816 #: build/C/man3/mallopt.3:98
3817 #, no-wrap
3818 msgid "1"
3819 msgstr "1"
3820
3821 #. type: Plain text
3822 #: build/C/man3/mallopt.3:100
3823 msgid "Print a detailed error message and continue execution."
3824 msgstr ""
3825
3826 #. type: IP
3827 #: build/C/man3/mallopt.3:100
3828 #, no-wrap
3829 msgid "2"
3830 msgstr "2"
3831
3832 #. type: Plain text
3833 #: build/C/man3/mallopt.3:102
3834 msgid "Abort the program."
3835 msgstr ""
3836
3837 #. type: IP
3838 #: build/C/man3/mallopt.3:102
3839 #, no-wrap
3840 msgid "3"
3841 msgstr "3"
3842
3843 #. type: Plain text
3844 #: build/C/man3/mallopt.3:105
3845 msgid ""
3846 "Print detailed error message, stack trace, and memory mappings, and abort "
3847 "the program."
3848 msgstr ""
3849
3850 #. type: IP
3851 #: build/C/man3/mallopt.3:105
3852 #, no-wrap
3853 msgid "5"
3854 msgstr "5"
3855
3856 #. type: Plain text
3857 #: build/C/man3/mallopt.3:107
3858 msgid "Print a simple error message and continue execution."
3859 msgstr ""
3860
3861 #. type: IP
3862 #: build/C/man3/mallopt.3:107
3863 #, no-wrap
3864 msgid "7"
3865 msgstr "7"
3866
3867 #. type: Plain text
3868 #: build/C/man3/mallopt.3:110
3869 msgid ""
3870 "Print simple error message, stack trace, and memory mappings, and abort the "
3871 "program."
3872 msgstr ""
3873
3874 #. type: Plain text
3875 #: build/C/man3/mallopt.3:116
3876 msgid ""
3877 "Since glibc 2.3.4, the default value for the B<M_CHECK_ACTION> parameter is "
3878 "3.  In glibc version 2.3.3 and earlier, the default value is 1."
3879 msgstr ""
3880
3881 #. type: Plain text
3882 #: build/C/man3/mallopt.3:121
3883 msgid ""
3884 "Using a nonzero B<M_CHECK_ACTION> value can be useful because otherwise a "
3885 "crash may happen much later, and the true cause of the problem is then very "
3886 "hard to track down."
3887 msgstr ""
3888
3889 #. type: TP
3890 #: build/C/man3/mallopt.3:121
3891 #, no-wrap
3892 msgid "B<M_MMAP_MAX>"
3893 msgstr "B<M_MMAP_MAX>"
3894
3895 #.  The following text adapted from comments in the glibc source:
3896 #. type: Plain text
3897 #: build/C/man3/mallopt.3:131
3898 msgid ""
3899 "This parameter specifies the maximum number of allocation requests that may "
3900 "be simultaneously serviced using B<mmap>(2).  This parameter exists because "
3901 "some systems have a limited number of internal tables for use by B<mmap>(2), "
3902 "and using more than a few of them may degrade performance."
3903 msgstr ""
3904
3905 #. type: Plain text
3906 #: build/C/man3/mallopt.3:138
3907 msgid ""
3908 "The default value is 65,536, a value which has no special significance and "
3909 "which servers only as a safeguard.  Setting this parameter to 0 disables the "
3910 "use of B<mmap>(2)  for servicing large allocation requests."
3911 msgstr ""
3912
3913 #. type: TP
3914 #: build/C/man3/mallopt.3:138
3915 #, no-wrap
3916 msgid "B<M_MMAP_THRESHOLD>"
3917 msgstr "B<M_MMAP_THRESHOLD>"
3918
3919 #. type: Plain text
3920 #: build/C/man3/mallopt.3:147
3921 msgid ""
3922 "For allocations greater than or equal to the limit specified (in bytes) by "
3923 "B<M_MMAP_THRESHOLD> that can't be satisfied from the free list, the memory-"
3924 "allocation functions employ B<mmap>(2)  instead of increasing the program "
3925 "break using B<sbrk>(2)."
3926 msgstr ""
3927
3928 #. type: Plain text
3929 #: build/C/man3/mallopt.3:167
3930 msgid ""
3931 "Allocating memory using B<mmap>(2)  has the significant advantage that the "
3932 "allocated memory blocks can always be independently released back to the "
3933 "system.  (By contrast, the heap can be trimmed only if memory is freed at "
3934 "the top end.)  On the other hand, there are some disadvantages to the use of "
3935 "B<mmap>(2): deallocated space is not placed on the free list for reuse by "
3936 "later allocations; memory may be wasted because B<mmap>(2)  allocations must "
3937 "be page-aligned; and the kernel must perform the expensive task of zeroing "
3938 "out memory allocated via B<mmap>(2).  Balancing these factors leads to a "
3939 "default setting of 128*1024 for the B<M_MMAP_THRESHOLD> parameter."
3940 msgstr ""
3941
3942 #. type: Plain text
3943 #: build/C/man3/mallopt.3:174
3944 msgid ""
3945 "The lower limit for this parameter is 0.  The upper limit is "
3946 "B<DEFAULT_MMAP_THRESHOLD_MAX>: 512*1024 on 32-bit systems or "
3947 "I<4*1024*1024*sizeof(long)> on 64-bit systems."
3948 msgstr ""
3949
3950 #. type: Plain text
3951 #: build/C/man3/mallopt.3:192
3952 msgid ""
3953 "I<Note:> Nowadays, glibc uses a dynamic mmap threshold by default.  The "
3954 "initial value of the threshold is 128*1024, but when blocks larger than the "
3955 "current threshold and less than or equal to B<DEFAULT_MMAP_THRESHOLD_MAX> "
3956 "are freed, the threshold is adjusted upward to the size of the freed block.  "
3957 "When dynamic mmap thresholding is in effect, the threshold for trimming the "
3958 "heap is also dynamically adjusted to be twice the dynamic mmap threshold.  "
3959 "Dynamic adjustment of the mmap threshold is disabled if any of the "
3960 "B<M_TRIM_THRESHOLD>, B<M_TOP_PAD>, B<M_MMAP_THRESHOLD>, or B<M_MMAP_MAX> "
3961 "parameters is set."
3962 msgstr ""
3963
3964 #. type: TP
3965 #: build/C/man3/mallopt.3:192
3966 #, no-wrap
3967 msgid "B<M_MXFAST> (since glibc 2.3)"
3968 msgstr "B<M_MXFAST> (glibc 2.3 以降)"
3969
3970 #.  The following text adapted from comments in the glibc sources:
3971 #. type: Plain text
3972 #: build/C/man3/mallopt.3:212
3973 msgid ""
3974 "Set the upper limit for memory allocation requests that are satisfied using "
3975 "\"fastbins\".  (The measurement unit for this parameter is bytes.)  Fastbins "
3976 "are storage areas that hold deallocated blocks of memory of the same size "
3977 "without merging adjacent free blocks.  Subsequent reallocation of blocks of "
3978 "the same size can be handled very quickly by allocating from the fastbin, "
3979 "although memory fragmentation and the overall memory footprint of the "
3980 "program can increase.  The default value for this parameter is "
3981 "I<64*sizeof(size_t)/4> (i.e., 64 on 32-bit architectures).  The range for "
3982 "this parameter is 0 to I<80*sizeof(size_t)/4>.  Setting B<M_MXFAST> to 0 "
3983 "disables the use of fastbins."
3984 msgstr ""
3985
3986 #. type: TP
3987 #: build/C/man3/mallopt.3:212
3988 #, no-wrap
3989 msgid "B<M_PERTURB> (since glibc 2.4)"
3990 msgstr "B<M_PERTURB> (glibc 2.4 以降)"
3991
3992 #. type: Plain text
3993 #: build/C/man3/mallopt.3:227
3994 msgid ""
3995 "If this parameter is set to a nonzero value, then bytes of allocated memory "
3996 "(other than allocations via B<calloc>(3))  are initialized to the complement "
3997 "of the value in the least significant byte of I<value>, and when allocated "
3998 "memory is released using B<free>(3), the freed bytes are set to the least "
3999 "significant byte of I<value>.  This can be useful for detecting errors where "
4000 "programs incorrectly rely on allocated memory being initialized to zero, or "
4001 "reuse values in memory that has already been freed."
4002 msgstr ""
4003
4004 #. type: TP
4005 #: build/C/man3/mallopt.3:227
4006 #, no-wrap
4007 msgid "B<M_TOP_PAD>"
4008 msgstr "B<M_TOP_PAD>"
4009
4010 #. type: Plain text
4011 #: build/C/man3/mallopt.3:234
4012 msgid ""
4013 "This parameter defines the amount of padding to employ when calling "
4014 "B<sbrk>(2)  to modify the program break.  (The measurement unit for this "
4015 "parameter is bytes.)  This parameter has an effect in the following "
4016 "circumstances:"
4017 msgstr ""
4018
4019 #. type: Plain text
4020 #: build/C/man3/mallopt.3:241
4021 msgid ""
4022 "When the program break is increased, then B<M_TOP_PAD> bytes are added to "
4023 "the B<sbrk>(2)  request."
4024 msgstr ""
4025
4026 #. type: Plain text
4027 #: build/C/man3/mallopt.3:247
4028 msgid ""
4029 "When the heap is trimmed as a consequence of calling B<free>(3)  (see the "
4030 "discussion of B<M_TRIM_THRESHOLD>)  this much free space is preserved at the "
4031 "top of the heap."
4032 msgstr ""
4033
4034 #. type: Plain text
4035 #: build/C/man3/mallopt.3:251
4036 msgid ""
4037 "In either case, the amount of padding is always rounded to a system page "
4038 "boundary."
4039 msgstr ""
4040
4041 #. type: Plain text
4042 #: build/C/man3/mallopt.3:258
4043 msgid ""
4044 "Modifying B<M_TOP_PAD> is a trade-off between increasing the number of "
4045 "system calls (when the parameter is set low)  and wasting unused memory at "
4046 "the top of the heap (when the parameter is set high)."
4047 msgstr ""
4048
4049 #.  DEFAULT_TOP_PAD in glibc source
4050 #. type: Plain text
4051 #: build/C/man3/mallopt.3:261
4052 msgid "The default value for this parameter is 128*1024."
4053 msgstr ""
4054
4055 #. type: TP
4056 #: build/C/man3/mallopt.3:261
4057 #, no-wrap
4058 msgid "B<M_TRIM_THRESHOLD>"
4059 msgstr "B<M_TRIM_THRESHOLD>"
4060
4061 #. type: Plain text
4062 #: build/C/man3/mallopt.3:277
4063 msgid ""
4064 "When the amount of contiguous free memory at the top of the heap grows "
4065 "sufficiently large, B<free>(3)  employs B<sbrk>(2)  to release this memory "
4066 "back to the system.  (This can be useful in programs that continue to "
4067 "execute for a long period after freeing a significant amount of memory.)  "
4068 "The B<M_TRIM_THRESHOLD> parameter specifies the minimum size (in bytes) that "
4069 "this block of memory must reach before B<sbrk>(2)  is used to trim the heap."
4070 msgstr ""
4071
4072 #. type: Plain text
4073 #: build/C/man3/mallopt.3:282
4074 msgid ""
4075 "The default value for this parameter is 128*1024.  Setting "
4076 "B<M_TRIM_THRESHOLD> to -1 disables trimming completely."
4077 msgstr ""
4078
4079 #
4080 #
4081 #
4082 #.  FIXME Do the arena parameters need to be documented?
4083 #.  .TP
4084 #.  .BR M_ARENA_TEST " (since glibc 2.10)"
4085 #.  .TP
4086 #.  .BR M_ARENA_MAX " (since glibc 2.10)"
4087 #.  Environment variables
4088 #.      MALLOC_ARENA_MAX_
4089 #.      MALLOC_ARENA_TEST_
4090 #.  http://udrepper.livejournal.com/20948.html describes some details
4091 #.      of the MALLOC_ARENA_* environment variables.
4092 #.  These macros aren't enabled in production releases until 2.15?
4093 #.  (see glibc malloc/Makefile)
4094 #. type: Plain text
4095 #: build/C/man3/mallopt.3:305
4096 msgid ""
4097 "Modifying B<M_TRIM_THRESHOLD> is a trade-off between increasing the number "
4098 "of system calls (when the parameter is set low)  and wasting unused memory "
4099 "at the top of the heap (when the parameter is set high)."
4100 msgstr ""
4101
4102 #. type: SS
4103 #: build/C/man3/mallopt.3:305
4104 #, no-wrap
4105 msgid "Environment variables"
4106 msgstr "環境変数"
4107
4108 #. type: Plain text
4109 #: build/C/man3/mallopt.3:320
4110 msgid ""
4111 "A number of environment variables can be defined to modify some of the same "
4112 "parameters as are controlled by B<mallopt>().  Using these variables has the "
4113 "advantage that the source code of the program need not be changed.  To be "
4114 "effective, these variables must be defined before the first call to a memory-"
4115 "allocation function.  (If the same parameters are adjusted via B<mallopt>(), "
4116 "then the B<mallopt>()  settings take precedence.)  For security reasons, "
4117 "these variables are ignored in set-user-ID and set-group-ID programs."
4118 msgstr ""
4119
4120 #. type: Plain text
4121 #: build/C/man3/mallopt.3:323
4122 msgid ""
4123 "The environment variables are as follows (note the trailing underscore at "
4124 "the end of the name of each variable):"
4125 msgstr ""
4126
4127 #. type: TP
4128 #: build/C/man3/mallopt.3:323
4129 #, no-wrap
4130 msgid "B<MALLOC_CHECK_>"
4131 msgstr "B<MALLOC_CHECK_>"
4132
4133 #.  On glibc 2.12/x86, a simple malloc()+free() loop is about 70% slower
4134 #.  when MALLOC_CHECK_ was set.
4135 #. type: Plain text
4136 #: build/C/man3/mallopt.3:340
4137 msgid ""
4138 "This environment variable controls the same parameter as B<mallopt>()  "
4139 "B<M_CHECK_ACTION>.  If this variable is set to a nonzero value, then a "
4140 "special implementation of the memory-allocation functions is used.  (This is "
4141 "accomplished using the B<malloc_hook>(3)  feature.)  This implementation "
4142 "performs additional error checking, but is slower than the standard set of "
4143 "memory-allocation functions.  (This implementation does not detect all "
4144 "possible errors; memory leaks can still occur.)"
4145 msgstr ""
4146
4147 #. type: Plain text
4148 #: build/C/man3/mallopt.3:345
4149 msgid ""
4150 "The value assigned to this environment variable should be a single digit, "
4151 "whose meaning is as described for B<M_CHECK_ACTION>.  Any characters beyond "
4152 "the initial digit are ignored."
4153 msgstr ""
4154
4155 #. type: Plain text
4156 #: build/C/man3/mallopt.3:354
4157 msgid ""
4158 "For security reasons, the effect of B<MALLOC_CHECK_> is disabled by default "
4159 "for set-user-ID and set-group-ID programs.  However, if the file I</etc/suid-"
4160 "debug> exists (the content of the file is irrelevant), then B<MALLOC_CHECK_> "
4161 "also has an effect for set-user-ID and set-group-ID programs."
4162 msgstr ""
4163
4164 #. type: TP
4165 #: build/C/man3/mallopt.3:354
4166 #, no-wrap
4167 msgid "B<MALLOC_MMAP_MAX_>"
4168 msgstr "B<MALLOC_MMAP_MAX_>"
4169
4170 #. type: Plain text
4171 #: build/C/man3/mallopt.3:359
4172 msgid "Controls the same parameter as B<mallopt>()  B<M_MMAP_MAX>."
4173 msgstr ""
4174
4175 #. type: TP
4176 #: build/C/man3/mallopt.3:359
4177 #, no-wrap
4178 msgid "B<MALLOC_MMAP_THRESHOLD_>"
4179 msgstr "B<MALLOC_MMAP_THRESHOLD_>"
4180
4181 #. type: Plain text
4182 #: build/C/man3/mallopt.3:364
4183 msgid "Controls the same parameter as B<mallopt>()  B<M_MMAP_THRESHOLD>."
4184 msgstr ""
4185
4186 #. type: TP
4187 #: build/C/man3/mallopt.3:364
4188 #, no-wrap
4189 msgid "B<MALLOC_PERTURB_>"
4190 msgstr "B<MALLOC_PERTURB_>"
4191
4192 #. type: Plain text
4193 #: build/C/man3/mallopt.3:369
4194 msgid "Controls the same parameter as B<mallopt>()  B<M_PERTURB>."
4195 msgstr ""
4196
4197 #. type: TP
4198 #: build/C/man3/mallopt.3:369
4199 #, no-wrap
4200 msgid "B<MALLOC_TRIM_THRESHOLD_>"
4201 msgstr "B<MALLOC_TRIM_THRESHOLD_>"
4202
4203 #. type: Plain text
4204 #: build/C/man3/mallopt.3:374
4205 msgid "Controls the same parameter as B<mallopt>()  B<M_TRIM_THRESHOLD>."
4206 msgstr ""
4207
4208 #. type: TP
4209 #: build/C/man3/mallopt.3:374
4210 #, no-wrap
4211 msgid "B<MALLOC_TOP_PAD_>"
4212 msgstr "B<MALLOC_TOP_PAD_>"
4213
4214 #. type: Plain text
4215 #: build/C/man3/mallopt.3:379
4216 msgid "Controls the same parameter as B<mallopt>()  B<M_TOP_PAD>."
4217 msgstr ""
4218
4219 #. type: Plain text
4220 #: build/C/man3/mallopt.3:384
4221 msgid "On success, B<mallopt>()  returns 1.  On error, it returns 0."
4222 msgstr "B<mallopt>()  は成功すると 1 を返す。エラーの場合は 0 を返す。"
4223
4224 #.  .SH VERSIONS
4225 #.  Available already in glibc 2.0, possibly earlier
4226 #. type: Plain text
4227 #: build/C/man3/mallopt.3:392
4228 msgid "On error, I<errno> is I<not> set."
4229 msgstr "エラーの場合、I<errno> は設定I<されない>。"
4230
4231 #.  .SH NOTES
4232 #. type: Plain text
4233 #: build/C/man3/mallopt.3:406
4234 msgid ""
4235 "This function is not specified by POSIX or the C standards.  A similar "
4236 "function exists on many System V derivatives, but the range of values for "
4237 "I<param> varies across systems.  The SVID defined options B<M_MXFAST>, "
4238 "B<M_NLBLKS>, B<M_GRAIN>, and B<M_KEEP>, but only the first of these is "
4239 "implemented in glibc."
4240 msgstr ""
4241
4242 #. type: Plain text
4243 #: build/C/man3/mallopt.3:410
4244 msgid "Specifying an invalid value for I<param> does not generate an error."
4245 msgstr ""
4246
4247 #.  FIXME This looks buggy:
4248 #.  setting the M_MXFAST limit rounds up:    (s + SIZE_SZ) & ~MALLOC_ALIGN_MASK)
4249 #.  malloc requests are rounded up:
4250 #.     (req) + SIZE_SZ + MALLOC_ALIGN_MASK) & ~MALLOC_ALIGN_MASK
4251 #.  http://sources.redhat.com/bugzilla/show_bug.cgi?id=12129
4252 #. type: Plain text
4253 #: build/C/man3/mallopt.3:418
4254 msgid ""
4255 "A calculation error within the glibc implementation means that a call of the "
4256 "form:"
4257 msgstr ""
4258
4259 #. type: Plain text
4260 #: build/C/man3/mallopt.3:421
4261 #, no-wrap
4262 msgid "    mallopt(M_MXFAST, n)\n"
4263 msgstr "    mallopt(M_MXFAST, n)\n"
4264
4265 #.  Bins are multiples of 2 * sizeof(size_t) + sizeof(size_t)
4266 #. type: Plain text
4267 #: build/C/man3/mallopt.3:433
4268 msgid ""
4269 "does not result in fastbins being employed for all allocations of size up to "
4270 "I<n>.  To ensure desired results, I<n> should be rounded up to the next "
4271 "multiple greater than or equal to I<(2k+1)*sizeof(size_t)>, where I<k> is an "
4272 "integer."
4273 msgstr ""
4274
4275 #.  FIXME MALLOC_MMAP_THRESHOLD_ and MALLOC_MMAP_MAX_
4276 #.  do have an effect for set-user-ID programs (but not
4277 #.  set-group-ID programs).
4278 #.  http://sources.redhat.com/bugzilla/show_bug.cgi?id=12155
4279 #. type: Plain text
4280 #: build/C/man3/mallopt.3:445
4281 msgid ""
4282 "The B<MALLOC_MMAP_THRESHOLD_> and B<MALLOC_MMAP_MAX_> variables are I<not> "
4283 "ignored in set-group-ID programs."
4284 msgstr ""
4285
4286 #.  FIXME http://sources.redhat.com/bugzilla/show_bug.cgi?id=12140
4287 #. type: Plain text
4288 #: build/C/man3/mallopt.3:466
4289 msgid ""
4290 "If B<mallopt>()  is used to set B<M_PERTURB>, then, as expected, the bytes "
4291 "of allocated memory are initialized to the complement of the byte in "
4292 "I<value>, and when that memory is freed, the bytes of the region are "
4293 "initialized to the byte specified in I<value>.  However, there is an off-by-"
4294 "I<sizeof(size_t)> error in the implementation: instead of initializing "
4295 "precisely the block of memory being freed by the call I<free(p)>, the block "
4296 "starting at I<p+sizeof(size_t)> is initialized."
4297 msgstr ""
4298
4299 #. type: Plain text
4300 #: build/C/man3/mallopt.3:475
4301 msgid ""
4302 "The program below demonstrates the use of B<M_CHECK_ACTION>.  If the program "
4303 "is supplied with an (integer) command-line argument, then that argument is "
4304 "used to set the B<M_CHECK_ACTION> parameter.  The program then allocates a "
4305 "block of memory, and frees it twice (an error)."
4306 msgstr ""
4307
4308 #. type: Plain text
4309 #: build/C/man3/mallopt.3:479
4310 msgid ""
4311 "The following shell session shows what happens when we run this program "
4312 "under glibc, with the default value for B<M_CHECK_ACTION>:"
4313 msgstr ""
4314
4315 #. type: Plain text
4316 #: build/C/man3/mallopt.3:499
4317 #, no-wrap
4318 msgid ""
4319 "$ B<./a.out>\n"
4320 "main(): returned from first free() call\n"
4321 "*** glibc detected *** ./a.out: double free or corruption (top): 0x09d30008 ***\n"
4322 "======= Backtrace: =========\n"
4323 "/lib/libc.so.6(+0x6c501)[0x523501]\n"
4324 "/lib/libc.so.6(+0x6dd70)[0x524d70]\n"
4325 "/lib/libc.so.6(cfree+0x6d)[0x527e5d]\n"
4326 "\\&./a.out[0x80485db]\n"
4327 "/lib/libc.so.6(__libc_start_main+0xe7)[0x4cdce7]\n"
4328 "\\&./a.out[0x8048471]\n"
4329 "======= Memory map: ========\n"
4330 "001e4000-001fe000 r-xp 00000000 08:06 1083555    /lib/libgcc_s.so.1\n"
4331 "001fe000-001ff000 r--p 00019000 08:06 1083555    /lib/libgcc_s.so.1\n"
4332 "[some lines omitted]\n"
4333 "b7814000-b7817000 rw-p 00000000 00:00 0\n"
4334 "bff53000-bff74000 rw-p 00000000 00:00 0          [stack]\n"
4335 "Aborted (core dumped)\n"
4336 msgstr ""
4337 "$ B<./a.out>\n"
4338 "main(): returned from first free() call\n"
4339 "*** glibc detected *** ./a.out: double free or corruption (top): 0x09d30008 ***\n"
4340 "======= Backtrace: =========\n"
4341 "/lib/libc.so.6(+0x6c501)[0x523501]\n"
4342 "/lib/libc.so.6(+0x6dd70)[0x524d70]\n"
4343 "/lib/libc.so.6(cfree+0x6d)[0x527e5d]\n"
4344 "\\&./a.out[0x80485db]\n"
4345 "/lib/libc.so.6(__libc_start_main+0xe7)[0x4cdce7]\n"
4346 "\\&./a.out[0x8048471]\n"
4347 "======= Memory map: ========\n"
4348 "001e4000-001fe000 r-xp 00000000 08:06 1083555    /lib/libgcc_s.so.1\n"
4349 "001fe000-001ff000 r--p 00019000 08:06 1083555    /lib/libgcc_s.so.1\n"
4350 "[some lines omitted]\n"
4351 "b7814000-b7817000 rw-p 00000000 00:00 0\n"
4352 "bff53000-bff74000 rw-p 00000000 00:00 0          [stack]\n"
4353 "Aborted (core dumped)\n"
4354
4355 #. type: Plain text
4356 #: build/C/man3/mallopt.3:504
4357 msgid ""
4358 "The following runs show the results when employing other values for "
4359 "B<M_CHECK_ACTION>:"
4360 msgstr ""
4361
4362 #. type: Plain text
4363 #: build/C/man3/mallopt.3:517
4364 #, no-wrap
4365 msgid ""
4366 "$ B<./a.out 1>             # Diagnose error and continue\n"
4367 "main(): returned from first free() call\n"
4368 "*** glibc detected *** ./a.out: double free or corruption (top): 0x09cbe008 ***\n"
4369 "main(): returned from second free() call\n"
4370 "$ B<./a.out 2>             # Abort without error message\n"
4371 "main(): returned from first free() call\n"
4372 "Aborted (core dumped)\n"
4373 "$ B<./a.out 0>             # Ignore error and continue\n"
4374 "main(): returned from first free() call\n"
4375 "main(): returned from second free() call\n"
4376 msgstr ""
4377 "$ B<./a.out 1>             # Diagnose error and continue\n"
4378 "main(): returned from first free() call\n"
4379 "*** glibc detected *** ./a.out: double free or corruption (top): 0x09cbe008 ***\n"
4380 "main(): returned from second free() call\n"
4381 "$ B<./a.out 2>             # Abort without error message\n"
4382 "main(): returned from first free() call\n"
4383 "Aborted (core dumped)\n"
4384 "$ B<./a.out 0>             # Ignore error and continue\n"
4385 "main(): returned from first free() call\n"
4386 "main(): returned from second free() call\n"
4387
4388 #. type: Plain text
4389 #: build/C/man3/mallopt.3:523
4390 msgid ""
4391 "The next run shows how to set the same parameter using the B<MALLOC_CHECK_> "
4392 "environment variable:"
4393 msgstr ""
4394
4395 #. type: Plain text
4396 #: build/C/man3/mallopt.3:530
4397 #, no-wrap
4398 msgid ""
4399 "$ B<MALLOC_CHECK_=1 ./a.out>\n"
4400 "main(): returned from first free() call\n"
4401 "*** glibc detected *** ./a.out: free(): invalid pointer: 0x092c2008 ***\n"
4402 "main(): returned from second free() call\n"
4403 msgstr ""
4404 "$ B<MALLOC_CHECK_=1 ./a.out>\n"
4405 "main(): returned from first free() call\n"
4406 "*** glibc detected *** ./a.out: free(): invalid pointer: 0x092c2008 ***\n"
4407 "main(): returned from second free() call\n"
4408
4409 #. type: Plain text
4410 #: build/C/man3/mallopt.3:538
4411 #, no-wrap
4412 msgid ""
4413 "#include E<lt>malloc.hE<gt>\n"
4414 "#include E<lt>stdio.hE<gt>\n"
4415 "#include E<lt>stdlib.hE<gt>\n"
4416 msgstr ""
4417 "#include E<lt>malloc.hE<gt>\n"
4418 "#include E<lt>stdio.hE<gt>\n"
4419 "#include E<lt>stdlib.hE<gt>\n"
4420
4421 #. type: Plain text
4422 #: build/C/man3/mallopt.3:543 build/C/man3/mcheck.3:187
4423 #, no-wrap
4424 msgid ""
4425 "int\n"
4426 "main(int argc, char *argv[])\n"
4427 "{\n"
4428 "    char *p;\n"
4429 msgstr ""
4430 "int\n"
4431 "main(int argc, char *argv[])\n"
4432 "{\n"
4433 "    char *p;\n"
4434
4435 #. type: Plain text
4436 #: build/C/man3/mallopt.3:550
4437 #, no-wrap
4438 msgid ""
4439 "    if (argc E<gt> 1) {\n"
4440 "        if (mallopt(M_CHECK_ACTION, atoi(argv[1])) != 1) {\n"
4441 "            fprintf(stderr, \"mallopt() failed\");\n"
4442 "            exit(EXIT_FAILURE);\n"
4443 "        }\n"
4444 "    }\n"
4445 msgstr ""
4446 "    if (argc E<gt> 1) {\n"
4447 "        if (mallopt(M_CHECK_ACTION, atoi(argv[1])) != 1) {\n"
4448 "            fprintf(stderr, \"mallopt() failed\");\n"
4449 "            exit(EXIT_FAILURE);\n"
4450 "        }\n"
4451 "    }\n"
4452
4453 #. type: Plain text
4454 #: build/C/man3/mallopt.3:556
4455 #, no-wrap
4456 msgid ""
4457 "    p = malloc(1000);\n"
4458 "    if (p == NULL) {\n"
4459 "        fprintf(stderr, \"malloc() failed\");\n"
4460 "        exit(EXIT_FAILURE);\n"
4461 "    }\n"
4462 msgstr ""
4463 "    p = malloc(1000);\n"
4464 "    if (p == NULL) {\n"
4465 "        fprintf(stderr, \"malloc() failed\");\n"
4466 "        exit(EXIT_FAILURE);\n"
4467 "    }\n"
4468
4469 #. type: Plain text
4470 #: build/C/man3/mallopt.3:559
4471 #, no-wrap
4472 msgid ""
4473 "    free(p);\n"
4474 "    printf(\"main(): returned from first free() call\\en\");\n"
4475 msgstr ""
4476 "    free(p);\n"
4477 "    printf(\"main(): returned from first free() call\\en\");\n"
4478
4479 #. type: Plain text
4480 #: build/C/man3/mallopt.3:562
4481 #, no-wrap
4482 msgid ""
4483 "    free(p);\n"
4484 "    printf(\"main(): returned from second free() call\\en\");\n"
4485 msgstr ""
4486 "    free(p);\n"
4487 "    printf(\"main(): returned from second free() call\\en\");\n"
4488
4489 #. type: Plain text
4490 #: build/C/man3/mallopt.3:580
4491 msgid ""
4492 "B<mmap>(2), B<sbrk>(2), B<mallinfo>(3), B<malloc>(3), B<malloc_hook>(3), "
4493 "B<malloc_info>(3), B<malloc_stats>(3), B<malloc_trim>(3), B<mcheck>(3), "
4494 "B<mtrace>(3), B<posix_memalign>(3)"
4495 msgstr ""
4496 "B<mmap>(2), B<sbrk>(2), B<mallinfo>(3), B<malloc>(3), B<malloc_hook>(3), "
4497 "B<malloc_info>(3), B<malloc_stats>(3), B<malloc_trim>(3), B<mcheck>(3), "
4498 "B<mtrace>(3), B<posix_memalign>(3)"
4499
4500 #. type: TH
4501 #: build/C/man3/mcheck.3:25
4502 #, no-wrap
4503 msgid "MCHECK"
4504 msgstr "MCHECK"
4505
4506 #. type: TH
4507 #: build/C/man3/mcheck.3:25
4508 #, no-wrap
4509 msgid "2014-01-11"
4510 msgstr "2014-01-11"
4511
4512 #. type: Plain text
4513 #: build/C/man3/mcheck.3:28
4514 msgid ""
4515 "mcheck, mcheck_check_all, mcheck_pedantic, mprobe - heap consistency checking"
4516 msgstr ""
4517
4518 #. type: Plain text
4519 #: build/C/man3/mcheck.3:31
4520 #, no-wrap
4521 msgid "B<#include E<lt>mcheck.hE<gt>>\n"
4522 msgstr "B<#include E<lt>mcheck.hE<gt>>\n"
4523
4524 #. type: Plain text
4525 #: build/C/man3/mcheck.3:33
4526 #, no-wrap
4527 msgid "B<int mcheck(void (*>I<abortfunc>B<)(enum mcheck_status >I<mstatus>B<));>\n"
4528 msgstr ""
4529
4530 #. type: Plain text
4531 #: build/C/man3/mcheck.3:35
4532 #, no-wrap
4533 msgid "B<int mcheck_pedantic(void (*>I<abortfunc>B<)(enum mcheck_status >I<mstatus>B<));>\n"
4534 msgstr ""
4535
4536 #. type: Plain text
4537 #: build/C/man3/mcheck.3:37
4538 #, no-wrap
4539 msgid "B<void mcheck_check_all(void);>\n"
4540 msgstr "B<void mcheck_check_all(void);>\n"
4541
4542 #. type: Plain text
4543 #: build/C/man3/mcheck.3:39
4544 #, no-wrap
4545 msgid "B<enum mcheck_status mprobe(void *>I<ptr>B<);>\n"
4546 msgstr "B<enum mcheck_status mprobe(void *>I<ptr>B<);>\n"
4547
4548 #. type: Plain text
4549 #: build/C/man3/mcheck.3:51
4550 msgid ""
4551 "The B<mcheck>()  function installs a set of debugging hooks for the "
4552 "B<malloc>(3)  family of memory-allocation functions.  These hooks cause "
4553 "certain consistency checks to be performed on the state of the heap.  The "
4554 "checks can detect application errors such as freeing a block of memory more "
4555 "than once or corrupting the bookkeeping data structures that immediately "
4556 "precede a block of allocated memory."
4557 msgstr ""
4558
4559 #. type: Plain text
4560 #: build/C/man3/mcheck.3:63
4561 msgid ""
4562 "To be effective, the B<mcheck>()  function must be called before the first "
4563 "call to B<malloc>(3)  or a related function.  In cases where this is "
4564 "difficult to ensure, linking the program with I<-lmcheck> inserts an "
4565 "implicit call to B<mcheck>()  (with a NULL argument)  before the first call "
4566 "to a memory-allocation function."
4567 msgstr ""
4568
4569 #. type: Plain text
4570 #: build/C/man3/mcheck.3:71
4571 msgid ""
4572 "The B<mcheck_pedantic>()  function is similar to B<mcheck>(), but performs "
4573 "checks on all allocated blocks whenever one of the memory-allocation "
4574 "functions is called.  This can be very slow!"
4575 msgstr ""
4576
4577 #. type: Plain text
4578 #: build/C/man3/mcheck.3:78
4579 msgid ""
4580 "The B<mcheck_check_all>()  function causes an immediate check on all "
4581 "allocated blocks.  This call is effective only if B<mcheck>()  is called "
4582 "beforehand."
4583 msgstr ""
4584
4585 #. type: Plain text
4586 #: build/C/man3/mcheck.3:91
4587 msgid ""
4588 "If the system detects an inconsistency in the heap, the caller-supplied "
4589 "function pointed to by I<abortfunc> is invoked with a single argument "
4590 "argument, I<mstatus>, that indicates what type of inconsistency was "
4591 "detected.  If I<abortfunc> is NULL, a default function prints an error "
4592 "message on I<stderr> and calls B<abort>(3)."
4593 msgstr ""
4594
4595 #. type: Plain text
4596 #: build/C/man3/mcheck.3:103
4597 msgid ""
4598 "The B<mprobe>()  function performs a consistency check on the block of "
4599 "allocated memory pointed to by I<ptr>.  The B<mcheck>()  function should be "
4600 "called beforehand (otherwise B<mprobe>()  returns B<MCHECK_DISABLED>)."
4601 msgstr ""
4602
4603 #. type: Plain text
4604 #: build/C/man3/mcheck.3:111
4605 msgid ""
4606 "The following list describes the values returned by B<mprobe>()  or passed "
4607 "as the I<mstatus> argument when I<abortfunc> is invoked:"
4608 msgstr ""
4609
4610 #. type: TP
4611 #: build/C/man3/mcheck.3:111
4612 #, no-wrap
4613 msgid "B<MCHECK_DISABLED> (B<mprobe>() only)"
4614 msgstr ""
4615
4616 #. type: Plain text
4617 #: build/C/man3/mcheck.3:116
4618 msgid ""
4619 "B<mcheck>()  was not called before the first memory allocation function was "
4620 "called.  Consistency checking is not possible."
4621 msgstr ""
4622
4623 #. type: TP
4624 #: build/C/man3/mcheck.3:116
4625 #, no-wrap
4626 msgid "B<MCHECK_OK> (B<mprobe>() only)"
4627 msgstr ""
4628
4629 #. type: Plain text
4630 #: build/C/man3/mcheck.3:119
4631 msgid "No inconsistency detected."
4632 msgstr ""
4633
4634 #. type: TP
4635 #: build/C/man3/mcheck.3:119
4636 #, no-wrap
4637 msgid "B<MCHECK_HEAD>"
4638 msgstr "B<MCHECK_HEAD>"
4639
4640 #. type: Plain text
4641 #: build/C/man3/mcheck.3:122
4642 msgid "Memory preceding an allocated block was clobbered."
4643 msgstr ""
4644
4645 #. type: TP
4646 #: build/C/man3/mcheck.3:122
4647 #, no-wrap
4648 msgid "B<MCHECK_TAIL>"
4649 msgstr "B<MCHECK_TAIL>"
4650
4651 #. type: Plain text
4652 #: build/C/man3/mcheck.3:125
4653 msgid "Memory following an allocated block was clobbered."
4654 msgstr ""
4655
4656 #. type: TP
4657 #: build/C/man3/mcheck.3:125
4658 #, no-wrap
4659 msgid "B<MCHECK_FREE>"
4660 msgstr "B<MCHECK_FREE>"
4661
4662 #. type: Plain text
4663 #: build/C/man3/mcheck.3:129
4664 msgid "A block of memory was freed twice."
4665 msgstr ""
4666
4667 #. type: Plain text
4668 #: build/C/man3/mcheck.3:134
4669 msgid ""
4670 "B<mcheck>()  and B<mcheck_pedantic>()  return 0 on success, or -1 on error."
4671 msgstr ""
4672
4673 #. type: Plain text
4674 #: build/C/man3/mcheck.3:145
4675 msgid ""
4676 "The B<mcheck_pedantic>()  and B<mcheck_check_all>()  functions are available "
4677 "since glibc 2.2.  The B<mcheck>()  and B<mprobe>()  functions are present "
4678 "since at least glibc 2.0"
4679 msgstr ""
4680
4681 #.  But is MALLOC_CHECK_ slower?
4682 #. type: Plain text
4683 #: build/C/man3/mcheck.3:159
4684 msgid ""
4685 "Linking a program with I<-lmcheck> and using the B<MALLOC_CHECK_> "
4686 "environment variable (described in B<mallopt>(3))  cause the same kinds of "
4687 "errors to be detected.  But, using B<MALLOC_CHECK_> does not require the "
4688 "application to be relinked."
4689 msgstr ""
4690
4691 #. type: Plain text
4692 #: build/C/man3/mcheck.3:165
4693 msgid ""
4694 "The program below calls B<mcheck>()  with a NULL argument and then frees the "
4695 "same block of memory twice.  The following shell session demonstrates what "
4696 "happens when running the program:"
4697 msgstr ""
4698
4699 #. type: Plain text
4700 #: build/C/man3/mcheck.3:170
4701 #, no-wrap
4702 msgid ""
4703 "$B< ./a.out>\n"
4704 "About to free\n"
4705 msgstr ""
4706
4707 #. type: Plain text
4708 #: build/C/man3/mcheck.3:174
4709 #, no-wrap
4710 msgid ""
4711 "About to free a second time\n"
4712 "block freed twice\n"
4713 "Aborted (core dumped)\n"
4714 msgstr ""
4715
4716 #. type: Plain text
4717 #: build/C/man3/mcheck.3:182
4718 #, no-wrap
4719 msgid ""
4720 "#include E<lt>stdlib.hE<gt>\n"
4721 "#include E<lt>stdio.hE<gt>\n"
4722 "#include E<lt>mcheck.hE<gt>\n"
4723 msgstr ""
4724 "#include E<lt>stdlib.hE<gt>\n"
4725 "#include E<lt>stdio.hE<gt>\n"
4726 "#include E<lt>mcheck.hE<gt>\n"
4727
4728 #. type: Plain text
4729 #: build/C/man3/mcheck.3:190
4730 #, no-wrap
4731 msgid ""
4732 "    if (mcheck(NULL) != 0) {\n"
4733 "        fprintf(stderr, \"mcheck() failed\\en\");\n"
4734 msgstr ""
4735
4736 #. type: Plain text
4737 #: build/C/man3/mcheck.3:193
4738 #, no-wrap
4739 msgid ""
4740 "        exit(EXIT_FAILURE);\n"
4741 "    }\n"
4742 msgstr ""
4743 "        exit(EXIT_FAILURE);\n"
4744 "    }\n"
4745
4746 #. type: Plain text
4747 #: build/C/man3/mcheck.3:195
4748 #, no-wrap
4749 msgid "    p = malloc(1000);\n"
4750 msgstr "    p = malloc(1000);\n"
4751
4752 #. type: Plain text
4753 #: build/C/man3/mcheck.3:200
4754 #, no-wrap
4755 msgid ""
4756 "    fprintf(stderr, \"About to free\\en\");\n"
4757 "    free(p);\n"
4758 "    fprintf(stderr, \"\\enAbout to free a second time\\en\");\n"
4759 "    free(p);\n"
4760 msgstr ""
4761
4762 #. type: Plain text
4763 #: build/C/man3/mcheck.3:208
4764 msgid "B<malloc>(3), B<mallopt>(3), B<mtrace>(3)"
4765 msgstr "B<malloc>(3), B<mallopt>(3), B<mtrace>(3)"
4766
4767 #. type: TH
4768 #: build/C/man2/mlock.2:26
4769 #, no-wrap
4770 msgid "MLOCK"
4771 msgstr "MLOCK"
4772
4773 #. type: TH
4774 #: build/C/man2/mlock.2:26
4775 #, no-wrap
4776 msgid "2014-04-14"
4777 msgstr "2014-04-14"
4778
4779 #. type: Plain text
4780 #: build/C/man2/mlock.2:29
4781 msgid "mlock, munlock, mlockall, munlockall - lock and unlock memory"
4782 msgstr "mlock - メモリのロックとロック解除を行う"
4783
4784 #. type: Plain text
4785 #: build/C/man2/mlock.2:32 build/C/man2/mmap.2:46 build/C/man2/mmap2.2:35
4786 #: build/C/man2/mprotect.2:44 build/C/man2/mremap.2:38
4787 #, no-wrap
4788 msgid "B<#include E<lt>sys/mman.hE<gt>>\n"
4789 msgstr "B<#include E<lt>sys/mman.hE<gt>>\n"
4790
4791 #. type: Plain text
4792 #: build/C/man2/mlock.2:35
4793 #, no-wrap
4794 msgid ""
4795 "B<int mlock(const void *>I<addr>B<, size_t >I<len>B<);>\n"
4796 "B<int munlock(const void *>I<addr>B<, size_t >I<len>B<);>\n"
4797 msgstr ""
4798 "B<int mlock(const void *>I<addr>B<, size_t >I<len>B<);>\n"
4799 "B<int munlock(const void *>I<addr>B<, size_t >I<len>B<);>\n"
4800
4801 #. type: Plain text
4802 #: build/C/man2/mlock.2:38
4803 #, no-wrap
4804 msgid ""
4805 "B<int mlockall(int >I<flags>B<);>\n"
4806 "B<int munlockall(void);>\n"
4807 msgstr ""
4808 "B<int mlockall(int >I<flags>B<);>\n"
4809 "B<int munlockall(void);>\n"
4810
4811 #. type: Plain text
4812 #: build/C/man2/mlock.2:54
4813 msgid ""
4814 "B<mlock>()  and B<mlockall>()  respectively lock part or all of the calling "
4815 "process's virtual address space into RAM, preventing that memory from being "
4816 "paged to the swap area.  B<munlock>()  and B<munlockall>()  perform the "
4817 "converse operation, respectively unlocking part or all of the calling "
4818 "process's virtual address space, so that pages in the specified virtual "
4819 "address range may once more to be swapped out if required by the kernel "
4820 "memory manager.  Memory locking and unlocking are performed in units of "
4821 "whole pages."
4822 msgstr ""
4823 "B<mlock>()  と B<mlockall>()  はそれぞれ、呼び出し元プロセスの仮想アドレス空"
4824 "間の一部または全部を RAM 上にロックし、メモリがスワップエリアにページングされ"
4825 "るのを防ぐ。 B<munlock>()  と B<munlockall>()  は逆の操作で、それぞれ呼び出し"
4826 "元プロセスの仮想アドレス空間の一部または全部を ロック解除する。つまり、指定さ"
4827 "れた仮想アドレス範囲のページは カーネルメモリマネージャーから要求されればス"
4828 "ワップアウトするようになる。 メモリのロックとロック解除はページ単位で行われ"
4829 "る。"
4830
4831 #. type: SS
4832 #: build/C/man2/mlock.2:54
4833 #, no-wrap
4834 msgid "mlock() and munlock()"
4835 msgstr "mlock() と munlock()"
4836
4837 #. type: Plain text
4838 #: build/C/man2/mlock.2:64
4839 msgid ""
4840 "B<mlock>()  locks pages in the address range starting at I<addr> and "
4841 "continuing for I<len> bytes.  All pages that contain a part of the specified "
4842 "address range are guaranteed to be resident in RAM when the call returns "
4843 "successfully; the pages are guaranteed to stay in RAM until later unlocked."
4844 msgstr ""
4845 "B<mlock>()  は I<addr> から始まる長さ I<len> バイトのアドレス範囲のページを"
4846 "ロックする。 呼び出しが成功した場合には、 指定されたアドレス範囲を含む全ての"
4847 "ページは RAM に残り続けることが保証される。 これらのページは後でロック解除さ"
4848 "れるまで RAM に残り続けることが保証される。"
4849
4850 #. type: Plain text
4851 #: build/C/man2/mlock.2:73
4852 msgid ""
4853 "B<munlock>()  unlocks pages in the address range starting at I<addr> and "
4854 "continuing for I<len> bytes.  After this call, all pages that contain a part "
4855 "of the specified memory range can be moved to external swap space again by "
4856 "the kernel."
4857 msgstr ""
4858 "B<munlock>()  は、 I<addr> から始まる長さ I<len> バイトのアドレス範囲のページ"
4859 "のロックを解除する。 この呼び出しを行った後は、カーネルが、指定されたメモリ範"
4860 "囲を含む 全てのページを外部のスワップ空間に移動できるようになる。"
4861
4862 #. type: SS
4863 #: build/C/man2/mlock.2:73
4864 #, no-wrap
4865 msgid "mlockall() and munlockall()"
4866 msgstr "mlockall() と munlockall()"
4867
4868 #. type: Plain text
4869 #: build/C/man2/mlock.2:83
4870 msgid ""
4871 "B<mlockall>()  locks all pages mapped into the address space of the calling "
4872 "process.  This includes the pages of the code, data and stack segment, as "
4873 "well as shared libraries, user space kernel data, shared memory, and memory-"
4874 "mapped files.  All mapped pages are guaranteed to be resident in RAM when "
4875 "the call returns successfully; the pages are guaranteed to stay in RAM until "
4876 "later unlocked."
4877 msgstr ""
4878 "B<mlockall>()  は呼び出し元プロセスのアドレス空間にマップされている全てのペー"
4879 "ジを ロックする。これにはコード、データ、スタックの 各セグメント、共有ライブ"
4880 "ラリ、カーネルのユーザー空間データ、 共有メモリ、メモリ・マップされたファイル"
4881 "が含まれる。 システム・コールが成功した場合には全てのマップされたページは "
4882 "RAM に 残ることを保証される。 これらのページは後でロック解除されるまで RAM に"
4883 "残り続けることが保証される。"
4884
4885 #. type: Plain text
4886 #: build/C/man2/mlock.2:88
4887 msgid ""
4888 "The I<flags> argument is constructed as the bitwise OR of one or more of the "
4889 "following constants:"
4890 msgstr "I<flags> 引数は以下の内容の一つまたは複数のビット OR から構成される:"
4891
4892 #. type: TP
4893 #: build/C/man2/mlock.2:88
4894 #, no-wrap
4895 msgid "B<MCL_CURRENT>"
4896 msgstr "B<MCL_CURRENT>"
4897
4898 #. type: Plain text
4899 #: build/C/man2/mlock.2:92
4900 msgid ""
4901 "Lock all pages which are currently mapped into the address space of the "
4902 "process."
4903 msgstr ""
4904 "現在、プロセスのアドレス空間にマップされている全てのページをロックする。"
4905
4906 #. type: TP
4907 #: build/C/man2/mlock.2:92
4908 #, no-wrap
4909 msgid "B<MCL_FUTURE>"
4910 msgstr "B<MCL_FUTURE>"
4911
4912 #. type: Plain text
4913 #: build/C/man2/mlock.2:99
4914 msgid ""
4915 "Lock all pages which will become mapped into the address space of the "
4916 "process in the future.  These could be for instance new pages required by a "
4917 "growing heap and stack as well as new memory-mapped files or shared memory "
4918 "regions."
4919 msgstr ""
4920 "将来、プロセスのアドレス空間にマップされる全てのページをロックする。 例えば、"
4921 "ヒープ (heap) やスタックの成長により新しく必要になったページだけで なく、新し"
4922 "くメモリマップされたファイルや共有メモリ領域もロックされる。"
4923
4924 #. type: Plain text
4925 #: build/C/man2/mlock.2:112
4926 msgid ""
4927 "If B<MCL_FUTURE> has been specified, then a later system call (e.g., "
4928 "B<mmap>(2), B<sbrk>(2), B<malloc>(3)), may fail if it would cause the number "
4929 "of locked bytes to exceed the permitted maximum (see below).  In the same "
4930 "circumstances, stack growth may likewise fail: the kernel will deny stack "
4931 "expansion and deliver a B<SIGSEGV> signal to the process."
4932 msgstr ""
4933 "B<MCL_FUTURE> が指定されていると、以後のシステムコール (例えば、 B<mmap>(2), "
4934 "B<sbrk>(2), B<malloc>(3))  は、ロックするバイト数が許可された最大値 (下記参"
4935 "照) を超えた場合に 失敗する可能性がある。 同様に、スタックの成長も失敗する可"
4936 "能性がある。 その場合、カーネルはスタックの拡張を拒否し、 B<SIGSEGV> をプロセ"
4937 "スに送る。"
4938
4939 #. type: Plain text
4940 #: build/C/man2/mlock.2:116
4941 msgid ""
4942 "B<munlockall>()  unlocks all pages mapped into the address space of the "
4943 "calling process."
4944 msgstr ""
4945 "B<munlockall>()  は、呼び出し元プロセスのアドレス空間にマッピングされている "
4946 "全てのページをロック解除する。"
4947
4948 #. type: Plain text
4949 #: build/C/man2/mlock.2:122
4950 msgid ""
4951 "On success these system calls return 0.  On error, -1 is returned, I<errno> "
4952 "is set appropriately, and no changes are made to any locks in the address "
4953 "space of the process."
4954 msgstr ""
4955 "成功した場合は、これらのシステムコールはゼロを返す。 エラーの場合は -1 が返さ"
4956 "れ、 I<errno> が適切に設定され、プロセスのアドレス空間におけるロックは変更さ"
4957 "れない。"
4958
4959 #. type: Plain text
4960 #: build/C/man2/mlock.2:131
4961 msgid ""
4962 "(Linux 2.6.9 and later) the caller had a nonzero B<RLIMIT_MEMLOCK> soft "
4963 "resource limit, but tried to lock more memory than the limit permitted.  "
4964 "This limit is not enforced if the process is privileged (B<CAP_IPC_LOCK>)."
4965 msgstr ""
4966 "(Linux 2.6.9 以降) 呼び出し元は非ゼロの ソフト資源制限 B<RLIMIT_MEMLOCK> を持"
4967 "つが、制限が許可している以上のメモリをロックしようとした。 この制限は、プロセ"
4968 "スが特権 (B<CAP_IPC_LOCK>)  を持っている場合は適用されない。"
4969
4970 #.  In the case of mlock(), this check is somewhat buggy: it doesn't
4971 #.  take into account whether the to-be-locked range overlaps with
4972 #.  already locked pages.  Thus, suppose we allocate
4973 #.  (num_physpages / 4 + 1) of memory, and lock those pages once using
4974 #.  mlock(), and then lock the *same* page range a second time.
4975 #.  In the case, the second mlock() call will fail, since the check
4976 #.  calculates that the process is trying to lock (num_physpages / 2 + 2)
4977 #.  pages, which of course is not true.  (MTK, Nov 04, kernel 2.4.28)
4978 #. type: Plain text
4979 #: build/C/man2/mlock.2:143
4980 msgid ""
4981 "(Linux 2.4 and earlier) the calling process tried to lock more than half of "
4982 "RAM."
4983 msgstr ""
4984 "(Linux 2.4 以前) 呼び出し元プロセスが RAM の半分以上をロックしようとした。"
4985
4986 #. SVr4 documents an additional EAGAIN error code.
4987 #. type: Plain text
4988 #: build/C/man2/mlock.2:149
4989 msgid ""
4990 "The caller is not privileged, but needs privilege (B<CAP_IPC_LOCK>)  to "
4991 "perform the requested operation."
4992 msgstr ""
4993 "呼び出し側が特権を持っていないが、\n"
4994 "要求された操作を実行するには特権 (B<CAP_IPC_LOCK>) が必要である。"
4995
4996 #. type: Plain text
4997 #: build/C/man2/mlock.2:154
4998 msgid "For B<mlock>()  and B<munlock>():"
4999 msgstr "B<mlock>()  と B<munlock>()  用として:"
5000
5001 #. type: Plain text
5002 #: build/C/man2/mlock.2:157
5003 msgid "Some or all of the specified address range could not be locked."
5004 msgstr "指定されたアドレス範囲の一部または全てをロックすることができなかった。"
5005
5006 #. type: Plain text
5007 #: build/C/man2/mlock.2:164
5008 msgid ""
5009 "The result of the addition I<start>+I<len> was less than I<start> (e.g., the "
5010 "addition may have resulted in an overflow)."
5011 msgstr ""
5012 "I<start>+I<len> の加算の結果が I<start> よりも小さかった\n"
5013 "(例えば、加算でオーバーフローが発生したなど)。"
5014
5015 #. type: Plain text
5016 #: build/C/man2/mlock.2:169
5017 msgid "(Not on Linux)  I<addr> was not a multiple of the page size."
5018 msgstr ""
5019 "(Linux ではこの意味で使われない)  I<addr> がページサイズの倍数ではない。"
5020
5021 #. type: Plain text
5022 #: build/C/man2/mlock.2:173
5023 msgid ""
5024 "Some of the specified address range does not correspond to mapped pages in "
5025 "the address space of the process."
5026 msgstr ""
5027 "指定されたアドレス範囲がプロセスのアドレス空間にマップされたページと 一致しな"
5028 "い。"
5029
5030 #. type: Plain text
5031 #: build/C/man2/mlock.2:176
5032 msgid "For B<mlockall>():"
5033 msgstr "B<mlockall>()  用として:"
5034
5035 #. type: Plain text
5036 #: build/C/man2/mlock.2:179
5037 msgid "Unknown I<flags> were specified."
5038 msgstr "未知の I<flags> が指定された。"
5039
5040 #. type: Plain text
5041 #: build/C/man2/mlock.2:182
5042 msgid "For B<munlockall>():"
5043 msgstr "B<munlockall>()  用として:"
5044
5045 #. type: Plain text
5046 #: build/C/man2/mlock.2:186
5047 msgid ""
5048 "(Linux 2.6.8 and earlier) The caller was not privileged (B<CAP_IPC_LOCK>)."
5049 msgstr ""
5050 "(Linux 2.6.8 以前) 呼び出し元が権限 (B<CAP_IPC_LOCK>)  を持っていない。"
5051
5052 #. type: Plain text
5053 #: build/C/man2/mlock.2:188
5054 msgid "POSIX.1-2001, SVr4."
5055 msgstr "POSIX.1-2001, SVr4."
5056
5057 #. type: SH
5058 #: build/C/man2/mlock.2:188 build/C/man2/mmap.2:499 build/C/man2/msync.2:105
5059 #, no-wrap
5060 msgid "AVAILABILITY"
5061 msgstr "可用性"
5062
5063 #. type: Plain text
5064 #: build/C/man2/mlock.2:200
5065 msgid ""
5066 "On POSIX systems on which B<mlock>()  and B<munlock>()  are available, "
5067 "B<_POSIX_MEMLOCK_RANGE> is defined in I<E<lt>unistd.hE<gt>> and the number "
5068 "of bytes in a page can be determined from the constant B<PAGESIZE> (if "
5069 "defined) in I<E<lt>limits.hE<gt>> or by calling I<sysconf(_SC_PAGESIZE)>."
5070 msgstr ""
5071 "B<mlock>()  と B<munlock>()  が使用可能な POSIX システムでは "
5072 "B<_POSIX_MEMLOCK_RANGE> が I<E<lt>unistd.hE<gt>> で定義されている。 また、"
5073 "ページあたりのバイト数は、 I<E<lt>limits.hE<gt>> で定義される定数 "
5074 "B<PAGESIZE> から (定義されている場合)、もしくは I<sysconf(_SC_PAGESIZE)> を呼"
5075 "び出すことで決定できる。"
5076
5077 #.  POSIX.1-2001: It shall be defined to -1 or 0 or 200112L.
5078 #.  -1: unavailable, 0: ask using sysconf().
5079 #.  glibc defines it to 1.
5080 #. type: Plain text
5081 #: build/C/man2/mlock.2:213
5082 msgid ""
5083 "On POSIX systems on which B<mlockall>()  and B<munlockall>()  are available, "
5084 "B<_POSIX_MEMLOCK> is defined in I<E<lt>unistd.hE<gt>> to a value greater "
5085 "than 0.  (See also B<sysconf>(3).)"
5086 msgstr ""
5087 "B<mlockall>()  と B<munlockall>()  が利用可能な POSIX システムでは、 "
5088 "B<_POSIX_MEMLOCK> は I<E<lt>unistd.hE<gt>> で 0 より大きい値に定義されている "
5089 "(B<sysconf>(3)  も参照のこと)。"
5090
5091 #. type: Plain text
5092 #: build/C/man2/mlock.2:231
5093 msgid ""
5094 "Memory locking has two main applications: real-time algorithms and high-"
5095 "security data processing.  Real-time applications require deterministic "
5096 "timing, and, like scheduling, paging is one major cause of unexpected "
5097 "program execution delays.  Real-time applications will usually also switch "
5098 "to a real-time scheduler with B<sched_setscheduler>(2).  Cryptographic "
5099 "security software often handles critical bytes like passwords or secret keys "
5100 "as data structures.  As a result of paging, these secrets could be "
5101 "transferred onto a persistent swap store medium, where they might be "
5102 "accessible to the enemy long after the security software has erased the "
5103 "secrets in RAM and terminated.  (But be aware that the suspend mode on "
5104 "laptops and some desktop computers will save a copy of the system's RAM to "
5105 "disk, regardless of memory locks.)"
5106 msgstr ""
5107 "メモリのロックの用途としては主に二つある: リアルタイム アルゴリズムと高いセ"
5108 "キュリティの必要なデータ処理である。リアルタイムの アプリケーションは決定的な"
5109 "タイミングやスケジューリングを必要とするが、 ページングは予期しないプログラム"
5110 "の実行遅延をもたらす主要な要因となる。 リアルタイムのアプリケーションはたいて"
5111 "いは B<sched_setscheduler>(2)  でリアルタイムスケジューラに変更される。 暗号"
5112 "やセキュリティのソフトウェアはしばしばパスワードや秘密鍵のデータの ような重要"
5113 "なバイト列を扱う。ページングの結果、これらの秘密が スワップ用の固定媒体に転送"
5114 "されるかもしれない。そして、セキュリティ・ ソフトウェアが RAM 上の秘密を削除"
5115 "して終了したずっと後になっても、 このスワップされたデータには敵がアクセスでき"
5116 "る可能性がある (しかし、ラップトップといくつかのデスクトップコンピュータの サ"
5117 "スペンドモードはシステムの RAM の内容をメモリのロックに関わらず ディスクに保"
5118 "存することに注意)。"
5119
5120 #. type: Plain text
5121 #: build/C/man2/mlock.2:244
5122 msgid ""
5123 "Real-time processes that are using B<mlockall>()  to prevent delays on page "
5124 "faults should reserve enough locked stack pages before entering the time-"
5125 "critical section, so that no page fault can be caused by function calls.  "
5126 "This can be achieved by calling a function that allocates a sufficiently "
5127 "large automatic variable (an array) and writes to the memory occupied by "
5128 "this array in order to touch these stack pages.  This way, enough pages will "
5129 "be mapped for the stack and can be locked into RAM.  The dummy writes ensure "
5130 "that not even copy-on-write page faults can occur in the critical section."
5131 msgstr ""
5132 "リアルタイムプロセスが B<mlockall>()  を使ってページフォールトによる遅延を防"
5133 "ごうとする場合、 関数呼び出しによってページフォールトが発生しないように、 時"
5134 "間制限の厳しい部分 (time-critical section) に入る前に 十分な量のロックされた"
5135 "スタックを確保しておく必要がある。 これを実現するには、十分な大きさの自動変"
5136 "数 (の配列) を確保し、 これらのスタック用のページがメモリ上に確保されるように"
5137 "この配列に 書き込みを行う関数を用意し、これを呼び出せばよい。こうすること"
5138 "で、 十分な量のページがスタックにマッピングされ、RAM にロックされる。 ダミー"
5139 "の書き込みを行うことによって、 時間制限の厳しい部分 (critical section) 内では"
5140 "書き込み時コピーによる ページフォールトさえも発生しないことが保証される。"
5141
5142 #. type: Plain text
5143 #: build/C/man2/mlock.2:257
5144 msgid ""
5145 "Memory locks are not inherited by a child created via B<fork>(2)  and are "
5146 "automatically removed (unlocked) during an B<execve>(2)  or when the process "
5147 "terminates.  The B<mlockall>()  B<MCL_FUTURE> setting is not inherited by a "
5148 "child created via B<fork>(2)  and is cleared during an B<execve>(2)."
5149 msgstr ""
5150 "メモリロックは B<fork>(2)  で作成された子プロセスには継承されず、 "
5151 "B<execve>(2)  が呼ばれたり、プロセスが終了した場合は 自動的に削除される (ロッ"
5152 "ク解除される)。 B<mlockall>() の B<MCL_FUTURE> 設定は B<fork>(2) で作成された"
5153 "子プロセスには継承されず、 B<execve>(2) の中でクリアされる。"
5154
5155 #. type: Plain text
5156 #: build/C/man2/mlock.2:261
5157 msgid ""
5158 "The memory lock on an address range is automatically removed if the address "
5159 "range is unmapped via B<munmap>(2)."
5160 msgstr ""
5161 "あるアドレス範囲に対するメモリロックは、そのアドレス範囲が B<munmap>(2)  に"
5162 "よってアンマップされた場合は削除される。"
5163
5164 #. type: Plain text
5165 #: build/C/man2/mlock.2:274
5166 msgid ""
5167 "Memory locks do not stack, that is, pages which have been locked several "
5168 "times by calls to B<mlock>()  or B<mlockall>()  will be unlocked by a single "
5169 "call to B<munlock>()  for the corresponding range or by B<munlockall>().  "
5170 "Pages which are mapped to several locations or by several processes stay "
5171 "locked into RAM as long as they are locked at least at one location or by at "
5172 "least one process."
5173 msgstr ""
5174 "メモリのロックは累積しない。 すなわち複数回 B<mlock>()  や B<mlockall>()  を"
5175 "呼び出してロックされたページでも、 対応する範囲に対して B<munlock>()  を 1 回"
5176 "呼び出したり B<munlockall>()  を呼び出したりするだけでロック解除される。 複数"
5177 "の場所や複数のプロセスにマップされているページは、少なくとも一つの場所、 一つ"
5178 "のプロセスでロックされている限りは RAM に残り続ける。"
5179
5180 #. type: Plain text
5181 #: build/C/man2/mlock.2:285
5182 msgid ""
5183 "Under Linux, B<mlock>()  and B<munlock>()  automatically round I<addr> down "
5184 "to the nearest page boundary.  However, POSIX.1-2001 allows an "
5185 "implementation to require that I<addr> is page aligned, so portable "
5186 "applications should ensure this."
5187 msgstr ""
5188 "Linux では、 B<mlock>()  と B<munlock>()  は自動的に I<addr> を端数切り捨てに"
5189 "より一番近いページ境界へと丸める。 しかし POSIX.1-2001 は I<addr> がページ境"
5190 "界に合っていることを要求する実装も許している。 そのため移植性を意図したアプリ"
5191 "ケーションではきちんと境界に合わせた方が良い。"
5192
5193 #. type: Plain text
5194 #: build/C/man2/mlock.2:298
5195 msgid ""
5196 "The I<VmLck> field of the Linux-specific I</proc/PID/status> file shows how "
5197 "many kilobytes of memory the process with ID I<PID> has locked using "
5198 "B<mlock>(), B<mlockall>(), and B<mmap>(2)  B<MAP_LOCKED>."
5199 msgstr ""
5200 "Linux 固有の I</proc/PID/status> ファイルの I<VmLck> フィールドには、\n"
5201 "B<mlock>(), B<mlockall>() および B<mmap>(2) B<MAP_LOCKED> を使って、\n"
5202 "ID が I<PID> のプロセスがロックしているメモリ量 (キロバイト単位) が\n"
5203 "表示される。"
5204
5205 #. type: SS
5206 #: build/C/man2/mlock.2:298
5207 #, no-wrap
5208 msgid "Limits and permissions"
5209 msgstr "制限と権限"
5210
5211 #. type: Plain text
5212 #: build/C/man2/mlock.2:305
5213 msgid ""
5214 "In Linux 2.6.8 and earlier, a process must be privileged (B<CAP_IPC_LOCK>)  "
5215 "in order to lock memory and the B<RLIMIT_MEMLOCK> soft resource limit "
5216 "defines a limit on how much memory the process may lock."
5217 msgstr ""
5218 "Linux 2.6.8 以前では、メモリをロックするためには特権 (B<CAP_IPC_LOCK>)  が必"
5219 "要で、 ソフト資源制限 B<RLIMIT_MEMLOCK> はプロセスがどれだけのメモリをロック"
5220 "できるかの制限を定義する。"
5221
5222 #. type: Plain text
5223 #: build/C/man2/mlock.2:311
5224 msgid ""
5225 "Since Linux 2.6.9, no limits are placed on the amount of memory that a "
5226 "privileged process can lock and the B<RLIMIT_MEMLOCK> soft resource limit "
5227 "instead defines a limit on how much memory an unprivileged process may lock."
5228 msgstr ""
5229 "Linux 2.6.9 以降では、特権を持つプロセスがロックできるメモリ量は無制限とな"
5230 "り、 代わりにソフト資源制限 B<RLIMIT_MEMLOCK> は特権を持たないプロセスがロッ"
5231 "クできるメモリ量の制限を定義する。"
5232
5233 #. type: Plain text
5234 #: build/C/man2/mlock.2:319
5235 msgid ""
5236 "In the 2.4 series Linux kernels up to and including 2.4.17, a bug caused the "
5237 "B<mlockall>()  B<MCL_FUTURE> flag to be inherited across a B<fork>(2).  This "
5238 "was rectified in kernel 2.4.18."
5239 msgstr ""
5240 "2.4.17 までの 2.4 シリーズの Linux カーネルには、 B<mlockall>()  "
5241 "B<MCL_FUTURE> フラグが B<fork>(2)  で継承されると言うバグがある。 これはカー"
5242 "ネル 2.4.18 で修正された。"
5243
5244 #.  See the following LKML thread:
5245 #.  http://marc.theaimsgroup.com/?l=linux-kernel&m=113801392825023&w=2
5246 #.  "Rationale for RLIMIT_MEMLOCK"
5247 #.  23 Jan 2006
5248 #. type: Plain text
5249 #: build/C/man2/mlock.2:336
5250 msgid ""
5251 "Since kernel 2.6.9, if a privileged process calls I<mlockall(MCL_FUTURE)> "
5252 "and later drops privileges (loses the B<CAP_IPC_LOCK> capability by, for "
5253 "example, setting its effective UID to a nonzero value), then subsequent "
5254 "memory allocations (e.g., B<mmap>(2), B<brk>(2))  will fail if the "
5255 "B<RLIMIT_MEMLOCK> resource limit is encountered."
5256 msgstr ""
5257 "カーネル 2.6.9 以降では、特権を持ったプロセスが I<mlockall(MCL_FUTURE)> を呼"
5258 "び出した後で、特権をなくした場合 (例えば、 実効 UID を 0 以外の値に変更するな"
5259 "どにより、 B<CAP_IPC_LOCK> ケーパビリティを失った場合)、リソース上限 "
5260 "B<RLIMIT_MEMLOCK> に達すると、それ以降のメモリ割り当て (例えば B<mmap>(2), "
5261 "B<brk>(2))  は失敗する。"
5262
5263 #. type: Plain text
5264 #: build/C/man2/mlock.2:343
5265 msgid ""
5266 "B<mmap>(2), B<setrlimit>(2), B<shmctl>(2), B<sysconf>(3), B<proc>(5), "
5267 "B<capabilities>(7)"
5268 msgstr ""
5269 "B<mmap>(2), B<setrlimit>(2), B<shmctl>(2), B<sysconf>(3), B<proc>(5),\n"
5270 "B<capabilities>(7)"
5271
5272 #. type: TH
5273 #: build/C/man2/mmap.2:40
5274 #, no-wrap
5275 msgid "MMAP"
5276 msgstr "MMAP"
5277
5278 #. type: TH
5279 #: build/C/man2/mmap.2:40
5280 #, no-wrap
5281 msgid "2014-04-06"
5282 msgstr "2014-04-06"
5283
5284 #. type: Plain text
5285 #: build/C/man2/mmap.2:43
5286 msgid "mmap, munmap - map or unmap files or devices into memory"
5287 msgstr "mmap, munmap - ファイルやデバイスをメモリにマップ/アンマップする"
5288
5289 #. type: Plain text
5290 #: build/C/man2/mmap.2:51
5291 #, no-wrap
5292 msgid ""
5293 "B<void *mmap(void *>I<addr>B<, size_t >I<length>B<, int >I<prot>B<, int >I<flags>B<,>\n"
5294 "B<           int >I<fd>B<, off_t >I<offset>B<);>\n"
5295 "B<int munmap(void *>I<addr>B<, size_t >I<length>B<);>\n"
5296 msgstr ""
5297 "B<void *mmap(void *>I<addr>B<, size_t >I<length>B<, int >I<prot>B<, int >I<flags>B<,>\n"
5298 "B<           int >I<fd>B<, off_t >I<offset>B<);>\n"
5299 "B<int munmap(void *>I<addr>B<, size_t >I<length>B<);>\n"
5300
5301 #. type: Plain text
5302 #: build/C/man2/mmap.2:54
5303 msgid "See NOTES for information on feature test macro requirements."
5304 msgstr "機能検査マクロの要件に関する情報は「注意」の節を参照。"
5305
5306 #. type: Plain text
5307 #: build/C/man2/mmap.2:63
5308 msgid ""
5309 "B<mmap>()  creates a new mapping in the virtual address space of the calling "
5310 "process.  The starting address for the new mapping is specified in I<addr>.  "
5311 "The I<length> argument specifies the length of the mapping."
5312 msgstr ""
5313 "B<mmap>()  は、新しいマッピングを呼び出し元プロセスの仮想アドレス空間に作成す"
5314 "る。 新しいマッピングの開始アドレスは I<addr> で指定される。マッピングの長さ"
5315 "は I<length> 引き数で指定される。"
5316
5317 #.  Before Linux 2.6.24, the address was rounded up to the next page
5318 #.  boundary; since 2.6.24, it is rounded down!
5319 #. type: Plain text
5320 #: build/C/man2/mmap.2:77
5321 msgid ""
5322 "If I<addr> is NULL, then the kernel chooses the address at which to create "
5323 "the mapping; this is the most portable method of creating a new mapping.  If "
5324 "I<addr> is not NULL, then the kernel takes it as a hint about where to place "
5325 "the mapping; on Linux, the mapping will be created at a nearby page "
5326 "boundary.  The address of the new mapping is returned as the result of the "
5327 "call."
5328 msgstr ""
5329 "I<addr> が NULL の場合、カーネルがマッピングを作成するアドレスを選択する。 こ"
5330 "の方法は最も移植性のある新しいマッピングの作成方法である。 I<addr> が NULL で"
5331 "ない場合、カーネルはマッピングをどこに配置するかのヒントとして I<addr> を使用"
5332 "する。Linux では、マッピングはすぐ近くのページ境界に作成される。 新しいマッピ"
5333 "ングのアドレスは、呼び出しの返り値として返される。"
5334
5335 #. type: Plain text
5336 #: build/C/man2/mmap.2:89
5337 msgid ""
5338 "The contents of a file mapping (as opposed to an anonymous mapping; see "
5339 "B<MAP_ANONYMOUS> below), are initialized using I<length> bytes starting at "
5340 "offset I<offset> in the file (or other object) referred to by the file "
5341 "descriptor I<fd>.  I<offset> must be a multiple of the page size as returned "
5342 "by I<sysconf(_SC_PAGE_SIZE)>."
5343 msgstr ""
5344 "ファイルマッピングの内容は、 ファイルディスクリプタ I<fd> で参照されるファイ"
5345 "ル (もしくは他のオブジェクト) のオフセット I<offset> から開始される "
5346 "I<length> バイトのデータで初期化される (ファイルマッピングは無名マッピングの"
5347 "反対語である。 B<MAP_ANONYMOUS> を参照)。 I<offset> は "
5348 "I<sysconf(_SC_PAGE_SIZE)> が返すページサイズの倍数でなければならない。"
5349
5350 #. type: Plain text
5351 #: build/C/man2/mmap.2:97
5352 msgid ""
5353 "The I<prot> argument describes the desired memory protection of the mapping "
5354 "(and must not conflict with the open mode of the file).  It is either "
5355 "B<PROT_NONE> or the bitwise OR of one or more of the following flags:"
5356 msgstr ""
5357 "引き数 I<prot> には、マッピングのメモリ保護をどのように行なうかを指定する "
5358 "(ファイルのオープンモードと矛盾してはいけない)。 I<prot> には、 B<PROT_NONE> "
5359 "か、以下のフラグをひとつ以上ビット毎の論理和 (OR) をとったものを 指定できる。"
5360
5361 #. type: TP
5362 #: build/C/man2/mmap.2:97 build/C/man2/mprotect.2:73
5363 #, no-wrap
5364 msgid "B<PROT_EXEC>"
5365 msgstr "B<PROT_EXEC>"
5366
5367 #. type: Plain text
5368 #: build/C/man2/mmap.2:100
5369 msgid "Pages may be executed."
5370 msgstr "ページは実行可能である。"
5371
5372 #. type: TP
5373 #: build/C/man2/mmap.2:100 build/C/man2/mprotect.2:67
5374 #, no-wrap
5375 msgid "B<PROT_READ>"
5376 msgstr "B<PROT_READ>"
5377
5378 #. type: Plain text
5379 #: build/C/man2/mmap.2:103
5380 msgid "Pages may be read."
5381 msgstr "ページは読み込み可能である。"
5382
5383 #. type: TP
5384 #: build/C/man2/mmap.2:103 build/C/man2/mprotect.2:70
5385 #, no-wrap
5386 msgid "B<PROT_WRITE>"
5387 msgstr "B<PROT_WRITE>"
5388
5389 #. type: Plain text
5390 #: build/C/man2/mmap.2:106
5391 msgid "Pages may be written."
5392 msgstr "ページに書き込み可能である。"
5393
5394 #. type: TP
5395 #: build/C/man2/mmap.2:106 build/C/man2/mprotect.2:64
5396 #, no-wrap
5397 msgid "B<PROT_NONE>"
5398 msgstr "B<PROT_NONE>"
5399
5400 #. type: Plain text
5401 #: build/C/man2/mmap.2:109
5402 msgid "Pages may not be accessed."
5403 msgstr "ページにはアクセスできない。"
5404
5405 #. type: Plain text
5406 #: build/C/man2/mmap.2:118
5407 msgid ""
5408 "The I<flags> argument determines whether updates to the mapping are visible "
5409 "to other processes mapping the same region, and whether updates are carried "
5410 "through to the underlying file.  This behavior is determined by including "
5411 "exactly one of the following values in I<flags>:"
5412 msgstr ""
5413 "I<flags> 引き数により、マッピングに対する更新が同じ領域をマッピングしている "
5414 "他のプロセスに見えるか、更新がマッピング元のファイルを通じて 伝えられるか、が"
5415 "決定される。この動作は、以下の値のいずれか一つだけ (複数は指定できない) を "
5416 "I<flags> に含めることで指定する。"
5417
5418 #. type: TP
5419 #: build/C/man2/mmap.2:118
5420 #, no-wrap
5421 msgid "B<MAP_SHARED>"
5422 msgstr "B<MAP_SHARED>"
5423
5424 #. type: Plain text
5425 #: build/C/man2/mmap.2:128
5426 msgid ""
5427 "Share this mapping.  Updates to the mapping are visible to other processes "
5428 "that map this file, and are carried through to the underlying file.  The "
5429 "file may not actually be updated until B<msync>(2)  or B<munmap>()  is "
5430 "called."
5431 msgstr ""
5432 "このマッピングを共有する。 マッピングに対する更新はこのファイルをマッピングし"
5433 "ている他のプロセス から見える。更新はマッピング元のファイルを通じて伝えられ"
5434 "る。 ただし、ファイルの実際の更新は B<msync>(2)  または B<munmap>()  が呼ばれ"
5435 "るまで行われないこともある。"
5436
5437 #. type: TP
5438 #: build/C/man2/mmap.2:128
5439 #, no-wrap
5440 msgid "B<MAP_PRIVATE>"
5441 msgstr "B<MAP_PRIVATE>"
5442
5443 #. type: Plain text
5444 #: build/C/man2/mmap.2:137
5445 msgid ""
5446 "Create a private copy-on-write mapping.  Updates to the mapping are not "
5447 "visible to other processes mapping the same file, and are not carried "
5448 "through to the underlying file.  It is unspecified whether changes made to "
5449 "the file after the B<mmap>()  call are visible in the mapped region."
5450 msgstr ""
5451 "プライベートな copy-on-write (書き込み時コピー) マップを生成する。 マッピング"
5452 "に対する更新は同じファイルをマッピングしている他のプロセス には見えず、更新が"
5453 "マッピング元のファイルを通じて伝えられることもない。 B<mmap>()  の呼び出し後"
5454 "にマッピング元のファイルに対して行われた変更が、 マップ領域に反映されるかどう"
5455 "かは規定されていない。"
5456
5457 #. type: Plain text
5458 #: build/C/man2/mmap.2:139
5459 msgid "Both of these flags are described in POSIX.1-2001."
5460 msgstr "上記の二つのフラグは POSIX.1-2001 で規定されている。"
5461
5462 #. type: Plain text
5463 #: build/C/man2/mmap.2:142
5464 msgid ""
5465 "In addition, zero or more of the following values can be ORed in I<flags>:"
5466 msgstr ""
5467 "さらに、以下の値のうち 0 個以上をビット毎の論理和 (OR) で I<flags> に指定する"
5468 "ことができる。"
5469
5470 #. type: TP
5471 #: build/C/man2/mmap.2:142
5472 #, no-wrap
5473 msgid "B<MAP_32BIT> (since Linux 2.4.20, 2.6)"
5474 msgstr "B<MAP_32BIT> (Linux 2.4.20, 2.6 以降)"
5475
5476 #.  See http://lwn.net/Articles/294642 "Tangled up in threads", 19 Aug 08
5477 #. type: Plain text
5478 #: build/C/man2/mmap.2:158
5479 msgid ""
5480 "Put the mapping into the first 2 Gigabytes of the process address space.  "
5481 "This flag is supported only on x86-64, for 64-bit programs.  It was added to "
5482 "allow thread stacks to be allocated somewhere in the first 2GB of memory, so "
5483 "as to improve context-switch performance on some early 64-bit processors.  "
5484 "Modern x86-64 processors no longer have this performance problem, so use of "
5485 "this flag is not required on those systems.  The B<MAP_32BIT> flag is "
5486 "ignored when B<MAP_FIXED> is set."
5487 msgstr ""
5488 "マッピングをプロセスのアドレス空間の先頭 2 ギガバイト以内に配置する。 このフ"
5489 "ラグがサポートされているのは x86-64 アーキテクチャ上の 64 ビットプログラムの"
5490 "みである。 このフラグが追加されたのは、スレッドのスタックをメモリの先頭 2GB "
5491 "以内の どこかに割り当てることで、初期のいくつかの 64 ビットプロセッサにおけ"
5492 "る コンテキストスイッチの性能問題を改善するためである。 最近の x86-64 プロ"
5493 "セッサではこの性能問題はもはや存在せず、 そのようなシステムではこのフラグを使"
5494 "用する必要はない。 B<MAP_FIXED> がセットされている場合は、 B<MAP_32BIT> フラ"
5495 "グは無視される。"
5496
5497 #. type: TP
5498 #: build/C/man2/mmap.2:158
5499 #, no-wrap
5500 msgid "B<MAP_ANON>"
5501 msgstr "B<MAP_ANON>"
5502
5503 #. type: Plain text
5504 #: build/C/man2/mmap.2:163
5505 msgid "Synonym for B<MAP_ANONYMOUS>.  Deprecated."
5506 msgstr "B<MAP_ANONYMOUS> の同義語。非推奨。"
5507
5508 #. type: TP
5509 #: build/C/man2/mmap.2:163
5510 #, no-wrap
5511 msgid "B<MAP_ANONYMOUS>"
5512 msgstr "B<MAP_ANONYMOUS>"
5513
5514 #. type: Plain text
5515 #: build/C/man2/mmap.2:185
5516 msgid ""
5517 "The mapping is not backed by any file; its contents are initialized to "
5518 "zero.  The I<fd> and I<offset> arguments are ignored; however, some "
5519 "implementations require I<fd> to be -1 if B<MAP_ANONYMOUS> (or B<MAP_ANON>)  "
5520 "is specified, and portable applications should ensure this.  The use of "
5521 "B<MAP_ANONYMOUS> in conjunction with B<MAP_SHARED> is supported on Linux "
5522 "only since kernel 2.4."
5523 msgstr ""
5524 "マッピングはどのファイルとも関連付けされない。 マッピングの内容は 0 で初期化"
5525 "される。 引き数 I<fd> と I<offset> は無視される。 ただし、実装によっては "
5526 "B<MAP_ANONYMOUS> (もしくは B<MAP_ANON>)  が指定された場合、 I<fd> を -1 にす"
5527 "る必要があり、 移植性が必要なアプリケーションでは必ず I<fd> を -1 にすべきで"
5528 "ある。 B<MAP_ANONYMOUS> と B<MAP_SHARED> を組み合わせての利用は カーネル 2.4 "
5529 "以降の Linux でのみサポートされている。"
5530
5531 #. type: TP
5532 #: build/C/man2/mmap.2:185
5533 #, no-wrap
5534 msgid "B<MAP_DENYWRITE>"
5535 msgstr "B<MAP_DENYWRITE>"
5536
5537 #.  Introduced in 1.1.36, removed in 1.3.24.
5538 #. type: Plain text
5539 #: build/C/man2/mmap.2:193
5540 msgid ""
5541 "This flag is ignored.  (Long ago, it signaled that attempts to write to the "
5542 "underlying file should fail with B<ETXTBUSY>.  But this was a source of "
5543 "denial-of-service attacks.)"
5544 msgstr ""
5545 "このフラグは無視される (ずっと前は、マップ元のファイルへの書き込みを行おうと"
5546 "すると、エラー B<ETXTBUSY> で失敗するようにシグナルが設定されていたが、これ"
5547 "は denial-of-service (サービス拒否) 攻撃の原因となった)。"
5548
5549 #. type: TP
5550 #: build/C/man2/mmap.2:193
5551 #, no-wrap
5552 msgid "B<MAP_EXECUTABLE>"
5553 msgstr "B<MAP_EXECUTABLE>"
5554
5555 #.  Introduced in 1.1.38, removed in 1.3.24. Flag tested in proc_follow_link.
5556 #.  (Long ago, it signaled that the underlying file is an executable.
5557 #.  However, that information was not really used anywhere.)
5558 #.  Linus talked about DOS related to MAP_EXECUTABLE, but he was thinking of
5559 #.  MAP_DENYWRITE?
5560 #. type: Plain text
5561 #: build/C/man2/mmap.2:201
5562 msgid "This flag is ignored."
5563 msgstr "このフラグは無視される。"
5564
5565 #. type: TP
5566 #: build/C/man2/mmap.2:201
5567 #, no-wrap
5568 msgid "B<MAP_FILE>"
5569 msgstr "B<MAP_FILE>"
5570
5571 #.  On some systems, this was required as the opposite of
5572 #.  MAP_ANONYMOUS -- mtk, 1 May 2007
5573 #. type: Plain text
5574 #: build/C/man2/mmap.2:207
5575 msgid "Compatibility flag.  Ignored."
5576 msgstr "互換性のためのフラグ。無視される。"
5577
5578 #. type: TP
5579 #: build/C/man2/mmap.2:207
5580 #, no-wrap
5581 msgid "B<MAP_FIXED>"
5582 msgstr "B<MAP_FIXED>"
5583
5584 #. type: Plain text
5585 #: build/C/man2/mmap.2:225
5586 msgid ""
5587 "Don't interpret I<addr> as a hint: place the mapping at exactly that "
5588 "address.  I<addr> must be a multiple of the page size.  If the memory region "
5589 "specified by I<addr> and I<len> overlaps pages of any existing mapping(s), "
5590 "then the overlapped part of the existing mapping(s) will be discarded.  If "
5591 "the specified address cannot be used, B<mmap>()  will fail.  Because "
5592 "requiring a fixed address for a mapping is less portable, the use of this "
5593 "option is discouraged."
5594 msgstr ""
5595 "I<addr> をアドレスのヒントとして使用するのではなく、 I<addr> で指定されたアド"
5596 "レスをそのまま使用してマッピングを配置する。 I<addr> はページサイズの倍数でな"
5597 "ければならない。 I<addr> と I<len> で指定されたメモリ領域が既存のマッピングの"
5598 "ページと重なる場合、 既存のマッピングの重なった部分は捨てられる。 もし指定さ"
5599 "れたアドレスが使用できない場合、 B<mmap>()  は失敗する。 マッピングに対して固"
5600 "定アドレスを要求するのは移植性の面で劣るので、 このオプションは使用しないこと"
5601 "を推奨する。"
5602
5603 #. type: TP
5604 #: build/C/man2/mmap.2:225
5605 #, no-wrap
5606 msgid "B<MAP_GROWSDOWN>"
5607 msgstr "B<MAP_GROWSDOWN>"
5608
5609 #. type: Plain text
5610 #: build/C/man2/mmap.2:230
5611 msgid ""
5612 "Used for stacks.  Indicates to the kernel virtual memory system that the "
5613 "mapping should extend downward in memory."
5614 msgstr ""
5615 "スタック用に使用される。マッピングをメモリ内で逆向きに行うことを カーネル仮想"
5616 "メモリシステムに指示する。 (訳注:マッピングは通常はメモリ・アドレスが増加す"
5617 "る向きに行うが、 このオプションを指定すると逆向きにマッピングを行う)"
5618
5619 #. type: TP
5620 #: build/C/man2/mmap.2:230
5621 #, no-wrap
5622 msgid "B<MAP_HUGETLB> (since Linux 2.6.32)"
5623 msgstr "B<MAP_HUGETLB> (Linux 2.6.32 以降)"
5624
5625 #. type: Plain text
5626 #: build/C/man2/mmap.2:236
5627 msgid ""
5628 "Allocate the mapping using \"huge pages.\" See the Linux kernel source file "
5629 "I<Documentation/vm/hugetlbpage.txt> for further information."
5630 msgstr ""
5631 "\"huge page\" を使ってマッピングを割り当てる。詳しい情報は、Linux カーネル"
5632 "ソースの I<Documentation/vm/hugetlbpage.txt> を参照。"
5633
5634 #. type: TP
5635 #: build/C/man2/mmap.2:236
5636 #, no-wrap
5637 msgid "B<MAP_LOCKED> (since Linux 2.5.37)"
5638 msgstr "B<MAP_LOCKED> (Linux 2.5.37 以降)"
5639
5640 #.  If set, the mapped pages will not be swapped out.
5641 #. type: Plain text
5642 #: build/C/man2/mmap.2:242
5643 msgid ""
5644 "Lock the pages of the mapped region into memory in the manner of "
5645 "B<mlock>(2).  This flag is ignored in older kernels."
5646 msgstr ""
5647 "マップされた領域のページを B<mlock>(2)  の方法でメモリ内にロックする。 それ以"
5648 "前のカーネルでは、このフラグは無視される。"
5649
5650 #. type: TP
5651 #: build/C/man2/mmap.2:242
5652 #, no-wrap
5653 msgid "B<MAP_NONBLOCK> (since Linux 2.5.46)"
5654 msgstr "B<MAP_NONBLOCK> (Linux 2.5.46 以降)"
5655
5656 #. type: Plain text
5657 #: build/C/man2/mmap.2:257
5658 msgid ""
5659 "Only meaningful in conjunction with B<MAP_POPULATE>.  Don't perform read-"
5660 "ahead: create page tables entries only for pages that are already present in "
5661 "RAM.  Since Linux 2.6.23, this flag causes B<MAP_POPULATE> to do nothing.  "
5662 "One day the combination of B<MAP_POPULATE> and B<MAP_NONBLOCK> may be "
5663 "reimplemented."
5664 msgstr ""
5665 "B<MAP_POPULATE> と組み合わせた場合のみ意味を持つ。 read-ahead (前もって読み込"
5666 "むこと) を実行しない。 単に、すでに RAM 上に存在するページに対してのみページ"
5667 "テーブルエントリを作成する。 Linux 2.6.23 以降では、このフラグは "
5668 "B<MAP_POPULATE> に何の影響も与えない。 いつか B<MAP_POPULATE> と "
5669 "B<MAP_NONBLOCK> を組み合わせた場合の動作は実装し直されるかもしれない。"
5670
5671 #. type: TP
5672 #: build/C/man2/mmap.2:257
5673 #, no-wrap
5674 msgid "B<MAP_NORESERVE>"
5675 msgstr "B<MAP_NORESERVE>"
5676
5677 #. type: Plain text
5678 #: build/C/man2/mmap.2:272
5679 msgid ""
5680 "Do not reserve swap space for this mapping.  When swap space is reserved, "
5681 "one has the guarantee that it is possible to modify the mapping.  When swap "
5682 "space is not reserved one might get B<SIGSEGV> upon a write if no physical "
5683 "memory is available.  See also the discussion of the file I</proc/sys/vm/"
5684 "overcommit_memory> in B<proc>(5).  In kernels before 2.6, this flag had "
5685 "effect only for private writable mappings."
5686 msgstr ""
5687 "このマッピングに対するスワップ空間の予約を行わない。 スワップ空間を予約した場"
5688 "合は、このマッピングの変更が必ず可能なことが 保証される。予約を行わなかった場"
5689 "合、物理メモリに空きがないと 書き込み時に B<SIGSEGV> エラーを受け取ることがあ"
5690 "る。 B<proc>(5)  の I</proc/sys/vm/overcommit_memory> ファイルについての議論"
5691 "も参照。 バージョン 2.6 より前のカーネルでは、このフラグは書き込み可能な プラ"
5692 "イベート・マッピングについてのみ効果があった。"
5693
5694 #. type: TP
5695 #: build/C/man2/mmap.2:272
5696 #, no-wrap
5697 msgid "B<MAP_POPULATE> (since Linux 2.5.46)"
5698 msgstr "B<MAP_POPULATE> (Linux 2.5.46 以降)"
5699
5700 #. type: Plain text
5701 #: build/C/man2/mmap.2:279
5702 msgid ""
5703 "Populate (prefault) page tables for a mapping.  For a file mapping, this "
5704 "causes read-ahead on the file.  Later accesses to the mapping will not be "
5705 "blocked by page faults.  B<MAP_POPULATE> is supported for private mappings "
5706 "only since Linux 2.6.23."
5707 msgstr ""
5708 "マッピング用のページテーブルを配置 (populate) する ファイルマッピングの場合に"
5709 "は、これによりファイルが先読み (read-ahead)  が行われる。この以後は、マッピン"
5710 "グに対するアクセスがページフォールトで ブロックされることがなくなる。 Linux "
5711 "2.6.23 以降でのみプライベート・マッピングについて B<MAP_POPULATE> がサポート"
5712 "されている。"
5713
5714 #. type: TP
5715 #: build/C/man2/mmap.2:279
5716 #, no-wrap
5717 msgid "B<MAP_STACK> (since Linux 2.6.27)"
5718 msgstr "B<MAP_STACK> (Linux 2.6.27 以降)"
5719
5720 #.  See http://lwn.net/Articles/294642 "Tangled up in threads", 19 Aug 08
5721 #.  commit cd98a04a59e2f94fa64d5bf1e26498d27427d5e7
5722 #.  http://thread.gmane.org/gmane.linux.kernel/720412
5723 #.  "pthread_create() slow for many threads; also time to revisit 64b
5724 #.   context switch optimization?"
5725 #. type: Plain text
5726 #: build/C/man2/mmap.2:292
5727 msgid ""
5728 "Allocate the mapping at an address suitable for a process or thread stack.  "
5729 "This flag is currently a no-op, but is used in the glibc threading "
5730 "implementation so that if some architectures require special treatment for "
5731 "stack allocations, support can later be transparently implemented for glibc."
5732 msgstr ""
5733 "プロセスやスレッドのスタックに適したアドレスにマッピングを割り当てる。 現在の"
5734 "ところ、このフラグは何もしないが、 glibc のスレッド実装では使用されている。 "
5735 "これは、いくつかのアーキテクチャではスタックの割り当てに関して特別な扱い が必"
5736 "要な場合に、glibc にそのサポートを後で透過的に実装できるようにする ためであ"
5737 "る。"
5738
5739 #. type: TP
5740 #: build/C/man2/mmap.2:292
5741 #, no-wrap
5742 msgid "B<MAP_UNINITIALIZED> (since Linux 2.6.33)"
5743 msgstr "B<MAP_UNINITIALIZED> (Linux 2.6.33 以降)"
5744
5745 #. type: Plain text
5746 #: build/C/man2/mmap.2:302
5747 msgid ""
5748 "Don't clear anonymous pages.  This flag is intended to improve performance "
5749 "on embedded devices.  This flag is honored only if the kernel was configured "
5750 "with the B<CONFIG_MMAP_ALLOW_UNINITIALIZED> option.  Because of the security "
5751 "implications, that option is normally enabled only on embedded devices (i."
5752 "e., devices where one has complete control of the contents of user memory)."
5753 msgstr ""
5754 "無名ページ (anonymous page) のクリアを行わない。このフラグは組み込みデバイ"
5755 "ス\n"
5756 "での性能向上を目的に作られてものである。カーネルの設定で\n"
5757 "B<CONFIG_MMAP_ALLOW_UNINITIALIZED> オプションが有効になっている場合のみ、\n"
5758 "このフラグは効果を持つ。\n"
5759 "セキュリティ面の考慮から、このオプションは通常組み込みデバイス (すなわち、\n"
5760 "ユーザメモリの内容を完全に制御化におけるデバイス) においてのみ有効にされる。"
5761
5762 #. type: Plain text
5763 #: build/C/man2/mmap.2:310
5764 msgid ""
5765 "Of the above flags, only B<MAP_FIXED> is specified in POSIX.1-2001.  "
5766 "However, most systems also support B<MAP_ANONYMOUS> (or its synonym "
5767 "B<MAP_ANON>)."
5768 msgstr ""
5769 "上記のフラグの中では、 B<MAP_FIXED> だけが POSIX.1-2001 で規定されている。 し"
5770 "かしながら、ほとんどのシステムで B<MAP_ANONYMOUS> (またはその同義語である "
5771 "B<MAP_ANON>)  もサポートされている。"
5772
5773 #. type: Plain text
5774 #: build/C/man2/mmap.2:317
5775 msgid ""
5776 "Some systems document the additional flags B<MAP_AUTOGROW>, "
5777 "B<MAP_AUTORESRV>, B<MAP_COPY>, and B<MAP_LOCAL>."
5778 msgstr ""
5779 "いくつかのシステムでは、上記以外にフラグとして B<MAP_AUTOGROW>, "
5780 "B<MAP_AUTORESRV>, B<MAP_COPY>, B<MAP_LOCAL> が規定されている。"
5781
5782 #. type: Plain text
5783 #: build/C/man2/mmap.2:323
5784 msgid ""
5785 "Memory mapped by B<mmap>()  is preserved across B<fork>(2), with the same "
5786 "attributes."
5787 msgstr ""
5788 "B<mmap>()  によってマップされたメモリの属性は B<fork>(2)  の際に継承される。"
5789
5790 #. type: Plain text
5791 #: build/C/man2/mmap.2:331
5792 msgid ""
5793 "A file is mapped in multiples of the page size.  For a file that is not a "
5794 "multiple of the page size, the remaining memory is zeroed when mapped, and "
5795 "writes to that region are not written out to the file.  The effect of "
5796 "changing the size of the underlying file of a mapping on the pages that "
5797 "correspond to added or removed regions of the file is unspecified."
5798 msgstr ""
5799 "ファイルはページサイズの整数倍の領域にマップされる。サイズがページサイズの 整"
5800 "数倍でないファイルの場合、マップ時に残りの領域は 0 で埋められ、この領域へ 書"
5801 "きこみを行ってもファイルに書き出されることはない。マッピングを行った元 ファイ"
5802 "ルのサイズを変更した場合、元ファイルの追加されたり削除された領域に対応 する"
5803 "マップされたページに対してどのような影響があるかは規定されていない。"
5804
5805 #. type: SS
5806 #: build/C/man2/mmap.2:331
5807 #, no-wrap
5808 msgid "munmap()"
5809 msgstr "munmap()"
5810
5811 #. type: Plain text
5812 #: build/C/man2/mmap.2:341
5813 msgid ""
5814 "The B<munmap>()  system call deletes the mappings for the specified address "
5815 "range, and causes further references to addresses within the range to "
5816 "generate invalid memory references.  The region is also automatically "
5817 "unmapped when the process is terminated.  On the other hand, closing the "
5818 "file descriptor does not unmap the region."
5819 msgstr ""
5820 "システムコール B<munmap>()  は指定されたアドレス範囲のマップを消去し、 これ以"
5821 "降のその範囲内へのメモリ参照は不正となる。 この領域は、プロセスが終了したとき"
5822 "にも自動的にアンマップされる。 一方、ファイル記述子をクローズしても、この領域"
5823 "はアンマップされない。"
5824
5825 #. type: Plain text
5826 #: build/C/man2/mmap.2:351
5827 msgid ""
5828 "The address I<addr> must be a multiple of the page size.  All pages "
5829 "containing a part of the indicated range are unmapped, and subsequent "
5830 "references to these pages will generate B<SIGSEGV>.  It is not an error if "
5831 "the indicated range does not contain any mapped pages."
5832 msgstr ""
5833 "I<addr> アドレスはページサイズの整数倍でなければならない。指定された範囲の一"
5834 "部分を 含む全てのページはアンマップされ、これ以降にこれらのページへの参照があ"
5835 "ると B<SIGSEGV> が発生する。 指定した範囲内にマップされたページが一つも含まれ"
5836 "ていない場合でも エラーにならない。"
5837
5838 #. type: SS
5839 #: build/C/man2/mmap.2:351
5840 #, no-wrap
5841 msgid "Timestamps changes for file-backed mappings"
5842 msgstr "ファイルと関連付けられたマッピングに対するタイムスタンプの更新"
5843
5844 #. type: Plain text
5845 #: build/C/man2/mmap.2:358
5846 msgid ""
5847 "For file-backed mappings, the I<st_atime> field for the mapped file may be "
5848 "updated at any time between the B<mmap>()  and the corresponding unmapping; "
5849 "the first reference to a mapped page will update the field if it has not "
5850 "been already."
5851 msgstr ""
5852 "ファイルと関連付けられたマッピングの場合、マッピングされたファイルの "
5853 "I<st_atime> フィールドは、 B<mmap>()  されてからアンマップ (unmap) されるまで"
5854 "の間に更新されることがある。 それまでに更新が行われていなければ、マップされた"
5855 "ページへの最初の参照があった 際に更新される。"
5856
5857 #. type: Plain text
5858 #: build/C/man2/mmap.2:375
5859 msgid ""
5860 "The I<st_ctime> and I<st_mtime> field for a file mapped with B<PROT_WRITE> "
5861 "and B<MAP_SHARED> will be updated after a write to the mapped region, and "
5862 "before a subsequent B<msync>(2)  with the B<MS_SYNC> or B<MS_ASYNC> flag, if "
5863 "one occurs."
5864 msgstr ""
5865 "B<PROT_WRITE> と B<MAP_SHARED> の両方を指定してマップされたファイルの場合、書"
5866 "き込みがあると、 I<st_ctime> と I<st_mtime> の両フィールドは、マップされた領"
5867 "域への書き込みより後で、 B<MS_SYNC> または B<MS_ASYNC> フラグを指定して "
5868 "B<msync>(2)  が呼ばれる前までに更新される。"
5869
5870 #. type: Plain text
5871 #: build/C/man2/mmap.2:392
5872 msgid ""
5873 "On success, B<mmap>()  returns a pointer to the mapped area.  On error, the "
5874 "value B<MAP_FAILED> (that is, I<(void\\ *)\\ -1>)  is returned, and I<errno> "
5875 "is set appropriately.  On success, B<munmap>()  returns 0, on failure -1, "
5876 "and I<errno> is set (probably to B<EINVAL>)."
5877 msgstr ""
5878 "B<mmap>()  は成功するとマップされた領域へのポインタを返す。 失敗すると値 "
5879 "B<MAP_FAILED> (つまり I<(void\\ *)\\ -1>)  を返し、 I<errno> がエラーの内容に"
5880 "したがってセットされる。 B<munmap>()  は成功すると 0 を返す。失敗すると -1 を"
5881 "返し、 I<errno> がセットされる (多くの場合 B<EINVAL> になるだろう)。"
5882
5883 #. type: TP
5884 #: build/C/man2/mmap.2:393 build/C/man2/mprotect.2:86
5885 #: build/C/man3/shm_open.3:187 build/C/man3/shm_open.3:192
5886 #: build/C/man2/shmctl.2:306 build/C/man2/shmget.2:192
5887 #: build/C/man2/shmop.2:188
5888 #, no-wrap
5889 msgid "B<EACCES>"
5890 msgstr "B<EACCES>"
5891
5892 #. type: Plain text
5893 #: build/C/man2/mmap.2:411
5894 msgid ""
5895 "A file descriptor refers to a non-regular file.  Or a file mapping was "
5896 "requested, but I<fd> is not open for reading.  Or B<MAP_SHARED> was "
5897 "requested and B<PROT_WRITE> is set, but I<fd> is not open in read/write "
5898 "(B<O_RDWR>)  mode.  Or B<PROT_WRITE> is set, but the file is append-only."
5899 msgstr ""
5900 "以下のいずれかの場合。 ファイル記述子の参照先が通常のファイルではない (non-"
5901 "regular file) 。 ファイルマッピングを要求したが I<fd> は読み込み用にオープン"
5902 "されていない。 B<MAP_SHARED> を要求して B<PROT_WRITE> をセットしたが I<fd> は"
5903 "読み書きモード (B<O_RDWR>)  でオープンされていない、 B<PROT_WRITE> をセットし"
5904 "たが、ファイルは追加 (append) 専用である。"
5905
5906 #. type: Plain text
5907 #: build/C/man2/mmap.2:415
5908 msgid ""
5909 "The file has been locked, or too much memory has been locked (see "
5910 "B<setrlimit>(2))."
5911 msgstr ""
5912 "ファイルがロックされている。またはロックされているメモリが多すぎる "
5913 "(B<setrlimit>(2)  を参照)。"
5914
5915 #. type: Plain text
5916 #: build/C/man2/mmap.2:421
5917 msgid ""
5918 "I<fd> is not a valid file descriptor (and B<MAP_ANONYMOUS> was not set)."
5919 msgstr ""
5920 "I<fd> が有効なファイル記述子 (file descriptor) ではない (かつ "
5921 "B<MAP_ANONYMOUS> がセットされていない)。"
5922
5923 #. type: Plain text
5924 #: build/C/man2/mmap.2:429
5925 msgid ""
5926 "We don't like I<addr>, I<length>, or I<offset> (e.g., they are too large, or "
5927 "not aligned on a page boundary)."
5928 msgstr ""
5929 "I<addr> か I<length> か I<offset> が適切でない (例えば、大きすぎるとか、ペー"
5930 "ジ境界にアラインメントされていない)。"
5931
5932 #. type: Plain text
5933 #: build/C/man2/mmap.2:434
5934 msgid "(since Linux 2.6.12)  I<length> was 0."
5935 msgstr "(Linux 2.6.12 以降)  I<length> が 0 であった。"
5936
5937 #. type: Plain text
5938 #: build/C/man2/mmap.2:442
5939 msgid ""
5940 "I<flags> contained neither B<MAP_PRIVATE> or B<MAP_SHARED>, or contained "
5941 "both of these values."
5942 msgstr ""
5943 "I<flags> に B<MAP_PRIVATE> と B<MAP_SHARED> のどちらも含まれていなかった、も"
5944 "しくは その両方が含まれていた。"
5945
5946 #. type: TP
5947 #: build/C/man2/mmap.2:442 build/C/man3/shm_open.3:229
5948 #: build/C/man2/shmget.2:221
5949 #, no-wrap
5950 msgid "B<ENFILE>"
5951 msgstr "B<ENFILE>"
5952
5953 #.  [2.6.7] shmem_zero_setup()-->shmem_file_setup()-->get_empty_filp()
5954 #. type: Plain text
5955 #: build/C/man2/mmap.2:450 build/C/man2/shmget.2:225
5956 msgid "The system limit on the total number of open files has been reached."
5957 msgstr "システム全体でオープンされているファイルの総数が上限に達した。"
5958
5959 #. type: Plain text
5960 #: build/C/man2/mmap.2:454
5961 msgid ""
5962 "The underlying filesystem of the specified file does not support memory "
5963 "mapping."
5964 msgstr ""
5965 "指定されたファイルが置かれているファイルシステムがメモリマッピングをサポート "
5966 "していない。"
5967
5968 #. type: Plain text
5969 #: build/C/man2/mmap.2:458
5970 msgid ""
5971 "No memory is available, or the process's maximum number of mappings would "
5972 "have been exceeded."
5973 msgstr ""
5974 "メモリに空きがない、または処理中のプロセスのマッピング数が最大数を超過した。"
5975
5976 #.  (Since 2.4.25 / 2.6.0.)
5977 #. type: Plain text
5978 #: build/C/man2/mmap.2:467
5979 msgid ""
5980 "The I<prot> argument asks for B<PROT_EXEC> but the mapped area belongs to a "
5981 "file on a filesystem that was mounted no-exec."
5982 msgstr ""
5983 "I<prot> 引き数は B<PROT_EXEC> を行うように指定されているが、 no-exec でマウン"
5984 "トされたファイルシステム上のファイルに マップ領域が対応している。"
5985
5986 #. type: Plain text
5987 #: build/C/man2/mmap.2:473
5988 msgid ""
5989 "B<MAP_DENYWRITE> was set but the object specified by I<fd> is open for "
5990 "writing."
5991 msgstr ""
5992 "B<MAP_DENYWRITE> がセットされているが I<fd> で指定されているオブジェクトは書"
5993 "き込み用に開かれている。"
5994
5995 #. type: TP
5996 #: build/C/man2/mmap.2:473 build/C/man2/shmctl.2:348
5997 #, no-wrap
5998 msgid "B<EOVERFLOW>"
5999 msgstr "B<EOVERFLOW>"
6000
6001 #. type: Plain text
6002 #: build/C/man2/mmap.2:485
6003 msgid ""
6004 "On 32-bit architecture together with the large file extension (i.e., using "
6005 "64-bit I<off_t>): the number of pages used for I<length> plus number of "
6006 "pages used for I<offset> would overflow I<unsigned long> (32 bits)."
6007 msgstr ""
6008 "32 ビットアーキテクチャで large file 拡張を使っている場合 (つまり 64 ビット"
6009 "の I<off_t> を使う場合)、 I<length> で使うページ数と I<offset> で使うページ数"
6010 "を足した値は I<unsigned long> (32 ビット) を超えてしまう (オーバーフローして"
6011 "しまう) 場合がある。"
6012
6013 #. type: Plain text
6014 #: build/C/man2/mmap.2:487
6015 msgid "Use of a mapped region can result in these signals:"
6016 msgstr "マップ領域を利用する際に、以下のシグナルが発生することがある:"
6017
6018 #. type: TP
6019 #: build/C/man2/mmap.2:487
6020 #, no-wrap
6021 msgid "B<SIGSEGV>"
6022 msgstr "B<SIGSEGV>"
6023
6024 #. type: Plain text
6025 #: build/C/man2/mmap.2:490
6026 msgid "Attempted write into a region mapped as read-only."
6027 msgstr "読み込み専用で mmap された領域へ書き込みを行おうとした。"
6028
6029 #. type: TP
6030 #: build/C/man2/mmap.2:490
6031 #, no-wrap
6032 msgid "B<SIGBUS>"
6033 msgstr "B<SIGBUS>"
6034
6035 #. type: Plain text
6036 #: build/C/man2/mmap.2:495
6037 msgid ""
6038 "Attempted access to a portion of the buffer that does not correspond to the "
6039 "file (for example, beyond the end of the file, including the case where "
6040 "another process has truncated the file)."
6041 msgstr ""
6042 "バッファのうち、ファイルに関連づけられていない部分 (例えばファイル末尾を越え"
6043 "た部分など。これには 他のプロセスがファイルを切り詰めた場合なども含まれる)  "
6044 "にアクセスしようとした。"
6045
6046 #.  SVr4 documents additional error codes ENXIO and ENODEV.
6047 #.  SUSv2 documents additional error codes EMFILE and EOVERFLOW.
6048 #. type: Plain text
6049 #: build/C/man2/mmap.2:499
6050 msgid "SVr4, 4.4BSD, POSIX.1-2001."
6051 msgstr "SVr4, 4.4BSD, POSIX.1-2001."
6052
6053 #.  POSIX.1-2001: It shall be defined to -1 or 0 or 200112L.
6054 #.  -1: unavailable, 0: ask using sysconf().
6055 #.  glibc defines it to 1.
6056 #. type: Plain text
6057 #: build/C/man2/mmap.2:513
6058 msgid ""
6059 "On POSIX systems on which B<mmap>(), B<msync>(2)  and B<munmap>()  are "
6060 "available, B<_POSIX_MAPPED_FILES> is defined in I<E<lt>unistd.hE<gt>> to a "
6061 "value greater than 0.  (See also B<sysconf>(3).)"
6062 msgstr ""
6063 "B<mmap>(), B<msync>(2)  B<munmap>()  が利用可能な POSIX システムでは、 "
6064 "B<_POSIX_MAPPED_FILES> は E<lt>unistd.hE<gt> で 0 より大きな値に定義される "
6065 "(B<sysconf>(3)  も参照のこと)。"
6066
6067 #.  Since around glibc 2.1/2.2, depending on the platform.
6068 #. type: Plain text
6069 #: build/C/man2/mmap.2:528
6070 msgid ""
6071 "This page describes the interface provided by the glibc B<mmap>()  wrapper "
6072 "function.  Originally, this function invoked a system call of the same "
6073 "name.  Since kernel 2.4, that system call has been superseded by "
6074 "B<mmap2>(2), and nowadays the glibc B<mmap>()  wrapper function invokes "
6075 "B<mmap2>(2)  with a suitably adjusted value for I<offset>."
6076 msgstr ""
6077 "このページでは glibc の B<mmap>() のラッパー関数が提供するインターフェース"
6078 "に\n"
6079 "ついて説明している。元々は、この関数は同じ名前のシステムコールを起動してい"
6080 "た。\n"
6081 "カーネル 2.4 以降、このシステムコールは B<mmap2>(2) に取って代わられ、現在\n"
6082 "では、 glibc の B<mmap>() のラッパー関数は I<offset> を適切に調整してから\n"
6083 "B<mmap2>(2) を起動する。"
6084
6085 #. type: Plain text
6086 #: build/C/man2/mmap.2:541
6087 msgid ""
6088 "On some hardware architectures (e.g., i386), B<PROT_WRITE> implies "
6089 "B<PROT_READ>.  It is architecture dependent whether B<PROT_READ> implies "
6090 "B<PROT_EXEC> or not.  Portable programs should always set B<PROT_EXEC> if "
6091 "they intend to execute code in the new mapping."
6092 msgstr ""
6093 "(i386 などの) いくつかのアーキテクチャでは、 B<PROT_WRITE> をセットすると、暗"
6094 "黙のうちに B<PROT_READ> がセットされる。 B<PROT_READ> をセットした際に暗黙の"
6095 "うちに B<PROT_EXEC> がセットされるかどうかは、アーキテクチャ依存である。 移植"
6096 "性を考慮したプログラムでは、 新規にマップした領域でコードを実行したい場合は、"
6097 "常に B<PROT_EXEC> をセットすべきである。"
6098
6099 #. type: Plain text
6100 #: build/C/man2/mmap.2:556
6101 msgid ""
6102 "The portable way to create a mapping is to specify I<addr> as 0 (NULL), and "
6103 "omit B<MAP_FIXED> from I<flags>.  In this case, the system chooses the "
6104 "address for the mapping; the address is chosen so as not to conflict with "
6105 "any existing mapping, and will not be 0.  If the B<MAP_FIXED> flag is "
6106 "specified, and I<addr> is 0 (NULL), then the mapped address will be 0 (NULL)."
6107 msgstr ""
6108 "マッピングを作成する移植性のある方法は、 I<addr> に 0 (NULL) を指定し、 "
6109 "I<flags> から B<MAP_FIXED> を外すことである。 この場合、システムがマッピング"
6110 "用のアドレスの選択を行う。 アドレスは既存のマッピングと衝突しないように、 か"
6111 "つ 0 にならないように選択される。 B<MAP_FIXED> フラグが指定され、かつ "
6112 "I<addr> が 0 (NULL)  の場合には、マップされるアドレスが 0 (NULL) になる。"
6113
6114 #. type: Plain text
6115 #: build/C/man2/mmap.2:585
6116 msgid ""
6117 "Certain I<flags> constants are defined only if either B<_BSD_SOURCE> or "
6118 "B<_SVID_SOURCE> is defined.  (Requiring B<_GNU_SOURCE> also suffices, and "
6119 "requiring that macro specifically would have been more logical, since these "
6120 "flags are all Linux-specific.)  The relevant flags are: B<MAP_32BIT>, "
6121 "B<MAP_ANONYMOUS> (and the synonym B<MAP_ANON>), B<MAP_DENYWRITE>, "
6122 "B<MAP_EXECUTABLE>, B<MAP_FILE>, B<MAP_GROWSDOWN>, B<MAP_HUGETLB>, "
6123 "B<MAP_LOCKED>, B<MAP_NONBLOCK>, B<MAP_NORESERVE>, B<MAP_POPULATE>, and "
6124 "B<MAP_STACK>."
6125 msgstr ""
6126 "特定の I<flags> 定数は B<_BSD_SOURCE> か B<_SVID_SOURCE> のいずれかが定義され"
6127 "た場合にのみ定義される。 (B<_GNU_SOURCE> も定義されている必要がある。これらの"
6128 "フラグはすべて Linux 固有のものなので、 特に B<_GNU_SOURCE> を必要とする点は"
6129 "もっと論理的に決められるべきであった。) 関係するフラグは B<MAP_32BIT>, "
6130 "B<MAP_ANONYMOUS> (とその同義語の 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>, "
6133 "B<MAP_STACK> である。"
6134
6135 #. type: Plain text
6136 #: build/C/man2/mmap.2:590
6137 msgid ""
6138 "On Linux there are no guarantees like those suggested above under "
6139 "B<MAP_NORESERVE>.  By default, any process can be killed at any moment when "
6140 "the system runs out of memory."
6141 msgstr ""
6142 "Linux においては、上記の B<MAP_NORESERVE> で述べられているような保証はない。 "
6143 "デフォルトでは、システムがメモリを使い切った場合には、 どのプロセスがいつ強制"
6144 "終了されるか分からないからである。"
6145
6146 #. type: Plain text
6147 #: build/C/man2/mmap.2:597
6148 msgid ""
6149 "In kernels before 2.6.7, the B<MAP_POPULATE> flag has effect only if I<prot> "
6150 "is specified as B<PROT_NONE>."
6151 msgstr ""
6152 "2.6.7 より前のカーネルでは、 I<prot> に B<PROT_NONE> が指定された場合にの"
6153 "み、 B<MAP_POPULATE> フラグが効力を持つ。"
6154
6155 #. type: Plain text
6156 #: build/C/man2/mmap.2:612
6157 msgid ""
6158 "SUSv3 specifies that B<mmap>()  should fail if I<length> is 0.  However, in "
6159 "kernels before 2.6.12, B<mmap>()  succeeded in this case: no mapping was "
6160 "created and the call returned I<addr>.  Since kernel 2.6.12, B<mmap>()  "
6161 "fails with the error B<EINVAL> for this case."
6162 msgstr ""
6163 "SUSv3 では、 I<length> が 0 の場合、 B<mmap>()  は失敗すると規定されている。"
6164 "しかしながら、2.6.12 より前のカーネルでは、 この場合に B<mmap>()  は成功して"
6165 "いた (マッピングは作成されず、 I<addr> が返されていた)。 カーネル 2.6.12 以降"
6166 "では、 B<mmap>()  はエラー B<EINVAL> で失敗する。"
6167
6168 #. type: Plain text
6169 #: build/C/man2/mmap.2:628
6170 msgid ""
6171 "POSIX specifies that the system shall always zero fill any partial page at "
6172 "the end of the object and that system will never write any modification of "
6173 "the object beyond its end.  On Linux, when you write data to such partial "
6174 "page after the end of the object, the data stays in the page cache even "
6175 "after the file is closed and unmapped and even though the data is never "
6176 "written to the file itself, subsequent mappings may see the modified "
6177 "content.  In some cases, this could be fixed by calling B<msync>(2)  before "
6178 "the unmap takes place; however, this doesn't work on tmpfs (for example, "
6179 "when using POSIX shared memory interface documented in B<shm_overview>(7))."
6180 msgstr ""
6181 "POSIX では、 システムはオブジェクト末尾の部分ページを常に 0 で埋め、 末尾より"
6182 "後ろのオブジェクトを決して変更してはならない、と規定している。 Linux では、 "
6183 "オブジェクト末尾より後ろの部分ページにデータを書き込んだ場合、 そのファイルを"
6184 "クローズしてアンマップした後であってもページキャッシュにデータが残り続け、 "
6185 "データがファイル自体に書き込まれていなくても、 それ以降のマッピングで変更され"
6186 "た内容が見える可能性がある。 いくつかの場合では、 アンマップを行う前に "
6187 "B<msync>(2) を呼び出すことで、 この状況を修正することができる。 しかし、 これ"
6188 "は tmpfs では機能しない (例えば、 B<shm_overview>(7) で説明されている POSIX "
6189 "共有メモリインターフェースを使った場合)。"
6190
6191 #. type: Plain text
6192 #: build/C/man2/mmap.2:640
6193 msgid ""
6194 "The following program prints part of the file specified in its first command-"
6195 "line argument to standard output.  The range of bytes to be printed is "
6196 "specified via offset and length values in the second and third command-line "
6197 "arguments.  The program creates a memory mapping of the required pages of "
6198 "the file and then uses B<write>(2)  to output the desired bytes."
6199 msgstr ""
6200 "以下のプログラムは、一番目のコマンドライン引き数で指定された ファイルの一部を"
6201 "標準出力に表示する。 表示する範囲は、二番目、三番目のコマンドライン引き数で渡"
6202 "される オフセットと長さで指定される。 このプログラムは、指定されたファイルの"
6203 "必要なページのメモリ・ マッピングを作成し、 B<write>(2)  を使って所望のバイト"
6204 "を出力する。"
6205
6206 #. type: Plain text
6207 #: build/C/man2/mmap.2:648
6208 #, no-wrap
6209 msgid ""
6210 "#include E<lt>sys/mman.hE<gt>\n"
6211 "#include E<lt>sys/stat.hE<gt>\n"
6212 "#include E<lt>fcntl.hE<gt>\n"
6213 "#include E<lt>stdio.hE<gt>\n"
6214 "#include E<lt>stdlib.hE<gt>\n"
6215 "#include E<lt>unistd.hE<gt>\n"
6216 msgstr ""
6217 "#include E<lt>sys/mman.hE<gt>\n"
6218 "#include E<lt>sys/stat.hE<gt>\n"
6219 "#include E<lt>fcntl.hE<gt>\n"
6220 "#include E<lt>stdio.hE<gt>\n"
6221 "#include E<lt>stdlib.hE<gt>\n"
6222 "#include E<lt>unistd.hE<gt>\n"
6223
6224 #. type: Plain text
6225 #: build/C/man2/mmap.2:651 build/C/man2/mprotect.2:178
6226 #, no-wrap
6227 msgid ""
6228 "#define handle_error(msg) \\e\n"
6229 "    do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
6230 msgstr ""
6231 "#define handle_error(msg) \\e\n"
6232 "    do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
6233
6234 #. type: Plain text
6235 #: build/C/man2/mmap.2:661
6236 #, no-wrap
6237 msgid ""
6238 "int\n"
6239 "main(int argc, char *argv[])\n"
6240 "{\n"
6241 "    char *addr;\n"
6242 "    int fd;\n"
6243 "    struct stat sb;\n"
6244 "    off_t offset, pa_offset;\n"
6245 "    size_t length;\n"
6246 "    ssize_t s;\n"
6247 msgstr ""
6248 "int\n"
6249 "main(int argc, char *argv[])\n"
6250 "{\n"
6251 "    char *addr;\n"
6252 "    int fd;\n"
6253 "    struct stat sb;\n"
6254 "    off_t offset, pa_offset;\n"
6255 "    size_t length;\n"
6256 "    ssize_t s;\n"
6257
6258 #. type: Plain text
6259 #: build/C/man2/mmap.2:666
6260 #, no-wrap
6261 msgid ""
6262 "    if (argc E<lt> 3 || argc E<gt> 4) {\n"
6263 "        fprintf(stderr, \"%s file offset [length]\\en\", argv[0]);\n"
6264 "        exit(EXIT_FAILURE);\n"
6265 "    }\n"
6266 msgstr ""
6267 "    if (argc E<lt> 3 || argc E<gt> 4) {\n"
6268 "        fprintf(stderr, \"%s file offset [length]\\en\", argv[0]);\n"
6269 "        exit(EXIT_FAILURE);\n"
6270 "    }\n"
6271
6272 #. type: Plain text
6273 #: build/C/man2/mmap.2:670
6274 #, no-wrap
6275 msgid ""
6276 "    fd = open(argv[1], O_RDONLY);\n"
6277 "    if (fd == -1)\n"
6278 "        handle_error(\"open\");\n"
6279 msgstr ""
6280 "    fd = open(argv[1], O_RDONLY);\n"
6281 "    if (fd == -1)\n"
6282 "        handle_error(\"open\");\n"
6283
6284 #. type: Plain text
6285 #: build/C/man2/mmap.2:673
6286 #, no-wrap
6287 msgid ""
6288 "    if (fstat(fd, &sb) == -1)           /* To obtain file size */\n"
6289 "        handle_error(\"fstat\");\n"
6290 msgstr ""
6291 "    if (fstat(fd, &sb) == -1)           /* To obtain file size */\n"
6292 "        handle_error(\"fstat\");\n"
6293
6294 #. type: Plain text
6295 #: build/C/man2/mmap.2:677
6296 #, no-wrap
6297 msgid ""
6298 "    offset = atoi(argv[2]);\n"
6299 "    pa_offset = offset & ~(sysconf(_SC_PAGE_SIZE) - 1);\n"
6300 "        /* offset for mmap() must be page aligned */\n"
6301 msgstr ""
6302 "    offset = atoi(argv[2]);\n"
6303 "    pa_offset = offset & ~(sysconf(_SC_PAGE_SIZE) - 1);\n"
6304 "        /* offset for mmap() must be page aligned */\n"
6305
6306 #. type: Plain text
6307 #: build/C/man2/mmap.2:682
6308 #, no-wrap
6309 msgid ""
6310 "    if (offset E<gt>= sb.st_size) {\n"
6311 "        fprintf(stderr, \"offset is past end of file\\en\");\n"
6312 "        exit(EXIT_FAILURE);\n"
6313 "    }\n"
6314 msgstr ""
6315 "    if (offset E<gt>= sb.st_size) {\n"
6316 "        fprintf(stderr, \"offset is past end of file\\en\");\n"
6317 "        exit(EXIT_FAILURE);\n"
6318 "    }\n"
6319
6320 #. type: Plain text
6321 #: build/C/man2/mmap.2:688
6322 #, no-wrap
6323 msgid ""
6324 "    if (argc == 4) {\n"
6325 "        length = atoi(argv[3]);\n"
6326 "        if (offset + length E<gt> sb.st_size)\n"
6327 "            length = sb.st_size - offset;\n"
6328 "                /* Can\\(aqt display bytes past end of file */\n"
6329 msgstr ""
6330 "    if (argc == 4) {\n"
6331 "        length = atoi(argv[3]);\n"
6332 "        if (offset + length E<gt> sb.st_size)\n"
6333 "            length = sb.st_size - offset;\n"
6334 "                /* Can\\(aqt display bytes past end of file */\n"
6335
6336 #. type: Plain text
6337 #: build/C/man2/mmap.2:692
6338 #, no-wrap
6339 msgid ""
6340 "    } else {    /* No length arg ==E<gt> display to end of file */\n"
6341 "        length = sb.st_size - offset;\n"
6342 "    }\n"
6343 msgstr ""
6344 "    } else {    /* No length arg ==E<gt> display to end of file */\n"
6345 "        length = sb.st_size - offset;\n"
6346 "    }\n"
6347
6348 #. type: Plain text
6349 #: build/C/man2/mmap.2:697
6350 #, no-wrap
6351 msgid ""
6352 "    addr = mmap(NULL, length + offset - pa_offset, PROT_READ,\n"
6353 "                MAP_PRIVATE, fd, pa_offset);\n"
6354 "    if (addr == MAP_FAILED)\n"
6355 "        handle_error(\"mmap\");\n"
6356 msgstr ""
6357 "    addr = mmap(NULL, length + offset - pa_offset, PROT_READ,\n"
6358 "                MAP_PRIVATE, fd, pa_offset);\n"
6359 "    if (addr == MAP_FAILED)\n"
6360 "        handle_error(\"mmap\");\n"
6361
6362 #. type: Plain text
6363 #: build/C/man2/mmap.2:702
6364 #, no-wrap
6365 msgid ""
6366 "    s = write(STDOUT_FILENO, addr + offset - pa_offset, length);\n"
6367 "    if (s != length) {\n"
6368 "        if (s == -1)\n"
6369 "            handle_error(\"write\");\n"
6370 msgstr ""
6371 "    s = write(STDOUT_FILENO, addr + offset - pa_offset, length);\n"
6372 "    if (s != length) {\n"
6373 "        if (s == -1)\n"
6374 "            handle_error(\"write\");\n"
6375
6376 #. type: Plain text
6377 #: build/C/man2/mmap.2:706
6378 #, no-wrap
6379 msgid ""
6380 "        fprintf(stderr, \"partial write\");\n"
6381 "        exit(EXIT_FAILURE);\n"
6382 "    }\n"
6383 msgstr ""
6384 "        fprintf(stderr, \"partial write\");\n"
6385 "        exit(EXIT_FAILURE);\n"
6386 "    }\n"
6387
6388 #. type: Plain text
6389 #: build/C/man2/mmap.2:723
6390 msgid ""
6391 "B<getpagesize>(2), B<mincore>(2), B<mlock>(2), B<mmap2>(2), B<mprotect>(2), "
6392 "B<mremap>(2), B<msync>(2), B<remap_file_pages>(2), B<setrlimit>(2), "
6393 "B<shmat>(2), B<shm_open>(3), B<shm_overview>(7)"
6394 msgstr ""
6395 "B<getpagesize>(2), B<mincore>(2), B<mlock>(2), B<mmap2>(2), B<mprotect>(2), "
6396 "B<mremap>(2), B<msync>(2), B<remap_file_pages>(2), B<setrlimit>(2), "
6397 "B<shmat>(2), B<shm_open>(3), B<shm_overview>(7)"
6398
6399 #. type: Plain text
6400 #: build/C/man2/mmap.2:730
6401 msgid ""
6402 "The descriptions of the following files in B<proc>(5): I</proc/[pid]/maps>, "
6403 "I</proc/[pid]/map_files>, and I</proc/[pid]/smaps>."
6404 msgstr ""
6405 "B<proc>(5) の I</proc/[pid]/maps>, I</proc/[pid]/map_files>, I</proc/[pid]/"
6406 "smaps> の説明。"
6407
6408 #. type: Plain text
6409 #: build/C/man2/mmap.2:735 build/C/man2/msync.2:151
6410 msgid "B.O. Gallmeister, POSIX.4, O'Reilly, pp. 128-129 and 389-391."
6411 msgstr "B.O. Gallmeister, POSIX.4, O'Reilly, pp. 128-129 and 389-391."
6412
6413 #. type: TH
6414 #: build/C/man2/mmap2.2:29
6415 #, no-wrap
6416 msgid "MMAP2"
6417 msgstr "MMAP2"
6418
6419 #. type: TH
6420 #: build/C/man2/mmap2.2:29
6421 #, no-wrap
6422 msgid "2014-02-25"
6423 msgstr "2014-02-25"
6424
6425 #. type: Plain text
6426 #: build/C/man2/mmap2.2:32
6427 msgid "mmap2 - map files or devices into memory"
6428 msgstr "mmap2 - ファイルやデバイスをメモリにマップする"
6429
6430 #. type: Plain text
6431 #: build/C/man2/mmap2.2:38
6432 #, no-wrap
6433 msgid ""
6434 "B<void *mmap2(void *>I<addr>B<, size_t >I<length>B<, int >I<prot>B<,>\n"
6435 "B<             int >I<flags>B<, int >I<fd>B<, off_t >I<pgoffset>B<);>\n"
6436 msgstr ""
6437 "B<void *mmap2(void *>I<addr>B<, size_t >I<length>B<, int >I<prot>B<,>\n"
6438 "B<            int >I<flags>B<, int >I<fd>B<, off_t >I<pgoffset>B<);>\n"
6439
6440 #. type: Plain text
6441 #: build/C/man2/mmap2.2:43
6442 msgid ""
6443 "This is probably not the system call that you are interested in; instead, "
6444 "see B<mmap>(2), which describes the glibc wrapper function that invokes this "
6445 "system call."
6446 msgstr ""
6447 "これはおそらくあなたが興味のあるシステムコールではないだろう。代わりに\n"
6448 "B<mmap>(2) を見るとよい。そのページにはこのシステムコールを起動する glibc "
6449 "の\n"
6450 "ラッパー関数についての説明がある。"
6451
6452 #. type: Plain text
6453 #: build/C/man2/mmap2.2:54
6454 msgid ""
6455 "The B<mmap2>()  system call provides the same interface as B<mmap>(2), "
6456 "except that the final argument specifies the offset into the file in 4096-"
6457 "byte units (instead of bytes, as is done by B<mmap>(2)).  This enables "
6458 "applications that use a 32-bit I<off_t> to map large files (up to 2^44 "
6459 "bytes)."
6460 msgstr ""
6461 "B<mmap2>() システムコールは B<mmap>(2) と同じインターフェースを提供する。た"
6462 "だ\n"
6463 "し、最後の引き数には、ファイルのオフセットを (B<mmap>(2) が行っている、バイ"
6464 "ト\n"
6465 "単位ではなく) 4096 バイトを単位として指定する。 これにより、32 ビットの\n"
6466 "I<off_t> を使うアプリケーションで (2^44 バイトまでの) 大きなファイルをマッ"
6467 "プ\n"
6468 "できるようになる。"
6469
6470 #. type: Plain text
6471 #: build/C/man2/mmap2.2:61
6472 msgid ""
6473 "On success, B<mmap2>()  returns a pointer to the mapped area.  On error, -1 "
6474 "is returned and I<errno> is set appropriately."
6475 msgstr ""
6476 "成功した場合、 B<mmap2>()  はマップされた領域へのポインタを返す。 エラーの場"
6477 "合は -1 が返されて、 I<errno> が適切に設定される。"
6478
6479 #. type: Plain text
6480 #: build/C/man2/mmap2.2:65
6481 msgid "Problem with getting the data from user space."
6482 msgstr "ユーザ空間からデータを取得するときに問題があった。"
6483
6484 #. type: Plain text
6485 #: build/C/man2/mmap2.2:70
6486 msgid ""
6487 "(Various platforms where the page size is not 4096 bytes.)  I<offset\\ *\\ "
6488 "4096> is not a multiple of the system page size."
6489 msgstr ""
6490 "(ページサイズが 4096 バイトでないプラットフォームにおいて)  I<offset\\ *\\ "
6491 "4096> がシステムのページサイズの倍数ではない。"
6492
6493 #. type: Plain text
6494 #: build/C/man2/mmap2.2:74
6495 msgid "B<mmap2>()  can also return any of the errors described in B<mmap>(2)."
6496 msgstr "B<mmap2>() は B<mmap>(2) に載っているエラーを返すこともある。"
6497
6498 #. type: Plain text
6499 #: build/C/man2/mmap2.2:77
6500 msgid "B<mmap2>()  is available since Linux 2.3.31."
6501 msgstr "B<mmap2>()  は、Linux 2.3.31 以降で使用可能である。"
6502
6503 #. type: Plain text
6504 #: build/C/man2/mmap2.2:79 build/C/man2/subpage_prot.2:98
6505 msgid "This system call is Linux-specific."
6506 msgstr "このシステムコールは Linux 独自である。"
6507
6508 #. type: Plain text
6509 #: build/C/man2/mmap2.2:86
6510 msgid ""
6511 "On architectures where this system call is present, the glibc B<mmap>()  "
6512 "wrapper function invokes this system call rather than the B<mmap>(2)  system "
6513 "call."
6514 msgstr ""
6515 "このシステムコールが存在するアーキテクチャーでは、glibc の B<mmap>()  のラッ"
6516 "パー関数は、 B<mmap>(2)  システムコールではなく、このシステムコール "
6517 "(B<mmap2>(2))  を起動する。"
6518
6519 #. type: Plain text
6520 #: build/C/man2/mmap2.2:88
6521 msgid "This system call does not exist on x86-64."
6522 msgstr "このシステムコールは x86-64 には存在しない。"
6523
6524 #.  ia64 can have page sizes ranging from 4kB to 64kB.
6525 #.  On cris, it looks like the unit might also be the page size,
6526 #.  which is 8192 bytes. -- mtk, June 2007
6527 #. type: Plain text
6528 #: build/C/man2/mmap2.2:95
6529 msgid ""
6530 "On ia64, the unit for I<offset> is actually the system page size, rather "
6531 "than 4096 bytes."
6532 msgstr ""
6533 "ia64 では、 I<offset> の単位は、実際にはシステムのページサイズであり、 4096 "
6534 "バイトではない。"
6535
6536 #. type: Plain text
6537 #: build/C/man2/mmap2.2:101
6538 msgid ""
6539 "B<getpagesize>(2), B<mmap>(2), B<mremap>(2), B<msync>(2), B<shm_open>(3)"
6540 msgstr ""
6541 "B<getpagesize>(2), B<mmap>(2), B<mremap>(2), B<msync>(2), B<shm_open>(3)"
6542
6543 #. type: TH
6544 #: build/C/man2/mprotect.2:38
6545 #, no-wrap
6546 msgid "MPROTECT"
6547 msgstr "MPROTECT"
6548
6549 #. type: TH
6550 #: build/C/man2/mprotect.2:38
6551 #, no-wrap
6552 msgid "2014-01-05"
6553 msgstr "2014-01-05"
6554
6555 #. type: Plain text
6556 #: build/C/man2/mprotect.2:41
6557 msgid "mprotect - set protection on a region of memory"
6558 msgstr "mprotect - メモリ領域の保護を設定する"
6559
6560 #. type: Plain text
6561 #: build/C/man2/mprotect.2:46
6562 #, no-wrap
6563 msgid "B<int mprotect(void *>I<addr>B<, size_t >I<len>B<, int >I<prot>B<);>\n"
6564 msgstr "B<int mprotect(void *>I<addr>B<, size_t >I<len>B<, int >I<prot>B<);>\n"
6565
6566 #. type: Plain text
6567 #: build/C/man2/mprotect.2:54
6568 msgid ""
6569 "B<mprotect>()  changes protection for the calling process's memory page(s)  "
6570 "containing any part of the address range in the interval [I<addr>,\\ I<addr>"
6571 "+I<len>-1].  I<addr> must be aligned to a page boundary."
6572 msgstr ""
6573 "B<mprotect>()  は、区間 [I<addr>,\\ I<addr>+I<len>-1] のアドレス範囲を含む 呼"
6574 "び出し元のプロセスのメモリページのアクセス保護を変更する。 I<addr> はページ境"
6575 "界に一致していなければならない。"
6576
6577 #. type: Plain text
6578 #: build/C/man2/mprotect.2:59
6579 msgid ""
6580 "If the calling process tries to access memory in a manner that violates the "
6581 "protection, then the kernel generates a B<SIGSEGV> signal for the process."
6582 msgstr ""
6583 "呼び出し元のプロセスがアクセス保護に違反するようなメモリアクセスを 行おうとす"
6584 "ると、カーネルはシグナル B<SIGSEGV> をそのプロセスに対して生成する。"
6585
6586 #. type: Plain text
6587 #: build/C/man2/mprotect.2:64
6588 msgid ""
6589 "I<prot> is either B<PROT_NONE> or a bitwise-or of the other values in the "
6590 "following list:"
6591 msgstr ""
6592 "I<prot> には、 B<PROT_NONE> か、以下のリストの B<PROT_NONE> 以外の値をビット"
6593 "毎の論理和 (bitwize-or) で指定する:"
6594
6595 #. type: Plain text
6596 #: build/C/man2/mprotect.2:67
6597 msgid "The memory cannot be accessed at all."
6598 msgstr "そのメモリには全くアクセスできない。"
6599
6600 #. type: Plain text
6601 #: build/C/man2/mprotect.2:70
6602 msgid "The memory can be read."
6603 msgstr "そのメモリを読み取ることができる。"
6604
6605 #. type: Plain text
6606 #: build/C/man2/mprotect.2:73
6607 msgid "The memory can be modified."
6608 msgstr "そのメモリを変更できる。"
6609
6610 #.  FIXME
6611 #.  Document PROT_GROWSUP and PROT_GROWSDOWN
6612 #. type: Plain text
6613 #: build/C/man2/mprotect.2:78
6614 msgid "The memory can be executed."
6615 msgstr "そのメモリは実行可能である。"
6616
6617 #. type: Plain text
6618 #: build/C/man2/mprotect.2:85
6619 msgid ""
6620 "On success, B<mprotect>()  returns zero.  On error, -1 is returned, and "
6621 "I<errno> is set appropriately."
6622 msgstr ""
6623 "成功した場合、 B<mprotect>()  は 0 を返す。エラーの場合は -1 が返り、 "
6624 "I<errno> が適切に設定される。"
6625
6626 #. type: Plain text
6627 #: build/C/man2/mprotect.2:95
6628 msgid ""
6629 "The memory cannot be given the specified access.  This can happen, for "
6630 "example, if you B<mmap>(2)  a file to which you have read-only access, then "
6631 "ask B<mprotect>()  to mark it B<PROT_WRITE>."
6632 msgstr ""
6633 "指定されたアクセスをメモリに設定することができない。 これは、例えば ファイル"
6634 "を読み取り専用で B<mmap>(2)  しており、その領域に対して B<mprotect>()  を呼び"
6635 "出して B<PROT_WRITE> に設定しようとした場合に発生する。"
6636
6637 #.  Or: both PROT_GROWSUP and PROT_GROWSDOWN were specified in 'prot'.
6638 #. type: Plain text
6639 #: build/C/man2/mprotect.2:100
6640 msgid ""
6641 "I<addr> is not a valid pointer, or not a multiple of the system page size."
6642 msgstr ""
6643 "I<addr> が有効なポインタでないか、 システムのページサイズの倍数でない。"
6644
6645 #. type: Plain text
6646 #: build/C/man2/mprotect.2:103
6647 msgid "Internal kernel structures could not be allocated."
6648 msgstr "カーネル内部の構造体を割り当てることができなかった。"
6649
6650 #. type: Plain text
6651 #: build/C/man2/mprotect.2:113
6652 msgid ""
6653 "Addresses in the range [I<addr>, I<addr>+I<len>-1] are invalid for the "
6654 "address space of the process, or specify one or more pages that are not "
6655 "mapped.  (Before kernel 2.4.19, the error B<EFAULT> was incorrectly produced "
6656 "for these cases.)"
6657 msgstr ""
6658 "[I<addr>, I<addr>+I<len>-1] という範囲のアドレスがプロセスのアドレス空間とし"
6659 "て不正であるか、 その範囲のアドレスがマップされていない 1 つ以上のページを指"
6660 "している (カーネル 2.4.19 より前では、この状況でエラー B<EFAULT> が間違って生"
6661 "成されていた)。"
6662
6663 #.  SVr4 defines an additional error
6664 #.  code EAGAIN. The SVr4 error conditions don't map neatly onto Linux's.
6665 #. type: Plain text
6666 #: build/C/man2/mprotect.2:122
6667 msgid ""
6668 "SVr4, POSIX.1-2001.  POSIX says that the behavior of B<mprotect>()  is "
6669 "unspecified if it is applied to a region of memory that was not obtained via "
6670 "B<mmap>(2)."
6671 msgstr ""
6672 "SVr4, POSIX.1-2001.  POSIX では、 B<mmap>(2)  経由で獲得していないメモリ領域"
6673 "に対して B<mprotect>()  を行った場合の B<mprotect>()  の動作は未定義であると"
6674 "されている。"
6675
6676 #. type: Plain text
6677 #: build/C/man2/mprotect.2:129
6678 msgid ""
6679 "On Linux it is always permissible to call B<mprotect>()  on any address in a "
6680 "process's address space (except for the kernel vsyscall area).  In "
6681 "particular it can be used to change existing code mappings to be writable."
6682 msgstr ""
6683 "Linux では、(カーネル vsyscall 領域以外の)  任意のプロセスアドレス空間に対し"
6684 "て B<mprotect>()  を呼び出すことが、常に許されている。 これは特に既存のコード"
6685 "マッピングを書き込み可能にするために使われる。"
6686
6687 #. type: Plain text
6688 #: build/C/man2/mprotect.2:139
6689 msgid ""
6690 "Whether B<PROT_EXEC> has any effect different from B<PROT_READ> is "
6691 "architecture- and kernel version-dependent.  On some hardware architectures "
6692 "(e.g., i386), B<PROT_WRITE> implies B<PROT_READ>."
6693 msgstr ""
6694 "B<PROT_EXEC> が B<PROT_READ> と異なる影響を持つか否かは、アーキテクチャとカー"
6695 "ネルのバージョンに依存する。 (i386 などの) いくつかのアーキテクチャでは、 "
6696 "B<PROT_WRITE> をセットすると、暗黙のうちに B<PROT_READ> がセットされる。"
6697
6698 #. type: Plain text
6699 #: build/C/man2/mprotect.2:148
6700 msgid ""
6701 "POSIX.1-2001 says that an implementation may permit access other than that "
6702 "specified in I<prot>, but at a minimum can allow write access only if "
6703 "B<PROT_WRITE> has been set, and must not allow any access if B<PROT_NONE> "
6704 "has been set."
6705 msgstr ""
6706 "POSIX.1-2001 では、 I<prot> で指定されていないアクセスを許可する実装を認めて"
6707 "いる。 ただし、最低限、 B<PROT_WRITE> がセットされている場合にのみ書き込みア"
6708 "クセスが許可され、 B<PROT_NONE> がセットされている場合にはアクセスは許可され"
6709 "ない点だけは 満たす必要がある。"
6710
6711 #. type: Plain text
6712 #: build/C/man2/mprotect.2:154
6713 msgid ""
6714 "The program below allocates four pages of memory, makes the third of these "
6715 "pages read-only, and then executes a loop that walks upward through the "
6716 "allocated region modifying bytes."
6717 msgstr ""
6718 "以下のプログラムは、メモリページを 4つ確保し、そのうち 3番目のページを 読み込"
6719 "み専用に設定する。その後で、確保した領域のアドレスの小さい方から 大きな方に向"
6720 "かって順番にバイト値を変更するループを実行する。"
6721
6722 #. type: Plain text
6723 #: build/C/man2/mprotect.2:157
6724 msgid ""
6725 "An example of what we might see when running the program is the following:"
6726 msgstr "プログラムを実行した場合の一例を以下に示す。"
6727
6728 #. type: Plain text
6729 #: build/C/man2/mprotect.2:163
6730 #, no-wrap
6731 msgid ""
6732 "$B< ./a.out>\n"
6733 "Start of region:        0x804c000\n"
6734 "Got SIGSEGV at address: 0x804e000\n"
6735 msgstr ""
6736 "$B< ./a.out>\n"
6737 "Start of region:        0x804c000\n"
6738 "Got SIGSEGV at address: 0x804e000\n"
6739
6740 #. type: Plain text
6741 #: build/C/man2/mprotect.2:175
6742 #, no-wrap
6743 msgid ""
6744 "#include E<lt>unistd.hE<gt>\n"
6745 "#include E<lt>signal.hE<gt>\n"
6746 "#include E<lt>stdio.hE<gt>\n"
6747 "#include E<lt>malloc.hE<gt>\n"
6748 "#include E<lt>stdlib.hE<gt>\n"
6749 "#include E<lt>errno.hE<gt>\n"
6750 "#include E<lt>sys/mman.hE<gt>\n"
6751 msgstr ""
6752 "#include E<lt>unistd.hE<gt>\n"
6753 "#include E<lt>signal.hE<gt>\n"
6754 "#include E<lt>stdio.hE<gt>\n"
6755 "#include E<lt>malloc.hE<gt>\n"
6756 "#include E<lt>stdlib.hE<gt>\n"
6757 "#include E<lt>errno.hE<gt>\n"
6758 "#include E<lt>sys/mman.hE<gt>\n"
6759
6760 #. type: Plain text
6761 #: build/C/man2/mprotect.2:180
6762 #, no-wrap
6763 msgid "static char *buffer;\n"
6764 msgstr "static char *buffer;\n"
6765
6766 #. type: Plain text
6767 #: build/C/man2/mprotect.2:188
6768 #, no-wrap
6769 msgid ""
6770 "static void\n"
6771 "handler(int sig, siginfo_t *si, void *unused)\n"
6772 "{\n"
6773 "    printf(\"Got SIGSEGV at address: 0x%lx\\en\",\n"
6774 "            (long) si-E<gt>si_addr);\n"
6775 "    exit(EXIT_FAILURE);\n"
6776 "}\n"
6777 msgstr ""
6778 "static void\n"
6779 "handler(int sig, siginfo_t *si, void *unused)\n"
6780 "{\n"
6781 "    printf(\"Got SIGSEGV at address: 0x%lx\\en\",\n"
6782 "            (long) si-E<gt>si_addr);\n"
6783 "    exit(EXIT_FAILURE);\n"
6784 "}\n"
6785
6786 #. type: Plain text
6787 #: build/C/man2/mprotect.2:195
6788 #, no-wrap
6789 msgid ""
6790 "int\n"
6791 "main(int argc, char *argv[])\n"
6792 "{\n"
6793 "    char *p;\n"
6794 "    int pagesize;\n"
6795 "    struct sigaction sa;\n"
6796 msgstr ""
6797 "int\n"
6798 "main(void)\n"
6799 "{\n"
6800 "    char *p;\n"
6801 "    int pagesize;\n"
6802 "    struct sigaction sa;\n"
6803
6804 #. type: Plain text
6805 #: build/C/man2/mprotect.2:201
6806 #, no-wrap
6807 msgid ""
6808 "    sa.sa_flags = SA_SIGINFO;\n"
6809 "    sigemptyset(&sa.sa_mask);\n"
6810 "    sa.sa_sigaction = handler;\n"
6811 "    if (sigaction(SIGSEGV, &sa, NULL) == -1)\n"
6812 "        handle_error(\"sigaction\");\n"
6813 msgstr ""
6814 "    sa.sa_flags = SA_SIGINFO;\n"
6815 "    sigemptyset(&sa.sa_mask);\n"
6816 "    sa.sa_sigaction = handler;\n"
6817 "    if (sigaction(SIGSEGV, &sa, NULL) == -1)\n"
6818 "        handle_error(\"sigaction\");\n"
6819
6820 #. type: Plain text
6821 #: build/C/man2/mprotect.2:205
6822 #, no-wrap
6823 msgid ""
6824 "    pagesize = sysconf(_SC_PAGE_SIZE);\n"
6825 "    if (pagesize == -1)\n"
6826 "        handle_error(\"sysconf\");\n"
6827 msgstr ""
6828 "    pagesize = sysconf(_SC_PAGE_SIZE);\n"
6829 "    if (pagesize == -1)\n"
6830 "        handle_error(\"sysconf\");\n"
6831
6832 #. type: Plain text
6833 #: build/C/man2/mprotect.2:208
6834 #, no-wrap
6835 msgid ""
6836 "    /* Allocate a buffer aligned on a page boundary;\n"
6837 "       initial protection is PROT_READ | PROT_WRITE */\n"
6838 msgstr ""
6839 "    /* Allocate a buffer aligned on a page boundary;\n"
6840 "       initial protection is PROT_READ | PROT_WRITE */\n"
6841
6842 #. type: Plain text
6843 #: build/C/man2/mprotect.2:212
6844 #, no-wrap
6845 msgid ""
6846 "    buffer = memalign(pagesize, 4 * pagesize);\n"
6847 "    if (buffer == NULL)\n"
6848 "        handle_error(\"memalign\");\n"
6849 msgstr ""
6850 "    buffer = memalign(pagesize, 4 * pagesize);\n"
6851 "    if (buffer == NULL)\n"
6852 "        handle_error(\"memalign\");\n"
6853
6854 #. type: Plain text
6855 #: build/C/man2/mprotect.2:214
6856 #, no-wrap
6857 msgid "    printf(\"Start of region:        0x%lx\\en\", (long) buffer);\n"
6858 msgstr "    printf(\"Start of region:        0x%lx\\en\", (long) buffer);\n"
6859
6860 #. type: Plain text
6861 #: build/C/man2/mprotect.2:218
6862 #, no-wrap
6863 msgid ""
6864 "    if (mprotect(buffer + pagesize * 2, pagesize,\n"
6865 "                PROT_READ) == -1)\n"
6866 "        handle_error(\"mprotect\");\n"
6867 msgstr ""
6868 "    if (mprotect(buffer + pagesize * 2, pagesize,\n"
6869 "                PROT_READ) == -1)\n"
6870 "        handle_error(\"mprotect\");\n"
6871
6872 #. type: Plain text
6873 #: build/C/man2/mprotect.2:221
6874 #, no-wrap
6875 msgid ""
6876 "    for (p = buffer ; ; )\n"
6877 "        *(p++) = \\(aqa\\(aq;\n"
6878 msgstr ""
6879 "    for (p = buffer ; ; )\n"
6880 "        *(p++) = \\(aqa\\(aq;\n"
6881
6882 #. type: Plain text
6883 #: build/C/man2/mprotect.2:225
6884 #, no-wrap
6885 msgid ""
6886 "    printf(\"Loop completed\\en\");     /* Should never happen */\n"
6887 "    exit(EXIT_SUCCESS);\n"
6888 "}\n"
6889 msgstr ""
6890 "    printf(\"Loop completed\\en\");     /* Should never happen */\n"
6891 "    exit(EXIT_SUCCESS);\n"
6892 "}\n"
6893
6894 #. type: Plain text
6895 #: build/C/man2/mprotect.2:229
6896 msgid "B<mmap>(2), B<sysconf>(3)"
6897 msgstr "B<mmap>(2), B<sysconf>(3)"
6898
6899 #. type: TH
6900 #: build/C/man2/mremap.2:30
6901 #, no-wrap
6902 msgid "MREMAP"
6903 msgstr "MREMAP"
6904
6905 #. type: TH
6906 #: build/C/man2/mremap.2:30
6907 #, no-wrap
6908 msgid "2010-06-10"
6909 msgstr "2010-06-10"
6910
6911 #. type: Plain text
6912 #: build/C/man2/mremap.2:33
6913 msgid "mremap - remap a virtual memory address"
6914 msgstr "mremap - 仮想メモリ・アドレスを再マッピングする"
6915
6916 #. type: Plain text
6917 #: build/C/man2/mremap.2:36
6918 #, no-wrap
6919 msgid "B<#define _GNU_SOURCE>         /* See feature_test_macros(7) */\n"
6920 msgstr "B<#define _GNU_SOURCE>         /* feature_test_macros(7) 参照 */\n"
6921
6922 #. type: Plain text
6923 #: build/C/man2/mremap.2:41
6924 #, no-wrap
6925 msgid ""
6926 "B<void *mremap(void *>I<old_address>B<, size_t >I<old_size>B<,>\n"
6927 "B<             size_t >I<new_size>B<, int >I<flags>B<, ... /* void *>I<new_address>B< */);>\n"
6928 msgstr ""
6929 "B<void *mremap(void *>I<old_address>B<, size_t >I<old_size>B<,>\n"
6930 "B<             size_t >I<new_size>B<, int >I<flags>B<, ... /* void *>I<new_address>B< */);>\n"
6931
6932 #. type: Plain text
6933 #: build/C/man2/mremap.2:47
6934 msgid ""
6935 "B<mremap>()  expands (or shrinks) an existing memory mapping, potentially "
6936 "moving it at the same time (controlled by the I<flags> argument and the "
6937 "available virtual address space)."
6938 msgstr ""
6939 "B<mremap>()  は既存のメモリ・マッピングの拡張 (または縮小) を行う。 同時に移"
6940 "動されることもある (I<flags> 引き数と利用可能な仮想アドレス空間によって決ま"
6941 "る)。"
6942
6943 #. type: Plain text
6944 #: build/C/man2/mremap.2:61
6945 msgid ""
6946 "I<old_address> is the old address of the virtual memory block that you want "
6947 "to expand (or shrink).  Note that I<old_address> has to be page aligned.  "
6948 "I<old_size> is the old size of the virtual memory block.  I<new_size> is the "
6949 "requested size of the virtual memory block after the resize.  An optional "
6950 "fifth argument, I<new_address>, may be provided; see the description of "
6951 "B<MREMAP_FIXED> below."
6952 msgstr ""
6953 "I<old_address> は拡張 (または縮小) しようとする仮想メモリ・ブロック の元のア"
6954 "ドレスである。I<old_address> はページ境界に合っていなければ ならない点に注意"
6955 "すること。I<old_size> は元の仮想メモリ・ブロックの サイズである。 "
6956 "I<new_size> は要求する変更後の仮想メモリ・ブロックのサイズである。 5 番目の引"
6957 "き数として I<new_address> を指定することができる。下記の B<MREMAP_FIXED> の説"
6958 "明を参照のこと。"
6959
6960 #. type: Plain text
6961 #: build/C/man2/mremap.2:73
6962 msgid ""
6963 "In Linux the memory is divided into pages.  A user process has (one or)  "
6964 "several linear virtual memory segments.  Each virtual memory segment has one "
6965 "or more mappings to real memory pages (in the page table).  Each virtual "
6966 "memory segment has its own protection (access rights), which may cause a "
6967 "segmentation violation if the memory is accessed incorrectly (e.g., writing "
6968 "to a read-only segment).  Accessing virtual memory outside of the segments "
6969 "will also cause a segmentation violation."
6970 msgstr ""
6971 "Linux ではメモリはページに分割される。ユーザー・プロセスは (一つまたは)  複数"
6972 "のリニアな仮想メモリセグメントを持つ。 それぞれの仮想メモリセグメントは一つ以"
6973 "上の実メモリ・ページ にマッピングされている (マッピング情報はページ・テーブル"
6974 "で管理される)。 仮想メモリセグメントにはセグメント毎の保護 (アクセス権) が設"
6975 "定されており、 メモリが不正にアクセスされた場合 (例えば読み込み専用のセグメン"
6976 "トに 書き込んだ場合)、セグメンテーション侵害 (segmentation violation) を 引き"
6977 "起こす。また、セグメント外の仮想メモリにアクセスした場合にも セグメンテーショ"
6978 "ン侵害が発生する。"
6979
6980 #. type: Plain text
6981 #: build/C/man2/mremap.2:81
6982 msgid ""
6983 "B<mremap>()  uses the Linux page table scheme.  B<mremap>()  changes the "
6984 "mapping between virtual addresses and memory pages.  This can be used to "
6985 "implement a very efficient B<realloc>(3)."
6986 msgstr ""
6987 "B<mremap>()  は Linux のページ・テーブル方式を使用する。 B<mremap>()  は仮想"
6988 "アドレスとメモリ・ページのマッピングを変更する。これは非常に効率的な "
6989 "B<realloc>(3)  を実装するのに使用されている。"
6990
6991 #. type: Plain text
6992 #: build/C/man2/mremap.2:83
6993 msgid "The I<flags> bit-mask argument may be 0, or include the following flag:"
6994 msgstr "I<flags> ビットマスク引数は 0 または以下のフラグを含む:"
6995
6996 #. type: TP
6997 #: build/C/man2/mremap.2:83
6998 #, no-wrap
6999 msgid "B<MREMAP_MAYMOVE>"
7000 msgstr "B<MREMAP_MAYMOVE>"
7001
7002 #. type: Plain text
7003 #: build/C/man2/mremap.2:95
7004 msgid ""
7005 "By default, if there is not sufficient space to expand a mapping at its "
7006 "current location, then B<mremap>()  fails.  If this flag is specified, then "
7007 "the kernel is permitted to relocate the mapping to a new virtual address, if "
7008 "necessary.  If the mapping is relocated, then absolute pointers into the old "
7009 "mapping location become invalid (offsets relative to the starting address of "
7010 "the mapping should be employed)."
7011 msgstr ""
7012 "デフォルトでは、現在の位置にマッピングを拡張するための 十分な空きがなければ "
7013 "B<mremap>()  は失敗する。 このフラグが指定されると、カーネルは必要があれば"
7014 "マッピングを 新しい仮想アドレスに再配置することができる マッピングが再配置さ"
7015 "れると、古いマッピング位置への絶対ポインタは 無効になる (マッピングの開始アド"
7016 "レスからの相対オフセットは有効のままである)。"
7017
7018 #. type: TP
7019 #: build/C/man2/mremap.2:95
7020 #, no-wrap
7021 msgid "B<MREMAP_FIXED> (since Linux 2.3.31)"
7022 msgstr "B<MREMAP_FIXED> (Linux 2.3.31 以降)"
7023
7024 #. type: Plain text
7025 #: build/C/man2/mremap.2:117
7026 msgid ""
7027 "This flag serves a similar purpose to the B<MAP_FIXED> flag of B<mmap>(2).  "
7028 "If this flag is specified, then B<mremap>()  accepts a fifth argument, I<void"
7029 "\\ *new_address>, which specifies a page-aligned address to which the "
7030 "mapping must be moved.  Any previous mapping at the address range specified "
7031 "by I<new_address> and I<new_size> is unmapped.  If B<MREMAP_FIXED> is "
7032 "specified, then B<MREMAP_MAYMOVE> must also be specified."
7033 msgstr ""
7034 "このフラグは B<mmap>(2)  の B<MAP_FIXED> フラグと似たような目的で用いられ"
7035 "る。 このフラグが指定されると、 B<mremap>()  は 5 番目の引き数 I<void\\ "
7036 "*new_address> を受け取り、この引数はマッピングが移動されるべきアドレスを指定"
7037 "する。 このアドレスはページ境界に合っていなければならない。 I<new_address> "
7038 "と I<new_size> で指定されるアドレス範囲に過去のマッピングがあった場合、 その"
7039 "マッピングはアンマップされる (unmapped)。 B<MREMAP_FIXED> を指定した場合は、 "
7040 "B<MREMAP_MAYMOVE> も指定しなければならない。"
7041
7042 #. type: Plain text
7043 #: build/C/man2/mremap.2:127
7044 msgid ""
7045 "If the memory segment specified by I<old_address> and I<old_size> is locked "
7046 "(using B<mlock>(2)  or similar), then this lock is maintained when the "
7047 "segment is resized and/or relocated.  As a consequence, the amount of memory "
7048 "locked by the process may change."
7049 msgstr ""
7050 "I<old_address> と I<old_size> で指定されるメモリセグメントが (B<mlock>(2)  や"
7051 "同様のもので) ロックされている場合、セグメントのサイズが変わったり 再配置され"
7052 "たりした時にロックも維持される。 その結果、プロセスによってロックされるメモリ"
7053 "の量は変化する。"
7054
7055 #. type: Plain text
7056 #: build/C/man2/mremap.2:135
7057 msgid ""
7058 "On success B<mremap>()  returns a pointer to the new virtual memory area.  "
7059 "On error, the value B<MAP_FAILED> (that is, I<(void\\ *)\\ -1>) is returned, "
7060 "and I<errno> is set appropriately."
7061 msgstr ""
7062 "成功した場合は B<mremap>()  は新しい仮想メモリ領域へのポインタを返す。 エラー"
7063 "の場合は B<MAP_FAILED> (すなわち I<(void\\ *)\\ -1>) が返され、 I<errno> が適"
7064 "切に設定される。"
7065
7066 #. type: Plain text
7067 #: build/C/man2/mremap.2:142
7068 msgid ""
7069 "The caller tried to expand a memory segment that is locked, but this was not "
7070 "possible without exceeding the B<RLIMIT_MEMLOCK> resource limit."
7071 msgstr ""
7072 "呼び出し元がロックされているメモリセグメントを拡張しようとしたが、 "
7073 "B<RLIMIT_MEMLOCK> リソース制限を越えずにこれを行うことができない。"
7074
7075 #. type: Plain text
7076 #: build/C/man2/mremap.2:151
7077 msgid ""
7078 "\"Segmentation fault.\" Some address in the range I<old_address> to "
7079 "I<old_address>+I<old_size> is an invalid virtual memory address for this "
7080 "process.  You can also get B<EFAULT> even if there exist mappings that cover "
7081 "the whole address space requested, but those mappings are of different types."
7082 msgstr ""
7083 "「セグメンテーション違反(segmentation fault)」 I<old_address> から "
7084 "I<old_address>+I<old_size> の 範囲のアドレスのどれかがこのプロセスにおいて不"
7085 "正な仮想メモリ・アドレスである。 たとえ要求したアドレス空間全体を含むような"
7086 "マッピングがあったとしても、 それらのマッピングが異なった型ならば B<EFAULT> "
7087 "を受け取るだろう。"
7088
7089 #. type: Plain text
7090 #: build/C/man2/mremap.2:179
7091 msgid ""
7092 "An invalid argument was given.  Possible causes are: I<old_address> was not "
7093 "page aligned; a value other than B<MREMAP_MAYMOVE> or B<MREMAP_FIXED> was "
7094 "specified in I<flags>; I<new_size> was zero; I<new_size> or I<new_address> "
7095 "was invalid; or the new address range specified by I<new_address> and "
7096 "I<new_size> overlapped the old address range specified by I<old_address> and "
7097 "I<old_size>; or B<MREMAP_FIXED> was specified without also specifying "
7098 "B<MREMAP_MAYMOVE>."
7099 msgstr ""
7100 "不正な引き数が与えられた。 可能性のある原因は以下の通りである: たいていは "
7101 "I<old_address> がページ境界に 合ってない; I<flags> に B<MREMAP_MAYMOVE> また"
7102 "は B<MREMAP_FIXED> 以外の値が指定されている; I<new_size> がゼロ; I<new_size> "
7103 "または I<new_address> の値が不正; I<new_address> と I<new_size> で指定される"
7104 "新しいアドレス範囲が I<old_address> と I<old_size> で指定される古いアドレス範"
7105 "囲と重なっている; B<MREMAP_FIXED> が指定されているが B<MREMAP_MAYMOVE> が指定"
7106 "されていない。"
7107
7108 #. type: Plain text
7109 #: build/C/man2/mremap.2:185
7110 msgid ""
7111 "The memory area cannot be expanded at the current virtual address, and the "
7112 "B<MREMAP_MAYMOVE> flag is not set in I<flags>.  Or, there is not enough "
7113 "(virtual) memory available."
7114 msgstr ""
7115 "現在の仮想アドレスではメモリ領域が拡張できず、 B<MREMAP_MAYMOVE> フラグが "
7116 "I<flags> に設定されていない。 または十分な (仮想) メモリが存在しない。"
7117
7118 #.  4.2BSD had a (never actually implemented)
7119 #.  .BR mremap (2)
7120 #.  call with completely different semantics.
7121 #. type: Plain text
7122 #: build/C/man2/mremap.2:191
7123 msgid ""
7124 "This call is Linux-specific, and should not be used in programs intended to "
7125 "be portable."
7126 msgstr ""
7127 "このコールは Linux 特有であり、移植を意図したプログラムで 使用すべきではな"
7128 "い。"
7129
7130 #. type: Plain text
7131 #: build/C/man2/mremap.2:199
7132 msgid ""
7133 "Prior to version 2.4, glibc did not expose the definition of "
7134 "B<MREMAP_FIXED>, and the prototype for B<mremap>()  did not allow for the "
7135 "I<new_address> argument."
7136 msgstr ""
7137 "バージョン 2.4 より前の glibc では、 B<MREMAP_FIXED> の定義は公開されておら"
7138 "ず、 B<mremap>()  のプロトタイプは I<new_address> 引き数を取らなかった。"
7139
7140 #. type: Plain text
7141 #: build/C/man2/mremap.2:208
7142 msgid ""
7143 "B<brk>(2), B<getpagesize>(2), B<getrlimit>(2), B<mlock>(2), B<mmap>(2), "
7144 "B<sbrk>(2), B<malloc>(3), B<realloc>(3)"
7145 msgstr ""
7146 "B<brk>(2), B<getpagesize>(2), B<getrlimit>(2), B<mlock>(2), B<mmap>(2), "
7147 "B<sbrk>(2), B<realloc>(3), B<malloc>(3)"
7148
7149 #. type: Plain text
7150 #: build/C/man2/mremap.2:214
7151 msgid ""
7152 "Your favorite text book on operating systems for more information on paged "
7153 "memory (e.g., I<Modern Operating Systems> by Andrew S. Tanenbaum, I<Inside "
7154 "Linux> by Randolf Bentson, I<The Design of the UNIX Operating System> by "
7155 "Maurice J. Bach)"
7156 msgstr ""
7157 "ページ分割されたメモリについてもっと詳しく知りたいならば、あなたのお気に入り"
7158 "のオペレーティングシステムの教科書を参照してほしい (例えば、 I<Modern "
7159 "Operating Systems> by Andrew S. Tanenbaum, I<Inside Linux> by Randolf "
7160 "Bentson, I<The Design of the UNIX Operating System> by Maurice J. Bach.)"
7161
7162 #. type: TH
7163 #: build/C/man2/msync.2:25
7164 #, no-wrap
7165 msgid "MSYNC"
7166 msgstr "MSYNC"
7167
7168 #. type: Plain text
7169 #: build/C/man2/msync.2:28
7170 msgid "msync - synchronize a file with a memory map"
7171 msgstr "msync - ファイルをマップしたメモリと同期させる"
7172
7173 #. type: Plain text
7174 #: build/C/man2/msync.2:32
7175 msgid "B<int msync(void *>I<addr>B<, size_t >I<length>B<, int >I<flags>B<);>"
7176 msgstr "B<int msync(void *>I<addr>B<, size_t >I<length>B<, int >I<flags>B<);>"
7177
7178 #. type: Plain text
7179 #: build/C/man2/msync.2:48
7180 msgid ""
7181 "B<msync>()  flushes changes made to the in-core copy of a file that was "
7182 "mapped into memory using B<mmap>(2)  back to the filesystem.  Without use of "
7183 "this call there is no guarantee that changes are written back before "
7184 "B<munmap>(2)  is called.  To be more precise, the part of the file that "
7185 "corresponds to the memory area starting at I<addr> and having length "
7186 "I<length> is updated."
7187 msgstr ""
7188 "B<msync>()  は B<mmap>(2)  を使ってメモリにマップされたファイルの、 メモリ上"
7189 "のコピーになされた変更をファイルシステムに反映させる。 この関数を使用しない"
7190 "と、 B<munmap>(2)  が呼び出されるまで変更が書き戻される保証はない。 より正確"
7191 "には、ファイルのうち I<addr> から始まり長さ I<length> のメモリ領域に対応する"
7192 "部分が更新される。"
7193
7194 #. type: Plain text
7195 #: build/C/man2/msync.2:68
7196 msgid ""
7197 "The I<flags> argument may have the bits B<MS_ASYNC>, B<MS_SYNC>, and "
7198 "B<MS_INVALIDATE> set, but not both B<MS_ASYNC> and B<MS_SYNC>.  B<MS_ASYNC> "
7199 "specifies that an update be scheduled, but the call returns immediately.  "
7200 "B<MS_SYNC> asks for an update and waits for it to complete.  "
7201 "B<MS_INVALIDATE> asks to invalidate other mappings of the same file (so that "
7202 "they can be updated with the fresh values just written)."
7203 msgstr ""
7204 "I<flags> 引数にはビット B<MS_ASYNC>, B<MS_SYNC>, B<MS_INVALIDATE> を設定する"
7205 "ことができるが、 B<MS_ASYNC> と B<MS_SYNC> を同時に指定することはできない。 "
7206 "B<MS_ASYNC> は更新を予定に組み込むことを表し、呼び出しは直ちに返る。 "
7207 "B<MS_SYNC> は更新を要求し、更新が完了するまで待つ。 B<MS_INVALIDATE> は(たっ"
7208 "た今書き込んだ新しい値でマッピングを更新することができるように)  同じファイル"
7209 "に対する他のマッピングを無効にすることを要求する。"
7210
7211 #. type: Plain text
7212 #: build/C/man2/msync.2:73
7213 msgid ""
7214 "On success, zero is returned.  On error, -1 is returned, and I<errno> is set "
7215 "appropriately."
7216 msgstr ""
7217 "成功した場合、 0 が返る。エラーの場合、 -1 が返り、 I<errno> が適切に設定され"
7218 "る。"
7219
7220 #. type: TP
7221 #: build/C/man2/msync.2:74
7222 #, no-wrap
7223 msgid "B<EBUSY>"
7224 msgstr "B<EBUSY>"
7225
7226 #. type: Plain text
7227 #: build/C/man2/msync.2:80
7228 msgid ""
7229 "B<MS_INVALIDATE> was specified in I<flags>, and a memory lock exists for the "
7230 "specified address range."
7231 msgstr ""
7232 "I flags に B<MS_INVALIDATE> が指定されたが、指定されたアドレス範囲にロックが"
7233 "存在する。"
7234
7235 #. type: Plain text
7236 #: build/C/man2/msync.2:93
7237 msgid ""
7238 "I<addr> is not a multiple of PAGESIZE; or any bit other than B<MS_ASYNC> | "
7239 "B<MS_INVALIDATE> | B<MS_SYNC> is set in I<flags>; or both B<MS_SYNC> and "
7240 "B<MS_ASYNC> are set in I<flags>."
7241 msgstr ""
7242 "I<addr> が PAGESIZE の倍数でない。または、 I<flags> に B<MS_ASYNC>、"
7243 "B<MS_INVALIDATE>、B<MS_SYNC> 以外のビットが設定された。 または、 I<flags> に "
7244 "B<MS_SYNC> と B<MS_ASYNC> の両方が設定された。"
7245
7246 #. type: Plain text
7247 #: build/C/man2/msync.2:96
7248 msgid "The indicated memory (or part of it) was not mapped."
7249 msgstr "指定されたメモリ (またはその一部) がマップされていない。"
7250
7251 #. type: Plain text
7252 #: build/C/man2/msync.2:98 build/C/man3/posix_fallocate.3:105
7253 #: build/C/man3/shm_open.3:253 build/C/man7/shm_overview.7:103
7254 msgid "POSIX.1-2001."
7255 msgstr "POSIX.1-2001."
7256
7257 #. type: Plain text
7258 #: build/C/man2/msync.2:105
7259 msgid ""
7260 "This call was introduced in Linux 1.3.21, and then used B<EFAULT> instead of "
7261 "B<ENOMEM>.  In Linux 2.4.19, this was changed to the POSIX value B<ENOMEM>."
7262 msgstr ""
7263 "この関数は Linux 1.3.21 で導入されたが、 B<ENOMEM> ではなく B<EFAULT> が使わ"
7264 "れていた。 これは Linux 2.4.19 で POSIX における値 B<ENOMEM> に変更された。"
7265
7266 #.  POSIX.1-2001: It shall be defined to -1 or 0 or 200112L.
7267 #.  -1: unavailable, 0: ask using sysconf().
7268 #.  glibc defines them to 1.
7269 #. type: Plain text
7270 #: build/C/man2/msync.2:120
7271 msgid ""
7272 "On POSIX systems on which B<msync>()  is available, both "
7273 "B<_POSIX_MAPPED_FILES> and B<_POSIX_SYNCHRONIZED_IO> are defined in "
7274 "I<E<lt>unistd.hE<gt>> to a value greater than 0.  (See also B<sysconf>(3).)"
7275 msgstr ""
7276 "B<msync>()  が使用可能な POSIX システムでは B<_POSIX_MAPPED_FILES> と "
7277 "B<_POSIX_SYNCHRONIZED_IO> の両方が I<E<lt>unistd.hE<gt>> で 0 より大きい値に"
7278 "定義される。 (B<sysconf>(3)  を参照すること。 )"
7279
7280 #.  commit 204ec841fbea3e5138168edbc3a76d46747cc987
7281 #. type: Plain text
7282 #: build/C/man2/msync.2:147
7283 msgid ""
7284 "According to POSIX, either B<MS_SYNC> or B<MS_ASYNC> must be specified in "
7285 "I<flags>, and indeed failure to include one of these flags will cause "
7286 "B<msync>()  to fail on some systems.  However, Linux permits a call to "
7287 "B<msync>()  that specifies neither of these flags, with semantics that are "
7288 "(currently) equivalent to specifying B<MS_ASYNC>.  (Since Linux 2.6.19, "
7289 "B<MS_ASYNC> is in fact a no-op, since the kernel properly tracks dirty pages "
7290 "and flushes them to storage as necessary.)  Notwithstanding the Linux "
7291 "behavior, portable, future-proof applications should ensure that they "
7292 "specify either B<MS_SYNC> or B<MS_ASYNC> in I<flags>."
7293 msgstr ""
7294 "POSIX では B<MS_SYNC> と B<MS_ASYNC> のいずれかは必ず I<flags> に指定しなけれ"
7295 "ばならないとされており、 実際にこれらのフラグのいずれかを指定しなかった場合 "
7296 "B<msync>() が失敗するシステムもある。 しかし、 Linux ではこれらのフラグのいず"
7297 "れも指定せずに B<msync>() を呼び出すことができ、 その場合の動作は (現在のとこ"
7298 "ろ) B<MS_ASYNC> を指定した場合と等価である。 (Linux 2.6.19 以降では "
7299 "B<MS_ASYNC> は実際には no-op (何もしない命令) である。 これはカーネルが正し"
7300 "く dirty ページを追跡し、必要に応じてストレージにそれらをフラッシュするからで"
7301 "ある。) Linux の動作に関係なく、アプリケーションの移植性を考慮し、将来も確実"
7302 "に動くようにするには、 B<MS_SYNC> か B<MS_ASYNC> のいずれかを必ず I<flags> に"
7303 "指定するようにすべきである。"
7304
7305 #. type: TP
7306 #: build/C/man2/msync.2:149 build/C/man7/shm_overview.7:46
7307 #, no-wrap
7308 msgid "B<mmap>(2)"
7309 msgstr "B<mmap>(2)"
7310
7311 #. type: TH
7312 #: build/C/man3/mtrace.3:25
7313 #, no-wrap
7314 msgid "MTRACE"
7315 msgstr "MTRACE"
7316
7317 #. type: TH
7318 #: build/C/man3/mtrace.3:25
7319 #, no-wrap
7320 msgid "2012-04-18"
7321 msgstr "2012-04-18"
7322
7323 #. type: Plain text
7324 #: build/C/man3/mtrace.3:28
7325 msgid "mtrace, muntrace - malloc tracing"
7326 msgstr "mtrace, muntrace - malloc のトレース"
7327
7328 #. type: Plain text
7329 #: build/C/man3/mtrace.3:30
7330 msgid "B<#include E<lt>mcheck.hE<gt>>"
7331 msgstr "B<#include E<lt>mcheck.hE<gt>>"
7332
7333 #. type: Plain text
7334 #: build/C/man3/mtrace.3:32
7335 msgid "B<void mtrace(void);>"
7336 msgstr "B<void mtrace(void);>"
7337
7338 #. type: Plain text
7339 #: build/C/man3/mtrace.3:34
7340 msgid "B<void muntrace(void);>"
7341 msgstr "B<void muntrace(void);>"
7342
7343 #. type: Plain text
7344 #: build/C/man3/mtrace.3:46
7345 msgid ""
7346 "The B<mtrace>()  function installs hook functions for the memory-allocation "
7347 "functions (B<malloc>(3), B<realloc>(3)  B<memalign>(3), B<free>(3)).  These "
7348 "hook functions record tracing information about memory allocation and "
7349 "deallocation.  The tracing information can be used to discover memory leaks "
7350 "and attempts to free nonallocated memory in a program."
7351 msgstr ""
7352
7353 #. type: Plain text
7354 #: build/C/man3/mtrace.3:57
7355 msgid ""
7356 "The B<muntrace>()  function disables the hook functions installed by "
7357 "B<mtrace>(), so that tracing information is no longer recorded for the "
7358 "memory-allocation functions.  If no hook functions were successfully "
7359 "installed by B<mtrace>(), B<muntrace>()  does nothing."
7360 msgstr ""
7361
7362 #. type: Plain text
7363 #: build/C/man3/mtrace.3:65
7364 msgid ""
7365 "When B<mtrace>()  is called, it checks the value of the environment variable "
7366 "B<MALLOC_TRACE>, which should contain the pathname of a file in which the "
7367 "tracing information is to be recorded.  If the pathname is successfully "
7368 "opened, it is truncated to zero length."
7369 msgstr ""
7370
7371 #. type: Plain text
7372 #: build/C/man3/mtrace.3:78
7373 msgid ""
7374 "If B<MALLOC_TRACE> is not set, or the pathname it specifies is invalid or "
7375 "not writable, then no hook functions are installed, and B<mtrace>()  has no "
7376 "effect.  In set-user-ID and set-group-ID programs, B<MALLOC_TRACE> is "
7377 "ignored, and B<mtrace>()  has no effect."
7378 msgstr ""
7379
7380 #. type: Plain text
7381 #: build/C/man3/mtrace.3:86
7382 msgid ""
7383 "In normal usage, B<mtrace>()  is called once at the start of execution of a "
7384 "program, and B<muntrace>()  is never called."
7385 msgstr ""
7386
7387 #. type: Plain text
7388 #: build/C/man3/mtrace.3:96
7389 msgid ""
7390 "The tracing output produced after a call to B<mtrace>()  is textual, but not "
7391 "designed to be human readable.  The GNU C library provides a Perl script, "
7392 "B<mtrace>(1), that interprets the trace log and produces human-readable "
7393 "output.  For best results, the traced program should be compiled with "
7394 "debugging enabled, so that line-number information is recorded in the "
7395 "executable."
7396 msgstr ""
7397
7398 #. type: Plain text
7399 #: build/C/man3/mtrace.3:102
7400 msgid ""
7401 "The tracing performed by B<mtrace>()  incurs a performance penalty (if "
7402 "B<MALLOC_TRACE> points to a valid, writable pathname)."
7403 msgstr ""
7404
7405 #. type: Plain text
7406 #: build/C/man3/mtrace.3:108
7407 msgid ""
7408 "The line-number information produced by B<mtrace>(1)  is not always precise: "
7409 "the line number references may refer to the previous or following "
7410 "(nonblank)  line of the source code."
7411 msgstr ""
7412
7413 #. type: Plain text
7414 #: build/C/man3/mtrace.3:115
7415 msgid ""
7416 "The shell session below demonstrates the use of the B<mtrace>()  function "
7417 "and the B<mtrace>(1)  command in a program that has memory leaks at two "
7418 "different locations.  The demonstration uses the following program:"
7419 msgstr ""
7420
7421 #. type: Plain text
7422 #: build/C/man3/mtrace.3:122
7423 #, no-wrap
7424 msgid ""
7425 "$ B<cat t_mtrace.c>\n"
7426 "#include E<lt>mcheck.hE<gt>\n"
7427 "#include E<lt>stdlib.hE<gt>\n"
7428 "#include E<lt>stdio.hE<gt>\n"
7429 msgstr ""
7430 "$ B<cat t_mtrace.c>\n"
7431 "#include E<lt>mcheck.hE<gt>\n"
7432 "#include E<lt>stdlib.hE<gt>\n"
7433 "#include E<lt>stdio.hE<gt>\n"
7434
7435 #. type: Plain text
7436 #: build/C/man3/mtrace.3:127
7437 #, no-wrap
7438 msgid ""
7439 "int\n"
7440 "main(int argc, char *argv[])\n"
7441 "{\n"
7442 "    int j;\n"
7443 msgstr ""
7444 "int\n"
7445 "main(int argc, char *argv[])\n"
7446 "{\n"
7447 "    int j;\n"
7448
7449 #. type: Plain text
7450 #: build/C/man3/mtrace.3:129
7451 #, no-wrap
7452 msgid "    mtrace();\n"
7453 msgstr "    mtrace();\n"
7454
7455 #. type: Plain text
7456 #: build/C/man3/mtrace.3:132
7457 #, no-wrap
7458 msgid ""
7459 "    for (j = 0; j E<lt> 2; j++)\n"
7460 "        malloc(100);            /* Never freed--a memory leak */\n"
7461 msgstr ""
7462 "    for (j = 0; j E<lt> 2; j++)\n"
7463 "        malloc(100);            /* Never freed--a memory leak */\n"
7464
7465 #. type: Plain text
7466 #: build/C/man3/mtrace.3:136
7467 #, no-wrap
7468 msgid ""
7469 "    calloc(16, 16);             /* Never freed--a memory leak */\n"
7470 "    exit(EXIT_SUCCESS);\n"
7471 "}\n"
7472 msgstr ""
7473 "    calloc(16, 16);             /* Never freed--a memory leak */\n"
7474 "    exit(EXIT_SUCCESS);\n"
7475 "}\n"
7476
7477 #. type: Plain text
7478 #: build/C/man3/mtrace.3:142
7479 msgid ""
7480 "When we run the program as follows, we see that B<mtrace>()  diagnosed "
7481 "memory leaks at two different locations in the program:"
7482 msgstr ""
7483
7484 #. type: Plain text
7485 #: build/C/man3/mtrace.3:155
7486 #, no-wrap
7487 msgid ""
7488 "$ B<cc -g t_mtrace.c -o t_mtrace>\n"
7489 "$ B<export MALLOC_TRACE=/tmp/t>\n"
7490 "$ B<./t_mtrace>\n"
7491 "$ B<mtrace ./t_mtrace $MALLOC_TRACE>\n"
7492 "Memory not freed:\n"
7493 "-----------------\n"
7494 "   Address     Size     Caller\n"
7495 "0x084c9378     0x64  at /home/cecilia/t_mtrace.c:12\n"
7496 "0x084c93e0     0x64  at /home/cecilia/t_mtrace.c:12\n"
7497 "0x084c9448    0x100  at /home/cecilia/t_mtrace.c:16\n"
7498 msgstr ""
7499 "$ B<cc -g t_mtrace.c -o t_mtrace>\n"
7500 "$ B<export MALLOC_TRACE=/tmp/t>\n"
7501 "$ B<./t_mtrace>\n"
7502 "$ B<mtrace ./t_mtrace $MALLOC_TRACE>\n"
7503 "Memory not freed:\n"
7504 "-----------------\n"
7505 "   Address     Size     Caller\n"
7506 "0x084c9378     0x64  at /home/cecilia/t_mtrace.c:12\n"
7507 "0x084c93e0     0x64  at /home/cecilia/t_mtrace.c:12\n"
7508 "0x084c9448    0x100  at /home/cecilia/t_mtrace.c:16\n"
7509
7510 #. type: Plain text
7511 #: build/C/man3/mtrace.3:167
7512 msgid ""
7513 "The first two messages about unfreed memory correspond to the two "
7514 "B<malloc>(3)  calls inside the I<for> loop.  The final message corresponds "
7515 "to the call to B<calloc>(3)  (which in turn calls B<malloc>(3))."
7516 msgstr ""
7517
7518 #. type: Plain text
7519 #: build/C/man3/mtrace.3:172
7520 msgid "B<mtrace>(1), B<malloc>(3), B<malloc_hook>(3), B<mcheck>(3)"
7521 msgstr "B<mtrace>(1), B<malloc>(3), B<malloc_hook>(3), B<mcheck>(3)"
7522
7523 #. type: TH
7524 #: build/C/man2/posix_fadvise.2:28
7525 #, no-wrap
7526 msgid "POSIX_FADVISE"
7527 msgstr "POSIX_FADVISE"
7528
7529 #. type: TH
7530 #: build/C/man2/posix_fadvise.2:28
7531 #, no-wrap
7532 msgid "2014-05-03"
7533 msgstr "2014-05-03"
7534
7535 #. type: Plain text
7536 #: build/C/man2/posix_fadvise.2:31
7537 msgid "posix_fadvise - predeclare an access pattern for file data"
7538 msgstr "posix_fadvise - ファイルデータのアクセスパターンをあらかじめ宣言する"
7539
7540 #. type: Plain text
7541 #: build/C/man2/posix_fadvise.2:34 build/C/man3/posix_fallocate.3:31
7542 #, no-wrap
7543 msgid "B<#include E<lt>fcntl.hE<gt>>\n"
7544 msgstr "B<#include E<lt>fcntl.hE<gt>>\n"
7545
7546 #. type: Plain text
7547 #: build/C/man2/posix_fadvise.2:37
7548 #, no-wrap
7549 msgid "B<int posix_fadvise(int >I<fd>B<, off_t >I<offset>B<, off_t >I<len>B<, int >I<advice>B<);>\n"
7550 msgstr "B<int posix_fadvise(int >I<fd>B<, off_t >I<offset>B<, off_t >I<len>B<, int >I<advice>B<);>\n"
7551
7552 #. type: Plain text
7553 #: build/C/man2/posix_fadvise.2:46
7554 msgid "B<posix_fadvise>():"
7555 msgstr "B<posix_fadvise>():"
7556
7557 #. type: Plain text
7558 #: build/C/man2/posix_fadvise.2:48 build/C/man3/posix_fallocate.3:44
7559 msgid "_XOPEN_SOURCE\\ E<gt>=\\ 600 || _POSIX_C_SOURCE\\ E<gt>=\\ 200112L"
7560 msgstr "_XOPEN_SOURCE\\ E<gt>=\\ 600 || _POSIX_C_SOURCE\\ E<gt>=\\ 200112L"
7561
7562 #. type: Plain text
7563 #: build/C/man2/posix_fadvise.2:56
7564 msgid ""
7565 "Programs can use B<posix_fadvise>()  to announce an intention to access file "
7566 "data in a specific pattern in the future, thus allowing the kernel to "
7567 "perform appropriate optimizations."
7568 msgstr ""
7569 "プログラムは、将来特定のパターンでファイルデータに アクセスする意思を伝えるた"
7570 "めに B<posix_fadvise>()  を使うことができる。 これにより、カーネルが適切な最"
7571 "適化を実行することが可能になる。"
7572
7573 #. type: Plain text
7574 #: build/C/man2/posix_fadvise.2:63
7575 msgid ""
7576 "The I<advice> applies to a (not necessarily existent) region starting at "
7577 "I<offset> and extending for I<len> bytes (or until the end of the file if "
7578 "I<len> is 0) within the file referred to by I<fd>.  The I<advice> is not "
7579 "binding; it merely constitutes an expectation on behalf of the application."
7580 msgstr ""
7581 "I<advice> は I<fd> が参照しているファイルの I<offset> から始まる I<len> バ"
7582 "イ\n"
7583 "トの範囲内 (I<len> が 0 の場合はファイルの終りまで) の (必ずしも存在しない)\n"
7584 "領域に適用される。 I<advice> は義務づけではない。 I<advice> は単にアプリ"
7585 "ケー\n"
7586 "ションのために可能性を構成するだけである。"
7587
7588 #. type: Plain text
7589 #: build/C/man2/posix_fadvise.2:65
7590 msgid "Permissible values for I<advice> include:"
7591 msgstr "I<advice> に許される値には、以下のものが含まれる:"
7592
7593 #. type: TP
7594 #: build/C/man2/posix_fadvise.2:65
7595 #, no-wrap
7596 msgid "B<POSIX_FADV_NORMAL>"
7597 msgstr "B<POSIX_FADV_NORMAL>"
7598
7599 #. type: Plain text
7600 #: build/C/man2/posix_fadvise.2:71
7601 msgid ""
7602 "Indicates that the application has no advice to give about its access "
7603 "pattern for the specified data.  If no advice is given for an open file, "
7604 "this is the default assumption."
7605 msgstr ""
7606 "指定されたデータのアクセスパターンを指示するアドバイスを アプリケーションが何"
7607 "も持っていないことを示す。 オープンされたファイルにアドバイスが指定されない場"
7608 "合、 これがデフォルトで仮定される。"
7609
7610 #. type: TP
7611 #: build/C/man2/posix_fadvise.2:71
7612 #, no-wrap
7613 msgid "B<POSIX_FADV_SEQUENTIAL>"
7614 msgstr "B<POSIX_FADV_SEQUENTIAL>"
7615
7616 #. type: Plain text
7617 #: build/C/man2/posix_fadvise.2:75
7618 msgid ""
7619 "The application expects to access the specified data sequentially (with "
7620 "lower offsets read before higher ones)."
7621 msgstr ""
7622 "アプリケーションは指定されたデータがシーケンシャルに (大きなオフセットの前に"
7623 "小さなオフセットのデータを読むように)  アクセスされることを期待する。"
7624
7625 #. type: TP
7626 #: build/C/man2/posix_fadvise.2:75
7627 #, no-wrap
7628 msgid "B<POSIX_FADV_RANDOM>"
7629 msgstr "B<POSIX_FADV_RANDOM>"
7630
7631 #. type: Plain text
7632 #: build/C/man2/posix_fadvise.2:78
7633 msgid "The specified data will be accessed in random order."
7634 msgstr "指定されたデータがランダムな順番でアクセスされる。"
7635
7636 #. type: TP
7637 #: build/C/man2/posix_fadvise.2:78
7638 #, no-wrap
7639 msgid "B<POSIX_FADV_NOREUSE>"
7640 msgstr "B<POSIX_FADV_NOREUSE>"
7641
7642 #. type: Plain text
7643 #: build/C/man2/posix_fadvise.2:81
7644 msgid "The specified data will be accessed only once."
7645 msgstr "指定されたデータは 1 度しかアクセスされない。"
7646
7647 #. type: TP
7648 #: build/C/man2/posix_fadvise.2:81
7649 #, no-wrap
7650 msgid "B<POSIX_FADV_WILLNEED>"
7651 msgstr "B<POSIX_FADV_WILLNEED>"
7652
7653 #. type: Plain text
7654 #: build/C/man2/posix_fadvise.2:84
7655 msgid "The specified data will be accessed in the near future."
7656 msgstr "指定されたデータは近い将来アクセスされる。"
7657
7658 #. type: TP
7659 #: build/C/man2/posix_fadvise.2:84
7660 #, no-wrap
7661 msgid "B<POSIX_FADV_DONTNEED>"
7662 msgstr "B<POSIX_FADV_DONTNEED>"
7663
7664 #. type: Plain text
7665 #: build/C/man2/posix_fadvise.2:87
7666 msgid "The specified data will not be accessed in the near future."
7667 msgstr "指定されたデータは近い将来アクセスされない。"
7668
7669 #. type: Plain text
7670 #: build/C/man2/posix_fadvise.2:90
7671 msgid "On success, zero is returned.  On error, an error number is returned."
7672 msgstr "成功した場合は 0 が返される。 失敗した場合はエラー番号が返される。"
7673
7674 #. type: Plain text
7675 #: build/C/man2/posix_fadvise.2:94
7676 msgid "The I<fd> argument was not a valid file descriptor."
7677 msgstr "I<fd> 引き数が有効なファイルディスクリプタでない。"
7678
7679 #. type: Plain text
7680 #: build/C/man2/posix_fadvise.2:97
7681 msgid "An invalid value was specified for I<advice>."
7682 msgstr "無効な値が I<advice> に指定された。"
7683
7684 #. type: Plain text
7685 #: build/C/man2/posix_fadvise.2:104
7686 msgid ""
7687 "The specified file descriptor refers to a pipe or FIFO.  (Linux actually "
7688 "returns B<EINVAL> in this case.)"
7689 msgstr ""
7690 "指定されたファイルディスクリプタがパイプまたは FIFO を参照している (この場"
7691 "合、Linux は実際には B<EINVAL> を返す)。"
7692
7693 #.  of fadvise64_64()
7694 #. type: Plain text
7695 #: build/C/man2/posix_fadvise.2:112
7696 msgid ""
7697 "Kernel support first appeared in Linux 2.5.60; the underlying system call is "
7698 "called B<fadvise64>().  Library support has been provided since glibc "
7699 "version 2.2, via the wrapper function B<posix_fadvise>()."
7700 msgstr ""
7701 "カーネルによるサポートは Linux 2.5.60 で最初に登場し、\n"
7702 "対応するシステムコールは B<fadvise64>() という名前である。\n"
7703 "ライブラリによるサポートは glibc バージョン 2.2 以降で提供されており、\n"
7704 "ラッパー関数は B<posix_fadvise>() という名前である。"
7705
7706 #. type: Plain text
7707 #: build/C/man2/posix_fadvise.2:121
7708 msgid ""
7709 "POSIX.1-2001.  Note that the type of the I<len> argument was changed from "
7710 "I<size_t> to I<off_t> in POSIX.1-2003 TC1."
7711 msgstr ""
7712 "POSIX.1-2001.  I<len> 引き数の型が POSIX.1-2003 TC1 において I<size_t> から "
7713 "I<off_t> に変更された点に注意すること。"
7714
7715 #. type: Plain text
7716 #: build/C/man2/posix_fadvise.2:127
7717 msgid ""
7718 "Under Linux, B<POSIX_FADV_NORMAL> sets the readahead window to the default "
7719 "size for the backing device; B<POSIX_FADV_SEQUENTIAL> doubles this size, and "
7720 "B<POSIX_FADV_RANDOM> disables file readahead entirely.  These changes affect "
7721 "the entire file, not just the specified region (but other open file handles "
7722 "to the same file are unaffected)."
7723 msgstr ""
7724 "Linux では、B<POSIX_FADV_NORMAL> はバッキングデバイスの デフォルトサイズに先"
7725 "読み (readahead) ウインドウを設定する。 B<POSIX_FADV_SEQUENTIAL> はこのサイズ"
7726 "を 2 倍し、 B<POSIX_FADV_RANDOM> は先読みを全く無効にする。 これらの変更は"
7727 "ファイル全体に影響し、指定された領域のみに影響するわけではない (しかし同じ"
7728 "ファイルに対する他のオープンファイルハンドルは影響を受けない)。"
7729
7730 #. type: Plain text
7731 #: build/C/man2/posix_fadvise.2:134
7732 msgid ""
7733 "B<POSIX_FADV_WILLNEED> initiates a nonblocking read of the specified region "
7734 "into the page cache.  The amount of data read may be decreased by the kernel "
7735 "depending on virtual memory load.  (A few megabytes will usually be fully "
7736 "satisfied, and more is rarely useful.)"
7737 msgstr ""
7738 "B<POSIX_FADV_WILLNEED> は、 ページキャッシュに指定領域のブロックされない読み"
7739 "込みを開始する。 読み込まれるデータの総量は、 仮想メモリの負荷に依ってカーネ"
7740 "ルが減らすかもしれない (数メガバイトであれば通常は全く十分であり、 それより多"
7741 "くてもめったに役に立たない)。"
7742
7743 #. type: Plain text
7744 #: build/C/man2/posix_fadvise.2:138
7745 msgid ""
7746 "In kernels before 2.6.18, B<POSIX_FADV_NOREUSE> had the same semantics as "
7747 "B<POSIX_FADV_WILLNEED>.  This was probably a bug; since kernel 2.6.18, this "
7748 "flag is a no-op."
7749 msgstr ""
7750 "2.6.18 より前のカーネルでは、B<POSIX_FADV_NOREUSE> は B<POSIX_FADV_WILLNEED> "
7751 "と同じ意味であった。 これは多分バグであった。 カーネル 2.6.18 以降では、この"
7752 "フラグは何も行わない。"
7753
7754 #. type: Plain text
7755 #: build/C/man2/posix_fadvise.2:146
7756 msgid ""
7757 "B<POSIX_FADV_DONTNEED> attempts to free cached pages associated with the "
7758 "specified region.  This is useful, for example, while streaming large "
7759 "files.  A program may periodically request the kernel to free cached data "
7760 "that has already been used, so that more useful cached pages are not "
7761 "discarded instead."
7762 msgstr ""
7763 "B<POSIX_FADV_DONTNEED> は指定された領域に関連付けられた キャッシュページを解"
7764 "放しようとする。 例えば、これは大きなファイルをストリーミングするときに役立"
7765 "つ。 プログラムは、使用済みのキャッシュされたデータを解放するように、 定期的"
7766 "にカーネルに要求するかもしれない。 そうすることにより、さらに有効なキャッシュ"
7767 "されたページが、 代わりに破棄されることはない。"
7768
7769 #. type: Plain text
7770 #: build/C/man2/posix_fadvise.2:154
7771 msgid ""
7772 "Pages that have not yet been written out will be unaffected, so if the "
7773 "application wishes to guarantee that pages will be released, it should call "
7774 "B<fsync>(2)  or B<fdatasync>(2)  first."
7775 msgstr ""
7776 "まだ書き出されていないページは影響を受けないので、 そのページの解放が保証され"
7777 "ることをアプリケーションが望んでいるなら、 最初に B<fsync>(2)  または "
7778 "B<fdatasync>(2)  を呼ぶべきである。"
7779
7780 #. type: SS
7781 #: build/C/man2/posix_fadvise.2:154
7782 #, no-wrap
7783 msgid "Architecture-specific variants"
7784 msgstr "アーキテクチャ固有の派生バージョン"
7785
7786 #. type: Plain text
7787 #: build/C/man2/posix_fadvise.2:171
7788 msgid ""
7789 "Some architectures require 64-bit arguments to be aligned in a suitable pair "
7790 "of registers (see B<syscall>(2)  for further detail).  On such "
7791 "architectures, the call signature of B<posix_fadvise>()  shown in the "
7792 "SYNOPSIS would force a register to be wasted as padding between the I<fd> "
7793 "and I<offset> arguments.  Therefore, these architectures define a version of "
7794 "the system call that orders the arguments suitably, but otherwise is "
7795 "otherwise exactly the same as B<posix_fadvise>()."
7796 msgstr ""
7797 "いくつかのアーキテクチャでは、 64 ビットの引き数は適切なレジスタの組に割り当"
7798 "てる必要がある (B<syscall>(2) 参照)。 このようなアーキテクチャでは、 「書式」"
7799 "に書かれている  B<posix_fadvise>() の呼び出しシグネチャーで、 引き数 I<fd> "
7800 "と I<offset> の間のパディング (詰めもの) でレジスタが一つ消費されてしまう。 "
7801 "そのため、 これらのアーキテクチャでは引き数が適切な順序になった別のシステム"
7802 "コールが定義されているが、 それ以外は B<posix_fadvise>() と全く同じである。"
7803
7804 #. type: Plain text
7805 #: build/C/man2/posix_fadvise.2:173
7806 msgid "For example, since Linux 2.6.14, ARM has the following system call:"
7807 msgstr ""
7808 "例えば、 Linux 2.6.14 以降では、 ARM には以下のシステムコールが存在する。"
7809
7810 #. type: Plain text
7811 #: build/C/man2/posix_fadvise.2:178
7812 #, no-wrap
7813 msgid ""
7814 "B<long arm_fadvise64_64(int >I<fd>B<, int >I<advice>B<,>\n"
7815 "B<                      loff_t >I<offset>B<, loff_t >I<len>B<);>\n"
7816 msgstr ""
7817 "B<long arm_fadvise64_64(int >I<fd>B<, int >I<advice>B<,>\n"
7818 "B<                      loff_t >I<offset>B<, loff_t >I<len>B<);>\n"
7819
7820 #. type: Plain text
7821 #: build/C/man2/posix_fadvise.2:186
7822 msgid ""
7823 "These architecture-specific details are generally hidden from applications "
7824 "by the glibc B<posix_fadvise>()  wrapper function, which invokes the "
7825 "appropriate architecture-specific system call."
7826 msgstr ""
7827 "通常、 glibc の B<posix_fadvise>() ラッパー関数により、 これらのアーキテク"
7828 "チャ固有の詳細はアプリケーションには見えない。 glibc のラッパー関数では、適切"
7829 "なアーキテクチャ固有のシステムコールが呼び出される。"
7830
7831 #. type: Plain text
7832 #: build/C/man2/posix_fadvise.2:191
7833 msgid ""
7834 "In kernels before 2.6.6, if I<len> was specified as 0, then this was "
7835 "interpreted literally as \"zero bytes\", rather than as meaning \"all bytes "
7836 "through to the end of the file\"."
7837 msgstr ""
7838 "2.6.6 より前のカーネルでは、 I<len> に 0 が指定された場合、 「ファイルの終り"
7839 "までの全てのバイト」という意味ではなく、 文字通り「0 バイト」として解釈されて"
7840 "いた。"
7841
7842 #.  FIXME . Write a posix_fadvise(3) page.
7843 #. type: Plain text
7844 #: build/C/man2/posix_fadvise.2:197
7845 msgid ""
7846 "B<readahead>(2), B<sync_file_range>(2), B<posix_fallocate>(3), "
7847 "B<posix_madvise>(3)"
7848 msgstr ""
7849 "B<readahead>(2), B<sync_file_range>(2), B<posix_fallocate>(3),\n"
7850 "B<posix_madvise>(3)"
7851
7852 #. type: TH
7853 #: build/C/man3/posix_fallocate.3:25
7854 #, no-wrap
7855 msgid "POSIX_FALLOCATE"
7856 msgstr "POSIX_FALLOCATE"
7857
7858 #. type: TH
7859 #: build/C/man3/posix_fallocate.3:25
7860 #, no-wrap
7861 msgid "2013-02-12"
7862 msgstr "2013-02-12"
7863
7864 #. type: Plain text
7865 #: build/C/man3/posix_fallocate.3:28
7866 msgid "posix_fallocate - allocate file space"
7867 msgstr "posix_fallocate - ファイルのスペースを確保する"
7868
7869 #. type: Plain text
7870 #: build/C/man3/posix_fallocate.3:33
7871 #, no-wrap
7872 msgid "B<int posix_fallocate(int >I<fd>B<, off_t >I<offset>B<, off_t >I<len>B<);>\n"
7873 msgstr "B<int posix_fallocate(int >I<fd>B<, off_t >I<offset>B<, off_t >I<len>B<);>\n"
7874
7875 #. type: Plain text
7876 #: build/C/man3/posix_fallocate.3:42
7877 msgid "B<posix_fallocate>():"
7878 msgstr "B<posix_fallocate>():"
7879
7880 #. type: Plain text
7881 #: build/C/man3/posix_fallocate.3:61
7882 msgid ""
7883 "The function B<posix_fallocate>()  ensures that disk space is allocated for "
7884 "the file referred to by the descriptor I<fd> for the bytes in the range "
7885 "starting at I<offset> and continuing for I<len> bytes.  After a successful "
7886 "call to B<posix_fallocate>(), subsequent writes to bytes in the specified "
7887 "range are guaranteed not to fail because of lack of disk space."
7888 msgstr ""
7889 "関数 B<posix_fallocate>()  は、ディスクリプタ I<fd> で参照されるファイルに対"
7890 "して、ディスクスペースを確実に確保する。 ディスクスペースは I<offset> から始"
7891 "まる I<len> バイトの範囲のバイトである。 B<posix_fallocate>()  の呼び出しが成"
7892 "功した後、指定された範囲のバイトに対する書き込みは、 ディスクスペースの不足で"
7893 "失敗しないことが保証される。"
7894
7895 #. type: Plain text
7896 #: build/C/man3/posix_fallocate.3:66
7897 msgid ""
7898 "If the size of the file is less than I<offset>+I<len>, then the file is "
7899 "increased to this size; otherwise the file size is left unchanged."
7900 msgstr ""
7901 "ファイルのサイズが I<offset>+I<len> より小さい場合、ファイルはこのサイズにな"
7902 "るように拡大される。 それ以外の場合、ファイルサイズは変わらない。"
7903
7904 #. type: Plain text
7905 #: build/C/man3/posix_fallocate.3:72
7906 msgid ""
7907 "B<posix_fallocate>()  returns zero on success, or an error number on "
7908 "failure.  Note that I<errno> is not set."
7909 msgstr ""
7910 "B<posix_fallocate>()  は成功した場合、0 を返す。 失敗した場合、エラー番号を返"
7911 "す。 I<errno> が設定されない点に注意すること。"
7912
7913 #. type: Plain text
7914 #: build/C/man3/posix_fallocate.3:81
7915 msgid "I<offset+len> exceeds the maximum file size."
7916 msgstr "I<offset+len> が最大ファイルサイズを超えている。"
7917
7918 #. type: Plain text
7919 #: build/C/man3/posix_fallocate.3:91
7920 msgid "I<fd> does not refer to a regular file."
7921 msgstr "I<fd> が通常のファイルとして参照されていない。"
7922
7923 #. type: Plain text
7924 #: build/C/man3/posix_fallocate.3:100
7925 msgid "I<fd> refers to a pipe."
7926 msgstr "I<fd> がパイプを参照している。"
7927
7928 #. type: Plain text
7929 #: build/C/man3/posix_fallocate.3:103
7930 msgid "B<posix_fallocate>()  is available since glibc 2.1.94."
7931 msgstr "B<posix_fallocate>()  は glibc 2.1.94 以降で利用可能である。"
7932
7933 #. type: Plain text
7934 #: build/C/man3/posix_fallocate.3:128
7935 msgid ""
7936 "POSIX.1-2008 says that an implementation I<shall> give the B<EINVAL> error "
7937 "if I<len> was 0, or I<offset> was less than 0.  POSIX.1-2001 says that an "
7938 "implementation I<shall> give the B<EINVAL> error if I<len> is less than 0, "
7939 "or I<offset> was less than 0, and I<may> give the error if I<len> equals "
7940 "zero."
7941 msgstr ""
7942 "POSIX.1-2008 では、 I<len> が 0 の場合、もしくは I<offset> が 0 未満の場合、 "
7943 "B<EINVAL> エラーを返すものとされている。 POSIX.1-2001 では、 I<len> が 0 未満"
7944 "の場合、もしくは I<offset> が 0 未満の場合、 B<EINVAL> エラーを返すものとされ"
7945 "ている。また、 I<len> が 0 の場合、 B<EINVAL> エラーを返してもよいとされてい"
7946 "る。"
7947
7948 #. type: Plain text
7949 #: build/C/man3/posix_fallocate.3:133
7950 msgid "B<fallocate>(1), B<fallocate>(2), B<lseek>(2), B<posix_fadvise>(2)"
7951 msgstr "B<fallocate>(1), B<fallocate>(2), B<lseek>(2), B<posix_fadvise>(2)"
7952
7953 #. type: TH
7954 #: build/C/man3/posix_memalign.3:29
7955 #, no-wrap
7956 msgid "POSIX_MEMALIGN"
7957 msgstr "POSIX_MEMALIGN"
7958
7959 #. type: TH
7960 #: build/C/man3/posix_memalign.3:29
7961 #, no-wrap
7962 msgid "2013-09-02"
7963 msgstr "2013-09-02"
7964
7965 #. type: Plain text
7966 #: build/C/man3/posix_memalign.3:32
7967 msgid ""
7968 "posix_memalign, aligned_alloc, memalign, valloc, pvalloc - allocate aligned "
7969 "memory"
7970 msgstr ""
7971 "posix_memalign, aligned_alloc, memalign, valloc, pvalloc - アラインメント\n"
7972 "されたメモリの割り当てを行う"
7973
7974 #. type: Plain text
7975 #: build/C/man3/posix_memalign.3:39
7976 #, no-wrap
7977 msgid ""
7978 "B<int posix_memalign(void **>I<memptr>B<, size_t >I<alignment>B<, size_t >I<size>B<);>\n"
7979 "B<void *aligned_alloc(size_t >I<alignment>B<, size_t >I<size>B<);>\n"
7980 "B<void *valloc(size_t >I<size>B<);>\n"
7981 msgstr ""
7982 "B<int posix_memalign(void **>I<memptr>B<, size_t >I<alignment>B<, size_t >I<size>B<);>\n"
7983 "B<void *aligned_alloc(size_t >I<alignment>B<, size_t >I<size>B<);>\n"
7984 "B<void *valloc(size_t >I<size>B<);>\n"
7985
7986 #. type: Plain text
7987 #: build/C/man3/posix_memalign.3:44
7988 #, no-wrap
7989 msgid ""
7990 "B<void *memalign(size_t >I<alignment>B<, size_t >I<size>B<);>\n"
7991 "B<void *pvalloc(size_t >I<size>B<);>\n"
7992 msgstr ""
7993 "B<void *memalign(size_t >I<alignment>B<, size_t >I<size>B<);>\n"
7994 "B<void *pvalloc(size_t >I<size>B<);>\n"
7995
7996 #. type: Plain text
7997 #: build/C/man3/posix_memalign.3:54
7998 msgid ""
7999 "B<posix_memalign>(): _POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ "
8000 "E<gt>=\\ 600"
8001 msgstr ""
8002 "B<posix_memalign>(): _POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ "
8003 "E<gt>=\\ 600"
8004
8005 #. type: Plain text
8006 #: build/C/man3/posix_memalign.3:57
8007 msgid "B<aligned_alloc>(): _ISOC11_SOURCE"
8008 msgstr "B<aligned_alloc>(): _ISOC11_SOURCE"
8009
8010 #. type: Plain text
8011 #: build/C/man3/posix_memalign.3:59
8012 msgid "B<valloc>():"
8013 msgstr "B<valloc>():"
8014
8015 #. type: TP
8016 #: build/C/man3/posix_memalign.3:62
8017 #, no-wrap
8018 msgid "Since glibc 2.12:"
8019 msgstr "glibc 2.12 以降:"
8020
8021 #. type: Plain text
8022 #: build/C/man3/posix_memalign.3:69
8023 #, no-wrap
8024 msgid ""
8025 "_BSD_SOURCE ||\n"
8026 "    (_XOPEN_SOURCE\\ E<gt>=\\ 500 ||\n"
8027 "        _XOPEN_SOURCE\\ &&\\ _XOPEN_SOURCE_EXTENDED) &&\n"
8028 "    !(_POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ E<gt>=\\ 600)\n"
8029 msgstr ""
8030 "_BSD_SOURCE ||\n"
8031 "    (_XOPEN_SOURCE\\ E<gt>=\\ 500 ||\n"
8032 "        _XOPEN_SOURCE\\ &&\\ _XOPEN_SOURCE_EXTENDED) &&\n"
8033 "    !(_POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ E<gt>=\\ 600)\n"
8034
8035 #. type: TP
8036 #: build/C/man3/posix_memalign.3:71
8037 #, no-wrap
8038 msgid "Before glibc 2.12:"
8039 msgstr "glibc 2.12 より前:"
8040
8041 #. type: Plain text
8042 #: build/C/man3/posix_memalign.3:75
8043 msgid ""
8044 "_BSD_SOURCE || _XOPEN_SOURCE\\ E<gt>=\\ 500 || _XOPEN_SOURCE\\ &&\\ "
8045 "_XOPEN_SOURCE_EXTENDED"
8046 msgstr ""
8047 "_BSD_SOURCE || _XOPEN_SOURCE\\ E<gt>=\\ 500 || _XOPEN_SOURCE\\ &&\\ "
8048 "_XOPEN_SOURCE_EXTENDED"
8049
8050 #. type: Plain text
8051 #: build/C/man3/posix_memalign.3:82
8052 msgid ""
8053 "(The (nonstandard) header file I<E<lt>malloc.hE<gt>> also exposes the "
8054 "declaration of B<valloc>(); no feature test macros are required.)"
8055 msgstr ""
8056 "((非標準の) ヘッダファイル I<E<lt>malloc.hE<gt>> も\n"
8057 "B<valloc>() の宣言も公開する。機能検査マクロは不要である。"
8058
8059 #.  glibc does this:
8060 #. type: Plain text
8061 #: build/C/man3/posix_memalign.3:104
8062 msgid ""
8063 "The function B<posix_memalign>()  allocates I<size> bytes and places the "
8064 "address of the allocated memory in I<*memptr>.  The address of the allocated "
8065 "memory will be a multiple of I<alignment>, which must be a power of two and "
8066 "a multiple of I<sizeof(void\\ *)>.  If I<size> is 0, then the value placed "
8067 "in I<*memptr> is either NULL, or a unique pointer value that can later be "
8068 "successfully passed to B<free>(3)."
8069 msgstr ""
8070 "関数 B<posix_memalign>()  は、 I<size> バイトのメモリを割り当て、割り当てられ"
8071 "たメモリのアドレスを I<*memptr> に設定する。 割り当てられたメモリのアドレス"
8072 "は I<alignment> の倍数になっているはずである。 I<alignment> は 2 のべき乗で、"
8073 "かつ I<sizeof(void\\ *)> の倍数でなければならない。 I<size> が 0 の場合、 "
8074 "I<*memptr> には NULL か一意なポインタ値が書かれる。 このポインタ値は、後で "
8075 "B<free>(3)  に問題なく渡すことができる。"
8076
8077 #.  The behavior of memalign() for size==0 is as for posix_memalign()
8078 #.  but no standards govern this.
8079 #. type: Plain text
8080 #: build/C/man3/posix_memalign.3:115
8081 msgid ""
8082 "The obsolete function B<memalign>()  allocates I<size> bytes and returns a "
8083 "pointer to the allocated memory.  The memory address will be a multiple of "
8084 "I<alignment>, which must be a power of two."
8085 msgstr ""
8086 "廃止された関数である B<memalign>() は、 I<size> バイトのメモリを割り当て、\n"
8087 "割り当てられたメモリへのポインタを返す。 メモリのアドレスは I<alignment> \n"
8088 "の倍数になっているはずである。 I<alignment> は 2 のべき乗でなければならない。"
8089
8090 #. type: Plain text
8091 #: build/C/man3/posix_memalign.3:124
8092 msgid ""
8093 "The function B<aligned_alloc>()  is the same as B<memalign>(), except for "
8094 "the added restriction that I<size> should be a multiple of I<alignment>."
8095 msgstr ""
8096 "関数 B<aligned_alloc>() は B<memalign>() と同じだが、I<size> が "
8097 "I<alignment>\n"
8098 "の倍数でなければならないという追加の制限がある点が異なる。"
8099
8100 #. type: Plain text
8101 #: build/C/man3/posix_memalign.3:133
8102 msgid ""
8103 "The obsolete function B<valloc>()  allocates I<size> bytes and returns a "
8104 "pointer to the allocated memory.  The memory address will be a multiple of "
8105 "the page size.  It is equivalent to I<memalign(sysconf(_SC_PAGESIZE),size)>."
8106 msgstr ""
8107 "廃止された関数である B<valloc>()  は I<size> バイトのメモリを割り当て、割り当"
8108 "てられたメモリへのポインタを返す。 メモリのアドレスはページサイズの倍数になっ"
8109 "ているはずである。 これは I<memalign(sysconf(_SC_PAGESIZE),size)> と等価であ"
8110 "る。"
8111
8112 #. type: Plain text
8113 #: build/C/man3/posix_memalign.3:140
8114 msgid ""
8115 "The obsolete function B<pvalloc>()  is similar to B<valloc>(), but rounds "
8116 "the size of the allocation up to the next multiple of the system page size."
8117 msgstr ""
8118 "廃止された関数 B<pvalloc>() は B<valloc>() と同様だが、\n"
8119 "割り当てられるサイズがシステムのページサイズの倍数に切り上げられる。"
8120
8121 #. type: Plain text
8122 #: build/C/man3/posix_memalign.3:142
8123 msgid "For all of these functions, the memory is not zeroed."
8124 msgstr "これらの関数はいずれもメモリのゼロクリアを行わない。"
8125
8126 #. type: Plain text
8127 #: build/C/man3/posix_memalign.3:149
8128 msgid ""
8129 "B<aligned_alloc>(), B<memalign>(), B<valloc>(), and B<pvalloc>()  return a "
8130 "pointer to the allocated memory, or NULL if the request fails."
8131 msgstr ""
8132 "B<aligned_alloc>(), B<memalign>(), B<valloc>(), B<pvalloc>() は割り当てられ"
8133 "た\n"
8134 "メモリへのポインタを返す。 割り当てに失敗した場合は NULL を返す。"
8135
8136 #. type: Plain text
8137 #: build/C/man3/posix_memalign.3:157
8138 msgid ""
8139 "B<posix_memalign>()  returns zero on success, or one of the error values "
8140 "listed in the next section on failure.  The value of I<errno> is "
8141 "indeterminate after a call to B<posix_memalign>()."
8142 msgstr ""
8143 "B<posix_memalign>()  は成功した場合は 0 を返し、 失敗した場合は次のセクション"
8144 "に記載されたエラー値のいずれかを返す。 B<posix_memalign>() の呼び出し後は "
8145 "I<errno> の値は不定である。"
8146
8147 #. type: Plain text
8148 #: build/C/man3/posix_memalign.3:164
8149 msgid ""
8150 "The I<alignment> argument was not a power of two, or was not a multiple of "
8151 "I<sizeof(void\\ *)>."
8152 msgstr ""
8153 "I<alignment> 引き数が 2 のべき乗でなかったか、 I<sizeof(void\\ *)> の倍数でな"
8154 "かった。"
8155
8156 #. type: Plain text
8157 #: build/C/man3/posix_memalign.3:167
8158 msgid "There was insufficient memory to fulfill the allocation request."
8159 msgstr "割り当て要求を満たすのに十分なメモリがなかった。"
8160
8161 #. type: Plain text
8162 #: build/C/man3/posix_memalign.3:174
8163 msgid ""
8164 "The functions B<memalign>(), B<valloc>(), and B<pvalloc>()  have been "
8165 "available in all Linux libc libraries."
8166 msgstr ""
8167 "関数 B<memalign>(), B<valloc>(), B<pvalloc>() は\n"
8168 "すべての Linux libc ライブラリで使用可能である。"
8169
8170 #. type: Plain text
8171 #: build/C/man3/posix_memalign.3:178
8172 msgid "The function B<aligned_alloc>()  was added to glibc in version 2.16."
8173 msgstr "関数 B<aligned_alloc>() は glibc バージョン 2.16 で追加された。"
8174
8175 #. type: Plain text
8176 #: build/C/man3/posix_memalign.3:182
8177 msgid "The function B<posix_memalign>()  is available since glibc 2.1.91."
8178 msgstr "関数 B<posix_fallocate>() は glibc 2.1.91 以降で利用可能である。"
8179
8180 #. type: Plain text
8181 #: build/C/man3/posix_memalign.3:189
8182 msgid ""
8183 "The function B<valloc>()  appeared in 3.0BSD.  It is documented as being "
8184 "obsolete in 4.3BSD, and as legacy in SUSv2.  It does not appear in "
8185 "POSIX.1-2001."
8186 msgstr ""
8187 "関数 B<valloc>() は 3.0BSD で登場した。4.3BSD では廃止されたと記載されてお"
8188 "り、\n"
8189 "SUSv2 では過去の名残だと記載されている。 POSIX.1-2001 には存在しない。"
8190
8191 #. type: Plain text
8192 #: build/C/man3/posix_memalign.3:193
8193 msgid "The function B<pvalloc>()  is a GNU extension."
8194 msgstr "関数 B<pvalloc>() は GNU による拡張である。"
8195
8196 #. type: Plain text
8197 #: build/C/man3/posix_memalign.3:197
8198 msgid "The function B<memalign>()  appears in SunOS 4.1.3 but not in 4.4BSD."
8199 msgstr "関数 B<memalign>() は SunOS 4.1.3 で登場したが、4.4BSD にはない。"
8200
8201 #. type: Plain text
8202 #: build/C/man3/posix_memalign.3:201
8203 msgid "The function B<posix_memalign>()  comes from POSIX.1d."
8204 msgstr "関数 B<posix_memalign>() は POSIX.1d に由来する。"
8205
8206 #. type: Plain text
8207 #: build/C/man3/posix_memalign.3:206
8208 msgid "The function B<aligned_alloc>()  is specified in the C11 standard."
8209 msgstr "関数 I<aligned_alloc>() は C11 標準で規定されている。"
8210
8211 #. type: SS
8212 #: build/C/man3/posix_memalign.3:206
8213 #, no-wrap
8214 msgid "Headers"
8215 msgstr "ヘッダ"
8216
8217 #. type: Plain text
8218 #: build/C/man3/posix_memalign.3:210
8219 msgid ""
8220 "Everybody agrees that B<posix_memalign>()  is declared in I<E<lt>stdlib."
8221 "hE<gt>>."
8222 msgstr ""
8223 "B<posix_memalign>()  の宣言を I<E<lt>stdlib.hE<gt>> で行うことに関しては、 皆"
8224 "の意見が一致している。"
8225
8226 #. type: Plain text
8227 #: build/C/man3/posix_memalign.3:214
8228 msgid ""
8229 "On some systems B<memalign>()  is declared in I<E<lt>stdlib.hE<gt>> instead "
8230 "of I<E<lt>malloc.hE<gt>>."
8231 msgstr ""
8232 "いくつかのシステムでは、 B<memalign>()  は I<E<lt>malloc.hE<gt>> ではなく "
8233 "I<E<lt>stdlib.hE<gt>> で宣言されている。"
8234
8235 #. type: Plain text
8236 #: build/C/man3/posix_memalign.3:221
8237 msgid ""
8238 "According to SUSv2, B<valloc>()  is declared in I<E<lt>stdlib.hE<gt>>.  "
8239 "Libc4,5 and glibc declare it in I<E<lt>malloc.hE<gt>>, and also in "
8240 "I<E<lt>stdlib.hE<gt>> if suitable feature test macros are defined (see "
8241 "above)."
8242 msgstr ""
8243 "SUSv2 によると、 B<valloc>() は I<E<lt>stdlib.hE<gt>> で宣言される。 "
8244 "libc4,5\n"
8245 "や glibc では I<E<lt>malloc.hE<gt>> で宣言されており、 さらに適切な機能検査\n"
8246 "マクロが定義された場合には I<E<lt>stdlib.hE<gt>> でも宣言される(上記を参照)。"
8247
8248 #. type: Plain text
8249 #: build/C/man3/posix_memalign.3:230
8250 msgid ""
8251 "On many systems there are alignment restrictions, for example, on buffers "
8252 "used for direct block device I/O.  POSIX specifies the I<pathconf(path,"
8253 "_PC_REC_XFER_ALIGN)> call that tells what alignment is needed.  Now one can "
8254 "use B<posix_memalign>()  to satisfy this requirement."
8255 msgstr ""
8256 "多くのシステムでは、アラインメントに関して制限がある。例えば、 ブロックデバイ"
8257 "スに対するダイレクト I/O に使用するバッファには アラインメントに関する制限が"
8258 "ある。 POSIX では、どんなアラインメントが必要かを知るために I<pathconf(path,"
8259 "_PC_REC_XFER_ALIGN)> コールを規定している。ここで B<posix_memalign>()  を使う"
8260 "と、この必要条件を満たすことができる。"
8261
8262 #. type: Plain text
8263 #: build/C/man3/posix_memalign.3:239
8264 msgid ""
8265 "B<posix_memalign>()  verifies that I<alignment> matches the requirements "
8266 "detailed above.  B<memalign>()  may not check that the I<alignment> argument "
8267 "is correct."
8268 msgstr ""
8269 "B<posix_memalign>() は I<alignment> が上で詳細に述べた必要条件を満たすか\n"
8270 "どうかを確かめる。 B<memalign>() は I<alignment> 引き数が正しいかどうかの\n"
8271 "確認を行わないかもしれない。"
8272
8273 #.  Other systems allow passing the result of
8274 #.  .IR valloc ()
8275 #.  to
8276 #.  .IR free (3),
8277 #.  but not to
8278 #.  .IR realloc (3).
8279 #. type: Plain text
8280 #: build/C/man3/posix_memalign.3:267
8281 msgid ""
8282 "POSIX requires that memory obtained from B<posix_memalign>()  can be freed "
8283 "using B<free>(3).  Some systems provide no way to reclaim memory allocated "
8284 "with B<memalign>()  or B<valloc>()  (because one can pass to B<free>(3)  "
8285 "only a pointer obtained from B<malloc>(3), while, for example, "
8286 "B<memalign>()  would call B<malloc>(3)  and then align the obtained value).  "
8287 "The glibc implementation allows memory obtained from any of these functions "
8288 "to be reclaimed with B<free>(3)."
8289 msgstr ""
8290 "POSIX では B<posix_memalign>() によって獲得したメモリは B<free>(3) を\n"
8291 "使って解放することができる必要がある。 いくつかのシステムでは\n"
8292 "B<memalign>() やB<valloc>() で割り当てられたメモリを再利用する手段が\n"
8293 "提供されていない(なぜなら B<free>(3) に渡すことができるのは\n"
8294 "B<malloc>(3) から受け取ったポインタだけだが、例えば B<memalign>() は\n"
8295 "B<malloc>(3) を呼び出し、得た値をアラインメントしてしまうからである)。\n"
8296 "glibc の実装では、 ここに述べた関数のいずれで獲得したメモリも\n"
8297 "B<free>(3) で再利用することができる。"
8298
8299 #. type: Plain text
8300 #: build/C/man3/posix_memalign.3:272
8301 msgid ""
8302 "The glibc B<malloc>(3)  always returns 8-byte aligned memory addresses, so "
8303 "these functions are needed only if you require larger alignment values."
8304 msgstr ""
8305 "glibc の B<malloc>(3) は常に 8 バイトにアラインメントされたメモリアドレスを\n"
8306 "返すので、ここで述べた関数が必要になるのは 8 バイトよりも大きなアラインメン"
8307 "ト\n"
8308 "が必要な場合だけである。"
8309
8310 #. type: Plain text
8311 #: build/C/man3/posix_memalign.3:277
8312 msgid "B<brk>(2), B<getpagesize>(2), B<free>(3), B<malloc>(3)"
8313 msgstr "B<brk>(2), B<getpagesize>(2), B<free>(3), B<malloc>(3)"
8314
8315 #. type: TH
8316 #: build/C/man2/readahead.2:28
8317 #, no-wrap
8318 msgid "READAHEAD"
8319 msgstr "READAHEAD"
8320
8321 #. type: TH
8322 #: build/C/man2/readahead.2:28
8323 #, no-wrap
8324 msgid "2014-03-15"
8325 msgstr "2014-03-15"
8326
8327 #. type: Plain text
8328 #: build/C/man2/readahead.2:31
8329 msgid "readahead - initiate file readahead into page cache"
8330 msgstr "readahead - 前もってファイルをページ・キャッシュに読み込む"
8331
8332 #. type: Plain text
8333 #: build/C/man2/readahead.2:37
8334 #, no-wrap
8335 msgid "B<ssize_t readahead(int >I<fd>B<, off64_t >I<offset>B<, size_t >I<count>B<);>\n"
8336 msgstr "B<ssize_t readahead(int >I<fd>B<, off64_t >I<offset>B<, size_t >I<count>B<);>\n"
8337
8338 #. type: Plain text
8339 #: build/C/man2/readahead.2:44
8340 msgid ""
8341 "B<readahead>()  initiates readahead on a file so that subsequent reads from "
8342 "that file will be satisfied from the cache, and not block on disk I/O "
8343 "(assuming the readahead was initiated early enough and that other activity "
8344 "on the system did not in the meantime flush pages from the cache)."
8345 msgstr ""
8346 "B<readahead>() はファイルの先読みを行い、そのファイルに対する後の読み込みが"
8347 "キャッシュから行われ、ディスク I/O で停止しないようにする (この条件を満たせる"
8348 "のは、先読みは十分早く行われ、システムの他の動作によりその後にキャッシュから"
8349 "ページがフラッシュされない場合である)。"
8350
8351 #. type: Plain text
8352 #: build/C/man2/readahead.2:66
8353 msgid ""
8354 "The I<fd> argument is a file descriptor identifying the file which is to be "
8355 "read.  The I<offset> argument specifies the starting point from which data "
8356 "is to be read and I<count> specifies the number of bytes to be read.  I/O is "
8357 "performed in whole pages, so that I<offset> is effectively rounded down to a "
8358 "page boundary and bytes are read up to the next page boundary greater than "
8359 "or equal to I<(offset+count)>.  B<readahead>()  does not read beyond the end "
8360 "of the file.  The current file offset of the open file referred to by I<fd> "
8361 "is left unchanged."
8362 msgstr ""
8363 "I<fd> 引き数は読み込みを行うファイルを識別するファイル・ディスクリプタであ"
8364 "る。 I<offset> 引き数はデータの読み込み開始位置を指定し、 I<count> は読み込む"
8365 "データのバイト数を指定する。 ディスク I/O はページ単位で実行されるので、 実際"
8366 "には I<offset> はページ境界に切り下げられ、読み込みバイト数は I<(offset"
8367 "+count)> より小さくない次のページ境界まで切り上げられる。 B<readahead>()  は"
8368 "ファイルの末尾を越えた範囲まで読み出しを行うことはない。 I<fd> で参照された"
8369 "オープン済のファイルのファイルオフセットの現在値は 変更されない。"
8370
8371 #. type: Plain text
8372 #: build/C/man2/readahead.2:72
8373 msgid ""
8374 "On success, B<readahead>()  returns 0; on failure, -1 is returned, with "
8375 "I<errno> set to indicate the cause of the error."
8376 msgstr ""
8377 "B<readahead>()  は成功すると 0 を返す。失敗した場合 -1 を返し、 I<errno> にエ"
8378 "ラーの原因を示す値を設定する。"
8379
8380 #. type: Plain text
8381 #: build/C/man2/readahead.2:77
8382 msgid "I<fd> is not a valid file descriptor or is not open for reading."
8383 msgstr ""
8384 "I<fd> が有効なファイル・ディスクリプタでない、または 読み込み用にオープンされ"
8385 "ていない。"
8386
8387 #. type: Plain text
8388 #: build/C/man2/readahead.2:83
8389 msgid ""
8390 "I<fd> does not refer to a file type to which B<readahead>()  can be applied."
8391 msgstr ""
8392 "I<fd> が参照しているファイルが、 B<readahead>()  を行うことができないタイプの"
8393 "ファイルであった。"
8394
8395 #. type: Plain text
8396 #: build/C/man2/readahead.2:88
8397 msgid ""
8398 "The B<readahead>()  system call appeared in Linux 2.4.13; glibc support has "
8399 "been provided since version 2.3."
8400 msgstr ""
8401 "B<readahead>()  システムコールは Linux 2.4.13 で登場した。 glibc でのサポート"
8402 "は glibc バージョン 2.3 以降で行われている。"
8403
8404 #. type: Plain text
8405 #: build/C/man2/readahead.2:93
8406 msgid ""
8407 "The B<readahead>()  system call is Linux-specific, and its use should be "
8408 "avoided in portable applications."
8409 msgstr ""
8410 "B<readahead>()  システムコールは Linux 固有であり、移植を考慮したプログラムで"
8411 "は 使用を避けるべきである。"
8412
8413 #. type: Plain text
8414 #: build/C/man2/readahead.2:98
8415 msgid ""
8416 "On some 32-bit architectures, the calling signature for this system call "
8417 "differs, for the reasons described in B<syscall>(2)."
8418 msgstr ""
8419 "いくつかの 32 ビットアーキテクチャでは、このシステムコールの呼び出しシグネ"
8420 "チャーが違っている。 理由は B<syscall>(2) で説明されている。"
8421
8422 #. type: Plain text
8423 #: build/C/man2/readahead.2:107
8424 msgid ""
8425 "B<readahead>()  attempts to schedule the reads in the background and return "
8426 "immediately.  However, it may block while it reads the filesystem metadata "
8427 "needed to locate the requested blocks.  This occurs frequently with ext[234] "
8428 "on large files using indirect blocks instead of extents, giving the "
8429 "appearance that the call blocks until the requested data has been read."
8430 msgstr ""
8431 "B<readahead>() は読み込みをバックグラウンドで行うようにスケジューリングを行"
8432 "い、すぐに返る。 しかしながら、要求されたブロックの位置を知るために必要なファ"
8433 "イルシステムのメタデータを読み込む間は B<readahead>() は停止することがある。 "
8434 "これは ext[234] で大きなファイルをエクステントではなく間接ブロックを使う場合"
8435 "にしばしば発生し、 要求したデータが読み込まれるまで呼び出しが停止しているよう"
8436 "に見える。"
8437
8438 #. type: Plain text
8439 #: build/C/man2/readahead.2:113
8440 msgid "B<lseek>(2), B<madvise>(2), B<mmap>(2), B<posix_fadvise>(2), B<read>(2)"
8441 msgstr ""
8442 "B<lseek>(2), B<madvise>(2), B<mmap>(2), B<posix_fadvise>(2), B<read>(2)"
8443
8444 #. type: TH
8445 #: build/C/man2/remap_file_pages.2:28
8446 #, no-wrap
8447 msgid "REMAP_FILE_PAGES"
8448 msgstr "REMAP_FILE_PAGES"
8449
8450 #. type: Plain text
8451 #: build/C/man2/remap_file_pages.2:31
8452 msgid "remap_file_pages - create a nonlinear file mapping"
8453 msgstr "remap_file_pages - 非線形ファイルマッピングを作成する。"
8454
8455 #. type: Plain text
8456 #: build/C/man2/remap_file_pages.2:35
8457 #, no-wrap
8458 msgid ""
8459 "B<#define _GNU_SOURCE>         /* See feature_test_macros(7) */\n"
8460 "B<#include E<lt>sys/mman.hE<gt>>\n"
8461 msgstr ""
8462 "B<#define _GNU_SOURCE>         /* feature_test_macros(7) 参照 */\n"
8463 "B<#include E<lt>sys/mman.hE<gt>>\n"
8464
8465 #. type: Plain text
8466 #: build/C/man2/remap_file_pages.2:38
8467 #, no-wrap
8468 msgid ""
8469 "B<int remap_file_pages(void *>I<addr>B<, size_t >I<size>B<, int >I<prot>B<,>\n"
8470 "B<                     size_t >I<pgoff>B<, int >I<flags>B<);>\n"
8471 msgstr ""
8472 "B<int remap_file_pages(void *>I<addr>B<, size_t >I<size>B<, int >I<prot>B<,>\n"
8473 "B<                     size_t >I<pgoff>B<, int >I<flags>B<);>\n"
8474
8475 #. type: Plain text
8476 #: build/C/man2/remap_file_pages.2:51
8477 msgid ""
8478 "The B<remap_file_pages>()  system call is used to create a nonlinear "
8479 "mapping, that is, a mapping in which the pages of the file are mapped into a "
8480 "nonsequential order in memory.  The advantage of using "
8481 "B<remap_file_pages>()  over using repeated calls to B<mmap>(2)  is that the "
8482 "former approach does not require the kernel to create additional VMA "
8483 "(Virtual Memory Area) data structures."
8484 msgstr ""
8485 "B<remap_file_pages>()  システムコールは非線形なマッピング、 つまりファイルの"
8486 "ページがメモリ上で連続しない順番でマップされる マッピングを作成するために使わ"
8487 "れる。 B<remap_file_pages>()  を使う方が B<mmap>(2)  を繰り返して使うより優れ"
8488 "ている点は、 前者の方法ではカーネルが VMA (Virtual Memory Area, 仮想メモリ領"
8489 "域)  データ構造体を追加で作成する必要がないことである。"
8490
8491 #. type: Plain text
8492 #: build/C/man2/remap_file_pages.2:53
8493 msgid "To create a nonlinear mapping we perform the following steps:"
8494 msgstr "非線形マッピングを作成するためには、 以下のようなステップを実行する:"
8495
8496 #. type: TP
8497 #: build/C/man2/remap_file_pages.2:53
8498 #, no-wrap
8499 msgid "1."
8500 msgstr "1."
8501
8502 #. type: Plain text
8503 #: build/C/man2/remap_file_pages.2:61
8504 msgid ""
8505 "Use B<mmap>(2)  to create a mapping (which is initially linear).  This "
8506 "mapping must be created with the B<MAP_SHARED> flag."
8507 msgstr ""
8508 "B<mmap>(2)  を使い、マッピングを作成する (このマッピングは最初は線形であ"
8509 "る)。 このマッピングは B<MAP_SHARED> フラグを指定して作成されなければならな"
8510 "い。"
8511
8512 #. type: TP
8513 #: build/C/man2/remap_file_pages.2:61
8514 #, no-wrap
8515 msgid "2."
8516 msgstr "2."
8517
8518 #. type: Plain text
8519 #: build/C/man2/remap_file_pages.2:69
8520 msgid ""
8521 "Use one or more calls to B<remap_file_pages>()  to rearrange the "
8522 "correspondence between the pages of the mapping and the pages of the file.  "
8523 "It is possible to map the same page of a file into multiple locations within "
8524 "the mapped region."
8525 msgstr ""
8526 "B<remap_file_pages>()  を 1 回以上呼び出して、 マッピングのページとファイルの"
8527 "ページの対応関係を再構成する。 ファイルの同じページをマッピング領域の複数の場"
8528 "所に マップすることが可能である。"
8529
8530 #. type: Plain text
8531 #: build/C/man2/remap_file_pages.2:80
8532 msgid ""
8533 "The I<pgoff> and I<size> arguments specify the region of the file that is to "
8534 "be relocated within the mapping: I<pgoff> is a file offset in units of the "
8535 "system page size; I<size> is the length of the region in bytes."
8536 msgstr ""
8537 "I<pgoff> と I<size> 引き数は、マッピング内で再配置されるファイルの領域を指定"
8538 "する。 I<pgoff> はファイルオフセットであり、単位はシステムのページサイズであ"
8539 "る。 I<size> は領域の長さであり、単位はバイトである。"
8540
8541 #. type: Plain text
8542 #: build/C/man2/remap_file_pages.2:98
8543 msgid ""
8544 "The I<addr> argument serves two purposes.  First, it identifies the mapping "
8545 "whose pages we want to rearrange.  Thus, I<addr> must be an address that "
8546 "falls within a region previously mapped by a call to B<mmap>(2).  Second, "
8547 "I<addr> specifies the address at which the file pages identified by I<pgoff> "
8548 "and I<size> will be placed."
8549 msgstr ""
8550 "I<addr> 引き数は 2 つの目的で使われる。 第 1 の目的は、この引き数によって再編"
8551 "成したいページの マッピングを識別することである。 よって I<addr> は "
8552 "B<mmap>(2)  の呼び出しで過去にマップされた領域内のアドレスでなければならな"
8553 "い。 第 2 の目的は、 I<pgoff> と I<size> で識別されるファイルページが置かれる"
8554 "予定のアドレスを、 I<addr> によって指定することである。"
8555
8556 #.  This rounding is weird, and not consistent with the treatment of
8557 #.  the analogous arguments for munmap()/mprotect() and for mlock().
8558 #.  MTK, 14 Sep 2005
8559 #. type: Plain text
8560 #: build/C/man2/remap_file_pages.2:112
8561 msgid ""
8562 "The values specified in I<addr> and I<size> should be multiples of the "
8563 "system page size.  If they are not, then the kernel rounds I<both> values "
8564 "I<down> to the nearest multiple of the page size."
8565 msgstr ""
8566 "I<addr> と I<size> に指定する値は、システムのページサイズの倍数とすべきであ"
8567 "る。 それ以外の場合、カーネルは「両方」の値を 最も近いページサイズの倍数へ"
8568 "「切り下げる」。"
8569
8570 #. type: Plain text
8571 #: build/C/man2/remap_file_pages.2:116
8572 msgid "The I<prot> argument must be specified as 0."
8573 msgstr "I<prot> 引き数は 0 に指定されなければならない。"
8574
8575 #. type: Plain text
8576 #: build/C/man2/remap_file_pages.2:124
8577 msgid ""
8578 "The I<flags> argument has the same meaning as for B<mmap>(2), but all flags "
8579 "other than B<MAP_NONBLOCK> are ignored."
8580 msgstr ""
8581 "I<flags> 引き数は B<mmap>(2)  のものと同じ意味であるが、 B<MAP_NONBLOCK> 以外"
8582 "の全てのフラグは無視される。"
8583
8584 #. type: Plain text
8585 #: build/C/man2/remap_file_pages.2:131
8586 msgid ""
8587 "On success, B<remap_file_pages>()  returns 0.  On error, -1 is returned, and "
8588 "I<errno> is set appropriately."
8589 msgstr ""
8590 "成功した場合、 B<remap_file_pages>()  は 0 を返す。 エラーの場合、-1 が返さ"
8591 "れ、 I<errno> が適切に設定される。"
8592
8593 #. type: Plain text
8594 #: build/C/man2/remap_file_pages.2:139
8595 msgid ""
8596 "I<addr> does not refer to a valid mapping created with the B<MAP_SHARED> "
8597 "flag."
8598 msgstr ""
8599 "I<addr> が B<MAP_SHARED> フラグを指定して作成された有効なマッピングを参照して"
8600 "いない。"
8601
8602 #.  And possibly others from vma->vm_ops->populate()
8603 #. type: Plain text
8604 #: build/C/man2/remap_file_pages.2:148
8605 msgid "I<addr>, I<size>, I<prot>, or I<pgoff> is invalid."
8606 msgstr "I<addr>, I<size>, I<prot>, I<pgoff> のいずれかが不正である。"
8607
8608 #. type: Plain text
8609 #: build/C/man2/remap_file_pages.2:153
8610 msgid ""
8611 "The B<remap_file_pages>()  system call appeared in Linux 2.5.46; glibc "
8612 "support was added in version 2.3.3."
8613 msgstr ""
8614 "B<remap_file_pages>()  システムコールは Linux 2.5.46 で登場した。 glibc での"
8615 "サポートは glibc バージョン 2.3.3 で追加された。"
8616
8617 #. type: Plain text
8618 #: build/C/man2/remap_file_pages.2:157
8619 msgid "The B<remap_file_pages>()  system call is Linux-specific."
8620 msgstr "B<remap_file_pages>()  システムコールは Linux 固有のものである。"
8621
8622 #.  commit 3ee6dafc677a68e461a7ddafc94a580ebab80735
8623 #. type: Plain text
8624 #: build/C/man2/remap_file_pages.2:168
8625 msgid ""
8626 "Since Linux 2.6.23, B<remap_file_pages>()  creates non-linear mappings only "
8627 "on in-memory file systems such as tmpfs, hugetlbfs or ramfs.  On filesystems "
8628 "with a backing store, B<remap_file_pages>()  is not much more efficient than "
8629 "using B<mmap>(2)  to adjust which parts of the file are mapped to which "
8630 "addresses."
8631 msgstr ""
8632
8633 #. type: Plain text
8634 #: build/C/man2/remap_file_pages.2:175
8635 msgid ""
8636 "B<getpagesize>(2), B<mmap>(2), B<mmap2>(2), B<mprotect>(2), B<mremap>(2), "
8637 "B<msync>(2)"
8638 msgstr ""
8639 "B<getpagesize>(2), B<mmap>(2), B<mmap2>(2), B<mprotect>(2), B<mremap>(2), "
8640 "B<msync>(2)"
8641
8642 #. type: TH
8643 #: build/C/man3/shm_open.3:26
8644 #, no-wrap
8645 msgid "SHM_OPEN"
8646 msgstr "SHM_OPEN"
8647
8648 #. type: TH
8649 #: build/C/man3/shm_open.3:26
8650 #, no-wrap
8651 msgid "2009-02-25"
8652 msgstr "2009-02-25"
8653
8654 #. type: Plain text
8655 #: build/C/man3/shm_open.3:29
8656 msgid ""
8657 "shm_open, shm_unlink - create/open or unlink POSIX shared memory objects"
8658 msgstr ""
8659 "shm_open, shm_unlink - POSIX 共有メモリ・オブジェクトの作成/オープン/削除を行"
8660 "う"
8661
8662 #. type: Plain text
8663 #: build/C/man3/shm_open.3:33
8664 msgid "B<#include E<lt>sys/stat.hE<gt>> /* For mode constants */"
8665 msgstr "B<#include E<lt>sys/stat.hE<gt>> /* mode 定数用 */"
8666
8667 #. type: Plain text
8668 #: build/C/man3/shm_open.3:35
8669 msgid "B<#include E<lt>fcntl.hE<gt>> /* For O_* constants */"
8670 msgstr "B<#include E<lt>fcntl.hE<gt>> /* O_* 定数の定義用 */"
8671
8672 #. type: Plain text
8673 #: build/C/man3/shm_open.3:37
8674 msgid ""
8675 "B<int shm_open(const char *>I<name>B<, int >I<oflag>B<, mode_t >I<mode>B<);>"
8676 msgstr ""
8677 "B<int shm_open(const char *>I<name>B<, int >I<oflag>B<, mode_t >I<mode>B<);>"
8678
8679 #. type: Plain text
8680 #: build/C/man3/shm_open.3:39
8681 msgid "B<int shm_unlink(const char *>I<name>B<);>"
8682 msgstr "B<int shm_unlink(const char *>I<name>B<);>"
8683
8684 #. type: Plain text
8685 #: build/C/man3/shm_open.3:41
8686 msgid "Link with I<-lrt>."
8687 msgstr "I<-lrt> でリンクする。"
8688
8689 #. type: Plain text
8690 #: build/C/man3/shm_open.3:53
8691 msgid ""
8692 "B<shm_open>()  creates and opens a new, or opens an existing, POSIX shared "
8693 "memory object.  A POSIX shared memory object is in effect a handle which can "
8694 "be used by unrelated processes to B<mmap>(2)  the same region of shared "
8695 "memory.  The B<shm_unlink>()  function performs the converse operation, "
8696 "removing an object previously created by B<shm_open>()."
8697 msgstr ""
8698 "B<shm_open>()  は、POSIX 共有メモリ・オブジェクトを新規に作成/オープンした"
8699 "り、 すでに存在するオブジェクトをオープンしたりする。 POSIX 共有メモリ・オブ"
8700 "ジェクトは、実際には、関係のないプロセスが 共有メモリの同じ領域を "
8701 "B<mmap>(2)  するために使用することができる手段である。 B<shm_unlink>()  は、"
8702 "逆の操作、つまり以前に B<shm_open>()  で作成されたオブジェクトの削除を行う。"
8703
8704 #.  glibc allows the initial slash to be omitted, and makes
8705 #.  multiple initial slashes equivalent to a single slash.
8706 #.  This differs from the implementation of POSIX message queues.
8707 #.  glibc allows subdirectory components in the name, in which
8708 #.  case the subdirectory must exist under /dev/shm, and allow the
8709 #.  required permissions if a user wants to create a shared memory
8710 #.  object in that subdirectory.
8711 #. type: Plain text
8712 #: build/C/man3/shm_open.3:74
8713 msgid ""
8714 "The operation of B<shm_open>()  is analogous to that of B<open>(2).  I<name> "
8715 "specifies the shared memory object to be created or opened.  For portable "
8716 "use, a shared memory object should be identified by a name of the form I</"
8717 "somename>; that is, a null-terminated string of up to B<NAME_MAX> (i.e., "
8718 "255) characters consisting of an initial slash, followed by one or more "
8719 "characters, none of which are slashes."
8720 msgstr ""
8721 "B<shm_open>()  の動作は B<open>(2)  とよく似ている。 I<name> で作成したりオー"
8722 "プンしたりする共有メモリ・オブジェクトを指定する。 移植性を持たせるためには、"
8723 "共有メモリ・オブジェクトは I</somename> という形式の名前で識別し、 その名前"
8724 "は、最大で B<NAME_MAX> (すなわち 255) 文字のヌル終端された文字列で、 スラッ"
8725 "シュで始まり、スラッシュ以外の文字が 1 文字以上続く形式 にすべきである。"
8726
8727 #. type: Plain text
8728 #: build/C/man3/shm_open.3:81
8729 msgid ""
8730 "I<oflag> is a bit mask created by ORing together exactly one of B<O_RDONLY> "
8731 "or B<O_RDWR> and any of the other flags listed here:"
8732 msgstr ""
8733 "I<oflag> はビットマスクで、 B<O_RDONLY> と B<O_RDWR> のいずれか一方と、以下に"
8734 "述べる他のフラグの論理和をとったもの を指定する。"
8735
8736 #. type: TP
8737 #: build/C/man3/shm_open.3:81
8738 #, no-wrap
8739 msgid "B<O_RDONLY>"
8740 msgstr "B<O_RDONLY>"
8741
8742 #. type: Plain text
8743 #: build/C/man3/shm_open.3:89
8744 msgid ""
8745 "Open the object for read access.  A shared memory object opened in this way "
8746 "can be B<mmap>(2)ed only for read (B<PROT_READ>)  access."
8747 msgstr ""
8748 "読み出しアクセス用にオブジェクトをオープンする。 このフラグを指定してオープン"
8749 "された共有メモリ・オブジェクトは、 読み出し (B<PROT_READ>) アクセスでのみ "
8750 "B<mmap>(2)  することができる。"
8751
8752 #. type: TP
8753 #: build/C/man3/shm_open.3:89
8754 #, no-wrap
8755 msgid "B<O_RDWR>"
8756 msgstr "B<O_RDWR>"
8757
8758 #. type: Plain text
8759 #: build/C/man3/shm_open.3:92
8760 msgid "Open the object for read-write access."
8761 msgstr "読み書きアクセス用にオブジェクトをオープンする。"
8762
8763 #. type: TP
8764 #: build/C/man3/shm_open.3:92
8765 #, no-wrap
8766 msgid "B<O_CREAT>"
8767 msgstr "B<O_CREAT>"
8768
8769 #.  In truth it is actually the filesystem IDs on Linux, but these
8770 #.  are nearly always the same as the effective IDs.  (MTK, Jul 05)
8771 #. type: Plain text
8772 #: build/C/man3/shm_open.3:112
8773 msgid ""
8774 "Create the shared memory object if it does not exist.  The user and group "
8775 "ownership of the object are taken from the corresponding effective IDs of "
8776 "the calling process, and the object's permission bits are set according to "
8777 "the low-order 9 bits of I<mode>, except that those bits set in the process "
8778 "file mode creation mask (see B<umask>(2))  are cleared for the new object.  "
8779 "A set of macro constants which can be used to define I<mode> is listed in "
8780 "B<open>(2).  (Symbolic definitions of these constants can be obtained by "
8781 "including I<E<lt>sys/stat.hE<gt>>.)"
8782 msgstr ""
8783 "存在しない場合、共有メモリ・オブジェクトを作成する。 オブジェクトのユーザとグ"
8784 "ループの所有権は、 呼び出し元プロセスの対応する実効 ID が使われ、 オブジェク"
8785 "トの許可ビットは I<mode> の下位 9 ビットに基づいて設定される。ただし、 ファイ"
8786 "ルモード作成マスク (B<umask>(2)  参照) に設定されている値は、新規オブジェクト"
8787 "に関してはクリアされる。 I<mode> を定義するために使用できるマクロ定数(群)は "
8788 "B<open>(2)  に記載されている (これらの定数のシンボル定義は I<E<lt>sys/stat."
8789 "hE<gt>> のインクルードにより得られる)。"
8790
8791 #. type: Plain text
8792 #: build/C/man3/shm_open.3:118
8793 msgid ""
8794 "A new shared memory object initially has zero length\\(emthe size of the "
8795 "object can be set using B<ftruncate>(2).  The newly allocated bytes of a "
8796 "shared memory object are automatically initialized to 0."
8797 msgstr ""
8798 "新規に作成された共有メモリ・オブジェクトは長さ 0 で初期化される。 オブジェク"
8799 "トの大きさは B<ftruncate>(2)  を使って設定できる。 共有メモリ・オブジェクトと"
8800 "して新規に確保されたバイトは自動的に 0 に初期化される。"
8801
8802 #. type: TP
8803 #: build/C/man3/shm_open.3:118
8804 #, no-wrap
8805 msgid "B<O_EXCL>"
8806 msgstr "B<O_EXCL>"
8807
8808 #. type: Plain text
8809 #: build/C/man3/shm_open.3:127
8810 msgid ""
8811 "If B<O_CREAT> was also specified, and a shared memory object with the given "
8812 "I<name> already exists, return an error.  The check for the existence of the "
8813 "object, and its creation if it does not exist, are performed atomically."
8814 msgstr ""
8815 "B<O_CREAT> が一緒に指定されており、 I<name> で指定された共有メモリ・オブジェ"
8816 "クトが既に存在した場合、 エラーを返す。 オブジェクトの存在確認と、存在しな"
8817 "かった場合のオブジェクト作成は、 必ず一連の操作として実行される (performed "
8818 "atomically)。"
8819
8820 #. type: TP
8821 #: build/C/man3/shm_open.3:127
8822 #, no-wrap
8823 msgid "B<O_TRUNC>"
8824 msgstr "B<O_TRUNC>"
8825
8826 #. type: Plain text
8827 #: build/C/man3/shm_open.3:130
8828 msgid "If the shared memory object already exists, truncate it to zero bytes."
8829 msgstr ""
8830 "共有メモリ・オブジェクトがすでに存在した場合、 そのオブジェクトを 0 バイトに"
8831 "切り詰める。"
8832
8833 #. type: Plain text
8834 #: build/C/man3/shm_open.3:133
8835 msgid ""
8836 "Definitions of these flag values can be obtained by including I<E<lt>fcntl."
8837 "hE<gt>>."
8838 msgstr ""
8839 "これらのフラグ値の定義は I<E<lt>fcntl.hE<gt>> のインクルードにより得られる。"
8840
8841 #. type: Plain text
8842 #: build/C/man3/shm_open.3:144
8843 msgid ""
8844 "On successful completion B<shm_open>()  returns a new file descriptor "
8845 "referring to the shared memory object.  This file descriptor is guaranteed "
8846 "to be the lowest-numbered file descriptor not previously opened within the "
8847 "process.  The B<FD_CLOEXEC> flag (see B<fcntl>(2))  is set for the file "
8848 "descriptor."
8849 msgstr ""
8850 "成功して完了した場合、 B<shm_open>()  は共有メモリ・オブジェクトを参照する新"
8851 "しいファイル・ディスクリプタを返す。 このファイル・ディスクリプタは、そのプロ"
8852 "セス内で過去にオープンされていない ファイル・ディスクリプタの中で最も小さな数"
8853 "になることが保証される。 B<FD_CLOEXEC> フラグ (B<fcntl>(2)  を参照) が、この"
8854 "ファイル・ディスクリプタに設定される。"
8855
8856 #. type: Plain text
8857 #: build/C/man3/shm_open.3:153
8858 msgid ""
8859 "The file descriptor is normally used in subsequent calls to B<ftruncate>(2)  "
8860 "(for a newly created object) and B<mmap>(2).  After a call to B<mmap>(2)  "
8861 "the file descriptor may be closed without affecting the memory mapping."
8862 msgstr ""
8863 "通常、これらのファイル・ディスクリプタは、この後続けて実行される "
8864 "B<ftruncate>(2)  (新規に作成されたオブジェクトの場合のみ) と B<mmap>(2)  の呼"
8865 "び出しに使用される。 B<mmap>(2)  を呼び出した後は、ファイル・ディスクリプタを"
8866 "クローズしてもよく、 クローズしてもメモリ・マッピングに影響を与えることはな"
8867 "い。"
8868
8869 #. type: Plain text
8870 #: build/C/man3/shm_open.3:171
8871 msgid ""
8872 "The operation of B<shm_unlink>()  is analogous to B<unlink>(2): it removes a "
8873 "shared memory object name, and, once all processes have unmapped the object, "
8874 "de-allocates and destroys the contents of the associated memory region.  "
8875 "After a successful B<shm_unlink>(), attempts to B<shm_open>()  an object "
8876 "with the same I<name> will fail (unless B<O_CREAT> was specified, in which "
8877 "case a new, distinct object is created)."
8878 msgstr ""
8879 "B<shm_unlink>()  の動作は B<unlink>(2)  とよく似ている: 共有メモリ・オブジェ"
8880 "クト名を削除し、すべてのプロセスが処理対象の オブジェクトをアンマップした時点"
8881 "でオブジェクトの割り当てを解除し、 対応するメモリ領域の内容を破棄する。 "
8882 "B<shm_unlink>()  が成功した後で、同じ I<name> を持つオブジェクトに対して "
8883 "B<shm_open>()  を行うと、 (B<O_CREAT> が指定されていない場合) 失敗する。 "
8884 "(B<O_CREAT> が指定されている場合、新しく別のオブジェクトが作成される)。"
8885
8886 #. type: Plain text
8887 #: build/C/man3/shm_open.3:180
8888 msgid ""
8889 "On success, B<shm_open>()  returns a nonnegative file descriptor.  On "
8890 "failure, B<shm_open>()  returns -1.  B<shm_unlink>()  returns 0 on success, "
8891 "or -1 on error."
8892 msgstr ""
8893 "成功した場合、 B<shm_open>()  は非負のファイル・ディスクリプタを返す。 失敗し"
8894 "た場合、 B<shm_open>()  は -1 を返す。 B<shm_unlink>()  は、成功した場合 0 "
8895 "を、エラーが起こった場合 -1 を返す。"
8896
8897 #. type: Plain text
8898 #: build/C/man3/shm_open.3:187
8899 msgid ""
8900 "On failure, I<errno> is set to indicate the cause of the error.  Values "
8901 "which may appear in I<errno> include the following:"
8902 msgstr ""
8903 "失敗した場合、エラーの原因を示すため I<errno> が設定される。 I<errno> に設定"
8904 "される値は以下の通りである:"
8905
8906 #. type: Plain text
8907 #: build/C/man3/shm_open.3:192
8908 msgid "Permission to B<shm_unlink>()  the shared memory object was denied."
8909 msgstr "共有メモリオブジェクトを B<shm_unlink>()  する権限がなかった。"
8910
8911 #. type: Plain text
8912 #: build/C/man3/shm_open.3:202
8913 msgid ""
8914 "Permission was denied to B<shm_open>()  I<name> in the specified I<mode>, or "
8915 "B<O_TRUNC> was specified and the caller does not have write permission on "
8916 "the object."
8917 msgstr ""
8918 "指定された I<mode> で I<name> を B<shm_open>()  する権限がなかった。もしく"
8919 "は、 B<O_TRUNC> が指定されたが、呼び出し元にはそのオブジェクトに対する書き込"
8920 "み権限が なかった。"
8921
8922 #. type: TP
8923 #: build/C/man3/shm_open.3:202 build/C/man2/shmget.2:198
8924 #, no-wrap
8925 msgid "B<EEXIST>"
8926 msgstr "B<EEXIST>"
8927
8928 #. type: Plain text
8929 #: build/C/man3/shm_open.3:213
8930 msgid ""
8931 "Both B<O_CREAT> and B<O_EXCL> were specified to B<shm_open>()  and the "
8932 "shared memory object specified by I<name> already exists."
8933 msgstr ""
8934 "B<O_CREAT> と B<O_EXCL> の両方が B<shm_open>()  に指定されたが、 I<name> で指"
8935 "定された共有メモリ・オブジェクトが既に存在した。"
8936
8937 #. type: Plain text
8938 #: build/C/man3/shm_open.3:220
8939 msgid "The I<name> argument to B<shm_open>()  was invalid."
8940 msgstr "B<shm_open>()  に与えられた I<name> 引き数が不正であった。"
8941
8942 #. type: TP
8943 #: build/C/man3/shm_open.3:220
8944 #, no-wrap
8945 msgid "B<EMFILE>"
8946 msgstr "B<EMFILE>"
8947
8948 #. type: Plain text
8949 #: build/C/man3/shm_open.3:223
8950 msgid "The process already has the maximum number of files open."
8951 msgstr "プロセスがオープン可能なファイル数の上限にすでに達していた。"
8952
8953 #. type: TP
8954 #: build/C/man3/shm_open.3:223
8955 #, no-wrap
8956 msgid "B<ENAMETOOLONG>"
8957 msgstr "B<ENAMETOOLONG>"
8958
8959 #. type: Plain text
8960 #: build/C/man3/shm_open.3:229
8961 msgid "The length of I<name> exceeds B<PATH_MAX>."
8962 msgstr "I<name> の長さが B<PATH_MAX> を越えている。"
8963
8964 #. type: Plain text
8965 #: build/C/man3/shm_open.3:233
8966 msgid ""
8967 "The limit on the total number of files open on the system has been reached."
8968 msgstr "ファイルシステムでオープンできるファイル数の上限に達した。"
8969
8970 #. type: TP
8971 #: build/C/man3/shm_open.3:233 build/C/man3/shm_open.3:242
8972 #: build/C/man2/shmget.2:225
8973 #, no-wrap
8974 msgid "B<ENOENT>"
8975 msgstr "B<ENOENT>"
8976
8977 #. type: Plain text
8978 #: build/C/man3/shm_open.3:242
8979 msgid ""
8980 "An attempt was made to B<shm_open>()  a I<name> that did not exist, and "
8981 "B<O_CREAT> was not specified."
8982 msgstr ""
8983 "存在していない I<name> のオブジェクトを B<shm_open>()  しようとしたが、 "
8984 "B<O_CREAT> が指定されていなかった。"
8985
8986 #. type: Plain text
8987 #: build/C/man3/shm_open.3:249
8988 msgid ""
8989 "An attempt was to made to B<shm_unlink>()  a I<name> that does not exist."
8990 msgstr "存在しない I<name> のオブジェクトを B<shm_unlink>()  しようとした。"
8991
8992 #. type: Plain text
8993 #: build/C/man3/shm_open.3:251
8994 msgid "These functions are provided in glibc 2.2 and later."
8995 msgstr "これらの関数は glibc 2.2 以降で提供されている。"
8996
8997 #. type: Plain text
8998 #: build/C/man3/shm_open.3:257
8999 msgid ""
9000 "POSIX.1-2001 says that the group ownership of a newly created shared memory "
9001 "object is set to either the calling process's effective group ID or \"a "
9002 "system default group ID\"."
9003 msgstr ""
9004 "POSIX.1-2001 には、新規に作成される共有メモリオブジェクトのグループ所有権"
9005 "は、 呼び出し元プロセスの実効グループ ID か 「システムのデフォルトのグループ "
9006 "ID」 のどちらかに設定される、と書かれている。"
9007
9008 #. type: Plain text
9009 #: build/C/man3/shm_open.3:266
9010 msgid ""
9011 "POSIX leaves the behavior of the combination of B<O_RDONLY> and B<O_TRUNC> "
9012 "unspecified.  On Linux, this will successfully truncate an existing shared "
9013 "memory object\\(emthis may not be so on other UNIX systems."
9014 msgstr ""
9015 "POSIX は B<O_RDONLY> と B<O_TRUNC> が一緒に指定された場合の動作を未定義にして"
9016 "いる。Linux では、 既存の共有メモリ・オブジェクトに対する切り詰め (truncate) "
9017 "は成功する。 しかし、他の UNIX システムでも同じであるとは限らない。"
9018
9019 #. type: Plain text
9020 #: build/C/man3/shm_open.3:271
9021 msgid ""
9022 "The POSIX shared memory object implementation on Linux 2.4 makes use of a "
9023 "dedicated filesystem, which is normally mounted under I</dev/shm>."
9024 msgstr ""
9025 "Linux 2.4 における POSIX 共有メモリ・オブジェクトの実装は 専用のファイルシス"
9026 "テムを使用する。そのファイルシステムは通常 I</dev/shm> にマウントされる。"
9027
9028 #. type: Plain text
9029 #: build/C/man3/shm_open.3:282
9030 msgid ""
9031 "B<close>(2), B<fchmod>(2), B<fchown>(2), B<fcntl>(2), B<fstat>(2), "
9032 "B<ftruncate>(2), B<mmap>(2), B<open>(2), B<umask>(2), B<shm_overview>(7)"
9033 msgstr ""
9034 "B<close>(2), B<fchmod>(2), B<fchown>(2), B<fcntl>(2), B<fstat>(2), "
9035 "B<ftruncate>(2), B<mmap>(2), B<open>(2), B<umask>(2), B<shm_overview>(7)"
9036
9037 #. type: TH
9038 #: build/C/man7/shm_overview.7:27
9039 #, no-wrap
9040 msgid "SHM_OVERVIEW"
9041 msgstr "SHM_OVERVIEW"
9042
9043 #. type: TH
9044 #: build/C/man7/shm_overview.7:27
9045 #, no-wrap
9046 msgid "2010-09-10"
9047 msgstr "2010-09-10"
9048
9049 #. type: Plain text
9050 #: build/C/man7/shm_overview.7:30
9051 msgid "shm_overview - overview of POSIX shared memory"
9052 msgstr "shm_overview - POSIX 共有メモリの概要"
9053
9054 #. type: Plain text
9055 #: build/C/man7/shm_overview.7:33
9056 msgid ""
9057 "The POSIX shared memory API allows processes to communicate information by "
9058 "sharing a region of memory."
9059 msgstr ""
9060 "POSIX 共有メモリ API を使用すると、メモリのある領域を共有して、 プロセス間で"
9061 "情報をやり取りすることができる。"
9062
9063 #. type: Plain text
9064 #: build/C/man7/shm_overview.7:35
9065 msgid "The interfaces employed in the API are:"
9066 msgstr "この API では以下のインターフェースが採用されている。"
9067
9068 #. type: TP
9069 #: build/C/man7/shm_overview.7:35
9070 #, no-wrap
9071 msgid "B<shm_open>(3)"
9072 msgstr "B<shm_open>(3)"
9073
9074 #. type: Plain text
9075 #: build/C/man7/shm_overview.7:42
9076 msgid ""
9077 "Create and open a new object, or open an existing object.  This is analogous "
9078 "to B<open>(2).  The call returns a file descriptor for use by the other "
9079 "interfaces listed below."
9080 msgstr ""
9081 "新しいオブジェクトを生成しオープンする、もしくは 既存のオブジェクトをオープン"
9082 "する。これは B<open>(2)  と同じである。下記にある他のインターフェースで使用す"
9083 "る ファイルディスクリプタを返す。"
9084
9085 #. type: TP
9086 #: build/C/man7/shm_overview.7:42
9087 #, no-wrap
9088 msgid "B<ftruncate>(2)"
9089 msgstr "B<ftruncate>(2)"
9090
9091 #. type: Plain text
9092 #: build/C/man7/shm_overview.7:46
9093 msgid ""
9094 "Set the size of the shared memory object.  (A newly created shared memory "
9095 "object has a length of zero.)"
9096 msgstr "共有メモリオブジェクトの大きさを設定する。"
9097
9098 #. type: Plain text
9099 #: build/C/man7/shm_overview.7:50
9100 msgid ""
9101 "Map the shared memory object into the virtual address space of the calling "
9102 "process."
9103 msgstr ""
9104 "呼び出したプロセスの仮想アドレス空間に共有メモリオブジェクトを マップする。"
9105
9106 #. type: TP
9107 #: build/C/man7/shm_overview.7:50
9108 #, no-wrap
9109 msgid "B<munmap>(2)"
9110 msgstr "B<munmap>(2)"
9111
9112 #. type: Plain text
9113 #: build/C/man7/shm_overview.7:54
9114 msgid ""
9115 "Unmap the shared memory object from the virtual address space of the calling "
9116 "process."
9117 msgstr ""
9118 "呼び出したプロセスの仮想アドレス空間から 共有メモリオブジェクトをアンマップす"
9119 "る。"
9120
9121 #. type: TP
9122 #: build/C/man7/shm_overview.7:54
9123 #, no-wrap
9124 msgid "B<shm_unlink>(3)"
9125 msgstr "B<shm_unlink>(3)"
9126
9127 #. type: Plain text
9128 #: build/C/man7/shm_overview.7:57
9129 msgid "Remove a shared memory object name."
9130 msgstr "共有メモリオブジェクト名を削除する。"
9131
9132 #. type: TP
9133 #: build/C/man7/shm_overview.7:57
9134 #, no-wrap
9135 msgid "B<close>(2)"
9136 msgstr "B<close>(2)"
9137
9138 #. type: Plain text
9139 #: build/C/man7/shm_overview.7:62
9140 msgid ""
9141 "Close the file descriptor allocated by B<shm_open>(3)  when it is no longer "
9142 "needed."
9143 msgstr ""
9144 "B<shm_open>(3)  で割り当てられたファイルディスクリプタが不要になった際に、 そ"
9145 "のファイルディスクリプタをクローズする。"
9146
9147 #. type: TP
9148 #: build/C/man7/shm_overview.7:62
9149 #, no-wrap
9150 msgid "B<fstat>(2)"
9151 msgstr "B<fstat>(2)"
9152
9153 #. type: Plain text
9154 #: build/C/man7/shm_overview.7:76
9155 msgid ""
9156 "Obtain a I<stat> structure that describes the shared memory object.  Among "
9157 "the information returned by this call are the object's size (I<st_size>), "
9158 "permissions (I<st_mode>), owner (I<st_uid>), and group (I<st_gid>)."
9159 msgstr ""
9160 "その共有メモリオブジェクトについての情報が入った I<stat> 構造体を取得する。 "
9161 "このシステムコールが返す情報には、オブジェクトのサイズ (I<st_size>)、 許可属"
9162 "性 (I<st_mode>)、 所有者 (I<st_uid>)、 グループ (I<st_gid>)  がある。"
9163
9164 #. type: TP
9165 #: build/C/man7/shm_overview.7:76
9166 #, no-wrap
9167 msgid "B<fchown>(2)"
9168 msgstr "B<fchown>(2)"
9169
9170 #. type: Plain text
9171 #: build/C/man7/shm_overview.7:79
9172 msgid "To change the ownership of a shared memory object."
9173 msgstr "共有メモリオブジェクトの所有権を変更する。"
9174
9175 #. type: TP
9176 #: build/C/man7/shm_overview.7:79
9177 #, no-wrap
9178 msgid "B<fchmod>(2)"
9179 msgstr "B<fchmod>(2)"
9180
9181 #. type: Plain text
9182 #: build/C/man7/shm_overview.7:82
9183 msgid "To change the permissions of a shared memory object."
9184 msgstr "共有メモリオブジェクトの許可属性を変更する。"
9185
9186 #. type: SS
9187 #: build/C/man7/shm_overview.7:82
9188 #, no-wrap
9189 msgid "Versions"
9190 msgstr "Versions"
9191
9192 #. type: Plain text
9193 #: build/C/man7/shm_overview.7:84
9194 msgid "POSIX shared memory is supported since Linux 2.4 and glibc 2.2."
9195 msgstr "POSIX 共有メモリは Linux 2.4 と glibc 2.2 以降でサポートされている。"
9196
9197 #. type: SS
9198 #: build/C/man7/shm_overview.7:84
9199 #, no-wrap
9200 msgid "Persistence"
9201 msgstr "持続性"
9202
9203 #. type: Plain text
9204 #: build/C/man7/shm_overview.7:89
9205 msgid ""
9206 "POSIX shared memory objects have kernel persistence: a shared memory object "
9207 "will exist until the system is shut down, or until all processes have "
9208 "unmapped the object and it has been deleted with B<shm_unlink>(3)"
9209 msgstr ""
9210 "POSIX 共有メモリオブジェクトはカーネル内で保持される。 共有メモリオブジェクト"
9211 "は、システムがシャットダウンされるか、 全てのプロセスがそのオブジェクトをアン"
9212 "マップし、 B<shm_unlink>(3)  で削除されるまで、存在し続ける。"
9213
9214 #. type: SS
9215 #: build/C/man7/shm_overview.7:89
9216 #, no-wrap
9217 msgid "Linking"
9218 msgstr "リンク"
9219
9220 #. type: Plain text
9221 #: build/C/man7/shm_overview.7:94
9222 msgid ""
9223 "Programs using the POSIX shared memory API must be compiled with I<cc -lrt> "
9224 "to link against the real-time library, I<librt>."
9225 msgstr ""
9226 "POSIX 共有メモリ API を使用したプログラムは I<cc -lrt> でコンパイルし、リアル"
9227 "タイムライブラリ I<librt> とリンクしなければならない。"
9228
9229 #. type: SS
9230 #: build/C/man7/shm_overview.7:94
9231 #, no-wrap
9232 msgid "Accessing shared memory objects via the filesystem"
9233 msgstr "ファイルシステム経由での共有メモリオブジェクトへのアクセス"
9234
9235 #. type: Plain text
9236 #: build/C/man7/shm_overview.7:101
9237 msgid ""
9238 "On Linux, shared memory objects are created in a (I<tmpfs>)  virtual "
9239 "filesystem, normally mounted under I</dev/shm>.  Since kernel 2.6.19, Linux "
9240 "supports the use of access control lists (ACLs)  to control the permissions "
9241 "of objects in the virtual filesystem."
9242 msgstr ""
9243 "Linux では、共有メモリオブジェクトは通常 I</dev/shm> 以下にマウントされる仮想"
9244 "ファイルシステム (I<tmpfs>)  内に作成される。 カーネル 2.6.19 以降の Linux で"
9245 "は、 仮想ファイルシステム内のオブジェクトの許可属性の制御に、 アクセス制御リ"
9246 "スト (ACL; access control lists) を使うことができる。"
9247
9248 #. type: Plain text
9249 #: build/C/man7/shm_overview.7:106
9250 msgid ""
9251 "Typically, processes must synchronize their access to a shared memory "
9252 "object, using, for example, POSIX semaphores."
9253 msgstr ""
9254 "通常は、共有メモリオブジェクトにアクセスするプロセスは、 POSIX セマフォなどを"
9255 "使ってプロセス間で同期をとらなければならない。"
9256
9257 #. type: Plain text
9258 #: build/C/man7/shm_overview.7:114
9259 msgid ""
9260 "System V shared memory (B<shmget>(2), B<shmop>(2), etc.) is an older shared "
9261 "memory API.  POSIX shared memory provides a simpler, and better designed "
9262 "interface; on the other hand POSIX shared memory is somewhat less widely "
9263 "available (especially on older systems) than System V shared memory."
9264 msgstr ""
9265 "System V 共有メモリ (B<shmget>(2), B<shmop>(2)  など) は古い共有メモリ API で"
9266 "ある。 POSIX 共有メモリは、より簡単で、うまく設計されたインタフェースを提供し"
9267 "ている。 一方で、POSIX 共有メモリは System V 共有メモリと比べると 利用できる"
9268 "システムが少ない (特に、古いシステムでは少ない)。"
9269
9270 #. type: Plain text
9271 #: build/C/man7/shm_overview.7:127
9272 msgid ""
9273 "B<fchmod>(2), B<fchown>(2), B<fstat>(2), B<ftruncate>(2), B<mmap>(2), "
9274 "B<mprotect>(2), B<munmap>(2), B<shmget>(2), B<shmop>(2), B<shm_open>(3), "
9275 "B<shm_unlink>(3), B<sem_overview>(7)"
9276 msgstr ""
9277 "B<fchmod>(2), B<fchown>(2), B<fstat>(2), B<ftruncate>(2), B<mmap>(2), "
9278 "B<mprotect>(2), B<munmap>(2), B<shmget>(2), B<shmop>(2), B<shm_open>(3), "
9279 "B<shm_unlink>(3), B<sem_overview>(7)"
9280
9281 #. type: TH
9282 #: build/C/man2/shmctl.2:45
9283 #, no-wrap
9284 msgid "SHMCTL"
9285 msgstr "SHMCTL"
9286
9287 #. type: TH
9288 #: build/C/man2/shmctl.2:45
9289 #, no-wrap
9290 msgid "2014-02-07"
9291 msgstr "2014-02-07"
9292
9293 #. type: Plain text
9294 #: build/C/man2/shmctl.2:48
9295 msgid "shmctl - System V shared memory control"
9296 msgstr "shmctl - System V 共有メモリ (shared memory) を制御する"
9297
9298 #. type: Plain text
9299 #: build/C/man2/shmctl.2:51 build/C/man2/shmget.2:44
9300 msgid "B<#include E<lt>sys/ipc.hE<gt>>"
9301 msgstr "B<#include E<lt>sys/ipc.hE<gt>>"
9302
9303 #. type: Plain text
9304 #: build/C/man2/shmctl.2:53 build/C/man2/shmget.2:46
9305 msgid "B<#include E<lt>sys/shm.hE<gt>>"
9306 msgstr "B<#include E<lt>sys/shm.hE<gt>>"
9307
9308 #. type: Plain text
9309 #: build/C/man2/shmctl.2:55
9310 msgid ""
9311 "B<int shmctl(int >I<shmid>B<, int >I<cmd>B<, struct shmid_ds *>I<buf>B<);>"
9312 msgstr ""
9313 "B<int shmctl(int >I<shmid>B<, int >I<cmd>B<, struct shmid_ds *>I<buf>B<);>"
9314
9315 #. type: Plain text
9316 #: build/C/man2/shmctl.2:62
9317 msgid ""
9318 "B<shmctl>()  performs the control operation specified by I<cmd> on the System"
9319 "\\ V shared memory segment whose identifier is given in I<shmid>."
9320 msgstr ""
9321 "B<shmctl>()  は、識別子が I<shmid> の System\\ V 共有メモリ・セグメントに対し"
9322 "て I<cmd> で指示した制御命令を実行する。"
9323
9324 #. type: Plain text
9325 #: build/C/man2/shmctl.2:67
9326 msgid ""
9327 "The I<buf> argument is a pointer to a I<shmid_ds> structure, defined in "
9328 "I<E<lt>sys/shm.hE<gt>> as follows:"
9329 msgstr ""
9330 "I<buf> 引き数は、 I<shmid_ds> 構造体へのポインタである。 この構造体は "
9331 "I<E<lt>sys/shm.hE<gt>> で以下のように定義されている"
9332
9333 #. type: Plain text
9334 #: build/C/man2/shmctl.2:81
9335 #, no-wrap
9336 msgid ""
9337 "struct shmid_ds {\n"
9338 "    struct ipc_perm shm_perm;    /* Ownership and permissions */\n"
9339 "    size_t          shm_segsz;   /* Size of segment (bytes) */\n"
9340 "    time_t          shm_atime;   /* Last attach time */\n"
9341 "    time_t          shm_dtime;   /* Last detach time */\n"
9342 "    time_t          shm_ctime;   /* Last change time */\n"
9343 "    pid_t           shm_cpid;    /* PID of creator */\n"
9344 "    pid_t           shm_lpid;    /* PID of last shmat(2)/shmdt(2) */\n"
9345 "    shmatt_t        shm_nattch;  /* No. of current attaches */\n"
9346 "    ...\n"
9347 "};\n"
9348 msgstr ""
9349 "struct shmid_ds {\n"
9350 "    struct ipc_perm shm_perm;    /* 所有権と許可 */\n"
9351 "    size_t          shm_segsz;   /* セグメントのサイズ (バイト) */\n"
9352 "    time_t          shm_atime;   /* 最後の付加 (attach) の時刻 */\n"
9353 "    time_t          shm_dtime;   /* 最後の分離 (detach) の時刻 */\n"
9354 "    time_t          shm_ctime;   /* 最後に変更が行われた時刻 */\n"
9355 "    pid_t           shm_cpid;    /* 作成者 (creator) の PID */\n"
9356 "    pid_t           shm_lpid;    /* 最後の shmat(2)/shmdt(2) の PID */\n"
9357 "    shmatt_t        shm_nattch;  /* 現在付加されている数 */\n"
9358 "    ...\n"
9359 "};\n"
9360
9361 #. type: Plain text
9362 #: build/C/man2/shmctl.2:89
9363 msgid ""
9364 "The I<ipc_perm> structure is defined as follows (the highlighted fields are "
9365 "settable using B<IPC_SET>):"
9366 msgstr ""
9367 "I<ipc_perm> 構造体は以下のように定義されている (強調されたフィールドは "
9368 "B<IPC_SET> を使って設定可能である):"
9369
9370 #. type: Plain text
9371 #: build/C/man2/shmctl.2:102
9372 #, no-wrap
9373 msgid ""
9374 "struct ipc_perm {\n"
9375 "    key_t          __key;    /* Key supplied to shmget(2) */\n"
9376 "    uid_t          B<uid>;      /* Effective UID of owner */\n"
9377 "    gid_t          B<gid>;      /* Effective GID of owner */\n"
9378 "    uid_t          cuid;     /* Effective UID of creator */\n"
9379 "    gid_t          cgid;     /* Effective GID of creator */\n"
9380 "    unsigned short B<mode>;     /* B<Permissions> + SHM_DEST and\n"
9381 "                                SHM_LOCKED flags */\n"
9382 "    unsigned short __seq;    /* Sequence number */\n"
9383 "};\n"
9384 msgstr ""
9385 "struct ipc_perm {\n"
9386 "    key_t          __key;    /* shmget(2) に与えられるキー */\n"
9387 "    uid_t          B<uid>;      /* 所有者の実効 UID */\n"
9388 "    gid_t          B<gid>;      /* 所有者の実効 GID */\n"
9389 "    uid_t          cuid;     /* 作成者の実効 UID */\n"
9390 "    gid_t          cgid;     /* 作成者の実効 GID */\n"
9391 "    unsigned short B<mode>;     /* B<許可> + SHM_DEST と\n"
9392 "                                SHM_LOCKED フラグ */\n"
9393 "    unsigned short __seq;    /* シーケンス番号 */\n"
9394 "};\n"
9395
9396 #. type: Plain text
9397 #: build/C/man2/shmctl.2:108
9398 msgid "Valid values for I<cmd> are:"
9399 msgstr "I<cmd> として有効な値は以下の通り:"
9400
9401 #. type: TP
9402 #: build/C/man2/shmctl.2:109
9403 #, no-wrap
9404 msgid "B<IPC_STAT>"
9405 msgstr "B<IPC_STAT>"
9406
9407 #. type: Plain text
9408 #: build/C/man2/shmctl.2:118
9409 msgid ""
9410 "Copy information from the kernel data structure associated with I<shmid> "
9411 "into the I<shmid_ds> structure pointed to by I<buf>.  The caller must have "
9412 "read permission on the shared memory segment."
9413 msgstr ""
9414 "I<shmid> に関連づけられたカーネルデータ構造体の情報を I<buf> で指された "
9415 "I<shmid_ds> 構造体にコピーする。 呼び出し元は共有メモリ・セグメントに対する "
9416 "読み込み許可を持たなければならない。"
9417
9418 #. type: TP
9419 #: build/C/man2/shmctl.2:118
9420 #, no-wrap
9421 msgid "B<IPC_SET>"
9422 msgstr "B<IPC_SET>"
9423
9424 #. type: Plain text
9425 #: build/C/man2/shmctl.2:136
9426 msgid ""
9427 "Write the values of some members of the I<shmid_ds> structure pointed to by "
9428 "I<buf> to the kernel data structure associated with this shared memory "
9429 "segment, updating also its I<shm_ctime> member.  The following fields can be "
9430 "changed: I<shm_perm.uid>, I<shm_perm.gid>, and (the least significant 9 bits "
9431 "of) I<shm_perm.mode>.  The effective UID of the calling process must match "
9432 "the owner (I<shm_perm.uid>)  or creator (I<shm_perm.cuid>)  of the shared "
9433 "memory segment, or the caller must be privileged."
9434 msgstr ""
9435 "I<buf> によって指される I<shmid_ds> 構造体のいくつかのメンバーの値を、 この共"
9436 "有メモリ・セグメントに関連づけられたカーネルデータ構造体に書き込み、 "
9437 "I<shm_ctime> メンバーも更新する。 以下のフィールドは変更できる。 I<shm_perm."
9438 "uid>, I<shm_perm.gid>, I<shm_perm.mode> (の最下位 9 ビット)。 呼び出したプロ"
9439 "セスの実効 UID が所有者 (I<shm_perm.uid>)  または作成者 (I<shm_perm.cuid>)  "
9440 "と一致するか、呼び出し元が特権を持たなければならない。"
9441
9442 #. type: TP
9443 #: build/C/man2/shmctl.2:136
9444 #, no-wrap
9445 msgid "B<IPC_RMID>"
9446 msgstr "B<IPC_RMID>"
9447
9448 #. type: Plain text
9449 #: build/C/man2/shmctl.2:149
9450 msgid ""
9451 "Mark the segment to be destroyed.  The segment will only actually be "
9452 "destroyed after the last process detaches it (i.e., when the I<shm_nattch> "
9453 "member of the associated structure I<shmid_ds> is zero).  The caller must be "
9454 "the owner or creator of the segment, or be privileged.  The I<buf> argument "
9455 "is ignored."
9456 msgstr ""
9457 "セグメントに破棄済みのマークを付ける。 セグメントは、実際には最後プロセスがセ"
9458 "グメントを分離した (関連する I<shmid_ds> 構造体の I<shm_nattch> メンバーが 0 "
9459 "になった) 後でのみ破棄される。 呼び出し元はそのセグメントの所有者か作成者であ"
9460 "るか、特権を持たなければならない。 I<buf> 引き数は無視される。"
9461
9462 #. type: Plain text
9463 #: build/C/man2/shmctl.2:157
9464 msgid ""
9465 "If a segment has been marked for destruction, then the (nonstandard)  "
9466 "B<SHM_DEST> flag of the I<shm_perm.mode> field in the associated data "
9467 "structure retrieved by B<IPC_STAT> will be set."
9468 msgstr ""
9469 "セグメントに破棄のマークが付けられると、 関連するデータ構造体において "
9470 "I<shm_perm.mode> フィールドの (標準ではない)  B<SHM_DEST> フラグが設定され"
9471 "る。 このデータ構造体は B<IPC_STAT> で取得される。"
9472
9473 #. type: Plain text
9474 #: build/C/man2/shmctl.2:160
9475 msgid ""
9476 "The caller I<must> ensure that a segment is eventually destroyed; otherwise "
9477 "its pages that were faulted in will remain in memory or swap."
9478 msgstr ""
9479 "呼び出し元は最終的にはセグメントを忘れずに破棄I<しなければならない>。 そうで"
9480 "なれば、フォールト (fault) されたページは メモリかスワップ (swap) に残り続け"
9481 "る。"
9482
9483 #. type: Plain text
9484 #: build/C/man2/shmctl.2:165
9485 msgid ""
9486 "See also the description of I</proc/sys/kernel/shm_rmid_forced> in "
9487 "B<proc>(5)."
9488 msgstr "B<proc>(5) の I</proc/sys/kernel/shm_rmid_forced> の説明も参照のこと。"
9489
9490 #. type: TP
9491 #: build/C/man2/shmctl.2:165
9492 #, no-wrap
9493 msgid "B<IPC_INFO> (Linux-specific)"
9494 msgstr "B<IPC_INFO> (Linux 固有)"
9495
9496 #. type: Plain text
9497 #: build/C/man2/shmctl.2:178
9498 msgid ""
9499 "Return information about system-wide shared memory limits and parameters in "
9500 "the structure pointed to by I<buf>.  This structure is of type I<shminfo> "
9501 "(thus, a cast is required), defined in I<E<lt>sys/shm.hE<gt>> if the "
9502 "B<_GNU_SOURCE> feature test macro is defined:"
9503 msgstr ""
9504 "システム全体での共有メモリの制限とパラメータに関する情報を、 I<buf> が指す構"
9505 "造体に入れて返す。 この構造体は I<shminfo> 型である (そのためキャストが必要で"
9506 "ある)。 I<shminfo> は B<_GNU_SOURCE> 機能検査マクロが定義された場合に "
9507 "I<E<lt>sys/shm.hE<gt>> で以下のように定義される:"
9508
9509 #. type: Plain text
9510 #: build/C/man2/shmctl.2:192
9511 #, no-wrap
9512 msgid ""
9513 "struct shminfo {\n"
9514 "    unsigned long shmmax; /* Maximum segment size */\n"
9515 "    unsigned long shmmin; /* Minimum segment size;\n"
9516 "                             always 1 */\n"
9517 "    unsigned long shmmni; /* Maximum number of segments */\n"
9518 "    unsigned long shmseg; /* Maximum number of segments\n"
9519 "                             that a process can attach;\n"
9520 "                             unused within kernel */\n"
9521 "    unsigned long shmall; /* Maximum number of pages of\n"
9522 "                             shared memory, system-wide */\n"
9523 "};\n"
9524 msgstr ""
9525 "struct  shminfo {\n"
9526 "    unsigned long shmmax; /* 最大セグメントサイズ */\n"
9527 "    unsigned long shmmin; /* 最小セグメントサイズ。\n"
9528 "                             常に 1 */\n"
9529 "    unsigned long shmmni; /* 最大セグメント数 */\n"
9530 "    unsigned long shmseg; /* プロセスが付加できる\n"
9531 "                             セグメントの最大数。\n"
9532 "                             カーネル内では未使用 */\n"
9533 "    unsigned long shmall; /* 共有メモリの最大ページ数。\n"
9534 "                             システム全体での値 */\n"
9535 "};\n"
9536
9537 #. type: Plain text
9538 #: build/C/man2/shmctl.2:205
9539 msgid ""
9540 "The I<shmmni>, I<shmmax>, and I<shmall> settings can be changed via I</proc> "
9541 "files of the same name; see B<proc>(5)  for details."
9542 msgstr ""
9543 "設定 I<shmmni>, I<shmmax>, I<shmall> は I</proc> にある同じ名前のファイル経由"
9544 "で変更可能である。 詳しくは B<proc>(5)  を参照。"
9545
9546 #. type: TP
9547 #: build/C/man2/shmctl.2:205
9548 #, no-wrap
9549 msgid "B<SHM_INFO> (Linux-specific)"
9550 msgstr "B<SHM_INFO> (Linux 固有)"
9551
9552 #. type: Plain text
9553 #: build/C/man2/shmctl.2:216
9554 msgid ""
9555 "Return a I<shm_info> structure whose fields contain information about system "
9556 "resources consumed by shared memory.  This structure is defined in "
9557 "I<E<lt>sys/shm.hE<gt>> if the B<_GNU_SOURCE> feature test macro is defined:"
9558 msgstr ""
9559 "共有メモリが消費しているシステム資源に関する情報を 格納した I<shm_info> 構造"
9560 "体を返す。 この構造体は、 B<_GNU_SOURCE> 機能検査マクロが定義された場合に "
9561 "I<E<lt>sys/shm.hE<gt>> で以下のように定義される:"
9562
9563 #. type: Plain text
9564 #: build/C/man2/shmctl.2:233
9565 #, no-wrap
9566 msgid ""
9567 "struct shm_info {\n"
9568 "    int           used_ids; /* # of currently existing\n"
9569 "                               segments */\n"
9570 "    unsigned long shm_tot;  /* Total number of shared\n"
9571 "                               memory pages */\n"
9572 "    unsigned long shm_rss;  /* # of resident shared\n"
9573 "                               memory pages */\n"
9574 "    unsigned long shm_swp;  /* # of swapped shared\n"
9575 "                               memory pages */\n"
9576 "    unsigned long swap_attempts;\n"
9577 "                            /* Unused since Linux 2.4 */\n"
9578 "    unsigned long swap_successes;\n"
9579 "                            /* Unused since Linux 2.4 */\n"
9580 "};\n"
9581 msgstr ""
9582 "struct shm_info {\n"
9583 "    int           used_ids; /* 現在存在するセグメント数 */\n"
9584 "    unsigned long shm_tot;  /* 共有メモリのページ総数 */\n"
9585 "    unsigned long shm_rss;  /* メモリ上にある (スワップされて\n"
9586 "                               いない) 共有メモリページ数 */\n"
9587 "    unsigned long shm_swp;  /* スワップされている共有メモリ\n"
9588 "                               ページ数 */\n"
9589 "    unsigned long swap_attempts;\n"
9590 "                            /* Linux 2.4 以降では未使用 */\n"
9591 "    unsigned long swap_successes;\n"
9592 "                            /* Linux 2.4 以降では未使用 */\n"
9593 "};\n"
9594
9595 #. type: TP
9596 #: build/C/man2/shmctl.2:235
9597 #, no-wrap
9598 msgid "B<SHM_STAT> (Linux-specific)"
9599 msgstr "B<SHM_STAT> (Linux 固有)"
9600
9601 #. type: Plain text
9602 #: build/C/man2/shmctl.2:246
9603 msgid ""
9604 "Return a I<shmid_ds> structure as for B<IPC_STAT>.  However, the I<shmid> "
9605 "argument is not a segment identifier, but instead an index into the kernel's "
9606 "internal array that maintains information about all shared memory segments "
9607 "on the system."
9608 msgstr ""
9609 "B<IPC_STAT> と同じく I<shmid_ds> 構造体を返す。 但し、 I<shmid> 引き数は、セ"
9610 "グメント識別子ではなく、システム上の全ての共有メモリ セグメントに関する情報を"
9611 "管理するカーネルの内部配列へのインデックス である。"
9612
9613 #. type: Plain text
9614 #: build/C/man2/shmctl.2:249
9615 msgid ""
9616 "The caller can prevent or allow swapping of a shared memory segment with the "
9617 "following I<cmd> values:"
9618 msgstr ""
9619 "呼び出し元は、I<cmd> に以下の値を指定することで、共有メモリ・セグメントが ス"
9620 "ワップされることを防止したり、許可したりできる:"
9621
9622 #. type: TP
9623 #: build/C/man2/shmctl.2:250
9624 #, no-wrap
9625 msgid "B<SHM_LOCK> (Linux-specific)"
9626 msgstr "B<SHM_LOCK> (Linux 固有)"
9627
9628 #. type: Plain text
9629 #: build/C/man2/shmctl.2:262
9630 msgid ""
9631 "Prevent swapping of the shared memory segment.  The caller must fault in any "
9632 "pages that are required to be present after locking is enabled.  If a "
9633 "segment has been locked, then the (nonstandard)  B<SHM_LOCKED> flag of the "
9634 "I<shm_perm.mode> field in the associated data structure retrieved by "
9635 "B<IPC_STAT> will be set."
9636 msgstr ""
9637 "共有メモリ・セグメントをスワップすることを防止する。 ロックが有効になった後、"
9638 "呼び出し元は、 存在することが要求された全てのページをフォールトさせなければな"
9639 "らない。 セグメントがロックされると、 関連するデータ構造体において "
9640 "I<shm_perm.mode> フィールドの (標準的ではない)  B<SHM_LOCKED> フラグが設定さ"
9641 "れる。 このデータ構造体は B<IPC_STAT> で取得される。"
9642
9643 #. type: TP
9644 #: build/C/man2/shmctl.2:262
9645 #, no-wrap
9646 msgid "B<SHM_UNLOCK> (Linux-specific)"
9647 msgstr "B<SHM_UNLOCK> (Linux 固有)"
9648
9649 #. type: Plain text
9650 #: build/C/man2/shmctl.2:265
9651 msgid "Unlock the segment, allowing it to be swapped out."
9652 msgstr "セグメントのロックを解除し、スワップ・アウトすることを可能にする。"
9653
9654 #.  There was some weirdness in 2.6.9: SHM_LOCK and SHM_UNLOCK could
9655 #.  be applied to a segment, regardless of ownership of the segment.
9656 #.  This was a botch-up in the move to RLIMIT_MEMLOCK, and was fixed
9657 #.  in 2.6.10.  MTK, May 2005
9658 #. type: Plain text
9659 #: build/C/man2/shmctl.2:283
9660 msgid ""
9661 "In kernels before 2.6.10, only a privileged process could employ B<SHM_LOCK> "
9662 "and B<SHM_UNLOCK>.  Since kernel 2.6.10, an unprivileged process can employ "
9663 "these operations if its effective UID matches the owner or creator UID of "
9664 "the segment, and (for B<SHM_LOCK>)  the amount of memory to be locked falls "
9665 "within the B<RLIMIT_MEMLOCK> resource limit (see B<setrlimit>(2))."
9666 msgstr ""
9667 "2.6.10 より前のカーネルでは、特権プロセスだけが B<SHM_LOCK> と B<SHM_UNLOCK> "
9668 "を利用することができた。 2.6.10 以降のカーネルでは、非特権プロセスであっても"
9669 "次の条件を満たせば これらの操作を利用することができる。その条件とは、プロセス"
9670 "の実効 UID がそのセグメントの所有者もしくは作成者の UID と一致し、 "
9671 "(B<SHM_LOCK> の場合には) ロックするメモリの合計が B<RLIMIT_MEMLOCK> リソース"
9672 "上限 (B<setrlimit>(2)  参照) の範囲内に入っていることである。"
9673
9674 #. type: Plain text
9675 #: build/C/man2/shmctl.2:301
9676 msgid ""
9677 "A successful B<IPC_INFO> or B<SHM_INFO> operation returns the index of the "
9678 "highest used entry in the kernel's internal array recording information "
9679 "about all shared memory segments.  (This information can be used with "
9680 "repeated B<SHM_STAT> operations to obtain information about all shared "
9681 "memory segments on the system.)  A successful B<SHM_STAT> operation returns "
9682 "the identifier of the shared memory segment whose index was given in "
9683 "I<shmid>.  Other operations return 0 on success."
9684 msgstr ""
9685 "B<IPC_INFO> と B<SHM_INFO> 操作は、成功すると、全ての共有メモリセグメントに関"
9686 "する情報を 管理しているカーネルの内部配列の使用中エントリのインデックスの う"
9687 "ち最大値を返す (この情報は、システムの全ての共有メモリセグメントに関する情報"
9688 "を 取得するために、 B<SHM_STAT> 操作を繰り返し実行する際に使用できる)。 "
9689 "B<SHM_STAT> 操作は、成功すると、 I<shmid> で指定されたインデックスを持つ共有"
9690 "メモリセグメントの識別子を返す。 他の操作は、成功の場合 0 を返す。"
9691
9692 #. type: Plain text
9693 #: build/C/man2/shmctl.2:305
9694 msgid "On error, -1 is returned, and I<errno> is set appropriately."
9695 msgstr "エラーの場合は -1 を返し、 I<errno> を適切に設定する。"
9696
9697 #. type: Plain text
9698 #: build/C/man2/shmctl.2:314
9699 msgid ""
9700 "B<IPC_STAT> or B<SHM_STAT> is requested and I<shm_perm.mode> does not allow "
9701 "read access for I<shmid>, and the calling process does not have the "
9702 "B<CAP_IPC_OWNER> capability."
9703 msgstr ""
9704 "B<IPC_STAT> または B<SHM_STAT> が要求され、 I<shm_perm.mode> が I<shmid> への"
9705 "読み込みアクセスを許しておらず、 かつ呼び出したプロセスが B<CAP_IPC_OWNER> "
9706 "ケーパビリティ (capability) を持っていない。"
9707
9708 #. type: Plain text
9709 #: build/C/man2/shmctl.2:325
9710 msgid ""
9711 "The argument I<cmd> has value B<IPC_SET> or B<IPC_STAT> but the address "
9712 "pointed to by I<buf> isn't accessible."
9713 msgstr ""
9714 "I<cmd> 引き数に B<IPC_SET> か B<IPC_STAT> が指定されたが I<buf> で指されてい"
9715 "るアドレスにアクセスできない。"
9716
9717 #. type: TP
9718 #: build/C/man2/shmctl.2:325 build/C/man2/shmop.2:194
9719 #, no-wrap
9720 msgid "B<EIDRM>"
9721 msgstr "B<EIDRM>"
9722
9723 #. type: Plain text
9724 #: build/C/man2/shmctl.2:328 build/C/man2/shmop.2:197
9725 msgid "I<shmid> points to a removed identifier."
9726 msgstr "I<shmid> が削除 (remove) された識別子 (identifier) を指している。"
9727
9728 #. type: Plain text
9729 #: build/C/man2/shmctl.2:337
9730 msgid ""
9731 "I<shmid> is not a valid identifier, or I<cmd> is not a valid command.  Or: "
9732 "for a B<SHM_STAT> operation, the index value specified in I<shmid> referred "
9733 "to an array slot that is currently unused."
9734 msgstr ""
9735 "I<shmid> が有効な識別子でないか、 I<cmd> が有効なコマンドでない。 もしくは、 "
9736 "B<SHM_STAT> 操作の場合に、 I<shmid> で指定されたインデックス値が現在未使用の"
9737 "配列のスロットを参照していた。"
9738
9739 #. type: Plain text
9740 #: build/C/man2/shmctl.2:348
9741 msgid ""
9742 "(In kernels since 2.6.9), B<SHM_LOCK> was specified and the size of the to-"
9743 "be-locked segment would mean that the total bytes in locked shared memory "
9744 "segments would exceed the limit for the real user ID of the calling "
9745 "process.  This limit is defined by the B<RLIMIT_MEMLOCK> soft resource limit "
9746 "(see B<setrlimit>(2))."
9747 msgstr ""
9748 "(2.6.9 以降のカーネルにおいて)  B<SHM_LOCK> が指定され、 ロックされる予定のセ"
9749 "グメントのサイズ (ロックされる共有メモリ・セグメントの合計バイト数) が、 呼び"
9750 "出したプロセスの実ユーザー ID についての制限を超えた。 この制限は "
9751 "B<RLIMIT_MEMLOCK> ソフト資源制限で定義される (B<setrlimit>(2)  を参照)。"
9752
9753 #. type: Plain text
9754 #: build/C/man2/shmctl.2:353
9755 msgid ""
9756 "B<IPC_STAT> is attempted, and the GID or UID value is too large to be stored "
9757 "in the structure pointed to by I<buf>."
9758 msgstr ""
9759 "B<IPC_STAT> が試みられ、GID や UID の値が I<buf> で指示される構造体に格納する"
9760 "には大き過ぎる。"
9761
9762 #. type: Plain text
9763 #: build/C/man2/shmctl.2:365
9764 msgid ""
9765 "B<IPC_SET> or B<IPC_RMID> is attempted, and the effective user ID of the "
9766 "calling process is not that of the creator (found in I<shm_perm.cuid>), or "
9767 "the owner (found in I<shm_perm.uid>), and the process was not privileged "
9768 "(Linux: did not have the B<CAP_SYS_ADMIN> capability)."
9769 msgstr ""
9770 "B<IPC_SET> か B<IPC_RMID> が試みられ、 呼び出したプロセスの実効ユーザー ID が"
9771 "作成者 (I<shm_perm.cuid>)  でも所有者 (I<shm_perm.uid>)  でもなく、プロセスが"
9772 "特権を持たない (Linux では B<CAP_SYS_ADMIN> ケーパビリティを持たない)。"
9773
9774 #. type: Plain text
9775 #: build/C/man2/shmctl.2:377
9776 msgid ""
9777 "Or (in kernels before 2.6.9), B<SHM_LOCK> or B<SHM_UNLOCK> was specified, "
9778 "but the process was not privileged (Linux: did not have the B<CAP_IPC_LOCK> "
9779 "capability).  (Since Linux 2.6.9, this error can also occur if the "
9780 "B<RLIMIT_MEMLOCK> is 0 and the caller is not privileged.)"
9781 msgstr ""
9782 "または (2.6.9 より前のカーネルで)  B<SHM_LOCK> または B<SHM_UNLOCK> が指定さ"
9783 "れているが、プロセスが特権を持たない (Linux では B<CAP_IPC_LOCK> ケーパビリ"
9784 "ティを持たない)。 (Linux 2.6.9 以降では、 B<RLIMIT_MEMLOCK> が 0 で呼び出し元"
9785 "が特権を持たない場合にも、このエラーが起こる。)"
9786
9787 #.  SVr4 documents an additional error condition EMFILE.
9788 #. type: Plain text
9789 #: build/C/man2/shmctl.2:382 build/C/man2/shmget.2:251
9790 #: build/C/man2/shmop.2:231
9791 msgid "SVr4, POSIX.1-2001."
9792 msgstr "SVr4, POSIX.1-2001."
9793
9794 #.  Like Linux, the FreeBSD man pages still document
9795 #.  the inclusion of these header files.
9796 #. type: Plain text
9797 #: build/C/man2/shmctl.2:395 build/C/man2/shmget.2:269
9798 msgid ""
9799 "The inclusion of I<E<lt>sys/types.hE<gt>> and I<E<lt>sys/ipc.hE<gt>> isn't "
9800 "required on Linux or by any version of POSIX.  However, some old "
9801 "implementations required the inclusion of these header files, and the SVID "
9802 "also documented their inclusion.  Applications intended to be portable to "
9803 "such old systems may need to include these header files."
9804 msgstr ""
9805 "Linux や POSIX の全てのバージョンでは、 I<E<lt>sys/types.hE<gt>> と "
9806 "I<E<lt>sys/ipc.hE<gt>> のインクルードは必要ない。しかしながら、いくつかの古い"
9807 "実装ではこれらのヘッダファイルのインクルードが必要であり、 SVID でもこれらの"
9808 "インクルードをするように記載されている。このような古いシステムへの移植性を意"
9809 "図したアプリケーションではこれらのファイルをインクルードする必要があるかもし"
9810 "れない。"
9811
9812 #. type: Plain text
9813 #: build/C/man2/shmctl.2:407
9814 msgid ""
9815 "The B<IPC_INFO>, B<SHM_STAT> and B<SHM_INFO> operations are used by the "
9816 "B<ipcs>(1)  program to provide information on allocated resources.  In the "
9817 "future, these may modified or moved to a I</proc> filesystem interface."
9818 msgstr ""
9819 "B<IPC_INFO>, B<SHM_STAT>, B<SHM_INFO> 操作は、 B<ipcs>(1)  プログラムで割り当"
9820 "て済の資源に関する情報を提供するために 使用されている。将来、これらの操作は変"
9821 "更されたり、 I</proc> ファイルシステムのインタフェースに移動されるかもしれな"
9822 "い。"
9823
9824 #. type: Plain text
9825 #: build/C/man2/shmctl.2:415
9826 msgid ""
9827 "Linux permits a process to attach (B<shmat>(2))  a shared memory segment "
9828 "that has already been marked for deletion using I<shmctl(IPC_RMID)>.  This "
9829 "feature is not available on other UNIX implementations; portable "
9830 "applications should avoid relying on it."
9831 msgstr ""
9832 "Linux では、 I<shmctl(IPC_RMID)> を使ってすでに削除マークがつけられている共有"
9833 "メモリ・セグメントを あるプロセスが付加 (attach)  (B<shmat>(2))  することを許"
9834 "可している。 この機能は他の UNIX の実装では利用できない。 移植性を考慮したア"
9835 "プリケーションではこれに依存しないようにすべきである。"
9836
9837 #. type: Plain text
9838 #: build/C/man2/shmctl.2:428
9839 msgid ""
9840 "Various fields in a I<struct shmid_ds> were typed as I<short> under Linux "
9841 "2.2 and have become I<long> under Linux 2.4.  To take advantage of this, a "
9842 "recompilation under glibc-2.1.91 or later should suffice.  (The kernel "
9843 "distinguishes old and new calls by an B<IPC_64> flag in I<cmd>.)"
9844 msgstr ""
9845 "I<構造体 shmid_ds> 内の多くのフィールドは、 Linux 2.2 では I<short> 型だった"
9846 "が、Linux 2.4 では I<long> 型になった。 この利点を生かすには、glibc-2.1.91 以"
9847 "降の環境下で 再コンパイルすれば十分である。 カーネルは新しい形式の呼び出しと"
9848 "古い形式の呼び出しを I<cmd> 内の B<IPC_64> フラグで区別する。"
9849
9850 #. type: Plain text
9851 #: build/C/man2/shmctl.2:435
9852 msgid ""
9853 "B<mlock>(2), B<setrlimit>(2), B<shmget>(2), B<shmop>(2), B<capabilities>(7), "
9854 "B<svipc>(7)"
9855 msgstr ""
9856 "B<mlock>(2), B<setrlimit>(2), B<shmget>(2), B<shmop>(2), B<capabilities>(7), "
9857 "B<shm_overview>(7), B<svipc>(7)"
9858
9859 #. type: TH
9860 #: build/C/man2/shmget.2:38
9861 #, no-wrap
9862 msgid "SHMGET"
9863 msgstr "SHMGET"
9864
9865 #. type: TH
9866 #: build/C/man2/shmget.2:38
9867 #, no-wrap
9868 msgid "2014-05-21"
9869 msgstr "2014-05-21"
9870
9871 #. type: Plain text
9872 #: build/C/man2/shmget.2:41
9873 msgid "shmget - allocates a System V shared memory segment"
9874 msgstr "shmget - System V 共有メモリ・セグメントを割り当てる"
9875
9876 #. type: Plain text
9877 #: build/C/man2/shmget.2:48
9878 msgid "B<int shmget(key_t >I<key>B<, size_t >I<size>B<, int >I<shmflg>B<);>"
9879 msgstr "B<int shmget(key_t >I<key>B<, size_t >I<size>B<, int >I<shmflg>B<);>"
9880
9881 #. type: Plain text
9882 #: build/C/man2/shmget.2:72
9883 msgid ""
9884 "B<shmget>()  returns the identifier of the System\\ V shared memory segment "
9885 "associated with the value of the argument I<key>.  A new shared memory "
9886 "segment, with size equal to the value of I<size> rounded up to a multiple of "
9887 "B<PAGE_SIZE>, is created if I<key> has the value B<IPC_PRIVATE> or I<key> "
9888 "isn't B<IPC_PRIVATE>, no shared memory segment corresponding to I<key> "
9889 "exists, and B<IPC_CREAT> is specified in I<shmflg>."
9890 msgstr ""
9891 "B<shmget>()  は I<key> 引き数に対応する System\\ V 共有メモリ・セグメントの識"
9892 "別子を返す。 I<key> の値が B<IPC_PRIVATE> の場合、もしくは I<key> に対応する"
9893 "共有メモリ・セグメントが存在せず、 I<shmflg> に B<IPC_CREAT> が指定されていた"
9894 "場合、 新しい共有メモリ・セグメントを作成する。 作成される共有メモリ・セグメ"
9895 "ントは、 I<size> 引き数の値を B<PAGE_SIZE> の倍数へと切り上げた (round up) 大"
9896 "きさとなる。"
9897
9898 #. type: Plain text
9899 #: build/C/man2/shmget.2:91
9900 msgid ""
9901 "If I<shmflg> specifies both B<IPC_CREAT> and B<IPC_EXCL> and a shared memory "
9902 "segment already exists for I<key>, then B<shmget>()  fails with I<errno> set "
9903 "to B<EEXIST>.  (This is analogous to the effect of the combination B<O_CREAT "
9904 "| O_EXCL> for B<open>(2).)"
9905 msgstr ""
9906 "I<shmflg> に B<IPC_CREAT> と B<IPC_EXCL> の両方が指定された場合、 I<key> に対"
9907 "応する共有メモリ・セグメントが既に存在すると、 B<shmget>()  は失敗し、 "
9908 "I<errno> に B<EEXIST> が設定される (これは B<open>(2)  に B<O_CREAT | "
9909 "O_EXCL> を指定した場合の動作と同じである)。"
9910
9911 #. type: Plain text
9912 #: build/C/man2/shmget.2:95
9913 msgid "The value I<shmflg> is composed of:"
9914 msgstr "I<shmflg> は以下の内容から構成される:"
9915
9916 #. type: TP
9917 #: build/C/man2/shmget.2:95
9918 #, no-wrap
9919 msgid "B<IPC_CREAT>"
9920 msgstr "B<IPC_CREAT>"
9921
9922 #. type: Plain text
9923 #: build/C/man2/shmget.2:102
9924 msgid ""
9925 "Create a new segment.  If this flag is not used, then B<shmget>()  will find "
9926 "the segment associated with I<key> and check to see if the user has "
9927 "permission to access the segment."
9928 msgstr ""
9929 "新しいセグメントを作成する。このフラグが指定されなかった場合、 B<shmget>()  "
9930 "は I<key> に対応するセグメントを探し、 ユーザがそのセグメントにアクセスする許"
9931 "可があるかどうかをチェックする。"
9932
9933 #. type: TP
9934 #: build/C/man2/shmget.2:102
9935 #, no-wrap
9936 msgid "B<IPC_EXCL>"
9937 msgstr "B<IPC_EXCL>"
9938
9939 #. type: Plain text
9940 #: build/C/man2/shmget.2:108
9941 #, fuzzy
9942 #| msgid ""
9943 #| "used with B<IPC_CREAT> to ensure failure if the segment already exists."
9944 msgid ""
9945 "This flag is used with B<IPC_CREAT> to ensure that this call creates the "
9946 "segment.  If the segment already exists, the call fails."
9947 msgstr ""
9948 "B<IPC_CREAT> と共に使用し、セグメントが既に存在した場合には 失敗することを保"
9949 "証する。"
9950
9951 #. type: TP
9952 #: build/C/man2/shmget.2:108
9953 #, no-wrap
9954 msgid "B<SHM_HUGETLB> (since Linux 2.6)"
9955 msgstr "B<SHM_HUGETLB> (Linux 2.6 以降)"
9956
9957 #. type: Plain text
9958 #: build/C/man2/shmget.2:114
9959 msgid ""
9960 "Allocate the segment using \"huge pages.\" See the Linux kernel source file "
9961 "I<Documentation/vm/hugetlbpage.txt> for further information."
9962 msgstr ""
9963 "\"ヒュージページ (huge page)\" を使うセグメントを割り当てる。詳細な情報は、"
9964 "Linux カーネルソースのファイル I<Documentation/vm/hugetlbpage.txt> を参照。"
9965
9966 #. type: TP
9967 #: build/C/man2/shmget.2:114
9968 #, no-wrap
9969 msgid "B<SHM_NORESERVE> (since Linux 2.6.15)"
9970 msgstr "B<SHM_NORESERVE> (Linux 2.6.15 以降)"
9971
9972 #.  As at 2.6.17-rc2, this flag has no effect if SHM_HUGETLB was also
9973 #.  specified.
9974 #. type: Plain text
9975 #: build/C/man2/shmget.2:133
9976 msgid ""
9977 "This flag serves the same purpose as the B<mmap>(2)  B<MAP_NORESERVE> flag.  "
9978 "Do not reserve swap space for this segment.  When swap space is reserved, "
9979 "one has the guarantee that it is possible to modify the segment.  When swap "
9980 "space is not reserved one might get B<SIGSEGV> upon a write if no physical "
9981 "memory is available.  See also the discussion of the file I</proc/sys/vm/"
9982 "overcommit_memory> in B<proc>(5)."
9983 msgstr ""
9984 "このフラグは、 B<mmap>(2)  の B<MAP_NORESERVE> フラグと同じ役割を果たす。 こ"
9985 "のセグメントに対するスワップ空間の予約を行わない。 スワップ空間を予約した場合"
9986 "は、そのセグメントの変更が必ず成功することが 保証される。スワップ空間の予約を"
9987 "行わなかった場合は、物理メモリに空きが ないと書き込み時に B<SIGSEGV> を受け取"
9988 "る可能性がある。 B<proc>(5)  にある I</proc/sys/vm/overcommit_memory> ファイ"
9989 "ルに関する議論も参照のこと。"
9990
9991 #. type: Plain text
9992 #: build/C/man2/shmget.2:143
9993 #, fuzzy
9994 #| msgid ""
9995 #| "(least significant 9 bits)  specifying the permissions granted to the "
9996 #| "owner, group, and world.  These bits have the same format, and the same "
9997 #| "meaning, as the I<mode> argument of B<open>(2).  Presently, the execute "
9998 #| "permissions are not used by the system."
9999 msgid ""
10000 "In addition to the above flags, the least significant 9 bits of I<shmflg> "
10001 "specify the permissions granted to the owner, group, and others.  These bits "
10002 "have the same format, and the same meaning, as the I<mode> argument of "
10003 "B<open>(2).  Presently, execute permissions are not used by the system."
10004 msgstr ""
10005 "(下位 9 ビット)  所有者、グループ、他人 (world) への許可を指定する。 これらの"
10006 "ビットは B<open>(2)  の I<mode> 引き数と同じ形式で同じ意味を持つ。 今のとこ"
10007 "ろ、システムは実行 (execute) 許可を参照しない。"
10008
10009 #. type: Plain text
10010 #: build/C/man2/shmget.2:151
10011 msgid ""
10012 "When a new shared memory segment is created, its contents are initialized to "
10013 "zero values, and its associated data structure, I<shmid_ds> (see "
10014 "B<shmctl>(2)), is initialized as follows:"
10015 msgstr ""
10016 "共有メモリ・セグメントが新たに作成される際、 共有メモリ・セグメントの内容は "
10017 "0 で初期化され、 関連情報を保持するデータ構造体 I<shmid_ds> は以下のように初"
10018 "期化される。"
10019
10020 #. type: Plain text
10021 #: build/C/man2/shmget.2:156
10022 msgid ""
10023 "I<shm_perm.cuid> and I<shm_perm.uid> are set to the effective user ID of the "
10024 "calling process."
10025 msgstr ""
10026 "I<shm_perm.cuid> と I<shm_perm.uid> に呼び出し元プロセスの実効 (effective) "
10027 "ユーザーID を設定する。"
10028
10029 #. type: Plain text
10030 #: build/C/man2/shmget.2:161
10031 msgid ""
10032 "I<shm_perm.cgid> and I<shm_perm.gid> are set to the effective group ID of "
10033 "the calling process."
10034 msgstr ""
10035 "I<shm_perm.cgid> と I<shm_perm.gid> に呼び出し元プロセスの実効グループID を設"
10036 "定する。"
10037
10038 #. type: Plain text
10039 #: build/C/man2/shmget.2:166
10040 msgid ""
10041 "The least significant 9 bits of I<shm_perm.mode> are set to the least "
10042 "significant 9 bit of I<shmflg>."
10043 msgstr ""
10044 "I<shm_perm.mode> の下位 9 ビットに I<shmflg> の下位 9 ビットを設定する。"
10045
10046 #. type: Plain text
10047 #: build/C/man2/shmget.2:170
10048 msgid "I<shm_segsz> is set to the value of I<size>."
10049 msgstr "I<shm_segsz> に I<size> の値を設定する。"
10050
10051 #. type: Plain text
10052 #: build/C/man2/shmget.2:177
10053 msgid ""
10054 "I<shm_lpid>, I<shm_nattch>, I<shm_atime>, and I<shm_dtime> are set to 0."
10055 msgstr ""
10056 "I<shm_lpid>, I<shm_nattch>, I<shm_atime>, I<shm_dtime> に 0 を設定する。"
10057
10058 #. type: Plain text
10059 #: build/C/man2/shmget.2:180
10060 msgid "I<shm_ctime> is set to the current time."
10061 msgstr "I<shm_ctime> に現在の時刻を設定する。"
10062
10063 #. type: Plain text
10064 #: build/C/man2/shmget.2:183
10065 msgid ""
10066 "If the shared memory segment already exists, the permissions are verified, "
10067 "and a check is made to see if it is marked for destruction."
10068 msgstr ""
10069 "共有メモリ・セグメントが既に存在する場合、アクセス許可の検査と、 破壊 "
10070 "(destruction) マークがつけられていないかのチェックが行われる。"
10071
10072 #. type: Plain text
10073 #: build/C/man2/shmget.2:188
10074 msgid ""
10075 "On success, a valid shared memory identifier is returned.  On error, -1 is "
10076 "returned, and I<errno> is set to indicate the error."
10077 msgstr ""
10078 "成功の場合、有効な共有メモリ・セグメントの識別子が返される。 エラーの場合、 "
10079 "-1 が返り、 I<error> にエラーを示す値が設定される。"
10080
10081 #. type: Plain text
10082 #: build/C/man2/shmget.2:192
10083 msgid "On failure, I<errno> is set to one of the following:"
10084 msgstr "失敗した場合は I<errno> が以下のどれかに設定される:"
10085
10086 #. type: Plain text
10087 #: build/C/man2/shmget.2:198
10088 msgid ""
10089 "The user does not have permission to access the shared memory segment, and "
10090 "does not have the B<CAP_IPC_OWNER> capability."
10091 msgstr ""
10092 "ユーザーはその共有メモリ・セグメントへのアクセス許可を持たず、 "
10093 "B<CAP_IPC_OWNER> ケーパビリティも持っていない。"
10094
10095 #. type: Plain text
10096 #: build/C/man2/shmget.2:207
10097 #, fuzzy
10098 #| msgid ""
10099 #| "Both B<O_CREAT> and B<O_EXCL> were specified to B<shm_open>()  and the "
10100 #| "shared memory object specified by I<name> already exists."
10101 msgid ""
10102 "B<IPC_CREAT> and B<IPC_EXCL> were specified in I<shmflg>, but a shared "
10103 "memory segment already exists for I<key>."
10104 msgstr ""
10105 "B<O_CREAT> と B<O_EXCL> の両方が B<shm_open>()  に指定されたが、 I<name> で指"
10106 "定された共有メモリ・オブジェクトが既に存在した。"
10107
10108 #. type: Plain text
10109 #: build/C/man2/shmget.2:215
10110 msgid ""
10111 "A new segment was to be created and I<size> is less than B<SHMIN> or greater "
10112 "than B<SHMMAX>."
10113 msgstr ""
10114
10115 #. type: Plain text
10116 #: build/C/man2/shmget.2:221
10117 #, fuzzy
10118 #| msgid ""
10119 #| "A new segment was to be created and I<size> E<lt> B<SHMMIN> or I<size> "
10120 #| "E<gt> B<SHMMAX>, or no new segment was to be created, a segment with "
10121 #| "given key existed, but I<size> is greater than the size of that segment."
10122 msgid ""
10123 "A segment for the given I<key> exists, but I<size> is greater than the size "
10124 "of that segment."
10125 msgstr ""
10126 "新しいセグメントを作成しようとした際に I<size> E<lt> B<SHMMIN> または "
10127 "I<size> E<gt> B<SHMMAX> であった。 もしくは、指定されたキーに対応するセグメン"
10128 "トが既に存在して、新しい セグメントを作成しようとはしなかったが、I<size> が存"
10129 "在するセグメントの サイズよりも大きかった。"
10130
10131 #. type: Plain text
10132 #: build/C/man2/shmget.2:230
10133 msgid ""
10134 "No segment exists for the given I<key>, and B<IPC_CREAT> was not specified."
10135 msgstr ""
10136 "指定された I<key> に対応するセグメントが存在せず、 B<IPC_CREAT> も指定されて"
10137 "いなかった。"
10138
10139 #. type: Plain text
10140 #: build/C/man2/shmget.2:233
10141 msgid "No memory could be allocated for segment overhead."
10142 msgstr "セグメントの管理情報 (overhead) に割り当てるメモリがなかった。"
10143
10144 #. type: Plain text
10145 #: build/C/man2/shmget.2:241
10146 msgid ""
10147 "All possible shared memory IDs have been taken (B<SHMMNI>), or allocating a "
10148 "segment of the requested I<size> would cause the system to exceed the system-"
10149 "wide limit on shared memory (B<SHMALL>)."
10150 msgstr ""
10151 "システム全体の共有メモリ・セグメント数の制限 (B<SHMMNI>)  に達した、または要"
10152 "求された I<size> のセグメントの割り当てが システム全体の共有メモリサイズの制"
10153 "限 (B<SHMALL>)  を超過した。"
10154
10155 #. type: Plain text
10156 #: build/C/man2/shmget.2:248
10157 msgid ""
10158 "The B<SHM_HUGETLB> flag was specified, but the caller was not privileged "
10159 "(did not have the B<CAP_IPC_LOCK> capability)."
10160 msgstr ""
10161 "B<SHM_HUGETLB> フラグが指定されたが、呼び出し元には権限がなかった "
10162 "(B<CAP_IPC_LOCK> ケーパビリティを持っていなかった)。"
10163
10164 #. type: Plain text
10165 #: build/C/man2/shmget.2:256
10166 msgid "B<SHM_HUGETLB> and B<SHM_NORESERVE> are Linux extensions."
10167 msgstr "B<SHM_HUGETLB> と B<SHM_NORESERVE> は Linux での拡張である。"
10168
10169 #. type: Plain text
10170 #: build/C/man2/shmget.2:280
10171 msgid ""
10172 "B<IPC_PRIVATE> isn't a flag field but a I<key_t> type.  If this special "
10173 "value is used for I<key>, the system call ignores all but the least "
10174 "significant 9 bits of I<shmflg> and creates a new shared memory segment."
10175 msgstr ""
10176 "B<IPC_PRIVATE> はフラグではなく I<key_t> 型である。 この特別な値が I<key> に"
10177 "使用された場合は、 B<shmget>()  は I<shmflg> の下位 9 ビットを除いた全てを無"
10178 "視し、 新しい共有メモリ・セグメントを作成する。"
10179
10180 #. type: SS
10181 #: build/C/man2/shmget.2:280
10182 #, no-wrap
10183 msgid "Shared memory limits"
10184 msgstr ""
10185
10186 #. type: Plain text
10187 #: build/C/man2/shmget.2:284
10188 msgid ""
10189 "The following limits on shared memory segment resources affect the "
10190 "B<shmget>()  call:"
10191 msgstr ""
10192 "B<shmget>()  コールに影響する共有メモリ・セグメント資源の制限は以下の通りであ"
10193 "る:"
10194
10195 #. type: TP
10196 #: build/C/man2/shmget.2:284
10197 #, no-wrap
10198 msgid "B<SHMALL>"
10199 msgstr "B<SHMALL>"
10200
10201 #. type: Plain text
10202 #: build/C/man2/shmget.2:288
10203 msgid ""
10204 "System-wide limit on the number of shared memory pages.  Since Linux 2.4, "
10205 "the default value for this limit is"
10206 msgstr ""
10207 "システム全体の共有メモリ・ページ数の上限値。 Linux 2.2 以降では、この上限値の"
10208 "デフォルトは以下である。"
10209
10210 #. type: Plain text
10211 #: build/C/man2/shmget.2:290
10212 #, no-wrap
10213 msgid "    SHMMAX / PAGE_SIZE * (SHMMNI / 16)\n"
10214 msgstr "    SHMMAX / PAGE_SIZE * (SHMMNI / 16)\n"
10215
10216 #. type: Plain text
10217 #: build/C/man2/shmget.2:299
10218 msgid ""
10219 "If B<SHMMAX> and B<SHMMNI> are not modified, this yields a limit for the "
10220 "total memory used by all shared memory segments of 8 GB: With a 4kB page "
10221 "size, this formula yields the value 2^21 (2,097,152), with 8kB page size, it "
10222 "yields 2^20 (1048576)."
10223 msgstr ""
10224
10225 #. type: Plain text
10226 #: build/C/man2/shmget.2:302
10227 msgid ""
10228 "On Linux, this limit can be read and modified via I</proc/sys/kernel/shmall>."
10229 msgstr ""
10230 "Linux では、この上限値は I</proc/sys/kernel/shmall> 経由で参照したり、変更し"
10231 "たりできる。"
10232
10233 #. type: TP
10234 #: build/C/man2/shmget.2:302
10235 #, no-wrap
10236 msgid "B<SHMMAX>"
10237 msgstr "B<SHMMAX>"
10238
10239 #. type: Plain text
10240 #: build/C/man2/shmget.2:306
10241 msgid ""
10242 "Maximum size in bytes for a shared memory segment.  Since Linux 2.2, the "
10243 "default value of this limit is 0x2000000 (32MB)."
10244 msgstr ""
10245 "共有メモリ・セグメントの最大バイト数。 Linux 2.2 以降では、 この上限値のデ"
10246 "フォルトは 0x2000000 (32MB) である。"
10247
10248 #. type: Plain text
10249 #: build/C/man2/shmget.2:309
10250 msgid ""
10251 "On Linux, this limit can be read and modified via I</proc/sys/kernel/shmmax>."
10252 msgstr ""
10253 "Linux では、この上限値は I</proc/sys/kernel/shmmax> 経由で参照したり、変更し"
10254 "たりできる。"
10255
10256 #. type: TP
10257 #: build/C/man2/shmget.2:309
10258 #, no-wrap
10259 msgid "B<SHMMIN>"
10260 msgstr "B<SHMMIN>"
10261
10262 #. type: Plain text
10263 #: build/C/man2/shmget.2:315
10264 msgid ""
10265 "Minimum size in bytes for a shared memory segment: implementation dependent "
10266 "(currently 1 byte, though B<PAGE_SIZE> is the effective minimum size)."
10267 msgstr ""
10268 "共有メモリ・セグメントのバイト単位の大きさの下限: 実装依存 (現在は 1 バイトだ"
10269 "が、実質的な最小サイズは B<PAGE_SIZE> である)。"
10270
10271 #. type: TP
10272 #: build/C/man2/shmget.2:315
10273 #, no-wrap
10274 msgid "B<SHMMNI>"
10275 msgstr "B<SHMMNI>"
10276
10277 #. type: Plain text
10278 #: build/C/man2/shmget.2:320
10279 msgid ""
10280 "System-wide limit on the number of shared memory segments.  In Linux 2.2, "
10281 "the default value for this limit was 128; since Linux 2.4, the default value "
10282 "is 4096."
10283 msgstr ""
10284 "システム全体の共有メモリ・セグメント数の上限値。 この上限値のデフォルトは、 "
10285 "Linux 2.2 以降では 128、 Linux 2.4 以降で 4096 である。"
10286
10287 #.  Kernels between 2.4.x and 2.6.8 had an off-by-one error that meant
10288 #.  that we could create one more segment than SHMMNI -- MTK
10289 #.  This /proc file is not available in Linux 2.2 and earlier -- MTK
10290 #. type: Plain text
10291 #: build/C/man2/shmget.2:326
10292 msgid ""
10293 "On Linux, this limit can be read and modified via I</proc/sys/kernel/shmmni>."
10294 msgstr ""
10295 "Linux では、この上限値は I</proc/sys/kernel/shmmni> 経由で参照したり、変更し"
10296 "たりできる。"
10297
10298 #. type: Plain text
10299 #: build/C/man2/shmget.2:330
10300 msgid ""
10301 "The implementation has no specific limits for the per-process maximum number "
10302 "of shared memory segments (B<SHMSEG>)."
10303 msgstr ""
10304 "プロセス当りの共有メモリ・セグメントの個数の最大値 (B<SHMSEG>)  に関する実装"
10305 "上の制限はない。"
10306
10307 #. type: Plain text
10308 #: build/C/man2/shmget.2:336
10309 msgid ""
10310 "Until version 2.3.30, Linux would return B<EIDRM> for a B<shmget>()  on a "
10311 "shared memory segment scheduled for deletion."
10312 msgstr ""
10313 "バージョン 2.3.30 までは、Linux は 削除が予定されている共有メモリ・セグメント"
10314 "に対して B<shmget>()  が行われると B<EIDRM> を返していた。"
10315
10316 #. type: Plain text
10317 #: build/C/man2/shmget.2:342
10318 msgid ""
10319 "The name choice B<IPC_PRIVATE> was perhaps unfortunate, B<IPC_NEW> would "
10320 "more clearly show its function."
10321 msgstr ""
10322 "B<IPC_PRIVATE> という名前を選んだのはおそらく失敗であろう。 B<IPC_NEW> の方が"
10323 "より明確にその機能を表しているだろう。"
10324
10325 #. type: Plain text
10326 #: build/C/man2/shmget.2:350
10327 msgid ""
10328 "B<shmat>(2), B<shmctl>(2), B<shmdt>(2), B<ftok>(3), B<capabilities>(7), "
10329 "B<shm_overview>(7), B<svipc>(7)"
10330 msgstr ""
10331 "B<shmat>(2), B<shmctl>(2), B<shmdt>(2), B<ftok>(3), B<capabilities>(7), "
10332 "B<shm_overview>(7), B<svipc>(7)"
10333
10334 #. type: TH
10335 #: build/C/man2/shmop.2:41
10336 #, no-wrap
10337 msgid "SHMOP"
10338 msgstr "SHMOP"
10339
10340 #. type: TH
10341 #: build/C/man2/shmop.2:41
10342 #, no-wrap
10343 msgid "2014-04-28"
10344 msgstr "2014-04-28"
10345
10346 #. type: Plain text
10347 #: build/C/man2/shmop.2:44
10348 msgid "shmat, shmdt - System V shared memory operations"
10349 msgstr "shmat, shmdt - System V 共有メモリ (shared memory) の操作"
10350
10351 #. type: Plain text
10352 #: build/C/man2/shmop.2:48
10353 #, no-wrap
10354 msgid ""
10355 "B<#include E<lt>sys/types.hE<gt>>\n"
10356 "B<#include E<lt>sys/shm.hE<gt>>\n"
10357 msgstr ""
10358 "B<#include E<lt>sys/types.hE<gt>>\n"
10359 "B<#include E<lt>sys/shm.hE<gt>>\n"
10360
10361 #. type: Plain text
10362 #: build/C/man2/shmop.2:50
10363 #, no-wrap
10364 msgid "B<void *shmat(int >I<shmid>B<, const void *>I<shmaddr>B<, int >I<shmflg>B<);>\n"
10365 msgstr "B<void *shmat(int >I<shmid>B<, const void *>I<shmaddr>B<, int >I<shmflg>B<);>\n"
10366
10367 #. type: Plain text
10368 #: build/C/man2/shmop.2:52
10369 #, no-wrap
10370 msgid "B<int shmdt(const void *>I<shmaddr>B<);>\n"
10371 msgstr "B<int shmdt(const void *>I<shmaddr>B<);>\n"
10372
10373 #. type: SS
10374 #: build/C/man2/shmop.2:54
10375 #, no-wrap
10376 msgid "shmat()"
10377 msgstr ""
10378
10379 #. type: Plain text
10380 #: build/C/man2/shmop.2:62
10381 msgid ""
10382 "B<shmat>()  attaches the System\\ V shared memory segment identified by "
10383 "I<shmid> to the address space of the calling process.  The attaching address "
10384 "is specified by I<shmaddr> with one of the following criteria:"
10385 msgstr ""
10386 "B<shmat>()  は I<shmid> で指定された System\\ V 共有メモリ・セグメント "
10387 "(shared memory segment) を コールしたプロセスのアドレス空間に付加 (attach) す"
10388 "る。 付加するアドレスは I<shmaddr> に以下のどれかの形式で指定する:"
10389
10390 #. type: Plain text
10391 #: build/C/man2/shmop.2:68
10392 msgid ""
10393 "If I<shmaddr> is NULL, the system chooses a suitable (unused) address at "
10394 "which to attach the segment."
10395 msgstr ""
10396 "I<shmaddr> が NULL ならば、システムはセグメントを付加するための 適切な (使用"
10397 "されていない) アドレスを選択する。"
10398
10399 #. type: Plain text
10400 #: build/C/man2/shmop.2:80
10401 msgid ""
10402 "If I<shmaddr> isn't NULL and B<SHM_RND> is specified in I<shmflg>, the "
10403 "attach occurs at the address equal to I<shmaddr> rounded down to the nearest "
10404 "multiple of B<SHMLBA>."
10405 msgstr ""
10406 "I<shmaddr> が NULL でなく B<SHM_RND> が I<shmflg> に指定されている場合は、 "
10407 "I<shmaddr> を B<SHMLBA> の倍数へと切り捨てた (rounding down) のと等しいアドレ"
10408 "スへ付加する。"
10409
10410 #. type: Plain text
10411 #: build/C/man2/shmop.2:84
10412 msgid ""
10413 "Otherwise, I<shmaddr> must be a page-aligned address at which the attach "
10414 "occurs."
10415 msgstr ""
10416 "その他の場合は I<shmaddr> は付加を行なうアドレスで、ページ境界を指している必"
10417 "要がある。"
10418
10419 #. type: Plain text
10420 #: build/C/man2/shmop.2:90
10421 msgid ""
10422 "In addition to B<SHM_RND>, the following flags may be specified in the "
10423 "I<shmflg> bit-mask argument:"
10424 msgstr ""
10425
10426 #. type: TP
10427 #: build/C/man2/shmop.2:90
10428 #, no-wrap
10429 msgid "B<SHM_EXEC> (Linux-specific; since Linux 2.6.9)"
10430 msgstr "B<SHM_EXEC> (Linux 固有; Linux 2.6.9 以降)"
10431
10432 #. type: Plain text
10433 #: build/C/man2/shmop.2:94
10434 msgid ""
10435 "Allow the contents of the segment to be executed.  The caller must have "
10436 "execute permission on the segment."
10437 msgstr ""
10438
10439 #. type: TP
10440 #: build/C/man2/shmop.2:94
10441 #, no-wrap
10442 msgid "B<SHM_RDONLY>"
10443 msgstr "B<SHM_RDONLY>"
10444
10445 #. type: Plain text
10446 #: build/C/man2/shmop.2:102
10447 #, fuzzy
10448 #| msgid ""
10449 #| "If B<SHM_RDONLY> is specified in I<shmflg>, the segment is attached for "
10450 #| "reading and the process must have read permission for the segment.  "
10451 #| "Otherwise the segment is attached for read and write and the process must "
10452 #| "have read and write permission for the segment.  There is no notion of a "
10453 #| "write-only shared memory segment."
10454 msgid ""
10455 "Attach the segment for read-only access.  The process must have read "
10456 "permission for the segment.  If this flag is not specified, the segment is "
10457 "attached for read and write access, and the process must have read and write "
10458 "permission for the segment.  There is no notion of a write-only shared "
10459 "memory segment."
10460 msgstr ""
10461 "B<SHM_RDONLY> が I<shmflg> に指定されていた場合は、 セグメントは読み込み専用"
10462 "に付加され、プロセスはそのセグメントへの 読み込み許可を持たなければならな"
10463 "い。 そうでなければそのセグメントは読み込みと書き込みのために付加され、 プロ"
10464 "セスはそのセグメントに読み込みと書き込みの許可を持つ必要がある。 書き込み専用"
10465 "の共有メモリ・セグメントという概念は存在しない。"
10466
10467 #. type: TP
10468 #: build/C/man2/shmop.2:102
10469 #, no-wrap
10470 msgid "B<SHM_REMAP> (Linux-specific)"
10471 msgstr "B<SHM_REMAP> (Linux 固有)"
10472
10473 #. type: Plain text
10474 #: build/C/man2/shmop.2:115
10475 #, fuzzy
10476 #| msgid ""
10477 #| "The (Linux-specific)  B<SHM_REMAP> flag may be specified in I<shmflg> to "
10478 #| "indicate that the mapping of the segment should replace any existing "
10479 #| "mapping in the range starting at I<shmaddr> and continuing for the size "
10480 #| "of the segment.  (Normally an B<EINVAL> error would result if a mapping "
10481 #| "already exists in this address range.)  In this case, I<shmaddr> must not "
10482 #| "be NULL."
10483 msgid ""
10484 "This flag specifies that the mapping of the segment should replace any "
10485 "existing mapping in the range starting at I<shmaddr> and continuing for the "
10486 "size of the segment.  (Normally, an B<EINVAL> error would result if a "
10487 "mapping already exists in this address range.)  In this case, I<shmaddr> "
10488 "must not be NULL."
10489 msgstr ""
10490 "(Linux 特有の)  B<SHM_REMAP> フラグが I<shmflg> に指定された場合は、 セグメン"
10491 "トのマッピングを既存のマッピングに置き換える。 マッピングの範囲は、 "
10492 "I<shmaddr> から始まりセグメントのサイズ分だけある (通常 B<EINVAL> エラーは、"
10493 "このアドレス範囲にマッピングが既に存在するために起る)。 このフラグを指定する"
10494 "場合は、 I<shmaddr> が NULL であってはならない。"
10495
10496 #. type: Plain text
10497 #: build/C/man2/shmop.2:122
10498 msgid ""
10499 "The B<brk>(2)  value of the calling process is not altered by the attach.  "
10500 "The segment will automatically be detached at process exit.  The same "
10501 "segment may be attached as a read and as a read-write one, and more than "
10502 "once, in the process's address space."
10503 msgstr ""
10504 "呼び出したプロセスの B<brk>(2)  の値は付加によって変化しない。 そのセグメント"
10505 "はプロセスが終了 (exit) したら自動的に分離 (detach) される。 同じセグメントを"
10506 "プロセスのアドレス空間に、読み込み専用および読み書き両用 として付加でき、また"
10507 "複数回付加することもできる。"
10508
10509 #. type: Plain text
10510 #: build/C/man2/shmop.2:130
10511 msgid ""
10512 "A successful B<shmat>()  call updates the members of the I<shmid_ds> "
10513 "structure (see B<shmctl>(2))  associated with the shared memory segment as "
10514 "follows:"
10515 msgstr ""
10516 "成功した B<shmat>()  コールは共有メモリ・セグメントに関連する I<shmid_ds> 構"
10517 "造体 (B<shmctl>(2)  を参照) のメンバーを以下のように更新する:"
10518
10519 #. type: Plain text
10520 #: build/C/man2/shmop.2:133
10521 msgid "I<shm_atime> is set to the current time."
10522 msgstr "I<shm_atime> には現在の時刻を設定する。"
10523
10524 #. type: Plain text
10525 #: build/C/man2/shmop.2:136 build/C/man2/shmop.2:163
10526 msgid "I<shm_lpid> is set to the process-ID of the calling process."
10527 msgstr "I<shm_lpid> には呼び出したプロセスのプロセス ID が設定される。"
10528
10529 #. type: Plain text
10530 #: build/C/man2/shmop.2:140
10531 msgid "I<shm_nattch> is incremented by one."
10532 msgstr "I<shm_nattch> を 1 増加させる。"
10533
10534 #. type: SS
10535 #: build/C/man2/shmop.2:140
10536 #, no-wrap
10537 msgid "shmdt()"
10538 msgstr ""
10539
10540 #. type: Plain text
10541 #: build/C/man2/shmop.2:151
10542 msgid ""
10543 "B<shmdt>()  detaches the shared memory segment located at the address "
10544 "specified by I<shmaddr> from the address space of the calling process.  The "
10545 "to-be-detached segment must be currently attached with I<shmaddr> equal to "
10546 "the value returned by the attaching B<shmat>()  call."
10547 msgstr ""
10548 "B<shmdt>()  は呼び出したプロセスのアドレス空間から I<shmaddr> で指定されたア"
10549 "ドレスに配置された共有メモリ・セグメントを分離 (detach) する。 分離する共有メ"
10550 "モリ・セグメントは、現在 I<shmaddr> に付加されているものでなければならない。 "
10551 "I<shmaddr> は、それを付加した時に B<shmat>()  が返した値に等しくなければなら"
10552 "ない。"
10553
10554 #. type: Plain text
10555 #: build/C/man2/shmop.2:157
10556 msgid ""
10557 "On a successful B<shmdt>()  call, the system updates the members of the "
10558 "I<shmid_ds> structure associated with the shared memory segment as follows:"
10559 msgstr ""
10560 "成功した B<shmdt>()  コールはその共有メモリ・セグメントに関連する "
10561 "I<shmid_ds> 構造体のメンバーを以下のように更新する:"
10562
10563 #. type: Plain text
10564 #: build/C/man2/shmop.2:160
10565 msgid "I<shm_dtime> is set to the current time."
10566 msgstr "I<shm_dtime> には現在の時刻が設定される。"
10567
10568 #. type: Plain text
10569 #: build/C/man2/shmop.2:168
10570 msgid ""
10571 "I<shm_nattch> is decremented by one.  If it becomes 0 and the segment is "
10572 "marked for deletion, the segment is deleted."
10573 msgstr ""
10574 "I<shm_nattch> を 1 減少させる。 もし 0 になり、削除マークがあった場合は その"
10575 "セグメントは削除される。"
10576
10577 #. type: Plain text
10578 #: build/C/man2/shmop.2:176
10579 msgid ""
10580 "On success, B<shmat>()  returns the address of the attached shared memory "
10581 "segment; on error, I<(void\\ *)\\ -1> is returned, and I<errno> is set to "
10582 "indicate the cause of the error."
10583 msgstr ""
10584 "B<shmat>()  は、成功した場合、 付加された共有メモリ・セグメントのアドレスを返"
10585 "す。 エラーの場合、 I<(void\\ *)\\ -1> を返し、 I<errno> にエラーの原因を示す"
10586 "値を設定する。"
10587
10588 #. type: Plain text
10589 #: build/C/man2/shmop.2:182
10590 msgid ""
10591 "On success, B<shmdt>()  returns 0; on error -1 is returned, and I<errno> is "
10592 "set to indicate the cause of the error."
10593 msgstr ""
10594 "B<shmdt>()  は、成功すると 0 を返す。 エラーの場合、-1 を返し、 I<errno> にエ"
10595 "ラーの原因を示す値を設定する。"
10596
10597 #. type: Plain text
10598 #: build/C/man2/shmop.2:188
10599 msgid "When B<shmat>()  fails, I<errno> is set to one of the following:"
10600 msgstr ""
10601 "B<shmat>()  が失敗した場合、 I<errno> に以下の値のどれかを設定して返す:"
10602
10603 #. type: Plain text
10604 #: build/C/man2/shmop.2:194
10605 msgid ""
10606 "The calling process does not have the required permissions for the requested "
10607 "attach type, and does not have the B<CAP_IPC_OWNER> capability."
10608 msgstr ""
10609 "呼び出したプロセスに要求された種類の付加に必要な許可がなく、 "
10610 "B<CAP_IPC_OWNER> ケーパビリティ (capability) がない。"
10611
10612 #. type: Plain text
10613 #: build/C/man2/shmop.2:211
10614 msgid ""
10615 "Invalid I<shmid> value, unaligned (i.e., not page-aligned and B<SHM_RND> was "
10616 "not specified) or invalid I<shmaddr> value, or can't attach segment at "
10617 "I<shmaddr>, or B<SHM_REMAP> was specified and I<shmaddr> was NULL."
10618 msgstr ""
10619 "I<shmid> の値が不正である。 I<shmaddr> の値が境界違反 (unaligned) (つまり、"
10620 "ページ境界に合っておらず、 B<SHM_RND> が指定されていない) または が不正であ"
10621 "る。 I<shmaddr> へのセグメントの付加に失敗した。 または B<SHM_REMAP> が指定さ"
10622 "れているが、 I<shmaddr> が NULL であった。"
10623
10624 #. type: Plain text
10625 #: build/C/man2/shmop.2:214
10626 msgid "Could not allocate memory for the descriptor or for the page tables."
10627 msgstr ""
10628 "ディスクリプター (descriptor) やページ・テーブルのためのメモリを 割り当てるこ"
10629 "とができない。"
10630
10631 #. type: Plain text
10632 #: build/C/man2/shmop.2:220
10633 msgid "When B<shmdt>()  fails, I<errno> is set as follows:"
10634 msgstr "B<shmdt>()  が失敗した場合、 B<EINVAL> は以下のようにセットされる:"
10635
10636 #.  The following since 2.6.17-rc1:
10637 #. type: Plain text
10638 #: build/C/man2/shmop.2:228
10639 msgid ""
10640 "There is no shared memory segment attached at I<shmaddr>; or, I<shmaddr> is "
10641 "not aligned on a page boundary."
10642 msgstr ""
10643 "I<shmaddr> に付加された共有メモリ・セグメントが存在しない。 もしくは、 "
10644 "I<shmaddr> がページ境界に合っていない。"
10645
10646 #. type: Plain text
10647 #: build/C/man2/shmop.2:247
10648 msgid ""
10649 "In SVID 3 (or perhaps earlier), the type of the I<shmaddr> argument was "
10650 "changed from I<char\\ *> into I<const void\\ *>, and the returned type of "
10651 "B<shmat>()  from I<char\\ *> into I<void\\ *>.  (Linux libc4 and libc5 have "
10652 "the I<char\\ *> prototypes; glibc2 has I<void\\ *>.)"
10653 msgstr ""
10654 "SVID 3 で (たぶんそれより前だと思うが)  I<shmaddr> 引き数の型は I<char\\ *> "
10655 "から I<const void\\ *> に、I<shmat>() の返り値の型は I<char\\ *> から I<void"
10656 "\\ *> に変更された (Linux では libc4 と libc5 のプロトタイプは I<char\\ *> で"
10657 "あり、glibc2 のプロトタイプは I<void\\ *> である)。"
10658
10659 #. type: Plain text
10660 #: build/C/man2/shmop.2:252
10661 msgid ""
10662 "After a B<fork>(2), the child inherits the attached shared memory segments."
10663 msgstr ""
10664 "B<fork>(2)  した後、子プロセスは付加された共有メモリ・セグメントを継承する。"
10665
10666 #. type: Plain text
10667 #: build/C/man2/shmop.2:256
10668 msgid ""
10669 "After an B<execve>(2), all attached shared memory segments are detached from "
10670 "the process."
10671 msgstr ""
10672 "B<exec>(2)  した後、全ての付加された共有メモリ・セグメントはプロセスから分離"
10673 "される。"
10674
10675 #. type: Plain text
10676 #: build/C/man2/shmop.2:260
10677 msgid ""
10678 "Upon B<_exit>(2), all attached shared memory segments are detached from the "
10679 "process."
10680 msgstr ""
10681 "B<exit>(2)  において、全ての付加された共有メモリ・セグメントはプロセスから分"
10682 "離される。"
10683
10684 #. type: Plain text
10685 #: build/C/man2/shmop.2:272
10686 msgid ""
10687 "Using B<shmat>()  with I<shmaddr> equal to NULL is the preferred, portable "
10688 "way of attaching a shared memory segment.  Be aware that the shared memory "
10689 "segment attached in this way may be attached at different addresses in "
10690 "different processes.  Therefore, any pointers maintained within the shared "
10691 "memory must be made relative (typically to the starting address of the "
10692 "segment), rather than absolute."
10693 msgstr ""
10694 "共有メモリセグメントを付加する場合の移植性の高い方法としては、 I<shmaddr> を "
10695 "NULL にして B<shmat>()  を使用するのがよい。 このような方法で付加される共有メ"
10696 "モリセグメントは、 プロセスが異なれば別のアドレスに付加される、という点に注意"
10697 "すること。 よって共有メモリ内で管理されるポインタは、 絶対アドレスではなく、 "
10698 "(一般的にはセグメントの開始アドレスからの)  相対アドレスで作成するべきであ"
10699 "る。"
10700
10701 #. type: Plain text
10702 #: build/C/man2/shmop.2:277
10703 msgid ""
10704 "On Linux, it is possible to attach a shared memory segment even if it is "
10705 "already marked to be deleted.  However, POSIX.1-2001 does not specify this "
10706 "behavior and many other implementations do not support it."
10707 msgstr ""
10708 "Linux では共有メモリセグメントに既に削除マークが付けられていても、 その共有メ"
10709 "モリセグメントを付加することができる。 しかし POSIX.1-2001 ではこのような動作"
10710 "を指定しておらず、 他の多くの実装もこれをサポートしていない。"
10711
10712 #. type: Plain text
10713 #: build/C/man2/shmop.2:280
10714 msgid "The following system parameter affects B<shmat>():"
10715 msgstr "以下のシステム・パラメーターは、 B<shmat>()  に影響する:"
10716
10717 #.  FIXME A good explanation of the rationale for the existence
10718 #.  of SHMLBA would be useful here
10719 #. type: TP
10720 #: build/C/man2/shmop.2:280
10721 #, no-wrap
10722 msgid "B<SHMLBA>"
10723 msgstr "B<SHMLBA>"
10724
10725 #.  FIXME That last sentence isn't true for all Linux
10726 #.  architectures (i.e., SHMLBA != PAGE_SIZE for some architectures)
10727 #.  -- MTK, Nov 04
10728 #. type: Plain text
10729 #: build/C/man2/shmop.2:293
10730 msgid ""
10731 "Segment low boundary address multiple.  Must be page aligned.  For the "
10732 "current implementation, the B<SHMLBA> value is B<PAGE_SIZE>."
10733 msgstr ""
10734 "セグメントの境界アドレスの最小倍数。ページ境界に合ってなければならない。 現在"
10735 "の実装では B<SHMLBA> の値は B<PAGE_SIZE> である。"
10736
10737 #. type: Plain text
10738 #: build/C/man2/shmop.2:297
10739 msgid ""
10740 "The implementation places no intrinsic per-process limit on the number of "
10741 "shared memory segments (B<SHMSEG>)."
10742 msgstr ""
10743 "現在の実装では、プロセスごとの 共有メモリ・セグメントの最大数 (B<SHMSEG>)  に"
10744 "関する実装依存の制限はない。"
10745
10746 #. type: Plain text
10747 #: build/C/man2/shmop.2:305
10748 msgid ""
10749 "B<brk>(2), B<mmap>(2), B<shmctl>(2), B<shmget>(2), B<capabilities>(7), "
10750 "B<shm_overview>(7), B<svipc>(7)"
10751 msgstr ""
10752 "B<brk>(2), B<mmap>(2), B<shmctl>(2), B<shmget>(2), B<capabilities>(7), "
10753 "B<shm_overview>(7), B<svipc>(7)"
10754
10755 #. type: TH
10756 #: build/C/man2/subpage_prot.2:30
10757 #, no-wrap
10758 msgid "SUBPAGE_PROT"
10759 msgstr "SUBPAGE_PROT"
10760
10761 #. type: TH
10762 #: build/C/man2/subpage_prot.2:30
10763 #, no-wrap
10764 msgid "2012-07-13"
10765 msgstr "2012-07-13"
10766
10767 #. type: Plain text
10768 #: build/C/man2/subpage_prot.2:33
10769 msgid "subpage_prot - define a subpage protection for an address range"
10770 msgstr ""
10771
10772 #. type: Plain text
10773 #: build/C/man2/subpage_prot.2:37
10774 #, no-wrap
10775 msgid ""
10776 "B<long subpage_prot(unsigned long >I<addr>B<, unsigned long >I<len>B<,>\n"
10777 "B<                  uint32_t *>I<map>B<);>\n"
10778 msgstr ""
10779 "B<long subpage_prot(unsigned long >I<addr>B<, unsigned long >I<len>B<,>\n"
10780 "B<                  uint32_t *>I<map>B<);>\n"
10781
10782 #. type: Plain text
10783 #: build/C/man2/subpage_prot.2:41
10784 msgid "I<Note>: There is no glibc wrapper for this system call; see NOTES."
10785 msgstr ""
10786 "I<注>: このシステムコールには glibc のラッパー関数は存在しない。「注意」の節"
10787 "を参照。"
10788
10789 #. type: Plain text
10790 #: build/C/man2/subpage_prot.2:47
10791 msgid ""
10792 "The PowerPC-specific B<subpage_prot>()  system call provides the facility to "
10793 "control the access permissions on individual 4kB subpages on systems "
10794 "configured with a page size of 64kB."
10795 msgstr ""
10796
10797 #. type: Plain text
10798 #: build/C/man2/subpage_prot.2:54
10799 msgid ""
10800 "The protection map is applied to the memory pages in the region starting at "
10801 "I<addr> and continuing for I<len> bytes.  Both of these arguments must be "
10802 "aligned to a 64-kB boundary."
10803 msgstr ""
10804
10805 #. type: Plain text
10806 #: build/C/man2/subpage_prot.2:66
10807 msgid ""
10808 "The protection map is specified in the buffer pointed to by I<map>.  The map "
10809 "has 2 bits per 4kB subpage; thus each 32-bit word specifies the protections "
10810 "of 16 4kB subpages inside a 64kB page (so, the number of 32-bit words "
10811 "pointed to by I<map> should equate to the number of 64-kB pages specified by "
10812 "I<len>).  Each 2-bit field in the protection map is either 0 to allow any "
10813 "access, 1 to prevent writes, or 2 or 3 to prevent all accesses."
10814 msgstr ""
10815
10816 #. type: Plain text
10817 #: build/C/man2/subpage_prot.2:71
10818 msgid ""
10819 "On success, B<subpage_prot>()  returns 0.  Otherwise, one of the error codes "
10820 "specified below is returned."
10821 msgstr ""
10822
10823 #. type: Plain text
10824 #: build/C/man2/subpage_prot.2:77
10825 msgid "The buffer referred to by I<map> is not accessible."
10826 msgstr ""
10827
10828 #. type: Plain text
10829 #: build/C/man2/subpage_prot.2:87
10830 msgid ""
10831 "The I<addr> or I<len> arguments are incorrect.  Both of these arguments must "
10832 "be aligned to a multiple of the system page size, and they must not refer to "
10833 "a region outside of the address space of the process or to a region that "
10834 "consists of huge pages."
10835 msgstr ""
10836
10837 #. type: Plain text
10838 #: build/C/man2/subpage_prot.2:90 build/C/man2/sync_file_range.2:166
10839 msgid "Out of memory."
10840 msgstr "メモリ不足である。"
10841
10842 #. type: Plain text
10843 #: build/C/man2/subpage_prot.2:96
10844 msgid ""
10845 "This system call is provided on the PowerPC architecture since Linux "
10846 "2.6.25.  The system call is provided only if the kernel is configured with "
10847 "B<CONFIG_PPC_64K_PAGES>.  No library support is provided."
10848 msgstr ""
10849
10850 #. type: Plain text
10851 #: build/C/man2/subpage_prot.2:101
10852 msgid ""
10853 "Glibc does not provide a wrapper for this system call; call it using "
10854 "B<syscall>(2)."
10855 msgstr ""
10856
10857 #. type: Plain text
10858 #: build/C/man2/subpage_prot.2:106
10859 msgid ""
10860 "Normal page protections (at the 64-kB page level) also apply; the subpage "
10861 "protection mechanism is an additional constraint, so putting 0 in a 2-bit "
10862 "field won't allow writes to a page that is otherwise write-protected."
10863 msgstr ""
10864
10865 #. type: SS
10866 #: build/C/man2/subpage_prot.2:106
10867 #, no-wrap
10868 msgid "Rationale"
10869 msgstr ""
10870
10871 #.  In the initial implementation, it was the case that:
10872 #.      In fact the whole process is switched to use 4k hardware pages when the
10873 #.      subpage_prot system call is used, but this could be improved in future
10874 #.      to switch only the affected segments.
10875 #.  But Paul Mackerass says (Oct 2010): I'm pretty sure we now only switch
10876 #.  the affected segment, not the whole process.
10877 #. type: Plain text
10878 #: build/C/man2/subpage_prot.2:128
10879 msgid ""
10880 "This system call is provided to assist writing emulators that operate using "
10881 "64-kB pages on PowerPC systems.  When emulating systems such as x86, which "
10882 "uses a smaller page size, the emulator can no longer use the memory-"
10883 "management unit (MMU)  and normal system calls for controlling page "
10884 "protections.  (The emulator could emulate the MMU by checking and possibly "
10885 "remapping the address for each memory access in software, but that is "
10886 "slow.)  The idea is that the emulator supplies an array of protection masks "
10887 "to apply to a specified range of virtual addresses.  These masks are applied "
10888 "at the level where hardware page-table entries (PTEs)  are inserted into the "
10889 "hardware page table based on the Linux PTEs, so the Linux PTEs are not "
10890 "affected.  Implicit in this is that the regions of the address space that "
10891 "are protected are switched to use 4-kB hardware pages rather than 64-kB "
10892 "hardware pages (on machines with hardware 64-kB page support)."
10893 msgstr ""
10894
10895 #. type: Plain text
10896 #: build/C/man2/subpage_prot.2:131
10897 msgid "B<mprotect>(2), B<syscall>(2)"
10898 msgstr "B<mprotect>(2), B<syscall>(2)"
10899
10900 #. type: Plain text
10901 #: build/C/man2/subpage_prot.2:134
10902 msgid "I<Documentation/vm/hugetlbpage.txt> in the Linux kernel source tree"
10903 msgstr "Linux カーネルソースの I<Documentation/vm/hugetlbpage.txt>"
10904
10905 #. type: TH
10906 #: build/C/man2/sync_file_range.2:30
10907 #, no-wrap
10908 msgid "SYNC_FILE_RANGE"
10909 msgstr "SYNC_FILE_RANGE"
10910
10911 #. type: TH
10912 #: build/C/man2/sync_file_range.2:30
10913 #, no-wrap
10914 msgid "2013-04-01"
10915 msgstr "2013-04-01"
10916
10917 #. type: Plain text
10918 #: build/C/man2/sync_file_range.2:33
10919 msgid "sync_file_range - sync a file segment with disk"
10920 msgstr "sync_file_range - ファイルセグメントをディスクと同期する"
10921
10922 #. type: Plain text
10923 #: build/C/man2/sync_file_range.2:37
10924 #, no-wrap
10925 msgid ""
10926 "B<#define _GNU_SOURCE>         /* See feature_test_macros(7) */\n"
10927 "B<#include E<lt>fcntl.hE<gt>>\n"
10928 msgstr ""
10929 "B<#define _GNU_SOURCE>         /* feature_test_macros(7) 参照 */\n"
10930 "B<#include E<lt>fcntl.hE<gt>>\n"
10931
10932 #. type: Plain text
10933 #: build/C/man2/sync_file_range.2:40
10934 #, no-wrap
10935 msgid ""
10936 "B<int sync_file_range(int >I<fd>B<, off64_t >I<offset>B<, off64_t >I<nbytes>B<,>\n"
10937 "B<                    unsigned int >I<flags>B<);>\n"
10938 msgstr ""
10939 "B<int sync_file_range(int >I<fd>B<, off64_t >I<offset>B<, off64_t >I<nbytes>B<,>\n"
10940 "B<                    unsigned int >I<flags>B<);>\n"
10941
10942 #. type: Plain text
10943 #: build/C/man2/sync_file_range.2:47
10944 msgid ""
10945 "B<sync_file_range>()  permits fine control when synchronizing the open file "
10946 "referred to by the file descriptor I<fd> with disk."
10947 msgstr ""
10948 "B<sync_file_range>()  を使うと、ファイルディスクリプタ I<fd> で参照されるオー"
10949 "プンされたファイルのディスクとの同期に関して、 きめ細かな制御が可能となる。"
10950
10951 #. type: Plain text
10952 #: build/C/man2/sync_file_range.2:61
10953 msgid ""
10954 "I<offset> is the starting byte of the file range to be synchronized.  "
10955 "I<nbytes> specifies the length of the range to be synchronized, in bytes; if "
10956 "I<nbytes> is zero, then all bytes from I<offset> through to the end of file "
10957 "are synchronized.  Synchronization is in units of the system page size: "
10958 "I<offset> is rounded down to a page boundary; I<(offset+nbytes-1)> is "
10959 "rounded up to a page boundary."
10960 msgstr ""
10961 "I<offset> は、同期を行うファイルの領域の開始バイトである。 I<nbytes> には同期"
10962 "を行う領域の長さをバイト単位で指定する。 I<nbytes> が 0 の場合は、 I<offset> "
10963 "からファイル末尾までの全バイトを同期する。 同期はシステムのページサイズの単位"
10964 "で行われる。 I<offset> はページ境界にあわせて切り下げられ、 I<(offset"
10965 "+nbytes-1)> はページ境界にあわせて切り上げられる。"
10966
10967 #. type: Plain text
10968 #: build/C/man2/sync_file_range.2:65
10969 msgid "The I<flags> bit-mask argument can include any of the following values:"
10970 msgstr "ビットマスク引き数 I<flags> には以下の値を指定することができる:"
10971
10972 #. type: TP
10973 #: build/C/man2/sync_file_range.2:65
10974 #, no-wrap
10975 msgid "B<SYNC_FILE_RANGE_WAIT_BEFORE>"
10976 msgstr "B<SYNC_FILE_RANGE_WAIT_BEFORE>"
10977
10978 #. type: Plain text
10979 #: build/C/man2/sync_file_range.2:70
10980 msgid ""
10981 "Wait upon write-out of all pages in the specified range that have already "
10982 "been submitted to the device driver for write-out before performing any "
10983 "write."
10984 msgstr ""
10985 "何らかの書き込みを行う前に、指定された領域のページで 書き出しを行うようにデバ"
10986 "イスドライバにすでに要求が発行されている ページの書き出しが全て完了するのを待"
10987 "つ。"
10988
10989 #. type: TP
10990 #: build/C/man2/sync_file_range.2:70 build/C/man2/sync_file_range.2:120
10991 #, no-wrap
10992 msgid "B<SYNC_FILE_RANGE_WRITE>"
10993 msgstr "B<SYNC_FILE_RANGE_WRITE>"
10994
10995 #. type: Plain text
10996 #: build/C/man2/sync_file_range.2:76
10997 msgid ""
10998 "Initiate write-out of all dirty pages in the specified range which are not "
10999 "presently submitted write-out.  Note that even this may block if you attempt "
11000 "to write more than request queue size."
11001 msgstr ""
11002 "指定された領域のページで、書き出し要求が発行されていない 全ての dirty (キャッ"
11003 "シュだけが変更されている) ページの 書き出しを開始する。 リクエストキューの大"
11004 "きさより多く書き込もうとした場合には、 この処理は停止 (block) する可能性があ"
11005 "る点に注意すること。"
11006
11007 #. type: TP
11008 #: build/C/man2/sync_file_range.2:76
11009 #, no-wrap
11010 msgid "B<SYNC_FILE_RANGE_WAIT_AFTER>"
11011 msgstr "B<SYNC_FILE_RANGE_WAIT_AFTER>"
11012
11013 #. type: Plain text
11014 #: build/C/man2/sync_file_range.2:80
11015 msgid ""
11016 "Wait upon write-out of all pages in the range after performing any write."
11017 msgstr ""
11018 "何らかの書き込み後に、指定された領域の全てのページの 書き出しが行われるのを待"
11019 "つ。"
11020
11021 #. type: Plain text
11022 #: build/C/man2/sync_file_range.2:84
11023 msgid "Specifying I<flags> as 0 is permitted, as a no-op."
11024 msgstr "I<flags> に 0 を指定した場合、何もしないことを表す。"
11025
11026 #. type: SS
11027 #: build/C/man2/sync_file_range.2:84
11028 #, no-wrap
11029 msgid "Warning"
11030 msgstr "警告"
11031
11032 #. type: Plain text
11033 #: build/C/man2/sync_file_range.2:100
11034 msgid ""
11035 "This system call is extremely dangerous and should not be used in portable "
11036 "programs.  None of these operations writes out the file's metadata.  "
11037 "Therefore, unless the application is strictly performing overwrites of "
11038 "already-instantiated disk blocks, there are no guarantees that the data will "
11039 "be available after a crash.  There is no user interface to know if a write "
11040 "is purely an overwrite.  On filesystems using copy-on-write semantics (e.g., "
11041 "I<btrfs>)  an overwrite of existing allocated blocks is impossible.  When "
11042 "writing into preallocated space, many filesystems also require calls into "
11043 "the block allocator, which this system call does not sync out to disk.  This "
11044 "system call does not flush disk write caches and thus does not provide any "
11045 "data integrity on systems with volatile disk write caches."
11046 msgstr ""
11047 "このシステムコールは非常に危険であり、 移植性が必要なプログラムで使用すべきで"
11048 "はない。 これらの操作ではどれもファイルのメタデータの書き出しを行わない。 し"
11049 "たがって、アプリケーションにより作成済みのディスクブロックの 上書きの実行が確"
11050 "実に行われない限り、クラッシュの後でもデータが 利用できる保証はない。 書き込"
11051 "みが上書きだけであるかを知るためのユーザインタフェースは存在しない。 "
11052 "(I<btrfs> などの) copy-on-write 動作を使ったファイルシステムでは、 既存の割り"
11053 "当て済みのブロックに対する上書き自体ができない。 前もって割り当てられた領域に"
11054 "書き込みを行う場合、 多くのファイルシステムでは block allocator への書き込み"
11055 "も必要となるが、 このシステムコールは block allocator のディスクへの同期を行"
11056 "わない。 このシステムコールはディスク書き込みキャッシュのフラッシュを 行わな"
11057 "いので、揮発性のディスク書き込みキャッシュを使ったシステムでは このシステム"
11058 "コールではデータの一貫性を確保できないことになる。"
11059
11060 #. type: SS
11061 #: build/C/man2/sync_file_range.2:100
11062 #, no-wrap
11063 msgid "Some details"
11064 msgstr "詳細"
11065
11066 #. type: Plain text
11067 #: build/C/man2/sync_file_range.2:108
11068 msgid ""
11069 "B<SYNC_FILE_RANGE_WAIT_BEFORE> and B<SYNC_FILE_RANGE_WAIT_AFTER> will detect "
11070 "any I/O errors or B<ENOSPC> conditions and will return these to the caller."
11071 msgstr ""
11072 "B<SYNC_FILE_RANGE_WAIT_BEFORE> と B<SYNC_FILE_RANGE_WAIT_AFTER> は I/O エラー"
11073 "や B<ENOSPC> 状態を検出し、呼び出し元にこれらの情報を返す。"
11074
11075 #. type: Plain text
11076 #: build/C/man2/sync_file_range.2:112
11077 msgid "Useful combinations of the I<flags> bits are:"
11078 msgstr "I<flags> の役に立つビットの組み合わせを以下に示す:"
11079
11080 #. type: TP
11081 #: build/C/man2/sync_file_range.2:112
11082 #, no-wrap
11083 msgid "B<SYNC_FILE_RANGE_WAIT_BEFORE | SYNC_FILE_RANGE_WRITE>"
11084 msgstr "B<SYNC_FILE_RANGE_WAIT_BEFORE | SYNC_FILE_RANGE_WRITE>"
11085
11086 #. type: Plain text
11087 #: build/C/man2/sync_file_range.2:120
11088 msgid ""
11089 "Ensures that all pages in the specified range which were dirty when "
11090 "B<sync_file_range>()  was called are placed under write-out.  This is a "
11091 "start-write-for-data-integrity operation."
11092 msgstr ""
11093 "指定された範囲内のページで、 B<sync_file_range>()  が呼び出された際に dirty "
11094 "であった全てのページが、 確実に書き出し対象となるようにする。 これは、start-"
11095 "write-for-data-integrity 操作 (データ完全性確保のための書き込み開始の操作) で"
11096 "ある。"
11097
11098 #. type: Plain text
11099 #: build/C/man2/sync_file_range.2:127
11100 msgid ""
11101 "Start write-out of all dirty pages in the specified range which are not "
11102 "presently under write-out.  This is an asynchronous flush-to-disk "
11103 "operation.  This is not suitable for data integrity operations."
11104 msgstr ""
11105 "指定された範囲内のページで、現在書き出し中でない全ての dirty ページの 書き出"
11106 "しを開始する。これは非同期のディスクへのフラッシュ (flush-to-disk)  操作であ"
11107 "る。データ完全性確保が必要な操作としては適切ではない。"
11108
11109 #. type: TP
11110 #: build/C/man2/sync_file_range.2:127
11111 #, no-wrap
11112 msgid "B<SYNC_FILE_RANGE_WAIT_BEFORE> (or B<SYNC_FILE_RANGE_WAIT_AFTER>)"
11113 msgstr "B<SYNC_FILE_RANGE_WAIT_BEFORE> (or B<SYNC_FILE_RANGE_WAIT_AFTER>)"
11114
11115 #. type: Plain text
11116 #: build/C/man2/sync_file_range.2:134
11117 msgid ""
11118 "Wait for completion of write-out of all pages in the specified range.  This "
11119 "can be used after an earlier B<SYNC_FILE_RANGE_WAIT_BEFORE | "
11120 "SYNC_FILE_RANGE_WRITE> operation to wait for completion of that operation, "
11121 "and obtain its result."
11122 msgstr ""
11123 "指定された範囲内の全てのページの書き出しの完了を待つ。 このフラグは、前に行わ"
11124 "れた操作 B<SYNC_FILE_RANGE_WAIT_BEFORE | SYNC_FILE_RANGE_WRITE> の後に使用で"
11125 "き、この操作の完了を待ち、結果を取得することができる。"
11126
11127 #. type: TP
11128 #: build/C/man2/sync_file_range.2:134
11129 #, no-wrap
11130 msgid "B<SYNC_FILE_RANGE_WAIT_BEFORE | SYNC_FILE_RANGE_WRITE | SYNC_FILE_RANGE_WAIT_AFTER>"
11131 msgstr "B<SYNC_FILE_RANGE_WAIT_BEFORE | SYNC_FILE_RANGE_WRITE | SYNC_FILE_RANGE_WAIT_AFTER>"
11132
11133 #. type: Plain text
11134 #: build/C/man2/sync_file_range.2:141
11135 msgid ""
11136 "This is a write-for-data-integrity operation that will ensure that all pages "
11137 "in the specified range which were dirty when B<sync_file_range>()  was "
11138 "called are committed to disk."
11139 msgstr ""
11140 "これは write-for-data-integrity 操作 (データ完全性確保のための書き込み) であ"
11141 "り、指定された範囲内の、 B<sync_file_range>()  が呼ばれた時点で dirty な全て"
11142 "のページが ディスクに格納されることが保証される。"
11143
11144 #. type: Plain text
11145 #: build/C/man2/sync_file_range.2:147
11146 msgid ""
11147 "On success, B<sync_file_range>()  returns 0; on failure -1 is returned and "
11148 "I<errno> is set to indicate the error."
11149 msgstr ""
11150 "成功の場合、 B<sync_file_range>()  は 0 を返す。失敗の場合、-1 を返し、 "
11151 "I<error> にエラーを示す値を設定する。"
11152
11153 #. type: Plain text
11154 #: build/C/man2/sync_file_range.2:152
11155 msgid "I<fd> is not a valid file descriptor."
11156 msgstr "I<fd> が有効なファイルディスクリプタではない。"
11157
11158 #. type: Plain text
11159 #: build/C/man2/sync_file_range.2:160
11160 msgid ""
11161 "I<flags> specifies an invalid bit; or I<offset> or I<nbytes> is invalid."
11162 msgstr ""
11163 "I<flags> に不正なビットが指定されている。または I<offset> か I<nbytes> が不正"
11164 "である。"
11165
11166 #. type: Plain text
11167 #: build/C/man2/sync_file_range.2:163
11168 msgid "I/O error."
11169 msgstr "I/O エラー。"
11170
11171 #. type: Plain text
11172 #: build/C/man2/sync_file_range.2:169
11173 msgid "Out of disk space."
11174 msgstr "ディスク領域不足である。"
11175
11176 #.  FIXME . (bug?) Actually, how can 'fd' refer to a symbolic link (S_ISLNK)?
11177 #.  (In user space at least) it isn't possible to obtain a file descriptor
11178 #.  for a symbolic link.
11179 #. type: Plain text
11180 #: build/C/man2/sync_file_range.2:177
11181 msgid ""
11182 "I<fd> refers to something other than a regular file, a block device, a "
11183 "directory, or a symbolic link."
11184 msgstr ""
11185 "I<fd> が、通常のファイル、ブロックデバイス、ディレクトリ、シンボリックリンク "
11186 "以外のものを指している。"
11187
11188 #. type: Plain text
11189 #: build/C/man2/sync_file_range.2:180
11190 msgid "B<sync_file_range>()  appeared on Linux in kernel 2.6.17."
11191 msgstr "B<sync_file_range>()  はカーネル 2.6.17 で Linux に登場した。"
11192
11193 #. type: Plain text
11194 #: build/C/man2/sync_file_range.2:183
11195 msgid ""
11196 "This system call is Linux-specific, and should be avoided in portable "
11197 "programs."
11198 msgstr ""
11199 "このシステムコールは Linux 独自であり、 移植性が必要なプログラムでは使用を避"
11200 "けるべきである。"
11201
11202 #.  See kernel commit edd5cd4a9424f22b0fa08bef5e299d41befd5622
11203 #. type: Plain text
11204 #: build/C/man2/sync_file_range.2:200
11205 msgid ""
11206 "Some architectures (e.g., PowerPC, ARM)  need 64-bit arguments to be aligned "
11207 "in a suitable pair of registers.  On such architectures, the call signature "
11208 "of B<sync_file_range>()  shown in the SYNOPSIS would force a register to be "
11209 "wasted as padding between the I<fd> and I<offset> arguments.  (See "
11210 "B<syscall>(2)  for details.)  Therefore, these architectures define a "
11211 "different system call that orders the arguments suitably:"
11212 msgstr ""
11213 "いくつかのアーキテクチャ (例えば、 PowerPC や ARM) では、 64 ビットの引き数は"
11214 "適切なレジスタの組に割り当てる必要がある。 このようなアーキテクチャでは、 "
11215 "「書式」に書かれている B<sync_file_range>() の呼び出しシグネチャーで、 引き"
11216 "数 I<fd> と I<offset> の間のパディング (詰めもの) でレジスタが一つ消費されて"
11217 "しまう (詳細は B<syscall>(2) 参照)。 そのため、 これらのアーキテクチャでは引"
11218 "き数が適切な順序になった別のシステムコールが定義されている。"
11219
11220 #. type: Plain text
11221 #: build/C/man2/sync_file_range.2:205
11222 #, no-wrap
11223 msgid ""
11224 "B<int sync_file_range2(int >I<fd>B<, unsigned int >I<flags>B<,>\n"
11225 "B<                     off64_t >I<offset>B<, off64_t >I<nbytes>B<);>\n"
11226 msgstr ""
11227 "B<int sync_file_range2(int >I<fd>B<, unsigned int >I<flags>B<,>\n"
11228 "B<                     off64_t >I<offset>B<, off64_t >I<nbytes>B<);>\n"
11229
11230 #. type: Plain text
11231 #: build/C/man2/sync_file_range.2:210
11232 msgid ""
11233 "The behavior of this system call is otherwise exactly the same as "
11234 "B<sync_file_range>()."
11235 msgstr ""
11236 "上記の点以外は、このシステムコールの動作は B<sync_file_range>() と\n"
11237 "全く同じである。このシステムコールに対するライブラリによるサポートは\n"
11238 "glibc では提供されていない。"
11239
11240 #. type: Plain text
11241 #: build/C/man2/sync_file_range.2:221
11242 msgid ""
11243 "A system call with this signature first appeared on the ARM architecture in "
11244 "Linux 2.6.20, with the name B<arm_sync_file_range>().  It was renamed in "
11245 "Linux 2.6.22, when the analogous system call was added for PowerPC.  On "
11246 "architectures where glibc support is provided, glibc transparently wraps "
11247 "B<sync_file_range2>()  under the name B<sync_file_range>()."
11248 msgstr ""
11249 "このバージョンのシステムコールは、Linux 2.6.20 で ARM アーキテクチャで\n"
11250 "初めて登場し、 B<arm_sync_file_range>() という名前であった。\n"
11251 "Linux 2.6.22 で、同様のシステムコールが PowerPC 用に追加された際に、\n"
11252 "システムコールの名前が変更された。\n"
11253 "glibc によるサポートが提供されているアーキテクチャでは、\n"
11254 "glibc のラッパー関数は B<sync_file_range>() という名前で\n"
11255 "B<sync_file_range2>() を適切に使用するようになっている。"
11256
11257 #. type: Plain text
11258 #: build/C/man2/sync_file_range.2:226
11259 msgid "B<fdatasync>(2), B<fsync>(2), B<msync>(2), B<sync>(2)"
11260 msgstr "B<fdatasync>(2), B<fsync>(2), B<msync>(2), B<sync>(2)"
11261
11262 #~ msgid "2014-05-10"
11263 #~ msgstr "2014-05-10"
11264
11265 #~ msgid "2008-04-22"
11266 #~ msgstr "2008-04-22"
11267
11268 #~ msgid "I<mode_flags>"
11269 #~ msgstr "I<mode_flags>"
11270
11271 #~ msgid "B<IPC_CREAT | IPC_EXCL> was specified and the segment exists."
11272 #~ msgstr ""
11273 #~ "B<IPC_CREAT | IPC_EXCL> が指定されていたが、そのセグメントが既に存在する。"
11274
11275 #~ msgid ""
11276 #~ "Assuming a 4kB page size, this formula yields (since Linux 2.4) the value "
11277 #~ "2^20 (2,097,152)."
11278 #~ msgstr ""
11279 #~ "4kB ページサイズと仮定すると、 (Linux 2.4 以降では) この式の結果は 2^20 "
11280 #~ "(2,097,152) になる。"
11281
11282 #~ msgid ""
11283 #~ "Maximum size in bytes for a shared memory segment: policy dependent (on "
11284 #~ "Linux, this limit can be read and modified via I</proc/sys/kernel/"
11285 #~ "shmmax>)."
11286 #~ msgstr ""
11287 #~ "共有メモリ・セグメントのバイト単位の大きさの上限: 方針依存 (Linux では、こ"
11288 #~ "の上限値は I</proc/sys/kernel/shmmax> 経由で参照したり、変更したりでき"
11289 #~ "る)。"
11290
11291 #~ msgid ""
11292 #~ "System wide maximum number of shared memory segments: implementation "
11293 #~ "dependent (currently 4096, was 128 before Linux 2.3.99; on Linux, this "
11294 #~ "limit can be read and modified via I</proc/sys/kernel/shmmni>)."
11295 #~ msgstr ""
11296 #~ "システム全体の共有メモリーの数の上限: 実装依存 (現在は 4096。Linux 2.3.99 "
11297 #~ "より前では 128。 Linux では、この上限値は I</proc/sys/kernel/shmmni> 経由"
11298 #~ "で参照したり、変更したりできる)。"
11299
11300 #~ msgid ""
11301 #~ "A valid segment identifier, I<shmid>, is returned on success, -1 on error."
11302 #~ msgstr ""
11303 #~ "成功した場合、有効なセグメント識別子 I<shmid> が返される。エラーの場合、 "
11304 #~ "-1 が返される。"
11305
11306 #~ msgid ""
11307 #~ "The ARM architecture needs 64-bit arguments to be aligned in a suitable "
11308 #~ "pair of registers.  On this architecture, the call signature of "
11309 #~ "B<posix_fadvise>()  is flawed, since it forces a register to be wasted as "
11310 #~ "padding between the I<fd> and I<len> arguments.  Therefore, since Linux "
11311 #~ "2.6.14, ARM defines a different system call that orders the arguments "
11312 #~ "suitably:"
11313 #~ msgstr ""
11314 #~ "ARM アーキテクチャでは、64 ビットの引き数は適切なレジスタの組に割り当て\n"
11315 #~ "る必要がある。このアーキテクチャでは、B<posix_fadvise>() の呼び出し方に\n"
11316 #~ "は欠陥があり、それはこのシステムコールでは引き数 I<fd> と I<len> の間の\n"
11317 #~ "パディング (詰めもの) でレジスタが一つ消費されてしまうというものである。\n"
11318 #~ "そのため、Linux 2.6.14 以降では、ARM では引き数が適切な順序になった別の\n"
11319 #~ "システムコールが定義されている。"
11320
11321 #~ msgid ""
11322 #~ "The behavior of this system call is otherwise exactly the same as "
11323 #~ "B<posix_fadvise>().  No library support is provided for this system call "
11324 #~ "in glibc."
11325 #~ msgstr ""
11326 #~ "上記の点以外は、このシステムコールの動作は B<posix_fadvise>() と全く\n"
11327 #~ "同じである。このシステムコールに対するライブラリによるサポートは glibc\n"
11328 #~ "では提供されていない。"
11329
11330 #~ msgid ""
11331 #~ "The I<mode> is not supported by the file system containing the file "
11332 #~ "referred to by I<fd>."
11333 #~ msgstr ""
11334 #~ "I<fd> が参照するファイルを含むファイルシステムが I<mode> をサポートしてい"
11335 #~ "ない。"
11336
11337 #~ msgid ""
11338 #~ "The function B<mtrace>()  installs handlers for B<malloc>(3), "
11339 #~ "B<realloc>(3)  and B<free>(3).  The function B<muntrace>()  disables "
11340 #~ "these handlers."
11341 #~ msgstr ""
11342 #~ "関数 B<mtrace>()  は、 B<malloc>(3), B<realloc>(3), B<free>(3)  のハンドラ"
11343 #~ "を組み込む。 関数 B<muntrace>()  はこれらのハンドラを解除する。"
11344
11345 #~ msgid ""
11346 #~ "The environment variable B<MALLOC_TRACE> defines a file where "
11347 #~ "B<mtrace>()  writes its output.  This file must be writable to the user "
11348 #~ "or B<mtrace>()  will do nothing.  If the file is not empty it will be "
11349 #~ "truncated."
11350 #~ msgstr ""
11351 #~ "環境変数 B<MALLOC_TRACE> は B<mtrace>()  が出力を書き出すファイルを指定す"
11352 #~ "る。 ユーザが書き込み権限を持つファイルを指定しなければならない。 書き込み"
11353 #~ "権限がない場合、 B<mtrace>()  は何もしない。 ファイルが空でない場合、ファ"
11354 #~ "イルの元の内容を上書きする。"
11355
11356 #~ msgid ""
11357 #~ "The output of B<mtrace>()  will be ASCII but not in a friendly format.  "
11358 #~ "So glibc comes with a perl-script called mtrace to make sense of it."
11359 #~ msgstr ""
11360 #~ "B<mtrace>()  の出力は ASCII 形式だが、人が読みやすいフォーマットではな"
11361 #~ "い。 そこで、glibc には mtrace 出力を分かりやすい形式に変換する perl スク"
11362 #~ "リプトが付属している。"
11363
11364 #~ msgid ""
11365 #~ "This flag allocates and initializes to zero the disk space within the "
11366 #~ "range specified by I<offset> and I<len>.  After a successful call, "
11367 #~ "subsequent writes into this range are guaranteed not to fail because of "
11368 #~ "lack of disk space.  Preallocating zeroed blocks beyond the end of the "
11369 #~ "file is useful for optimizing append workloads.  Preallocating blocks "
11370 #~ "does not change the file size (as reported by B<stat>(2))  even if it is "
11371 #~ "less than I<offset>+I<len>."
11372 #~ msgstr ""
11373 #~ "このフラグは、 I<offset> と I<len> で指定された領域のディスク空間を割り当"
11374 #~ "て、その空間を 0 で初期化する。 呼び出しが成功すると、それに続いてこの領域"
11375 #~ "への書き込みが行われるが、 ディスク空間の不足による書き込み失敗が発生しな"
11376 #~ "いことが保証される。 ファイル末尾より後ろの領域について 0 で埋めたブロック"
11377 #~ "を前もって 割り当てておくことは、追記 (append) の作業負荷を最適化するのに "
11378 #~ "有用である。 ファイルサイズが I<offset>+I<len> よりも小さい場合であって"
11379 #~ "も、ブロックの前もっての割り当てにより (B<stat>(2)  が返す) ファイルサイズ"
11380 #~ "は変更されることはない。"