OSDN Git Service

(split) git commit -m "LDP: Update the version to 3.63 in PO files"
[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-04-13 10:27+0900\n"
10 "PO-Revision-Date: 2014-04-13 10:37+0900\n"
11 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
12 "Language-Team: LANGUAGE <LL@li.org>\n"
13 "Language: \n"
14 "MIME-Version: 1.0\n"
15 "Content-Type: text/plain; charset=UTF-8\n"
16 "Content-Transfer-Encoding: 8bit\n"
17
18 #. type: TH
19 #: build/C/man2/alloc_hugepages.2:25
20 #, no-wrap
21 msgid "ALLOC_HUGEPAGES"
22 msgstr "ALLOC_HUGEPAGES"
23
24 #. type: TH
25 #: build/C/man2/alloc_hugepages.2:25
26 #, no-wrap
27 msgid "2007-05-31"
28 msgstr "2007-05-31"
29
30 #. type: TH
31 #: build/C/man2/alloc_hugepages.2:25 build/C/man2/cacheflush.2:25
32 #: build/C/man2/fallocate.2:11 build/C/man2/madvise.2:35
33 #: build/C/man3/mallinfo.3:26 build/C/man3/malloc_stats.3:26
34 #: build/C/man3/malloc_trim.3:26 build/C/man3/mallopt.3:26
35 #: build/C/man2/mlock.2:26 build/C/man2/mmap.2:40 build/C/man2/mmap2.2:29
36 #: build/C/man2/mprotect.2:38 build/C/man2/mremap.2:30 build/C/man2/msync.2:25
37 #: build/C/man2/posix_fadvise.2:28 build/C/man2/readahead.2:28
38 #: build/C/man2/remap_file_pages.2:28 build/C/man3/shm_open.3:26
39 #: build/C/man7/shm_overview.7:27 build/C/man2/shmctl.2:45
40 #: build/C/man2/shmget.2:38 build/C/man2/shmop.2:41
41 #: build/C/man2/subpage_prot.2:30 build/C/man2/sync_file_range.2:30
42 #, no-wrap
43 msgid "Linux"
44 msgstr "Linux"
45
46 #. type: TH
47 #: build/C/man2/alloc_hugepages.2:25 build/C/man3/alloca.3:43
48 #: build/C/man2/cacheflush.2:25 build/C/man2/fallocate.2:11
49 #: build/C/man2/madvise.2:35 build/C/man3/mallinfo.3:26
50 #: build/C/man3/malloc_get_state.3:25 build/C/man3/malloc_hook.3:10
51 #: build/C/man3/malloc_info.3:25 build/C/man3/malloc_stats.3:26
52 #: build/C/man3/malloc_trim.3:26 build/C/man3/malloc_usable_size.3:25
53 #: build/C/man3/mallopt.3:26 build/C/man3/mcheck.3:25 build/C/man2/mlock.2:26
54 #: build/C/man2/mmap.2:40 build/C/man2/mmap2.2:29 build/C/man2/mprotect.2:38
55 #: build/C/man2/mremap.2:30 build/C/man2/msync.2:25 build/C/man3/mtrace.3:25
56 #: build/C/man2/posix_fadvise.2:28 build/C/man3/posix_fallocate.3:25
57 #: build/C/man3/posix_memalign.3:29 build/C/man2/readahead.2:28
58 #: build/C/man2/remap_file_pages.2:28 build/C/man3/shm_open.3:26
59 #: build/C/man7/shm_overview.7:27 build/C/man2/shmctl.2:45
60 #: build/C/man2/shmget.2:38 build/C/man2/shmop.2:41
61 #: build/C/man2/subpage_prot.2:30 build/C/man2/sync_file_range.2:30
62 #, no-wrap
63 msgid "Linux Programmer's Manual"
64 msgstr "Linux Programmer's Manual"
65
66 #. type: SH
67 #: build/C/man2/alloc_hugepages.2:26 build/C/man3/alloca.3:44
68 #: build/C/man2/cacheflush.2:26 build/C/man2/fallocate.2:12
69 #: build/C/man2/madvise.2:36 build/C/man3/mallinfo.3:27
70 #: build/C/man3/malloc_get_state.3:26 build/C/man3/malloc_hook.3:11
71 #: build/C/man3/malloc_info.3:26 build/C/man3/malloc_stats.3:27
72 #: build/C/man3/malloc_trim.3:27 build/C/man3/malloc_usable_size.3:26
73 #: build/C/man3/mallopt.3:27 build/C/man3/mcheck.3:26 build/C/man2/mlock.2:27
74 #: build/C/man2/mmap.2:41 build/C/man2/mmap2.2:30 build/C/man2/mprotect.2:39
75 #: build/C/man2/mremap.2:31 build/C/man2/msync.2:26 build/C/man3/mtrace.3:26
76 #: build/C/man2/posix_fadvise.2:29 build/C/man3/posix_fallocate.3:26
77 #: build/C/man3/posix_memalign.3:30 build/C/man2/readahead.2:29
78 #: build/C/man2/remap_file_pages.2:29 build/C/man3/shm_open.3:27
79 #: build/C/man7/shm_overview.7:28 build/C/man2/shmctl.2:46
80 #: build/C/man2/shmget.2:39 build/C/man2/shmop.2:42
81 #: build/C/man2/subpage_prot.2:31 build/C/man2/sync_file_range.2:31
82 #, no-wrap
83 msgid "NAME"
84 msgstr "名前"
85
86 #. type: Plain text
87 #: build/C/man2/alloc_hugepages.2:28
88 msgid "alloc_hugepages, free_hugepages - allocate or free huge pages"
89 msgstr ""
90 "alloc_hugepages, free_hugepages - 大きなサイズのページの割り当てと解放を行う"
91
92 #. type: SH
93 #: build/C/man2/alloc_hugepages.2:28 build/C/man3/alloca.3:46
94 #: build/C/man2/cacheflush.2:28 build/C/man2/fallocate.2:14
95 #: build/C/man2/madvise.2:38 build/C/man3/mallinfo.3:29
96 #: build/C/man3/malloc_get_state.3:28 build/C/man3/malloc_hook.3:15
97 #: build/C/man3/malloc_info.3:28 build/C/man3/malloc_stats.3:29
98 #: build/C/man3/malloc_trim.3:29 build/C/man3/malloc_usable_size.3:28
99 #: build/C/man3/mallopt.3:29 build/C/man3/mcheck.3:28 build/C/man2/mlock.2:29
100 #: build/C/man2/mmap.2:43 build/C/man2/mmap2.2:32 build/C/man2/mprotect.2:41
101 #: build/C/man2/mremap.2:33 build/C/man2/msync.2:28 build/C/man3/mtrace.3:28
102 #: build/C/man2/posix_fadvise.2:31 build/C/man3/posix_fallocate.3:28
103 #: build/C/man3/posix_memalign.3:32 build/C/man2/readahead.2:31
104 #: build/C/man2/remap_file_pages.2:31 build/C/man3/shm_open.3:29
105 #: build/C/man2/shmctl.2:48 build/C/man2/shmget.2:41 build/C/man2/shmop.2:44
106 #: build/C/man2/subpage_prot.2:33 build/C/man2/sync_file_range.2:33
107 #, no-wrap
108 msgid "SYNOPSIS"
109 msgstr "書式"
110
111 #.  asmlinkage unsigned long sys_alloc_hugepages(int key, unsigned long addr,
112 #.  unsigned long len, int prot, int flag);
113 #. type: Plain text
114 #: build/C/man2/alloc_hugepages.2:34
115 #, no-wrap
116 msgid ""
117 "B<void *alloc_hugepages(int >I<key>B<, void *>I<addr>B<, size_t >I<len>B<,>\n"
118 "B<                      int >I<prot>B<, int >I<flag>B<);>\n"
119 msgstr ""
120 "B<void *alloc_hugepages(int >I<key>B<, void *>I<addr>B<, size_t >I<len>B<,>\n"
121 "B<                      int >I<prot>B<, int >I<flag>B<);>\n"
122
123 #.  asmlinkage int sys_free_hugepages(unsigned long addr);
124 #. type: Plain text
125 #: build/C/man2/alloc_hugepages.2:37
126 #, no-wrap
127 msgid "B<int free_hugepages(void *>I<addr>B<);>\n"
128 msgstr "B<int free_hugepages(void *>I<addr>B<);>\n"
129
130 #. type: SH
131 #: build/C/man2/alloc_hugepages.2:38 build/C/man3/alloca.3:50
132 #: build/C/man2/cacheflush.2:34 build/C/man2/fallocate.2:22
133 #: build/C/man2/madvise.2:50 build/C/man3/mallinfo.3:33
134 #: build/C/man3/malloc_get_state.3:36 build/C/man3/malloc_hook.3:33
135 #: build/C/man3/malloc_info.3:34 build/C/man3/malloc_stats.3:33
136 #: build/C/man3/malloc_trim.3:33 build/C/man3/malloc_usable_size.3:32
137 #: build/C/man3/mallopt.3:33 build/C/man3/mcheck.3:40 build/C/man2/mlock.2:39
138 #: build/C/man2/mmap.2:54 build/C/man2/mmap2.2:39 build/C/man2/mprotect.2:47
139 #: build/C/man2/mremap.2:42 build/C/man2/msync.2:32 build/C/man3/mtrace.3:34
140 #: build/C/man2/posix_fadvise.2:50 build/C/man3/posix_fallocate.3:46
141 #: build/C/man3/posix_memalign.3:84 build/C/man2/readahead.2:38
142 #: build/C/man2/remap_file_pages.2:39 build/C/man3/shm_open.3:41
143 #: build/C/man7/shm_overview.7:30 build/C/man2/shmctl.2:56
144 #: build/C/man2/shmget.2:49 build/C/man2/shmop.2:53
145 #: build/C/man2/subpage_prot.2:41 build/C/man2/sync_file_range.2:41
146 #, no-wrap
147 msgid "DESCRIPTION"
148 msgstr "説明"
149
150 #. type: Plain text
151 #: build/C/man2/alloc_hugepages.2:49
152 msgid ""
153 "The system calls B<alloc_hugepages>()  and B<free_hugepages>()  were "
154 "introduced in Linux 2.5.36 and removed again in 2.5.54.  They existed only "
155 "on i386 and ia64 (when built with B<CONFIG_HUGETLB_PAGE>).  In Linux 2.4.20 "
156 "the syscall numbers exist, but the calls fail with the error B<ENOSYS>."
157 msgstr ""
158 "システムコール B<alloc_hugepages>()  と B<free_hugepages>()  は Linux 2.5.36 "
159 "で導入され、2.5.54 で再び削除された。 これらのシステムコールは i386 と ia64 "
160 "のみで (かつ B<CONFIG_HUGETLB_PAGE> を指定してビルドされた場合に) 存在する。 "
161 "Linux 2.4.20 では syscall 番号が存在するが、 呼び出すとエラー B<ENOSYS> で失"
162 "敗する。"
163
164 #. type: Plain text
165 #: build/C/man2/alloc_hugepages.2:57
166 msgid ""
167 "On i386 the memory management hardware knows about ordinary pages (4 KiB)  "
168 "and huge pages (2 or 4 MiB).  Similarly ia64 knows about huge pages of "
169 "several sizes.  These system calls serve to map huge pages into the "
170 "process's memory or to free them again.  Huge pages are locked into memory, "
171 "and are not swapped."
172 msgstr ""
173 "i386 では、メモリ管理ハードウェアは通常のページ (4 KiB) と 大きなサイズのペー"
174 "ジ (以下、ヒュージページ; 2MiB または 4 MiB) を 扱うことができる。 同様に、"
175 "ia64 もいくつかのサイズのヒュージページを扱うことができる。 これらのシステム"
176 "コールは、ヒュージページをプロセスのメモリにマップしたり、 再び解放したりす"
177 "る。 ヒュージページはメモリ内にロックされ、スワップされない。"
178
179 #. type: Plain text
180 #: build/C/man2/alloc_hugepages.2:66
181 msgid ""
182 "The I<key> argument is an identifier.  When zero the pages are private, and "
183 "not inherited by children.  When positive the pages are shared with other "
184 "applications using the same I<key>, and inherited by child processes."
185 msgstr ""
186 "I<key> 引き数は識別子である。 0 の場合、ページは非公開になり、子プロセスに継"
187 "承されない。 正の場合、ページは同じ I<key> を使う他のアプリケーションと共有さ"
188 "れ、子プロセスに継承される。"
189
190 #. type: Plain text
191 #: build/C/man2/alloc_hugepages.2:81
192 msgid ""
193 "The I<addr> argument of B<free_hugepages>()  tells which page is being "
194 "freed: it was the return value of a call to B<alloc_hugepages>().  (The "
195 "memory is first actually freed when all users have released it.)  The "
196 "I<addr> argument of B<alloc_hugepages>()  is a hint, that the kernel may or "
197 "may not follow.  Addresses must be properly aligned."
198 msgstr ""
199 "B<free_hugepages>()  の I<addr> 引き数は、どのページを解放するかを指定する: "
200 "I<addr> は B<alloc_hugepages>()  の呼び出しの返り値である (全てのユーザがメモ"
201 "リを解放したときに、 そのメモリは初めて実際に解放される)。 B<alloc_hugepages>"
202 "()  の I<addr> 引き数はヒントであり、カーネルはそれに従うかもしれないし、 従"
203 "わないかもしれない。 アドレスは正しく配置されなければならない。"
204
205 #. type: Plain text
206 #: build/C/man2/alloc_hugepages.2:86
207 msgid ""
208 "The I<len> argument is the length of the required segment.  It must be a "
209 "multiple of the huge page size."
210 msgstr ""
211 "I<len> 引き数は要求されたセグメントの長さである。 これはヒュージページのサイ"
212 "ズの倍数にしなければならない。"
213
214 #. type: Plain text
215 #: build/C/man2/alloc_hugepages.2:94
216 msgid ""
217 "The I<prot> argument specifies the memory protection of the segment.  It is "
218 "one of B<PROT_READ>, B<PROT_WRITE>, B<PROT_EXEC>."
219 msgstr ""
220 "I<prot> 引き数はセグメントのメモリ保護を指定する。 これは B<PROT_READ>, "
221 "B<PROT_WRITE>, B<PROT_EXEC> のいずれかである。"
222
223 #. type: Plain text
224 #: build/C/man2/alloc_hugepages.2:109
225 msgid ""
226 "The I<flag> argument is ignored, unless I<key> is positive.  In that case, "
227 "if I<flag> is B<IPC_CREAT>, then a new huge page segment is created when "
228 "none with the given key existed.  If this flag is not set, then B<ENOENT> is "
229 "returned when no segment with the given key exists."
230 msgstr ""
231 "I<key> が正でない限り、 I<flag> 引き数は無視される。 I<key> が正で、かつ "
232 "I<flag> が B<IPC_CREAT> であり、かつ指定された I<key> で (セグメントが) 何も"
233 "存在しない場合、 新しいヒュージページセグメントが作成される。 I<flag> が設定"
234 "されておらず、かつ指定された I<key> のセグメントが存在しない場合、 B<ENOENT> "
235 "が返される。"
236
237 #. type: SH
238 #: build/C/man2/alloc_hugepages.2:109 build/C/man3/alloca.3:60
239 #: build/C/man2/cacheflush.2:53 build/C/man2/fallocate.2:127
240 #: build/C/man2/madvise.2:268 build/C/man3/malloc_get_state.3:61
241 #: build/C/man3/malloc_info.3:48 build/C/man3/malloc_trim.3:51
242 #: build/C/man3/malloc_usable_size.3:40 build/C/man3/mallopt.3:379
243 #: build/C/man3/mcheck.3:129 build/C/man2/mlock.2:116 build/C/man2/mmap.2:375
244 #: build/C/man2/mmap2.2:54 build/C/man2/mprotect.2:78
245 #: build/C/man2/mremap.2:127 build/C/man2/msync.2:68
246 #: build/C/man2/posix_fadvise.2:87 build/C/man3/posix_fallocate.3:66
247 #: build/C/man3/posix_memalign.3:142 build/C/man2/readahead.2:66
248 #: build/C/man2/remap_file_pages.2:124 build/C/man3/shm_open.3:171
249 #: build/C/man2/shmctl.2:283 build/C/man2/shmget.2:180
250 #: build/C/man2/shmop.2:171 build/C/man2/subpage_prot.2:66
251 #: build/C/man2/sync_file_range.2:141
252 #, no-wrap
253 msgid "RETURN VALUE"
254 msgstr "返り値"
255
256 #. type: Plain text
257 #: build/C/man2/alloc_hugepages.2:118
258 msgid ""
259 "On success, B<alloc_hugepages>()  returns the allocated virtual address, and "
260 "B<free_hugepages>()  returns zero.  On error, -1 is returned, and I<errno> "
261 "is set appropriately."
262 msgstr ""
263 "成功した場合、 B<alloc_hugepages>()  は割り当てられた仮想アドレスを返し、 "
264 "B<free_hugepages>()  は 0 を返す。 失敗した場合、-1 を返し、 I<errno> が適切"
265 "に設定される。"
266
267 #. type: SH
268 #: build/C/man2/alloc_hugepages.2:118 build/C/man2/cacheflush.2:59
269 #: build/C/man2/fallocate.2:134 build/C/man2/madvise.2:275
270 #: build/C/man3/malloc_info.3:55 build/C/man3/malloc_trim.3:56
271 #: build/C/man3/mallopt.3:384 build/C/man2/mlock.2:122 build/C/man2/mmap.2:392
272 #: build/C/man2/mmap2.2:61 build/C/man2/mprotect.2:85
273 #: build/C/man2/mremap.2:135 build/C/man2/msync.2:73
274 #: build/C/man2/posix_fadvise.2:90 build/C/man3/posix_fallocate.3:72
275 #: build/C/man3/posix_memalign.3:157 build/C/man2/readahead.2:72
276 #: build/C/man2/remap_file_pages.2:131 build/C/man3/shm_open.3:180
277 #: build/C/man2/shmctl.2:305 build/C/man2/shmget.2:185
278 #: build/C/man2/shmop.2:185 build/C/man2/subpage_prot.2:71
279 #: build/C/man2/sync_file_range.2:147
280 #, no-wrap
281 msgid "ERRORS"
282 msgstr "エラー"
283
284 #. type: TP
285 #: build/C/man2/alloc_hugepages.2:119 build/C/man2/fallocate.2:173
286 #, no-wrap
287 msgid "B<ENOSYS>"
288 msgstr "B<ENOSYS>"
289
290 #. type: Plain text
291 #: build/C/man2/alloc_hugepages.2:122
292 msgid "The system call is not supported on this kernel."
293 msgstr "このシステムコールはカーネルでサポートされていない。"
294
295 #. type: SH
296 #: build/C/man2/alloc_hugepages.2:122
297 #, no-wrap
298 msgid "FILES"
299 msgstr "ファイル"
300
301 #. type: Plain text
302 #: build/C/man2/alloc_hugepages.2:126
303 msgid ""
304 "I</proc/sys/vm/nr_hugepages> Number of configured hugetlb pages.  This can "
305 "be read and written."
306 msgstr ""
307 "I</proc/sys/vm/nr_hugepages> 設定された hugetlb ページの数。 このファイルは読"
308 "み書きできる。"
309
310 #. type: Plain text
311 #: build/C/man2/alloc_hugepages.2:130
312 msgid ""
313 "I</proc/meminfo> Gives info on the number of configured hugetlb pages and on "
314 "their size in the three variables HugePages_Total, HugePages_Free, "
315 "Hugepagesize."
316 msgstr ""
317 "I</proc/meminfo> 設定された hugetlb ページの数と、 3 つの変数 "
318 "HugePages_Total, HugePages_Free, Hugepagesize の サイズについての情報を提供す"
319 "る。"
320
321 #. type: SH
322 #: build/C/man2/alloc_hugepages.2:130 build/C/man3/alloca.3:70
323 #: build/C/man2/cacheflush.2:75 build/C/man2/fallocate.2:214
324 #: build/C/man2/madvise.2:325 build/C/man3/mallinfo.3:110
325 #: build/C/man3/malloc_get_state.3:86 build/C/man3/malloc_hook.3:80
326 #: build/C/man3/malloc_info.3:63 build/C/man3/malloc_stats.3:55
327 #: build/C/man3/malloc_trim.3:60 build/C/man3/malloc_usable_size.3:48
328 #: build/C/man3/mallopt.3:392 build/C/man3/mcheck.3:145
329 #: build/C/man2/mlock.2:186 build/C/man2/mmap.2:497 build/C/man2/mmap2.2:77
330 #: build/C/man2/mprotect.2:113 build/C/man2/mremap.2:185
331 #: build/C/man2/msync.2:96 build/C/man3/mtrace.3:78
332 #: build/C/man2/posix_fadvise.2:112 build/C/man3/posix_fallocate.3:103
333 #: build/C/man3/posix_memalign.3:182 build/C/man2/readahead.2:88
334 #: build/C/man2/remap_file_pages.2:153 build/C/man3/shm_open.3:251
335 #: build/C/man7/shm_overview.7:101 build/C/man2/shmctl.2:377
336 #: build/C/man2/shmget.2:232 build/C/man2/shmop.2:231
337 #: build/C/man2/subpage_prot.2:96 build/C/man2/sync_file_range.2:180
338 #, no-wrap
339 msgid "CONFORMING TO"
340 msgstr "準拠"
341
342 #. type: Plain text
343 #: build/C/man2/alloc_hugepages.2:133
344 msgid ""
345 "These calls are specific to Linux on Intel processors, and should not be "
346 "used in programs intended to be portable."
347 msgstr ""
348 "このシステムコールは Intel プロセッサ上の Linux に固有のものであり、 移植性が"
349 "必要なプログラムで使うべきでない。"
350
351 #. type: SH
352 #: build/C/man2/alloc_hugepages.2:133 build/C/man3/alloca.3:78
353 #: build/C/man2/madvise.2:347 build/C/man3/malloc_get_state.3:88
354 #: build/C/man3/malloc_hook.3:82 build/C/man3/malloc_info.3:65
355 #: build/C/man3/malloc_stats.3:57 build/C/man3/malloc_trim.3:62
356 #: build/C/man3/malloc_usable_size.3:50 build/C/man3/mcheck.3:147
357 #: build/C/man2/mlock.2:213 build/C/man2/mmap.2:515 build/C/man2/mmap2.2:79
358 #: build/C/man2/mprotect.2:122 build/C/man2/mremap.2:191
359 #: build/C/man3/mtrace.3:80 build/C/man2/posix_fadvise.2:121
360 #: build/C/man3/posix_memalign.3:221 build/C/man2/readahead.2:93
361 #: build/C/man3/shm_open.3:257 build/C/man7/shm_overview.7:103
362 #: build/C/man2/shmctl.2:382 build/C/man2/shmget.2:238
363 #: build/C/man2/shmop.2:250 build/C/man2/subpage_prot.2:98
364 #: build/C/man2/sync_file_range.2:183
365 #, no-wrap
366 msgid "NOTES"
367 msgstr "注意"
368
369 #. type: Plain text
370 #: build/C/man2/alloc_hugepages.2:141
371 msgid ""
372 "These system calls are gone; they existed only in Linux 2.5.36 through to "
373 "2.5.54.  Now the hugetlbfs filesystem can be used instead.  Memory backed by "
374 "huge pages (if the CPU supports them) is obtained by using B<mmap>(2)  to "
375 "map files in this virtual filesystem."
376 msgstr ""
377 "これらのシステムコールはなくなった。 これらは Linux 2.5.36 から 2.5.54 にのみ"
378 "存在する。 代わりに今は hugetlbfs ファイルシステムを使うことができる。 (CPU "
379 "がサポートしている場合) ヒュージページを持つメモリは、 B<mmap>(2)  を使ってこ"
380 "の仮想ファイルシステムでファイルをマップすることで取得できる。"
381
382 #. type: Plain text
383 #: build/C/man2/alloc_hugepages.2:145
384 msgid ""
385 "The maximal number of huge pages can be specified using the B<hugepages=> "
386 "boot parameter."
387 msgstr ""
388 "ヒュージページの最大数は、 B<hugepages=> 起動パラメータを使って指定できる。"
389
390 #. type: SH
391 #: build/C/man2/alloc_hugepages.2:150 build/C/man3/alloca.3:162
392 #: build/C/man2/cacheflush.2:89 build/C/man2/fallocate.2:222
393 #: build/C/man2/madvise.2:380 build/C/man3/mallinfo.3:279
394 #: build/C/man3/malloc_get_state.3:114 build/C/man3/malloc_hook.3:142
395 #: build/C/man3/malloc_info.3:262 build/C/man3/malloc_stats.3:67
396 #: build/C/man3/malloc_trim.3:82 build/C/man3/malloc_usable_size.3:64
397 #: build/C/man3/mallopt.3:580 build/C/man3/mcheck.3:208
398 #: build/C/man2/mlock.2:336 build/C/man2/mmap.2:737 build/C/man2/mmap2.2:101
399 #: build/C/man2/mprotect.2:229 build/C/man2/mremap.2:214
400 #: build/C/man2/msync.2:124 build/C/man3/mtrace.3:172
401 #: build/C/man2/posix_fadvise.2:197 build/C/man3/posix_fallocate.3:133
402 #: build/C/man3/posix_memalign.3:277 build/C/man2/readahead.2:113
403 #: build/C/man2/remap_file_pages.2:164 build/C/man3/shm_open.3:282
404 #: build/C/man7/shm_overview.7:127 build/C/man2/shmctl.2:435
405 #: build/C/man2/shmget.2:314 build/C/man2/shmop.2:295
406 #: build/C/man2/subpage_prot.2:134 build/C/man2/sync_file_range.2:226
407 #, no-wrap
408 msgid "COLOPHON"
409 msgstr "この文書について"
410
411 #. type: Plain text
412 #: build/C/man2/alloc_hugepages.2:157 build/C/man3/alloca.3:169
413 #: build/C/man2/cacheflush.2:96 build/C/man2/fallocate.2:229
414 #: build/C/man2/madvise.2:387 build/C/man3/mallinfo.3:286
415 #: build/C/man3/malloc_get_state.3:121 build/C/man3/malloc_hook.3:149
416 #: build/C/man3/malloc_info.3:269 build/C/man3/malloc_stats.3:74
417 #: build/C/man3/malloc_trim.3:89 build/C/man3/malloc_usable_size.3:71
418 #: build/C/man3/mallopt.3:587 build/C/man3/mcheck.3:215
419 #: build/C/man2/mlock.2:343 build/C/man2/mmap.2:744 build/C/man2/mmap2.2:108
420 #: build/C/man2/mprotect.2:236 build/C/man2/mremap.2:221
421 #: build/C/man2/msync.2:131 build/C/man3/mtrace.3:179
422 #: build/C/man2/posix_fadvise.2:204 build/C/man3/posix_fallocate.3:140
423 #: build/C/man3/posix_memalign.3:284 build/C/man2/readahead.2:120
424 #: build/C/man2/remap_file_pages.2:171 build/C/man3/shm_open.3:289
425 #: build/C/man7/shm_overview.7:134 build/C/man2/shmctl.2:442
426 #: build/C/man2/shmget.2:321 build/C/man2/shmop.2:302
427 #: build/C/man2/subpage_prot.2:141 build/C/man2/sync_file_range.2:233
428 msgid ""
429 "This page is part of release 3.63 of the Linux I<man-pages> project.  A "
430 "description of the project, and information about reporting bugs, can be "
431 "found at \\%http://www.kernel.org/doc/man-pages/."
432 msgstr ""
433 "この man ページは Linux I<man-pages> プロジェクトのリリース 3.63 の一部\n"
434 "である。プロジェクトの説明とバグ報告に関する情報は\n"
435 "http://www.kernel.org/doc/man-pages/ に書かれている。"
436
437 #. type: TH
438 #: build/C/man3/alloca.3:43
439 #, no-wrap
440 msgid "ALLOCA"
441 msgstr "ALLOCA"
442
443 #. type: TH
444 #: build/C/man3/alloca.3:43
445 #, fuzzy, no-wrap
446 #| msgid "2013-06-10"
447 msgid "2013-10-07"
448 msgstr "2013-06-10"
449
450 #. type: TH
451 #: build/C/man3/alloca.3:43 build/C/man3/malloc_get_state.3:25
452 #: build/C/man3/malloc_hook.3:10 build/C/man3/malloc_info.3:25
453 #: build/C/man3/malloc_usable_size.3:25 build/C/man3/mcheck.3:25
454 #: build/C/man3/mtrace.3:25 build/C/man3/posix_fallocate.3:25
455 #: build/C/man3/posix_memalign.3:29
456 #, no-wrap
457 msgid "GNU"
458 msgstr "GNU"
459
460 #. type: Plain text
461 #: build/C/man3/alloca.3:46
462 msgid "alloca - allocate memory that is automatically freed"
463 msgstr "alloca - 自動的に解放されるメモリを割り当てる"
464
465 #. type: Plain text
466 #: build/C/man3/alloca.3:48
467 msgid "B<#include E<lt>alloca.hE<gt>>"
468 msgstr "B<#include E<lt>alloca.hE<gt>>"
469
470 #. type: Plain text
471 #: build/C/man3/alloca.3:50
472 msgid "B<void *alloca(size_t >I<size>B<);>"
473 msgstr "B<void *alloca(size_t >I<size>B<);>"
474
475 #. type: Plain text
476 #: build/C/man3/alloca.3:60
477 msgid ""
478 "The B<alloca>()  function allocates I<size> bytes of space in the stack "
479 "frame of the caller.  This temporary space is automatically freed when the "
480 "function that called B<alloca>()  returns to its caller."
481 msgstr ""
482 "B<alloca>()  関数は、 I<size> バイトの領域を呼出元のスタック・フレームに割り"
483 "付ける。 この一時的な領域は、 B<alloca>()  を呼び出した関数が呼出元に返るとき"
484 "に自動的に解放される。"
485
486 #. type: Plain text
487 #: build/C/man3/alloca.3:65
488 msgid ""
489 "The B<alloca>()  function returns a pointer to the beginning of the "
490 "allocated space.  If the allocation causes stack overflow, program behavior "
491 "is undefined."
492 msgstr ""
493 "B<alloca>()  関数は、割り付けた領域の始まりを指すポインタを返す。 割り付けに"
494 "よってスタックオーバーフローが起った場合の プログラムの動作は定義されていな"
495 "い。"
496
497 #. type: SH
498 #: build/C/man3/alloca.3:65
499 #, no-wrap
500 msgid "ATTRIBUTES"
501 msgstr ""
502
503 #. type: SS
504 #: build/C/man3/alloca.3:66
505 #, no-wrap
506 msgid "Multithreading (see pthreads(7))"
507 msgstr ""
508
509 #. type: Plain text
510 #: build/C/man3/alloca.3:70
511 msgid "The B<alloca>()  function is thread-safe."
512 msgstr ""
513
514 #. type: Plain text
515 #: build/C/man3/alloca.3:72
516 msgid "This function is not in POSIX.1-2001."
517 msgstr "この関数は POSIX.1-2001 にはない。"
518
519 #. type: Plain text
520 #: build/C/man3/alloca.3:78
521 msgid ""
522 "There is evidence that the B<alloca>()  function appeared in 32V, PWB, "
523 "PWB.2, 3BSD, and 4BSD.  There is a man page for it in 4.3BSD.  Linux uses "
524 "the GNU version."
525 msgstr ""
526 "32V, PWB, PWB.2, 3BSD, 4BSD に B<alloca>()  関数が登場した証拠がある。 "
527 "4.3BSD には、マニュアルページがある。 Linux は、GNU 版を使っている。 この関数"
528 "は POSIX.1-2001 にはない。"
529
530 #. type: Plain text
531 #: build/C/man3/alloca.3:93
532 msgid ""
533 "The B<alloca>()  function is machine- and compiler-dependent.  For certain "
534 "applications, its use can improve efficiency compared to the use of B<malloc>"
535 "(3)  plus B<free>(3).  In certain cases, it can also simplify memory "
536 "deallocation in applications that use B<longjmp>(3)  or B<siglongjmp>(3).  "
537 "Otherwise, its use is discouraged."
538 msgstr ""
539 "B<alloca>()  関数は、機種とコンパイラに依存する。 特定のアプリケーションで"
540 "は、この関数を使うと B<malloc>(3)  と B<free>(3)  を組み合わせて使った場合に"
541 "比べて効率を改善することができる。 特定の場合では、この関数を使うことで、 "
542 "B<longjmp>(3)  や B<siglongjmp>(3)  を使うアプリケーションでのメモリの開放を"
543 "簡単にすることができる。 それ以外の場合では、この関数の使用は推奨されない。"
544
545 #. type: Plain text
546 #: build/C/man3/alloca.3:102
547 msgid ""
548 "Because the space allocated by B<alloca>()  is allocated within the stack "
549 "frame, that space is automatically freed if the function return is jumped "
550 "over by a call to B<longjmp>(3)  or B<siglongjmp>(3)."
551 msgstr ""
552 "B<alloca>()  により割り当てられる空間はスタックフレームから割り当てらるの"
553 "で、 関数の戻り先が B<longjmp>(3)  や B<siglongjmp>(3)  の呼び出しによりジャ"
554 "ンプした場合には、 割り当てられた空間は自動的に解放される。"
555
556 #. type: Plain text
557 #: build/C/man3/alloca.3:107
558 msgid "Do not attempt to B<free>(3)  space allocated by B<alloca>()!"
559 msgstr ""
560 "B<alloca>()  で割り当てられた空間を B<free>(3)  しようとすることのないよう"
561 "に!"
562
563 #. type: SS
564 #: build/C/man3/alloca.3:107
565 #, no-wrap
566 msgid "Notes on the GNU version"
567 msgstr "GNU 版についての注意"
568
569 #. type: Plain text
570 #: build/C/man3/alloca.3:129
571 msgid ""
572 "Normally, B<gcc>(1)  translates calls to B<alloca>()  with inlined code.  "
573 "This is not done when either the I<-ansi>, I<-std=c89>, I<-std=c99>, or the "
574 "I<-std=c11> option is given B<and> the header I<E<lt>alloca.hE<gt>> is not "
575 "included.  Otherwise (without an -ansi or -std=c* option) the glibc version "
576 "of I<E<lt>stdlib.hE<gt>> includes I<E<lt>alloca.hE<gt>> and that contains "
577 "the lines:"
578 msgstr ""
579 "通常 B<gcc>(1) は B<alloca>()  の呼び出しをインラインコードに変換する。 I<-"
580 "ansi>, I<-std=c89>, I<-std=c99>, I<-std=c11> のいずれかのオプションが指定さ"
581 "れ、B<かつ> I<E<lt>alloca.hE<gt>> がインクルードされていない場合、 この変換は"
582 "行われない。 それ以外の場合 (-ansi オプションも -std=c* オプションも指定され"
583 "ない場合) には、 glibc 版の I<E<lt>stdlib.hE<gt>> は I<E<lt>alloca.hE<gt>> を"
584 "インクルードするが、このファイルには以下の行が含まれており、"
585
586 #. type: Plain text
587 #: build/C/man3/alloca.3:134
588 #, no-wrap
589 msgid ""
590 "    #ifdef  __GNUC__\n"
591 "    #define alloca(size)   __builtin_alloca (size)\n"
592 "    #endif\n"
593 msgstr ""
594 "    #ifdef  __GNUC__\n"
595 "    #define alloca(size)   __builtin_alloca (size)\n"
596 "    #endif\n"
597
598 #. type: Plain text
599 #: build/C/man3/alloca.3:137
600 msgid "with messy consequences if one has a private version of this function."
601 msgstr "独自版の __builtin_alloca (size) 関数がある場合、厄介な結果になる。"
602
603 #. type: Plain text
604 #: build/C/man3/alloca.3:141
605 msgid ""
606 "The fact that the code is inlined means that it is impossible to take the "
607 "address of this function, or to change its behavior by linking with a "
608 "different library."
609 msgstr ""
610 "このコードはインライン化されているので、 この関数のアドレスを取得したり、 他"
611 "のライブラリをリンクして動作を変更することはできない。"
612
613 #. type: Plain text
614 #: build/C/man3/alloca.3:145
615 msgid ""
616 "The inlined code often consists of a single instruction adjusting the stack "
617 "pointer, and does not check for stack overflow.  Thus, there is no NULL "
618 "error return."
619 msgstr ""
620 "通常このインラインコードはスタックポインタを移動する 1 つの命令 "
621 "(instruction) から構成されており、 スタックオーバーフローをチェックしない。 "
622 "よって NULL エラーが返されることはない。"
623
624 #. type: SH
625 #: build/C/man3/alloca.3:145 build/C/man2/cacheflush.2:82
626 #: build/C/man3/mallinfo.3:114 build/C/man3/mallopt.3:406
627 #: build/C/man2/mlock.2:304 build/C/man2/mmap.2:587 build/C/man3/mtrace.3:102
628 #: build/C/man2/posix_fadvise.2:186 build/C/man2/readahead.2:98
629 #: build/C/man2/shmget.2:300
630 #, no-wrap
631 msgid "BUGS"
632 msgstr "バグ"
633
634 #. type: Plain text
635 #: build/C/man3/alloca.3:150
636 msgid ""
637 "There is no error indication if the stack frame cannot be extended.  "
638 "(However, after a failed allocation, the program is likely to receive a "
639 "B<SIGSEGV> signal if it attempts to access the unallocated space.)"
640 msgstr ""
641 "スタックフレームが拡張できなかった場合、エラー通知は行われない。 (しかしなが"
642 "ら、割り当てに失敗した後で、プログラムが割り当てられなかった 空間にアクセスし"
643 "ようとした場合に B<SIGSEGV> シグナルを受信することだろう。)"
644
645 #. type: Plain text
646 #: build/C/man3/alloca.3:158
647 msgid ""
648 "On many systems B<alloca>()  cannot be used inside the list of arguments of "
649 "a function call, because the stack space reserved by B<alloca>()  would "
650 "appear on the stack in the middle of the space for the function arguments."
651 msgstr ""
652 "多くのシステムにおいて、関数コールの引き数のリスト内では B<alloca>()  が使え"
653 "ない。 これは、 B<alloca>()  によって予約されるスタック領域が、 関数引き数に"
654 "使われるスタック領域の中に現れてしまうためである。"
655
656 #. type: SH
657 #: build/C/man3/alloca.3:158 build/C/man2/fallocate.2:217
658 #: build/C/man2/madvise.2:372 build/C/man3/mallinfo.3:270
659 #: build/C/man3/malloc_get_state.3:111 build/C/man3/malloc_hook.3:137
660 #: build/C/man3/malloc_info.3:256 build/C/man3/malloc_stats.3:61
661 #: build/C/man3/malloc_trim.3:78 build/C/man3/malloc_usable_size.3:62
662 #: build/C/man3/mallopt.3:566 build/C/man3/mcheck.3:204
663 #: build/C/man2/mlock.2:329 build/C/man2/mmap.2:712 build/C/man2/mmap2.2:95
664 #: build/C/man2/mprotect.2:226 build/C/man2/mremap.2:199
665 #: build/C/man2/msync.2:120 build/C/man3/mtrace.3:167
666 #: build/C/man2/posix_fadvise.2:191 build/C/man3/posix_fallocate.3:128
667 #: build/C/man3/posix_memalign.3:272 build/C/man2/readahead.2:107
668 #: build/C/man2/remap_file_pages.2:157 build/C/man3/shm_open.3:271
669 #: build/C/man7/shm_overview.7:114 build/C/man2/shmctl.2:428
670 #: build/C/man2/shmget.2:306 build/C/man2/shmop.2:287
671 #: build/C/man2/subpage_prot.2:128 build/C/man2/sync_file_range.2:221
672 #, no-wrap
673 msgid "SEE ALSO"
674 msgstr "関連項目"
675
676 #. type: Plain text
677 #: build/C/man3/alloca.3:162
678 msgid "B<brk>(2), B<longjmp>(3), B<malloc>(3)"
679 msgstr "B<brk>(2), B<longjmp>(3), B<malloc>(3)"
680
681 #. type: TH
682 #: build/C/man2/cacheflush.2:25
683 #, no-wrap
684 msgid "CACHEFLUSH"
685 msgstr "CACHEFLUSH"
686
687 #. type: TH
688 #: build/C/man2/cacheflush.2:25
689 #, no-wrap
690 msgid "2007-05-26"
691 msgstr "2007-05-26"
692
693 #. type: Plain text
694 #: build/C/man2/cacheflush.2:28
695 msgid "cacheflush - flush contents of instruction and/or data cache"
696 msgstr "cacheflush - 命令キャッシュやデータキャッシュの内容をフラッシュする"
697
698 #. type: Plain text
699 #: build/C/man2/cacheflush.2:31
700 #, no-wrap
701 msgid "B<#include E<lt>asm/cachectl.hE<gt>>\n"
702 msgstr "B<#include E<lt>asm/cachectl.hE<gt>>\n"
703
704 #. type: Plain text
705 #: build/C/man2/cacheflush.2:33
706 #, no-wrap
707 msgid "B<int cacheflush(char *>I<addr>B<, int >I<nbytes>B<, int >I<cache>B<);>\n"
708 msgstr "B<int cacheflush(char *>I<addr>B<, int >I<nbytes>B<, int >I<cache>B<);>\n"
709
710 #. type: Plain text
711 #: build/C/man2/cacheflush.2:43
712 msgid ""
713 "B<cacheflush>()  flushes the contents of the indicated cache(s) for the user "
714 "addresses in the range I<addr> to I<(addr+nbytes-1)>.  I<cache> may be one "
715 "of:"
716 msgstr ""
717 "B<cacheflush>()  は I<addr> から I<(addr+nbytes-1)> の範囲のユーザアドレスに"
718 "対応する 指定されたキャッシュをフラッシュする。 I<cache> には以下のいずれかを"
719 "指定する:"
720
721 #. type: TP
722 #: build/C/man2/cacheflush.2:43
723 #, no-wrap
724 msgid "B<ICACHE>"
725 msgstr "B<ICACHE>"
726
727 #. type: Plain text
728 #: build/C/man2/cacheflush.2:46
729 msgid "Flush the instruction cache."
730 msgstr "命令 (instruction) キャッシュをフラッシュする。"
731
732 #. type: TP
733 #: build/C/man2/cacheflush.2:46
734 #, no-wrap
735 msgid "B<DCACHE>"
736 msgstr "B<DCACHE>"
737
738 #. type: Plain text
739 #: build/C/man2/cacheflush.2:49
740 msgid "Write back to memory and invalidate the affected valid cache lines."
741 msgstr "変更があったキャッシュラインをメモリに書き戻し、無効にする。"
742
743 #. type: TP
744 #: build/C/man2/cacheflush.2:49
745 #, no-wrap
746 msgid "B<BCACHE>"
747 msgstr "B<BCACHE>"
748
749 #. type: Plain text
750 #: build/C/man2/cacheflush.2:53
751 msgid "Same as B<(ICACHE|DCACHE)>."
752 msgstr "B<(ICACHE|DCACHE)> と同じ。"
753
754 #. type: Plain text
755 #: build/C/man2/cacheflush.2:59
756 msgid ""
757 "B<cacheflush>()  returns 0 on success or -1 on error.  If errors are "
758 "detected, I<errno> will indicate the error."
759 msgstr ""
760 "B<cacheflush>()  は成功した場合は 0 を、失敗した場合は -1 を返す。エラーが検"
761 "出された場合は I<errno> にエラーが指示される。"
762
763 #. type: TP
764 #: build/C/man2/cacheflush.2:60 build/C/man2/mmap2.2:62
765 #: build/C/man2/mremap.2:142 build/C/man2/shmctl.2:314
766 #: build/C/man2/subpage_prot.2:72
767 #, no-wrap
768 msgid "B<EFAULT>"
769 msgstr "B<EFAULT>"
770
771 #. type: Plain text
772 #: build/C/man2/cacheflush.2:67
773 msgid ""
774 "Some or all of the address range I<addr> to I<(addr+nbytes-1)> is not "
775 "accessible."
776 msgstr ""
777 "I<addr> から I<(addr+nbytes-1)> の範囲のアドレスの全てまたは一部が アクセス可"
778 "能ではない。"
779
780 #. type: TP
781 #: build/C/man2/cacheflush.2:67 build/C/man2/fallocate.2:146
782 #: build/C/man2/madvise.2:282 build/C/man3/malloc_info.3:56
783 #: build/C/man2/mlock.2:157 build/C/man2/mlock.2:164 build/C/man2/mlock.2:176
784 #: build/C/man2/mmap.2:423 build/C/man2/mmap.2:431 build/C/man2/mmap.2:436
785 #: build/C/man2/mmap2.2:65 build/C/man2/mprotect.2:95
786 #: build/C/man2/mremap.2:151 build/C/man2/msync.2:80
787 #: build/C/man2/posix_fadvise.2:94 build/C/man3/posix_fallocate.3:81
788 #: build/C/man3/posix_memalign.3:158 build/C/man2/readahead.2:77
789 #: build/C/man2/remap_file_pages.2:132 build/C/man2/remap_file_pages.2:139
790 #: build/C/man3/shm_open.3:213 build/C/man2/shmctl.2:328
791 #: build/C/man2/shmget.2:199 build/C/man2/shmop.2:200 build/C/man2/shmop.2:223
792 #: build/C/man2/subpage_prot.2:77 build/C/man2/sync_file_range.2:152
793 #, no-wrap
794 msgid "B<EINVAL>"
795 msgstr "B<EINVAL>"
796
797 #. type: Plain text
798 #: build/C/man2/cacheflush.2:75
799 msgid "I<cache> is not one of B<ICACHE>, B<DCACHE>, or B<BCACHE>."
800 msgstr "I<cache> パラメータが B<ICACHE>, B<DCACHE>, B<BCACHE> のどれでもない。"
801
802 #.  FIXME This system call was only on MIPS back in 1.2 days, but
803 #.  by now it is on a number of other architectures (but not i386).
804 #.  Investigate the details and update this page.
805 #.  Irix 6.5 appears to have a cacheflush() syscall -- mtk
806 #. type: Plain text
807 #: build/C/man2/cacheflush.2:82
808 msgid ""
809 "This Linux-specific system call is available only on MIPS-based systems.  It "
810 "should not be used in programs intended to be portable."
811 msgstr ""
812 "この Linux 特有のシステムコールは MIPS ベースのシステムでのみ有効である。 移"
813 "植を意図したプログラムで使用すべきではない。"
814
815 #. type: Plain text
816 #: build/C/man2/cacheflush.2:89
817 msgid ""
818 "The current implementation ignores the I<addr> and I<nbytes> arguments.  "
819 "Therefore, the whole cache is always flushed."
820 msgstr ""
821 "現在の実装では、引き数 I<addr> と I<nbytes> は無視される。そのため、 常に全て"
822 "のキャッシュがフラッシュされる。"
823
824 #. type: TH
825 #: build/C/man2/fallocate.2:11
826 #, no-wrap
827 msgid "FALLOCATE"
828 msgstr "FALLOCATE"
829
830 #. type: TH
831 #: build/C/man2/fallocate.2:11
832 #, fuzzy, no-wrap
833 #| msgid "2008-01-24"
834 msgid "2014-01-24"
835 msgstr "2008-01-24"
836
837 #. type: Plain text
838 #: build/C/man2/fallocate.2:14
839 msgid "fallocate - manipulate file space"
840 msgstr "fallocate - ファイル空間の操作"
841
842 #. type: Plain text
843 #: build/C/man2/fallocate.2:18 build/C/man2/readahead.2:35
844 #, no-wrap
845 msgid ""
846 "B<#define _GNU_SOURCE>             /* See feature_test_macros(7) */\n"
847 "B<#include E<lt>fcntl.hE<gt>>\n"
848 msgstr ""
849 "B<#define _GNU_SOURCE>             /* feature_test_macros(7) 参照 */\n"
850 "B<#include E<lt>fcntl.hE<gt>>\n"
851
852 #. type: Plain text
853 #: build/C/man2/fallocate.2:21
854 #, no-wrap
855 msgid "B<int fallocate(int >I<fd>B<, int >I<mode>B<, off_t >I<offset>B<, off_t >I<len>B<);>\n"
856 msgstr "B<int fallocate(int >I<fd>B<, int >I<mode>B<, off_t >I<offset>B<, off_t >I<len>B<);>\n"
857
858 #. type: Plain text
859 #: build/C/man2/fallocate.2:27
860 msgid ""
861 "This is a nonportable, Linux-specific system call.  For the portable, "
862 "POSIX.1-specified method of ensuring that space is allocated for a file, see "
863 "B<posix_fallocate>(3)."
864 msgstr ""
865 "このシステムコールは、移植性のない、Linux 固有のシステムコールである。 移植性"
866 "が必要な場合は、ファイルに対してディスク空間を確実に確保するために、 POSIX.1 "
867 "で規定された方法である B<posix_fallocate>(3)  を使うこと。"
868
869 #. type: Plain text
870 #: build/C/man2/fallocate.2:37
871 msgid ""
872 "B<fallocate>()  allows the caller to directly manipulate the allocated disk "
873 "space for the file referred to by I<fd> for the byte range starting at "
874 "I<offset> and continuing for I<len> bytes."
875 msgstr ""
876 "B<fallocate>()  を使うと、 I<fd> が参照するファイルに割り当てられたディスク空"
877 "間を直接操作できる。 操作対象は、 I<offset> から始まる長さ I<len> バイトの領"
878 "域である。"
879
880 #. type: Plain text
881 #: build/C/man2/fallocate.2:42
882 msgid ""
883 "The I<mode> argument determines the operation to be performed on the given "
884 "range.  Details of the supported operations are given in the subsections "
885 "below."
886 msgstr ""
887 "I<mode> 引き数は、指定された領域に対して実行する操作を指定する。\n"
888 "サポートされている操作の詳細は以下のサブセクションで説明する。"
889
890 #. type: SS
891 #: build/C/man2/fallocate.2:42
892 #, no-wrap
893 msgid "Allocating disk space"
894 msgstr "ディスク領域の割り当て"
895
896 #. type: Plain text
897 #: build/C/man2/fallocate.2:65
898 #, fuzzy
899 #| msgid ""
900 #| "The default operation (i.e., I<mode> is zero) of B<fallocate>()  "
901 #| "allocates and initializes to zero the disk space within the range "
902 #| "specified by I<offset> and I<len>.  The file size (as reported by B<stat>"
903 #| "(2))  will be changed if I<offset>+I<len> is greater than the file size.  "
904 #| "This default behavior closely resembles the behavior of the "
905 #| "B<posix_fallocate>(3)  library function, and is intended as a method of "
906 #| "optimally implementing that function."
907 msgid ""
908 "The default operation (i.e., I<mode> is zero) of B<fallocate>()  allocates "
909 "the disk space within the range specified by I<offset> and I<len>.  The file "
910 "size (as reported by B<stat>(2))  will be changed if I<offset>+I<len> is "
911 "greater than the file size.  Any subregion within the range specified by "
912 "I<offset> and I<len> that did not contain data before the call will be "
913 "initialized to zero.  This default behavior closely resembles the behavior "
914 "of the B<posix_fallocate>(3)  library function, and is intended as a method "
915 "of optimally implementing that function."
916 msgstr ""
917 "B<fallocate>() のデフォルトの動作 (つまり I<mode> が 0 の場合) は、\n"
918 "I<offset> と I<len> で指定された範囲のディスク領域の割り当てと初期化を行"
919 "う。\n"
920 "I<offset>+I<len> がファイルサイズよりも大きかった場合、\n"
921 "(B<stat>(2) で報告される) ファイルサイズが変更される。このデフォルトの動作"
922 "は、\n"
923 "ライブラリ関数 B<posix_fallocate>(3) の動作と非常に似ている。これは、\n"
924 "このシステムコールが B<posix_fallocate>(3) を最適に実装する手段を提供する\n"
925 "ことを目的としているからである。"
926
927 #. type: Plain text
928 #: build/C/man2/fallocate.2:71
929 msgid ""
930 "After a successful call, subsequent writes into the range specified by "
931 "I<offset> and I<len> are guaranteed not to fail because of lack of disk "
932 "space."
933 msgstr ""
934 "呼び出しが成功した場合、\n"
935 "I<offset> と I<len> で指定された範囲へのそれ以降の書き込みでは、\n"
936 "ディスクの領域不足での書き込み失敗が起こらないことが保証される。"
937
938 #. type: Plain text
939 #: build/C/man2/fallocate.2:82
940 msgid ""
941 "If the B<FALLOC_FL_KEEP_SIZE> flag is specified in I<mode>, the behavior of "
942 "the call is similar, but the file size will not be changed even if I<offset>"
943 "+I<len> is greater than the file size.  Preallocating zeroed blocks beyond "
944 "the end of the file in this manner is useful for optimizing append workloads."
945 msgstr ""
946 "B<FALLOC_FL_KEEP_SIZE> フラグが I<mode> に指定された場合、このシステムコー"
947 "ル\n"
948 "の動作は似ているが、 I<offset>+I<len> がファイルサイズよりも大きい場合で\n"
949 "あってもファイルサイズは変更されない点が異なる。この場合のファイルの末尾\n"
950 "よりも後ろの前もって割り当てられた 0 で埋められたブロックは、ファイルへの\n"
951 "追記を最適化したい場合に役に立つ。"
952
953 #. type: Plain text
954 #: build/C/man2/fallocate.2:86
955 msgid ""
956 "Because allocation is done in block size chunks, B<fallocate>()  may "
957 "allocate a larger range of disk space than was specified."
958 msgstr ""
959 "割り当てはブロックサイズ単位で行われるため、 B<fallocate>() は指定されたよ"
960 "り\n"
961 "も大きなディスク領域を割り当てることがある。"
962
963 #. type: SS
964 #: build/C/man2/fallocate.2:86
965 #, no-wrap
966 msgid "Deallocating file space"
967 msgstr "ファイル空間の割り当て解除"
968
969 #. type: Plain text
970 #: build/C/man2/fallocate.2:101
971 msgid ""
972 "Specifying the B<FALLOC_FL_PUNCH_HOLE> flag (available since Linux 2.6.38) "
973 "in I<mode> deallocates space (i.e., creates a hole)  in the byte range "
974 "starting at I<offset> and continuing for I<len> bytes.  Within the specified "
975 "range, partial filesystem blocks are zeroed, and whole filesystem blocks are "
976 "removed from the file.  After a successful call, subsequent reads from this "
977 "range will return zeroes."
978 msgstr ""
979 "B<FALLOC_FL_PUNCH_HOLE> フラグ (Linux 2.6.38 以降で利用可能) を I<mode> に指"
980 "定すると、 I<offset> で始まる I<len> バイトの領域の空間を解放する (ホールを作"
981 "成する)。 指定された範囲のうち、 部分的に使用しているファイルシステムブロック"
982 "は 0 で埋められ、 全体を使用しているファイルシステムブロックはそのファイルか"
983 "ら削除される。 呼び出しが成功すると、 これ以降のこの範囲からの読み出しでは 0 "
984 "を返す。"
985
986 #. type: Plain text
987 #: build/C/man2/fallocate.2:112
988 msgid ""
989 "The B<FALLOC_FL_PUNCH_HOLE> flag must be ORed with B<FALLOC_FL_KEEP_SIZE> in "
990 "I<mode>; in other words, even when punching off the end of the file, the "
991 "file size (as reported by B<stat>(2))  does not change."
992 msgstr ""
993 "B<FALLOC_FL_PUNCH_HOLE> フラグは B<FALLOC_FL_KEEP_SIZE> と論理和 (OR) をとっ"
994 "て I<mode> に指定しなければならない。 つまり、 ファイル末尾の punch off を"
995 "行った場合でも、 (B<stat>(2) で報告される) ファイルサイズが変化しない。"
996
997 #. type: Plain text
998 #: build/C/man2/fallocate.2:117
999 #, fuzzy
1000 #| msgid ""
1001 #| "Not all filesystems support B<FALLOC_FL_PUNCH_HOLE>; if a filesystem "
1002 #| "doesn't support the operation, an error is returned."
1003 msgid ""
1004 "Not all filesystems support B<FALLOC_FL_PUNCH_HOLE>; if a filesystem doesn't "
1005 "support the operation, an error is returned.  The operation is supported on "
1006 "at least the following filesystems"
1007 msgstr ""
1008 "すべてのファイルシステムで B<FALLOC_FL_PUNCH_HOLE> がサポートされているわけで"
1009 "はない。 ファイルシステムがこの操作をサポートしていない場合は、 エラーが返"
1010 "る。"
1011
1012 #. type: IP
1013 #: build/C/man2/fallocate.2:117 build/C/man2/fallocate.2:119
1014 #: build/C/man2/fallocate.2:122 build/C/man2/fallocate.2:124
1015 #: build/C/man2/madvise.2:286 build/C/man2/madvise.2:292
1016 #: build/C/man2/madvise.2:295 build/C/man2/madvise.2:298
1017 #: build/C/man2/madvise.2:301 build/C/man3/mallopt.3:235
1018 #: build/C/man3/mallopt.3:241
1019 #, no-wrap
1020 msgid "*"
1021 msgstr "*"
1022
1023 #. type: Plain text
1024 #: build/C/man2/fallocate.2:119
1025 #, fuzzy
1026 #| msgid "B<MAP_STACK> (since Linux 2.6.27)"
1027 msgid "XFS (since Linux 2.6.38)"
1028 msgstr "B<MAP_STACK> (Linux 2.6.27 以降)"
1029
1030 #.  commit a4bb6b64e39abc0e41ca077725f2a72c868e7622
1031 #. type: Plain text
1032 #: build/C/man2/fallocate.2:122
1033 #, fuzzy
1034 #| msgid "B<MADV_DODUMP> (since Linux 3.4)"
1035 msgid "ext4 (since Linux 3.0)"
1036 msgstr "B<MADV_DODUMP> (Linux 3.4 以降)"
1037
1038 #. type: Plain text
1039 #: build/C/man2/fallocate.2:124
1040 #, fuzzy
1041 #| msgid "B<MADV_DODUMP> (since Linux 3.4)"
1042 msgid "Btrfs (since Linux 3.7)"
1043 msgstr "B<MADV_DODUMP> (Linux 3.4 以降)"
1044
1045 #.  commit 83e4fa9c16e4af7122e31be3eca5d57881d236fe
1046 #. type: Plain text
1047 #: build/C/man2/fallocate.2:127
1048 #, fuzzy
1049 #| msgid "B<MADV_DODUMP> (since Linux 3.4)"
1050 msgid "tmpfs (since Linux 3.5)"
1051 msgstr "B<MADV_DODUMP> (Linux 3.4 以降)"
1052
1053 #. type: Plain text
1054 #: build/C/man2/fallocate.2:134
1055 msgid ""
1056 "On success, B<fallocate>()  returns zero.  On error, -1 is returned and "
1057 "I<errno> is set to indicate the error."
1058 msgstr ""
1059 "成功の場合、 B<fallocate>() は 0 を返す。 エラーの場合、-1 を返し、 I<error> "
1060 "にエラーを示す値を設定する。"
1061
1062 #. type: TP
1063 #: build/C/man2/fallocate.2:135 build/C/man2/madvise.2:279
1064 #: build/C/man2/mmap.2:417 build/C/man2/posix_fadvise.2:91
1065 #: build/C/man3/posix_fallocate.3:73 build/C/man2/readahead.2:73
1066 #: build/C/man2/sync_file_range.2:148
1067 #, no-wrap
1068 msgid "B<EBADF>"
1069 msgstr "B<EBADF>"
1070
1071 #. type: Plain text
1072 #: build/C/man2/fallocate.2:139 build/C/man3/posix_fallocate.3:77
1073 msgid "I<fd> is not a valid file descriptor, or is not opened for writing."
1074 msgstr ""
1075 "I<fd> が有効なファイルディスクリプタでないか、 書き込み用としてオープンされて"
1076 "いない。"
1077
1078 #. type: TP
1079 #: build/C/man2/fallocate.2:139 build/C/man3/posix_fallocate.3:77
1080 #, no-wrap
1081 msgid "B<EFBIG>"
1082 msgstr "B<EFBIG>"
1083
1084 #. type: Plain text
1085 #: build/C/man2/fallocate.2:143
1086 msgid "I<offset>+I<len> exceeds the maximum file size."
1087 msgstr "I<offset + len> がファイルサイズの最大値よりも大きい。"
1088
1089 #. type: TP
1090 #: build/C/man2/fallocate.2:143
1091 #, no-wrap
1092 msgid "B<EINTR>"
1093 msgstr "B<EINTR>"
1094
1095 #. type: Plain text
1096 #: build/C/man2/fallocate.2:146
1097 msgid "A signal was caught during execution."
1098 msgstr "実行中にシグナルが捕捉された。"
1099
1100 #. type: Plain text
1101 #: build/C/man2/fallocate.2:158 build/C/man3/posix_fallocate.3:87
1102 msgid "I<offset> was less than 0, or I<len> was less than or equal to 0."
1103 msgstr "I<offset> が 0 未満だったか、 I<len> が 0 以下だった。"
1104
1105 #. type: TP
1106 #: build/C/man2/fallocate.2:158 build/C/man2/madvise.2:310
1107 #: build/C/man2/sync_file_range.2:160
1108 #, no-wrap
1109 msgid "B<EIO>"
1110 msgstr "B<EIO>"
1111
1112 #. type: Plain text
1113 #: build/C/man2/fallocate.2:161
1114 msgid "An I/O error occurred while reading from or writing to a filesystem."
1115 msgstr "ファイルシステムとの読み書き中に入出力エラーが発生した。"
1116
1117 #. type: TP
1118 #: build/C/man2/fallocate.2:161 build/C/man2/mmap.2:452
1119 #: build/C/man3/posix_fallocate.3:87
1120 #, no-wrap
1121 msgid "B<ENODEV>"
1122 msgstr "B<ENODEV>"
1123
1124 #. type: Plain text
1125 #: build/C/man2/fallocate.2:168
1126 msgid ""
1127 "I<fd> does not refer to a regular file or a directory.  (If I<fd> is a pipe "
1128 "or FIFO, a different error results.)"
1129 msgstr ""
1130 "I<fd> が通常のファイルかディレクトリを参照していない (I<fd> がパイプや FIFO "
1131 "を参照している場合、別のエラーが発生する)。"
1132
1133 #. type: TP
1134 #: build/C/man2/fallocate.2:168 build/C/man3/posix_fallocate.3:91
1135 #: build/C/man2/shmget.2:217 build/C/man2/sync_file_range.2:166
1136 #, no-wrap
1137 msgid "B<ENOSPC>"
1138 msgstr "B<ENOSPC>"
1139
1140 #. type: Plain text
1141 #: build/C/man2/fallocate.2:173 build/C/man3/posix_fallocate.3:96
1142 msgid ""
1143 "There is not enough space left on the device containing the file referred to "
1144 "by I<fd>."
1145 msgstr "I<fd> が参照するファイルを含むデバイスに十分な空き領域がない。"
1146
1147 #. type: Plain text
1148 #: build/C/man2/fallocate.2:177
1149 msgid "This kernel does not implement B<fallocate>()."
1150 msgstr "このカーネルでは B<fallocate>() は実装されていない。"
1151
1152 #. type: TP
1153 #: build/C/man2/fallocate.2:177
1154 #, no-wrap
1155 msgid "B<EOPNOTSUPP>"
1156 msgstr "B<EOPNOTSUPP>"
1157
1158 #. type: Plain text
1159 #: build/C/man2/fallocate.2:186
1160 msgid ""
1161 "The filesystem containing the file referred to by I<fd> does not support "
1162 "this operation; or the I<mode> is not supported by the filesystem containing "
1163 "the file referred to by I<fd>."
1164 msgstr ""
1165 "I<fd> が参照するファイルを含むファイルシステムが 指定された操作を\n"
1166 "サポートしていない。 I<fd> が参照するファイルを含むファイルシステムが\n"
1167 "I<mode> をサポートしていない。"
1168
1169 #. type: TP
1170 #: build/C/man2/fallocate.2:186 build/C/man2/mlock.2:143
1171 #: build/C/man2/mlock.2:182 build/C/man2/mmap.2:460 build/C/man2/shmctl.2:353
1172 #: build/C/man2/shmget.2:225
1173 #, no-wrap
1174 msgid "B<EPERM>"
1175 msgstr "B<EPERM>"
1176
1177 #. type: Plain text
1178 #: build/C/man2/fallocate.2:202
1179 msgid ""
1180 "The file referred to by I<fd> is marked immutable (see B<chattr>(1)).  Or: "
1181 "I<mode> specifies B<FALLOC_FL_PUNCH_HOLE> and the file referred to by I<fd> "
1182 "is marked append-only (see B<chattr>(1))."
1183 msgstr ""
1184 "I<fd> が参照するファイルに変更不可 (immutable) の属性が付いている (B<chattr>"
1185 "(1) 参照)。 I<mode> に B<FALLOC_FL_PUNCH_HOLE> が指定されたが、 I<fd> が参照"
1186 "するファイルに追加のみ (append-only) の属性が付いている (B<chattr>(1) 参照)。"
1187
1188 #. type: TP
1189 #: build/C/man2/fallocate.2:202 build/C/man2/posix_fadvise.2:97
1190 #: build/C/man3/posix_fallocate.3:96 build/C/man2/sync_file_range.2:169
1191 #, no-wrap
1192 msgid "B<ESPIPE>"
1193 msgstr "B<ESPIPE>"
1194
1195 #. type: Plain text
1196 #: build/C/man2/fallocate.2:206
1197 msgid "I<fd> refers to a pipe or FIFO."
1198 msgstr "I<fd> がパイプか FIFO を参照している。"
1199
1200 #. type: SH
1201 #: build/C/man2/fallocate.2:206 build/C/man3/malloc_info.3:60
1202 #: build/C/man3/mcheck.3:134 build/C/man2/mmap2.2:74
1203 #: build/C/man2/posix_fadvise.2:104 build/C/man3/posix_fallocate.3:100
1204 #: build/C/man3/posix_memalign.3:167 build/C/man2/readahead.2:83
1205 #: build/C/man2/remap_file_pages.2:148 build/C/man3/shm_open.3:249
1206 #: build/C/man2/subpage_prot.2:90 build/C/man2/sync_file_range.2:177
1207 #, no-wrap
1208 msgid "VERSIONS"
1209 msgstr "バージョン"
1210
1211 #.  See http://sourceware.org/bugzilla/show_bug.cgi?id=14964
1212 #. type: Plain text
1213 #: build/C/man2/fallocate.2:214
1214 msgid ""
1215 "B<fallocate>()  is available on Linux since kernel 2.6.23.  Support is "
1216 "provided by glibc since version 2.10.  The B<FALLOC_FL_*> flags are defined "
1217 "in glibc headers only since version 2.18."
1218 msgstr ""
1219 "B<fallocate>()  はカーネル 2.6.23 以降の Linux で利用可能である。 glibc での"
1220 "対応はバージョン 3.10 以降で行われている。 B<FALLOC_FL_*> が glibc のヘッダ"
1221 "ファイルで定義されているのは、バージョン 2.18 以降のみである。"
1222
1223 #. type: Plain text
1224 #: build/C/man2/fallocate.2:217
1225 msgid "B<fallocate>()  is Linux-specific."
1226 msgstr "B<fallocate>()  は Linux 固有である。"
1227
1228 #. type: Plain text
1229 #: build/C/man2/fallocate.2:222
1230 msgid ""
1231 "B<fallocate>(1), B<ftruncate>(2), B<posix_fadvise>(3), B<posix_fallocate>(3)"
1232 msgstr ""
1233 "B<fallocate>(1), B<ftruncate>(2), B<posix_fadvise>(3), B<posix_fallocate>(3)"
1234
1235 #. type: TH
1236 #: build/C/man2/madvise.2:35
1237 #, no-wrap
1238 msgid "MADVISE"
1239 msgstr "MADVISE"
1240
1241 #. type: TH
1242 #: build/C/man2/madvise.2:35
1243 #, no-wrap
1244 msgid "2012-04-28"
1245 msgstr "2012-04-28"
1246
1247 #. type: Plain text
1248 #: build/C/man2/madvise.2:38
1249 msgid "madvise - give advice about use of memory"
1250 msgstr "madvise - メモリ利用に関するアドバイスを与える"
1251
1252 #. type: Plain text
1253 #: build/C/man2/madvise.2:40 build/C/man2/msync.2:30
1254 #: build/C/man3/shm_open.3:31
1255 msgid "B<#include E<lt>sys/mman.hE<gt>>"
1256 msgstr "B<#include E<lt>sys/mman.hE<gt>>"
1257
1258 #. type: Plain text
1259 #: build/C/man2/madvise.2:42
1260 msgid ""
1261 "B<int madvise(void *>I<addr>B<, size_t >I<length>B<, int >I<advice>B<);>"
1262 msgstr ""
1263 "B<int madvise(void *>I<addr>B<, size_t >I<length>B<, int >I<advice>B<);>"
1264
1265 #. type: Plain text
1266 #: build/C/man2/madvise.2:46 build/C/man2/posix_fadvise.2:43
1267 #: build/C/man3/posix_fallocate.3:39 build/C/man3/posix_memalign.3:49
1268 msgid ""
1269 "Feature Test Macro Requirements for glibc (see B<feature_test_macros>(7)):"
1270 msgstr "glibc 向けの機能検査マクロの要件 (B<feature_test_macros>(7)  参照):"
1271
1272 #. type: Plain text
1273 #: build/C/man2/madvise.2:50
1274 msgid "B<madvise>(): _BSD_SOURCE"
1275 msgstr "B<madvise>(): _BSD_SOURCE"
1276
1277 #. type: Plain text
1278 #: build/C/man2/madvise.2:68
1279 msgid ""
1280 "The B<madvise>()  system call advises the kernel about how to handle paging "
1281 "input/output in the address range beginning at address I<addr> and with size "
1282 "I<length> bytes.  It allows an application to tell the kernel how it expects "
1283 "to use some mapped or shared memory areas, so that the kernel can choose "
1284 "appropriate read-ahead and caching techniques.  This call does not influence "
1285 "the semantics of the application (except in the case of B<MADV_DONTNEED>), "
1286 "but may influence its performance.  The kernel is free to ignore the advice."
1287 msgstr ""
1288 "B<madvise>()  システムコールは、アドレス I<addr> からはじまる I<length> バイ"
1289 "トのメモリブロックのページング入出力をどう扱えば良いか、 カーネルにアドバイス"
1290 "する。 これを用いると、 アプリケーションからカーネルに、 マップされたメモリや"
1291 "共有メモリをどのように扱ってほしいか伝えることができ、 カーネルはそれに応じて"
1292 "先読みやキャッシュなどの適切な手法を選択できる。 このコールはアプリケーション"
1293 "の動作そのものには影響しない (B<MADV_DONTNEED> の場合は別) が、 性能には影響"
1294 "しうる。 なおこのアドバイスを受け入れるかどうかはカーネルに任される。"
1295
1296 #. type: Plain text
1297 #: build/C/man2/madvise.2:72
1298 msgid "The advice is indicated in the I<advice> argument which can be"
1299 msgstr ""
1300 "アドバイスは引き数 I<advice> によって与える。以下のいずれかを指定できる。"
1301
1302 #. type: TP
1303 #: build/C/man2/madvise.2:72
1304 #, no-wrap
1305 msgid "B<MADV_NORMAL>"
1306 msgstr "B<MADV_NORMAL>"
1307
1308 #. type: Plain text
1309 #: build/C/man2/madvise.2:76
1310 msgid "No special treatment.  This is the default."
1311 msgstr "特別な扱いは行わない。これがデフォルトである。"
1312
1313 #. type: TP
1314 #: build/C/man2/madvise.2:76
1315 #, no-wrap
1316 msgid "B<MADV_RANDOM>"
1317 msgstr "B<MADV_RANDOM>"
1318
1319 #. type: Plain text
1320 #: build/C/man2/madvise.2:80
1321 msgid ""
1322 "Expect page references in random order.  (Hence, read ahead may be less "
1323 "useful than normally.)"
1324 msgstr ""
1325 "ページ参照はランダムな順序で行われそうだ。 (したがって、先読みはあまり効果が"
1326 "なさそうだ。)"
1327
1328 #. type: TP
1329 #: build/C/man2/madvise.2:80
1330 #, no-wrap
1331 msgid "B<MADV_SEQUENTIAL>"
1332 msgstr "B<MADV_SEQUENTIAL>"
1333
1334 #. type: Plain text
1335 #: build/C/man2/madvise.2:85
1336 msgid ""
1337 "Expect page references in sequential order.  (Hence, pages in the given "
1338 "range can be aggressively read ahead, and may be freed soon after they are "
1339 "accessed.)"
1340 msgstr ""
1341 "ページ参照はシーケンシャルな順序で行われそうだ。 (したがって与えた範囲のペー"
1342 "ジは積極的に先読みしておくと良いだろう。 またアクセスが終わったら速やかに解放"
1343 "して良い。)"
1344
1345 #. type: TP
1346 #: build/C/man2/madvise.2:85
1347 #, no-wrap
1348 msgid "B<MADV_WILLNEED>"
1349 msgstr "B<MADV_WILLNEED>"
1350
1351 #. type: Plain text
1352 #: build/C/man2/madvise.2:89
1353 msgid ""
1354 "Expect access in the near future.  (Hence, it might be a good idea to read "
1355 "some pages ahead.)"
1356 msgstr ""
1357 "近い将来にアクセスされそうだ。 (したがってこれらのページを今のうちに先読みし"
1358 "ておくといいだろう。)"
1359
1360 #. type: TP
1361 #: build/C/man2/madvise.2:89
1362 #, no-wrap
1363 msgid "B<MADV_DONTNEED>"
1364 msgstr "B<MADV_DONTNEED>"
1365
1366 #. type: Plain text
1367 #: build/C/man2/madvise.2:100
1368 msgid ""
1369 "Do not expect access in the near future.  (For the time being, the "
1370 "application is finished with the given range, so the kernel can free "
1371 "resources associated with it.)  Subsequent accesses of pages in this range "
1372 "will succeed, but will result either in reloading of the memory contents "
1373 "from the underlying mapped file (see B<mmap>(2))  or zero-fill-on-demand "
1374 "pages for mappings without an underlying file."
1375 msgstr ""
1376 "しばらくアクセスはなさそうだ。 (現時点でアプリケーションは与えた範囲の処理を"
1377 "終えている。 したがってカーネルはこれに関連するリソースを解放して良い。)  こ"
1378 "れ以降この範囲のページへのアクセスがあると、 成功はするが、メモリの内容をマッ"
1379 "プ元のファイルからロードし直すことになる (B<mmap>(2)  を見よ) か、 または元"
1380 "ファイルがないマップページでは アクセスがあったときに 0 埋めが行われることに"
1381 "なる。"
1382
1383 #. type: TP
1384 #: build/C/man2/madvise.2:100
1385 #, fuzzy, no-wrap
1386 #| msgid "B<MADV_REMOVE> (Since Linux 2.6.16)"
1387 msgid "B<MADV_REMOVE> (since Linux 2.6.16)"
1388 msgstr "B<MADV_REMOVE> (Linux 2.6.16 以降)"
1389
1390 #.  2.6.18-rc5
1391 #.  Databases want to use this feature to drop a section of their
1392 #.  bufferpool (shared memory segments) - without writing back to
1393 #.  disk/swap space.  This feature is also useful for supporting
1394 #.  hot-plug memory on UML.
1395 #. type: Plain text
1396 #: build/C/man2/madvise.2:113
1397 msgid ""
1398 "Free up a given range of pages and its associated backing store.  Currently, "
1399 "only shmfs/tmpfs supports this; other filesystems return with the error "
1400 "B<ENOSYS>."
1401 msgstr ""
1402 "指定された範囲のページと関連するバッキングストアを解放する。 現在のところ、 "
1403 "shmfs/tmpfs だけがこれに対応している。 他のファイルシステムでは B<ENOSYS> が"
1404 "返される。"
1405
1406 #. type: TP
1407 #: build/C/man2/madvise.2:113
1408 #, fuzzy, no-wrap
1409 #| msgid "B<MADV_DONTFORK> (Since Linux 2.6.16)"
1410 msgid "B<MADV_DONTFORK> (since Linux 2.6.16)"
1411 msgstr "B<MADV_DONTFORK> (Linux 2.6.16 以降)"
1412
1413 #.  See http://lwn.net/Articles/171941/
1414 #.  [PATCH] madvise MADV_DONTFORK/MADV_DOFORK
1415 #.  Currently, copy-on-write may change the physical address of
1416 #.  a page even if the user requested that the page is pinned in
1417 #.  memory (either by mlock or by get_user_pages).  This happens
1418 #.  if the process forks meanwhile, and the parent writes to that
1419 #.  page.  As a result, the page is orphaned: in case of
1420 #.  get_user_pages, the application will never see any data hardware
1421 #.  DMA's into this page after the COW.  In case of mlock'd memory,
1422 #.  the parent is not getting the realtime/security benefits of mlock.
1423 #.  In particular, this affects the Infiniband modules which do DMA from
1424 #.  and into user pages all the time.
1425 #.  This patch adds madvise options to control whether memory range is
1426 #.  inherited across fork. Useful e.g. for when hardware is doing DMA
1427 #.  from/into these pages.  Could also be useful to an application
1428 #.  wanting to speed up its forks by cutting large areas out of
1429 #.  consideration.
1430 #.  SEE ALSO: http://lwn.net/Articles/171941/
1431 #.  "Tweaks to madvise() and posix_fadvise()", 14 Feb 2006
1432 #. type: Plain text
1433 #: build/C/man2/madvise.2:144
1434 msgid ""
1435 "Do not make the pages in this range available to the child after a B<fork>"
1436 "(2).  This is useful to prevent copy-on-write semantics from changing the "
1437 "physical location of a page(s) if the parent writes to it after a B<fork>"
1438 "(2).  (Such page relocations cause problems for hardware that DMAs into the "
1439 "page(s).)"
1440 msgstr ""
1441 "B<fork>(2)  が行われた後、指定された範囲のページを子プロセスが利用できないよ"
1442 "うにする。 この機能は、書き込み時コピー (copy-on-write) 方式で、 B<fork>(2)  "
1443 "の後で親プロセスがページに書き込みを行った場合に ページの物理位置が変化しない"
1444 "ようにするのに有効である (ページの再配置はハードウェアがそのページに DMA 転送"
1445 "を行うような場合に 問題を起こすことがある)。"
1446
1447 #. type: TP
1448 #: build/C/man2/madvise.2:144
1449 #, fuzzy, no-wrap
1450 #| msgid "B<MADV_DOFORK> (Since Linux 2.6.16)"
1451 msgid "B<MADV_DOFORK> (since Linux 2.6.16)"
1452 msgstr "B<MADV_DOFORK> (Linux 2.6.16 以降)"
1453
1454 #. type: Plain text
1455 #: build/C/man2/madvise.2:150
1456 msgid ""
1457 "Undo the effect of B<MADV_DONTFORK>, restoring the default behavior, whereby "
1458 "a mapping is inherited across B<fork>(2)."
1459 msgstr ""
1460 "B<MADV_DONTFORK> の影響を取り消し、デフォルトの動作に戻す。 つまり、 B<fork>"
1461 "(2)  の前後でマッピングは継承されるようになる。"
1462
1463 #. type: TP
1464 #: build/C/man2/madvise.2:150
1465 #, fuzzy, no-wrap
1466 #| msgid "B<MADV_HWPOISON> (Since Linux 2.6.32)"
1467 msgid "B<MADV_HWPOISON> (since Linux 2.6.32)"
1468 msgstr "B<MADV_HWPOISON> (Linux 2.6.32 以降)"
1469
1470 #. type: Plain text
1471 #: build/C/man2/madvise.2:162
1472 msgid ""
1473 "Poison a page and handle it like a hardware memory corruption.  This "
1474 "operation is available only for privileged (B<CAP_SYS_ADMIN>)  processes.  "
1475 "This operation may result in the calling process receiving a B<SIGBUS> and "
1476 "the page being unmapped.  This feature is intended for testing of memory "
1477 "error-handling code; it is available only if the kernel was configured with "
1478 "B<CONFIG_MEMORY_FAILURE>."
1479 msgstr ""
1480
1481 #. type: TP
1482 #: build/C/man2/madvise.2:162
1483 #, fuzzy, no-wrap
1484 #| msgid "B<MADV_SOFT_OFFLINE> (Since Linux 2.6.33)"
1485 msgid "B<MADV_SOFT_OFFLINE> (since Linux 2.6.33)"
1486 msgstr "B<MADV_SOFT_OFFLINE> (Linux 2.6.33 以降)"
1487
1488 #. type: Plain text
1489 #: build/C/man2/madvise.2:180
1490 msgid ""
1491 "Soft offline the pages in the range specified by I<addr> and I<length>.  The "
1492 "memory of each page in the specified range is preserved (i.e., when next "
1493 "accessed, the same content will be visible, but in a new physical page "
1494 "frame), and the original page is offlined (i.e., no longer used, and taken "
1495 "out of normal memory management).  The effect of the B<MADV_SOFT_OFFLINE> "
1496 "operation is invisible to (i.e., does not change the semantics of)  the "
1497 "calling process.  This feature is intended for testing of memory error-"
1498 "handling code; it is available only if the kernel was configured with "
1499 "B<CONFIG_MEMORY_FAILURE>."
1500 msgstr ""
1501
1502 #. type: TP
1503 #: build/C/man2/madvise.2:180
1504 #, no-wrap
1505 msgid "B<MADV_MERGEABLE> (since Linux 2.6.32)"
1506 msgstr "B<MADV_MERGEABLE> (Linux 2.6.32 以降)"
1507
1508 #. type: Plain text
1509 #: build/C/man2/madvise.2:205
1510 msgid ""
1511 "Enable Kernel Samepage Merging (KSM) for the pages in the range specified by "
1512 "I<addr> and I<length>.  The kernel regularly scans those areas of user "
1513 "memory that have been marked as mergeable, looking for pages with identical "
1514 "content.  These are replaced by a single write-protected page (which is "
1515 "automatically copied if a process later wants to update the content of the "
1516 "page).  KSM merges only private anonymous pages (see B<mmap>(2)).  The KSM "
1517 "feature is intended for applications that generate many instances of the "
1518 "same data (e.g., virtualization systems such as KVM).  It can consume a lot "
1519 "of processing power; use with care.  See the Linux kernel source file "
1520 "I<Documentation/vm/ksm.txt> for more details.  The B<MADV_MERGEABLE> and "
1521 "B<MADV_UNMERGEABLE> operations are available only if the kernel was "
1522 "configured with B<CONFIG_KSM>."
1523 msgstr ""
1524
1525 #. type: TP
1526 #: build/C/man2/madvise.2:205
1527 #, no-wrap
1528 msgid "B<MADV_UNMERGEABLE> (since Linux 2.6.32)"
1529 msgstr "B<MADV_UNMERGEABLE> (Linux 2.6.32 以降)"
1530
1531 #. type: Plain text
1532 #: build/C/man2/madvise.2:214
1533 msgid ""
1534 "Undo the effect of an earlier B<MADV_MERGEABLE> operation on the specified "
1535 "address range; KSM unmerges whatever pages it had merged in the address "
1536 "range specified by I<addr> and I<length>."
1537 msgstr ""
1538
1539 #. type: TP
1540 #: build/C/man2/madvise.2:214
1541 #, no-wrap
1542 msgid "B<MADV_HUGEPAGE> (since Linux 2.6.38)"
1543 msgstr "B<MADV_HUGEPAGE> (Linux 2.6.38 以降)"
1544
1545 #.  http://lwn.net/Articles/358904/
1546 #.  https://lwn.net/Articles/423584/
1547 #. type: Plain text
1548 #: build/C/man2/madvise.2:243
1549 msgid ""
1550 "Enables Transparent Huge Pages (THP) for pages in the range specified by "
1551 "I<addr> and I<length>.  Currently, Transparent Huge Pages work only with "
1552 "private anonymous pages (see B<mmap>(2)).  The kernel will regularly scan "
1553 "the areas marked as huge page candidates to replace them with huge pages.  "
1554 "The kernel will also allocate huge pages directly when the region is "
1555 "naturally aligned to the huge page size (see B<posix_memalign>(2)).  This "
1556 "feature is primarily aimed at applications that use large mappings of data "
1557 "and access large regions of that memory at a time (e.g., virtualization "
1558 "systems such as QEMU).  It can very easily waste memory (e.g., a 2MB mapping "
1559 "that only ever accesses 1 byte will result in 2MB of wired memory instead of "
1560 "one 4KB page).  See the Linux kernel source file I<Documentation/vm/"
1561 "transhuge.txt> for more details.  The B<MADV_HUGEPAGE> and "
1562 "B<MADV_NOHUGEPAGE> operations are available only if the kernel was "
1563 "configured with B<CONFIG_TRANSPARENT_HUGEPAGE>."
1564 msgstr ""
1565
1566 #. type: TP
1567 #: build/C/man2/madvise.2:243
1568 #, no-wrap
1569 msgid "B<MADV_NOHUGEPAGE> (since Linux 2.6.38)"
1570 msgstr "B<MADV_NOHUGEPAGE> (Linux 2.6.38 以降)"
1571
1572 #. type: Plain text
1573 #: build/C/man2/madvise.2:250
1574 msgid ""
1575 "Ensures that memory in the address range specified by I<addr> and I<length> "
1576 "will not be collapsed into huge pages."
1577 msgstr ""
1578
1579 #. type: TP
1580 #: build/C/man2/madvise.2:250
1581 #, no-wrap
1582 msgid "B<MADV_DONTDUMP> (since Linux 3.4)"
1583 msgstr "B<MADV_DONTDUMP> (Linux 3.4 以降)"
1584
1585 #. type: Plain text
1586 #: build/C/man2/madvise.2:264
1587 msgid ""
1588 "Exclude from a core dump those pages in the range specified by I<addr> and "
1589 "I<length>.  This is useful in applications that have large areas of memory "
1590 "that are known not to be useful in a core dump.  The effect of "
1591 "B<MADV_DONTDUMP> takes precedence over the bit mask that is set via the I</"
1592 "proc/PID/coredump_filter> file (see B<core>(5))."
1593 msgstr ""
1594
1595 #. type: TP
1596 #: build/C/man2/madvise.2:264
1597 #, no-wrap
1598 msgid "B<MADV_DODUMP> (since Linux 3.4)"
1599 msgstr "B<MADV_DODUMP> (Linux 3.4 以降)"
1600
1601 #. type: Plain text
1602 #: build/C/man2/madvise.2:268
1603 msgid "Undo the effect of an earlier B<MADV_DONTDUMP>."
1604 msgstr ""
1605
1606 #. type: Plain text
1607 #: build/C/man2/madvise.2:275
1608 msgid ""
1609 "On success B<madvise>()  returns zero.  On error, it returns -1 and I<errno> "
1610 "is set appropriately."
1611 msgstr ""
1612 "B<madvise>()  は成功すると 0 を返す。 エラーが起こると -1 を返し、 I<errno> "
1613 "を適切な値に設定する。"
1614
1615 #. type: TP
1616 #: build/C/man2/madvise.2:276 build/C/man2/mlock.2:154 build/C/man2/mmap.2:413
1617 #: build/C/man2/mremap.2:136
1618 #, no-wrap
1619 msgid "B<EAGAIN>"
1620 msgstr "B<EAGAIN>"
1621
1622 #. type: Plain text
1623 #: build/C/man2/madvise.2:279
1624 msgid "A kernel resource was temporarily unavailable."
1625 msgstr "何らかのカーネルリソースが一時的に利用できなかった。"
1626
1627 #. type: Plain text
1628 #: build/C/man2/madvise.2:282
1629 msgid "The map exists, but the area maps something that isn't a file."
1630 msgstr "指定したマップは存在するが、ファイルではないところをマップしている。"
1631
1632 #. type: Plain text
1633 #: build/C/man2/madvise.2:285
1634 msgid "This error can occur for the following reasons:"
1635 msgstr "このエラーは以下の理由で発生する。"
1636
1637 #.  .I len
1638 #.  is zero,
1639 #. type: Plain text
1640 #: build/C/man2/madvise.2:292
1641 msgid "The value I<len> is negative."
1642 msgstr "I<len> が負の値である。"
1643
1644 #. type: Plain text
1645 #: build/C/man2/madvise.2:295
1646 msgid "I<addr> is not page-aligned."
1647 msgstr "I<addr> がページ境界ではない。"
1648
1649 #. type: Plain text
1650 #: build/C/man2/madvise.2:298
1651 msgid "I<advice> is not a valid value"
1652 msgstr "I<advice> が有効な値でない。"
1653
1654 #. type: Plain text
1655 #: build/C/man2/madvise.2:301
1656 msgid ""
1657 "The application is attempting to release locked or shared pages (with "
1658 "B<MADV_DONTNEED>)."
1659 msgstr ""
1660 "アプリケーションがロックされたページや共有ページを (B<MADV_DONTNEED> で) 解"
1661 "放\n"
1662 "しようとしている。"
1663
1664 #. type: Plain text
1665 #: build/C/man2/madvise.2:309
1666 msgid ""
1667 "B<MADV_MERGEABLE> or B<MADV_UNMERGEABLE> was specified in I<advice>, but the "
1668 "kernel was not configured with B<CONFIG_KSM>."
1669 msgstr ""
1670 "I<advice> に B<MADV_MERGEABLE> か B<MADV_UNMERGEABLE> が指定されたが、 カーネ"
1671 "ルの設定が B<CONFIG_KSM> が有効になっていなかった。"
1672
1673 #. type: Plain text
1674 #: build/C/man2/madvise.2:316
1675 msgid ""
1676 "(for B<MADV_WILLNEED>)  Paging in this area would exceed the process's "
1677 "maximum resident set size."
1678 msgstr ""
1679 "(B<MADV_WILLNEED> の場合) この範囲のページングを行うと、 プロセスの RSS "
1680 "(resident set size) の最大値を越えてしまう。"
1681
1682 #. type: TP
1683 #: build/C/man2/madvise.2:316 build/C/man2/madvise.2:321
1684 #: build/C/man2/mlock.2:123 build/C/man2/mlock.2:131 build/C/man2/mlock.2:169
1685 #: build/C/man2/mmap.2:456 build/C/man2/mprotect.2:100
1686 #: build/C/man2/mprotect.2:103 build/C/man2/mremap.2:179
1687 #: build/C/man2/msync.2:93 build/C/man3/posix_memalign.3:164
1688 #: build/C/man2/shmctl.2:337 build/C/man2/shmget.2:214
1689 #: build/C/man2/shmop.2:214 build/C/man2/subpage_prot.2:87
1690 #: build/C/man2/sync_file_range.2:163
1691 #, no-wrap
1692 msgid "B<ENOMEM>"
1693 msgstr "B<ENOMEM>"
1694
1695 #. type: Plain text
1696 #: build/C/man2/madvise.2:321
1697 msgid "(for B<MADV_WILLNEED>)  Not enough memory: paging in failed."
1698 msgstr "(B<MADV_WILLNEED> の場合) メモリが足りず、ページングに失敗した。"
1699
1700 #. type: Plain text
1701 #: build/C/man2/madvise.2:325
1702 msgid ""
1703 "Addresses in the specified range are not currently mapped, or are outside "
1704 "the address space of the process."
1705 msgstr ""
1706 "指定した範囲のアドレスが、現在マップされていない。 あるいはプロセスのアドレス"
1707 "空間の内部にない。"
1708
1709 #.  FIXME . Write a posix_madvise(3) page.
1710 #. type: Plain text
1711 #: build/C/man2/madvise.2:338
1712 #, fuzzy
1713 #| msgid ""
1714 #| "POSIX.1b.  POSIX.1-2001 describes B<posix_madvise>(3)  with constants "
1715 #| "B<POSIX_MADV_NORMAL>, etc., with a behavior close to that described "
1716 #| "here.  There is a similar B<posix_fadvise>(2)  for file access."
1717 msgid ""
1718 "POSIX.1b.  POSIX.1-2001 describes B<posix_madvise>(3)  with constants "
1719 "B<POSIX_MADV_NORMAL>, B<POSIX_MADV_RANDOM>, and so on, with a behavior close "
1720 "to that described here.  There is a similar B<posix_fadvise>(2)  for file "
1721 "access."
1722 msgstr ""
1723 "POSIX.1b.  POSIX.1-2001 では、 B<posix_madvise>(3)  を B<POSIX_MADV_NORMAL> "
1724 "などの定数とともに記述していた (それぞれの振る舞いはここで述べたものに近"
1725 "い)。 ファイルアクセスに対しても B<posix_fadvise>(2)  という類似の関数が存在"
1726 "する。"
1727
1728 #. type: Plain text
1729 #: build/C/man2/madvise.2:347
1730 msgid ""
1731 "B<MADV_REMOVE>, B<MADV_DONTFORK>, B<MADV_DOFORK>, B<MADV_HWPOISON>, "
1732 "B<MADV_MERGEABLE>, and B<MADV_UNMERGEABLE> are Linux-specific."
1733 msgstr ""
1734 "B<MADV_REMOVE>, B<MADV_DONTFORK>, B<MADV_DOFORK>, B<MADV_HWPOISON>,\n"
1735 "B<MADV_MERGEABLE>, B<MADV_UNMERGEABLE> は Linux 固有である。"
1736
1737 #. type: SS
1738 #: build/C/man2/madvise.2:348 build/C/man2/mlock.2:267
1739 #: build/C/man2/shmget.2:294
1740 #, no-wrap
1741 msgid "Linux notes"
1742 msgstr "Linux での注意"
1743
1744 #. type: Plain text
1745 #: build/C/man2/madvise.2:356
1746 msgid ""
1747 "The current Linux implementation (2.4.0) views this system call more as a "
1748 "command than as advice and hence may return an error when it cannot do what "
1749 "it usually would do in response to this advice.  (See the ERRORS description "
1750 "above.)  This is nonstandard behavior."
1751 msgstr ""
1752 "現在の Linux の実装 (2.4.0) では、 このシステムコールをアドバイスというよりは"
1753 "命令と見ている。 したがってこのアドバイスに対して通常行われる動作が不可能な場"
1754 "合は、 エラーを返すことがある (上記の エラー の記述を参照)。 この振舞いは標準"
1755 "とは異なる。"
1756
1757 #.  .SH HISTORY
1758 #.  The
1759 #.  .BR madvise ()
1760 #.  function first appeared in 4.4BSD.
1761 #. type: Plain text
1762 #: build/C/man2/madvise.2:372
1763 msgid ""
1764 "The Linux implementation requires that the address I<addr> be page-aligned, "
1765 "and allows I<length> to be zero.  If there are some parts of the specified "
1766 "address range that are not mapped, the Linux version of B<madvise>()  "
1767 "ignores them and applies the call to the rest (but returns B<ENOMEM> from "
1768 "the system call, as it should)."
1769 msgstr ""
1770 "Linux の実装では I<addr> のアドレスはページ境界の値でなければならない。また "
1771 "I<length> は 0 であっても構わない。 また Linux 版の B<madvise>()  では、指定"
1772 "されたアドレス範囲にマップされていない部分があると、 これらを無視して残りの部"
1773 "分にアドバイスを適用する (しかしシステムコールに対してはちゃんと B<ENOMEM> を"
1774 "返す)。"
1775
1776 #. type: Plain text
1777 #: build/C/man2/madvise.2:380
1778 msgid ""
1779 "B<getrlimit>(2), B<mincore>(2), B<mmap>(2), B<mprotect>(2), B<msync>(2), "
1780 "B<munmap>(2), B<core>(5)"
1781 msgstr ""
1782 "B<getrlimit>(2), B<mincore>(2), B<mmap>(2), B<mprotect>(2), B<msync>(2), "
1783 "B<munmap>(2), B<core>(5)"
1784
1785 #. type: TH
1786 #: build/C/man3/mallinfo.3:26
1787 #, no-wrap
1788 msgid "MALLINFO"
1789 msgstr "MALLINFO"
1790
1791 #. type: TH
1792 #: build/C/man3/mallinfo.3:26 build/C/man3/malloc_stats.3:26
1793 #, no-wrap
1794 msgid "2012-05-06"
1795 msgstr "2012-05-06"
1796
1797 #. type: Plain text
1798 #: build/C/man3/mallinfo.3:29
1799 msgid "mallinfo - obtain memory allocation information"
1800 msgstr "mallinfo - メモリ割り当て情報を取得する"
1801
1802 #. type: Plain text
1803 #: build/C/man3/mallinfo.3:31 build/C/man3/malloc_stats.3:31
1804 #: build/C/man3/malloc_trim.3:31 build/C/man3/malloc_usable_size.3:30
1805 #: build/C/man3/mallopt.3:31
1806 msgid "B<#include E<lt>malloc.hE<gt>>"
1807 msgstr "B<#include E<lt>malloc.hE<gt>>"
1808
1809 #. type: Plain text
1810 #: build/C/man3/mallinfo.3:33
1811 msgid "B<struct mallinfo mallinfo(void);>"
1812 msgstr "B<struct mallinfo mallinfo(void);>"
1813
1814 #. type: Plain text
1815 #: build/C/man3/mallinfo.3:41
1816 msgid ""
1817 "The B<mallinfo>()  function returns a copy of a structure containing "
1818 "information about memory allocations performed by B<malloc>(3)  and related "
1819 "functions.  This structure is defined as follows:"
1820 msgstr ""
1821 "B<mallinfo>() 関数は、 B<malloc>(3) や一連の関数により実行されたメモリ\n"
1822 "割り当てに関する情報を格納した構造体のコピーを返す。\n"
1823 "この構造体は以下のように定義されている。"
1824
1825 #. type: Plain text
1826 #: build/C/man3/mallinfo.3:56
1827 #, no-wrap
1828 msgid ""
1829 "struct mallinfo {\n"
1830 "    int arena;     /* Non-mmapped space allocated (bytes) */\n"
1831 "    int ordblks;   /* Number of free chunks */\n"
1832 "    int smblks;    /* Number of free fastbin blocks */\n"
1833 "    int hblks;     /* Number of mmapped regions */\n"
1834 "    int hblkhd;    /* Space allocated in mmapped regions (bytes) */\n"
1835 "    int usmblks;   /* Maximum total allocated space (bytes) */\n"
1836 "    int fsmblks;   /* Space in freed fastbin blocks (bytes) */\n"
1837 "    int uordblks;  /* Total allocated space (bytes) */\n"
1838 "    int fordblks;  /* Total free space (bytes) */\n"
1839 "    int keepcost;  /* Top-most, releasable space (bytes) */\n"
1840 "};\n"
1841 msgstr ""
1842 "struct mallinfo {\n"
1843 "    int arena;     /* Non-mmapped space allocated (bytes) */\n"
1844 "    int ordblks;   /* Number of free chunks */\n"
1845 "    int smblks;    /* Number of free fastbin blocks */\n"
1846 "    int hblks;     /* Number of mmapped regions */\n"
1847 "    int hblkhd;    /* Space allocated in mmapped regions (bytes) */\n"
1848 "    int usmblks;   /* Maximum total allocated space (bytes) */\n"
1849 "    int fsmblks;   /* Space in freed fastbin blocks (bytes) */\n"
1850 "    int uordblks;  /* Total allocated space (bytes) */\n"
1851 "    int fordblks;  /* Total free space (bytes) */\n"
1852 "    int keepcost;  /* Top-most, releasable space (bytes) */\n"
1853 "};\n"
1854
1855 #. type: Plain text
1856 #: build/C/man3/mallinfo.3:62
1857 msgid ""
1858 "The fields of the I<mallinfo> structure contain the following information:"
1859 msgstr "I<mallinfo> 構造体の各フィールドには以下の情報が格納される。"
1860
1861 #. type: TP
1862 #: build/C/man3/mallinfo.3:62
1863 #, no-wrap
1864 msgid "I<arena>"
1865 msgstr "I<arena>"
1866
1867 #. type: Plain text
1868 #: build/C/man3/mallinfo.3:68
1869 msgid ""
1870 "The total amount of memory allocated by means other than B<mmap>(2)  (i.e., "
1871 "memory allocated on the heap).  This figure includes both in-use blocks and "
1872 "blocks on the free list."
1873 msgstr ""
1874
1875 #. type: TP
1876 #: build/C/man3/mallinfo.3:68
1877 #, no-wrap
1878 msgid "I<ordblks>"
1879 msgstr "I<ordblks>"
1880
1881 #. type: Plain text
1882 #: build/C/man3/mallinfo.3:71
1883 msgid "The number of ordinary (i.e., non-fastbin) free blocks."
1884 msgstr ""
1885
1886 #. type: TP
1887 #: build/C/man3/mallinfo.3:71
1888 #, no-wrap
1889 msgid "I<smblks>"
1890 msgstr "I<smblks>"
1891
1892 #. type: Plain text
1893 #: build/C/man3/mallinfo.3:75
1894 msgid "The number of fastbin free blocks (see B<mallopt>(3))."
1895 msgstr ""
1896
1897 #. type: TP
1898 #: build/C/man3/mallinfo.3:75
1899 #, no-wrap
1900 msgid "I<hblks>"
1901 msgstr "I<hblks>"
1902
1903 #. type: Plain text
1904 #: build/C/man3/mallinfo.3:83
1905 msgid ""
1906 "The number of blocks currently allocated using B<mmap>(2).  (See the "
1907 "discussion of B<M_MMAP_THRESHOLD> in B<mallopt>(3).)"
1908 msgstr ""
1909
1910 #. type: TP
1911 #: build/C/man3/mallinfo.3:83
1912 #, no-wrap
1913 msgid "I<hblkhd>"
1914 msgstr "I<hblkhd>"
1915
1916 #. type: Plain text
1917 #: build/C/man3/mallinfo.3:87
1918 msgid "The number of bytes in blocks currently allocated using B<mmap>(2)."
1919 msgstr ""
1920
1921 #. type: TP
1922 #: build/C/man3/mallinfo.3:87
1923 #, no-wrap
1924 msgid "I<usmblks>"
1925 msgstr "I<usmblks>"
1926
1927 #. type: Plain text
1928 #: build/C/man3/mallinfo.3:92
1929 msgid ""
1930 "The \"highwater mark\" for allocated space\\(emthat is, the maximum amount "
1931 "of space that was ever allocated.  This field is maintained only in "
1932 "nonthreading environments."
1933 msgstr ""
1934
1935 #. type: TP
1936 #: build/C/man3/mallinfo.3:92
1937 #, no-wrap
1938 msgid "I<fsmblks>"
1939 msgstr "I<fsmblks>"
1940
1941 #. type: Plain text
1942 #: build/C/man3/mallinfo.3:95
1943 msgid "The total number of bytes in fastbin free blocks."
1944 msgstr ""
1945
1946 #. type: TP
1947 #: build/C/man3/mallinfo.3:95
1948 #, no-wrap
1949 msgid "I<uordblks>"
1950 msgstr "I<uordblks>"
1951
1952 #. type: Plain text
1953 #: build/C/man3/mallinfo.3:98
1954 msgid "The total number of bytes used by in-use allocations."
1955 msgstr ""
1956
1957 #. type: TP
1958 #: build/C/man3/mallinfo.3:98
1959 #, no-wrap
1960 msgid "I<fordblks>"
1961 msgstr "I<fordblks>"
1962
1963 #. type: Plain text
1964 #: build/C/man3/mallinfo.3:101
1965 msgid "The total number of bytes in free blocks."
1966 msgstr ""
1967
1968 #. type: TP
1969 #: build/C/man3/mallinfo.3:101
1970 #, no-wrap
1971 msgid "I<keepcost>"
1972 msgstr "I<keepcost>"
1973
1974 #.  .SH VERSIONS
1975 #.  Available already in glibc 2.0, possibly earlier
1976 #. type: Plain text
1977 #: build/C/man3/mallinfo.3:110
1978 msgid ""
1979 "The total amount of releasable free space at the top of the heap.  This is "
1980 "the maximum number of bytes that could ideally (i.e., ignoring page "
1981 "alignment restrictions, and so on) be released by B<malloc_trim>(3)."
1982 msgstr ""
1983
1984 #. type: Plain text
1985 #: build/C/man3/mallinfo.3:114
1986 msgid ""
1987 "This function is not specified by POSIX or the C standards.  A similar "
1988 "function exists on many System V derivatives, and was specified in the SVID."
1989 msgstr ""
1990
1991 #.  FIXME http://sourceware.org/bugzilla/show_bug.cgi?id=208
1992 #.  See the 24 Aug 2011 mail by Paul Pluzhnikov:
1993 #.      "[patch] Fix mallinfo() to accumulate results for all arenas"
1994 #.  on libc-alpha@sourceware.org
1995 #. type: Plain text
1996 #: build/C/man3/mallinfo.3:126
1997 msgid ""
1998 "B<Information is returned for only the main memory allocation area.> "
1999 "Allocations in other arenas are excluded.  See B<malloc_stats>(3)  and "
2000 "B<malloc_info>(3)  for alternatives that include information about other "
2001 "arenas."
2002 msgstr ""
2003
2004 #. type: Plain text
2005 #: build/C/man3/mallinfo.3:134
2006 msgid ""
2007 "The fields of the I<mallinfo> structure are typed as I<int>.  However, "
2008 "because some internal bookkeeping values may be of type I<long>, the "
2009 "reported values may wrap around zero and thus be inaccurate."
2010 msgstr ""
2011
2012 #. type: SH
2013 #: build/C/man3/mallinfo.3:134 build/C/man3/malloc_hook.3:89
2014 #: build/C/man3/malloc_info.3:84 build/C/man3/mallopt.3:466
2015 #: build/C/man3/mcheck.3:159 build/C/man2/mmap.2:630
2016 #: build/C/man2/mprotect.2:148 build/C/man3/mtrace.3:108
2017 #, no-wrap
2018 msgid "EXAMPLE"
2019 msgstr "例"
2020
2021 #. type: Plain text
2022 #: build/C/man3/mallinfo.3:140
2023 msgid ""
2024 "The program below employs B<mallinfo>()  to retrieve memory allocation "
2025 "statistics before and after allocating and freeing some blocks of memory.  "
2026 "The statistics are displayed on standard output."
2027 msgstr ""
2028
2029 #. type: Plain text
2030 #: build/C/man3/mallinfo.3:144
2031 msgid ""
2032 "The first two command-line arguments specify the number and size of blocks "
2033 "to be allocated with B<malloc>(3)."
2034 msgstr ""
2035
2036 #. type: Plain text
2037 #: build/C/man3/mallinfo.3:158
2038 msgid ""
2039 "The remaining three arguments specify which of the allocated blocks should "
2040 "be freed with B<free>(3).  These three arguments are optional, and specify "
2041 "(in order): the step size to be used in the loop that frees blocks (the "
2042 "default is 1, meaning free all blocks in the range); the ordinal position of "
2043 "the first block to be freed (default 0, meaning the first allocated block); "
2044 "and a number one greater than the ordinal position of the last block to be "
2045 "freed (default is one greater than the maximum block number).  If these "
2046 "three arguments are omitted, then the defaults cause all allocated blocks to "
2047 "be freed."
2048 msgstr ""
2049
2050 #. type: Plain text
2051 #: build/C/man3/mallinfo.3:162
2052 msgid ""
2053 "In the following example run of the program, 1000 allocations of 100 bytes "
2054 "are performed, and then every second allocated block is freed:"
2055 msgstr ""
2056
2057 #. type: Plain text
2058 #: build/C/man3/mallinfo.3:177
2059 #, no-wrap
2060 msgid ""
2061 "$ B<./a.out 1000 100 2>\n"
2062 "============== Before allocating blocks ==============\n"
2063 "Total non-mmapped bytes (arena):       0\n"
2064 "# of free chunks (ordblks):            1\n"
2065 "# of free fastbin blocks (smblks):     0\n"
2066 "# of mapped regions (hblks):           0\n"
2067 "Bytes in mapped regions (hblkhd):      0\n"
2068 "Max. total allocated space (usmblks):  0\n"
2069 "Free bytes held in fastbins (fsmblks): 0\n"
2070 "Total allocated space (uordblks):      0\n"
2071 "Total free space (fordblks):           0\n"
2072 "Topmost releasable block (keepcost):   0\n"
2073 msgstr ""
2074 "$ B<./a.out 1000 100 2>\n"
2075 "============== Before allocating blocks ==============\n"
2076 "Total non-mmapped bytes (arena):       0\n"
2077 "# of free chunks (ordblks):            1\n"
2078 "# of free fastbin blocks (smblks):     0\n"
2079 "# of mapped regions (hblks):           0\n"
2080 "Bytes in mapped regions (hblkhd):      0\n"
2081 "Max. total allocated space (usmblks):  0\n"
2082 "Free bytes held in fastbins (fsmblks): 0\n"
2083 "Total allocated space (uordblks):      0\n"
2084 "Total free space (fordblks):           0\n"
2085 "Topmost releasable block (keepcost):   0\n"
2086
2087 #. type: Plain text
2088 #: build/C/man3/mallinfo.3:189
2089 #, no-wrap
2090 msgid ""
2091 "============== After allocating blocks ==============\n"
2092 "Total non-mmapped bytes (arena):       135168\n"
2093 "# of free chunks (ordblks):            1\n"
2094 "# of free fastbin blocks (smblks):     0\n"
2095 "# of mapped regions (hblks):           0\n"
2096 "Bytes in mapped regions (hblkhd):      0\n"
2097 "Max. total allocated space (usmblks):  0\n"
2098 "Free bytes held in fastbins (fsmblks): 0\n"
2099 "Total allocated space (uordblks):      104000\n"
2100 "Total free space (fordblks):           31168\n"
2101 "Topmost releasable block (keepcost):   31168\n"
2102 msgstr ""
2103 "============== After allocating blocks ==============\n"
2104 "Total non-mmapped bytes (arena):       135168\n"
2105 "# of free chunks (ordblks):            1\n"
2106 "# of free fastbin blocks (smblks):     0\n"
2107 "# of mapped regions (hblks):           0\n"
2108 "Bytes in mapped regions (hblkhd):      0\n"
2109 "Max. total allocated space (usmblks):  0\n"
2110 "Free bytes held in fastbins (fsmblks): 0\n"
2111 "Total allocated space (uordblks):      104000\n"
2112 "Total free space (fordblks):           31168\n"
2113 "Topmost releasable block (keepcost):   31168\n"
2114
2115 #. type: Plain text
2116 #: build/C/man3/mallinfo.3:201
2117 #, no-wrap
2118 msgid ""
2119 "============== After freeing blocks ==============\n"
2120 "Total non-mmapped bytes (arena):       135168\n"
2121 "# of free chunks (ordblks):            501\n"
2122 "# of free fastbin blocks (smblks):     0\n"
2123 "# of mapped regions (hblks):           0\n"
2124 "Bytes in mapped regions (hblkhd):      0\n"
2125 "Max. total allocated space (usmblks):  0\n"
2126 "Free bytes held in fastbins (fsmblks): 0\n"
2127 "Total allocated space (uordblks):      52000\n"
2128 "Total free space (fordblks):           83168\n"
2129 "Topmost releasable block (keepcost):   31168\n"
2130 msgstr ""
2131 "============== After freeing blocks ==============\n"
2132 "Total non-mmapped bytes (arena):       135168\n"
2133 "# of free chunks (ordblks):            501\n"
2134 "# of free fastbin blocks (smblks):     0\n"
2135 "# of mapped regions (hblks):           0\n"
2136 "Bytes in mapped regions (hblkhd):      0\n"
2137 "Max. total allocated space (usmblks):  0\n"
2138 "Free bytes held in fastbins (fsmblks): 0\n"
2139 "Total allocated space (uordblks):      52000\n"
2140 "Total free space (fordblks):           83168\n"
2141 "Topmost releasable block (keepcost):   31168\n"
2142
2143 #. type: SS
2144 #: build/C/man3/mallinfo.3:203 build/C/man3/malloc_info.3:167
2145 #: build/C/man3/mallopt.3:532 build/C/man3/mcheck.3:176
2146 #: build/C/man2/mmap.2:642 build/C/man2/mprotect.2:165
2147 #, no-wrap
2148 msgid "Program source"
2149 msgstr "プログラムのソース"
2150
2151 #. type: Plain text
2152 #: build/C/man3/mallinfo.3:208
2153 #, no-wrap
2154 msgid ""
2155 "#include E<lt>malloc.hE<gt>\n"
2156 "#include \"tlpi_hdr.h\"\n"
2157 msgstr ""
2158 "#include E<lt>malloc.hE<gt>\n"
2159 "#include \"tlpi_hdr.h\"\n"
2160
2161 #. type: Plain text
2162 #: build/C/man3/mallinfo.3:213
2163 #, no-wrap
2164 msgid ""
2165 "static void\n"
2166 "display_mallinfo(void)\n"
2167 "{\n"
2168 "    struct mallinfo mi;\n"
2169 msgstr ""
2170 "static void\n"
2171 "display_mallinfo(void)\n"
2172 "{\n"
2173 "    struct mallinfo mi;\n"
2174
2175 #. type: Plain text
2176 #: build/C/man3/mallinfo.3:215
2177 #, no-wrap
2178 msgid "    mi = mallinfo();\n"
2179 msgstr "    mi = mallinfo();\n"
2180
2181 #. type: Plain text
2182 #: build/C/man3/mallinfo.3:227
2183 #, no-wrap
2184 msgid ""
2185 "    printf(\"Total non-mmapped bytes (arena):       %d\\en\", mi.arena);\n"
2186 "    printf(\"# of free chunks (ordblks):            %d\\en\", mi.ordblks);\n"
2187 "    printf(\"# of free fastbin blocks (smblks):     %d\\en\", mi.smblks);\n"
2188 "    printf(\"# of mapped regions (hblks):           %d\\en\", mi.hblks);\n"
2189 "    printf(\"Bytes in mapped regions (hblkhd):      %d\\en\", mi.hblkhd);\n"
2190 "    printf(\"Max. total allocated space (usmblks):  %d\\en\", mi.usmblks);\n"
2191 "    printf(\"Free bytes held in fastbins (fsmblks): %d\\en\", mi.fsmblks);\n"
2192 "    printf(\"Total allocated space (uordblks):      %d\\en\", mi.uordblks);\n"
2193 "    printf(\"Total free space (fordblks):           %d\\en\", mi.fordblks);\n"
2194 "    printf(\"Topmost releasable block (keepcost):   %d\\en\", mi.keepcost);\n"
2195 "}\n"
2196 msgstr ""
2197 "    printf(\"Total non-mmapped bytes (arena):       %d\\en\", mi.arena);\n"
2198 "    printf(\"# of free chunks (ordblks):            %d\\en\", mi.ordblks);\n"
2199 "    printf(\"# of free fastbin blocks (smblks):     %d\\en\", mi.smblks);\n"
2200 "    printf(\"# of mapped regions (hblks):           %d\\en\", mi.hblks);\n"
2201 "    printf(\"Bytes in mapped regions (hblkhd):      %d\\en\", mi.hblkhd);\n"
2202 "    printf(\"Max. total allocated space (usmblks):  %d\\en\", mi.usmblks);\n"
2203 "    printf(\"Free bytes held in fastbins (fsmblks): %d\\en\", mi.fsmblks);\n"
2204 "    printf(\"Total allocated space (uordblks):      %d\\en\", mi.uordblks);\n"
2205 "    printf(\"Total free space (fordblks):           %d\\en\", mi.fordblks);\n"
2206 "    printf(\"Topmost releasable block (keepcost):   %d\\en\", mi.keepcost);\n"
2207 "}\n"
2208
2209 #. type: Plain text
2210 #: build/C/man3/mallinfo.3:235
2211 #, no-wrap
2212 msgid ""
2213 "int\n"
2214 "main(int argc, char *argv[])\n"
2215 "{\n"
2216 "#define MAX_ALLOCS 2000000\n"
2217 "    char *alloc[MAX_ALLOCS];\n"
2218 "    int numBlocks, j, freeBegin, freeEnd, freeStep;\n"
2219 "    size_t blockSize;\n"
2220 msgstr ""
2221 "int\n"
2222 "main(int argc, char *argv[])\n"
2223 "{\n"
2224 "#define MAX_ALLOCS 2000000\n"
2225 "    char *alloc[MAX_ALLOCS];\n"
2226 "    int numBlocks, j, freeBegin, freeEnd, freeStep;\n"
2227 "    size_t blockSize;\n"
2228
2229 #. type: Plain text
2230 #: build/C/man3/mallinfo.3:239
2231 #, no-wrap
2232 msgid ""
2233 "    if (argc E<lt> 3 || strcmp(argv[1], \"--help\") == 0)\n"
2234 "        usageErr(\"%s num-blocks block-size [free-step [start-free \"\n"
2235 "                \"[end-free]]]\\en\", argv[0]);\n"
2236 msgstr ""
2237 "    if (argc E<lt> 3 || strcmp(argv[1], \"--help\") == 0)\n"
2238 "        usageErr(\"%s num-blocks block-size [free-step [start-free \"\n"
2239 "                \"[end-free]]]\\en\", argv[0]);\n"
2240
2241 #. type: Plain text
2242 #: build/C/man3/mallinfo.3:245
2243 #, no-wrap
2244 msgid ""
2245 "    numBlocks = atoi(argv[1]);\n"
2246 "    blockSize = atoi(argv[2]);\n"
2247 "    freeStep = (argc E<gt> 3) ? atoi(argv[3]) : 1;\n"
2248 "    freeBegin = (argc E<gt> 4) ? atoi(argv[4]) : 0;\n"
2249 "    freeEnd = (argc E<gt> 5) ? atoi(argv[5]) : numBlocks;\n"
2250 msgstr ""
2251 "    numBlocks = atoi(argv[1]);\n"
2252 "    blockSize = atoi(argv[2]);\n"
2253 "    freeStep = (argc E<gt> 3) ? atoi(argv[3]) : 1;\n"
2254 "    freeBegin = (argc E<gt> 4) ? atoi(argv[4]) : 0;\n"
2255 "    freeEnd = (argc E<gt> 5) ? atoi(argv[5]) : numBlocks;\n"
2256
2257 #. type: Plain text
2258 #: build/C/man3/mallinfo.3:248
2259 #, no-wrap
2260 msgid ""
2261 "    printf(\"============== Before allocating blocks ==============\\en\");\n"
2262 "    display_mallinfo();\n"
2263 msgstr ""
2264 "    printf(\"============== Before allocating blocks ==============\\en\");\n"
2265 "    display_mallinfo();\n"
2266
2267 #. type: Plain text
2268 #: build/C/man3/mallinfo.3:252
2269 #, no-wrap
2270 msgid ""
2271 "    for (j = 0; j E<lt> numBlocks; j++) {\n"
2272 "        if (numBlocks E<gt>= MAX_ALLOCS)\n"
2273 "            fatal(\"Too many allocations\");\n"
2274 msgstr ""
2275 "    for (j = 0; j E<lt> numBlocks; j++) {\n"
2276 "        if (numBlocks E<gt>= MAX_ALLOCS)\n"
2277 "            fatal(\"Too many allocations\");\n"
2278
2279 #. type: Plain text
2280 #: build/C/man3/mallinfo.3:257
2281 #, no-wrap
2282 msgid ""
2283 "        alloc[j] = malloc(blockSize);\n"
2284 "        if (alloc[j] == NULL)\n"
2285 "            errExit(\"malloc\");\n"
2286 "    }\n"
2287 msgstr ""
2288 "        alloc[j] = malloc(blockSize);\n"
2289 "        if (alloc[j] == NULL)\n"
2290 "            errExit(\"malloc\");\n"
2291 "    }\n"
2292
2293 #. type: Plain text
2294 #: build/C/man3/mallinfo.3:260
2295 #, no-wrap
2296 msgid ""
2297 "    printf(\"\\en============== After allocating blocks ==============\\en\");\n"
2298 "    display_mallinfo();\n"
2299 msgstr ""
2300 "    printf(\"\\en============== After allocating blocks ==============\\en\");\n"
2301 "    display_mallinfo();\n"
2302
2303 #. type: Plain text
2304 #: build/C/man3/mallinfo.3:263
2305 #, no-wrap
2306 msgid ""
2307 "    for (j = freeBegin; j E<lt> freeEnd; j += freeStep)\n"
2308 "        free(alloc[j]);\n"
2309 msgstr ""
2310 "    for (j = freeBegin; j E<lt> freeEnd; j += freeStep)\n"
2311 "        free(alloc[j]);\n"
2312
2313 #. type: Plain text
2314 #: build/C/man3/mallinfo.3:266
2315 #, no-wrap
2316 msgid ""
2317 "    printf(\"\\en============== After freeing blocks ==============\\en\");\n"
2318 "    display_mallinfo();\n"
2319 msgstr ""
2320 "    printf(\"\\en============== After freeing blocks ==============\\en\");\n"
2321 "    display_mallinfo();\n"
2322
2323 #. type: Plain text
2324 #: build/C/man3/mallinfo.3:269 build/C/man3/malloc_info.3:255
2325 #: build/C/man3/mallopt.3:565 build/C/man3/mcheck.3:203
2326 #: build/C/man2/mmap.2:711
2327 #, no-wrap
2328 msgid ""
2329 "    exit(EXIT_SUCCESS);\n"
2330 "}\n"
2331 msgstr ""
2332 "    exit(EXIT_SUCCESS);\n"
2333 "}\n"
2334
2335 #. type: Plain text
2336 #: build/C/man3/mallinfo.3:279
2337 msgid ""
2338 "B<mmap>(2), B<malloc>(3), B<malloc_info>(3), B<malloc_stats>(3), "
2339 "B<malloc_trim>(3), B<mallopt>(3)"
2340 msgstr ""
2341 "B<mmap>(2), B<malloc>(3), B<malloc_info>(3), B<malloc_stats>(3), "
2342 "B<malloc_trim>(3), B<mallopt>(3)"
2343
2344 #. type: TH
2345 #: build/C/man3/malloc_get_state.3:25
2346 #, no-wrap
2347 msgid "MALLOC_GET_STATE"
2348 msgstr "MALLOC_GET_STATE"
2349
2350 #. type: TH
2351 #: build/C/man3/malloc_get_state.3:25
2352 #, no-wrap
2353 msgid "2012-05-04"
2354 msgstr "2012-05-04"
2355
2356 #. type: Plain text
2357 #: build/C/man3/malloc_get_state.3:28
2358 msgid ""
2359 "malloc_get_state, malloc_set_state - record and restore state of malloc "
2360 "implementation"
2361 msgstr ""
2362
2363 #. type: Plain text
2364 #: build/C/man3/malloc_get_state.3:31 build/C/man3/posix_memalign.3:35
2365 #, no-wrap
2366 msgid "B<#include E<lt>stdlib.hE<gt>>\n"
2367 msgstr "B<#include E<lt>stdlib.hE<gt>>\n"
2368
2369 #. type: Plain text
2370 #: build/C/man3/malloc_get_state.3:33
2371 #, no-wrap
2372 msgid "B<void* malloc_get_state(void);>\n"
2373 msgstr "B<void* malloc_get_state(void);>\n"
2374
2375 #. type: Plain text
2376 #: build/C/man3/malloc_get_state.3:35
2377 #, no-wrap
2378 msgid "B<int malloc_set_state(void *>I<state>B<);>\n"
2379 msgstr "B<int malloc_set_state(void *>I<state>B<);>\n"
2380
2381 #. type: Plain text
2382 #: build/C/man3/malloc_get_state.3:53
2383 msgid ""
2384 "The B<malloc_get_state>()  function records the current state of all "
2385 "B<malloc>(3)  internal bookkeeping variables (but not the actual contents of "
2386 "the heap or the state of B<malloc_hook>(3)  functions pointers).  The state "
2387 "is recorded in a system-dependent opaque data structure dynamically "
2388 "allocated via B<malloc>(3), and a pointer to that data structure is returned "
2389 "as the function result.  (It is the caller's responsibility to B<free>(3)  "
2390 "this memory.)"
2391 msgstr ""
2392
2393 #. type: Plain text
2394 #: build/C/man3/malloc_get_state.3:61
2395 msgid ""
2396 "The B<malloc_set_state>()  function restores the state of all B<malloc>(3)  "
2397 "internal bookkeeping variables to the values recorded in the opaque data "
2398 "structure pointed to by I<state>."
2399 msgstr ""
2400
2401 #. type: Plain text
2402 #: build/C/man3/malloc_get_state.3:68
2403 msgid ""
2404 "On success, B<malloc_get_state>()  returns a pointer to a newly allocated "
2405 "opaque data structure.  On error (for example, memory could not be allocated "
2406 "for the data structure), B<malloc_get_state>()  returns NULL."
2407 msgstr ""
2408
2409 #.  if(ms->magic != MALLOC_STATE_MAGIC) return -1;
2410 #.  /* Must fail if the major version is too high. */
2411 #.  if((ms->version & ~0xffl) > (MALLOC_STATE_VERSION & ~0xffl)) return -2;
2412 #. type: Plain text
2413 #: build/C/man3/malloc_get_state.3:86
2414 msgid ""
2415 "On success, B<malloc_set_state>()  returns 0.  If the implementation detects "
2416 "that I<state> does not point to a correctly formed data structure, "
2417 "B<malloc_set_state>()  returns -1.  If the implementation detects that the "
2418 "version of the data structure referred to by I<state> is a more recent "
2419 "version than this implementation knows about, B<malloc_set_state>()  returns "
2420 "-2."
2421 msgstr ""
2422
2423 #. type: Plain text
2424 #: build/C/man3/malloc_get_state.3:88 build/C/man3/malloc_hook.3:82
2425 #: build/C/man3/mcheck.3:147 build/C/man3/mtrace.3:80
2426 msgid "These functions are GNU extensions."
2427 msgstr "これらの関数は GNU による拡張である。"
2428
2429 #. type: Plain text
2430 #: build/C/man3/malloc_get_state.3:94
2431 msgid ""
2432 "These functions are especially useful when using this B<malloc>(3)  "
2433 "implementation as part of a shared library, and the heap contents are saved/"
2434 "restored via some other method.  This technique is used by the GNU Emacs to "
2435 "implement its \"dumping\" function."
2436 msgstr ""
2437
2438 #.  i.e., calls __malloc_check_init()
2439 #.  i.e., malloc checking is not already in use
2440 #.  and the caller requested malloc checking
2441 #. type: Plain text
2442 #: build/C/man3/malloc_get_state.3:111
2443 msgid ""
2444 "Hook function pointers are never saved or restored by these functions, with "
2445 "two exceptions: if malloc checking (see B<mallopt>(3))  was in use when "
2446 "B<malloc_get_state>()  was called, then B<malloc_set_state>()  resets malloc "
2447 "checking hooks if possible; if malloc checking was not in use in the "
2448 "recorded state, but the caller has requested malloc checking, then the hooks "
2449 "are reset to 0."
2450 msgstr ""
2451
2452 #. type: Plain text
2453 #: build/C/man3/malloc_get_state.3:114
2454 msgid "B<malloc>(3), B<mallopt>(3)"
2455 msgstr "B<malloc>(3), B<mallopt>(3)"
2456
2457 #. type: TH
2458 #: build/C/man3/malloc_hook.3:10
2459 #, no-wrap
2460 msgid "MALLOC_HOOK"
2461 msgstr "MALLOC_HOOK"
2462
2463 #. type: TH
2464 #: build/C/man3/malloc_hook.3:10
2465 #, no-wrap
2466 msgid "2010-10-13"
2467 msgstr "2010-10-13"
2468
2469 #. type: Plain text
2470 #: build/C/man3/malloc_hook.3:15
2471 msgid ""
2472 "__malloc_hook, __malloc_initialize_hook, __memalign_hook, __free_hook, "
2473 "__realloc_hook, __after_morecore_hook - malloc debugging variables"
2474 msgstr ""
2475 "__malloc_hook, __malloc_initialize_hook, __memalign_hook, __free_hook, "
2476 "__realloc_hook, __after_morecore_hook - malloc デバッグ用の変数"
2477
2478 #. type: Plain text
2479 #: build/C/man3/malloc_hook.3:18 build/C/man3/malloc_info.3:31
2480 #: build/C/man3/posix_memalign.3:41
2481 #, no-wrap
2482 msgid "B<#include E<lt>malloc.hE<gt>>\n"
2483 msgstr "B<#include E<lt>malloc.hE<gt>>\n"
2484
2485 #. type: Plain text
2486 #: build/C/man3/malloc_hook.3:20
2487 #, no-wrap
2488 msgid "B<void *(*__malloc_hook)(size_t >I<size>B<, const void *>I<caller>B<);>\n"
2489 msgstr "B<void *(*__malloc_hook)(size_t >I<size>B<, const void *>I<caller>B<);>\n"
2490
2491 #. type: Plain text
2492 #: build/C/man3/malloc_hook.3:23
2493 #, no-wrap
2494 msgid "B<void *(*__realloc_hook)(void *>I<ptr>B<, size_t >I<size>B<, const void *>I<caller>B<);>\n"
2495 msgstr "B<void *(*__realloc_hook)(void *>I<ptr>B<, size_t >I<size>B<, const void *>I<caller>B<);>\n"
2496
2497 #. type: Plain text
2498 #: build/C/man3/malloc_hook.3:26
2499 #, no-wrap
2500 msgid ""
2501 "B<void *(*__memalign_hook)(size_t >I<alignment>B<, size_t >I<size>B<,>\n"
2502 "B<                         const void *>I<caller>B<);>\n"
2503 msgstr ""
2504 "B<void *(*__memalign_hook)(size_t >I<alignment>B<, size_t >I<size>B<,>\n"
2505 "B<                         const void *>I<caller>B<);>\n"
2506
2507 #. type: Plain text
2508 #: build/C/man3/malloc_hook.3:28
2509 #, no-wrap
2510 msgid "B<void (*__free_hook)(void *>I<ptr>B<, const void *>I<caller>B<);>\n"
2511 msgstr "B<void (*__free_hook)(void *>I<ptr>B<, const void *>I<caller>B<);>\n"
2512
2513 #. type: Plain text
2514 #: build/C/man3/malloc_hook.3:30
2515 #, no-wrap
2516 msgid "B<void (*__malloc_initialize_hook)(void);>\n"
2517 msgstr "B<void (*__malloc_initialize_hook)(void);>\n"
2518
2519 #. type: Plain text
2520 #: build/C/man3/malloc_hook.3:32
2521 #, no-wrap
2522 msgid "B<void (*__after_morecore_hook)(void);>\n"
2523 msgstr "B<void (*__after_morecore_hook)(void);>\n"
2524
2525 #. type: Plain text
2526 #: build/C/man3/malloc_hook.3:43
2527 msgid ""
2528 "The GNU C library lets you modify the behavior of B<malloc>(3), B<realloc>"
2529 "(3), and B<free>(3)  by specifying appropriate hook functions.  You can use "
2530 "these hooks to help you debug programs that use dynamic memory allocation, "
2531 "for example."
2532 msgstr ""
2533 "GNU C ライブラリでは、適切なフック関数 (hook function) を指定することで "
2534 "B<malloc>(3), B<realloc>(3), B<free>(3)  の動作を変更することができる。例え"
2535 "ば、動的にメモリ割り当てを行う プログラムのデバッグにこれらのフックを使うこと"
2536 "ができる。"
2537
2538 #. type: Plain text
2539 #: build/C/man3/malloc_hook.3:50
2540 msgid ""
2541 "The variable B<__malloc_initialize_hook> points at a function that is called "
2542 "once when the malloc implementation is initialized.  This is a weak "
2543 "variable, so it can be overridden in the application with a definition like "
2544 "the following:"
2545 msgstr ""
2546 "変数 B<__malloc_initialize_hook> は malloc の実装が初期化される際に一度だけ呼"
2547 "ばれる関数へのポインタである。 この変数は書き換え可能 (weak) であり、アプリ"
2548 "ケーション内で 以下のような定義で上書きできる:"
2549
2550 #. type: Plain text
2551 #: build/C/man3/malloc_hook.3:53
2552 #, no-wrap
2553 msgid "    void (*__malloc_initialize_hook)(void) = my_init_hook;\n"
2554 msgstr "    void (*__malloc_initialize_hook)(void) = my_init_hook;\n"
2555
2556 #. type: Plain text
2557 #: build/C/man3/malloc_hook.3:58
2558 msgid ""
2559 "Now the function I<my_init_hook>()  can do the initialization of all hooks."
2560 msgstr ""
2561 "なお、関数 I<my_init_hook>()  で全てのフックの初期化をすることができる。"
2562
2563 #. type: Plain text
2564 #: build/C/man3/malloc_hook.3:74
2565 msgid ""
2566 "The four functions pointed to by B<__malloc_hook>, B<__realloc_hook>, "
2567 "B<__memalign_hook>, B<__free_hook> have a prototype like the functions "
2568 "B<malloc>(3), B<realloc>(3), B<memalign>(3), B<free>(3), respectively, "
2569 "except that they have a final argument I<caller> that gives the address of "
2570 "the caller of B<malloc>(3), etc."
2571 msgstr ""
2572 "B<__malloc_hook>, B<__realloc_hook>, B<__memalign_hook>, B<__free_hook> で指"
2573 "される 4 つの関数は、各々 B<malloc>(3), B<realloc>(3), B<memalign>(3), "
2574 "B<free>(3)  とよく似たプロトタイプを持っているが、 一番最後の引き数 "
2575 "I<caller> をとる点が異なる。 引き数 I<caller> には、 B<malloc>(3)  などの呼び"
2576 "出し元 (caller) のアドレスが格納される。"
2577
2578 #. type: Plain text
2579 #: build/C/man3/malloc_hook.3:80
2580 msgid ""
2581 "The variable B<__after_morecore_hook> points at a function that is called "
2582 "each time after B<sbrk>(2)  was asked for more memory."
2583 msgstr ""
2584 "変数 B<__after_morecore_hook> は、領域の追加要求があり B<sbrk>(2)  が呼ばれた"
2585 "後で毎回呼び出される関数へのポインタである。"
2586
2587 #.  https://bugzilla.redhat.com/show_bug.cgi?id=450187
2588 #.  http://sourceware.org/bugzilla/show_bug.cgi?id=9957
2589 #. type: Plain text
2590 #: build/C/man3/malloc_hook.3:89
2591 msgid ""
2592 "The use of these hook functions is not safe in multithreaded programs, and "
2593 "they are now deprecated.  Programmers should instead preempt calls to the "
2594 "relevant functions by defining and exporting functions such as \"malloc\" "
2595 "and \"free\"."
2596 msgstr ""
2597 "マルチスレッドプログラムでは、 これらのフック関数の使用は安全ではなく、 今で"
2598 "は非推奨である。 プログラマは、 \"malloc\" や \"free\" のような関数を定義して"
2599 "公開して、 関連する関数を呼び出すようにすべきである。"
2600
2601 #. type: Plain text
2602 #: build/C/man3/malloc_hook.3:91
2603 msgid "Here is a short example of how to use these variables."
2604 msgstr "これらの変数の使い方の簡単な例を以下に示す。"
2605
2606 #. type: Plain text
2607 #: build/C/man3/malloc_hook.3:95
2608 #, no-wrap
2609 msgid ""
2610 "#include E<lt>stdio.hE<gt>\n"
2611 "#include E<lt>malloc.hE<gt>\n"
2612 msgstr ""
2613 "#include E<lt>stdio.hE<gt>\n"
2614 "#include E<lt>malloc.hE<gt>\n"
2615
2616 #. type: Plain text
2617 #: build/C/man3/malloc_hook.3:99
2618 #, no-wrap
2619 msgid ""
2620 "/* Prototypes for our hooks.  */\n"
2621 "static void my_init_hook(void);\n"
2622 "static void *my_malloc_hook(size_t, const void *);\n"
2623 msgstr ""
2624 "/* 使おうとするフックのプロトタイプ宣言 */\n"
2625 "static void my_init_hook(void);\n"
2626 "static void *my_malloc_hook(size_t, const void *);\n"
2627
2628 #. type: Plain text
2629 #: build/C/man3/malloc_hook.3:102
2630 #, no-wrap
2631 msgid ""
2632 "/* Variables to save original hooks. */\n"
2633 "static void *(*old_malloc_hook)(size_t, const void *);\n"
2634 msgstr ""
2635 "/* 元々のフックを保存するための変数 */\n"
2636 "static void *(*old_malloc_hook)(size_t, const void *);\n"
2637
2638 #. type: Plain text
2639 #: build/C/man3/malloc_hook.3:105
2640 #, no-wrap
2641 msgid ""
2642 "/* Override initializing hook from the C library. */\n"
2643 "void (*__malloc_initialize_hook) (void) = my_init_hook;\n"
2644 msgstr ""
2645 "/* C ライブラリから呼ばれる初期化フックを上書きする */\n"
2646 "void (*__malloc_initialize_hook) (void) = my_init_hook;\n"
2647
2648 #. type: Plain text
2649 #: build/C/man3/malloc_hook.3:112
2650 #, no-wrap
2651 msgid ""
2652 "static void\n"
2653 "my_init_hook(void)\n"
2654 "{\n"
2655 "    old_malloc_hook = __malloc_hook;\n"
2656 "    __malloc_hook = my_malloc_hook;\n"
2657 "}\n"
2658 msgstr ""
2659 "static void\n"
2660 "my_init_hook(void)\n"
2661 "{\n"
2662 "    old_malloc_hook = __malloc_hook;\n"
2663 "    __malloc_hook = my_malloc_hook;\n"
2664 "}\n"
2665
2666 #. type: Plain text
2667 #: build/C/man3/malloc_hook.3:117
2668 #, no-wrap
2669 msgid ""
2670 "static void *\n"
2671 "my_malloc_hook(size_t size, const void *caller)\n"
2672 "{\n"
2673 "    void *result;\n"
2674 msgstr ""
2675 "static void *\n"
2676 "my_malloc_hook(size_t size, const void *caller)\n"
2677 "{\n"
2678 "    void *result;\n"
2679
2680 #. type: Plain text
2681 #: build/C/man3/malloc_hook.3:120
2682 #, no-wrap
2683 msgid ""
2684 "    /* Restore all old hooks */\n"
2685 "    __malloc_hook = old_malloc_hook;\n"
2686 msgstr ""
2687 "    /* 元々のフックを全て戻す */\n"
2688 "    __malloc_hook = old_malloc_hook;\n"
2689
2690 #. type: Plain text
2691 #: build/C/man3/malloc_hook.3:123
2692 #, no-wrap
2693 msgid ""
2694 "    /* Call recursively */\n"
2695 "    result = malloc(size);\n"
2696 msgstr ""
2697 "    /* malloc の再帰的呼び出し */\n"
2698 "    result = malloc(size);\n"
2699
2700 #. type: Plain text
2701 #: build/C/man3/malloc_hook.3:126
2702 #, no-wrap
2703 msgid ""
2704 "    /* Save underlying hooks */\n"
2705 "    old_malloc_hook = __malloc_hook;\n"
2706 msgstr ""
2707 "    /* 現在設定されているフック (underlying hook) を保存する */\n"
2708 "    old_malloc_hook = __malloc_hook;\n"
2709
2710 #. type: Plain text
2711 #: build/C/man3/malloc_hook.3:130
2712 #, no-wrap
2713 msgid ""
2714 "    /* printf() might call malloc(), so protect it too. */\n"
2715 "    printf(\"malloc(%u) called from %p returns %p\\en\",\n"
2716 "            (unsigned int) size, caller, result);\n"
2717 msgstr ""
2718 "    /* printf() は malloc() を呼び出す可能性があるので\n"
2719 "        ここでもガードを行う (元々のフックのままにしておく) */\n"
2720 "    printf(\"malloc(%u) called from %p returns %p\\en\",\n"
2721 "            (unsigned int) size, caller, result);\n"
2722
2723 #. type: Plain text
2724 #: build/C/man3/malloc_hook.3:133
2725 #, no-wrap
2726 msgid ""
2727 "    /* Restore our own hooks */\n"
2728 "    __malloc_hook = my_malloc_hook;\n"
2729 msgstr ""
2730 "    /* ユーザが使おうとするフックを再設定する */\n"
2731 "    __malloc_hook = my_malloc_hook;\n"
2732
2733 #. type: Plain text
2734 #: build/C/man3/malloc_hook.3:136
2735 #, no-wrap
2736 msgid ""
2737 "    return result;\n"
2738 "}\n"
2739 msgstr ""
2740 "    return result;\n"
2741 "}\n"
2742
2743 #. type: Plain text
2744 #: build/C/man3/malloc_hook.3:142
2745 msgid "B<mallinfo>(3), B<malloc>(3), B<mcheck>(3), B<mtrace>(3)"
2746 msgstr "B<mallinfo>(3), B<malloc>(3), B<mcheck>(3), B<mtrace>(3)"
2747
2748 #. type: TH
2749 #: build/C/man3/malloc_info.3:25
2750 #, no-wrap
2751 msgid "MALLOC_INFO"
2752 msgstr "MALLOC_INFO"
2753
2754 #. type: TH
2755 #: build/C/man3/malloc_info.3:25 build/C/man2/shmget.2:38
2756 #, no-wrap
2757 msgid "2013-04-19"
2758 msgstr "2013-04-19"
2759
2760 #. type: Plain text
2761 #: build/C/man3/malloc_info.3:28
2762 msgid "malloc_info - export malloc state to a stream"
2763 msgstr "malloc_info - malloc の状態をストリームに出力する"
2764
2765 #. type: Plain text
2766 #: build/C/man3/malloc_info.3:33
2767 #, no-wrap
2768 msgid "B<int malloc_info(int >I<options>B<, FILE *>I<fp>B<);>\n"
2769 msgstr "B<int malloc_info(int >I<options>B<, FILE *>I<fp>B<);>\n"
2770
2771 #. type: Plain text
2772 #: build/C/man3/malloc_info.3:44
2773 msgid ""
2774 "The B<malloc_info>()  function exports an XML string that describes the "
2775 "current state of the memory-allocation implementation in the caller.  The "
2776 "string is printed on the file stream I<fp>.  The exported string includes "
2777 "information about all arenas (see B<malloc>(3))."
2778 msgstr ""
2779 "B<malloc_info>() 関数は、 呼び出し元のメモリ割り当て実装の現在の状態を表す "
2780 "XML 文字列を出力する。 文字列は、 ファイルストリーム I<fp> に出力される。 出"
2781 "力された文字列には、 全ての割り当て領域の情報が含まれる (B<malloc>(3) 参照)。"
2782
2783 #. type: Plain text
2784 #: build/C/man3/malloc_info.3:48
2785 msgid "As currently implemented, I<options> must be zero."
2786 msgstr "現在の実装では、 I<options> は 0 でなければならない。"
2787
2788 #. type: Plain text
2789 #: build/C/man3/malloc_info.3:55
2790 msgid ""
2791 "On success, B<malloc_info>()  returns 0; on error, it returns -1, with "
2792 "I<errno> set to indicate the cause."
2793 msgstr ""
2794 "B<malloc_info>() は、成功すると 0 を返す。 エラーの場合、-1 を返し、 "
2795 "I<errno> にエラーの原因を示す値を設定する。"
2796
2797 #. type: Plain text
2798 #: build/C/man3/malloc_info.3:60
2799 msgid "I<options> was nonzero."
2800 msgstr "I<options> が 0 でなかった。"
2801
2802 #. type: Plain text
2803 #: build/C/man3/malloc_info.3:63
2804 msgid "B<malloc_info>()  was added to glibc in version 2.10."
2805 msgstr "B<malloc_info>() は glibc バージョン 2.10 で追加された。"
2806
2807 #. type: Plain text
2808 #: build/C/man3/malloc_info.3:65 build/C/man3/malloc_stats.3:57
2809 #: build/C/man3/malloc_trim.3:62 build/C/man3/malloc_usable_size.3:50
2810 msgid "This function is a GNU extension."
2811 msgstr "この関数は GNU による拡張である。"
2812
2813 #. type: Plain text
2814 #: build/C/man3/malloc_info.3:71
2815 msgid ""
2816 "The memory-allocation information is provided as an XML string (rather than "
2817 "a C structure)  because the information may change over time (according to "
2818 "changes in the underlying implementation).  The output XML string includes a "
2819 "version field."
2820 msgstr ""
2821 "メモリ割り当て情報は (C の構造体ではなく) XML 文字列として提供される。 これ"
2822 "は、 この情報は時間をたつと (内部で使用している実装によって) 変わる可能性があ"
2823 "るからである。 出力される XML 文字列にはバージョンフィールドが付いている。"
2824
2825 #. type: Plain text
2826 #: build/C/man3/malloc_info.3:77
2827 msgid ""
2828 "The B<open_memstream>(3)  function can be used to send the output of "
2829 "B<malloc_info>()  directly into a buffer in memory, rather than to a file."
2830 msgstr ""
2831 "B<open_memstream>(3) 関数を使うと、 B<malloc_info>() の出力を、 ファイルでは"
2832 "なくメモリ内のバッファに直接送ることができる。"
2833
2834 #. type: Plain text
2835 #: build/C/man3/malloc_info.3:84
2836 msgid ""
2837 "The B<malloc_info>()  function is designed to address deficiencies in "
2838 "B<malloc_stats>(3)  and B<mallinfo>(3)."
2839 msgstr ""
2840 "B<malloc_info>() 関数は、 B<malloc_stats>(3) と B<mallinfo>(3) の不備を解決す"
2841 "るために設定された。"
2842
2843 #. type: Plain text
2844 #: build/C/man3/malloc_info.3:95
2845 msgid ""
2846 "The program below takes up to four command-line arguments, of which the "
2847 "first three are mandatory.  The first argument specifies the number of "
2848 "threads that the program should create.  All of the threads, including the "
2849 "main thread, allocate the number of blocks of memory specified by the second "
2850 "argument.  The third argument controls the size of the blocks to be "
2851 "allocated.  The main thread creates blocks of this size, the second thread "
2852 "created by the program allocates blocks of twice this size, the third thread "
2853 "allocates blocks of three times this size, and so on."
2854 msgstr ""
2855 "以下のプログラムは最大で 4 つのコマンドライン引数を取り、 最初の 3 つは必須で"
2856 "ある。 最初の引数は、このプログラムが生成するスレッド数を指定する。 メインス"
2857 "レッドを含む全てのスレッドが第 2 引数で指定した数のメモリブロックの割り当てを"
2858 "行う。 第 3 引数は割り当てるブロックのサイズを制御する。 メインスレッドはこの"
2859 "サイズのブロックを作成し、 このプログラムが生成する 2 番目のスレッドはこのサ"
2860 "イズの 2 倍のサイズのブロックを、 3 番目のスレッドはこのサイズの 3 倍のサイズ"
2861 "のブロックを割り当て、 以下同様である。"
2862
2863 #. type: Plain text
2864 #: build/C/man3/malloc_info.3:102
2865 msgid ""
2866 "The program calls B<malloc_info>()  twice to display the memory-allocation "
2867 "state.  The first call takes place before any threads are created or memory "
2868 "allocated.  The second call is performed after all threads have allocated "
2869 "memory."
2870 msgstr ""
2871 "このプログラムは B<malloc_info>() を 2 回呼び出し、メモリ割り当て状態を表示す"
2872 "る。 最初の呼び出しはスレッドの生成もメモリの割り当ても行われる前に実行され"
2873 "る。 2 回目の呼び出しは全てのスレッドがメモリ割り当てを行った後に実行される。"
2874
2875 #. type: Plain text
2876 #: build/C/man3/malloc_info.3:110
2877 msgid ""
2878 "In the following example, the command-line arguments specify the creation of "
2879 "one additional thread, and both the main thread and the additional thread "
2880 "allocate 10000 blocks of memory.  After the blocks of memory have been "
2881 "allocated, B<malloc_info>()  shows the state of two allocation arenas."
2882 msgstr ""
2883 "以下の例では、 コマンドライン引数で、 追加でスレッドを一つ生成し、メインス"
2884 "レッドと追加のスレッドの両方が 10000 個のメモリブロックを割り当てるように指定"
2885 "している。 メモリブロックの割り当て後の B<malloc_info>() では、 2 つの割り当"
2886 "て領域の状態が表示されている。"
2887
2888 #. type: Plain text
2889 #: build/C/man3/malloc_info.3:135
2890 #, no-wrap
2891 msgid ""
2892 "$ B<getconf GNU_LIBC_VERSION>\n"
2893 "glibc 2.13\n"
2894 "$ B<./a.out 1 10000 100>\n"
2895 "============ Before allocating blocks ============\n"
2896 "E<lt>malloc version=\"1\"E<gt>\n"
2897 "E<lt>heap nr=\"0\"E<gt>\n"
2898 "E<lt>sizesE<gt>\n"
2899 "E<lt>/sizesE<gt>\n"
2900 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
2901 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
2902 "E<lt>system type=\"current\" size=\"135168\"/E<gt>\n"
2903 "E<lt>system type=\"max\" size=\"135168\"/E<gt>\n"
2904 "E<lt>aspace type=\"total\" size=\"135168\"/E<gt>\n"
2905 "E<lt>aspace type=\"mprotect\" size=\"135168\"/E<gt>\n"
2906 "E<lt>/heapE<gt>\n"
2907 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
2908 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
2909 "E<lt>system type=\"current\" size=\"135168\"/E<gt>\n"
2910 "E<lt>system type=\"max\" size=\"135168\"/E<gt>\n"
2911 "E<lt>aspace type=\"total\" size=\"135168\"/E<gt>\n"
2912 "E<lt>aspace type=\"mprotect\" size=\"135168\"/E<gt>\n"
2913 "E<lt>/mallocE<gt>\n"
2914 msgstr ""
2915 "$ B<getconf GNU_LIBC_VERSION>\n"
2916 "glibc 2.13\n"
2917 "$ B<./a.out 1 10000 100>\n"
2918 "============ Before allocating blocks ============\n"
2919 "E<lt>malloc version=\"1\"E<gt>\n"
2920 "E<lt>heap nr=\"0\"E<gt>\n"
2921 "E<lt>sizesE<gt>\n"
2922 "E<lt>/sizesE<gt>\n"
2923 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
2924 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
2925 "E<lt>system type=\"current\" size=\"135168\"/E<gt>\n"
2926 "E<lt>system type=\"max\" size=\"135168\"/E<gt>\n"
2927 "E<lt>aspace type=\"total\" size=\"135168\"/E<gt>\n"
2928 "E<lt>aspace type=\"mprotect\" size=\"135168\"/E<gt>\n"
2929 "E<lt>/heapE<gt>\n"
2930 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
2931 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
2932 "E<lt>system type=\"current\" size=\"135168\"/E<gt>\n"
2933 "E<lt>system type=\"max\" size=\"135168\"/E<gt>\n"
2934 "E<lt>aspace type=\"total\" size=\"135168\"/E<gt>\n"
2935 "E<lt>aspace type=\"mprotect\" size=\"135168\"/E<gt>\n"
2936 "E<lt>/mallocE<gt>\n"
2937
2938 #. type: Plain text
2939 #: build/C/man3/malloc_info.3:165
2940 #, no-wrap
2941 msgid ""
2942 "============ After allocating blocks ============\n"
2943 "E<lt>malloc version=\"1\"E<gt>\n"
2944 "E<lt>heap nr=\"0\"E<gt>\n"
2945 "E<lt>sizesE<gt>\n"
2946 "E<lt>/sizesE<gt>\n"
2947 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
2948 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
2949 "E<lt>system type=\"current\" size=\"1081344\"/E<gt>\n"
2950 "E<lt>system type=\"max\" size=\"1081344\"/E<gt>\n"
2951 "E<lt>aspace type=\"total\" size=\"1081344\"/E<gt>\n"
2952 "E<lt>aspace type=\"mprotect\" size=\"1081344\"/E<gt>\n"
2953 "E<lt>/heapE<gt>\n"
2954 "E<lt>heap nr=\"1\"E<gt>\n"
2955 "E<lt>sizesE<gt>\n"
2956 "E<lt>/sizesE<gt>\n"
2957 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
2958 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
2959 "E<lt>system type=\"current\" size=\"1032192\"/E<gt>\n"
2960 "E<lt>system type=\"max\" size=\"1032192\"/E<gt>\n"
2961 "E<lt>aspace type=\"total\" size=\"1032192\"/E<gt>\n"
2962 "E<lt>aspace type=\"mprotect\" size=\"1032192\"/E<gt>\n"
2963 "E<lt>/heapE<gt>\n"
2964 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
2965 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
2966 "E<lt>system type=\"current\" size=\"2113536\"/E<gt>\n"
2967 "E<lt>system type=\"max\" size=\"2113536\"/E<gt>\n"
2968 "E<lt>aspace type=\"total\" size=\"2113536\"/E<gt>\n"
2969 "E<lt>aspace type=\"mprotect\" size=\"2113536\"/E<gt>\n"
2970 "E<lt>/mallocE<gt>\n"
2971 msgstr ""
2972 "============ After allocating blocks ============\n"
2973 "E<lt>malloc version=\"1\"E<gt>\n"
2974 "E<lt>heap nr=\"0\"E<gt>\n"
2975 "E<lt>sizesE<gt>\n"
2976 "E<lt>/sizesE<gt>\n"
2977 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
2978 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
2979 "E<lt>system type=\"current\" size=\"1081344\"/E<gt>\n"
2980 "E<lt>system type=\"max\" size=\"1081344\"/E<gt>\n"
2981 "E<lt>aspace type=\"total\" size=\"1081344\"/E<gt>\n"
2982 "E<lt>aspace type=\"mprotect\" size=\"1081344\"/E<gt>\n"
2983 "E<lt>/heapE<gt>\n"
2984 "E<lt>heap nr=\"1\"E<gt>\n"
2985 "E<lt>sizesE<gt>\n"
2986 "E<lt>/sizesE<gt>\n"
2987 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
2988 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
2989 "E<lt>system type=\"current\" size=\"1032192\"/E<gt>\n"
2990 "E<lt>system type=\"max\" size=\"1032192\"/E<gt>\n"
2991 "E<lt>aspace type=\"total\" size=\"1032192\"/E<gt>\n"
2992 "E<lt>aspace type=\"mprotect\" size=\"1032192\"/E<gt>\n"
2993 "E<lt>/heapE<gt>\n"
2994 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
2995 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
2996 "E<lt>system type=\"current\" size=\"2113536\"/E<gt>\n"
2997 "E<lt>system type=\"max\" size=\"2113536\"/E<gt>\n"
2998 "E<lt>aspace type=\"total\" size=\"2113536\"/E<gt>\n"
2999 "E<lt>aspace type=\"mprotect\" size=\"2113536\"/E<gt>\n"
3000 "E<lt>/mallocE<gt>\n"
3001
3002 #. type: Plain text
3003 #: build/C/man3/malloc_info.3:175
3004 #, no-wrap
3005 msgid ""
3006 "#include E<lt>unistd.hE<gt>\n"
3007 "#include E<lt>stdlib.hE<gt>\n"
3008 "#include E<lt>pthread.hE<gt>\n"
3009 "#include E<lt>malloc.hE<gt>\n"
3010 "#include E<lt>errno.hE<gt>\n"
3011 msgstr ""
3012 "#include E<lt>unistd.hE<gt>\n"
3013 "#include E<lt>stdlib.hE<gt>\n"
3014 "#include E<lt>pthread.hE<gt>\n"
3015 "#include E<lt>malloc.hE<gt>\n"
3016 "#include E<lt>errno.hE<gt>\n"
3017
3018 #. type: Plain text
3019 #: build/C/man3/malloc_info.3:178
3020 #, no-wrap
3021 msgid ""
3022 "static size_t blockSize;\n"
3023 "static int numThreads, numBlocks;\n"
3024 msgstr ""
3025 "static size_t blockSize;\n"
3026 "static int numThreads, numBlocks;\n"
3027
3028 #. type: Plain text
3029 #: build/C/man3/malloc_info.3:181
3030 #, no-wrap
3031 msgid ""
3032 "#define errExit(msg)    do { perror(msg); exit(EXIT_FAILURE); \\e\n"
3033 "                        } while (0)\n"
3034 msgstr ""
3035 "#define errExit(msg)    do { perror(msg); exit(EXIT_FAILURE); \\e\n"
3036 "                        } while (0)\n"
3037
3038 #. type: Plain text
3039 #: build/C/man3/malloc_info.3:187
3040 #, no-wrap
3041 msgid ""
3042 "static void *\n"
3043 "thread_func(void *arg)\n"
3044 "{\n"
3045 "    int j;\n"
3046 "    int tn = (int) arg;\n"
3047 msgstr ""
3048 "static void *\n"
3049 "thread_func(void *arg)\n"
3050 "{\n"
3051 "    int j;\n"
3052 "    int tn = (int) arg;\n"
3053
3054 #. type: Plain text
3055 #: build/C/man3/malloc_info.3:190
3056 #, no-wrap
3057 msgid ""
3058 "    /* The multiplier \\(aq(2 + tn)\\(aq ensures that each thread (including\n"
3059 "       the main thread) allocates a different amount of memory */\n"
3060 msgstr ""
3061 "    /* The multiplier \\(aq(2 + tn)\\(aq ensures that each thread (including\n"
3062 "       the main thread) allocates a different amount of memory */\n"
3063
3064 #. type: Plain text
3065 #: build/C/man3/malloc_info.3:194
3066 #, no-wrap
3067 msgid ""
3068 "    for (j = 0; j E<lt> numBlocks; j++)\n"
3069 "        if (malloc(blockSize * (2 + tn)) == NULL)\n"
3070 "            errExit(\"malloc-thread\");\n"
3071 msgstr ""
3072 "    for (j = 0; j E<lt> numBlocks; j++)\n"
3073 "        if (malloc(blockSize * (2 + tn)) == NULL)\n"
3074 "            errExit(\"malloc-thread\");\n"
3075
3076 #. type: Plain text
3077 #: build/C/man3/malloc_info.3:198
3078 #, no-wrap
3079 msgid ""
3080 "    sleep(100);         /* Sleep until main thread terminates */\n"
3081 "    return NULL;\n"
3082 "}\n"
3083 msgstr ""
3084 "    sleep(100);         /* Sleep until main thread terminates */\n"
3085 "    return NULL;\n"
3086 "}\n"
3087
3088 #. type: Plain text
3089 #: build/C/man3/malloc_info.3:204
3090 #, no-wrap
3091 msgid ""
3092 "int\n"
3093 "main(int argc, char *argv[])\n"
3094 "{\n"
3095 "    int j, tn, sleepTime;\n"
3096 "    pthread_t *thr;\n"
3097 msgstr ""
3098 "int\n"
3099 "main(int argc, char *argv[])\n"
3100 "{\n"
3101 "    int j, tn, sleepTime;\n"
3102 "    pthread_t *thr;\n"
3103
3104 #. type: Plain text
3105 #: build/C/man3/malloc_info.3:211
3106 #, no-wrap
3107 msgid ""
3108 "    if (argc E<lt> 4) {\n"
3109 "        fprintf(stderr,\n"
3110 "                \"%s num-threads num-blocks block-size [sleep-time]\\en\",\n"
3111 "                argv[0]);\n"
3112 "        exit(EXIT_FAILURE);\n"
3113 "    }\n"
3114 msgstr ""
3115 "    if (argc E<lt> 4) {\n"
3116 "        fprintf(stderr,\n"
3117 "                \"%s num-threads num-blocks block-size [sleep-time]\\en\",\n"
3118 "                argv[0]);\n"
3119 "        exit(EXIT_FAILURE);\n"
3120 "    }\n"
3121
3122 #. type: Plain text
3123 #: build/C/man3/malloc_info.3:216
3124 #, no-wrap
3125 msgid ""
3126 "    numThreads = atoi(argv[1]);\n"
3127 "    numBlocks = atoi(argv[2]);\n"
3128 "    blockSize = atoi(argv[3]);\n"
3129 "    sleepTime = (argc E<gt> 4) ? atoi(argv[4]) : 0;\n"
3130 msgstr ""
3131 "    numThreads = atoi(argv[1]);\n"
3132 "    numBlocks = atoi(argv[2]);\n"
3133 "    blockSize = atoi(argv[3]);\n"
3134 "    sleepTime = (argc E<gt> 4) ? atoi(argv[4]) : 0;\n"
3135
3136 #. type: Plain text
3137 #: build/C/man3/malloc_info.3:220
3138 #, no-wrap
3139 msgid ""
3140 "    thr = calloc(numThreads, sizeof(pthread_t));\n"
3141 "    if (thr == NULL)\n"
3142 "        errExit(\"calloc\");\n"
3143 msgstr ""
3144 "    thr = calloc(numThreads, sizeof(pthread_t));\n"
3145 "    if (thr == NULL)\n"
3146 "        errExit(\"calloc\");\n"
3147
3148 #. type: Plain text
3149 #: build/C/man3/malloc_info.3:223
3150 #, no-wrap
3151 msgid ""
3152 "    printf(\"============ Before allocating blocks ============\\en\");\n"
3153 "    malloc_info(0, stdout);\n"
3154 msgstr ""
3155 "    printf(\"============ Before allocating blocks ============\\en\");\n"
3156 "    malloc_info(0, stdout);\n"
3157
3158 #. type: Plain text
3159 #: build/C/man3/malloc_info.3:225
3160 #, no-wrap
3161 msgid "    /* Create threads that allocate different amounts of memory */\n"
3162 msgstr "    /* Create threads that allocate different amounts of memory */\n"
3163
3164 #. type: Plain text
3165 #: build/C/man3/malloc_info.3:231
3166 #, no-wrap
3167 msgid ""
3168 "    for (tn = 0; tn E<lt> numThreads; tn++) {\n"
3169 "        errno = pthread_create(&thr[tn], NULL, thread_func,\n"
3170 "                               (void *) tn);\n"
3171 "        if (errno != 0)\n"
3172 "            errExit(\"pthread_create\");\n"
3173 msgstr ""
3174 "    for (tn = 0; tn E<lt> numThreads; tn++) {\n"
3175 "        errno = pthread_create(&thr[tn], NULL, thread_func,\n"
3176 "                               (void *) tn);\n"
3177 "        if (errno != 0)\n"
3178 "            errExit(\"pthread_create\");\n"
3179
3180 #. type: Plain text
3181 #: build/C/man3/malloc_info.3:236
3182 #, no-wrap
3183 msgid ""
3184 "        /* If we add a sleep interval after the start-up of each\n"
3185 "           thread, the threads likely won\\(aqt contend for malloc\n"
3186 "           mutexes, and therefore additional arenas won\\(aqt be\n"
3187 "           allocated (see malloc(3)). */\n"
3188 msgstr ""
3189 "        /* If we add a sleep interval after the start-up of each\n"
3190 "           thread, the threads likely won\\(aqt contend for malloc\n"
3191 "           mutexes, and therefore additional arenas won\\(aqt be\n"
3192 "           allocated (see malloc(3)). */\n"
3193
3194 #. type: Plain text
3195 #: build/C/man3/malloc_info.3:240
3196 #, no-wrap
3197 msgid ""
3198 "        if (sleepTime E<gt> 0)\n"
3199 "            sleep(sleepTime);\n"
3200 "    }\n"
3201 msgstr ""
3202 "        if (sleepTime E<gt> 0)\n"
3203 "            sleep(sleepTime);\n"
3204 "    }\n"
3205
3206 #. type: Plain text
3207 #: build/C/man3/malloc_info.3:242
3208 #, no-wrap
3209 msgid "    /* The main thread also allocates some memory */\n"
3210 msgstr "    /* The main thread also allocates some memory */\n"
3211
3212 #. type: Plain text
3213 #: build/C/man3/malloc_info.3:246
3214 #, no-wrap
3215 msgid ""
3216 "    for (j = 0; j E<lt> numBlocks; j++)\n"
3217 "        if (malloc(blockSize) == NULL)\n"
3218 "            errExit(\"malloc\");\n"
3219 msgstr ""
3220 "    for (j = 0; j E<lt> numBlocks; j++)\n"
3221 "        if (malloc(blockSize) == NULL)\n"
3222 "            errExit(\"malloc\");\n"
3223
3224 #. type: Plain text
3225 #: build/C/man3/malloc_info.3:249
3226 #, no-wrap
3227 msgid ""
3228 "    sleep(2);           /* Give all threads a chance to\n"
3229 "                           complete allocations */\n"
3230 msgstr ""
3231 "    sleep(2);           /* Give all threads a chance to\n"
3232 "                           complete allocations */\n"
3233
3234 #. type: Plain text
3235 #: build/C/man3/malloc_info.3:252
3236 #, no-wrap
3237 msgid ""
3238 "    printf(\"\\en============ After allocating blocks ============\\en\");\n"
3239 "    malloc_info(0, stdout);\n"
3240 msgstr ""
3241 "    printf(\"\\en============ After allocating blocks ============\\en\");\n"
3242 "    malloc_info(0, stdout);\n"
3243
3244 #. type: Plain text
3245 #: build/C/man3/malloc_info.3:262
3246 msgid ""
3247 "B<mallinfo>(3), B<malloc>(3), B<malloc_stats>(3), B<mallopt>(3), "
3248 "B<open_memstream>(3)"
3249 msgstr ""
3250 "B<mallinfo>(3), B<malloc>(3), B<malloc_stats>(3), B<mallopt>(3), "
3251 "B<open_memstream>(3)"
3252
3253 #. type: TH
3254 #: build/C/man3/malloc_stats.3:26
3255 #, no-wrap
3256 msgid "MALLOC_STATS"
3257 msgstr "MALLOC_STATS"
3258
3259 #. type: Plain text
3260 #: build/C/man3/malloc_stats.3:29
3261 msgid "malloc_stats - print memory allocation statistics"
3262 msgstr "malloc_stats - メモリ割り当ての統計を表示する"
3263
3264 #. type: Plain text
3265 #: build/C/man3/malloc_stats.3:33
3266 msgid "B<void malloc_stats(void);>"
3267 msgstr "B<void malloc_stats(void);>"
3268
3269 #.  .SH VERSIONS
3270 #.  Available already in glibc 2.0, possibly earlier
3271 #. type: Plain text
3272 #: build/C/man3/malloc_stats.3:55
3273 msgid ""
3274 "The B<malloc_stats>()  function prints (on standard error) statistics about "
3275 "memory allocated by B<malloc>(3)  and related functions.  For each arena "
3276 "(allocation area), this function prints the total amount of memory allocated "
3277 "and the total number of bytes consumed by in-use allocations.  (These two "
3278 "values correspond to the I<arena> and I<uordblks> fields retrieved by "
3279 "B<mallinfo>(3).)  In addition, the function prints the sum of these two "
3280 "statistics for all arenas, and the maximum number of blocks and bytes that "
3281 "were ever simultaneously allocated using B<mmap>(2)."
3282 msgstr ""
3283 "B<malloc_stats>() 関数は B<malloc>(3) や関連する関数により割り当てられたメモ"
3284 "リに関する統計を (標準エラーに) 出力する。 各領域 (割り当てエリア) につい"
3285 "て、 この関数は割り当てられているメモリの総量と現在の割り当てが使用している総"
3286 "バイト数を出力する (これらの二つの値は B<mallinfo>(3) で取得できる I<arena> "
3287 "と I<uordblks> フィールドに対応している)。 また、この関数は、 すべての領域の"
3288 "これら二つの統計情報の合計値と、 B<mmap>(2) を使って同時に割り当てられたブ"
3289 "ロック数とバイト数の最大値を表示する。"
3290
3291 #. type: Plain text
3292 #: build/C/man3/malloc_stats.3:61
3293 msgid ""
3294 "More detailed information about memory allocations in the main arena can be "
3295 "obtained using B<mallinfo>(3)."
3296 msgstr ""
3297 "B<mallinfo>(3) を使用すると、 メイン領域のメモリ割り当てに関するより詳細な情"
3298 "報を取得できる。"
3299
3300 #. type: Plain text
3301 #: build/C/man3/malloc_stats.3:67
3302 msgid ""
3303 "B<mmap>(2), B<mallinfo>(3), B<malloc>(3), B<malloc_info>(3), B<mallopt>(3)"
3304 msgstr ""
3305 "B<mmap>(2), B<mallinfo>(3), B<malloc>(3), B<malloc_info>(3), B<mallopt>(3)"
3306
3307 #. type: TH
3308 #: build/C/man3/malloc_trim.3:26
3309 #, no-wrap
3310 msgid "MALLOC_TRIM"
3311 msgstr "MALLOC_TRIM"
3312
3313 #. type: TH
3314 #: build/C/man3/malloc_trim.3:26 build/C/man3/malloc_usable_size.3:25
3315 #, no-wrap
3316 msgid "2012-03-29"
3317 msgstr "2012-03-29"
3318
3319 #. type: Plain text
3320 #: build/C/man3/malloc_trim.3:29
3321 msgid "malloc_trim - release free memory from the top of the heap"
3322 msgstr ""
3323
3324 #. type: Plain text
3325 #: build/C/man3/malloc_trim.3:33
3326 msgid "B<void malloc_trim(size_t >I<pad>B<);>"
3327 msgstr "B<void malloc_trim(size_t >I<pad>B<);>"
3328
3329 #. type: Plain text
3330 #: build/C/man3/malloc_trim.3:40
3331 msgid ""
3332 "The B<malloc_trim>()  function attempts to release free memory at the top of "
3333 "the heap (by calling B<sbrk>(2)  with a suitable argument)."
3334 msgstr ""
3335
3336 #. type: Plain text
3337 #: build/C/man3/malloc_trim.3:51
3338 msgid ""
3339 "The I<pad> argument specifies the amount of free space to leave untrimmed at "
3340 "the top of the heap.  If this argument is 0, only the minimum amount of "
3341 "memory is maintained at the top of the heap (i.e., one page or less).  A "
3342 "nonzero argument can be used to maintain some trailing space at the top of "
3343 "the heap in order to allow future allocations to be made without having to "
3344 "extend the heap with B<sbrk>(2)."
3345 msgstr ""
3346
3347 #. type: Plain text
3348 #: build/C/man3/malloc_trim.3:56
3349 msgid ""
3350 "The B<malloc_trim>()  function returns 1 if memory was actually released "
3351 "back to the system, or 0 if it was not possible to release any memory."
3352 msgstr ""
3353
3354 #.  .SH VERSIONS
3355 #.  Available already in glibc 2.0, possibly earlier
3356 #. type: Plain text
3357 #: build/C/man3/malloc_trim.3:60
3358 msgid "No errors are defined."
3359 msgstr ""
3360
3361 #. type: Plain text
3362 #: build/C/man3/malloc_trim.3:71
3363 msgid ""
3364 "This function is automatically called by B<free>(3)  in certain "
3365 "circumstances; see the discussion of B<M_TOP_PAD> and B<M_TRIM_THRESHOLD> in "
3366 "B<mallopt>(3)."
3367 msgstr ""
3368
3369 #. type: Plain text
3370 #: build/C/man3/malloc_trim.3:74
3371 msgid ""
3372 "This function cannot release free memory located at places other than the "
3373 "top of the heap."
3374 msgstr ""
3375
3376 #.  malloc/malloc.c::mTRIm():
3377 #.      return result | (av == &main_arena ? sYSTRIm (pad, av) : 0);
3378 #. type: Plain text
3379 #: build/C/man3/malloc_trim.3:78
3380 msgid "This function releases only memory in the main arena."
3381 msgstr ""
3382
3383 #. type: Plain text
3384 #: build/C/man3/malloc_trim.3:82
3385 msgid "B<sbrk>(2), B<malloc>(3), B<mallopt>(3)"
3386 msgstr "B<sbrk>(2), B<malloc>(3), B<mallopt>(3)"
3387
3388 #. type: TH
3389 #: build/C/man3/malloc_usable_size.3:25
3390 #, no-wrap
3391 msgid "MALLOC_USABLE_SIZE"
3392 msgstr "MALLOC_USABLE_SIZE"
3393
3394 #. type: Plain text
3395 #: build/C/man3/malloc_usable_size.3:28
3396 msgid "malloc_usable_size - obtain size of block of memory allocated from heap"
3397 msgstr ""
3398
3399 #. type: Plain text
3400 #: build/C/man3/malloc_usable_size.3:32
3401 msgid "B<size_t malloc_usable_size (void *>I<ptr>B<);>"
3402 msgstr "B<size_t malloc_usable_size (void *>I<ptr>B<);>"
3403
3404 #. type: Plain text
3405 #: build/C/man3/malloc_usable_size.3:40
3406 msgid ""
3407 "The B<malloc_usable_size>()  function returns the number of usable bytes in "
3408 "the block pointed to by I<ptr>, a pointer to a block of memory allocated by "
3409 "B<malloc>(3)  or a related function."
3410 msgstr ""
3411
3412 #. type: Plain text
3413 #: build/C/man3/malloc_usable_size.3:48
3414 msgid ""
3415 "B<malloc_usable_size>()  returns the number of usable bytes in the block of "
3416 "allocated memory pointed to by I<ptr>.  If I<ptr> is NULL, 0 is returned."
3417 msgstr ""
3418
3419 #. type: Plain text
3420 #: build/C/man3/malloc_usable_size.3:60
3421 msgid ""
3422 "The value returned by B<malloc_usable_size>()  may be greater than the "
3423 "requested size of the allocation because of alignment and minimum size "
3424 "constraints.  Although the excess bytes can be overwritten by the "
3425 "application without ill effects, this is not good programming practice: the "
3426 "number of excess bytes in an allocation depends on the underlying "
3427 "implementation."
3428 msgstr ""
3429
3430 #. type: Plain text
3431 #: build/C/man3/malloc_usable_size.3:62
3432 msgid "The main use of this function is for debugging and introspection."
3433 msgstr ""
3434
3435 #. type: Plain text
3436 #: build/C/man3/malloc_usable_size.3:64
3437 msgid "B<malloc>(3)"
3438 msgstr "B<malloc>(3)"
3439
3440 #. type: TH
3441 #: build/C/man3/mallopt.3:26
3442 #, no-wrap
3443 msgid "MALLOPT"
3444 msgstr "MALLOPT"
3445
3446 #. type: TH
3447 #: build/C/man3/mallopt.3:26
3448 #, no-wrap
3449 msgid "2012-04-30"
3450 msgstr "2012-04-30"
3451
3452 #. type: Plain text
3453 #: build/C/man3/mallopt.3:29
3454 msgid "mallopt - set memory allocation parameters"
3455 msgstr "mallopt - メモリ割り当てパラメータを設定する"
3456
3457 #. type: Plain text
3458 #: build/C/man3/mallopt.3:33
3459 msgid "B<int mallopt(int >I<param>B<, int >I<value>B<);>"
3460 msgstr "B<int mallopt(int >I<param>B<, int >I<value>B<);>"
3461
3462 #. type: Plain text
3463 #: build/C/man3/mallopt.3:44
3464 msgid ""
3465 "The B<mallopt>()  function adjusts parameters that control the behavior of "
3466 "the memory-allocation functions (see B<malloc>(3)).  The I<param> argument "
3467 "specifies the parameter to be modified, and I<value> specifies the new value "
3468 "for that parameter."
3469 msgstr ""
3470 "B<mallopt>() 関数は、メモリ割り当て関数 (B<malloc>(3) を参照) の動作を\n"
3471 "制御するパラメータの調整を行う。\n"
3472 "I<param> 引き数で変更するパラメータを指定し、\n"
3473 "I<value> 引き数でそのパラメータの新しい値を指定する。"
3474
3475 #. type: Plain text
3476 #: build/C/man3/mallopt.3:47
3477 msgid "The following values can be specified for I<param>:"
3478 msgstr "I<param> には以下の値を指定することができる。"
3479
3480 #. type: TP
3481 #: build/C/man3/mallopt.3:47
3482 #, no-wrap
3483 msgid "B<M_CHECK_ACTION>"
3484 msgstr "B<M_CHECK_ACTION>"
3485
3486 #. type: Plain text
3487 #: build/C/man3/mallopt.3:53
3488 msgid ""
3489 "Setting this parameter controls how glibc responds when various kinds of "
3490 "programming errors are detected (e.g., freeing the same pointer twice).  The "
3491 "3 least significant bits (2, 1, and 0) of the value assigned to this "
3492 "parameter determine the glibc behavior, as follows:"
3493 msgstr ""
3494
3495 #. type: TP
3496 #: build/C/man3/mallopt.3:54
3497 #, no-wrap
3498 msgid "Bit 0"
3499 msgstr "Bit 0"
3500
3501 #. type: Plain text
3502 #: build/C/man3/mallopt.3:64
3503 msgid ""
3504 "If this bit is set, then print a one-line message on I<stderr> that provides "
3505 "details about the error.  The message starts with the string \"***\\ glibc "
3506 "detected\\ ***\", followed by the program name, the name of the memory-"
3507 "allocation function in which the error was detected, a brief description of "
3508 "the error, and the memory address where the error was detected."
3509 msgstr ""
3510
3511 #. type: TP
3512 #: build/C/man3/mallopt.3:64
3513 #, no-wrap
3514 msgid "Bit 1"
3515 msgstr "Bit 1"
3516
3517 #. type: Plain text
3518 #: build/C/man3/mallopt.3:79
3519 msgid ""
3520 "If this bit is set, then, after printing any error message specified by bit "
3521 "0, the program is terminated by calling B<abort>(3).  In glibc versions "
3522 "since 2.4, if bit 0 is also set, then, between printing the error message "
3523 "and aborting, the program also prints a stack trace in the manner of "
3524 "B<backtrace>(3), and prints the process's memory mapping in the style of I</"
3525 "proc/[pid]/maps> (see B<proc>(5))."
3526 msgstr ""
3527
3528 #. type: TP
3529 #: build/C/man3/mallopt.3:79
3530 #, no-wrap
3531 msgid "Bit 2 (since glibc 2.4)"
3532 msgstr "Bit 2 (glibc 2.4 以降)"
3533
3534 #. type: Plain text
3535 #: build/C/man3/mallopt.3:86
3536 msgid ""
3537 "This bit has an effect only if bit 0 is also set.  If this bit is set, then "
3538 "the one-line message describing the error is simplified to contain just the "
3539 "name of the function where the error was detected and the brief description "
3540 "of the error."
3541 msgstr ""
3542
3543 #. type: Plain text
3544 #: build/C/man3/mallopt.3:91
3545 msgid "The remaining bits in I<value> are ignored."
3546 msgstr ""
3547
3548 #. type: Plain text
3549 #: build/C/man3/mallopt.3:95
3550 msgid ""
3551 "Combining the above details, the following numeric values are meaningful for "
3552 "B<M_CHECK_ACTION>:"
3553 msgstr ""
3554
3555 #. type: IP
3556 #: build/C/man3/mallopt.3:96
3557 #, no-wrap
3558 msgid "0"
3559 msgstr "0"
3560
3561 #. type: Plain text
3562 #: build/C/man3/mallopt.3:98
3563 msgid "Ignore error conditions; continue execution (with undefined results)."
3564 msgstr ""
3565
3566 #. type: IP
3567 #: build/C/man3/mallopt.3:98
3568 #, no-wrap
3569 msgid "1"
3570 msgstr "1"
3571
3572 #. type: Plain text
3573 #: build/C/man3/mallopt.3:100
3574 msgid "Print a detailed error message and continue execution."
3575 msgstr ""
3576
3577 #. type: IP
3578 #: build/C/man3/mallopt.3:100
3579 #, no-wrap
3580 msgid "2"
3581 msgstr "2"
3582
3583 #. type: Plain text
3584 #: build/C/man3/mallopt.3:102
3585 msgid "Abort the program."
3586 msgstr ""
3587
3588 #. type: IP
3589 #: build/C/man3/mallopt.3:102
3590 #, no-wrap
3591 msgid "3"
3592 msgstr "3"
3593
3594 #. type: Plain text
3595 #: build/C/man3/mallopt.3:105
3596 msgid ""
3597 "Print detailed error message, stack trace, and memory mappings, and abort "
3598 "the program."
3599 msgstr ""
3600
3601 #. type: IP
3602 #: build/C/man3/mallopt.3:105
3603 #, no-wrap
3604 msgid "5"
3605 msgstr "5"
3606
3607 #. type: Plain text
3608 #: build/C/man3/mallopt.3:107
3609 msgid "Print a simple error message and continue execution."
3610 msgstr ""
3611
3612 #. type: IP
3613 #: build/C/man3/mallopt.3:107
3614 #, no-wrap
3615 msgid "7"
3616 msgstr "7"
3617
3618 #. type: Plain text
3619 #: build/C/man3/mallopt.3:110
3620 msgid ""
3621 "Print simple error message, stack trace, and memory mappings, and abort the "
3622 "program."
3623 msgstr ""
3624
3625 #. type: Plain text
3626 #: build/C/man3/mallopt.3:116
3627 msgid ""
3628 "Since glibc 2.3.4, the default value for the B<M_CHECK_ACTION> parameter is "
3629 "3.  In glibc version 2.3.3 and earlier, the default value is 1."
3630 msgstr ""
3631
3632 #. type: Plain text
3633 #: build/C/man3/mallopt.3:121
3634 msgid ""
3635 "Using a nonzero B<M_CHECK_ACTION> value can be useful because otherwise a "
3636 "crash may happen much later, and the true cause of the problem is then very "
3637 "hard to track down."
3638 msgstr ""
3639
3640 #. type: TP
3641 #: build/C/man3/mallopt.3:121
3642 #, no-wrap
3643 msgid "B<M_MMAP_MAX>"
3644 msgstr "B<M_MMAP_MAX>"
3645
3646 #.  The following text adapted from comments in the glibc source:
3647 #. type: Plain text
3648 #: build/C/man3/mallopt.3:131
3649 msgid ""
3650 "This parameter specifies the maximum number of allocation requests that may "
3651 "be simultaneously serviced using B<mmap>(2).  This parameter exists because "
3652 "some systems have a limited number of internal tables for use by B<mmap>(2), "
3653 "and using more than a few of them may degrade performance."
3654 msgstr ""
3655
3656 #. type: Plain text
3657 #: build/C/man3/mallopt.3:138
3658 msgid ""
3659 "The default value is 65,536, a value which has no special significance and "
3660 "which servers only as a safeguard.  Setting this parameter to 0 disables the "
3661 "use of B<mmap>(2)  for servicing large allocation requests."
3662 msgstr ""
3663
3664 #. type: TP
3665 #: build/C/man3/mallopt.3:138
3666 #, no-wrap
3667 msgid "B<M_MMAP_THRESHOLD>"
3668 msgstr "B<M_MMAP_THRESHOLD>"
3669
3670 #. type: Plain text
3671 #: build/C/man3/mallopt.3:147
3672 msgid ""
3673 "For allocations greater than or equal to the limit specified (in bytes) by "
3674 "B<M_MMAP_THRESHOLD> that can't be satisfied from the free list, the memory-"
3675 "allocation functions employ B<mmap>(2)  instead of increasing the program "
3676 "break using B<sbrk>(2)."
3677 msgstr ""
3678
3679 #. type: Plain text
3680 #: build/C/man3/mallopt.3:167
3681 msgid ""
3682 "Allocating memory using B<mmap>(2)  has the significant advantage that the "
3683 "allocated memory blocks can always be independently released back to the "
3684 "system.  (By contrast, the heap can be trimmed only if memory is freed at "
3685 "the top end.)  On the other hand, there are some disadvantages to the use of "
3686 "B<mmap>(2): deallocated space is not placed on the free list for reuse by "
3687 "later allocations; memory may be wasted because B<mmap>(2)  allocations must "
3688 "be page-aligned; and the kernel must perform the expensive task of zeroing "
3689 "out memory allocated via B<mmap>(2).  Balancing these factors leads to a "
3690 "default setting of 128*1024 for the B<M_MMAP_THRESHOLD> parameter."
3691 msgstr ""
3692
3693 #. type: Plain text
3694 #: build/C/man3/mallopt.3:174
3695 msgid ""
3696 "The lower limit for this parameter is 0.  The upper limit is "
3697 "B<DEFAULT_MMAP_THRESHOLD_MAX>: 512*1024 on 32-bit systems or "
3698 "I<4*1024*1024*sizeof(long)> on 64-bit systems."
3699 msgstr ""
3700
3701 #. type: Plain text
3702 #: build/C/man3/mallopt.3:192
3703 msgid ""
3704 "I<Note:> Nowadays, glibc uses a dynamic mmap threshold by default.  The "
3705 "initial value of the threshold is 128*1024, but when blocks larger than the "
3706 "current threshold and less than or equal to B<DEFAULT_MMAP_THRESHOLD_MAX> "
3707 "are freed, the threshold is adjusted upward to the size of the freed block.  "
3708 "When dynamic mmap thresholding is in effect, the threshold for trimming the "
3709 "heap is also dynamically adjusted to be twice the dynamic mmap threshold.  "
3710 "Dynamic adjustment of the mmap threshold is disabled if any of the "
3711 "B<M_TRIM_THRESHOLD>, B<M_TOP_PAD>, B<M_MMAP_THRESHOLD>, or B<M_MMAP_MAX> "
3712 "parameters is set."
3713 msgstr ""
3714
3715 #. type: TP
3716 #: build/C/man3/mallopt.3:192
3717 #, no-wrap
3718 msgid "B<M_MXFAST> (since glibc 2.3)"
3719 msgstr "B<M_MXFAST> (glibc 2.3 以降)"
3720
3721 #.  The following text adapted from comments in the glibc sources:
3722 #. type: Plain text
3723 #: build/C/man3/mallopt.3:212
3724 msgid ""
3725 "Set the upper limit for memory allocation requests that are satisfied using "
3726 "\"fastbins\".  (The measurement unit for this parameter is bytes.)  Fastbins "
3727 "are storage areas that hold deallocated blocks of memory of the same size "
3728 "without merging adjacent free blocks.  Subsequent reallocation of blocks of "
3729 "the same size can be handled very quickly by allocating from the fastbin, "
3730 "although memory fragmentation and the overall memory footprint of the "
3731 "program can increase.  The default value for this parameter is I<64*sizeof"
3732 "(size_t)/4> (i.e., 64 on 32-bit architectures).  The range for this "
3733 "parameter is 0 to I<80*sizeof(size_t)/4>.  Setting B<M_MXFAST> to 0 disables "
3734 "the use of fastbins."
3735 msgstr ""
3736
3737 #. type: TP
3738 #: build/C/man3/mallopt.3:212
3739 #, no-wrap
3740 msgid "B<M_PERTURB> (since glibc 2.4)"
3741 msgstr "B<M_PERTURB> (glibc 2.4 以降)"
3742
3743 #. type: Plain text
3744 #: build/C/man3/mallopt.3:227
3745 msgid ""
3746 "If this parameter is set to a nonzero value, then bytes of allocated memory "
3747 "(other than allocations via B<calloc>(3))  are initialized to the complement "
3748 "of the value in the least significant byte of I<value>, and when allocated "
3749 "memory is released using B<free>(3), the freed bytes are set to the least "
3750 "significant byte of I<value>.  This can be useful for detecting errors where "
3751 "programs incorrectly rely on allocated memory being initialized to zero, or "
3752 "reuse values in memory that has already been freed."
3753 msgstr ""
3754
3755 #. type: TP
3756 #: build/C/man3/mallopt.3:227
3757 #, no-wrap
3758 msgid "B<M_TOP_PAD>"
3759 msgstr "B<M_TOP_PAD>"
3760
3761 #. type: Plain text
3762 #: build/C/man3/mallopt.3:234
3763 msgid ""
3764 "This parameter defines the amount of padding to employ when calling B<sbrk>"
3765 "(2)  to modify the program break.  (The measurement unit for this parameter "
3766 "is bytes.)  This parameter has an effect in the following circumstances:"
3767 msgstr ""
3768
3769 #. type: Plain text
3770 #: build/C/man3/mallopt.3:241
3771 msgid ""
3772 "When the program break is increased, then B<M_TOP_PAD> bytes are added to "
3773 "the B<sbrk>(2)  request."
3774 msgstr ""
3775
3776 #. type: Plain text
3777 #: build/C/man3/mallopt.3:247
3778 msgid ""
3779 "When the heap is trimmed as a consequence of calling B<free>(3)  (see the "
3780 "discussion of B<M_TRIM_THRESHOLD>)  this much free space is preserved at the "
3781 "top of the heap."
3782 msgstr ""
3783
3784 #. type: Plain text
3785 #: build/C/man3/mallopt.3:251
3786 msgid ""
3787 "In either case, the amount of padding is always rounded to a system page "
3788 "boundary."
3789 msgstr ""
3790
3791 #. type: Plain text
3792 #: build/C/man3/mallopt.3:258
3793 msgid ""
3794 "Modifying B<M_TOP_PAD> is a trade-off between increasing the number of "
3795 "system calls (when the parameter is set low)  and wasting unused memory at "
3796 "the top of the heap (when the parameter is set high)."
3797 msgstr ""
3798
3799 #.  DEFAULT_TOP_PAD in glibc source
3800 #. type: Plain text
3801 #: build/C/man3/mallopt.3:261
3802 msgid "The default value for this parameter is 128*1024."
3803 msgstr ""
3804
3805 #. type: TP
3806 #: build/C/man3/mallopt.3:261
3807 #, no-wrap
3808 msgid "B<M_TRIM_THRESHOLD>"
3809 msgstr "B<M_TRIM_THRESHOLD>"
3810
3811 #. type: Plain text
3812 #: build/C/man3/mallopt.3:277
3813 msgid ""
3814 "When the amount of contiguous free memory at the top of the heap grows "
3815 "sufficiently large, B<free>(3)  employs B<sbrk>(2)  to release this memory "
3816 "back to the system.  (This can be useful in programs that continue to "
3817 "execute for a long period after freeing a significant amount of memory.)  "
3818 "The B<M_TRIM_THRESHOLD> parameter specifies the minimum size (in bytes) that "
3819 "this block of memory must reach before B<sbrk>(2)  is used to trim the heap."
3820 msgstr ""
3821
3822 #. type: Plain text
3823 #: build/C/man3/mallopt.3:282
3824 msgid ""
3825 "The default value for this parameter is 128*1024.  Setting "
3826 "B<M_TRIM_THRESHOLD> to -1 disables trimming completely."
3827 msgstr ""
3828
3829 #
3830 #
3831 #
3832 #.  FIXME Do the arena parameters need to be documented?
3833 #.  .TP
3834 #.  .BR M_ARENA_TEST " (since glibc 2.10)"
3835 #.  .TP
3836 #.  .BR M_ARENA_MAX " (since glibc 2.10)"
3837 #.  Environment variables
3838 #.      MALLOC_ARENA_MAX_
3839 #.      MALLOC_ARENA_TEST_
3840 #.  http://udrepper.livejournal.com/20948.html describes some details
3841 #.      of the MALLOC_ARENA_* environment variables.
3842 #.  These macros aren't enabled in production releases until 2.15?
3843 #.  (see glibc malloc/Makefile)
3844 #. type: Plain text
3845 #: build/C/man3/mallopt.3:305
3846 msgid ""
3847 "Modifying B<M_TRIM_THRESHOLD> is a trade-off between increasing the number "
3848 "of system calls (when the parameter is set low)  and wasting unused memory "
3849 "at the top of the heap (when the parameter is set high)."
3850 msgstr ""
3851
3852 #. type: SS
3853 #: build/C/man3/mallopt.3:305
3854 #, no-wrap
3855 msgid "Environment variables"
3856 msgstr "環境変数"
3857
3858 #. type: Plain text
3859 #: build/C/man3/mallopt.3:320
3860 msgid ""
3861 "A number of environment variables can be defined to modify some of the same "
3862 "parameters as are controlled by B<mallopt>().  Using these variables has the "
3863 "advantage that the source code of the program need not be changed.  To be "
3864 "effective, these variables must be defined before the first call to a memory-"
3865 "allocation function.  (If the same parameters are adjusted via B<mallopt>()  "
3866 "then the B<mallopt>()  settings take precedence.)  For security reasons, "
3867 "these variables are ignored in set-user-ID and set-group-ID programs."
3868 msgstr ""
3869
3870 #. type: Plain text
3871 #: build/C/man3/mallopt.3:323
3872 msgid ""
3873 "The environment variables are as follows (note the trailing underscore at "
3874 "the end of the name of each variable):"
3875 msgstr ""
3876
3877 #. type: TP
3878 #: build/C/man3/mallopt.3:323
3879 #, no-wrap
3880 msgid "B<MALLOC_CHECK_>"
3881 msgstr "B<MALLOC_CHECK_>"
3882
3883 #.  On glibc 2.12/x86, a simple malloc()+free() loop is about 70% slower
3884 #.  when MALLOC_CHECK_ was set.
3885 #. type: Plain text
3886 #: build/C/man3/mallopt.3:340
3887 msgid ""
3888 "This environment variable controls the same parameter as B<mallopt>()  "
3889 "B<M_CHECK_ACTION>.  If this variable is set to a nonzero value, then a "
3890 "special implementation of the memory-allocation functions is used.  (This is "
3891 "accomplished using the B<malloc_hook>(3)  feature.)  This implementation "
3892 "performs additional error checking, but is slower than the standard set of "
3893 "memory-allocation functions.  (This implementation does not detect all "
3894 "possible errors; memory leaks can still occur.)"
3895 msgstr ""
3896
3897 #. type: Plain text
3898 #: build/C/man3/mallopt.3:345
3899 msgid ""
3900 "The value assigned to this environment variable should be a single digit, "
3901 "whose meaning is as described for B<M_CHECK_ACTION>.  Any characters beyond "
3902 "the initial digit are ignored."
3903 msgstr ""
3904
3905 #. type: Plain text
3906 #: build/C/man3/mallopt.3:354
3907 msgid ""
3908 "For security reasons, the effect of B<MALLOC_CHECK_> is disabled by default "
3909 "for set-user-ID and set-group-ID programs.  However, if the file I</etc/suid-"
3910 "debug> exists (the content of the file is irrelevant), then B<MALLOC_CHECK_> "
3911 "also has an effect for set-user-ID and set-group-ID programs."
3912 msgstr ""
3913
3914 #. type: TP
3915 #: build/C/man3/mallopt.3:354
3916 #, no-wrap
3917 msgid "B<MALLOC_MMAP_MAX_>"
3918 msgstr "B<MALLOC_MMAP_MAX_>"
3919
3920 #. type: Plain text
3921 #: build/C/man3/mallopt.3:359
3922 msgid "Controls the same parameter as B<mallopt>()  B<M_MMAP_MAX>."
3923 msgstr ""
3924
3925 #. type: TP
3926 #: build/C/man3/mallopt.3:359
3927 #, no-wrap
3928 msgid "B<MALLOC_MMAP_THRESHOLD_>"
3929 msgstr "B<MALLOC_MMAP_THRESHOLD_>"
3930
3931 #. type: Plain text
3932 #: build/C/man3/mallopt.3:364
3933 msgid "Controls the same parameter as B<mallopt>()  B<M_MMAP_THRESHOLD>."
3934 msgstr ""
3935
3936 #. type: TP
3937 #: build/C/man3/mallopt.3:364
3938 #, no-wrap
3939 msgid "B<MALLOC_PERTURB_>"
3940 msgstr "B<MALLOC_PERTURB_>"
3941
3942 #. type: Plain text
3943 #: build/C/man3/mallopt.3:369
3944 msgid "Controls the same parameter as B<mallopt>()  B<M_PERTURB>."
3945 msgstr ""
3946
3947 #. type: TP
3948 #: build/C/man3/mallopt.3:369
3949 #, no-wrap
3950 msgid "B<MALLOC_TRIM_THRESHOLD_>"
3951 msgstr "B<MALLOC_TRIM_THRESHOLD_>"
3952
3953 #. type: Plain text
3954 #: build/C/man3/mallopt.3:374
3955 msgid "Controls the same parameter as B<mallopt>()  B<M_TRIM_THRESHOLD>."
3956 msgstr ""
3957
3958 #. type: TP
3959 #: build/C/man3/mallopt.3:374
3960 #, no-wrap
3961 msgid "B<MALLOC_TOP_PAD_>"
3962 msgstr "B<MALLOC_TOP_PAD_>"
3963
3964 #. type: Plain text
3965 #: build/C/man3/mallopt.3:379
3966 msgid "Controls the same parameter as B<mallopt>()  B<M_TOP_PAD>."
3967 msgstr ""
3968
3969 #. type: Plain text
3970 #: build/C/man3/mallopt.3:384
3971 msgid "On success, B<mallopt>()  returns 1.  On error, it returns 0."
3972 msgstr "B<mallopt>()  は成功すると 1 を返す。エラーの場合は 0 を返す。"
3973
3974 #.  .SH VERSIONS
3975 #.  Available already in glibc 2.0, possibly earlier
3976 #. type: Plain text
3977 #: build/C/man3/mallopt.3:392
3978 msgid "On error, I<errno> is I<not> set."
3979 msgstr "エラーの場合、I<errno> は設定I<されない>。"
3980
3981 #.  .SH NOTES
3982 #. type: Plain text
3983 #: build/C/man3/mallopt.3:406
3984 msgid ""
3985 "This function is not specified by POSIX or the C standards.  A similar "
3986 "function exists on many System V derivatives, but the range of values for "
3987 "I<param> varies across systems.  The SVID defined options B<M_MXFAST>, "
3988 "B<M_NLBLKS>, B<M_GRAIN>, and B<M_KEEP>, but only the first of these is "
3989 "implemented in glibc."
3990 msgstr ""
3991
3992 #. type: Plain text
3993 #: build/C/man3/mallopt.3:410
3994 msgid "Specifying an invalid value for I<param> does not generate an error."
3995 msgstr ""
3996
3997 #.  FIXME This looks buggy:
3998 #.  setting the M_MXFAST limit rounds up:    (s + SIZE_SZ) & ~MALLOC_ALIGN_MASK)
3999 #.  malloc requests are rounded up:
4000 #.     (req) + SIZE_SZ + MALLOC_ALIGN_MASK) & ~MALLOC_ALIGN_MASK
4001 #.  http://sources.redhat.com/bugzilla/show_bug.cgi?id=12129
4002 #. type: Plain text
4003 #: build/C/man3/mallopt.3:418
4004 msgid ""
4005 "A calculation error within the glibc implementation means that a call of the "
4006 "form:"
4007 msgstr ""
4008
4009 #. type: Plain text
4010 #: build/C/man3/mallopt.3:421
4011 #, no-wrap
4012 msgid "    mallopt(M_MXFAST, n)\n"
4013 msgstr "    mallopt(M_MXFAST, n)\n"
4014
4015 #.  Bins are multiples of 2 * sizeof(size_t) + sizeof(size_t)
4016 #. type: Plain text
4017 #: build/C/man3/mallopt.3:433
4018 msgid ""
4019 "does not result in fastbins being employed for all allocations of size up to "
4020 "I<n>.  To ensure desired results, I<n> should be rounded up to the next "
4021 "multiple greater than or equal to I<(2k+1)*sizeof(size_t)>, where I<k> is an "
4022 "integer."
4023 msgstr ""
4024
4025 #.  FIXME MALLOC_MMAP_THRESHOLD_ and MALLOC_MMAP_MAX_
4026 #.  do have an effect for set-user-ID programs (but not
4027 #.  set-group-ID programs).
4028 #.  http://sources.redhat.com/bugzilla/show_bug.cgi?id=12155
4029 #. type: Plain text
4030 #: build/C/man3/mallopt.3:445
4031 msgid ""
4032 "The B<MALLOC_MMAP_THRESHOLD_> and B<MALLOC_MMAP_MAX_> variables are I<not> "
4033 "ignored in set-group-ID programs."
4034 msgstr ""
4035
4036 #.  FIXME http://sources.redhat.com/bugzilla/show_bug.cgi?id=12140
4037 #. type: Plain text
4038 #: build/C/man3/mallopt.3:466
4039 msgid ""
4040 "If B<mallopt>()  is used to set B<M_PERTURB>, then, as expected, the bytes "
4041 "of allocated memory are initialized to the complement of the byte in "
4042 "I<value>, and when that memory is freed, the bytes of the region are "
4043 "initialized to the byte specified in I<value>.  However, there is an off-by-"
4044 "I<sizeof(size_t)> error in the implementation: instead of initializing "
4045 "precisely the block of memory being freed by the call I<free(p)>, the block "
4046 "starting at I<p+sizeof(size_t)> is initialized."
4047 msgstr ""
4048
4049 #. type: Plain text
4050 #: build/C/man3/mallopt.3:475
4051 msgid ""
4052 "The program below demonstrates the use of B<M_CHECK_ACTION>.  If the program "
4053 "is supplied with an (integer) command-line argument, then that argument is "
4054 "used to set the B<M_CHECK_ACTION> parameter.  The program then allocates a "
4055 "block of memory, and frees it twice (an error)."
4056 msgstr ""
4057
4058 #. type: Plain text
4059 #: build/C/man3/mallopt.3:479
4060 msgid ""
4061 "The following shell session shows what happens when we run this program "
4062 "under glibc, with the default value for B<M_CHECK_ACTION>:"
4063 msgstr ""
4064
4065 #. type: Plain text
4066 #: build/C/man3/mallopt.3:499
4067 #, no-wrap
4068 msgid ""
4069 "$ B<./a.out>\n"
4070 "main(): returned from first free() call\n"
4071 "*** glibc detected *** ./a.out: double free or corruption (top): 0x09d30008 ***\n"
4072 "======= Backtrace: =========\n"
4073 "/lib/libc.so.6(+0x6c501)[0x523501]\n"
4074 "/lib/libc.so.6(+0x6dd70)[0x524d70]\n"
4075 "/lib/libc.so.6(cfree+0x6d)[0x527e5d]\n"
4076 "\\&./a.out[0x80485db]\n"
4077 "/lib/libc.so.6(__libc_start_main+0xe7)[0x4cdce7]\n"
4078 "\\&./a.out[0x8048471]\n"
4079 "======= Memory map: ========\n"
4080 "001e4000-001fe000 r-xp 00000000 08:06 1083555    /lib/libgcc_s.so.1\n"
4081 "001fe000-001ff000 r--p 00019000 08:06 1083555    /lib/libgcc_s.so.1\n"
4082 "[some lines omitted]\n"
4083 "b7814000-b7817000 rw-p 00000000 00:00 0\n"
4084 "bff53000-bff74000 rw-p 00000000 00:00 0          [stack]\n"
4085 "Aborted (core dumped)\n"
4086 msgstr ""
4087 "$ B<./a.out>\n"
4088 "main(): returned from first free() call\n"
4089 "*** glibc detected *** ./a.out: double free or corruption (top): 0x09d30008 ***\n"
4090 "======= Backtrace: =========\n"
4091 "/lib/libc.so.6(+0x6c501)[0x523501]\n"
4092 "/lib/libc.so.6(+0x6dd70)[0x524d70]\n"
4093 "/lib/libc.so.6(cfree+0x6d)[0x527e5d]\n"
4094 "\\&./a.out[0x80485db]\n"
4095 "/lib/libc.so.6(__libc_start_main+0xe7)[0x4cdce7]\n"
4096 "\\&./a.out[0x8048471]\n"
4097 "======= Memory map: ========\n"
4098 "001e4000-001fe000 r-xp 00000000 08:06 1083555    /lib/libgcc_s.so.1\n"
4099 "001fe000-001ff000 r--p 00019000 08:06 1083555    /lib/libgcc_s.so.1\n"
4100 "[some lines omitted]\n"
4101 "b7814000-b7817000 rw-p 00000000 00:00 0\n"
4102 "bff53000-bff74000 rw-p 00000000 00:00 0          [stack]\n"
4103 "Aborted (core dumped)\n"
4104
4105 #. type: Plain text
4106 #: build/C/man3/mallopt.3:504
4107 msgid ""
4108 "The following runs show the results when employing other values for "
4109 "B<M_CHECK_ACTION>:"
4110 msgstr ""
4111
4112 #. type: Plain text
4113 #: build/C/man3/mallopt.3:517
4114 #, no-wrap
4115 msgid ""
4116 "$ B<./a.out 1>             # Diagnose error and continue\n"
4117 "main(): returned from first free() call\n"
4118 "*** glibc detected *** ./a.out: double free or corruption (top): 0x09cbe008 ***\n"
4119 "main(): returned from second free() call\n"
4120 "$ B<./a.out 2>             # Abort without error message\n"
4121 "main(): returned from first free() call\n"
4122 "Aborted (core dumped)\n"
4123 "$ B<./a.out 0>             # Ignore error and continue\n"
4124 "main(): returned from first free() call\n"
4125 "main(): returned from second free() call\n"
4126 msgstr ""
4127 "$ B<./a.out 1>             # Diagnose error and continue\n"
4128 "main(): returned from first free() call\n"
4129 "*** glibc detected *** ./a.out: double free or corruption (top): 0x09cbe008 ***\n"
4130 "main(): returned from second free() call\n"
4131 "$ B<./a.out 2>             # Abort without error message\n"
4132 "main(): returned from first free() call\n"
4133 "Aborted (core dumped)\n"
4134 "$ B<./a.out 0>             # Ignore error and continue\n"
4135 "main(): returned from first free() call\n"
4136 "main(): returned from second free() call\n"
4137
4138 #. type: Plain text
4139 #: build/C/man3/mallopt.3:523
4140 msgid ""
4141 "The next run shows how to set the same parameter using the B<MALLOC_CHECK_> "
4142 "environment variable:"
4143 msgstr ""
4144
4145 #. type: Plain text
4146 #: build/C/man3/mallopt.3:530
4147 #, no-wrap
4148 msgid ""
4149 "$ B<MALLOC_CHECK_=1 ./a.out>\n"
4150 "main(): returned from first free() call\n"
4151 "*** glibc detected *** ./a.out: free(): invalid pointer: 0x092c2008 ***\n"
4152 "main(): returned from second free() call\n"
4153 msgstr ""
4154 "$ B<MALLOC_CHECK_=1 ./a.out>\n"
4155 "main(): returned from first free() call\n"
4156 "*** glibc detected *** ./a.out: free(): invalid pointer: 0x092c2008 ***\n"
4157 "main(): returned from second free() call\n"
4158
4159 #. type: Plain text
4160 #: build/C/man3/mallopt.3:538
4161 #, no-wrap
4162 msgid ""
4163 "#include E<lt>malloc.hE<gt>\n"
4164 "#include E<lt>stdio.hE<gt>\n"
4165 "#include E<lt>stdlib.hE<gt>\n"
4166 msgstr ""
4167 "#include E<lt>malloc.hE<gt>\n"
4168 "#include E<lt>stdio.hE<gt>\n"
4169 "#include E<lt>stdlib.hE<gt>\n"
4170
4171 #. type: Plain text
4172 #: build/C/man3/mallopt.3:543 build/C/man3/mcheck.3:187
4173 #, no-wrap
4174 msgid ""
4175 "int\n"
4176 "main(int argc, char *argv[])\n"
4177 "{\n"
4178 "    char *p;\n"
4179 msgstr ""
4180 "int\n"
4181 "main(int argc, char *argv[])\n"
4182 "{\n"
4183 "    char *p;\n"
4184
4185 #. type: Plain text
4186 #: build/C/man3/mallopt.3:550
4187 #, no-wrap
4188 msgid ""
4189 "    if (argc E<gt> 1) {\n"
4190 "        if (mallopt(M_CHECK_ACTION, atoi(argv[1])) != 1) {\n"
4191 "            fprintf(stderr, \"mallopt() failed\");\n"
4192 "            exit(EXIT_FAILURE);\n"
4193 "        }\n"
4194 "    }\n"
4195 msgstr ""
4196 "    if (argc E<gt> 1) {\n"
4197 "        if (mallopt(M_CHECK_ACTION, atoi(argv[1])) != 1) {\n"
4198 "            fprintf(stderr, \"mallopt() failed\");\n"
4199 "            exit(EXIT_FAILURE);\n"
4200 "        }\n"
4201 "    }\n"
4202
4203 #. type: Plain text
4204 #: build/C/man3/mallopt.3:556
4205 #, no-wrap
4206 msgid ""
4207 "    p = malloc(1000);\n"
4208 "    if (p == NULL) {\n"
4209 "        fprintf(stderr, \"malloc() failed\");\n"
4210 "        exit(EXIT_FAILURE);\n"
4211 "    }\n"
4212 msgstr ""
4213 "    p = malloc(1000);\n"
4214 "    if (p == NULL) {\n"
4215 "        fprintf(stderr, \"malloc() failed\");\n"
4216 "        exit(EXIT_FAILURE);\n"
4217 "    }\n"
4218
4219 #. type: Plain text
4220 #: build/C/man3/mallopt.3:559
4221 #, no-wrap
4222 msgid ""
4223 "    free(p);\n"
4224 "    printf(\"main(): returned from first free() call\\en\");\n"
4225 msgstr ""
4226 "    free(p);\n"
4227 "    printf(\"main(): returned from first free() call\\en\");\n"
4228
4229 #. type: Plain text
4230 #: build/C/man3/mallopt.3:562
4231 #, no-wrap
4232 msgid ""
4233 "    free(p);\n"
4234 "    printf(\"main(): returned from second free() call\\en\");\n"
4235 msgstr ""
4236 "    free(p);\n"
4237 "    printf(\"main(): returned from second free() call\\en\");\n"
4238
4239 #. type: Plain text
4240 #: build/C/man3/mallopt.3:580
4241 msgid ""
4242 "B<mmap>(2), B<sbrk>(2), B<mallinfo>(3), B<malloc>(3), B<malloc_hook>(3), "
4243 "B<malloc_info>(3), B<malloc_stats>(3), B<malloc_trim>(3), B<mcheck>(3), "
4244 "B<mtrace>(3), B<posix_memalign>(3)"
4245 msgstr ""
4246 "B<mmap>(2), B<sbrk>(2), B<mallinfo>(3), B<malloc>(3), B<malloc_hook>(3), "
4247 "B<malloc_info>(3), B<malloc_stats>(3), B<malloc_trim>(3), B<mcheck>(3), "
4248 "B<mtrace>(3), B<posix_memalign>(3)"
4249
4250 #. type: TH
4251 #: build/C/man3/mcheck.3:25
4252 #, no-wrap
4253 msgid "MCHECK"
4254 msgstr "MCHECK"
4255
4256 #. type: TH
4257 #: build/C/man3/mcheck.3:25
4258 #, fuzzy, no-wrap
4259 #| msgid "2013-04-01"
4260 msgid "2014-01-11"
4261 msgstr "2013-04-01"
4262
4263 #. type: Plain text
4264 #: build/C/man3/mcheck.3:28
4265 msgid ""
4266 "mcheck, mcheck_check_all, mcheck_pedantic, mprobe - heap consistency checking"
4267 msgstr ""
4268
4269 #. type: Plain text
4270 #: build/C/man3/mcheck.3:31
4271 #, no-wrap
4272 msgid "B<#include E<lt>mcheck.hE<gt>>\n"
4273 msgstr "B<#include E<lt>mcheck.hE<gt>>\n"
4274
4275 #. type: Plain text
4276 #: build/C/man3/mcheck.3:33
4277 #, no-wrap
4278 msgid "B<int mcheck(void (*>I<abortfunc>B<)(enum mcheck_status >I<mstatus>B<));>\n"
4279 msgstr ""
4280
4281 #. type: Plain text
4282 #: build/C/man3/mcheck.3:35
4283 #, no-wrap
4284 msgid "B<int mcheck_pedantic(void (*>I<abortfunc>B<)(enum mcheck_status >I<mstatus>B<));>\n"
4285 msgstr ""
4286
4287 #. type: Plain text
4288 #: build/C/man3/mcheck.3:37
4289 #, no-wrap
4290 msgid "B<void mcheck_check_all(void);>\n"
4291 msgstr "B<void mcheck_check_all(void);>\n"
4292
4293 #. type: Plain text
4294 #: build/C/man3/mcheck.3:39
4295 #, no-wrap
4296 msgid "B<enum mcheck_status mprobe(void *>I<ptr>B<);>\n"
4297 msgstr "B<enum mcheck_status mprobe(void *>I<ptr>B<);>\n"
4298
4299 #. type: Plain text
4300 #: build/C/man3/mcheck.3:51
4301 msgid ""
4302 "The B<mcheck>()  function installs a set of debugging hooks for the B<malloc>"
4303 "(3)  family of memory-allocation functions.  These hooks cause certain "
4304 "consistency checks to be performed on the state of the heap.  The checks can "
4305 "detect application errors such as freeing a block of memory more than once "
4306 "or corrupting the bookkeeping data structures that immediately precede a "
4307 "block of allocated memory."
4308 msgstr ""
4309
4310 #. type: Plain text
4311 #: build/C/man3/mcheck.3:63
4312 msgid ""
4313 "To be effective, the B<mcheck>()  function must be called before the first "
4314 "call to B<malloc>(3)  or a related function.  In cases where this is "
4315 "difficult to ensure, linking the program with I<-lmcheck> inserts an "
4316 "implicit call to B<mcheck>()  (with a NULL argument)  before the first call "
4317 "to a memory-allocation function."
4318 msgstr ""
4319
4320 #. type: Plain text
4321 #: build/C/man3/mcheck.3:71
4322 msgid ""
4323 "The B<mcheck_pedantic>()  function is similar to B<mcheck>(), but performs "
4324 "checks on all allocated blocks whenever one of the memory-allocation "
4325 "functions is called.  This can be very slow!"
4326 msgstr ""
4327
4328 #. type: Plain text
4329 #: build/C/man3/mcheck.3:78
4330 msgid ""
4331 "The B<mcheck_check_all>()  function causes an immediate check on all "
4332 "allocated blocks.  This call is effective only if B<mcheck>()  is called "
4333 "beforehand."
4334 msgstr ""
4335
4336 #. type: Plain text
4337 #: build/C/man3/mcheck.3:91
4338 msgid ""
4339 "If the system detects an inconsistency in the heap, the caller-supplied "
4340 "function pointed to by I<abortfunc> is invoked with a single argument "
4341 "argument, I<mstatus>, that indicates what type of inconsistency was "
4342 "detected.  If I<abortfunc> is NULL, a default function prints an error "
4343 "message on I<stderr> and calls B<abort>(3)."
4344 msgstr ""
4345
4346 #. type: Plain text
4347 #: build/C/man3/mcheck.3:103
4348 msgid ""
4349 "The B<mprobe>()  function performs a consistency check on the block of "
4350 "allocated memory pointed to by I<ptr>.  The B<mcheck>()  function should be "
4351 "called beforehand (otherwise B<mprobe>()  returns B<MCHECK_DISABLED>)."
4352 msgstr ""
4353
4354 #. type: Plain text
4355 #: build/C/man3/mcheck.3:111
4356 msgid ""
4357 "The following list describes the values returned by B<mprobe>()  or passed "
4358 "as the I<mstatus> argument when I<abortfunc> is invoked:"
4359 msgstr ""
4360
4361 #. type: TP
4362 #: build/C/man3/mcheck.3:111
4363 #, no-wrap
4364 msgid "B<MCHECK_DISABLED> (B<mprobe>() only)"
4365 msgstr ""
4366
4367 #. type: Plain text
4368 #: build/C/man3/mcheck.3:116
4369 msgid ""
4370 "B<mcheck>()  was not called before the first memory allocation function was "
4371 "called.  Consistency checking is not possible."
4372 msgstr ""
4373
4374 #. type: TP
4375 #: build/C/man3/mcheck.3:116
4376 #, no-wrap
4377 msgid "B<MCHECK_OK> (B<mprobe>() only)"
4378 msgstr ""
4379
4380 #. type: Plain text
4381 #: build/C/man3/mcheck.3:119
4382 msgid "No inconsistency detected."
4383 msgstr ""
4384
4385 #. type: TP
4386 #: build/C/man3/mcheck.3:119
4387 #, no-wrap
4388 msgid "B<MCHECK_HEAD>"
4389 msgstr "B<MCHECK_HEAD>"
4390
4391 #. type: Plain text
4392 #: build/C/man3/mcheck.3:122
4393 msgid "Memory preceding an allocated block was clobbered."
4394 msgstr ""
4395
4396 #. type: TP
4397 #: build/C/man3/mcheck.3:122
4398 #, no-wrap
4399 msgid "B<MCHECK_TAIL>"
4400 msgstr "B<MCHECK_TAIL>"
4401
4402 #. type: Plain text
4403 #: build/C/man3/mcheck.3:125
4404 msgid "Memory following an allocated block was clobbered."
4405 msgstr ""
4406
4407 #. type: TP
4408 #: build/C/man3/mcheck.3:125
4409 #, no-wrap
4410 msgid "B<MCHECK_FREE>"
4411 msgstr "B<MCHECK_FREE>"
4412
4413 #. type: Plain text
4414 #: build/C/man3/mcheck.3:129
4415 msgid "A block of memory was freed twice."
4416 msgstr ""
4417
4418 #. type: Plain text
4419 #: build/C/man3/mcheck.3:134
4420 msgid ""
4421 "B<mcheck>()  and B<mcheck_pedantic>()  return 0 on success, or -1 on error."
4422 msgstr ""
4423
4424 #. type: Plain text
4425 #: build/C/man3/mcheck.3:145
4426 msgid ""
4427 "The B<mcheck_pedantic>()  and B<mcheck_check_all>()  functions are available "
4428 "since glibc 2.2.  The B<mcheck>()  and B<mprobe>()  functions are present "
4429 "since at least glibc 2.0"
4430 msgstr ""
4431
4432 #.  But is MALLOC_CHECK_ slower?
4433 #. type: Plain text
4434 #: build/C/man3/mcheck.3:159
4435 msgid ""
4436 "Linking a program with I<-lmcheck> and using the B<MALLOC_CHECK_> "
4437 "environment variable (described in B<mallopt>(3))  cause the same kinds of "
4438 "errors to be detected.  But, using B<MALLOC_CHECK_> does not require the "
4439 "application to be relinked."
4440 msgstr ""
4441
4442 #. type: Plain text
4443 #: build/C/man3/mcheck.3:165
4444 msgid ""
4445 "The program below calls B<mcheck>()  with a NULL argument and then frees the "
4446 "same block of memory twice.  The following shell session demonstrates what "
4447 "happens when running the program:"
4448 msgstr ""
4449
4450 #. type: Plain text
4451 #: build/C/man3/mcheck.3:170
4452 #, no-wrap
4453 msgid ""
4454 "$B< ./a.out>\n"
4455 "About to free\n"
4456 msgstr ""
4457
4458 #. type: Plain text
4459 #: build/C/man3/mcheck.3:174
4460 #, no-wrap
4461 msgid ""
4462 "About to free a second time\n"
4463 "block freed twice\n"
4464 "Aborted (core dumped)\n"
4465 msgstr ""
4466
4467 #. type: Plain text
4468 #: build/C/man3/mcheck.3:182
4469 #, no-wrap
4470 msgid ""
4471 "#include E<lt>stdlib.hE<gt>\n"
4472 "#include E<lt>stdio.hE<gt>\n"
4473 "#include E<lt>mcheck.hE<gt>\n"
4474 msgstr ""
4475 "#include E<lt>stdlib.hE<gt>\n"
4476 "#include E<lt>stdio.hE<gt>\n"
4477 "#include E<lt>mcheck.hE<gt>\n"
4478
4479 #. type: Plain text
4480 #: build/C/man3/mcheck.3:190
4481 #, no-wrap
4482 msgid ""
4483 "    if (mcheck(NULL) != 0) {\n"
4484 "        fprintf(stderr, \"mcheck() failed\\en\");\n"
4485 msgstr ""
4486
4487 #. type: Plain text
4488 #: build/C/man3/mcheck.3:193
4489 #, no-wrap
4490 msgid ""
4491 "        exit(EXIT_FAILURE);\n"
4492 "    }\n"
4493 msgstr ""
4494 "        exit(EXIT_FAILURE);\n"
4495 "    }\n"
4496
4497 #. type: Plain text
4498 #: build/C/man3/mcheck.3:195
4499 #, no-wrap
4500 msgid "    p = malloc(1000);\n"
4501 msgstr "    p = malloc(1000);\n"
4502
4503 #. type: Plain text
4504 #: build/C/man3/mcheck.3:200
4505 #, no-wrap
4506 msgid ""
4507 "    fprintf(stderr, \"About to free\\en\");\n"
4508 "    free(p);\n"
4509 "    fprintf(stderr, \"\\enAbout to free a second time\\en\");\n"
4510 "    free(p);\n"
4511 msgstr ""
4512
4513 #. type: Plain text
4514 #: build/C/man3/mcheck.3:208
4515 msgid "B<malloc>(3), B<mallopt>(3), B<mtrace>(3)"
4516 msgstr "B<malloc>(3), B<mallopt>(3), B<mtrace>(3)"
4517
4518 #. type: TH
4519 #: build/C/man2/mlock.2:26
4520 #, no-wrap
4521 msgid "MLOCK"
4522 msgstr "MLOCK"
4523
4524 #. type: TH
4525 #: build/C/man2/mlock.2:26
4526 #, no-wrap
4527 msgid "2011-09-14"
4528 msgstr "2011-09-14"
4529
4530 #. type: Plain text
4531 #: build/C/man2/mlock.2:29
4532 msgid "mlock, munlock, mlockall, munlockall - lock and unlock memory"
4533 msgstr "mlock - メモリのロックとロック解除を行う"
4534
4535 #. type: Plain text
4536 #: build/C/man2/mlock.2:32 build/C/man2/mmap.2:46 build/C/man2/mmap2.2:35
4537 #: build/C/man2/mprotect.2:44 build/C/man2/mremap.2:38
4538 #, no-wrap
4539 msgid "B<#include E<lt>sys/mman.hE<gt>>\n"
4540 msgstr "B<#include E<lt>sys/mman.hE<gt>>\n"
4541
4542 #. type: Plain text
4543 #: build/C/man2/mlock.2:35
4544 #, no-wrap
4545 msgid ""
4546 "B<int mlock(const void *>I<addr>B<, size_t >I<len>B<);>\n"
4547 "B<int munlock(const void *>I<addr>B<, size_t >I<len>B<);>\n"
4548 msgstr ""
4549 "B<int mlock(const void *>I<addr>B<, size_t >I<len>B<);>\n"
4550 "B<int munlock(const void *>I<addr>B<, size_t >I<len>B<);>\n"
4551
4552 #. type: Plain text
4553 #: build/C/man2/mlock.2:38
4554 #, no-wrap
4555 msgid ""
4556 "B<int mlockall(int >I<flags>B<);>\n"
4557 "B<int munlockall(void);>\n"
4558 msgstr ""
4559 "B<int mlockall(int >I<flags>B<);>\n"
4560 "B<int munlockall(void);>\n"
4561
4562 #. type: Plain text
4563 #: build/C/man2/mlock.2:54
4564 msgid ""
4565 "B<mlock>()  and B<mlockall>()  respectively lock part or all of the calling "
4566 "process's virtual address space into RAM, preventing that memory from being "
4567 "paged to the swap area.  B<munlock>()  and B<munlockall>()  perform the "
4568 "converse operation, respectively unlocking part or all of the calling "
4569 "process's virtual address space, so that pages in the specified virtual "
4570 "address range may once more to be swapped out if required by the kernel "
4571 "memory manager.  Memory locking and unlocking are performed in units of "
4572 "whole pages."
4573 msgstr ""
4574 "B<mlock>()  と B<mlockall>()  はそれぞれ、呼び出し元プロセスの仮想アドレス空"
4575 "間の一部または全部を RAM 上にロックし、メモリがスワップエリアにページングされ"
4576 "るのを防ぐ。 B<munlock>()  と B<munlockall>()  は逆の操作で、それぞれ呼び出し"
4577 "元プロセスの仮想アドレス空間の一部または全部を ロック解除する。つまり、指定さ"
4578 "れた仮想アドレス範囲のページは カーネルメモリマネージャーから要求されればス"
4579 "ワップアウトするようになる。 メモリのロックとロック解除はページ単位で行われ"
4580 "る。"
4581
4582 #. type: SS
4583 #: build/C/man2/mlock.2:54
4584 #, no-wrap
4585 msgid "mlock() and munlock()"
4586 msgstr "mlock() と munlock()"
4587
4588 #. type: Plain text
4589 #: build/C/man2/mlock.2:64
4590 msgid ""
4591 "B<mlock>()  locks pages in the address range starting at I<addr> and "
4592 "continuing for I<len> bytes.  All pages that contain a part of the specified "
4593 "address range are guaranteed to be resident in RAM when the call returns "
4594 "successfully; the pages are guaranteed to stay in RAM until later unlocked."
4595 msgstr ""
4596 "B<mlock>()  は I<addr> から始まる長さ I<len> バイトのアドレス範囲のページを"
4597 "ロックする。 呼び出しが成功した場合には、 指定されたアドレス範囲を含む全ての"
4598 "ページは RAM に残り続けることが保証される。 これらのページは後でロック解除さ"
4599 "れるまで RAM に残り続けることが保証される。"
4600
4601 #. type: Plain text
4602 #: build/C/man2/mlock.2:73
4603 msgid ""
4604 "B<munlock>()  unlocks pages in the address range starting at I<addr> and "
4605 "continuing for I<len> bytes.  After this call, all pages that contain a part "
4606 "of the specified memory range can be moved to external swap space again by "
4607 "the kernel."
4608 msgstr ""
4609 "B<munlock>()  は、 I<addr> から始まる長さ I<len> バイトのアドレス範囲のページ"
4610 "のロックを解除する。 この呼び出しを行った後は、カーネルが、指定されたメモリ範"
4611 "囲を含む 全てのページを外部のスワップ空間に移動できるようになる。"
4612
4613 #. type: SS
4614 #: build/C/man2/mlock.2:73
4615 #, no-wrap
4616 msgid "mlockall() and munlockall()"
4617 msgstr "mlockall() と munlockall()"
4618
4619 #. type: Plain text
4620 #: build/C/man2/mlock.2:83
4621 msgid ""
4622 "B<mlockall>()  locks all pages mapped into the address space of the calling "
4623 "process.  This includes the pages of the code, data and stack segment, as "
4624 "well as shared libraries, user space kernel data, shared memory, and memory-"
4625 "mapped files.  All mapped pages are guaranteed to be resident in RAM when "
4626 "the call returns successfully; the pages are guaranteed to stay in RAM until "
4627 "later unlocked."
4628 msgstr ""
4629 "B<mlockall>()  は呼び出し元プロセスのアドレス空間にマップされている全てのペー"
4630 "ジを ロックする。これにはコード、データ、スタックの 各セグメント、共有ライブ"
4631 "ラリ、カーネルのユーザー空間データ、 共有メモリ、メモリ・マップされたファイル"
4632 "が含まれる。 システム・コールが成功した場合には全てのマップされたページは "
4633 "RAM に 残ることを保証される。 これらのページは後でロック解除されるまで RAM に"
4634 "残り続けることが保証される。"
4635
4636 #. type: Plain text
4637 #: build/C/man2/mlock.2:88
4638 msgid ""
4639 "The I<flags> argument is constructed as the bitwise OR of one or more of the "
4640 "following constants:"
4641 msgstr "I<flags> 引数は以下の内容の一つまたは複数のビット OR から構成される:"
4642
4643 #. type: TP
4644 #: build/C/man2/mlock.2:88
4645 #, no-wrap
4646 msgid "B<MCL_CURRENT>"
4647 msgstr "B<MCL_CURRENT>"
4648
4649 #. type: Plain text
4650 #: build/C/man2/mlock.2:92
4651 msgid ""
4652 "Lock all pages which are currently mapped into the address space of the "
4653 "process."
4654 msgstr ""
4655 "現在、プロセスのアドレス空間にマップされている全てのページをロックする。"
4656
4657 #. type: TP
4658 #: build/C/man2/mlock.2:92
4659 #, no-wrap
4660 msgid "B<MCL_FUTURE>"
4661 msgstr "B<MCL_FUTURE>"
4662
4663 #. type: Plain text
4664 #: build/C/man2/mlock.2:99
4665 #, fuzzy
4666 #| msgid ""
4667 #| "Lock all pages which will become mapped into the address space of the "
4668 #| "process in the future.  These could be for instance new pages required by "
4669 #| "a growing heap and stack as well as new memory mapped files or shared "
4670 #| "memory regions."
4671 msgid ""
4672 "Lock all pages which will become mapped into the address space of the "
4673 "process in the future.  These could be for instance new pages required by a "
4674 "growing heap and stack as well as new memory-mapped files or shared memory "
4675 "regions."
4676 msgstr ""
4677 "将来、プロセスのアドレス空間にマップされる全てのページをロックする。 例えば、"
4678 "ヒープ (heap) やスタックの成長により新しく必要になったページだけで なく、新し"
4679 "くメモリマップされたファイルや共有メモリ領域もロックされる。"
4680
4681 #. type: Plain text
4682 #: build/C/man2/mlock.2:112
4683 msgid ""
4684 "If B<MCL_FUTURE> has been specified, then a later system call (e.g., B<mmap>"
4685 "(2), B<sbrk>(2), B<malloc>(3)), may fail if it would cause the number of "
4686 "locked bytes to exceed the permitted maximum (see below).  In the same "
4687 "circumstances, stack growth may likewise fail: the kernel will deny stack "
4688 "expansion and deliver a B<SIGSEGV> signal to the process."
4689 msgstr ""
4690 "B<MCL_FUTURE> が指定されていると、以後のシステムコール (例えば、 B<mmap>(2), "
4691 "B<sbrk>(2), B<malloc>(3))  は、ロックするバイト数が許可された最大値 (下記参"
4692 "照) を超えた場合に 失敗する可能性がある。 同様に、スタックの成長も失敗する可"
4693 "能性がある。 その場合、カーネルはスタックの拡張を拒否し、 B<SIGSEGV> をプロセ"
4694 "スに送る。"
4695
4696 #. type: Plain text
4697 #: build/C/man2/mlock.2:116
4698 msgid ""
4699 "B<munlockall>()  unlocks all pages mapped into the address space of the "
4700 "calling process."
4701 msgstr ""
4702 "B<munlockall>()  は、呼び出し元プロセスのアドレス空間にマッピングされている "
4703 "全てのページをロック解除する。"
4704
4705 #. type: Plain text
4706 #: build/C/man2/mlock.2:122
4707 msgid ""
4708 "On success these system calls return 0.  On error, -1 is returned, I<errno> "
4709 "is set appropriately, and no changes are made to any locks in the address "
4710 "space of the process."
4711 msgstr ""
4712 "成功した場合は、これらのシステムコールはゼロを返す。 エラーの場合は -1 が返さ"
4713 "れ、 I<errno> が適切に設定され、プロセスのアドレス空間におけるロックは変更さ"
4714 "れない。"
4715
4716 #. type: Plain text
4717 #: build/C/man2/mlock.2:131
4718 msgid ""
4719 "(Linux 2.6.9 and later) the caller had a nonzero B<RLIMIT_MEMLOCK> soft "
4720 "resource limit, but tried to lock more memory than the limit permitted.  "
4721 "This limit is not enforced if the process is privileged (B<CAP_IPC_LOCK>)."
4722 msgstr ""
4723 "(Linux 2.6.9 以降) 呼び出し元は非ゼロの ソフト資源制限 B<RLIMIT_MEMLOCK> を持"
4724 "つが、制限が許可している以上のメモリをロックしようとした。 この制限は、プロセ"
4725 "スが特権 (B<CAP_IPC_LOCK>)  を持っている場合は適用されない。"
4726
4727 #.  In the case of mlock(), this check is somewhat buggy: it doesn't
4728 #.  take into account whether the to-be-locked range overlaps with
4729 #.  already locked pages.  Thus, suppose we allocate
4730 #.  (num_physpages / 4 + 1) of memory, and lock those pages once using
4731 #.  mlock(), and then lock the *same* page range a second time.
4732 #.  In the case, the second mlock() call will fail, since the check
4733 #.  calculates that the process is trying to lock (num_physpages / 2 + 2)
4734 #.  pages, which of course is not true.  (MTK, Nov 04, kernel 2.4.28)
4735 #. type: Plain text
4736 #: build/C/man2/mlock.2:143
4737 msgid ""
4738 "(Linux 2.4 and earlier) the calling process tried to lock more than half of "
4739 "RAM."
4740 msgstr ""
4741 "(Linux 2.4 以前) 呼び出し元プロセスが RAM の半分以上をロックしようとした。"
4742
4743 #. SVr4 documents an additional EAGAIN error code.
4744 #. type: Plain text
4745 #: build/C/man2/mlock.2:149
4746 msgid ""
4747 "The caller is not privileged, but needs privilege (B<CAP_IPC_LOCK>)  to "
4748 "perform the requested operation."
4749 msgstr ""
4750 "呼び出し側が特権を持っていないが、\n"
4751 "要求された操作を実行するには特権 (B<CAP_IPC_LOCK>) が必要である。"
4752
4753 #. type: Plain text
4754 #: build/C/man2/mlock.2:154
4755 msgid "For B<mlock>()  and B<munlock>():"
4756 msgstr "B<mlock>()  と B<munlock>()  用として:"
4757
4758 #. type: Plain text
4759 #: build/C/man2/mlock.2:157
4760 msgid "Some or all of the specified address range could not be locked."
4761 msgstr "指定されたアドレス範囲の一部または全てをロックすることができなかった。"
4762
4763 #. type: Plain text
4764 #: build/C/man2/mlock.2:164
4765 msgid ""
4766 "The result of the addition I<start>+I<len> was less than I<start> (e.g., the "
4767 "addition may have resulted in an overflow)."
4768 msgstr ""
4769 "I<start>+I<len> の加算の結果が I<start> よりも小さかった\n"
4770 "(例えば、加算でオーバーフローが発生したなど)。"
4771
4772 #. type: Plain text
4773 #: build/C/man2/mlock.2:169
4774 msgid "(Not on Linux)  I<addr> was not a multiple of the page size."
4775 msgstr ""
4776 "(Linux ではこの意味で使われない)  I<addr> がページサイズの倍数ではない。"
4777
4778 #. type: Plain text
4779 #: build/C/man2/mlock.2:173
4780 msgid ""
4781 "Some of the specified address range does not correspond to mapped pages in "
4782 "the address space of the process."
4783 msgstr ""
4784 "指定されたアドレス範囲がプロセスのアドレス空間にマップされたページと 一致しな"
4785 "い。"
4786
4787 #. type: Plain text
4788 #: build/C/man2/mlock.2:176
4789 msgid "For B<mlockall>():"
4790 msgstr "B<mlockall>()  用として:"
4791
4792 #. type: Plain text
4793 #: build/C/man2/mlock.2:179
4794 msgid "Unknown I<flags> were specified."
4795 msgstr "未知の I<flags> が指定された。"
4796
4797 #. type: Plain text
4798 #: build/C/man2/mlock.2:182
4799 msgid "For B<munlockall>():"
4800 msgstr "B<munlockall>()  用として:"
4801
4802 #. type: Plain text
4803 #: build/C/man2/mlock.2:186
4804 msgid ""
4805 "(Linux 2.6.8 and earlier) The caller was not privileged (B<CAP_IPC_LOCK>)."
4806 msgstr ""
4807 "(Linux 2.6.8 以前) 呼び出し元が権限 (B<CAP_IPC_LOCK>)  を持っていない。"
4808
4809 #. type: Plain text
4810 #: build/C/man2/mlock.2:188
4811 msgid "POSIX.1-2001, SVr4."
4812 msgstr "POSIX.1-2001, SVr4."
4813
4814 #. type: SH
4815 #: build/C/man2/mlock.2:188 build/C/man2/mmap.2:501 build/C/man2/msync.2:105
4816 #, no-wrap
4817 msgid "AVAILABILITY"
4818 msgstr "可用性"
4819
4820 #. type: Plain text
4821 #: build/C/man2/mlock.2:200
4822 msgid ""
4823 "On POSIX systems on which B<mlock>()  and B<munlock>()  are available, "
4824 "B<_POSIX_MEMLOCK_RANGE> is defined in I<E<lt>unistd.hE<gt>> and the number "
4825 "of bytes in a page can be determined from the constant B<PAGESIZE> (if "
4826 "defined) in I<E<lt>limits.hE<gt>> or by calling I<sysconf(_SC_PAGESIZE)>."
4827 msgstr ""
4828 "B<mlock>()  と B<munlock>()  が使用可能な POSIX システムでは "
4829 "B<_POSIX_MEMLOCK_RANGE> が I<E<lt>unistd.hE<gt>> で定義されている。 また、"
4830 "ページあたりのバイト数は、 I<E<lt>limits.hE<gt>> で定義される定数 "
4831 "B<PAGESIZE> から (定義されている場合)、もしくは I<sysconf(_SC_PAGESIZE)> を呼"
4832 "び出すことで決定できる。"
4833
4834 #.  POSIX.1-2001: It shall be defined to -1 or 0 or 200112L.
4835 #.  -1: unavailable, 0: ask using sysconf().
4836 #.  glibc defines it to 1.
4837 #. type: Plain text
4838 #: build/C/man2/mlock.2:213
4839 msgid ""
4840 "On POSIX systems on which B<mlockall>()  and B<munlockall>()  are available, "
4841 "B<_POSIX_MEMLOCK> is defined in I<E<lt>unistd.hE<gt>> to a value greater "
4842 "than 0.  (See also B<sysconf>(3).)"
4843 msgstr ""
4844 "B<mlockall>()  と B<munlockall>()  が利用可能な POSIX システムでは、 "
4845 "B<_POSIX_MEMLOCK> は I<E<lt>unistd.hE<gt>> で 0 より大きい値に定義されている "
4846 "(B<sysconf>(3)  も参照のこと)。"
4847
4848 #. type: Plain text
4849 #: build/C/man2/mlock.2:231
4850 msgid ""
4851 "Memory locking has two main applications: real-time algorithms and high-"
4852 "security data processing.  Real-time applications require deterministic "
4853 "timing, and, like scheduling, paging is one major cause of unexpected "
4854 "program execution delays.  Real-time applications will usually also switch "
4855 "to a real-time scheduler with B<sched_setscheduler>(2).  Cryptographic "
4856 "security software often handles critical bytes like passwords or secret keys "
4857 "as data structures.  As a result of paging, these secrets could be "
4858 "transferred onto a persistent swap store medium, where they might be "
4859 "accessible to the enemy long after the security software has erased the "
4860 "secrets in RAM and terminated.  (But be aware that the suspend mode on "
4861 "laptops and some desktop computers will save a copy of the system's RAM to "
4862 "disk, regardless of memory locks.)"
4863 msgstr ""
4864 "メモリのロックの用途としては主に二つある: リアルタイム アルゴリズムと高いセ"
4865 "キュリティの必要なデータ処理である。リアルタイムの アプリケーションは決定的な"
4866 "タイミングやスケジューリングを必要とするが、 ページングは予期しないプログラム"
4867 "の実行遅延をもたらす主要な要因となる。 リアルタイムのアプリケーションはたいて"
4868 "いは B<sched_setscheduler>(2)  でリアルタイムスケジューラに変更される。 暗号"
4869 "やセキュリティのソフトウェアはしばしばパスワードや秘密鍵のデータの ような重要"
4870 "なバイト列を扱う。ページングの結果、これらの秘密が スワップ用の固定媒体に転送"
4871 "されるかもしれない。そして、セキュリティ・ ソフトウェアが RAM 上の秘密を削除"
4872 "して終了したずっと後になっても、 このスワップされたデータには敵がアクセスでき"
4873 "る可能性がある (しかし、ラップトップといくつかのデスクトップコンピュータの サ"
4874 "スペンドモードはシステムの RAM の内容をメモリのロックに関わらず ディスクに保"
4875 "存することに注意)。"
4876
4877 #. type: Plain text
4878 #: build/C/man2/mlock.2:244
4879 msgid ""
4880 "Real-time processes that are using B<mlockall>()  to prevent delays on page "
4881 "faults should reserve enough locked stack pages before entering the time-"
4882 "critical section, so that no page fault can be caused by function calls.  "
4883 "This can be achieved by calling a function that allocates a sufficiently "
4884 "large automatic variable (an array) and writes to the memory occupied by "
4885 "this array in order to touch these stack pages.  This way, enough pages will "
4886 "be mapped for the stack and can be locked into RAM.  The dummy writes ensure "
4887 "that not even copy-on-write page faults can occur in the critical section."
4888 msgstr ""
4889 "リアルタイムプロセスが B<mlockall>()  を使ってページフォールトによる遅延を防"
4890 "ごうとする場合、 関数呼び出しによってページフォールトが発生しないように、 時"
4891 "間制限の厳しい部分 (time-critical section) に入る前に 十分な量のロックされた"
4892 "スタックを確保しておく必要がある。 これを実現するには、十分な大きさの自動変"
4893 "数 (の配列) を確保し、 これらのスタック用のページがメモリ上に確保されるように"
4894 "この配列に 書き込みを行う関数を用意し、これを呼び出せばよい。こうすること"
4895 "で、 十分な量のページがスタックにマッピングされ、RAM にロックされる。 ダミー"
4896 "の書き込みを行うことによって、 時間制限の厳しい部分 (critical section) 内では"
4897 "書き込み時コピーによる ページフォールトさえも発生しないことが保証される。"
4898
4899 #. type: Plain text
4900 #: build/C/man2/mlock.2:250
4901 msgid ""
4902 "Memory locks are not inherited by a child created via B<fork>(2)  and are "
4903 "automatically removed (unlocked) during an B<execve>(2)  or when the process "
4904 "terminates."
4905 msgstr ""
4906 "メモリロックは B<fork>(2)  で作成された子プロセスには継承されず、 B<execve>"
4907 "(2)  が呼ばれたり、プロセスが終了した場合は 自動的に削除される (ロック解除さ"
4908 "れる)。"
4909
4910 #. type: Plain text
4911 #: build/C/man2/mlock.2:254
4912 msgid ""
4913 "The memory lock on an address range is automatically removed if the address "
4914 "range is unmapped via B<munmap>(2)."
4915 msgstr ""
4916 "あるアドレス範囲に対するメモリロックは、そのアドレス範囲が B<munmap>(2)  に"
4917 "よってアンマップされた場合は削除される。"
4918
4919 #. type: Plain text
4920 #: build/C/man2/mlock.2:267
4921 msgid ""
4922 "Memory locks do not stack, that is, pages which have been locked several "
4923 "times by calls to B<mlock>()  or B<mlockall>()  will be unlocked by a single "
4924 "call to B<munlock>()  for the corresponding range or by B<munlockall>().  "
4925 "Pages which are mapped to several locations or by several processes stay "
4926 "locked into RAM as long as they are locked at least at one location or by at "
4927 "least one process."
4928 msgstr ""
4929 "メモリのロックは累積しない。 すなわち複数回 B<mlock>()  や B<mlockall>()  を"
4930 "呼び出してロックされたページでも、 対応する範囲に対して B<munlock>()  を 1 回"
4931 "呼び出したり B<munlockall>()  を呼び出したりするだけでロック解除される。 複数"
4932 "の場所や複数のプロセスにマップされているページは、少なくとも一つの場所、 一つ"
4933 "のプロセスでロックされている限りは RAM に残り続ける。"
4934
4935 #. type: Plain text
4936 #: build/C/man2/mlock.2:278
4937 msgid ""
4938 "Under Linux, B<mlock>()  and B<munlock>()  automatically round I<addr> down "
4939 "to the nearest page boundary.  However, POSIX.1-2001 allows an "
4940 "implementation to require that I<addr> is page aligned, so portable "
4941 "applications should ensure this."
4942 msgstr ""
4943 "Linux では、 B<mlock>()  と B<munlock>()  は自動的に I<addr> を端数切り捨てに"
4944 "より一番近いページ境界へと丸める。 しかし POSIX.1-2001 は I<addr> がページ境"
4945 "界に合っていることを要求する実装も許している。 そのため移植性を意図したアプリ"
4946 "ケーションではきちんと境界に合わせた方が良い。"
4947
4948 #. type: Plain text
4949 #: build/C/man2/mlock.2:291
4950 msgid ""
4951 "The I<VmLck> field of the Linux-specific I</proc/PID/status> file shows how "
4952 "many kilobytes of memory the process with ID I<PID> has locked using B<mlock>"
4953 "(), B<mlockall>(), and B<mmap>(2)  B<MAP_LOCKED>."
4954 msgstr ""
4955 "Linux 固有の I</proc/PID/status> ファイルの I<VmLck> フィールドには、\n"
4956 "B<mlock>(), B<mlockall>() および B<mmap>(2) B<MAP_LOCKED> を使って、\n"
4957 "ID が I<PID> のプロセスがロックしているメモリ量 (キロバイト単位) が\n"
4958 "表示される。"
4959
4960 #. type: SS
4961 #: build/C/man2/mlock.2:291
4962 #, no-wrap
4963 msgid "Limits and permissions"
4964 msgstr "制限と権限"
4965
4966 #. type: Plain text
4967 #: build/C/man2/mlock.2:298
4968 msgid ""
4969 "In Linux 2.6.8 and earlier, a process must be privileged (B<CAP_IPC_LOCK>)  "
4970 "in order to lock memory and the B<RLIMIT_MEMLOCK> soft resource limit "
4971 "defines a limit on how much memory the process may lock."
4972 msgstr ""
4973 "Linux 2.6.8 以前では、メモリをロックするためには特権 (B<CAP_IPC_LOCK>)  が必"
4974 "要で、 ソフト資源制限 B<RLIMIT_MEMLOCK> はプロセスがどれだけのメモリをロック"
4975 "できるかの制限を定義する。"
4976
4977 #. type: Plain text
4978 #: build/C/man2/mlock.2:304
4979 msgid ""
4980 "Since Linux 2.6.9, no limits are placed on the amount of memory that a "
4981 "privileged process can lock and the B<RLIMIT_MEMLOCK> soft resource limit "
4982 "instead defines a limit on how much memory an unprivileged process may lock."
4983 msgstr ""
4984 "Linux 2.6.9 以降では、特権を持つプロセスがロックできるメモリ量は無制限とな"
4985 "り、 代わりにソフト資源制限 B<RLIMIT_MEMLOCK> は特権を持たないプロセスがロッ"
4986 "クできるメモリ量の制限を定義する。"
4987
4988 #. type: Plain text
4989 #: build/C/man2/mlock.2:312
4990 msgid ""
4991 "In the 2.4 series Linux kernels up to and including 2.4.17, a bug caused the "
4992 "B<mlockall>()  B<MCL_FUTURE> flag to be inherited across a B<fork>(2).  This "
4993 "was rectified in kernel 2.4.18."
4994 msgstr ""
4995 "2.4.17 までの 2.4 シリーズの Linux カーネルには、 B<mlockall>()  "
4996 "B<MCL_FUTURE> フラグが B<fork>(2)  で継承されると言うバグがある。 これはカー"
4997 "ネル 2.4.18 で修正された。"
4998
4999 #.  See the following LKML thread:
5000 #.  http://marc.theaimsgroup.com/?l=linux-kernel&m=113801392825023&w=2
5001 #.  "Rationale for RLIMIT_MEMLOCK"
5002 #.  23 Jan 2006
5003 #. type: Plain text
5004 #: build/C/man2/mlock.2:329
5005 msgid ""
5006 "Since kernel 2.6.9, if a privileged process calls I<mlockall(MCL_FUTURE)> "
5007 "and later drops privileges (loses the B<CAP_IPC_LOCK> capability by, for "
5008 "example, setting its effective UID to a nonzero value), then subsequent "
5009 "memory allocations (e.g., B<mmap>(2), B<brk>(2))  will fail if the "
5010 "B<RLIMIT_MEMLOCK> resource limit is encountered."
5011 msgstr ""
5012 "カーネル 2.6.9 以降では、特権を持ったプロセスが I<mlockall(MCL_FUTURE)> を呼"
5013 "び出した後で、特権をなくした場合 (例えば、 実効 UID を 0 以外の値に変更するな"
5014 "どにより、 B<CAP_IPC_LOCK> ケーパビリティを失った場合)、リソース上限 "
5015 "B<RLIMIT_MEMLOCK> に達すると、それ以降のメモリ割り当て (例えば B<mmap>(2), "
5016 "B<brk>(2))  は失敗する。"
5017
5018 #. type: Plain text
5019 #: build/C/man2/mlock.2:336
5020 msgid ""
5021 "B<mmap>(2), B<setrlimit>(2), B<shmctl>(2), B<sysconf>(3), B<proc>(5), "
5022 "B<capabilities>(7)"
5023 msgstr ""
5024 "B<mmap>(2), B<setrlimit>(2), B<shmctl>(2), B<sysconf>(3), B<proc>(5),\n"
5025 "B<capabilities>(7)"
5026
5027 #. type: TH
5028 #: build/C/man2/mmap.2:40
5029 #, no-wrap
5030 msgid "MMAP"
5031 msgstr "MMAP"
5032
5033 #. type: TH
5034 #: build/C/man2/mmap.2:40 build/C/man2/mprotect.2:38
5035 #, fuzzy, no-wrap
5036 #| msgid "2013-04-01"
5037 msgid "2014-01-05"
5038 msgstr "2013-04-01"
5039
5040 #. type: Plain text
5041 #: build/C/man2/mmap.2:43
5042 msgid "mmap, munmap - map or unmap files or devices into memory"
5043 msgstr "mmap, munmap - ファイルやデバイスをメモリにマップ/アンマップする"
5044
5045 #. type: Plain text
5046 #: build/C/man2/mmap.2:51
5047 #, no-wrap
5048 msgid ""
5049 "B<void *mmap(void *>I<addr>B<, size_t >I<length>B<, int >I<prot>B<, int >I<flags>B<,>\n"
5050 "B<           int >I<fd>B<, off_t >I<offset>B<);>\n"
5051 "B<int munmap(void *>I<addr>B<, size_t >I<length>B<);>\n"
5052 msgstr ""
5053 "B<void *mmap(void *>I<addr>B<, size_t >I<length>B<, int >I<prot>B<, int >I<flags>B<,>\n"
5054 "B<           int >I<fd>B<, off_t >I<offset>B<);>\n"
5055 "B<int munmap(void *>I<addr>B<, size_t >I<length>B<);>\n"
5056
5057 #. type: Plain text
5058 #: build/C/man2/mmap.2:54
5059 msgid "See NOTES for information on feature test macro requirements."
5060 msgstr "機能検査マクロの要件に関する情報は「注意」の節を参照。"
5061
5062 #. type: Plain text
5063 #: build/C/man2/mmap.2:63
5064 msgid ""
5065 "B<mmap>()  creates a new mapping in the virtual address space of the calling "
5066 "process.  The starting address for the new mapping is specified in I<addr>.  "
5067 "The I<length> argument specifies the length of the mapping."
5068 msgstr ""
5069 "B<mmap>()  は、新しいマッピングを呼び出し元プロセスの仮想アドレス空間に作成す"
5070 "る。 新しいマッピングの開始アドレスは I<addr> で指定される。マッピングの長さ"
5071 "は I<length> 引き数で指定される。"
5072
5073 #.  Before Linux 2.6.24, the address was rounded up to the next page
5074 #.  boundary; since 2.6.24, it is rounded down!
5075 #. type: Plain text
5076 #: build/C/man2/mmap.2:77
5077 msgid ""
5078 "If I<addr> is NULL, then the kernel chooses the address at which to create "
5079 "the mapping; this is the most portable method of creating a new mapping.  If "
5080 "I<addr> is not NULL, then the kernel takes it as a hint about where to place "
5081 "the mapping; on Linux, the mapping will be created at a nearby page "
5082 "boundary.  The address of the new mapping is returned as the result of the "
5083 "call."
5084 msgstr ""
5085 "I<addr> が NULL の場合、カーネルがマッピングを作成するアドレスを選択する。 こ"
5086 "の方法は最も移植性のある新しいマッピングの作成方法である。 I<addr> が NULL で"
5087 "ない場合、カーネルはマッピングをどこに配置するかのヒントとして I<addr> を使用"
5088 "する。Linux では、マッピングはすぐ近くのページ境界に作成される。 新しいマッピ"
5089 "ングのアドレスは、呼び出しの返り値として返される。"
5090
5091 #. type: Plain text
5092 #: build/C/man2/mmap.2:89
5093 msgid ""
5094 "The contents of a file mapping (as opposed to an anonymous mapping; see "
5095 "B<MAP_ANONYMOUS> below), are initialized using I<length> bytes starting at "
5096 "offset I<offset> in the file (or other object) referred to by the file "
5097 "descriptor I<fd>.  I<offset> must be a multiple of the page size as returned "
5098 "by I<sysconf(_SC_PAGE_SIZE)>."
5099 msgstr ""
5100 "ファイルマッピングの内容は、 ファイルディスクリプタ I<fd> で参照されるファイ"
5101 "ル (もしくは他のオブジェクト) のオフセット I<offset> から開始される "
5102 "I<length> バイトのデータで初期化される (ファイルマッピングは無名マッピングの"
5103 "反対語である。 B<MAP_ANONYMOUS> を参照)。 I<offset> は I<sysconf"
5104 "(_SC_PAGE_SIZE)> が返すページサイズの倍数でなければならない。"
5105
5106 #. type: Plain text
5107 #: build/C/man2/mmap.2:97
5108 msgid ""
5109 "The I<prot> argument describes the desired memory protection of the mapping "
5110 "(and must not conflict with the open mode of the file).  It is either "
5111 "B<PROT_NONE> or the bitwise OR of one or more of the following flags:"
5112 msgstr ""
5113 "引き数 I<prot> には、マッピングのメモリ保護をどのように行なうかを指定する "
5114 "(ファイルのオープンモードと矛盾してはいけない)。 I<prot> には、 B<PROT_NONE> "
5115 "か、以下のフラグをひとつ以上ビット毎の論理和 (OR) をとったものを 指定できる。"
5116
5117 #. type: TP
5118 #: build/C/man2/mmap.2:97 build/C/man2/mprotect.2:73
5119 #, no-wrap
5120 msgid "B<PROT_EXEC>"
5121 msgstr "B<PROT_EXEC>"
5122
5123 #. type: Plain text
5124 #: build/C/man2/mmap.2:100
5125 msgid "Pages may be executed."
5126 msgstr "ページは実行可能である。"
5127
5128 #. type: TP
5129 #: build/C/man2/mmap.2:100 build/C/man2/mprotect.2:67
5130 #, no-wrap
5131 msgid "B<PROT_READ>"
5132 msgstr "B<PROT_READ>"
5133
5134 #. type: Plain text
5135 #: build/C/man2/mmap.2:103
5136 msgid "Pages may be read."
5137 msgstr "ページは読み込み可能である。"
5138
5139 #. type: TP
5140 #: build/C/man2/mmap.2:103 build/C/man2/mprotect.2:70
5141 #, no-wrap
5142 msgid "B<PROT_WRITE>"
5143 msgstr "B<PROT_WRITE>"
5144
5145 #. type: Plain text
5146 #: build/C/man2/mmap.2:106
5147 msgid "Pages may be written."
5148 msgstr "ページに書き込み可能である。"
5149
5150 #. type: TP
5151 #: build/C/man2/mmap.2:106 build/C/man2/mprotect.2:64
5152 #, no-wrap
5153 msgid "B<PROT_NONE>"
5154 msgstr "B<PROT_NONE>"
5155
5156 #. type: Plain text
5157 #: build/C/man2/mmap.2:109
5158 msgid "Pages may not be accessed."
5159 msgstr "ページにはアクセスできない。"
5160
5161 #. type: Plain text
5162 #: build/C/man2/mmap.2:118
5163 msgid ""
5164 "The I<flags> argument determines whether updates to the mapping are visible "
5165 "to other processes mapping the same region, and whether updates are carried "
5166 "through to the underlying file.  This behavior is determined by including "
5167 "exactly one of the following values in I<flags>:"
5168 msgstr ""
5169 "I<flags> 引き数により、マッピングに対する更新が同じ領域をマッピングしている "
5170 "他のプロセスに見えるか、更新がマッピング元のファイルを通じて 伝えられるか、が"
5171 "決定される。この動作は、以下の値のいずれか一つだけ (複数は指定できない) を "
5172 "I<flags> に含めることで指定する。"
5173
5174 #. type: TP
5175 #: build/C/man2/mmap.2:118
5176 #, no-wrap
5177 msgid "B<MAP_SHARED>"
5178 msgstr "B<MAP_SHARED>"
5179
5180 #. type: Plain text
5181 #: build/C/man2/mmap.2:128
5182 msgid ""
5183 "Share this mapping.  Updates to the mapping are visible to other processes "
5184 "that map this file, and are carried through to the underlying file.  The "
5185 "file may not actually be updated until B<msync>(2)  or B<munmap>()  is "
5186 "called."
5187 msgstr ""
5188 "このマッピングを共有する。 マッピングに対する更新はこのファイルをマッピングし"
5189 "ている他のプロセス から見える。更新はマッピング元のファイルを通じて伝えられ"
5190 "る。 ただし、ファイルの実際の更新は B<msync>(2)  または B<munmap>()  が呼ばれ"
5191 "るまで行われないこともある。"
5192
5193 #. type: TP
5194 #: build/C/man2/mmap.2:128
5195 #, no-wrap
5196 msgid "B<MAP_PRIVATE>"
5197 msgstr "B<MAP_PRIVATE>"
5198
5199 #. type: Plain text
5200 #: build/C/man2/mmap.2:137
5201 msgid ""
5202 "Create a private copy-on-write mapping.  Updates to the mapping are not "
5203 "visible to other processes mapping the same file, and are not carried "
5204 "through to the underlying file.  It is unspecified whether changes made to "
5205 "the file after the B<mmap>()  call are visible in the mapped region."
5206 msgstr ""
5207 "プライベートな copy-on-write (書き込み時コピー) マップを生成する。 マッピング"
5208 "に対する更新は同じファイルをマッピングしている他のプロセス には見えず、更新が"
5209 "マッピング元のファイルを通じて伝えられることもない。 B<mmap>()  の呼び出し後"
5210 "にマッピング元のファイルに対して行われた変更が、 マップ領域に反映されるかどう"
5211 "かは規定されていない。"
5212
5213 #. type: Plain text
5214 #: build/C/man2/mmap.2:139
5215 msgid "Both of these flags are described in POSIX.1-2001."
5216 msgstr "上記の二つのフラグは POSIX.1-2001 で規定されている。"
5217
5218 #. type: Plain text
5219 #: build/C/man2/mmap.2:142
5220 msgid ""
5221 "In addition, zero or more of the following values can be ORed in I<flags>:"
5222 msgstr ""
5223 "さらに、以下の値のうち 0 個以上をビット毎の論理和 (OR) で I<flags> に指定する"
5224 "ことができる。"
5225
5226 #. type: TP
5227 #: build/C/man2/mmap.2:142
5228 #, no-wrap
5229 msgid "B<MAP_32BIT> (since Linux 2.4.20, 2.6)"
5230 msgstr "B<MAP_32BIT> (Linux 2.4.20, 2.6 以降)"
5231
5232 #.  See http://lwn.net/Articles/294642 "Tangled up in threads", 19 Aug 08
5233 #. type: Plain text
5234 #: build/C/man2/mmap.2:158
5235 msgid ""
5236 "Put the mapping into the first 2 Gigabytes of the process address space.  "
5237 "This flag is supported only on x86-64, for 64-bit programs.  It was added to "
5238 "allow thread stacks to be allocated somewhere in the first 2GB of memory, so "
5239 "as to improve context-switch performance on some early 64-bit processors.  "
5240 "Modern x86-64 processors no longer have this performance problem, so use of "
5241 "this flag is not required on those systems.  The B<MAP_32BIT> flag is "
5242 "ignored when B<MAP_FIXED> is set."
5243 msgstr ""
5244 "マッピングをプロセスのアドレス空間の先頭 2 ギガバイト以内に配置する。 このフ"
5245 "ラグがサポートされているのは x86-64 アーキテクチャ上の 64 ビットプログラムの"
5246 "みである。 このフラグが追加されたのは、スレッドのスタックをメモリの先頭 2GB "
5247 "以内の どこかに割り当てることで、初期のいくつかの 64 ビットプロセッサにおけ"
5248 "る コンテキストスイッチの性能問題を改善するためである。 最近の x86-64 プロ"
5249 "セッサではこの性能問題はもはや存在せず、 そのようなシステムではこのフラグを使"
5250 "用する必要はない。 B<MAP_FIXED> がセットされている場合は、 B<MAP_32BIT> フラ"
5251 "グは無視される。"
5252
5253 #. type: TP
5254 #: build/C/man2/mmap.2:158
5255 #, no-wrap
5256 msgid "B<MAP_ANON>"
5257 msgstr "B<MAP_ANON>"
5258
5259 #. type: Plain text
5260 #: build/C/man2/mmap.2:163
5261 msgid "Synonym for B<MAP_ANONYMOUS>.  Deprecated."
5262 msgstr "B<MAP_ANONYMOUS> の同義語。非推奨。"
5263
5264 #. type: TP
5265 #: build/C/man2/mmap.2:163
5266 #, no-wrap
5267 msgid "B<MAP_ANONYMOUS>"
5268 msgstr "B<MAP_ANONYMOUS>"
5269
5270 #. type: Plain text
5271 #: build/C/man2/mmap.2:185
5272 msgid ""
5273 "The mapping is not backed by any file; its contents are initialized to "
5274 "zero.  The I<fd> and I<offset> arguments are ignored; however, some "
5275 "implementations require I<fd> to be -1 if B<MAP_ANONYMOUS> (or B<MAP_ANON>)  "
5276 "is specified, and portable applications should ensure this.  The use of "
5277 "B<MAP_ANONYMOUS> in conjunction with B<MAP_SHARED> is supported on Linux "
5278 "only since kernel 2.4."
5279 msgstr ""
5280 "マッピングはどのファイルとも関連付けされない。 マッピングの内容は 0 で初期化"
5281 "される。 引き数 I<fd> と I<offset> は無視される。 ただし、実装によっては "
5282 "B<MAP_ANONYMOUS> (もしくは B<MAP_ANON>)  が指定された場合、 I<fd> を -1 にす"
5283 "る必要があり、 移植性が必要なアプリケーションでは必ず I<fd> を -1 にすべきで"
5284 "ある。 B<MAP_ANONYMOUS> と B<MAP_SHARED> を組み合わせての利用は カーネル 2.4 "
5285 "以降の Linux でのみサポートされている。"
5286
5287 #. type: TP
5288 #: build/C/man2/mmap.2:185
5289 #, no-wrap
5290 msgid "B<MAP_DENYWRITE>"
5291 msgstr "B<MAP_DENYWRITE>"
5292
5293 #.  Introduced in 1.1.36, removed in 1.3.24.
5294 #. type: Plain text
5295 #: build/C/man2/mmap.2:193
5296 msgid ""
5297 "This flag is ignored.  (Long ago, it signaled that attempts to write to the "
5298 "underlying file should fail with B<ETXTBUSY>.  But this was a source of "
5299 "denial-of-service attacks.)"
5300 msgstr ""
5301 "このフラグは無視される (ずっと前は、マップ元のファイルへの書き込みを行おうと"
5302 "すると、エラー B<ETXTBUSY> で失敗するようにシグナルが設定されていたが、これ"
5303 "は denial-of-service (サービス拒否) 攻撃の原因となった)。"
5304
5305 #. type: TP
5306 #: build/C/man2/mmap.2:193
5307 #, no-wrap
5308 msgid "B<MAP_EXECUTABLE>"
5309 msgstr "B<MAP_EXECUTABLE>"
5310
5311 #.  Introduced in 1.1.38, removed in 1.3.24. Flag tested in proc_follow_link.
5312 #.  (Long ago, it signaled that the underlying file is an executable.
5313 #.  However, that information was not really used anywhere.)
5314 #.  Linus talked about DOS related to MAP_EXECUTABLE, but he was thinking of
5315 #.  MAP_DENYWRITE?
5316 #. type: Plain text
5317 #: build/C/man2/mmap.2:201
5318 msgid "This flag is ignored."
5319 msgstr "このフラグは無視される。"
5320
5321 #. type: TP
5322 #: build/C/man2/mmap.2:201
5323 #, no-wrap
5324 msgid "B<MAP_FILE>"
5325 msgstr "B<MAP_FILE>"
5326
5327 #.  On some systems, this was required as the opposite of
5328 #.  MAP_ANONYMOUS -- mtk, 1 May 2007
5329 #. type: Plain text
5330 #: build/C/man2/mmap.2:207
5331 msgid "Compatibility flag.  Ignored."
5332 msgstr "互換性のためのフラグ。無視される。"
5333
5334 #. type: TP
5335 #: build/C/man2/mmap.2:207
5336 #, no-wrap
5337 msgid "B<MAP_FIXED>"
5338 msgstr "B<MAP_FIXED>"
5339
5340 #. type: Plain text
5341 #: build/C/man2/mmap.2:225
5342 msgid ""
5343 "Don't interpret I<addr> as a hint: place the mapping at exactly that "
5344 "address.  I<addr> must be a multiple of the page size.  If the memory region "
5345 "specified by I<addr> and I<len> overlaps pages of any existing mapping(s), "
5346 "then the overlapped part of the existing mapping(s) will be discarded.  If "
5347 "the specified address cannot be used, B<mmap>()  will fail.  Because "
5348 "requiring a fixed address for a mapping is less portable, the use of this "
5349 "option is discouraged."
5350 msgstr ""
5351 "I<addr> をアドレスのヒントとして使用するのではなく、 I<addr> で指定されたアド"
5352 "レスをそのまま使用してマッピングを配置する。 I<addr> はページサイズの倍数でな"
5353 "ければならない。 I<addr> と I<len> で指定されたメモリ領域が既存のマッピングの"
5354 "ページと重なる場合、 既存のマッピングの重なった部分は捨てられる。 もし指定さ"
5355 "れたアドレスが使用できない場合、 B<mmap>()  は失敗する。 マッピングに対して固"
5356 "定アドレスを要求するのは移植性の面で劣るので、 このオプションは使用しないこと"
5357 "を推奨する。"
5358
5359 #. type: TP
5360 #: build/C/man2/mmap.2:225
5361 #, no-wrap
5362 msgid "B<MAP_GROWSDOWN>"
5363 msgstr "B<MAP_GROWSDOWN>"
5364
5365 #. type: Plain text
5366 #: build/C/man2/mmap.2:230
5367 msgid ""
5368 "Used for stacks.  Indicates to the kernel virtual memory system that the "
5369 "mapping should extend downward in memory."
5370 msgstr ""
5371 "スタック用に使用される。マッピングをメモリ内で逆向きに行うことを カーネル仮想"
5372 "メモリシステムに指示する。 (訳注:マッピングは通常はメモリ・アドレスが増加す"
5373 "る向きに行うが、 このオプションを指定すると逆向きにマッピングを行う)"
5374
5375 #. type: TP
5376 #: build/C/man2/mmap.2:230
5377 #, no-wrap
5378 msgid "B<MAP_HUGETLB> (since Linux 2.6.32)"
5379 msgstr "B<MAP_HUGETLB> (Linux 2.6.32 以降)"
5380
5381 #. type: Plain text
5382 #: build/C/man2/mmap.2:236
5383 msgid ""
5384 "Allocate the mapping using \"huge pages.\" See the Linux kernel source file "
5385 "I<Documentation/vm/hugetlbpage.txt> for further information."
5386 msgstr ""
5387 "\"huge page\" を使ってマッピングを割り当てる。詳しい情報は、Linux カーネル"
5388 "ソースの I<Documentation/vm/hugetlbpage.txt> を参照。"
5389
5390 #. type: TP
5391 #: build/C/man2/mmap.2:236
5392 #, no-wrap
5393 msgid "B<MAP_LOCKED> (since Linux 2.5.37)"
5394 msgstr "B<MAP_LOCKED> (Linux 2.5.37 以降)"
5395
5396 #.  If set, the mapped pages will not be swapped out.
5397 #. type: Plain text
5398 #: build/C/man2/mmap.2:242
5399 msgid ""
5400 "Lock the pages of the mapped region into memory in the manner of B<mlock>"
5401 "(2).  This flag is ignored in older kernels."
5402 msgstr ""
5403 "マップされた領域のページを B<mlock>(2)  の方法でメモリ内にロックする。 それ以"
5404 "前のカーネルでは、このフラグは無視される。"
5405
5406 #. type: TP
5407 #: build/C/man2/mmap.2:242
5408 #, no-wrap
5409 msgid "B<MAP_NONBLOCK> (since Linux 2.5.46)"
5410 msgstr "B<MAP_NONBLOCK> (Linux 2.5.46 以降)"
5411
5412 #. type: Plain text
5413 #: build/C/man2/mmap.2:257
5414 msgid ""
5415 "Only meaningful in conjunction with B<MAP_POPULATE>.  Don't perform read-"
5416 "ahead: create page tables entries only for pages that are already present in "
5417 "RAM.  Since Linux 2.6.23, this flag causes B<MAP_POPULATE> to do nothing.  "
5418 "One day the combination of B<MAP_POPULATE> and B<MAP_NONBLOCK> may be "
5419 "reimplemented."
5420 msgstr ""
5421 "B<MAP_POPULATE> と組み合わせた場合のみ意味を持つ。 read-ahead (前もって読み込"
5422 "むこと) を実行しない。 単に、すでに RAM 上に存在するページに対してのみページ"
5423 "テーブルエントリを作成する。 Linux 2.6.23 以降では、このフラグは "
5424 "B<MAP_POPULATE> に何の影響も与えない。 いつか B<MAP_POPULATE> と "
5425 "B<MAP_NONBLOCK> を組み合わせた場合の動作は実装し直されるかもしれない。"
5426
5427 #. type: TP
5428 #: build/C/man2/mmap.2:257
5429 #, no-wrap
5430 msgid "B<MAP_NORESERVE>"
5431 msgstr "B<MAP_NORESERVE>"
5432
5433 #. type: Plain text
5434 #: build/C/man2/mmap.2:272
5435 msgid ""
5436 "Do not reserve swap space for this mapping.  When swap space is reserved, "
5437 "one has the guarantee that it is possible to modify the mapping.  When swap "
5438 "space is not reserved one might get B<SIGSEGV> upon a write if no physical "
5439 "memory is available.  See also the discussion of the file I</proc/sys/vm/"
5440 "overcommit_memory> in B<proc>(5).  In kernels before 2.6, this flag had "
5441 "effect only for private writable mappings."
5442 msgstr ""
5443 "このマッピングに対するスワップ空間の予約を行わない。 スワップ空間を予約した場"
5444 "合は、このマッピングの変更が必ず可能なことが 保証される。予約を行わなかった場"
5445 "合、物理メモリに空きがないと 書き込み時に B<SIGSEGV> エラーを受け取ることがあ"
5446 "る。 B<proc>(5)  の I</proc/sys/vm/overcommit_memory> ファイルについての議論"
5447 "も参照。 バージョン 2.6 より前のカーネルでは、このフラグは書き込み可能な プラ"
5448 "イベート・マッピングについてのみ効果があった。"
5449
5450 #. type: TP
5451 #: build/C/man2/mmap.2:272
5452 #, no-wrap
5453 msgid "B<MAP_POPULATE> (since Linux 2.5.46)"
5454 msgstr "B<MAP_POPULATE> (Linux 2.5.46 以降)"
5455
5456 #. type: Plain text
5457 #: build/C/man2/mmap.2:279
5458 msgid ""
5459 "Populate (prefault) page tables for a mapping.  For a file mapping, this "
5460 "causes read-ahead on the file.  Later accesses to the mapping will not be "
5461 "blocked by page faults.  B<MAP_POPULATE> is supported for private mappings "
5462 "only since Linux 2.6.23."
5463 msgstr ""
5464 "マッピング用のページテーブルを配置 (populate) する ファイルマッピングの場合に"
5465 "は、これによりファイルが先読み (read-ahead)  が行われる。この以後は、マッピン"
5466 "グに対するアクセスがページフォールトで ブロックされることがなくなる。 Linux "
5467 "2.6.23 以降でのみプライベート・マッピングについて B<MAP_POPULATE> がサポート"
5468 "されている。"
5469
5470 #. type: TP
5471 #: build/C/man2/mmap.2:279
5472 #, no-wrap
5473 msgid "B<MAP_STACK> (since Linux 2.6.27)"
5474 msgstr "B<MAP_STACK> (Linux 2.6.27 以降)"
5475
5476 #.  See http://lwn.net/Articles/294642 "Tangled up in threads", 19 Aug 08
5477 #.  commit cd98a04a59e2f94fa64d5bf1e26498d27427d5e7
5478 #.  http://thread.gmane.org/gmane.linux.kernel/720412
5479 #.  "pthread_create() slow for many threads; also time to revisit 64b
5480 #.   context switch optimization?"
5481 #. type: Plain text
5482 #: build/C/man2/mmap.2:292
5483 msgid ""
5484 "Allocate the mapping at an address suitable for a process or thread stack.  "
5485 "This flag is currently a no-op, but is used in the glibc threading "
5486 "implementation so that if some architectures require special treatment for "
5487 "stack allocations, support can later be transparently implemented for glibc."
5488 msgstr ""
5489 "プロセスやスレッドのスタックに適したアドレスにマッピングを割り当てる。 現在の"
5490 "ところ、このフラグは何もしないが、 glibc のスレッド実装では使用されている。 "
5491 "これは、いくつかのアーキテクチャではスタックの割り当てに関して特別な扱い が必"
5492 "要な場合に、glibc にそのサポートを後で透過的に実装できるようにする ためであ"
5493 "る。"
5494
5495 #. type: TP
5496 #: build/C/man2/mmap.2:292
5497 #, no-wrap
5498 msgid "B<MAP_UNINITIALIZED> (since Linux 2.6.33)"
5499 msgstr "B<MAP_UNINITIALIZED> (Linux 2.6.33 以降)"
5500
5501 #. type: Plain text
5502 #: build/C/man2/mmap.2:302
5503 msgid ""
5504 "Don't clear anonymous pages.  This flag is intended to improve performance "
5505 "on embedded devices.  This flag is honored only if the kernel was configured "
5506 "with the B<CONFIG_MMAP_ALLOW_UNINITIALIZED> option.  Because of the security "
5507 "implications, that option is normally enabled only on embedded devices (i."
5508 "e., devices where one has complete control of the contents of user memory)."
5509 msgstr ""
5510 "無名ページ (anonymous page) のクリアを行わない。このフラグは組み込みデバイ"
5511 "ス\n"
5512 "での性能向上を目的に作られてものである。カーネルの設定で\n"
5513 "B<CONFIG_MMAP_ALLOW_UNINITIALIZED> オプションが有効になっている場合のみ、\n"
5514 "このフラグは効果を持つ。\n"
5515 "セキュリティ面の考慮から、このオプションは通常組み込みデバイス (すなわち、\n"
5516 "ユーザメモリの内容を完全に制御化におけるデバイス) においてのみ有効にされる。"
5517
5518 #. type: Plain text
5519 #: build/C/man2/mmap.2:310
5520 msgid ""
5521 "Of the above flags, only B<MAP_FIXED> is specified in POSIX.1-2001.  "
5522 "However, most systems also support B<MAP_ANONYMOUS> (or its synonym "
5523 "B<MAP_ANON>)."
5524 msgstr ""
5525 "上記のフラグの中では、 B<MAP_FIXED> だけが POSIX.1-2001 で規定されている。 し"
5526 "かしながら、ほとんどのシステムで B<MAP_ANONYMOUS> (またはその同義語である "
5527 "B<MAP_ANON>)  もサポートされている。"
5528
5529 #. type: Plain text
5530 #: build/C/man2/mmap.2:317
5531 msgid ""
5532 "Some systems document the additional flags B<MAP_AUTOGROW>, "
5533 "B<MAP_AUTORESRV>, B<MAP_COPY>, and B<MAP_LOCAL>."
5534 msgstr ""
5535 "いくつかのシステムでは、上記以外にフラグとして B<MAP_AUTOGROW>, "
5536 "B<MAP_AUTORESRV>, B<MAP_COPY>, B<MAP_LOCAL> が規定されている。"
5537
5538 #. type: Plain text
5539 #: build/C/man2/mmap.2:323
5540 msgid ""
5541 "Memory mapped by B<mmap>()  is preserved across B<fork>(2), with the same "
5542 "attributes."
5543 msgstr ""
5544 "B<mmap>()  によってマップされたメモリの属性は B<fork>(2)  の際に継承される。"
5545
5546 #. type: Plain text
5547 #: build/C/man2/mmap.2:331
5548 msgid ""
5549 "A file is mapped in multiples of the page size.  For a file that is not a "
5550 "multiple of the page size, the remaining memory is zeroed when mapped, and "
5551 "writes to that region are not written out to the file.  The effect of "
5552 "changing the size of the underlying file of a mapping on the pages that "
5553 "correspond to added or removed regions of the file is unspecified."
5554 msgstr ""
5555 "ファイルはページサイズの整数倍の領域にマップされる。サイズがページサイズの 整"
5556 "数倍でないファイルの場合、マップ時に残りの領域は 0 で埋められ、この領域へ 書"
5557 "きこみを行ってもファイルに書き出されることはない。マッピングを行った元 ファイ"
5558 "ルのサイズを変更した場合、元ファイルの追加されたり削除された領域に対応 する"
5559 "マップされたページに対してどのような影響があるかは規定されていない。"
5560
5561 #. type: SS
5562 #: build/C/man2/mmap.2:331
5563 #, no-wrap
5564 msgid "munmap()"
5565 msgstr "munmap()"
5566
5567 #. type: Plain text
5568 #: build/C/man2/mmap.2:341
5569 msgid ""
5570 "The B<munmap>()  system call deletes the mappings for the specified address "
5571 "range, and causes further references to addresses within the range to "
5572 "generate invalid memory references.  The region is also automatically "
5573 "unmapped when the process is terminated.  On the other hand, closing the "
5574 "file descriptor does not unmap the region."
5575 msgstr ""
5576 "システムコール B<munmap>()  は指定されたアドレス範囲のマップを消去し、 これ以"
5577 "降のその範囲内へのメモリ参照は不正となる。 この領域は、プロセスが終了したとき"
5578 "にも自動的にアンマップされる。 一方、ファイル記述子をクローズしても、この領域"
5579 "はアンマップされない。"
5580
5581 #. type: Plain text
5582 #: build/C/man2/mmap.2:351
5583 msgid ""
5584 "The address I<addr> must be a multiple of the page size.  All pages "
5585 "containing a part of the indicated range are unmapped, and subsequent "
5586 "references to these pages will generate B<SIGSEGV>.  It is not an error if "
5587 "the indicated range does not contain any mapped pages."
5588 msgstr ""
5589 "I<addr> アドレスはページサイズの整数倍でなければならない。指定された範囲の一"
5590 "部分を 含む全てのページはアンマップされ、これ以降にこれらのページへの参照があ"
5591 "ると B<SIGSEGV> が発生する。 指定した範囲内にマップされたページが一つも含まれ"
5592 "ていない場合でも エラーにならない。"
5593
5594 #. type: SS
5595 #: build/C/man2/mmap.2:351
5596 #, no-wrap
5597 msgid "Timestamps changes for file-backed mappings"
5598 msgstr "ファイルと関連付けられたマッピングに対するタイムスタンプの更新"
5599
5600 #. type: Plain text
5601 #: build/C/man2/mmap.2:358
5602 msgid ""
5603 "For file-backed mappings, the I<st_atime> field for the mapped file may be "
5604 "updated at any time between the B<mmap>()  and the corresponding unmapping; "
5605 "the first reference to a mapped page will update the field if it has not "
5606 "been already."
5607 msgstr ""
5608 "ファイルと関連付けられたマッピングの場合、マッピングされたファイルの "
5609 "I<st_atime> フィールドは、 B<mmap>()  されてからアンマップ (unmap) されるまで"
5610 "の間に更新されることがある。 それまでに更新が行われていなければ、マップされた"
5611 "ページへの最初の参照があった 際に更新される。"
5612
5613 #. type: Plain text
5614 #: build/C/man2/mmap.2:375
5615 msgid ""
5616 "The I<st_ctime> and I<st_mtime> field for a file mapped with B<PROT_WRITE> "
5617 "and B<MAP_SHARED> will be updated after a write to the mapped region, and "
5618 "before a subsequent B<msync>(2)  with the B<MS_SYNC> or B<MS_ASYNC> flag, if "
5619 "one occurs."
5620 msgstr ""
5621 "B<PROT_WRITE> と B<MAP_SHARED> の両方を指定してマップされたファイルの場合、書"
5622 "き込みがあると、 I<st_ctime> と I<st_mtime> の両フィールドは、マップされた領"
5623 "域への書き込みより後で、 B<MS_SYNC> または B<MS_ASYNC> フラグを指定して "
5624 "B<msync>(2)  が呼ばれる前までに更新される。"
5625
5626 #. type: Plain text
5627 #: build/C/man2/mmap.2:392
5628 msgid ""
5629 "On success, B<mmap>()  returns a pointer to the mapped area.  On error, the "
5630 "value B<MAP_FAILED> (that is, I<(void\\ *)\\ -1>)  is returned, and I<errno> "
5631 "is set appropriately.  On success, B<munmap>()  returns 0, on failure -1, "
5632 "and I<errno> is set (probably to B<EINVAL>)."
5633 msgstr ""
5634 "B<mmap>()  は成功するとマップされた領域へのポインタを返す。 失敗すると値 "
5635 "B<MAP_FAILED> (つまり I<(void\\ *)\\ -1>)  を返し、 I<errno> がエラーの内容に"
5636 "したがってセットされる。 B<munmap>()  は成功すると 0 を返す。失敗すると -1 を"
5637 "返し、 I<errno> がセットされる (多くの場合 B<EINVAL> になるだろう)。"
5638
5639 #. type: TP
5640 #: build/C/man2/mmap.2:393 build/C/man2/mprotect.2:86
5641 #: build/C/man3/shm_open.3:187 build/C/man3/shm_open.3:192
5642 #: build/C/man2/shmctl.2:306 build/C/man2/shmget.2:189
5643 #: build/C/man2/shmop.2:191
5644 #, no-wrap
5645 msgid "B<EACCES>"
5646 msgstr "B<EACCES>"
5647
5648 #. type: Plain text
5649 #: build/C/man2/mmap.2:413
5650 msgid ""
5651 "A file descriptor refers to a non-regular file.  Or B<MAP_PRIVATE> was "
5652 "requested, but I<fd> is not open for reading.  Or B<MAP_SHARED> was "
5653 "requested and B<PROT_WRITE> is set, but I<fd> is not open in read/write "
5654 "(B<O_RDWR>)  mode.  Or B<PROT_WRITE> is set, but the file is append-only."
5655 msgstr ""
5656 "以下のいずれかの場合。 ファイル記述子の参照先が通常のファイルではない (non-"
5657 "regular file) 。 B<MAP_PRIVATE> を要求したが I<fd> は読み込み用にオープンされ"
5658 "ていない。 B<MAP_SHARED> を要求して B<PROT_WRITE> をセットしたが I<fd> は読み"
5659 "書きモード (B<O_RDWR>)  でオープンされていない、 B<PROT_WRITE> をセットした"
5660 "が、ファイルは追加 (append) 専用である。"
5661
5662 #. type: Plain text
5663 #: build/C/man2/mmap.2:417
5664 msgid ""
5665 "The file has been locked, or too much memory has been locked (see "
5666 "B<setrlimit>(2))."
5667 msgstr ""
5668 "ファイルがロックされている。またはロックされているメモリが多すぎる "
5669 "(B<setrlimit>(2)  を参照)。"
5670
5671 #. type: Plain text
5672 #: build/C/man2/mmap.2:423
5673 msgid ""
5674 "I<fd> is not a valid file descriptor (and B<MAP_ANONYMOUS> was not set)."
5675 msgstr ""
5676 "I<fd> が有効なファイル記述子 (file descriptor) ではない (かつ "
5677 "B<MAP_ANONYMOUS> がセットされていない)。"
5678
5679 #. type: Plain text
5680 #: build/C/man2/mmap.2:431
5681 msgid ""
5682 "We don't like I<addr>, I<length>, or I<offset> (e.g., they are too large, or "
5683 "not aligned on a page boundary)."
5684 msgstr ""
5685 "I<addr> か I<length> か I<offset> が適切でない (例えば、大きすぎるとか、ペー"
5686 "ジ境界にアラインメントされていない)。"
5687
5688 #. type: Plain text
5689 #: build/C/man2/mmap.2:436
5690 msgid "(since Linux 2.6.12)  I<length> was 0."
5691 msgstr "(Linux 2.6.12 以降)  I<length> が 0 であった。"
5692
5693 #. type: Plain text
5694 #: build/C/man2/mmap.2:444
5695 msgid ""
5696 "I<flags> contained neither B<MAP_PRIVATE> or B<MAP_SHARED>, or contained "
5697 "both of these values."
5698 msgstr ""
5699 "I<flags> に B<MAP_PRIVATE> と B<MAP_SHARED> のどちらも含まれていなかった、も"
5700 "しくは その両方が含まれていた。"
5701
5702 #. type: TP
5703 #: build/C/man2/mmap.2:444 build/C/man3/shm_open.3:229
5704 #: build/C/man2/shmget.2:205
5705 #, no-wrap
5706 msgid "B<ENFILE>"
5707 msgstr "B<ENFILE>"
5708
5709 #.  [2.6.7] shmem_zero_setup()-->shmem_file_setup()-->get_empty_filp()
5710 #. type: Plain text
5711 #: build/C/man2/mmap.2:452 build/C/man2/shmget.2:209
5712 msgid "The system limit on the total number of open files has been reached."
5713 msgstr "システム全体でオープンされているファイルの総数が上限に達した。"
5714
5715 #. type: Plain text
5716 #: build/C/man2/mmap.2:456
5717 msgid ""
5718 "The underlying filesystem of the specified file does not support memory "
5719 "mapping."
5720 msgstr ""
5721 "指定されたファイルが置かれているファイルシステムがメモリマッピングをサポート "
5722 "していない。"
5723
5724 #. type: Plain text
5725 #: build/C/man2/mmap.2:460
5726 msgid ""
5727 "No memory is available, or the process's maximum number of mappings would "
5728 "have been exceeded."
5729 msgstr ""
5730 "メモリに空きがない、または処理中のプロセスのマッピング数が最大数を超過した。"
5731
5732 #.  (Since 2.4.25 / 2.6.0.)
5733 #. type: Plain text
5734 #: build/C/man2/mmap.2:469
5735 msgid ""
5736 "The I<prot> argument asks for B<PROT_EXEC> but the mapped area belongs to a "
5737 "file on a filesystem that was mounted no-exec."
5738 msgstr ""
5739 "I<prot> 引き数は B<PROT_EXEC> を行うように指定されているが、 no-exec でマウン"
5740 "トされたファイルシステム上のファイルに マップ領域が対応している。"
5741
5742 #. type: TP
5743 #: build/C/man2/mmap.2:469
5744 #, no-wrap
5745 msgid "B<ETXTBSY>"
5746 msgstr "B<ETXTBSY>"
5747
5748 #. type: Plain text
5749 #: build/C/man2/mmap.2:475
5750 msgid ""
5751 "B<MAP_DENYWRITE> was set but the object specified by I<fd> is open for "
5752 "writing."
5753 msgstr ""
5754 "B<MAP_DENYWRITE> がセットされているが I<fd> で指定されているオブジェクトは書"
5755 "き込み用に開かれている。"
5756
5757 #. type: TP
5758 #: build/C/man2/mmap.2:475 build/C/man2/shmctl.2:348
5759 #, no-wrap
5760 msgid "B<EOVERFLOW>"
5761 msgstr "B<EOVERFLOW>"
5762
5763 #. type: Plain text
5764 #: build/C/man2/mmap.2:487
5765 msgid ""
5766 "On 32-bit architecture together with the large file extension (i.e., using "
5767 "64-bit I<off_t>): the number of pages used for I<length> plus number of "
5768 "pages used for I<offset> would overflow I<unsigned long> (32 bits)."
5769 msgstr ""
5770 "32 ビットアーキテクチャで large file 拡張を使っている場合 (つまり 64 ビット"
5771 "の I<off_t> を使う場合)、 I<length> で使うページ数と I<offset> で使うページ数"
5772 "を足した値は I<unsigned long> (32 ビット) を超えてしまう (オーバーフローして"
5773 "しまう) 場合がある。"
5774
5775 #. type: Plain text
5776 #: build/C/man2/mmap.2:489
5777 msgid "Use of a mapped region can result in these signals:"
5778 msgstr "マップ領域を利用する際に、以下のシグナルが発生することがある:"
5779
5780 #. type: TP
5781 #: build/C/man2/mmap.2:489
5782 #, no-wrap
5783 msgid "B<SIGSEGV>"
5784 msgstr "B<SIGSEGV>"
5785
5786 #. type: Plain text
5787 #: build/C/man2/mmap.2:492
5788 msgid "Attempted write into a region mapped as read-only."
5789 msgstr "読み込み専用で mmap された領域へ書き込みを行おうとした。"
5790
5791 #. type: TP
5792 #: build/C/man2/mmap.2:492
5793 #, no-wrap
5794 msgid "B<SIGBUS>"
5795 msgstr "B<SIGBUS>"
5796
5797 #. type: Plain text
5798 #: build/C/man2/mmap.2:497
5799 msgid ""
5800 "Attempted access to a portion of the buffer that does not correspond to the "
5801 "file (for example, beyond the end of the file, including the case where "
5802 "another process has truncated the file)."
5803 msgstr ""
5804 "バッファのうち、ファイルに関連づけられていない部分 (例えばファイル末尾を越え"
5805 "た部分など。これには 他のプロセスがファイルを切り詰めた場合なども含まれる)  "
5806 "にアクセスしようとした。"
5807
5808 #.  SVr4 documents additional error codes ENXIO and ENODEV.
5809 #.  SUSv2 documents additional error codes EMFILE and EOVERFLOW.
5810 #. type: Plain text
5811 #: build/C/man2/mmap.2:501
5812 msgid "SVr4, 4.4BSD, POSIX.1-2001."
5813 msgstr "SVr4, 4.4BSD, POSIX.1-2001."
5814
5815 #.  POSIX.1-2001: It shall be defined to -1 or 0 or 200112L.
5816 #.  -1: unavailable, 0: ask using sysconf().
5817 #.  glibc defines it to 1.
5818 #. type: Plain text
5819 #: build/C/man2/mmap.2:515
5820 msgid ""
5821 "On POSIX systems on which B<mmap>(), B<msync>(2)  and B<munmap>()  are "
5822 "available, B<_POSIX_MAPPED_FILES> is defined in I<E<lt>unistd.hE<gt>> to a "
5823 "value greater than 0.  (See also B<sysconf>(3).)"
5824 msgstr ""
5825 "B<mmap>(), B<msync>(2)  B<munmap>()  が利用可能な POSIX システムでは、 "
5826 "B<_POSIX_MAPPED_FILES> は E<lt>unistd.hE<gt> で 0 より大きな値に定義される "
5827 "(B<sysconf>(3)  も参照のこと)。"
5828
5829 #.  Since around glibc 2.1/2.2, depending on the platform.
5830 #. type: Plain text
5831 #: build/C/man2/mmap.2:530
5832 msgid ""
5833 "This page describes the interface provided by the glibc B<mmap>()  wrapper "
5834 "function.  Originally, this function invoked a system call of the same "
5835 "name.  Since kernel 2.4, that system call has been superseded by B<mmap2>"
5836 "(2), and nowadays the glibc B<mmap>()  wrapper function invokes B<mmap2>(2)  "
5837 "with a suitably adjusted value for I<offset>."
5838 msgstr ""
5839 "このページでは glibc の B<mmap>() のラッパー関数が提供するインターフェース"
5840 "に\n"
5841 "ついて説明している。元々は、この関数は同じ名前のシステムコールを起動してい"
5842 "た。\n"
5843 "カーネル 2.4 以降、このシステムコールは B<mmap2>(2) に取って代わられ、現在\n"
5844 "では、 glibc の B<mmap>() のラッパー関数は I<offset> を適切に調整してから\n"
5845 "B<mmap2>(2) を起動する。"
5846
5847 #. type: Plain text
5848 #: build/C/man2/mmap.2:543
5849 msgid ""
5850 "On some hardware architectures (e.g., i386), B<PROT_WRITE> implies "
5851 "B<PROT_READ>.  It is architecture dependent whether B<PROT_READ> implies "
5852 "B<PROT_EXEC> or not.  Portable programs should always set B<PROT_EXEC> if "
5853 "they intend to execute code in the new mapping."
5854 msgstr ""
5855 "(i386 などの) いくつかのアーキテクチャでは、 B<PROT_WRITE> をセットすると、暗"
5856 "黙のうちに B<PROT_READ> がセットされる。 B<PROT_READ> をセットした際に暗黙の"
5857 "うちに B<PROT_EXEC> がセットされるかどうかは、アーキテクチャ依存である。 移植"
5858 "性を考慮したプログラムでは、 新規にマップした領域でコードを実行したい場合は、"
5859 "常に B<PROT_EXEC> をセットすべきである。"
5860
5861 #. type: Plain text
5862 #: build/C/man2/mmap.2:558
5863 msgid ""
5864 "The portable way to create a mapping is to specify I<addr> as 0 (NULL), and "
5865 "omit B<MAP_FIXED> from I<flags>.  In this case, the system chooses the "
5866 "address for the mapping; the address is chosen so as not to conflict with "
5867 "any existing mapping, and will not be 0.  If the B<MAP_FIXED> flag is "
5868 "specified, and I<addr> is 0 (NULL), then the mapped address will be 0 (NULL)."
5869 msgstr ""
5870 "マッピングを作成する移植性のある方法は、 I<addr> に 0 (NULL) を指定し、 "
5871 "I<flags> から B<MAP_FIXED> を外すことである。 この場合、システムがマッピング"
5872 "用のアドレスの選択を行う。 アドレスは既存のマッピングと衝突しないように、 か"
5873 "つ 0 にならないように選択される。 B<MAP_FIXED> フラグが指定され、かつ "
5874 "I<addr> が 0 (NULL)  の場合には、マップされるアドレスが 0 (NULL) になる。"
5875
5876 #. type: Plain text
5877 #: build/C/man2/mmap.2:587
5878 #, fuzzy
5879 #| msgid ""
5880 #| "Certain I<flags> constants are defined only if either B<_BSD_SOURCE> or "
5881 #| "B<_SVID_SOURCE> is defined.  (Requiring B<_GNU_SOURCE> also suffices, and "
5882 #| "requiring that macro specifically would have been more logical, since "
5883 #| "these flags are all Linux specific.)  The relevant flags are: "
5884 #| "B<MAP_32BIT>, B<MAP_ANONYMOUS> (and the synonym B<MAP_ANON>), "
5885 #| "B<MAP_DENYWRITE>, B<MAP_EXECUTABLE>, B<MAP_FILE>, B<MAP_GROWSDOWN>, "
5886 #| "B<MAP_HUGETLB>, B<MAP_LOCKED>, B<MAP_NONBLOCK>, B<MAP_NORESERVE>, "
5887 #| "B<MAP_POPULATE>, and B<MAP_STACK>."
5888 msgid ""
5889 "Certain I<flags> constants are defined only if either B<_BSD_SOURCE> or "
5890 "B<_SVID_SOURCE> is defined.  (Requiring B<_GNU_SOURCE> also suffices, and "
5891 "requiring that macro specifically would have been more logical, since these "
5892 "flags are all Linux-specific.)  The relevant flags are: B<MAP_32BIT>, "
5893 "B<MAP_ANONYMOUS> (and the synonym B<MAP_ANON>), B<MAP_DENYWRITE>, "
5894 "B<MAP_EXECUTABLE>, B<MAP_FILE>, B<MAP_GROWSDOWN>, B<MAP_HUGETLB>, "
5895 "B<MAP_LOCKED>, B<MAP_NONBLOCK>, B<MAP_NORESERVE>, B<MAP_POPULATE>, and "
5896 "B<MAP_STACK>."
5897 msgstr ""
5898 "特定の I<flags> 定数は B<_BSD_SOURCE> か B<_SVID_SOURCE> のいずれかが定義され"
5899 "た場合にのみ定義される。 (B<_GNU_SOURCE> も定義されている必要がある。これらの"
5900 "フラグはすべて Linux 固有のものなので、 特に B<_GNU_SOURCE> を必要とする点は"
5901 "もっと論理的に決められるべきであった。) 関係するフラグは B<MAP_32BIT>, "
5902 "B<MAP_ANONYMOUS> (とその同義語の B<MAP_ANON>), B<MAP_DENYWRITE>, "
5903 "B<MAP_EXECUTABLE>, B<MAP_FILE>, B<MAP_GROWSDOWN>, B<MAP_HUGETLB>, "
5904 "B<MAP_LOCKED>, B<MAP_NONBLOCK>, B<MAP_NORESERVE>, B<MAP_POPULATE>, "
5905 "B<MAP_STACK> である。"
5906
5907 #. type: Plain text
5908 #: build/C/man2/mmap.2:592
5909 msgid ""
5910 "On Linux there are no guarantees like those suggested above under "
5911 "B<MAP_NORESERVE>.  By default, any process can be killed at any moment when "
5912 "the system runs out of memory."
5913 msgstr ""
5914 "Linux においては、上記の B<MAP_NORESERVE> で述べられているような保証はない。 "
5915 "デフォルトでは、システムがメモリを使い切った場合には、 どのプロセスがいつ強制"
5916 "終了されるか分からないからである。"
5917
5918 #. type: Plain text
5919 #: build/C/man2/mmap.2:599
5920 msgid ""
5921 "In kernels before 2.6.7, the B<MAP_POPULATE> flag has effect only if I<prot> "
5922 "is specified as B<PROT_NONE>."
5923 msgstr ""
5924 "2.6.7 より前のカーネルでは、 I<prot> に B<PROT_NONE> が指定された場合にの"
5925 "み、 B<MAP_POPULATE> フラグが効力を持つ。"
5926
5927 #. type: Plain text
5928 #: build/C/man2/mmap.2:614
5929 msgid ""
5930 "SUSv3 specifies that B<mmap>()  should fail if I<length> is 0.  However, in "
5931 "kernels before 2.6.12, B<mmap>()  succeeded in this case: no mapping was "
5932 "created and the call returned I<addr>.  Since kernel 2.6.12, B<mmap>()  "
5933 "fails with the error B<EINVAL> for this case."
5934 msgstr ""
5935 "SUSv3 では、 I<length> が 0 の場合、 B<mmap>()  は失敗すると規定されている。"
5936 "しかしながら、2.6.12 より前のカーネルでは、 この場合に B<mmap>()  は成功して"
5937 "いた (マッピングは作成されず、 I<addr> が返されていた)。 カーネル 2.6.12 以降"
5938 "では、 B<mmap>()  はエラー B<EINVAL> で失敗する。"
5939
5940 #. type: Plain text
5941 #: build/C/man2/mmap.2:630
5942 msgid ""
5943 "POSIX specifies that the system shall always zero fill any partial page at "
5944 "the end of the object and that system will never write any modification of "
5945 "the object beyond its end.  On Linux, when you write data to such partial "
5946 "page after the end of the object, the data stays in the page cache even "
5947 "after the file is closed and unmapped and even though the data is never "
5948 "written to the file itself, subsequent mappings may see the modified "
5949 "content.  In some cases, this could be fixed by calling B<msync>(2)  before "
5950 "the unmap takes place; however, this doesn't work on tmpfs (for example, "
5951 "when using POSIX shared memory interface documented in B<shm_overview>(7))."
5952 msgstr ""
5953 "POSIX では、 システムはオブジェクト末尾の部分ページを常に 0 で埋め、 末尾より"
5954 "後ろのオブジェクトを決して変更してはならない、と規定している。 Linux では、 "
5955 "オブジェクト末尾より後ろの部分ページにデータを書き込んだ場合、 そのファイルを"
5956 "クローズしてアンマップした後であってもページキャッシュにデータが残り続け、 "
5957 "データがファイル自体に書き込まれていなくても、 それ以降のマッピングで変更され"
5958 "た内容が見える可能性がある。 いくつかの場合では、 アンマップを行う前に "
5959 "B<msync>(2) を呼び出すことで、 この状況を修正することができる。 しかし、 これ"
5960 "は tmpfs では機能しない (例えば、 B<shm_overview>(7) で説明されている POSIX "
5961 "共有メモリインターフェースを使った場合)。"
5962
5963 #. type: Plain text
5964 #: build/C/man2/mmap.2:642
5965 msgid ""
5966 "The following program prints part of the file specified in its first command-"
5967 "line argument to standard output.  The range of bytes to be printed is "
5968 "specified via offset and length values in the second and third command-line "
5969 "arguments.  The program creates a memory mapping of the required pages of "
5970 "the file and then uses B<write>(2)  to output the desired bytes."
5971 msgstr ""
5972 "以下のプログラムは、一番目のコマンドライン引き数で指定された ファイルの一部を"
5973 "標準出力に表示する。 表示する範囲は、二番目、三番目のコマンドライン引き数で渡"
5974 "される オフセットと長さで指定される。 このプログラムは、指定されたファイルの"
5975 "必要なページのメモリ・ マッピングを作成し、 B<write>(2)  を使って所望のバイト"
5976 "を出力する。"
5977
5978 #. type: Plain text
5979 #: build/C/man2/mmap.2:650
5980 #, no-wrap
5981 msgid ""
5982 "#include E<lt>sys/mman.hE<gt>\n"
5983 "#include E<lt>sys/stat.hE<gt>\n"
5984 "#include E<lt>fcntl.hE<gt>\n"
5985 "#include E<lt>stdio.hE<gt>\n"
5986 "#include E<lt>stdlib.hE<gt>\n"
5987 "#include E<lt>unistd.hE<gt>\n"
5988 msgstr ""
5989 "#include E<lt>sys/mman.hE<gt>\n"
5990 "#include E<lt>sys/stat.hE<gt>\n"
5991 "#include E<lt>fcntl.hE<gt>\n"
5992 "#include E<lt>stdio.hE<gt>\n"
5993 "#include E<lt>stdlib.hE<gt>\n"
5994 "#include E<lt>unistd.hE<gt>\n"
5995
5996 #. type: Plain text
5997 #: build/C/man2/mmap.2:653 build/C/man2/mprotect.2:178
5998 #, no-wrap
5999 msgid ""
6000 "#define handle_error(msg) \\e\n"
6001 "    do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
6002 msgstr ""
6003 "#define handle_error(msg) \\e\n"
6004 "    do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
6005
6006 #. type: Plain text
6007 #: build/C/man2/mmap.2:663
6008 #, no-wrap
6009 msgid ""
6010 "int\n"
6011 "main(int argc, char *argv[])\n"
6012 "{\n"
6013 "    char *addr;\n"
6014 "    int fd;\n"
6015 "    struct stat sb;\n"
6016 "    off_t offset, pa_offset;\n"
6017 "    size_t length;\n"
6018 "    ssize_t s;\n"
6019 msgstr ""
6020 "int\n"
6021 "main(int argc, char *argv[])\n"
6022 "{\n"
6023 "    char *addr;\n"
6024 "    int fd;\n"
6025 "    struct stat sb;\n"
6026 "    off_t offset, pa_offset;\n"
6027 "    size_t length;\n"
6028 "    ssize_t s;\n"
6029
6030 #. type: Plain text
6031 #: build/C/man2/mmap.2:668
6032 #, no-wrap
6033 msgid ""
6034 "    if (argc E<lt> 3 || argc E<gt> 4) {\n"
6035 "        fprintf(stderr, \"%s file offset [length]\\en\", argv[0]);\n"
6036 "        exit(EXIT_FAILURE);\n"
6037 "    }\n"
6038 msgstr ""
6039 "    if (argc E<lt> 3 || argc E<gt> 4) {\n"
6040 "        fprintf(stderr, \"%s file offset [length]\\en\", argv[0]);\n"
6041 "        exit(EXIT_FAILURE);\n"
6042 "    }\n"
6043
6044 #. type: Plain text
6045 #: build/C/man2/mmap.2:672
6046 #, no-wrap
6047 msgid ""
6048 "    fd = open(argv[1], O_RDONLY);\n"
6049 "    if (fd == -1)\n"
6050 "        handle_error(\"open\");\n"
6051 msgstr ""
6052 "    fd = open(argv[1], O_RDONLY);\n"
6053 "    if (fd == -1)\n"
6054 "        handle_error(\"open\");\n"
6055
6056 #. type: Plain text
6057 #: build/C/man2/mmap.2:675
6058 #, no-wrap
6059 msgid ""
6060 "    if (fstat(fd, &sb) == -1)           /* To obtain file size */\n"
6061 "        handle_error(\"fstat\");\n"
6062 msgstr ""
6063 "    if (fstat(fd, &sb) == -1)           /* To obtain file size */\n"
6064 "        handle_error(\"fstat\");\n"
6065
6066 #. type: Plain text
6067 #: build/C/man2/mmap.2:679
6068 #, no-wrap
6069 msgid ""
6070 "    offset = atoi(argv[2]);\n"
6071 "    pa_offset = offset & ~(sysconf(_SC_PAGE_SIZE) - 1);\n"
6072 "        /* offset for mmap() must be page aligned */\n"
6073 msgstr ""
6074 "    offset = atoi(argv[2]);\n"
6075 "    pa_offset = offset & ~(sysconf(_SC_PAGE_SIZE) - 1);\n"
6076 "        /* offset for mmap() must be page aligned */\n"
6077
6078 #. type: Plain text
6079 #: build/C/man2/mmap.2:684
6080 #, no-wrap
6081 msgid ""
6082 "    if (offset E<gt>= sb.st_size) {\n"
6083 "        fprintf(stderr, \"offset is past end of file\\en\");\n"
6084 "        exit(EXIT_FAILURE);\n"
6085 "    }\n"
6086 msgstr ""
6087 "    if (offset E<gt>= sb.st_size) {\n"
6088 "        fprintf(stderr, \"offset is past end of file\\en\");\n"
6089 "        exit(EXIT_FAILURE);\n"
6090 "    }\n"
6091
6092 #. type: Plain text
6093 #: build/C/man2/mmap.2:690
6094 #, no-wrap
6095 msgid ""
6096 "    if (argc == 4) {\n"
6097 "        length = atoi(argv[3]);\n"
6098 "        if (offset + length E<gt> sb.st_size)\n"
6099 "            length = sb.st_size - offset;\n"
6100 "                /* Can\\(aqt display bytes past end of file */\n"
6101 msgstr ""
6102 "    if (argc == 4) {\n"
6103 "        length = atoi(argv[3]);\n"
6104 "        if (offset + length E<gt> sb.st_size)\n"
6105 "            length = sb.st_size - offset;\n"
6106 "                /* Can\\(aqt display bytes past end of file */\n"
6107
6108 #. type: Plain text
6109 #: build/C/man2/mmap.2:694
6110 #, no-wrap
6111 msgid ""
6112 "    } else {    /* No length arg ==E<gt> display to end of file */\n"
6113 "        length = sb.st_size - offset;\n"
6114 "    }\n"
6115 msgstr ""
6116 "    } else {    /* No length arg ==E<gt> display to end of file */\n"
6117 "        length = sb.st_size - offset;\n"
6118 "    }\n"
6119
6120 #. type: Plain text
6121 #: build/C/man2/mmap.2:699
6122 #, no-wrap
6123 msgid ""
6124 "    addr = mmap(NULL, length + offset - pa_offset, PROT_READ,\n"
6125 "                MAP_PRIVATE, fd, pa_offset);\n"
6126 "    if (addr == MAP_FAILED)\n"
6127 "        handle_error(\"mmap\");\n"
6128 msgstr ""
6129 "    addr = mmap(NULL, length + offset - pa_offset, PROT_READ,\n"
6130 "                MAP_PRIVATE, fd, pa_offset);\n"
6131 "    if (addr == MAP_FAILED)\n"
6132 "        handle_error(\"mmap\");\n"
6133
6134 #. type: Plain text
6135 #: build/C/man2/mmap.2:704
6136 #, no-wrap
6137 msgid ""
6138 "    s = write(STDOUT_FILENO, addr + offset - pa_offset, length);\n"
6139 "    if (s != length) {\n"
6140 "        if (s == -1)\n"
6141 "            handle_error(\"write\");\n"
6142 msgstr ""
6143 "    s = write(STDOUT_FILENO, addr + offset - pa_offset, length);\n"
6144 "    if (s != length) {\n"
6145 "        if (s == -1)\n"
6146 "            handle_error(\"write\");\n"
6147
6148 #. type: Plain text
6149 #: build/C/man2/mmap.2:708
6150 #, no-wrap
6151 msgid ""
6152 "        fprintf(stderr, \"partial write\");\n"
6153 "        exit(EXIT_FAILURE);\n"
6154 "    }\n"
6155 msgstr ""
6156 "        fprintf(stderr, \"partial write\");\n"
6157 "        exit(EXIT_FAILURE);\n"
6158 "    }\n"
6159
6160 #. type: Plain text
6161 #: build/C/man2/mmap.2:725
6162 msgid ""
6163 "B<getpagesize>(2), B<mincore>(2), B<mlock>(2), B<mmap2>(2), B<mprotect>(2), "
6164 "B<mremap>(2), B<msync>(2), B<remap_file_pages>(2), B<setrlimit>(2), B<shmat>"
6165 "(2), B<shm_open>(3), B<shm_overview>(7)"
6166 msgstr ""
6167 "B<getpagesize>(2), B<mincore>(2), B<mlock>(2), B<mmap2>(2), B<mprotect>(2), "
6168 "B<mremap>(2), B<msync>(2), B<remap_file_pages>(2), B<setrlimit>(2), B<shmat>"
6169 "(2), B<shm_open>(3), B<shm_overview>(7)"
6170
6171 #. type: Plain text
6172 #: build/C/man2/mmap.2:732
6173 msgid ""
6174 "The descriptions of the following files in B<proc>(5): I</proc/[pid]/maps>, "
6175 "I</proc/[pid]/map_files>, and I</proc/[pid]/smaps>."
6176 msgstr ""
6177 "B<proc>(5) の I</proc/[pid]/maps>, I</proc/[pid]/map_files>, I</proc/[pid]/"
6178 "smaps> の説明。"
6179
6180 #. type: Plain text
6181 #: build/C/man2/mmap.2:737 build/C/man2/msync.2:124
6182 msgid "B.O. Gallmeister, POSIX.4, O'Reilly, pp. 128-129 and 389-391."
6183 msgstr "B.O. Gallmeister, POSIX.4, O'Reilly, pp. 128-129 and 389-391."
6184
6185 #. type: TH
6186 #: build/C/man2/mmap2.2:29
6187 #, no-wrap
6188 msgid "MMAP2"
6189 msgstr "MMAP2"
6190
6191 #. type: TH
6192 #: build/C/man2/mmap2.2:29
6193 #, fuzzy, no-wrap
6194 #| msgid "2009-02-25"
6195 msgid "2014-02-25"
6196 msgstr "2009-02-25"
6197
6198 #. type: Plain text
6199 #: build/C/man2/mmap2.2:32
6200 msgid "mmap2 - map files or devices into memory"
6201 msgstr "mmap2 - ファイルやデバイスをメモリにマップする"
6202
6203 #. type: Plain text
6204 #: build/C/man2/mmap2.2:38
6205 #, no-wrap
6206 msgid ""
6207 "B<void *mmap2(void *>I<addr>B<, size_t >I<length>B<, int >I<prot>B<,>\n"
6208 "B<             int >I<flags>B<, int >I<fd>B<, off_t >I<pgoffset>B<);>\n"
6209 msgstr ""
6210 "B<void *mmap2(void *>I<addr>B<, size_t >I<length>B<, int >I<prot>B<,>\n"
6211 "B<            int >I<flags>B<, int >I<fd>B<, off_t >I<pgoffset>B<);>\n"
6212
6213 #. type: Plain text
6214 #: build/C/man2/mmap2.2:43
6215 msgid ""
6216 "This is probably not the system call that you are interested in; instead, "
6217 "see B<mmap>(2), which describes the glibc wrapper function that invokes this "
6218 "system call."
6219 msgstr ""
6220 "これはおそらくあなたが興味のあるシステムコールではないだろう。代わりに\n"
6221 "B<mmap>(2) を見るとよい。そのページにはこのシステムコールを起動する glibc "
6222 "の\n"
6223 "ラッパー関数についての説明がある。"
6224
6225 #. type: Plain text
6226 #: build/C/man2/mmap2.2:54
6227 msgid ""
6228 "The B<mmap2>()  system call provides the same interface as B<mmap>(2), "
6229 "except that the final argument specifies the offset into the file in 4096-"
6230 "byte units (instead of bytes, as is done by B<mmap>(2)).  This enables "
6231 "applications that use a 32-bit I<off_t> to map large files (up to 2^44 "
6232 "bytes)."
6233 msgstr ""
6234 "B<mmap2>() システムコールは B<mmap>(2) と同じインターフェースを提供する。た"
6235 "だ\n"
6236 "し、最後の引き数には、ファイルのオフセットを (B<mmap>(2) が行っている、バイ"
6237 "ト\n"
6238 "単位ではなく) 4096 バイトを単位として指定する。 これにより、32 ビットの\n"
6239 "I<off_t> を使うアプリケーションで (2^44 バイトまでの) 大きなファイルをマッ"
6240 "プ\n"
6241 "できるようになる。"
6242
6243 #. type: Plain text
6244 #: build/C/man2/mmap2.2:61
6245 #, fuzzy
6246 #| msgid ""
6247 #| "On success, B<mmap2>()  returns a pointer to the mapped area.  On error "
6248 #| "-1 is returned and I<errno> is set appropriately."
6249 msgid ""
6250 "On success, B<mmap2>()  returns a pointer to the mapped area.  On error, -1 "
6251 "is returned and I<errno> is set appropriately."
6252 msgstr ""
6253 "成功した場合、 B<mmap2>()  はマップされた領域へのポインタを返す。 エラーの場"
6254 "合は -1 が返されて、 I<errno> が適切に設定される。"
6255
6256 #. type: Plain text
6257 #: build/C/man2/mmap2.2:65
6258 msgid "Problem with getting the data from user space."
6259 msgstr "ユーザ空間からデータを取得するときに問題があった。"
6260
6261 #. type: Plain text
6262 #: build/C/man2/mmap2.2:70
6263 msgid ""
6264 "(Various platforms where the page size is not 4096 bytes.)  I<offset\\ *\\ "
6265 "4096> is not a multiple of the system page size."
6266 msgstr ""
6267 "(ページサイズが 4096 バイトでないプラットフォームにおいて)  I<offset\\ *\\ "
6268 "4096> がシステムのページサイズの倍数ではない。"
6269
6270 #. type: Plain text
6271 #: build/C/man2/mmap2.2:74
6272 msgid "B<mmap2>()  can also return any of the errors described in B<mmap>(2)."
6273 msgstr "B<mmap2>() は B<mmap>(2) に載っているエラーを返すこともある。"
6274
6275 #. type: Plain text
6276 #: build/C/man2/mmap2.2:77
6277 msgid "B<mmap2>()  is available since Linux 2.3.31."
6278 msgstr "B<mmap2>()  は、Linux 2.3.31 以降で使用可能である。"
6279
6280 #. type: Plain text
6281 #: build/C/man2/mmap2.2:79 build/C/man2/subpage_prot.2:98
6282 msgid "This system call is Linux-specific."
6283 msgstr "このシステムコールは Linux 独自である。"
6284
6285 #. type: Plain text
6286 #: build/C/man2/mmap2.2:86
6287 #, fuzzy
6288 #| msgid ""
6289 #| "Nowadays, the glibc B<mmap>()  wrapper function invokes this system call "
6290 #| "rather than the B<mmap>(2)  system call."
6291 msgid ""
6292 "On architectures where this system call is present, the glibc B<mmap>()  "
6293 "wrapper function invokes this system call rather than the B<mmap>(2)  system "
6294 "call."
6295 msgstr ""
6296 "現在では、glibc の B<mmap>()  のラッパー関数は、 B<mmap>(2)  システムコールで"
6297 "はなく、このシステムコール (B<mmap2>(2))  を起動する。"
6298
6299 #. type: Plain text
6300 #: build/C/man2/mmap2.2:88
6301 #, fuzzy
6302 #| msgid "This system call is Linux-specific."
6303 msgid "This system call does not exist on x86-64."
6304 msgstr "このシステムコールは Linux 独自である。"
6305
6306 #.  ia64 can have page sizes ranging from 4kB to 64kB.
6307 #.  On cris, it looks like the unit might also be the page size,
6308 #.  which is 8192 bytes. -- mtk, June 2007
6309 #. type: Plain text
6310 #: build/C/man2/mmap2.2:95
6311 msgid ""
6312 "On ia64, the unit for I<offset> is actually the system page size, rather "
6313 "than 4096 bytes."
6314 msgstr ""
6315 "ia64 では、 I<offset> の単位は、実際にはシステムのページサイズであり、 4096 "
6316 "バイトではない。"
6317
6318 #. type: Plain text
6319 #: build/C/man2/mmap2.2:101
6320 msgid ""
6321 "B<getpagesize>(2), B<mmap>(2), B<mremap>(2), B<msync>(2), B<shm_open>(3)"
6322 msgstr ""
6323 "B<getpagesize>(2), B<mmap>(2), B<mremap>(2), B<msync>(2), B<shm_open>(3)"
6324
6325 #. type: TH
6326 #: build/C/man2/mprotect.2:38
6327 #, no-wrap
6328 msgid "MPROTECT"
6329 msgstr "MPROTECT"
6330
6331 #. type: Plain text
6332 #: build/C/man2/mprotect.2:41
6333 msgid "mprotect - set protection on a region of memory"
6334 msgstr "mprotect - メモリ領域の保護を設定する"
6335
6336 #. type: Plain text
6337 #: build/C/man2/mprotect.2:46
6338 #, no-wrap
6339 msgid "B<int mprotect(void *>I<addr>B<, size_t >I<len>B<, int >I<prot>B<);>\n"
6340 msgstr "B<int mprotect(void *>I<addr>B<, size_t >I<len>B<, int >I<prot>B<);>\n"
6341
6342 #. type: Plain text
6343 #: build/C/man2/mprotect.2:54
6344 msgid ""
6345 "B<mprotect>()  changes protection for the calling process's memory page(s)  "
6346 "containing any part of the address range in the interval [I<addr>,\\ I<addr>"
6347 "+I<len>-1].  I<addr> must be aligned to a page boundary."
6348 msgstr ""
6349 "B<mprotect>()  は、区間 [I<addr>,\\ I<addr>+I<len>-1] のアドレス範囲を含む 呼"
6350 "び出し元のプロセスのメモリページのアクセス保護を変更する。 I<addr> はページ境"
6351 "界に一致していなければならない。"
6352
6353 #. type: Plain text
6354 #: build/C/man2/mprotect.2:59
6355 msgid ""
6356 "If the calling process tries to access memory in a manner that violates the "
6357 "protection, then the kernel generates a B<SIGSEGV> signal for the process."
6358 msgstr ""
6359 "呼び出し元のプロセスがアクセス保護に違反するようなメモリアクセスを 行おうとす"
6360 "ると、カーネルはシグナル B<SIGSEGV> をそのプロセスに対して生成する。"
6361
6362 #. type: Plain text
6363 #: build/C/man2/mprotect.2:64
6364 msgid ""
6365 "I<prot> is either B<PROT_NONE> or a bitwise-or of the other values in the "
6366 "following list:"
6367 msgstr ""
6368 "I<prot> には、 B<PROT_NONE> か、以下のリストの B<PROT_NONE> 以外の値をビット"
6369 "毎の論理和 (bitwize-or) で指定する:"
6370
6371 #. type: Plain text
6372 #: build/C/man2/mprotect.2:67
6373 msgid "The memory cannot be accessed at all."
6374 msgstr "そのメモリには全くアクセスできない。"
6375
6376 #. type: Plain text
6377 #: build/C/man2/mprotect.2:70
6378 msgid "The memory can be read."
6379 msgstr "そのメモリを読み取ることができる。"
6380
6381 #. type: Plain text
6382 #: build/C/man2/mprotect.2:73
6383 msgid "The memory can be modified."
6384 msgstr "そのメモリを変更できる。"
6385
6386 #.  FIXME
6387 #.  Document PROT_GROWSUP and PROT_GROWSDOWN
6388 #. type: Plain text
6389 #: build/C/man2/mprotect.2:78
6390 msgid "The memory can be executed."
6391 msgstr "そのメモリは実行可能である。"
6392
6393 #. type: Plain text
6394 #: build/C/man2/mprotect.2:85
6395 msgid ""
6396 "On success, B<mprotect>()  returns zero.  On error, -1 is returned, and "
6397 "I<errno> is set appropriately."
6398 msgstr ""
6399 "成功した場合、 B<mprotect>()  は 0 を返す。エラーの場合は -1 が返り、 "
6400 "I<errno> が適切に設定される。"
6401
6402 #. type: Plain text
6403 #: build/C/man2/mprotect.2:95
6404 msgid ""
6405 "The memory cannot be given the specified access.  This can happen, for "
6406 "example, if you B<mmap>(2)  a file to which you have read-only access, then "
6407 "ask B<mprotect>()  to mark it B<PROT_WRITE>."
6408 msgstr ""
6409 "指定されたアクセスをメモリに設定することができない。 これは、例えば ファイル"
6410 "を読み取り専用で B<mmap>(2)  しており、その領域に対して B<mprotect>()  を呼び"
6411 "出して B<PROT_WRITE> に設定しようとした場合に発生する。"
6412
6413 #.  Or: both PROT_GROWSUP and PROT_GROWSDOWN were specified in 'prot'.
6414 #. type: Plain text
6415 #: build/C/man2/mprotect.2:100
6416 msgid ""
6417 "I<addr> is not a valid pointer, or not a multiple of the system page size."
6418 msgstr ""
6419 "I<addr> が有効なポインタでないか、 システムのページサイズの倍数でない。"
6420
6421 #. type: Plain text
6422 #: build/C/man2/mprotect.2:103
6423 msgid "Internal kernel structures could not be allocated."
6424 msgstr "カーネル内部の構造体を割り当てることができなかった。"
6425
6426 #. type: Plain text
6427 #: build/C/man2/mprotect.2:113
6428 msgid ""
6429 "Addresses in the range [I<addr>, I<addr>+I<len>-1] are invalid for the "
6430 "address space of the process, or specify one or more pages that are not "
6431 "mapped.  (Before kernel 2.4.19, the error B<EFAULT> was incorrectly produced "
6432 "for these cases.)"
6433 msgstr ""
6434 "[I<addr>, I<addr>+I<len>-1] という範囲のアドレスがプロセスのアドレス空間とし"
6435 "て不正であるか、 その範囲のアドレスがマップされていない 1 つ以上のページを指"
6436 "している (カーネル 2.4.19 より前では、この状況でエラー B<EFAULT> が間違って生"
6437 "成されていた)。"
6438
6439 #.  SVr4 defines an additional error
6440 #.  code EAGAIN. The SVr4 error conditions don't map neatly onto Linux's.
6441 #. type: Plain text
6442 #: build/C/man2/mprotect.2:122
6443 msgid ""
6444 "SVr4, POSIX.1-2001.  POSIX says that the behavior of B<mprotect>()  is "
6445 "unspecified if it is applied to a region of memory that was not obtained via "
6446 "B<mmap>(2)."
6447 msgstr ""
6448 "SVr4, POSIX.1-2001.  POSIX では、 B<mmap>(2)  経由で獲得していないメモリ領域"
6449 "に対して B<mprotect>()  を行った場合の B<mprotect>()  の動作は未定義であると"
6450 "されている。"
6451
6452 #. type: Plain text
6453 #: build/C/man2/mprotect.2:129
6454 msgid ""
6455 "On Linux it is always permissible to call B<mprotect>()  on any address in a "
6456 "process's address space (except for the kernel vsyscall area).  In "
6457 "particular it can be used to change existing code mappings to be writable."
6458 msgstr ""
6459 "Linux では、(カーネル vsyscall 領域以外の)  任意のプロセスアドレス空間に対し"
6460 "て B<mprotect>()  を呼び出すことが、常に許されている。 これは特に既存のコード"
6461 "マッピングを書き込み可能にするために使われる。"
6462
6463 #. type: Plain text
6464 #: build/C/man2/mprotect.2:139
6465 msgid ""
6466 "Whether B<PROT_EXEC> has any effect different from B<PROT_READ> is "
6467 "architecture- and kernel version-dependent.  On some hardware architectures "
6468 "(e.g., i386), B<PROT_WRITE> implies B<PROT_READ>."
6469 msgstr ""
6470 "B<PROT_EXEC> が B<PROT_READ> と異なる影響を持つか否かは、アーキテクチャとカー"
6471 "ネルのバージョンに依存する。 (i386 などの) いくつかのアーキテクチャでは、 "
6472 "B<PROT_WRITE> をセットすると、暗黙のうちに B<PROT_READ> がセットされる。"
6473
6474 #. type: Plain text
6475 #: build/C/man2/mprotect.2:148
6476 msgid ""
6477 "POSIX.1-2001 says that an implementation may permit access other than that "
6478 "specified in I<prot>, but at a minimum can allow write access only if "
6479 "B<PROT_WRITE> has been set, and must not allow any access if B<PROT_NONE> "
6480 "has been set."
6481 msgstr ""
6482 "POSIX.1-2001 では、 I<prot> で指定されていないアクセスを許可する実装を認めて"
6483 "いる。 ただし、最低限、 B<PROT_WRITE> がセットされている場合にのみ書き込みア"
6484 "クセスが許可され、 B<PROT_NONE> がセットされている場合にはアクセスは許可され"
6485 "ない点だけは 満たす必要がある。"
6486
6487 #. type: Plain text
6488 #: build/C/man2/mprotect.2:154
6489 msgid ""
6490 "The program below allocates four pages of memory, makes the third of these "
6491 "pages read-only, and then executes a loop that walks upward through the "
6492 "allocated region modifying bytes."
6493 msgstr ""
6494 "以下のプログラムは、メモリページを 4つ確保し、そのうち 3番目のページを 読み込"
6495 "み専用に設定する。その後で、確保した領域のアドレスの小さい方から 大きな方に向"
6496 "かって順番にバイト値を変更するループを実行する。"
6497
6498 #. type: Plain text
6499 #: build/C/man2/mprotect.2:157
6500 msgid ""
6501 "An example of what we might see when running the program is the following:"
6502 msgstr "プログラムを実行した場合の一例を以下に示す。"
6503
6504 #. type: Plain text
6505 #: build/C/man2/mprotect.2:163
6506 #, no-wrap
6507 msgid ""
6508 "$B< ./a.out>\n"
6509 "Start of region:        0x804c000\n"
6510 "Got SIGSEGV at address: 0x804e000\n"
6511 msgstr ""
6512 "$B< ./a.out>\n"
6513 "Start of region:        0x804c000\n"
6514 "Got SIGSEGV at address: 0x804e000\n"
6515
6516 #. type: Plain text
6517 #: build/C/man2/mprotect.2:175
6518 #, no-wrap
6519 msgid ""
6520 "#include E<lt>unistd.hE<gt>\n"
6521 "#include E<lt>signal.hE<gt>\n"
6522 "#include E<lt>stdio.hE<gt>\n"
6523 "#include E<lt>malloc.hE<gt>\n"
6524 "#include E<lt>stdlib.hE<gt>\n"
6525 "#include E<lt>errno.hE<gt>\n"
6526 "#include E<lt>sys/mman.hE<gt>\n"
6527 msgstr ""
6528 "#include E<lt>unistd.hE<gt>\n"
6529 "#include E<lt>signal.hE<gt>\n"
6530 "#include E<lt>stdio.hE<gt>\n"
6531 "#include E<lt>malloc.hE<gt>\n"
6532 "#include E<lt>stdlib.hE<gt>\n"
6533 "#include E<lt>errno.hE<gt>\n"
6534 "#include E<lt>sys/mman.hE<gt>\n"
6535
6536 #. type: Plain text
6537 #: build/C/man2/mprotect.2:180
6538 #, fuzzy, no-wrap
6539 #| msgid "char *buffer;\n"
6540 msgid "static char *buffer;\n"
6541 msgstr "char *buffer;\n"
6542
6543 #. type: Plain text
6544 #: build/C/man2/mprotect.2:188
6545 #, no-wrap
6546 msgid ""
6547 "static void\n"
6548 "handler(int sig, siginfo_t *si, void *unused)\n"
6549 "{\n"
6550 "    printf(\"Got SIGSEGV at address: 0x%lx\\en\",\n"
6551 "            (long) si-E<gt>si_addr);\n"
6552 "    exit(EXIT_FAILURE);\n"
6553 "}\n"
6554 msgstr ""
6555 "static void\n"
6556 "handler(int sig, siginfo_t *si, void *unused)\n"
6557 "{\n"
6558 "    printf(\"Got SIGSEGV at address: 0x%lx\\en\",\n"
6559 "            (long) si-E<gt>si_addr);\n"
6560 "    exit(EXIT_FAILURE);\n"
6561 "}\n"
6562
6563 #. type: Plain text
6564 #: build/C/man2/mprotect.2:195
6565 #, no-wrap
6566 msgid ""
6567 "int\n"
6568 "main(int argc, char *argv[])\n"
6569 "{\n"
6570 "    char *p;\n"
6571 "    int pagesize;\n"
6572 "    struct sigaction sa;\n"
6573 msgstr ""
6574 "int\n"
6575 "main(void)\n"
6576 "{\n"
6577 "    char *p;\n"
6578 "    int pagesize;\n"
6579 "    struct sigaction sa;\n"
6580
6581 #. type: Plain text
6582 #: build/C/man2/mprotect.2:201
6583 #, no-wrap
6584 msgid ""
6585 "    sa.sa_flags = SA_SIGINFO;\n"
6586 "    sigemptyset(&sa.sa_mask);\n"
6587 "    sa.sa_sigaction = handler;\n"
6588 "    if (sigaction(SIGSEGV, &sa, NULL) == -1)\n"
6589 "        handle_error(\"sigaction\");\n"
6590 msgstr ""
6591 "    sa.sa_flags = SA_SIGINFO;\n"
6592 "    sigemptyset(&sa.sa_mask);\n"
6593 "    sa.sa_sigaction = handler;\n"
6594 "    if (sigaction(SIGSEGV, &sa, NULL) == -1)\n"
6595 "        handle_error(\"sigaction\");\n"
6596
6597 #. type: Plain text
6598 #: build/C/man2/mprotect.2:205
6599 #, no-wrap
6600 msgid ""
6601 "    pagesize = sysconf(_SC_PAGE_SIZE);\n"
6602 "    if (pagesize == -1)\n"
6603 "        handle_error(\"sysconf\");\n"
6604 msgstr ""
6605 "    pagesize = sysconf(_SC_PAGE_SIZE);\n"
6606 "    if (pagesize == -1)\n"
6607 "        handle_error(\"sysconf\");\n"
6608
6609 #. type: Plain text
6610 #: build/C/man2/mprotect.2:208
6611 #, no-wrap
6612 msgid ""
6613 "    /* Allocate a buffer aligned on a page boundary;\n"
6614 "       initial protection is PROT_READ | PROT_WRITE */\n"
6615 msgstr ""
6616 "    /* Allocate a buffer aligned on a page boundary;\n"
6617 "       initial protection is PROT_READ | PROT_WRITE */\n"
6618
6619 #. type: Plain text
6620 #: build/C/man2/mprotect.2:212
6621 #, no-wrap
6622 msgid ""
6623 "    buffer = memalign(pagesize, 4 * pagesize);\n"
6624 "    if (buffer == NULL)\n"
6625 "        handle_error(\"memalign\");\n"
6626 msgstr ""
6627 "    buffer = memalign(pagesize, 4 * pagesize);\n"
6628 "    if (buffer == NULL)\n"
6629 "        handle_error(\"memalign\");\n"
6630
6631 #. type: Plain text
6632 #: build/C/man2/mprotect.2:214
6633 #, no-wrap
6634 msgid "    printf(\"Start of region:        0x%lx\\en\", (long) buffer);\n"
6635 msgstr "    printf(\"Start of region:        0x%lx\\en\", (long) buffer);\n"
6636
6637 #. type: Plain text
6638 #: build/C/man2/mprotect.2:218
6639 #, no-wrap
6640 msgid ""
6641 "    if (mprotect(buffer + pagesize * 2, pagesize,\n"
6642 "                PROT_READ) == -1)\n"
6643 "        handle_error(\"mprotect\");\n"
6644 msgstr ""
6645 "    if (mprotect(buffer + pagesize * 2, pagesize,\n"
6646 "                PROT_READ) == -1)\n"
6647 "        handle_error(\"mprotect\");\n"
6648
6649 #. type: Plain text
6650 #: build/C/man2/mprotect.2:221
6651 #, no-wrap
6652 msgid ""
6653 "    for (p = buffer ; ; )\n"
6654 "        *(p++) = \\(aqa\\(aq;\n"
6655 msgstr ""
6656 "    for (p = buffer ; ; )\n"
6657 "        *(p++) = \\(aqa\\(aq;\n"
6658
6659 #. type: Plain text
6660 #: build/C/man2/mprotect.2:225
6661 #, no-wrap
6662 msgid ""
6663 "    printf(\"Loop completed\\en\");     /* Should never happen */\n"
6664 "    exit(EXIT_SUCCESS);\n"
6665 "}\n"
6666 msgstr ""
6667 "    printf(\"Loop completed\\en\");     /* Should never happen */\n"
6668 "    exit(EXIT_SUCCESS);\n"
6669 "}\n"
6670
6671 #. type: Plain text
6672 #: build/C/man2/mprotect.2:229
6673 msgid "B<mmap>(2), B<sysconf>(3)"
6674 msgstr "B<mmap>(2), B<sysconf>(3)"
6675
6676 #. type: TH
6677 #: build/C/man2/mremap.2:30
6678 #, no-wrap
6679 msgid "MREMAP"
6680 msgstr "MREMAP"
6681
6682 #. type: TH
6683 #: build/C/man2/mremap.2:30
6684 #, no-wrap
6685 msgid "2010-06-10"
6686 msgstr "2010-06-10"
6687
6688 #. type: Plain text
6689 #: build/C/man2/mremap.2:33
6690 msgid "mremap - remap a virtual memory address"
6691 msgstr "mremap - 仮想メモリ・アドレスを再マッピングする"
6692
6693 #. type: Plain text
6694 #: build/C/man2/mremap.2:36
6695 #, no-wrap
6696 msgid "B<#define _GNU_SOURCE>         /* See feature_test_macros(7) */\n"
6697 msgstr "B<#define _GNU_SOURCE>         /* feature_test_macros(7) 参照 */\n"
6698
6699 #. type: Plain text
6700 #: build/C/man2/mremap.2:41
6701 #, no-wrap
6702 msgid ""
6703 "B<void *mremap(void *>I<old_address>B<, size_t >I<old_size>B<,>\n"
6704 "B<             size_t >I<new_size>B<, int >I<flags>B<, ... /* void *>I<new_address>B< */);>\n"
6705 msgstr ""
6706 "B<void *mremap(void *>I<old_address>B<, size_t >I<old_size>B<,>\n"
6707 "B<             size_t >I<new_size>B<, int >I<flags>B<, ... /* void *>I<new_address>B< */);>\n"
6708
6709 #. type: Plain text
6710 #: build/C/man2/mremap.2:47
6711 msgid ""
6712 "B<mremap>()  expands (or shrinks) an existing memory mapping, potentially "
6713 "moving it at the same time (controlled by the I<flags> argument and the "
6714 "available virtual address space)."
6715 msgstr ""
6716 "B<mremap>()  は既存のメモリ・マッピングの拡張 (または縮小) を行う。 同時に移"
6717 "動されることもある (I<flags> 引き数と利用可能な仮想アドレス空間によって決ま"
6718 "る)。"
6719
6720 #. type: Plain text
6721 #: build/C/man2/mremap.2:61
6722 msgid ""
6723 "I<old_address> is the old address of the virtual memory block that you want "
6724 "to expand (or shrink).  Note that I<old_address> has to be page aligned.  "
6725 "I<old_size> is the old size of the virtual memory block.  I<new_size> is the "
6726 "requested size of the virtual memory block after the resize.  An optional "
6727 "fifth argument, I<new_address>, may be provided; see the description of "
6728 "B<MREMAP_FIXED> below."
6729 msgstr ""
6730 "I<old_address> は拡張 (または縮小) しようとする仮想メモリ・ブロック の元のア"
6731 "ドレスである。I<old_address> はページ境界に合っていなければ ならない点に注意"
6732 "すること。I<old_size> は元の仮想メモリ・ブロックの サイズである。 "
6733 "I<new_size> は要求する変更後の仮想メモリ・ブロックのサイズである。 5 番目の引"
6734 "き数として I<new_address> を指定することができる。下記の B<MREMAP_FIXED> の説"
6735 "明を参照のこと。"
6736
6737 #. type: Plain text
6738 #: build/C/man2/mremap.2:73
6739 msgid ""
6740 "In Linux the memory is divided into pages.  A user process has (one or)  "
6741 "several linear virtual memory segments.  Each virtual memory segment has one "
6742 "or more mappings to real memory pages (in the page table).  Each virtual "
6743 "memory segment has its own protection (access rights), which may cause a "
6744 "segmentation violation if the memory is accessed incorrectly (e.g., writing "
6745 "to a read-only segment).  Accessing virtual memory outside of the segments "
6746 "will also cause a segmentation violation."
6747 msgstr ""
6748 "Linux ではメモリはページに分割される。ユーザー・プロセスは (一つまたは)  複数"
6749 "のリニアな仮想メモリセグメントを持つ。 それぞれの仮想メモリセグメントは一つ以"
6750 "上の実メモリ・ページ にマッピングされている (マッピング情報はページ・テーブル"
6751 "で管理される)。 仮想メモリセグメントにはセグメント毎の保護 (アクセス権) が設"
6752 "定されており、 メモリが不正にアクセスされた場合 (例えば読み込み専用のセグメン"
6753 "トに 書き込んだ場合)、セグメンテーション侵害 (segmentation violation) を 引き"
6754 "起こす。また、セグメント外の仮想メモリにアクセスした場合にも セグメンテーショ"
6755 "ン侵害が発生する。"
6756
6757 #. type: Plain text
6758 #: build/C/man2/mremap.2:81
6759 msgid ""
6760 "B<mremap>()  uses the Linux page table scheme.  B<mremap>()  changes the "
6761 "mapping between virtual addresses and memory pages.  This can be used to "
6762 "implement a very efficient B<realloc>(3)."
6763 msgstr ""
6764 "B<mremap>()  は Linux のページ・テーブル方式を使用する。 B<mremap>()  は仮想"
6765 "アドレスとメモリ・ページのマッピングを変更する。これは非常に効率的な "
6766 "B<realloc>(3)  を実装するのに使用されている。"
6767
6768 #. type: Plain text
6769 #: build/C/man2/mremap.2:83
6770 msgid "The I<flags> bit-mask argument may be 0, or include the following flag:"
6771 msgstr "I<flags> ビットマスク引数は 0 または以下のフラグを含む:"
6772
6773 #. type: TP
6774 #: build/C/man2/mremap.2:83
6775 #, no-wrap
6776 msgid "B<MREMAP_MAYMOVE>"
6777 msgstr "B<MREMAP_MAYMOVE>"
6778
6779 #. type: Plain text
6780 #: build/C/man2/mremap.2:95
6781 msgid ""
6782 "By default, if there is not sufficient space to expand a mapping at its "
6783 "current location, then B<mremap>()  fails.  If this flag is specified, then "
6784 "the kernel is permitted to relocate the mapping to a new virtual address, if "
6785 "necessary.  If the mapping is relocated, then absolute pointers into the old "
6786 "mapping location become invalid (offsets relative to the starting address of "
6787 "the mapping should be employed)."
6788 msgstr ""
6789 "デフォルトでは、現在の位置にマッピングを拡張するための 十分な空きがなければ "
6790 "B<mremap>()  は失敗する。 このフラグが指定されると、カーネルは必要があれば"
6791 "マッピングを 新しい仮想アドレスに再配置することができる マッピングが再配置さ"
6792 "れると、古いマッピング位置への絶対ポインタは 無効になる (マッピングの開始アド"
6793 "レスからの相対オフセットは有効のままである)。"
6794
6795 #. type: TP
6796 #: build/C/man2/mremap.2:95
6797 #, no-wrap
6798 msgid "B<MREMAP_FIXED> (since Linux 2.3.31)"
6799 msgstr "B<MREMAP_FIXED> (Linux 2.3.31 以降)"
6800
6801 #. type: Plain text
6802 #: build/C/man2/mremap.2:117
6803 msgid ""
6804 "This flag serves a similar purpose to the B<MAP_FIXED> flag of B<mmap>(2).  "
6805 "If this flag is specified, then B<mremap>()  accepts a fifth argument, I<void"
6806 "\\ *new_address>, which specifies a page-aligned address to which the "
6807 "mapping must be moved.  Any previous mapping at the address range specified "
6808 "by I<new_address> and I<new_size> is unmapped.  If B<MREMAP_FIXED> is "
6809 "specified, then B<MREMAP_MAYMOVE> must also be specified."
6810 msgstr ""
6811 "このフラグは B<mmap>(2)  の B<MAP_FIXED> フラグと似たような目的で用いられ"
6812 "る。 このフラグが指定されると、 B<mremap>()  は 5 番目の引き数 I<void\\ "
6813 "*new_address> を受け取り、この引数はマッピングが移動されるべきアドレスを指定"
6814 "する。 このアドレスはページ境界に合っていなければならない。 I<new_address> "
6815 "と I<new_size> で指定されるアドレス範囲に過去のマッピングがあった場合、 その"
6816 "マッピングはアンマップされる (unmapped)。 B<MREMAP_FIXED> を指定した場合は、 "
6817 "B<MREMAP_MAYMOVE> も指定しなければならない。"
6818
6819 #. type: Plain text
6820 #: build/C/man2/mremap.2:127
6821 msgid ""
6822 "If the memory segment specified by I<old_address> and I<old_size> is locked "
6823 "(using B<mlock>(2)  or similar), then this lock is maintained when the "
6824 "segment is resized and/or relocated.  As a consequence, the amount of memory "
6825 "locked by the process may change."
6826 msgstr ""
6827 "I<old_address> と I<old_size> で指定されるメモリセグメントが (B<mlock>(2)  や"
6828 "同様のもので) ロックされている場合、セグメントのサイズが変わったり 再配置され"
6829 "たりした時にロックも維持される。 その結果、プロセスによってロックされるメモリ"
6830 "の量は変化する。"
6831
6832 #. type: Plain text
6833 #: build/C/man2/mremap.2:135
6834 msgid ""
6835 "On success B<mremap>()  returns a pointer to the new virtual memory area.  "
6836 "On error, the value B<MAP_FAILED> (that is, I<(void\\ *)\\ -1>) is returned, "
6837 "and I<errno> is set appropriately."
6838 msgstr ""
6839 "成功した場合は B<mremap>()  は新しい仮想メモリ領域へのポインタを返す。 エラー"
6840 "の場合は B<MAP_FAILED> (すなわち I<(void\\ *)\\ -1>) が返され、 I<errno> が適"
6841 "切に設定される。"
6842
6843 #. type: Plain text
6844 #: build/C/man2/mremap.2:142
6845 msgid ""
6846 "The caller tried to expand a memory segment that is locked, but this was not "
6847 "possible without exceeding the B<RLIMIT_MEMLOCK> resource limit."
6848 msgstr ""
6849 "呼び出し元がロックされているメモリセグメントを拡張しようとしたが、 "
6850 "B<RLIMIT_MEMLOCK> リソース制限を越えずにこれを行うことができない。"
6851
6852 #. type: Plain text
6853 #: build/C/man2/mremap.2:151
6854 msgid ""
6855 "\"Segmentation fault.\" Some address in the range I<old_address> to "
6856 "I<old_address>+I<old_size> is an invalid virtual memory address for this "
6857 "process.  You can also get B<EFAULT> even if there exist mappings that cover "
6858 "the whole address space requested, but those mappings are of different types."
6859 msgstr ""
6860 "「セグメンテーション違反(segmentation fault)」 I<old_address> から "
6861 "I<old_address>+I<old_size> の 範囲のアドレスのどれかがこのプロセスにおいて不"
6862 "正な仮想メモリ・アドレスである。 たとえ要求したアドレス空間全体を含むような"
6863 "マッピングがあったとしても、 それらのマッピングが異なった型ならば B<EFAULT> "
6864 "を受け取るだろう。"
6865
6866 #. type: Plain text
6867 #: build/C/man2/mremap.2:179
6868 msgid ""
6869 "An invalid argument was given.  Possible causes are: I<old_address> was not "
6870 "page aligned; a value other than B<MREMAP_MAYMOVE> or B<MREMAP_FIXED> was "
6871 "specified in I<flags>; I<new_size> was zero; I<new_size> or I<new_address> "
6872 "was invalid; or the new address range specified by I<new_address> and "
6873 "I<new_size> overlapped the old address range specified by I<old_address> and "
6874 "I<old_size>; or B<MREMAP_FIXED> was specified without also specifying "
6875 "B<MREMAP_MAYMOVE>."
6876 msgstr ""
6877 "不正な引き数が与えられた。 可能性のある原因は以下の通りである: たいていは "
6878 "I<old_address> がページ境界に 合ってない; I<flags> に B<MREMAP_MAYMOVE> また"
6879 "は B<MREMAP_FIXED> 以外の値が指定されている; I<new_size> がゼロ; I<new_size> "
6880 "または I<new_address> の値が不正; I<new_address> と I<new_size> で指定される"
6881 "新しいアドレス範囲が I<old_address> と I<old_size> で指定される古いアドレス範"
6882 "囲と重なっている; B<MREMAP_FIXED> が指定されているが B<MREMAP_MAYMOVE> が指定"
6883 "されていない。"
6884
6885 #. type: Plain text
6886 #: build/C/man2/mremap.2:185
6887 msgid ""
6888 "The memory area cannot be expanded at the current virtual address, and the "
6889 "B<MREMAP_MAYMOVE> flag is not set in I<flags>.  Or, there is not enough "
6890 "(virtual) memory available."
6891 msgstr ""
6892 "現在の仮想アドレスではメモリ領域が拡張できず、 B<MREMAP_MAYMOVE> フラグが "
6893 "I<flags> に設定されていない。 または十分な (仮想) メモリが存在しない。"
6894
6895 #.  4.2BSD had a (never actually implemented)
6896 #.  .BR mremap (2)
6897 #.  call with completely different semantics.
6898 #. type: Plain text
6899 #: build/C/man2/mremap.2:191
6900 msgid ""
6901 "This call is Linux-specific, and should not be used in programs intended to "
6902 "be portable."
6903 msgstr ""
6904 "このコールは Linux 特有であり、移植を意図したプログラムで 使用すべきではな"
6905 "い。"
6906
6907 #. type: Plain text
6908 #: build/C/man2/mremap.2:199
6909 msgid ""
6910 "Prior to version 2.4, glibc did not expose the definition of "
6911 "B<MREMAP_FIXED>, and the prototype for B<mremap>()  did not allow for the "
6912 "I<new_address> argument."
6913 msgstr ""
6914 "バージョン 2.4 より前の glibc では、 B<MREMAP_FIXED> の定義は公開されておら"
6915 "ず、 B<mremap>()  のプロトタイプは I<new_address> 引き数を取らなかった。"
6916
6917 #. type: Plain text
6918 #: build/C/man2/mremap.2:208
6919 msgid ""
6920 "B<brk>(2), B<getpagesize>(2), B<getrlimit>(2), B<mlock>(2), B<mmap>(2), "
6921 "B<sbrk>(2), B<malloc>(3), B<realloc>(3)"
6922 msgstr ""
6923 "B<brk>(2), B<getpagesize>(2), B<getrlimit>(2), B<mlock>(2), B<mmap>(2), "
6924 "B<sbrk>(2), B<realloc>(3), B<malloc>(3)"
6925
6926 #. type: Plain text
6927 #: build/C/man2/mremap.2:214
6928 msgid ""
6929 "Your favorite text book on operating systems for more information on paged "
6930 "memory (e.g., I<Modern Operating Systems> by Andrew S. Tanenbaum, I<Inside "
6931 "Linux> by Randolf Bentson, I<The Design of the UNIX Operating System> by "
6932 "Maurice J. Bach)"
6933 msgstr ""
6934 "ページ分割されたメモリについてもっと詳しく知りたいならば、あなたのお気に入り"
6935 "のオペレーティングシステムの教科書を参照してほしい (例えば、 I<Modern "
6936 "Operating Systems> by Andrew S. Tanenbaum, I<Inside Linux> by Randolf "
6937 "Bentson, I<The Design of the UNIX Operating System> by Maurice J. Bach.)"
6938
6939 #. type: TH
6940 #: build/C/man2/msync.2:25
6941 #, no-wrap
6942 msgid "MSYNC"
6943 msgstr "MSYNC"
6944
6945 #. type: TH
6946 #: build/C/man2/msync.2:25 build/C/man2/remap_file_pages.2:28
6947 #, no-wrap
6948 msgid "2008-04-22"
6949 msgstr "2008-04-22"
6950
6951 #. type: Plain text
6952 #: build/C/man2/msync.2:28
6953 msgid "msync - synchronize a file with a memory map"
6954 msgstr "msync - ファイルをマップしたメモリと同期させる"
6955
6956 #. type: Plain text
6957 #: build/C/man2/msync.2:32
6958 msgid "B<int msync(void *>I<addr>B<, size_t >I<length>B<, int >I<flags>B<);>"
6959 msgstr "B<int msync(void *>I<addr>B<, size_t >I<length>B<, int >I<flags>B<);>"
6960
6961 #. type: Plain text
6962 #: build/C/man2/msync.2:48
6963 msgid ""
6964 "B<msync>()  flushes changes made to the in-core copy of a file that was "
6965 "mapped into memory using B<mmap>(2)  back to disk.  Without use of this call "
6966 "there is no guarantee that changes are written back before B<munmap>(2)  is "
6967 "called.  To be more precise, the part of the file that corresponds to the "
6968 "memory area starting at I<addr> and having length I<length> is updated."
6969 msgstr ""
6970 "B<msync>()  は B<mmap>(2)  を使ってメモリにマップされたファイルの、 メモリ上"
6971 "のコピーになされた変更をディスクに反映させる。 この関数を使用しないと、 "
6972 "B<munmap>(2)  が呼び出されるまで変更が書き戻される保証はない。 より正確には、"
6973 "ファイルのうち I<addr> から始まり長さ I<length> のメモリ領域に対応する部分が"
6974 "更新される。"
6975
6976 #. type: Plain text
6977 #: build/C/man2/msync.2:68
6978 msgid ""
6979 "The I<flags> argument may have the bits B<MS_ASYNC>, B<MS_SYNC>, and "
6980 "B<MS_INVALIDATE> set, but not both B<MS_ASYNC> and B<MS_SYNC>.  B<MS_ASYNC> "
6981 "specifies that an update be scheduled, but the call returns immediately.  "
6982 "B<MS_SYNC> asks for an update and waits for it to complete.  "
6983 "B<MS_INVALIDATE> asks to invalidate other mappings of the same file (so that "
6984 "they can be updated with the fresh values just written)."
6985 msgstr ""
6986 "I<flags> 引数にはビット B<MS_ASYNC>, B<MS_SYNC>, B<MS_INVALIDATE> を設定する"
6987 "ことができるが、 B<MS_ASYNC> と B<MS_SYNC> を同時に指定することはできない。 "
6988 "B<MS_ASYNC> は更新を予定に組み込むことを表し、呼び出しは直ちに返る。 "
6989 "B<MS_SYNC> は更新を要求し、更新が完了するまで待つ。 B<MS_INVALIDATE> は(たっ"
6990 "た今書き込んだ新しい値でマッピングを更新することができるように)  同じファイル"
6991 "に対する他のマッピングを無効にすることを要求する。"
6992
6993 #. type: Plain text
6994 #: build/C/man2/msync.2:73
6995 msgid ""
6996 "On success, zero is returned.  On error, -1 is returned, and I<errno> is set "
6997 "appropriately."
6998 msgstr ""
6999 "成功した場合、 0 が返る。エラーの場合、 -1 が返り、 I<errno> が適切に設定され"
7000 "る。"
7001
7002 #. type: TP
7003 #: build/C/man2/msync.2:74
7004 #, no-wrap
7005 msgid "B<EBUSY>"
7006 msgstr "B<EBUSY>"
7007
7008 #. type: Plain text
7009 #: build/C/man2/msync.2:80
7010 msgid ""
7011 "B<MS_INVALIDATE> was specified in I<flags>, and a memory lock exists for the "
7012 "specified address range."
7013 msgstr ""
7014 "I flags に B<MS_INVALIDATE> が指定されたが、指定されたアドレス範囲にロックが"
7015 "存在する。"
7016
7017 #. type: Plain text
7018 #: build/C/man2/msync.2:93
7019 msgid ""
7020 "I<addr> is not a multiple of PAGESIZE; or any bit other than B<MS_ASYNC> | "
7021 "B<MS_INVALIDATE> | B<MS_SYNC> is set in I<flags>; or both B<MS_SYNC> and "
7022 "B<MS_ASYNC> are set in I<flags>."
7023 msgstr ""
7024 "I<addr> が PAGESIZE の倍数でない。または、 I<flags> に B<MS_ASYNC>、"
7025 "B<MS_INVALIDATE>、B<MS_SYNC> 以外のビットが設定された。 または、 I<flags> に "
7026 "B<MS_SYNC> と B<MS_ASYNC> の両方が設定された。"
7027
7028 #. type: Plain text
7029 #: build/C/man2/msync.2:96
7030 msgid "The indicated memory (or part of it) was not mapped."
7031 msgstr "指定されたメモリ (またはその一部) がマップされていない。"
7032
7033 #. type: Plain text
7034 #: build/C/man2/msync.2:98 build/C/man3/posix_fallocate.3:105
7035 #: build/C/man3/shm_open.3:253 build/C/man7/shm_overview.7:103
7036 msgid "POSIX.1-2001."
7037 msgstr "POSIX.1-2001."
7038
7039 #. type: Plain text
7040 #: build/C/man2/msync.2:105
7041 msgid ""
7042 "This call was introduced in Linux 1.3.21, and then used B<EFAULT> instead of "
7043 "B<ENOMEM>.  In Linux 2.4.19 this was changed to the POSIX value B<ENOMEM>."
7044 msgstr ""
7045 "この関数は Linux 1.3.21 で導入されたが、 B<ENOMEM> ではなく B<EFAULT> が使わ"
7046 "れていた。 これは Linux 2.4.19 で POSIX における値 B<ENOMEM> に変更された。"
7047
7048 #.  POSIX.1-2001: It shall be defined to -1 or 0 or 200112L.
7049 #.  -1: unavailable, 0: ask using sysconf().
7050 #.  glibc defines them to 1.
7051 #. type: Plain text
7052 #: build/C/man2/msync.2:120
7053 msgid ""
7054 "On POSIX systems on which B<msync>()  is available, both "
7055 "B<_POSIX_MAPPED_FILES> and B<_POSIX_SYNCHRONIZED_IO> are defined in "
7056 "I<E<lt>unistd.hE<gt>> to a value greater than 0.  (See also B<sysconf>(3).)"
7057 msgstr ""
7058 "B<msync>()  が使用可能な POSIX システムでは B<_POSIX_MAPPED_FILES> と "
7059 "B<_POSIX_SYNCHRONIZED_IO> の両方が I<E<lt>unistd.hE<gt>> で 0 より大きい値に"
7060 "定義される。 (B<sysconf>(3)  を参照すること。 )"
7061
7062 #. type: TP
7063 #: build/C/man2/msync.2:122 build/C/man7/shm_overview.7:46
7064 #, no-wrap
7065 msgid "B<mmap>(2)"
7066 msgstr "B<mmap>(2)"
7067
7068 #. type: TH
7069 #: build/C/man3/mtrace.3:25
7070 #, no-wrap
7071 msgid "MTRACE"
7072 msgstr "MTRACE"
7073
7074 #. type: TH
7075 #: build/C/man3/mtrace.3:25
7076 #, no-wrap
7077 msgid "2012-04-18"
7078 msgstr "2012-04-18"
7079
7080 #. type: Plain text
7081 #: build/C/man3/mtrace.3:28
7082 msgid "mtrace, muntrace - malloc tracing"
7083 msgstr "mtrace, muntrace - malloc のトレース"
7084
7085 #. type: Plain text
7086 #: build/C/man3/mtrace.3:30
7087 msgid "B<#include E<lt>mcheck.hE<gt>>"
7088 msgstr "B<#include E<lt>mcheck.hE<gt>>"
7089
7090 #. type: Plain text
7091 #: build/C/man3/mtrace.3:32
7092 msgid "B<void mtrace(void);>"
7093 msgstr "B<void mtrace(void);>"
7094
7095 #. type: Plain text
7096 #: build/C/man3/mtrace.3:34
7097 msgid "B<void muntrace(void);>"
7098 msgstr "B<void muntrace(void);>"
7099
7100 #. type: Plain text
7101 #: build/C/man3/mtrace.3:46
7102 msgid ""
7103 "The B<mtrace>()  function installs hook functions for the memory-allocation "
7104 "functions (B<malloc>(3), B<realloc>(3)  B<memalign>(3), B<free>(3)).  These "
7105 "hook functions record tracing information about memory allocation and "
7106 "deallocation.  The tracing information can be used to discover memory leaks "
7107 "and attempts to free nonallocated memory in a program."
7108 msgstr ""
7109
7110 #. type: Plain text
7111 #: build/C/man3/mtrace.3:57
7112 msgid ""
7113 "The B<muntrace>()  function disables the hook functions installed by "
7114 "B<mtrace>(), so that tracing information is no longer recorded for the "
7115 "memory-allocation functions.  If no hook functions were successfully "
7116 "installed by B<mtrace>(), B<muntrace>()  does nothing."
7117 msgstr ""
7118
7119 #. type: Plain text
7120 #: build/C/man3/mtrace.3:65
7121 msgid ""
7122 "When B<mtrace>()  is called, it checks the value of the environment variable "
7123 "B<MALLOC_TRACE>, which should contain the pathname of a file in which the "
7124 "tracing information is to be recorded.  If the pathname is successfully "
7125 "opened, it is truncated to zero length."
7126 msgstr ""
7127
7128 #. type: Plain text
7129 #: build/C/man3/mtrace.3:78
7130 msgid ""
7131 "If B<MALLOC_TRACE> is not set, or the pathname it specifies is invalid or "
7132 "not writable, then no hook functions are installed, and B<mtrace>()  has no "
7133 "effect.  In set-user-ID and set-group-ID programs, B<MALLOC_TRACE> is "
7134 "ignored, and B<mtrace>()  has no effect."
7135 msgstr ""
7136
7137 #. type: Plain text
7138 #: build/C/man3/mtrace.3:86
7139 msgid ""
7140 "In normal usage, B<mtrace>()  is called once at the start of execution of a "
7141 "program, and B<muntrace>()  is never called."
7142 msgstr ""
7143
7144 #. type: Plain text
7145 #: build/C/man3/mtrace.3:96
7146 msgid ""
7147 "The tracing output produced after a call to B<mtrace>()  is textual, but not "
7148 "designed to be human readable.  The GNU C library provides a Perl script, "
7149 "B<mtrace>(1), that interprets the trace log and produces human-readable "
7150 "output.  For best results, the traced program should be compiled with "
7151 "debugging enabled, so that line-number information is recorded in the "
7152 "executable."
7153 msgstr ""
7154
7155 #. type: Plain text
7156 #: build/C/man3/mtrace.3:102
7157 msgid ""
7158 "The tracing performed by B<mtrace>()  incurs a performance penalty (if "
7159 "B<MALLOC_TRACE> points to a valid, writable pathname)."
7160 msgstr ""
7161
7162 #. type: Plain text
7163 #: build/C/man3/mtrace.3:108
7164 msgid ""
7165 "The line-number information produced by B<mtrace>(1)  is not always precise: "
7166 "the line number references may refer to the previous or following "
7167 "(nonblank)  line of the source code."
7168 msgstr ""
7169
7170 #. type: Plain text
7171 #: build/C/man3/mtrace.3:115
7172 msgid ""
7173 "The shell session below demonstrates the use of the B<mtrace>()  function "
7174 "and the B<mtrace>(1)  command in a program that has memory leaks at two "
7175 "different locations.  The demonstration uses the following program:"
7176 msgstr ""
7177
7178 #. type: Plain text
7179 #: build/C/man3/mtrace.3:122
7180 #, no-wrap
7181 msgid ""
7182 "$ B<cat t_mtrace.c>\n"
7183 "#include E<lt>mcheck.hE<gt>\n"
7184 "#include E<lt>stdlib.hE<gt>\n"
7185 "#include E<lt>stdio.hE<gt>\n"
7186 msgstr ""
7187 "$ B<cat t_mtrace.c>\n"
7188 "#include E<lt>mcheck.hE<gt>\n"
7189 "#include E<lt>stdlib.hE<gt>\n"
7190 "#include E<lt>stdio.hE<gt>\n"
7191
7192 #. type: Plain text
7193 #: build/C/man3/mtrace.3:127
7194 #, no-wrap
7195 msgid ""
7196 "int\n"
7197 "main(int argc, char *argv[])\n"
7198 "{\n"
7199 "    int j;\n"
7200 msgstr ""
7201 "int\n"
7202 "main(int argc, char *argv[])\n"
7203 "{\n"
7204 "    int j;\n"
7205
7206 #. type: Plain text
7207 #: build/C/man3/mtrace.3:129
7208 #, no-wrap
7209 msgid "    mtrace();\n"
7210 msgstr "    mtrace();\n"
7211
7212 #. type: Plain text
7213 #: build/C/man3/mtrace.3:132
7214 #, no-wrap
7215 msgid ""
7216 "    for (j = 0; j E<lt> 2; j++)\n"
7217 "        malloc(100);            /* Never freed--a memory leak */\n"
7218 msgstr ""
7219 "    for (j = 0; j E<lt> 2; j++)\n"
7220 "        malloc(100);            /* Never freed--a memory leak */\n"
7221
7222 #. type: Plain text
7223 #: build/C/man3/mtrace.3:136
7224 #, no-wrap
7225 msgid ""
7226 "    calloc(16, 16);             /* Never freed--a memory leak */\n"
7227 "    exit(EXIT_SUCCESS);\n"
7228 "}\n"
7229 msgstr ""
7230 "    calloc(16, 16);             /* Never freed--a memory leak */\n"
7231 "    exit(EXIT_SUCCESS);\n"
7232 "}\n"
7233
7234 #. type: Plain text
7235 #: build/C/man3/mtrace.3:142
7236 msgid ""
7237 "When we run the program as follows, we see that B<mtrace>()  diagnosed "
7238 "memory leaks at two different locations in the program:"
7239 msgstr ""
7240
7241 #. type: Plain text
7242 #: build/C/man3/mtrace.3:155
7243 #, no-wrap
7244 msgid ""
7245 "$ B<cc -g t_mtrace.c -o t_mtrace>\n"
7246 "$ B<export MALLOC_TRACE=/tmp/t>\n"
7247 "$ B<./t_mtrace>\n"
7248 "$ B<mtrace ./t_mtrace $MALLOC_TRACE>\n"
7249 "Memory not freed:\n"
7250 "-----------------\n"
7251 "   Address     Size     Caller\n"
7252 "0x084c9378     0x64  at /home/cecilia/t_mtrace.c:12\n"
7253 "0x084c93e0     0x64  at /home/cecilia/t_mtrace.c:12\n"
7254 "0x084c9448    0x100  at /home/cecilia/t_mtrace.c:16\n"
7255 msgstr ""
7256 "$ B<cc -g t_mtrace.c -o t_mtrace>\n"
7257 "$ B<export MALLOC_TRACE=/tmp/t>\n"
7258 "$ B<./t_mtrace>\n"
7259 "$ B<mtrace ./t_mtrace $MALLOC_TRACE>\n"
7260 "Memory not freed:\n"
7261 "-----------------\n"
7262 "   Address     Size     Caller\n"
7263 "0x084c9378     0x64  at /home/cecilia/t_mtrace.c:12\n"
7264 "0x084c93e0     0x64  at /home/cecilia/t_mtrace.c:12\n"
7265 "0x084c9448    0x100  at /home/cecilia/t_mtrace.c:16\n"
7266
7267 #. type: Plain text
7268 #: build/C/man3/mtrace.3:167
7269 msgid ""
7270 "The first two messages about unfreed memory correspond to the two B<malloc>"
7271 "(3)  calls inside the I<for> loop.  The final message corresponds to the "
7272 "call to B<calloc>(3)  (which in turn calls B<malloc>(3))."
7273 msgstr ""
7274
7275 #. type: Plain text
7276 #: build/C/man3/mtrace.3:172
7277 msgid "B<mtrace>(1), B<malloc>(3), B<malloc_hook>(3), B<mcheck>(3)"
7278 msgstr "B<mtrace>(1), B<malloc>(3), B<malloc_hook>(3), B<mcheck>(3)"
7279
7280 #. type: TH
7281 #: build/C/man2/posix_fadvise.2:28
7282 #, no-wrap
7283 msgid "POSIX_FADVISE"
7284 msgstr "POSIX_FADVISE"
7285
7286 #. type: TH
7287 #: build/C/man2/posix_fadvise.2:28 build/C/man2/sync_file_range.2:30
7288 #, no-wrap
7289 msgid "2013-04-01"
7290 msgstr "2013-04-01"
7291
7292 #. type: Plain text
7293 #: build/C/man2/posix_fadvise.2:31
7294 msgid "posix_fadvise - predeclare an access pattern for file data"
7295 msgstr "posix_fadvise - ファイルデータのアクセスパターンをあらかじめ宣言する"
7296
7297 #. type: Plain text
7298 #: build/C/man2/posix_fadvise.2:34 build/C/man3/posix_fallocate.3:31
7299 #, no-wrap
7300 msgid "B<#include E<lt>fcntl.hE<gt>>\n"
7301 msgstr "B<#include E<lt>fcntl.hE<gt>>\n"
7302
7303 #. type: Plain text
7304 #: build/C/man2/posix_fadvise.2:37
7305 #, no-wrap
7306 msgid "B<int posix_fadvise(int >I<fd>B<, off_t >I<offset>B<, off_t >I<len>B<, int >I<advice>B<);>\n"
7307 msgstr "B<int posix_fadvise(int >I<fd>B<, off_t >I<offset>B<, off_t >I<len>B<, int >I<advice>B<);>\n"
7308
7309 #. type: Plain text
7310 #: build/C/man2/posix_fadvise.2:46
7311 msgid "B<posix_fadvise>():"
7312 msgstr "B<posix_fadvise>():"
7313
7314 #. type: Plain text
7315 #: build/C/man2/posix_fadvise.2:48 build/C/man3/posix_fallocate.3:44
7316 msgid "_XOPEN_SOURCE\\ E<gt>=\\ 600 || _POSIX_C_SOURCE\\ E<gt>=\\ 200112L"
7317 msgstr "_XOPEN_SOURCE\\ E<gt>=\\ 600 || _POSIX_C_SOURCE\\ E<gt>=\\ 200112L"
7318
7319 #. type: Plain text
7320 #: build/C/man2/posix_fadvise.2:56
7321 msgid ""
7322 "Programs can use B<posix_fadvise>()  to announce an intention to access file "
7323 "data in a specific pattern in the future, thus allowing the kernel to "
7324 "perform appropriate optimizations."
7325 msgstr ""
7326 "プログラムは、将来特定のパターンでファイルデータに アクセスする意思を伝えるた"
7327 "めに B<posix_fadvise>()  を使うことができる。 これにより、カーネルが適切な最"
7328 "適化を実行することが可能になる。"
7329
7330 #. type: Plain text
7331 #: build/C/man2/posix_fadvise.2:63
7332 msgid ""
7333 "The I<advice> applies to a (not necessarily existent) region starting at "
7334 "I<offset> and extending for I<len> bytes (or until the end of the file if "
7335 "I<len> is 0) within the file referred to by I<fd>.  The I<advice> is not "
7336 "binding; it merely constitutes an expectation on behalf of the application."
7337 msgstr ""
7338 "I<advice> は I<fd> が参照しているファイルの I<offset> から始まる I<len> バ"
7339 "イ\n"
7340 "トの範囲内 (I<len> が 0 の場合はファイルの終りまで) の (必ずしも存在しない)\n"
7341 "領域に適用される。 I<advice> は義務づけではない。 I<advice> は単にアプリ"
7342 "ケー\n"
7343 "ションのために可能性を構成するだけである。"
7344
7345 #. type: Plain text
7346 #: build/C/man2/posix_fadvise.2:65
7347 msgid "Permissible values for I<advice> include:"
7348 msgstr "I<advice> に許される値には、以下のものが含まれる:"
7349
7350 #. type: TP
7351 #: build/C/man2/posix_fadvise.2:65
7352 #, no-wrap
7353 msgid "B<POSIX_FADV_NORMAL>"
7354 msgstr "B<POSIX_FADV_NORMAL>"
7355
7356 #. type: Plain text
7357 #: build/C/man2/posix_fadvise.2:71
7358 msgid ""
7359 "Indicates that the application has no advice to give about its access "
7360 "pattern for the specified data.  If no advice is given for an open file, "
7361 "this is the default assumption."
7362 msgstr ""
7363 "指定されたデータのアクセスパターンを指示するアドバイスを アプリケーションが何"
7364 "も持っていないことを示す。 オープンされたファイルにアドバイスが指定されない場"
7365 "合、 これがデフォルトで仮定される。"
7366
7367 #. type: TP
7368 #: build/C/man2/posix_fadvise.2:71
7369 #, no-wrap
7370 msgid "B<POSIX_FADV_SEQUENTIAL>"
7371 msgstr "B<POSIX_FADV_SEQUENTIAL>"
7372
7373 #. type: Plain text
7374 #: build/C/man2/posix_fadvise.2:75
7375 msgid ""
7376 "The application expects to access the specified data sequentially (with "
7377 "lower offsets read before higher ones)."
7378 msgstr ""
7379 "アプリケーションは指定されたデータがシーケンシャルに (大きなオフセットの前に"
7380 "小さなオフセットのデータを読むように)  アクセスされることを期待する。"
7381
7382 #. type: TP
7383 #: build/C/man2/posix_fadvise.2:75
7384 #, no-wrap
7385 msgid "B<POSIX_FADV_RANDOM>"
7386 msgstr "B<POSIX_FADV_RANDOM>"
7387
7388 #. type: Plain text
7389 #: build/C/man2/posix_fadvise.2:78
7390 msgid "The specified data will be accessed in random order."
7391 msgstr "指定されたデータがランダムな順番でアクセスされる。"
7392
7393 #. type: TP
7394 #: build/C/man2/posix_fadvise.2:78
7395 #, no-wrap
7396 msgid "B<POSIX_FADV_NOREUSE>"
7397 msgstr "B<POSIX_FADV_NOREUSE>"
7398
7399 #. type: Plain text
7400 #: build/C/man2/posix_fadvise.2:81
7401 msgid "The specified data will be accessed only once."
7402 msgstr "指定されたデータは 1 度しかアクセスされない。"
7403
7404 #. type: TP
7405 #: build/C/man2/posix_fadvise.2:81
7406 #, no-wrap
7407 msgid "B<POSIX_FADV_WILLNEED>"
7408 msgstr "B<POSIX_FADV_WILLNEED>"
7409
7410 #. type: Plain text
7411 #: build/C/man2/posix_fadvise.2:84
7412 msgid "The specified data will be accessed in the near future."
7413 msgstr "指定されたデータは近い将来アクセスされる。"
7414
7415 #. type: TP
7416 #: build/C/man2/posix_fadvise.2:84
7417 #, no-wrap
7418 msgid "B<POSIX_FADV_DONTNEED>"
7419 msgstr "B<POSIX_FADV_DONTNEED>"
7420
7421 #. type: Plain text
7422 #: build/C/man2/posix_fadvise.2:87
7423 msgid "The specified data will not be accessed in the near future."
7424 msgstr "指定されたデータは近い将来アクセスされない。"
7425
7426 #. type: Plain text
7427 #: build/C/man2/posix_fadvise.2:90
7428 msgid "On success, zero is returned.  On error, an error number is returned."
7429 msgstr "成功した場合は 0 が返される。 失敗した場合はエラー番号が返される。"
7430
7431 #. type: Plain text
7432 #: build/C/man2/posix_fadvise.2:94
7433 msgid "The I<fd> argument was not a valid file descriptor."
7434 msgstr "I<fd> 引き数が有効なファイルディスクリプタでない。"
7435
7436 #. type: Plain text
7437 #: build/C/man2/posix_fadvise.2:97
7438 msgid "An invalid value was specified for I<advice>."
7439 msgstr "無効な値が I<advice> に指定された。"
7440
7441 #. type: Plain text
7442 #: build/C/man2/posix_fadvise.2:104
7443 msgid ""
7444 "The specified file descriptor refers to a pipe or FIFO.  (Linux actually "
7445 "returns B<EINVAL> in this case.)"
7446 msgstr ""
7447 "指定されたファイルディスクリプタがパイプまたは FIFO を参照している (この場"
7448 "合、Linux は実際には B<EINVAL> を返す)。"
7449
7450 #.  of fadvise64_64()
7451 #. type: Plain text
7452 #: build/C/man2/posix_fadvise.2:112
7453 msgid ""
7454 "Kernel support first appeared in Linux 2.5.60; the underlying system call is "
7455 "called B<fadvise64>().  Library support has been provided since glibc "
7456 "version 2.2, via the wrapper function B<posix_fadvise>()."
7457 msgstr ""
7458 "カーネルによるサポートは Linux 2.5.60 で最初に登場し、\n"
7459 "対応するシステムコールは B<fadvise64>() という名前である。\n"
7460 "ライブラリによるサポートは glibc バージョン 2.2 以降で提供されており、\n"
7461 "ラッパー関数は B<posix_fadvise>() という名前である。"
7462
7463 #. type: Plain text
7464 #: build/C/man2/posix_fadvise.2:121
7465 msgid ""
7466 "POSIX.1-2001.  Note that the type of the I<len> argument was changed from "
7467 "I<size_t> to I<off_t> in POSIX.1-2003 TC1."
7468 msgstr ""
7469 "POSIX.1-2001.  I<len> 引き数の型が POSIX.1-2003 TC1 において I<size_t> から "
7470 "I<off_t> に変更された点に注意すること。"
7471
7472 #. type: Plain text
7473 #: build/C/man2/posix_fadvise.2:127
7474 msgid ""
7475 "Under Linux, B<POSIX_FADV_NORMAL> sets the readahead window to the default "
7476 "size for the backing device; B<POSIX_FADV_SEQUENTIAL> doubles this size, and "
7477 "B<POSIX_FADV_RANDOM> disables file readahead entirely.  These changes affect "
7478 "the entire file, not just the specified region (but other open file handles "
7479 "to the same file are unaffected)."
7480 msgstr ""
7481 "Linux では、B<POSIX_FADV_NORMAL> はバッキングデバイスの デフォルトサイズに先"
7482 "読み (readahead) ウインドウを設定する。 B<POSIX_FADV_SEQUENTIAL> はこのサイズ"
7483 "を 2 倍し、 B<POSIX_FADV_RANDOM> は先読みを全く無効にする。 これらの変更は"
7484 "ファイル全体に影響し、指定された領域のみに影響するわけではない (しかし同じ"
7485 "ファイルに対する他のオープンファイルハンドルは影響を受けない)。"
7486
7487 #. type: Plain text
7488 #: build/C/man2/posix_fadvise.2:134
7489 msgid ""
7490 "B<POSIX_FADV_WILLNEED> initiates a nonblocking read of the specified region "
7491 "into the page cache.  The amount of data read may be decreased by the kernel "
7492 "depending on virtual memory load.  (A few megabytes will usually be fully "
7493 "satisfied, and more is rarely useful.)"
7494 msgstr ""
7495 "B<POSIX_FADV_WILLNEED> は、 ページキャッシュに指定領域のブロックされない読み"
7496 "込みを開始する。 読み込まれるデータの総量は、 仮想メモリの負荷に依ってカーネ"
7497 "ルが減らすかもしれない (数メガバイトであれば通常は全く十分であり、 それより多"
7498 "くてもめったに役に立たない)。"
7499
7500 #. type: Plain text
7501 #: build/C/man2/posix_fadvise.2:138
7502 msgid ""
7503 "In kernels before 2.6.18, B<POSIX_FADV_NOREUSE> had the same semantics as "
7504 "B<POSIX_FADV_WILLNEED>.  This was probably a bug; since kernel 2.6.18, this "
7505 "flag is a no-op."
7506 msgstr ""
7507 "2.6.18 より前のカーネルでは、B<POSIX_FADV_NOREUSE> は B<POSIX_FADV_WILLNEED> "
7508 "と同じ意味であった。 これは多分バグであった。 カーネル 2.6.18 以降では、この"
7509 "フラグは何も行わない。"
7510
7511 #. type: Plain text
7512 #: build/C/man2/posix_fadvise.2:146
7513 msgid ""
7514 "B<POSIX_FADV_DONTNEED> attempts to free cached pages associated with the "
7515 "specified region.  This is useful, for example, while streaming large "
7516 "files.  A program may periodically request the kernel to free cached data "
7517 "that has already been used, so that more useful cached pages are not "
7518 "discarded instead."
7519 msgstr ""
7520 "B<POSIX_FADV_DONTNEED> は指定された領域に関連付けられた キャッシュページを解"
7521 "放しようとする。 例えば、これは大きなファイルをストリーミングするときに役立"
7522 "つ。 プログラムは、使用済みのキャッシュされたデータを解放するように、 定期的"
7523 "にカーネルに要求するかもしれない。 そうすることにより、さらに有効なキャッシュ"
7524 "されたページが、 代わりに破棄されることはない。"
7525
7526 #. type: Plain text
7527 #: build/C/man2/posix_fadvise.2:154
7528 msgid ""
7529 "Pages that have not yet been written out will be unaffected, so if the "
7530 "application wishes to guarantee that pages will be released, it should call "
7531 "B<fsync>(2)  or B<fdatasync>(2)  first."
7532 msgstr ""
7533 "まだ書き出されていないページは影響を受けないので、 そのページの解放が保証され"
7534 "ることをアプリケーションが望んでいるなら、 最初に B<fsync>(2)  または "
7535 "B<fdatasync>(2)  を呼ぶべきである。"
7536
7537 #. type: SS
7538 #: build/C/man2/posix_fadvise.2:154
7539 #, no-wrap
7540 msgid "Architecture-specific variants"
7541 msgstr "アーキテクチャ固有の派生バージョン"
7542
7543 #. type: Plain text
7544 #: build/C/man2/posix_fadvise.2:171
7545 msgid ""
7546 "Some architectures require 64-bit arguments to be aligned in a suitable pair "
7547 "of registers (see B<syscall>(2)  for further detail).  On such "
7548 "architectures, the call signature of B<posix_fadvise>()  shown in the "
7549 "SYNOPSIS would force a register to be wasted as padding between the I<fd> "
7550 "and I<len> arguments.  Therefore, these architectures define a version of "
7551 "the system call that orders the arguments suitably, but otherwise is "
7552 "otherwise exactly the same as B<posix_fadvise>()."
7553 msgstr ""
7554 "いくつかのアーキテクチャでは、 64 ビットの引き数は適切なレジスタの組に割り当"
7555 "てる必要がある (B<syscall>(2) 参照)。 このようなアーキテクチャでは、 「書式」"
7556 "に書かれている  B<posix_fadvise>() の呼び出しシグネチャーで、 引き数 I<fd> "
7557 "と I<offset> の間のパディング (詰めもの) でレジスタが一つ消費されてしまう。 "
7558 "そのため、 これらのアーキテクチャでは引き数が適切な順序になった別のシステム"
7559 "コールが定義されているが、 それ以外は B<posix_fadvise>() と全く同じである。"
7560
7561 #. type: Plain text
7562 #: build/C/man2/posix_fadvise.2:173
7563 msgid "For example, since Linux 2.6.14, ARM has the following system call:"
7564 msgstr ""
7565 "例えば、 Linux 2.6.14 以降では、 ARM には以下のシステムコールが存在する。"
7566
7567 #. type: Plain text
7568 #: build/C/man2/posix_fadvise.2:178
7569 #, no-wrap
7570 msgid ""
7571 "B<long arm_fadvise64_64(int >I<fd>B<, int >I<advice>B<,>\n"
7572 "B<                      loff_t >I<offset>B<, loff_t >I<len>B<);>\n"
7573 msgstr ""
7574 "B<long arm_fadvise64_64(int >I<fd>B<, int >I<advice>B<,>\n"
7575 "B<                      loff_t >I<offset>B<, loff_t >I<len>B<);>\n"
7576
7577 #. type: Plain text
7578 #: build/C/man2/posix_fadvise.2:186
7579 msgid ""
7580 "These architecture-specific details are generally hidden from applications "
7581 "by the glibc B<posix_fadvise>()  wrapper function, which invokes the "
7582 "appropriate architecture-specific system call."
7583 msgstr ""
7584 "通常、 glibc の B<posix_fadvise>() ラッパー関数により、 これらのアーキテク"
7585 "チャ固有の詳細はアプリケーションには見えない。 glibc のラッパー関数では、適切"
7586 "なアーキテクチャ固有のシステムコールが呼び出される。"
7587
7588 #. type: Plain text
7589 #: build/C/man2/posix_fadvise.2:191
7590 msgid ""
7591 "In kernels before 2.6.6, if I<len> was specified as 0, then this was "
7592 "interpreted literally as \"zero bytes\", rather than as meaning \"all bytes "
7593 "through to the end of the file\"."
7594 msgstr ""
7595 "2.6.6 より前のカーネルでは、 I<len> に 0 が指定された場合、 「ファイルの終り"
7596 "までの全てのバイト」という意味ではなく、 文字通り「0 バイト」として解釈されて"
7597 "いた。"
7598
7599 #.  FIXME . Write a posix_fadvise(3) page.
7600 #. type: Plain text
7601 #: build/C/man2/posix_fadvise.2:197
7602 msgid ""
7603 "B<readahead>(2), B<sync_file_range>(2), B<posix_fallocate>(3), "
7604 "B<posix_madvise>(3)"
7605 msgstr ""
7606 "B<readahead>(2), B<sync_file_range>(2), B<posix_fallocate>(3),\n"
7607 "B<posix_madvise>(3)"
7608
7609 #. type: TH
7610 #: build/C/man3/posix_fallocate.3:25
7611 #, no-wrap
7612 msgid "POSIX_FALLOCATE"
7613 msgstr "POSIX_FALLOCATE"
7614
7615 #. type: TH
7616 #: build/C/man3/posix_fallocate.3:25 build/C/man2/shmop.2:41
7617 #, no-wrap
7618 msgid "2013-02-12"
7619 msgstr "2013-02-12"
7620
7621 #. type: Plain text
7622 #: build/C/man3/posix_fallocate.3:28
7623 msgid "posix_fallocate - allocate file space"
7624 msgstr "posix_fallocate - ファイルのスペースを確保する"
7625
7626 #. type: Plain text
7627 #: build/C/man3/posix_fallocate.3:33
7628 #, no-wrap
7629 msgid "B<int posix_fallocate(int >I<fd>B<, off_t >I<offset>B<, off_t >I<len>B<);>\n"
7630 msgstr "B<int posix_fallocate(int >I<fd>B<, off_t >I<offset>B<, off_t >I<len>B<);>\n"
7631
7632 #. type: Plain text
7633 #: build/C/man3/posix_fallocate.3:42
7634 msgid "B<posix_fallocate>():"
7635 msgstr "B<posix_fallocate>():"
7636
7637 #. type: Plain text
7638 #: build/C/man3/posix_fallocate.3:61
7639 msgid ""
7640 "The function B<posix_fallocate>()  ensures that disk space is allocated for "
7641 "the file referred to by the descriptor I<fd> for the bytes in the range "
7642 "starting at I<offset> and continuing for I<len> bytes.  After a successful "
7643 "call to B<posix_fallocate>(), subsequent writes to bytes in the specified "
7644 "range are guaranteed not to fail because of lack of disk space."
7645 msgstr ""
7646 "関数 B<posix_fallocate>()  は、ディスクリプタ I<fd> で参照されるファイルに対"
7647 "して、ディスクスペースを確実に確保する。 ディスクスペースは I<offset> から始"
7648 "まる I<len> バイトの範囲のバイトである。 B<posix_fallocate>()  の呼び出しが成"
7649 "功した後、指定された範囲のバイトに対する書き込みは、 ディスクスペースの不足で"
7650 "失敗しないことが保証される。"
7651
7652 #. type: Plain text
7653 #: build/C/man3/posix_fallocate.3:66
7654 msgid ""
7655 "If the size of the file is less than I<offset>+I<len>, then the file is "
7656 "increased to this size; otherwise the file size is left unchanged."
7657 msgstr ""
7658 "ファイルのサイズが I<offset>+I<len> より小さい場合、ファイルはこのサイズにな"
7659 "るように拡大される。 それ以外の場合、ファイルサイズは変わらない。"
7660
7661 #. type: Plain text
7662 #: build/C/man3/posix_fallocate.3:72
7663 msgid ""
7664 "B<posix_fallocate>()  returns zero on success, or an error number on "
7665 "failure.  Note that I<errno> is not set."
7666 msgstr ""
7667 "B<posix_fallocate>()  は成功した場合、0 を返す。 失敗した場合、エラー番号を返"
7668 "す。 I<errno> が設定されない点に注意すること。"
7669
7670 #. type: Plain text
7671 #: build/C/man3/posix_fallocate.3:81
7672 msgid "I<offset+len> exceeds the maximum file size."
7673 msgstr "I<offset+len> が最大ファイルサイズを超えている。"
7674
7675 #. type: Plain text
7676 #: build/C/man3/posix_fallocate.3:91
7677 msgid "I<fd> does not refer to a regular file."
7678 msgstr "I<fd> が通常のファイルとして参照されていない。"
7679
7680 #. type: Plain text
7681 #: build/C/man3/posix_fallocate.3:100
7682 msgid "I<fd> refers to a pipe."
7683 msgstr "I<fd> がパイプを参照している。"
7684
7685 #. type: Plain text
7686 #: build/C/man3/posix_fallocate.3:103
7687 msgid "B<posix_fallocate>()  is available since glibc 2.1.94."
7688 msgstr "B<posix_fallocate>()  は glibc 2.1.94 以降で利用可能である。"
7689
7690 #. type: Plain text
7691 #: build/C/man3/posix_fallocate.3:128
7692 msgid ""
7693 "POSIX.1-2008 says that an implementation I<shall> give the B<EINVAL> error "
7694 "if I<len> was 0, or I<offset> was less than 0.  POSIX.1-2001 says that an "
7695 "implementation I<shall> give the B<EINVAL> error if I<len> is less than 0, "
7696 "or I<offset> was less than 0, and I<may> give the error if I<len> equals "
7697 "zero."
7698 msgstr ""
7699 "POSIX.1-2008 では、 I<len> が 0 の場合、もしくは I<offset> が 0 未満の場合、 "
7700 "B<EINVAL> エラーを返すものとされている。 POSIX.1-2001 では、 I<len> が 0 未満"
7701 "の場合、もしくは I<offset> が 0 未満の場合、 B<EINVAL> エラーを返すものとされ"
7702 "ている。また、 I<len> が 0 の場合、 B<EINVAL> エラーを返してもよいとされてい"
7703 "る。"
7704
7705 #. type: Plain text
7706 #: build/C/man3/posix_fallocate.3:133
7707 msgid "B<fallocate>(1), B<fallocate>(2), B<lseek>(2), B<posix_fadvise>(2)"
7708 msgstr "B<fallocate>(1), B<fallocate>(2), B<lseek>(2), B<posix_fadvise>(2)"
7709
7710 #. type: TH
7711 #: build/C/man3/posix_memalign.3:29
7712 #, no-wrap
7713 msgid "POSIX_MEMALIGN"
7714 msgstr "POSIX_MEMALIGN"
7715
7716 #. type: TH
7717 #: build/C/man3/posix_memalign.3:29
7718 #, no-wrap
7719 msgid "2013-09-02"
7720 msgstr "2013-09-02"
7721
7722 #. type: Plain text
7723 #: build/C/man3/posix_memalign.3:32
7724 msgid ""
7725 "posix_memalign, aligned_alloc, memalign, valloc, pvalloc - allocate aligned "
7726 "memory"
7727 msgstr ""
7728 "posix_memalign, aligned_alloc, memalign, valloc, pvalloc - アラインメント\n"
7729 "されたメモリの割り当てを行う"
7730
7731 #. type: Plain text
7732 #: build/C/man3/posix_memalign.3:39
7733 #, no-wrap
7734 msgid ""
7735 "B<int posix_memalign(void **>I<memptr>B<, size_t >I<alignment>B<, size_t >I<size>B<);>\n"
7736 "B<void *aligned_alloc(size_t >I<alignment>B<, size_t >I<size>B<);>\n"
7737 "B<void *valloc(size_t >I<size>B<);>\n"
7738 msgstr ""
7739 "B<int posix_memalign(void **>I<memptr>B<, size_t >I<alignment>B<, size_t >I<size>B<);>\n"
7740 "B<void *aligned_alloc(size_t >I<alignment>B<, size_t >I<size>B<);>\n"
7741 "B<void *valloc(size_t >I<size>B<);>\n"
7742
7743 #. type: Plain text
7744 #: build/C/man3/posix_memalign.3:44
7745 #, no-wrap
7746 msgid ""
7747 "B<void *memalign(size_t >I<alignment>B<, size_t >I<size>B<);>\n"
7748 "B<void *pvalloc(size_t >I<size>B<);>\n"
7749 msgstr ""
7750 "B<void *memalign(size_t >I<alignment>B<, size_t >I<size>B<);>\n"
7751 "B<void *pvalloc(size_t >I<size>B<);>\n"
7752
7753 #. type: Plain text
7754 #: build/C/man3/posix_memalign.3:54
7755 msgid ""
7756 "B<posix_memalign>(): _POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ "
7757 "E<gt>=\\ 600"
7758 msgstr ""
7759 "B<posix_memalign>(): _POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ "
7760 "E<gt>=\\ 600"
7761
7762 #. type: Plain text
7763 #: build/C/man3/posix_memalign.3:57
7764 msgid "B<aligned_alloc>(): _ISOC11_SOURCE"
7765 msgstr "B<aligned_alloc>(): _ISOC11_SOURCE"
7766
7767 #. type: Plain text
7768 #: build/C/man3/posix_memalign.3:59
7769 msgid "B<valloc>():"
7770 msgstr "B<valloc>():"
7771
7772 #. type: TP
7773 #: build/C/man3/posix_memalign.3:62
7774 #, no-wrap
7775 msgid "Since glibc 2.12:"
7776 msgstr "glibc 2.12 以降:"
7777
7778 #. type: Plain text
7779 #: build/C/man3/posix_memalign.3:69
7780 #, no-wrap
7781 msgid ""
7782 "_BSD_SOURCE ||\n"
7783 "    (_XOPEN_SOURCE\\ E<gt>=\\ 500 ||\n"
7784 "        _XOPEN_SOURCE\\ &&\\ _XOPEN_SOURCE_EXTENDED) &&\n"
7785 "    !(_POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ E<gt>=\\ 600)\n"
7786 msgstr ""
7787 "_BSD_SOURCE ||\n"
7788 "    (_XOPEN_SOURCE\\ E<gt>=\\ 500 ||\n"
7789 "        _XOPEN_SOURCE\\ &&\\ _XOPEN_SOURCE_EXTENDED) &&\n"
7790 "    !(_POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ E<gt>=\\ 600)\n"
7791
7792 #. type: TP
7793 #: build/C/man3/posix_memalign.3:71
7794 #, no-wrap
7795 msgid "Before glibc 2.12:"
7796 msgstr "glibc 2.12 より前:"
7797
7798 #. type: Plain text
7799 #: build/C/man3/posix_memalign.3:75
7800 msgid ""
7801 "_BSD_SOURCE || _XOPEN_SOURCE\\ E<gt>=\\ 500 || _XOPEN_SOURCE\\ &&\\ "
7802 "_XOPEN_SOURCE_EXTENDED"
7803 msgstr ""
7804 "_BSD_SOURCE || _XOPEN_SOURCE\\ E<gt>=\\ 500 || _XOPEN_SOURCE\\ &&\\ "
7805 "_XOPEN_SOURCE_EXTENDED"
7806
7807 #. type: Plain text
7808 #: build/C/man3/posix_memalign.3:82
7809 msgid ""
7810 "(The (nonstandard) header file I<E<lt>malloc.hE<gt>> also exposes the "
7811 "declaration of B<valloc>(); no feature test macros are required.)"
7812 msgstr ""
7813 "((非標準の) ヘッダファイル I<E<lt>malloc.hE<gt>> も\n"
7814 "B<valloc>() の宣言も公開する。機能検査マクロは不要である。"
7815
7816 #.  glibc does this:
7817 #. type: Plain text
7818 #: build/C/man3/posix_memalign.3:104
7819 msgid ""
7820 "The function B<posix_memalign>()  allocates I<size> bytes and places the "
7821 "address of the allocated memory in I<*memptr>.  The address of the allocated "
7822 "memory will be a multiple of I<alignment>, which must be a power of two and "
7823 "a multiple of I<sizeof(void\\ *)>.  If I<size> is 0, then the value placed "
7824 "in I<*memptr> is either NULL, or a unique pointer value that can later be "
7825 "successfully passed to B<free>(3)."
7826 msgstr ""
7827 "関数 B<posix_memalign>()  は、 I<size> バイトのメモリを割り当て、割り当てられ"
7828 "たメモリのアドレスを I<*memptr> に設定する。 割り当てられたメモリのアドレス"
7829 "は I<alignment> の倍数になっているはずである。 I<alignment> は 2 のべき乗で、"
7830 "かつ I<sizeof(void\\ *)> の倍数でなければならない。 I<size> が 0 の場合、 "
7831 "I<*memptr> には NULL か一意なポインタ値が書かれる。 このポインタ値は、後で "
7832 "B<free>(3)  に問題なく渡すことができる。"
7833
7834 #.  The behavior of memalign() for size==0 is as for posix_memalign()
7835 #.  but no standards govern this.
7836 #. type: Plain text
7837 #: build/C/man3/posix_memalign.3:115
7838 msgid ""
7839 "The obsolete function B<memalign>()  allocates I<size> bytes and returns a "
7840 "pointer to the allocated memory.  The memory address will be a multiple of "
7841 "I<alignment>, which must be a power of two."
7842 msgstr ""
7843 "廃止された関数である B<memalign>() は、 I<size> バイトのメモリを割り当て、\n"
7844 "割り当てられたメモリへのポインタを返す。 メモリのアドレスは I<alignment> \n"
7845 "の倍数になっているはずである。 I<alignment> は 2 のべき乗でなければならない。"
7846
7847 #. type: Plain text
7848 #: build/C/man3/posix_memalign.3:124
7849 msgid ""
7850 "The function B<aligned_alloc>()  is the same as B<memalign>(), except for "
7851 "the added restriction that I<size> should be a multiple of I<alignment>."
7852 msgstr ""
7853 "関数 B<aligned_alloc>() は B<memalign>() と同じだが、I<size> が "
7854 "I<alignment>\n"
7855 "の倍数でなければならないという追加の制限がある点が異なる。"
7856
7857 #. type: Plain text
7858 #: build/C/man3/posix_memalign.3:133
7859 msgid ""
7860 "The obsolete function B<valloc>()  allocates I<size> bytes and returns a "
7861 "pointer to the allocated memory.  The memory address will be a multiple of "
7862 "the page size.  It is equivalent to I<memalign(sysconf(_SC_PAGESIZE),size)>."
7863 msgstr ""
7864 "廃止された関数である B<valloc>()  は I<size> バイトのメモリを割り当て、割り当"
7865 "てられたメモリへのポインタを返す。 メモリのアドレスはページサイズの倍数になっ"
7866 "ているはずである。 これは I<memalign(sysconf(_SC_PAGESIZE),size)> と等価であ"
7867 "る。"
7868
7869 #. type: Plain text
7870 #: build/C/man3/posix_memalign.3:140
7871 msgid ""
7872 "The obsolete function B<pvalloc>()  is similar to B<valloc>(), but rounds "
7873 "the size of the allocation up to the next multiple of the system page size."
7874 msgstr ""
7875 "廃止された関数 B<pvalloc>() は B<valloc>() と同様だが、\n"
7876 "割り当てられるサイズがシステムのページサイズの倍数に切り上げられる。"
7877
7878 #. type: Plain text
7879 #: build/C/man3/posix_memalign.3:142
7880 msgid "For all of these functions, the memory is not zeroed."
7881 msgstr "これらの関数はいずれもメモリのゼロクリアを行わない。"
7882
7883 #. type: Plain text
7884 #: build/C/man3/posix_memalign.3:149
7885 msgid ""
7886 "B<aligned_alloc>(), B<memalign>(), B<valloc>(), and B<pvalloc>()  return a "
7887 "pointer to the allocated memory, or NULL if the request fails."
7888 msgstr ""
7889 "B<aligned_alloc>(), B<memalign>(), B<valloc>(), B<pvalloc>() は割り当てられ"
7890 "た\n"
7891 "メモリへのポインタを返す。 割り当てに失敗した場合は NULL を返す。"
7892
7893 #. type: Plain text
7894 #: build/C/man3/posix_memalign.3:157
7895 msgid ""
7896 "B<posix_memalign>()  returns zero on success, or one of the error values "
7897 "listed in the next section on failure.  The value of I<errno> is "
7898 "indeterminate after a call to B<posix_memalign>()."
7899 msgstr ""
7900 "B<posix_memalign>()  は成功した場合は 0 を返し、 失敗した場合は次のセクション"
7901 "に記載されたエラー値のいずれかを返す。 B<posix_memalign>() の呼び出し後は "
7902 "I<errno> の値は不定である。"
7903
7904 #. type: Plain text
7905 #: build/C/man3/posix_memalign.3:164
7906 msgid ""
7907 "The I<alignment> argument was not a power of two, or was not a multiple of "
7908 "I<sizeof(void\\ *)>."
7909 msgstr ""
7910 "I<alignment> 引き数が 2 のべき乗でなかったか、 I<sizeof(void\\ *)> の倍数でな"
7911 "かった。"
7912
7913 #. type: Plain text
7914 #: build/C/man3/posix_memalign.3:167
7915 msgid "There was insufficient memory to fulfill the allocation request."
7916 msgstr "割り当て要求を満たすのに十分なメモリがなかった。"
7917
7918 #. type: Plain text
7919 #: build/C/man3/posix_memalign.3:174
7920 msgid ""
7921 "The functions B<memalign>(), B<valloc>(), and B<pvalloc>()  have been "
7922 "available in all Linux libc libraries."
7923 msgstr ""
7924 "関数 B<memalign>(), B<valloc>(), B<pvalloc>() は\n"
7925 "すべての Linux libc ライブラリで使用可能である。"
7926
7927 #. type: Plain text
7928 #: build/C/man3/posix_memalign.3:178
7929 msgid "The function B<aligned_alloc>()  was added to glibc in version 2.16."
7930 msgstr "関数 B<aligned_alloc>() は glibc バージョン 2.16 で追加された。"
7931
7932 #. type: Plain text
7933 #: build/C/man3/posix_memalign.3:182
7934 msgid "The function B<posix_memalign>()  is available since glibc 2.1.91."
7935 msgstr "関数 B<posix_fallocate>() は glibc 2.1.91 以降で利用可能である。"
7936
7937 #. type: Plain text
7938 #: build/C/man3/posix_memalign.3:189
7939 msgid ""
7940 "The function B<valloc>()  appeared in 3.0BSD.  It is documented as being "
7941 "obsolete in 4.3BSD, and as legacy in SUSv2.  It does not appear in "
7942 "POSIX.1-2001."
7943 msgstr ""
7944 "関数 B<valloc>() は 3.0BSD で登場した。4.3BSD では廃止されたと記載されてお"
7945 "り、\n"
7946 "SUSv2 では過去の名残だと記載されている。 POSIX.1-2001 には存在しない。"
7947
7948 #. type: Plain text
7949 #: build/C/man3/posix_memalign.3:193
7950 msgid "The function B<pvalloc>()  is a GNU extension."
7951 msgstr "関数 B<pvalloc>() は GNU による拡張である。"
7952
7953 #. type: Plain text
7954 #: build/C/man3/posix_memalign.3:197
7955 msgid "The function B<memalign>()  appears in SunOS 4.1.3 but not in 4.4BSD."
7956 msgstr "関数 B<memalign>() は SunOS 4.1.3 で登場したが、4.4BSD にはない。"
7957
7958 #. type: Plain text
7959 #: build/C/man3/posix_memalign.3:201
7960 msgid "The function B<posix_memalign>()  comes from POSIX.1d."
7961 msgstr "関数 B<posix_memalign>() は POSIX.1d に由来する。"
7962
7963 #. type: Plain text
7964 #: build/C/man3/posix_memalign.3:206
7965 msgid "The function B<aligned_alloc>()  is specified in the C11 standard."
7966 msgstr "関数 I<aligned_alloc>() は C11 標準で規定されている。"
7967
7968 #. type: SS
7969 #: build/C/man3/posix_memalign.3:206
7970 #, no-wrap
7971 msgid "Headers"
7972 msgstr "ヘッダ"
7973
7974 #. type: Plain text
7975 #: build/C/man3/posix_memalign.3:210
7976 msgid ""
7977 "Everybody agrees that B<posix_memalign>()  is declared in I<E<lt>stdlib."
7978 "hE<gt>>."
7979 msgstr ""
7980 "B<posix_memalign>()  の宣言を I<E<lt>stdlib.hE<gt>> で行うことに関しては、 皆"
7981 "の意見が一致している。"
7982
7983 #. type: Plain text
7984 #: build/C/man3/posix_memalign.3:214
7985 msgid ""
7986 "On some systems B<memalign>()  is declared in I<E<lt>stdlib.hE<gt>> instead "
7987 "of I<E<lt>malloc.hE<gt>>."
7988 msgstr ""
7989 "いくつかのシステムでは、 B<memalign>()  は I<E<lt>malloc.hE<gt>> ではなく "
7990 "I<E<lt>stdlib.hE<gt>> で宣言されている。"
7991
7992 #. type: Plain text
7993 #: build/C/man3/posix_memalign.3:221
7994 msgid ""
7995 "According to SUSv2, B<valloc>()  is declared in I<E<lt>stdlib.hE<gt>>.  "
7996 "Libc4,5 and glibc declare it in I<E<lt>malloc.hE<gt>>, and also in "
7997 "I<E<lt>stdlib.hE<gt>> if suitable feature test macros are defined (see "
7998 "above)."
7999 msgstr ""
8000 "SUSv2 によると、 B<valloc>() は I<E<lt>stdlib.hE<gt>> で宣言される。 "
8001 "libc4,5\n"
8002 "や glibc では I<E<lt>malloc.hE<gt>> で宣言されており、 さらに適切な機能検査\n"
8003 "マクロが定義された場合には I<E<lt>stdlib.hE<gt>> でも宣言される(上記を参照)。"
8004
8005 #. type: Plain text
8006 #: build/C/man3/posix_memalign.3:230
8007 msgid ""
8008 "On many systems there are alignment restrictions, for example, on buffers "
8009 "used for direct block device I/O.  POSIX specifies the I<pathconf(path,"
8010 "_PC_REC_XFER_ALIGN)> call that tells what alignment is needed.  Now one can "
8011 "use B<posix_memalign>()  to satisfy this requirement."
8012 msgstr ""
8013 "多くのシステムでは、アラインメントに関して制限がある。例えば、 ブロックデバイ"
8014 "スに対するダイレクト I/O に使用するバッファには アラインメントに関する制限が"
8015 "ある。 POSIX では、どんなアラインメントが必要かを知るために I<pathconf(path,"
8016 "_PC_REC_XFER_ALIGN)> コールを規定している。ここで B<posix_memalign>()  を使う"
8017 "と、この必要条件を満たすことができる。"
8018
8019 #. type: Plain text
8020 #: build/C/man3/posix_memalign.3:239
8021 msgid ""
8022 "B<posix_memalign>()  verifies that I<alignment> matches the requirements "
8023 "detailed above.  B<memalign>()  may not check that the I<alignment> argument "
8024 "is correct."
8025 msgstr ""
8026 "B<posix_memalign>() は I<alignment> が上で詳細に述べた必要条件を満たすか\n"
8027 "どうかを確かめる。 B<memalign>() は I<alignment> 引き数が正しいかどうかの\n"
8028 "確認を行わないかもしれない。"
8029
8030 #.  Other systems allow passing the result of
8031 #.  .IR valloc ()
8032 #.  to
8033 #.  .IR free (3),
8034 #.  but not to
8035 #.  .IR realloc (3).
8036 #. type: Plain text
8037 #: build/C/man3/posix_memalign.3:267
8038 msgid ""
8039 "POSIX requires that memory obtained from B<posix_memalign>()  can be freed "
8040 "using B<free>(3).  Some systems provide no way to reclaim memory allocated "
8041 "with B<memalign>()  or B<valloc>()  (because one can pass to B<free>(3)  "
8042 "only a pointer obtained from B<malloc>(3), while, for example, B<memalign>"
8043 "()  would call B<malloc>(3)  and then align the obtained value).  The glibc "
8044 "implementation allows memory obtained from any of these functions to be "
8045 "reclaimed with B<free>(3)."
8046 msgstr ""
8047 "POSIX では B<posix_memalign>() によって獲得したメモリは B<free>(3) を\n"
8048 "使って解放することができる必要がある。 いくつかのシステムでは\n"
8049 "B<memalign>() やB<valloc>() で割り当てられたメモリを再利用する手段が\n"
8050 "提供されていない(なぜなら B<free>(3) に渡すことができるのは\n"
8051 "B<malloc>(3) から受け取ったポインタだけだが、例えば B<memalign>() は\n"
8052 "B<malloc>(3) を呼び出し、得た値をアラインメントしてしまうからである)。\n"
8053 "glibc の実装では、 ここに述べた関数のいずれで獲得したメモリも\n"
8054 "B<free>(3) で再利用することができる。"
8055
8056 #. type: Plain text
8057 #: build/C/man3/posix_memalign.3:272
8058 msgid ""
8059 "The glibc B<malloc>(3)  always returns 8-byte aligned memory addresses, so "
8060 "these functions are needed only if you require larger alignment values."
8061 msgstr ""
8062 "glibc の B<malloc>(3) は常に 8 バイトにアラインメントされたメモリアドレスを\n"
8063 "返すので、ここで述べた関数が必要になるのは 8 バイトよりも大きなアラインメン"
8064 "ト\n"
8065 "が必要な場合だけである。"
8066
8067 #. type: Plain text
8068 #: build/C/man3/posix_memalign.3:277
8069 msgid "B<brk>(2), B<getpagesize>(2), B<free>(3), B<malloc>(3)"
8070 msgstr "B<brk>(2), B<getpagesize>(2), B<free>(3), B<malloc>(3)"
8071
8072 #. type: TH
8073 #: build/C/man2/readahead.2:28
8074 #, no-wrap
8075 msgid "READAHEAD"
8076 msgstr "READAHEAD"
8077
8078 #. type: TH
8079 #: build/C/man2/readahead.2:28
8080 #, fuzzy, no-wrap
8081 #| msgid "2013-03-18"
8082 msgid "2014-03-15"
8083 msgstr "2013-03-18"
8084
8085 #. type: Plain text
8086 #: build/C/man2/readahead.2:31
8087 #, fuzzy
8088 #| msgid "readahead - perform file readahead into page cache"
8089 msgid "readahead - initiate file readahead into page cache"
8090 msgstr "readahead - 前もってファイルをページ・キャッシュに読み込む"
8091
8092 #. type: Plain text
8093 #: build/C/man2/readahead.2:37
8094 #, no-wrap
8095 msgid "B<ssize_t readahead(int >I<fd>B<, off64_t >I<offset>B<, size_t >I<count>B<);>\n"
8096 msgstr "B<ssize_t readahead(int >I<fd>B<, off64_t >I<offset>B<, size_t >I<count>B<);>\n"
8097
8098 #. type: Plain text
8099 #: build/C/man2/readahead.2:44
8100 msgid ""
8101 "B<readahead>()  initiates readahead on a file so that subsequent reads from "
8102 "that file will be satisfied from the cache, and not block on disk I/O "
8103 "(assuming the readahead was initiated early enough and that other activity "
8104 "on the system did not in the meantime flush pages from the cache)."
8105 msgstr ""
8106
8107 #. type: Plain text
8108 #: build/C/man2/readahead.2:66
8109 #, fuzzy
8110 #| msgid ""
8111 #| "B<readahead>()  populates the page cache with data from a file so that "
8112 #| "subsequent reads from that file will not block on disk I/O.  The I<fd> "
8113 #| "argument is a file descriptor identifying the file which is to be read.  "
8114 #| "The I<offset> argument specifies the starting point from which data is to "
8115 #| "be read and I<count> specifies the number of bytes to be read.  I/O is "
8116 #| "performed in whole pages, so that I<offset> is effectively rounded down "
8117 #| "to a page boundary and bytes are read up to the next page boundary "
8118 #| "greater than or equal to I<(offset+count)>.  B<readahead>()  does not "
8119 #| "read beyond the end of the file.  B<readahead>()  blocks until the "
8120 #| "specified data has been read.  The current file offset of the open file "
8121 #| "referred to by I<fd> is left unchanged."
8122 msgid ""
8123 "The I<fd> argument is a file descriptor identifying the file which is to be "
8124 "read.  The I<offset> argument specifies the starting point from which data "
8125 "is to be read and I<count> specifies the number of bytes to be read.  I/O is "
8126 "performed in whole pages, so that I<offset> is effectively rounded down to a "
8127 "page boundary and bytes are read up to the next page boundary greater than "
8128 "or equal to I<(offset+count)>.  B<readahead>()  does not read beyond the end "
8129 "of the file.  The current file offset of the open file referred to by I<fd> "
8130 "is left unchanged."
8131 msgstr ""
8132 "B<readahead>()  は、この後の同じファイルからのデータ読み込み時にディスク I/O "
8133 "で 動作が停止 (block) しないように、前もってファイルの内容を ページ・キャッ"
8134 "シュに読み込む。 I<fd> 引き数は読み込みを行うファイルを識別するファイル・ディ"
8135 "スクリプタである。 I<offset> 引き数はデータの読み込み開始位置を指定し、 "
8136 "I<count> は読み込むデータのバイト数を指定する。 ディスク I/O はページ単位で実"
8137 "行されるので、 実際には I<offset> はページ境界に切り下げられ、読み込みバイト"
8138 "数は I<(offset+count)> より小さくない次のページ境界まで切り上げられる。 "
8139 "B<readahead>()  はファイルの末尾を越えた範囲まで読み出しを行うことはない。ま"
8140 "た、 B<readahead>()  は指定したデータの読み込みが終わるまで停止 (block) す"
8141 "る。 I<fd> で参照されたオープン済のファイルのファイルオフセットの現在値は 変"
8142 "更されない。"
8143
8144 #. type: Plain text
8145 #: build/C/man2/readahead.2:72
8146 msgid ""
8147 "On success, B<readahead>()  returns 0; on failure, -1 is returned, with "
8148 "I<errno> set to indicate the cause of the error."
8149 msgstr ""
8150 "B<readahead>()  は成功すると 0 を返す。失敗した場合 -1 を返し、 I<errno> にエ"
8151 "ラーの原因を示す値を設定する。"
8152
8153 #. type: Plain text
8154 #: build/C/man2/readahead.2:77
8155 msgid "I<fd> is not a valid file descriptor or is not open for reading."
8156 msgstr ""
8157 "I<fd> が有効なファイル・ディスクリプタでない、または 読み込み用にオープンされ"
8158 "ていない。"
8159
8160 #. type: Plain text
8161 #: build/C/man2/readahead.2:83
8162 msgid ""
8163 "I<fd> does not refer to a file type to which B<readahead>()  can be applied."
8164 msgstr ""
8165 "I<fd> が参照しているファイルが、 B<readahead>()  を行うことができないタイプの"
8166 "ファイルであった。"
8167
8168 #. type: Plain text
8169 #: build/C/man2/readahead.2:88
8170 msgid ""
8171 "The B<readahead>()  system call appeared in Linux 2.4.13; glibc support has "
8172 "been provided since version 2.3."
8173 msgstr ""
8174 "B<readahead>()  システムコールは Linux 2.4.13 で登場した。 glibc でのサポート"
8175 "は glibc バージョン 2.3 以降で行われている。"
8176
8177 #. type: Plain text
8178 #: build/C/man2/readahead.2:93
8179 msgid ""
8180 "The B<readahead>()  system call is Linux-specific, and its use should be "
8181 "avoided in portable applications."
8182 msgstr ""
8183 "B<readahead>()  システムコールは Linux 固有であり、移植を考慮したプログラムで"
8184 "は 使用を避けるべきである。"
8185
8186 #. type: Plain text
8187 #: build/C/man2/readahead.2:98
8188 msgid ""
8189 "On some 32-bit architectures, the calling signature for this system call "
8190 "differs, for the reasons described in B<syscall>(2)."
8191 msgstr ""
8192 "いくつかの 32 ビットアーキテクチャでは、このシステムコールの呼び出しシグネ"
8193 "チャーが違っている。 理由は B<syscall>(2) で説明されている。"
8194
8195 #. type: Plain text
8196 #: build/C/man2/readahead.2:107
8197 msgid ""
8198 "B<readahead>()  attempts to schedule the reads in the background and return "
8199 "immediately.  However, it may block while it reads the filesystem metadata "
8200 "needed to locate the requested blocks.  This occurs frequently with ext[234] "
8201 "on large files using indirect blocks instead of extents, giving the "
8202 "appearance that the call blocks until the requested data has been read."
8203 msgstr ""
8204
8205 #. type: Plain text
8206 #: build/C/man2/readahead.2:113
8207 msgid "B<lseek>(2), B<madvise>(2), B<mmap>(2), B<posix_fadvise>(2), B<read>(2)"
8208 msgstr ""
8209 "B<lseek>(2), B<madvise>(2), B<mmap>(2), B<posix_fadvise>(2), B<read>(2)"
8210
8211 #. type: TH
8212 #: build/C/man2/remap_file_pages.2:28
8213 #, no-wrap
8214 msgid "REMAP_FILE_PAGES"
8215 msgstr "REMAP_FILE_PAGES"
8216
8217 #. type: Plain text
8218 #: build/C/man2/remap_file_pages.2:31
8219 msgid "remap_file_pages - create a nonlinear file mapping"
8220 msgstr "remap_file_pages - 非線形ファイルマッピングを作成する。"
8221
8222 #. type: Plain text
8223 #: build/C/man2/remap_file_pages.2:35
8224 #, no-wrap
8225 msgid ""
8226 "B<#define _GNU_SOURCE>         /* See feature_test_macros(7) */\n"
8227 "B<#include E<lt>sys/mman.hE<gt>>\n"
8228 msgstr ""
8229 "B<#define _GNU_SOURCE>         /* feature_test_macros(7) 参照 */\n"
8230 "B<#include E<lt>sys/mman.hE<gt>>\n"
8231
8232 #. type: Plain text
8233 #: build/C/man2/remap_file_pages.2:38
8234 #, no-wrap
8235 msgid ""
8236 "B<int remap_file_pages(void *>I<addr>B<, size_t >I<size>B<, int >I<prot>B<,>\n"
8237 "B<                     ssize_t >I<pgoff>B<, int >I<flags>B<);>\n"
8238 msgstr ""
8239 "B<int remap_file_pages(void *>I<addr>B<, size_t >I<size>B<, int >I<prot>B<,>\n"
8240 "B<                     ssize_t >I<pgoff>B<, int >I<flags>B<);>\n"
8241
8242 #. type: Plain text
8243 #: build/C/man2/remap_file_pages.2:51
8244 msgid ""
8245 "The B<remap_file_pages>()  system call is used to create a nonlinear "
8246 "mapping, that is, a mapping in which the pages of the file are mapped into a "
8247 "nonsequential order in memory.  The advantage of using B<remap_file_pages>"
8248 "()  over using repeated calls to B<mmap>(2)  is that the former approach "
8249 "does not require the kernel to create additional VMA (Virtual Memory Area) "
8250 "data structures."
8251 msgstr ""
8252 "B<remap_file_pages>()  システムコールは非線形なマッピング、 つまりファイルの"
8253 "ページがメモリ上で連続しない順番でマップされる マッピングを作成するために使わ"
8254 "れる。 B<remap_file_pages>()  を使う方が B<mmap>(2)  を繰り返して使うより優れ"
8255 "ている点は、 前者の方法ではカーネルが VMA (Virtual Memory Area, 仮想メモリ領"
8256 "域)  データ構造体を追加で作成する必要がないことである。"
8257
8258 #. type: Plain text
8259 #: build/C/man2/remap_file_pages.2:53
8260 msgid "To create a nonlinear mapping we perform the following steps:"
8261 msgstr "非線形マッピングを作成するためには、 以下のようなステップを実行する:"
8262
8263 #. type: TP
8264 #: build/C/man2/remap_file_pages.2:53
8265 #, no-wrap
8266 msgid "1."
8267 msgstr "1."
8268
8269 #. type: Plain text
8270 #: build/C/man2/remap_file_pages.2:61
8271 msgid ""
8272 "Use B<mmap>(2)  to create a mapping (which is initially linear).  This "
8273 "mapping must be created with the B<MAP_SHARED> flag."
8274 msgstr ""
8275 "B<mmap>(2)  を使い、マッピングを作成する (このマッピングは最初は線形であ"
8276 "る)。 このマッピングは B<MAP_SHARED> フラグを指定して作成されなければならな"
8277 "い。"
8278
8279 #. type: TP
8280 #: build/C/man2/remap_file_pages.2:61
8281 #, no-wrap
8282 msgid "2."
8283 msgstr "2."
8284
8285 #. type: Plain text
8286 #: build/C/man2/remap_file_pages.2:69
8287 msgid ""
8288 "Use one or more calls to B<remap_file_pages>()  to rearrange the "
8289 "correspondence between the pages of the mapping and the pages of the file.  "
8290 "It is possible to map the same page of a file into multiple locations within "
8291 "the mapped region."
8292 msgstr ""
8293 "B<remap_file_pages>()  を 1 回以上呼び出して、 マッピングのページとファイルの"
8294 "ページの対応関係を再構成する。 ファイルの同じページをマッピング領域の複数の場"
8295 "所に マップすることが可能である。"
8296
8297 #. type: Plain text
8298 #: build/C/man2/remap_file_pages.2:80
8299 msgid ""
8300 "The I<pgoff> and I<size> arguments specify the region of the file that is to "
8301 "be relocated within the mapping: I<pgoff> is a file offset in units of the "
8302 "system page size; I<size> is the length of the region in bytes."
8303 msgstr ""
8304 "I<pgoff> と I<size> 引き数は、マッピング内で再配置されるファイルの領域を指定"
8305 "する。 I<pgoff> はファイルオフセットであり、単位はシステムのページサイズであ"
8306 "る。 I<size> は領域の長さであり、単位はバイトである。"
8307
8308 #. type: Plain text
8309 #: build/C/man2/remap_file_pages.2:98
8310 msgid ""
8311 "The I<addr> argument serves two purposes.  First, it identifies the mapping "
8312 "whose pages we want to rearrange.  Thus, I<addr> must be an address that "
8313 "falls within a region previously mapped by a call to B<mmap>(2).  Second, "
8314 "I<addr> specifies the address at which the file pages identified by I<pgoff> "
8315 "and I<size> will be placed."
8316 msgstr ""
8317 "I<addr> 引き数は 2 つの目的で使われる。 第 1 の目的は、この引き数によって再編"
8318 "成したいページの マッピングを識別することである。 よって I<addr> は B<mmap>"
8319 "(2)  の呼び出しで過去にマップされた領域内のアドレスでなければならない。 第 2 "
8320 "の目的は、 I<pgoff> と I<size> で識別されるファイルページが置かれる予定のアド"
8321 "レスを、 I<addr> によって指定することである。"
8322
8323 #.  This rounding is weird, and not consistent with the treatment of
8324 #.  the analogous arguments for munmap()/mprotect() and for mlock().
8325 #.  MTK, 14 Sep 2005
8326 #. type: Plain text
8327 #: build/C/man2/remap_file_pages.2:112
8328 msgid ""
8329 "The values specified in I<addr> and I<size> should be multiples of the "
8330 "system page size.  If they are not, then the kernel rounds I<both> values "
8331 "I<down> to the nearest multiple of the page size."
8332 msgstr ""
8333 "I<addr> と I<size> に指定する値は、システムのページサイズの倍数とすべきであ"
8334 "る。 それ以外の場合、カーネルは「両方」の値を 最も近いページサイズの倍数へ"
8335 "「切り下げる」。"
8336
8337 #. type: Plain text
8338 #: build/C/man2/remap_file_pages.2:116
8339 msgid "The I<prot> argument must be specified as 0."
8340 msgstr "I<prot> 引き数は 0 に指定されなければならない。"
8341
8342 #. type: Plain text
8343 #: build/C/man2/remap_file_pages.2:124
8344 msgid ""
8345 "The I<flags> argument has the same meaning as for B<mmap>(2), but all flags "
8346 "other than B<MAP_NONBLOCK> are ignored."
8347 msgstr ""
8348 "I<flags> 引き数は B<mmap>(2)  のものと同じ意味であるが、 B<MAP_NONBLOCK> 以外"
8349 "の全てのフラグは無視される。"
8350
8351 #. type: Plain text
8352 #: build/C/man2/remap_file_pages.2:131
8353 msgid ""
8354 "On success, B<remap_file_pages>()  returns 0.  On error, -1 is returned, and "
8355 "I<errno> is set appropriately."
8356 msgstr ""
8357 "成功した場合、 B<remap_file_pages>()  は 0 を返す。 エラーの場合、-1 が返さ"
8358 "れ、 I<errno> が適切に設定される。"
8359
8360 #. type: Plain text
8361 #: build/C/man2/remap_file_pages.2:139
8362 msgid ""
8363 "I<addr> does not refer to a valid mapping created with the B<MAP_SHARED> "
8364 "flag."
8365 msgstr ""
8366 "I<addr> が B<MAP_SHARED> フラグを指定して作成された有効なマッピングを参照して"
8367 "いない。"
8368
8369 #.  And possibly others from vma->vm_ops->populate()
8370 #. type: Plain text
8371 #: build/C/man2/remap_file_pages.2:148
8372 msgid "I<addr>, I<size>, I<prot>, or I<pgoff> is invalid."
8373 msgstr "I<addr>, I<size>, I<prot>, I<pgoff> のいずれかが不正である。"
8374
8375 #. type: Plain text
8376 #: build/C/man2/remap_file_pages.2:153
8377 msgid ""
8378 "The B<remap_file_pages>()  system call appeared in Linux 2.5.46; glibc "
8379 "support was added in version 2.3.3."
8380 msgstr ""
8381 "B<remap_file_pages>()  システムコールは Linux 2.5.46 で登場した。 glibc での"
8382 "サポートは glibc バージョン 2.3.3 で追加された。"
8383
8384 #. type: Plain text
8385 #: build/C/man2/remap_file_pages.2:157
8386 msgid "The B<remap_file_pages>()  system call is Linux-specific."
8387 msgstr "B<remap_file_pages>()  システムコールは Linux 固有のものである。"
8388
8389 #. type: Plain text
8390 #: build/C/man2/remap_file_pages.2:164
8391 msgid ""
8392 "B<getpagesize>(2), B<mmap>(2), B<mmap2>(2), B<mprotect>(2), B<mremap>(2), "
8393 "B<msync>(2)"
8394 msgstr ""
8395 "B<getpagesize>(2), B<mmap>(2), B<mmap2>(2), B<mprotect>(2), B<mremap>(2), "
8396 "B<msync>(2)"
8397
8398 #. type: TH
8399 #: build/C/man3/shm_open.3:26
8400 #, no-wrap
8401 msgid "SHM_OPEN"
8402 msgstr "SHM_OPEN"
8403
8404 #. type: TH
8405 #: build/C/man3/shm_open.3:26
8406 #, no-wrap
8407 msgid "2009-02-25"
8408 msgstr "2009-02-25"
8409
8410 #. type: Plain text
8411 #: build/C/man3/shm_open.3:29
8412 msgid ""
8413 "shm_open, shm_unlink - create/open or unlink POSIX shared memory objects"
8414 msgstr ""
8415 "shm_open, shm_unlink - POSIX 共有メモリ・オブジェクトの作成/オープン/削除を行"
8416 "う"
8417
8418 #. type: Plain text
8419 #: build/C/man3/shm_open.3:33
8420 msgid "B<#include E<lt>sys/stat.hE<gt>> /* For mode constants */"
8421 msgstr "B<#include E<lt>sys/stat.hE<gt>> /* mode 定数用 */"
8422
8423 #. type: Plain text
8424 #: build/C/man3/shm_open.3:35
8425 msgid "B<#include E<lt>fcntl.hE<gt>> /* For O_* constants */"
8426 msgstr "B<#include E<lt>fcntl.hE<gt>> /* O_* 定数の定義用 */"
8427
8428 #. type: Plain text
8429 #: build/C/man3/shm_open.3:37
8430 msgid ""
8431 "B<int shm_open(const char *>I<name>B<, int >I<oflag>B<, mode_t >I<mode>B<);>"
8432 msgstr ""
8433 "B<int shm_open(const char *>I<name>B<, int >I<oflag>B<, mode_t >I<mode>B<);>"
8434
8435 #. type: Plain text
8436 #: build/C/man3/shm_open.3:39
8437 msgid "B<int shm_unlink(const char *>I<name>B<);>"
8438 msgstr "B<int shm_unlink(const char *>I<name>B<);>"
8439
8440 #. type: Plain text
8441 #: build/C/man3/shm_open.3:41
8442 msgid "Link with I<-lrt>."
8443 msgstr "I<-lrt> でリンクする。"
8444
8445 #. type: Plain text
8446 #: build/C/man3/shm_open.3:53
8447 msgid ""
8448 "B<shm_open>()  creates and opens a new, or opens an existing, POSIX shared "
8449 "memory object.  A POSIX shared memory object is in effect a handle which can "
8450 "be used by unrelated processes to B<mmap>(2)  the same region of shared "
8451 "memory.  The B<shm_unlink>()  function performs the converse operation, "
8452 "removing an object previously created by B<shm_open>()."
8453 msgstr ""
8454 "B<shm_open>()  は、POSIX 共有メモリ・オブジェクトを新規に作成/オープンした"
8455 "り、 すでに存在するオブジェクトをオープンしたりする。 POSIX 共有メモリ・オブ"
8456 "ジェクトは、実際には、関係のないプロセスが 共有メモリの同じ領域を B<mmap>"
8457 "(2)  するために使用することができる手段である。 B<shm_unlink>()  は、逆の操"
8458 "作、つまり以前に B<shm_open>()  で作成されたオブジェクトの削除を行う。"
8459
8460 #.  glibc allows the initial slash to be omitted, and makes
8461 #.  multiple initial slashes equivalent to a single slash.
8462 #.  This differs from the implementation of POSIX message queues.
8463 #.  glibc allows subdirectory components in the name, in which
8464 #.  case the subdirectory must exist under /dev/shm, and allow the
8465 #.  required permissions if a user wants to create a shared memory
8466 #.  object in that subdirectory.
8467 #. type: Plain text
8468 #: build/C/man3/shm_open.3:74
8469 msgid ""
8470 "The operation of B<shm_open>()  is analogous to that of B<open>(2).  I<name> "
8471 "specifies the shared memory object to be created or opened.  For portable "
8472 "use, a shared memory object should be identified by a name of the form I</"
8473 "somename>; that is, a null-terminated string of up to B<NAME_MAX> (i.e., "
8474 "255) characters consisting of an initial slash, followed by one or more "
8475 "characters, none of which are slashes."
8476 msgstr ""
8477 "B<shm_open>()  の動作は B<open>(2)  とよく似ている。 I<name> で作成したりオー"
8478 "プンしたりする共有メモリ・オブジェクトを指定する。 移植性を持たせるためには、"
8479 "共有メモリ・オブジェクトは I</somename> という形式の名前で識別し、 その名前"
8480 "は、最大で B<NAME_MAX> (すなわち 255) 文字の NULL 終端された文字列で、 スラッ"
8481 "シュで始まり、スラッシュ以外の文字が 1 文字以上続く形式 にすべきである。"
8482
8483 #. type: Plain text
8484 #: build/C/man3/shm_open.3:81
8485 msgid ""
8486 "I<oflag> is a bit mask created by ORing together exactly one of B<O_RDONLY> "
8487 "or B<O_RDWR> and any of the other flags listed here:"
8488 msgstr ""
8489 "I<oflag> はビットマスクで、 B<O_RDONLY> と B<O_RDWR> のいずれか一方と、以下に"
8490 "述べる他のフラグの論理和をとったもの を指定する。"
8491
8492 #. type: TP
8493 #: build/C/man3/shm_open.3:81
8494 #, no-wrap
8495 msgid "B<O_RDONLY>"
8496 msgstr "B<O_RDONLY>"
8497
8498 #. type: Plain text
8499 #: build/C/man3/shm_open.3:89
8500 msgid ""
8501 "Open the object for read access.  A shared memory object opened in this way "
8502 "can be B<mmap>(2)ed only for read (B<PROT_READ>)  access."
8503 msgstr ""
8504 "読み出しアクセス用にオブジェクトをオープンする。 このフラグを指定してオープン"
8505 "された共有メモリ・オブジェクトは、 読み出し (B<PROT_READ>) アクセスでのみ "
8506 "B<mmap>(2)  することができる。"
8507
8508 #. type: TP
8509 #: build/C/man3/shm_open.3:89
8510 #, no-wrap
8511 msgid "B<O_RDWR>"
8512 msgstr "B<O_RDWR>"
8513
8514 #. type: Plain text
8515 #: build/C/man3/shm_open.3:92
8516 msgid "Open the object for read-write access."
8517 msgstr "読み書きアクセス用にオブジェクトをオープンする。"
8518
8519 #. type: TP
8520 #: build/C/man3/shm_open.3:92
8521 #, no-wrap
8522 msgid "B<O_CREAT>"
8523 msgstr "B<O_CREAT>"
8524
8525 #.  In truth it is actually the filesystem IDs on Linux, but these
8526 #.  are nearly always the same as the effective IDs.  (MTK, Jul 05)
8527 #. type: Plain text
8528 #: build/C/man3/shm_open.3:112
8529 msgid ""
8530 "Create the shared memory object if it does not exist.  The user and group "
8531 "ownership of the object are taken from the corresponding effective IDs of "
8532 "the calling process, and the object's permission bits are set according to "
8533 "the low-order 9 bits of I<mode>, except that those bits set in the process "
8534 "file mode creation mask (see B<umask>(2))  are cleared for the new object.  "
8535 "A set of macro constants which can be used to define I<mode> is listed in "
8536 "B<open>(2).  (Symbolic definitions of these constants can be obtained by "
8537 "including I<E<lt>sys/stat.hE<gt>>.)"
8538 msgstr ""
8539 "存在しない場合、共有メモリ・オブジェクトを作成する。 オブジェクトのユーザとグ"
8540 "ループの所有権は、 呼び出し元プロセスの対応する実効 ID が使われ、 オブジェク"
8541 "トの許可ビットは I<mode> の下位 9 ビットに基づいて設定される。ただし、 ファイ"
8542 "ルモード作成マスク (B<umask>(2)  参照) に設定されている値は、新規オブジェクト"
8543 "に関してはクリアされる。 I<mode> を定義するために使用できるマクロ定数(群)は "
8544 "B<open>(2)  に記載されている (これらの定数のシンボル定義は I<E<lt>sys/stat."
8545 "hE<gt>> のインクルードにより得られる)。"
8546
8547 #. type: Plain text
8548 #: build/C/man3/shm_open.3:118
8549 msgid ""
8550 "A new shared memory object initially has zero length\\(emthe size of the "
8551 "object can be set using B<ftruncate>(2).  The newly allocated bytes of a "
8552 "shared memory object are automatically initialized to 0."
8553 msgstr ""
8554 "新規に作成された共有メモリ・オブジェクトは長さ 0 で初期化される。 オブジェク"
8555 "トの大きさは B<ftruncate>(2)  を使って設定できる。 共有メモリ・オブジェクトと"
8556 "して新規に確保されたバイトは自動的に 0 に初期化される。"
8557
8558 #. type: TP
8559 #: build/C/man3/shm_open.3:118
8560 #, no-wrap
8561 msgid "B<O_EXCL>"
8562 msgstr "B<O_EXCL>"
8563
8564 #. type: Plain text
8565 #: build/C/man3/shm_open.3:127
8566 msgid ""
8567 "If B<O_CREAT> was also specified, and a shared memory object with the given "
8568 "I<name> already exists, return an error.  The check for the existence of the "
8569 "object, and its creation if it does not exist, are performed atomically."
8570 msgstr ""
8571 "B<O_CREAT> が一緒に指定されており、 I<name> で指定された共有メモリ・オブジェ"
8572 "クトが既に存在した場合、 エラーを返す。 オブジェクトの存在確認と、存在しな"
8573 "かった場合のオブジェクト作成は、 必ず一連の操作として実行される (performed "
8574 "atomically)。"
8575
8576 #. type: TP
8577 #: build/C/man3/shm_open.3:127
8578 #, no-wrap
8579 msgid "B<O_TRUNC>"
8580 msgstr "B<O_TRUNC>"
8581
8582 #. type: Plain text
8583 #: build/C/man3/shm_open.3:130
8584 msgid "If the shared memory object already exists, truncate it to zero bytes."
8585 msgstr ""
8586 "共有メモリ・オブジェクトがすでに存在した場合、 そのオブジェクトを 0 バイトに"
8587 "切り詰める。"
8588
8589 #. type: Plain text
8590 #: build/C/man3/shm_open.3:133
8591 msgid ""
8592 "Definitions of these flag values can be obtained by including I<E<lt>fcntl."
8593 "hE<gt>>."
8594 msgstr ""
8595 "これらのフラグ値の定義は I<E<lt>fcntl.hE<gt>> のインクルードにより得られる。"
8596
8597 #. type: Plain text
8598 #: build/C/man3/shm_open.3:144
8599 msgid ""
8600 "On successful completion B<shm_open>()  returns a new file descriptor "
8601 "referring to the shared memory object.  This file descriptor is guaranteed "
8602 "to be the lowest-numbered file descriptor not previously opened within the "
8603 "process.  The B<FD_CLOEXEC> flag (see B<fcntl>(2))  is set for the file "
8604 "descriptor."
8605 msgstr ""
8606 "成功して完了した場合、 B<shm_open>()  は共有メモリ・オブジェクトを参照する新"
8607 "しいファイル・ディスクリプタを返す。 このファイル・ディスクリプタは、そのプロ"
8608 "セス内で過去にオープンされていない ファイル・ディスクリプタの中で最も小さな数"
8609 "になることが保証される。 B<FD_CLOEXEC> フラグ (B<fcntl>(2)  を参照) が、この"
8610 "ファイル・ディスクリプタに設定される。"
8611
8612 #. type: Plain text
8613 #: build/C/man3/shm_open.3:153
8614 msgid ""
8615 "The file descriptor is normally used in subsequent calls to B<ftruncate>(2)  "
8616 "(for a newly created object) and B<mmap>(2).  After a call to B<mmap>(2)  "
8617 "the file descriptor may be closed without affecting the memory mapping."
8618 msgstr ""
8619 "通常、これらのファイル・ディスクリプタは、この後続けて実行される B<ftruncate>"
8620 "(2)  (新規に作成されたオブジェクトの場合のみ) と B<mmap>(2)  の呼び出しに使用"
8621 "される。 B<mmap>(2)  を呼び出した後は、ファイル・ディスクリプタをクローズして"
8622 "もよく、 クローズしてもメモリ・マッピングに影響を与えることはない。"
8623
8624 #. type: Plain text
8625 #: build/C/man3/shm_open.3:171
8626 msgid ""
8627 "The operation of B<shm_unlink>()  is analogous to B<unlink>(2): it removes a "
8628 "shared memory object name, and, once all processes have unmapped the object, "
8629 "de-allocates and destroys the contents of the associated memory region.  "
8630 "After a successful B<shm_unlink>(), attempts to B<shm_open>()  an object "
8631 "with the same I<name> will fail (unless B<O_CREAT> was specified, in which "
8632 "case a new, distinct object is created)."
8633 msgstr ""
8634 "B<shm_unlink>()  の動作は B<unlink>(2)  とよく似ている: 共有メモリ・オブジェ"
8635 "クト名を削除し、すべてのプロセスが処理対象の オブジェクトをアンマップした時点"
8636 "でオブジェクトの割り当てを解除し、 対応するメモリ領域の内容を破棄する。 "
8637 "B<shm_unlink>()  が成功した後で、同じ I<name> を持つオブジェクトに対して "
8638 "B<shm_open>()  を行うと、 (B<O_CREAT> が指定されていない場合) 失敗する。 "
8639 "(B<O_CREAT> が指定されている場合、新しく別のオブジェクトが作成される)。"
8640
8641 #. type: Plain text
8642 #: build/C/man3/shm_open.3:180
8643 msgid ""
8644 "On success, B<shm_open>()  returns a nonnegative file descriptor.  On "
8645 "failure, B<shm_open>()  returns -1.  B<shm_unlink>()  returns 0 on success, "
8646 "or -1 on error."
8647 msgstr ""
8648 "成功した場合、 B<shm_open>()  は非負のファイル・ディスクリプタを返す。 失敗し"
8649 "た場合、 B<shm_open>()  は -1 を返す。 B<shm_unlink>()  は、成功した場合 0 "
8650 "を、エラーが起こった場合 -1 を返す。"
8651
8652 #. type: Plain text
8653 #: build/C/man3/shm_open.3:187
8654 msgid ""
8655 "On failure, I<errno> is set to indicate the cause of the error.  Values "
8656 "which may appear in I<errno> include the following:"
8657 msgstr ""
8658 "失敗した場合、エラーの原因を示すため I<errno> が設定される。 I<errno> に設定"
8659 "される値は以下の通りである:"
8660
8661 #. type: Plain text
8662 #: build/C/man3/shm_open.3:192
8663 msgid "Permission to B<shm_unlink>()  the shared memory object was denied."
8664 msgstr "共有メモリオブジェクトを B<shm_unlink>()  する権限がなかった。"
8665
8666 #. type: Plain text
8667 #: build/C/man3/shm_open.3:202
8668 msgid ""
8669 "Permission was denied to B<shm_open>()  I<name> in the specified I<mode>, or "
8670 "B<O_TRUNC> was specified and the caller does not have write permission on "
8671 "the object."
8672 msgstr ""
8673 "指定された I<mode> で I<name> を B<shm_open>()  する権限がなかった。もしく"
8674 "は、 B<O_TRUNC> が指定されたが、呼び出し元にはそのオブジェクトに対する書き込"
8675 "み権限が なかった。"
8676
8677 #. type: TP
8678 #: build/C/man3/shm_open.3:202 build/C/man2/shmget.2:195
8679 #, no-wrap
8680 msgid "B<EEXIST>"
8681 msgstr "B<EEXIST>"
8682
8683 #. type: Plain text
8684 #: build/C/man3/shm_open.3:213
8685 msgid ""
8686 "Both B<O_CREAT> and B<O_EXCL> were specified to B<shm_open>()  and the "
8687 "shared memory object specified by I<name> already exists."
8688 msgstr ""
8689 "B<O_CREAT> と B<O_EXCL> の両方が B<shm_open>()  に指定されたが、 I<name> で指"
8690 "定された共有メモリ・オブジェクトが既に存在した。"
8691
8692 #. type: Plain text
8693 #: build/C/man3/shm_open.3:220
8694 msgid "The I<name> argument to B<shm_open>()  was invalid."
8695 msgstr "B<shm_open>()  に与えられた I<name> 引き数が不正であった。"
8696
8697 #. type: TP
8698 #: build/C/man3/shm_open.3:220
8699 #, no-wrap
8700 msgid "B<EMFILE>"
8701 msgstr "B<EMFILE>"
8702
8703 #. type: Plain text
8704 #: build/C/man3/shm_open.3:223
8705 msgid "The process already has the maximum number of files open."
8706 msgstr "プロセスがオープン可能なファイル数の上限にすでに達していた。"
8707
8708 #. type: TP
8709 #: build/C/man3/shm_open.3:223
8710 #, no-wrap
8711 msgid "B<ENAMETOOLONG>"
8712 msgstr "B<ENAMETOOLONG>"
8713
8714 #. type: Plain text
8715 #: build/C/man3/shm_open.3:229
8716 msgid "The length of I<name> exceeds B<PATH_MAX>."
8717 msgstr "I<name> の長さが B<PATH_MAX> を越えている。"
8718
8719 #. type: Plain text
8720 #: build/C/man3/shm_open.3:233
8721 msgid ""
8722 "The limit on the total number of files open on the system has been reached."
8723 msgstr "ファイルシステムでオープンできるファイル数の上限に達した。"
8724
8725 #. type: TP
8726 #: build/C/man3/shm_open.3:233 build/C/man3/shm_open.3:242
8727 #: build/C/man2/shmget.2:209
8728 #, no-wrap
8729 msgid "B<ENOENT>"
8730 msgstr "B<ENOENT>"
8731
8732 #. type: Plain text
8733 #: build/C/man3/shm_open.3:242
8734 msgid ""
8735 "An attempt was made to B<shm_open>()  a I<name> that did not exist, and "
8736 "B<O_CREAT> was not specified."
8737 msgstr ""
8738 "存在していない I<name> のオブジェクトを B<shm_open>()  しようとしたが、 "
8739 "B<O_CREAT> が指定されていなかった。"
8740
8741 #. type: Plain text
8742 #: build/C/man3/shm_open.3:249
8743 msgid ""
8744 "An attempt was to made to B<shm_unlink>()  a I<name> that does not exist."
8745 msgstr "存在しない I<name> のオブジェクトを B<shm_unlink>()  しようとした。"
8746
8747 #. type: Plain text
8748 #: build/C/man3/shm_open.3:251
8749 msgid "These functions are provided in glibc 2.2 and later."
8750 msgstr "これらの関数は glibc 2.2 以降で提供されている。"
8751
8752 #. type: Plain text
8753 #: build/C/man3/shm_open.3:257
8754 msgid ""
8755 "POSIX.1-2001 says that the group ownership of a newly created shared memory "
8756 "object is set to either the calling process's effective group ID or \"a "
8757 "system default group ID\"."
8758 msgstr ""
8759 "POSIX.1-2001 には、新規に作成される共有メモリオブジェクトのグループ所有権"
8760 "は、 呼び出し元プロセスの実効グループ ID か 「システムのデフォルトのグループ "
8761 "ID」 のどちらかに設定される、と書かれている。"
8762
8763 #. type: Plain text
8764 #: build/C/man3/shm_open.3:266
8765 msgid ""
8766 "POSIX leaves the behavior of the combination of B<O_RDONLY> and B<O_TRUNC> "
8767 "unspecified.  On Linux, this will successfully truncate an existing shared "
8768 "memory object\\(emthis may not be so on other UNIX systems."
8769 msgstr ""
8770 "POSIX は B<O_RDONLY> と B<O_TRUNC> が一緒に指定された場合の動作を未定義にして"
8771 "いる。Linux では、 既存の共有メモリ・オブジェクトに対する切り詰め (truncate) "
8772 "は成功する。 しかし、他の UNIX システムでも同じであるとは限らない。"
8773
8774 #. type: Plain text
8775 #: build/C/man3/shm_open.3:271
8776 msgid ""
8777 "The POSIX shared memory object implementation on Linux 2.4 makes use of a "
8778 "dedicated filesystem, which is normally mounted under I</dev/shm>."
8779 msgstr ""
8780 "Linux 2.4 における POSIX 共有メモリ・オブジェクトの実装は 専用のファイルシス"
8781 "テムを使用する。そのファイルシステムは通常 I</dev/shm> にマウントされる。"
8782
8783 #. type: Plain text
8784 #: build/C/man3/shm_open.3:282
8785 msgid ""
8786 "B<close>(2), B<fchmod>(2), B<fchown>(2), B<fcntl>(2), B<fstat>(2), "
8787 "B<ftruncate>(2), B<mmap>(2), B<open>(2), B<umask>(2), B<shm_overview>(7)"
8788 msgstr ""
8789 "B<close>(2), B<fchmod>(2), B<fchown>(2), B<fcntl>(2), B<fstat>(2), "
8790 "B<ftruncate>(2), B<mmap>(2), B<open>(2), B<umask>(2), B<shm_overview>(7)"
8791
8792 #. type: TH
8793 #: build/C/man7/shm_overview.7:27
8794 #, no-wrap
8795 msgid "SHM_OVERVIEW"
8796 msgstr "SHM_OVERVIEW"
8797
8798 #. type: TH
8799 #: build/C/man7/shm_overview.7:27
8800 #, no-wrap
8801 msgid "2010-09-10"
8802 msgstr "2010-09-10"
8803
8804 #. type: Plain text
8805 #: build/C/man7/shm_overview.7:30
8806 msgid "shm_overview - overview of POSIX shared memory"
8807 msgstr "shm_overview - POSIX 共有メモリの概要"
8808
8809 #. type: Plain text
8810 #: build/C/man7/shm_overview.7:33
8811 msgid ""
8812 "The POSIX shared memory API allows processes to communicate information by "
8813 "sharing a region of memory."
8814 msgstr ""
8815 "POSIX 共有メモリ API を使用すると、メモリのある領域を共有して、 プロセス間で"
8816 "情報をやり取りすることができる。"
8817
8818 #. type: Plain text
8819 #: build/C/man7/shm_overview.7:35
8820 msgid "The interfaces employed in the API are:"
8821 msgstr "この API では以下のインターフェースが採用されている。"
8822
8823 #. type: TP
8824 #: build/C/man7/shm_overview.7:35
8825 #, no-wrap
8826 msgid "B<shm_open>(3)"
8827 msgstr "B<shm_open>(3)"
8828
8829 #. type: Plain text
8830 #: build/C/man7/shm_overview.7:42
8831 msgid ""
8832 "Create and open a new object, or open an existing object.  This is analogous "
8833 "to B<open>(2).  The call returns a file descriptor for use by the other "
8834 "interfaces listed below."
8835 msgstr ""
8836 "新しいオブジェクトを生成しオープンする、もしくは 既存のオブジェクトをオープン"
8837 "する。これは B<open>(2)  と同じである。下記にある他のインターフェースで使用す"
8838 "る ファイルディスクリプタを返す。"
8839
8840 #. type: TP
8841 #: build/C/man7/shm_overview.7:42
8842 #, no-wrap
8843 msgid "B<ftruncate>(2)"
8844 msgstr "B<ftruncate>(2)"
8845
8846 #. type: Plain text
8847 #: build/C/man7/shm_overview.7:46
8848 msgid ""
8849 "Set the size of the shared memory object.  (A newly created shared memory "
8850 "object has a length of zero.)"
8851 msgstr "共有メモリオブジェクトの大きさを設定する。"
8852
8853 #. type: Plain text
8854 #: build/C/man7/shm_overview.7:50
8855 msgid ""
8856 "Map the shared memory object into the virtual address space of the calling "
8857 "process."
8858 msgstr ""
8859 "呼び出したプロセスの仮想アドレス空間に共有メモリオブジェクトを マップする。"
8860
8861 #. type: TP
8862 #: build/C/man7/shm_overview.7:50
8863 #, no-wrap
8864 msgid "B<munmap>(2)"
8865 msgstr "B<munmap>(2)"
8866
8867 #. type: Plain text
8868 #: build/C/man7/shm_overview.7:54
8869 msgid ""
8870 "Unmap the shared memory object from the virtual address space of the calling "
8871 "process."
8872 msgstr ""
8873 "呼び出したプロセスの仮想アドレス空間から 共有メモリオブジェクトをアンマップす"
8874 "る。"
8875
8876 #. type: TP
8877 #: build/C/man7/shm_overview.7:54
8878 #, no-wrap
8879 msgid "B<shm_unlink>(3)"
8880 msgstr "B<shm_unlink>(3)"
8881
8882 #. type: Plain text
8883 #: build/C/man7/shm_overview.7:57
8884 msgid "Remove a shared memory object name."
8885 msgstr "共有メモリオブジェクト名を削除する。"
8886
8887 #. type: TP
8888 #: build/C/man7/shm_overview.7:57
8889 #, no-wrap
8890 msgid "B<close>(2)"
8891 msgstr "B<close>(2)"
8892
8893 #. type: Plain text
8894 #: build/C/man7/shm_overview.7:62
8895 msgid ""
8896 "Close the file descriptor allocated by B<shm_open>(3)  when it is no longer "
8897 "needed."
8898 msgstr ""
8899 "B<shm_open>(3)  で割り当てられたファイルディスクリプタが不要になった際に、 そ"
8900 "のファイルディスクリプタをクローズする。"
8901
8902 #. type: TP
8903 #: build/C/man7/shm_overview.7:62
8904 #, no-wrap
8905 msgid "B<fstat>(2)"
8906 msgstr "B<fstat>(2)"
8907
8908 #. type: Plain text
8909 #: build/C/man7/shm_overview.7:76
8910 msgid ""
8911 "Obtain a I<stat> structure that describes the shared memory object.  Among "
8912 "the information returned by this call are the object's size (I<st_size>), "
8913 "permissions (I<st_mode>), owner (I<st_uid>), and group (I<st_gid>)."
8914 msgstr ""
8915 "その共有メモリオブジェクトについての情報が入った I<stat> 構造体を取得する。 "
8916 "このシステムコールが返す情報には、オブジェクトのサイズ (I<st_size>)、 許可属"
8917 "性 (I<st_mode>)、 所有者 (I<st_uid>)、 グループ (I<st_gid>)  がある。"
8918
8919 #. type: TP
8920 #: build/C/man7/shm_overview.7:76
8921 #, no-wrap
8922 msgid "B<fchown>(2)"
8923 msgstr "B<fchown>(2)"
8924
8925 #. type: Plain text
8926 #: build/C/man7/shm_overview.7:79
8927 msgid "To change the ownership of a shared memory object."
8928 msgstr "共有メモリオブジェクトの所有権を変更する。"
8929
8930 #. type: TP
8931 #: build/C/man7/shm_overview.7:79
8932 #, no-wrap
8933 msgid "B<fchmod>(2)"
8934 msgstr "B<fchmod>(2)"
8935
8936 #. type: Plain text
8937 #: build/C/man7/shm_overview.7:82
8938 msgid "To change the permissions of a shared memory object."
8939 msgstr "共有メモリオブジェクトの許可属性を変更する。"
8940
8941 #. type: SS
8942 #: build/C/man7/shm_overview.7:82
8943 #, no-wrap
8944 msgid "Versions"
8945 msgstr "Versions"
8946
8947 #. type: Plain text
8948 #: build/C/man7/shm_overview.7:84
8949 msgid "POSIX shared memory is supported since Linux 2.4 and glibc 2.2."
8950 msgstr "POSIX 共有メモリは Linux 2.4 と glibc 2.2 以降でサポートされている。"
8951
8952 #. type: SS
8953 #: build/C/man7/shm_overview.7:84
8954 #, no-wrap
8955 msgid "Persistence"
8956 msgstr "持続性"
8957
8958 #. type: Plain text
8959 #: build/C/man7/shm_overview.7:89
8960 msgid ""
8961 "POSIX shared memory objects have kernel persistence: a shared memory object "
8962 "will exist until the system is shut down, or until all processes have "
8963 "unmapped the object and it has been deleted with B<shm_unlink>(3)"
8964 msgstr ""
8965 "POSIX 共有メモリオブジェクトはカーネル内で保持される。 共有メモリオブジェクト"
8966 "は、システムがシャットダウンされるか、 全てのプロセスがそのオブジェクトをアン"
8967 "マップし、 B<shm_unlink>(3)  で削除されるまで、存在し続ける。"
8968
8969 #. type: SS
8970 #: build/C/man7/shm_overview.7:89
8971 #, no-wrap
8972 msgid "Linking"
8973 msgstr "リンク"
8974
8975 #. type: Plain text
8976 #: build/C/man7/shm_overview.7:94
8977 msgid ""
8978 "Programs using the POSIX shared memory API must be compiled with I<cc -lrt> "
8979 "to link against the real-time library, I<librt>."
8980 msgstr ""
8981 "POSIX 共有メモリ API を使用したプログラムは I<cc -lrt> でコンパイルし、リアル"
8982 "タイムライブラリ I<librt> とリンクしなければならない。"
8983
8984 #. type: SS
8985 #: build/C/man7/shm_overview.7:94
8986 #, no-wrap
8987 msgid "Accessing shared memory objects via the filesystem"
8988 msgstr "ファイルシステム経由での共有メモリオブジェクトへのアクセス"
8989
8990 #. type: Plain text
8991 #: build/C/man7/shm_overview.7:101
8992 msgid ""
8993 "On Linux, shared memory objects are created in a (I<tmpfs>)  virtual "
8994 "filesystem, normally mounted under I</dev/shm>.  Since kernel 2.6.19, Linux "
8995 "supports the use of access control lists (ACLs)  to control the permissions "
8996 "of objects in the virtual filesystem."
8997 msgstr ""
8998 "Linux では、共有メモリオブジェクトは通常 I</dev/shm> 以下にマウントされる仮想"
8999 "ファイルシステム (I<tmpfs>)  内に作成される。 カーネル 2.6.19 以降の Linux で"
9000 "は、 仮想ファイルシステム内のオブジェクトの許可属性の制御に、 アクセス制御リ"
9001 "スト (ACL; access control lists) を使うことができる。"
9002
9003 #. type: Plain text
9004 #: build/C/man7/shm_overview.7:106
9005 msgid ""
9006 "Typically, processes must synchronize their access to a shared memory "
9007 "object, using, for example, POSIX semaphores."
9008 msgstr ""
9009 "通常は、共有メモリオブジェクトにアクセスするプロセスは、 POSIX セマフォなどを"
9010 "使ってプロセス間で同期をとらなければならない。"
9011
9012 #. type: Plain text
9013 #: build/C/man7/shm_overview.7:114
9014 msgid ""
9015 "System V shared memory (B<shmget>(2), B<shmop>(2), etc.) is an older shared "
9016 "memory API.  POSIX shared memory provides a simpler, and better designed "
9017 "interface; on the other hand POSIX shared memory is somewhat less widely "
9018 "available (especially on older systems) than System V shared memory."
9019 msgstr ""
9020 "System V 共有メモリ (B<shmget>(2), B<shmop>(2)  など) は古い共有メモリ API で"
9021 "ある。 POSIX 共有メモリは、より簡単で、うまく設計されたインタフェースを提供し"
9022 "ている。 一方で、POSIX 共有メモリは System V 共有メモリと比べると 利用できる"
9023 "システムが少ない (特に、古いシステムでは少ない)。"
9024
9025 #. type: Plain text
9026 #: build/C/man7/shm_overview.7:127
9027 msgid ""
9028 "B<fchmod>(2), B<fchown>(2), B<fstat>(2), B<ftruncate>(2), B<mmap>(2), "
9029 "B<mprotect>(2), B<munmap>(2), B<shmget>(2), B<shmop>(2), B<shm_open>(3), "
9030 "B<shm_unlink>(3), B<sem_overview>(7)"
9031 msgstr ""
9032 "B<fchmod>(2), B<fchown>(2), B<fstat>(2), B<ftruncate>(2), B<mmap>(2), "
9033 "B<mprotect>(2), B<munmap>(2), B<shmget>(2), B<shmop>(2), B<shm_open>(3), "
9034 "B<shm_unlink>(3), B<sem_overview>(7)"
9035
9036 #. type: TH
9037 #: build/C/man2/shmctl.2:45
9038 #, no-wrap
9039 msgid "SHMCTL"
9040 msgstr "SHMCTL"
9041
9042 #. type: TH
9043 #: build/C/man2/shmctl.2:45
9044 #, fuzzy, no-wrap
9045 #| msgid "2013-02-12"
9046 msgid "2014-02-07"
9047 msgstr "2013-02-12"
9048
9049 #. type: Plain text
9050 #: build/C/man2/shmctl.2:48
9051 msgid "shmctl - System V shared memory control"
9052 msgstr "shmctl - System V 共有メモリ (shared memory) を制御する"
9053
9054 #. type: Plain text
9055 #: build/C/man2/shmctl.2:51 build/C/man2/shmget.2:44
9056 msgid "B<#include E<lt>sys/ipc.hE<gt>>"
9057 msgstr "B<#include E<lt>sys/ipc.hE<gt>>"
9058
9059 #. type: Plain text
9060 #: build/C/man2/shmctl.2:53 build/C/man2/shmget.2:46
9061 msgid "B<#include E<lt>sys/shm.hE<gt>>"
9062 msgstr "B<#include E<lt>sys/shm.hE<gt>>"
9063
9064 #. type: Plain text
9065 #: build/C/man2/shmctl.2:55
9066 msgid ""
9067 "B<int shmctl(int >I<shmid>B<, int >I<cmd>B<, struct shmid_ds *>I<buf>B<);>"
9068 msgstr ""
9069 "B<int shmctl(int >I<shmid>B<, int >I<cmd>B<, struct shmid_ds *>I<buf>B<);>"
9070
9071 #. type: Plain text
9072 #: build/C/man2/shmctl.2:62
9073 msgid ""
9074 "B<shmctl>()  performs the control operation specified by I<cmd> on the "
9075 "System V shared memory segment whose identifier is given in I<shmid>."
9076 msgstr ""
9077 "B<shmctl>()  は、識別子が I<shmid> の System V 共有メモリ・セグメントに対し"
9078 "て I<cmd> で指示した制御命令を実行する。"
9079
9080 #. type: Plain text
9081 #: build/C/man2/shmctl.2:67
9082 msgid ""
9083 "The I<buf> argument is a pointer to a I<shmid_ds> structure, defined in "
9084 "I<E<lt>sys/shm.hE<gt>> as follows:"
9085 msgstr ""
9086 "I<buf> 引き数は、 I<shmid_ds> 構造体へのポインタである。 この構造体は "
9087 "I<E<lt>sys/shm.hE<gt>> で以下のように定義されている"
9088
9089 #. type: Plain text
9090 #: build/C/man2/shmctl.2:81
9091 #, no-wrap
9092 msgid ""
9093 "struct shmid_ds {\n"
9094 "    struct ipc_perm shm_perm;    /* Ownership and permissions */\n"
9095 "    size_t          shm_segsz;   /* Size of segment (bytes) */\n"
9096 "    time_t          shm_atime;   /* Last attach time */\n"
9097 "    time_t          shm_dtime;   /* Last detach time */\n"
9098 "    time_t          shm_ctime;   /* Last change time */\n"
9099 "    pid_t           shm_cpid;    /* PID of creator */\n"
9100 "    pid_t           shm_lpid;    /* PID of last shmat(2)/shmdt(2) */\n"
9101 "    shmatt_t        shm_nattch;  /* No. of current attaches */\n"
9102 "    ...\n"
9103 "};\n"
9104 msgstr ""
9105 "struct shmid_ds {\n"
9106 "    struct ipc_perm shm_perm;    /* 所有権と許可 */\n"
9107 "    size_t          shm_segsz;   /* セグメントのサイズ (バイト) */\n"
9108 "    time_t          shm_atime;   /* 最後の付加 (attach) の時刻 */\n"
9109 "    time_t          shm_dtime;   /* 最後の分離 (detach) の時刻 */\n"
9110 "    time_t          shm_ctime;   /* 最後に変更が行われた時刻 */\n"
9111 "    pid_t           shm_cpid;    /* 作成者 (creator) の PID */\n"
9112 "    pid_t           shm_lpid;    /* 最後の shmat(2)/shmdt(2) の PID */\n"
9113 "    shmatt_t        shm_nattch;  /* 現在付加されている数 */\n"
9114 "    ...\n"
9115 "};\n"
9116
9117 #. type: Plain text
9118 #: build/C/man2/shmctl.2:89
9119 msgid ""
9120 "The I<ipc_perm> structure is defined as follows (the highlighted fields are "
9121 "settable using B<IPC_SET>):"
9122 msgstr ""
9123 "I<ipc_perm> 構造体は以下のように定義されている (強調されたフィールドは "
9124 "B<IPC_SET> を使って設定可能である):"
9125
9126 #. type: Plain text
9127 #: build/C/man2/shmctl.2:102
9128 #, no-wrap
9129 msgid ""
9130 "struct ipc_perm {\n"
9131 "    key_t          __key;    /* Key supplied to shmget(2) */\n"
9132 "    uid_t          B<uid>;      /* Effective UID of owner */\n"
9133 "    gid_t          B<gid>;      /* Effective GID of owner */\n"
9134 "    uid_t          cuid;     /* Effective UID of creator */\n"
9135 "    gid_t          cgid;     /* Effective GID of creator */\n"
9136 "    unsigned short B<mode>;     /* B<Permissions> + SHM_DEST and\n"
9137 "                                SHM_LOCKED flags */\n"
9138 "    unsigned short __seq;    /* Sequence number */\n"
9139 "};\n"
9140 msgstr ""
9141 "struct ipc_perm {\n"
9142 "    key_t          __key;    /* shmget(2) に与えられるキー */\n"
9143 "    uid_t          B<uid>;      /* 所有者の実効 UID */\n"
9144 "    gid_t          B<gid>;      /* 所有者の実効 GID */\n"
9145 "    uid_t          cuid;     /* 作成者の実効 UID */\n"
9146 "    gid_t          cgid;     /* 作成者の実効 GID */\n"
9147 "    unsigned short B<mode>;     /* B<許可> + SHM_DEST と\n"
9148 "                                SHM_LOCKED フラグ */\n"
9149 "    unsigned short __seq;    /* シーケンス番号 */\n"
9150 "};\n"
9151
9152 #. type: Plain text
9153 #: build/C/man2/shmctl.2:108
9154 msgid "Valid values for I<cmd> are:"
9155 msgstr "I<cmd> として有効な値は以下の通り:"
9156
9157 #. type: TP
9158 #: build/C/man2/shmctl.2:109
9159 #, no-wrap
9160 msgid "B<IPC_STAT>"
9161 msgstr "B<IPC_STAT>"
9162
9163 #. type: Plain text
9164 #: build/C/man2/shmctl.2:118
9165 msgid ""
9166 "Copy information from the kernel data structure associated with I<shmid> "
9167 "into the I<shmid_ds> structure pointed to by I<buf>.  The caller must have "
9168 "read permission on the shared memory segment."
9169 msgstr ""
9170 "I<shmid> に関連づけられたカーネルデータ構造体の情報を I<buf> で指された "
9171 "I<shmid_ds> 構造体にコピーする。 呼び出し元は共有メモリ・セグメントに対する "
9172 "読み込み許可を持たなければならない。"
9173
9174 #. type: TP
9175 #: build/C/man2/shmctl.2:118
9176 #, no-wrap
9177 msgid "B<IPC_SET>"
9178 msgstr "B<IPC_SET>"
9179
9180 #. type: Plain text
9181 #: build/C/man2/shmctl.2:136
9182 msgid ""
9183 "Write the values of some members of the I<shmid_ds> structure pointed to by "
9184 "I<buf> to the kernel data structure associated with this shared memory "
9185 "segment, updating also its I<shm_ctime> member.  The following fields can be "
9186 "changed: I<shm_perm.uid>, I<shm_perm.gid>, and (the least significant 9 bits "
9187 "of) I<shm_perm.mode>.  The effective UID of the calling process must match "
9188 "the owner (I<shm_perm.uid>)  or creator (I<shm_perm.cuid>)  of the shared "
9189 "memory segment, or the caller must be privileged."
9190 msgstr ""
9191 "I<buf> によって指される I<shmid_ds> 構造体のいくつかのメンバーの値を、 この共"
9192 "有メモリ・セグメントに関連づけられたカーネルデータ構造体に書き込み、 "
9193 "I<shm_ctime> メンバーも更新する。 以下のフィールドは変更できる。 I<shm_perm."
9194 "uid>, I<shm_perm.gid>, I<shm_perm.mode> (の最下位 9 ビット)。 呼び出したプロ"
9195 "セスの実効 UID が所有者 (I<shm_perm.uid>)  または作成者 (I<shm_perm.cuid>)  "
9196 "と一致するか、呼び出し元が特権を持たなければならない。"
9197
9198 #. type: TP
9199 #: build/C/man2/shmctl.2:136
9200 #, no-wrap
9201 msgid "B<IPC_RMID>"
9202 msgstr "B<IPC_RMID>"
9203
9204 #. type: Plain text
9205 #: build/C/man2/shmctl.2:149
9206 #, fuzzy
9207 #| msgid ""
9208 #| "Mark the segment to be destroyed.  The segment will only actually be "
9209 #| "destroyed after the last process detaches it (i.e., when the "
9210 #| "I<shm_nattch> member of the associated structure I<shmid_ds> is zero).  "
9211 #| "The caller must be the owner or creator, or be privileged.  If a segment "
9212 #| "has been marked for destruction, then the (nonstandard)  B<SHM_DEST> flag "
9213 #| "of the I<shm_perm.mode> field in the associated data structure retrieved "
9214 #| "by B<IPC_STAT> will be set."
9215 msgid ""
9216 "Mark the segment to be destroyed.  The segment will only actually be "
9217 "destroyed after the last process detaches it (i.e., when the I<shm_nattch> "
9218 "member of the associated structure I<shmid_ds> is zero).  The caller must be "
9219 "the owner or creator of the segment, or be privileged.  The I<buf> argument "
9220 "is ignored."
9221 msgstr ""
9222 "セグメントに破棄済みのマークを付ける。 セグメントは、実際には最後プロセスがセ"
9223 "グメントを分離した (関連する I<shmid_ds> 構造体の I<shm_nattch> メンバーが 0 "
9224 "になった) 後でのみ破棄される。 呼び出し元は所有者か作成者であるか、特権を持た"
9225 "なければならない。 セグメントに破棄のマークが付けられると、 関連するデータ構"
9226 "造体において I<shm_perm.mode> フィールドの (標準ではない)  B<SHM_DEST> フラグ"
9227 "が設定される。 このデータ構造体は B<IPC_STAT> で取得される。"
9228
9229 #. type: Plain text
9230 #: build/C/man2/shmctl.2:157
9231 #, fuzzy
9232 #| msgid ""
9233 #| "Prevent swapping of the shared memory segment.  The caller must fault in "
9234 #| "any pages that are required to be present after locking is enabled.  If a "
9235 #| "segment has been locked, then the (nonstandard)  B<SHM_LOCKED> flag of "
9236 #| "the I<shm_perm.mode> field in the associated data structure retrieved by "
9237 #| "B<IPC_STAT> will be set."
9238 msgid ""
9239 "If a segment has been marked for destruction, then the (nonstandard)  "
9240 "B<SHM_DEST> flag of the I<shm_perm.mode> field in the associated data "
9241 "structure retrieved by B<IPC_STAT> will be set."
9242 msgstr ""
9243 "共有メモリ・セグメントをスワップすることを防止する。 ロックが有効になった後、"
9244 "呼び出し元は、 存在することが要求された全てのページをフォールトさせなければな"
9245 "らない。 セグメントがロックされると、 関連するデータ構造体において "
9246 "I<shm_perm.mode> フィールドの (標準的ではない)  B<SHM_LOCKED> フラグが設定さ"
9247 "れる。 このデータ構造体は B<IPC_STAT> で取得される。"
9248
9249 #. type: Plain text
9250 #: build/C/man2/shmctl.2:160
9251 msgid ""
9252 "The caller I<must> ensure that a segment is eventually destroyed; otherwise "
9253 "its pages that were faulted in will remain in memory or swap."
9254 msgstr ""
9255 "呼び出し元は最終的にはセグメントを忘れずに破棄I<しなければならない>。 そうで"
9256 "なれば、フォールト (fault) されたページは メモリかスワップ (swap) に残り続け"
9257 "る。"
9258
9259 #. type: Plain text
9260 #: build/C/man2/shmctl.2:165
9261 msgid ""
9262 "See also the description of I</proc/sys/kernel/shm_rmid_forced> in B<proc>"
9263 "(5)."
9264 msgstr "B<proc>(5) の I</proc/sys/kernel/shm_rmid_forced> の説明も参照のこと。"
9265
9266 #. type: TP
9267 #: build/C/man2/shmctl.2:165
9268 #, no-wrap
9269 msgid "B<IPC_INFO> (Linux-specific)"
9270 msgstr "B<IPC_INFO> (Linux 固有)"
9271
9272 #. type: Plain text
9273 #: build/C/man2/shmctl.2:178
9274 msgid ""
9275 "Returns information about system-wide shared memory limits and parameters in "
9276 "the structure pointed to by I<buf>.  This structure is of type I<shminfo> "
9277 "(thus, a cast is required), defined in I<E<lt>sys/shm.hE<gt>> if the "
9278 "B<_GNU_SOURCE> feature test macro is defined:"
9279 msgstr ""
9280 "システム全体での共有メモリの制限とパラメータに関する情報を、 I<buf> が指す構"
9281 "造体に入れて返す。 この構造体は I<shminfo> 型である (そのためキャストが必要で"
9282 "ある)。 I<shminfo> は B<_GNU_SOURCE> 機能検査マクロが定義された場合に "
9283 "I<E<lt>sys/shm.hE<gt>> で以下のように定義される:"
9284
9285 #. type: Plain text
9286 #: build/C/man2/shmctl.2:192
9287 #, no-wrap
9288 msgid ""
9289 "struct  shminfo {\n"
9290 "    unsigned long shmmax; /* Maximum segment size */\n"
9291 "    unsigned long shmmin; /* Minimum segment size;\n"
9292 "                             always 1 */\n"
9293 "    unsigned long shmmni; /* Maximum number of segments */\n"
9294 "    unsigned long shmseg; /* Maximum number of segments\n"
9295 "                             that a process can attach;\n"
9296 "                             unused within kernel */\n"
9297 "    unsigned long shmall; /* Maximum number of pages of\n"
9298 "                             shared memory, system-wide */\n"
9299 "};\n"
9300 msgstr ""
9301 "struct  shminfo {\n"
9302 "    unsigned long shmmax; /* 最大セグメントサイズ */\n"
9303 "    unsigned long shmmin; /* 最小セグメントサイズ。\n"
9304 "                             常に 1 */\n"
9305 "    unsigned long shmmni; /* 最大セグメント数 */\n"
9306 "    unsigned long shmseg; /* プロセスが付加できる\n"
9307 "                             セグメントの最大数。\n"
9308 "                             カーネル内では未使用 */\n"
9309 "    unsigned long shmall; /* 共有メモリの最大ページ数。\n"
9310 "                             システム全体での値 */\n"
9311 "};\n"
9312
9313 #. type: Plain text
9314 #: build/C/man2/shmctl.2:205
9315 msgid ""
9316 "The I<shmmni>, I<shmmax>, and I<shmall> settings can be changed via I</proc> "
9317 "files of the same name; see B<proc>(5)  for details."
9318 msgstr ""
9319 "設定 I<shmmni>, I<shmmax>, I<shmall> は I</proc> にある同じ名前のファイル経由"
9320 "で変更可能である。 詳しくは B<proc>(5)  を参照。"
9321
9322 #. type: TP
9323 #: build/C/man2/shmctl.2:205
9324 #, no-wrap
9325 msgid "B<SHM_INFO> (Linux-specific)"
9326 msgstr "B<SHM_INFO> (Linux 固有)"
9327
9328 #. type: Plain text
9329 #: build/C/man2/shmctl.2:216
9330 msgid ""
9331 "Returns a I<shm_info> structure whose fields contain information about "
9332 "system resources consumed by shared memory.  This structure is defined in "
9333 "I<E<lt>sys/shm.hE<gt>> if the B<_GNU_SOURCE> feature test macro is defined:"
9334 msgstr ""
9335 "共有メモリが消費しているシステム資源に関する情報を 格納した I<shm_info> 構造"
9336 "体を返す。 この構造体は、 B<_GNU_SOURCE> 機能検査マクロが定義された場合に "
9337 "I<E<lt>sys/shm.hE<gt>> で以下のように定義される:"
9338
9339 #. type: Plain text
9340 #: build/C/man2/shmctl.2:233
9341 #, no-wrap
9342 msgid ""
9343 "struct shm_info {\n"
9344 "    int           used_ids; /* # of currently existing\n"
9345 "                               segments */\n"
9346 "    unsigned long shm_tot;  /* Total number of shared\n"
9347 "                               memory pages */\n"
9348 "    unsigned long shm_rss;  /* # of resident shared\n"
9349 "                               memory pages */\n"
9350 "    unsigned long shm_swp;  /* # of swapped shared\n"
9351 "                               memory pages */\n"
9352 "    unsigned long swap_attempts;\n"
9353 "                            /* Unused since Linux 2.4 */\n"
9354 "    unsigned long swap_successes;\n"
9355 "                            /* Unused since Linux 2.4 */\n"
9356 "};\n"
9357 msgstr ""
9358 "struct shm_info {\n"
9359 "    int           used_ids; /* 現在存在するセグメント数 */\n"
9360 "    unsigned long shm_tot;  /* 共有メモリのページ総数 */\n"
9361 "    unsigned long shm_rss;  /* メモリ上にある (スワップされて\n"
9362 "                               いない) 共有メモリページ数 */\n"
9363 "    unsigned long shm_swp;  /* スワップされている共有メモリ\n"
9364 "                               ページ数 */\n"
9365 "    unsigned long swap_attempts;\n"
9366 "                            /* Linux 2.4 以降では未使用 */\n"
9367 "    unsigned long swap_successes;\n"
9368 "                            /* Linux 2.4 以降では未使用 */\n"
9369 "};\n"
9370
9371 #. type: TP
9372 #: build/C/man2/shmctl.2:235
9373 #, no-wrap
9374 msgid "B<SHM_STAT> (Linux-specific)"
9375 msgstr "B<SHM_STAT> (Linux 固有)"
9376
9377 #. type: Plain text
9378 #: build/C/man2/shmctl.2:246
9379 msgid ""
9380 "Returns a I<shmid_ds> structure as for B<IPC_STAT>.  However, the I<shmid> "
9381 "argument is not a segment identifier, but instead an index into the kernel's "
9382 "internal array that maintains information about all shared memory segments "
9383 "on the system."
9384 msgstr ""
9385 "B<IPC_STAT> と同じく I<shmid_ds> 構造体を返す。 但し、 I<shmid> 引き数は、セ"
9386 "グメント識別子ではなく、システム上の全ての共有メモリ セグメントに関する情報を"
9387 "管理するカーネルの内部配列へのインデックス である。"
9388
9389 #. type: Plain text
9390 #: build/C/man2/shmctl.2:249
9391 msgid ""
9392 "The caller can prevent or allow swapping of a shared memory segment with the "
9393 "following I<cmd> values:"
9394 msgstr ""
9395 "呼び出し元は、I<cmd> に以下の値を指定することで、共有メモリ・セグメントが ス"
9396 "ワップされることを防止したり、許可したりできる:"
9397
9398 #. type: TP
9399 #: build/C/man2/shmctl.2:250
9400 #, no-wrap
9401 msgid "B<SHM_LOCK> (Linux-specific)"
9402 msgstr "B<SHM_LOCK> (Linux 固有)"
9403
9404 #. type: Plain text
9405 #: build/C/man2/shmctl.2:262
9406 msgid ""
9407 "Prevent swapping of the shared memory segment.  The caller must fault in any "
9408 "pages that are required to be present after locking is enabled.  If a "
9409 "segment has been locked, then the (nonstandard)  B<SHM_LOCKED> flag of the "
9410 "I<shm_perm.mode> field in the associated data structure retrieved by "
9411 "B<IPC_STAT> will be set."
9412 msgstr ""
9413 "共有メモリ・セグメントをスワップすることを防止する。 ロックが有効になった後、"
9414 "呼び出し元は、 存在することが要求された全てのページをフォールトさせなければな"
9415 "らない。 セグメントがロックされると、 関連するデータ構造体において "
9416 "I<shm_perm.mode> フィールドの (標準的ではない)  B<SHM_LOCKED> フラグが設定さ"
9417 "れる。 このデータ構造体は B<IPC_STAT> で取得される。"
9418
9419 #. type: TP
9420 #: build/C/man2/shmctl.2:262
9421 #, no-wrap
9422 msgid "B<SHM_UNLOCK> (Linux-specific)"
9423 msgstr "B<SHM_UNLOCK> (Linux 固有)"
9424
9425 #. type: Plain text
9426 #: build/C/man2/shmctl.2:265
9427 msgid "Unlock the segment, allowing it to be swapped out."
9428 msgstr "セグメントのロックを解除し、スワップ・アウトすることを可能にする。"
9429
9430 #.  There was some weirdness in 2.6.9: SHM_LOCK and SHM_UNLOCK could
9431 #.  be applied to a segment, regardless of ownership of the segment.
9432 #.  This was a botch-up in the move to RLIMIT_MEMLOCK, and was fixed
9433 #.  in 2.6.10.  MTK, May 2005
9434 #. type: Plain text
9435 #: build/C/man2/shmctl.2:283
9436 msgid ""
9437 "In kernels before 2.6.10, only a privileged process could employ B<SHM_LOCK> "
9438 "and B<SHM_UNLOCK>.  Since kernel 2.6.10, an unprivileged process can employ "
9439 "these operations if its effective UID matches the owner or creator UID of "
9440 "the segment, and (for B<SHM_LOCK>)  the amount of memory to be locked falls "
9441 "within the B<RLIMIT_MEMLOCK> resource limit (see B<setrlimit>(2))."
9442 msgstr ""
9443 "2.6.10 より前のカーネルでは、特権プロセスだけが B<SHM_LOCK> と B<SHM_UNLOCK> "
9444 "を利用することができた。 2.6.10 以降のカーネルでは、非特権プロセスであっても"
9445 "次の条件を満たせば これらの操作を利用することができる。その条件とは、プロセス"
9446 "の実効 UID がそのセグメントの所有者もしくは作成者の UID と一致し、 "
9447 "(B<SHM_LOCK> の場合には) ロックするメモリの合計が B<RLIMIT_MEMLOCK> リソース"
9448 "上限 (B<setrlimit>(2)  参照) の範囲内に入っていることである。"
9449
9450 #. type: Plain text
9451 #: build/C/man2/shmctl.2:301
9452 msgid ""
9453 "A successful B<IPC_INFO> or B<SHM_INFO> operation returns the index of the "
9454 "highest used entry in the kernel's internal array recording information "
9455 "about all shared memory segments.  (This information can be used with "
9456 "repeated B<SHM_STAT> operations to obtain information about all shared "
9457 "memory segments on the system.)  A successful B<SHM_STAT> operation returns "
9458 "the identifier of the shared memory segment whose index was given in "
9459 "I<shmid>.  Other operations return 0 on success."
9460 msgstr ""
9461 "B<IPC_INFO> と B<SHM_INFO> 操作は、成功すると、全ての共有メモリセグメントに関"
9462 "する情報を 管理しているカーネルの内部配列の使用中エントリのインデックスの う"
9463 "ち最大値を返す (この情報は、システムの全ての共有メモリセグメントに関する情報"
9464 "を 取得するために、 B<SHM_STAT> 操作を繰り返し実行する際に使用できる)。 "
9465 "B<SHM_STAT> 操作は、成功すると、 I<shmid> で指定されたインデックスを持つ共有"
9466 "メモリセグメントの識別子を返す。 他の操作は、成功の場合 0 を返す。"
9467
9468 #. type: Plain text
9469 #: build/C/man2/shmctl.2:305
9470 msgid "On error, -1 is returned, and I<errno> is set appropriately."
9471 msgstr "エラーの場合は -1 を返し、 I<errno> を適切に設定する。"
9472
9473 #. type: Plain text
9474 #: build/C/man2/shmctl.2:314
9475 msgid ""
9476 "B<IPC_STAT> or B<SHM_STAT> is requested and I<shm_perm.mode> does not allow "
9477 "read access for I<shmid>, and the calling process does not have the "
9478 "B<CAP_IPC_OWNER> capability."
9479 msgstr ""
9480 "B<IPC_STAT> または B<SHM_STAT> が要求され、 I<shm_perm.mode> が I<shmid> への"
9481 "読み込みアクセスを許しておらず、 かつ呼び出したプロセスが B<CAP_IPC_OWNER> "
9482 "ケーパビリティ (capability) を持っていない。"
9483
9484 #. type: Plain text
9485 #: build/C/man2/shmctl.2:325
9486 msgid ""
9487 "The argument I<cmd> has value B<IPC_SET> or B<IPC_STAT> but the address "
9488 "pointed to by I<buf> isn't accessible."
9489 msgstr ""
9490 "I<cmd> 引き数に B<IPC_SET> か B<IPC_STAT> が指定されたが I<buf> で指されてい"
9491 "るアドレスにアクセスできない。"
9492
9493 #. type: TP
9494 #: build/C/man2/shmctl.2:325 build/C/man2/shmop.2:197
9495 #, no-wrap
9496 msgid "B<EIDRM>"
9497 msgstr "B<EIDRM>"
9498
9499 #. type: Plain text
9500 #: build/C/man2/shmctl.2:328 build/C/man2/shmop.2:200
9501 msgid "I<shmid> points to a removed identifier."
9502 msgstr "I<shmid> が削除 (remove) された識別子 (identifier) を指している。"
9503
9504 #. type: Plain text
9505 #: build/C/man2/shmctl.2:337
9506 msgid ""
9507 "I<shmid> is not a valid identifier, or I<cmd> is not a valid command.  Or: "
9508 "for a B<SHM_STAT> operation, the index value specified in I<shmid> referred "
9509 "to an array slot that is currently unused."
9510 msgstr ""
9511 "I<shmid> が有効な識別子でないか、 I<cmd> が有効なコマンドでない。 もしくは、 "
9512 "B<SHM_STAT> 操作の場合に、 I<shmid> で指定されたインデックス値が現在未使用の"
9513 "配列のスロットを参照していた。"
9514
9515 #. type: Plain text
9516 #: build/C/man2/shmctl.2:348
9517 msgid ""
9518 "(In kernels since 2.6.9), B<SHM_LOCK> was specified and the size of the to-"
9519 "be-locked segment would mean that the total bytes in locked shared memory "
9520 "segments would exceed the limit for the real user ID of the calling "
9521 "process.  This limit is defined by the B<RLIMIT_MEMLOCK> soft resource limit "
9522 "(see B<setrlimit>(2))."
9523 msgstr ""
9524 "(2.6.9 以降のカーネルにおいて)  B<SHM_LOCK> が指定され、 ロックされる予定のセ"
9525 "グメントのサイズ (ロックされる共有メモリ・セグメントの合計バイト数) が、 呼び"
9526 "出したプロセスの実ユーザー ID についての制限を超えた。 この制限は "
9527 "B<RLIMIT_MEMLOCK> ソフト資源制限で定義される (B<setrlimit>(2)  を参照)。"
9528
9529 #. type: Plain text
9530 #: build/C/man2/shmctl.2:353
9531 msgid ""
9532 "B<IPC_STAT> is attempted, and the GID or UID value is too large to be stored "
9533 "in the structure pointed to by I<buf>."
9534 msgstr ""
9535 "B<IPC_STAT> が試みられ、GID や UID の値が I<buf> で指示される構造体に格納する"
9536 "には大き過ぎる。"
9537
9538 #. type: Plain text
9539 #: build/C/man2/shmctl.2:365
9540 msgid ""
9541 "B<IPC_SET> or B<IPC_RMID> is attempted, and the effective user ID of the "
9542 "calling process is not that of the creator (found in I<shm_perm.cuid>), or "
9543 "the owner (found in I<shm_perm.uid>), and the process was not privileged "
9544 "(Linux: did not have the B<CAP_SYS_ADMIN> capability)."
9545 msgstr ""
9546 "B<IPC_SET> か B<IPC_RMID> が試みられ、 呼び出したプロセスの実効ユーザー ID が"
9547 "作成者 (I<shm_perm.cuid>)  でも所有者 (I<shm_perm.uid>)  でもなく、プロセスが"
9548 "特権を持たない (Linux では B<CAP_SYS_ADMIN> ケーパビリティを持たない)。"
9549
9550 #. type: Plain text
9551 #: build/C/man2/shmctl.2:377
9552 msgid ""
9553 "Or (in kernels before 2.6.9), B<SHM_LOCK> or B<SHM_UNLOCK> was specified, "
9554 "but the process was not privileged (Linux: did not have the B<CAP_IPC_LOCK> "
9555 "capability).  (Since Linux 2.6.9, this error can also occur if the "
9556 "B<RLIMIT_MEMLOCK> is 0 and the caller is not privileged.)"
9557 msgstr ""
9558 "または (2.6.9 より前のカーネルで)  B<SHM_LOCK> または B<SHM_UNLOCK> が指定さ"
9559 "れているが、プロセスが特権を持たない (Linux では B<CAP_IPC_LOCK> ケーパビリ"
9560 "ティを持たない)。 (Linux 2.6.9 以降では、 B<RLIMIT_MEMLOCK> が 0 で呼び出し元"
9561 "が特権を持たない場合にも、このエラーが起こる。)"
9562
9563 #.  SVr4 documents an additional error condition EMFILE.
9564 #. type: Plain text
9565 #: build/C/man2/shmctl.2:382 build/C/man2/shmget.2:235
9566 #: build/C/man2/shmop.2:234
9567 msgid "SVr4, POSIX.1-2001."
9568 msgstr "SVr4, POSIX.1-2001."
9569
9570 #.  Like Linux, the FreeBSD man pages still document
9571 #.  the inclusion of these header files.
9572 #. type: Plain text
9573 #: build/C/man2/shmctl.2:395 build/C/man2/shmget.2:251
9574 msgid ""
9575 "The inclusion of I<E<lt>sys/types.hE<gt>> and I<E<lt>sys/ipc.hE<gt>> isn't "
9576 "required on Linux or by any version of POSIX.  However, some old "
9577 "implementations required the inclusion of these header files, and the SVID "
9578 "also documented their inclusion.  Applications intended to be portable to "
9579 "such old systems may need to include these header files."
9580 msgstr ""
9581 "Linux や POSIX の全てのバージョンでは、 I<E<lt>sys/types.hE<gt>> と "
9582 "I<E<lt>sys/ipc.hE<gt>> のインクルードは必要ない。しかしながら、いくつかの古い"
9583 "実装ではこれらのヘッダファイルのインクルードが必要であり、 SVID でもこれらの"
9584 "インクルードをするように記載されている。このような古いシステムへの移植性を意"
9585 "図したアプリケーションではこれらのファイルをインクルードする必要があるかもし"
9586 "れない。"
9587
9588 #. type: Plain text
9589 #: build/C/man2/shmctl.2:407
9590 msgid ""
9591 "The B<IPC_INFO>, B<SHM_STAT> and B<SHM_INFO> operations are used by the "
9592 "B<ipcs>(1)  program to provide information on allocated resources.  In the "
9593 "future these may modified or moved to a I</proc> filesystem interface."
9594 msgstr ""
9595 "B<IPC_INFO>, B<SHM_STAT>, B<SHM_INFO> 操作は、 B<ipcs>(1)  プログラムで割り当"
9596 "て済の資源に関する情報を提供するために 使用されている。将来、これらの操作は変"
9597 "更されたり、 I</proc> ファイルシステムのインタフェースに移動されるかもしれな"
9598 "い。"
9599
9600 #. type: Plain text
9601 #: build/C/man2/shmctl.2:415
9602 msgid ""
9603 "Linux permits a process to attach (B<shmat>(2))  a shared memory segment "
9604 "that has already been marked for deletion using I<shmctl(IPC_RMID)>.  This "
9605 "feature is not available on other UNIX implementations; portable "
9606 "applications should avoid relying on it."
9607 msgstr ""
9608 "Linux では、 I<shmctl(IPC_RMID)> を使ってすでに削除マークがつけられている共有"
9609 "メモリ・セグメントを あるプロセスが付加 (attach)  (B<shmat>(2))  することを許"
9610 "可している。 この機能は他の UNIX の実装では利用できない。 移植性を考慮したア"
9611 "プリケーションではこれに依存しないようにすべきである。"
9612
9613 #. type: Plain text
9614 #: build/C/man2/shmctl.2:428
9615 msgid ""
9616 "Various fields in a I<struct shmid_ds> were typed as I<short> under Linux "
9617 "2.2 and have become I<long> under Linux 2.4.  To take advantage of this, a "
9618 "recompilation under glibc-2.1.91 or later should suffice.  (The kernel "
9619 "distinguishes old and new calls by an B<IPC_64> flag in I<cmd>.)"
9620 msgstr ""
9621 "I<構造体 shmid_ds> 内の多くのフィールドは、 Linux 2.2 では I<short> 型だった"
9622 "が、Linux 2.4 では I<long> 型になった。 この利点を生かすには、glibc-2.1.91 以"
9623 "降の環境下で 再コンパイルすれば十分である。 カーネルは新しい形式の呼び出しと"
9624 "古い形式の呼び出しを I<cmd> 内の B<IPC_64> フラグで区別する。"
9625
9626 #. type: Plain text
9627 #: build/C/man2/shmctl.2:435
9628 msgid ""
9629 "B<mlock>(2), B<setrlimit>(2), B<shmget>(2), B<shmop>(2), B<capabilities>(7), "
9630 "B<svipc>(7)"
9631 msgstr ""
9632 "B<mlock>(2), B<setrlimit>(2), B<shmget>(2), B<shmop>(2), B<capabilities>(7), "
9633 "B<shm_overview>(7), B<svipc>(7)"
9634
9635 #. type: TH
9636 #: build/C/man2/shmget.2:38
9637 #, no-wrap
9638 msgid "SHMGET"
9639 msgstr "SHMGET"
9640
9641 #. type: Plain text
9642 #: build/C/man2/shmget.2:41
9643 msgid "shmget - allocates a System V shared memory segment"
9644 msgstr "shmget - System V 共有メモリ・セグメントを割り当てる"
9645
9646 #. type: Plain text
9647 #: build/C/man2/shmget.2:48
9648 msgid "B<int shmget(key_t >I<key>B<, size_t >I<size>B<, int >I<shmflg>B<);>"
9649 msgstr "B<int shmget(key_t >I<key>B<, size_t >I<size>B<, int >I<shmflg>B<);>"
9650
9651 #. type: Plain text
9652 #: build/C/man2/shmget.2:72
9653 msgid ""
9654 "B<shmget>()  returns the identifier of the System V shared memory segment "
9655 "associated with the value of the argument I<key>.  A new shared memory "
9656 "segment, with size equal to the value of I<size> rounded up to a multiple of "
9657 "B<PAGE_SIZE>, is created if I<key> has the value B<IPC_PRIVATE> or I<key> "
9658 "isn't B<IPC_PRIVATE>, no shared memory segment corresponding to I<key> "
9659 "exists, and B<IPC_CREAT> is specified in I<shmflg>."
9660 msgstr ""
9661 "B<shmget>()  は I<key> 引き数に対応する System V 共有メモリ・セグメントの識別"
9662 "子を返す。 I<key> の値が B<IPC_PRIVATE> の場合、もしくは I<key> に対応する共"
9663 "有メモリ・セグメントが存在せず、 I<shmflg> に B<IPC_CREAT> が指定されていた場"
9664 "合、 新しい共有メモリ・セグメントを作成する。 作成される共有メモリ・セグメン"
9665 "トは、 I<size> 引き数の値を B<PAGE_SIZE> の倍数へと切り上げた (round up) 大き"
9666 "さとなる。"
9667
9668 #. type: Plain text
9669 #: build/C/man2/shmget.2:91
9670 msgid ""
9671 "If I<shmflg> specifies both B<IPC_CREAT> and B<IPC_EXCL> and a shared memory "
9672 "segment already exists for I<key>, then B<shmget>()  fails with I<errno> set "
9673 "to B<EEXIST>.  (This is analogous to the effect of the combination B<O_CREAT "
9674 "| O_EXCL> for B<open>(2).)"
9675 msgstr ""
9676 "I<shmflg> に B<IPC_CREAT> と B<IPC_EXCL> の両方が指定された場合、 I<key> に対"
9677 "応する共有メモリ・セグメントが既に存在すると、 B<shmget>()  は失敗し、 "
9678 "I<errno> に B<EEXIST> が設定される (これは B<open>(2)  に B<O_CREAT | "
9679 "O_EXCL> を指定した場合の動作と同じである)。"
9680
9681 #. type: Plain text
9682 #: build/C/man2/shmget.2:95
9683 msgid "The value I<shmflg> is composed of:"
9684 msgstr "I<shmflg> は以下の内容から構成される:"
9685
9686 #. type: TP
9687 #: build/C/man2/shmget.2:95
9688 #, no-wrap
9689 msgid "B<IPC_CREAT>"
9690 msgstr "B<IPC_CREAT>"
9691
9692 #. type: Plain text
9693 #: build/C/man2/shmget.2:102
9694 msgid ""
9695 "to create a new segment.  If this flag is not used, then B<shmget>()  will "
9696 "find the segment associated with I<key> and check to see if the user has "
9697 "permission to access the segment."
9698 msgstr ""
9699 "新しいセグメントを作成する。このフラグが指定されなかった場合、 B<shmget>()  "
9700 "は I<key> に対応するセグメントを探し、 ユーザがそのセグメントにアクセスする許"
9701 "可があるかどうかをチェックする。"
9702
9703 #. type: TP
9704 #: build/C/man2/shmget.2:102
9705 #, no-wrap
9706 msgid "B<IPC_EXCL>"
9707 msgstr "B<IPC_EXCL>"
9708
9709 #. type: Plain text
9710 #: build/C/man2/shmget.2:105
9711 msgid "used with B<IPC_CREAT> to ensure failure if the segment already exists."
9712 msgstr ""
9713 "B<IPC_CREAT> と共に使用し、セグメントが既に存在した場合には 失敗することを保"
9714 "証する。"
9715
9716 #. type: TP
9717 #: build/C/man2/shmget.2:105
9718 #, no-wrap
9719 msgid "I<mode_flags>"
9720 msgstr "I<mode_flags>"
9721
9722 #. type: Plain text
9723 #: build/C/man2/shmget.2:115
9724 msgid ""
9725 "(least significant 9 bits)  specifying the permissions granted to the owner, "
9726 "group, and world.  These bits have the same format, and the same meaning, as "
9727 "the I<mode> argument of B<open>(2).  Presently, the execute permissions are "
9728 "not used by the system."
9729 msgstr ""
9730 "(下位 9 ビット)  所有者、グループ、他人 (world) への許可を指定する。 これらの"
9731 "ビットは B<open>(2)  の I<mode> 引き数と同じ形式で同じ意味を持つ。 今のとこ"
9732 "ろ、システムは実行 (execute) 許可を参照しない。"
9733
9734 #. type: TP
9735 #: build/C/man2/shmget.2:115
9736 #, no-wrap
9737 msgid "B<SHM_HUGETLB> (since Linux 2.6)"
9738 msgstr "B<SHM_HUGETLB> (Linux 2.6 以降)"
9739
9740 #. type: Plain text
9741 #: build/C/man2/shmget.2:121
9742 msgid ""
9743 "Allocate the segment using \"huge pages.\" See the Linux kernel source file "
9744 "I<Documentation/vm/hugetlbpage.txt> for further information."
9745 msgstr ""
9746 "\"ヒュージページ (huge page)\" を使うセグメントを割り当てる。詳細な情報は、"
9747 "Linux カーネルソースのファイル I<Documentation/vm/hugetlbpage.txt> を参照。"
9748
9749 #. type: TP
9750 #: build/C/man2/shmget.2:121
9751 #, no-wrap
9752 msgid "B<SHM_NORESERVE> (since Linux 2.6.15)"
9753 msgstr "B<SHM_NORESERVE> (Linux 2.6.15 以降)"
9754
9755 #.  As at 2.6.17-rc2, this flag has no effect if SHM_HUGETLB was also
9756 #.  specified.
9757 #. type: Plain text
9758 #: build/C/man2/shmget.2:140
9759 msgid ""
9760 "This flag serves the same purpose as the B<mmap>(2)  B<MAP_NORESERVE> flag.  "
9761 "Do not reserve swap space for this segment.  When swap space is reserved, "
9762 "one has the guarantee that it is possible to modify the segment.  When swap "
9763 "space is not reserved one might get B<SIGSEGV> upon a write if no physical "
9764 "memory is available.  See also the discussion of the file I</proc/sys/vm/"
9765 "overcommit_memory> in B<proc>(5)."
9766 msgstr ""
9767 "このフラグは、 B<mmap>(2)  の B<MAP_NORESERVE> フラグと同じ役割を果たす。 こ"
9768 "のセグメントに対するスワップ空間の予約を行わない。 スワップ空間を予約した場合"
9769 "は、そのセグメントの変更が必ず成功することが 保証される。スワップ空間の予約を"
9770 "行わなかった場合は、物理メモリに空きが ないと書き込み時に B<SIGSEGV> を受け取"
9771 "る可能性がある。 B<proc>(5)  にある I</proc/sys/vm/overcommit_memory> ファイ"
9772 "ルに関する議論も参照のこと。"
9773
9774 #. type: Plain text
9775 #: build/C/man2/shmget.2:148
9776 msgid ""
9777 "When a new shared memory segment is created, its contents are initialized to "
9778 "zero values, and its associated data structure, I<shmid_ds> (see B<shmctl>"
9779 "(2)), is initialized as follows:"
9780 msgstr ""
9781 "共有メモリ・セグメントが新たに作成される際、 共有メモリ・セグメントの内容は "
9782 "0 で初期化され、 関連情報を保持するデータ構造体 I<shmid_ds> は以下のように初"
9783 "期化される。"
9784
9785 #. type: Plain text
9786 #: build/C/man2/shmget.2:153
9787 msgid ""
9788 "I<shm_perm.cuid> and I<shm_perm.uid> are set to the effective user ID of the "
9789 "calling process."
9790 msgstr ""
9791 "I<shm_perm.cuid> と I<shm_perm.uid> に呼び出し元プロセスの実効 (effective) "
9792 "ユーザーID を設定する。"
9793
9794 #. type: Plain text
9795 #: build/C/man2/shmget.2:158
9796 msgid ""
9797 "I<shm_perm.cgid> and I<shm_perm.gid> are set to the effective group ID of "
9798 "the calling process."
9799 msgstr ""
9800 "I<shm_perm.cgid> と I<shm_perm.gid> に呼び出し元プロセスの実効グループID を設"
9801 "定する。"
9802
9803 #. type: Plain text
9804 #: build/C/man2/shmget.2:163
9805 msgid ""
9806 "The least significant 9 bits of I<shm_perm.mode> are set to the least "
9807 "significant 9 bit of I<shmflg>."
9808 msgstr ""
9809 "I<shm_perm.mode> の下位 9 ビットに I<shmflg> の下位 9 ビットを設定する。"
9810
9811 #. type: Plain text
9812 #: build/C/man2/shmget.2:167
9813 msgid "I<shm_segsz> is set to the value of I<size>."
9814 msgstr "I<shm_segsz> に I<size> の値を設定する。"
9815
9816 #. type: Plain text
9817 #: build/C/man2/shmget.2:174
9818 #, fuzzy
9819 #| msgid ""
9820 #| "I<shm_lpid>, I<shm_nattch>, I<shm_atime> and I<shm_dtime> are set to 0."
9821 msgid ""
9822 "I<shm_lpid>, I<shm_nattch>, I<shm_atime>, and I<shm_dtime> are set to 0."
9823 msgstr ""
9824 "I<shm_lpid>, I<shm_nattch>, I<shm_atime>, I<shm_dtime> に 0 を設定する。"
9825
9826 #. type: Plain text
9827 #: build/C/man2/shmget.2:177
9828 msgid "I<shm_ctime> is set to the current time."
9829 msgstr "I<shm_ctime> に現在の時刻を設定する。"
9830
9831 #. type: Plain text
9832 #: build/C/man2/shmget.2:180
9833 msgid ""
9834 "If the shared memory segment already exists, the permissions are verified, "
9835 "and a check is made to see if it is marked for destruction."
9836 msgstr ""
9837 "共有メモリ・セグメントが既に存在する場合、アクセス許可の検査と、 破壊 "
9838 "(destruction) マークがつけられていないかのチェックが行われる。"
9839
9840 #. type: Plain text
9841 #: build/C/man2/shmget.2:185
9842 #, fuzzy
9843 #| msgid ""
9844 #| "On success, a valid shared memory identifier is returned.  On errir, -1 "
9845 #| "is returned, and I<errno> is set to indicate the error."
9846 msgid ""
9847 "On success, a valid shared memory identifier is returned.  On error, -1 is "
9848 "returned, and I<errno> is set to indicate the error."
9849 msgstr ""
9850 "成功の場合、有効な共有メモリ・セグメントの識別子が返される。 エラーの場合、 "
9851 "-1 が返り、 I<error> にエラーを示す値が設定される。"
9852
9853 #. type: Plain text
9854 #: build/C/man2/shmget.2:189
9855 msgid "On failure, I<errno> is set to one of the following:"
9856 msgstr "失敗した場合は I<errno> が以下のどれかに設定される:"
9857
9858 #. type: Plain text
9859 #: build/C/man2/shmget.2:195
9860 msgid ""
9861 "The user does not have permission to access the shared memory segment, and "
9862 "does not have the B<CAP_IPC_OWNER> capability."
9863 msgstr ""
9864 "ユーザーはその共有メモリ・セグメントへのアクセス許可を持たず、 "
9865 "B<CAP_IPC_OWNER> ケーパビリティも持っていない。"
9866
9867 #. type: Plain text
9868 #: build/C/man2/shmget.2:199
9869 msgid "B<IPC_CREAT | IPC_EXCL> was specified and the segment exists."
9870 msgstr ""
9871 "B<IPC_CREAT | IPC_EXCL> が指定されていたが、そのセグメントが既に存在する。"
9872
9873 #. type: Plain text
9874 #: build/C/man2/shmget.2:205
9875 msgid ""
9876 "A new segment was to be created and I<size> E<lt> B<SHMMIN> or I<size> E<gt> "
9877 "B<SHMMAX>, or no new segment was to be created, a segment with given key "
9878 "existed, but I<size> is greater than the size of that segment."
9879 msgstr ""
9880 "新しいセグメントを作成しようとした際に I<size> E<lt> B<SHMMIN> または "
9881 "I<size> E<gt> B<SHMMAX> であった。 もしくは、指定されたキーに対応するセグメン"
9882 "トが既に存在して、新しい セグメントを作成しようとはしなかったが、I<size> が存"
9883 "在するセグメントの サイズよりも大きかった。"
9884
9885 #. type: Plain text
9886 #: build/C/man2/shmget.2:214
9887 msgid ""
9888 "No segment exists for the given I<key>, and B<IPC_CREAT> was not specified."
9889 msgstr ""
9890 "指定された I<key> に対応するセグメントが存在せず、 B<IPC_CREAT> も指定されて"
9891 "いなかった。"
9892
9893 #. type: Plain text
9894 #: build/C/man2/shmget.2:217
9895 msgid "No memory could be allocated for segment overhead."
9896 msgstr "セグメントの管理情報 (overhead) に割り当てるメモリがなかった。"
9897
9898 #. type: Plain text
9899 #: build/C/man2/shmget.2:225
9900 msgid ""
9901 "All possible shared memory IDs have been taken (B<SHMMNI>), or allocating a "
9902 "segment of the requested I<size> would cause the system to exceed the system-"
9903 "wide limit on shared memory (B<SHMALL>)."
9904 msgstr ""
9905 "システム全体の共有メモリ・セグメント数の制限 (B<SHMMNI>)  に達した、または要"
9906 "求された I<size> のセグメントの割り当てが システム全体の共有メモリサイズの制"
9907 "限 (B<SHMALL>)  を超過した。"
9908
9909 #. type: Plain text
9910 #: build/C/man2/shmget.2:232
9911 msgid ""
9912 "The B<SHM_HUGETLB> flag was specified, but the caller was not privileged "
9913 "(did not have the B<CAP_IPC_LOCK> capability)."
9914 msgstr ""
9915 "B<SHM_HUGETLB> フラグが指定されたが、呼び出し元には権限がなかった "
9916 "(B<CAP_IPC_LOCK> ケーパビリティを持っていなかった)。"
9917
9918 #. type: Plain text
9919 #: build/C/man2/shmget.2:238
9920 msgid "B<SHM_HUGETLB> is a nonportable Linux extension."
9921 msgstr "B<SHM_HUGETLB> は Linux での拡張であり、移植性はない。"
9922
9923 #. type: Plain text
9924 #: build/C/man2/shmget.2:261
9925 msgid ""
9926 "B<IPC_PRIVATE> isn't a flag field but a I<key_t> type.  If this special "
9927 "value is used for I<key>, the system call ignores everything but the least "
9928 "significant 9 bits of I<shmflg> and creates a new shared memory segment (on "
9929 "success)."
9930 msgstr ""
9931 "B<IPC_PRIVATE> はフラグではなく I<key_t> 型である。 この特別な値が I<key> に"
9932 "使用された場合は、 B<shmget>()  は I<shmflg> の下位 9 ビットを除いた全てを無"
9933 "視し、 (成功すれば) 新しい共有メモリ・セグメントを作成する。"
9934
9935 #. type: Plain text
9936 #: build/C/man2/shmget.2:265
9937 msgid ""
9938 "The following limits on shared memory segment resources affect the B<shmget>"
9939 "()  call:"
9940 msgstr ""
9941 "B<shmget>()  コールに影響する共有メモリ・セグメント資源の制限は以下の通りであ"
9942 "る:"
9943
9944 #. type: TP
9945 #: build/C/man2/shmget.2:265
9946 #, no-wrap
9947 msgid "B<SHMALL>"
9948 msgstr "B<SHMALL>"
9949
9950 #. type: Plain text
9951 #: build/C/man2/shmget.2:270
9952 msgid ""
9953 "System wide maximum of shared memory pages (on Linux, this limit can be read "
9954 "and modified via I</proc/sys/kernel/shmall>)."
9955 msgstr ""
9956 "システム全体の共有メモリ・ページの最大数 (Linux では、この上限値は I</proc/"
9957 "sys/kernel/shmall> 経由で参照したり、変更したりできる)。"
9958
9959 #. type: TP
9960 #: build/C/man2/shmget.2:270
9961 #, no-wrap
9962 msgid "B<SHMMAX>"
9963 msgstr "B<SHMMAX>"
9964
9965 #. type: Plain text
9966 #: build/C/man2/shmget.2:275
9967 msgid ""
9968 "Maximum size in bytes for a shared memory segment: policy dependent (on "
9969 "Linux, this limit can be read and modified via I</proc/sys/kernel/shmmax>)."
9970 msgstr ""
9971 "共有メモリ・セグメントのバイト単位の大きさの上限: 方針依存 (Linux では、この"
9972 "上限値は I</proc/sys/kernel/shmmax> 経由で参照したり、変更したりできる)。"
9973
9974 #. type: TP
9975 #: build/C/man2/shmget.2:275
9976 #, no-wrap
9977 msgid "B<SHMMIN>"
9978 msgstr "B<SHMMIN>"
9979
9980 #. type: Plain text
9981 #: build/C/man2/shmget.2:281
9982 msgid ""
9983 "Minimum size in bytes for a shared memory segment: implementation dependent "
9984 "(currently 1 byte, though B<PAGE_SIZE> is the effective minimum size)."
9985 msgstr ""
9986 "共有メモリ・セグメントのバイト単位の大きさの下限: 実装依存 (現在は 1 バイトだ"
9987 "が、実質的な最小サイズは B<PAGE_SIZE> である)。"
9988
9989 #. type: TP
9990 #: build/C/man2/shmget.2:281
9991 #, no-wrap
9992 msgid "B<SHMMNI>"
9993 msgstr "B<SHMMNI>"
9994
9995 #.  Kernels between 2.4.x and 2.6.8 had an off-by-one error that meant
9996 #.  that we could create one more segment than SHMMNI -- MTK
9997 #.  This /proc file is not available in Linux 2.2 and earlier -- MTK
9998 #. type: Plain text
9999 #: build/C/man2/shmget.2:290
10000 msgid ""
10001 "System wide maximum number of shared memory segments: implementation "
10002 "dependent (currently 4096, was 128 before Linux 2.3.99; on Linux, this limit "
10003 "can be read and modified via I</proc/sys/kernel/shmmni>)."
10004 msgstr ""
10005 "システム全体の共有メモリーの数の上限: 実装依存 (現在は 4096。Linux 2.3.99 よ"
10006 "り前では 128。 Linux では、この上限値は I</proc/sys/kernel/shmmni> 経由で参照"
10007 "したり、変更したりできる)。"
10008
10009 #. type: Plain text
10010 #: build/C/man2/shmget.2:294
10011 msgid ""
10012 "The implementation has no specific limits for the per-process maximum number "
10013 "of shared memory segments (B<SHMSEG>)."
10014 msgstr ""
10015 "プロセス当りの共有メモリ・セグメントの個数の最大値 (B<SHMSEG>)  に関する実装"
10016 "上の制限はない。"
10017
10018 #. type: Plain text
10019 #: build/C/man2/shmget.2:300
10020 msgid ""
10021 "Until version 2.3.30 Linux would return B<EIDRM> for a B<shmget>()  on a "
10022 "shared memory segment scheduled for deletion."
10023 msgstr ""
10024 "バージョン 2.3.30 までは、Linux は 削除が予定されている共有メモリ・セグメント"
10025 "に対して B<shmget>()  が行われると B<EIDRM> を返していた。"
10026
10027 #. type: Plain text
10028 #: build/C/man2/shmget.2:306
10029 msgid ""
10030 "The name choice B<IPC_PRIVATE> was perhaps unfortunate, B<IPC_NEW> would "
10031 "more clearly show its function."
10032 msgstr ""
10033 "B<IPC_PRIVATE> という名前を選んだのはおそらく失敗であろう。 B<IPC_NEW> の方が"
10034 "より明確にその機能を表しているだろう。"
10035
10036 #. type: Plain text
10037 #: build/C/man2/shmget.2:314
10038 msgid ""
10039 "B<shmat>(2), B<shmctl>(2), B<shmdt>(2), B<ftok>(3), B<capabilities>(7), "
10040 "B<shm_overview>(7), B<svipc>(7)"
10041 msgstr ""
10042 "B<shmat>(2), B<shmctl>(2), B<shmdt>(2), B<ftok>(3), B<capabilities>(7), "
10043 "B<shm_overview>(7), B<svipc>(7)"
10044
10045 #. type: TH
10046 #: build/C/man2/shmop.2:41
10047 #, no-wrap
10048 msgid "SHMOP"
10049 msgstr "SHMOP"
10050
10051 #. type: Plain text
10052 #: build/C/man2/shmop.2:44
10053 msgid "shmat, shmdt - System V shared memory operations"
10054 msgstr "shmat, shmdt - System V 共有メモリ (shared memory) の操作"
10055
10056 #. type: Plain text
10057 #: build/C/man2/shmop.2:48
10058 #, no-wrap
10059 msgid ""
10060 "B<#include E<lt>sys/types.hE<gt>>\n"
10061 "B<#include E<lt>sys/shm.hE<gt>>\n"
10062 msgstr ""
10063 "B<#include E<lt>sys/types.hE<gt>>\n"
10064 "B<#include E<lt>sys/shm.hE<gt>>\n"
10065
10066 #. type: Plain text
10067 #: build/C/man2/shmop.2:50
10068 #, no-wrap
10069 msgid "B<void *shmat(int >I<shmid>B<, const void *>I<shmaddr>B<, int >I<shmflg>B<);>\n"
10070 msgstr "B<void *shmat(int >I<shmid>B<, const void *>I<shmaddr>B<, int >I<shmflg>B<);>\n"
10071
10072 #. type: Plain text
10073 #: build/C/man2/shmop.2:52
10074 #, no-wrap
10075 msgid "B<int shmdt(const void *>I<shmaddr>B<);>\n"
10076 msgstr "B<int shmdt(const void *>I<shmaddr>B<);>\n"
10077
10078 #. type: Plain text
10079 #: build/C/man2/shmop.2:61
10080 msgid ""
10081 "B<shmat>()  attaches the System V shared memory segment identified by "
10082 "I<shmid> to the address space of the calling process.  The attaching address "
10083 "is specified by I<shmaddr> with one of the following criteria:"
10084 msgstr ""
10085 "B<shmat>()  は I<shmid> で指定された System V 共有メモリ・セグメント (shared "
10086 "memory segment) を コールしたプロセスのアドレス空間に付加 (attach) する。 付"
10087 "加するアドレスは I<shmaddr> に以下のどれかの形式で指定する:"
10088
10089 #. type: Plain text
10090 #: build/C/man2/shmop.2:67
10091 msgid ""
10092 "If I<shmaddr> is NULL, the system chooses a suitable (unused) address at "
10093 "which to attach the segment."
10094 msgstr ""
10095 "I<shmaddr> が NULL ならば、システムはセグメントを付加するための 適切な (使用"
10096 "されていない) アドレスを選択する。"
10097
10098 #. type: Plain text
10099 #: build/C/man2/shmop.2:82
10100 msgid ""
10101 "If I<shmaddr> isn't NULL and B<SHM_RND> is specified in I<shmflg>, the "
10102 "attach occurs at the address equal to I<shmaddr> rounded down to the nearest "
10103 "multiple of B<SHMLBA>.  Otherwise I<shmaddr> must be a page-aligned address "
10104 "at which the attach occurs."
10105 msgstr ""
10106 "I<shmaddr> が NULL でなく B<SHM_RND> が I<shmflg> に指定されている場合は、 "
10107 "I<shmaddr> を B<SHMLBA> の倍数へと切り捨てた (rounding down) のと等しいアドレ"
10108 "スへ付加する。 その他の場合は I<shmaddr> は付加を行なうアドレスで、ページ境界"
10109 "を指している必要がある。"
10110
10111 #. type: Plain text
10112 #: build/C/man2/shmop.2:92
10113 msgid ""
10114 "If B<SHM_RDONLY> is specified in I<shmflg>, the segment is attached for "
10115 "reading and the process must have read permission for the segment.  "
10116 "Otherwise the segment is attached for read and write and the process must "
10117 "have read and write permission for the segment.  There is no notion of a "
10118 "write-only shared memory segment."
10119 msgstr ""
10120 "B<SHM_RDONLY> が I<shmflg> に指定されていた場合は、 セグメントは読み込み専用"
10121 "に付加され、プロセスはそのセグメントへの 読み込み許可を持たなければならな"
10122 "い。 そうでなければそのセグメントは読み込みと書き込みのために付加され、 プロ"
10123 "セスはそのセグメントに読み込みと書き込みの許可を持つ必要がある。 書き込み専用"
10124 "の共有メモリ・セグメントという概念は存在しない。"
10125
10126 #. type: Plain text
10127 #: build/C/man2/shmop.2:107
10128 msgid ""
10129 "The (Linux-specific)  B<SHM_REMAP> flag may be specified in I<shmflg> to "
10130 "indicate that the mapping of the segment should replace any existing mapping "
10131 "in the range starting at I<shmaddr> and continuing for the size of the "
10132 "segment.  (Normally an B<EINVAL> error would result if a mapping already "
10133 "exists in this address range.)  In this case, I<shmaddr> must not be NULL."
10134 msgstr ""
10135 "(Linux 特有の)  B<SHM_REMAP> フラグが I<shmflg> に指定された場合は、 セグメン"
10136 "トのマッピングを既存のマッピングに置き換える。 マッピングの範囲は、 "
10137 "I<shmaddr> から始まりセグメントのサイズ分だけある (通常 B<EINVAL> エラーは、"
10138 "このアドレス範囲にマッピングが既に存在するために起る)。 このフラグを指定する"
10139 "場合は、 I<shmaddr> が NULL であってはならない。"
10140
10141 #. type: Plain text
10142 #: build/C/man2/shmop.2:114
10143 msgid ""
10144 "The B<brk>(2)  value of the calling process is not altered by the attach.  "
10145 "The segment will automatically be detached at process exit.  The same "
10146 "segment may be attached as a read and as a read-write one, and more than "
10147 "once, in the process's address space."
10148 msgstr ""
10149 "呼び出したプロセスの B<brk>(2)  の値は付加によって変化しない。 そのセグメント"
10150 "はプロセスが終了 (exit) したら自動的に分離 (detach) される。 同じセグメントを"
10151 "プロセスのアドレス空間に、読み込み専用および読み書き両用 として付加でき、また"
10152 "複数回付加することもできる。"
10153
10154 #. type: Plain text
10155 #: build/C/man2/shmop.2:122
10156 msgid ""
10157 "A successful B<shmat>()  call updates the members of the I<shmid_ds> "
10158 "structure (see B<shmctl>(2))  associated with the shared memory segment as "
10159 "follows:"
10160 msgstr ""
10161 "成功した B<shmat>()  コールは共有メモリ・セグメントに関連する I<shmid_ds> 構"
10162 "造体 (B<shmctl>(2)  を参照) のメンバーを以下のように更新する:"
10163
10164 #. type: Plain text
10165 #: build/C/man2/shmop.2:125
10166 msgid "I<shm_atime> is set to the current time."
10167 msgstr "I<shm_atime> には現在の時刻を設定する。"
10168
10169 #. type: Plain text
10170 #: build/C/man2/shmop.2:128 build/C/man2/shmop.2:154
10171 msgid "I<shm_lpid> is set to the process-ID of the calling process."
10172 msgstr "I<shm_lpid> には呼び出したプロセスのプロセス ID が設定される。"
10173
10174 #. type: Plain text
10175 #: build/C/man2/shmop.2:131
10176 msgid "I<shm_nattch> is incremented by one."
10177 msgstr "I<shm_nattch> を 1 増加させる。"
10178
10179 #. type: Plain text
10180 #: build/C/man2/shmop.2:142
10181 msgid ""
10182 "B<shmdt>()  detaches the shared memory segment located at the address "
10183 "specified by I<shmaddr> from the address space of the calling process.  The "
10184 "to-be-detached segment must be currently attached with I<shmaddr> equal to "
10185 "the value returned by the attaching B<shmat>()  call."
10186 msgstr ""
10187 "B<shmdt>()  は呼び出したプロセスのアドレス空間から I<shmaddr> で指定されたア"
10188 "ドレスに配置された共有メモリ・セグメントを分離 (detach) する。 分離する共有メ"
10189 "モリ・セグメントは、現在 I<shmaddr> に付加されているものでなければならない。 "
10190 "I<shmaddr> は、それを付加した時に B<shmat>()  が返した値に等しくなければなら"
10191 "ない。"
10192
10193 #. type: Plain text
10194 #: build/C/man2/shmop.2:148
10195 msgid ""
10196 "On a successful B<shmdt>()  call the system updates the members of the "
10197 "I<shmid_ds> structure associated with the shared memory segment as follows:"
10198 msgstr ""
10199 "成功した B<shmdt>()  コールはその共有メモリ・セグメントに関連する "
10200 "I<shmid_ds> 構造体のメンバーを以下のように更新する:"
10201
10202 #. type: Plain text
10203 #: build/C/man2/shmop.2:151
10204 msgid "I<shm_dtime> is set to the current time."
10205 msgstr "I<shm_dtime> には現在の時刻が設定される。"
10206
10207 #. type: Plain text
10208 #: build/C/man2/shmop.2:159
10209 msgid ""
10210 "I<shm_nattch> is decremented by one.  If it becomes 0 and the segment is "
10211 "marked for deletion, the segment is deleted."
10212 msgstr ""
10213 "I<shm_nattch> を 1 減少させる。 もし 0 になり、削除マークがあった場合は その"
10214 "セグメントは削除される。"
10215
10216 #. type: Plain text
10217 #: build/C/man2/shmop.2:163
10218 msgid ""
10219 "After a B<fork>(2)  the child inherits the attached shared memory segments."
10220 msgstr ""
10221 "B<fork>(2)  した後、子プロセスは付加された共有メモリ・セグメントを継承する。"
10222
10223 #. type: Plain text
10224 #: build/C/man2/shmop.2:167
10225 msgid ""
10226 "After an B<execve>(2)  all attached shared memory segments are detached from "
10227 "the process."
10228 msgstr ""
10229 "B<exec>(2)  した後、全ての付加された共有メモリ・セグメントはプロセスから分離"
10230 "される。"
10231
10232 #. type: Plain text
10233 #: build/C/man2/shmop.2:171
10234 msgid ""
10235 "Upon B<_exit>(2)  all attached shared memory segments are detached from the "
10236 "process."
10237 msgstr ""
10238 "B<exit>(2)  において、全ての付加された共有メモリ・セグメントはプロセスから分"
10239 "離される。"
10240
10241 #. type: Plain text
10242 #: build/C/man2/shmop.2:179
10243 msgid ""
10244 "On success B<shmat>()  returns the address of the attached shared memory "
10245 "segment; on error I<(void\\ *)\\ -1> is returned, and I<errno> is set to "
10246 "indicate the cause of the error."
10247 msgstr ""
10248 "B<shmat>()  は、成功した場合、 付加された共有メモリ・セグメントのアドレスを返"
10249 "す。 エラーの場合、 I<(void\\ *)\\ -1> を返し、 I<errno> にエラーの原因を示す"
10250 "値を設定する。"
10251
10252 #. type: Plain text
10253 #: build/C/man2/shmop.2:185
10254 msgid ""
10255 "On success B<shmdt>()  returns 0; on error -1 is returned, and I<errno> is "
10256 "set to indicate the cause of the error."
10257 msgstr ""
10258 "B<shmdt>()  は、成功すると 0 を返す。 エラーの場合、-1 を返し、 I<errno> にエ"
10259 "ラーの原因を示す値を設定する。"
10260
10261 #. type: Plain text
10262 #: build/C/man2/shmop.2:191
10263 msgid "When B<shmat>()  fails, I<errno> is set to one of the following:"
10264 msgstr ""
10265 "B<shmat>()  が失敗した場合、 I<errno> に以下の値のどれかを設定して返す:"
10266
10267 #. type: Plain text
10268 #: build/C/man2/shmop.2:197
10269 msgid ""
10270 "The calling process does not have the required permissions for the requested "
10271 "attach type, and does not have the B<CAP_IPC_OWNER> capability."
10272 msgstr ""
10273 "呼び出したプロセスに要求された種類の付加に必要な許可がなく、 "
10274 "B<CAP_IPC_OWNER> ケーパビリティ (capability) がない。"
10275
10276 #. type: Plain text
10277 #: build/C/man2/shmop.2:214
10278 msgid ""
10279 "Invalid I<shmid> value, unaligned (i.e., not page-aligned and B<SHM_RND> was "
10280 "not specified) or invalid I<shmaddr> value, or can't attach segment at "
10281 "I<shmaddr>, or B<SHM_REMAP> was specified and I<shmaddr> was NULL."
10282 msgstr ""
10283 "I<shmid> の値が不正である。 I<shmaddr> の値が境界違反 (unaligned) (つまり、"
10284 "ページ境界に合っておらず、 B<SHM_RND> が指定されていない) または が不正であ"
10285 "る。 I<shmaddr> へのセグメントの付加に失敗した。 または B<SHM_REMAP> が指定さ"
10286 "れているが、 I<shmaddr> が NULL であった。"
10287
10288 #. type: Plain text
10289 #: build/C/man2/shmop.2:217
10290 msgid "Could not allocate memory for the descriptor or for the page tables."
10291 msgstr ""
10292 "ディスクリプター (descriptor) やページ・テーブルのためのメモリを 割り当てるこ"
10293 "とができない。"
10294
10295 #. type: Plain text
10296 #: build/C/man2/shmop.2:223
10297 msgid "When B<shmdt>()  fails, I<errno> is set as follows:"
10298 msgstr "B<shmdt>()  が失敗した場合、 B<EINVAL> は以下のようにセットされる:"
10299
10300 #.  The following since 2.6.17-rc1:
10301 #. type: Plain text
10302 #: build/C/man2/shmop.2:231
10303 msgid ""
10304 "There is no shared memory segment attached at I<shmaddr>; or, I<shmaddr> is "
10305 "not aligned on a page boundary."
10306 msgstr ""
10307 "I<shmaddr> に付加された共有メモリ・セグメントが存在しない。 もしくは、 "
10308 "I<shmaddr> がページ境界に合っていない。"
10309
10310 #. type: Plain text
10311 #: build/C/man2/shmop.2:250
10312 msgid ""
10313 "In SVID 3 (or perhaps earlier)  the type of the I<shmaddr> argument was "
10314 "changed from I<char\\ *> into I<const void\\ *>, and the returned type of "
10315 "B<shmat>()  from I<char\\ *> into I<void\\ *>.  (Linux libc4 and libc5 have "
10316 "the I<char\\ *> prototypes; glibc2 has I<void\\ *>.)"
10317 msgstr ""
10318 "SVID 3 で (たぶんそれより前だと思うが)  I<shmaddr> 引き数の型は I<char\\ *> "
10319 "から I<const void\\ *> に、I<shmat>() の返り値の型は I<char\\ *> から I<void"
10320 "\\ *> に変更された (Linux では libc4 と libc5 のプロトタイプは I<char\\ *> で"
10321 "あり、glibc2 のプロトタイプは I<void\\ *> である)。"
10322
10323 #. type: Plain text
10324 #: build/C/man2/shmop.2:262
10325 msgid ""
10326 "Using B<shmat>()  with I<shmaddr> equal to NULL is the preferred, portable "
10327 "way of attaching a shared memory segment.  Be aware that the shared memory "
10328 "segment attached in this way may be attached at different addresses in "
10329 "different processes.  Therefore, any pointers maintained within the shared "
10330 "memory must be made relative (typically to the starting address of the "
10331 "segment), rather than absolute."
10332 msgstr ""
10333 "共有メモリセグメントを付加する場合の移植性の高い方法としては、 I<shmaddr> を "
10334 "NULL にして B<shmat>()  を使用するのがよい。 このような方法で付加される共有メ"
10335 "モリセグメントは、 プロセスが異なれば別のアドレスに付加される、という点に注意"
10336 "すること。 よって共有メモリ内で管理されるポインタは、 絶対アドレスではなく、 "
10337 "(一般的にはセグメントの開始アドレスからの)  相対アドレスで作成するべきであ"
10338 "る。"
10339
10340 #. type: Plain text
10341 #: build/C/man2/shmop.2:267
10342 msgid ""
10343 "On Linux, it is possible to attach a shared memory segment even if it is "
10344 "already marked to be deleted.  However, POSIX.1-2001 does not specify this "
10345 "behavior and many other implementations do not support it."
10346 msgstr ""
10347 "Linux では共有メモリセグメントに既に削除マークが付けられていても、 その共有メ"
10348 "モリセグメントを付加することができる。 しかし POSIX.1-2001 ではこのような動作"
10349 "を指定しておらず、 他の多くの実装もこれをサポートしていない。"
10350
10351 #. type: Plain text
10352 #: build/C/man2/shmop.2:270
10353 msgid "The following system parameter affects B<shmat>():"
10354 msgstr "以下のシステム・パラメーターは、 B<shmat>()  に影響する:"
10355
10356 #.  FIXME A good explanation of the rationale for the existence
10357 #.  of SHMLBA would be useful here
10358 #. type: TP
10359 #: build/C/man2/shmop.2:270
10360 #, no-wrap
10361 msgid "B<SHMLBA>"
10362 msgstr "B<SHMLBA>"
10363
10364 #.  FIXME That last sentence isn't true for all Linux
10365 #.  architectures (i.e., SHMLBA != PAGE_SIZE for some architectures)
10366 #.  -- MTK, Nov 04
10367 #. type: Plain text
10368 #: build/C/man2/shmop.2:283
10369 msgid ""
10370 "Segment low boundary address multiple.  Must be page aligned.  For the "
10371 "current implementation the B<SHMLBA> value is B<PAGE_SIZE>."
10372 msgstr ""
10373 "セグメントの境界アドレスの最小倍数。ページ境界に合ってなければならない。 現在"
10374 "の実装では B<SHMLBA> の値は B<PAGE_SIZE> である。"
10375
10376 #. type: Plain text
10377 #: build/C/man2/shmop.2:287
10378 msgid ""
10379 "The implementation places no intrinsic limit on the per-process maximum "
10380 "number of shared memory segments (B<SHMSEG>)."
10381 msgstr ""
10382 "現在の実装では、プロセスごとの 共有メモリ・セグメントの最大数 (B<SHMSEG>)  に"
10383 "関する実装依存の制限はない。"
10384
10385 #. type: Plain text
10386 #: build/C/man2/shmop.2:295
10387 msgid ""
10388 "B<brk>(2), B<mmap>(2), B<shmctl>(2), B<shmget>(2), B<capabilities>(7), "
10389 "B<shm_overview>(7), B<svipc>(7)"
10390 msgstr ""
10391 "B<brk>(2), B<mmap>(2), B<shmctl>(2), B<shmget>(2), B<capabilities>(7), "
10392 "B<shm_overview>(7), B<svipc>(7)"
10393
10394 #. type: TH
10395 #: build/C/man2/subpage_prot.2:30
10396 #, no-wrap
10397 msgid "SUBPAGE_PROT"
10398 msgstr "SUBPAGE_PROT"
10399
10400 #. type: TH
10401 #: build/C/man2/subpage_prot.2:30
10402 #, no-wrap
10403 msgid "2012-07-13"
10404 msgstr "2012-07-13"
10405
10406 #. type: Plain text
10407 #: build/C/man2/subpage_prot.2:33
10408 msgid "subpage_prot - define a subpage protection for an address range"
10409 msgstr ""
10410
10411 #. type: Plain text
10412 #: build/C/man2/subpage_prot.2:37
10413 #, no-wrap
10414 msgid ""
10415 "B<long subpage_prot(unsigned long >I<addr>B<, unsigned long >I<len>B<,>\n"
10416 "B<                  uint32_t *>I<map>B<);>\n"
10417 msgstr ""
10418 "B<long subpage_prot(unsigned long >I<addr>B<, unsigned long >I<len>B<,>\n"
10419 "B<                  uint32_t *>I<map>B<);>\n"
10420
10421 #. type: Plain text
10422 #: build/C/man2/subpage_prot.2:41
10423 msgid "I<Note>: There is no glibc wrapper for this system call; see NOTES."
10424 msgstr ""
10425 "I<注>: このシステムコールには glibc のラッパー関数は存在しない。「注意」の節"
10426 "を参照。"
10427
10428 #. type: Plain text
10429 #: build/C/man2/subpage_prot.2:47
10430 msgid ""
10431 "The PowerPC-specific B<subpage_prot>()  system call provides the facility to "
10432 "control the access permissions on individual 4kB subpages on systems "
10433 "configured with a page size of 64kB."
10434 msgstr ""
10435
10436 #. type: Plain text
10437 #: build/C/man2/subpage_prot.2:54
10438 msgid ""
10439 "The protection map is applied to the memory pages in the region starting at "
10440 "I<addr> and continuing for I<len> bytes.  Both of these arguments must be "
10441 "aligned to a 64-kB boundary."
10442 msgstr ""
10443
10444 #. type: Plain text
10445 #: build/C/man2/subpage_prot.2:66
10446 msgid ""
10447 "The protection map is specified in the buffer pointed to by I<map>.  The map "
10448 "has 2 bits per 4kB subpage; thus each 32-bit word specifies the protections "
10449 "of 16 4kB subpages inside a 64kB page (so, the number of 32-bit words "
10450 "pointed to by I<map> should equate to the number of 64-kB pages specified by "
10451 "I<len>).  Each 2-bit field in the protection map is either 0 to allow any "
10452 "access, 1 to prevent writes, or 2 or 3 to prevent all accesses."
10453 msgstr ""
10454
10455 #. type: Plain text
10456 #: build/C/man2/subpage_prot.2:71
10457 msgid ""
10458 "On success, B<subpage_prot>()  returns 0.  Otherwise, one of the error codes "
10459 "specified below is returned."
10460 msgstr ""
10461
10462 #. type: Plain text
10463 #: build/C/man2/subpage_prot.2:77
10464 msgid "The buffer referred to by I<map> is not accessible."
10465 msgstr ""
10466
10467 #. type: Plain text
10468 #: build/C/man2/subpage_prot.2:87
10469 msgid ""
10470 "The I<addr> or I<len> arguments are incorrect.  Both of these arguments must "
10471 "be aligned to a multiple of the system page size, and they must not refer to "
10472 "a region outside of the address space of the process or to a region that "
10473 "consists of huge pages."
10474 msgstr ""
10475
10476 #. type: Plain text
10477 #: build/C/man2/subpage_prot.2:90 build/C/man2/sync_file_range.2:166
10478 msgid "Out of memory."
10479 msgstr "メモリ不足である。"
10480
10481 #. type: Plain text
10482 #: build/C/man2/subpage_prot.2:96
10483 msgid ""
10484 "This system call is provided on the PowerPC architecture since Linux "
10485 "2.6.25.  The system call is provided only if the kernel is configured with "
10486 "B<CONFIG_PPC_64K_PAGES>.  No library support is provided."
10487 msgstr ""
10488
10489 #. type: Plain text
10490 #: build/C/man2/subpage_prot.2:101
10491 msgid ""
10492 "Glibc does not provide a wrapper for this system call; call it using "
10493 "B<syscall>(2)."
10494 msgstr ""
10495
10496 #. type: Plain text
10497 #: build/C/man2/subpage_prot.2:106
10498 msgid ""
10499 "Normal page protections (at the 64-kB page level) also apply; the subpage "
10500 "protection mechanism is an additional constraint, so putting 0 in a 2-bit "
10501 "field won't allow writes to a page that is otherwise write-protected."
10502 msgstr ""
10503
10504 #. type: SS
10505 #: build/C/man2/subpage_prot.2:106
10506 #, no-wrap
10507 msgid "Rationale"
10508 msgstr ""
10509
10510 #.  In the initial implementation, it was the case that:
10511 #.      In fact the whole process is switched to use 4k hardware pages when the
10512 #.      subpage_prot system call is used, but this could be improved in future
10513 #.      to switch only the affected segments.
10514 #.  But Paul Mackerass says (Oct 2010): I'm pretty sure we now only switch
10515 #.  the affected segment, not the whole process.
10516 #. type: Plain text
10517 #: build/C/man2/subpage_prot.2:128
10518 msgid ""
10519 "This system call is provided to assist writing emulators that operate using "
10520 "64-kB pages on PowerPC systems.  When emulating systems such as x86, which "
10521 "uses a smaller page size, the emulator can no longer use the memory-"
10522 "management unit (MMU)  and normal system calls for controlling page "
10523 "protections.  (The emulator could emulate the MMU by checking and possibly "
10524 "remapping the address for each memory access in software, but that is "
10525 "slow.)  The idea is that the emulator supplies an array of protection masks "
10526 "to apply to a specified range of virtual addresses.  These masks are applied "
10527 "at the level where hardware page-table entries (PTEs)  are inserted into the "
10528 "hardware page table based on the Linux PTEs, so the Linux PTEs are not "
10529 "affected.  Implicit in this is that the regions of the address space that "
10530 "are protected are switched to use 4-kB hardware pages rather than 64-kB "
10531 "hardware pages (on machines with hardware 64-kB page support)."
10532 msgstr ""
10533
10534 #. type: Plain text
10535 #: build/C/man2/subpage_prot.2:131
10536 msgid "B<mprotect>(2), B<syscall>(2)"
10537 msgstr "B<mprotect>(2), B<syscall>(2)"
10538
10539 #. type: Plain text
10540 #: build/C/man2/subpage_prot.2:134
10541 msgid "I<Documentation/vm/hugetlbpage.txt> in the Linux kernel source tree"
10542 msgstr "Linux カーネルソースの I<Documentation/vm/hugetlbpage.txt>"
10543
10544 #. type: TH
10545 #: build/C/man2/sync_file_range.2:30
10546 #, no-wrap
10547 msgid "SYNC_FILE_RANGE"
10548 msgstr "SYNC_FILE_RANGE"
10549
10550 #. type: Plain text
10551 #: build/C/man2/sync_file_range.2:33
10552 msgid "sync_file_range - sync a file segment with disk"
10553 msgstr "sync_file_range - ファイルセグメントをディスクと同期する"
10554
10555 #. type: Plain text
10556 #: build/C/man2/sync_file_range.2:37
10557 #, no-wrap
10558 msgid ""
10559 "B<#define _GNU_SOURCE>         /* See feature_test_macros(7) */\n"
10560 "B<#include E<lt>fcntl.hE<gt>>\n"
10561 msgstr ""
10562 "B<#define _GNU_SOURCE>         /* feature_test_macros(7) 参照 */\n"
10563 "B<#include E<lt>fcntl.hE<gt>>\n"
10564
10565 #. type: Plain text
10566 #: build/C/man2/sync_file_range.2:40
10567 #, no-wrap
10568 msgid ""
10569 "B<int sync_file_range(int >I<fd>B<, off64_t >I<offset>B<, off64_t >I<nbytes>B<,>\n"
10570 "B<                    unsigned int >I<flags>B<);>\n"
10571 msgstr ""
10572 "B<int sync_file_range(int >I<fd>B<, off64_t >I<offset>B<, off64_t >I<nbytes>B<,>\n"
10573 "B<                    unsigned int >I<flags>B<);>\n"
10574
10575 #. type: Plain text
10576 #: build/C/man2/sync_file_range.2:47
10577 msgid ""
10578 "B<sync_file_range>()  permits fine control when synchronizing the open file "
10579 "referred to by the file descriptor I<fd> with disk."
10580 msgstr ""
10581 "B<sync_file_range>()  を使うと、ファイルディスクリプタ I<fd> で参照されるオー"
10582 "プンされたファイルのディスクとの同期に関して、 きめ細かな制御が可能となる。"
10583
10584 #. type: Plain text
10585 #: build/C/man2/sync_file_range.2:61
10586 msgid ""
10587 "I<offset> is the starting byte of the file range to be synchronized.  "
10588 "I<nbytes> specifies the length of the range to be synchronized, in bytes; if "
10589 "I<nbytes> is zero, then all bytes from I<offset> through to the end of file "
10590 "are synchronized.  Synchronization is in units of the system page size: "
10591 "I<offset> is rounded down to a page boundary; I<(offset+nbytes-1)> is "
10592 "rounded up to a page boundary."
10593 msgstr ""
10594 "I<offset> は、同期を行うファイルの領域の開始バイトである。 I<nbytes> には同期"
10595 "を行う領域の長さをバイト単位で指定する。 I<nbytes> が 0 の場合は、 I<offset> "
10596 "からファイル末尾までの全バイトを同期する。 同期はシステムのページサイズの単位"
10597 "で行われる。 I<offset> はページ境界にあわせて切り下げられ、 I<(offset"
10598 "+nbytes-1)> はページ境界にあわせて切り上げられる。"
10599
10600 #. type: Plain text
10601 #: build/C/man2/sync_file_range.2:65
10602 msgid "The I<flags> bit-mask argument can include any of the following values:"
10603 msgstr "ビットマスク引き数 I<flags> には以下の値を指定することができる:"
10604
10605 #. type: TP
10606 #: build/C/man2/sync_file_range.2:65
10607 #, no-wrap
10608 msgid "B<SYNC_FILE_RANGE_WAIT_BEFORE>"
10609 msgstr "B<SYNC_FILE_RANGE_WAIT_BEFORE>"
10610
10611 #. type: Plain text
10612 #: build/C/man2/sync_file_range.2:70
10613 msgid ""
10614 "Wait upon write-out of all pages in the specified range that have already "
10615 "been submitted to the device driver for write-out before performing any "
10616 "write."
10617 msgstr ""
10618 "何らかの書き込みを行う前に、指定された領域のページで 書き出しを行うようにデバ"
10619 "イスドライバにすでに要求が発行されている ページの書き出しが全て完了するのを待"
10620 "つ。"
10621
10622 #. type: TP
10623 #: build/C/man2/sync_file_range.2:70 build/C/man2/sync_file_range.2:120
10624 #, no-wrap
10625 msgid "B<SYNC_FILE_RANGE_WRITE>"
10626 msgstr "B<SYNC_FILE_RANGE_WRITE>"
10627
10628 #. type: Plain text
10629 #: build/C/man2/sync_file_range.2:76
10630 msgid ""
10631 "Initiate write-out of all dirty pages in the specified range which are not "
10632 "presently submitted write-out.  Note that even this may block if you attempt "
10633 "to write more than request queue size."
10634 msgstr ""
10635 "指定された領域のページで、書き出し要求が発行されていない 全ての dirty (キャッ"
10636 "シュだけが変更されている) ページの 書き出しを開始する。 リクエストキューの大"
10637 "きさより多く書き込もうとした場合には、 この処理は停止 (block) する可能性があ"
10638 "る点に注意すること。"
10639
10640 #. type: TP
10641 #: build/C/man2/sync_file_range.2:76
10642 #, no-wrap
10643 msgid "B<SYNC_FILE_RANGE_WAIT_AFTER>"
10644 msgstr "B<SYNC_FILE_RANGE_WAIT_AFTER>"
10645
10646 #. type: Plain text
10647 #: build/C/man2/sync_file_range.2:80
10648 msgid ""
10649 "Wait upon write-out of all pages in the range after performing any write."
10650 msgstr ""
10651 "何らかの書き込み後に、指定された領域の全てのページの 書き出しが行われるのを待"
10652 "つ。"
10653
10654 #. type: Plain text
10655 #: build/C/man2/sync_file_range.2:84
10656 msgid "Specifying I<flags> as 0 is permitted, as a no-op."
10657 msgstr "I<flags> に 0 を指定した場合、何もしないことを表す。"
10658
10659 #. type: SS
10660 #: build/C/man2/sync_file_range.2:84
10661 #, no-wrap
10662 msgid "Warning"
10663 msgstr "警告"
10664
10665 #. type: Plain text
10666 #: build/C/man2/sync_file_range.2:100
10667 msgid ""
10668 "This system call is extremely dangerous and should not be used in portable "
10669 "programs.  None of these operations writes out the file's metadata.  "
10670 "Therefore, unless the application is strictly performing overwrites of "
10671 "already-instantiated disk blocks, there are no guarantees that the data will "
10672 "be available after a crash.  There is no user interface to know if a write "
10673 "is purely an overwrite.  On filesystems using copy-on-write semantics (e.g., "
10674 "I<btrfs>)  an overwrite of existing allocated blocks is impossible.  When "
10675 "writing into preallocated space, many filesystems also require calls into "
10676 "the block allocator, which this system call does not sync out to disk.  This "
10677 "system call does not flush disk write caches and thus does not provide any "
10678 "data integrity on systems with volatile disk write caches."
10679 msgstr ""
10680 "このシステムコールは非常に危険であり、 移植性が必要なプログラムで使用すべきで"
10681 "はない。 これらの操作ではどれもファイルのメタデータの書き出しを行わない。 し"
10682 "たがって、アプリケーションにより作成済みのディスクブロックの 上書きの実行が確"
10683 "実に行われない限り、クラッシュの後でもデータが 利用できる保証はない。 書き込"
10684 "みが上書きだけであるかを知るためのユーザインタフェースは存在しない。 "
10685 "(I<btrfs> などの) copy-on-write 動作を使ったファイルシステムでは、 既存の割り"
10686 "当て済みのブロックに対する上書き自体ができない。 前もって割り当てられた領域に"
10687 "書き込みを行う場合、 多くのファイルシステムでは block allocator への書き込み"
10688 "も必要となるが、 このシステムコールは block allocator のディスクへの同期を行"
10689 "わない。 このシステムコールはディスク書き込みキャッシュのフラッシュを 行わな"
10690 "いので、揮発性のディスク書き込みキャッシュを使ったシステムでは このシステム"
10691 "コールではデータの一貫性を確保できないことになる。"
10692
10693 #. type: SS
10694 #: build/C/man2/sync_file_range.2:100
10695 #, no-wrap
10696 msgid "Some details"
10697 msgstr "詳細"
10698
10699 #. type: Plain text
10700 #: build/C/man2/sync_file_range.2:108
10701 msgid ""
10702 "B<SYNC_FILE_RANGE_WAIT_BEFORE> and B<SYNC_FILE_RANGE_WAIT_AFTER> will detect "
10703 "any I/O errors or B<ENOSPC> conditions and will return these to the caller."
10704 msgstr ""
10705 "B<SYNC_FILE_RANGE_WAIT_BEFORE> と B<SYNC_FILE_RANGE_WAIT_AFTER> は I/O エラー"
10706 "や B<ENOSPC> 状態を検出し、呼び出し元にこれらの情報を返す。"
10707
10708 #. type: Plain text
10709 #: build/C/man2/sync_file_range.2:112
10710 msgid "Useful combinations of the I<flags> bits are:"
10711 msgstr "I<flags> の役に立つビットの組み合わせを以下に示す:"
10712
10713 #. type: TP
10714 #: build/C/man2/sync_file_range.2:112
10715 #, no-wrap
10716 msgid "B<SYNC_FILE_RANGE_WAIT_BEFORE | SYNC_FILE_RANGE_WRITE>"
10717 msgstr "B<SYNC_FILE_RANGE_WAIT_BEFORE | SYNC_FILE_RANGE_WRITE>"
10718
10719 #. type: Plain text
10720 #: build/C/man2/sync_file_range.2:120
10721 msgid ""
10722 "Ensures that all pages in the specified range which were dirty when "
10723 "B<sync_file_range>()  was called are placed under write-out.  This is a "
10724 "start-write-for-data-integrity operation."
10725 msgstr ""
10726 "指定された範囲内のページで、 B<sync_file_range>()  が呼び出された際に dirty "
10727 "であった全てのページが、 確実に書き出し対象となるようにする。 これは、start-"
10728 "write-for-data-integrity 操作 (データ完全性確保のための書き込み開始の操作) で"
10729 "ある。"
10730
10731 #. type: Plain text
10732 #: build/C/man2/sync_file_range.2:127
10733 msgid ""
10734 "Start write-out of all dirty pages in the specified range which are not "
10735 "presently under write-out.  This is an asynchronous flush-to-disk "
10736 "operation.  This is not suitable for data integrity operations."
10737 msgstr ""
10738 "指定された範囲内のページで、現在書き出し中でない全ての dirty ページの 書き出"
10739 "しを開始する。これは非同期のディスクへのフラッシュ (flush-to-disk)  操作であ"
10740 "る。データ完全性確保が必要な操作としては適切ではない。"
10741
10742 #. type: TP
10743 #: build/C/man2/sync_file_range.2:127
10744 #, no-wrap
10745 msgid "B<SYNC_FILE_RANGE_WAIT_BEFORE> (or B<SYNC_FILE_RANGE_WAIT_AFTER>)"
10746 msgstr "B<SYNC_FILE_RANGE_WAIT_BEFORE> (or B<SYNC_FILE_RANGE_WAIT_AFTER>)"
10747
10748 #. type: Plain text
10749 #: build/C/man2/sync_file_range.2:134
10750 msgid ""
10751 "Wait for completion of write-out of all pages in the specified range.  This "
10752 "can be used after an earlier B<SYNC_FILE_RANGE_WAIT_BEFORE | "
10753 "SYNC_FILE_RANGE_WRITE> operation to wait for completion of that operation, "
10754 "and obtain its result."
10755 msgstr ""
10756 "指定された範囲内の全てのページの書き出しの完了を待つ。 このフラグは、前に行わ"
10757 "れた操作 B<SYNC_FILE_RANGE_WAIT_BEFORE | SYNC_FILE_RANGE_WRITE> の後に使用で"
10758 "き、この操作の完了を待ち、結果を取得することができる。"
10759
10760 #. type: TP
10761 #: build/C/man2/sync_file_range.2:134
10762 #, no-wrap
10763 msgid "B<SYNC_FILE_RANGE_WAIT_BEFORE | SYNC_FILE_RANGE_WRITE | SYNC_FILE_RANGE_WAIT_AFTER>"
10764 msgstr "B<SYNC_FILE_RANGE_WAIT_BEFORE | SYNC_FILE_RANGE_WRITE | SYNC_FILE_RANGE_WAIT_AFTER>"
10765
10766 #. type: Plain text
10767 #: build/C/man2/sync_file_range.2:141
10768 msgid ""
10769 "This is a write-for-data-integrity operation that will ensure that all pages "
10770 "in the specified range which were dirty when B<sync_file_range>()  was "
10771 "called are committed to disk."
10772 msgstr ""
10773 "これは write-for-data-integrity 操作 (データ完全性確保のための書き込み) であ"
10774 "り、指定された範囲内の、 B<sync_file_range>()  が呼ばれた時点で dirty な全て"
10775 "のページが ディスクに格納されることが保証される。"
10776
10777 #. type: Plain text
10778 #: build/C/man2/sync_file_range.2:147
10779 msgid ""
10780 "On success, B<sync_file_range>()  returns 0; on failure -1 is returned and "
10781 "I<errno> is set to indicate the error."
10782 msgstr ""
10783 "成功の場合、 B<sync_file_range>()  は 0 を返す。失敗の場合、-1 を返し、 "
10784 "I<error> にエラーを示す値を設定する。"
10785
10786 #. type: Plain text
10787 #: build/C/man2/sync_file_range.2:152
10788 msgid "I<fd> is not a valid file descriptor."
10789 msgstr "I<fd> が有効なファイルディスクリプタではない。"
10790
10791 #. type: Plain text
10792 #: build/C/man2/sync_file_range.2:160
10793 msgid ""
10794 "I<flags> specifies an invalid bit; or I<offset> or I<nbytes> is invalid."
10795 msgstr ""
10796 "I<flags> に不正なビットが指定されている。または I<offset> か I<nbytes> が不正"
10797 "である。"
10798
10799 #. type: Plain text
10800 #: build/C/man2/sync_file_range.2:163
10801 msgid "I/O error."
10802 msgstr "I/O エラー。"
10803
10804 #. type: Plain text
10805 #: build/C/man2/sync_file_range.2:169
10806 msgid "Out of disk space."
10807 msgstr "ディスク領域不足である。"
10808
10809 #.  FIXME . (bug?) Actually, how can 'fd' refer to a symbolic link (S_ISLNK)?
10810 #.  (In user space at least) it isn't possible to obtain a file descriptor
10811 #.  for a symbolic link.
10812 #. type: Plain text
10813 #: build/C/man2/sync_file_range.2:177
10814 msgid ""
10815 "I<fd> refers to something other than a regular file, a block device, a "
10816 "directory, or a symbolic link."
10817 msgstr ""
10818 "I<fd> が、通常のファイル、ブロックデバイス、ディレクトリ、シンボリックリンク "
10819 "以外のものを指している。"
10820
10821 #. type: Plain text
10822 #: build/C/man2/sync_file_range.2:180
10823 msgid "B<sync_file_range>()  appeared on Linux in kernel 2.6.17."
10824 msgstr "B<sync_file_range>()  はカーネル 2.6.17 で Linux に登場した。"
10825
10826 #. type: Plain text
10827 #: build/C/man2/sync_file_range.2:183
10828 msgid ""
10829 "This system call is Linux-specific, and should be avoided in portable "
10830 "programs."
10831 msgstr ""
10832 "このシステムコールは Linux 独自であり、 移植性が必要なプログラムでは使用を避"
10833 "けるべきである。"
10834
10835 #.  See kernel commit edd5cd4a9424f22b0fa08bef5e299d41befd5622
10836 #. type: Plain text
10837 #: build/C/man2/sync_file_range.2:200
10838 msgid ""
10839 "Some architectures (e.g., PowerPC, ARM)  need 64-bit arguments to be aligned "
10840 "in a suitable pair of registers.  On such architectures, the call signature "
10841 "of B<sync_file_range>()  shown in the SYNOPSIS would force a register to be "
10842 "wasted as padding between the I<fd> and I<offset> arguments.  (See B<syscall>"
10843 "(2)  for details.)  Therefore, these architectures define a different system "
10844 "call that orders the arguments suitably:"
10845 msgstr ""
10846 "いくつかのアーキテクチャ (例えば、 PowerPC や ARM) では、 64 ビットの引き数は"
10847 "適切なレジスタの組に割り当てる必要がある。 このようなアーキテクチャでは、 "
10848 "「書式」に書かれている B<sync_file_range>() の呼び出しシグネチャーで、 引き"
10849 "数 I<fd> と I<offset> の間のパディング (詰めもの) でレジスタが一つ消費されて"
10850 "しまう (詳細は B<syscall>(2) 参照)。 そのため、 これらのアーキテクチャでは引"
10851 "き数が適切な順序になった別のシステムコールが定義されている。"
10852
10853 #. type: Plain text
10854 #: build/C/man2/sync_file_range.2:205
10855 #, no-wrap
10856 msgid ""
10857 "B<int sync_file_range2(int >I<fd>B<, unsigned int >I<flags>B<,>\n"
10858 "B<                     off64_t >I<offset>B<, off64_t >I<nbytes>B<);>\n"
10859 msgstr ""
10860 "B<int sync_file_range2(int >I<fd>B<, unsigned int >I<flags>B<,>\n"
10861 "B<                     off64_t >I<offset>B<, off64_t >I<nbytes>B<);>\n"
10862
10863 #. type: Plain text
10864 #: build/C/man2/sync_file_range.2:210
10865 msgid ""
10866 "The behavior of this system call is otherwise exactly the same as "
10867 "B<sync_file_range>()."
10868 msgstr ""
10869 "上記の点以外は、このシステムコールの動作は B<sync_file_range>() と\n"
10870 "全く同じである。このシステムコールに対するライブラリによるサポートは\n"
10871 "glibc では提供されていない。"
10872
10873 #. type: Plain text
10874 #: build/C/man2/sync_file_range.2:221
10875 msgid ""
10876 "A system call with this signature first appeared on the ARM architecture in "
10877 "Linux 2.6.20, with the name B<arm_sync_file_range>().  It was renamed in "
10878 "Linux 2.6.22, when the analogous system call was added for PowerPC.  On "
10879 "architectures where glibc support is provided, glibc transparently wraps "
10880 "B<sync_file_range2>()  under the name B<sync_file_range>()."
10881 msgstr ""
10882 "このバージョンのシステムコールは、Linux 2.6.20 で ARM アーキテクチャで\n"
10883 "初めて登場し、 B<arm_sync_file_range>() という名前であった。\n"
10884 "Linux 2.6.22 で、同様のシステムコールが PowerPC 用に追加された際に、\n"
10885 "システムコールの名前が変更された。\n"
10886 "glibc によるサポートが提供されているアーキテクチャでは、\n"
10887 "glibc のラッパー関数は B<sync_file_range>() という名前で\n"
10888 "B<sync_file_range2>() を適切に使用するようになっている。"
10889
10890 #. type: Plain text
10891 #: build/C/man2/sync_file_range.2:226
10892 msgid "B<fdatasync>(2), B<fsync>(2), B<msync>(2), B<sync>(2)"
10893 msgstr "B<fdatasync>(2), B<fsync>(2), B<msync>(2), B<sync>(2)"
10894
10895 #~ msgid "2013-05-12"
10896 #~ msgstr "2013-05-12"
10897
10898 #~ msgid "2013-04-17"
10899 #~ msgstr "2013-04-17"
10900
10901 #~ msgid "2012-04-16"
10902 #~ msgstr "2012-04-16"
10903
10904 #~ msgid "2012-08-14"
10905 #~ msgstr "2012-08-14"
10906
10907 #~ msgid "2012-03-23"
10908 #~ msgstr "2012-03-23"
10909
10910 #~ msgid "B<fallocate>()  returns zero on success, and -1 on failure."
10911 #~ msgstr "B<fallocate>()  は成功すると 0 を返し、エラーの場合は -1 を返す。"
10912
10913 #~ msgid "On success, B<malloc_info>()  returns 0; on error, it returns -1."
10914 #~ msgstr "B<malloc_info>() は成功すると 0 を返す。エラーの場合は -1 を返す。"
10915
10916 #~ msgid "2012-05-31"
10917 #~ msgstr "2012-05-31"
10918
10919 #~ msgid ""
10920 #~ "A valid segment identifier, I<shmid>, is returned on success, -1 on error."
10921 #~ msgstr ""
10922 #~ "成功した場合、有効なセグメント識別子 I<shmid> が返される。エラーの場合、 "
10923 #~ "-1 が返される。"
10924
10925 #~ msgid ""
10926 #~ "The ARM architecture needs 64-bit arguments to be aligned in a suitable "
10927 #~ "pair of registers.  On this architecture, the call signature of "
10928 #~ "B<posix_fadvise>()  is flawed, since it forces a register to be wasted as "
10929 #~ "padding between the I<fd> and I<len> arguments.  Therefore, since Linux "
10930 #~ "2.6.14, ARM defines a different system call that orders the arguments "
10931 #~ "suitably:"
10932 #~ msgstr ""
10933 #~ "ARM アーキテクチャでは、64 ビットの引き数は適切なレジスタの組に割り当て\n"
10934 #~ "る必要がある。このアーキテクチャでは、B<posix_fadvise>() の呼び出し方に\n"
10935 #~ "は欠陥があり、それはこのシステムコールでは引き数 I<fd> と I<len> の間の\n"
10936 #~ "パディング (詰めもの) でレジスタが一つ消費されてしまうというものである。\n"
10937 #~ "そのため、Linux 2.6.14 以降では、ARM では引き数が適切な順序になった別の\n"
10938 #~ "システムコールが定義されている。"
10939
10940 #~ msgid ""
10941 #~ "The behavior of this system call is otherwise exactly the same as "
10942 #~ "B<posix_fadvise>().  No library support is provided for this system call "
10943 #~ "in glibc."
10944 #~ msgstr ""
10945 #~ "上記の点以外は、このシステムコールの動作は B<posix_fadvise>() と全く\n"
10946 #~ "同じである。このシステムコールに対するライブラリによるサポートは glibc\n"
10947 #~ "では提供されていない。"
10948
10949 #~ msgid ""
10950 #~ "The I<mode> is not supported by the file system containing the file "
10951 #~ "referred to by I<fd>."
10952 #~ msgstr ""
10953 #~ "I<fd> が参照するファイルを含むファイルシステムが I<mode> をサポートしてい"
10954 #~ "ない。"
10955
10956 #~ msgid ""
10957 #~ "The function B<mtrace>()  installs handlers for B<malloc>(3), B<realloc>"
10958 #~ "(3)  and B<free>(3).  The function B<muntrace>()  disables these handlers."
10959 #~ msgstr ""
10960 #~ "関数 B<mtrace>()  は、 B<malloc>(3), B<realloc>(3), B<free>(3)  のハンドラ"
10961 #~ "を組み込む。 関数 B<muntrace>()  はこれらのハンドラを解除する。"
10962
10963 #~ msgid ""
10964 #~ "The environment variable B<MALLOC_TRACE> defines a file where B<mtrace>"
10965 #~ "()  writes its output.  This file must be writable to the user or "
10966 #~ "B<mtrace>()  will do nothing.  If the file is not empty it will be "
10967 #~ "truncated."
10968 #~ msgstr ""
10969 #~ "環境変数 B<MALLOC_TRACE> は B<mtrace>()  が出力を書き出すファイルを指定す"
10970 #~ "る。 ユーザが書き込み権限を持つファイルを指定しなければならない。 書き込み"
10971 #~ "権限がない場合、 B<mtrace>()  は何もしない。 ファイルが空でない場合、ファ"
10972 #~ "イルの元の内容を上書きする。"
10973
10974 #~ msgid ""
10975 #~ "The output of B<mtrace>()  will be ASCII but not in a friendly format.  "
10976 #~ "So glibc comes with a perl-script called mtrace to make sense of it."
10977 #~ msgstr ""
10978 #~ "B<mtrace>()  の出力は ASCII 形式だが、人が読みやすいフォーマットではな"
10979 #~ "い。 そこで、glibc には mtrace 出力を分かりやすい形式に変換する perl スク"
10980 #~ "リプトが付属している。"
10981
10982 #~ msgid ""
10983 #~ "This flag allocates and initializes to zero the disk space within the "
10984 #~ "range specified by I<offset> and I<len>.  After a successful call, "
10985 #~ "subsequent writes into this range are guaranteed not to fail because of "
10986 #~ "lack of disk space.  Preallocating zeroed blocks beyond the end of the "
10987 #~ "file is useful for optimizing append workloads.  Preallocating blocks "
10988 #~ "does not change the file size (as reported by B<stat>(2))  even if it is "
10989 #~ "less than I<offset>+I<len>."
10990 #~ msgstr ""
10991 #~ "このフラグは、 I<offset> と I<len> で指定された領域のディスク空間を割り当"
10992 #~ "て、その空間を 0 で初期化する。 呼び出しが成功すると、それに続いてこの領域"
10993 #~ "への書き込みが行われるが、 ディスク空間の不足による書き込み失敗が発生しな"
10994 #~ "いことが保証される。 ファイル末尾より後ろの領域について 0 で埋めたブロック"
10995 #~ "を前もって 割り当てておくことは、追記 (append) の作業負荷を最適化するのに "
10996 #~ "有用である。 ファイルサイズが I<offset>+I<len> よりも小さい場合であって"
10997 #~ "も、ブロックの前もっての割り当てにより (B<stat>(2)  が返す) ファイルサイズ"
10998 #~ "は変更されることはない。"
10999
11000 #~ msgid ""
11001 #~ "(Linux 2.6.9 and later) the caller was not privileged (B<CAP_IPC_LOCK>)  "
11002 #~ "and its B<RLIMIT_MEMLOCK> soft resource limit was 0."
11003 #~ msgstr ""
11004 #~ "(Linux 2.6.9 以降) 呼び出し元は特権 (B<CAP_IPC_LOCK>)  を持たず、ソフト資"
11005 #~ "源制限 B<RLIMIT_MEMLOCK> が 0 である。"
11006
11007 #~ msgid ""
11008 #~ "(Linux 2.6.8 and earlier)  The calling process has insufficient privilege "
11009 #~ "to call B<munlockall>().  Under Linux the B<CAP_IPC_LOCK> capability is "
11010 #~ "required."
11011 #~ msgstr ""
11012 #~ "(Linux 2.6.8 以前)  呼び出し元プロセスが B<munlockall>()  を呼び出すのに必"
11013 #~ "要な特権を所有していなかった。 Linux では、 B<CAP_IPC_LOCK> ケーパビリティ"
11014 #~ "が必要である。"
11015
11016 #~ msgid ""
11017 #~ "B<posix_fadvise>()  appeared in kernel 2.5.60.  Glibc support has been "
11018 #~ "provided since version 2.2."
11019 #~ msgstr ""
11020 #~ "B<posix_fadvise>()  はカーネル 2.5.60 で登場した。 glibc でのサポートは "
11021 #~ "glibc バージョン 2.2 以降で行われている。"