OSDN Git Service

(split) LDP: Update POT and ja.po to LDP v3.65
[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-24 00:51+0900\n"
10 "PO-Revision-Date: 2014-04-20 07:21+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:183
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:190 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:270
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:321
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:495 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:513 build/C/man2/mmap2.2:79
358 #: build/C/man2/mprotect.2:122 build/C/man2/mremap.2:191
359 #: build/C/man2/msync.2:120 build/C/man3/mtrace.3:80
360 #: build/C/man2/posix_fadvise.2:121 build/C/man3/posix_memalign.3:221
361 #: build/C/man2/readahead.2:93 build/C/man3/shm_open.3:257
362 #: build/C/man7/shm_overview.7:103 build/C/man2/shmctl.2:382
363 #: build/C/man2/shmget.2:238 build/C/man2/shmop.2:250
364 #: build/C/man2/subpage_prot.2:98 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:329
393 #: build/C/man2/madvise.2:381 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:343 build/C/man2/mmap.2:735 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:151 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:325 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:336
414 #: build/C/man2/madvise.2:388 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:350 build/C/man2/mmap.2:742 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:158 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:332 build/C/man2/shmop.2:302
427 #: build/C/man2/subpage_prot.2:141 build/C/man2/sync_file_range.2:233
428 #, fuzzy
429 #| msgid ""
430 #| "This page is part of release 3.64 of the Linux I<man-pages> project.  A "
431 #| "description of the project, and information about reporting bugs, can be "
432 #| "found at \\%http://www.kernel.org/doc/man-pages/."
433 msgid ""
434 "This page is part of release 3.65 of the Linux I<man-pages> project.  A "
435 "description of the project, and information about reporting bugs, can be "
436 "found at \\%http://www.kernel.org/doc/man-pages/."
437 msgstr ""
438 "この man ページは Linux I<man-pages> プロジェクトのリリース 3.64 の一部\n"
439 "である。プロジェクトの説明とバグ報告に関する情報は\n"
440 "http://www.kernel.org/doc/man-pages/ に書かれている。"
441
442 #. type: TH
443 #: build/C/man3/alloca.3:43
444 #, no-wrap
445 msgid "ALLOCA"
446 msgstr "ALLOCA"
447
448 #. type: TH
449 #: build/C/man3/alloca.3:43
450 #, no-wrap
451 msgid "2013-10-07"
452 msgstr "2013-10-07"
453
454 #. type: TH
455 #: build/C/man3/alloca.3:43 build/C/man3/malloc_get_state.3:25
456 #: build/C/man3/malloc_hook.3:10 build/C/man3/malloc_info.3:25
457 #: build/C/man3/malloc_usable_size.3:25 build/C/man3/mcheck.3:25
458 #: build/C/man3/mtrace.3:25 build/C/man3/posix_fallocate.3:25
459 #: build/C/man3/posix_memalign.3:29
460 #, no-wrap
461 msgid "GNU"
462 msgstr "GNU"
463
464 #. type: Plain text
465 #: build/C/man3/alloca.3:46
466 msgid "alloca - allocate memory that is automatically freed"
467 msgstr "alloca - 自動的に解放されるメモリを割り当てる"
468
469 #. type: Plain text
470 #: build/C/man3/alloca.3:48
471 msgid "B<#include E<lt>alloca.hE<gt>>"
472 msgstr "B<#include E<lt>alloca.hE<gt>>"
473
474 #. type: Plain text
475 #: build/C/man3/alloca.3:50
476 msgid "B<void *alloca(size_t >I<size>B<);>"
477 msgstr "B<void *alloca(size_t >I<size>B<);>"
478
479 #. type: Plain text
480 #: build/C/man3/alloca.3:60
481 msgid ""
482 "The B<alloca>()  function allocates I<size> bytes of space in the stack "
483 "frame of the caller.  This temporary space is automatically freed when the "
484 "function that called B<alloca>()  returns to its caller."
485 msgstr ""
486 "B<alloca>()  関数は、 I<size> バイトの領域を呼出元のスタック・フレームに割り"
487 "付ける。 この一時的な領域は、 B<alloca>()  を呼び出した関数が呼出元に返るとき"
488 "に自動的に解放される。"
489
490 #. type: Plain text
491 #: build/C/man3/alloca.3:65
492 msgid ""
493 "The B<alloca>()  function returns a pointer to the beginning of the "
494 "allocated space.  If the allocation causes stack overflow, program behavior "
495 "is undefined."
496 msgstr ""
497 "B<alloca>()  関数は、割り付けた領域の始まりを指すポインタを返す。 割り付けに"
498 "よってスタックオーバーフローが起った場合の プログラムの動作は定義されていな"
499 "い。"
500
501 #. type: SH
502 #: build/C/man3/alloca.3:65
503 #, no-wrap
504 msgid "ATTRIBUTES"
505 msgstr ""
506
507 #. type: SS
508 #: build/C/man3/alloca.3:66
509 #, no-wrap
510 msgid "Multithreading (see pthreads(7))"
511 msgstr ""
512
513 #. type: Plain text
514 #: build/C/man3/alloca.3:70
515 msgid "The B<alloca>()  function is thread-safe."
516 msgstr ""
517
518 #. type: Plain text
519 #: build/C/man3/alloca.3:72
520 msgid "This function is not in POSIX.1-2001."
521 msgstr "この関数は POSIX.1-2001 にはない。"
522
523 #. type: Plain text
524 #: build/C/man3/alloca.3:78
525 msgid ""
526 "There is evidence that the B<alloca>()  function appeared in 32V, PWB, "
527 "PWB.2, 3BSD, and 4BSD.  There is a man page for it in 4.3BSD.  Linux uses "
528 "the GNU version."
529 msgstr ""
530 "32V, PWB, PWB.2, 3BSD, 4BSD に B<alloca>()  関数が登場した証拠がある。 "
531 "4.3BSD には、マニュアルページがある。 Linux は、GNU 版を使っている。 この関数"
532 "は POSIX.1-2001 にはない。"
533
534 #. type: Plain text
535 #: build/C/man3/alloca.3:93
536 msgid ""
537 "The B<alloca>()  function is machine- and compiler-dependent.  For certain "
538 "applications, its use can improve efficiency compared to the use of B<malloc>"
539 "(3)  plus B<free>(3).  In certain cases, it can also simplify memory "
540 "deallocation in applications that use B<longjmp>(3)  or B<siglongjmp>(3).  "
541 "Otherwise, its use is discouraged."
542 msgstr ""
543 "B<alloca>()  関数は、機種とコンパイラに依存する。 特定のアプリケーションで"
544 "は、この関数を使うと B<malloc>(3)  と B<free>(3)  を組み合わせて使った場合に"
545 "比べて効率を改善することができる。 特定の場合では、この関数を使うことで、 "
546 "B<longjmp>(3)  や B<siglongjmp>(3)  を使うアプリケーションでのメモリの開放を"
547 "簡単にすることができる。 それ以外の場合では、この関数の使用は推奨されない。"
548
549 #. type: Plain text
550 #: build/C/man3/alloca.3:102
551 msgid ""
552 "Because the space allocated by B<alloca>()  is allocated within the stack "
553 "frame, that space is automatically freed if the function return is jumped "
554 "over by a call to B<longjmp>(3)  or B<siglongjmp>(3)."
555 msgstr ""
556 "B<alloca>()  により割り当てられる空間はスタックフレームから割り当てらるの"
557 "で、 関数の戻り先が B<longjmp>(3)  や B<siglongjmp>(3)  の呼び出しによりジャ"
558 "ンプした場合には、 割り当てられた空間は自動的に解放される。"
559
560 #. type: Plain text
561 #: build/C/man3/alloca.3:107
562 msgid "Do not attempt to B<free>(3)  space allocated by B<alloca>()!"
563 msgstr ""
564 "B<alloca>()  で割り当てられた空間を B<free>(3)  しようとすることのないよう"
565 "に!"
566
567 #. type: SS
568 #: build/C/man3/alloca.3:107
569 #, no-wrap
570 msgid "Notes on the GNU version"
571 msgstr "GNU 版についての注意"
572
573 #. type: Plain text
574 #: build/C/man3/alloca.3:129
575 msgid ""
576 "Normally, B<gcc>(1)  translates calls to B<alloca>()  with inlined code.  "
577 "This is not done when either the I<-ansi>, I<-std=c89>, I<-std=c99>, or the "
578 "I<-std=c11> option is given B<and> the header I<E<lt>alloca.hE<gt>> is not "
579 "included.  Otherwise (without an -ansi or -std=c* option) the glibc version "
580 "of I<E<lt>stdlib.hE<gt>> includes I<E<lt>alloca.hE<gt>> and that contains "
581 "the lines:"
582 msgstr ""
583 "通常 B<gcc>(1) は B<alloca>()  の呼び出しをインラインコードに変換する。 I<-"
584 "ansi>, I<-std=c89>, I<-std=c99>, I<-std=c11> のいずれかのオプションが指定さ"
585 "れ、B<かつ> I<E<lt>alloca.hE<gt>> がインクルードされていない場合、 この変換は"
586 "行われない。 それ以外の場合 (-ansi オプションも -std=c* オプションも指定され"
587 "ない場合) には、 glibc 版の I<E<lt>stdlib.hE<gt>> は I<E<lt>alloca.hE<gt>> を"
588 "インクルードするが、このファイルには以下の行が含まれており、"
589
590 #. type: Plain text
591 #: build/C/man3/alloca.3:134
592 #, no-wrap
593 msgid ""
594 "    #ifdef  __GNUC__\n"
595 "    #define alloca(size)   __builtin_alloca (size)\n"
596 "    #endif\n"
597 msgstr ""
598 "    #ifdef  __GNUC__\n"
599 "    #define alloca(size)   __builtin_alloca (size)\n"
600 "    #endif\n"
601
602 #. type: Plain text
603 #: build/C/man3/alloca.3:137
604 msgid "with messy consequences if one has a private version of this function."
605 msgstr "独自版の __builtin_alloca (size) 関数がある場合、厄介な結果になる。"
606
607 #. type: Plain text
608 #: build/C/man3/alloca.3:141
609 msgid ""
610 "The fact that the code is inlined means that it is impossible to take the "
611 "address of this function, or to change its behavior by linking with a "
612 "different library."
613 msgstr ""
614 "このコードはインライン化されているので、 この関数のアドレスを取得したり、 他"
615 "のライブラリをリンクして動作を変更することはできない。"
616
617 #. type: Plain text
618 #: build/C/man3/alloca.3:145
619 msgid ""
620 "The inlined code often consists of a single instruction adjusting the stack "
621 "pointer, and does not check for stack overflow.  Thus, there is no NULL "
622 "error return."
623 msgstr ""
624 "通常このインラインコードはスタックポインタを移動する 1 つの命令 "
625 "(instruction) から構成されており、 スタックオーバーフローをチェックしない。 "
626 "よって NULL エラーが返されることはない。"
627
628 #. type: SH
629 #: build/C/man3/alloca.3:145 build/C/man2/cacheflush.2:82
630 #: build/C/man3/mallinfo.3:114 build/C/man3/mallopt.3:406
631 #: build/C/man2/mlock.2:311 build/C/man2/mmap.2:585 build/C/man3/mtrace.3:102
632 #: build/C/man2/posix_fadvise.2:186 build/C/man2/readahead.2:98
633 #: build/C/man2/shmget.2:311
634 #, no-wrap
635 msgid "BUGS"
636 msgstr "バグ"
637
638 #. type: Plain text
639 #: build/C/man3/alloca.3:150
640 msgid ""
641 "There is no error indication if the stack frame cannot be extended.  "
642 "(However, after a failed allocation, the program is likely to receive a "
643 "B<SIGSEGV> signal if it attempts to access the unallocated space.)"
644 msgstr ""
645 "スタックフレームが拡張できなかった場合、エラー通知は行われない。 (しかしなが"
646 "ら、割り当てに失敗した後で、プログラムが割り当てられなかった 空間にアクセスし"
647 "ようとした場合に B<SIGSEGV> シグナルを受信することだろう。)"
648
649 #. type: Plain text
650 #: build/C/man3/alloca.3:158
651 msgid ""
652 "On many systems B<alloca>()  cannot be used inside the list of arguments of "
653 "a function call, because the stack space reserved by B<alloca>()  would "
654 "appear on the stack in the middle of the space for the function arguments."
655 msgstr ""
656 "多くのシステムにおいて、関数コールの引き数のリスト内では B<alloca>()  が使え"
657 "ない。 これは、 B<alloca>()  によって予約されるスタック領域が、 関数引き数に"
658 "使われるスタック領域の中に現れてしまうためである。"
659
660 #. type: SH
661 #: build/C/man3/alloca.3:158 build/C/man2/fallocate.2:324
662 #: build/C/man2/madvise.2:372 build/C/man3/mallinfo.3:270
663 #: build/C/man3/malloc_get_state.3:111 build/C/man3/malloc_hook.3:137
664 #: build/C/man3/malloc_info.3:256 build/C/man3/malloc_stats.3:61
665 #: build/C/man3/malloc_trim.3:78 build/C/man3/malloc_usable_size.3:62
666 #: build/C/man3/mallopt.3:566 build/C/man3/mcheck.3:204
667 #: build/C/man2/mlock.2:336 build/C/man2/mmap.2:710 build/C/man2/mmap2.2:95
668 #: build/C/man2/mprotect.2:226 build/C/man2/mremap.2:199
669 #: build/C/man2/msync.2:147 build/C/man3/mtrace.3:167
670 #: build/C/man2/posix_fadvise.2:191 build/C/man3/posix_fallocate.3:128
671 #: build/C/man3/posix_memalign.3:272 build/C/man2/readahead.2:107
672 #: build/C/man2/remap_file_pages.2:157 build/C/man3/shm_open.3:271
673 #: build/C/man7/shm_overview.7:114 build/C/man2/shmctl.2:428
674 #: build/C/man2/shmget.2:317 build/C/man2/shmop.2:287
675 #: build/C/man2/subpage_prot.2:128 build/C/man2/sync_file_range.2:221
676 #, no-wrap
677 msgid "SEE ALSO"
678 msgstr "関連項目"
679
680 #. type: Plain text
681 #: build/C/man3/alloca.3:162
682 msgid "B<brk>(2), B<longjmp>(3), B<malloc>(3)"
683 msgstr "B<brk>(2), B<longjmp>(3), B<malloc>(3)"
684
685 #. type: TH
686 #: build/C/man2/cacheflush.2:25
687 #, no-wrap
688 msgid "CACHEFLUSH"
689 msgstr "CACHEFLUSH"
690
691 #. type: TH
692 #: build/C/man2/cacheflush.2:25
693 #, no-wrap
694 msgid "2007-05-26"
695 msgstr "2007-05-26"
696
697 #. type: Plain text
698 #: build/C/man2/cacheflush.2:28
699 msgid "cacheflush - flush contents of instruction and/or data cache"
700 msgstr "cacheflush - 命令キャッシュやデータキャッシュの内容をフラッシュする"
701
702 #. type: Plain text
703 #: build/C/man2/cacheflush.2:31
704 #, no-wrap
705 msgid "B<#include E<lt>asm/cachectl.hE<gt>>\n"
706 msgstr "B<#include E<lt>asm/cachectl.hE<gt>>\n"
707
708 #. type: Plain text
709 #: build/C/man2/cacheflush.2:33
710 #, no-wrap
711 msgid "B<int cacheflush(char *>I<addr>B<, int >I<nbytes>B<, int >I<cache>B<);>\n"
712 msgstr "B<int cacheflush(char *>I<addr>B<, int >I<nbytes>B<, int >I<cache>B<);>\n"
713
714 #. type: Plain text
715 #: build/C/man2/cacheflush.2:43
716 msgid ""
717 "B<cacheflush>()  flushes the contents of the indicated cache(s) for the user "
718 "addresses in the range I<addr> to I<(addr+nbytes-1)>.  I<cache> may be one "
719 "of:"
720 msgstr ""
721 "B<cacheflush>()  は I<addr> から I<(addr+nbytes-1)> の範囲のユーザアドレスに"
722 "対応する 指定されたキャッシュをフラッシュする。 I<cache> には以下のいずれかを"
723 "指定する:"
724
725 #. type: TP
726 #: build/C/man2/cacheflush.2:43
727 #, no-wrap
728 msgid "B<ICACHE>"
729 msgstr "B<ICACHE>"
730
731 #. type: Plain text
732 #: build/C/man2/cacheflush.2:46
733 msgid "Flush the instruction cache."
734 msgstr "命令 (instruction) キャッシュをフラッシュする。"
735
736 #. type: TP
737 #: build/C/man2/cacheflush.2:46
738 #, no-wrap
739 msgid "B<DCACHE>"
740 msgstr "B<DCACHE>"
741
742 #. type: Plain text
743 #: build/C/man2/cacheflush.2:49
744 msgid "Write back to memory and invalidate the affected valid cache lines."
745 msgstr "変更があったキャッシュラインをメモリに書き戻し、無効にする。"
746
747 #. type: TP
748 #: build/C/man2/cacheflush.2:49
749 #, no-wrap
750 msgid "B<BCACHE>"
751 msgstr "B<BCACHE>"
752
753 #. type: Plain text
754 #: build/C/man2/cacheflush.2:53
755 msgid "Same as B<(ICACHE|DCACHE)>."
756 msgstr "B<(ICACHE|DCACHE)> と同じ。"
757
758 #. type: Plain text
759 #: build/C/man2/cacheflush.2:59
760 msgid ""
761 "B<cacheflush>()  returns 0 on success or -1 on error.  If errors are "
762 "detected, I<errno> will indicate the error."
763 msgstr ""
764 "B<cacheflush>()  は成功した場合は 0 を、失敗した場合は -1 を返す。エラーが検"
765 "出された場合は I<errno> にエラーが指示される。"
766
767 #. type: TP
768 #: build/C/man2/cacheflush.2:60 build/C/man2/mmap2.2:62
769 #: build/C/man2/mremap.2:142 build/C/man2/shmctl.2:314
770 #: build/C/man2/subpage_prot.2:72
771 #, no-wrap
772 msgid "B<EFAULT>"
773 msgstr "B<EFAULT>"
774
775 #. type: Plain text
776 #: build/C/man2/cacheflush.2:67
777 msgid ""
778 "Some or all of the address range I<addr> to I<(addr+nbytes-1)> is not "
779 "accessible."
780 msgstr ""
781 "I<addr> から I<(addr+nbytes-1)> の範囲のアドレスの全てまたは一部が アクセス可"
782 "能ではない。"
783
784 #. type: TP
785 #: build/C/man2/cacheflush.2:67 build/C/man2/fallocate.2:202
786 #: build/C/man2/fallocate.2:214 build/C/man2/fallocate.2:224
787 #: build/C/man2/fallocate.2:234 build/C/man2/madvise.2:282
788 #: build/C/man3/malloc_info.3:56 build/C/man2/mlock.2:157
789 #: build/C/man2/mlock.2:164 build/C/man2/mlock.2:176 build/C/man2/mmap.2:421
790 #: build/C/man2/mmap.2:429 build/C/man2/mmap.2:434 build/C/man2/mmap2.2:65
791 #: build/C/man2/mprotect.2:95 build/C/man2/mremap.2:151
792 #: build/C/man2/msync.2:80 build/C/man2/posix_fadvise.2:94
793 #: build/C/man3/posix_fallocate.3:81 build/C/man3/posix_memalign.3:158
794 #: build/C/man2/readahead.2:77 build/C/man2/remap_file_pages.2:132
795 #: build/C/man2/remap_file_pages.2:139 build/C/man3/shm_open.3:213
796 #: build/C/man2/shmctl.2:328 build/C/man2/shmget.2:199
797 #: build/C/man2/shmop.2:200 build/C/man2/shmop.2:223
798 #: build/C/man2/subpage_prot.2:77 build/C/man2/sync_file_range.2:152
799 #, no-wrap
800 msgid "B<EINVAL>"
801 msgstr "B<EINVAL>"
802
803 #. type: Plain text
804 #: build/C/man2/cacheflush.2:75
805 msgid "I<cache> is not one of B<ICACHE>, B<DCACHE>, or B<BCACHE>."
806 msgstr "I<cache> パラメータが B<ICACHE>, B<DCACHE>, B<BCACHE> のどれでもない。"
807
808 #.  FIXME This system call was only on MIPS back in 1.2 days, but
809 #.  by now it is on a number of other architectures (but not i386).
810 #.  Investigate the details and update this page.
811 #.  Irix 6.5 appears to have a cacheflush() syscall -- mtk
812 #. type: Plain text
813 #: build/C/man2/cacheflush.2:82
814 msgid ""
815 "This Linux-specific system call is available only on MIPS-based systems.  It "
816 "should not be used in programs intended to be portable."
817 msgstr ""
818 "この Linux 特有のシステムコールは MIPS ベースのシステムでのみ有効である。 移"
819 "植を意図したプログラムで使用すべきではない。"
820
821 #. type: Plain text
822 #: build/C/man2/cacheflush.2:89
823 msgid ""
824 "The current implementation ignores the I<addr> and I<nbytes> arguments.  "
825 "Therefore, the whole cache is always flushed."
826 msgstr ""
827 "現在の実装では、引き数 I<addr> と I<nbytes> は無視される。そのため、 常に全て"
828 "のキャッシュがフラッシュされる。"
829
830 #. type: TH
831 #: build/C/man2/fallocate.2:11
832 #, no-wrap
833 msgid "FALLOCATE"
834 msgstr "FALLOCATE"
835
836 #. type: TH
837 #: build/C/man2/fallocate.2:11 build/C/man2/shmget.2:38
838 #, fuzzy, no-wrap
839 #| msgid "2013-04-17"
840 msgid "2014-04-17"
841 msgstr "2013-04-17"
842
843 #. type: Plain text
844 #: build/C/man2/fallocate.2:14
845 msgid "fallocate - manipulate file space"
846 msgstr "fallocate - ファイル空間の操作"
847
848 #. type: Plain text
849 #: build/C/man2/fallocate.2:18 build/C/man2/readahead.2:35
850 #, no-wrap
851 msgid ""
852 "B<#define _GNU_SOURCE>             /* See feature_test_macros(7) */\n"
853 "B<#include E<lt>fcntl.hE<gt>>\n"
854 msgstr ""
855 "B<#define _GNU_SOURCE>             /* feature_test_macros(7) 参照 */\n"
856 "B<#include E<lt>fcntl.hE<gt>>\n"
857
858 #. type: Plain text
859 #: build/C/man2/fallocate.2:21
860 #, no-wrap
861 msgid "B<int fallocate(int >I<fd>B<, int >I<mode>B<, off_t >I<offset>B<, off_t >I<len>B<);>\n"
862 msgstr "B<int fallocate(int >I<fd>B<, int >I<mode>B<, off_t >I<offset>B<, off_t >I<len>B<);>\n"
863
864 #. type: Plain text
865 #: build/C/man2/fallocate.2:27
866 msgid ""
867 "This is a nonportable, Linux-specific system call.  For the portable, "
868 "POSIX.1-specified method of ensuring that space is allocated for a file, see "
869 "B<posix_fallocate>(3)."
870 msgstr ""
871 "このシステムコールは、移植性のない、Linux 固有のシステムコールである。 移植性"
872 "が必要な場合は、ファイルに対してディスク空間を確実に確保するために、 POSIX.1 "
873 "で規定された方法である B<posix_fallocate>(3)  を使うこと。"
874
875 #. type: Plain text
876 #: build/C/man2/fallocate.2:37
877 msgid ""
878 "B<fallocate>()  allows the caller to directly manipulate the allocated disk "
879 "space for the file referred to by I<fd> for the byte range starting at "
880 "I<offset> and continuing for I<len> bytes."
881 msgstr ""
882 "B<fallocate>()  を使うと、 I<fd> が参照するファイルに割り当てられたディスク空"
883 "間を直接操作できる。 操作対象は、 I<offset> から始まる長さ I<len> バイトの領"
884 "域である。"
885
886 #. type: Plain text
887 #: build/C/man2/fallocate.2:42
888 msgid ""
889 "The I<mode> argument determines the operation to be performed on the given "
890 "range.  Details of the supported operations are given in the subsections "
891 "below."
892 msgstr ""
893 "I<mode> 引き数は、指定された領域に対して実行する操作を指定する。\n"
894 "サポートされている操作の詳細は以下のサブセクションで説明する。"
895
896 #. type: SS
897 #: build/C/man2/fallocate.2:42
898 #, no-wrap
899 msgid "Allocating disk space"
900 msgstr "ディスク領域の割り当て"
901
902 #. type: Plain text
903 #: build/C/man2/fallocate.2:65
904 msgid ""
905 "The default operation (i.e., I<mode> is zero) of B<fallocate>()  allocates "
906 "the disk space within the range specified by I<offset> and I<len>.  The file "
907 "size (as reported by B<stat>(2))  will be changed if I<offset>+I<len> is "
908 "greater than the file size.  Any subregion within the range specified by "
909 "I<offset> and I<len> that did not contain data before the call will be "
910 "initialized to zero.  This default behavior closely resembles the behavior "
911 "of the B<posix_fallocate>(3)  library function, and is intended as a method "
912 "of optimally implementing that function."
913 msgstr ""
914 "B<fallocate>() のデフォルトの動作 (つまり I<mode> が 0 の場合) は、 "
915 "I<offset> と I<len> で指定された範囲のディスク領域の割り当てを行う。 "
916 "I<offset>+I<len> がファイルサイズよりも大きかった場合、 (B<stat>(2) で報告さ"
917 "れる) ファイルサイズが変更される。 I<offset> と I<len> で指定される範囲のサブ"
918 "領域で、 呼び出し前にデータを保持していなかった場合、そのサブ領域は 0 で初期"
919 "化される。 このデフォルトの動作は、 ライブラリ関数 B<posix_fallocate>(3) の動"
920 "作と非常に似ている。 これは、 このシステムコールが B<posix_fallocate>(3) を最"
921 "適に実装する手段を提供することを目的としているからである。"
922
923 #. type: Plain text
924 #: build/C/man2/fallocate.2:71
925 msgid ""
926 "After a successful call, subsequent writes into the range specified by "
927 "I<offset> and I<len> are guaranteed not to fail because of lack of disk "
928 "space."
929 msgstr ""
930 "呼び出しが成功した場合、\n"
931 "I<offset> と I<len> で指定された範囲へのそれ以降の書き込みでは、\n"
932 "ディスクの領域不足での書き込み失敗が起こらないことが保証される。"
933
934 #. type: Plain text
935 #: build/C/man2/fallocate.2:82
936 msgid ""
937 "If the B<FALLOC_FL_KEEP_SIZE> flag is specified in I<mode>, the behavior of "
938 "the call is similar, but the file size will not be changed even if I<offset>"
939 "+I<len> is greater than the file size.  Preallocating zeroed blocks beyond "
940 "the end of the file in this manner is useful for optimizing append workloads."
941 msgstr ""
942 "B<FALLOC_FL_KEEP_SIZE> フラグが I<mode> に指定された場合、このシステムコー"
943 "ル\n"
944 "の動作は似ているが、 I<offset>+I<len> がファイルサイズよりも大きい場合で\n"
945 "あってもファイルサイズは変更されない点が異なる。この場合のファイルの末尾\n"
946 "よりも後ろの前もって割り当てられた 0 で埋められたブロックは、ファイルへの\n"
947 "追記を最適化したい場合に役に立つ。"
948
949 #. type: Plain text
950 #: build/C/man2/fallocate.2:86
951 msgid ""
952 "Because allocation is done in block size chunks, B<fallocate>()  may "
953 "allocate a larger range of disk space than was specified."
954 msgstr ""
955 "割り当てはブロックサイズ単位で行われるため、 B<fallocate>() は指定されたよ"
956 "り\n"
957 "も大きなディスク領域を割り当てることがある。"
958
959 #. type: SS
960 #: build/C/man2/fallocate.2:86
961 #, no-wrap
962 msgid "Deallocating file space"
963 msgstr "ファイル空間の割り当て解除"
964
965 #. type: Plain text
966 #: build/C/man2/fallocate.2:101
967 msgid ""
968 "Specifying the B<FALLOC_FL_PUNCH_HOLE> flag (available since Linux 2.6.38) "
969 "in I<mode> deallocates space (i.e., creates a hole)  in the byte range "
970 "starting at I<offset> and continuing for I<len> bytes.  Within the specified "
971 "range, partial filesystem blocks are zeroed, and whole filesystem blocks are "
972 "removed from the file.  After a successful call, subsequent reads from this "
973 "range will return zeroes."
974 msgstr ""
975 "B<FALLOC_FL_PUNCH_HOLE> フラグ (Linux 2.6.38 以降で利用可能) を I<mode> に指"
976 "定すると、 I<offset> で始まる I<len> バイトの領域の空間を解放する (ホールを作"
977 "成する)。 指定された範囲のうち、 部分的に使用しているファイルシステムブロック"
978 "は 0 で埋められ、 全体を使用しているファイルシステムブロックはそのファイルか"
979 "ら削除される。 呼び出しが成功すると、 これ以降のこの範囲からの読み出しでは 0 "
980 "を返す。"
981
982 #. type: Plain text
983 #: build/C/man2/fallocate.2:112
984 msgid ""
985 "The B<FALLOC_FL_PUNCH_HOLE> flag must be ORed with B<FALLOC_FL_KEEP_SIZE> in "
986 "I<mode>; in other words, even when punching off the end of the file, the "
987 "file size (as reported by B<stat>(2))  does not change."
988 msgstr ""
989 "B<FALLOC_FL_PUNCH_HOLE> フラグは B<FALLOC_FL_KEEP_SIZE> と論理和 (OR) をとっ"
990 "て I<mode> に指定しなければならない。 つまり、 ファイル末尾の punch off を"
991 "行った場合でも、 (B<stat>(2) で報告される) ファイルサイズが変化しない。"
992
993 #. type: Plain text
994 #: build/C/man2/fallocate.2:117
995 msgid ""
996 "Not all filesystems support B<FALLOC_FL_PUNCH_HOLE>; if a filesystem doesn't "
997 "support the operation, an error is returned.  The operation is supported on "
998 "at least the following filesystems"
999 msgstr ""
1000 "すべてのファイルシステムで B<FALLOC_FL_PUNCH_HOLE> がサポートされているわけで"
1001 "はない。 ファイルシステムがこの操作をサポートしていない場合は、 エラーが返"
1002 "る。 この操作は少なくとも以下のファイルシステムでサポートされている。"
1003
1004 #. type: IP
1005 #: build/C/man2/fallocate.2:117 build/C/man2/fallocate.2:119
1006 #: build/C/man2/fallocate.2:122 build/C/man2/fallocate.2:124
1007 #: build/C/man2/madvise.2:286 build/C/man2/madvise.2:292
1008 #: build/C/man2/madvise.2:295 build/C/man2/madvise.2:298
1009 #: build/C/man2/madvise.2:301 build/C/man3/mallopt.3:235
1010 #: build/C/man3/mallopt.3:241
1011 #, no-wrap
1012 msgid "*"
1013 msgstr "*"
1014
1015 #. type: Plain text
1016 #: build/C/man2/fallocate.2:119
1017 msgid "XFS (since Linux 2.6.38)"
1018 msgstr "XFS (Linux 2.6.38 以降)"
1019
1020 #.  commit a4bb6b64e39abc0e41ca077725f2a72c868e7622
1021 #. type: Plain text
1022 #: build/C/man2/fallocate.2:122
1023 msgid "ext4 (since Linux 3.0)"
1024 msgstr "ext4 (Linux 3.0 以降)"
1025
1026 #. type: Plain text
1027 #: build/C/man2/fallocate.2:124
1028 msgid "Btrfs (since Linux 3.7)"
1029 msgstr "Btrfs (Linux 3.7 以降)"
1030
1031 #.  commit 83e4fa9c16e4af7122e31be3eca5d57881d236fe
1032 #. type: Plain text
1033 #: build/C/man2/fallocate.2:127
1034 msgid "tmpfs (since Linux 3.5)"
1035 msgstr "tmpfs (Linux 3.5 以降)"
1036
1037 #. type: SS
1038 #: build/C/man2/fallocate.2:127
1039 #, fuzzy, no-wrap
1040 #| msgid "Deallocating file space"
1041 msgid "Collapsing file space"
1042 msgstr "ファイル空間の割り当て解除"
1043
1044 #.  commit 00f5e61998dd17f5375d9dfc01331f104b83f841
1045 #. type: Plain text
1046 #: build/C/man2/fallocate.2:147
1047 #, fuzzy
1048 #| msgid ""
1049 #| "Specifying the B<FALLOC_FL_PUNCH_HOLE> flag (available since Linux "
1050 #| "2.6.38) in I<mode> deallocates space (i.e., creates a hole)  in the byte "
1051 #| "range starting at I<offset> and continuing for I<len> bytes.  Within the "
1052 #| "specified range, partial filesystem blocks are zeroed, and whole "
1053 #| "filesystem blocks are removed from the file.  After a successful call, "
1054 #| "subsequent reads from this range will return zeroes."
1055 msgid ""
1056 "Specifying the B<FALLOC_FL_COLLAPSE_RANGE> flag (available since Linux 3.15) "
1057 "in I<mode> removes a byte range from a file, without leaving a hole.  The "
1058 "byte range to be collapsed starts at I<offset> and continues for I<len> "
1059 "bytes.  At the completion of the operation, the contents of the file "
1060 "starting at the location I<offset+len> will be appended at the location "
1061 "I<offset>, and the file will be I<len> bytes smaller."
1062 msgstr ""
1063 "B<FALLOC_FL_PUNCH_HOLE> フラグ (Linux 2.6.38 以降で利用可能) を I<mode> に指"
1064 "定すると、 I<offset> で始まる I<len> バイトの領域の空間を解放する (ホールを作"
1065 "成する)。 指定された範囲のうち、 部分的に使用しているファイルシステムブロック"
1066 "は 0 で埋められ、 全体を使用しているファイルシステムブロックはそのファイルか"
1067 "ら削除される。 呼び出しが成功すると、 これ以降のこの範囲からの読み出しでは 0 "
1068 "を返す。"
1069
1070 #. type: Plain text
1071 #: build/C/man2/fallocate.2:161
1072 msgid ""
1073 "A filesystem may place limitations on the granularity of the operation, in "
1074 "order to ensure efficient implementation.  Typically, I<offset> and I<len> "
1075 "must be a multiple of the filesystem logical block size, which varies "
1076 "according to the filesystem type and configuration.  If a filesystem has "
1077 "such a requirement, B<fallocate>()  will fail with the error B<EINVAL> if "
1078 "this requirement is violated."
1079 msgstr ""
1080
1081 #. type: Plain text
1082 #: build/C/man2/fallocate.2:170
1083 msgid ""
1084 "If the region specified by I<offset> plus I<len> reaches or passes the end "
1085 "of file, an error is returned; instead, use B<ftruncate>(2)  to truncate a "
1086 "file."
1087 msgstr ""
1088
1089 #. type: Plain text
1090 #: build/C/man2/fallocate.2:175
1091 msgid ""
1092 "No other flags may be specified in I<mode> in conjunction with "
1093 "B<FALLOC_FL_COLLAPSE_RANGE>."
1094 msgstr ""
1095
1096 #.  commit 9eb79482a97152930b113b51dff530aba9e28c8e
1097 #.  commit e1d8fb88a64c1f8094b9f6c3b6d2d9e6719c970d
1098 #. type: Plain text
1099 #: build/C/man2/fallocate.2:183
1100 msgid ""
1101 "As at Linux 3.15, B<FALLOC_FL_COLLAPSE_RANGE> is supported by ext4 (only for "
1102 "extent-based files)  and XFS."
1103 msgstr ""
1104
1105 #. type: Plain text
1106 #: build/C/man2/fallocate.2:190
1107 msgid ""
1108 "On success, B<fallocate>()  returns zero.  On error, -1 is returned and "
1109 "I<errno> is set to indicate the error."
1110 msgstr ""
1111 "成功の場合、 B<fallocate>() は 0 を返す。 エラーの場合、-1 を返し、 I<error> "
1112 "にエラーを示す値を設定する。"
1113
1114 #. type: TP
1115 #: build/C/man2/fallocate.2:191 build/C/man2/madvise.2:279
1116 #: build/C/man2/mmap.2:415 build/C/man2/posix_fadvise.2:91
1117 #: build/C/man3/posix_fallocate.3:73 build/C/man2/readahead.2:73
1118 #: build/C/man2/sync_file_range.2:148
1119 #, no-wrap
1120 msgid "B<EBADF>"
1121 msgstr "B<EBADF>"
1122
1123 #. type: Plain text
1124 #: build/C/man2/fallocate.2:195 build/C/man3/posix_fallocate.3:77
1125 msgid "I<fd> is not a valid file descriptor, or is not opened for writing."
1126 msgstr ""
1127 "I<fd> が有効なファイルディスクリプタでないか、 書き込み用としてオープンされて"
1128 "いない。"
1129
1130 #. type: TP
1131 #: build/C/man2/fallocate.2:195 build/C/man3/posix_fallocate.3:77
1132 #, no-wrap
1133 msgid "B<EFBIG>"
1134 msgstr "B<EFBIG>"
1135
1136 #. type: Plain text
1137 #: build/C/man2/fallocate.2:199
1138 msgid "I<offset>+I<len> exceeds the maximum file size."
1139 msgstr "I<offset + len> がファイルサイズの最大値よりも大きい。"
1140
1141 #. type: TP
1142 #: build/C/man2/fallocate.2:199
1143 #, no-wrap
1144 msgid "B<EINTR>"
1145 msgstr "B<EINTR>"
1146
1147 #. type: Plain text
1148 #: build/C/man2/fallocate.2:202
1149 msgid "A signal was caught during execution."
1150 msgstr "実行中にシグナルが捕捉された。"
1151
1152 #. type: Plain text
1153 #: build/C/man2/fallocate.2:214 build/C/man3/posix_fallocate.3:87
1154 msgid "I<offset> was less than 0, or I<len> was less than or equal to 0."
1155 msgstr "I<offset> が 0 未満だったか、 I<len> が 0 以下だった。"
1156
1157 #. type: Plain text
1158 #: build/C/man2/fallocate.2:224
1159 msgid ""
1160 "I<mode> is B<FALLOC_FL_COLLAPSE_RANGE> and the range specified by I<offset> "
1161 "plus I<len> reaches or passes the end of the file."
1162 msgstr ""
1163
1164 #. type: Plain text
1165 #: build/C/man2/fallocate.2:234
1166 msgid ""
1167 "I<mode> is B<FALLOC_FL_COLLAPSE_RANGE>, but either I<offset> or I<len> is "
1168 "not a multiple of the filesystem block size."
1169 msgstr ""
1170
1171 #. type: Plain text
1172 #: build/C/man2/fallocate.2:241
1173 msgid ""
1174 "mode contains both B<FALLOC_FL_COLLAPSE_RANGE> and other flags; no other "
1175 "flags are permitted with B<FALLOC_FL_COLLAPSE_RANGE>."
1176 msgstr ""
1177
1178 #. type: TP
1179 #: build/C/man2/fallocate.2:241
1180 #, fuzzy, no-wrap
1181 #| msgid "I<mode_flags>"
1182 msgid "I<mode>"
1183 msgstr "I<mode_flags>"
1184
1185 #.  There was a inconsistency in 3.15-rc1, that should be resolved so that all
1186 #.  filesystems use this error for this case. (Tytso says ex4 will change.)
1187 #.  http://thread.gmane.org/gmane.comp.file-systems.xfs.general/60485/focus=5521
1188 #.  From: Michael Kerrisk (man-pages <mtk.manpages@...>
1189 #.  Subject: Re: [PATCH v5 10/10] manpage: update FALLOC_FL_COLLAPSE_RANGE flag in fallocate
1190 #.  Newsgroups: gmane.linux.man, gmane.linux.file-systems
1191 #.  Date: 2014-04-17 13:40:05 GMT
1192 #. type: Plain text
1193 #: build/C/man2/fallocate.2:255
1194 msgid ""
1195 "is B<FALLOC_FL_COLLAPSE_RANGE>, but the file referred to by I<fd> is not a "
1196 "regular file."
1197 msgstr ""
1198
1199 #. type: TP
1200 #: build/C/man2/fallocate.2:255 build/C/man2/madvise.2:310
1201 #: build/C/man2/sync_file_range.2:160
1202 #, no-wrap
1203 msgid "B<EIO>"
1204 msgstr "B<EIO>"
1205
1206 #. type: Plain text
1207 #: build/C/man2/fallocate.2:258
1208 msgid "An I/O error occurred while reading from or writing to a filesystem."
1209 msgstr "ファイルシステムとの読み書き中に入出力エラーが発生した。"
1210
1211 #. type: TP
1212 #: build/C/man2/fallocate.2:258 build/C/man2/mmap.2:450
1213 #: build/C/man3/posix_fallocate.3:87
1214 #, no-wrap
1215 msgid "B<ENODEV>"
1216 msgstr "B<ENODEV>"
1217
1218 #. type: Plain text
1219 #: build/C/man2/fallocate.2:265
1220 msgid ""
1221 "I<fd> does not refer to a regular file or a directory.  (If I<fd> is a pipe "
1222 "or FIFO, a different error results.)"
1223 msgstr ""
1224 "I<fd> が通常のファイルかディレクトリを参照していない (I<fd> がパイプや FIFO "
1225 "を参照している場合、別のエラーが発生する)。"
1226
1227 #. type: TP
1228 #: build/C/man2/fallocate.2:265 build/C/man3/posix_fallocate.3:91
1229 #: build/C/man2/shmget.2:217 build/C/man2/sync_file_range.2:166
1230 #, no-wrap
1231 msgid "B<ENOSPC>"
1232 msgstr "B<ENOSPC>"
1233
1234 #. type: Plain text
1235 #: build/C/man2/fallocate.2:270 build/C/man3/posix_fallocate.3:96
1236 msgid ""
1237 "There is not enough space left on the device containing the file referred to "
1238 "by I<fd>."
1239 msgstr "I<fd> が参照するファイルを含むデバイスに十分な空き領域がない。"
1240
1241 #. type: Plain text
1242 #: build/C/man2/fallocate.2:274
1243 msgid "This kernel does not implement B<fallocate>()."
1244 msgstr "このカーネルでは B<fallocate>() は実装されていない。"
1245
1246 #. type: TP
1247 #: build/C/man2/fallocate.2:274
1248 #, no-wrap
1249 msgid "B<EOPNOTSUPP>"
1250 msgstr "B<EOPNOTSUPP>"
1251
1252 #. type: Plain text
1253 #: build/C/man2/fallocate.2:283
1254 msgid ""
1255 "The filesystem containing the file referred to by I<fd> does not support "
1256 "this operation; or the I<mode> is not supported by the filesystem containing "
1257 "the file referred to by I<fd>."
1258 msgstr ""
1259 "I<fd> が参照するファイルを含むファイルシステムが 指定された操作を\n"
1260 "サポートしていない。 I<fd> が参照するファイルを含むファイルシステムが\n"
1261 "I<mode> をサポートしていない。"
1262
1263 #. type: TP
1264 #: build/C/man2/fallocate.2:283 build/C/man2/mlock.2:143
1265 #: build/C/man2/mlock.2:182 build/C/man2/mmap.2:458 build/C/man2/shmctl.2:353
1266 #: build/C/man2/shmget.2:225
1267 #, no-wrap
1268 msgid "B<EPERM>"
1269 msgstr "B<EPERM>"
1270
1271 #. type: Plain text
1272 #: build/C/man2/fallocate.2:301
1273 #, fuzzy
1274 #| msgid ""
1275 #| "The file referred to by I<fd> is marked immutable (see B<chattr>(1)).  "
1276 #| "Or: I<mode> specifies B<FALLOC_FL_PUNCH_HOLE> and the file referred to by "
1277 #| "I<fd> is marked append-only (see B<chattr>(1))."
1278 msgid ""
1279 "The file referred to by I<fd> is marked immutable (see B<chattr>(1)).  Or: "
1280 "I<mode> specifies B<FALLOC_FL_PUNCH_HOLE> or B<FALLOC_FL_COLLAPSE_RANGE> and "
1281 "the file referred to by I<fd> is marked append-only (see B<chattr>(1))."
1282 msgstr ""
1283 "I<fd> が参照するファイルに変更不可 (immutable) の属性が付いている (B<chattr>"
1284 "(1) 参照)。 I<mode> に B<FALLOC_FL_PUNCH_HOLE> が指定されたが、 I<fd> が参照"
1285 "するファイルに追加のみ (append-only) の属性が付いている (B<chattr>(1) 参照)。"
1286
1287 #. type: TP
1288 #: build/C/man2/fallocate.2:301 build/C/man2/posix_fadvise.2:97
1289 #: build/C/man3/posix_fallocate.3:96 build/C/man2/sync_file_range.2:169
1290 #, no-wrap
1291 msgid "B<ESPIPE>"
1292 msgstr "B<ESPIPE>"
1293
1294 #. type: Plain text
1295 #: build/C/man2/fallocate.2:305
1296 msgid "I<fd> refers to a pipe or FIFO."
1297 msgstr "I<fd> がパイプか FIFO を参照している。"
1298
1299 #. type: TP
1300 #: build/C/man2/fallocate.2:305 build/C/man2/mmap.2:467
1301 #, no-wrap
1302 msgid "B<ETXTBSY>"
1303 msgstr "B<ETXTBSY>"
1304
1305 #. type: Plain text
1306 #: build/C/man2/fallocate.2:313
1307 msgid ""
1308 "I<mode> specifies B<FALLOC_FL_COLLAPSE_RANGE>, but the file referred to by "
1309 "I<fd> is currently being executed."
1310 msgstr ""
1311
1312 #. type: SH
1313 #: build/C/man2/fallocate.2:313 build/C/man3/malloc_info.3:60
1314 #: build/C/man3/mcheck.3:134 build/C/man2/mmap2.2:74
1315 #: build/C/man2/posix_fadvise.2:104 build/C/man3/posix_fallocate.3:100
1316 #: build/C/man3/posix_memalign.3:167 build/C/man2/readahead.2:83
1317 #: build/C/man2/remap_file_pages.2:148 build/C/man3/shm_open.3:249
1318 #: build/C/man2/subpage_prot.2:90 build/C/man2/sync_file_range.2:177
1319 #, no-wrap
1320 msgid "VERSIONS"
1321 msgstr "バージョン"
1322
1323 #.  See http://sourceware.org/bugzilla/show_bug.cgi?id=14964
1324 #. type: Plain text
1325 #: build/C/man2/fallocate.2:321
1326 msgid ""
1327 "B<fallocate>()  is available on Linux since kernel 2.6.23.  Support is "
1328 "provided by glibc since version 2.10.  The B<FALLOC_FL_*> flags are defined "
1329 "in glibc headers only since version 2.18."
1330 msgstr ""
1331 "B<fallocate>()  はカーネル 2.6.23 以降の Linux で利用可能である。 glibc での"
1332 "対応はバージョン 3.10 以降で行われている。 B<FALLOC_FL_*> が glibc のヘッダ"
1333 "ファイルで定義されているのは、バージョン 2.18 以降のみである。"
1334
1335 #. type: Plain text
1336 #: build/C/man2/fallocate.2:324
1337 msgid "B<fallocate>()  is Linux-specific."
1338 msgstr "B<fallocate>()  は Linux 固有である。"
1339
1340 #. type: Plain text
1341 #: build/C/man2/fallocate.2:329
1342 msgid ""
1343 "B<fallocate>(1), B<ftruncate>(2), B<posix_fadvise>(3), B<posix_fallocate>(3)"
1344 msgstr ""
1345 "B<fallocate>(1), B<ftruncate>(2), B<posix_fadvise>(3), B<posix_fallocate>(3)"
1346
1347 #. type: TH
1348 #: build/C/man2/madvise.2:35
1349 #, no-wrap
1350 msgid "MADVISE"
1351 msgstr "MADVISE"
1352
1353 #. type: TH
1354 #: build/C/man2/madvise.2:35 build/C/man2/msync.2:25
1355 #, fuzzy, no-wrap
1356 #| msgid "2014-04-06"
1357 msgid "2014-04-20"
1358 msgstr "2014-04-06"
1359
1360 #. type: Plain text
1361 #: build/C/man2/madvise.2:38
1362 msgid "madvise - give advice about use of memory"
1363 msgstr "madvise - メモリ利用に関するアドバイスを与える"
1364
1365 #. type: Plain text
1366 #: build/C/man2/madvise.2:40 build/C/man2/msync.2:30
1367 #: build/C/man3/shm_open.3:31
1368 msgid "B<#include E<lt>sys/mman.hE<gt>>"
1369 msgstr "B<#include E<lt>sys/mman.hE<gt>>"
1370
1371 #. type: Plain text
1372 #: build/C/man2/madvise.2:42
1373 msgid ""
1374 "B<int madvise(void *>I<addr>B<, size_t >I<length>B<, int >I<advice>B<);>"
1375 msgstr ""
1376 "B<int madvise(void *>I<addr>B<, size_t >I<length>B<, int >I<advice>B<);>"
1377
1378 #. type: Plain text
1379 #: build/C/man2/madvise.2:46 build/C/man2/posix_fadvise.2:43
1380 #: build/C/man3/posix_fallocate.3:39 build/C/man3/posix_memalign.3:49
1381 msgid ""
1382 "Feature Test Macro Requirements for glibc (see B<feature_test_macros>(7)):"
1383 msgstr "glibc 向けの機能検査マクロの要件 (B<feature_test_macros>(7)  参照):"
1384
1385 #. type: Plain text
1386 #: build/C/man2/madvise.2:50
1387 msgid "B<madvise>(): _BSD_SOURCE"
1388 msgstr "B<madvise>(): _BSD_SOURCE"
1389
1390 #. type: Plain text
1391 #: build/C/man2/madvise.2:68
1392 msgid ""
1393 "The B<madvise>()  system call advises the kernel about how to handle paging "
1394 "input/output in the address range beginning at address I<addr> and with size "
1395 "I<length> bytes.  It allows an application to tell the kernel how it expects "
1396 "to use some mapped or shared memory areas, so that the kernel can choose "
1397 "appropriate read-ahead and caching techniques.  This call does not influence "
1398 "the semantics of the application (except in the case of B<MADV_DONTNEED>), "
1399 "but may influence its performance.  The kernel is free to ignore the advice."
1400 msgstr ""
1401 "B<madvise>()  システムコールは、アドレス I<addr> からはじまる I<length> バイ"
1402 "トのメモリブロックのページング入出力をどう扱えば良いか、 カーネルにアドバイス"
1403 "する。 これを用いると、 アプリケーションからカーネルに、 マップされたメモリや"
1404 "共有メモリをどのように扱ってほしいか伝えることができ、 カーネルはそれに応じて"
1405 "先読みやキャッシュなどの適切な手法を選択できる。 このコールはアプリケーション"
1406 "の動作そのものには影響しない (B<MADV_DONTNEED> の場合は別) が、 性能には影響"
1407 "しうる。 なおこのアドバイスを受け入れるかどうかはカーネルに任される。"
1408
1409 #. type: Plain text
1410 #: build/C/man2/madvise.2:72
1411 msgid "The advice is indicated in the I<advice> argument which can be"
1412 msgstr ""
1413 "アドバイスは引き数 I<advice> によって与える。以下のいずれかを指定できる。"
1414
1415 #. type: TP
1416 #: build/C/man2/madvise.2:72
1417 #, no-wrap
1418 msgid "B<MADV_NORMAL>"
1419 msgstr "B<MADV_NORMAL>"
1420
1421 #. type: Plain text
1422 #: build/C/man2/madvise.2:76
1423 msgid "No special treatment.  This is the default."
1424 msgstr "特別な扱いは行わない。これがデフォルトである。"
1425
1426 #. type: TP
1427 #: build/C/man2/madvise.2:76
1428 #, no-wrap
1429 msgid "B<MADV_RANDOM>"
1430 msgstr "B<MADV_RANDOM>"
1431
1432 #. type: Plain text
1433 #: build/C/man2/madvise.2:80
1434 msgid ""
1435 "Expect page references in random order.  (Hence, read ahead may be less "
1436 "useful than normally.)"
1437 msgstr ""
1438 "ページ参照はランダムな順序で行われそうだ。 (したがって、先読みはあまり効果が"
1439 "なさそうだ。)"
1440
1441 #. type: TP
1442 #: build/C/man2/madvise.2:80
1443 #, no-wrap
1444 msgid "B<MADV_SEQUENTIAL>"
1445 msgstr "B<MADV_SEQUENTIAL>"
1446
1447 #. type: Plain text
1448 #: build/C/man2/madvise.2:85
1449 msgid ""
1450 "Expect page references in sequential order.  (Hence, pages in the given "
1451 "range can be aggressively read ahead, and may be freed soon after they are "
1452 "accessed.)"
1453 msgstr ""
1454 "ページ参照はシーケンシャルな順序で行われそうだ。 (したがって与えた範囲のペー"
1455 "ジは積極的に先読みしておくと良いだろう。 またアクセスが終わったら速やかに解放"
1456 "して良い。)"
1457
1458 #. type: TP
1459 #: build/C/man2/madvise.2:85
1460 #, no-wrap
1461 msgid "B<MADV_WILLNEED>"
1462 msgstr "B<MADV_WILLNEED>"
1463
1464 #. type: Plain text
1465 #: build/C/man2/madvise.2:89
1466 msgid ""
1467 "Expect access in the near future.  (Hence, it might be a good idea to read "
1468 "some pages ahead.)"
1469 msgstr ""
1470 "近い将来にアクセスされそうだ。 (したがってこれらのページを今のうちに先読みし"
1471 "ておくといいだろう。)"
1472
1473 #. type: TP
1474 #: build/C/man2/madvise.2:89
1475 #, no-wrap
1476 msgid "B<MADV_DONTNEED>"
1477 msgstr "B<MADV_DONTNEED>"
1478
1479 #. type: Plain text
1480 #: build/C/man2/madvise.2:100
1481 msgid ""
1482 "Do not expect access in the near future.  (For the time being, the "
1483 "application is finished with the given range, so the kernel can free "
1484 "resources associated with it.)  Subsequent accesses of pages in this range "
1485 "will succeed, but will result either in reloading of the memory contents "
1486 "from the underlying mapped file (see B<mmap>(2))  or zero-fill-on-demand "
1487 "pages for mappings without an underlying file."
1488 msgstr ""
1489 "しばらくアクセスはなさそうだ。 (現時点でアプリケーションは与えた範囲の処理を"
1490 "終えている。 したがってカーネルはこれに関連するリソースを解放して良い。)  こ"
1491 "れ以降この範囲のページへのアクセスがあると、 成功はするが、メモリの内容をマッ"
1492 "プ元のファイルからロードし直すことになる (B<mmap>(2)  を見よ) か、 または元"
1493 "ファイルがないマップページでは アクセスがあったときに 0 埋めが行われることに"
1494 "なる。"
1495
1496 #. type: TP
1497 #: build/C/man2/madvise.2:100
1498 #, no-wrap
1499 msgid "B<MADV_REMOVE> (since Linux 2.6.16)"
1500 msgstr "B<MADV_REMOVE> (Linux 2.6.16 以降)"
1501
1502 #.  2.6.18-rc5
1503 #.  Databases want to use this feature to drop a section of their
1504 #.  bufferpool (shared memory segments) - without writing back to
1505 #.  disk/swap space.  This feature is also useful for supporting
1506 #.  hot-plug memory on UML.
1507 #. type: Plain text
1508 #: build/C/man2/madvise.2:113
1509 msgid ""
1510 "Free up a given range of pages and its associated backing store.  Currently, "
1511 "only shmfs/tmpfs supports this; other filesystems return with the error "
1512 "B<ENOSYS>."
1513 msgstr ""
1514 "指定された範囲のページと関連するバッキングストアを解放する。 現在のところ、 "
1515 "shmfs/tmpfs だけがこれに対応している。 他のファイルシステムでは B<ENOSYS> が"
1516 "返される。"
1517
1518 #. type: TP
1519 #: build/C/man2/madvise.2:113
1520 #, no-wrap
1521 msgid "B<MADV_DONTFORK> (since Linux 2.6.16)"
1522 msgstr "B<MADV_DONTFORK> (Linux 2.6.16 以降)"
1523
1524 #.  See http://lwn.net/Articles/171941/
1525 #.  [PATCH] madvise MADV_DONTFORK/MADV_DOFORK
1526 #.  Currently, copy-on-write may change the physical address of
1527 #.  a page even if the user requested that the page is pinned in
1528 #.  memory (either by mlock or by get_user_pages).  This happens
1529 #.  if the process forks meanwhile, and the parent writes to that
1530 #.  page.  As a result, the page is orphaned: in case of
1531 #.  get_user_pages, the application will never see any data hardware
1532 #.  DMA's into this page after the COW.  In case of mlock'd memory,
1533 #.  the parent is not getting the realtime/security benefits of mlock.
1534 #.  In particular, this affects the Infiniband modules which do DMA from
1535 #.  and into user pages all the time.
1536 #.  This patch adds madvise options to control whether memory range is
1537 #.  inherited across fork. Useful e.g. for when hardware is doing DMA
1538 #.  from/into these pages.  Could also be useful to an application
1539 #.  wanting to speed up its forks by cutting large areas out of
1540 #.  consideration.
1541 #.  SEE ALSO: http://lwn.net/Articles/171941/
1542 #.  "Tweaks to madvise() and posix_fadvise()", 14 Feb 2006
1543 #. type: Plain text
1544 #: build/C/man2/madvise.2:144
1545 msgid ""
1546 "Do not make the pages in this range available to the child after a B<fork>"
1547 "(2).  This is useful to prevent copy-on-write semantics from changing the "
1548 "physical location of a page(s) if the parent writes to it after a B<fork>"
1549 "(2).  (Such page relocations cause problems for hardware that DMAs into the "
1550 "page(s).)"
1551 msgstr ""
1552 "B<fork>(2)  が行われた後、指定された範囲のページを子プロセスが利用できないよ"
1553 "うにする。 この機能は、書き込み時コピー (copy-on-write) 方式で、 B<fork>(2)  "
1554 "の後で親プロセスがページに書き込みを行った場合に ページの物理位置が変化しない"
1555 "ようにするのに有効である (ページの再配置はハードウェアがそのページに DMA 転送"
1556 "を行うような場合に 問題を起こすことがある)。"
1557
1558 #. type: TP
1559 #: build/C/man2/madvise.2:144
1560 #, no-wrap
1561 msgid "B<MADV_DOFORK> (since Linux 2.6.16)"
1562 msgstr "B<MADV_DOFORK> (Linux 2.6.16 以降)"
1563
1564 #. type: Plain text
1565 #: build/C/man2/madvise.2:150
1566 msgid ""
1567 "Undo the effect of B<MADV_DONTFORK>, restoring the default behavior, whereby "
1568 "a mapping is inherited across B<fork>(2)."
1569 msgstr ""
1570 "B<MADV_DONTFORK> の影響を取り消し、デフォルトの動作に戻す。 つまり、 B<fork>"
1571 "(2)  の前後でマッピングは継承されるようになる。"
1572
1573 #. type: TP
1574 #: build/C/man2/madvise.2:150
1575 #, no-wrap
1576 msgid "B<MADV_HWPOISON> (since Linux 2.6.32)"
1577 msgstr "B<MADV_HWPOISON> (Linux 2.6.32 以降)"
1578
1579 #. type: Plain text
1580 #: build/C/man2/madvise.2:162
1581 msgid ""
1582 "Poison a page and handle it like a hardware memory corruption.  This "
1583 "operation is available only for privileged (B<CAP_SYS_ADMIN>)  processes.  "
1584 "This operation may result in the calling process receiving a B<SIGBUS> and "
1585 "the page being unmapped.  This feature is intended for testing of memory "
1586 "error-handling code; it is available only if the kernel was configured with "
1587 "B<CONFIG_MEMORY_FAILURE>."
1588 msgstr ""
1589
1590 #. type: TP
1591 #: build/C/man2/madvise.2:162
1592 #, no-wrap
1593 msgid "B<MADV_SOFT_OFFLINE> (since Linux 2.6.33)"
1594 msgstr "B<MADV_SOFT_OFFLINE> (Linux 2.6.33 以降)"
1595
1596 #. type: Plain text
1597 #: build/C/man2/madvise.2:180
1598 msgid ""
1599 "Soft offline the pages in the range specified by I<addr> and I<length>.  The "
1600 "memory of each page in the specified range is preserved (i.e., when next "
1601 "accessed, the same content will be visible, but in a new physical page "
1602 "frame), and the original page is offlined (i.e., no longer used, and taken "
1603 "out of normal memory management).  The effect of the B<MADV_SOFT_OFFLINE> "
1604 "operation is invisible to (i.e., does not change the semantics of)  the "
1605 "calling process.  This feature is intended for testing of memory error-"
1606 "handling code; it is available only if the kernel was configured with "
1607 "B<CONFIG_MEMORY_FAILURE>."
1608 msgstr ""
1609
1610 #. type: TP
1611 #: build/C/man2/madvise.2:180
1612 #, no-wrap
1613 msgid "B<MADV_MERGEABLE> (since Linux 2.6.32)"
1614 msgstr "B<MADV_MERGEABLE> (Linux 2.6.32 以降)"
1615
1616 #. type: Plain text
1617 #: build/C/man2/madvise.2:205
1618 msgid ""
1619 "Enable Kernel Samepage Merging (KSM) for the pages in the range specified by "
1620 "I<addr> and I<length>.  The kernel regularly scans those areas of user "
1621 "memory that have been marked as mergeable, looking for pages with identical "
1622 "content.  These are replaced by a single write-protected page (which is "
1623 "automatically copied if a process later wants to update the content of the "
1624 "page).  KSM merges only private anonymous pages (see B<mmap>(2)).  The KSM "
1625 "feature is intended for applications that generate many instances of the "
1626 "same data (e.g., virtualization systems such as KVM).  It can consume a lot "
1627 "of processing power; use with care.  See the Linux kernel source file "
1628 "I<Documentation/vm/ksm.txt> for more details.  The B<MADV_MERGEABLE> and "
1629 "B<MADV_UNMERGEABLE> operations are available only if the kernel was "
1630 "configured with B<CONFIG_KSM>."
1631 msgstr ""
1632
1633 #. type: TP
1634 #: build/C/man2/madvise.2:205
1635 #, no-wrap
1636 msgid "B<MADV_UNMERGEABLE> (since Linux 2.6.32)"
1637 msgstr "B<MADV_UNMERGEABLE> (Linux 2.6.32 以降)"
1638
1639 #. type: Plain text
1640 #: build/C/man2/madvise.2:214
1641 msgid ""
1642 "Undo the effect of an earlier B<MADV_MERGEABLE> operation on the specified "
1643 "address range; KSM unmerges whatever pages it had merged in the address "
1644 "range specified by I<addr> and I<length>."
1645 msgstr ""
1646
1647 #. type: TP
1648 #: build/C/man2/madvise.2:214
1649 #, no-wrap
1650 msgid "B<MADV_HUGEPAGE> (since Linux 2.6.38)"
1651 msgstr "B<MADV_HUGEPAGE> (Linux 2.6.38 以降)"
1652
1653 #.  http://lwn.net/Articles/358904/
1654 #.  https://lwn.net/Articles/423584/
1655 #. type: Plain text
1656 #: build/C/man2/madvise.2:243
1657 msgid ""
1658 "Enables Transparent Huge Pages (THP) for pages in the range specified by "
1659 "I<addr> and I<length>.  Currently, Transparent Huge Pages work only with "
1660 "private anonymous pages (see B<mmap>(2)).  The kernel will regularly scan "
1661 "the areas marked as huge page candidates to replace them with huge pages.  "
1662 "The kernel will also allocate huge pages directly when the region is "
1663 "naturally aligned to the huge page size (see B<posix_memalign>(2)).  This "
1664 "feature is primarily aimed at applications that use large mappings of data "
1665 "and access large regions of that memory at a time (e.g., virtualization "
1666 "systems such as QEMU).  It can very easily waste memory (e.g., a 2MB mapping "
1667 "that only ever accesses 1 byte will result in 2MB of wired memory instead of "
1668 "one 4KB page).  See the Linux kernel source file I<Documentation/vm/"
1669 "transhuge.txt> for more details.  The B<MADV_HUGEPAGE> and "
1670 "B<MADV_NOHUGEPAGE> operations are available only if the kernel was "
1671 "configured with B<CONFIG_TRANSPARENT_HUGEPAGE>."
1672 msgstr ""
1673
1674 #. type: TP
1675 #: build/C/man2/madvise.2:243
1676 #, no-wrap
1677 msgid "B<MADV_NOHUGEPAGE> (since Linux 2.6.38)"
1678 msgstr "B<MADV_NOHUGEPAGE> (Linux 2.6.38 以降)"
1679
1680 #. type: Plain text
1681 #: build/C/man2/madvise.2:250
1682 msgid ""
1683 "Ensures that memory in the address range specified by I<addr> and I<length> "
1684 "will not be collapsed into huge pages."
1685 msgstr ""
1686
1687 #. type: TP
1688 #: build/C/man2/madvise.2:250
1689 #, no-wrap
1690 msgid "B<MADV_DONTDUMP> (since Linux 3.4)"
1691 msgstr "B<MADV_DONTDUMP> (Linux 3.4 以降)"
1692
1693 #. type: Plain text
1694 #: build/C/man2/madvise.2:264
1695 msgid ""
1696 "Exclude from a core dump those pages in the range specified by I<addr> and "
1697 "I<length>.  This is useful in applications that have large areas of memory "
1698 "that are known not to be useful in a core dump.  The effect of "
1699 "B<MADV_DONTDUMP> takes precedence over the bit mask that is set via the I</"
1700 "proc/PID/coredump_filter> file (see B<core>(5))."
1701 msgstr ""
1702
1703 #. type: TP
1704 #: build/C/man2/madvise.2:264
1705 #, no-wrap
1706 msgid "B<MADV_DODUMP> (since Linux 3.4)"
1707 msgstr "B<MADV_DODUMP> (Linux 3.4 以降)"
1708
1709 #. type: Plain text
1710 #: build/C/man2/madvise.2:268
1711 msgid "Undo the effect of an earlier B<MADV_DONTDUMP>."
1712 msgstr ""
1713
1714 #. type: Plain text
1715 #: build/C/man2/madvise.2:275
1716 msgid ""
1717 "On success B<madvise>()  returns zero.  On error, it returns -1 and I<errno> "
1718 "is set appropriately."
1719 msgstr ""
1720 "B<madvise>()  は成功すると 0 を返す。 エラーが起こると -1 を返し、 I<errno> "
1721 "を適切な値に設定する。"
1722
1723 #. type: TP
1724 #: build/C/man2/madvise.2:276 build/C/man2/mlock.2:154 build/C/man2/mmap.2:411
1725 #: build/C/man2/mremap.2:136
1726 #, no-wrap
1727 msgid "B<EAGAIN>"
1728 msgstr "B<EAGAIN>"
1729
1730 #. type: Plain text
1731 #: build/C/man2/madvise.2:279
1732 msgid "A kernel resource was temporarily unavailable."
1733 msgstr "何らかのカーネルリソースが一時的に利用できなかった。"
1734
1735 #. type: Plain text
1736 #: build/C/man2/madvise.2:282
1737 msgid "The map exists, but the area maps something that isn't a file."
1738 msgstr "指定したマップは存在するが、ファイルではないところをマップしている。"
1739
1740 #. type: Plain text
1741 #: build/C/man2/madvise.2:285
1742 msgid "This error can occur for the following reasons:"
1743 msgstr "このエラーは以下の理由で発生する。"
1744
1745 #.  .I len
1746 #.  is zero,
1747 #. type: Plain text
1748 #: build/C/man2/madvise.2:292
1749 msgid "The value I<len> is negative."
1750 msgstr "I<len> が負の値である。"
1751
1752 #. type: Plain text
1753 #: build/C/man2/madvise.2:295
1754 msgid "I<addr> is not page-aligned."
1755 msgstr "I<addr> がページ境界ではない。"
1756
1757 #. type: Plain text
1758 #: build/C/man2/madvise.2:298
1759 msgid "I<advice> is not a valid value"
1760 msgstr "I<advice> が有効な値でない。"
1761
1762 #. type: Plain text
1763 #: build/C/man2/madvise.2:301
1764 msgid ""
1765 "The application is attempting to release locked or shared pages (with "
1766 "B<MADV_DONTNEED>)."
1767 msgstr ""
1768 "アプリケーションがロックされたページや共有ページを (B<MADV_DONTNEED> で) 解"
1769 "放\n"
1770 "しようとしている。"
1771
1772 #. type: Plain text
1773 #: build/C/man2/madvise.2:309
1774 msgid ""
1775 "B<MADV_MERGEABLE> or B<MADV_UNMERGEABLE> was specified in I<advice>, but the "
1776 "kernel was not configured with B<CONFIG_KSM>."
1777 msgstr ""
1778 "I<advice> に B<MADV_MERGEABLE> か B<MADV_UNMERGEABLE> が指定されたが、 カーネ"
1779 "ルの設定が B<CONFIG_KSM> が有効になっていなかった。"
1780
1781 #. type: Plain text
1782 #: build/C/man2/madvise.2:316
1783 msgid ""
1784 "(for B<MADV_WILLNEED>)  Paging in this area would exceed the process's "
1785 "maximum resident set size."
1786 msgstr ""
1787 "(B<MADV_WILLNEED> の場合) この範囲のページングを行うと、 プロセスの RSS "
1788 "(resident set size) の最大値を越えてしまう。"
1789
1790 #. type: TP
1791 #: build/C/man2/madvise.2:316 build/C/man2/madvise.2:321
1792 #: build/C/man2/mlock.2:123 build/C/man2/mlock.2:131 build/C/man2/mlock.2:169
1793 #: build/C/man2/mmap.2:454 build/C/man2/mprotect.2:100
1794 #: build/C/man2/mprotect.2:103 build/C/man2/mremap.2:179
1795 #: build/C/man2/msync.2:93 build/C/man3/posix_memalign.3:164
1796 #: build/C/man2/shmctl.2:337 build/C/man2/shmget.2:214
1797 #: build/C/man2/shmop.2:214 build/C/man2/subpage_prot.2:87
1798 #: build/C/man2/sync_file_range.2:163
1799 #, no-wrap
1800 msgid "B<ENOMEM>"
1801 msgstr "B<ENOMEM>"
1802
1803 #. type: Plain text
1804 #: build/C/man2/madvise.2:321
1805 msgid "(for B<MADV_WILLNEED>)  Not enough memory: paging in failed."
1806 msgstr "(B<MADV_WILLNEED> の場合) メモリが足りず、ページングに失敗した。"
1807
1808 #. type: Plain text
1809 #: build/C/man2/madvise.2:325
1810 msgid ""
1811 "Addresses in the specified range are not currently mapped, or are outside "
1812 "the address space of the process."
1813 msgstr ""
1814 "指定した範囲のアドレスが、現在マップされていない。 あるいはプロセスのアドレス"
1815 "空間の内部にない。"
1816
1817 #.  FIXME . Write a posix_madvise(3) page.
1818 #. type: Plain text
1819 #: build/C/man2/madvise.2:338
1820 msgid ""
1821 "POSIX.1b.  POSIX.1-2001 describes B<posix_madvise>(3)  with constants "
1822 "B<POSIX_MADV_NORMAL>, B<POSIX_MADV_RANDOM>, and so on, with a behavior close "
1823 "to that described here.  There is a similar B<posix_fadvise>(2)  for file "
1824 "access."
1825 msgstr ""
1826 "POSIX.1b.  POSIX.1-2001 では、 B<posix_madvise>(3)  を B<POSIX_MADV_NORMAL>, "
1827 "B<POSIX_MADV_RANDOM> などの定数とともに記述していた (それぞれの振る舞いはここ"
1828 "で述べたものに近い)。 ファイルアクセスに対しても B<posix_fadvise>(2)  という"
1829 "類似の関数が存在する。"
1830
1831 #. type: Plain text
1832 #: build/C/man2/madvise.2:347
1833 msgid ""
1834 "B<MADV_REMOVE>, B<MADV_DONTFORK>, B<MADV_DOFORK>, B<MADV_HWPOISON>, "
1835 "B<MADV_MERGEABLE>, and B<MADV_UNMERGEABLE> are Linux-specific."
1836 msgstr ""
1837 "B<MADV_REMOVE>, B<MADV_DONTFORK>, B<MADV_DOFORK>, B<MADV_HWPOISON>,\n"
1838 "B<MADV_MERGEABLE>, B<MADV_UNMERGEABLE> は Linux 固有である。"
1839
1840 #. type: SS
1841 #: build/C/man2/madvise.2:348 build/C/man2/mlock.2:274
1842 #: build/C/man2/shmget.2:305
1843 #, no-wrap
1844 msgid "Linux notes"
1845 msgstr "Linux での注意"
1846
1847 #. type: Plain text
1848 #: build/C/man2/madvise.2:356
1849 msgid ""
1850 "The current Linux implementation (2.4.0) views this system call more as a "
1851 "command than as advice and hence may return an error when it cannot do what "
1852 "it usually would do in response to this advice.  (See the ERRORS description "
1853 "above.)  This is nonstandard behavior."
1854 msgstr ""
1855 "現在の Linux の実装 (2.4.0) では、 このシステムコールをアドバイスというよりは"
1856 "命令と見ている。 したがってこのアドバイスに対して通常行われる動作が不可能な場"
1857 "合は、 エラーを返すことがある (上記の エラー の記述を参照)。 この振舞いは標準"
1858 "とは異なる。"
1859
1860 #.  .SH HISTORY
1861 #.  The
1862 #.  .BR madvise ()
1863 #.  function first appeared in 4.4BSD.
1864 #. type: Plain text
1865 #: build/C/man2/madvise.2:372
1866 msgid ""
1867 "The Linux implementation requires that the address I<addr> be page-aligned, "
1868 "and allows I<length> to be zero.  If there are some parts of the specified "
1869 "address range that are not mapped, the Linux version of B<madvise>()  "
1870 "ignores them and applies the call to the rest (but returns B<ENOMEM> from "
1871 "the system call, as it should)."
1872 msgstr ""
1873 "Linux の実装では I<addr> のアドレスはページ境界の値でなければならない。また "
1874 "I<length> は 0 であっても構わない。 また Linux 版の B<madvise>()  では、指定"
1875 "されたアドレス範囲にマップされていない部分があると、 これらを無視して残りの部"
1876 "分にアドバイスを適用する (しかしシステムコールに対してはちゃんと B<ENOMEM> を"
1877 "返す)。"
1878
1879 #. type: Plain text
1880 #: build/C/man2/madvise.2:381
1881 #, fuzzy
1882 #| msgid ""
1883 #| "B<getrlimit>(2), B<mincore>(2), B<mmap>(2), B<mprotect>(2), B<msync>(2), "
1884 #| "B<munmap>(2), B<core>(5)"
1885 msgid ""
1886 "B<getrlimit>(2), B<mincore>(2), B<mmap>(2), B<mprotect>(2), B<msync>(2), "
1887 "B<munmap>(2), B<prctl>(2), B<core>(5)"
1888 msgstr ""
1889 "B<getrlimit>(2), B<mincore>(2), B<mmap>(2), B<mprotect>(2), B<msync>(2), "
1890 "B<munmap>(2), B<core>(5)"
1891
1892 #. type: TH
1893 #: build/C/man3/mallinfo.3:26
1894 #, no-wrap
1895 msgid "MALLINFO"
1896 msgstr "MALLINFO"
1897
1898 #. type: TH
1899 #: build/C/man3/mallinfo.3:26 build/C/man3/malloc_stats.3:26
1900 #, no-wrap
1901 msgid "2012-05-06"
1902 msgstr "2012-05-06"
1903
1904 #. type: Plain text
1905 #: build/C/man3/mallinfo.3:29
1906 msgid "mallinfo - obtain memory allocation information"
1907 msgstr "mallinfo - メモリ割り当て情報を取得する"
1908
1909 #. type: Plain text
1910 #: build/C/man3/mallinfo.3:31 build/C/man3/malloc_stats.3:31
1911 #: build/C/man3/malloc_trim.3:31 build/C/man3/malloc_usable_size.3:30
1912 #: build/C/man3/mallopt.3:31
1913 msgid "B<#include E<lt>malloc.hE<gt>>"
1914 msgstr "B<#include E<lt>malloc.hE<gt>>"
1915
1916 #. type: Plain text
1917 #: build/C/man3/mallinfo.3:33
1918 msgid "B<struct mallinfo mallinfo(void);>"
1919 msgstr "B<struct mallinfo mallinfo(void);>"
1920
1921 #. type: Plain text
1922 #: build/C/man3/mallinfo.3:41
1923 msgid ""
1924 "The B<mallinfo>()  function returns a copy of a structure containing "
1925 "information about memory allocations performed by B<malloc>(3)  and related "
1926 "functions.  This structure is defined as follows:"
1927 msgstr ""
1928 "B<mallinfo>() 関数は、 B<malloc>(3) や一連の関数により実行されたメモリ\n"
1929 "割り当てに関する情報を格納した構造体のコピーを返す。\n"
1930 "この構造体は以下のように定義されている。"
1931
1932 #. type: Plain text
1933 #: build/C/man3/mallinfo.3:56
1934 #, no-wrap
1935 msgid ""
1936 "struct mallinfo {\n"
1937 "    int arena;     /* Non-mmapped space allocated (bytes) */\n"
1938 "    int ordblks;   /* Number of free chunks */\n"
1939 "    int smblks;    /* Number of free fastbin blocks */\n"
1940 "    int hblks;     /* Number of mmapped regions */\n"
1941 "    int hblkhd;    /* Space allocated in mmapped regions (bytes) */\n"
1942 "    int usmblks;   /* Maximum total allocated space (bytes) */\n"
1943 "    int fsmblks;   /* Space in freed fastbin blocks (bytes) */\n"
1944 "    int uordblks;  /* Total allocated space (bytes) */\n"
1945 "    int fordblks;  /* Total free space (bytes) */\n"
1946 "    int keepcost;  /* Top-most, releasable space (bytes) */\n"
1947 "};\n"
1948 msgstr ""
1949 "struct mallinfo {\n"
1950 "    int arena;     /* Non-mmapped space allocated (bytes) */\n"
1951 "    int ordblks;   /* Number of free chunks */\n"
1952 "    int smblks;    /* Number of free fastbin blocks */\n"
1953 "    int hblks;     /* Number of mmapped regions */\n"
1954 "    int hblkhd;    /* Space allocated in mmapped regions (bytes) */\n"
1955 "    int usmblks;   /* Maximum total allocated space (bytes) */\n"
1956 "    int fsmblks;   /* Space in freed fastbin blocks (bytes) */\n"
1957 "    int uordblks;  /* Total allocated space (bytes) */\n"
1958 "    int fordblks;  /* Total free space (bytes) */\n"
1959 "    int keepcost;  /* Top-most, releasable space (bytes) */\n"
1960 "};\n"
1961
1962 #. type: Plain text
1963 #: build/C/man3/mallinfo.3:62
1964 msgid ""
1965 "The fields of the I<mallinfo> structure contain the following information:"
1966 msgstr "I<mallinfo> 構造体の各フィールドには以下の情報が格納される。"
1967
1968 #. type: TP
1969 #: build/C/man3/mallinfo.3:62
1970 #, no-wrap
1971 msgid "I<arena>"
1972 msgstr "I<arena>"
1973
1974 #. type: Plain text
1975 #: build/C/man3/mallinfo.3:68
1976 msgid ""
1977 "The total amount of memory allocated by means other than B<mmap>(2)  (i.e., "
1978 "memory allocated on the heap).  This figure includes both in-use blocks and "
1979 "blocks on the free list."
1980 msgstr ""
1981
1982 #. type: TP
1983 #: build/C/man3/mallinfo.3:68
1984 #, no-wrap
1985 msgid "I<ordblks>"
1986 msgstr "I<ordblks>"
1987
1988 #. type: Plain text
1989 #: build/C/man3/mallinfo.3:71
1990 msgid "The number of ordinary (i.e., non-fastbin) free blocks."
1991 msgstr ""
1992
1993 #. type: TP
1994 #: build/C/man3/mallinfo.3:71
1995 #, no-wrap
1996 msgid "I<smblks>"
1997 msgstr "I<smblks>"
1998
1999 #. type: Plain text
2000 #: build/C/man3/mallinfo.3:75
2001 msgid "The number of fastbin free blocks (see B<mallopt>(3))."
2002 msgstr ""
2003
2004 #. type: TP
2005 #: build/C/man3/mallinfo.3:75
2006 #, no-wrap
2007 msgid "I<hblks>"
2008 msgstr "I<hblks>"
2009
2010 #. type: Plain text
2011 #: build/C/man3/mallinfo.3:83
2012 msgid ""
2013 "The number of blocks currently allocated using B<mmap>(2).  (See the "
2014 "discussion of B<M_MMAP_THRESHOLD> in B<mallopt>(3).)"
2015 msgstr ""
2016
2017 #. type: TP
2018 #: build/C/man3/mallinfo.3:83
2019 #, no-wrap
2020 msgid "I<hblkhd>"
2021 msgstr "I<hblkhd>"
2022
2023 #. type: Plain text
2024 #: build/C/man3/mallinfo.3:87
2025 msgid "The number of bytes in blocks currently allocated using B<mmap>(2)."
2026 msgstr ""
2027
2028 #. type: TP
2029 #: build/C/man3/mallinfo.3:87
2030 #, no-wrap
2031 msgid "I<usmblks>"
2032 msgstr "I<usmblks>"
2033
2034 #. type: Plain text
2035 #: build/C/man3/mallinfo.3:92
2036 msgid ""
2037 "The \"highwater mark\" for allocated space\\(emthat is, the maximum amount "
2038 "of space that was ever allocated.  This field is maintained only in "
2039 "nonthreading environments."
2040 msgstr ""
2041
2042 #. type: TP
2043 #: build/C/man3/mallinfo.3:92
2044 #, no-wrap
2045 msgid "I<fsmblks>"
2046 msgstr "I<fsmblks>"
2047
2048 #. type: Plain text
2049 #: build/C/man3/mallinfo.3:95
2050 msgid "The total number of bytes in fastbin free blocks."
2051 msgstr ""
2052
2053 #. type: TP
2054 #: build/C/man3/mallinfo.3:95
2055 #, no-wrap
2056 msgid "I<uordblks>"
2057 msgstr "I<uordblks>"
2058
2059 #. type: Plain text
2060 #: build/C/man3/mallinfo.3:98
2061 msgid "The total number of bytes used by in-use allocations."
2062 msgstr ""
2063
2064 #. type: TP
2065 #: build/C/man3/mallinfo.3:98
2066 #, no-wrap
2067 msgid "I<fordblks>"
2068 msgstr "I<fordblks>"
2069
2070 #. type: Plain text
2071 #: build/C/man3/mallinfo.3:101
2072 msgid "The total number of bytes in free blocks."
2073 msgstr ""
2074
2075 #. type: TP
2076 #: build/C/man3/mallinfo.3:101
2077 #, no-wrap
2078 msgid "I<keepcost>"
2079 msgstr "I<keepcost>"
2080
2081 #.  .SH VERSIONS
2082 #.  Available already in glibc 2.0, possibly earlier
2083 #. type: Plain text
2084 #: build/C/man3/mallinfo.3:110
2085 msgid ""
2086 "The total amount of releasable free space at the top of the heap.  This is "
2087 "the maximum number of bytes that could ideally (i.e., ignoring page "
2088 "alignment restrictions, and so on) be released by B<malloc_trim>(3)."
2089 msgstr ""
2090
2091 #. type: Plain text
2092 #: build/C/man3/mallinfo.3:114
2093 msgid ""
2094 "This function is not specified by POSIX or the C standards.  A similar "
2095 "function exists on many System V derivatives, and was specified in the SVID."
2096 msgstr ""
2097
2098 #.  FIXME http://sourceware.org/bugzilla/show_bug.cgi?id=208
2099 #.  See the 24 Aug 2011 mail by Paul Pluzhnikov:
2100 #.      "[patch] Fix mallinfo() to accumulate results for all arenas"
2101 #.  on libc-alpha@sourceware.org
2102 #. type: Plain text
2103 #: build/C/man3/mallinfo.3:126
2104 msgid ""
2105 "B<Information is returned for only the main memory allocation area.> "
2106 "Allocations in other arenas are excluded.  See B<malloc_stats>(3)  and "
2107 "B<malloc_info>(3)  for alternatives that include information about other "
2108 "arenas."
2109 msgstr ""
2110
2111 #. type: Plain text
2112 #: build/C/man3/mallinfo.3:134
2113 msgid ""
2114 "The fields of the I<mallinfo> structure are typed as I<int>.  However, "
2115 "because some internal bookkeeping values may be of type I<long>, the "
2116 "reported values may wrap around zero and thus be inaccurate."
2117 msgstr ""
2118
2119 #. type: SH
2120 #: build/C/man3/mallinfo.3:134 build/C/man3/malloc_hook.3:89
2121 #: build/C/man3/malloc_info.3:84 build/C/man3/mallopt.3:466
2122 #: build/C/man3/mcheck.3:159 build/C/man2/mmap.2:628
2123 #: build/C/man2/mprotect.2:148 build/C/man3/mtrace.3:108
2124 #, no-wrap
2125 msgid "EXAMPLE"
2126 msgstr "例"
2127
2128 #. type: Plain text
2129 #: build/C/man3/mallinfo.3:140
2130 msgid ""
2131 "The program below employs B<mallinfo>()  to retrieve memory allocation "
2132 "statistics before and after allocating and freeing some blocks of memory.  "
2133 "The statistics are displayed on standard output."
2134 msgstr ""
2135
2136 #. type: Plain text
2137 #: build/C/man3/mallinfo.3:144
2138 msgid ""
2139 "The first two command-line arguments specify the number and size of blocks "
2140 "to be allocated with B<malloc>(3)."
2141 msgstr ""
2142
2143 #. type: Plain text
2144 #: build/C/man3/mallinfo.3:158
2145 msgid ""
2146 "The remaining three arguments specify which of the allocated blocks should "
2147 "be freed with B<free>(3).  These three arguments are optional, and specify "
2148 "(in order): the step size to be used in the loop that frees blocks (the "
2149 "default is 1, meaning free all blocks in the range); the ordinal position of "
2150 "the first block to be freed (default 0, meaning the first allocated block); "
2151 "and a number one greater than the ordinal position of the last block to be "
2152 "freed (default is one greater than the maximum block number).  If these "
2153 "three arguments are omitted, then the defaults cause all allocated blocks to "
2154 "be freed."
2155 msgstr ""
2156
2157 #. type: Plain text
2158 #: build/C/man3/mallinfo.3:162
2159 msgid ""
2160 "In the following example run of the program, 1000 allocations of 100 bytes "
2161 "are performed, and then every second allocated block is freed:"
2162 msgstr ""
2163
2164 #. type: Plain text
2165 #: build/C/man3/mallinfo.3:177
2166 #, no-wrap
2167 msgid ""
2168 "$ B<./a.out 1000 100 2>\n"
2169 "============== Before allocating blocks ==============\n"
2170 "Total non-mmapped bytes (arena):       0\n"
2171 "# of free chunks (ordblks):            1\n"
2172 "# of free fastbin blocks (smblks):     0\n"
2173 "# of mapped regions (hblks):           0\n"
2174 "Bytes in mapped regions (hblkhd):      0\n"
2175 "Max. total allocated space (usmblks):  0\n"
2176 "Free bytes held in fastbins (fsmblks): 0\n"
2177 "Total allocated space (uordblks):      0\n"
2178 "Total free space (fordblks):           0\n"
2179 "Topmost releasable block (keepcost):   0\n"
2180 msgstr ""
2181 "$ B<./a.out 1000 100 2>\n"
2182 "============== Before allocating blocks ==============\n"
2183 "Total non-mmapped bytes (arena):       0\n"
2184 "# of free chunks (ordblks):            1\n"
2185 "# of free fastbin blocks (smblks):     0\n"
2186 "# of mapped regions (hblks):           0\n"
2187 "Bytes in mapped regions (hblkhd):      0\n"
2188 "Max. total allocated space (usmblks):  0\n"
2189 "Free bytes held in fastbins (fsmblks): 0\n"
2190 "Total allocated space (uordblks):      0\n"
2191 "Total free space (fordblks):           0\n"
2192 "Topmost releasable block (keepcost):   0\n"
2193
2194 #. type: Plain text
2195 #: build/C/man3/mallinfo.3:189
2196 #, no-wrap
2197 msgid ""
2198 "============== After allocating blocks ==============\n"
2199 "Total non-mmapped bytes (arena):       135168\n"
2200 "# of free chunks (ordblks):            1\n"
2201 "# of free fastbin blocks (smblks):     0\n"
2202 "# of mapped regions (hblks):           0\n"
2203 "Bytes in mapped regions (hblkhd):      0\n"
2204 "Max. total allocated space (usmblks):  0\n"
2205 "Free bytes held in fastbins (fsmblks): 0\n"
2206 "Total allocated space (uordblks):      104000\n"
2207 "Total free space (fordblks):           31168\n"
2208 "Topmost releasable block (keepcost):   31168\n"
2209 msgstr ""
2210 "============== After allocating blocks ==============\n"
2211 "Total non-mmapped bytes (arena):       135168\n"
2212 "# of free chunks (ordblks):            1\n"
2213 "# of free fastbin blocks (smblks):     0\n"
2214 "# of mapped regions (hblks):           0\n"
2215 "Bytes in mapped regions (hblkhd):      0\n"
2216 "Max. total allocated space (usmblks):  0\n"
2217 "Free bytes held in fastbins (fsmblks): 0\n"
2218 "Total allocated space (uordblks):      104000\n"
2219 "Total free space (fordblks):           31168\n"
2220 "Topmost releasable block (keepcost):   31168\n"
2221
2222 #. type: Plain text
2223 #: build/C/man3/mallinfo.3:201
2224 #, no-wrap
2225 msgid ""
2226 "============== After freeing blocks ==============\n"
2227 "Total non-mmapped bytes (arena):       135168\n"
2228 "# of free chunks (ordblks):            501\n"
2229 "# of free fastbin blocks (smblks):     0\n"
2230 "# of mapped regions (hblks):           0\n"
2231 "Bytes in mapped regions (hblkhd):      0\n"
2232 "Max. total allocated space (usmblks):  0\n"
2233 "Free bytes held in fastbins (fsmblks): 0\n"
2234 "Total allocated space (uordblks):      52000\n"
2235 "Total free space (fordblks):           83168\n"
2236 "Topmost releasable block (keepcost):   31168\n"
2237 msgstr ""
2238 "============== After freeing blocks ==============\n"
2239 "Total non-mmapped bytes (arena):       135168\n"
2240 "# of free chunks (ordblks):            501\n"
2241 "# of free fastbin blocks (smblks):     0\n"
2242 "# of mapped regions (hblks):           0\n"
2243 "Bytes in mapped regions (hblkhd):      0\n"
2244 "Max. total allocated space (usmblks):  0\n"
2245 "Free bytes held in fastbins (fsmblks): 0\n"
2246 "Total allocated space (uordblks):      52000\n"
2247 "Total free space (fordblks):           83168\n"
2248 "Topmost releasable block (keepcost):   31168\n"
2249
2250 #. type: SS
2251 #: build/C/man3/mallinfo.3:203 build/C/man3/malloc_info.3:167
2252 #: build/C/man3/mallopt.3:532 build/C/man3/mcheck.3:176
2253 #: build/C/man2/mmap.2:640 build/C/man2/mprotect.2:165
2254 #, no-wrap
2255 msgid "Program source"
2256 msgstr "プログラムのソース"
2257
2258 #. type: Plain text
2259 #: build/C/man3/mallinfo.3:208
2260 #, no-wrap
2261 msgid ""
2262 "#include E<lt>malloc.hE<gt>\n"
2263 "#include \"tlpi_hdr.h\"\n"
2264 msgstr ""
2265 "#include E<lt>malloc.hE<gt>\n"
2266 "#include \"tlpi_hdr.h\"\n"
2267
2268 #. type: Plain text
2269 #: build/C/man3/mallinfo.3:213
2270 #, no-wrap
2271 msgid ""
2272 "static void\n"
2273 "display_mallinfo(void)\n"
2274 "{\n"
2275 "    struct mallinfo mi;\n"
2276 msgstr ""
2277 "static void\n"
2278 "display_mallinfo(void)\n"
2279 "{\n"
2280 "    struct mallinfo mi;\n"
2281
2282 #. type: Plain text
2283 #: build/C/man3/mallinfo.3:215
2284 #, no-wrap
2285 msgid "    mi = mallinfo();\n"
2286 msgstr "    mi = mallinfo();\n"
2287
2288 #. type: Plain text
2289 #: build/C/man3/mallinfo.3:227
2290 #, no-wrap
2291 msgid ""
2292 "    printf(\"Total non-mmapped bytes (arena):       %d\\en\", mi.arena);\n"
2293 "    printf(\"# of free chunks (ordblks):            %d\\en\", mi.ordblks);\n"
2294 "    printf(\"# of free fastbin blocks (smblks):     %d\\en\", mi.smblks);\n"
2295 "    printf(\"# of mapped regions (hblks):           %d\\en\", mi.hblks);\n"
2296 "    printf(\"Bytes in mapped regions (hblkhd):      %d\\en\", mi.hblkhd);\n"
2297 "    printf(\"Max. total allocated space (usmblks):  %d\\en\", mi.usmblks);\n"
2298 "    printf(\"Free bytes held in fastbins (fsmblks): %d\\en\", mi.fsmblks);\n"
2299 "    printf(\"Total allocated space (uordblks):      %d\\en\", mi.uordblks);\n"
2300 "    printf(\"Total free space (fordblks):           %d\\en\", mi.fordblks);\n"
2301 "    printf(\"Topmost releasable block (keepcost):   %d\\en\", mi.keepcost);\n"
2302 "}\n"
2303 msgstr ""
2304 "    printf(\"Total non-mmapped bytes (arena):       %d\\en\", mi.arena);\n"
2305 "    printf(\"# of free chunks (ordblks):            %d\\en\", mi.ordblks);\n"
2306 "    printf(\"# of free fastbin blocks (smblks):     %d\\en\", mi.smblks);\n"
2307 "    printf(\"# of mapped regions (hblks):           %d\\en\", mi.hblks);\n"
2308 "    printf(\"Bytes in mapped regions (hblkhd):      %d\\en\", mi.hblkhd);\n"
2309 "    printf(\"Max. total allocated space (usmblks):  %d\\en\", mi.usmblks);\n"
2310 "    printf(\"Free bytes held in fastbins (fsmblks): %d\\en\", mi.fsmblks);\n"
2311 "    printf(\"Total allocated space (uordblks):      %d\\en\", mi.uordblks);\n"
2312 "    printf(\"Total free space (fordblks):           %d\\en\", mi.fordblks);\n"
2313 "    printf(\"Topmost releasable block (keepcost):   %d\\en\", mi.keepcost);\n"
2314 "}\n"
2315
2316 #. type: Plain text
2317 #: build/C/man3/mallinfo.3:235
2318 #, no-wrap
2319 msgid ""
2320 "int\n"
2321 "main(int argc, char *argv[])\n"
2322 "{\n"
2323 "#define MAX_ALLOCS 2000000\n"
2324 "    char *alloc[MAX_ALLOCS];\n"
2325 "    int numBlocks, j, freeBegin, freeEnd, freeStep;\n"
2326 "    size_t blockSize;\n"
2327 msgstr ""
2328 "int\n"
2329 "main(int argc, char *argv[])\n"
2330 "{\n"
2331 "#define MAX_ALLOCS 2000000\n"
2332 "    char *alloc[MAX_ALLOCS];\n"
2333 "    int numBlocks, j, freeBegin, freeEnd, freeStep;\n"
2334 "    size_t blockSize;\n"
2335
2336 #. type: Plain text
2337 #: build/C/man3/mallinfo.3:239
2338 #, no-wrap
2339 msgid ""
2340 "    if (argc E<lt> 3 || strcmp(argv[1], \"--help\") == 0)\n"
2341 "        usageErr(\"%s num-blocks block-size [free-step [start-free \"\n"
2342 "                \"[end-free]]]\\en\", argv[0]);\n"
2343 msgstr ""
2344 "    if (argc E<lt> 3 || strcmp(argv[1], \"--help\") == 0)\n"
2345 "        usageErr(\"%s num-blocks block-size [free-step [start-free \"\n"
2346 "                \"[end-free]]]\\en\", argv[0]);\n"
2347
2348 #. type: Plain text
2349 #: build/C/man3/mallinfo.3:245
2350 #, no-wrap
2351 msgid ""
2352 "    numBlocks = atoi(argv[1]);\n"
2353 "    blockSize = atoi(argv[2]);\n"
2354 "    freeStep = (argc E<gt> 3) ? atoi(argv[3]) : 1;\n"
2355 "    freeBegin = (argc E<gt> 4) ? atoi(argv[4]) : 0;\n"
2356 "    freeEnd = (argc E<gt> 5) ? atoi(argv[5]) : numBlocks;\n"
2357 msgstr ""
2358 "    numBlocks = atoi(argv[1]);\n"
2359 "    blockSize = atoi(argv[2]);\n"
2360 "    freeStep = (argc E<gt> 3) ? atoi(argv[3]) : 1;\n"
2361 "    freeBegin = (argc E<gt> 4) ? atoi(argv[4]) : 0;\n"
2362 "    freeEnd = (argc E<gt> 5) ? atoi(argv[5]) : numBlocks;\n"
2363
2364 #. type: Plain text
2365 #: build/C/man3/mallinfo.3:248
2366 #, no-wrap
2367 msgid ""
2368 "    printf(\"============== Before allocating blocks ==============\\en\");\n"
2369 "    display_mallinfo();\n"
2370 msgstr ""
2371 "    printf(\"============== Before allocating blocks ==============\\en\");\n"
2372 "    display_mallinfo();\n"
2373
2374 #. type: Plain text
2375 #: build/C/man3/mallinfo.3:252
2376 #, no-wrap
2377 msgid ""
2378 "    for (j = 0; j E<lt> numBlocks; j++) {\n"
2379 "        if (numBlocks E<gt>= MAX_ALLOCS)\n"
2380 "            fatal(\"Too many allocations\");\n"
2381 msgstr ""
2382 "    for (j = 0; j E<lt> numBlocks; j++) {\n"
2383 "        if (numBlocks E<gt>= MAX_ALLOCS)\n"
2384 "            fatal(\"Too many allocations\");\n"
2385
2386 #. type: Plain text
2387 #: build/C/man3/mallinfo.3:257
2388 #, no-wrap
2389 msgid ""
2390 "        alloc[j] = malloc(blockSize);\n"
2391 "        if (alloc[j] == NULL)\n"
2392 "            errExit(\"malloc\");\n"
2393 "    }\n"
2394 msgstr ""
2395 "        alloc[j] = malloc(blockSize);\n"
2396 "        if (alloc[j] == NULL)\n"
2397 "            errExit(\"malloc\");\n"
2398 "    }\n"
2399
2400 #. type: Plain text
2401 #: build/C/man3/mallinfo.3:260
2402 #, no-wrap
2403 msgid ""
2404 "    printf(\"\\en============== After allocating blocks ==============\\en\");\n"
2405 "    display_mallinfo();\n"
2406 msgstr ""
2407 "    printf(\"\\en============== After allocating blocks ==============\\en\");\n"
2408 "    display_mallinfo();\n"
2409
2410 #. type: Plain text
2411 #: build/C/man3/mallinfo.3:263
2412 #, no-wrap
2413 msgid ""
2414 "    for (j = freeBegin; j E<lt> freeEnd; j += freeStep)\n"
2415 "        free(alloc[j]);\n"
2416 msgstr ""
2417 "    for (j = freeBegin; j E<lt> freeEnd; j += freeStep)\n"
2418 "        free(alloc[j]);\n"
2419
2420 #. type: Plain text
2421 #: build/C/man3/mallinfo.3:266
2422 #, no-wrap
2423 msgid ""
2424 "    printf(\"\\en============== After freeing blocks ==============\\en\");\n"
2425 "    display_mallinfo();\n"
2426 msgstr ""
2427 "    printf(\"\\en============== After freeing blocks ==============\\en\");\n"
2428 "    display_mallinfo();\n"
2429
2430 #. type: Plain text
2431 #: build/C/man3/mallinfo.3:269 build/C/man3/malloc_info.3:255
2432 #: build/C/man3/mallopt.3:565 build/C/man3/mcheck.3:203
2433 #: build/C/man2/mmap.2:709
2434 #, no-wrap
2435 msgid ""
2436 "    exit(EXIT_SUCCESS);\n"
2437 "}\n"
2438 msgstr ""
2439 "    exit(EXIT_SUCCESS);\n"
2440 "}\n"
2441
2442 #. type: Plain text
2443 #: build/C/man3/mallinfo.3:279
2444 msgid ""
2445 "B<mmap>(2), B<malloc>(3), B<malloc_info>(3), B<malloc_stats>(3), "
2446 "B<malloc_trim>(3), B<mallopt>(3)"
2447 msgstr ""
2448 "B<mmap>(2), B<malloc>(3), B<malloc_info>(3), B<malloc_stats>(3), "
2449 "B<malloc_trim>(3), B<mallopt>(3)"
2450
2451 #. type: TH
2452 #: build/C/man3/malloc_get_state.3:25
2453 #, no-wrap
2454 msgid "MALLOC_GET_STATE"
2455 msgstr "MALLOC_GET_STATE"
2456
2457 #. type: TH
2458 #: build/C/man3/malloc_get_state.3:25
2459 #, no-wrap
2460 msgid "2012-05-04"
2461 msgstr "2012-05-04"
2462
2463 #. type: Plain text
2464 #: build/C/man3/malloc_get_state.3:28
2465 msgid ""
2466 "malloc_get_state, malloc_set_state - record and restore state of malloc "
2467 "implementation"
2468 msgstr ""
2469
2470 #. type: Plain text
2471 #: build/C/man3/malloc_get_state.3:31 build/C/man3/posix_memalign.3:35
2472 #, no-wrap
2473 msgid "B<#include E<lt>stdlib.hE<gt>>\n"
2474 msgstr "B<#include E<lt>stdlib.hE<gt>>\n"
2475
2476 #. type: Plain text
2477 #: build/C/man3/malloc_get_state.3:33
2478 #, no-wrap
2479 msgid "B<void* malloc_get_state(void);>\n"
2480 msgstr "B<void* malloc_get_state(void);>\n"
2481
2482 #. type: Plain text
2483 #: build/C/man3/malloc_get_state.3:35
2484 #, no-wrap
2485 msgid "B<int malloc_set_state(void *>I<state>B<);>\n"
2486 msgstr "B<int malloc_set_state(void *>I<state>B<);>\n"
2487
2488 #. type: Plain text
2489 #: build/C/man3/malloc_get_state.3:53
2490 msgid ""
2491 "The B<malloc_get_state>()  function records the current state of all "
2492 "B<malloc>(3)  internal bookkeeping variables (but not the actual contents of "
2493 "the heap or the state of B<malloc_hook>(3)  functions pointers).  The state "
2494 "is recorded in a system-dependent opaque data structure dynamically "
2495 "allocated via B<malloc>(3), and a pointer to that data structure is returned "
2496 "as the function result.  (It is the caller's responsibility to B<free>(3)  "
2497 "this memory.)"
2498 msgstr ""
2499
2500 #. type: Plain text
2501 #: build/C/man3/malloc_get_state.3:61
2502 msgid ""
2503 "The B<malloc_set_state>()  function restores the state of all B<malloc>(3)  "
2504 "internal bookkeeping variables to the values recorded in the opaque data "
2505 "structure pointed to by I<state>."
2506 msgstr ""
2507
2508 #. type: Plain text
2509 #: build/C/man3/malloc_get_state.3:68
2510 msgid ""
2511 "On success, B<malloc_get_state>()  returns a pointer to a newly allocated "
2512 "opaque data structure.  On error (for example, memory could not be allocated "
2513 "for the data structure), B<malloc_get_state>()  returns NULL."
2514 msgstr ""
2515
2516 #.  if(ms->magic != MALLOC_STATE_MAGIC) return -1;
2517 #.  /* Must fail if the major version is too high. */
2518 #.  if((ms->version & ~0xffl) > (MALLOC_STATE_VERSION & ~0xffl)) return -2;
2519 #. type: Plain text
2520 #: build/C/man3/malloc_get_state.3:86
2521 msgid ""
2522 "On success, B<malloc_set_state>()  returns 0.  If the implementation detects "
2523 "that I<state> does not point to a correctly formed data structure, "
2524 "B<malloc_set_state>()  returns -1.  If the implementation detects that the "
2525 "version of the data structure referred to by I<state> is a more recent "
2526 "version than this implementation knows about, B<malloc_set_state>()  returns "
2527 "-2."
2528 msgstr ""
2529
2530 #. type: Plain text
2531 #: build/C/man3/malloc_get_state.3:88 build/C/man3/malloc_hook.3:82
2532 #: build/C/man3/mcheck.3:147 build/C/man3/mtrace.3:80
2533 msgid "These functions are GNU extensions."
2534 msgstr "これらの関数は GNU による拡張である。"
2535
2536 #. type: Plain text
2537 #: build/C/man3/malloc_get_state.3:94
2538 msgid ""
2539 "These functions are especially useful when using this B<malloc>(3)  "
2540 "implementation as part of a shared library, and the heap contents are saved/"
2541 "restored via some other method.  This technique is used by the GNU Emacs to "
2542 "implement its \"dumping\" function."
2543 msgstr ""
2544
2545 #.  i.e., calls __malloc_check_init()
2546 #.  i.e., malloc checking is not already in use
2547 #.  and the caller requested malloc checking
2548 #. type: Plain text
2549 #: build/C/man3/malloc_get_state.3:111
2550 msgid ""
2551 "Hook function pointers are never saved or restored by these functions, with "
2552 "two exceptions: if malloc checking (see B<mallopt>(3))  was in use when "
2553 "B<malloc_get_state>()  was called, then B<malloc_set_state>()  resets malloc "
2554 "checking hooks if possible; if malloc checking was not in use in the "
2555 "recorded state, but the caller has requested malloc checking, then the hooks "
2556 "are reset to 0."
2557 msgstr ""
2558
2559 #. type: Plain text
2560 #: build/C/man3/malloc_get_state.3:114
2561 msgid "B<malloc>(3), B<mallopt>(3)"
2562 msgstr "B<malloc>(3), B<mallopt>(3)"
2563
2564 #. type: TH
2565 #: build/C/man3/malloc_hook.3:10
2566 #, no-wrap
2567 msgid "MALLOC_HOOK"
2568 msgstr "MALLOC_HOOK"
2569
2570 #. type: TH
2571 #: build/C/man3/malloc_hook.3:10
2572 #, no-wrap
2573 msgid "2010-10-13"
2574 msgstr "2010-10-13"
2575
2576 #. type: Plain text
2577 #: build/C/man3/malloc_hook.3:15
2578 msgid ""
2579 "__malloc_hook, __malloc_initialize_hook, __memalign_hook, __free_hook, "
2580 "__realloc_hook, __after_morecore_hook - malloc debugging variables"
2581 msgstr ""
2582 "__malloc_hook, __malloc_initialize_hook, __memalign_hook, __free_hook, "
2583 "__realloc_hook, __after_morecore_hook - malloc デバッグ用の変数"
2584
2585 #. type: Plain text
2586 #: build/C/man3/malloc_hook.3:18 build/C/man3/malloc_info.3:31
2587 #: build/C/man3/posix_memalign.3:41
2588 #, no-wrap
2589 msgid "B<#include E<lt>malloc.hE<gt>>\n"
2590 msgstr "B<#include E<lt>malloc.hE<gt>>\n"
2591
2592 #. type: Plain text
2593 #: build/C/man3/malloc_hook.3:20
2594 #, no-wrap
2595 msgid "B<void *(*__malloc_hook)(size_t >I<size>B<, const void *>I<caller>B<);>\n"
2596 msgstr "B<void *(*__malloc_hook)(size_t >I<size>B<, const void *>I<caller>B<);>\n"
2597
2598 #. type: Plain text
2599 #: build/C/man3/malloc_hook.3:23
2600 #, no-wrap
2601 msgid "B<void *(*__realloc_hook)(void *>I<ptr>B<, size_t >I<size>B<, const void *>I<caller>B<);>\n"
2602 msgstr "B<void *(*__realloc_hook)(void *>I<ptr>B<, size_t >I<size>B<, const void *>I<caller>B<);>\n"
2603
2604 #. type: Plain text
2605 #: build/C/man3/malloc_hook.3:26
2606 #, no-wrap
2607 msgid ""
2608 "B<void *(*__memalign_hook)(size_t >I<alignment>B<, size_t >I<size>B<,>\n"
2609 "B<                         const void *>I<caller>B<);>\n"
2610 msgstr ""
2611 "B<void *(*__memalign_hook)(size_t >I<alignment>B<, size_t >I<size>B<,>\n"
2612 "B<                         const void *>I<caller>B<);>\n"
2613
2614 #. type: Plain text
2615 #: build/C/man3/malloc_hook.3:28
2616 #, no-wrap
2617 msgid "B<void (*__free_hook)(void *>I<ptr>B<, const void *>I<caller>B<);>\n"
2618 msgstr "B<void (*__free_hook)(void *>I<ptr>B<, const void *>I<caller>B<);>\n"
2619
2620 #. type: Plain text
2621 #: build/C/man3/malloc_hook.3:30
2622 #, no-wrap
2623 msgid "B<void (*__malloc_initialize_hook)(void);>\n"
2624 msgstr "B<void (*__malloc_initialize_hook)(void);>\n"
2625
2626 #. type: Plain text
2627 #: build/C/man3/malloc_hook.3:32
2628 #, no-wrap
2629 msgid "B<void (*__after_morecore_hook)(void);>\n"
2630 msgstr "B<void (*__after_morecore_hook)(void);>\n"
2631
2632 #. type: Plain text
2633 #: build/C/man3/malloc_hook.3:43
2634 msgid ""
2635 "The GNU C library lets you modify the behavior of B<malloc>(3), B<realloc>"
2636 "(3), and B<free>(3)  by specifying appropriate hook functions.  You can use "
2637 "these hooks to help you debug programs that use dynamic memory allocation, "
2638 "for example."
2639 msgstr ""
2640 "GNU C ライブラリでは、適切なフック関数 (hook function) を指定することで "
2641 "B<malloc>(3), B<realloc>(3), B<free>(3)  の動作を変更することができる。例え"
2642 "ば、動的にメモリ割り当てを行う プログラムのデバッグにこれらのフックを使うこと"
2643 "ができる。"
2644
2645 #. type: Plain text
2646 #: build/C/man3/malloc_hook.3:50
2647 msgid ""
2648 "The variable B<__malloc_initialize_hook> points at a function that is called "
2649 "once when the malloc implementation is initialized.  This is a weak "
2650 "variable, so it can be overridden in the application with a definition like "
2651 "the following:"
2652 msgstr ""
2653 "変数 B<__malloc_initialize_hook> は malloc の実装が初期化される際に一度だけ呼"
2654 "ばれる関数へのポインタである。 この変数は書き換え可能 (weak) であり、アプリ"
2655 "ケーション内で 以下のような定義で上書きできる:"
2656
2657 #. type: Plain text
2658 #: build/C/man3/malloc_hook.3:53
2659 #, no-wrap
2660 msgid "    void (*__malloc_initialize_hook)(void) = my_init_hook;\n"
2661 msgstr "    void (*__malloc_initialize_hook)(void) = my_init_hook;\n"
2662
2663 #. type: Plain text
2664 #: build/C/man3/malloc_hook.3:58
2665 msgid ""
2666 "Now the function I<my_init_hook>()  can do the initialization of all hooks."
2667 msgstr ""
2668 "なお、関数 I<my_init_hook>()  で全てのフックの初期化をすることができる。"
2669
2670 #. type: Plain text
2671 #: build/C/man3/malloc_hook.3:74
2672 msgid ""
2673 "The four functions pointed to by B<__malloc_hook>, B<__realloc_hook>, "
2674 "B<__memalign_hook>, B<__free_hook> have a prototype like the functions "
2675 "B<malloc>(3), B<realloc>(3), B<memalign>(3), B<free>(3), respectively, "
2676 "except that they have a final argument I<caller> that gives the address of "
2677 "the caller of B<malloc>(3), etc."
2678 msgstr ""
2679 "B<__malloc_hook>, B<__realloc_hook>, B<__memalign_hook>, B<__free_hook> で指"
2680 "される 4 つの関数は、各々 B<malloc>(3), B<realloc>(3), B<memalign>(3), "
2681 "B<free>(3)  とよく似たプロトタイプを持っているが、 一番最後の引き数 "
2682 "I<caller> をとる点が異なる。 引き数 I<caller> には、 B<malloc>(3)  などの呼び"
2683 "出し元 (caller) のアドレスが格納される。"
2684
2685 #. type: Plain text
2686 #: build/C/man3/malloc_hook.3:80
2687 msgid ""
2688 "The variable B<__after_morecore_hook> points at a function that is called "
2689 "each time after B<sbrk>(2)  was asked for more memory."
2690 msgstr ""
2691 "変数 B<__after_morecore_hook> は、領域の追加要求があり B<sbrk>(2)  が呼ばれた"
2692 "後で毎回呼び出される関数へのポインタである。"
2693
2694 #.  https://bugzilla.redhat.com/show_bug.cgi?id=450187
2695 #.  http://sourceware.org/bugzilla/show_bug.cgi?id=9957
2696 #. type: Plain text
2697 #: build/C/man3/malloc_hook.3:89
2698 msgid ""
2699 "The use of these hook functions is not safe in multithreaded programs, and "
2700 "they are now deprecated.  Programmers should instead preempt calls to the "
2701 "relevant functions by defining and exporting functions such as \"malloc\" "
2702 "and \"free\"."
2703 msgstr ""
2704 "マルチスレッドプログラムでは、 これらのフック関数の使用は安全ではなく、 今で"
2705 "は非推奨である。 プログラマは、 \"malloc\" や \"free\" のような関数を定義して"
2706 "公開して、 関連する関数を呼び出すようにすべきである。"
2707
2708 #. type: Plain text
2709 #: build/C/man3/malloc_hook.3:91
2710 msgid "Here is a short example of how to use these variables."
2711 msgstr "これらの変数の使い方の簡単な例を以下に示す。"
2712
2713 #. type: Plain text
2714 #: build/C/man3/malloc_hook.3:95
2715 #, no-wrap
2716 msgid ""
2717 "#include E<lt>stdio.hE<gt>\n"
2718 "#include E<lt>malloc.hE<gt>\n"
2719 msgstr ""
2720 "#include E<lt>stdio.hE<gt>\n"
2721 "#include E<lt>malloc.hE<gt>\n"
2722
2723 #. type: Plain text
2724 #: build/C/man3/malloc_hook.3:99
2725 #, no-wrap
2726 msgid ""
2727 "/* Prototypes for our hooks.  */\n"
2728 "static void my_init_hook(void);\n"
2729 "static void *my_malloc_hook(size_t, const void *);\n"
2730 msgstr ""
2731 "/* 使おうとするフックのプロトタイプ宣言 */\n"
2732 "static void my_init_hook(void);\n"
2733 "static void *my_malloc_hook(size_t, const void *);\n"
2734
2735 #. type: Plain text
2736 #: build/C/man3/malloc_hook.3:102
2737 #, no-wrap
2738 msgid ""
2739 "/* Variables to save original hooks. */\n"
2740 "static void *(*old_malloc_hook)(size_t, const void *);\n"
2741 msgstr ""
2742 "/* 元々のフックを保存するための変数 */\n"
2743 "static void *(*old_malloc_hook)(size_t, const void *);\n"
2744
2745 #. type: Plain text
2746 #: build/C/man3/malloc_hook.3:105
2747 #, no-wrap
2748 msgid ""
2749 "/* Override initializing hook from the C library. */\n"
2750 "void (*__malloc_initialize_hook) (void) = my_init_hook;\n"
2751 msgstr ""
2752 "/* C ライブラリから呼ばれる初期化フックを上書きする */\n"
2753 "void (*__malloc_initialize_hook) (void) = my_init_hook;\n"
2754
2755 #. type: Plain text
2756 #: build/C/man3/malloc_hook.3:112
2757 #, no-wrap
2758 msgid ""
2759 "static void\n"
2760 "my_init_hook(void)\n"
2761 "{\n"
2762 "    old_malloc_hook = __malloc_hook;\n"
2763 "    __malloc_hook = my_malloc_hook;\n"
2764 "}\n"
2765 msgstr ""
2766 "static void\n"
2767 "my_init_hook(void)\n"
2768 "{\n"
2769 "    old_malloc_hook = __malloc_hook;\n"
2770 "    __malloc_hook = my_malloc_hook;\n"
2771 "}\n"
2772
2773 #. type: Plain text
2774 #: build/C/man3/malloc_hook.3:117
2775 #, no-wrap
2776 msgid ""
2777 "static void *\n"
2778 "my_malloc_hook(size_t size, const void *caller)\n"
2779 "{\n"
2780 "    void *result;\n"
2781 msgstr ""
2782 "static void *\n"
2783 "my_malloc_hook(size_t size, const void *caller)\n"
2784 "{\n"
2785 "    void *result;\n"
2786
2787 #. type: Plain text
2788 #: build/C/man3/malloc_hook.3:120
2789 #, no-wrap
2790 msgid ""
2791 "    /* Restore all old hooks */\n"
2792 "    __malloc_hook = old_malloc_hook;\n"
2793 msgstr ""
2794 "    /* 元々のフックを全て戻す */\n"
2795 "    __malloc_hook = old_malloc_hook;\n"
2796
2797 #. type: Plain text
2798 #: build/C/man3/malloc_hook.3:123
2799 #, no-wrap
2800 msgid ""
2801 "    /* Call recursively */\n"
2802 "    result = malloc(size);\n"
2803 msgstr ""
2804 "    /* malloc の再帰的呼び出し */\n"
2805 "    result = malloc(size);\n"
2806
2807 #. type: Plain text
2808 #: build/C/man3/malloc_hook.3:126
2809 #, no-wrap
2810 msgid ""
2811 "    /* Save underlying hooks */\n"
2812 "    old_malloc_hook = __malloc_hook;\n"
2813 msgstr ""
2814 "    /* 現在設定されているフック (underlying hook) を保存する */\n"
2815 "    old_malloc_hook = __malloc_hook;\n"
2816
2817 #. type: Plain text
2818 #: build/C/man3/malloc_hook.3:130
2819 #, no-wrap
2820 msgid ""
2821 "    /* printf() might call malloc(), so protect it too. */\n"
2822 "    printf(\"malloc(%u) called from %p returns %p\\en\",\n"
2823 "            (unsigned int) size, caller, result);\n"
2824 msgstr ""
2825 "    /* printf() は malloc() を呼び出す可能性があるので\n"
2826 "        ここでもガードを行う (元々のフックのままにしておく) */\n"
2827 "    printf(\"malloc(%u) called from %p returns %p\\en\",\n"
2828 "            (unsigned int) size, caller, result);\n"
2829
2830 #. type: Plain text
2831 #: build/C/man3/malloc_hook.3:133
2832 #, no-wrap
2833 msgid ""
2834 "    /* Restore our own hooks */\n"
2835 "    __malloc_hook = my_malloc_hook;\n"
2836 msgstr ""
2837 "    /* ユーザが使おうとするフックを再設定する */\n"
2838 "    __malloc_hook = my_malloc_hook;\n"
2839
2840 #. type: Plain text
2841 #: build/C/man3/malloc_hook.3:136
2842 #, no-wrap
2843 msgid ""
2844 "    return result;\n"
2845 "}\n"
2846 msgstr ""
2847 "    return result;\n"
2848 "}\n"
2849
2850 #. type: Plain text
2851 #: build/C/man3/malloc_hook.3:142
2852 msgid "B<mallinfo>(3), B<malloc>(3), B<mcheck>(3), B<mtrace>(3)"
2853 msgstr "B<mallinfo>(3), B<malloc>(3), B<mcheck>(3), B<mtrace>(3)"
2854
2855 #. type: TH
2856 #: build/C/man3/malloc_info.3:25
2857 #, no-wrap
2858 msgid "MALLOC_INFO"
2859 msgstr "MALLOC_INFO"
2860
2861 #. type: TH
2862 #: build/C/man3/malloc_info.3:25
2863 #, no-wrap
2864 msgid "2013-04-19"
2865 msgstr "2013-04-19"
2866
2867 #. type: Plain text
2868 #: build/C/man3/malloc_info.3:28
2869 msgid "malloc_info - export malloc state to a stream"
2870 msgstr "malloc_info - malloc の状態をストリームに出力する"
2871
2872 #. type: Plain text
2873 #: build/C/man3/malloc_info.3:33
2874 #, no-wrap
2875 msgid "B<int malloc_info(int >I<options>B<, FILE *>I<fp>B<);>\n"
2876 msgstr "B<int malloc_info(int >I<options>B<, FILE *>I<fp>B<);>\n"
2877
2878 #. type: Plain text
2879 #: build/C/man3/malloc_info.3:44
2880 msgid ""
2881 "The B<malloc_info>()  function exports an XML string that describes the "
2882 "current state of the memory-allocation implementation in the caller.  The "
2883 "string is printed on the file stream I<fp>.  The exported string includes "
2884 "information about all arenas (see B<malloc>(3))."
2885 msgstr ""
2886 "B<malloc_info>() 関数は、 呼び出し元のメモリ割り当て実装の現在の状態を表す "
2887 "XML 文字列を出力する。 文字列は、 ファイルストリーム I<fp> に出力される。 出"
2888 "力された文字列には、 全ての割り当て領域の情報が含まれる (B<malloc>(3) 参照)。"
2889
2890 #. type: Plain text
2891 #: build/C/man3/malloc_info.3:48
2892 msgid "As currently implemented, I<options> must be zero."
2893 msgstr "現在の実装では、 I<options> は 0 でなければならない。"
2894
2895 #. type: Plain text
2896 #: build/C/man3/malloc_info.3:55
2897 msgid ""
2898 "On success, B<malloc_info>()  returns 0; on error, it returns -1, with "
2899 "I<errno> set to indicate the cause."
2900 msgstr ""
2901 "B<malloc_info>() は、成功すると 0 を返す。 エラーの場合、-1 を返し、 "
2902 "I<errno> にエラーの原因を示す値を設定する。"
2903
2904 #. type: Plain text
2905 #: build/C/man3/malloc_info.3:60
2906 msgid "I<options> was nonzero."
2907 msgstr "I<options> が 0 でなかった。"
2908
2909 #. type: Plain text
2910 #: build/C/man3/malloc_info.3:63
2911 msgid "B<malloc_info>()  was added to glibc in version 2.10."
2912 msgstr "B<malloc_info>() は glibc バージョン 2.10 で追加された。"
2913
2914 #. type: Plain text
2915 #: build/C/man3/malloc_info.3:65 build/C/man3/malloc_stats.3:57
2916 #: build/C/man3/malloc_trim.3:62 build/C/man3/malloc_usable_size.3:50
2917 msgid "This function is a GNU extension."
2918 msgstr "この関数は GNU による拡張である。"
2919
2920 #. type: Plain text
2921 #: build/C/man3/malloc_info.3:71
2922 msgid ""
2923 "The memory-allocation information is provided as an XML string (rather than "
2924 "a C structure)  because the information may change over time (according to "
2925 "changes in the underlying implementation).  The output XML string includes a "
2926 "version field."
2927 msgstr ""
2928 "メモリ割り当て情報は (C の構造体ではなく) XML 文字列として提供される。 これ"
2929 "は、 この情報は時間をたつと (内部で使用している実装によって) 変わる可能性があ"
2930 "るからである。 出力される XML 文字列にはバージョンフィールドが付いている。"
2931
2932 #. type: Plain text
2933 #: build/C/man3/malloc_info.3:77
2934 msgid ""
2935 "The B<open_memstream>(3)  function can be used to send the output of "
2936 "B<malloc_info>()  directly into a buffer in memory, rather than to a file."
2937 msgstr ""
2938 "B<open_memstream>(3) 関数を使うと、 B<malloc_info>() の出力を、 ファイルでは"
2939 "なくメモリ内のバッファに直接送ることができる。"
2940
2941 #. type: Plain text
2942 #: build/C/man3/malloc_info.3:84
2943 msgid ""
2944 "The B<malloc_info>()  function is designed to address deficiencies in "
2945 "B<malloc_stats>(3)  and B<mallinfo>(3)."
2946 msgstr ""
2947 "B<malloc_info>() 関数は、 B<malloc_stats>(3) と B<mallinfo>(3) の不備を解決す"
2948 "るために設定された。"
2949
2950 #. type: Plain text
2951 #: build/C/man3/malloc_info.3:95
2952 msgid ""
2953 "The program below takes up to four command-line arguments, of which the "
2954 "first three are mandatory.  The first argument specifies the number of "
2955 "threads that the program should create.  All of the threads, including the "
2956 "main thread, allocate the number of blocks of memory specified by the second "
2957 "argument.  The third argument controls the size of the blocks to be "
2958 "allocated.  The main thread creates blocks of this size, the second thread "
2959 "created by the program allocates blocks of twice this size, the third thread "
2960 "allocates blocks of three times this size, and so on."
2961 msgstr ""
2962 "以下のプログラムは最大で 4 つのコマンドライン引数を取り、 最初の 3 つは必須で"
2963 "ある。 最初の引数は、このプログラムが生成するスレッド数を指定する。 メインス"
2964 "レッドを含む全てのスレッドが第 2 引数で指定した数のメモリブロックの割り当てを"
2965 "行う。 第 3 引数は割り当てるブロックのサイズを制御する。 メインスレッドはこの"
2966 "サイズのブロックを作成し、 このプログラムが生成する 2 番目のスレッドはこのサ"
2967 "イズの 2 倍のサイズのブロックを、 3 番目のスレッドはこのサイズの 3 倍のサイズ"
2968 "のブロックを割り当て、 以下同様である。"
2969
2970 #. type: Plain text
2971 #: build/C/man3/malloc_info.3:102
2972 msgid ""
2973 "The program calls B<malloc_info>()  twice to display the memory-allocation "
2974 "state.  The first call takes place before any threads are created or memory "
2975 "allocated.  The second call is performed after all threads have allocated "
2976 "memory."
2977 msgstr ""
2978 "このプログラムは B<malloc_info>() を 2 回呼び出し、メモリ割り当て状態を表示す"
2979 "る。 最初の呼び出しはスレッドの生成もメモリの割り当ても行われる前に実行され"
2980 "る。 2 回目の呼び出しは全てのスレッドがメモリ割り当てを行った後に実行される。"
2981
2982 #. type: Plain text
2983 #: build/C/man3/malloc_info.3:110
2984 msgid ""
2985 "In the following example, the command-line arguments specify the creation of "
2986 "one additional thread, and both the main thread and the additional thread "
2987 "allocate 10000 blocks of memory.  After the blocks of memory have been "
2988 "allocated, B<malloc_info>()  shows the state of two allocation arenas."
2989 msgstr ""
2990 "以下の例では、 コマンドライン引数で、 追加でスレッドを一つ生成し、メインス"
2991 "レッドと追加のスレッドの両方が 10000 個のメモリブロックを割り当てるように指定"
2992 "している。 メモリブロックの割り当て後の B<malloc_info>() では、 2 つの割り当"
2993 "て領域の状態が表示されている。"
2994
2995 #. type: Plain text
2996 #: build/C/man3/malloc_info.3:135
2997 #, no-wrap
2998 msgid ""
2999 "$ B<getconf GNU_LIBC_VERSION>\n"
3000 "glibc 2.13\n"
3001 "$ B<./a.out 1 10000 100>\n"
3002 "============ Before allocating blocks ============\n"
3003 "E<lt>malloc version=\"1\"E<gt>\n"
3004 "E<lt>heap nr=\"0\"E<gt>\n"
3005 "E<lt>sizesE<gt>\n"
3006 "E<lt>/sizesE<gt>\n"
3007 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
3008 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
3009 "E<lt>system type=\"current\" size=\"135168\"/E<gt>\n"
3010 "E<lt>system type=\"max\" size=\"135168\"/E<gt>\n"
3011 "E<lt>aspace type=\"total\" size=\"135168\"/E<gt>\n"
3012 "E<lt>aspace type=\"mprotect\" size=\"135168\"/E<gt>\n"
3013 "E<lt>/heapE<gt>\n"
3014 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
3015 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
3016 "E<lt>system type=\"current\" size=\"135168\"/E<gt>\n"
3017 "E<lt>system type=\"max\" size=\"135168\"/E<gt>\n"
3018 "E<lt>aspace type=\"total\" size=\"135168\"/E<gt>\n"
3019 "E<lt>aspace type=\"mprotect\" size=\"135168\"/E<gt>\n"
3020 "E<lt>/mallocE<gt>\n"
3021 msgstr ""
3022 "$ B<getconf GNU_LIBC_VERSION>\n"
3023 "glibc 2.13\n"
3024 "$ B<./a.out 1 10000 100>\n"
3025 "============ Before allocating blocks ============\n"
3026 "E<lt>malloc version=\"1\"E<gt>\n"
3027 "E<lt>heap nr=\"0\"E<gt>\n"
3028 "E<lt>sizesE<gt>\n"
3029 "E<lt>/sizesE<gt>\n"
3030 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
3031 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
3032 "E<lt>system type=\"current\" size=\"135168\"/E<gt>\n"
3033 "E<lt>system type=\"max\" size=\"135168\"/E<gt>\n"
3034 "E<lt>aspace type=\"total\" size=\"135168\"/E<gt>\n"
3035 "E<lt>aspace type=\"mprotect\" size=\"135168\"/E<gt>\n"
3036 "E<lt>/heapE<gt>\n"
3037 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
3038 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
3039 "E<lt>system type=\"current\" size=\"135168\"/E<gt>\n"
3040 "E<lt>system type=\"max\" size=\"135168\"/E<gt>\n"
3041 "E<lt>aspace type=\"total\" size=\"135168\"/E<gt>\n"
3042 "E<lt>aspace type=\"mprotect\" size=\"135168\"/E<gt>\n"
3043 "E<lt>/mallocE<gt>\n"
3044
3045 #. type: Plain text
3046 #: build/C/man3/malloc_info.3:165
3047 #, no-wrap
3048 msgid ""
3049 "============ After allocating blocks ============\n"
3050 "E<lt>malloc version=\"1\"E<gt>\n"
3051 "E<lt>heap nr=\"0\"E<gt>\n"
3052 "E<lt>sizesE<gt>\n"
3053 "E<lt>/sizesE<gt>\n"
3054 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
3055 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
3056 "E<lt>system type=\"current\" size=\"1081344\"/E<gt>\n"
3057 "E<lt>system type=\"max\" size=\"1081344\"/E<gt>\n"
3058 "E<lt>aspace type=\"total\" size=\"1081344\"/E<gt>\n"
3059 "E<lt>aspace type=\"mprotect\" size=\"1081344\"/E<gt>\n"
3060 "E<lt>/heapE<gt>\n"
3061 "E<lt>heap nr=\"1\"E<gt>\n"
3062 "E<lt>sizesE<gt>\n"
3063 "E<lt>/sizesE<gt>\n"
3064 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
3065 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
3066 "E<lt>system type=\"current\" size=\"1032192\"/E<gt>\n"
3067 "E<lt>system type=\"max\" size=\"1032192\"/E<gt>\n"
3068 "E<lt>aspace type=\"total\" size=\"1032192\"/E<gt>\n"
3069 "E<lt>aspace type=\"mprotect\" size=\"1032192\"/E<gt>\n"
3070 "E<lt>/heapE<gt>\n"
3071 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
3072 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
3073 "E<lt>system type=\"current\" size=\"2113536\"/E<gt>\n"
3074 "E<lt>system type=\"max\" size=\"2113536\"/E<gt>\n"
3075 "E<lt>aspace type=\"total\" size=\"2113536\"/E<gt>\n"
3076 "E<lt>aspace type=\"mprotect\" size=\"2113536\"/E<gt>\n"
3077 "E<lt>/mallocE<gt>\n"
3078 msgstr ""
3079 "============ After allocating blocks ============\n"
3080 "E<lt>malloc version=\"1\"E<gt>\n"
3081 "E<lt>heap nr=\"0\"E<gt>\n"
3082 "E<lt>sizesE<gt>\n"
3083 "E<lt>/sizesE<gt>\n"
3084 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
3085 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
3086 "E<lt>system type=\"current\" size=\"1081344\"/E<gt>\n"
3087 "E<lt>system type=\"max\" size=\"1081344\"/E<gt>\n"
3088 "E<lt>aspace type=\"total\" size=\"1081344\"/E<gt>\n"
3089 "E<lt>aspace type=\"mprotect\" size=\"1081344\"/E<gt>\n"
3090 "E<lt>/heapE<gt>\n"
3091 "E<lt>heap nr=\"1\"E<gt>\n"
3092 "E<lt>sizesE<gt>\n"
3093 "E<lt>/sizesE<gt>\n"
3094 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
3095 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
3096 "E<lt>system type=\"current\" size=\"1032192\"/E<gt>\n"
3097 "E<lt>system type=\"max\" size=\"1032192\"/E<gt>\n"
3098 "E<lt>aspace type=\"total\" size=\"1032192\"/E<gt>\n"
3099 "E<lt>aspace type=\"mprotect\" size=\"1032192\"/E<gt>\n"
3100 "E<lt>/heapE<gt>\n"
3101 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
3102 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
3103 "E<lt>system type=\"current\" size=\"2113536\"/E<gt>\n"
3104 "E<lt>system type=\"max\" size=\"2113536\"/E<gt>\n"
3105 "E<lt>aspace type=\"total\" size=\"2113536\"/E<gt>\n"
3106 "E<lt>aspace type=\"mprotect\" size=\"2113536\"/E<gt>\n"
3107 "E<lt>/mallocE<gt>\n"
3108
3109 #. type: Plain text
3110 #: build/C/man3/malloc_info.3:175
3111 #, no-wrap
3112 msgid ""
3113 "#include E<lt>unistd.hE<gt>\n"
3114 "#include E<lt>stdlib.hE<gt>\n"
3115 "#include E<lt>pthread.hE<gt>\n"
3116 "#include E<lt>malloc.hE<gt>\n"
3117 "#include E<lt>errno.hE<gt>\n"
3118 msgstr ""
3119 "#include E<lt>unistd.hE<gt>\n"
3120 "#include E<lt>stdlib.hE<gt>\n"
3121 "#include E<lt>pthread.hE<gt>\n"
3122 "#include E<lt>malloc.hE<gt>\n"
3123 "#include E<lt>errno.hE<gt>\n"
3124
3125 #. type: Plain text
3126 #: build/C/man3/malloc_info.3:178
3127 #, no-wrap
3128 msgid ""
3129 "static size_t blockSize;\n"
3130 "static int numThreads, numBlocks;\n"
3131 msgstr ""
3132 "static size_t blockSize;\n"
3133 "static int numThreads, numBlocks;\n"
3134
3135 #. type: Plain text
3136 #: build/C/man3/malloc_info.3:181
3137 #, no-wrap
3138 msgid ""
3139 "#define errExit(msg)    do { perror(msg); exit(EXIT_FAILURE); \\e\n"
3140 "                        } while (0)\n"
3141 msgstr ""
3142 "#define errExit(msg)    do { perror(msg); exit(EXIT_FAILURE); \\e\n"
3143 "                        } while (0)\n"
3144
3145 #. type: Plain text
3146 #: build/C/man3/malloc_info.3:187
3147 #, no-wrap
3148 msgid ""
3149 "static void *\n"
3150 "thread_func(void *arg)\n"
3151 "{\n"
3152 "    int j;\n"
3153 "    int tn = (int) arg;\n"
3154 msgstr ""
3155 "static void *\n"
3156 "thread_func(void *arg)\n"
3157 "{\n"
3158 "    int j;\n"
3159 "    int tn = (int) arg;\n"
3160
3161 #. type: Plain text
3162 #: build/C/man3/malloc_info.3:190
3163 #, no-wrap
3164 msgid ""
3165 "    /* The multiplier \\(aq(2 + tn)\\(aq ensures that each thread (including\n"
3166 "       the main thread) allocates a different amount of memory */\n"
3167 msgstr ""
3168 "    /* The multiplier \\(aq(2 + tn)\\(aq ensures that each thread (including\n"
3169 "       the main thread) allocates a different amount of memory */\n"
3170
3171 #. type: Plain text
3172 #: build/C/man3/malloc_info.3:194
3173 #, no-wrap
3174 msgid ""
3175 "    for (j = 0; j E<lt> numBlocks; j++)\n"
3176 "        if (malloc(blockSize * (2 + tn)) == NULL)\n"
3177 "            errExit(\"malloc-thread\");\n"
3178 msgstr ""
3179 "    for (j = 0; j E<lt> numBlocks; j++)\n"
3180 "        if (malloc(blockSize * (2 + tn)) == NULL)\n"
3181 "            errExit(\"malloc-thread\");\n"
3182
3183 #. type: Plain text
3184 #: build/C/man3/malloc_info.3:198
3185 #, no-wrap
3186 msgid ""
3187 "    sleep(100);         /* Sleep until main thread terminates */\n"
3188 "    return NULL;\n"
3189 "}\n"
3190 msgstr ""
3191 "    sleep(100);         /* Sleep until main thread terminates */\n"
3192 "    return NULL;\n"
3193 "}\n"
3194
3195 #. type: Plain text
3196 #: build/C/man3/malloc_info.3:204
3197 #, no-wrap
3198 msgid ""
3199 "int\n"
3200 "main(int argc, char *argv[])\n"
3201 "{\n"
3202 "    int j, tn, sleepTime;\n"
3203 "    pthread_t *thr;\n"
3204 msgstr ""
3205 "int\n"
3206 "main(int argc, char *argv[])\n"
3207 "{\n"
3208 "    int j, tn, sleepTime;\n"
3209 "    pthread_t *thr;\n"
3210
3211 #. type: Plain text
3212 #: build/C/man3/malloc_info.3:211
3213 #, no-wrap
3214 msgid ""
3215 "    if (argc E<lt> 4) {\n"
3216 "        fprintf(stderr,\n"
3217 "                \"%s num-threads num-blocks block-size [sleep-time]\\en\",\n"
3218 "                argv[0]);\n"
3219 "        exit(EXIT_FAILURE);\n"
3220 "    }\n"
3221 msgstr ""
3222 "    if (argc E<lt> 4) {\n"
3223 "        fprintf(stderr,\n"
3224 "                \"%s num-threads num-blocks block-size [sleep-time]\\en\",\n"
3225 "                argv[0]);\n"
3226 "        exit(EXIT_FAILURE);\n"
3227 "    }\n"
3228
3229 #. type: Plain text
3230 #: build/C/man3/malloc_info.3:216
3231 #, no-wrap
3232 msgid ""
3233 "    numThreads = atoi(argv[1]);\n"
3234 "    numBlocks = atoi(argv[2]);\n"
3235 "    blockSize = atoi(argv[3]);\n"
3236 "    sleepTime = (argc E<gt> 4) ? atoi(argv[4]) : 0;\n"
3237 msgstr ""
3238 "    numThreads = atoi(argv[1]);\n"
3239 "    numBlocks = atoi(argv[2]);\n"
3240 "    blockSize = atoi(argv[3]);\n"
3241 "    sleepTime = (argc E<gt> 4) ? atoi(argv[4]) : 0;\n"
3242
3243 #. type: Plain text
3244 #: build/C/man3/malloc_info.3:220
3245 #, no-wrap
3246 msgid ""
3247 "    thr = calloc(numThreads, sizeof(pthread_t));\n"
3248 "    if (thr == NULL)\n"
3249 "        errExit(\"calloc\");\n"
3250 msgstr ""
3251 "    thr = calloc(numThreads, sizeof(pthread_t));\n"
3252 "    if (thr == NULL)\n"
3253 "        errExit(\"calloc\");\n"
3254
3255 #. type: Plain text
3256 #: build/C/man3/malloc_info.3:223
3257 #, no-wrap
3258 msgid ""
3259 "    printf(\"============ Before allocating blocks ============\\en\");\n"
3260 "    malloc_info(0, stdout);\n"
3261 msgstr ""
3262 "    printf(\"============ Before allocating blocks ============\\en\");\n"
3263 "    malloc_info(0, stdout);\n"
3264
3265 #. type: Plain text
3266 #: build/C/man3/malloc_info.3:225
3267 #, no-wrap
3268 msgid "    /* Create threads that allocate different amounts of memory */\n"
3269 msgstr "    /* Create threads that allocate different amounts of memory */\n"
3270
3271 #. type: Plain text
3272 #: build/C/man3/malloc_info.3:231
3273 #, no-wrap
3274 msgid ""
3275 "    for (tn = 0; tn E<lt> numThreads; tn++) {\n"
3276 "        errno = pthread_create(&thr[tn], NULL, thread_func,\n"
3277 "                               (void *) tn);\n"
3278 "        if (errno != 0)\n"
3279 "            errExit(\"pthread_create\");\n"
3280 msgstr ""
3281 "    for (tn = 0; tn E<lt> numThreads; tn++) {\n"
3282 "        errno = pthread_create(&thr[tn], NULL, thread_func,\n"
3283 "                               (void *) tn);\n"
3284 "        if (errno != 0)\n"
3285 "            errExit(\"pthread_create\");\n"
3286
3287 #. type: Plain text
3288 #: build/C/man3/malloc_info.3:236
3289 #, no-wrap
3290 msgid ""
3291 "        /* If we add a sleep interval after the start-up of each\n"
3292 "           thread, the threads likely won\\(aqt contend for malloc\n"
3293 "           mutexes, and therefore additional arenas won\\(aqt be\n"
3294 "           allocated (see malloc(3)). */\n"
3295 msgstr ""
3296 "        /* If we add a sleep interval after the start-up of each\n"
3297 "           thread, the threads likely won\\(aqt contend for malloc\n"
3298 "           mutexes, and therefore additional arenas won\\(aqt be\n"
3299 "           allocated (see malloc(3)). */\n"
3300
3301 #. type: Plain text
3302 #: build/C/man3/malloc_info.3:240
3303 #, no-wrap
3304 msgid ""
3305 "        if (sleepTime E<gt> 0)\n"
3306 "            sleep(sleepTime);\n"
3307 "    }\n"
3308 msgstr ""
3309 "        if (sleepTime E<gt> 0)\n"
3310 "            sleep(sleepTime);\n"
3311 "    }\n"
3312
3313 #. type: Plain text
3314 #: build/C/man3/malloc_info.3:242
3315 #, no-wrap
3316 msgid "    /* The main thread also allocates some memory */\n"
3317 msgstr "    /* The main thread also allocates some memory */\n"
3318
3319 #. type: Plain text
3320 #: build/C/man3/malloc_info.3:246
3321 #, no-wrap
3322 msgid ""
3323 "    for (j = 0; j E<lt> numBlocks; j++)\n"
3324 "        if (malloc(blockSize) == NULL)\n"
3325 "            errExit(\"malloc\");\n"
3326 msgstr ""
3327 "    for (j = 0; j E<lt> numBlocks; j++)\n"
3328 "        if (malloc(blockSize) == NULL)\n"
3329 "            errExit(\"malloc\");\n"
3330
3331 #. type: Plain text
3332 #: build/C/man3/malloc_info.3:249
3333 #, no-wrap
3334 msgid ""
3335 "    sleep(2);           /* Give all threads a chance to\n"
3336 "                           complete allocations */\n"
3337 msgstr ""
3338 "    sleep(2);           /* Give all threads a chance to\n"
3339 "                           complete allocations */\n"
3340
3341 #. type: Plain text
3342 #: build/C/man3/malloc_info.3:252
3343 #, no-wrap
3344 msgid ""
3345 "    printf(\"\\en============ After allocating blocks ============\\en\");\n"
3346 "    malloc_info(0, stdout);\n"
3347 msgstr ""
3348 "    printf(\"\\en============ After allocating blocks ============\\en\");\n"
3349 "    malloc_info(0, stdout);\n"
3350
3351 #. type: Plain text
3352 #: build/C/man3/malloc_info.3:262
3353 msgid ""
3354 "B<mallinfo>(3), B<malloc>(3), B<malloc_stats>(3), B<mallopt>(3), "
3355 "B<open_memstream>(3)"
3356 msgstr ""
3357 "B<mallinfo>(3), B<malloc>(3), B<malloc_stats>(3), B<mallopt>(3), "
3358 "B<open_memstream>(3)"
3359
3360 #. type: TH
3361 #: build/C/man3/malloc_stats.3:26
3362 #, no-wrap
3363 msgid "MALLOC_STATS"
3364 msgstr "MALLOC_STATS"
3365
3366 #. type: Plain text
3367 #: build/C/man3/malloc_stats.3:29
3368 msgid "malloc_stats - print memory allocation statistics"
3369 msgstr "malloc_stats - メモリ割り当ての統計を表示する"
3370
3371 #. type: Plain text
3372 #: build/C/man3/malloc_stats.3:33
3373 msgid "B<void malloc_stats(void);>"
3374 msgstr "B<void malloc_stats(void);>"
3375
3376 #.  .SH VERSIONS
3377 #.  Available already in glibc 2.0, possibly earlier
3378 #. type: Plain text
3379 #: build/C/man3/malloc_stats.3:55
3380 msgid ""
3381 "The B<malloc_stats>()  function prints (on standard error) statistics about "
3382 "memory allocated by B<malloc>(3)  and related functions.  For each arena "
3383 "(allocation area), this function prints the total amount of memory allocated "
3384 "and the total number of bytes consumed by in-use allocations.  (These two "
3385 "values correspond to the I<arena> and I<uordblks> fields retrieved by "
3386 "B<mallinfo>(3).)  In addition, the function prints the sum of these two "
3387 "statistics for all arenas, and the maximum number of blocks and bytes that "
3388 "were ever simultaneously allocated using B<mmap>(2)."
3389 msgstr ""
3390 "B<malloc_stats>() 関数は B<malloc>(3) や関連する関数により割り当てられたメモ"
3391 "リに関する統計を (標準エラーに) 出力する。 各領域 (割り当てエリア) につい"
3392 "て、 この関数は割り当てられているメモリの総量と現在の割り当てが使用している総"
3393 "バイト数を出力する (これらの二つの値は B<mallinfo>(3) で取得できる I<arena> "
3394 "と I<uordblks> フィールドに対応している)。 また、この関数は、 すべての領域の"
3395 "これら二つの統計情報の合計値と、 B<mmap>(2) を使って同時に割り当てられたブ"
3396 "ロック数とバイト数の最大値を表示する。"
3397
3398 #. type: Plain text
3399 #: build/C/man3/malloc_stats.3:61
3400 msgid ""
3401 "More detailed information about memory allocations in the main arena can be "
3402 "obtained using B<mallinfo>(3)."
3403 msgstr ""
3404 "B<mallinfo>(3) を使用すると、 メイン領域のメモリ割り当てに関するより詳細な情"
3405 "報を取得できる。"
3406
3407 #. type: Plain text
3408 #: build/C/man3/malloc_stats.3:67
3409 msgid ""
3410 "B<mmap>(2), B<mallinfo>(3), B<malloc>(3), B<malloc_info>(3), B<mallopt>(3)"
3411 msgstr ""
3412 "B<mmap>(2), B<mallinfo>(3), B<malloc>(3), B<malloc_info>(3), B<mallopt>(3)"
3413
3414 #. type: TH
3415 #: build/C/man3/malloc_trim.3:26
3416 #, no-wrap
3417 msgid "MALLOC_TRIM"
3418 msgstr "MALLOC_TRIM"
3419
3420 #. type: TH
3421 #: build/C/man3/malloc_trim.3:26 build/C/man3/malloc_usable_size.3:25
3422 #, no-wrap
3423 msgid "2012-03-29"
3424 msgstr "2012-03-29"
3425
3426 #. type: Plain text
3427 #: build/C/man3/malloc_trim.3:29
3428 msgid "malloc_trim - release free memory from the top of the heap"
3429 msgstr ""
3430
3431 #. type: Plain text
3432 #: build/C/man3/malloc_trim.3:33
3433 msgid "B<void malloc_trim(size_t >I<pad>B<);>"
3434 msgstr "B<void malloc_trim(size_t >I<pad>B<);>"
3435
3436 #. type: Plain text
3437 #: build/C/man3/malloc_trim.3:40
3438 msgid ""
3439 "The B<malloc_trim>()  function attempts to release free memory at the top of "
3440 "the heap (by calling B<sbrk>(2)  with a suitable argument)."
3441 msgstr ""
3442
3443 #. type: Plain text
3444 #: build/C/man3/malloc_trim.3:51
3445 msgid ""
3446 "The I<pad> argument specifies the amount of free space to leave untrimmed at "
3447 "the top of the heap.  If this argument is 0, only the minimum amount of "
3448 "memory is maintained at the top of the heap (i.e., one page or less).  A "
3449 "nonzero argument can be used to maintain some trailing space at the top of "
3450 "the heap in order to allow future allocations to be made without having to "
3451 "extend the heap with B<sbrk>(2)."
3452 msgstr ""
3453
3454 #. type: Plain text
3455 #: build/C/man3/malloc_trim.3:56
3456 msgid ""
3457 "The B<malloc_trim>()  function returns 1 if memory was actually released "
3458 "back to the system, or 0 if it was not possible to release any memory."
3459 msgstr ""
3460
3461 #.  .SH VERSIONS
3462 #.  Available already in glibc 2.0, possibly earlier
3463 #. type: Plain text
3464 #: build/C/man3/malloc_trim.3:60
3465 msgid "No errors are defined."
3466 msgstr ""
3467
3468 #. type: Plain text
3469 #: build/C/man3/malloc_trim.3:71
3470 msgid ""
3471 "This function is automatically called by B<free>(3)  in certain "
3472 "circumstances; see the discussion of B<M_TOP_PAD> and B<M_TRIM_THRESHOLD> in "
3473 "B<mallopt>(3)."
3474 msgstr ""
3475
3476 #. type: Plain text
3477 #: build/C/man3/malloc_trim.3:74
3478 msgid ""
3479 "This function cannot release free memory located at places other than the "
3480 "top of the heap."
3481 msgstr ""
3482
3483 #.  malloc/malloc.c::mTRIm():
3484 #.      return result | (av == &main_arena ? sYSTRIm (pad, av) : 0);
3485 #. type: Plain text
3486 #: build/C/man3/malloc_trim.3:78
3487 msgid "This function releases only memory in the main arena."
3488 msgstr ""
3489
3490 #. type: Plain text
3491 #: build/C/man3/malloc_trim.3:82
3492 msgid "B<sbrk>(2), B<malloc>(3), B<mallopt>(3)"
3493 msgstr "B<sbrk>(2), B<malloc>(3), B<mallopt>(3)"
3494
3495 #. type: TH
3496 #: build/C/man3/malloc_usable_size.3:25
3497 #, no-wrap
3498 msgid "MALLOC_USABLE_SIZE"
3499 msgstr "MALLOC_USABLE_SIZE"
3500
3501 #. type: Plain text
3502 #: build/C/man3/malloc_usable_size.3:28
3503 msgid "malloc_usable_size - obtain size of block of memory allocated from heap"
3504 msgstr ""
3505
3506 #. type: Plain text
3507 #: build/C/man3/malloc_usable_size.3:32
3508 msgid "B<size_t malloc_usable_size (void *>I<ptr>B<);>"
3509 msgstr "B<size_t malloc_usable_size (void *>I<ptr>B<);>"
3510
3511 #. type: Plain text
3512 #: build/C/man3/malloc_usable_size.3:40
3513 msgid ""
3514 "The B<malloc_usable_size>()  function returns the number of usable bytes in "
3515 "the block pointed to by I<ptr>, a pointer to a block of memory allocated by "
3516 "B<malloc>(3)  or a related function."
3517 msgstr ""
3518
3519 #. type: Plain text
3520 #: build/C/man3/malloc_usable_size.3:48
3521 msgid ""
3522 "B<malloc_usable_size>()  returns the number of usable bytes in the block of "
3523 "allocated memory pointed to by I<ptr>.  If I<ptr> is NULL, 0 is returned."
3524 msgstr ""
3525
3526 #. type: Plain text
3527 #: build/C/man3/malloc_usable_size.3:60
3528 msgid ""
3529 "The value returned by B<malloc_usable_size>()  may be greater than the "
3530 "requested size of the allocation because of alignment and minimum size "
3531 "constraints.  Although the excess bytes can be overwritten by the "
3532 "application without ill effects, this is not good programming practice: the "
3533 "number of excess bytes in an allocation depends on the underlying "
3534 "implementation."
3535 msgstr ""
3536
3537 #. type: Plain text
3538 #: build/C/man3/malloc_usable_size.3:62
3539 msgid "The main use of this function is for debugging and introspection."
3540 msgstr ""
3541
3542 #. type: Plain text
3543 #: build/C/man3/malloc_usable_size.3:64
3544 msgid "B<malloc>(3)"
3545 msgstr "B<malloc>(3)"
3546
3547 #. type: TH
3548 #: build/C/man3/mallopt.3:26
3549 #, no-wrap
3550 msgid "MALLOPT"
3551 msgstr "MALLOPT"
3552
3553 #. type: TH
3554 #: build/C/man3/mallopt.3:26
3555 #, no-wrap
3556 msgid "2012-04-30"
3557 msgstr "2012-04-30"
3558
3559 #. type: Plain text
3560 #: build/C/man3/mallopt.3:29
3561 msgid "mallopt - set memory allocation parameters"
3562 msgstr "mallopt - メモリ割り当てパラメータを設定する"
3563
3564 #. type: Plain text
3565 #: build/C/man3/mallopt.3:33
3566 msgid "B<int mallopt(int >I<param>B<, int >I<value>B<);>"
3567 msgstr "B<int mallopt(int >I<param>B<, int >I<value>B<);>"
3568
3569 #. type: Plain text
3570 #: build/C/man3/mallopt.3:44
3571 msgid ""
3572 "The B<mallopt>()  function adjusts parameters that control the behavior of "
3573 "the memory-allocation functions (see B<malloc>(3)).  The I<param> argument "
3574 "specifies the parameter to be modified, and I<value> specifies the new value "
3575 "for that parameter."
3576 msgstr ""
3577 "B<mallopt>() 関数は、メモリ割り当て関数 (B<malloc>(3) を参照) の動作を\n"
3578 "制御するパラメータの調整を行う。\n"
3579 "I<param> 引き数で変更するパラメータを指定し、\n"
3580 "I<value> 引き数でそのパラメータの新しい値を指定する。"
3581
3582 #. type: Plain text
3583 #: build/C/man3/mallopt.3:47
3584 msgid "The following values can be specified for I<param>:"
3585 msgstr "I<param> には以下の値を指定することができる。"
3586
3587 #. type: TP
3588 #: build/C/man3/mallopt.3:47
3589 #, no-wrap
3590 msgid "B<M_CHECK_ACTION>"
3591 msgstr "B<M_CHECK_ACTION>"
3592
3593 #. type: Plain text
3594 #: build/C/man3/mallopt.3:53
3595 msgid ""
3596 "Setting this parameter controls how glibc responds when various kinds of "
3597 "programming errors are detected (e.g., freeing the same pointer twice).  The "
3598 "3 least significant bits (2, 1, and 0) of the value assigned to this "
3599 "parameter determine the glibc behavior, as follows:"
3600 msgstr ""
3601
3602 #. type: TP
3603 #: build/C/man3/mallopt.3:54
3604 #, no-wrap
3605 msgid "Bit 0"
3606 msgstr "Bit 0"
3607
3608 #. type: Plain text
3609 #: build/C/man3/mallopt.3:64
3610 msgid ""
3611 "If this bit is set, then print a one-line message on I<stderr> that provides "
3612 "details about the error.  The message starts with the string \"***\\ glibc "
3613 "detected\\ ***\", followed by the program name, the name of the memory-"
3614 "allocation function in which the error was detected, a brief description of "
3615 "the error, and the memory address where the error was detected."
3616 msgstr ""
3617
3618 #. type: TP
3619 #: build/C/man3/mallopt.3:64
3620 #, no-wrap
3621 msgid "Bit 1"
3622 msgstr "Bit 1"
3623
3624 #. type: Plain text
3625 #: build/C/man3/mallopt.3:79
3626 msgid ""
3627 "If this bit is set, then, after printing any error message specified by bit "
3628 "0, the program is terminated by calling B<abort>(3).  In glibc versions "
3629 "since 2.4, if bit 0 is also set, then, between printing the error message "
3630 "and aborting, the program also prints a stack trace in the manner of "
3631 "B<backtrace>(3), and prints the process's memory mapping in the style of I</"
3632 "proc/[pid]/maps> (see B<proc>(5))."
3633 msgstr ""
3634
3635 #. type: TP
3636 #: build/C/man3/mallopt.3:79
3637 #, no-wrap
3638 msgid "Bit 2 (since glibc 2.4)"
3639 msgstr "Bit 2 (glibc 2.4 以降)"
3640
3641 #. type: Plain text
3642 #: build/C/man3/mallopt.3:86
3643 msgid ""
3644 "This bit has an effect only if bit 0 is also set.  If this bit is set, then "
3645 "the one-line message describing the error is simplified to contain just the "
3646 "name of the function where the error was detected and the brief description "
3647 "of the error."
3648 msgstr ""
3649
3650 #. type: Plain text
3651 #: build/C/man3/mallopt.3:91
3652 msgid "The remaining bits in I<value> are ignored."
3653 msgstr ""
3654
3655 #. type: Plain text
3656 #: build/C/man3/mallopt.3:95
3657 msgid ""
3658 "Combining the above details, the following numeric values are meaningful for "
3659 "B<M_CHECK_ACTION>:"
3660 msgstr ""
3661
3662 #. type: IP
3663 #: build/C/man3/mallopt.3:96
3664 #, no-wrap
3665 msgid "0"
3666 msgstr "0"
3667
3668 #. type: Plain text
3669 #: build/C/man3/mallopt.3:98
3670 msgid "Ignore error conditions; continue execution (with undefined results)."
3671 msgstr ""
3672
3673 #. type: IP
3674 #: build/C/man3/mallopt.3:98
3675 #, no-wrap
3676 msgid "1"
3677 msgstr "1"
3678
3679 #. type: Plain text
3680 #: build/C/man3/mallopt.3:100
3681 msgid "Print a detailed error message and continue execution."
3682 msgstr ""
3683
3684 #. type: IP
3685 #: build/C/man3/mallopt.3:100
3686 #, no-wrap
3687 msgid "2"
3688 msgstr "2"
3689
3690 #. type: Plain text
3691 #: build/C/man3/mallopt.3:102
3692 msgid "Abort the program."
3693 msgstr ""
3694
3695 #. type: IP
3696 #: build/C/man3/mallopt.3:102
3697 #, no-wrap
3698 msgid "3"
3699 msgstr "3"
3700
3701 #. type: Plain text
3702 #: build/C/man3/mallopt.3:105
3703 msgid ""
3704 "Print detailed error message, stack trace, and memory mappings, and abort "
3705 "the program."
3706 msgstr ""
3707
3708 #. type: IP
3709 #: build/C/man3/mallopt.3:105
3710 #, no-wrap
3711 msgid "5"
3712 msgstr "5"
3713
3714 #. type: Plain text
3715 #: build/C/man3/mallopt.3:107
3716 msgid "Print a simple error message and continue execution."
3717 msgstr ""
3718
3719 #. type: IP
3720 #: build/C/man3/mallopt.3:107
3721 #, no-wrap
3722 msgid "7"
3723 msgstr "7"
3724
3725 #. type: Plain text
3726 #: build/C/man3/mallopt.3:110
3727 msgid ""
3728 "Print simple error message, stack trace, and memory mappings, and abort the "
3729 "program."
3730 msgstr ""
3731
3732 #. type: Plain text
3733 #: build/C/man3/mallopt.3:116
3734 msgid ""
3735 "Since glibc 2.3.4, the default value for the B<M_CHECK_ACTION> parameter is "
3736 "3.  In glibc version 2.3.3 and earlier, the default value is 1."
3737 msgstr ""
3738
3739 #. type: Plain text
3740 #: build/C/man3/mallopt.3:121
3741 msgid ""
3742 "Using a nonzero B<M_CHECK_ACTION> value can be useful because otherwise a "
3743 "crash may happen much later, and the true cause of the problem is then very "
3744 "hard to track down."
3745 msgstr ""
3746
3747 #. type: TP
3748 #: build/C/man3/mallopt.3:121
3749 #, no-wrap
3750 msgid "B<M_MMAP_MAX>"
3751 msgstr "B<M_MMAP_MAX>"
3752
3753 #.  The following text adapted from comments in the glibc source:
3754 #. type: Plain text
3755 #: build/C/man3/mallopt.3:131
3756 msgid ""
3757 "This parameter specifies the maximum number of allocation requests that may "
3758 "be simultaneously serviced using B<mmap>(2).  This parameter exists because "
3759 "some systems have a limited number of internal tables for use by B<mmap>(2), "
3760 "and using more than a few of them may degrade performance."
3761 msgstr ""
3762
3763 #. type: Plain text
3764 #: build/C/man3/mallopt.3:138
3765 msgid ""
3766 "The default value is 65,536, a value which has no special significance and "
3767 "which servers only as a safeguard.  Setting this parameter to 0 disables the "
3768 "use of B<mmap>(2)  for servicing large allocation requests."
3769 msgstr ""
3770
3771 #. type: TP
3772 #: build/C/man3/mallopt.3:138
3773 #, no-wrap
3774 msgid "B<M_MMAP_THRESHOLD>"
3775 msgstr "B<M_MMAP_THRESHOLD>"
3776
3777 #. type: Plain text
3778 #: build/C/man3/mallopt.3:147
3779 msgid ""
3780 "For allocations greater than or equal to the limit specified (in bytes) by "
3781 "B<M_MMAP_THRESHOLD> that can't be satisfied from the free list, the memory-"
3782 "allocation functions employ B<mmap>(2)  instead of increasing the program "
3783 "break using B<sbrk>(2)."
3784 msgstr ""
3785
3786 #. type: Plain text
3787 #: build/C/man3/mallopt.3:167
3788 msgid ""
3789 "Allocating memory using B<mmap>(2)  has the significant advantage that the "
3790 "allocated memory blocks can always be independently released back to the "
3791 "system.  (By contrast, the heap can be trimmed only if memory is freed at "
3792 "the top end.)  On the other hand, there are some disadvantages to the use of "
3793 "B<mmap>(2): deallocated space is not placed on the free list for reuse by "
3794 "later allocations; memory may be wasted because B<mmap>(2)  allocations must "
3795 "be page-aligned; and the kernel must perform the expensive task of zeroing "
3796 "out memory allocated via B<mmap>(2).  Balancing these factors leads to a "
3797 "default setting of 128*1024 for the B<M_MMAP_THRESHOLD> parameter."
3798 msgstr ""
3799
3800 #. type: Plain text
3801 #: build/C/man3/mallopt.3:174
3802 msgid ""
3803 "The lower limit for this parameter is 0.  The upper limit is "
3804 "B<DEFAULT_MMAP_THRESHOLD_MAX>: 512*1024 on 32-bit systems or "
3805 "I<4*1024*1024*sizeof(long)> on 64-bit systems."
3806 msgstr ""
3807
3808 #. type: Plain text
3809 #: build/C/man3/mallopt.3:192
3810 msgid ""
3811 "I<Note:> Nowadays, glibc uses a dynamic mmap threshold by default.  The "
3812 "initial value of the threshold is 128*1024, but when blocks larger than the "
3813 "current threshold and less than or equal to B<DEFAULT_MMAP_THRESHOLD_MAX> "
3814 "are freed, the threshold is adjusted upward to the size of the freed block.  "
3815 "When dynamic mmap thresholding is in effect, the threshold for trimming the "
3816 "heap is also dynamically adjusted to be twice the dynamic mmap threshold.  "
3817 "Dynamic adjustment of the mmap threshold is disabled if any of the "
3818 "B<M_TRIM_THRESHOLD>, B<M_TOP_PAD>, B<M_MMAP_THRESHOLD>, or B<M_MMAP_MAX> "
3819 "parameters is set."
3820 msgstr ""
3821
3822 #. type: TP
3823 #: build/C/man3/mallopt.3:192
3824 #, no-wrap
3825 msgid "B<M_MXFAST> (since glibc 2.3)"
3826 msgstr "B<M_MXFAST> (glibc 2.3 以降)"
3827
3828 #.  The following text adapted from comments in the glibc sources:
3829 #. type: Plain text
3830 #: build/C/man3/mallopt.3:212
3831 msgid ""
3832 "Set the upper limit for memory allocation requests that are satisfied using "
3833 "\"fastbins\".  (The measurement unit for this parameter is bytes.)  Fastbins "
3834 "are storage areas that hold deallocated blocks of memory of the same size "
3835 "without merging adjacent free blocks.  Subsequent reallocation of blocks of "
3836 "the same size can be handled very quickly by allocating from the fastbin, "
3837 "although memory fragmentation and the overall memory footprint of the "
3838 "program can increase.  The default value for this parameter is I<64*sizeof"
3839 "(size_t)/4> (i.e., 64 on 32-bit architectures).  The range for this "
3840 "parameter is 0 to I<80*sizeof(size_t)/4>.  Setting B<M_MXFAST> to 0 disables "
3841 "the use of fastbins."
3842 msgstr ""
3843
3844 #. type: TP
3845 #: build/C/man3/mallopt.3:212
3846 #, no-wrap
3847 msgid "B<M_PERTURB> (since glibc 2.4)"
3848 msgstr "B<M_PERTURB> (glibc 2.4 以降)"
3849
3850 #. type: Plain text
3851 #: build/C/man3/mallopt.3:227
3852 msgid ""
3853 "If this parameter is set to a nonzero value, then bytes of allocated memory "
3854 "(other than allocations via B<calloc>(3))  are initialized to the complement "
3855 "of the value in the least significant byte of I<value>, and when allocated "
3856 "memory is released using B<free>(3), the freed bytes are set to the least "
3857 "significant byte of I<value>.  This can be useful for detecting errors where "
3858 "programs incorrectly rely on allocated memory being initialized to zero, or "
3859 "reuse values in memory that has already been freed."
3860 msgstr ""
3861
3862 #. type: TP
3863 #: build/C/man3/mallopt.3:227
3864 #, no-wrap
3865 msgid "B<M_TOP_PAD>"
3866 msgstr "B<M_TOP_PAD>"
3867
3868 #. type: Plain text
3869 #: build/C/man3/mallopt.3:234
3870 msgid ""
3871 "This parameter defines the amount of padding to employ when calling B<sbrk>"
3872 "(2)  to modify the program break.  (The measurement unit for this parameter "
3873 "is bytes.)  This parameter has an effect in the following circumstances:"
3874 msgstr ""
3875
3876 #. type: Plain text
3877 #: build/C/man3/mallopt.3:241
3878 msgid ""
3879 "When the program break is increased, then B<M_TOP_PAD> bytes are added to "
3880 "the B<sbrk>(2)  request."
3881 msgstr ""
3882
3883 #. type: Plain text
3884 #: build/C/man3/mallopt.3:247
3885 msgid ""
3886 "When the heap is trimmed as a consequence of calling B<free>(3)  (see the "
3887 "discussion of B<M_TRIM_THRESHOLD>)  this much free space is preserved at the "
3888 "top of the heap."
3889 msgstr ""
3890
3891 #. type: Plain text
3892 #: build/C/man3/mallopt.3:251
3893 msgid ""
3894 "In either case, the amount of padding is always rounded to a system page "
3895 "boundary."
3896 msgstr ""
3897
3898 #. type: Plain text
3899 #: build/C/man3/mallopt.3:258
3900 msgid ""
3901 "Modifying B<M_TOP_PAD> is a trade-off between increasing the number of "
3902 "system calls (when the parameter is set low)  and wasting unused memory at "
3903 "the top of the heap (when the parameter is set high)."
3904 msgstr ""
3905
3906 #.  DEFAULT_TOP_PAD in glibc source
3907 #. type: Plain text
3908 #: build/C/man3/mallopt.3:261
3909 msgid "The default value for this parameter is 128*1024."
3910 msgstr ""
3911
3912 #. type: TP
3913 #: build/C/man3/mallopt.3:261
3914 #, no-wrap
3915 msgid "B<M_TRIM_THRESHOLD>"
3916 msgstr "B<M_TRIM_THRESHOLD>"
3917
3918 #. type: Plain text
3919 #: build/C/man3/mallopt.3:277
3920 msgid ""
3921 "When the amount of contiguous free memory at the top of the heap grows "
3922 "sufficiently large, B<free>(3)  employs B<sbrk>(2)  to release this memory "
3923 "back to the system.  (This can be useful in programs that continue to "
3924 "execute for a long period after freeing a significant amount of memory.)  "
3925 "The B<M_TRIM_THRESHOLD> parameter specifies the minimum size (in bytes) that "
3926 "this block of memory must reach before B<sbrk>(2)  is used to trim the heap."
3927 msgstr ""
3928
3929 #. type: Plain text
3930 #: build/C/man3/mallopt.3:282
3931 msgid ""
3932 "The default value for this parameter is 128*1024.  Setting "
3933 "B<M_TRIM_THRESHOLD> to -1 disables trimming completely."
3934 msgstr ""
3935
3936 #
3937 #
3938 #
3939 #.  FIXME Do the arena parameters need to be documented?
3940 #.  .TP
3941 #.  .BR M_ARENA_TEST " (since glibc 2.10)"
3942 #.  .TP
3943 #.  .BR M_ARENA_MAX " (since glibc 2.10)"
3944 #.  Environment variables
3945 #.      MALLOC_ARENA_MAX_
3946 #.      MALLOC_ARENA_TEST_
3947 #.  http://udrepper.livejournal.com/20948.html describes some details
3948 #.      of the MALLOC_ARENA_* environment variables.
3949 #.  These macros aren't enabled in production releases until 2.15?
3950 #.  (see glibc malloc/Makefile)
3951 #. type: Plain text
3952 #: build/C/man3/mallopt.3:305
3953 msgid ""
3954 "Modifying B<M_TRIM_THRESHOLD> is a trade-off between increasing the number "
3955 "of system calls (when the parameter is set low)  and wasting unused memory "
3956 "at the top of the heap (when the parameter is set high)."
3957 msgstr ""
3958
3959 #. type: SS
3960 #: build/C/man3/mallopt.3:305
3961 #, no-wrap
3962 msgid "Environment variables"
3963 msgstr "環境変数"
3964
3965 #. type: Plain text
3966 #: build/C/man3/mallopt.3:320
3967 msgid ""
3968 "A number of environment variables can be defined to modify some of the same "
3969 "parameters as are controlled by B<mallopt>().  Using these variables has the "
3970 "advantage that the source code of the program need not be changed.  To be "
3971 "effective, these variables must be defined before the first call to a memory-"
3972 "allocation function.  (If the same parameters are adjusted via B<mallopt>(), "
3973 "then the B<mallopt>()  settings take precedence.)  For security reasons, "
3974 "these variables are ignored in set-user-ID and set-group-ID programs."
3975 msgstr ""
3976
3977 #. type: Plain text
3978 #: build/C/man3/mallopt.3:323
3979 msgid ""
3980 "The environment variables are as follows (note the trailing underscore at "
3981 "the end of the name of each variable):"
3982 msgstr ""
3983
3984 #. type: TP
3985 #: build/C/man3/mallopt.3:323
3986 #, no-wrap
3987 msgid "B<MALLOC_CHECK_>"
3988 msgstr "B<MALLOC_CHECK_>"
3989
3990 #.  On glibc 2.12/x86, a simple malloc()+free() loop is about 70% slower
3991 #.  when MALLOC_CHECK_ was set.
3992 #. type: Plain text
3993 #: build/C/man3/mallopt.3:340
3994 msgid ""
3995 "This environment variable controls the same parameter as B<mallopt>()  "
3996 "B<M_CHECK_ACTION>.  If this variable is set to a nonzero value, then a "
3997 "special implementation of the memory-allocation functions is used.  (This is "
3998 "accomplished using the B<malloc_hook>(3)  feature.)  This implementation "
3999 "performs additional error checking, but is slower than the standard set of "
4000 "memory-allocation functions.  (This implementation does not detect all "
4001 "possible errors; memory leaks can still occur.)"
4002 msgstr ""
4003
4004 #. type: Plain text
4005 #: build/C/man3/mallopt.3:345
4006 msgid ""
4007 "The value assigned to this environment variable should be a single digit, "
4008 "whose meaning is as described for B<M_CHECK_ACTION>.  Any characters beyond "
4009 "the initial digit are ignored."
4010 msgstr ""
4011
4012 #. type: Plain text
4013 #: build/C/man3/mallopt.3:354
4014 msgid ""
4015 "For security reasons, the effect of B<MALLOC_CHECK_> is disabled by default "
4016 "for set-user-ID and set-group-ID programs.  However, if the file I</etc/suid-"
4017 "debug> exists (the content of the file is irrelevant), then B<MALLOC_CHECK_> "
4018 "also has an effect for set-user-ID and set-group-ID programs."
4019 msgstr ""
4020
4021 #. type: TP
4022 #: build/C/man3/mallopt.3:354
4023 #, no-wrap
4024 msgid "B<MALLOC_MMAP_MAX_>"
4025 msgstr "B<MALLOC_MMAP_MAX_>"
4026
4027 #. type: Plain text
4028 #: build/C/man3/mallopt.3:359
4029 msgid "Controls the same parameter as B<mallopt>()  B<M_MMAP_MAX>."
4030 msgstr ""
4031
4032 #. type: TP
4033 #: build/C/man3/mallopt.3:359
4034 #, no-wrap
4035 msgid "B<MALLOC_MMAP_THRESHOLD_>"
4036 msgstr "B<MALLOC_MMAP_THRESHOLD_>"
4037
4038 #. type: Plain text
4039 #: build/C/man3/mallopt.3:364
4040 msgid "Controls the same parameter as B<mallopt>()  B<M_MMAP_THRESHOLD>."
4041 msgstr ""
4042
4043 #. type: TP
4044 #: build/C/man3/mallopt.3:364
4045 #, no-wrap
4046 msgid "B<MALLOC_PERTURB_>"
4047 msgstr "B<MALLOC_PERTURB_>"
4048
4049 #. type: Plain text
4050 #: build/C/man3/mallopt.3:369
4051 msgid "Controls the same parameter as B<mallopt>()  B<M_PERTURB>."
4052 msgstr ""
4053
4054 #. type: TP
4055 #: build/C/man3/mallopt.3:369
4056 #, no-wrap
4057 msgid "B<MALLOC_TRIM_THRESHOLD_>"
4058 msgstr "B<MALLOC_TRIM_THRESHOLD_>"
4059
4060 #. type: Plain text
4061 #: build/C/man3/mallopt.3:374
4062 msgid "Controls the same parameter as B<mallopt>()  B<M_TRIM_THRESHOLD>."
4063 msgstr ""
4064
4065 #. type: TP
4066 #: build/C/man3/mallopt.3:374
4067 #, no-wrap
4068 msgid "B<MALLOC_TOP_PAD_>"
4069 msgstr "B<MALLOC_TOP_PAD_>"
4070
4071 #. type: Plain text
4072 #: build/C/man3/mallopt.3:379
4073 msgid "Controls the same parameter as B<mallopt>()  B<M_TOP_PAD>."
4074 msgstr ""
4075
4076 #. type: Plain text
4077 #: build/C/man3/mallopt.3:384
4078 msgid "On success, B<mallopt>()  returns 1.  On error, it returns 0."
4079 msgstr "B<mallopt>()  は成功すると 1 を返す。エラーの場合は 0 を返す。"
4080
4081 #.  .SH VERSIONS
4082 #.  Available already in glibc 2.0, possibly earlier
4083 #. type: Plain text
4084 #: build/C/man3/mallopt.3:392
4085 msgid "On error, I<errno> is I<not> set."
4086 msgstr "エラーの場合、I<errno> は設定I<されない>。"
4087
4088 #.  .SH NOTES
4089 #. type: Plain text
4090 #: build/C/man3/mallopt.3:406
4091 msgid ""
4092 "This function is not specified by POSIX or the C standards.  A similar "
4093 "function exists on many System V derivatives, but the range of values for "
4094 "I<param> varies across systems.  The SVID defined options B<M_MXFAST>, "
4095 "B<M_NLBLKS>, B<M_GRAIN>, and B<M_KEEP>, but only the first of these is "
4096 "implemented in glibc."
4097 msgstr ""
4098
4099 #. type: Plain text
4100 #: build/C/man3/mallopt.3:410
4101 msgid "Specifying an invalid value for I<param> does not generate an error."
4102 msgstr ""
4103
4104 #.  FIXME This looks buggy:
4105 #.  setting the M_MXFAST limit rounds up:    (s + SIZE_SZ) & ~MALLOC_ALIGN_MASK)
4106 #.  malloc requests are rounded up:
4107 #.     (req) + SIZE_SZ + MALLOC_ALIGN_MASK) & ~MALLOC_ALIGN_MASK
4108 #.  http://sources.redhat.com/bugzilla/show_bug.cgi?id=12129
4109 #. type: Plain text
4110 #: build/C/man3/mallopt.3:418
4111 msgid ""
4112 "A calculation error within the glibc implementation means that a call of the "
4113 "form:"
4114 msgstr ""
4115
4116 #. type: Plain text
4117 #: build/C/man3/mallopt.3:421
4118 #, no-wrap
4119 msgid "    mallopt(M_MXFAST, n)\n"
4120 msgstr "    mallopt(M_MXFAST, n)\n"
4121
4122 #.  Bins are multiples of 2 * sizeof(size_t) + sizeof(size_t)
4123 #. type: Plain text
4124 #: build/C/man3/mallopt.3:433
4125 msgid ""
4126 "does not result in fastbins being employed for all allocations of size up to "
4127 "I<n>.  To ensure desired results, I<n> should be rounded up to the next "
4128 "multiple greater than or equal to I<(2k+1)*sizeof(size_t)>, where I<k> is an "
4129 "integer."
4130 msgstr ""
4131
4132 #.  FIXME MALLOC_MMAP_THRESHOLD_ and MALLOC_MMAP_MAX_
4133 #.  do have an effect for set-user-ID programs (but not
4134 #.  set-group-ID programs).
4135 #.  http://sources.redhat.com/bugzilla/show_bug.cgi?id=12155
4136 #. type: Plain text
4137 #: build/C/man3/mallopt.3:445
4138 msgid ""
4139 "The B<MALLOC_MMAP_THRESHOLD_> and B<MALLOC_MMAP_MAX_> variables are I<not> "
4140 "ignored in set-group-ID programs."
4141 msgstr ""
4142
4143 #.  FIXME http://sources.redhat.com/bugzilla/show_bug.cgi?id=12140
4144 #. type: Plain text
4145 #: build/C/man3/mallopt.3:466
4146 msgid ""
4147 "If B<mallopt>()  is used to set B<M_PERTURB>, then, as expected, the bytes "
4148 "of allocated memory are initialized to the complement of the byte in "
4149 "I<value>, and when that memory is freed, the bytes of the region are "
4150 "initialized to the byte specified in I<value>.  However, there is an off-by-"
4151 "I<sizeof(size_t)> error in the implementation: instead of initializing "
4152 "precisely the block of memory being freed by the call I<free(p)>, the block "
4153 "starting at I<p+sizeof(size_t)> is initialized."
4154 msgstr ""
4155
4156 #. type: Plain text
4157 #: build/C/man3/mallopt.3:475
4158 msgid ""
4159 "The program below demonstrates the use of B<M_CHECK_ACTION>.  If the program "
4160 "is supplied with an (integer) command-line argument, then that argument is "
4161 "used to set the B<M_CHECK_ACTION> parameter.  The program then allocates a "
4162 "block of memory, and frees it twice (an error)."
4163 msgstr ""
4164
4165 #. type: Plain text
4166 #: build/C/man3/mallopt.3:479
4167 msgid ""
4168 "The following shell session shows what happens when we run this program "
4169 "under glibc, with the default value for B<M_CHECK_ACTION>:"
4170 msgstr ""
4171
4172 #. type: Plain text
4173 #: build/C/man3/mallopt.3:499
4174 #, no-wrap
4175 msgid ""
4176 "$ B<./a.out>\n"
4177 "main(): returned from first free() call\n"
4178 "*** glibc detected *** ./a.out: double free or corruption (top): 0x09d30008 ***\n"
4179 "======= Backtrace: =========\n"
4180 "/lib/libc.so.6(+0x6c501)[0x523501]\n"
4181 "/lib/libc.so.6(+0x6dd70)[0x524d70]\n"
4182 "/lib/libc.so.6(cfree+0x6d)[0x527e5d]\n"
4183 "\\&./a.out[0x80485db]\n"
4184 "/lib/libc.so.6(__libc_start_main+0xe7)[0x4cdce7]\n"
4185 "\\&./a.out[0x8048471]\n"
4186 "======= Memory map: ========\n"
4187 "001e4000-001fe000 r-xp 00000000 08:06 1083555    /lib/libgcc_s.so.1\n"
4188 "001fe000-001ff000 r--p 00019000 08:06 1083555    /lib/libgcc_s.so.1\n"
4189 "[some lines omitted]\n"
4190 "b7814000-b7817000 rw-p 00000000 00:00 0\n"
4191 "bff53000-bff74000 rw-p 00000000 00:00 0          [stack]\n"
4192 "Aborted (core dumped)\n"
4193 msgstr ""
4194 "$ B<./a.out>\n"
4195 "main(): returned from first free() call\n"
4196 "*** glibc detected *** ./a.out: double free or corruption (top): 0x09d30008 ***\n"
4197 "======= Backtrace: =========\n"
4198 "/lib/libc.so.6(+0x6c501)[0x523501]\n"
4199 "/lib/libc.so.6(+0x6dd70)[0x524d70]\n"
4200 "/lib/libc.so.6(cfree+0x6d)[0x527e5d]\n"
4201 "\\&./a.out[0x80485db]\n"
4202 "/lib/libc.so.6(__libc_start_main+0xe7)[0x4cdce7]\n"
4203 "\\&./a.out[0x8048471]\n"
4204 "======= Memory map: ========\n"
4205 "001e4000-001fe000 r-xp 00000000 08:06 1083555    /lib/libgcc_s.so.1\n"
4206 "001fe000-001ff000 r--p 00019000 08:06 1083555    /lib/libgcc_s.so.1\n"
4207 "[some lines omitted]\n"
4208 "b7814000-b7817000 rw-p 00000000 00:00 0\n"
4209 "bff53000-bff74000 rw-p 00000000 00:00 0          [stack]\n"
4210 "Aborted (core dumped)\n"
4211
4212 #. type: Plain text
4213 #: build/C/man3/mallopt.3:504
4214 msgid ""
4215 "The following runs show the results when employing other values for "
4216 "B<M_CHECK_ACTION>:"
4217 msgstr ""
4218
4219 #. type: Plain text
4220 #: build/C/man3/mallopt.3:517
4221 #, no-wrap
4222 msgid ""
4223 "$ B<./a.out 1>             # Diagnose error and continue\n"
4224 "main(): returned from first free() call\n"
4225 "*** glibc detected *** ./a.out: double free or corruption (top): 0x09cbe008 ***\n"
4226 "main(): returned from second free() call\n"
4227 "$ B<./a.out 2>             # Abort without error message\n"
4228 "main(): returned from first free() call\n"
4229 "Aborted (core dumped)\n"
4230 "$ B<./a.out 0>             # Ignore error and continue\n"
4231 "main(): returned from first free() call\n"
4232 "main(): returned from second free() call\n"
4233 msgstr ""
4234 "$ B<./a.out 1>             # Diagnose error and continue\n"
4235 "main(): returned from first free() call\n"
4236 "*** glibc detected *** ./a.out: double free or corruption (top): 0x09cbe008 ***\n"
4237 "main(): returned from second free() call\n"
4238 "$ B<./a.out 2>             # Abort without error message\n"
4239 "main(): returned from first free() call\n"
4240 "Aborted (core dumped)\n"
4241 "$ B<./a.out 0>             # Ignore error and continue\n"
4242 "main(): returned from first free() call\n"
4243 "main(): returned from second free() call\n"
4244
4245 #. type: Plain text
4246 #: build/C/man3/mallopt.3:523
4247 msgid ""
4248 "The next run shows how to set the same parameter using the B<MALLOC_CHECK_> "
4249 "environment variable:"
4250 msgstr ""
4251
4252 #. type: Plain text
4253 #: build/C/man3/mallopt.3:530
4254 #, no-wrap
4255 msgid ""
4256 "$ B<MALLOC_CHECK_=1 ./a.out>\n"
4257 "main(): returned from first free() call\n"
4258 "*** glibc detected *** ./a.out: free(): invalid pointer: 0x092c2008 ***\n"
4259 "main(): returned from second free() call\n"
4260 msgstr ""
4261 "$ B<MALLOC_CHECK_=1 ./a.out>\n"
4262 "main(): returned from first free() call\n"
4263 "*** glibc detected *** ./a.out: free(): invalid pointer: 0x092c2008 ***\n"
4264 "main(): returned from second free() call\n"
4265
4266 #. type: Plain text
4267 #: build/C/man3/mallopt.3:538
4268 #, no-wrap
4269 msgid ""
4270 "#include E<lt>malloc.hE<gt>\n"
4271 "#include E<lt>stdio.hE<gt>\n"
4272 "#include E<lt>stdlib.hE<gt>\n"
4273 msgstr ""
4274 "#include E<lt>malloc.hE<gt>\n"
4275 "#include E<lt>stdio.hE<gt>\n"
4276 "#include E<lt>stdlib.hE<gt>\n"
4277
4278 #. type: Plain text
4279 #: build/C/man3/mallopt.3:543 build/C/man3/mcheck.3:187
4280 #, no-wrap
4281 msgid ""
4282 "int\n"
4283 "main(int argc, char *argv[])\n"
4284 "{\n"
4285 "    char *p;\n"
4286 msgstr ""
4287 "int\n"
4288 "main(int argc, char *argv[])\n"
4289 "{\n"
4290 "    char *p;\n"
4291
4292 #. type: Plain text
4293 #: build/C/man3/mallopt.3:550
4294 #, no-wrap
4295 msgid ""
4296 "    if (argc E<gt> 1) {\n"
4297 "        if (mallopt(M_CHECK_ACTION, atoi(argv[1])) != 1) {\n"
4298 "            fprintf(stderr, \"mallopt() failed\");\n"
4299 "            exit(EXIT_FAILURE);\n"
4300 "        }\n"
4301 "    }\n"
4302 msgstr ""
4303 "    if (argc E<gt> 1) {\n"
4304 "        if (mallopt(M_CHECK_ACTION, atoi(argv[1])) != 1) {\n"
4305 "            fprintf(stderr, \"mallopt() failed\");\n"
4306 "            exit(EXIT_FAILURE);\n"
4307 "        }\n"
4308 "    }\n"
4309
4310 #. type: Plain text
4311 #: build/C/man3/mallopt.3:556
4312 #, no-wrap
4313 msgid ""
4314 "    p = malloc(1000);\n"
4315 "    if (p == NULL) {\n"
4316 "        fprintf(stderr, \"malloc() failed\");\n"
4317 "        exit(EXIT_FAILURE);\n"
4318 "    }\n"
4319 msgstr ""
4320 "    p = malloc(1000);\n"
4321 "    if (p == NULL) {\n"
4322 "        fprintf(stderr, \"malloc() failed\");\n"
4323 "        exit(EXIT_FAILURE);\n"
4324 "    }\n"
4325
4326 #. type: Plain text
4327 #: build/C/man3/mallopt.3:559
4328 #, no-wrap
4329 msgid ""
4330 "    free(p);\n"
4331 "    printf(\"main(): returned from first free() call\\en\");\n"
4332 msgstr ""
4333 "    free(p);\n"
4334 "    printf(\"main(): returned from first free() call\\en\");\n"
4335
4336 #. type: Plain text
4337 #: build/C/man3/mallopt.3:562
4338 #, no-wrap
4339 msgid ""
4340 "    free(p);\n"
4341 "    printf(\"main(): returned from second free() call\\en\");\n"
4342 msgstr ""
4343 "    free(p);\n"
4344 "    printf(\"main(): returned from second free() call\\en\");\n"
4345
4346 #. type: Plain text
4347 #: build/C/man3/mallopt.3:580
4348 msgid ""
4349 "B<mmap>(2), B<sbrk>(2), B<mallinfo>(3), B<malloc>(3), B<malloc_hook>(3), "
4350 "B<malloc_info>(3), B<malloc_stats>(3), B<malloc_trim>(3), B<mcheck>(3), "
4351 "B<mtrace>(3), B<posix_memalign>(3)"
4352 msgstr ""
4353 "B<mmap>(2), B<sbrk>(2), B<mallinfo>(3), B<malloc>(3), B<malloc_hook>(3), "
4354 "B<malloc_info>(3), B<malloc_stats>(3), B<malloc_trim>(3), B<mcheck>(3), "
4355 "B<mtrace>(3), B<posix_memalign>(3)"
4356
4357 #. type: TH
4358 #: build/C/man3/mcheck.3:25
4359 #, no-wrap
4360 msgid "MCHECK"
4361 msgstr "MCHECK"
4362
4363 #. type: TH
4364 #: build/C/man3/mcheck.3:25
4365 #, no-wrap
4366 msgid "2014-01-11"
4367 msgstr "2014-01-11"
4368
4369 #. type: Plain text
4370 #: build/C/man3/mcheck.3:28
4371 msgid ""
4372 "mcheck, mcheck_check_all, mcheck_pedantic, mprobe - heap consistency checking"
4373 msgstr ""
4374
4375 #. type: Plain text
4376 #: build/C/man3/mcheck.3:31
4377 #, no-wrap
4378 msgid "B<#include E<lt>mcheck.hE<gt>>\n"
4379 msgstr "B<#include E<lt>mcheck.hE<gt>>\n"
4380
4381 #. type: Plain text
4382 #: build/C/man3/mcheck.3:33
4383 #, no-wrap
4384 msgid "B<int mcheck(void (*>I<abortfunc>B<)(enum mcheck_status >I<mstatus>B<));>\n"
4385 msgstr ""
4386
4387 #. type: Plain text
4388 #: build/C/man3/mcheck.3:35
4389 #, no-wrap
4390 msgid "B<int mcheck_pedantic(void (*>I<abortfunc>B<)(enum mcheck_status >I<mstatus>B<));>\n"
4391 msgstr ""
4392
4393 #. type: Plain text
4394 #: build/C/man3/mcheck.3:37
4395 #, no-wrap
4396 msgid "B<void mcheck_check_all(void);>\n"
4397 msgstr "B<void mcheck_check_all(void);>\n"
4398
4399 #. type: Plain text
4400 #: build/C/man3/mcheck.3:39
4401 #, no-wrap
4402 msgid "B<enum mcheck_status mprobe(void *>I<ptr>B<);>\n"
4403 msgstr "B<enum mcheck_status mprobe(void *>I<ptr>B<);>\n"
4404
4405 #. type: Plain text
4406 #: build/C/man3/mcheck.3:51
4407 msgid ""
4408 "The B<mcheck>()  function installs a set of debugging hooks for the B<malloc>"
4409 "(3)  family of memory-allocation functions.  These hooks cause certain "
4410 "consistency checks to be performed on the state of the heap.  The checks can "
4411 "detect application errors such as freeing a block of memory more than once "
4412 "or corrupting the bookkeeping data structures that immediately precede a "
4413 "block of allocated memory."
4414 msgstr ""
4415
4416 #. type: Plain text
4417 #: build/C/man3/mcheck.3:63
4418 msgid ""
4419 "To be effective, the B<mcheck>()  function must be called before the first "
4420 "call to B<malloc>(3)  or a related function.  In cases where this is "
4421 "difficult to ensure, linking the program with I<-lmcheck> inserts an "
4422 "implicit call to B<mcheck>()  (with a NULL argument)  before the first call "
4423 "to a memory-allocation function."
4424 msgstr ""
4425
4426 #. type: Plain text
4427 #: build/C/man3/mcheck.3:71
4428 msgid ""
4429 "The B<mcheck_pedantic>()  function is similar to B<mcheck>(), but performs "
4430 "checks on all allocated blocks whenever one of the memory-allocation "
4431 "functions is called.  This can be very slow!"
4432 msgstr ""
4433
4434 #. type: Plain text
4435 #: build/C/man3/mcheck.3:78
4436 msgid ""
4437 "The B<mcheck_check_all>()  function causes an immediate check on all "
4438 "allocated blocks.  This call is effective only if B<mcheck>()  is called "
4439 "beforehand."
4440 msgstr ""
4441
4442 #. type: Plain text
4443 #: build/C/man3/mcheck.3:91
4444 msgid ""
4445 "If the system detects an inconsistency in the heap, the caller-supplied "
4446 "function pointed to by I<abortfunc> is invoked with a single argument "
4447 "argument, I<mstatus>, that indicates what type of inconsistency was "
4448 "detected.  If I<abortfunc> is NULL, a default function prints an error "
4449 "message on I<stderr> and calls B<abort>(3)."
4450 msgstr ""
4451
4452 #. type: Plain text
4453 #: build/C/man3/mcheck.3:103
4454 msgid ""
4455 "The B<mprobe>()  function performs a consistency check on the block of "
4456 "allocated memory pointed to by I<ptr>.  The B<mcheck>()  function should be "
4457 "called beforehand (otherwise B<mprobe>()  returns B<MCHECK_DISABLED>)."
4458 msgstr ""
4459
4460 #. type: Plain text
4461 #: build/C/man3/mcheck.3:111
4462 msgid ""
4463 "The following list describes the values returned by B<mprobe>()  or passed "
4464 "as the I<mstatus> argument when I<abortfunc> is invoked:"
4465 msgstr ""
4466
4467 #. type: TP
4468 #: build/C/man3/mcheck.3:111
4469 #, no-wrap
4470 msgid "B<MCHECK_DISABLED> (B<mprobe>() only)"
4471 msgstr ""
4472
4473 #. type: Plain text
4474 #: build/C/man3/mcheck.3:116
4475 msgid ""
4476 "B<mcheck>()  was not called before the first memory allocation function was "
4477 "called.  Consistency checking is not possible."
4478 msgstr ""
4479
4480 #. type: TP
4481 #: build/C/man3/mcheck.3:116
4482 #, no-wrap
4483 msgid "B<MCHECK_OK> (B<mprobe>() only)"
4484 msgstr ""
4485
4486 #. type: Plain text
4487 #: build/C/man3/mcheck.3:119
4488 msgid "No inconsistency detected."
4489 msgstr ""
4490
4491 #. type: TP
4492 #: build/C/man3/mcheck.3:119
4493 #, no-wrap
4494 msgid "B<MCHECK_HEAD>"
4495 msgstr "B<MCHECK_HEAD>"
4496
4497 #. type: Plain text
4498 #: build/C/man3/mcheck.3:122
4499 msgid "Memory preceding an allocated block was clobbered."
4500 msgstr ""
4501
4502 #. type: TP
4503 #: build/C/man3/mcheck.3:122
4504 #, no-wrap
4505 msgid "B<MCHECK_TAIL>"
4506 msgstr "B<MCHECK_TAIL>"
4507
4508 #. type: Plain text
4509 #: build/C/man3/mcheck.3:125
4510 msgid "Memory following an allocated block was clobbered."
4511 msgstr ""
4512
4513 #. type: TP
4514 #: build/C/man3/mcheck.3:125
4515 #, no-wrap
4516 msgid "B<MCHECK_FREE>"
4517 msgstr "B<MCHECK_FREE>"
4518
4519 #. type: Plain text
4520 #: build/C/man3/mcheck.3:129
4521 msgid "A block of memory was freed twice."
4522 msgstr ""
4523
4524 #. type: Plain text
4525 #: build/C/man3/mcheck.3:134
4526 msgid ""
4527 "B<mcheck>()  and B<mcheck_pedantic>()  return 0 on success, or -1 on error."
4528 msgstr ""
4529
4530 #. type: Plain text
4531 #: build/C/man3/mcheck.3:145
4532 msgid ""
4533 "The B<mcheck_pedantic>()  and B<mcheck_check_all>()  functions are available "
4534 "since glibc 2.2.  The B<mcheck>()  and B<mprobe>()  functions are present "
4535 "since at least glibc 2.0"
4536 msgstr ""
4537
4538 #.  But is MALLOC_CHECK_ slower?
4539 #. type: Plain text
4540 #: build/C/man3/mcheck.3:159
4541 msgid ""
4542 "Linking a program with I<-lmcheck> and using the B<MALLOC_CHECK_> "
4543 "environment variable (described in B<mallopt>(3))  cause the same kinds of "
4544 "errors to be detected.  But, using B<MALLOC_CHECK_> does not require the "
4545 "application to be relinked."
4546 msgstr ""
4547
4548 #. type: Plain text
4549 #: build/C/man3/mcheck.3:165
4550 msgid ""
4551 "The program below calls B<mcheck>()  with a NULL argument and then frees the "
4552 "same block of memory twice.  The following shell session demonstrates what "
4553 "happens when running the program:"
4554 msgstr ""
4555
4556 #. type: Plain text
4557 #: build/C/man3/mcheck.3:170
4558 #, no-wrap
4559 msgid ""
4560 "$B< ./a.out>\n"
4561 "About to free\n"
4562 msgstr ""
4563
4564 #. type: Plain text
4565 #: build/C/man3/mcheck.3:174
4566 #, no-wrap
4567 msgid ""
4568 "About to free a second time\n"
4569 "block freed twice\n"
4570 "Aborted (core dumped)\n"
4571 msgstr ""
4572
4573 #. type: Plain text
4574 #: build/C/man3/mcheck.3:182
4575 #, no-wrap
4576 msgid ""
4577 "#include E<lt>stdlib.hE<gt>\n"
4578 "#include E<lt>stdio.hE<gt>\n"
4579 "#include E<lt>mcheck.hE<gt>\n"
4580 msgstr ""
4581 "#include E<lt>stdlib.hE<gt>\n"
4582 "#include E<lt>stdio.hE<gt>\n"
4583 "#include E<lt>mcheck.hE<gt>\n"
4584
4585 #. type: Plain text
4586 #: build/C/man3/mcheck.3:190
4587 #, no-wrap
4588 msgid ""
4589 "    if (mcheck(NULL) != 0) {\n"
4590 "        fprintf(stderr, \"mcheck() failed\\en\");\n"
4591 msgstr ""
4592
4593 #. type: Plain text
4594 #: build/C/man3/mcheck.3:193
4595 #, no-wrap
4596 msgid ""
4597 "        exit(EXIT_FAILURE);\n"
4598 "    }\n"
4599 msgstr ""
4600 "        exit(EXIT_FAILURE);\n"
4601 "    }\n"
4602
4603 #. type: Plain text
4604 #: build/C/man3/mcheck.3:195
4605 #, no-wrap
4606 msgid "    p = malloc(1000);\n"
4607 msgstr "    p = malloc(1000);\n"
4608
4609 #. type: Plain text
4610 #: build/C/man3/mcheck.3:200
4611 #, no-wrap
4612 msgid ""
4613 "    fprintf(stderr, \"About to free\\en\");\n"
4614 "    free(p);\n"
4615 "    fprintf(stderr, \"\\enAbout to free a second time\\en\");\n"
4616 "    free(p);\n"
4617 msgstr ""
4618
4619 #. type: Plain text
4620 #: build/C/man3/mcheck.3:208
4621 msgid "B<malloc>(3), B<mallopt>(3), B<mtrace>(3)"
4622 msgstr "B<malloc>(3), B<mallopt>(3), B<mtrace>(3)"
4623
4624 #. type: TH
4625 #: build/C/man2/mlock.2:26
4626 #, no-wrap
4627 msgid "MLOCK"
4628 msgstr "MLOCK"
4629
4630 #. type: TH
4631 #: build/C/man2/mlock.2:26
4632 #, fuzzy, no-wrap
4633 #| msgid "2014-04-06"
4634 msgid "2014-04-14"
4635 msgstr "2014-04-06"
4636
4637 #. type: Plain text
4638 #: build/C/man2/mlock.2:29
4639 msgid "mlock, munlock, mlockall, munlockall - lock and unlock memory"
4640 msgstr "mlock - メモリのロックとロック解除を行う"
4641
4642 #. type: Plain text
4643 #: build/C/man2/mlock.2:32 build/C/man2/mmap.2:46 build/C/man2/mmap2.2:35
4644 #: build/C/man2/mprotect.2:44 build/C/man2/mremap.2:38
4645 #, no-wrap
4646 msgid "B<#include E<lt>sys/mman.hE<gt>>\n"
4647 msgstr "B<#include E<lt>sys/mman.hE<gt>>\n"
4648
4649 #. type: Plain text
4650 #: build/C/man2/mlock.2:35
4651 #, no-wrap
4652 msgid ""
4653 "B<int mlock(const void *>I<addr>B<, size_t >I<len>B<);>\n"
4654 "B<int munlock(const void *>I<addr>B<, size_t >I<len>B<);>\n"
4655 msgstr ""
4656 "B<int mlock(const void *>I<addr>B<, size_t >I<len>B<);>\n"
4657 "B<int munlock(const void *>I<addr>B<, size_t >I<len>B<);>\n"
4658
4659 #. type: Plain text
4660 #: build/C/man2/mlock.2:38
4661 #, no-wrap
4662 msgid ""
4663 "B<int mlockall(int >I<flags>B<);>\n"
4664 "B<int munlockall(void);>\n"
4665 msgstr ""
4666 "B<int mlockall(int >I<flags>B<);>\n"
4667 "B<int munlockall(void);>\n"
4668
4669 #. type: Plain text
4670 #: build/C/man2/mlock.2:54
4671 msgid ""
4672 "B<mlock>()  and B<mlockall>()  respectively lock part or all of the calling "
4673 "process's virtual address space into RAM, preventing that memory from being "
4674 "paged to the swap area.  B<munlock>()  and B<munlockall>()  perform the "
4675 "converse operation, respectively unlocking part or all of the calling "
4676 "process's virtual address space, so that pages in the specified virtual "
4677 "address range may once more to be swapped out if required by the kernel "
4678 "memory manager.  Memory locking and unlocking are performed in units of "
4679 "whole pages."
4680 msgstr ""
4681 "B<mlock>()  と B<mlockall>()  はそれぞれ、呼び出し元プロセスの仮想アドレス空"
4682 "間の一部または全部を RAM 上にロックし、メモリがスワップエリアにページングされ"
4683 "るのを防ぐ。 B<munlock>()  と B<munlockall>()  は逆の操作で、それぞれ呼び出し"
4684 "元プロセスの仮想アドレス空間の一部または全部を ロック解除する。つまり、指定さ"
4685 "れた仮想アドレス範囲のページは カーネルメモリマネージャーから要求されればス"
4686 "ワップアウトするようになる。 メモリのロックとロック解除はページ単位で行われ"
4687 "る。"
4688
4689 #. type: SS
4690 #: build/C/man2/mlock.2:54
4691 #, no-wrap
4692 msgid "mlock() and munlock()"
4693 msgstr "mlock() と munlock()"
4694
4695 #. type: Plain text
4696 #: build/C/man2/mlock.2:64
4697 msgid ""
4698 "B<mlock>()  locks pages in the address range starting at I<addr> and "
4699 "continuing for I<len> bytes.  All pages that contain a part of the specified "
4700 "address range are guaranteed to be resident in RAM when the call returns "
4701 "successfully; the pages are guaranteed to stay in RAM until later unlocked."
4702 msgstr ""
4703 "B<mlock>()  は I<addr> から始まる長さ I<len> バイトのアドレス範囲のページを"
4704 "ロックする。 呼び出しが成功した場合には、 指定されたアドレス範囲を含む全ての"
4705 "ページは RAM に残り続けることが保証される。 これらのページは後でロック解除さ"
4706 "れるまで RAM に残り続けることが保証される。"
4707
4708 #. type: Plain text
4709 #: build/C/man2/mlock.2:73
4710 msgid ""
4711 "B<munlock>()  unlocks pages in the address range starting at I<addr> and "
4712 "continuing for I<len> bytes.  After this call, all pages that contain a part "
4713 "of the specified memory range can be moved to external swap space again by "
4714 "the kernel."
4715 msgstr ""
4716 "B<munlock>()  は、 I<addr> から始まる長さ I<len> バイトのアドレス範囲のページ"
4717 "のロックを解除する。 この呼び出しを行った後は、カーネルが、指定されたメモリ範"
4718 "囲を含む 全てのページを外部のスワップ空間に移動できるようになる。"
4719
4720 #. type: SS
4721 #: build/C/man2/mlock.2:73
4722 #, no-wrap
4723 msgid "mlockall() and munlockall()"
4724 msgstr "mlockall() と munlockall()"
4725
4726 #. type: Plain text
4727 #: build/C/man2/mlock.2:83
4728 msgid ""
4729 "B<mlockall>()  locks all pages mapped into the address space of the calling "
4730 "process.  This includes the pages of the code, data and stack segment, as "
4731 "well as shared libraries, user space kernel data, shared memory, and memory-"
4732 "mapped files.  All mapped pages are guaranteed to be resident in RAM when "
4733 "the call returns successfully; the pages are guaranteed to stay in RAM until "
4734 "later unlocked."
4735 msgstr ""
4736 "B<mlockall>()  は呼び出し元プロセスのアドレス空間にマップされている全てのペー"
4737 "ジを ロックする。これにはコード、データ、スタックの 各セグメント、共有ライブ"
4738 "ラリ、カーネルのユーザー空間データ、 共有メモリ、メモリ・マップされたファイル"
4739 "が含まれる。 システム・コールが成功した場合には全てのマップされたページは "
4740 "RAM に 残ることを保証される。 これらのページは後でロック解除されるまで RAM に"
4741 "残り続けることが保証される。"
4742
4743 #. type: Plain text
4744 #: build/C/man2/mlock.2:88
4745 msgid ""
4746 "The I<flags> argument is constructed as the bitwise OR of one or more of the "
4747 "following constants:"
4748 msgstr "I<flags> 引数は以下の内容の一つまたは複数のビット OR から構成される:"
4749
4750 #. type: TP
4751 #: build/C/man2/mlock.2:88
4752 #, no-wrap
4753 msgid "B<MCL_CURRENT>"
4754 msgstr "B<MCL_CURRENT>"
4755
4756 #. type: Plain text
4757 #: build/C/man2/mlock.2:92
4758 msgid ""
4759 "Lock all pages which are currently mapped into the address space of the "
4760 "process."
4761 msgstr ""
4762 "現在、プロセスのアドレス空間にマップされている全てのページをロックする。"
4763
4764 #. type: TP
4765 #: build/C/man2/mlock.2:92
4766 #, no-wrap
4767 msgid "B<MCL_FUTURE>"
4768 msgstr "B<MCL_FUTURE>"
4769
4770 #. type: Plain text
4771 #: build/C/man2/mlock.2:99
4772 msgid ""
4773 "Lock all pages which will become mapped into the address space of the "
4774 "process in the future.  These could be for instance new pages required by a "
4775 "growing heap and stack as well as new memory-mapped files or shared memory "
4776 "regions."
4777 msgstr ""
4778 "将来、プロセスのアドレス空間にマップされる全てのページをロックする。 例えば、"
4779 "ヒープ (heap) やスタックの成長により新しく必要になったページだけで なく、新し"
4780 "くメモリマップされたファイルや共有メモリ領域もロックされる。"
4781
4782 #. type: Plain text
4783 #: build/C/man2/mlock.2:112
4784 msgid ""
4785 "If B<MCL_FUTURE> has been specified, then a later system call (e.g., B<mmap>"
4786 "(2), B<sbrk>(2), B<malloc>(3)), may fail if it would cause the number of "
4787 "locked bytes to exceed the permitted maximum (see below).  In the same "
4788 "circumstances, stack growth may likewise fail: the kernel will deny stack "
4789 "expansion and deliver a B<SIGSEGV> signal to the process."
4790 msgstr ""
4791 "B<MCL_FUTURE> が指定されていると、以後のシステムコール (例えば、 B<mmap>(2), "
4792 "B<sbrk>(2), B<malloc>(3))  は、ロックするバイト数が許可された最大値 (下記参"
4793 "照) を超えた場合に 失敗する可能性がある。 同様に、スタックの成長も失敗する可"
4794 "能性がある。 その場合、カーネルはスタックの拡張を拒否し、 B<SIGSEGV> をプロセ"
4795 "スに送る。"
4796
4797 #. type: Plain text
4798 #: build/C/man2/mlock.2:116
4799 msgid ""
4800 "B<munlockall>()  unlocks all pages mapped into the address space of the "
4801 "calling process."
4802 msgstr ""
4803 "B<munlockall>()  は、呼び出し元プロセスのアドレス空間にマッピングされている "
4804 "全てのページをロック解除する。"
4805
4806 #. type: Plain text
4807 #: build/C/man2/mlock.2:122
4808 msgid ""
4809 "On success these system calls return 0.  On error, -1 is returned, I<errno> "
4810 "is set appropriately, and no changes are made to any locks in the address "
4811 "space of the process."
4812 msgstr ""
4813 "成功した場合は、これらのシステムコールはゼロを返す。 エラーの場合は -1 が返さ"
4814 "れ、 I<errno> が適切に設定され、プロセスのアドレス空間におけるロックは変更さ"
4815 "れない。"
4816
4817 #. type: Plain text
4818 #: build/C/man2/mlock.2:131
4819 msgid ""
4820 "(Linux 2.6.9 and later) the caller had a nonzero B<RLIMIT_MEMLOCK> soft "
4821 "resource limit, but tried to lock more memory than the limit permitted.  "
4822 "This limit is not enforced if the process is privileged (B<CAP_IPC_LOCK>)."
4823 msgstr ""
4824 "(Linux 2.6.9 以降) 呼び出し元は非ゼロの ソフト資源制限 B<RLIMIT_MEMLOCK> を持"
4825 "つが、制限が許可している以上のメモリをロックしようとした。 この制限は、プロセ"
4826 "スが特権 (B<CAP_IPC_LOCK>)  を持っている場合は適用されない。"
4827
4828 #.  In the case of mlock(), this check is somewhat buggy: it doesn't
4829 #.  take into account whether the to-be-locked range overlaps with
4830 #.  already locked pages.  Thus, suppose we allocate
4831 #.  (num_physpages / 4 + 1) of memory, and lock those pages once using
4832 #.  mlock(), and then lock the *same* page range a second time.
4833 #.  In the case, the second mlock() call will fail, since the check
4834 #.  calculates that the process is trying to lock (num_physpages / 2 + 2)
4835 #.  pages, which of course is not true.  (MTK, Nov 04, kernel 2.4.28)
4836 #. type: Plain text
4837 #: build/C/man2/mlock.2:143
4838 msgid ""
4839 "(Linux 2.4 and earlier) the calling process tried to lock more than half of "
4840 "RAM."
4841 msgstr ""
4842 "(Linux 2.4 以前) 呼び出し元プロセスが RAM の半分以上をロックしようとした。"
4843
4844 #. SVr4 documents an additional EAGAIN error code.
4845 #. type: Plain text
4846 #: build/C/man2/mlock.2:149
4847 msgid ""
4848 "The caller is not privileged, but needs privilege (B<CAP_IPC_LOCK>)  to "
4849 "perform the requested operation."
4850 msgstr ""
4851 "呼び出し側が特権を持っていないが、\n"
4852 "要求された操作を実行するには特権 (B<CAP_IPC_LOCK>) が必要である。"
4853
4854 #. type: Plain text
4855 #: build/C/man2/mlock.2:154
4856 msgid "For B<mlock>()  and B<munlock>():"
4857 msgstr "B<mlock>()  と B<munlock>()  用として:"
4858
4859 #. type: Plain text
4860 #: build/C/man2/mlock.2:157
4861 msgid "Some or all of the specified address range could not be locked."
4862 msgstr "指定されたアドレス範囲の一部または全てをロックすることができなかった。"
4863
4864 #. type: Plain text
4865 #: build/C/man2/mlock.2:164
4866 msgid ""
4867 "The result of the addition I<start>+I<len> was less than I<start> (e.g., the "
4868 "addition may have resulted in an overflow)."
4869 msgstr ""
4870 "I<start>+I<len> の加算の結果が I<start> よりも小さかった\n"
4871 "(例えば、加算でオーバーフローが発生したなど)。"
4872
4873 #. type: Plain text
4874 #: build/C/man2/mlock.2:169
4875 msgid "(Not on Linux)  I<addr> was not a multiple of the page size."
4876 msgstr ""
4877 "(Linux ではこの意味で使われない)  I<addr> がページサイズの倍数ではない。"
4878
4879 #. type: Plain text
4880 #: build/C/man2/mlock.2:173
4881 msgid ""
4882 "Some of the specified address range does not correspond to mapped pages in "
4883 "the address space of the process."
4884 msgstr ""
4885 "指定されたアドレス範囲がプロセスのアドレス空間にマップされたページと 一致しな"
4886 "い。"
4887
4888 #. type: Plain text
4889 #: build/C/man2/mlock.2:176
4890 msgid "For B<mlockall>():"
4891 msgstr "B<mlockall>()  用として:"
4892
4893 #. type: Plain text
4894 #: build/C/man2/mlock.2:179
4895 msgid "Unknown I<flags> were specified."
4896 msgstr "未知の I<flags> が指定された。"
4897
4898 #. type: Plain text
4899 #: build/C/man2/mlock.2:182
4900 msgid "For B<munlockall>():"
4901 msgstr "B<munlockall>()  用として:"
4902
4903 #. type: Plain text
4904 #: build/C/man2/mlock.2:186
4905 msgid ""
4906 "(Linux 2.6.8 and earlier) The caller was not privileged (B<CAP_IPC_LOCK>)."
4907 msgstr ""
4908 "(Linux 2.6.8 以前) 呼び出し元が権限 (B<CAP_IPC_LOCK>)  を持っていない。"
4909
4910 #. type: Plain text
4911 #: build/C/man2/mlock.2:188
4912 msgid "POSIX.1-2001, SVr4."
4913 msgstr "POSIX.1-2001, SVr4."
4914
4915 #. type: SH
4916 #: build/C/man2/mlock.2:188 build/C/man2/mmap.2:499 build/C/man2/msync.2:105
4917 #, no-wrap
4918 msgid "AVAILABILITY"
4919 msgstr "可用性"
4920
4921 #. type: Plain text
4922 #: build/C/man2/mlock.2:200
4923 msgid ""
4924 "On POSIX systems on which B<mlock>()  and B<munlock>()  are available, "
4925 "B<_POSIX_MEMLOCK_RANGE> is defined in I<E<lt>unistd.hE<gt>> and the number "
4926 "of bytes in a page can be determined from the constant B<PAGESIZE> (if "
4927 "defined) in I<E<lt>limits.hE<gt>> or by calling I<sysconf(_SC_PAGESIZE)>."
4928 msgstr ""
4929 "B<mlock>()  と B<munlock>()  が使用可能な POSIX システムでは "
4930 "B<_POSIX_MEMLOCK_RANGE> が I<E<lt>unistd.hE<gt>> で定義されている。 また、"
4931 "ページあたりのバイト数は、 I<E<lt>limits.hE<gt>> で定義される定数 "
4932 "B<PAGESIZE> から (定義されている場合)、もしくは I<sysconf(_SC_PAGESIZE)> を呼"
4933 "び出すことで決定できる。"
4934
4935 #.  POSIX.1-2001: It shall be defined to -1 or 0 or 200112L.
4936 #.  -1: unavailable, 0: ask using sysconf().
4937 #.  glibc defines it to 1.
4938 #. type: Plain text
4939 #: build/C/man2/mlock.2:213
4940 msgid ""
4941 "On POSIX systems on which B<mlockall>()  and B<munlockall>()  are available, "
4942 "B<_POSIX_MEMLOCK> is defined in I<E<lt>unistd.hE<gt>> to a value greater "
4943 "than 0.  (See also B<sysconf>(3).)"
4944 msgstr ""
4945 "B<mlockall>()  と B<munlockall>()  が利用可能な POSIX システムでは、 "
4946 "B<_POSIX_MEMLOCK> は I<E<lt>unistd.hE<gt>> で 0 より大きい値に定義されている "
4947 "(B<sysconf>(3)  も参照のこと)。"
4948
4949 #. type: Plain text
4950 #: build/C/man2/mlock.2:231
4951 msgid ""
4952 "Memory locking has two main applications: real-time algorithms and high-"
4953 "security data processing.  Real-time applications require deterministic "
4954 "timing, and, like scheduling, paging is one major cause of unexpected "
4955 "program execution delays.  Real-time applications will usually also switch "
4956 "to a real-time scheduler with B<sched_setscheduler>(2).  Cryptographic "
4957 "security software often handles critical bytes like passwords or secret keys "
4958 "as data structures.  As a result of paging, these secrets could be "
4959 "transferred onto a persistent swap store medium, where they might be "
4960 "accessible to the enemy long after the security software has erased the "
4961 "secrets in RAM and terminated.  (But be aware that the suspend mode on "
4962 "laptops and some desktop computers will save a copy of the system's RAM to "
4963 "disk, regardless of memory locks.)"
4964 msgstr ""
4965 "メモリのロックの用途としては主に二つある: リアルタイム アルゴリズムと高いセ"
4966 "キュリティの必要なデータ処理である。リアルタイムの アプリケーションは決定的な"
4967 "タイミングやスケジューリングを必要とするが、 ページングは予期しないプログラム"
4968 "の実行遅延をもたらす主要な要因となる。 リアルタイムのアプリケーションはたいて"
4969 "いは B<sched_setscheduler>(2)  でリアルタイムスケジューラに変更される。 暗号"
4970 "やセキュリティのソフトウェアはしばしばパスワードや秘密鍵のデータの ような重要"
4971 "なバイト列を扱う。ページングの結果、これらの秘密が スワップ用の固定媒体に転送"
4972 "されるかもしれない。そして、セキュリティ・ ソフトウェアが RAM 上の秘密を削除"
4973 "して終了したずっと後になっても、 このスワップされたデータには敵がアクセスでき"
4974 "る可能性がある (しかし、ラップトップといくつかのデスクトップコンピュータの サ"
4975 "スペンドモードはシステムの RAM の内容をメモリのロックに関わらず ディスクに保"
4976 "存することに注意)。"
4977
4978 #. type: Plain text
4979 #: build/C/man2/mlock.2:244
4980 msgid ""
4981 "Real-time processes that are using B<mlockall>()  to prevent delays on page "
4982 "faults should reserve enough locked stack pages before entering the time-"
4983 "critical section, so that no page fault can be caused by function calls.  "
4984 "This can be achieved by calling a function that allocates a sufficiently "
4985 "large automatic variable (an array) and writes to the memory occupied by "
4986 "this array in order to touch these stack pages.  This way, enough pages will "
4987 "be mapped for the stack and can be locked into RAM.  The dummy writes ensure "
4988 "that not even copy-on-write page faults can occur in the critical section."
4989 msgstr ""
4990 "リアルタイムプロセスが B<mlockall>()  を使ってページフォールトによる遅延を防"
4991 "ごうとする場合、 関数呼び出しによってページフォールトが発生しないように、 時"
4992 "間制限の厳しい部分 (time-critical section) に入る前に 十分な量のロックされた"
4993 "スタックを確保しておく必要がある。 これを実現するには、十分な大きさの自動変"
4994 "数 (の配列) を確保し、 これらのスタック用のページがメモリ上に確保されるように"
4995 "この配列に 書き込みを行う関数を用意し、これを呼び出せばよい。こうすること"
4996 "で、 十分な量のページがスタックにマッピングされ、RAM にロックされる。 ダミー"
4997 "の書き込みを行うことによって、 時間制限の厳しい部分 (critical section) 内では"
4998 "書き込み時コピーによる ページフォールトさえも発生しないことが保証される。"
4999
5000 #. type: Plain text
5001 #: build/C/man2/mlock.2:257
5002 #, fuzzy
5003 #| msgid ""
5004 #| "Memory locks are not inherited by a child created via B<fork>(2)  and are "
5005 #| "automatically removed (unlocked) during an B<execve>(2)  or when the "
5006 #| "process terminates."
5007 msgid ""
5008 "Memory locks are not inherited by a child created via B<fork>(2)  and are "
5009 "automatically removed (unlocked) during an B<execve>(2)  or when the process "
5010 "terminates.  The B<mlockall>()  B<MCL_FUTURE> setting is not inherited by a "
5011 "child created via B<fork>(2)  and is cleared during an B<execve>(2)."
5012 msgstr ""
5013 "メモリロックは B<fork>(2)  で作成された子プロセスには継承されず、 B<execve>"
5014 "(2)  が呼ばれたり、プロセスが終了した場合は 自動的に削除される (ロック解除さ"
5015 "れる)。"
5016
5017 #. type: Plain text
5018 #: build/C/man2/mlock.2:261
5019 msgid ""
5020 "The memory lock on an address range is automatically removed if the address "
5021 "range is unmapped via B<munmap>(2)."
5022 msgstr ""
5023 "あるアドレス範囲に対するメモリロックは、そのアドレス範囲が B<munmap>(2)  に"
5024 "よってアンマップされた場合は削除される。"
5025
5026 #. type: Plain text
5027 #: build/C/man2/mlock.2:274
5028 msgid ""
5029 "Memory locks do not stack, that is, pages which have been locked several "
5030 "times by calls to B<mlock>()  or B<mlockall>()  will be unlocked by a single "
5031 "call to B<munlock>()  for the corresponding range or by B<munlockall>().  "
5032 "Pages which are mapped to several locations or by several processes stay "
5033 "locked into RAM as long as they are locked at least at one location or by at "
5034 "least one process."
5035 msgstr ""
5036 "メモリのロックは累積しない。 すなわち複数回 B<mlock>()  や B<mlockall>()  を"
5037 "呼び出してロックされたページでも、 対応する範囲に対して B<munlock>()  を 1 回"
5038 "呼び出したり B<munlockall>()  を呼び出したりするだけでロック解除される。 複数"
5039 "の場所や複数のプロセスにマップされているページは、少なくとも一つの場所、 一つ"
5040 "のプロセスでロックされている限りは RAM に残り続ける。"
5041
5042 #. type: Plain text
5043 #: build/C/man2/mlock.2:285
5044 msgid ""
5045 "Under Linux, B<mlock>()  and B<munlock>()  automatically round I<addr> down "
5046 "to the nearest page boundary.  However, POSIX.1-2001 allows an "
5047 "implementation to require that I<addr> is page aligned, so portable "
5048 "applications should ensure this."
5049 msgstr ""
5050 "Linux では、 B<mlock>()  と B<munlock>()  は自動的に I<addr> を端数切り捨てに"
5051 "より一番近いページ境界へと丸める。 しかし POSIX.1-2001 は I<addr> がページ境"
5052 "界に合っていることを要求する実装も許している。 そのため移植性を意図したアプリ"
5053 "ケーションではきちんと境界に合わせた方が良い。"
5054
5055 #. type: Plain text
5056 #: build/C/man2/mlock.2:298
5057 msgid ""
5058 "The I<VmLck> field of the Linux-specific I</proc/PID/status> file shows how "
5059 "many kilobytes of memory the process with ID I<PID> has locked using B<mlock>"
5060 "(), B<mlockall>(), and B<mmap>(2)  B<MAP_LOCKED>."
5061 msgstr ""
5062 "Linux 固有の I</proc/PID/status> ファイルの I<VmLck> フィールドには、\n"
5063 "B<mlock>(), B<mlockall>() および B<mmap>(2) B<MAP_LOCKED> を使って、\n"
5064 "ID が I<PID> のプロセスがロックしているメモリ量 (キロバイト単位) が\n"
5065 "表示される。"
5066
5067 #. type: SS
5068 #: build/C/man2/mlock.2:298
5069 #, no-wrap
5070 msgid "Limits and permissions"
5071 msgstr "制限と権限"
5072
5073 #. type: Plain text
5074 #: build/C/man2/mlock.2:305
5075 msgid ""
5076 "In Linux 2.6.8 and earlier, a process must be privileged (B<CAP_IPC_LOCK>)  "
5077 "in order to lock memory and the B<RLIMIT_MEMLOCK> soft resource limit "
5078 "defines a limit on how much memory the process may lock."
5079 msgstr ""
5080 "Linux 2.6.8 以前では、メモリをロックするためには特権 (B<CAP_IPC_LOCK>)  が必"
5081 "要で、 ソフト資源制限 B<RLIMIT_MEMLOCK> はプロセスがどれだけのメモリをロック"
5082 "できるかの制限を定義する。"
5083
5084 #. type: Plain text
5085 #: build/C/man2/mlock.2:311
5086 msgid ""
5087 "Since Linux 2.6.9, no limits are placed on the amount of memory that a "
5088 "privileged process can lock and the B<RLIMIT_MEMLOCK> soft resource limit "
5089 "instead defines a limit on how much memory an unprivileged process may lock."
5090 msgstr ""
5091 "Linux 2.6.9 以降では、特権を持つプロセスがロックできるメモリ量は無制限とな"
5092 "り、 代わりにソフト資源制限 B<RLIMIT_MEMLOCK> は特権を持たないプロセスがロッ"
5093 "クできるメモリ量の制限を定義する。"
5094
5095 #. type: Plain text
5096 #: build/C/man2/mlock.2:319
5097 msgid ""
5098 "In the 2.4 series Linux kernels up to and including 2.4.17, a bug caused the "
5099 "B<mlockall>()  B<MCL_FUTURE> flag to be inherited across a B<fork>(2).  This "
5100 "was rectified in kernel 2.4.18."
5101 msgstr ""
5102 "2.4.17 までの 2.4 シリーズの Linux カーネルには、 B<mlockall>()  "
5103 "B<MCL_FUTURE> フラグが B<fork>(2)  で継承されると言うバグがある。 これはカー"
5104 "ネル 2.4.18 で修正された。"
5105
5106 #.  See the following LKML thread:
5107 #.  http://marc.theaimsgroup.com/?l=linux-kernel&m=113801392825023&w=2
5108 #.  "Rationale for RLIMIT_MEMLOCK"
5109 #.  23 Jan 2006
5110 #. type: Plain text
5111 #: build/C/man2/mlock.2:336
5112 msgid ""
5113 "Since kernel 2.6.9, if a privileged process calls I<mlockall(MCL_FUTURE)> "
5114 "and later drops privileges (loses the B<CAP_IPC_LOCK> capability by, for "
5115 "example, setting its effective UID to a nonzero value), then subsequent "
5116 "memory allocations (e.g., B<mmap>(2), B<brk>(2))  will fail if the "
5117 "B<RLIMIT_MEMLOCK> resource limit is encountered."
5118 msgstr ""
5119 "カーネル 2.6.9 以降では、特権を持ったプロセスが I<mlockall(MCL_FUTURE)> を呼"
5120 "び出した後で、特権をなくした場合 (例えば、 実効 UID を 0 以外の値に変更するな"
5121 "どにより、 B<CAP_IPC_LOCK> ケーパビリティを失った場合)、リソース上限 "
5122 "B<RLIMIT_MEMLOCK> に達すると、それ以降のメモリ割り当て (例えば B<mmap>(2), "
5123 "B<brk>(2))  は失敗する。"
5124
5125 #. type: Plain text
5126 #: build/C/man2/mlock.2:343
5127 msgid ""
5128 "B<mmap>(2), B<setrlimit>(2), B<shmctl>(2), B<sysconf>(3), B<proc>(5), "
5129 "B<capabilities>(7)"
5130 msgstr ""
5131 "B<mmap>(2), B<setrlimit>(2), B<shmctl>(2), B<sysconf>(3), B<proc>(5),\n"
5132 "B<capabilities>(7)"
5133
5134 #. type: TH
5135 #: build/C/man2/mmap.2:40
5136 #, no-wrap
5137 msgid "MMAP"
5138 msgstr "MMAP"
5139
5140 #. type: TH
5141 #: build/C/man2/mmap.2:40
5142 #, no-wrap
5143 msgid "2014-04-06"
5144 msgstr "2014-04-06"
5145
5146 #. type: Plain text
5147 #: build/C/man2/mmap.2:43
5148 msgid "mmap, munmap - map or unmap files or devices into memory"
5149 msgstr "mmap, munmap - ファイルやデバイスをメモリにマップ/アンマップする"
5150
5151 #. type: Plain text
5152 #: build/C/man2/mmap.2:51
5153 #, no-wrap
5154 msgid ""
5155 "B<void *mmap(void *>I<addr>B<, size_t >I<length>B<, int >I<prot>B<, int >I<flags>B<,>\n"
5156 "B<           int >I<fd>B<, off_t >I<offset>B<);>\n"
5157 "B<int munmap(void *>I<addr>B<, size_t >I<length>B<);>\n"
5158 msgstr ""
5159 "B<void *mmap(void *>I<addr>B<, size_t >I<length>B<, int >I<prot>B<, int >I<flags>B<,>\n"
5160 "B<           int >I<fd>B<, off_t >I<offset>B<);>\n"
5161 "B<int munmap(void *>I<addr>B<, size_t >I<length>B<);>\n"
5162
5163 #. type: Plain text
5164 #: build/C/man2/mmap.2:54
5165 msgid "See NOTES for information on feature test macro requirements."
5166 msgstr "機能検査マクロの要件に関する情報は「注意」の節を参照。"
5167
5168 #. type: Plain text
5169 #: build/C/man2/mmap.2:63
5170 msgid ""
5171 "B<mmap>()  creates a new mapping in the virtual address space of the calling "
5172 "process.  The starting address for the new mapping is specified in I<addr>.  "
5173 "The I<length> argument specifies the length of the mapping."
5174 msgstr ""
5175 "B<mmap>()  は、新しいマッピングを呼び出し元プロセスの仮想アドレス空間に作成す"
5176 "る。 新しいマッピングの開始アドレスは I<addr> で指定される。マッピングの長さ"
5177 "は I<length> 引き数で指定される。"
5178
5179 #.  Before Linux 2.6.24, the address was rounded up to the next page
5180 #.  boundary; since 2.6.24, it is rounded down!
5181 #. type: Plain text
5182 #: build/C/man2/mmap.2:77
5183 msgid ""
5184 "If I<addr> is NULL, then the kernel chooses the address at which to create "
5185 "the mapping; this is the most portable method of creating a new mapping.  If "
5186 "I<addr> is not NULL, then the kernel takes it as a hint about where to place "
5187 "the mapping; on Linux, the mapping will be created at a nearby page "
5188 "boundary.  The address of the new mapping is returned as the result of the "
5189 "call."
5190 msgstr ""
5191 "I<addr> が NULL の場合、カーネルがマッピングを作成するアドレスを選択する。 こ"
5192 "の方法は最も移植性のある新しいマッピングの作成方法である。 I<addr> が NULL で"
5193 "ない場合、カーネルはマッピングをどこに配置するかのヒントとして I<addr> を使用"
5194 "する。Linux では、マッピングはすぐ近くのページ境界に作成される。 新しいマッピ"
5195 "ングのアドレスは、呼び出しの返り値として返される。"
5196
5197 #. type: Plain text
5198 #: build/C/man2/mmap.2:89
5199 msgid ""
5200 "The contents of a file mapping (as opposed to an anonymous mapping; see "
5201 "B<MAP_ANONYMOUS> below), are initialized using I<length> bytes starting at "
5202 "offset I<offset> in the file (or other object) referred to by the file "
5203 "descriptor I<fd>.  I<offset> must be a multiple of the page size as returned "
5204 "by I<sysconf(_SC_PAGE_SIZE)>."
5205 msgstr ""
5206 "ファイルマッピングの内容は、 ファイルディスクリプタ I<fd> で参照されるファイ"
5207 "ル (もしくは他のオブジェクト) のオフセット I<offset> から開始される "
5208 "I<length> バイトのデータで初期化される (ファイルマッピングは無名マッピングの"
5209 "反対語である。 B<MAP_ANONYMOUS> を参照)。 I<offset> は I<sysconf"
5210 "(_SC_PAGE_SIZE)> が返すページサイズの倍数でなければならない。"
5211
5212 #. type: Plain text
5213 #: build/C/man2/mmap.2:97
5214 msgid ""
5215 "The I<prot> argument describes the desired memory protection of the mapping "
5216 "(and must not conflict with the open mode of the file).  It is either "
5217 "B<PROT_NONE> or the bitwise OR of one or more of the following flags:"
5218 msgstr ""
5219 "引き数 I<prot> には、マッピングのメモリ保護をどのように行なうかを指定する "
5220 "(ファイルのオープンモードと矛盾してはいけない)。 I<prot> には、 B<PROT_NONE> "
5221 "か、以下のフラグをひとつ以上ビット毎の論理和 (OR) をとったものを 指定できる。"
5222
5223 #. type: TP
5224 #: build/C/man2/mmap.2:97 build/C/man2/mprotect.2:73
5225 #, no-wrap
5226 msgid "B<PROT_EXEC>"
5227 msgstr "B<PROT_EXEC>"
5228
5229 #. type: Plain text
5230 #: build/C/man2/mmap.2:100
5231 msgid "Pages may be executed."
5232 msgstr "ページは実行可能である。"
5233
5234 #. type: TP
5235 #: build/C/man2/mmap.2:100 build/C/man2/mprotect.2:67
5236 #, no-wrap
5237 msgid "B<PROT_READ>"
5238 msgstr "B<PROT_READ>"
5239
5240 #. type: Plain text
5241 #: build/C/man2/mmap.2:103
5242 msgid "Pages may be read."
5243 msgstr "ページは読み込み可能である。"
5244
5245 #. type: TP
5246 #: build/C/man2/mmap.2:103 build/C/man2/mprotect.2:70
5247 #, no-wrap
5248 msgid "B<PROT_WRITE>"
5249 msgstr "B<PROT_WRITE>"
5250
5251 #. type: Plain text
5252 #: build/C/man2/mmap.2:106
5253 msgid "Pages may be written."
5254 msgstr "ページに書き込み可能である。"
5255
5256 #. type: TP
5257 #: build/C/man2/mmap.2:106 build/C/man2/mprotect.2:64
5258 #, no-wrap
5259 msgid "B<PROT_NONE>"
5260 msgstr "B<PROT_NONE>"
5261
5262 #. type: Plain text
5263 #: build/C/man2/mmap.2:109
5264 msgid "Pages may not be accessed."
5265 msgstr "ページにはアクセスできない。"
5266
5267 #. type: Plain text
5268 #: build/C/man2/mmap.2:118
5269 msgid ""
5270 "The I<flags> argument determines whether updates to the mapping are visible "
5271 "to other processes mapping the same region, and whether updates are carried "
5272 "through to the underlying file.  This behavior is determined by including "
5273 "exactly one of the following values in I<flags>:"
5274 msgstr ""
5275 "I<flags> 引き数により、マッピングに対する更新が同じ領域をマッピングしている "
5276 "他のプロセスに見えるか、更新がマッピング元のファイルを通じて 伝えられるか、が"
5277 "決定される。この動作は、以下の値のいずれか一つだけ (複数は指定できない) を "
5278 "I<flags> に含めることで指定する。"
5279
5280 #. type: TP
5281 #: build/C/man2/mmap.2:118
5282 #, no-wrap
5283 msgid "B<MAP_SHARED>"
5284 msgstr "B<MAP_SHARED>"
5285
5286 #. type: Plain text
5287 #: build/C/man2/mmap.2:128
5288 msgid ""
5289 "Share this mapping.  Updates to the mapping are visible to other processes "
5290 "that map this file, and are carried through to the underlying file.  The "
5291 "file may not actually be updated until B<msync>(2)  or B<munmap>()  is "
5292 "called."
5293 msgstr ""
5294 "このマッピングを共有する。 マッピングに対する更新はこのファイルをマッピングし"
5295 "ている他のプロセス から見える。更新はマッピング元のファイルを通じて伝えられ"
5296 "る。 ただし、ファイルの実際の更新は B<msync>(2)  または B<munmap>()  が呼ばれ"
5297 "るまで行われないこともある。"
5298
5299 #. type: TP
5300 #: build/C/man2/mmap.2:128
5301 #, no-wrap
5302 msgid "B<MAP_PRIVATE>"
5303 msgstr "B<MAP_PRIVATE>"
5304
5305 #. type: Plain text
5306 #: build/C/man2/mmap.2:137
5307 msgid ""
5308 "Create a private copy-on-write mapping.  Updates to the mapping are not "
5309 "visible to other processes mapping the same file, and are not carried "
5310 "through to the underlying file.  It is unspecified whether changes made to "
5311 "the file after the B<mmap>()  call are visible in the mapped region."
5312 msgstr ""
5313 "プライベートな copy-on-write (書き込み時コピー) マップを生成する。 マッピング"
5314 "に対する更新は同じファイルをマッピングしている他のプロセス には見えず、更新が"
5315 "マッピング元のファイルを通じて伝えられることもない。 B<mmap>()  の呼び出し後"
5316 "にマッピング元のファイルに対して行われた変更が、 マップ領域に反映されるかどう"
5317 "かは規定されていない。"
5318
5319 #. type: Plain text
5320 #: build/C/man2/mmap.2:139
5321 msgid "Both of these flags are described in POSIX.1-2001."
5322 msgstr "上記の二つのフラグは POSIX.1-2001 で規定されている。"
5323
5324 #. type: Plain text
5325 #: build/C/man2/mmap.2:142
5326 msgid ""
5327 "In addition, zero or more of the following values can be ORed in I<flags>:"
5328 msgstr ""
5329 "さらに、以下の値のうち 0 個以上をビット毎の論理和 (OR) で I<flags> に指定する"
5330 "ことができる。"
5331
5332 #. type: TP
5333 #: build/C/man2/mmap.2:142
5334 #, no-wrap
5335 msgid "B<MAP_32BIT> (since Linux 2.4.20, 2.6)"
5336 msgstr "B<MAP_32BIT> (Linux 2.4.20, 2.6 以降)"
5337
5338 #.  See http://lwn.net/Articles/294642 "Tangled up in threads", 19 Aug 08
5339 #. type: Plain text
5340 #: build/C/man2/mmap.2:158
5341 msgid ""
5342 "Put the mapping into the first 2 Gigabytes of the process address space.  "
5343 "This flag is supported only on x86-64, for 64-bit programs.  It was added to "
5344 "allow thread stacks to be allocated somewhere in the first 2GB of memory, so "
5345 "as to improve context-switch performance on some early 64-bit processors.  "
5346 "Modern x86-64 processors no longer have this performance problem, so use of "
5347 "this flag is not required on those systems.  The B<MAP_32BIT> flag is "
5348 "ignored when B<MAP_FIXED> is set."
5349 msgstr ""
5350 "マッピングをプロセスのアドレス空間の先頭 2 ギガバイト以内に配置する。 このフ"
5351 "ラグがサポートされているのは x86-64 アーキテクチャ上の 64 ビットプログラムの"
5352 "みである。 このフラグが追加されたのは、スレッドのスタックをメモリの先頭 2GB "
5353 "以内の どこかに割り当てることで、初期のいくつかの 64 ビットプロセッサにおけ"
5354 "る コンテキストスイッチの性能問題を改善するためである。 最近の x86-64 プロ"
5355 "セッサではこの性能問題はもはや存在せず、 そのようなシステムではこのフラグを使"
5356 "用する必要はない。 B<MAP_FIXED> がセットされている場合は、 B<MAP_32BIT> フラ"
5357 "グは無視される。"
5358
5359 #. type: TP
5360 #: build/C/man2/mmap.2:158
5361 #, no-wrap
5362 msgid "B<MAP_ANON>"
5363 msgstr "B<MAP_ANON>"
5364
5365 #. type: Plain text
5366 #: build/C/man2/mmap.2:163
5367 msgid "Synonym for B<MAP_ANONYMOUS>.  Deprecated."
5368 msgstr "B<MAP_ANONYMOUS> の同義語。非推奨。"
5369
5370 #. type: TP
5371 #: build/C/man2/mmap.2:163
5372 #, no-wrap
5373 msgid "B<MAP_ANONYMOUS>"
5374 msgstr "B<MAP_ANONYMOUS>"
5375
5376 #. type: Plain text
5377 #: build/C/man2/mmap.2:185
5378 msgid ""
5379 "The mapping is not backed by any file; its contents are initialized to "
5380 "zero.  The I<fd> and I<offset> arguments are ignored; however, some "
5381 "implementations require I<fd> to be -1 if B<MAP_ANONYMOUS> (or B<MAP_ANON>)  "
5382 "is specified, and portable applications should ensure this.  The use of "
5383 "B<MAP_ANONYMOUS> in conjunction with B<MAP_SHARED> is supported on Linux "
5384 "only since kernel 2.4."
5385 msgstr ""
5386 "マッピングはどのファイルとも関連付けされない。 マッピングの内容は 0 で初期化"
5387 "される。 引き数 I<fd> と I<offset> は無視される。 ただし、実装によっては "
5388 "B<MAP_ANONYMOUS> (もしくは B<MAP_ANON>)  が指定された場合、 I<fd> を -1 にす"
5389 "る必要があり、 移植性が必要なアプリケーションでは必ず I<fd> を -1 にすべきで"
5390 "ある。 B<MAP_ANONYMOUS> と B<MAP_SHARED> を組み合わせての利用は カーネル 2.4 "
5391 "以降の Linux でのみサポートされている。"
5392
5393 #. type: TP
5394 #: build/C/man2/mmap.2:185
5395 #, no-wrap
5396 msgid "B<MAP_DENYWRITE>"
5397 msgstr "B<MAP_DENYWRITE>"
5398
5399 #.  Introduced in 1.1.36, removed in 1.3.24.
5400 #. type: Plain text
5401 #: build/C/man2/mmap.2:193
5402 msgid ""
5403 "This flag is ignored.  (Long ago, it signaled that attempts to write to the "
5404 "underlying file should fail with B<ETXTBUSY>.  But this was a source of "
5405 "denial-of-service attacks.)"
5406 msgstr ""
5407 "このフラグは無視される (ずっと前は、マップ元のファイルへの書き込みを行おうと"
5408 "すると、エラー B<ETXTBUSY> で失敗するようにシグナルが設定されていたが、これ"
5409 "は denial-of-service (サービス拒否) 攻撃の原因となった)。"
5410
5411 #. type: TP
5412 #: build/C/man2/mmap.2:193
5413 #, no-wrap
5414 msgid "B<MAP_EXECUTABLE>"
5415 msgstr "B<MAP_EXECUTABLE>"
5416
5417 #.  Introduced in 1.1.38, removed in 1.3.24. Flag tested in proc_follow_link.
5418 #.  (Long ago, it signaled that the underlying file is an executable.
5419 #.  However, that information was not really used anywhere.)
5420 #.  Linus talked about DOS related to MAP_EXECUTABLE, but he was thinking of
5421 #.  MAP_DENYWRITE?
5422 #. type: Plain text
5423 #: build/C/man2/mmap.2:201
5424 msgid "This flag is ignored."
5425 msgstr "このフラグは無視される。"
5426
5427 #. type: TP
5428 #: build/C/man2/mmap.2:201
5429 #, no-wrap
5430 msgid "B<MAP_FILE>"
5431 msgstr "B<MAP_FILE>"
5432
5433 #.  On some systems, this was required as the opposite of
5434 #.  MAP_ANONYMOUS -- mtk, 1 May 2007
5435 #. type: Plain text
5436 #: build/C/man2/mmap.2:207
5437 msgid "Compatibility flag.  Ignored."
5438 msgstr "互換性のためのフラグ。無視される。"
5439
5440 #. type: TP
5441 #: build/C/man2/mmap.2:207
5442 #, no-wrap
5443 msgid "B<MAP_FIXED>"
5444 msgstr "B<MAP_FIXED>"
5445
5446 #. type: Plain text
5447 #: build/C/man2/mmap.2:225
5448 msgid ""
5449 "Don't interpret I<addr> as a hint: place the mapping at exactly that "
5450 "address.  I<addr> must be a multiple of the page size.  If the memory region "
5451 "specified by I<addr> and I<len> overlaps pages of any existing mapping(s), "
5452 "then the overlapped part of the existing mapping(s) will be discarded.  If "
5453 "the specified address cannot be used, B<mmap>()  will fail.  Because "
5454 "requiring a fixed address for a mapping is less portable, the use of this "
5455 "option is discouraged."
5456 msgstr ""
5457 "I<addr> をアドレスのヒントとして使用するのではなく、 I<addr> で指定されたアド"
5458 "レスをそのまま使用してマッピングを配置する。 I<addr> はページサイズの倍数でな"
5459 "ければならない。 I<addr> と I<len> で指定されたメモリ領域が既存のマッピングの"
5460 "ページと重なる場合、 既存のマッピングの重なった部分は捨てられる。 もし指定さ"
5461 "れたアドレスが使用できない場合、 B<mmap>()  は失敗する。 マッピングに対して固"
5462 "定アドレスを要求するのは移植性の面で劣るので、 このオプションは使用しないこと"
5463 "を推奨する。"
5464
5465 #. type: TP
5466 #: build/C/man2/mmap.2:225
5467 #, no-wrap
5468 msgid "B<MAP_GROWSDOWN>"
5469 msgstr "B<MAP_GROWSDOWN>"
5470
5471 #. type: Plain text
5472 #: build/C/man2/mmap.2:230
5473 msgid ""
5474 "Used for stacks.  Indicates to the kernel virtual memory system that the "
5475 "mapping should extend downward in memory."
5476 msgstr ""
5477 "スタック用に使用される。マッピングをメモリ内で逆向きに行うことを カーネル仮想"
5478 "メモリシステムに指示する。 (訳注:マッピングは通常はメモリ・アドレスが増加す"
5479 "る向きに行うが、 このオプションを指定すると逆向きにマッピングを行う)"
5480
5481 #. type: TP
5482 #: build/C/man2/mmap.2:230
5483 #, no-wrap
5484 msgid "B<MAP_HUGETLB> (since Linux 2.6.32)"
5485 msgstr "B<MAP_HUGETLB> (Linux 2.6.32 以降)"
5486
5487 #. type: Plain text
5488 #: build/C/man2/mmap.2:236
5489 msgid ""
5490 "Allocate the mapping using \"huge pages.\" See the Linux kernel source file "
5491 "I<Documentation/vm/hugetlbpage.txt> for further information."
5492 msgstr ""
5493 "\"huge page\" を使ってマッピングを割り当てる。詳しい情報は、Linux カーネル"
5494 "ソースの I<Documentation/vm/hugetlbpage.txt> を参照。"
5495
5496 #. type: TP
5497 #: build/C/man2/mmap.2:236
5498 #, no-wrap
5499 msgid "B<MAP_LOCKED> (since Linux 2.5.37)"
5500 msgstr "B<MAP_LOCKED> (Linux 2.5.37 以降)"
5501
5502 #.  If set, the mapped pages will not be swapped out.
5503 #. type: Plain text
5504 #: build/C/man2/mmap.2:242
5505 msgid ""
5506 "Lock the pages of the mapped region into memory in the manner of B<mlock>"
5507 "(2).  This flag is ignored in older kernels."
5508 msgstr ""
5509 "マップされた領域のページを B<mlock>(2)  の方法でメモリ内にロックする。 それ以"
5510 "前のカーネルでは、このフラグは無視される。"
5511
5512 #. type: TP
5513 #: build/C/man2/mmap.2:242
5514 #, no-wrap
5515 msgid "B<MAP_NONBLOCK> (since Linux 2.5.46)"
5516 msgstr "B<MAP_NONBLOCK> (Linux 2.5.46 以降)"
5517
5518 #. type: Plain text
5519 #: build/C/man2/mmap.2:257
5520 msgid ""
5521 "Only meaningful in conjunction with B<MAP_POPULATE>.  Don't perform read-"
5522 "ahead: create page tables entries only for pages that are already present in "
5523 "RAM.  Since Linux 2.6.23, this flag causes B<MAP_POPULATE> to do nothing.  "
5524 "One day the combination of B<MAP_POPULATE> and B<MAP_NONBLOCK> may be "
5525 "reimplemented."
5526 msgstr ""
5527 "B<MAP_POPULATE> と組み合わせた場合のみ意味を持つ。 read-ahead (前もって読み込"
5528 "むこと) を実行しない。 単に、すでに RAM 上に存在するページに対してのみページ"
5529 "テーブルエントリを作成する。 Linux 2.6.23 以降では、このフラグは "
5530 "B<MAP_POPULATE> に何の影響も与えない。 いつか B<MAP_POPULATE> と "
5531 "B<MAP_NONBLOCK> を組み合わせた場合の動作は実装し直されるかもしれない。"
5532
5533 #. type: TP
5534 #: build/C/man2/mmap.2:257
5535 #, no-wrap
5536 msgid "B<MAP_NORESERVE>"
5537 msgstr "B<MAP_NORESERVE>"
5538
5539 #. type: Plain text
5540 #: build/C/man2/mmap.2:272
5541 msgid ""
5542 "Do not reserve swap space for this mapping.  When swap space is reserved, "
5543 "one has the guarantee that it is possible to modify the mapping.  When swap "
5544 "space is not reserved one might get B<SIGSEGV> upon a write if no physical "
5545 "memory is available.  See also the discussion of the file I</proc/sys/vm/"
5546 "overcommit_memory> in B<proc>(5).  In kernels before 2.6, this flag had "
5547 "effect only for private writable mappings."
5548 msgstr ""
5549 "このマッピングに対するスワップ空間の予約を行わない。 スワップ空間を予約した場"
5550 "合は、このマッピングの変更が必ず可能なことが 保証される。予約を行わなかった場"
5551 "合、物理メモリに空きがないと 書き込み時に B<SIGSEGV> エラーを受け取ることがあ"
5552 "る。 B<proc>(5)  の I</proc/sys/vm/overcommit_memory> ファイルについての議論"
5553 "も参照。 バージョン 2.6 より前のカーネルでは、このフラグは書き込み可能な プラ"
5554 "イベート・マッピングについてのみ効果があった。"
5555
5556 #. type: TP
5557 #: build/C/man2/mmap.2:272
5558 #, no-wrap
5559 msgid "B<MAP_POPULATE> (since Linux 2.5.46)"
5560 msgstr "B<MAP_POPULATE> (Linux 2.5.46 以降)"
5561
5562 #. type: Plain text
5563 #: build/C/man2/mmap.2:279
5564 msgid ""
5565 "Populate (prefault) page tables for a mapping.  For a file mapping, this "
5566 "causes read-ahead on the file.  Later accesses to the mapping will not be "
5567 "blocked by page faults.  B<MAP_POPULATE> is supported for private mappings "
5568 "only since Linux 2.6.23."
5569 msgstr ""
5570 "マッピング用のページテーブルを配置 (populate) する ファイルマッピングの場合に"
5571 "は、これによりファイルが先読み (read-ahead)  が行われる。この以後は、マッピン"
5572 "グに対するアクセスがページフォールトで ブロックされることがなくなる。 Linux "
5573 "2.6.23 以降でのみプライベート・マッピングについて B<MAP_POPULATE> がサポート"
5574 "されている。"
5575
5576 #. type: TP
5577 #: build/C/man2/mmap.2:279
5578 #, no-wrap
5579 msgid "B<MAP_STACK> (since Linux 2.6.27)"
5580 msgstr "B<MAP_STACK> (Linux 2.6.27 以降)"
5581
5582 #.  See http://lwn.net/Articles/294642 "Tangled up in threads", 19 Aug 08
5583 #.  commit cd98a04a59e2f94fa64d5bf1e26498d27427d5e7
5584 #.  http://thread.gmane.org/gmane.linux.kernel/720412
5585 #.  "pthread_create() slow for many threads; also time to revisit 64b
5586 #.   context switch optimization?"
5587 #. type: Plain text
5588 #: build/C/man2/mmap.2:292
5589 msgid ""
5590 "Allocate the mapping at an address suitable for a process or thread stack.  "
5591 "This flag is currently a no-op, but is used in the glibc threading "
5592 "implementation so that if some architectures require special treatment for "
5593 "stack allocations, support can later be transparently implemented for glibc."
5594 msgstr ""
5595 "プロセスやスレッドのスタックに適したアドレスにマッピングを割り当てる。 現在の"
5596 "ところ、このフラグは何もしないが、 glibc のスレッド実装では使用されている。 "
5597 "これは、いくつかのアーキテクチャではスタックの割り当てに関して特別な扱い が必"
5598 "要な場合に、glibc にそのサポートを後で透過的に実装できるようにする ためであ"
5599 "る。"
5600
5601 #. type: TP
5602 #: build/C/man2/mmap.2:292
5603 #, no-wrap
5604 msgid "B<MAP_UNINITIALIZED> (since Linux 2.6.33)"
5605 msgstr "B<MAP_UNINITIALIZED> (Linux 2.6.33 以降)"
5606
5607 #. type: Plain text
5608 #: build/C/man2/mmap.2:302
5609 msgid ""
5610 "Don't clear anonymous pages.  This flag is intended to improve performance "
5611 "on embedded devices.  This flag is honored only if the kernel was configured "
5612 "with the B<CONFIG_MMAP_ALLOW_UNINITIALIZED> option.  Because of the security "
5613 "implications, that option is normally enabled only on embedded devices (i."
5614 "e., devices where one has complete control of the contents of user memory)."
5615 msgstr ""
5616 "無名ページ (anonymous page) のクリアを行わない。このフラグは組み込みデバイ"
5617 "ス\n"
5618 "での性能向上を目的に作られてものである。カーネルの設定で\n"
5619 "B<CONFIG_MMAP_ALLOW_UNINITIALIZED> オプションが有効になっている場合のみ、\n"
5620 "このフラグは効果を持つ。\n"
5621 "セキュリティ面の考慮から、このオプションは通常組み込みデバイス (すなわち、\n"
5622 "ユーザメモリの内容を完全に制御化におけるデバイス) においてのみ有効にされる。"
5623
5624 #. type: Plain text
5625 #: build/C/man2/mmap.2:310
5626 msgid ""
5627 "Of the above flags, only B<MAP_FIXED> is specified in POSIX.1-2001.  "
5628 "However, most systems also support B<MAP_ANONYMOUS> (or its synonym "
5629 "B<MAP_ANON>)."
5630 msgstr ""
5631 "上記のフラグの中では、 B<MAP_FIXED> だけが POSIX.1-2001 で規定されている。 し"
5632 "かしながら、ほとんどのシステムで B<MAP_ANONYMOUS> (またはその同義語である "
5633 "B<MAP_ANON>)  もサポートされている。"
5634
5635 #. type: Plain text
5636 #: build/C/man2/mmap.2:317
5637 msgid ""
5638 "Some systems document the additional flags B<MAP_AUTOGROW>, "
5639 "B<MAP_AUTORESRV>, B<MAP_COPY>, and B<MAP_LOCAL>."
5640 msgstr ""
5641 "いくつかのシステムでは、上記以外にフラグとして B<MAP_AUTOGROW>, "
5642 "B<MAP_AUTORESRV>, B<MAP_COPY>, B<MAP_LOCAL> が規定されている。"
5643
5644 #. type: Plain text
5645 #: build/C/man2/mmap.2:323
5646 msgid ""
5647 "Memory mapped by B<mmap>()  is preserved across B<fork>(2), with the same "
5648 "attributes."
5649 msgstr ""
5650 "B<mmap>()  によってマップされたメモリの属性は B<fork>(2)  の際に継承される。"
5651
5652 #. type: Plain text
5653 #: build/C/man2/mmap.2:331
5654 msgid ""
5655 "A file is mapped in multiples of the page size.  For a file that is not a "
5656 "multiple of the page size, the remaining memory is zeroed when mapped, and "
5657 "writes to that region are not written out to the file.  The effect of "
5658 "changing the size of the underlying file of a mapping on the pages that "
5659 "correspond to added or removed regions of the file is unspecified."
5660 msgstr ""
5661 "ファイルはページサイズの整数倍の領域にマップされる。サイズがページサイズの 整"
5662 "数倍でないファイルの場合、マップ時に残りの領域は 0 で埋められ、この領域へ 書"
5663 "きこみを行ってもファイルに書き出されることはない。マッピングを行った元 ファイ"
5664 "ルのサイズを変更した場合、元ファイルの追加されたり削除された領域に対応 する"
5665 "マップされたページに対してどのような影響があるかは規定されていない。"
5666
5667 #. type: SS
5668 #: build/C/man2/mmap.2:331
5669 #, no-wrap
5670 msgid "munmap()"
5671 msgstr "munmap()"
5672
5673 #. type: Plain text
5674 #: build/C/man2/mmap.2:341
5675 msgid ""
5676 "The B<munmap>()  system call deletes the mappings for the specified address "
5677 "range, and causes further references to addresses within the range to "
5678 "generate invalid memory references.  The region is also automatically "
5679 "unmapped when the process is terminated.  On the other hand, closing the "
5680 "file descriptor does not unmap the region."
5681 msgstr ""
5682 "システムコール B<munmap>()  は指定されたアドレス範囲のマップを消去し、 これ以"
5683 "降のその範囲内へのメモリ参照は不正となる。 この領域は、プロセスが終了したとき"
5684 "にも自動的にアンマップされる。 一方、ファイル記述子をクローズしても、この領域"
5685 "はアンマップされない。"
5686
5687 #. type: Plain text
5688 #: build/C/man2/mmap.2:351
5689 msgid ""
5690 "The address I<addr> must be a multiple of the page size.  All pages "
5691 "containing a part of the indicated range are unmapped, and subsequent "
5692 "references to these pages will generate B<SIGSEGV>.  It is not an error if "
5693 "the indicated range does not contain any mapped pages."
5694 msgstr ""
5695 "I<addr> アドレスはページサイズの整数倍でなければならない。指定された範囲の一"
5696 "部分を 含む全てのページはアンマップされ、これ以降にこれらのページへの参照があ"
5697 "ると B<SIGSEGV> が発生する。 指定した範囲内にマップされたページが一つも含まれ"
5698 "ていない場合でも エラーにならない。"
5699
5700 #. type: SS
5701 #: build/C/man2/mmap.2:351
5702 #, no-wrap
5703 msgid "Timestamps changes for file-backed mappings"
5704 msgstr "ファイルと関連付けられたマッピングに対するタイムスタンプの更新"
5705
5706 #. type: Plain text
5707 #: build/C/man2/mmap.2:358
5708 msgid ""
5709 "For file-backed mappings, the I<st_atime> field for the mapped file may be "
5710 "updated at any time between the B<mmap>()  and the corresponding unmapping; "
5711 "the first reference to a mapped page will update the field if it has not "
5712 "been already."
5713 msgstr ""
5714 "ファイルと関連付けられたマッピングの場合、マッピングされたファイルの "
5715 "I<st_atime> フィールドは、 B<mmap>()  されてからアンマップ (unmap) されるまで"
5716 "の間に更新されることがある。 それまでに更新が行われていなければ、マップされた"
5717 "ページへの最初の参照があった 際に更新される。"
5718
5719 #. type: Plain text
5720 #: build/C/man2/mmap.2:375
5721 msgid ""
5722 "The I<st_ctime> and I<st_mtime> field for a file mapped with B<PROT_WRITE> "
5723 "and B<MAP_SHARED> will be updated after a write to the mapped region, and "
5724 "before a subsequent B<msync>(2)  with the B<MS_SYNC> or B<MS_ASYNC> flag, if "
5725 "one occurs."
5726 msgstr ""
5727 "B<PROT_WRITE> と B<MAP_SHARED> の両方を指定してマップされたファイルの場合、書"
5728 "き込みがあると、 I<st_ctime> と I<st_mtime> の両フィールドは、マップされた領"
5729 "域への書き込みより後で、 B<MS_SYNC> または B<MS_ASYNC> フラグを指定して "
5730 "B<msync>(2)  が呼ばれる前までに更新される。"
5731
5732 #. type: Plain text
5733 #: build/C/man2/mmap.2:392
5734 msgid ""
5735 "On success, B<mmap>()  returns a pointer to the mapped area.  On error, the "
5736 "value B<MAP_FAILED> (that is, I<(void\\ *)\\ -1>)  is returned, and I<errno> "
5737 "is set appropriately.  On success, B<munmap>()  returns 0, on failure -1, "
5738 "and I<errno> is set (probably to B<EINVAL>)."
5739 msgstr ""
5740 "B<mmap>()  は成功するとマップされた領域へのポインタを返す。 失敗すると値 "
5741 "B<MAP_FAILED> (つまり I<(void\\ *)\\ -1>)  を返し、 I<errno> がエラーの内容に"
5742 "したがってセットされる。 B<munmap>()  は成功すると 0 を返す。失敗すると -1 を"
5743 "返し、 I<errno> がセットされる (多くの場合 B<EINVAL> になるだろう)。"
5744
5745 #. type: TP
5746 #: build/C/man2/mmap.2:393 build/C/man2/mprotect.2:86
5747 #: build/C/man3/shm_open.3:187 build/C/man3/shm_open.3:192
5748 #: build/C/man2/shmctl.2:306 build/C/man2/shmget.2:189
5749 #: build/C/man2/shmop.2:191
5750 #, no-wrap
5751 msgid "B<EACCES>"
5752 msgstr "B<EACCES>"
5753
5754 #. type: Plain text
5755 #: build/C/man2/mmap.2:411
5756 msgid ""
5757 "A file descriptor refers to a non-regular file.  Or a file mapping was "
5758 "requested, but I<fd> is not open for reading.  Or B<MAP_SHARED> was "
5759 "requested and B<PROT_WRITE> is set, but I<fd> is not open in read/write "
5760 "(B<O_RDWR>)  mode.  Or B<PROT_WRITE> is set, but the file is append-only."
5761 msgstr ""
5762 "以下のいずれかの場合。 ファイル記述子の参照先が通常のファイルではない (non-"
5763 "regular file) 。 ファイルマッピングを要求したが I<fd> は読み込み用にオープン"
5764 "されていない。 B<MAP_SHARED> を要求して B<PROT_WRITE> をセットしたが I<fd> は"
5765 "読み書きモード (B<O_RDWR>)  でオープンされていない、 B<PROT_WRITE> をセットし"
5766 "たが、ファイルは追加 (append) 専用である。"
5767
5768 #. type: Plain text
5769 #: build/C/man2/mmap.2:415
5770 msgid ""
5771 "The file has been locked, or too much memory has been locked (see "
5772 "B<setrlimit>(2))."
5773 msgstr ""
5774 "ファイルがロックされている。またはロックされているメモリが多すぎる "
5775 "(B<setrlimit>(2)  を参照)。"
5776
5777 #. type: Plain text
5778 #: build/C/man2/mmap.2:421
5779 msgid ""
5780 "I<fd> is not a valid file descriptor (and B<MAP_ANONYMOUS> was not set)."
5781 msgstr ""
5782 "I<fd> が有効なファイル記述子 (file descriptor) ではない (かつ "
5783 "B<MAP_ANONYMOUS> がセットされていない)。"
5784
5785 #. type: Plain text
5786 #: build/C/man2/mmap.2:429
5787 msgid ""
5788 "We don't like I<addr>, I<length>, or I<offset> (e.g., they are too large, or "
5789 "not aligned on a page boundary)."
5790 msgstr ""
5791 "I<addr> か I<length> か I<offset> が適切でない (例えば、大きすぎるとか、ペー"
5792 "ジ境界にアラインメントされていない)。"
5793
5794 #. type: Plain text
5795 #: build/C/man2/mmap.2:434
5796 msgid "(since Linux 2.6.12)  I<length> was 0."
5797 msgstr "(Linux 2.6.12 以降)  I<length> が 0 であった。"
5798
5799 #. type: Plain text
5800 #: build/C/man2/mmap.2:442
5801 msgid ""
5802 "I<flags> contained neither B<MAP_PRIVATE> or B<MAP_SHARED>, or contained "
5803 "both of these values."
5804 msgstr ""
5805 "I<flags> に B<MAP_PRIVATE> と B<MAP_SHARED> のどちらも含まれていなかった、も"
5806 "しくは その両方が含まれていた。"
5807
5808 #. type: TP
5809 #: build/C/man2/mmap.2:442 build/C/man3/shm_open.3:229
5810 #: build/C/man2/shmget.2:205
5811 #, no-wrap
5812 msgid "B<ENFILE>"
5813 msgstr "B<ENFILE>"
5814
5815 #.  [2.6.7] shmem_zero_setup()-->shmem_file_setup()-->get_empty_filp()
5816 #. type: Plain text
5817 #: build/C/man2/mmap.2:450 build/C/man2/shmget.2:209
5818 msgid "The system limit on the total number of open files has been reached."
5819 msgstr "システム全体でオープンされているファイルの総数が上限に達した。"
5820
5821 #. type: Plain text
5822 #: build/C/man2/mmap.2:454
5823 msgid ""
5824 "The underlying filesystem of the specified file does not support memory "
5825 "mapping."
5826 msgstr ""
5827 "指定されたファイルが置かれているファイルシステムがメモリマッピングをサポート "
5828 "していない。"
5829
5830 #. type: Plain text
5831 #: build/C/man2/mmap.2:458
5832 msgid ""
5833 "No memory is available, or the process's maximum number of mappings would "
5834 "have been exceeded."
5835 msgstr ""
5836 "メモリに空きがない、または処理中のプロセスのマッピング数が最大数を超過した。"
5837
5838 #.  (Since 2.4.25 / 2.6.0.)
5839 #. type: Plain text
5840 #: build/C/man2/mmap.2:467
5841 msgid ""
5842 "The I<prot> argument asks for B<PROT_EXEC> but the mapped area belongs to a "
5843 "file on a filesystem that was mounted no-exec."
5844 msgstr ""
5845 "I<prot> 引き数は B<PROT_EXEC> を行うように指定されているが、 no-exec でマウン"
5846 "トされたファイルシステム上のファイルに マップ領域が対応している。"
5847
5848 #. type: Plain text
5849 #: build/C/man2/mmap.2:473
5850 msgid ""
5851 "B<MAP_DENYWRITE> was set but the object specified by I<fd> is open for "
5852 "writing."
5853 msgstr ""
5854 "B<MAP_DENYWRITE> がセットされているが I<fd> で指定されているオブジェクトは書"
5855 "き込み用に開かれている。"
5856
5857 #. type: TP
5858 #: build/C/man2/mmap.2:473 build/C/man2/shmctl.2:348
5859 #, no-wrap
5860 msgid "B<EOVERFLOW>"
5861 msgstr "B<EOVERFLOW>"
5862
5863 #. type: Plain text
5864 #: build/C/man2/mmap.2:485
5865 msgid ""
5866 "On 32-bit architecture together with the large file extension (i.e., using "
5867 "64-bit I<off_t>): the number of pages used for I<length> plus number of "
5868 "pages used for I<offset> would overflow I<unsigned long> (32 bits)."
5869 msgstr ""
5870 "32 ビットアーキテクチャで large file 拡張を使っている場合 (つまり 64 ビット"
5871 "の I<off_t> を使う場合)、 I<length> で使うページ数と I<offset> で使うページ数"
5872 "を足した値は I<unsigned long> (32 ビット) を超えてしまう (オーバーフローして"
5873 "しまう) 場合がある。"
5874
5875 #. type: Plain text
5876 #: build/C/man2/mmap.2:487
5877 msgid "Use of a mapped region can result in these signals:"
5878 msgstr "マップ領域を利用する際に、以下のシグナルが発生することがある:"
5879
5880 #. type: TP
5881 #: build/C/man2/mmap.2:487
5882 #, no-wrap
5883 msgid "B<SIGSEGV>"
5884 msgstr "B<SIGSEGV>"
5885
5886 #. type: Plain text
5887 #: build/C/man2/mmap.2:490
5888 msgid "Attempted write into a region mapped as read-only."
5889 msgstr "読み込み専用で mmap された領域へ書き込みを行おうとした。"
5890
5891 #. type: TP
5892 #: build/C/man2/mmap.2:490
5893 #, no-wrap
5894 msgid "B<SIGBUS>"
5895 msgstr "B<SIGBUS>"
5896
5897 #. type: Plain text
5898 #: build/C/man2/mmap.2:495
5899 msgid ""
5900 "Attempted access to a portion of the buffer that does not correspond to the "
5901 "file (for example, beyond the end of the file, including the case where "
5902 "another process has truncated the file)."
5903 msgstr ""
5904 "バッファのうち、ファイルに関連づけられていない部分 (例えばファイル末尾を越え"
5905 "た部分など。これには 他のプロセスがファイルを切り詰めた場合なども含まれる)  "
5906 "にアクセスしようとした。"
5907
5908 #.  SVr4 documents additional error codes ENXIO and ENODEV.
5909 #.  SUSv2 documents additional error codes EMFILE and EOVERFLOW.
5910 #. type: Plain text
5911 #: build/C/man2/mmap.2:499
5912 msgid "SVr4, 4.4BSD, POSIX.1-2001."
5913 msgstr "SVr4, 4.4BSD, POSIX.1-2001."
5914
5915 #.  POSIX.1-2001: It shall be defined to -1 or 0 or 200112L.
5916 #.  -1: unavailable, 0: ask using sysconf().
5917 #.  glibc defines it to 1.
5918 #. type: Plain text
5919 #: build/C/man2/mmap.2:513
5920 msgid ""
5921 "On POSIX systems on which B<mmap>(), B<msync>(2)  and B<munmap>()  are "
5922 "available, B<_POSIX_MAPPED_FILES> is defined in I<E<lt>unistd.hE<gt>> to a "
5923 "value greater than 0.  (See also B<sysconf>(3).)"
5924 msgstr ""
5925 "B<mmap>(), B<msync>(2)  B<munmap>()  が利用可能な POSIX システムでは、 "
5926 "B<_POSIX_MAPPED_FILES> は E<lt>unistd.hE<gt> で 0 より大きな値に定義される "
5927 "(B<sysconf>(3)  も参照のこと)。"
5928
5929 #.  Since around glibc 2.1/2.2, depending on the platform.
5930 #. type: Plain text
5931 #: build/C/man2/mmap.2:528
5932 msgid ""
5933 "This page describes the interface provided by the glibc B<mmap>()  wrapper "
5934 "function.  Originally, this function invoked a system call of the same "
5935 "name.  Since kernel 2.4, that system call has been superseded by B<mmap2>"
5936 "(2), and nowadays the glibc B<mmap>()  wrapper function invokes B<mmap2>(2)  "
5937 "with a suitably adjusted value for I<offset>."
5938 msgstr ""
5939 "このページでは glibc の B<mmap>() のラッパー関数が提供するインターフェース"
5940 "に\n"
5941 "ついて説明している。元々は、この関数は同じ名前のシステムコールを起動してい"
5942 "た。\n"
5943 "カーネル 2.4 以降、このシステムコールは B<mmap2>(2) に取って代わられ、現在\n"
5944 "では、 glibc の B<mmap>() のラッパー関数は I<offset> を適切に調整してから\n"
5945 "B<mmap2>(2) を起動する。"
5946
5947 #. type: Plain text
5948 #: build/C/man2/mmap.2:541
5949 msgid ""
5950 "On some hardware architectures (e.g., i386), B<PROT_WRITE> implies "
5951 "B<PROT_READ>.  It is architecture dependent whether B<PROT_READ> implies "
5952 "B<PROT_EXEC> or not.  Portable programs should always set B<PROT_EXEC> if "
5953 "they intend to execute code in the new mapping."
5954 msgstr ""
5955 "(i386 などの) いくつかのアーキテクチャでは、 B<PROT_WRITE> をセットすると、暗"
5956 "黙のうちに B<PROT_READ> がセットされる。 B<PROT_READ> をセットした際に暗黙の"
5957 "うちに B<PROT_EXEC> がセットされるかどうかは、アーキテクチャ依存である。 移植"
5958 "性を考慮したプログラムでは、 新規にマップした領域でコードを実行したい場合は、"
5959 "常に B<PROT_EXEC> をセットすべきである。"
5960
5961 #. type: Plain text
5962 #: build/C/man2/mmap.2:556
5963 msgid ""
5964 "The portable way to create a mapping is to specify I<addr> as 0 (NULL), and "
5965 "omit B<MAP_FIXED> from I<flags>.  In this case, the system chooses the "
5966 "address for the mapping; the address is chosen so as not to conflict with "
5967 "any existing mapping, and will not be 0.  If the B<MAP_FIXED> flag is "
5968 "specified, and I<addr> is 0 (NULL), then the mapped address will be 0 (NULL)."
5969 msgstr ""
5970 "マッピングを作成する移植性のある方法は、 I<addr> に 0 (NULL) を指定し、 "
5971 "I<flags> から B<MAP_FIXED> を外すことである。 この場合、システムがマッピング"
5972 "用のアドレスの選択を行う。 アドレスは既存のマッピングと衝突しないように、 か"
5973 "つ 0 にならないように選択される。 B<MAP_FIXED> フラグが指定され、かつ "
5974 "I<addr> が 0 (NULL)  の場合には、マップされるアドレスが 0 (NULL) になる。"
5975
5976 #. type: Plain text
5977 #: build/C/man2/mmap.2:585
5978 msgid ""
5979 "Certain I<flags> constants are defined only if either B<_BSD_SOURCE> or "
5980 "B<_SVID_SOURCE> is defined.  (Requiring B<_GNU_SOURCE> also suffices, and "
5981 "requiring that macro specifically would have been more logical, since these "
5982 "flags are all Linux-specific.)  The relevant flags are: B<MAP_32BIT>, "
5983 "B<MAP_ANONYMOUS> (and the synonym B<MAP_ANON>), B<MAP_DENYWRITE>, "
5984 "B<MAP_EXECUTABLE>, B<MAP_FILE>, B<MAP_GROWSDOWN>, B<MAP_HUGETLB>, "
5985 "B<MAP_LOCKED>, B<MAP_NONBLOCK>, B<MAP_NORESERVE>, B<MAP_POPULATE>, and "
5986 "B<MAP_STACK>."
5987 msgstr ""
5988 "特定の I<flags> 定数は B<_BSD_SOURCE> か B<_SVID_SOURCE> のいずれかが定義され"
5989 "た場合にのみ定義される。 (B<_GNU_SOURCE> も定義されている必要がある。これらの"
5990 "フラグはすべて Linux 固有のものなので、 特に B<_GNU_SOURCE> を必要とする点は"
5991 "もっと論理的に決められるべきであった。) 関係するフラグは B<MAP_32BIT>, "
5992 "B<MAP_ANONYMOUS> (とその同義語の B<MAP_ANON>), B<MAP_DENYWRITE>, "
5993 "B<MAP_EXECUTABLE>, B<MAP_FILE>, B<MAP_GROWSDOWN>, B<MAP_HUGETLB>, "
5994 "B<MAP_LOCKED>, B<MAP_NONBLOCK>, B<MAP_NORESERVE>, B<MAP_POPULATE>, "
5995 "B<MAP_STACK> である。"
5996
5997 #. type: Plain text
5998 #: build/C/man2/mmap.2:590
5999 msgid ""
6000 "On Linux there are no guarantees like those suggested above under "
6001 "B<MAP_NORESERVE>.  By default, any process can be killed at any moment when "
6002 "the system runs out of memory."
6003 msgstr ""
6004 "Linux においては、上記の B<MAP_NORESERVE> で述べられているような保証はない。 "
6005 "デフォルトでは、システムがメモリを使い切った場合には、 どのプロセスがいつ強制"
6006 "終了されるか分からないからである。"
6007
6008 #. type: Plain text
6009 #: build/C/man2/mmap.2:597
6010 msgid ""
6011 "In kernels before 2.6.7, the B<MAP_POPULATE> flag has effect only if I<prot> "
6012 "is specified as B<PROT_NONE>."
6013 msgstr ""
6014 "2.6.7 より前のカーネルでは、 I<prot> に B<PROT_NONE> が指定された場合にの"
6015 "み、 B<MAP_POPULATE> フラグが効力を持つ。"
6016
6017 #. type: Plain text
6018 #: build/C/man2/mmap.2:612
6019 msgid ""
6020 "SUSv3 specifies that B<mmap>()  should fail if I<length> is 0.  However, in "
6021 "kernels before 2.6.12, B<mmap>()  succeeded in this case: no mapping was "
6022 "created and the call returned I<addr>.  Since kernel 2.6.12, B<mmap>()  "
6023 "fails with the error B<EINVAL> for this case."
6024 msgstr ""
6025 "SUSv3 では、 I<length> が 0 の場合、 B<mmap>()  は失敗すると規定されている。"
6026 "しかしながら、2.6.12 より前のカーネルでは、 この場合に B<mmap>()  は成功して"
6027 "いた (マッピングは作成されず、 I<addr> が返されていた)。 カーネル 2.6.12 以降"
6028 "では、 B<mmap>()  はエラー B<EINVAL> で失敗する。"
6029
6030 #. type: Plain text
6031 #: build/C/man2/mmap.2:628
6032 msgid ""
6033 "POSIX specifies that the system shall always zero fill any partial page at "
6034 "the end of the object and that system will never write any modification of "
6035 "the object beyond its end.  On Linux, when you write data to such partial "
6036 "page after the end of the object, the data stays in the page cache even "
6037 "after the file is closed and unmapped and even though the data is never "
6038 "written to the file itself, subsequent mappings may see the modified "
6039 "content.  In some cases, this could be fixed by calling B<msync>(2)  before "
6040 "the unmap takes place; however, this doesn't work on tmpfs (for example, "
6041 "when using POSIX shared memory interface documented in B<shm_overview>(7))."
6042 msgstr ""
6043 "POSIX では、 システムはオブジェクト末尾の部分ページを常に 0 で埋め、 末尾より"
6044 "後ろのオブジェクトを決して変更してはならない、と規定している。 Linux では、 "
6045 "オブジェクト末尾より後ろの部分ページにデータを書き込んだ場合、 そのファイルを"
6046 "クローズしてアンマップした後であってもページキャッシュにデータが残り続け、 "
6047 "データがファイル自体に書き込まれていなくても、 それ以降のマッピングで変更され"
6048 "た内容が見える可能性がある。 いくつかの場合では、 アンマップを行う前に "
6049 "B<msync>(2) を呼び出すことで、 この状況を修正することができる。 しかし、 これ"
6050 "は tmpfs では機能しない (例えば、 B<shm_overview>(7) で説明されている POSIX "
6051 "共有メモリインターフェースを使った場合)。"
6052
6053 #. type: Plain text
6054 #: build/C/man2/mmap.2:640
6055 msgid ""
6056 "The following program prints part of the file specified in its first command-"
6057 "line argument to standard output.  The range of bytes to be printed is "
6058 "specified via offset and length values in the second and third command-line "
6059 "arguments.  The program creates a memory mapping of the required pages of "
6060 "the file and then uses B<write>(2)  to output the desired bytes."
6061 msgstr ""
6062 "以下のプログラムは、一番目のコマンドライン引き数で指定された ファイルの一部を"
6063 "標準出力に表示する。 表示する範囲は、二番目、三番目のコマンドライン引き数で渡"
6064 "される オフセットと長さで指定される。 このプログラムは、指定されたファイルの"
6065 "必要なページのメモリ・ マッピングを作成し、 B<write>(2)  を使って所望のバイト"
6066 "を出力する。"
6067
6068 #. type: Plain text
6069 #: build/C/man2/mmap.2:648
6070 #, no-wrap
6071 msgid ""
6072 "#include E<lt>sys/mman.hE<gt>\n"
6073 "#include E<lt>sys/stat.hE<gt>\n"
6074 "#include E<lt>fcntl.hE<gt>\n"
6075 "#include E<lt>stdio.hE<gt>\n"
6076 "#include E<lt>stdlib.hE<gt>\n"
6077 "#include E<lt>unistd.hE<gt>\n"
6078 msgstr ""
6079 "#include E<lt>sys/mman.hE<gt>\n"
6080 "#include E<lt>sys/stat.hE<gt>\n"
6081 "#include E<lt>fcntl.hE<gt>\n"
6082 "#include E<lt>stdio.hE<gt>\n"
6083 "#include E<lt>stdlib.hE<gt>\n"
6084 "#include E<lt>unistd.hE<gt>\n"
6085
6086 #. type: Plain text
6087 #: build/C/man2/mmap.2:651 build/C/man2/mprotect.2:178
6088 #, no-wrap
6089 msgid ""
6090 "#define handle_error(msg) \\e\n"
6091 "    do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
6092 msgstr ""
6093 "#define handle_error(msg) \\e\n"
6094 "    do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
6095
6096 #. type: Plain text
6097 #: build/C/man2/mmap.2:661
6098 #, no-wrap
6099 msgid ""
6100 "int\n"
6101 "main(int argc, char *argv[])\n"
6102 "{\n"
6103 "    char *addr;\n"
6104 "    int fd;\n"
6105 "    struct stat sb;\n"
6106 "    off_t offset, pa_offset;\n"
6107 "    size_t length;\n"
6108 "    ssize_t s;\n"
6109 msgstr ""
6110 "int\n"
6111 "main(int argc, char *argv[])\n"
6112 "{\n"
6113 "    char *addr;\n"
6114 "    int fd;\n"
6115 "    struct stat sb;\n"
6116 "    off_t offset, pa_offset;\n"
6117 "    size_t length;\n"
6118 "    ssize_t s;\n"
6119
6120 #. type: Plain text
6121 #: build/C/man2/mmap.2:666
6122 #, no-wrap
6123 msgid ""
6124 "    if (argc E<lt> 3 || argc E<gt> 4) {\n"
6125 "        fprintf(stderr, \"%s file offset [length]\\en\", argv[0]);\n"
6126 "        exit(EXIT_FAILURE);\n"
6127 "    }\n"
6128 msgstr ""
6129 "    if (argc E<lt> 3 || argc E<gt> 4) {\n"
6130 "        fprintf(stderr, \"%s file offset [length]\\en\", argv[0]);\n"
6131 "        exit(EXIT_FAILURE);\n"
6132 "    }\n"
6133
6134 #. type: Plain text
6135 #: build/C/man2/mmap.2:670
6136 #, no-wrap
6137 msgid ""
6138 "    fd = open(argv[1], O_RDONLY);\n"
6139 "    if (fd == -1)\n"
6140 "        handle_error(\"open\");\n"
6141 msgstr ""
6142 "    fd = open(argv[1], O_RDONLY);\n"
6143 "    if (fd == -1)\n"
6144 "        handle_error(\"open\");\n"
6145
6146 #. type: Plain text
6147 #: build/C/man2/mmap.2:673
6148 #, no-wrap
6149 msgid ""
6150 "    if (fstat(fd, &sb) == -1)           /* To obtain file size */\n"
6151 "        handle_error(\"fstat\");\n"
6152 msgstr ""
6153 "    if (fstat(fd, &sb) == -1)           /* To obtain file size */\n"
6154 "        handle_error(\"fstat\");\n"
6155
6156 #. type: Plain text
6157 #: build/C/man2/mmap.2:677
6158 #, no-wrap
6159 msgid ""
6160 "    offset = atoi(argv[2]);\n"
6161 "    pa_offset = offset & ~(sysconf(_SC_PAGE_SIZE) - 1);\n"
6162 "        /* offset for mmap() must be page aligned */\n"
6163 msgstr ""
6164 "    offset = atoi(argv[2]);\n"
6165 "    pa_offset = offset & ~(sysconf(_SC_PAGE_SIZE) - 1);\n"
6166 "        /* offset for mmap() must be page aligned */\n"
6167
6168 #. type: Plain text
6169 #: build/C/man2/mmap.2:682
6170 #, no-wrap
6171 msgid ""
6172 "    if (offset E<gt>= sb.st_size) {\n"
6173 "        fprintf(stderr, \"offset is past end of file\\en\");\n"
6174 "        exit(EXIT_FAILURE);\n"
6175 "    }\n"
6176 msgstr ""
6177 "    if (offset E<gt>= sb.st_size) {\n"
6178 "        fprintf(stderr, \"offset is past end of file\\en\");\n"
6179 "        exit(EXIT_FAILURE);\n"
6180 "    }\n"
6181
6182 #. type: Plain text
6183 #: build/C/man2/mmap.2:688
6184 #, no-wrap
6185 msgid ""
6186 "    if (argc == 4) {\n"
6187 "        length = atoi(argv[3]);\n"
6188 "        if (offset + length E<gt> sb.st_size)\n"
6189 "            length = sb.st_size - offset;\n"
6190 "                /* Can\\(aqt display bytes past end of file */\n"
6191 msgstr ""
6192 "    if (argc == 4) {\n"
6193 "        length = atoi(argv[3]);\n"
6194 "        if (offset + length E<gt> sb.st_size)\n"
6195 "            length = sb.st_size - offset;\n"
6196 "                /* Can\\(aqt display bytes past end of file */\n"
6197
6198 #. type: Plain text
6199 #: build/C/man2/mmap.2:692
6200 #, no-wrap
6201 msgid ""
6202 "    } else {    /* No length arg ==E<gt> display to end of file */\n"
6203 "        length = sb.st_size - offset;\n"
6204 "    }\n"
6205 msgstr ""
6206 "    } else {    /* No length arg ==E<gt> display to end of file */\n"
6207 "        length = sb.st_size - offset;\n"
6208 "    }\n"
6209
6210 #. type: Plain text
6211 #: build/C/man2/mmap.2:697
6212 #, no-wrap
6213 msgid ""
6214 "    addr = mmap(NULL, length + offset - pa_offset, PROT_READ,\n"
6215 "                MAP_PRIVATE, fd, pa_offset);\n"
6216 "    if (addr == MAP_FAILED)\n"
6217 "        handle_error(\"mmap\");\n"
6218 msgstr ""
6219 "    addr = mmap(NULL, length + offset - pa_offset, PROT_READ,\n"
6220 "                MAP_PRIVATE, fd, pa_offset);\n"
6221 "    if (addr == MAP_FAILED)\n"
6222 "        handle_error(\"mmap\");\n"
6223
6224 #. type: Plain text
6225 #: build/C/man2/mmap.2:702
6226 #, no-wrap
6227 msgid ""
6228 "    s = write(STDOUT_FILENO, addr + offset - pa_offset, length);\n"
6229 "    if (s != length) {\n"
6230 "        if (s == -1)\n"
6231 "            handle_error(\"write\");\n"
6232 msgstr ""
6233 "    s = write(STDOUT_FILENO, addr + offset - pa_offset, length);\n"
6234 "    if (s != length) {\n"
6235 "        if (s == -1)\n"
6236 "            handle_error(\"write\");\n"
6237
6238 #. type: Plain text
6239 #: build/C/man2/mmap.2:706
6240 #, no-wrap
6241 msgid ""
6242 "        fprintf(stderr, \"partial write\");\n"
6243 "        exit(EXIT_FAILURE);\n"
6244 "    }\n"
6245 msgstr ""
6246 "        fprintf(stderr, \"partial write\");\n"
6247 "        exit(EXIT_FAILURE);\n"
6248 "    }\n"
6249
6250 #. type: Plain text
6251 #: build/C/man2/mmap.2:723
6252 msgid ""
6253 "B<getpagesize>(2), B<mincore>(2), B<mlock>(2), B<mmap2>(2), B<mprotect>(2), "
6254 "B<mremap>(2), B<msync>(2), B<remap_file_pages>(2), B<setrlimit>(2), B<shmat>"
6255 "(2), B<shm_open>(3), B<shm_overview>(7)"
6256 msgstr ""
6257 "B<getpagesize>(2), B<mincore>(2), B<mlock>(2), B<mmap2>(2), B<mprotect>(2), "
6258 "B<mremap>(2), B<msync>(2), B<remap_file_pages>(2), B<setrlimit>(2), B<shmat>"
6259 "(2), B<shm_open>(3), B<shm_overview>(7)"
6260
6261 #. type: Plain text
6262 #: build/C/man2/mmap.2:730
6263 msgid ""
6264 "The descriptions of the following files in B<proc>(5): I</proc/[pid]/maps>, "
6265 "I</proc/[pid]/map_files>, and I</proc/[pid]/smaps>."
6266 msgstr ""
6267 "B<proc>(5) の I</proc/[pid]/maps>, I</proc/[pid]/map_files>, I</proc/[pid]/"
6268 "smaps> の説明。"
6269
6270 #. type: Plain text
6271 #: build/C/man2/mmap.2:735 build/C/man2/msync.2:151
6272 msgid "B.O. Gallmeister, POSIX.4, O'Reilly, pp. 128-129 and 389-391."
6273 msgstr "B.O. Gallmeister, POSIX.4, O'Reilly, pp. 128-129 and 389-391."
6274
6275 #. type: TH
6276 #: build/C/man2/mmap2.2:29
6277 #, no-wrap
6278 msgid "MMAP2"
6279 msgstr "MMAP2"
6280
6281 #. type: TH
6282 #: build/C/man2/mmap2.2:29
6283 #, no-wrap
6284 msgid "2014-02-25"
6285 msgstr "2014-02-25"
6286
6287 #. type: Plain text
6288 #: build/C/man2/mmap2.2:32
6289 msgid "mmap2 - map files or devices into memory"
6290 msgstr "mmap2 - ファイルやデバイスをメモリにマップする"
6291
6292 #. type: Plain text
6293 #: build/C/man2/mmap2.2:38
6294 #, no-wrap
6295 msgid ""
6296 "B<void *mmap2(void *>I<addr>B<, size_t >I<length>B<, int >I<prot>B<,>\n"
6297 "B<             int >I<flags>B<, int >I<fd>B<, off_t >I<pgoffset>B<);>\n"
6298 msgstr ""
6299 "B<void *mmap2(void *>I<addr>B<, size_t >I<length>B<, int >I<prot>B<,>\n"
6300 "B<            int >I<flags>B<, int >I<fd>B<, off_t >I<pgoffset>B<);>\n"
6301
6302 #. type: Plain text
6303 #: build/C/man2/mmap2.2:43
6304 msgid ""
6305 "This is probably not the system call that you are interested in; instead, "
6306 "see B<mmap>(2), which describes the glibc wrapper function that invokes this "
6307 "system call."
6308 msgstr ""
6309 "これはおそらくあなたが興味のあるシステムコールではないだろう。代わりに\n"
6310 "B<mmap>(2) を見るとよい。そのページにはこのシステムコールを起動する glibc "
6311 "の\n"
6312 "ラッパー関数についての説明がある。"
6313
6314 #. type: Plain text
6315 #: build/C/man2/mmap2.2:54
6316 msgid ""
6317 "The B<mmap2>()  system call provides the same interface as B<mmap>(2), "
6318 "except that the final argument specifies the offset into the file in 4096-"
6319 "byte units (instead of bytes, as is done by B<mmap>(2)).  This enables "
6320 "applications that use a 32-bit I<off_t> to map large files (up to 2^44 "
6321 "bytes)."
6322 msgstr ""
6323 "B<mmap2>() システムコールは B<mmap>(2) と同じインターフェースを提供する。た"
6324 "だ\n"
6325 "し、最後の引き数には、ファイルのオフセットを (B<mmap>(2) が行っている、バイ"
6326 "ト\n"
6327 "単位ではなく) 4096 バイトを単位として指定する。 これにより、32 ビットの\n"
6328 "I<off_t> を使うアプリケーションで (2^44 バイトまでの) 大きなファイルをマッ"
6329 "プ\n"
6330 "できるようになる。"
6331
6332 #. type: Plain text
6333 #: build/C/man2/mmap2.2:61
6334 msgid ""
6335 "On success, B<mmap2>()  returns a pointer to the mapped area.  On error, -1 "
6336 "is returned and I<errno> is set appropriately."
6337 msgstr ""
6338 "成功した場合、 B<mmap2>()  はマップされた領域へのポインタを返す。 エラーの場"
6339 "合は -1 が返されて、 I<errno> が適切に設定される。"
6340
6341 #. type: Plain text
6342 #: build/C/man2/mmap2.2:65
6343 msgid "Problem with getting the data from user space."
6344 msgstr "ユーザ空間からデータを取得するときに問題があった。"
6345
6346 #. type: Plain text
6347 #: build/C/man2/mmap2.2:70
6348 msgid ""
6349 "(Various platforms where the page size is not 4096 bytes.)  I<offset\\ *\\ "
6350 "4096> is not a multiple of the system page size."
6351 msgstr ""
6352 "(ページサイズが 4096 バイトでないプラットフォームにおいて)  I<offset\\ *\\ "
6353 "4096> がシステムのページサイズの倍数ではない。"
6354
6355 #. type: Plain text
6356 #: build/C/man2/mmap2.2:74
6357 msgid "B<mmap2>()  can also return any of the errors described in B<mmap>(2)."
6358 msgstr "B<mmap2>() は B<mmap>(2) に載っているエラーを返すこともある。"
6359
6360 #. type: Plain text
6361 #: build/C/man2/mmap2.2:77
6362 msgid "B<mmap2>()  is available since Linux 2.3.31."
6363 msgstr "B<mmap2>()  は、Linux 2.3.31 以降で使用可能である。"
6364
6365 #. type: Plain text
6366 #: build/C/man2/mmap2.2:79 build/C/man2/subpage_prot.2:98
6367 msgid "This system call is Linux-specific."
6368 msgstr "このシステムコールは Linux 独自である。"
6369
6370 #. type: Plain text
6371 #: build/C/man2/mmap2.2:86
6372 msgid ""
6373 "On architectures where this system call is present, the glibc B<mmap>()  "
6374 "wrapper function invokes this system call rather than the B<mmap>(2)  system "
6375 "call."
6376 msgstr ""
6377 "このシステムコールが存在するアーキテクチャーでは、glibc の B<mmap>()  のラッ"
6378 "パー関数は、 B<mmap>(2)  システムコールではなく、このシステムコール (B<mmap2>"
6379 "(2))  を起動する。"
6380
6381 #. type: Plain text
6382 #: build/C/man2/mmap2.2:88
6383 msgid "This system call does not exist on x86-64."
6384 msgstr "このシステムコールは x86-64 には存在しない。"
6385
6386 #.  ia64 can have page sizes ranging from 4kB to 64kB.
6387 #.  On cris, it looks like the unit might also be the page size,
6388 #.  which is 8192 bytes. -- mtk, June 2007
6389 #. type: Plain text
6390 #: build/C/man2/mmap2.2:95
6391 msgid ""
6392 "On ia64, the unit for I<offset> is actually the system page size, rather "
6393 "than 4096 bytes."
6394 msgstr ""
6395 "ia64 では、 I<offset> の単位は、実際にはシステムのページサイズであり、 4096 "
6396 "バイトではない。"
6397
6398 #. type: Plain text
6399 #: build/C/man2/mmap2.2:101
6400 msgid ""
6401 "B<getpagesize>(2), B<mmap>(2), B<mremap>(2), B<msync>(2), B<shm_open>(3)"
6402 msgstr ""
6403 "B<getpagesize>(2), B<mmap>(2), B<mremap>(2), B<msync>(2), B<shm_open>(3)"
6404
6405 #. type: TH
6406 #: build/C/man2/mprotect.2:38
6407 #, no-wrap
6408 msgid "MPROTECT"
6409 msgstr "MPROTECT"
6410
6411 #. type: TH
6412 #: build/C/man2/mprotect.2:38
6413 #, no-wrap
6414 msgid "2014-01-05"
6415 msgstr "2014-01-05"
6416
6417 #. type: Plain text
6418 #: build/C/man2/mprotect.2:41
6419 msgid "mprotect - set protection on a region of memory"
6420 msgstr "mprotect - メモリ領域の保護を設定する"
6421
6422 #. type: Plain text
6423 #: build/C/man2/mprotect.2:46
6424 #, no-wrap
6425 msgid "B<int mprotect(void *>I<addr>B<, size_t >I<len>B<, int >I<prot>B<);>\n"
6426 msgstr "B<int mprotect(void *>I<addr>B<, size_t >I<len>B<, int >I<prot>B<);>\n"
6427
6428 #. type: Plain text
6429 #: build/C/man2/mprotect.2:54
6430 msgid ""
6431 "B<mprotect>()  changes protection for the calling process's memory page(s)  "
6432 "containing any part of the address range in the interval [I<addr>,\\ I<addr>"
6433 "+I<len>-1].  I<addr> must be aligned to a page boundary."
6434 msgstr ""
6435 "B<mprotect>()  は、区間 [I<addr>,\\ I<addr>+I<len>-1] のアドレス範囲を含む 呼"
6436 "び出し元のプロセスのメモリページのアクセス保護を変更する。 I<addr> はページ境"
6437 "界に一致していなければならない。"
6438
6439 #. type: Plain text
6440 #: build/C/man2/mprotect.2:59
6441 msgid ""
6442 "If the calling process tries to access memory in a manner that violates the "
6443 "protection, then the kernel generates a B<SIGSEGV> signal for the process."
6444 msgstr ""
6445 "呼び出し元のプロセスがアクセス保護に違反するようなメモリアクセスを 行おうとす"
6446 "ると、カーネルはシグナル B<SIGSEGV> をそのプロセスに対して生成する。"
6447
6448 #. type: Plain text
6449 #: build/C/man2/mprotect.2:64
6450 msgid ""
6451 "I<prot> is either B<PROT_NONE> or a bitwise-or of the other values in the "
6452 "following list:"
6453 msgstr ""
6454 "I<prot> には、 B<PROT_NONE> か、以下のリストの B<PROT_NONE> 以外の値をビット"
6455 "毎の論理和 (bitwize-or) で指定する:"
6456
6457 #. type: Plain text
6458 #: build/C/man2/mprotect.2:67
6459 msgid "The memory cannot be accessed at all."
6460 msgstr "そのメモリには全くアクセスできない。"
6461
6462 #. type: Plain text
6463 #: build/C/man2/mprotect.2:70
6464 msgid "The memory can be read."
6465 msgstr "そのメモリを読み取ることができる。"
6466
6467 #. type: Plain text
6468 #: build/C/man2/mprotect.2:73
6469 msgid "The memory can be modified."
6470 msgstr "そのメモリを変更できる。"
6471
6472 #.  FIXME
6473 #.  Document PROT_GROWSUP and PROT_GROWSDOWN
6474 #. type: Plain text
6475 #: build/C/man2/mprotect.2:78
6476 msgid "The memory can be executed."
6477 msgstr "そのメモリは実行可能である。"
6478
6479 #. type: Plain text
6480 #: build/C/man2/mprotect.2:85
6481 msgid ""
6482 "On success, B<mprotect>()  returns zero.  On error, -1 is returned, and "
6483 "I<errno> is set appropriately."
6484 msgstr ""
6485 "成功した場合、 B<mprotect>()  は 0 を返す。エラーの場合は -1 が返り、 "
6486 "I<errno> が適切に設定される。"
6487
6488 #. type: Plain text
6489 #: build/C/man2/mprotect.2:95
6490 msgid ""
6491 "The memory cannot be given the specified access.  This can happen, for "
6492 "example, if you B<mmap>(2)  a file to which you have read-only access, then "
6493 "ask B<mprotect>()  to mark it B<PROT_WRITE>."
6494 msgstr ""
6495 "指定されたアクセスをメモリに設定することができない。 これは、例えば ファイル"
6496 "を読み取り専用で B<mmap>(2)  しており、その領域に対して B<mprotect>()  を呼び"
6497 "出して B<PROT_WRITE> に設定しようとした場合に発生する。"
6498
6499 #.  Or: both PROT_GROWSUP and PROT_GROWSDOWN were specified in 'prot'.
6500 #. type: Plain text
6501 #: build/C/man2/mprotect.2:100
6502 msgid ""
6503 "I<addr> is not a valid pointer, or not a multiple of the system page size."
6504 msgstr ""
6505 "I<addr> が有効なポインタでないか、 システムのページサイズの倍数でない。"
6506
6507 #. type: Plain text
6508 #: build/C/man2/mprotect.2:103
6509 msgid "Internal kernel structures could not be allocated."
6510 msgstr "カーネル内部の構造体を割り当てることができなかった。"
6511
6512 #. type: Plain text
6513 #: build/C/man2/mprotect.2:113
6514 msgid ""
6515 "Addresses in the range [I<addr>, I<addr>+I<len>-1] are invalid for the "
6516 "address space of the process, or specify one or more pages that are not "
6517 "mapped.  (Before kernel 2.4.19, the error B<EFAULT> was incorrectly produced "
6518 "for these cases.)"
6519 msgstr ""
6520 "[I<addr>, I<addr>+I<len>-1] という範囲のアドレスがプロセスのアドレス空間とし"
6521 "て不正であるか、 その範囲のアドレスがマップされていない 1 つ以上のページを指"
6522 "している (カーネル 2.4.19 より前では、この状況でエラー B<EFAULT> が間違って生"
6523 "成されていた)。"
6524
6525 #.  SVr4 defines an additional error
6526 #.  code EAGAIN. The SVr4 error conditions don't map neatly onto Linux's.
6527 #. type: Plain text
6528 #: build/C/man2/mprotect.2:122
6529 msgid ""
6530 "SVr4, POSIX.1-2001.  POSIX says that the behavior of B<mprotect>()  is "
6531 "unspecified if it is applied to a region of memory that was not obtained via "
6532 "B<mmap>(2)."
6533 msgstr ""
6534 "SVr4, POSIX.1-2001.  POSIX では、 B<mmap>(2)  経由で獲得していないメモリ領域"
6535 "に対して B<mprotect>()  を行った場合の B<mprotect>()  の動作は未定義であると"
6536 "されている。"
6537
6538 #. type: Plain text
6539 #: build/C/man2/mprotect.2:129
6540 msgid ""
6541 "On Linux it is always permissible to call B<mprotect>()  on any address in a "
6542 "process's address space (except for the kernel vsyscall area).  In "
6543 "particular it can be used to change existing code mappings to be writable."
6544 msgstr ""
6545 "Linux では、(カーネル vsyscall 領域以外の)  任意のプロセスアドレス空間に対し"
6546 "て B<mprotect>()  を呼び出すことが、常に許されている。 これは特に既存のコード"
6547 "マッピングを書き込み可能にするために使われる。"
6548
6549 #. type: Plain text
6550 #: build/C/man2/mprotect.2:139
6551 msgid ""
6552 "Whether B<PROT_EXEC> has any effect different from B<PROT_READ> is "
6553 "architecture- and kernel version-dependent.  On some hardware architectures "
6554 "(e.g., i386), B<PROT_WRITE> implies B<PROT_READ>."
6555 msgstr ""
6556 "B<PROT_EXEC> が B<PROT_READ> と異なる影響を持つか否かは、アーキテクチャとカー"
6557 "ネルのバージョンに依存する。 (i386 などの) いくつかのアーキテクチャでは、 "
6558 "B<PROT_WRITE> をセットすると、暗黙のうちに B<PROT_READ> がセットされる。"
6559
6560 #. type: Plain text
6561 #: build/C/man2/mprotect.2:148
6562 msgid ""
6563 "POSIX.1-2001 says that an implementation may permit access other than that "
6564 "specified in I<prot>, but at a minimum can allow write access only if "
6565 "B<PROT_WRITE> has been set, and must not allow any access if B<PROT_NONE> "
6566 "has been set."
6567 msgstr ""
6568 "POSIX.1-2001 では、 I<prot> で指定されていないアクセスを許可する実装を認めて"
6569 "いる。 ただし、最低限、 B<PROT_WRITE> がセットされている場合にのみ書き込みア"
6570 "クセスが許可され、 B<PROT_NONE> がセットされている場合にはアクセスは許可され"
6571 "ない点だけは 満たす必要がある。"
6572
6573 #. type: Plain text
6574 #: build/C/man2/mprotect.2:154
6575 msgid ""
6576 "The program below allocates four pages of memory, makes the third of these "
6577 "pages read-only, and then executes a loop that walks upward through the "
6578 "allocated region modifying bytes."
6579 msgstr ""
6580 "以下のプログラムは、メモリページを 4つ確保し、そのうち 3番目のページを 読み込"
6581 "み専用に設定する。その後で、確保した領域のアドレスの小さい方から 大きな方に向"
6582 "かって順番にバイト値を変更するループを実行する。"
6583
6584 #. type: Plain text
6585 #: build/C/man2/mprotect.2:157
6586 msgid ""
6587 "An example of what we might see when running the program is the following:"
6588 msgstr "プログラムを実行した場合の一例を以下に示す。"
6589
6590 #. type: Plain text
6591 #: build/C/man2/mprotect.2:163
6592 #, no-wrap
6593 msgid ""
6594 "$B< ./a.out>\n"
6595 "Start of region:        0x804c000\n"
6596 "Got SIGSEGV at address: 0x804e000\n"
6597 msgstr ""
6598 "$B< ./a.out>\n"
6599 "Start of region:        0x804c000\n"
6600 "Got SIGSEGV at address: 0x804e000\n"
6601
6602 #. type: Plain text
6603 #: build/C/man2/mprotect.2:175
6604 #, no-wrap
6605 msgid ""
6606 "#include E<lt>unistd.hE<gt>\n"
6607 "#include E<lt>signal.hE<gt>\n"
6608 "#include E<lt>stdio.hE<gt>\n"
6609 "#include E<lt>malloc.hE<gt>\n"
6610 "#include E<lt>stdlib.hE<gt>\n"
6611 "#include E<lt>errno.hE<gt>\n"
6612 "#include E<lt>sys/mman.hE<gt>\n"
6613 msgstr ""
6614 "#include E<lt>unistd.hE<gt>\n"
6615 "#include E<lt>signal.hE<gt>\n"
6616 "#include E<lt>stdio.hE<gt>\n"
6617 "#include E<lt>malloc.hE<gt>\n"
6618 "#include E<lt>stdlib.hE<gt>\n"
6619 "#include E<lt>errno.hE<gt>\n"
6620 "#include E<lt>sys/mman.hE<gt>\n"
6621
6622 #. type: Plain text
6623 #: build/C/man2/mprotect.2:180
6624 #, no-wrap
6625 msgid "static char *buffer;\n"
6626 msgstr "static char *buffer;\n"
6627
6628 #. type: Plain text
6629 #: build/C/man2/mprotect.2:188
6630 #, no-wrap
6631 msgid ""
6632 "static void\n"
6633 "handler(int sig, siginfo_t *si, void *unused)\n"
6634 "{\n"
6635 "    printf(\"Got SIGSEGV at address: 0x%lx\\en\",\n"
6636 "            (long) si-E<gt>si_addr);\n"
6637 "    exit(EXIT_FAILURE);\n"
6638 "}\n"
6639 msgstr ""
6640 "static void\n"
6641 "handler(int sig, siginfo_t *si, void *unused)\n"
6642 "{\n"
6643 "    printf(\"Got SIGSEGV at address: 0x%lx\\en\",\n"
6644 "            (long) si-E<gt>si_addr);\n"
6645 "    exit(EXIT_FAILURE);\n"
6646 "}\n"
6647
6648 #. type: Plain text
6649 #: build/C/man2/mprotect.2:195
6650 #, no-wrap
6651 msgid ""
6652 "int\n"
6653 "main(int argc, char *argv[])\n"
6654 "{\n"
6655 "    char *p;\n"
6656 "    int pagesize;\n"
6657 "    struct sigaction sa;\n"
6658 msgstr ""
6659 "int\n"
6660 "main(void)\n"
6661 "{\n"
6662 "    char *p;\n"
6663 "    int pagesize;\n"
6664 "    struct sigaction sa;\n"
6665
6666 #. type: Plain text
6667 #: build/C/man2/mprotect.2:201
6668 #, no-wrap
6669 msgid ""
6670 "    sa.sa_flags = SA_SIGINFO;\n"
6671 "    sigemptyset(&sa.sa_mask);\n"
6672 "    sa.sa_sigaction = handler;\n"
6673 "    if (sigaction(SIGSEGV, &sa, NULL) == -1)\n"
6674 "        handle_error(\"sigaction\");\n"
6675 msgstr ""
6676 "    sa.sa_flags = SA_SIGINFO;\n"
6677 "    sigemptyset(&sa.sa_mask);\n"
6678 "    sa.sa_sigaction = handler;\n"
6679 "    if (sigaction(SIGSEGV, &sa, NULL) == -1)\n"
6680 "        handle_error(\"sigaction\");\n"
6681
6682 #. type: Plain text
6683 #: build/C/man2/mprotect.2:205
6684 #, no-wrap
6685 msgid ""
6686 "    pagesize = sysconf(_SC_PAGE_SIZE);\n"
6687 "    if (pagesize == -1)\n"
6688 "        handle_error(\"sysconf\");\n"
6689 msgstr ""
6690 "    pagesize = sysconf(_SC_PAGE_SIZE);\n"
6691 "    if (pagesize == -1)\n"
6692 "        handle_error(\"sysconf\");\n"
6693
6694 #. type: Plain text
6695 #: build/C/man2/mprotect.2:208
6696 #, no-wrap
6697 msgid ""
6698 "    /* Allocate a buffer aligned on a page boundary;\n"
6699 "       initial protection is PROT_READ | PROT_WRITE */\n"
6700 msgstr ""
6701 "    /* Allocate a buffer aligned on a page boundary;\n"
6702 "       initial protection is PROT_READ | PROT_WRITE */\n"
6703
6704 #. type: Plain text
6705 #: build/C/man2/mprotect.2:212
6706 #, no-wrap
6707 msgid ""
6708 "    buffer = memalign(pagesize, 4 * pagesize);\n"
6709 "    if (buffer == NULL)\n"
6710 "        handle_error(\"memalign\");\n"
6711 msgstr ""
6712 "    buffer = memalign(pagesize, 4 * pagesize);\n"
6713 "    if (buffer == NULL)\n"
6714 "        handle_error(\"memalign\");\n"
6715
6716 #. type: Plain text
6717 #: build/C/man2/mprotect.2:214
6718 #, no-wrap
6719 msgid "    printf(\"Start of region:        0x%lx\\en\", (long) buffer);\n"
6720 msgstr "    printf(\"Start of region:        0x%lx\\en\", (long) buffer);\n"
6721
6722 #. type: Plain text
6723 #: build/C/man2/mprotect.2:218
6724 #, no-wrap
6725 msgid ""
6726 "    if (mprotect(buffer + pagesize * 2, pagesize,\n"
6727 "                PROT_READ) == -1)\n"
6728 "        handle_error(\"mprotect\");\n"
6729 msgstr ""
6730 "    if (mprotect(buffer + pagesize * 2, pagesize,\n"
6731 "                PROT_READ) == -1)\n"
6732 "        handle_error(\"mprotect\");\n"
6733
6734 #. type: Plain text
6735 #: build/C/man2/mprotect.2:221
6736 #, no-wrap
6737 msgid ""
6738 "    for (p = buffer ; ; )\n"
6739 "        *(p++) = \\(aqa\\(aq;\n"
6740 msgstr ""
6741 "    for (p = buffer ; ; )\n"
6742 "        *(p++) = \\(aqa\\(aq;\n"
6743
6744 #. type: Plain text
6745 #: build/C/man2/mprotect.2:225
6746 #, no-wrap
6747 msgid ""
6748 "    printf(\"Loop completed\\en\");     /* Should never happen */\n"
6749 "    exit(EXIT_SUCCESS);\n"
6750 "}\n"
6751 msgstr ""
6752 "    printf(\"Loop completed\\en\");     /* Should never happen */\n"
6753 "    exit(EXIT_SUCCESS);\n"
6754 "}\n"
6755
6756 #. type: Plain text
6757 #: build/C/man2/mprotect.2:229
6758 msgid "B<mmap>(2), B<sysconf>(3)"
6759 msgstr "B<mmap>(2), B<sysconf>(3)"
6760
6761 #. type: TH
6762 #: build/C/man2/mremap.2:30
6763 #, no-wrap
6764 msgid "MREMAP"
6765 msgstr "MREMAP"
6766
6767 #. type: TH
6768 #: build/C/man2/mremap.2:30
6769 #, no-wrap
6770 msgid "2010-06-10"
6771 msgstr "2010-06-10"
6772
6773 #. type: Plain text
6774 #: build/C/man2/mremap.2:33
6775 msgid "mremap - remap a virtual memory address"
6776 msgstr "mremap - 仮想メモリ・アドレスを再マッピングする"
6777
6778 #. type: Plain text
6779 #: build/C/man2/mremap.2:36
6780 #, no-wrap
6781 msgid "B<#define _GNU_SOURCE>         /* See feature_test_macros(7) */\n"
6782 msgstr "B<#define _GNU_SOURCE>         /* feature_test_macros(7) 参照 */\n"
6783
6784 #. type: Plain text
6785 #: build/C/man2/mremap.2:41
6786 #, no-wrap
6787 msgid ""
6788 "B<void *mremap(void *>I<old_address>B<, size_t >I<old_size>B<,>\n"
6789 "B<             size_t >I<new_size>B<, int >I<flags>B<, ... /* void *>I<new_address>B< */);>\n"
6790 msgstr ""
6791 "B<void *mremap(void *>I<old_address>B<, size_t >I<old_size>B<,>\n"
6792 "B<             size_t >I<new_size>B<, int >I<flags>B<, ... /* void *>I<new_address>B< */);>\n"
6793
6794 #. type: Plain text
6795 #: build/C/man2/mremap.2:47
6796 msgid ""
6797 "B<mremap>()  expands (or shrinks) an existing memory mapping, potentially "
6798 "moving it at the same time (controlled by the I<flags> argument and the "
6799 "available virtual address space)."
6800 msgstr ""
6801 "B<mremap>()  は既存のメモリ・マッピングの拡張 (または縮小) を行う。 同時に移"
6802 "動されることもある (I<flags> 引き数と利用可能な仮想アドレス空間によって決ま"
6803 "る)。"
6804
6805 #. type: Plain text
6806 #: build/C/man2/mremap.2:61
6807 msgid ""
6808 "I<old_address> is the old address of the virtual memory block that you want "
6809 "to expand (or shrink).  Note that I<old_address> has to be page aligned.  "
6810 "I<old_size> is the old size of the virtual memory block.  I<new_size> is the "
6811 "requested size of the virtual memory block after the resize.  An optional "
6812 "fifth argument, I<new_address>, may be provided; see the description of "
6813 "B<MREMAP_FIXED> below."
6814 msgstr ""
6815 "I<old_address> は拡張 (または縮小) しようとする仮想メモリ・ブロック の元のア"
6816 "ドレスである。I<old_address> はページ境界に合っていなければ ならない点に注意"
6817 "すること。I<old_size> は元の仮想メモリ・ブロックの サイズである。 "
6818 "I<new_size> は要求する変更後の仮想メモリ・ブロックのサイズである。 5 番目の引"
6819 "き数として I<new_address> を指定することができる。下記の B<MREMAP_FIXED> の説"
6820 "明を参照のこと。"
6821
6822 #. type: Plain text
6823 #: build/C/man2/mremap.2:73
6824 msgid ""
6825 "In Linux the memory is divided into pages.  A user process has (one or)  "
6826 "several linear virtual memory segments.  Each virtual memory segment has one "
6827 "or more mappings to real memory pages (in the page table).  Each virtual "
6828 "memory segment has its own protection (access rights), which may cause a "
6829 "segmentation violation if the memory is accessed incorrectly (e.g., writing "
6830 "to a read-only segment).  Accessing virtual memory outside of the segments "
6831 "will also cause a segmentation violation."
6832 msgstr ""
6833 "Linux ではメモリはページに分割される。ユーザー・プロセスは (一つまたは)  複数"
6834 "のリニアな仮想メモリセグメントを持つ。 それぞれの仮想メモリセグメントは一つ以"
6835 "上の実メモリ・ページ にマッピングされている (マッピング情報はページ・テーブル"
6836 "で管理される)。 仮想メモリセグメントにはセグメント毎の保護 (アクセス権) が設"
6837 "定されており、 メモリが不正にアクセスされた場合 (例えば読み込み専用のセグメン"
6838 "トに 書き込んだ場合)、セグメンテーション侵害 (segmentation violation) を 引き"
6839 "起こす。また、セグメント外の仮想メモリにアクセスした場合にも セグメンテーショ"
6840 "ン侵害が発生する。"
6841
6842 #. type: Plain text
6843 #: build/C/man2/mremap.2:81
6844 msgid ""
6845 "B<mremap>()  uses the Linux page table scheme.  B<mremap>()  changes the "
6846 "mapping between virtual addresses and memory pages.  This can be used to "
6847 "implement a very efficient B<realloc>(3)."
6848 msgstr ""
6849 "B<mremap>()  は Linux のページ・テーブル方式を使用する。 B<mremap>()  は仮想"
6850 "アドレスとメモリ・ページのマッピングを変更する。これは非常に効率的な "
6851 "B<realloc>(3)  を実装するのに使用されている。"
6852
6853 #. type: Plain text
6854 #: build/C/man2/mremap.2:83
6855 msgid "The I<flags> bit-mask argument may be 0, or include the following flag:"
6856 msgstr "I<flags> ビットマスク引数は 0 または以下のフラグを含む:"
6857
6858 #. type: TP
6859 #: build/C/man2/mremap.2:83
6860 #, no-wrap
6861 msgid "B<MREMAP_MAYMOVE>"
6862 msgstr "B<MREMAP_MAYMOVE>"
6863
6864 #. type: Plain text
6865 #: build/C/man2/mremap.2:95
6866 msgid ""
6867 "By default, if there is not sufficient space to expand a mapping at its "
6868 "current location, then B<mremap>()  fails.  If this flag is specified, then "
6869 "the kernel is permitted to relocate the mapping to a new virtual address, if "
6870 "necessary.  If the mapping is relocated, then absolute pointers into the old "
6871 "mapping location become invalid (offsets relative to the starting address of "
6872 "the mapping should be employed)."
6873 msgstr ""
6874 "デフォルトでは、現在の位置にマッピングを拡張するための 十分な空きがなければ "
6875 "B<mremap>()  は失敗する。 このフラグが指定されると、カーネルは必要があれば"
6876 "マッピングを 新しい仮想アドレスに再配置することができる マッピングが再配置さ"
6877 "れると、古いマッピング位置への絶対ポインタは 無効になる (マッピングの開始アド"
6878 "レスからの相対オフセットは有効のままである)。"
6879
6880 #. type: TP
6881 #: build/C/man2/mremap.2:95
6882 #, no-wrap
6883 msgid "B<MREMAP_FIXED> (since Linux 2.3.31)"
6884 msgstr "B<MREMAP_FIXED> (Linux 2.3.31 以降)"
6885
6886 #. type: Plain text
6887 #: build/C/man2/mremap.2:117
6888 msgid ""
6889 "This flag serves a similar purpose to the B<MAP_FIXED> flag of B<mmap>(2).  "
6890 "If this flag is specified, then B<mremap>()  accepts a fifth argument, I<void"
6891 "\\ *new_address>, which specifies a page-aligned address to which the "
6892 "mapping must be moved.  Any previous mapping at the address range specified "
6893 "by I<new_address> and I<new_size> is unmapped.  If B<MREMAP_FIXED> is "
6894 "specified, then B<MREMAP_MAYMOVE> must also be specified."
6895 msgstr ""
6896 "このフラグは B<mmap>(2)  の B<MAP_FIXED> フラグと似たような目的で用いられ"
6897 "る。 このフラグが指定されると、 B<mremap>()  は 5 番目の引き数 I<void\\ "
6898 "*new_address> を受け取り、この引数はマッピングが移動されるべきアドレスを指定"
6899 "する。 このアドレスはページ境界に合っていなければならない。 I<new_address> "
6900 "と I<new_size> で指定されるアドレス範囲に過去のマッピングがあった場合、 その"
6901 "マッピングはアンマップされる (unmapped)。 B<MREMAP_FIXED> を指定した場合は、 "
6902 "B<MREMAP_MAYMOVE> も指定しなければならない。"
6903
6904 #. type: Plain text
6905 #: build/C/man2/mremap.2:127
6906 msgid ""
6907 "If the memory segment specified by I<old_address> and I<old_size> is locked "
6908 "(using B<mlock>(2)  or similar), then this lock is maintained when the "
6909 "segment is resized and/or relocated.  As a consequence, the amount of memory "
6910 "locked by the process may change."
6911 msgstr ""
6912 "I<old_address> と I<old_size> で指定されるメモリセグメントが (B<mlock>(2)  や"
6913 "同様のもので) ロックされている場合、セグメントのサイズが変わったり 再配置され"
6914 "たりした時にロックも維持される。 その結果、プロセスによってロックされるメモリ"
6915 "の量は変化する。"
6916
6917 #. type: Plain text
6918 #: build/C/man2/mremap.2:135
6919 msgid ""
6920 "On success B<mremap>()  returns a pointer to the new virtual memory area.  "
6921 "On error, the value B<MAP_FAILED> (that is, I<(void\\ *)\\ -1>) is returned, "
6922 "and I<errno> is set appropriately."
6923 msgstr ""
6924 "成功した場合は B<mremap>()  は新しい仮想メモリ領域へのポインタを返す。 エラー"
6925 "の場合は B<MAP_FAILED> (すなわち I<(void\\ *)\\ -1>) が返され、 I<errno> が適"
6926 "切に設定される。"
6927
6928 #. type: Plain text
6929 #: build/C/man2/mremap.2:142
6930 msgid ""
6931 "The caller tried to expand a memory segment that is locked, but this was not "
6932 "possible without exceeding the B<RLIMIT_MEMLOCK> resource limit."
6933 msgstr ""
6934 "呼び出し元がロックされているメモリセグメントを拡張しようとしたが、 "
6935 "B<RLIMIT_MEMLOCK> リソース制限を越えずにこれを行うことができない。"
6936
6937 #. type: Plain text
6938 #: build/C/man2/mremap.2:151
6939 msgid ""
6940 "\"Segmentation fault.\" Some address in the range I<old_address> to "
6941 "I<old_address>+I<old_size> is an invalid virtual memory address for this "
6942 "process.  You can also get B<EFAULT> even if there exist mappings that cover "
6943 "the whole address space requested, but those mappings are of different types."
6944 msgstr ""
6945 "「セグメンテーション違反(segmentation fault)」 I<old_address> から "
6946 "I<old_address>+I<old_size> の 範囲のアドレスのどれかがこのプロセスにおいて不"
6947 "正な仮想メモリ・アドレスである。 たとえ要求したアドレス空間全体を含むような"
6948 "マッピングがあったとしても、 それらのマッピングが異なった型ならば B<EFAULT> "
6949 "を受け取るだろう。"
6950
6951 #. type: Plain text
6952 #: build/C/man2/mremap.2:179
6953 msgid ""
6954 "An invalid argument was given.  Possible causes are: I<old_address> was not "
6955 "page aligned; a value other than B<MREMAP_MAYMOVE> or B<MREMAP_FIXED> was "
6956 "specified in I<flags>; I<new_size> was zero; I<new_size> or I<new_address> "
6957 "was invalid; or the new address range specified by I<new_address> and "
6958 "I<new_size> overlapped the old address range specified by I<old_address> and "
6959 "I<old_size>; or B<MREMAP_FIXED> was specified without also specifying "
6960 "B<MREMAP_MAYMOVE>."
6961 msgstr ""
6962 "不正な引き数が与えられた。 可能性のある原因は以下の通りである: たいていは "
6963 "I<old_address> がページ境界に 合ってない; I<flags> に B<MREMAP_MAYMOVE> また"
6964 "は B<MREMAP_FIXED> 以外の値が指定されている; I<new_size> がゼロ; I<new_size> "
6965 "または I<new_address> の値が不正; I<new_address> と I<new_size> で指定される"
6966 "新しいアドレス範囲が I<old_address> と I<old_size> で指定される古いアドレス範"
6967 "囲と重なっている; B<MREMAP_FIXED> が指定されているが B<MREMAP_MAYMOVE> が指定"
6968 "されていない。"
6969
6970 #. type: Plain text
6971 #: build/C/man2/mremap.2:185
6972 msgid ""
6973 "The memory area cannot be expanded at the current virtual address, and the "
6974 "B<MREMAP_MAYMOVE> flag is not set in I<flags>.  Or, there is not enough "
6975 "(virtual) memory available."
6976 msgstr ""
6977 "現在の仮想アドレスではメモリ領域が拡張できず、 B<MREMAP_MAYMOVE> フラグが "
6978 "I<flags> に設定されていない。 または十分な (仮想) メモリが存在しない。"
6979
6980 #.  4.2BSD had a (never actually implemented)
6981 #.  .BR mremap (2)
6982 #.  call with completely different semantics.
6983 #. type: Plain text
6984 #: build/C/man2/mremap.2:191
6985 msgid ""
6986 "This call is Linux-specific, and should not be used in programs intended to "
6987 "be portable."
6988 msgstr ""
6989 "このコールは Linux 特有であり、移植を意図したプログラムで 使用すべきではな"
6990 "い。"
6991
6992 #. type: Plain text
6993 #: build/C/man2/mremap.2:199
6994 msgid ""
6995 "Prior to version 2.4, glibc did not expose the definition of "
6996 "B<MREMAP_FIXED>, and the prototype for B<mremap>()  did not allow for the "
6997 "I<new_address> argument."
6998 msgstr ""
6999 "バージョン 2.4 より前の glibc では、 B<MREMAP_FIXED> の定義は公開されておら"
7000 "ず、 B<mremap>()  のプロトタイプは I<new_address> 引き数を取らなかった。"
7001
7002 #. type: Plain text
7003 #: build/C/man2/mremap.2:208
7004 msgid ""
7005 "B<brk>(2), B<getpagesize>(2), B<getrlimit>(2), B<mlock>(2), B<mmap>(2), "
7006 "B<sbrk>(2), B<malloc>(3), B<realloc>(3)"
7007 msgstr ""
7008 "B<brk>(2), B<getpagesize>(2), B<getrlimit>(2), B<mlock>(2), B<mmap>(2), "
7009 "B<sbrk>(2), B<realloc>(3), B<malloc>(3)"
7010
7011 #. type: Plain text
7012 #: build/C/man2/mremap.2:214
7013 msgid ""
7014 "Your favorite text book on operating systems for more information on paged "
7015 "memory (e.g., I<Modern Operating Systems> by Andrew S. Tanenbaum, I<Inside "
7016 "Linux> by Randolf Bentson, I<The Design of the UNIX Operating System> by "
7017 "Maurice J. Bach)"
7018 msgstr ""
7019 "ページ分割されたメモリについてもっと詳しく知りたいならば、あなたのお気に入り"
7020 "のオペレーティングシステムの教科書を参照してほしい (例えば、 I<Modern "
7021 "Operating Systems> by Andrew S. Tanenbaum, I<Inside Linux> by Randolf "
7022 "Bentson, I<The Design of the UNIX Operating System> by Maurice J. Bach.)"
7023
7024 #. type: TH
7025 #: build/C/man2/msync.2:25
7026 #, no-wrap
7027 msgid "MSYNC"
7028 msgstr "MSYNC"
7029
7030 #. type: Plain text
7031 #: build/C/man2/msync.2:28
7032 msgid "msync - synchronize a file with a memory map"
7033 msgstr "msync - ファイルをマップしたメモリと同期させる"
7034
7035 #. type: Plain text
7036 #: build/C/man2/msync.2:32
7037 msgid "B<int msync(void *>I<addr>B<, size_t >I<length>B<, int >I<flags>B<);>"
7038 msgstr "B<int msync(void *>I<addr>B<, size_t >I<length>B<, int >I<flags>B<);>"
7039
7040 #. type: Plain text
7041 #: build/C/man2/msync.2:48
7042 msgid ""
7043 "B<msync>()  flushes changes made to the in-core copy of a file that was "
7044 "mapped into memory using B<mmap>(2)  back to disk.  Without use of this call "
7045 "there is no guarantee that changes are written back before B<munmap>(2)  is "
7046 "called.  To be more precise, the part of the file that corresponds to the "
7047 "memory area starting at I<addr> and having length I<length> is updated."
7048 msgstr ""
7049 "B<msync>()  は B<mmap>(2)  を使ってメモリにマップされたファイルの、 メモリ上"
7050 "のコピーになされた変更をディスクに反映させる。 この関数を使用しないと、 "
7051 "B<munmap>(2)  が呼び出されるまで変更が書き戻される保証はない。 より正確には、"
7052 "ファイルのうち I<addr> から始まり長さ I<length> のメモリ領域に対応する部分が"
7053 "更新される。"
7054
7055 #. type: Plain text
7056 #: build/C/man2/msync.2:68
7057 msgid ""
7058 "The I<flags> argument may have the bits B<MS_ASYNC>, B<MS_SYNC>, and "
7059 "B<MS_INVALIDATE> set, but not both B<MS_ASYNC> and B<MS_SYNC>.  B<MS_ASYNC> "
7060 "specifies that an update be scheduled, but the call returns immediately.  "
7061 "B<MS_SYNC> asks for an update and waits for it to complete.  "
7062 "B<MS_INVALIDATE> asks to invalidate other mappings of the same file (so that "
7063 "they can be updated with the fresh values just written)."
7064 msgstr ""
7065 "I<flags> 引数にはビット B<MS_ASYNC>, B<MS_SYNC>, B<MS_INVALIDATE> を設定する"
7066 "ことができるが、 B<MS_ASYNC> と B<MS_SYNC> を同時に指定することはできない。 "
7067 "B<MS_ASYNC> は更新を予定に組み込むことを表し、呼び出しは直ちに返る。 "
7068 "B<MS_SYNC> は更新を要求し、更新が完了するまで待つ。 B<MS_INVALIDATE> は(たっ"
7069 "た今書き込んだ新しい値でマッピングを更新することができるように)  同じファイル"
7070 "に対する他のマッピングを無効にすることを要求する。"
7071
7072 #. type: Plain text
7073 #: build/C/man2/msync.2:73
7074 msgid ""
7075 "On success, zero is returned.  On error, -1 is returned, and I<errno> is set "
7076 "appropriately."
7077 msgstr ""
7078 "成功した場合、 0 が返る。エラーの場合、 -1 が返り、 I<errno> が適切に設定され"
7079 "る。"
7080
7081 #. type: TP
7082 #: build/C/man2/msync.2:74
7083 #, no-wrap
7084 msgid "B<EBUSY>"
7085 msgstr "B<EBUSY>"
7086
7087 #. type: Plain text
7088 #: build/C/man2/msync.2:80
7089 msgid ""
7090 "B<MS_INVALIDATE> was specified in I<flags>, and a memory lock exists for the "
7091 "specified address range."
7092 msgstr ""
7093 "I flags に B<MS_INVALIDATE> が指定されたが、指定されたアドレス範囲にロックが"
7094 "存在する。"
7095
7096 #. type: Plain text
7097 #: build/C/man2/msync.2:93
7098 msgid ""
7099 "I<addr> is not a multiple of PAGESIZE; or any bit other than B<MS_ASYNC> | "
7100 "B<MS_INVALIDATE> | B<MS_SYNC> is set in I<flags>; or both B<MS_SYNC> and "
7101 "B<MS_ASYNC> are set in I<flags>."
7102 msgstr ""
7103 "I<addr> が PAGESIZE の倍数でない。または、 I<flags> に B<MS_ASYNC>、"
7104 "B<MS_INVALIDATE>、B<MS_SYNC> 以外のビットが設定された。 または、 I<flags> に "
7105 "B<MS_SYNC> と B<MS_ASYNC> の両方が設定された。"
7106
7107 #. type: Plain text
7108 #: build/C/man2/msync.2:96
7109 msgid "The indicated memory (or part of it) was not mapped."
7110 msgstr "指定されたメモリ (またはその一部) がマップされていない。"
7111
7112 #. type: Plain text
7113 #: build/C/man2/msync.2:98 build/C/man3/posix_fallocate.3:105
7114 #: build/C/man3/shm_open.3:253 build/C/man7/shm_overview.7:103
7115 msgid "POSIX.1-2001."
7116 msgstr "POSIX.1-2001."
7117
7118 #. type: Plain text
7119 #: build/C/man2/msync.2:105
7120 msgid ""
7121 "This call was introduced in Linux 1.3.21, and then used B<EFAULT> instead of "
7122 "B<ENOMEM>.  In Linux 2.4.19 this was changed to the POSIX value B<ENOMEM>."
7123 msgstr ""
7124 "この関数は Linux 1.3.21 で導入されたが、 B<ENOMEM> ではなく B<EFAULT> が使わ"
7125 "れていた。 これは Linux 2.4.19 で POSIX における値 B<ENOMEM> に変更された。"
7126
7127 #.  POSIX.1-2001: It shall be defined to -1 or 0 or 200112L.
7128 #.  -1: unavailable, 0: ask using sysconf().
7129 #.  glibc defines them to 1.
7130 #. type: Plain text
7131 #: build/C/man2/msync.2:120
7132 msgid ""
7133 "On POSIX systems on which B<msync>()  is available, both "
7134 "B<_POSIX_MAPPED_FILES> and B<_POSIX_SYNCHRONIZED_IO> are defined in "
7135 "I<E<lt>unistd.hE<gt>> to a value greater than 0.  (See also B<sysconf>(3).)"
7136 msgstr ""
7137 "B<msync>()  が使用可能な POSIX システムでは B<_POSIX_MAPPED_FILES> と "
7138 "B<_POSIX_SYNCHRONIZED_IO> の両方が I<E<lt>unistd.hE<gt>> で 0 より大きい値に"
7139 "定義される。 (B<sysconf>(3)  を参照すること。 )"
7140
7141 #.  commit 204ec841fbea3e5138168edbc3a76d46747cc987
7142 #. type: Plain text
7143 #: build/C/man2/msync.2:147
7144 msgid ""
7145 "According to POSIX, either B<MS_SYNC> or B<MS_ASYNC> must be specified in "
7146 "I<flags>, and indeed failure to include one of these flags will cause "
7147 "B<msync>()  to fail on some systems.  However, Linux permits a call to "
7148 "B<msync>()  that specifies neither of these flags, with semantics that are "
7149 "(currently) equivalent to specifying B<MS_ASYNC>.  (Since Linux 2.6.19, "
7150 "B<MS_ASYNC> is in fact a no-op, since the kernel properly tracks dirty pages "
7151 "and flushes them to storage as necessary.)  Notwithstanding the Linux "
7152 "behavior, portable, future-proof applications should ensure that they "
7153 "specify either B<MS_SYNC> or B<MS_ASYNC> in I<flags>."
7154 msgstr ""
7155
7156 #. type: TP
7157 #: build/C/man2/msync.2:149 build/C/man7/shm_overview.7:46
7158 #, no-wrap
7159 msgid "B<mmap>(2)"
7160 msgstr "B<mmap>(2)"
7161
7162 #. type: TH
7163 #: build/C/man3/mtrace.3:25
7164 #, no-wrap
7165 msgid "MTRACE"
7166 msgstr "MTRACE"
7167
7168 #. type: TH
7169 #: build/C/man3/mtrace.3:25
7170 #, no-wrap
7171 msgid "2012-04-18"
7172 msgstr "2012-04-18"
7173
7174 #. type: Plain text
7175 #: build/C/man3/mtrace.3:28
7176 msgid "mtrace, muntrace - malloc tracing"
7177 msgstr "mtrace, muntrace - malloc のトレース"
7178
7179 #. type: Plain text
7180 #: build/C/man3/mtrace.3:30
7181 msgid "B<#include E<lt>mcheck.hE<gt>>"
7182 msgstr "B<#include E<lt>mcheck.hE<gt>>"
7183
7184 #. type: Plain text
7185 #: build/C/man3/mtrace.3:32
7186 msgid "B<void mtrace(void);>"
7187 msgstr "B<void mtrace(void);>"
7188
7189 #. type: Plain text
7190 #: build/C/man3/mtrace.3:34
7191 msgid "B<void muntrace(void);>"
7192 msgstr "B<void muntrace(void);>"
7193
7194 #. type: Plain text
7195 #: build/C/man3/mtrace.3:46
7196 msgid ""
7197 "The B<mtrace>()  function installs hook functions for the memory-allocation "
7198 "functions (B<malloc>(3), B<realloc>(3)  B<memalign>(3), B<free>(3)).  These "
7199 "hook functions record tracing information about memory allocation and "
7200 "deallocation.  The tracing information can be used to discover memory leaks "
7201 "and attempts to free nonallocated memory in a program."
7202 msgstr ""
7203
7204 #. type: Plain text
7205 #: build/C/man3/mtrace.3:57
7206 msgid ""
7207 "The B<muntrace>()  function disables the hook functions installed by "
7208 "B<mtrace>(), so that tracing information is no longer recorded for the "
7209 "memory-allocation functions.  If no hook functions were successfully "
7210 "installed by B<mtrace>(), B<muntrace>()  does nothing."
7211 msgstr ""
7212
7213 #. type: Plain text
7214 #: build/C/man3/mtrace.3:65
7215 msgid ""
7216 "When B<mtrace>()  is called, it checks the value of the environment variable "
7217 "B<MALLOC_TRACE>, which should contain the pathname of a file in which the "
7218 "tracing information is to be recorded.  If the pathname is successfully "
7219 "opened, it is truncated to zero length."
7220 msgstr ""
7221
7222 #. type: Plain text
7223 #: build/C/man3/mtrace.3:78
7224 msgid ""
7225 "If B<MALLOC_TRACE> is not set, or the pathname it specifies is invalid or "
7226 "not writable, then no hook functions are installed, and B<mtrace>()  has no "
7227 "effect.  In set-user-ID and set-group-ID programs, B<MALLOC_TRACE> is "
7228 "ignored, and B<mtrace>()  has no effect."
7229 msgstr ""
7230
7231 #. type: Plain text
7232 #: build/C/man3/mtrace.3:86
7233 msgid ""
7234 "In normal usage, B<mtrace>()  is called once at the start of execution of a "
7235 "program, and B<muntrace>()  is never called."
7236 msgstr ""
7237
7238 #. type: Plain text
7239 #: build/C/man3/mtrace.3:96
7240 msgid ""
7241 "The tracing output produced after a call to B<mtrace>()  is textual, but not "
7242 "designed to be human readable.  The GNU C library provides a Perl script, "
7243 "B<mtrace>(1), that interprets the trace log and produces human-readable "
7244 "output.  For best results, the traced program should be compiled with "
7245 "debugging enabled, so that line-number information is recorded in the "
7246 "executable."
7247 msgstr ""
7248
7249 #. type: Plain text
7250 #: build/C/man3/mtrace.3:102
7251 msgid ""
7252 "The tracing performed by B<mtrace>()  incurs a performance penalty (if "
7253 "B<MALLOC_TRACE> points to a valid, writable pathname)."
7254 msgstr ""
7255
7256 #. type: Plain text
7257 #: build/C/man3/mtrace.3:108
7258 msgid ""
7259 "The line-number information produced by B<mtrace>(1)  is not always precise: "
7260 "the line number references may refer to the previous or following "
7261 "(nonblank)  line of the source code."
7262 msgstr ""
7263
7264 #. type: Plain text
7265 #: build/C/man3/mtrace.3:115
7266 msgid ""
7267 "The shell session below demonstrates the use of the B<mtrace>()  function "
7268 "and the B<mtrace>(1)  command in a program that has memory leaks at two "
7269 "different locations.  The demonstration uses the following program:"
7270 msgstr ""
7271
7272 #. type: Plain text
7273 #: build/C/man3/mtrace.3:122
7274 #, no-wrap
7275 msgid ""
7276 "$ B<cat t_mtrace.c>\n"
7277 "#include E<lt>mcheck.hE<gt>\n"
7278 "#include E<lt>stdlib.hE<gt>\n"
7279 "#include E<lt>stdio.hE<gt>\n"
7280 msgstr ""
7281 "$ B<cat t_mtrace.c>\n"
7282 "#include E<lt>mcheck.hE<gt>\n"
7283 "#include E<lt>stdlib.hE<gt>\n"
7284 "#include E<lt>stdio.hE<gt>\n"
7285
7286 #. type: Plain text
7287 #: build/C/man3/mtrace.3:127
7288 #, no-wrap
7289 msgid ""
7290 "int\n"
7291 "main(int argc, char *argv[])\n"
7292 "{\n"
7293 "    int j;\n"
7294 msgstr ""
7295 "int\n"
7296 "main(int argc, char *argv[])\n"
7297 "{\n"
7298 "    int j;\n"
7299
7300 #. type: Plain text
7301 #: build/C/man3/mtrace.3:129
7302 #, no-wrap
7303 msgid "    mtrace();\n"
7304 msgstr "    mtrace();\n"
7305
7306 #. type: Plain text
7307 #: build/C/man3/mtrace.3:132
7308 #, no-wrap
7309 msgid ""
7310 "    for (j = 0; j E<lt> 2; j++)\n"
7311 "        malloc(100);            /* Never freed--a memory leak */\n"
7312 msgstr ""
7313 "    for (j = 0; j E<lt> 2; j++)\n"
7314 "        malloc(100);            /* Never freed--a memory leak */\n"
7315
7316 #. type: Plain text
7317 #: build/C/man3/mtrace.3:136
7318 #, no-wrap
7319 msgid ""
7320 "    calloc(16, 16);             /* Never freed--a memory leak */\n"
7321 "    exit(EXIT_SUCCESS);\n"
7322 "}\n"
7323 msgstr ""
7324 "    calloc(16, 16);             /* Never freed--a memory leak */\n"
7325 "    exit(EXIT_SUCCESS);\n"
7326 "}\n"
7327
7328 #. type: Plain text
7329 #: build/C/man3/mtrace.3:142
7330 msgid ""
7331 "When we run the program as follows, we see that B<mtrace>()  diagnosed "
7332 "memory leaks at two different locations in the program:"
7333 msgstr ""
7334
7335 #. type: Plain text
7336 #: build/C/man3/mtrace.3:155
7337 #, no-wrap
7338 msgid ""
7339 "$ B<cc -g t_mtrace.c -o t_mtrace>\n"
7340 "$ B<export MALLOC_TRACE=/tmp/t>\n"
7341 "$ B<./t_mtrace>\n"
7342 "$ B<mtrace ./t_mtrace $MALLOC_TRACE>\n"
7343 "Memory not freed:\n"
7344 "-----------------\n"
7345 "   Address     Size     Caller\n"
7346 "0x084c9378     0x64  at /home/cecilia/t_mtrace.c:12\n"
7347 "0x084c93e0     0x64  at /home/cecilia/t_mtrace.c:12\n"
7348 "0x084c9448    0x100  at /home/cecilia/t_mtrace.c:16\n"
7349 msgstr ""
7350 "$ B<cc -g t_mtrace.c -o t_mtrace>\n"
7351 "$ B<export MALLOC_TRACE=/tmp/t>\n"
7352 "$ B<./t_mtrace>\n"
7353 "$ B<mtrace ./t_mtrace $MALLOC_TRACE>\n"
7354 "Memory not freed:\n"
7355 "-----------------\n"
7356 "   Address     Size     Caller\n"
7357 "0x084c9378     0x64  at /home/cecilia/t_mtrace.c:12\n"
7358 "0x084c93e0     0x64  at /home/cecilia/t_mtrace.c:12\n"
7359 "0x084c9448    0x100  at /home/cecilia/t_mtrace.c:16\n"
7360
7361 #. type: Plain text
7362 #: build/C/man3/mtrace.3:167
7363 msgid ""
7364 "The first two messages about unfreed memory correspond to the two B<malloc>"
7365 "(3)  calls inside the I<for> loop.  The final message corresponds to the "
7366 "call to B<calloc>(3)  (which in turn calls B<malloc>(3))."
7367 msgstr ""
7368
7369 #. type: Plain text
7370 #: build/C/man3/mtrace.3:172
7371 msgid "B<mtrace>(1), B<malloc>(3), B<malloc_hook>(3), B<mcheck>(3)"
7372 msgstr "B<mtrace>(1), B<malloc>(3), B<malloc_hook>(3), B<mcheck>(3)"
7373
7374 #. type: TH
7375 #: build/C/man2/posix_fadvise.2:28
7376 #, no-wrap
7377 msgid "POSIX_FADVISE"
7378 msgstr "POSIX_FADVISE"
7379
7380 #. type: TH
7381 #: build/C/man2/posix_fadvise.2:28 build/C/man2/sync_file_range.2:30
7382 #, no-wrap
7383 msgid "2013-04-01"
7384 msgstr "2013-04-01"
7385
7386 #. type: Plain text
7387 #: build/C/man2/posix_fadvise.2:31
7388 msgid "posix_fadvise - predeclare an access pattern for file data"
7389 msgstr "posix_fadvise - ファイルデータのアクセスパターンをあらかじめ宣言する"
7390
7391 #. type: Plain text
7392 #: build/C/man2/posix_fadvise.2:34 build/C/man3/posix_fallocate.3:31
7393 #, no-wrap
7394 msgid "B<#include E<lt>fcntl.hE<gt>>\n"
7395 msgstr "B<#include E<lt>fcntl.hE<gt>>\n"
7396
7397 #. type: Plain text
7398 #: build/C/man2/posix_fadvise.2:37
7399 #, no-wrap
7400 msgid "B<int posix_fadvise(int >I<fd>B<, off_t >I<offset>B<, off_t >I<len>B<, int >I<advice>B<);>\n"
7401 msgstr "B<int posix_fadvise(int >I<fd>B<, off_t >I<offset>B<, off_t >I<len>B<, int >I<advice>B<);>\n"
7402
7403 #. type: Plain text
7404 #: build/C/man2/posix_fadvise.2:46
7405 msgid "B<posix_fadvise>():"
7406 msgstr "B<posix_fadvise>():"
7407
7408 #. type: Plain text
7409 #: build/C/man2/posix_fadvise.2:48 build/C/man3/posix_fallocate.3:44
7410 msgid "_XOPEN_SOURCE\\ E<gt>=\\ 600 || _POSIX_C_SOURCE\\ E<gt>=\\ 200112L"
7411 msgstr "_XOPEN_SOURCE\\ E<gt>=\\ 600 || _POSIX_C_SOURCE\\ E<gt>=\\ 200112L"
7412
7413 #. type: Plain text
7414 #: build/C/man2/posix_fadvise.2:56
7415 msgid ""
7416 "Programs can use B<posix_fadvise>()  to announce an intention to access file "
7417 "data in a specific pattern in the future, thus allowing the kernel to "
7418 "perform appropriate optimizations."
7419 msgstr ""
7420 "プログラムは、将来特定のパターンでファイルデータに アクセスする意思を伝えるた"
7421 "めに B<posix_fadvise>()  を使うことができる。 これにより、カーネルが適切な最"
7422 "適化を実行することが可能になる。"
7423
7424 #. type: Plain text
7425 #: build/C/man2/posix_fadvise.2:63
7426 msgid ""
7427 "The I<advice> applies to a (not necessarily existent) region starting at "
7428 "I<offset> and extending for I<len> bytes (or until the end of the file if "
7429 "I<len> is 0) within the file referred to by I<fd>.  The I<advice> is not "
7430 "binding; it merely constitutes an expectation on behalf of the application."
7431 msgstr ""
7432 "I<advice> は I<fd> が参照しているファイルの I<offset> から始まる I<len> バ"
7433 "イ\n"
7434 "トの範囲内 (I<len> が 0 の場合はファイルの終りまで) の (必ずしも存在しない)\n"
7435 "領域に適用される。 I<advice> は義務づけではない。 I<advice> は単にアプリ"
7436 "ケー\n"
7437 "ションのために可能性を構成するだけである。"
7438
7439 #. type: Plain text
7440 #: build/C/man2/posix_fadvise.2:65
7441 msgid "Permissible values for I<advice> include:"
7442 msgstr "I<advice> に許される値には、以下のものが含まれる:"
7443
7444 #. type: TP
7445 #: build/C/man2/posix_fadvise.2:65
7446 #, no-wrap
7447 msgid "B<POSIX_FADV_NORMAL>"
7448 msgstr "B<POSIX_FADV_NORMAL>"
7449
7450 #. type: Plain text
7451 #: build/C/man2/posix_fadvise.2:71
7452 msgid ""
7453 "Indicates that the application has no advice to give about its access "
7454 "pattern for the specified data.  If no advice is given for an open file, "
7455 "this is the default assumption."
7456 msgstr ""
7457 "指定されたデータのアクセスパターンを指示するアドバイスを アプリケーションが何"
7458 "も持っていないことを示す。 オープンされたファイルにアドバイスが指定されない場"
7459 "合、 これがデフォルトで仮定される。"
7460
7461 #. type: TP
7462 #: build/C/man2/posix_fadvise.2:71
7463 #, no-wrap
7464 msgid "B<POSIX_FADV_SEQUENTIAL>"
7465 msgstr "B<POSIX_FADV_SEQUENTIAL>"
7466
7467 #. type: Plain text
7468 #: build/C/man2/posix_fadvise.2:75
7469 msgid ""
7470 "The application expects to access the specified data sequentially (with "
7471 "lower offsets read before higher ones)."
7472 msgstr ""
7473 "アプリケーションは指定されたデータがシーケンシャルに (大きなオフセットの前に"
7474 "小さなオフセットのデータを読むように)  アクセスされることを期待する。"
7475
7476 #. type: TP
7477 #: build/C/man2/posix_fadvise.2:75
7478 #, no-wrap
7479 msgid "B<POSIX_FADV_RANDOM>"
7480 msgstr "B<POSIX_FADV_RANDOM>"
7481
7482 #. type: Plain text
7483 #: build/C/man2/posix_fadvise.2:78
7484 msgid "The specified data will be accessed in random order."
7485 msgstr "指定されたデータがランダムな順番でアクセスされる。"
7486
7487 #. type: TP
7488 #: build/C/man2/posix_fadvise.2:78
7489 #, no-wrap
7490 msgid "B<POSIX_FADV_NOREUSE>"
7491 msgstr "B<POSIX_FADV_NOREUSE>"
7492
7493 #. type: Plain text
7494 #: build/C/man2/posix_fadvise.2:81
7495 msgid "The specified data will be accessed only once."
7496 msgstr "指定されたデータは 1 度しかアクセスされない。"
7497
7498 #. type: TP
7499 #: build/C/man2/posix_fadvise.2:81
7500 #, no-wrap
7501 msgid "B<POSIX_FADV_WILLNEED>"
7502 msgstr "B<POSIX_FADV_WILLNEED>"
7503
7504 #. type: Plain text
7505 #: build/C/man2/posix_fadvise.2:84
7506 msgid "The specified data will be accessed in the near future."
7507 msgstr "指定されたデータは近い将来アクセスされる。"
7508
7509 #. type: TP
7510 #: build/C/man2/posix_fadvise.2:84
7511 #, no-wrap
7512 msgid "B<POSIX_FADV_DONTNEED>"
7513 msgstr "B<POSIX_FADV_DONTNEED>"
7514
7515 #. type: Plain text
7516 #: build/C/man2/posix_fadvise.2:87
7517 msgid "The specified data will not be accessed in the near future."
7518 msgstr "指定されたデータは近い将来アクセスされない。"
7519
7520 #. type: Plain text
7521 #: build/C/man2/posix_fadvise.2:90
7522 msgid "On success, zero is returned.  On error, an error number is returned."
7523 msgstr "成功した場合は 0 が返される。 失敗した場合はエラー番号が返される。"
7524
7525 #. type: Plain text
7526 #: build/C/man2/posix_fadvise.2:94
7527 msgid "The I<fd> argument was not a valid file descriptor."
7528 msgstr "I<fd> 引き数が有効なファイルディスクリプタでない。"
7529
7530 #. type: Plain text
7531 #: build/C/man2/posix_fadvise.2:97
7532 msgid "An invalid value was specified for I<advice>."
7533 msgstr "無効な値が I<advice> に指定された。"
7534
7535 #. type: Plain text
7536 #: build/C/man2/posix_fadvise.2:104
7537 msgid ""
7538 "The specified file descriptor refers to a pipe or FIFO.  (Linux actually "
7539 "returns B<EINVAL> in this case.)"
7540 msgstr ""
7541 "指定されたファイルディスクリプタがパイプまたは FIFO を参照している (この場"
7542 "合、Linux は実際には B<EINVAL> を返す)。"
7543
7544 #.  of fadvise64_64()
7545 #. type: Plain text
7546 #: build/C/man2/posix_fadvise.2:112
7547 msgid ""
7548 "Kernel support first appeared in Linux 2.5.60; the underlying system call is "
7549 "called B<fadvise64>().  Library support has been provided since glibc "
7550 "version 2.2, via the wrapper function B<posix_fadvise>()."
7551 msgstr ""
7552 "カーネルによるサポートは Linux 2.5.60 で最初に登場し、\n"
7553 "対応するシステムコールは B<fadvise64>() という名前である。\n"
7554 "ライブラリによるサポートは glibc バージョン 2.2 以降で提供されており、\n"
7555 "ラッパー関数は B<posix_fadvise>() という名前である。"
7556
7557 #. type: Plain text
7558 #: build/C/man2/posix_fadvise.2:121
7559 msgid ""
7560 "POSIX.1-2001.  Note that the type of the I<len> argument was changed from "
7561 "I<size_t> to I<off_t> in POSIX.1-2003 TC1."
7562 msgstr ""
7563 "POSIX.1-2001.  I<len> 引き数の型が POSIX.1-2003 TC1 において I<size_t> から "
7564 "I<off_t> に変更された点に注意すること。"
7565
7566 #. type: Plain text
7567 #: build/C/man2/posix_fadvise.2:127
7568 msgid ""
7569 "Under Linux, B<POSIX_FADV_NORMAL> sets the readahead window to the default "
7570 "size for the backing device; B<POSIX_FADV_SEQUENTIAL> doubles this size, and "
7571 "B<POSIX_FADV_RANDOM> disables file readahead entirely.  These changes affect "
7572 "the entire file, not just the specified region (but other open file handles "
7573 "to the same file are unaffected)."
7574 msgstr ""
7575 "Linux では、B<POSIX_FADV_NORMAL> はバッキングデバイスの デフォルトサイズに先"
7576 "読み (readahead) ウインドウを設定する。 B<POSIX_FADV_SEQUENTIAL> はこのサイズ"
7577 "を 2 倍し、 B<POSIX_FADV_RANDOM> は先読みを全く無効にする。 これらの変更は"
7578 "ファイル全体に影響し、指定された領域のみに影響するわけではない (しかし同じ"
7579 "ファイルに対する他のオープンファイルハンドルは影響を受けない)。"
7580
7581 #. type: Plain text
7582 #: build/C/man2/posix_fadvise.2:134
7583 msgid ""
7584 "B<POSIX_FADV_WILLNEED> initiates a nonblocking read of the specified region "
7585 "into the page cache.  The amount of data read may be decreased by the kernel "
7586 "depending on virtual memory load.  (A few megabytes will usually be fully "
7587 "satisfied, and more is rarely useful.)"
7588 msgstr ""
7589 "B<POSIX_FADV_WILLNEED> は、 ページキャッシュに指定領域のブロックされない読み"
7590 "込みを開始する。 読み込まれるデータの総量は、 仮想メモリの負荷に依ってカーネ"
7591 "ルが減らすかもしれない (数メガバイトであれば通常は全く十分であり、 それより多"
7592 "くてもめったに役に立たない)。"
7593
7594 #. type: Plain text
7595 #: build/C/man2/posix_fadvise.2:138
7596 msgid ""
7597 "In kernels before 2.6.18, B<POSIX_FADV_NOREUSE> had the same semantics as "
7598 "B<POSIX_FADV_WILLNEED>.  This was probably a bug; since kernel 2.6.18, this "
7599 "flag is a no-op."
7600 msgstr ""
7601 "2.6.18 より前のカーネルでは、B<POSIX_FADV_NOREUSE> は B<POSIX_FADV_WILLNEED> "
7602 "と同じ意味であった。 これは多分バグであった。 カーネル 2.6.18 以降では、この"
7603 "フラグは何も行わない。"
7604
7605 #. type: Plain text
7606 #: build/C/man2/posix_fadvise.2:146
7607 msgid ""
7608 "B<POSIX_FADV_DONTNEED> attempts to free cached pages associated with the "
7609 "specified region.  This is useful, for example, while streaming large "
7610 "files.  A program may periodically request the kernel to free cached data "
7611 "that has already been used, so that more useful cached pages are not "
7612 "discarded instead."
7613 msgstr ""
7614 "B<POSIX_FADV_DONTNEED> は指定された領域に関連付けられた キャッシュページを解"
7615 "放しようとする。 例えば、これは大きなファイルをストリーミングするときに役立"
7616 "つ。 プログラムは、使用済みのキャッシュされたデータを解放するように、 定期的"
7617 "にカーネルに要求するかもしれない。 そうすることにより、さらに有効なキャッシュ"
7618 "されたページが、 代わりに破棄されることはない。"
7619
7620 #. type: Plain text
7621 #: build/C/man2/posix_fadvise.2:154
7622 msgid ""
7623 "Pages that have not yet been written out will be unaffected, so if the "
7624 "application wishes to guarantee that pages will be released, it should call "
7625 "B<fsync>(2)  or B<fdatasync>(2)  first."
7626 msgstr ""
7627 "まだ書き出されていないページは影響を受けないので、 そのページの解放が保証され"
7628 "ることをアプリケーションが望んでいるなら、 最初に B<fsync>(2)  または "
7629 "B<fdatasync>(2)  を呼ぶべきである。"
7630
7631 #. type: SS
7632 #: build/C/man2/posix_fadvise.2:154
7633 #, no-wrap
7634 msgid "Architecture-specific variants"
7635 msgstr "アーキテクチャ固有の派生バージョン"
7636
7637 #. type: Plain text
7638 #: build/C/man2/posix_fadvise.2:171
7639 msgid ""
7640 "Some architectures require 64-bit arguments to be aligned in a suitable pair "
7641 "of registers (see B<syscall>(2)  for further detail).  On such "
7642 "architectures, the call signature of B<posix_fadvise>()  shown in the "
7643 "SYNOPSIS would force a register to be wasted as padding between the I<fd> "
7644 "and I<len> arguments.  Therefore, these architectures define a version of "
7645 "the system call that orders the arguments suitably, but otherwise is "
7646 "otherwise exactly the same as B<posix_fadvise>()."
7647 msgstr ""
7648 "いくつかのアーキテクチャでは、 64 ビットの引き数は適切なレジスタの組に割り当"
7649 "てる必要がある (B<syscall>(2) 参照)。 このようなアーキテクチャでは、 「書式」"
7650 "に書かれている  B<posix_fadvise>() の呼び出しシグネチャーで、 引き数 I<fd> "
7651 "と I<offset> の間のパディング (詰めもの) でレジスタが一つ消費されてしまう。 "
7652 "そのため、 これらのアーキテクチャでは引き数が適切な順序になった別のシステム"
7653 "コールが定義されているが、 それ以外は B<posix_fadvise>() と全く同じである。"
7654
7655 #. type: Plain text
7656 #: build/C/man2/posix_fadvise.2:173
7657 msgid "For example, since Linux 2.6.14, ARM has the following system call:"
7658 msgstr ""
7659 "例えば、 Linux 2.6.14 以降では、 ARM には以下のシステムコールが存在する。"
7660
7661 #. type: Plain text
7662 #: build/C/man2/posix_fadvise.2:178
7663 #, no-wrap
7664 msgid ""
7665 "B<long arm_fadvise64_64(int >I<fd>B<, int >I<advice>B<,>\n"
7666 "B<                      loff_t >I<offset>B<, loff_t >I<len>B<);>\n"
7667 msgstr ""
7668 "B<long arm_fadvise64_64(int >I<fd>B<, int >I<advice>B<,>\n"
7669 "B<                      loff_t >I<offset>B<, loff_t >I<len>B<);>\n"
7670
7671 #. type: Plain text
7672 #: build/C/man2/posix_fadvise.2:186
7673 msgid ""
7674 "These architecture-specific details are generally hidden from applications "
7675 "by the glibc B<posix_fadvise>()  wrapper function, which invokes the "
7676 "appropriate architecture-specific system call."
7677 msgstr ""
7678 "通常、 glibc の B<posix_fadvise>() ラッパー関数により、 これらのアーキテク"
7679 "チャ固有の詳細はアプリケーションには見えない。 glibc のラッパー関数では、適切"
7680 "なアーキテクチャ固有のシステムコールが呼び出される。"
7681
7682 #. type: Plain text
7683 #: build/C/man2/posix_fadvise.2:191
7684 msgid ""
7685 "In kernels before 2.6.6, if I<len> was specified as 0, then this was "
7686 "interpreted literally as \"zero bytes\", rather than as meaning \"all bytes "
7687 "through to the end of the file\"."
7688 msgstr ""
7689 "2.6.6 より前のカーネルでは、 I<len> に 0 が指定された場合、 「ファイルの終り"
7690 "までの全てのバイト」という意味ではなく、 文字通り「0 バイト」として解釈されて"
7691 "いた。"
7692
7693 #.  FIXME . Write a posix_fadvise(3) page.
7694 #. type: Plain text
7695 #: build/C/man2/posix_fadvise.2:197
7696 msgid ""
7697 "B<readahead>(2), B<sync_file_range>(2), B<posix_fallocate>(3), "
7698 "B<posix_madvise>(3)"
7699 msgstr ""
7700 "B<readahead>(2), B<sync_file_range>(2), B<posix_fallocate>(3),\n"
7701 "B<posix_madvise>(3)"
7702
7703 #. type: TH
7704 #: build/C/man3/posix_fallocate.3:25
7705 #, no-wrap
7706 msgid "POSIX_FALLOCATE"
7707 msgstr "POSIX_FALLOCATE"
7708
7709 #. type: TH
7710 #: build/C/man3/posix_fallocate.3:25 build/C/man2/shmop.2:41
7711 #, no-wrap
7712 msgid "2013-02-12"
7713 msgstr "2013-02-12"
7714
7715 #. type: Plain text
7716 #: build/C/man3/posix_fallocate.3:28
7717 msgid "posix_fallocate - allocate file space"
7718 msgstr "posix_fallocate - ファイルのスペースを確保する"
7719
7720 #. type: Plain text
7721 #: build/C/man3/posix_fallocate.3:33
7722 #, no-wrap
7723 msgid "B<int posix_fallocate(int >I<fd>B<, off_t >I<offset>B<, off_t >I<len>B<);>\n"
7724 msgstr "B<int posix_fallocate(int >I<fd>B<, off_t >I<offset>B<, off_t >I<len>B<);>\n"
7725
7726 #. type: Plain text
7727 #: build/C/man3/posix_fallocate.3:42
7728 msgid "B<posix_fallocate>():"
7729 msgstr "B<posix_fallocate>():"
7730
7731 #. type: Plain text
7732 #: build/C/man3/posix_fallocate.3:61
7733 msgid ""
7734 "The function B<posix_fallocate>()  ensures that disk space is allocated for "
7735 "the file referred to by the descriptor I<fd> for the bytes in the range "
7736 "starting at I<offset> and continuing for I<len> bytes.  After a successful "
7737 "call to B<posix_fallocate>(), subsequent writes to bytes in the specified "
7738 "range are guaranteed not to fail because of lack of disk space."
7739 msgstr ""
7740 "関数 B<posix_fallocate>()  は、ディスクリプタ I<fd> で参照されるファイルに対"
7741 "して、ディスクスペースを確実に確保する。 ディスクスペースは I<offset> から始"
7742 "まる I<len> バイトの範囲のバイトである。 B<posix_fallocate>()  の呼び出しが成"
7743 "功した後、指定された範囲のバイトに対する書き込みは、 ディスクスペースの不足で"
7744 "失敗しないことが保証される。"
7745
7746 #. type: Plain text
7747 #: build/C/man3/posix_fallocate.3:66
7748 msgid ""
7749 "If the size of the file is less than I<offset>+I<len>, then the file is "
7750 "increased to this size; otherwise the file size is left unchanged."
7751 msgstr ""
7752 "ファイルのサイズが I<offset>+I<len> より小さい場合、ファイルはこのサイズにな"
7753 "るように拡大される。 それ以外の場合、ファイルサイズは変わらない。"
7754
7755 #. type: Plain text
7756 #: build/C/man3/posix_fallocate.3:72
7757 msgid ""
7758 "B<posix_fallocate>()  returns zero on success, or an error number on "
7759 "failure.  Note that I<errno> is not set."
7760 msgstr ""
7761 "B<posix_fallocate>()  は成功した場合、0 を返す。 失敗した場合、エラー番号を返"
7762 "す。 I<errno> が設定されない点に注意すること。"
7763
7764 #. type: Plain text
7765 #: build/C/man3/posix_fallocate.3:81
7766 msgid "I<offset+len> exceeds the maximum file size."
7767 msgstr "I<offset+len> が最大ファイルサイズを超えている。"
7768
7769 #. type: Plain text
7770 #: build/C/man3/posix_fallocate.3:91
7771 msgid "I<fd> does not refer to a regular file."
7772 msgstr "I<fd> が通常のファイルとして参照されていない。"
7773
7774 #. type: Plain text
7775 #: build/C/man3/posix_fallocate.3:100
7776 msgid "I<fd> refers to a pipe."
7777 msgstr "I<fd> がパイプを参照している。"
7778
7779 #. type: Plain text
7780 #: build/C/man3/posix_fallocate.3:103
7781 msgid "B<posix_fallocate>()  is available since glibc 2.1.94."
7782 msgstr "B<posix_fallocate>()  は glibc 2.1.94 以降で利用可能である。"
7783
7784 #. type: Plain text
7785 #: build/C/man3/posix_fallocate.3:128
7786 msgid ""
7787 "POSIX.1-2008 says that an implementation I<shall> give the B<EINVAL> error "
7788 "if I<len> was 0, or I<offset> was less than 0.  POSIX.1-2001 says that an "
7789 "implementation I<shall> give the B<EINVAL> error if I<len> is less than 0, "
7790 "or I<offset> was less than 0, and I<may> give the error if I<len> equals "
7791 "zero."
7792 msgstr ""
7793 "POSIX.1-2008 では、 I<len> が 0 の場合、もしくは I<offset> が 0 未満の場合、 "
7794 "B<EINVAL> エラーを返すものとされている。 POSIX.1-2001 では、 I<len> が 0 未満"
7795 "の場合、もしくは I<offset> が 0 未満の場合、 B<EINVAL> エラーを返すものとされ"
7796 "ている。また、 I<len> が 0 の場合、 B<EINVAL> エラーを返してもよいとされてい"
7797 "る。"
7798
7799 #. type: Plain text
7800 #: build/C/man3/posix_fallocate.3:133
7801 msgid "B<fallocate>(1), B<fallocate>(2), B<lseek>(2), B<posix_fadvise>(2)"
7802 msgstr "B<fallocate>(1), B<fallocate>(2), B<lseek>(2), B<posix_fadvise>(2)"
7803
7804 #. type: TH
7805 #: build/C/man3/posix_memalign.3:29
7806 #, no-wrap
7807 msgid "POSIX_MEMALIGN"
7808 msgstr "POSIX_MEMALIGN"
7809
7810 #. type: TH
7811 #: build/C/man3/posix_memalign.3:29
7812 #, no-wrap
7813 msgid "2013-09-02"
7814 msgstr "2013-09-02"
7815
7816 #. type: Plain text
7817 #: build/C/man3/posix_memalign.3:32
7818 msgid ""
7819 "posix_memalign, aligned_alloc, memalign, valloc, pvalloc - allocate aligned "
7820 "memory"
7821 msgstr ""
7822 "posix_memalign, aligned_alloc, memalign, valloc, pvalloc - アラインメント\n"
7823 "されたメモリの割り当てを行う"
7824
7825 #. type: Plain text
7826 #: build/C/man3/posix_memalign.3:39
7827 #, no-wrap
7828 msgid ""
7829 "B<int posix_memalign(void **>I<memptr>B<, size_t >I<alignment>B<, size_t >I<size>B<);>\n"
7830 "B<void *aligned_alloc(size_t >I<alignment>B<, size_t >I<size>B<);>\n"
7831 "B<void *valloc(size_t >I<size>B<);>\n"
7832 msgstr ""
7833 "B<int posix_memalign(void **>I<memptr>B<, size_t >I<alignment>B<, size_t >I<size>B<);>\n"
7834 "B<void *aligned_alloc(size_t >I<alignment>B<, size_t >I<size>B<);>\n"
7835 "B<void *valloc(size_t >I<size>B<);>\n"
7836
7837 #. type: Plain text
7838 #: build/C/man3/posix_memalign.3:44
7839 #, no-wrap
7840 msgid ""
7841 "B<void *memalign(size_t >I<alignment>B<, size_t >I<size>B<);>\n"
7842 "B<void *pvalloc(size_t >I<size>B<);>\n"
7843 msgstr ""
7844 "B<void *memalign(size_t >I<alignment>B<, size_t >I<size>B<);>\n"
7845 "B<void *pvalloc(size_t >I<size>B<);>\n"
7846
7847 #. type: Plain text
7848 #: build/C/man3/posix_memalign.3:54
7849 msgid ""
7850 "B<posix_memalign>(): _POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ "
7851 "E<gt>=\\ 600"
7852 msgstr ""
7853 "B<posix_memalign>(): _POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ "
7854 "E<gt>=\\ 600"
7855
7856 #. type: Plain text
7857 #: build/C/man3/posix_memalign.3:57
7858 msgid "B<aligned_alloc>(): _ISOC11_SOURCE"
7859 msgstr "B<aligned_alloc>(): _ISOC11_SOURCE"
7860
7861 #. type: Plain text
7862 #: build/C/man3/posix_memalign.3:59
7863 msgid "B<valloc>():"
7864 msgstr "B<valloc>():"
7865
7866 #. type: TP
7867 #: build/C/man3/posix_memalign.3:62
7868 #, no-wrap
7869 msgid "Since glibc 2.12:"
7870 msgstr "glibc 2.12 以降:"
7871
7872 #. type: Plain text
7873 #: build/C/man3/posix_memalign.3:69
7874 #, no-wrap
7875 msgid ""
7876 "_BSD_SOURCE ||\n"
7877 "    (_XOPEN_SOURCE\\ E<gt>=\\ 500 ||\n"
7878 "        _XOPEN_SOURCE\\ &&\\ _XOPEN_SOURCE_EXTENDED) &&\n"
7879 "    !(_POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ E<gt>=\\ 600)\n"
7880 msgstr ""
7881 "_BSD_SOURCE ||\n"
7882 "    (_XOPEN_SOURCE\\ E<gt>=\\ 500 ||\n"
7883 "        _XOPEN_SOURCE\\ &&\\ _XOPEN_SOURCE_EXTENDED) &&\n"
7884 "    !(_POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ E<gt>=\\ 600)\n"
7885
7886 #. type: TP
7887 #: build/C/man3/posix_memalign.3:71
7888 #, no-wrap
7889 msgid "Before glibc 2.12:"
7890 msgstr "glibc 2.12 より前:"
7891
7892 #. type: Plain text
7893 #: build/C/man3/posix_memalign.3:75
7894 msgid ""
7895 "_BSD_SOURCE || _XOPEN_SOURCE\\ E<gt>=\\ 500 || _XOPEN_SOURCE\\ &&\\ "
7896 "_XOPEN_SOURCE_EXTENDED"
7897 msgstr ""
7898 "_BSD_SOURCE || _XOPEN_SOURCE\\ E<gt>=\\ 500 || _XOPEN_SOURCE\\ &&\\ "
7899 "_XOPEN_SOURCE_EXTENDED"
7900
7901 #. type: Plain text
7902 #: build/C/man3/posix_memalign.3:82
7903 msgid ""
7904 "(The (nonstandard) header file I<E<lt>malloc.hE<gt>> also exposes the "
7905 "declaration of B<valloc>(); no feature test macros are required.)"
7906 msgstr ""
7907 "((非標準の) ヘッダファイル I<E<lt>malloc.hE<gt>> も\n"
7908 "B<valloc>() の宣言も公開する。機能検査マクロは不要である。"
7909
7910 #.  glibc does this:
7911 #. type: Plain text
7912 #: build/C/man3/posix_memalign.3:104
7913 msgid ""
7914 "The function B<posix_memalign>()  allocates I<size> bytes and places the "
7915 "address of the allocated memory in I<*memptr>.  The address of the allocated "
7916 "memory will be a multiple of I<alignment>, which must be a power of two and "
7917 "a multiple of I<sizeof(void\\ *)>.  If I<size> is 0, then the value placed "
7918 "in I<*memptr> is either NULL, or a unique pointer value that can later be "
7919 "successfully passed to B<free>(3)."
7920 msgstr ""
7921 "関数 B<posix_memalign>()  は、 I<size> バイトのメモリを割り当て、割り当てられ"
7922 "たメモリのアドレスを I<*memptr> に設定する。 割り当てられたメモリのアドレス"
7923 "は I<alignment> の倍数になっているはずである。 I<alignment> は 2 のべき乗で、"
7924 "かつ I<sizeof(void\\ *)> の倍数でなければならない。 I<size> が 0 の場合、 "
7925 "I<*memptr> には NULL か一意なポインタ値が書かれる。 このポインタ値は、後で "
7926 "B<free>(3)  に問題なく渡すことができる。"
7927
7928 #.  The behavior of memalign() for size==0 is as for posix_memalign()
7929 #.  but no standards govern this.
7930 #. type: Plain text
7931 #: build/C/man3/posix_memalign.3:115
7932 msgid ""
7933 "The obsolete function B<memalign>()  allocates I<size> bytes and returns a "
7934 "pointer to the allocated memory.  The memory address will be a multiple of "
7935 "I<alignment>, which must be a power of two."
7936 msgstr ""
7937 "廃止された関数である B<memalign>() は、 I<size> バイトのメモリを割り当て、\n"
7938 "割り当てられたメモリへのポインタを返す。 メモリのアドレスは I<alignment> \n"
7939 "の倍数になっているはずである。 I<alignment> は 2 のべき乗でなければならない。"
7940
7941 #. type: Plain text
7942 #: build/C/man3/posix_memalign.3:124
7943 msgid ""
7944 "The function B<aligned_alloc>()  is the same as B<memalign>(), except for "
7945 "the added restriction that I<size> should be a multiple of I<alignment>."
7946 msgstr ""
7947 "関数 B<aligned_alloc>() は B<memalign>() と同じだが、I<size> が "
7948 "I<alignment>\n"
7949 "の倍数でなければならないという追加の制限がある点が異なる。"
7950
7951 #. type: Plain text
7952 #: build/C/man3/posix_memalign.3:133
7953 msgid ""
7954 "The obsolete function B<valloc>()  allocates I<size> bytes and returns a "
7955 "pointer to the allocated memory.  The memory address will be a multiple of "
7956 "the page size.  It is equivalent to I<memalign(sysconf(_SC_PAGESIZE),size)>."
7957 msgstr ""
7958 "廃止された関数である B<valloc>()  は I<size> バイトのメモリを割り当て、割り当"
7959 "てられたメモリへのポインタを返す。 メモリのアドレスはページサイズの倍数になっ"
7960 "ているはずである。 これは I<memalign(sysconf(_SC_PAGESIZE),size)> と等価であ"
7961 "る。"
7962
7963 #. type: Plain text
7964 #: build/C/man3/posix_memalign.3:140
7965 msgid ""
7966 "The obsolete function B<pvalloc>()  is similar to B<valloc>(), but rounds "
7967 "the size of the allocation up to the next multiple of the system page size."
7968 msgstr ""
7969 "廃止された関数 B<pvalloc>() は B<valloc>() と同様だが、\n"
7970 "割り当てられるサイズがシステムのページサイズの倍数に切り上げられる。"
7971
7972 #. type: Plain text
7973 #: build/C/man3/posix_memalign.3:142
7974 msgid "For all of these functions, the memory is not zeroed."
7975 msgstr "これらの関数はいずれもメモリのゼロクリアを行わない。"
7976
7977 #. type: Plain text
7978 #: build/C/man3/posix_memalign.3:149
7979 msgid ""
7980 "B<aligned_alloc>(), B<memalign>(), B<valloc>(), and B<pvalloc>()  return a "
7981 "pointer to the allocated memory, or NULL if the request fails."
7982 msgstr ""
7983 "B<aligned_alloc>(), B<memalign>(), B<valloc>(), B<pvalloc>() は割り当てられ"
7984 "た\n"
7985 "メモリへのポインタを返す。 割り当てに失敗した場合は NULL を返す。"
7986
7987 #. type: Plain text
7988 #: build/C/man3/posix_memalign.3:157
7989 msgid ""
7990 "B<posix_memalign>()  returns zero on success, or one of the error values "
7991 "listed in the next section on failure.  The value of I<errno> is "
7992 "indeterminate after a call to B<posix_memalign>()."
7993 msgstr ""
7994 "B<posix_memalign>()  は成功した場合は 0 を返し、 失敗した場合は次のセクション"
7995 "に記載されたエラー値のいずれかを返す。 B<posix_memalign>() の呼び出し後は "
7996 "I<errno> の値は不定である。"
7997
7998 #. type: Plain text
7999 #: build/C/man3/posix_memalign.3:164
8000 msgid ""
8001 "The I<alignment> argument was not a power of two, or was not a multiple of "
8002 "I<sizeof(void\\ *)>."
8003 msgstr ""
8004 "I<alignment> 引き数が 2 のべき乗でなかったか、 I<sizeof(void\\ *)> の倍数でな"
8005 "かった。"
8006
8007 #. type: Plain text
8008 #: build/C/man3/posix_memalign.3:167
8009 msgid "There was insufficient memory to fulfill the allocation request."
8010 msgstr "割り当て要求を満たすのに十分なメモリがなかった。"
8011
8012 #. type: Plain text
8013 #: build/C/man3/posix_memalign.3:174
8014 msgid ""
8015 "The functions B<memalign>(), B<valloc>(), and B<pvalloc>()  have been "
8016 "available in all Linux libc libraries."
8017 msgstr ""
8018 "関数 B<memalign>(), B<valloc>(), B<pvalloc>() は\n"
8019 "すべての Linux libc ライブラリで使用可能である。"
8020
8021 #. type: Plain text
8022 #: build/C/man3/posix_memalign.3:178
8023 msgid "The function B<aligned_alloc>()  was added to glibc in version 2.16."
8024 msgstr "関数 B<aligned_alloc>() は glibc バージョン 2.16 で追加された。"
8025
8026 #. type: Plain text
8027 #: build/C/man3/posix_memalign.3:182
8028 msgid "The function B<posix_memalign>()  is available since glibc 2.1.91."
8029 msgstr "関数 B<posix_fallocate>() は glibc 2.1.91 以降で利用可能である。"
8030
8031 #. type: Plain text
8032 #: build/C/man3/posix_memalign.3:189
8033 msgid ""
8034 "The function B<valloc>()  appeared in 3.0BSD.  It is documented as being "
8035 "obsolete in 4.3BSD, and as legacy in SUSv2.  It does not appear in "
8036 "POSIX.1-2001."
8037 msgstr ""
8038 "関数 B<valloc>() は 3.0BSD で登場した。4.3BSD では廃止されたと記載されてお"
8039 "り、\n"
8040 "SUSv2 では過去の名残だと記載されている。 POSIX.1-2001 には存在しない。"
8041
8042 #. type: Plain text
8043 #: build/C/man3/posix_memalign.3:193
8044 msgid "The function B<pvalloc>()  is a GNU extension."
8045 msgstr "関数 B<pvalloc>() は GNU による拡張である。"
8046
8047 #. type: Plain text
8048 #: build/C/man3/posix_memalign.3:197
8049 msgid "The function B<memalign>()  appears in SunOS 4.1.3 but not in 4.4BSD."
8050 msgstr "関数 B<memalign>() は SunOS 4.1.3 で登場したが、4.4BSD にはない。"
8051
8052 #. type: Plain text
8053 #: build/C/man3/posix_memalign.3:201
8054 msgid "The function B<posix_memalign>()  comes from POSIX.1d."
8055 msgstr "関数 B<posix_memalign>() は POSIX.1d に由来する。"
8056
8057 #. type: Plain text
8058 #: build/C/man3/posix_memalign.3:206
8059 msgid "The function B<aligned_alloc>()  is specified in the C11 standard."
8060 msgstr "関数 I<aligned_alloc>() は C11 標準で規定されている。"
8061
8062 #. type: SS
8063 #: build/C/man3/posix_memalign.3:206
8064 #, no-wrap
8065 msgid "Headers"
8066 msgstr "ヘッダ"
8067
8068 #. type: Plain text
8069 #: build/C/man3/posix_memalign.3:210
8070 msgid ""
8071 "Everybody agrees that B<posix_memalign>()  is declared in I<E<lt>stdlib."
8072 "hE<gt>>."
8073 msgstr ""
8074 "B<posix_memalign>()  の宣言を I<E<lt>stdlib.hE<gt>> で行うことに関しては、 皆"
8075 "の意見が一致している。"
8076
8077 #. type: Plain text
8078 #: build/C/man3/posix_memalign.3:214
8079 msgid ""
8080 "On some systems B<memalign>()  is declared in I<E<lt>stdlib.hE<gt>> instead "
8081 "of I<E<lt>malloc.hE<gt>>."
8082 msgstr ""
8083 "いくつかのシステムでは、 B<memalign>()  は I<E<lt>malloc.hE<gt>> ではなく "
8084 "I<E<lt>stdlib.hE<gt>> で宣言されている。"
8085
8086 #. type: Plain text
8087 #: build/C/man3/posix_memalign.3:221
8088 msgid ""
8089 "According to SUSv2, B<valloc>()  is declared in I<E<lt>stdlib.hE<gt>>.  "
8090 "Libc4,5 and glibc declare it in I<E<lt>malloc.hE<gt>>, and also in "
8091 "I<E<lt>stdlib.hE<gt>> if suitable feature test macros are defined (see "
8092 "above)."
8093 msgstr ""
8094 "SUSv2 によると、 B<valloc>() は I<E<lt>stdlib.hE<gt>> で宣言される。 "
8095 "libc4,5\n"
8096 "や glibc では I<E<lt>malloc.hE<gt>> で宣言されており、 さらに適切な機能検査\n"
8097 "マクロが定義された場合には I<E<lt>stdlib.hE<gt>> でも宣言される(上記を参照)。"
8098
8099 #. type: Plain text
8100 #: build/C/man3/posix_memalign.3:230
8101 msgid ""
8102 "On many systems there are alignment restrictions, for example, on buffers "
8103 "used for direct block device I/O.  POSIX specifies the I<pathconf(path,"
8104 "_PC_REC_XFER_ALIGN)> call that tells what alignment is needed.  Now one can "
8105 "use B<posix_memalign>()  to satisfy this requirement."
8106 msgstr ""
8107 "多くのシステムでは、アラインメントに関して制限がある。例えば、 ブロックデバイ"
8108 "スに対するダイレクト I/O に使用するバッファには アラインメントに関する制限が"
8109 "ある。 POSIX では、どんなアラインメントが必要かを知るために I<pathconf(path,"
8110 "_PC_REC_XFER_ALIGN)> コールを規定している。ここで B<posix_memalign>()  を使う"
8111 "と、この必要条件を満たすことができる。"
8112
8113 #. type: Plain text
8114 #: build/C/man3/posix_memalign.3:239
8115 msgid ""
8116 "B<posix_memalign>()  verifies that I<alignment> matches the requirements "
8117 "detailed above.  B<memalign>()  may not check that the I<alignment> argument "
8118 "is correct."
8119 msgstr ""
8120 "B<posix_memalign>() は I<alignment> が上で詳細に述べた必要条件を満たすか\n"
8121 "どうかを確かめる。 B<memalign>() は I<alignment> 引き数が正しいかどうかの\n"
8122 "確認を行わないかもしれない。"
8123
8124 #.  Other systems allow passing the result of
8125 #.  .IR valloc ()
8126 #.  to
8127 #.  .IR free (3),
8128 #.  but not to
8129 #.  .IR realloc (3).
8130 #. type: Plain text
8131 #: build/C/man3/posix_memalign.3:267
8132 msgid ""
8133 "POSIX requires that memory obtained from B<posix_memalign>()  can be freed "
8134 "using B<free>(3).  Some systems provide no way to reclaim memory allocated "
8135 "with B<memalign>()  or B<valloc>()  (because one can pass to B<free>(3)  "
8136 "only a pointer obtained from B<malloc>(3), while, for example, B<memalign>"
8137 "()  would call B<malloc>(3)  and then align the obtained value).  The glibc "
8138 "implementation allows memory obtained from any of these functions to be "
8139 "reclaimed with B<free>(3)."
8140 msgstr ""
8141 "POSIX では B<posix_memalign>() によって獲得したメモリは B<free>(3) を\n"
8142 "使って解放することができる必要がある。 いくつかのシステムでは\n"
8143 "B<memalign>() やB<valloc>() で割り当てられたメモリを再利用する手段が\n"
8144 "提供されていない(なぜなら B<free>(3) に渡すことができるのは\n"
8145 "B<malloc>(3) から受け取ったポインタだけだが、例えば B<memalign>() は\n"
8146 "B<malloc>(3) を呼び出し、得た値をアラインメントしてしまうからである)。\n"
8147 "glibc の実装では、 ここに述べた関数のいずれで獲得したメモリも\n"
8148 "B<free>(3) で再利用することができる。"
8149
8150 #. type: Plain text
8151 #: build/C/man3/posix_memalign.3:272
8152 msgid ""
8153 "The glibc B<malloc>(3)  always returns 8-byte aligned memory addresses, so "
8154 "these functions are needed only if you require larger alignment values."
8155 msgstr ""
8156 "glibc の B<malloc>(3) は常に 8 バイトにアラインメントされたメモリアドレスを\n"
8157 "返すので、ここで述べた関数が必要になるのは 8 バイトよりも大きなアラインメン"
8158 "ト\n"
8159 "が必要な場合だけである。"
8160
8161 #. type: Plain text
8162 #: build/C/man3/posix_memalign.3:277
8163 msgid "B<brk>(2), B<getpagesize>(2), B<free>(3), B<malloc>(3)"
8164 msgstr "B<brk>(2), B<getpagesize>(2), B<free>(3), B<malloc>(3)"
8165
8166 #. type: TH
8167 #: build/C/man2/readahead.2:28
8168 #, no-wrap
8169 msgid "READAHEAD"
8170 msgstr "READAHEAD"
8171
8172 #. type: TH
8173 #: build/C/man2/readahead.2:28
8174 #, no-wrap
8175 msgid "2014-03-15"
8176 msgstr "2014-03-15"
8177
8178 #. type: Plain text
8179 #: build/C/man2/readahead.2:31
8180 msgid "readahead - initiate file readahead into page cache"
8181 msgstr "readahead - 前もってファイルをページ・キャッシュに読み込む"
8182
8183 #. type: Plain text
8184 #: build/C/man2/readahead.2:37
8185 #, no-wrap
8186 msgid "B<ssize_t readahead(int >I<fd>B<, off64_t >I<offset>B<, size_t >I<count>B<);>\n"
8187 msgstr "B<ssize_t readahead(int >I<fd>B<, off64_t >I<offset>B<, size_t >I<count>B<);>\n"
8188
8189 #. type: Plain text
8190 #: build/C/man2/readahead.2:44
8191 msgid ""
8192 "B<readahead>()  initiates readahead on a file so that subsequent reads from "
8193 "that file will be satisfied from the cache, and not block on disk I/O "
8194 "(assuming the readahead was initiated early enough and that other activity "
8195 "on the system did not in the meantime flush pages from the cache)."
8196 msgstr ""
8197
8198 #. type: Plain text
8199 #: build/C/man2/readahead.2:66
8200 msgid ""
8201 "The I<fd> argument is a file descriptor identifying the file which is to be "
8202 "read.  The I<offset> argument specifies the starting point from which data "
8203 "is to be read and I<count> specifies the number of bytes to be read.  I/O is "
8204 "performed in whole pages, so that I<offset> is effectively rounded down to a "
8205 "page boundary and bytes are read up to the next page boundary greater than "
8206 "or equal to I<(offset+count)>.  B<readahead>()  does not read beyond the end "
8207 "of the file.  The current file offset of the open file referred to by I<fd> "
8208 "is left unchanged."
8209 msgstr ""
8210 "I<fd> 引き数は読み込みを行うファイルを識別するファイル・ディスクリプタであ"
8211 "る。 I<offset> 引き数はデータの読み込み開始位置を指定し、 I<count> は読み込む"
8212 "データのバイト数を指定する。 ディスク I/O はページ単位で実行されるので、 実際"
8213 "には I<offset> はページ境界に切り下げられ、読み込みバイト数は I<(offset"
8214 "+count)> より小さくない次のページ境界まで切り上げられる。 B<readahead>()  は"
8215 "ファイルの末尾を越えた範囲まで読み出しを行うことはない。 I<fd> で参照された"
8216 "オープン済のファイルのファイルオフセットの現在値は 変更されない。"
8217
8218 #. type: Plain text
8219 #: build/C/man2/readahead.2:72
8220 msgid ""
8221 "On success, B<readahead>()  returns 0; on failure, -1 is returned, with "
8222 "I<errno> set to indicate the cause of the error."
8223 msgstr ""
8224 "B<readahead>()  は成功すると 0 を返す。失敗した場合 -1 を返し、 I<errno> にエ"
8225 "ラーの原因を示す値を設定する。"
8226
8227 #. type: Plain text
8228 #: build/C/man2/readahead.2:77
8229 msgid "I<fd> is not a valid file descriptor or is not open for reading."
8230 msgstr ""
8231 "I<fd> が有効なファイル・ディスクリプタでない、または 読み込み用にオープンされ"
8232 "ていない。"
8233
8234 #. type: Plain text
8235 #: build/C/man2/readahead.2:83
8236 msgid ""
8237 "I<fd> does not refer to a file type to which B<readahead>()  can be applied."
8238 msgstr ""
8239 "I<fd> が参照しているファイルが、 B<readahead>()  を行うことができないタイプの"
8240 "ファイルであった。"
8241
8242 #. type: Plain text
8243 #: build/C/man2/readahead.2:88
8244 msgid ""
8245 "The B<readahead>()  system call appeared in Linux 2.4.13; glibc support has "
8246 "been provided since version 2.3."
8247 msgstr ""
8248 "B<readahead>()  システムコールは Linux 2.4.13 で登場した。 glibc でのサポート"
8249 "は glibc バージョン 2.3 以降で行われている。"
8250
8251 #. type: Plain text
8252 #: build/C/man2/readahead.2:93
8253 msgid ""
8254 "The B<readahead>()  system call is Linux-specific, and its use should be "
8255 "avoided in portable applications."
8256 msgstr ""
8257 "B<readahead>()  システムコールは Linux 固有であり、移植を考慮したプログラムで"
8258 "は 使用を避けるべきである。"
8259
8260 #. type: Plain text
8261 #: build/C/man2/readahead.2:98
8262 msgid ""
8263 "On some 32-bit architectures, the calling signature for this system call "
8264 "differs, for the reasons described in B<syscall>(2)."
8265 msgstr ""
8266 "いくつかの 32 ビットアーキテクチャでは、このシステムコールの呼び出しシグネ"
8267 "チャーが違っている。 理由は B<syscall>(2) で説明されている。"
8268
8269 #. type: Plain text
8270 #: build/C/man2/readahead.2:107
8271 msgid ""
8272 "B<readahead>()  attempts to schedule the reads in the background and return "
8273 "immediately.  However, it may block while it reads the filesystem metadata "
8274 "needed to locate the requested blocks.  This occurs frequently with ext[234] "
8275 "on large files using indirect blocks instead of extents, giving the "
8276 "appearance that the call blocks until the requested data has been read."
8277 msgstr ""
8278
8279 #. type: Plain text
8280 #: build/C/man2/readahead.2:113
8281 msgid "B<lseek>(2), B<madvise>(2), B<mmap>(2), B<posix_fadvise>(2), B<read>(2)"
8282 msgstr ""
8283 "B<lseek>(2), B<madvise>(2), B<mmap>(2), B<posix_fadvise>(2), B<read>(2)"
8284
8285 #. type: TH
8286 #: build/C/man2/remap_file_pages.2:28
8287 #, no-wrap
8288 msgid "REMAP_FILE_PAGES"
8289 msgstr "REMAP_FILE_PAGES"
8290
8291 #. type: TH
8292 #: build/C/man2/remap_file_pages.2:28
8293 #, no-wrap
8294 msgid "2008-04-22"
8295 msgstr "2008-04-22"
8296
8297 #. type: Plain text
8298 #: build/C/man2/remap_file_pages.2:31
8299 msgid "remap_file_pages - create a nonlinear file mapping"
8300 msgstr "remap_file_pages - 非線形ファイルマッピングを作成する。"
8301
8302 #. type: Plain text
8303 #: build/C/man2/remap_file_pages.2:35
8304 #, no-wrap
8305 msgid ""
8306 "B<#define _GNU_SOURCE>         /* See feature_test_macros(7) */\n"
8307 "B<#include E<lt>sys/mman.hE<gt>>\n"
8308 msgstr ""
8309 "B<#define _GNU_SOURCE>         /* feature_test_macros(7) 参照 */\n"
8310 "B<#include E<lt>sys/mman.hE<gt>>\n"
8311
8312 #. type: Plain text
8313 #: build/C/man2/remap_file_pages.2:38
8314 #, no-wrap
8315 msgid ""
8316 "B<int remap_file_pages(void *>I<addr>B<, size_t >I<size>B<, int >I<prot>B<,>\n"
8317 "B<                     ssize_t >I<pgoff>B<, int >I<flags>B<);>\n"
8318 msgstr ""
8319 "B<int remap_file_pages(void *>I<addr>B<, size_t >I<size>B<, int >I<prot>B<,>\n"
8320 "B<                     ssize_t >I<pgoff>B<, int >I<flags>B<);>\n"
8321
8322 #. type: Plain text
8323 #: build/C/man2/remap_file_pages.2:51
8324 msgid ""
8325 "The B<remap_file_pages>()  system call is used to create a nonlinear "
8326 "mapping, that is, a mapping in which the pages of the file are mapped into a "
8327 "nonsequential order in memory.  The advantage of using B<remap_file_pages>"
8328 "()  over using repeated calls to B<mmap>(2)  is that the former approach "
8329 "does not require the kernel to create additional VMA (Virtual Memory Area) "
8330 "data structures."
8331 msgstr ""
8332 "B<remap_file_pages>()  システムコールは非線形なマッピング、 つまりファイルの"
8333 "ページがメモリ上で連続しない順番でマップされる マッピングを作成するために使わ"
8334 "れる。 B<remap_file_pages>()  を使う方が B<mmap>(2)  を繰り返して使うより優れ"
8335 "ている点は、 前者の方法ではカーネルが VMA (Virtual Memory Area, 仮想メモリ領"
8336 "域)  データ構造体を追加で作成する必要がないことである。"
8337
8338 #. type: Plain text
8339 #: build/C/man2/remap_file_pages.2:53
8340 msgid "To create a nonlinear mapping we perform the following steps:"
8341 msgstr "非線形マッピングを作成するためには、 以下のようなステップを実行する:"
8342
8343 #. type: TP
8344 #: build/C/man2/remap_file_pages.2:53
8345 #, no-wrap
8346 msgid "1."
8347 msgstr "1."
8348
8349 #. type: Plain text
8350 #: build/C/man2/remap_file_pages.2:61
8351 msgid ""
8352 "Use B<mmap>(2)  to create a mapping (which is initially linear).  This "
8353 "mapping must be created with the B<MAP_SHARED> flag."
8354 msgstr ""
8355 "B<mmap>(2)  を使い、マッピングを作成する (このマッピングは最初は線形であ"
8356 "る)。 このマッピングは B<MAP_SHARED> フラグを指定して作成されなければならな"
8357 "い。"
8358
8359 #. type: TP
8360 #: build/C/man2/remap_file_pages.2:61
8361 #, no-wrap
8362 msgid "2."
8363 msgstr "2."
8364
8365 #. type: Plain text
8366 #: build/C/man2/remap_file_pages.2:69
8367 msgid ""
8368 "Use one or more calls to B<remap_file_pages>()  to rearrange the "
8369 "correspondence between the pages of the mapping and the pages of the file.  "
8370 "It is possible to map the same page of a file into multiple locations within "
8371 "the mapped region."
8372 msgstr ""
8373 "B<remap_file_pages>()  を 1 回以上呼び出して、 マッピングのページとファイルの"
8374 "ページの対応関係を再構成する。 ファイルの同じページをマッピング領域の複数の場"
8375 "所に マップすることが可能である。"
8376
8377 #. type: Plain text
8378 #: build/C/man2/remap_file_pages.2:80
8379 msgid ""
8380 "The I<pgoff> and I<size> arguments specify the region of the file that is to "
8381 "be relocated within the mapping: I<pgoff> is a file offset in units of the "
8382 "system page size; I<size> is the length of the region in bytes."
8383 msgstr ""
8384 "I<pgoff> と I<size> 引き数は、マッピング内で再配置されるファイルの領域を指定"
8385 "する。 I<pgoff> はファイルオフセットであり、単位はシステムのページサイズであ"
8386 "る。 I<size> は領域の長さであり、単位はバイトである。"
8387
8388 #. type: Plain text
8389 #: build/C/man2/remap_file_pages.2:98
8390 msgid ""
8391 "The I<addr> argument serves two purposes.  First, it identifies the mapping "
8392 "whose pages we want to rearrange.  Thus, I<addr> must be an address that "
8393 "falls within a region previously mapped by a call to B<mmap>(2).  Second, "
8394 "I<addr> specifies the address at which the file pages identified by I<pgoff> "
8395 "and I<size> will be placed."
8396 msgstr ""
8397 "I<addr> 引き数は 2 つの目的で使われる。 第 1 の目的は、この引き数によって再編"
8398 "成したいページの マッピングを識別することである。 よって I<addr> は B<mmap>"
8399 "(2)  の呼び出しで過去にマップされた領域内のアドレスでなければならない。 第 2 "
8400 "の目的は、 I<pgoff> と I<size> で識別されるファイルページが置かれる予定のアド"
8401 "レスを、 I<addr> によって指定することである。"
8402
8403 #.  This rounding is weird, and not consistent with the treatment of
8404 #.  the analogous arguments for munmap()/mprotect() and for mlock().
8405 #.  MTK, 14 Sep 2005
8406 #. type: Plain text
8407 #: build/C/man2/remap_file_pages.2:112
8408 msgid ""
8409 "The values specified in I<addr> and I<size> should be multiples of the "
8410 "system page size.  If they are not, then the kernel rounds I<both> values "
8411 "I<down> to the nearest multiple of the page size."
8412 msgstr ""
8413 "I<addr> と I<size> に指定する値は、システムのページサイズの倍数とすべきであ"
8414 "る。 それ以外の場合、カーネルは「両方」の値を 最も近いページサイズの倍数へ"
8415 "「切り下げる」。"
8416
8417 #. type: Plain text
8418 #: build/C/man2/remap_file_pages.2:116
8419 msgid "The I<prot> argument must be specified as 0."
8420 msgstr "I<prot> 引き数は 0 に指定されなければならない。"
8421
8422 #. type: Plain text
8423 #: build/C/man2/remap_file_pages.2:124
8424 msgid ""
8425 "The I<flags> argument has the same meaning as for B<mmap>(2), but all flags "
8426 "other than B<MAP_NONBLOCK> are ignored."
8427 msgstr ""
8428 "I<flags> 引き数は B<mmap>(2)  のものと同じ意味であるが、 B<MAP_NONBLOCK> 以外"
8429 "の全てのフラグは無視される。"
8430
8431 #. type: Plain text
8432 #: build/C/man2/remap_file_pages.2:131
8433 msgid ""
8434 "On success, B<remap_file_pages>()  returns 0.  On error, -1 is returned, and "
8435 "I<errno> is set appropriately."
8436 msgstr ""
8437 "成功した場合、 B<remap_file_pages>()  は 0 を返す。 エラーの場合、-1 が返さ"
8438 "れ、 I<errno> が適切に設定される。"
8439
8440 #. type: Plain text
8441 #: build/C/man2/remap_file_pages.2:139
8442 msgid ""
8443 "I<addr> does not refer to a valid mapping created with the B<MAP_SHARED> "
8444 "flag."
8445 msgstr ""
8446 "I<addr> が B<MAP_SHARED> フラグを指定して作成された有効なマッピングを参照して"
8447 "いない。"
8448
8449 #.  And possibly others from vma->vm_ops->populate()
8450 #. type: Plain text
8451 #: build/C/man2/remap_file_pages.2:148
8452 msgid "I<addr>, I<size>, I<prot>, or I<pgoff> is invalid."
8453 msgstr "I<addr>, I<size>, I<prot>, I<pgoff> のいずれかが不正である。"
8454
8455 #. type: Plain text
8456 #: build/C/man2/remap_file_pages.2:153
8457 msgid ""
8458 "The B<remap_file_pages>()  system call appeared in Linux 2.5.46; glibc "
8459 "support was added in version 2.3.3."
8460 msgstr ""
8461 "B<remap_file_pages>()  システムコールは Linux 2.5.46 で登場した。 glibc での"
8462 "サポートは glibc バージョン 2.3.3 で追加された。"
8463
8464 #. type: Plain text
8465 #: build/C/man2/remap_file_pages.2:157
8466 msgid "The B<remap_file_pages>()  system call is Linux-specific."
8467 msgstr "B<remap_file_pages>()  システムコールは Linux 固有のものである。"
8468
8469 #. type: Plain text
8470 #: build/C/man2/remap_file_pages.2:164
8471 msgid ""
8472 "B<getpagesize>(2), B<mmap>(2), B<mmap2>(2), B<mprotect>(2), B<mremap>(2), "
8473 "B<msync>(2)"
8474 msgstr ""
8475 "B<getpagesize>(2), B<mmap>(2), B<mmap2>(2), B<mprotect>(2), B<mremap>(2), "
8476 "B<msync>(2)"
8477
8478 #. type: TH
8479 #: build/C/man3/shm_open.3:26
8480 #, no-wrap
8481 msgid "SHM_OPEN"
8482 msgstr "SHM_OPEN"
8483
8484 #. type: TH
8485 #: build/C/man3/shm_open.3:26
8486 #, no-wrap
8487 msgid "2009-02-25"
8488 msgstr "2009-02-25"
8489
8490 #. type: Plain text
8491 #: build/C/man3/shm_open.3:29
8492 msgid ""
8493 "shm_open, shm_unlink - create/open or unlink POSIX shared memory objects"
8494 msgstr ""
8495 "shm_open, shm_unlink - POSIX 共有メモリ・オブジェクトの作成/オープン/削除を行"
8496 "う"
8497
8498 #. type: Plain text
8499 #: build/C/man3/shm_open.3:33
8500 msgid "B<#include E<lt>sys/stat.hE<gt>> /* For mode constants */"
8501 msgstr "B<#include E<lt>sys/stat.hE<gt>> /* mode 定数用 */"
8502
8503 #. type: Plain text
8504 #: build/C/man3/shm_open.3:35
8505 msgid "B<#include E<lt>fcntl.hE<gt>> /* For O_* constants */"
8506 msgstr "B<#include E<lt>fcntl.hE<gt>> /* O_* 定数の定義用 */"
8507
8508 #. type: Plain text
8509 #: build/C/man3/shm_open.3:37
8510 msgid ""
8511 "B<int shm_open(const char *>I<name>B<, int >I<oflag>B<, mode_t >I<mode>B<);>"
8512 msgstr ""
8513 "B<int shm_open(const char *>I<name>B<, int >I<oflag>B<, mode_t >I<mode>B<);>"
8514
8515 #. type: Plain text
8516 #: build/C/man3/shm_open.3:39
8517 msgid "B<int shm_unlink(const char *>I<name>B<);>"
8518 msgstr "B<int shm_unlink(const char *>I<name>B<);>"
8519
8520 #. type: Plain text
8521 #: build/C/man3/shm_open.3:41
8522 msgid "Link with I<-lrt>."
8523 msgstr "I<-lrt> でリンクする。"
8524
8525 #. type: Plain text
8526 #: build/C/man3/shm_open.3:53
8527 msgid ""
8528 "B<shm_open>()  creates and opens a new, or opens an existing, POSIX shared "
8529 "memory object.  A POSIX shared memory object is in effect a handle which can "
8530 "be used by unrelated processes to B<mmap>(2)  the same region of shared "
8531 "memory.  The B<shm_unlink>()  function performs the converse operation, "
8532 "removing an object previously created by B<shm_open>()."
8533 msgstr ""
8534 "B<shm_open>()  は、POSIX 共有メモリ・オブジェクトを新規に作成/オープンした"
8535 "り、 すでに存在するオブジェクトをオープンしたりする。 POSIX 共有メモリ・オブ"
8536 "ジェクトは、実際には、関係のないプロセスが 共有メモリの同じ領域を B<mmap>"
8537 "(2)  するために使用することができる手段である。 B<shm_unlink>()  は、逆の操"
8538 "作、つまり以前に B<shm_open>()  で作成されたオブジェクトの削除を行う。"
8539
8540 #.  glibc allows the initial slash to be omitted, and makes
8541 #.  multiple initial slashes equivalent to a single slash.
8542 #.  This differs from the implementation of POSIX message queues.
8543 #.  glibc allows subdirectory components in the name, in which
8544 #.  case the subdirectory must exist under /dev/shm, and allow the
8545 #.  required permissions if a user wants to create a shared memory
8546 #.  object in that subdirectory.
8547 #. type: Plain text
8548 #: build/C/man3/shm_open.3:74
8549 msgid ""
8550 "The operation of B<shm_open>()  is analogous to that of B<open>(2).  I<name> "
8551 "specifies the shared memory object to be created or opened.  For portable "
8552 "use, a shared memory object should be identified by a name of the form I</"
8553 "somename>; that is, a null-terminated string of up to B<NAME_MAX> (i.e., "
8554 "255) characters consisting of an initial slash, followed by one or more "
8555 "characters, none of which are slashes."
8556 msgstr ""
8557 "B<shm_open>()  の動作は B<open>(2)  とよく似ている。 I<name> で作成したりオー"
8558 "プンしたりする共有メモリ・オブジェクトを指定する。 移植性を持たせるためには、"
8559 "共有メモリ・オブジェクトは I</somename> という形式の名前で識別し、 その名前"
8560 "は、最大で B<NAME_MAX> (すなわち 255) 文字の NULL 終端された文字列で、 スラッ"
8561 "シュで始まり、スラッシュ以外の文字が 1 文字以上続く形式 にすべきである。"
8562
8563 #. type: Plain text
8564 #: build/C/man3/shm_open.3:81
8565 msgid ""
8566 "I<oflag> is a bit mask created by ORing together exactly one of B<O_RDONLY> "
8567 "or B<O_RDWR> and any of the other flags listed here:"
8568 msgstr ""
8569 "I<oflag> はビットマスクで、 B<O_RDONLY> と B<O_RDWR> のいずれか一方と、以下に"
8570 "述べる他のフラグの論理和をとったもの を指定する。"
8571
8572 #. type: TP
8573 #: build/C/man3/shm_open.3:81
8574 #, no-wrap
8575 msgid "B<O_RDONLY>"
8576 msgstr "B<O_RDONLY>"
8577
8578 #. type: Plain text
8579 #: build/C/man3/shm_open.3:89
8580 msgid ""
8581 "Open the object for read access.  A shared memory object opened in this way "
8582 "can be B<mmap>(2)ed only for read (B<PROT_READ>)  access."
8583 msgstr ""
8584 "読み出しアクセス用にオブジェクトをオープンする。 このフラグを指定してオープン"
8585 "された共有メモリ・オブジェクトは、 読み出し (B<PROT_READ>) アクセスでのみ "
8586 "B<mmap>(2)  することができる。"
8587
8588 #. type: TP
8589 #: build/C/man3/shm_open.3:89
8590 #, no-wrap
8591 msgid "B<O_RDWR>"
8592 msgstr "B<O_RDWR>"
8593
8594 #. type: Plain text
8595 #: build/C/man3/shm_open.3:92
8596 msgid "Open the object for read-write access."
8597 msgstr "読み書きアクセス用にオブジェクトをオープンする。"
8598
8599 #. type: TP
8600 #: build/C/man3/shm_open.3:92
8601 #, no-wrap
8602 msgid "B<O_CREAT>"
8603 msgstr "B<O_CREAT>"
8604
8605 #.  In truth it is actually the filesystem IDs on Linux, but these
8606 #.  are nearly always the same as the effective IDs.  (MTK, Jul 05)
8607 #. type: Plain text
8608 #: build/C/man3/shm_open.3:112
8609 msgid ""
8610 "Create the shared memory object if it does not exist.  The user and group "
8611 "ownership of the object are taken from the corresponding effective IDs of "
8612 "the calling process, and the object's permission bits are set according to "
8613 "the low-order 9 bits of I<mode>, except that those bits set in the process "
8614 "file mode creation mask (see B<umask>(2))  are cleared for the new object.  "
8615 "A set of macro constants which can be used to define I<mode> is listed in "
8616 "B<open>(2).  (Symbolic definitions of these constants can be obtained by "
8617 "including I<E<lt>sys/stat.hE<gt>>.)"
8618 msgstr ""
8619 "存在しない場合、共有メモリ・オブジェクトを作成する。 オブジェクトのユーザとグ"
8620 "ループの所有権は、 呼び出し元プロセスの対応する実効 ID が使われ、 オブジェク"
8621 "トの許可ビットは I<mode> の下位 9 ビットに基づいて設定される。ただし、 ファイ"
8622 "ルモード作成マスク (B<umask>(2)  参照) に設定されている値は、新規オブジェクト"
8623 "に関してはクリアされる。 I<mode> を定義するために使用できるマクロ定数(群)は "
8624 "B<open>(2)  に記載されている (これらの定数のシンボル定義は I<E<lt>sys/stat."
8625 "hE<gt>> のインクルードにより得られる)。"
8626
8627 #. type: Plain text
8628 #: build/C/man3/shm_open.3:118
8629 msgid ""
8630 "A new shared memory object initially has zero length\\(emthe size of the "
8631 "object can be set using B<ftruncate>(2).  The newly allocated bytes of a "
8632 "shared memory object are automatically initialized to 0."
8633 msgstr ""
8634 "新規に作成された共有メモリ・オブジェクトは長さ 0 で初期化される。 オブジェク"
8635 "トの大きさは B<ftruncate>(2)  を使って設定できる。 共有メモリ・オブジェクトと"
8636 "して新規に確保されたバイトは自動的に 0 に初期化される。"
8637
8638 #. type: TP
8639 #: build/C/man3/shm_open.3:118
8640 #, no-wrap
8641 msgid "B<O_EXCL>"
8642 msgstr "B<O_EXCL>"
8643
8644 #. type: Plain text
8645 #: build/C/man3/shm_open.3:127
8646 msgid ""
8647 "If B<O_CREAT> was also specified, and a shared memory object with the given "
8648 "I<name> already exists, return an error.  The check for the existence of the "
8649 "object, and its creation if it does not exist, are performed atomically."
8650 msgstr ""
8651 "B<O_CREAT> が一緒に指定されており、 I<name> で指定された共有メモリ・オブジェ"
8652 "クトが既に存在した場合、 エラーを返す。 オブジェクトの存在確認と、存在しな"
8653 "かった場合のオブジェクト作成は、 必ず一連の操作として実行される (performed "
8654 "atomically)。"
8655
8656 #. type: TP
8657 #: build/C/man3/shm_open.3:127
8658 #, no-wrap
8659 msgid "B<O_TRUNC>"
8660 msgstr "B<O_TRUNC>"
8661
8662 #. type: Plain text
8663 #: build/C/man3/shm_open.3:130
8664 msgid "If the shared memory object already exists, truncate it to zero bytes."
8665 msgstr ""
8666 "共有メモリ・オブジェクトがすでに存在した場合、 そのオブジェクトを 0 バイトに"
8667 "切り詰める。"
8668
8669 #. type: Plain text
8670 #: build/C/man3/shm_open.3:133
8671 msgid ""
8672 "Definitions of these flag values can be obtained by including I<E<lt>fcntl."
8673 "hE<gt>>."
8674 msgstr ""
8675 "これらのフラグ値の定義は I<E<lt>fcntl.hE<gt>> のインクルードにより得られる。"
8676
8677 #. type: Plain text
8678 #: build/C/man3/shm_open.3:144
8679 msgid ""
8680 "On successful completion B<shm_open>()  returns a new file descriptor "
8681 "referring to the shared memory object.  This file descriptor is guaranteed "
8682 "to be the lowest-numbered file descriptor not previously opened within the "
8683 "process.  The B<FD_CLOEXEC> flag (see B<fcntl>(2))  is set for the file "
8684 "descriptor."
8685 msgstr ""
8686 "成功して完了した場合、 B<shm_open>()  は共有メモリ・オブジェクトを参照する新"
8687 "しいファイル・ディスクリプタを返す。 このファイル・ディスクリプタは、そのプロ"
8688 "セス内で過去にオープンされていない ファイル・ディスクリプタの中で最も小さな数"
8689 "になることが保証される。 B<FD_CLOEXEC> フラグ (B<fcntl>(2)  を参照) が、この"
8690 "ファイル・ディスクリプタに設定される。"
8691
8692 #. type: Plain text
8693 #: build/C/man3/shm_open.3:153
8694 msgid ""
8695 "The file descriptor is normally used in subsequent calls to B<ftruncate>(2)  "
8696 "(for a newly created object) and B<mmap>(2).  After a call to B<mmap>(2)  "
8697 "the file descriptor may be closed without affecting the memory mapping."
8698 msgstr ""
8699 "通常、これらのファイル・ディスクリプタは、この後続けて実行される B<ftruncate>"
8700 "(2)  (新規に作成されたオブジェクトの場合のみ) と B<mmap>(2)  の呼び出しに使用"
8701 "される。 B<mmap>(2)  を呼び出した後は、ファイル・ディスクリプタをクローズして"
8702 "もよく、 クローズしてもメモリ・マッピングに影響を与えることはない。"
8703
8704 #. type: Plain text
8705 #: build/C/man3/shm_open.3:171
8706 msgid ""
8707 "The operation of B<shm_unlink>()  is analogous to B<unlink>(2): it removes a "
8708 "shared memory object name, and, once all processes have unmapped the object, "
8709 "de-allocates and destroys the contents of the associated memory region.  "
8710 "After a successful B<shm_unlink>(), attempts to B<shm_open>()  an object "
8711 "with the same I<name> will fail (unless B<O_CREAT> was specified, in which "
8712 "case a new, distinct object is created)."
8713 msgstr ""
8714 "B<shm_unlink>()  の動作は B<unlink>(2)  とよく似ている: 共有メモリ・オブジェ"
8715 "クト名を削除し、すべてのプロセスが処理対象の オブジェクトをアンマップした時点"
8716 "でオブジェクトの割り当てを解除し、 対応するメモリ領域の内容を破棄する。 "
8717 "B<shm_unlink>()  が成功した後で、同じ I<name> を持つオブジェクトに対して "
8718 "B<shm_open>()  を行うと、 (B<O_CREAT> が指定されていない場合) 失敗する。 "
8719 "(B<O_CREAT> が指定されている場合、新しく別のオブジェクトが作成される)。"
8720
8721 #. type: Plain text
8722 #: build/C/man3/shm_open.3:180
8723 msgid ""
8724 "On success, B<shm_open>()  returns a nonnegative file descriptor.  On "
8725 "failure, B<shm_open>()  returns -1.  B<shm_unlink>()  returns 0 on success, "
8726 "or -1 on error."
8727 msgstr ""
8728 "成功した場合、 B<shm_open>()  は非負のファイル・ディスクリプタを返す。 失敗し"
8729 "た場合、 B<shm_open>()  は -1 を返す。 B<shm_unlink>()  は、成功した場合 0 "
8730 "を、エラーが起こった場合 -1 を返す。"
8731
8732 #. type: Plain text
8733 #: build/C/man3/shm_open.3:187
8734 msgid ""
8735 "On failure, I<errno> is set to indicate the cause of the error.  Values "
8736 "which may appear in I<errno> include the following:"
8737 msgstr ""
8738 "失敗した場合、エラーの原因を示すため I<errno> が設定される。 I<errno> に設定"
8739 "される値は以下の通りである:"
8740
8741 #. type: Plain text
8742 #: build/C/man3/shm_open.3:192
8743 msgid "Permission to B<shm_unlink>()  the shared memory object was denied."
8744 msgstr "共有メモリオブジェクトを B<shm_unlink>()  する権限がなかった。"
8745
8746 #. type: Plain text
8747 #: build/C/man3/shm_open.3:202
8748 msgid ""
8749 "Permission was denied to B<shm_open>()  I<name> in the specified I<mode>, or "
8750 "B<O_TRUNC> was specified and the caller does not have write permission on "
8751 "the object."
8752 msgstr ""
8753 "指定された I<mode> で I<name> を B<shm_open>()  する権限がなかった。もしく"
8754 "は、 B<O_TRUNC> が指定されたが、呼び出し元にはそのオブジェクトに対する書き込"
8755 "み権限が なかった。"
8756
8757 #. type: TP
8758 #: build/C/man3/shm_open.3:202 build/C/man2/shmget.2:195
8759 #, no-wrap
8760 msgid "B<EEXIST>"
8761 msgstr "B<EEXIST>"
8762
8763 #. type: Plain text
8764 #: build/C/man3/shm_open.3:213
8765 msgid ""
8766 "Both B<O_CREAT> and B<O_EXCL> were specified to B<shm_open>()  and the "
8767 "shared memory object specified by I<name> already exists."
8768 msgstr ""
8769 "B<O_CREAT> と B<O_EXCL> の両方が B<shm_open>()  に指定されたが、 I<name> で指"
8770 "定された共有メモリ・オブジェクトが既に存在した。"
8771
8772 #. type: Plain text
8773 #: build/C/man3/shm_open.3:220
8774 msgid "The I<name> argument to B<shm_open>()  was invalid."
8775 msgstr "B<shm_open>()  に与えられた I<name> 引き数が不正であった。"
8776
8777 #. type: TP
8778 #: build/C/man3/shm_open.3:220
8779 #, no-wrap
8780 msgid "B<EMFILE>"
8781 msgstr "B<EMFILE>"
8782
8783 #. type: Plain text
8784 #: build/C/man3/shm_open.3:223
8785 msgid "The process already has the maximum number of files open."
8786 msgstr "プロセスがオープン可能なファイル数の上限にすでに達していた。"
8787
8788 #. type: TP
8789 #: build/C/man3/shm_open.3:223
8790 #, no-wrap
8791 msgid "B<ENAMETOOLONG>"
8792 msgstr "B<ENAMETOOLONG>"
8793
8794 #. type: Plain text
8795 #: build/C/man3/shm_open.3:229
8796 msgid "The length of I<name> exceeds B<PATH_MAX>."
8797 msgstr "I<name> の長さが B<PATH_MAX> を越えている。"
8798
8799 #. type: Plain text
8800 #: build/C/man3/shm_open.3:233
8801 msgid ""
8802 "The limit on the total number of files open on the system has been reached."
8803 msgstr "ファイルシステムでオープンできるファイル数の上限に達した。"
8804
8805 #. type: TP
8806 #: build/C/man3/shm_open.3:233 build/C/man3/shm_open.3:242
8807 #: build/C/man2/shmget.2:209
8808 #, no-wrap
8809 msgid "B<ENOENT>"
8810 msgstr "B<ENOENT>"
8811
8812 #. type: Plain text
8813 #: build/C/man3/shm_open.3:242
8814 msgid ""
8815 "An attempt was made to B<shm_open>()  a I<name> that did not exist, and "
8816 "B<O_CREAT> was not specified."
8817 msgstr ""
8818 "存在していない I<name> のオブジェクトを B<shm_open>()  しようとしたが、 "
8819 "B<O_CREAT> が指定されていなかった。"
8820
8821 #. type: Plain text
8822 #: build/C/man3/shm_open.3:249
8823 msgid ""
8824 "An attempt was to made to B<shm_unlink>()  a I<name> that does not exist."
8825 msgstr "存在しない I<name> のオブジェクトを B<shm_unlink>()  しようとした。"
8826
8827 #. type: Plain text
8828 #: build/C/man3/shm_open.3:251
8829 msgid "These functions are provided in glibc 2.2 and later."
8830 msgstr "これらの関数は glibc 2.2 以降で提供されている。"
8831
8832 #. type: Plain text
8833 #: build/C/man3/shm_open.3:257
8834 msgid ""
8835 "POSIX.1-2001 says that the group ownership of a newly created shared memory "
8836 "object is set to either the calling process's effective group ID or \"a "
8837 "system default group ID\"."
8838 msgstr ""
8839 "POSIX.1-2001 には、新規に作成される共有メモリオブジェクトのグループ所有権"
8840 "は、 呼び出し元プロセスの実効グループ ID か 「システムのデフォルトのグループ "
8841 "ID」 のどちらかに設定される、と書かれている。"
8842
8843 #. type: Plain text
8844 #: build/C/man3/shm_open.3:266
8845 msgid ""
8846 "POSIX leaves the behavior of the combination of B<O_RDONLY> and B<O_TRUNC> "
8847 "unspecified.  On Linux, this will successfully truncate an existing shared "
8848 "memory object\\(emthis may not be so on other UNIX systems."
8849 msgstr ""
8850 "POSIX は B<O_RDONLY> と B<O_TRUNC> が一緒に指定された場合の動作を未定義にして"
8851 "いる。Linux では、 既存の共有メモリ・オブジェクトに対する切り詰め (truncate) "
8852 "は成功する。 しかし、他の UNIX システムでも同じであるとは限らない。"
8853
8854 #. type: Plain text
8855 #: build/C/man3/shm_open.3:271
8856 msgid ""
8857 "The POSIX shared memory object implementation on Linux 2.4 makes use of a "
8858 "dedicated filesystem, which is normally mounted under I</dev/shm>."
8859 msgstr ""
8860 "Linux 2.4 における POSIX 共有メモリ・オブジェクトの実装は 専用のファイルシス"
8861 "テムを使用する。そのファイルシステムは通常 I</dev/shm> にマウントされる。"
8862
8863 #. type: Plain text
8864 #: build/C/man3/shm_open.3:282
8865 msgid ""
8866 "B<close>(2), B<fchmod>(2), B<fchown>(2), B<fcntl>(2), B<fstat>(2), "
8867 "B<ftruncate>(2), B<mmap>(2), B<open>(2), B<umask>(2), B<shm_overview>(7)"
8868 msgstr ""
8869 "B<close>(2), B<fchmod>(2), B<fchown>(2), B<fcntl>(2), B<fstat>(2), "
8870 "B<ftruncate>(2), B<mmap>(2), B<open>(2), B<umask>(2), B<shm_overview>(7)"
8871
8872 #. type: TH
8873 #: build/C/man7/shm_overview.7:27
8874 #, no-wrap
8875 msgid "SHM_OVERVIEW"
8876 msgstr "SHM_OVERVIEW"
8877
8878 #. type: TH
8879 #: build/C/man7/shm_overview.7:27
8880 #, no-wrap
8881 msgid "2010-09-10"
8882 msgstr "2010-09-10"
8883
8884 #. type: Plain text
8885 #: build/C/man7/shm_overview.7:30
8886 msgid "shm_overview - overview of POSIX shared memory"
8887 msgstr "shm_overview - POSIX 共有メモリの概要"
8888
8889 #. type: Plain text
8890 #: build/C/man7/shm_overview.7:33
8891 msgid ""
8892 "The POSIX shared memory API allows processes to communicate information by "
8893 "sharing a region of memory."
8894 msgstr ""
8895 "POSIX 共有メモリ API を使用すると、メモリのある領域を共有して、 プロセス間で"
8896 "情報をやり取りすることができる。"
8897
8898 #. type: Plain text
8899 #: build/C/man7/shm_overview.7:35
8900 msgid "The interfaces employed in the API are:"
8901 msgstr "この API では以下のインターフェースが採用されている。"
8902
8903 #. type: TP
8904 #: build/C/man7/shm_overview.7:35
8905 #, no-wrap
8906 msgid "B<shm_open>(3)"
8907 msgstr "B<shm_open>(3)"
8908
8909 #. type: Plain text
8910 #: build/C/man7/shm_overview.7:42
8911 msgid ""
8912 "Create and open a new object, or open an existing object.  This is analogous "
8913 "to B<open>(2).  The call returns a file descriptor for use by the other "
8914 "interfaces listed below."
8915 msgstr ""
8916 "新しいオブジェクトを生成しオープンする、もしくは 既存のオブジェクトをオープン"
8917 "する。これは B<open>(2)  と同じである。下記にある他のインターフェースで使用す"
8918 "る ファイルディスクリプタを返す。"
8919
8920 #. type: TP
8921 #: build/C/man7/shm_overview.7:42
8922 #, no-wrap
8923 msgid "B<ftruncate>(2)"
8924 msgstr "B<ftruncate>(2)"
8925
8926 #. type: Plain text
8927 #: build/C/man7/shm_overview.7:46
8928 msgid ""
8929 "Set the size of the shared memory object.  (A newly created shared memory "
8930 "object has a length of zero.)"
8931 msgstr "共有メモリオブジェクトの大きさを設定する。"
8932
8933 #. type: Plain text
8934 #: build/C/man7/shm_overview.7:50
8935 msgid ""
8936 "Map the shared memory object into the virtual address space of the calling "
8937 "process."
8938 msgstr ""
8939 "呼び出したプロセスの仮想アドレス空間に共有メモリオブジェクトを マップする。"
8940
8941 #. type: TP
8942 #: build/C/man7/shm_overview.7:50
8943 #, no-wrap
8944 msgid "B<munmap>(2)"
8945 msgstr "B<munmap>(2)"
8946
8947 #. type: Plain text
8948 #: build/C/man7/shm_overview.7:54
8949 msgid ""
8950 "Unmap the shared memory object from the virtual address space of the calling "
8951 "process."
8952 msgstr ""
8953 "呼び出したプロセスの仮想アドレス空間から 共有メモリオブジェクトをアンマップす"
8954 "る。"
8955
8956 #. type: TP
8957 #: build/C/man7/shm_overview.7:54
8958 #, no-wrap
8959 msgid "B<shm_unlink>(3)"
8960 msgstr "B<shm_unlink>(3)"
8961
8962 #. type: Plain text
8963 #: build/C/man7/shm_overview.7:57
8964 msgid "Remove a shared memory object name."
8965 msgstr "共有メモリオブジェクト名を削除する。"
8966
8967 #. type: TP
8968 #: build/C/man7/shm_overview.7:57
8969 #, no-wrap
8970 msgid "B<close>(2)"
8971 msgstr "B<close>(2)"
8972
8973 #. type: Plain text
8974 #: build/C/man7/shm_overview.7:62
8975 msgid ""
8976 "Close the file descriptor allocated by B<shm_open>(3)  when it is no longer "
8977 "needed."
8978 msgstr ""
8979 "B<shm_open>(3)  で割り当てられたファイルディスクリプタが不要になった際に、 そ"
8980 "のファイルディスクリプタをクローズする。"
8981
8982 #. type: TP
8983 #: build/C/man7/shm_overview.7:62
8984 #, no-wrap
8985 msgid "B<fstat>(2)"
8986 msgstr "B<fstat>(2)"
8987
8988 #. type: Plain text
8989 #: build/C/man7/shm_overview.7:76
8990 msgid ""
8991 "Obtain a I<stat> structure that describes the shared memory object.  Among "
8992 "the information returned by this call are the object's size (I<st_size>), "
8993 "permissions (I<st_mode>), owner (I<st_uid>), and group (I<st_gid>)."
8994 msgstr ""
8995 "その共有メモリオブジェクトについての情報が入った I<stat> 構造体を取得する。 "
8996 "このシステムコールが返す情報には、オブジェクトのサイズ (I<st_size>)、 許可属"
8997 "性 (I<st_mode>)、 所有者 (I<st_uid>)、 グループ (I<st_gid>)  がある。"
8998
8999 #. type: TP
9000 #: build/C/man7/shm_overview.7:76
9001 #, no-wrap
9002 msgid "B<fchown>(2)"
9003 msgstr "B<fchown>(2)"
9004
9005 #. type: Plain text
9006 #: build/C/man7/shm_overview.7:79
9007 msgid "To change the ownership of a shared memory object."
9008 msgstr "共有メモリオブジェクトの所有権を変更する。"
9009
9010 #. type: TP
9011 #: build/C/man7/shm_overview.7:79
9012 #, no-wrap
9013 msgid "B<fchmod>(2)"
9014 msgstr "B<fchmod>(2)"
9015
9016 #. type: Plain text
9017 #: build/C/man7/shm_overview.7:82
9018 msgid "To change the permissions of a shared memory object."
9019 msgstr "共有メモリオブジェクトの許可属性を変更する。"
9020
9021 #. type: SS
9022 #: build/C/man7/shm_overview.7:82
9023 #, no-wrap
9024 msgid "Versions"
9025 msgstr "Versions"
9026
9027 #. type: Plain text
9028 #: build/C/man7/shm_overview.7:84
9029 msgid "POSIX shared memory is supported since Linux 2.4 and glibc 2.2."
9030 msgstr "POSIX 共有メモリは Linux 2.4 と glibc 2.2 以降でサポートされている。"
9031
9032 #. type: SS
9033 #: build/C/man7/shm_overview.7:84
9034 #, no-wrap
9035 msgid "Persistence"
9036 msgstr "持続性"
9037
9038 #. type: Plain text
9039 #: build/C/man7/shm_overview.7:89
9040 msgid ""
9041 "POSIX shared memory objects have kernel persistence: a shared memory object "
9042 "will exist until the system is shut down, or until all processes have "
9043 "unmapped the object and it has been deleted with B<shm_unlink>(3)"
9044 msgstr ""
9045 "POSIX 共有メモリオブジェクトはカーネル内で保持される。 共有メモリオブジェクト"
9046 "は、システムがシャットダウンされるか、 全てのプロセスがそのオブジェクトをアン"
9047 "マップし、 B<shm_unlink>(3)  で削除されるまで、存在し続ける。"
9048
9049 #. type: SS
9050 #: build/C/man7/shm_overview.7:89
9051 #, no-wrap
9052 msgid "Linking"
9053 msgstr "リンク"
9054
9055 #. type: Plain text
9056 #: build/C/man7/shm_overview.7:94
9057 msgid ""
9058 "Programs using the POSIX shared memory API must be compiled with I<cc -lrt> "
9059 "to link against the real-time library, I<librt>."
9060 msgstr ""
9061 "POSIX 共有メモリ API を使用したプログラムは I<cc -lrt> でコンパイルし、リアル"
9062 "タイムライブラリ I<librt> とリンクしなければならない。"
9063
9064 #. type: SS
9065 #: build/C/man7/shm_overview.7:94
9066 #, no-wrap
9067 msgid "Accessing shared memory objects via the filesystem"
9068 msgstr "ファイルシステム経由での共有メモリオブジェクトへのアクセス"
9069
9070 #. type: Plain text
9071 #: build/C/man7/shm_overview.7:101
9072 msgid ""
9073 "On Linux, shared memory objects are created in a (I<tmpfs>)  virtual "
9074 "filesystem, normally mounted under I</dev/shm>.  Since kernel 2.6.19, Linux "
9075 "supports the use of access control lists (ACLs)  to control the permissions "
9076 "of objects in the virtual filesystem."
9077 msgstr ""
9078 "Linux では、共有メモリオブジェクトは通常 I</dev/shm> 以下にマウントされる仮想"
9079 "ファイルシステム (I<tmpfs>)  内に作成される。 カーネル 2.6.19 以降の Linux で"
9080 "は、 仮想ファイルシステム内のオブジェクトの許可属性の制御に、 アクセス制御リ"
9081 "スト (ACL; access control lists) を使うことができる。"
9082
9083 #. type: Plain text
9084 #: build/C/man7/shm_overview.7:106
9085 msgid ""
9086 "Typically, processes must synchronize their access to a shared memory "
9087 "object, using, for example, POSIX semaphores."
9088 msgstr ""
9089 "通常は、共有メモリオブジェクトにアクセスするプロセスは、 POSIX セマフォなどを"
9090 "使ってプロセス間で同期をとらなければならない。"
9091
9092 #. type: Plain text
9093 #: build/C/man7/shm_overview.7:114
9094 msgid ""
9095 "System V shared memory (B<shmget>(2), B<shmop>(2), etc.) is an older shared "
9096 "memory API.  POSIX shared memory provides a simpler, and better designed "
9097 "interface; on the other hand POSIX shared memory is somewhat less widely "
9098 "available (especially on older systems) than System V shared memory."
9099 msgstr ""
9100 "System V 共有メモリ (B<shmget>(2), B<shmop>(2)  など) は古い共有メモリ API で"
9101 "ある。 POSIX 共有メモリは、より簡単で、うまく設計されたインタフェースを提供し"
9102 "ている。 一方で、POSIX 共有メモリは System V 共有メモリと比べると 利用できる"
9103 "システムが少ない (特に、古いシステムでは少ない)。"
9104
9105 #. type: Plain text
9106 #: build/C/man7/shm_overview.7:127
9107 msgid ""
9108 "B<fchmod>(2), B<fchown>(2), B<fstat>(2), B<ftruncate>(2), B<mmap>(2), "
9109 "B<mprotect>(2), B<munmap>(2), B<shmget>(2), B<shmop>(2), B<shm_open>(3), "
9110 "B<shm_unlink>(3), B<sem_overview>(7)"
9111 msgstr ""
9112 "B<fchmod>(2), B<fchown>(2), B<fstat>(2), B<ftruncate>(2), B<mmap>(2), "
9113 "B<mprotect>(2), B<munmap>(2), B<shmget>(2), B<shmop>(2), B<shm_open>(3), "
9114 "B<shm_unlink>(3), B<sem_overview>(7)"
9115
9116 #. type: TH
9117 #: build/C/man2/shmctl.2:45
9118 #, no-wrap
9119 msgid "SHMCTL"
9120 msgstr "SHMCTL"
9121
9122 #. type: TH
9123 #: build/C/man2/shmctl.2:45
9124 #, no-wrap
9125 msgid "2014-02-07"
9126 msgstr "2014-02-07"
9127
9128 #. type: Plain text
9129 #: build/C/man2/shmctl.2:48
9130 msgid "shmctl - System V shared memory control"
9131 msgstr "shmctl - System V 共有メモリ (shared memory) を制御する"
9132
9133 #. type: Plain text
9134 #: build/C/man2/shmctl.2:51 build/C/man2/shmget.2:44
9135 msgid "B<#include E<lt>sys/ipc.hE<gt>>"
9136 msgstr "B<#include E<lt>sys/ipc.hE<gt>>"
9137
9138 #. type: Plain text
9139 #: build/C/man2/shmctl.2:53 build/C/man2/shmget.2:46
9140 msgid "B<#include E<lt>sys/shm.hE<gt>>"
9141 msgstr "B<#include E<lt>sys/shm.hE<gt>>"
9142
9143 #. type: Plain text
9144 #: build/C/man2/shmctl.2:55
9145 msgid ""
9146 "B<int shmctl(int >I<shmid>B<, int >I<cmd>B<, struct shmid_ds *>I<buf>B<);>"
9147 msgstr ""
9148 "B<int shmctl(int >I<shmid>B<, int >I<cmd>B<, struct shmid_ds *>I<buf>B<);>"
9149
9150 #. type: Plain text
9151 #: build/C/man2/shmctl.2:62
9152 msgid ""
9153 "B<shmctl>()  performs the control operation specified by I<cmd> on the "
9154 "System V shared memory segment whose identifier is given in I<shmid>."
9155 msgstr ""
9156 "B<shmctl>()  は、識別子が I<shmid> の System V 共有メモリ・セグメントに対し"
9157 "て I<cmd> で指示した制御命令を実行する。"
9158
9159 #. type: Plain text
9160 #: build/C/man2/shmctl.2:67
9161 msgid ""
9162 "The I<buf> argument is a pointer to a I<shmid_ds> structure, defined in "
9163 "I<E<lt>sys/shm.hE<gt>> as follows:"
9164 msgstr ""
9165 "I<buf> 引き数は、 I<shmid_ds> 構造体へのポインタである。 この構造体は "
9166 "I<E<lt>sys/shm.hE<gt>> で以下のように定義されている"
9167
9168 #. type: Plain text
9169 #: build/C/man2/shmctl.2:81
9170 #, no-wrap
9171 msgid ""
9172 "struct shmid_ds {\n"
9173 "    struct ipc_perm shm_perm;    /* Ownership and permissions */\n"
9174 "    size_t          shm_segsz;   /* Size of segment (bytes) */\n"
9175 "    time_t          shm_atime;   /* Last attach time */\n"
9176 "    time_t          shm_dtime;   /* Last detach time */\n"
9177 "    time_t          shm_ctime;   /* Last change time */\n"
9178 "    pid_t           shm_cpid;    /* PID of creator */\n"
9179 "    pid_t           shm_lpid;    /* PID of last shmat(2)/shmdt(2) */\n"
9180 "    shmatt_t        shm_nattch;  /* No. of current attaches */\n"
9181 "    ...\n"
9182 "};\n"
9183 msgstr ""
9184 "struct shmid_ds {\n"
9185 "    struct ipc_perm shm_perm;    /* 所有権と許可 */\n"
9186 "    size_t          shm_segsz;   /* セグメントのサイズ (バイト) */\n"
9187 "    time_t          shm_atime;   /* 最後の付加 (attach) の時刻 */\n"
9188 "    time_t          shm_dtime;   /* 最後の分離 (detach) の時刻 */\n"
9189 "    time_t          shm_ctime;   /* 最後に変更が行われた時刻 */\n"
9190 "    pid_t           shm_cpid;    /* 作成者 (creator) の PID */\n"
9191 "    pid_t           shm_lpid;    /* 最後の shmat(2)/shmdt(2) の PID */\n"
9192 "    shmatt_t        shm_nattch;  /* 現在付加されている数 */\n"
9193 "    ...\n"
9194 "};\n"
9195
9196 #. type: Plain text
9197 #: build/C/man2/shmctl.2:89
9198 msgid ""
9199 "The I<ipc_perm> structure is defined as follows (the highlighted fields are "
9200 "settable using B<IPC_SET>):"
9201 msgstr ""
9202 "I<ipc_perm> 構造体は以下のように定義されている (強調されたフィールドは "
9203 "B<IPC_SET> を使って設定可能である):"
9204
9205 #. type: Plain text
9206 #: build/C/man2/shmctl.2:102
9207 #, no-wrap
9208 msgid ""
9209 "struct ipc_perm {\n"
9210 "    key_t          __key;    /* Key supplied to shmget(2) */\n"
9211 "    uid_t          B<uid>;      /* Effective UID of owner */\n"
9212 "    gid_t          B<gid>;      /* Effective GID of owner */\n"
9213 "    uid_t          cuid;     /* Effective UID of creator */\n"
9214 "    gid_t          cgid;     /* Effective GID of creator */\n"
9215 "    unsigned short B<mode>;     /* B<Permissions> + SHM_DEST and\n"
9216 "                                SHM_LOCKED flags */\n"
9217 "    unsigned short __seq;    /* Sequence number */\n"
9218 "};\n"
9219 msgstr ""
9220 "struct ipc_perm {\n"
9221 "    key_t          __key;    /* shmget(2) に与えられるキー */\n"
9222 "    uid_t          B<uid>;      /* 所有者の実効 UID */\n"
9223 "    gid_t          B<gid>;      /* 所有者の実効 GID */\n"
9224 "    uid_t          cuid;     /* 作成者の実効 UID */\n"
9225 "    gid_t          cgid;     /* 作成者の実効 GID */\n"
9226 "    unsigned short B<mode>;     /* B<許可> + SHM_DEST と\n"
9227 "                                SHM_LOCKED フラグ */\n"
9228 "    unsigned short __seq;    /* シーケンス番号 */\n"
9229 "};\n"
9230
9231 #. type: Plain text
9232 #: build/C/man2/shmctl.2:108
9233 msgid "Valid values for I<cmd> are:"
9234 msgstr "I<cmd> として有効な値は以下の通り:"
9235
9236 #. type: TP
9237 #: build/C/man2/shmctl.2:109
9238 #, no-wrap
9239 msgid "B<IPC_STAT>"
9240 msgstr "B<IPC_STAT>"
9241
9242 #. type: Plain text
9243 #: build/C/man2/shmctl.2:118
9244 msgid ""
9245 "Copy information from the kernel data structure associated with I<shmid> "
9246 "into the I<shmid_ds> structure pointed to by I<buf>.  The caller must have "
9247 "read permission on the shared memory segment."
9248 msgstr ""
9249 "I<shmid> に関連づけられたカーネルデータ構造体の情報を I<buf> で指された "
9250 "I<shmid_ds> 構造体にコピーする。 呼び出し元は共有メモリ・セグメントに対する "
9251 "読み込み許可を持たなければならない。"
9252
9253 #. type: TP
9254 #: build/C/man2/shmctl.2:118
9255 #, no-wrap
9256 msgid "B<IPC_SET>"
9257 msgstr "B<IPC_SET>"
9258
9259 #. type: Plain text
9260 #: build/C/man2/shmctl.2:136
9261 msgid ""
9262 "Write the values of some members of the I<shmid_ds> structure pointed to by "
9263 "I<buf> to the kernel data structure associated with this shared memory "
9264 "segment, updating also its I<shm_ctime> member.  The following fields can be "
9265 "changed: I<shm_perm.uid>, I<shm_perm.gid>, and (the least significant 9 bits "
9266 "of) I<shm_perm.mode>.  The effective UID of the calling process must match "
9267 "the owner (I<shm_perm.uid>)  or creator (I<shm_perm.cuid>)  of the shared "
9268 "memory segment, or the caller must be privileged."
9269 msgstr ""
9270 "I<buf> によって指される I<shmid_ds> 構造体のいくつかのメンバーの値を、 この共"
9271 "有メモリ・セグメントに関連づけられたカーネルデータ構造体に書き込み、 "
9272 "I<shm_ctime> メンバーも更新する。 以下のフィールドは変更できる。 I<shm_perm."
9273 "uid>, I<shm_perm.gid>, I<shm_perm.mode> (の最下位 9 ビット)。 呼び出したプロ"
9274 "セスの実効 UID が所有者 (I<shm_perm.uid>)  または作成者 (I<shm_perm.cuid>)  "
9275 "と一致するか、呼び出し元が特権を持たなければならない。"
9276
9277 #. type: TP
9278 #: build/C/man2/shmctl.2:136
9279 #, no-wrap
9280 msgid "B<IPC_RMID>"
9281 msgstr "B<IPC_RMID>"
9282
9283 #. type: Plain text
9284 #: build/C/man2/shmctl.2:149
9285 msgid ""
9286 "Mark the segment to be destroyed.  The segment will only actually be "
9287 "destroyed after the last process detaches it (i.e., when the I<shm_nattch> "
9288 "member of the associated structure I<shmid_ds> is zero).  The caller must be "
9289 "the owner or creator of the segment, or be privileged.  The I<buf> argument "
9290 "is ignored."
9291 msgstr ""
9292 "セグメントに破棄済みのマークを付ける。 セグメントは、実際には最後プロセスがセ"
9293 "グメントを分離した (関連する I<shmid_ds> 構造体の I<shm_nattch> メンバーが 0 "
9294 "になった) 後でのみ破棄される。 呼び出し元はそのセグメントの所有者か作成者であ"
9295 "るか、特権を持たなければならない。 I<buf> 引き数は無視される。"
9296
9297 #. type: Plain text
9298 #: build/C/man2/shmctl.2:157
9299 msgid ""
9300 "If a segment has been marked for destruction, then the (nonstandard)  "
9301 "B<SHM_DEST> flag of the I<shm_perm.mode> field in the associated data "
9302 "structure retrieved by B<IPC_STAT> will be set."
9303 msgstr ""
9304 "セグメントに破棄のマークが付けられると、 関連するデータ構造体において "
9305 "I<shm_perm.mode> フィールドの (標準ではない)  B<SHM_DEST> フラグが設定され"
9306 "る。 このデータ構造体は B<IPC_STAT> で取得される。"
9307
9308 #. type: Plain text
9309 #: build/C/man2/shmctl.2:160
9310 msgid ""
9311 "The caller I<must> ensure that a segment is eventually destroyed; otherwise "
9312 "its pages that were faulted in will remain in memory or swap."
9313 msgstr ""
9314 "呼び出し元は最終的にはセグメントを忘れずに破棄I<しなければならない>。 そうで"
9315 "なれば、フォールト (fault) されたページは メモリかスワップ (swap) に残り続け"
9316 "る。"
9317
9318 #. type: Plain text
9319 #: build/C/man2/shmctl.2:165
9320 msgid ""
9321 "See also the description of I</proc/sys/kernel/shm_rmid_forced> in B<proc>"
9322 "(5)."
9323 msgstr "B<proc>(5) の I</proc/sys/kernel/shm_rmid_forced> の説明も参照のこと。"
9324
9325 #. type: TP
9326 #: build/C/man2/shmctl.2:165
9327 #, no-wrap
9328 msgid "B<IPC_INFO> (Linux-specific)"
9329 msgstr "B<IPC_INFO> (Linux 固有)"
9330
9331 #. type: Plain text
9332 #: build/C/man2/shmctl.2:178
9333 msgid ""
9334 "Returns information about system-wide shared memory limits and parameters in "
9335 "the structure pointed to by I<buf>.  This structure is of type I<shminfo> "
9336 "(thus, a cast is required), defined in I<E<lt>sys/shm.hE<gt>> if the "
9337 "B<_GNU_SOURCE> feature test macro is defined:"
9338 msgstr ""
9339 "システム全体での共有メモリの制限とパラメータに関する情報を、 I<buf> が指す構"
9340 "造体に入れて返す。 この構造体は I<shminfo> 型である (そのためキャストが必要で"
9341 "ある)。 I<shminfo> は B<_GNU_SOURCE> 機能検査マクロが定義された場合に "
9342 "I<E<lt>sys/shm.hE<gt>> で以下のように定義される:"
9343
9344 #. type: Plain text
9345 #: build/C/man2/shmctl.2:192
9346 #, no-wrap
9347 msgid ""
9348 "struct  shminfo {\n"
9349 "    unsigned long shmmax; /* Maximum segment size */\n"
9350 "    unsigned long shmmin; /* Minimum segment size;\n"
9351 "                             always 1 */\n"
9352 "    unsigned long shmmni; /* Maximum number of segments */\n"
9353 "    unsigned long shmseg; /* Maximum number of segments\n"
9354 "                             that a process can attach;\n"
9355 "                             unused within kernel */\n"
9356 "    unsigned long shmall; /* Maximum number of pages of\n"
9357 "                             shared memory, system-wide */\n"
9358 "};\n"
9359 msgstr ""
9360 "struct  shminfo {\n"
9361 "    unsigned long shmmax; /* 最大セグメントサイズ */\n"
9362 "    unsigned long shmmin; /* 最小セグメントサイズ。\n"
9363 "                             常に 1 */\n"
9364 "    unsigned long shmmni; /* 最大セグメント数 */\n"
9365 "    unsigned long shmseg; /* プロセスが付加できる\n"
9366 "                             セグメントの最大数。\n"
9367 "                             カーネル内では未使用 */\n"
9368 "    unsigned long shmall; /* 共有メモリの最大ページ数。\n"
9369 "                             システム全体での値 */\n"
9370 "};\n"
9371
9372 #. type: Plain text
9373 #: build/C/man2/shmctl.2:205
9374 msgid ""
9375 "The I<shmmni>, I<shmmax>, and I<shmall> settings can be changed via I</proc> "
9376 "files of the same name; see B<proc>(5)  for details."
9377 msgstr ""
9378 "設定 I<shmmni>, I<shmmax>, I<shmall> は I</proc> にある同じ名前のファイル経由"
9379 "で変更可能である。 詳しくは B<proc>(5)  を参照。"
9380
9381 #. type: TP
9382 #: build/C/man2/shmctl.2:205
9383 #, no-wrap
9384 msgid "B<SHM_INFO> (Linux-specific)"
9385 msgstr "B<SHM_INFO> (Linux 固有)"
9386
9387 #. type: Plain text
9388 #: build/C/man2/shmctl.2:216
9389 msgid ""
9390 "Returns a I<shm_info> structure whose fields contain information about "
9391 "system resources consumed by shared memory.  This structure is defined in "
9392 "I<E<lt>sys/shm.hE<gt>> if the B<_GNU_SOURCE> feature test macro is defined:"
9393 msgstr ""
9394 "共有メモリが消費しているシステム資源に関する情報を 格納した I<shm_info> 構造"
9395 "体を返す。 この構造体は、 B<_GNU_SOURCE> 機能検査マクロが定義された場合に "
9396 "I<E<lt>sys/shm.hE<gt>> で以下のように定義される:"
9397
9398 #. type: Plain text
9399 #: build/C/man2/shmctl.2:233
9400 #, no-wrap
9401 msgid ""
9402 "struct shm_info {\n"
9403 "    int           used_ids; /* # of currently existing\n"
9404 "                               segments */\n"
9405 "    unsigned long shm_tot;  /* Total number of shared\n"
9406 "                               memory pages */\n"
9407 "    unsigned long shm_rss;  /* # of resident shared\n"
9408 "                               memory pages */\n"
9409 "    unsigned long shm_swp;  /* # of swapped shared\n"
9410 "                               memory pages */\n"
9411 "    unsigned long swap_attempts;\n"
9412 "                            /* Unused since Linux 2.4 */\n"
9413 "    unsigned long swap_successes;\n"
9414 "                            /* Unused since Linux 2.4 */\n"
9415 "};\n"
9416 msgstr ""
9417 "struct shm_info {\n"
9418 "    int           used_ids; /* 現在存在するセグメント数 */\n"
9419 "    unsigned long shm_tot;  /* 共有メモリのページ総数 */\n"
9420 "    unsigned long shm_rss;  /* メモリ上にある (スワップされて\n"
9421 "                               いない) 共有メモリページ数 */\n"
9422 "    unsigned long shm_swp;  /* スワップされている共有メモリ\n"
9423 "                               ページ数 */\n"
9424 "    unsigned long swap_attempts;\n"
9425 "                            /* Linux 2.4 以降では未使用 */\n"
9426 "    unsigned long swap_successes;\n"
9427 "                            /* Linux 2.4 以降では未使用 */\n"
9428 "};\n"
9429
9430 #. type: TP
9431 #: build/C/man2/shmctl.2:235
9432 #, no-wrap
9433 msgid "B<SHM_STAT> (Linux-specific)"
9434 msgstr "B<SHM_STAT> (Linux 固有)"
9435
9436 #. type: Plain text
9437 #: build/C/man2/shmctl.2:246
9438 msgid ""
9439 "Returns a I<shmid_ds> structure as for B<IPC_STAT>.  However, the I<shmid> "
9440 "argument is not a segment identifier, but instead an index into the kernel's "
9441 "internal array that maintains information about all shared memory segments "
9442 "on the system."
9443 msgstr ""
9444 "B<IPC_STAT> と同じく I<shmid_ds> 構造体を返す。 但し、 I<shmid> 引き数は、セ"
9445 "グメント識別子ではなく、システム上の全ての共有メモリ セグメントに関する情報を"
9446 "管理するカーネルの内部配列へのインデックス である。"
9447
9448 #. type: Plain text
9449 #: build/C/man2/shmctl.2:249
9450 msgid ""
9451 "The caller can prevent or allow swapping of a shared memory segment with the "
9452 "following I<cmd> values:"
9453 msgstr ""
9454 "呼び出し元は、I<cmd> に以下の値を指定することで、共有メモリ・セグメントが ス"
9455 "ワップされることを防止したり、許可したりできる:"
9456
9457 #. type: TP
9458 #: build/C/man2/shmctl.2:250
9459 #, no-wrap
9460 msgid "B<SHM_LOCK> (Linux-specific)"
9461 msgstr "B<SHM_LOCK> (Linux 固有)"
9462
9463 #. type: Plain text
9464 #: build/C/man2/shmctl.2:262
9465 msgid ""
9466 "Prevent swapping of the shared memory segment.  The caller must fault in any "
9467 "pages that are required to be present after locking is enabled.  If a "
9468 "segment has been locked, then the (nonstandard)  B<SHM_LOCKED> flag of the "
9469 "I<shm_perm.mode> field in the associated data structure retrieved by "
9470 "B<IPC_STAT> will be set."
9471 msgstr ""
9472 "共有メモリ・セグメントをスワップすることを防止する。 ロックが有効になった後、"
9473 "呼び出し元は、 存在することが要求された全てのページをフォールトさせなければな"
9474 "らない。 セグメントがロックされると、 関連するデータ構造体において "
9475 "I<shm_perm.mode> フィールドの (標準的ではない)  B<SHM_LOCKED> フラグが設定さ"
9476 "れる。 このデータ構造体は B<IPC_STAT> で取得される。"
9477
9478 #. type: TP
9479 #: build/C/man2/shmctl.2:262
9480 #, no-wrap
9481 msgid "B<SHM_UNLOCK> (Linux-specific)"
9482 msgstr "B<SHM_UNLOCK> (Linux 固有)"
9483
9484 #. type: Plain text
9485 #: build/C/man2/shmctl.2:265
9486 msgid "Unlock the segment, allowing it to be swapped out."
9487 msgstr "セグメントのロックを解除し、スワップ・アウトすることを可能にする。"
9488
9489 #.  There was some weirdness in 2.6.9: SHM_LOCK and SHM_UNLOCK could
9490 #.  be applied to a segment, regardless of ownership of the segment.
9491 #.  This was a botch-up in the move to RLIMIT_MEMLOCK, and was fixed
9492 #.  in 2.6.10.  MTK, May 2005
9493 #. type: Plain text
9494 #: build/C/man2/shmctl.2:283
9495 msgid ""
9496 "In kernels before 2.6.10, only a privileged process could employ B<SHM_LOCK> "
9497 "and B<SHM_UNLOCK>.  Since kernel 2.6.10, an unprivileged process can employ "
9498 "these operations if its effective UID matches the owner or creator UID of "
9499 "the segment, and (for B<SHM_LOCK>)  the amount of memory to be locked falls "
9500 "within the B<RLIMIT_MEMLOCK> resource limit (see B<setrlimit>(2))."
9501 msgstr ""
9502 "2.6.10 より前のカーネルでは、特権プロセスだけが B<SHM_LOCK> と B<SHM_UNLOCK> "
9503 "を利用することができた。 2.6.10 以降のカーネルでは、非特権プロセスであっても"
9504 "次の条件を満たせば これらの操作を利用することができる。その条件とは、プロセス"
9505 "の実効 UID がそのセグメントの所有者もしくは作成者の UID と一致し、 "
9506 "(B<SHM_LOCK> の場合には) ロックするメモリの合計が B<RLIMIT_MEMLOCK> リソース"
9507 "上限 (B<setrlimit>(2)  参照) の範囲内に入っていることである。"
9508
9509 #. type: Plain text
9510 #: build/C/man2/shmctl.2:301
9511 msgid ""
9512 "A successful B<IPC_INFO> or B<SHM_INFO> operation returns the index of the "
9513 "highest used entry in the kernel's internal array recording information "
9514 "about all shared memory segments.  (This information can be used with "
9515 "repeated B<SHM_STAT> operations to obtain information about all shared "
9516 "memory segments on the system.)  A successful B<SHM_STAT> operation returns "
9517 "the identifier of the shared memory segment whose index was given in "
9518 "I<shmid>.  Other operations return 0 on success."
9519 msgstr ""
9520 "B<IPC_INFO> と B<SHM_INFO> 操作は、成功すると、全ての共有メモリセグメントに関"
9521 "する情報を 管理しているカーネルの内部配列の使用中エントリのインデックスの う"
9522 "ち最大値を返す (この情報は、システムの全ての共有メモリセグメントに関する情報"
9523 "を 取得するために、 B<SHM_STAT> 操作を繰り返し実行する際に使用できる)。 "
9524 "B<SHM_STAT> 操作は、成功すると、 I<shmid> で指定されたインデックスを持つ共有"
9525 "メモリセグメントの識別子を返す。 他の操作は、成功の場合 0 を返す。"
9526
9527 #. type: Plain text
9528 #: build/C/man2/shmctl.2:305
9529 msgid "On error, -1 is returned, and I<errno> is set appropriately."
9530 msgstr "エラーの場合は -1 を返し、 I<errno> を適切に設定する。"
9531
9532 #. type: Plain text
9533 #: build/C/man2/shmctl.2:314
9534 msgid ""
9535 "B<IPC_STAT> or B<SHM_STAT> is requested and I<shm_perm.mode> does not allow "
9536 "read access for I<shmid>, and the calling process does not have the "
9537 "B<CAP_IPC_OWNER> capability."
9538 msgstr ""
9539 "B<IPC_STAT> または B<SHM_STAT> が要求され、 I<shm_perm.mode> が I<shmid> への"
9540 "読み込みアクセスを許しておらず、 かつ呼び出したプロセスが B<CAP_IPC_OWNER> "
9541 "ケーパビリティ (capability) を持っていない。"
9542
9543 #. type: Plain text
9544 #: build/C/man2/shmctl.2:325
9545 msgid ""
9546 "The argument I<cmd> has value B<IPC_SET> or B<IPC_STAT> but the address "
9547 "pointed to by I<buf> isn't accessible."
9548 msgstr ""
9549 "I<cmd> 引き数に B<IPC_SET> か B<IPC_STAT> が指定されたが I<buf> で指されてい"
9550 "るアドレスにアクセスできない。"
9551
9552 #. type: TP
9553 #: build/C/man2/shmctl.2:325 build/C/man2/shmop.2:197
9554 #, no-wrap
9555 msgid "B<EIDRM>"
9556 msgstr "B<EIDRM>"
9557
9558 #. type: Plain text
9559 #: build/C/man2/shmctl.2:328 build/C/man2/shmop.2:200
9560 msgid "I<shmid> points to a removed identifier."
9561 msgstr "I<shmid> が削除 (remove) された識別子 (identifier) を指している。"
9562
9563 #. type: Plain text
9564 #: build/C/man2/shmctl.2:337
9565 msgid ""
9566 "I<shmid> is not a valid identifier, or I<cmd> is not a valid command.  Or: "
9567 "for a B<SHM_STAT> operation, the index value specified in I<shmid> referred "
9568 "to an array slot that is currently unused."
9569 msgstr ""
9570 "I<shmid> が有効な識別子でないか、 I<cmd> が有効なコマンドでない。 もしくは、 "
9571 "B<SHM_STAT> 操作の場合に、 I<shmid> で指定されたインデックス値が現在未使用の"
9572 "配列のスロットを参照していた。"
9573
9574 #. type: Plain text
9575 #: build/C/man2/shmctl.2:348
9576 msgid ""
9577 "(In kernels since 2.6.9), B<SHM_LOCK> was specified and the size of the to-"
9578 "be-locked segment would mean that the total bytes in locked shared memory "
9579 "segments would exceed the limit for the real user ID of the calling "
9580 "process.  This limit is defined by the B<RLIMIT_MEMLOCK> soft resource limit "
9581 "(see B<setrlimit>(2))."
9582 msgstr ""
9583 "(2.6.9 以降のカーネルにおいて)  B<SHM_LOCK> が指定され、 ロックされる予定のセ"
9584 "グメントのサイズ (ロックされる共有メモリ・セグメントの合計バイト数) が、 呼び"
9585 "出したプロセスの実ユーザー ID についての制限を超えた。 この制限は "
9586 "B<RLIMIT_MEMLOCK> ソフト資源制限で定義される (B<setrlimit>(2)  を参照)。"
9587
9588 #. type: Plain text
9589 #: build/C/man2/shmctl.2:353
9590 msgid ""
9591 "B<IPC_STAT> is attempted, and the GID or UID value is too large to be stored "
9592 "in the structure pointed to by I<buf>."
9593 msgstr ""
9594 "B<IPC_STAT> が試みられ、GID や UID の値が I<buf> で指示される構造体に格納する"
9595 "には大き過ぎる。"
9596
9597 #. type: Plain text
9598 #: build/C/man2/shmctl.2:365
9599 msgid ""
9600 "B<IPC_SET> or B<IPC_RMID> is attempted, and the effective user ID of the "
9601 "calling process is not that of the creator (found in I<shm_perm.cuid>), or "
9602 "the owner (found in I<shm_perm.uid>), and the process was not privileged "
9603 "(Linux: did not have the B<CAP_SYS_ADMIN> capability)."
9604 msgstr ""
9605 "B<IPC_SET> か B<IPC_RMID> が試みられ、 呼び出したプロセスの実効ユーザー ID が"
9606 "作成者 (I<shm_perm.cuid>)  でも所有者 (I<shm_perm.uid>)  でもなく、プロセスが"
9607 "特権を持たない (Linux では B<CAP_SYS_ADMIN> ケーパビリティを持たない)。"
9608
9609 #. type: Plain text
9610 #: build/C/man2/shmctl.2:377
9611 msgid ""
9612 "Or (in kernels before 2.6.9), B<SHM_LOCK> or B<SHM_UNLOCK> was specified, "
9613 "but the process was not privileged (Linux: did not have the B<CAP_IPC_LOCK> "
9614 "capability).  (Since Linux 2.6.9, this error can also occur if the "
9615 "B<RLIMIT_MEMLOCK> is 0 and the caller is not privileged.)"
9616 msgstr ""
9617 "または (2.6.9 より前のカーネルで)  B<SHM_LOCK> または B<SHM_UNLOCK> が指定さ"
9618 "れているが、プロセスが特権を持たない (Linux では B<CAP_IPC_LOCK> ケーパビリ"
9619 "ティを持たない)。 (Linux 2.6.9 以降では、 B<RLIMIT_MEMLOCK> が 0 で呼び出し元"
9620 "が特権を持たない場合にも、このエラーが起こる。)"
9621
9622 #.  SVr4 documents an additional error condition EMFILE.
9623 #. type: Plain text
9624 #: build/C/man2/shmctl.2:382 build/C/man2/shmget.2:235
9625 #: build/C/man2/shmop.2:234
9626 msgid "SVr4, POSIX.1-2001."
9627 msgstr "SVr4, POSIX.1-2001."
9628
9629 #.  Like Linux, the FreeBSD man pages still document
9630 #.  the inclusion of these header files.
9631 #. type: Plain text
9632 #: build/C/man2/shmctl.2:395 build/C/man2/shmget.2:251
9633 msgid ""
9634 "The inclusion of I<E<lt>sys/types.hE<gt>> and I<E<lt>sys/ipc.hE<gt>> isn't "
9635 "required on Linux or by any version of POSIX.  However, some old "
9636 "implementations required the inclusion of these header files, and the SVID "
9637 "also documented their inclusion.  Applications intended to be portable to "
9638 "such old systems may need to include these header files."
9639 msgstr ""
9640 "Linux や POSIX の全てのバージョンでは、 I<E<lt>sys/types.hE<gt>> と "
9641 "I<E<lt>sys/ipc.hE<gt>> のインクルードは必要ない。しかしながら、いくつかの古い"
9642 "実装ではこれらのヘッダファイルのインクルードが必要であり、 SVID でもこれらの"
9643 "インクルードをするように記載されている。このような古いシステムへの移植性を意"
9644 "図したアプリケーションではこれらのファイルをインクルードする必要があるかもし"
9645 "れない。"
9646
9647 #. type: Plain text
9648 #: build/C/man2/shmctl.2:407
9649 msgid ""
9650 "The B<IPC_INFO>, B<SHM_STAT> and B<SHM_INFO> operations are used by the "
9651 "B<ipcs>(1)  program to provide information on allocated resources.  In the "
9652 "future these may modified or moved to a I</proc> filesystem interface."
9653 msgstr ""
9654 "B<IPC_INFO>, B<SHM_STAT>, B<SHM_INFO> 操作は、 B<ipcs>(1)  プログラムで割り当"
9655 "て済の資源に関する情報を提供するために 使用されている。将来、これらの操作は変"
9656 "更されたり、 I</proc> ファイルシステムのインタフェースに移動されるかもしれな"
9657 "い。"
9658
9659 #. type: Plain text
9660 #: build/C/man2/shmctl.2:415
9661 msgid ""
9662 "Linux permits a process to attach (B<shmat>(2))  a shared memory segment "
9663 "that has already been marked for deletion using I<shmctl(IPC_RMID)>.  This "
9664 "feature is not available on other UNIX implementations; portable "
9665 "applications should avoid relying on it."
9666 msgstr ""
9667 "Linux では、 I<shmctl(IPC_RMID)> を使ってすでに削除マークがつけられている共有"
9668 "メモリ・セグメントを あるプロセスが付加 (attach)  (B<shmat>(2))  することを許"
9669 "可している。 この機能は他の UNIX の実装では利用できない。 移植性を考慮したア"
9670 "プリケーションではこれに依存しないようにすべきである。"
9671
9672 #. type: Plain text
9673 #: build/C/man2/shmctl.2:428
9674 msgid ""
9675 "Various fields in a I<struct shmid_ds> were typed as I<short> under Linux "
9676 "2.2 and have become I<long> under Linux 2.4.  To take advantage of this, a "
9677 "recompilation under glibc-2.1.91 or later should suffice.  (The kernel "
9678 "distinguishes old and new calls by an B<IPC_64> flag in I<cmd>.)"
9679 msgstr ""
9680 "I<構造体 shmid_ds> 内の多くのフィールドは、 Linux 2.2 では I<short> 型だった"
9681 "が、Linux 2.4 では I<long> 型になった。 この利点を生かすには、glibc-2.1.91 以"
9682 "降の環境下で 再コンパイルすれば十分である。 カーネルは新しい形式の呼び出しと"
9683 "古い形式の呼び出しを I<cmd> 内の B<IPC_64> フラグで区別する。"
9684
9685 #. type: Plain text
9686 #: build/C/man2/shmctl.2:435
9687 msgid ""
9688 "B<mlock>(2), B<setrlimit>(2), B<shmget>(2), B<shmop>(2), B<capabilities>(7), "
9689 "B<svipc>(7)"
9690 msgstr ""
9691 "B<mlock>(2), B<setrlimit>(2), B<shmget>(2), B<shmop>(2), B<capabilities>(7), "
9692 "B<shm_overview>(7), B<svipc>(7)"
9693
9694 #. type: TH
9695 #: build/C/man2/shmget.2:38
9696 #, no-wrap
9697 msgid "SHMGET"
9698 msgstr "SHMGET"
9699
9700 #. type: Plain text
9701 #: build/C/man2/shmget.2:41
9702 msgid "shmget - allocates a System V shared memory segment"
9703 msgstr "shmget - System V 共有メモリ・セグメントを割り当てる"
9704
9705 #. type: Plain text
9706 #: build/C/man2/shmget.2:48
9707 msgid "B<int shmget(key_t >I<key>B<, size_t >I<size>B<, int >I<shmflg>B<);>"
9708 msgstr "B<int shmget(key_t >I<key>B<, size_t >I<size>B<, int >I<shmflg>B<);>"
9709
9710 #. type: Plain text
9711 #: build/C/man2/shmget.2:72
9712 msgid ""
9713 "B<shmget>()  returns the identifier of the System V shared memory segment "
9714 "associated with the value of the argument I<key>.  A new shared memory "
9715 "segment, with size equal to the value of I<size> rounded up to a multiple of "
9716 "B<PAGE_SIZE>, is created if I<key> has the value B<IPC_PRIVATE> or I<key> "
9717 "isn't B<IPC_PRIVATE>, no shared memory segment corresponding to I<key> "
9718 "exists, and B<IPC_CREAT> is specified in I<shmflg>."
9719 msgstr ""
9720 "B<shmget>()  は I<key> 引き数に対応する System V 共有メモリ・セグメントの識別"
9721 "子を返す。 I<key> の値が B<IPC_PRIVATE> の場合、もしくは I<key> に対応する共"
9722 "有メモリ・セグメントが存在せず、 I<shmflg> に B<IPC_CREAT> が指定されていた場"
9723 "合、 新しい共有メモリ・セグメントを作成する。 作成される共有メモリ・セグメン"
9724 "トは、 I<size> 引き数の値を B<PAGE_SIZE> の倍数へと切り上げた (round up) 大き"
9725 "さとなる。"
9726
9727 #. type: Plain text
9728 #: build/C/man2/shmget.2:91
9729 msgid ""
9730 "If I<shmflg> specifies both B<IPC_CREAT> and B<IPC_EXCL> and a shared memory "
9731 "segment already exists for I<key>, then B<shmget>()  fails with I<errno> set "
9732 "to B<EEXIST>.  (This is analogous to the effect of the combination B<O_CREAT "
9733 "| O_EXCL> for B<open>(2).)"
9734 msgstr ""
9735 "I<shmflg> に B<IPC_CREAT> と B<IPC_EXCL> の両方が指定された場合、 I<key> に対"
9736 "応する共有メモリ・セグメントが既に存在すると、 B<shmget>()  は失敗し、 "
9737 "I<errno> に B<EEXIST> が設定される (これは B<open>(2)  に B<O_CREAT | "
9738 "O_EXCL> を指定した場合の動作と同じである)。"
9739
9740 #. type: Plain text
9741 #: build/C/man2/shmget.2:95
9742 msgid "The value I<shmflg> is composed of:"
9743 msgstr "I<shmflg> は以下の内容から構成される:"
9744
9745 #. type: TP
9746 #: build/C/man2/shmget.2:95
9747 #, no-wrap
9748 msgid "B<IPC_CREAT>"
9749 msgstr "B<IPC_CREAT>"
9750
9751 #. type: Plain text
9752 #: build/C/man2/shmget.2:102
9753 msgid ""
9754 "to create a new segment.  If this flag is not used, then B<shmget>()  will "
9755 "find the segment associated with I<key> and check to see if the user has "
9756 "permission to access the segment."
9757 msgstr ""
9758 "新しいセグメントを作成する。このフラグが指定されなかった場合、 B<shmget>()  "
9759 "は I<key> に対応するセグメントを探し、 ユーザがそのセグメントにアクセスする許"
9760 "可があるかどうかをチェックする。"
9761
9762 #. type: TP
9763 #: build/C/man2/shmget.2:102
9764 #, no-wrap
9765 msgid "B<IPC_EXCL>"
9766 msgstr "B<IPC_EXCL>"
9767
9768 #. type: Plain text
9769 #: build/C/man2/shmget.2:105
9770 msgid "used with B<IPC_CREAT> to ensure failure if the segment already exists."
9771 msgstr ""
9772 "B<IPC_CREAT> と共に使用し、セグメントが既に存在した場合には 失敗することを保"
9773 "証する。"
9774
9775 #. type: TP
9776 #: build/C/man2/shmget.2:105
9777 #, no-wrap
9778 msgid "I<mode_flags>"
9779 msgstr "I<mode_flags>"
9780
9781 #. type: Plain text
9782 #: build/C/man2/shmget.2:115
9783 msgid ""
9784 "(least significant 9 bits)  specifying the permissions granted to the owner, "
9785 "group, and world.  These bits have the same format, and the same meaning, as "
9786 "the I<mode> argument of B<open>(2).  Presently, the execute permissions are "
9787 "not used by the system."
9788 msgstr ""
9789 "(下位 9 ビット)  所有者、グループ、他人 (world) への許可を指定する。 これらの"
9790 "ビットは B<open>(2)  の I<mode> 引き数と同じ形式で同じ意味を持つ。 今のとこ"
9791 "ろ、システムは実行 (execute) 許可を参照しない。"
9792
9793 #. type: TP
9794 #: build/C/man2/shmget.2:115
9795 #, no-wrap
9796 msgid "B<SHM_HUGETLB> (since Linux 2.6)"
9797 msgstr "B<SHM_HUGETLB> (Linux 2.6 以降)"
9798
9799 #. type: Plain text
9800 #: build/C/man2/shmget.2:121
9801 msgid ""
9802 "Allocate the segment using \"huge pages.\" See the Linux kernel source file "
9803 "I<Documentation/vm/hugetlbpage.txt> for further information."
9804 msgstr ""
9805 "\"ヒュージページ (huge page)\" を使うセグメントを割り当てる。詳細な情報は、"
9806 "Linux カーネルソースのファイル I<Documentation/vm/hugetlbpage.txt> を参照。"
9807
9808 #. type: TP
9809 #: build/C/man2/shmget.2:121
9810 #, no-wrap
9811 msgid "B<SHM_NORESERVE> (since Linux 2.6.15)"
9812 msgstr "B<SHM_NORESERVE> (Linux 2.6.15 以降)"
9813
9814 #.  As at 2.6.17-rc2, this flag has no effect if SHM_HUGETLB was also
9815 #.  specified.
9816 #. type: Plain text
9817 #: build/C/man2/shmget.2:140
9818 msgid ""
9819 "This flag serves the same purpose as the B<mmap>(2)  B<MAP_NORESERVE> flag.  "
9820 "Do not reserve swap space for this segment.  When swap space is reserved, "
9821 "one has the guarantee that it is possible to modify the segment.  When swap "
9822 "space is not reserved one might get B<SIGSEGV> upon a write if no physical "
9823 "memory is available.  See also the discussion of the file I</proc/sys/vm/"
9824 "overcommit_memory> in B<proc>(5)."
9825 msgstr ""
9826 "このフラグは、 B<mmap>(2)  の B<MAP_NORESERVE> フラグと同じ役割を果たす。 こ"
9827 "のセグメントに対するスワップ空間の予約を行わない。 スワップ空間を予約した場合"
9828 "は、そのセグメントの変更が必ず成功することが 保証される。スワップ空間の予約を"
9829 "行わなかった場合は、物理メモリに空きが ないと書き込み時に B<SIGSEGV> を受け取"
9830 "る可能性がある。 B<proc>(5)  にある I</proc/sys/vm/overcommit_memory> ファイ"
9831 "ルに関する議論も参照のこと。"
9832
9833 #. type: Plain text
9834 #: build/C/man2/shmget.2:148
9835 msgid ""
9836 "When a new shared memory segment is created, its contents are initialized to "
9837 "zero values, and its associated data structure, I<shmid_ds> (see B<shmctl>"
9838 "(2)), is initialized as follows:"
9839 msgstr ""
9840 "共有メモリ・セグメントが新たに作成される際、 共有メモリ・セグメントの内容は "
9841 "0 で初期化され、 関連情報を保持するデータ構造体 I<shmid_ds> は以下のように初"
9842 "期化される。"
9843
9844 #. type: Plain text
9845 #: build/C/man2/shmget.2:153
9846 msgid ""
9847 "I<shm_perm.cuid> and I<shm_perm.uid> are set to the effective user ID of the "
9848 "calling process."
9849 msgstr ""
9850 "I<shm_perm.cuid> と I<shm_perm.uid> に呼び出し元プロセスの実効 (effective) "
9851 "ユーザーID を設定する。"
9852
9853 #. type: Plain text
9854 #: build/C/man2/shmget.2:158
9855 msgid ""
9856 "I<shm_perm.cgid> and I<shm_perm.gid> are set to the effective group ID of "
9857 "the calling process."
9858 msgstr ""
9859 "I<shm_perm.cgid> と I<shm_perm.gid> に呼び出し元プロセスの実効グループID を設"
9860 "定する。"
9861
9862 #. type: Plain text
9863 #: build/C/man2/shmget.2:163
9864 msgid ""
9865 "The least significant 9 bits of I<shm_perm.mode> are set to the least "
9866 "significant 9 bit of I<shmflg>."
9867 msgstr ""
9868 "I<shm_perm.mode> の下位 9 ビットに I<shmflg> の下位 9 ビットを設定する。"
9869
9870 #. type: Plain text
9871 #: build/C/man2/shmget.2:167
9872 msgid "I<shm_segsz> is set to the value of I<size>."
9873 msgstr "I<shm_segsz> に I<size> の値を設定する。"
9874
9875 #. type: Plain text
9876 #: build/C/man2/shmget.2:174
9877 msgid ""
9878 "I<shm_lpid>, I<shm_nattch>, I<shm_atime>, and I<shm_dtime> are set to 0."
9879 msgstr ""
9880 "I<shm_lpid>, I<shm_nattch>, I<shm_atime>, I<shm_dtime> に 0 を設定する。"
9881
9882 #. type: Plain text
9883 #: build/C/man2/shmget.2:177
9884 msgid "I<shm_ctime> is set to the current time."
9885 msgstr "I<shm_ctime> に現在の時刻を設定する。"
9886
9887 #. type: Plain text
9888 #: build/C/man2/shmget.2:180
9889 msgid ""
9890 "If the shared memory segment already exists, the permissions are verified, "
9891 "and a check is made to see if it is marked for destruction."
9892 msgstr ""
9893 "共有メモリ・セグメントが既に存在する場合、アクセス許可の検査と、 破壊 "
9894 "(destruction) マークがつけられていないかのチェックが行われる。"
9895
9896 #. type: Plain text
9897 #: build/C/man2/shmget.2:185
9898 msgid ""
9899 "On success, a valid shared memory identifier is returned.  On error, -1 is "
9900 "returned, and I<errno> is set to indicate the error."
9901 msgstr ""
9902 "成功の場合、有効な共有メモリ・セグメントの識別子が返される。 エラーの場合、 "
9903 "-1 が返り、 I<error> にエラーを示す値が設定される。"
9904
9905 #. type: Plain text
9906 #: build/C/man2/shmget.2:189
9907 msgid "On failure, I<errno> is set to one of the following:"
9908 msgstr "失敗した場合は I<errno> が以下のどれかに設定される:"
9909
9910 #. type: Plain text
9911 #: build/C/man2/shmget.2:195
9912 msgid ""
9913 "The user does not have permission to access the shared memory segment, and "
9914 "does not have the B<CAP_IPC_OWNER> capability."
9915 msgstr ""
9916 "ユーザーはその共有メモリ・セグメントへのアクセス許可を持たず、 "
9917 "B<CAP_IPC_OWNER> ケーパビリティも持っていない。"
9918
9919 #. type: Plain text
9920 #: build/C/man2/shmget.2:199
9921 msgid "B<IPC_CREAT | IPC_EXCL> was specified and the segment exists."
9922 msgstr ""
9923 "B<IPC_CREAT | IPC_EXCL> が指定されていたが、そのセグメントが既に存在する。"
9924
9925 #. type: Plain text
9926 #: build/C/man2/shmget.2:205
9927 msgid ""
9928 "A new segment was to be created and I<size> E<lt> B<SHMMIN> or I<size> E<gt> "
9929 "B<SHMMAX>, or no new segment was to be created, a segment with given key "
9930 "existed, but I<size> is greater than the size of that segment."
9931 msgstr ""
9932 "新しいセグメントを作成しようとした際に I<size> E<lt> B<SHMMIN> または "
9933 "I<size> E<gt> B<SHMMAX> であった。 もしくは、指定されたキーに対応するセグメン"
9934 "トが既に存在して、新しい セグメントを作成しようとはしなかったが、I<size> が存"
9935 "在するセグメントの サイズよりも大きかった。"
9936
9937 #. type: Plain text
9938 #: build/C/man2/shmget.2:214
9939 msgid ""
9940 "No segment exists for the given I<key>, and B<IPC_CREAT> was not specified."
9941 msgstr ""
9942 "指定された I<key> に対応するセグメントが存在せず、 B<IPC_CREAT> も指定されて"
9943 "いなかった。"
9944
9945 #. type: Plain text
9946 #: build/C/man2/shmget.2:217
9947 msgid "No memory could be allocated for segment overhead."
9948 msgstr "セグメントの管理情報 (overhead) に割り当てるメモリがなかった。"
9949
9950 #. type: Plain text
9951 #: build/C/man2/shmget.2:225
9952 msgid ""
9953 "All possible shared memory IDs have been taken (B<SHMMNI>), or allocating a "
9954 "segment of the requested I<size> would cause the system to exceed the system-"
9955 "wide limit on shared memory (B<SHMALL>)."
9956 msgstr ""
9957 "システム全体の共有メモリ・セグメント数の制限 (B<SHMMNI>)  に達した、または要"
9958 "求された I<size> のセグメントの割り当てが システム全体の共有メモリサイズの制"
9959 "限 (B<SHMALL>)  を超過した。"
9960
9961 #. type: Plain text
9962 #: build/C/man2/shmget.2:232
9963 msgid ""
9964 "The B<SHM_HUGETLB> flag was specified, but the caller was not privileged "
9965 "(did not have the B<CAP_IPC_LOCK> capability)."
9966 msgstr ""
9967 "B<SHM_HUGETLB> フラグが指定されたが、呼び出し元には権限がなかった "
9968 "(B<CAP_IPC_LOCK> ケーパビリティを持っていなかった)。"
9969
9970 #. type: Plain text
9971 #: build/C/man2/shmget.2:238
9972 msgid "B<SHM_HUGETLB> is a nonportable Linux extension."
9973 msgstr "B<SHM_HUGETLB> は Linux での拡張であり、移植性はない。"
9974
9975 #. type: Plain text
9976 #: build/C/man2/shmget.2:261
9977 msgid ""
9978 "B<IPC_PRIVATE> isn't a flag field but a I<key_t> type.  If this special "
9979 "value is used for I<key>, the system call ignores everything but the least "
9980 "significant 9 bits of I<shmflg> and creates a new shared memory segment (on "
9981 "success)."
9982 msgstr ""
9983 "B<IPC_PRIVATE> はフラグではなく I<key_t> 型である。 この特別な値が I<key> に"
9984 "使用された場合は、 B<shmget>()  は I<shmflg> の下位 9 ビットを除いた全てを無"
9985 "視し、 (成功すれば) 新しい共有メモリ・セグメントを作成する。"
9986
9987 #. type: Plain text
9988 #: build/C/man2/shmget.2:265
9989 msgid ""
9990 "The following limits on shared memory segment resources affect the B<shmget>"
9991 "()  call:"
9992 msgstr ""
9993 "B<shmget>()  コールに影響する共有メモリ・セグメント資源の制限は以下の通りであ"
9994 "る:"
9995
9996 #. type: TP
9997 #: build/C/man2/shmget.2:265
9998 #, no-wrap
9999 msgid "B<SHMALL>"
10000 msgstr "B<SHMALL>"
10001
10002 #. type: Plain text
10003 #: build/C/man2/shmget.2:269
10004 #, fuzzy
10005 #| msgid ""
10006 #| "System wide maximum of shared memory pages (on Linux, this limit can be "
10007 #| "read and modified via I</proc/sys/kernel/shmall>)."
10008 msgid ""
10009 "System wide maximum of shared memory pages.  Since Linux 2.2, the default "
10010 "value for this limit is"
10011 msgstr ""
10012 "システム全体の共有メモリ・ページの最大数 (Linux では、この上限値は I</proc/"
10013 "sys/kernel/shmall> 経由で参照したり、変更したりできる)。"
10014
10015 #. type: Plain text
10016 #: build/C/man2/shmget.2:271
10017 #, no-wrap
10018 msgid "    SHMMAX / PAGE_SIZE * (SHMMNI / 16)\n"
10019 msgstr ""
10020
10021 #. type: Plain text
10022 #: build/C/man2/shmget.2:274
10023 msgid ""
10024 "Assuming a 4kB page size, this formula yields (since Linux 2.4) the value "
10025 "2^20 (2,097,152)."
10026 msgstr ""
10027
10028 #. type: Plain text
10029 #: build/C/man2/shmget.2:277
10030 #, fuzzy
10031 #| msgid ""
10032 #| "System wide maximum of shared memory pages (on Linux, this limit can be "
10033 #| "read and modified via I</proc/sys/kernel/shmall>)."
10034 msgid ""
10035 "On Linux, this limit can be read and modified via I</proc/sys/kernel/shmall>."
10036 msgstr ""
10037 "システム全体の共有メモリ・ページの最大数 (Linux では、この上限値は I</proc/"
10038 "sys/kernel/shmall> 経由で参照したり、変更したりできる)。"
10039
10040 #. type: TP
10041 #: build/C/man2/shmget.2:277
10042 #, no-wrap
10043 msgid "B<SHMMAX>"
10044 msgstr "B<SHMMAX>"
10045
10046 #. type: Plain text
10047 #: build/C/man2/shmget.2:281
10048 msgid ""
10049 "Maximum size in bytes for a shared memory segment.  Since Linux 2.2, the "
10050 "default value of this limit is 0x2000000 (32MB)."
10051 msgstr ""
10052
10053 #. type: Plain text
10054 #: build/C/man2/shmget.2:284
10055 #, fuzzy
10056 #| msgid ""
10057 #| "System wide maximum of shared memory pages (on Linux, this limit can be "
10058 #| "read and modified via I</proc/sys/kernel/shmall>)."
10059 msgid ""
10060 "On Linux, this limit can be read and modified via I</proc/sys/kernel/shmmax>."
10061 msgstr ""
10062 "システム全体の共有メモリ・ページの最大数 (Linux では、この上限値は I</proc/"
10063 "sys/kernel/shmall> 経由で参照したり、変更したりできる)。"
10064
10065 #. type: TP
10066 #: build/C/man2/shmget.2:284
10067 #, no-wrap
10068 msgid "B<SHMMIN>"
10069 msgstr "B<SHMMIN>"
10070
10071 #. type: Plain text
10072 #: build/C/man2/shmget.2:290
10073 msgid ""
10074 "Minimum size in bytes for a shared memory segment: implementation dependent "
10075 "(currently 1 byte, though B<PAGE_SIZE> is the effective minimum size)."
10076 msgstr ""
10077 "共有メモリ・セグメントのバイト単位の大きさの下限: 実装依存 (現在は 1 バイトだ"
10078 "が、実質的な最小サイズは B<PAGE_SIZE> である)。"
10079
10080 #. type: TP
10081 #: build/C/man2/shmget.2:290
10082 #, no-wrap
10083 msgid "B<SHMMNI>"
10084 msgstr "B<SHMMNI>"
10085
10086 #. type: Plain text
10087 #: build/C/man2/shmget.2:295
10088 msgid ""
10089 "System wide maximum number of shared memory segments.  In Linux 2.2, the "
10090 "default value for this limit was 128; since Linux 2.4, the default value is "
10091 "4096."
10092 msgstr ""
10093
10094 #.  Kernels between 2.4.x and 2.6.8 had an off-by-one error that meant
10095 #.  that we could create one more segment than SHMMNI -- MTK
10096 #.  This /proc file is not available in Linux 2.2 and earlier -- MTK
10097 #. type: Plain text
10098 #: build/C/man2/shmget.2:301
10099 #, fuzzy
10100 #| msgid ""
10101 #| "System wide maximum of shared memory pages (on Linux, this limit can be "
10102 #| "read and modified via I</proc/sys/kernel/shmall>)."
10103 msgid ""
10104 "On Linux, this limit can be read and modified via I</proc/sys/kernel/shmmni>."
10105 msgstr ""
10106 "システム全体の共有メモリ・ページの最大数 (Linux では、この上限値は I</proc/"
10107 "sys/kernel/shmall> 経由で参照したり、変更したりできる)。"
10108
10109 #. type: Plain text
10110 #: build/C/man2/shmget.2:305
10111 msgid ""
10112 "The implementation has no specific limits for the per-process maximum number "
10113 "of shared memory segments (B<SHMSEG>)."
10114 msgstr ""
10115 "プロセス当りの共有メモリ・セグメントの個数の最大値 (B<SHMSEG>)  に関する実装"
10116 "上の制限はない。"
10117
10118 #. type: Plain text
10119 #: build/C/man2/shmget.2:311
10120 msgid ""
10121 "Until version 2.3.30 Linux would return B<EIDRM> for a B<shmget>()  on a "
10122 "shared memory segment scheduled for deletion."
10123 msgstr ""
10124 "バージョン 2.3.30 までは、Linux は 削除が予定されている共有メモリ・セグメント"
10125 "に対して B<shmget>()  が行われると B<EIDRM> を返していた。"
10126
10127 #. type: Plain text
10128 #: build/C/man2/shmget.2:317
10129 msgid ""
10130 "The name choice B<IPC_PRIVATE> was perhaps unfortunate, B<IPC_NEW> would "
10131 "more clearly show its function."
10132 msgstr ""
10133 "B<IPC_PRIVATE> という名前を選んだのはおそらく失敗であろう。 B<IPC_NEW> の方が"
10134 "より明確にその機能を表しているだろう。"
10135
10136 #. type: Plain text
10137 #: build/C/man2/shmget.2:325
10138 msgid ""
10139 "B<shmat>(2), B<shmctl>(2), B<shmdt>(2), B<ftok>(3), B<capabilities>(7), "
10140 "B<shm_overview>(7), B<svipc>(7)"
10141 msgstr ""
10142 "B<shmat>(2), B<shmctl>(2), B<shmdt>(2), B<ftok>(3), B<capabilities>(7), "
10143 "B<shm_overview>(7), B<svipc>(7)"
10144
10145 #. type: TH
10146 #: build/C/man2/shmop.2:41
10147 #, no-wrap
10148 msgid "SHMOP"
10149 msgstr "SHMOP"
10150
10151 #. type: Plain text
10152 #: build/C/man2/shmop.2:44
10153 msgid "shmat, shmdt - System V shared memory operations"
10154 msgstr "shmat, shmdt - System V 共有メモリ (shared memory) の操作"
10155
10156 #. type: Plain text
10157 #: build/C/man2/shmop.2:48
10158 #, no-wrap
10159 msgid ""
10160 "B<#include E<lt>sys/types.hE<gt>>\n"
10161 "B<#include E<lt>sys/shm.hE<gt>>\n"
10162 msgstr ""
10163 "B<#include E<lt>sys/types.hE<gt>>\n"
10164 "B<#include E<lt>sys/shm.hE<gt>>\n"
10165
10166 #. type: Plain text
10167 #: build/C/man2/shmop.2:50
10168 #, no-wrap
10169 msgid "B<void *shmat(int >I<shmid>B<, const void *>I<shmaddr>B<, int >I<shmflg>B<);>\n"
10170 msgstr "B<void *shmat(int >I<shmid>B<, const void *>I<shmaddr>B<, int >I<shmflg>B<);>\n"
10171
10172 #. type: Plain text
10173 #: build/C/man2/shmop.2:52
10174 #, no-wrap
10175 msgid "B<int shmdt(const void *>I<shmaddr>B<);>\n"
10176 msgstr "B<int shmdt(const void *>I<shmaddr>B<);>\n"
10177
10178 #. type: Plain text
10179 #: build/C/man2/shmop.2:61
10180 msgid ""
10181 "B<shmat>()  attaches the System V shared memory segment identified by "
10182 "I<shmid> to the address space of the calling process.  The attaching address "
10183 "is specified by I<shmaddr> with one of the following criteria:"
10184 msgstr ""
10185 "B<shmat>()  は I<shmid> で指定された System V 共有メモリ・セグメント (shared "
10186 "memory segment) を コールしたプロセスのアドレス空間に付加 (attach) する。 付"
10187 "加するアドレスは I<shmaddr> に以下のどれかの形式で指定する:"
10188
10189 #. type: Plain text
10190 #: build/C/man2/shmop.2:67
10191 msgid ""
10192 "If I<shmaddr> is NULL, the system chooses a suitable (unused) address at "
10193 "which to attach the segment."
10194 msgstr ""
10195 "I<shmaddr> が NULL ならば、システムはセグメントを付加するための 適切な (使用"
10196 "されていない) アドレスを選択する。"
10197
10198 #. type: Plain text
10199 #: build/C/man2/shmop.2:82
10200 msgid ""
10201 "If I<shmaddr> isn't NULL and B<SHM_RND> is specified in I<shmflg>, the "
10202 "attach occurs at the address equal to I<shmaddr> rounded down to the nearest "
10203 "multiple of B<SHMLBA>.  Otherwise I<shmaddr> must be a page-aligned address "
10204 "at which the attach occurs."
10205 msgstr ""
10206 "I<shmaddr> が NULL でなく B<SHM_RND> が I<shmflg> に指定されている場合は、 "
10207 "I<shmaddr> を B<SHMLBA> の倍数へと切り捨てた (rounding down) のと等しいアドレ"
10208 "スへ付加する。 その他の場合は I<shmaddr> は付加を行なうアドレスで、ページ境界"
10209 "を指している必要がある。"
10210
10211 #. type: Plain text
10212 #: build/C/man2/shmop.2:92
10213 msgid ""
10214 "If B<SHM_RDONLY> is specified in I<shmflg>, the segment is attached for "
10215 "reading and the process must have read permission for the segment.  "
10216 "Otherwise the segment is attached for read and write and the process must "
10217 "have read and write permission for the segment.  There is no notion of a "
10218 "write-only shared memory segment."
10219 msgstr ""
10220 "B<SHM_RDONLY> が I<shmflg> に指定されていた場合は、 セグメントは読み込み専用"
10221 "に付加され、プロセスはそのセグメントへの 読み込み許可を持たなければならな"
10222 "い。 そうでなければそのセグメントは読み込みと書き込みのために付加され、 プロ"
10223 "セスはそのセグメントに読み込みと書き込みの許可を持つ必要がある。 書き込み専用"
10224 "の共有メモリ・セグメントという概念は存在しない。"
10225
10226 #. type: Plain text
10227 #: build/C/man2/shmop.2:107
10228 msgid ""
10229 "The (Linux-specific)  B<SHM_REMAP> flag may be specified in I<shmflg> to "
10230 "indicate that the mapping of the segment should replace any existing mapping "
10231 "in the range starting at I<shmaddr> and continuing for the size of the "
10232 "segment.  (Normally an B<EINVAL> error would result if a mapping already "
10233 "exists in this address range.)  In this case, I<shmaddr> must not be NULL."
10234 msgstr ""
10235 "(Linux 特有の)  B<SHM_REMAP> フラグが I<shmflg> に指定された場合は、 セグメン"
10236 "トのマッピングを既存のマッピングに置き換える。 マッピングの範囲は、 "
10237 "I<shmaddr> から始まりセグメントのサイズ分だけある (通常 B<EINVAL> エラーは、"
10238 "このアドレス範囲にマッピングが既に存在するために起る)。 このフラグを指定する"
10239 "場合は、 I<shmaddr> が NULL であってはならない。"
10240
10241 #. type: Plain text
10242 #: build/C/man2/shmop.2:114
10243 msgid ""
10244 "The B<brk>(2)  value of the calling process is not altered by the attach.  "
10245 "The segment will automatically be detached at process exit.  The same "
10246 "segment may be attached as a read and as a read-write one, and more than "
10247 "once, in the process's address space."
10248 msgstr ""
10249 "呼び出したプロセスの B<brk>(2)  の値は付加によって変化しない。 そのセグメント"
10250 "はプロセスが終了 (exit) したら自動的に分離 (detach) される。 同じセグメントを"
10251 "プロセスのアドレス空間に、読み込み専用および読み書き両用 として付加でき、また"
10252 "複数回付加することもできる。"
10253
10254 #. type: Plain text
10255 #: build/C/man2/shmop.2:122
10256 msgid ""
10257 "A successful B<shmat>()  call updates the members of the I<shmid_ds> "
10258 "structure (see B<shmctl>(2))  associated with the shared memory segment as "
10259 "follows:"
10260 msgstr ""
10261 "成功した B<shmat>()  コールは共有メモリ・セグメントに関連する I<shmid_ds> 構"
10262 "造体 (B<shmctl>(2)  を参照) のメンバーを以下のように更新する:"
10263
10264 #. type: Plain text
10265 #: build/C/man2/shmop.2:125
10266 msgid "I<shm_atime> is set to the current time."
10267 msgstr "I<shm_atime> には現在の時刻を設定する。"
10268
10269 #. type: Plain text
10270 #: build/C/man2/shmop.2:128 build/C/man2/shmop.2:154
10271 msgid "I<shm_lpid> is set to the process-ID of the calling process."
10272 msgstr "I<shm_lpid> には呼び出したプロセスのプロセス ID が設定される。"
10273
10274 #. type: Plain text
10275 #: build/C/man2/shmop.2:131
10276 msgid "I<shm_nattch> is incremented by one."
10277 msgstr "I<shm_nattch> を 1 増加させる。"
10278
10279 #. type: Plain text
10280 #: build/C/man2/shmop.2:142
10281 msgid ""
10282 "B<shmdt>()  detaches the shared memory segment located at the address "
10283 "specified by I<shmaddr> from the address space of the calling process.  The "
10284 "to-be-detached segment must be currently attached with I<shmaddr> equal to "
10285 "the value returned by the attaching B<shmat>()  call."
10286 msgstr ""
10287 "B<shmdt>()  は呼び出したプロセスのアドレス空間から I<shmaddr> で指定されたア"
10288 "ドレスに配置された共有メモリ・セグメントを分離 (detach) する。 分離する共有メ"
10289 "モリ・セグメントは、現在 I<shmaddr> に付加されているものでなければならない。 "
10290 "I<shmaddr> は、それを付加した時に B<shmat>()  が返した値に等しくなければなら"
10291 "ない。"
10292
10293 #. type: Plain text
10294 #: build/C/man2/shmop.2:148
10295 msgid ""
10296 "On a successful B<shmdt>()  call the system updates the members of the "
10297 "I<shmid_ds> structure associated with the shared memory segment as follows:"
10298 msgstr ""
10299 "成功した B<shmdt>()  コールはその共有メモリ・セグメントに関連する "
10300 "I<shmid_ds> 構造体のメンバーを以下のように更新する:"
10301
10302 #. type: Plain text
10303 #: build/C/man2/shmop.2:151
10304 msgid "I<shm_dtime> is set to the current time."
10305 msgstr "I<shm_dtime> には現在の時刻が設定される。"
10306
10307 #. type: Plain text
10308 #: build/C/man2/shmop.2:159
10309 msgid ""
10310 "I<shm_nattch> is decremented by one.  If it becomes 0 and the segment is "
10311 "marked for deletion, the segment is deleted."
10312 msgstr ""
10313 "I<shm_nattch> を 1 減少させる。 もし 0 になり、削除マークがあった場合は その"
10314 "セグメントは削除される。"
10315
10316 #. type: Plain text
10317 #: build/C/man2/shmop.2:163
10318 msgid ""
10319 "After a B<fork>(2)  the child inherits the attached shared memory segments."
10320 msgstr ""
10321 "B<fork>(2)  した後、子プロセスは付加された共有メモリ・セグメントを継承する。"
10322
10323 #. type: Plain text
10324 #: build/C/man2/shmop.2:167
10325 msgid ""
10326 "After an B<execve>(2)  all attached shared memory segments are detached from "
10327 "the process."
10328 msgstr ""
10329 "B<exec>(2)  した後、全ての付加された共有メモリ・セグメントはプロセスから分離"
10330 "される。"
10331
10332 #. type: Plain text
10333 #: build/C/man2/shmop.2:171
10334 msgid ""
10335 "Upon B<_exit>(2)  all attached shared memory segments are detached from the "
10336 "process."
10337 msgstr ""
10338 "B<exit>(2)  において、全ての付加された共有メモリ・セグメントはプロセスから分"
10339 "離される。"
10340
10341 #. type: Plain text
10342 #: build/C/man2/shmop.2:179
10343 msgid ""
10344 "On success B<shmat>()  returns the address of the attached shared memory "
10345 "segment; on error I<(void\\ *)\\ -1> is returned, and I<errno> is set to "
10346 "indicate the cause of the error."
10347 msgstr ""
10348 "B<shmat>()  は、成功した場合、 付加された共有メモリ・セグメントのアドレスを返"
10349 "す。 エラーの場合、 I<(void\\ *)\\ -1> を返し、 I<errno> にエラーの原因を示す"
10350 "値を設定する。"
10351
10352 #. type: Plain text
10353 #: build/C/man2/shmop.2:185
10354 msgid ""
10355 "On success B<shmdt>()  returns 0; on error -1 is returned, and I<errno> is "
10356 "set to indicate the cause of the error."
10357 msgstr ""
10358 "B<shmdt>()  は、成功すると 0 を返す。 エラーの場合、-1 を返し、 I<errno> にエ"
10359 "ラーの原因を示す値を設定する。"
10360
10361 #. type: Plain text
10362 #: build/C/man2/shmop.2:191
10363 msgid "When B<shmat>()  fails, I<errno> is set to one of the following:"
10364 msgstr ""
10365 "B<shmat>()  が失敗した場合、 I<errno> に以下の値のどれかを設定して返す:"
10366
10367 #. type: Plain text
10368 #: build/C/man2/shmop.2:197
10369 msgid ""
10370 "The calling process does not have the required permissions for the requested "
10371 "attach type, and does not have the B<CAP_IPC_OWNER> capability."
10372 msgstr ""
10373 "呼び出したプロセスに要求された種類の付加に必要な許可がなく、 "
10374 "B<CAP_IPC_OWNER> ケーパビリティ (capability) がない。"
10375
10376 #. type: Plain text
10377 #: build/C/man2/shmop.2:214
10378 msgid ""
10379 "Invalid I<shmid> value, unaligned (i.e., not page-aligned and B<SHM_RND> was "
10380 "not specified) or invalid I<shmaddr> value, or can't attach segment at "
10381 "I<shmaddr>, or B<SHM_REMAP> was specified and I<shmaddr> was NULL."
10382 msgstr ""
10383 "I<shmid> の値が不正である。 I<shmaddr> の値が境界違反 (unaligned) (つまり、"
10384 "ページ境界に合っておらず、 B<SHM_RND> が指定されていない) または が不正であ"
10385 "る。 I<shmaddr> へのセグメントの付加に失敗した。 または B<SHM_REMAP> が指定さ"
10386 "れているが、 I<shmaddr> が NULL であった。"
10387
10388 #. type: Plain text
10389 #: build/C/man2/shmop.2:217
10390 msgid "Could not allocate memory for the descriptor or for the page tables."
10391 msgstr ""
10392 "ディスクリプター (descriptor) やページ・テーブルのためのメモリを 割り当てるこ"
10393 "とができない。"
10394
10395 #. type: Plain text
10396 #: build/C/man2/shmop.2:223
10397 msgid "When B<shmdt>()  fails, I<errno> is set as follows:"
10398 msgstr "B<shmdt>()  が失敗した場合、 B<EINVAL> は以下のようにセットされる:"
10399
10400 #.  The following since 2.6.17-rc1:
10401 #. type: Plain text
10402 #: build/C/man2/shmop.2:231
10403 msgid ""
10404 "There is no shared memory segment attached at I<shmaddr>; or, I<shmaddr> is "
10405 "not aligned on a page boundary."
10406 msgstr ""
10407 "I<shmaddr> に付加された共有メモリ・セグメントが存在しない。 もしくは、 "
10408 "I<shmaddr> がページ境界に合っていない。"
10409
10410 #. type: Plain text
10411 #: build/C/man2/shmop.2:250
10412 msgid ""
10413 "In SVID 3 (or perhaps earlier)  the type of the I<shmaddr> argument was "
10414 "changed from I<char\\ *> into I<const void\\ *>, and the returned type of "
10415 "B<shmat>()  from I<char\\ *> into I<void\\ *>.  (Linux libc4 and libc5 have "
10416 "the I<char\\ *> prototypes; glibc2 has I<void\\ *>.)"
10417 msgstr ""
10418 "SVID 3 で (たぶんそれより前だと思うが)  I<shmaddr> 引き数の型は I<char\\ *> "
10419 "から I<const void\\ *> に、I<shmat>() の返り値の型は I<char\\ *> から I<void"
10420 "\\ *> に変更された (Linux では libc4 と libc5 のプロトタイプは I<char\\ *> で"
10421 "あり、glibc2 のプロトタイプは I<void\\ *> である)。"
10422
10423 #. type: Plain text
10424 #: build/C/man2/shmop.2:262
10425 msgid ""
10426 "Using B<shmat>()  with I<shmaddr> equal to NULL is the preferred, portable "
10427 "way of attaching a shared memory segment.  Be aware that the shared memory "
10428 "segment attached in this way may be attached at different addresses in "
10429 "different processes.  Therefore, any pointers maintained within the shared "
10430 "memory must be made relative (typically to the starting address of the "
10431 "segment), rather than absolute."
10432 msgstr ""
10433 "共有メモリセグメントを付加する場合の移植性の高い方法としては、 I<shmaddr> を "
10434 "NULL にして B<shmat>()  を使用するのがよい。 このような方法で付加される共有メ"
10435 "モリセグメントは、 プロセスが異なれば別のアドレスに付加される、という点に注意"
10436 "すること。 よって共有メモリ内で管理されるポインタは、 絶対アドレスではなく、 "
10437 "(一般的にはセグメントの開始アドレスからの)  相対アドレスで作成するべきであ"
10438 "る。"
10439
10440 #. type: Plain text
10441 #: build/C/man2/shmop.2:267
10442 msgid ""
10443 "On Linux, it is possible to attach a shared memory segment even if it is "
10444 "already marked to be deleted.  However, POSIX.1-2001 does not specify this "
10445 "behavior and many other implementations do not support it."
10446 msgstr ""
10447 "Linux では共有メモリセグメントに既に削除マークが付けられていても、 その共有メ"
10448 "モリセグメントを付加することができる。 しかし POSIX.1-2001 ではこのような動作"
10449 "を指定しておらず、 他の多くの実装もこれをサポートしていない。"
10450
10451 #. type: Plain text
10452 #: build/C/man2/shmop.2:270
10453 msgid "The following system parameter affects B<shmat>():"
10454 msgstr "以下のシステム・パラメーターは、 B<shmat>()  に影響する:"
10455
10456 #.  FIXME A good explanation of the rationale for the existence
10457 #.  of SHMLBA would be useful here
10458 #. type: TP
10459 #: build/C/man2/shmop.2:270
10460 #, no-wrap
10461 msgid "B<SHMLBA>"
10462 msgstr "B<SHMLBA>"
10463
10464 #.  FIXME That last sentence isn't true for all Linux
10465 #.  architectures (i.e., SHMLBA != PAGE_SIZE for some architectures)
10466 #.  -- MTK, Nov 04
10467 #. type: Plain text
10468 #: build/C/man2/shmop.2:283
10469 msgid ""
10470 "Segment low boundary address multiple.  Must be page aligned.  For the "
10471 "current implementation the B<SHMLBA> value is B<PAGE_SIZE>."
10472 msgstr ""
10473 "セグメントの境界アドレスの最小倍数。ページ境界に合ってなければならない。 現在"
10474 "の実装では B<SHMLBA> の値は B<PAGE_SIZE> である。"
10475
10476 #. type: Plain text
10477 #: build/C/man2/shmop.2:287
10478 msgid ""
10479 "The implementation places no intrinsic limit on the per-process maximum "
10480 "number of shared memory segments (B<SHMSEG>)."
10481 msgstr ""
10482 "現在の実装では、プロセスごとの 共有メモリ・セグメントの最大数 (B<SHMSEG>)  に"
10483 "関する実装依存の制限はない。"
10484
10485 #. type: Plain text
10486 #: build/C/man2/shmop.2:295
10487 msgid ""
10488 "B<brk>(2), B<mmap>(2), B<shmctl>(2), B<shmget>(2), B<capabilities>(7), "
10489 "B<shm_overview>(7), B<svipc>(7)"
10490 msgstr ""
10491 "B<brk>(2), B<mmap>(2), B<shmctl>(2), B<shmget>(2), B<capabilities>(7), "
10492 "B<shm_overview>(7), B<svipc>(7)"
10493
10494 #. type: TH
10495 #: build/C/man2/subpage_prot.2:30
10496 #, no-wrap
10497 msgid "SUBPAGE_PROT"
10498 msgstr "SUBPAGE_PROT"
10499
10500 #. type: TH
10501 #: build/C/man2/subpage_prot.2:30
10502 #, no-wrap
10503 msgid "2012-07-13"
10504 msgstr "2012-07-13"
10505
10506 #. type: Plain text
10507 #: build/C/man2/subpage_prot.2:33
10508 msgid "subpage_prot - define a subpage protection for an address range"
10509 msgstr ""
10510
10511 #. type: Plain text
10512 #: build/C/man2/subpage_prot.2:37
10513 #, no-wrap
10514 msgid ""
10515 "B<long subpage_prot(unsigned long >I<addr>B<, unsigned long >I<len>B<,>\n"
10516 "B<                  uint32_t *>I<map>B<);>\n"
10517 msgstr ""
10518 "B<long subpage_prot(unsigned long >I<addr>B<, unsigned long >I<len>B<,>\n"
10519 "B<                  uint32_t *>I<map>B<);>\n"
10520
10521 #. type: Plain text
10522 #: build/C/man2/subpage_prot.2:41
10523 msgid "I<Note>: There is no glibc wrapper for this system call; see NOTES."
10524 msgstr ""
10525 "I<注>: このシステムコールには glibc のラッパー関数は存在しない。「注意」の節"
10526 "を参照。"
10527
10528 #. type: Plain text
10529 #: build/C/man2/subpage_prot.2:47
10530 msgid ""
10531 "The PowerPC-specific B<subpage_prot>()  system call provides the facility to "
10532 "control the access permissions on individual 4kB subpages on systems "
10533 "configured with a page size of 64kB."
10534 msgstr ""
10535
10536 #. type: Plain text
10537 #: build/C/man2/subpage_prot.2:54
10538 msgid ""
10539 "The protection map is applied to the memory pages in the region starting at "
10540 "I<addr> and continuing for I<len> bytes.  Both of these arguments must be "
10541 "aligned to a 64-kB boundary."
10542 msgstr ""
10543
10544 #. type: Plain text
10545 #: build/C/man2/subpage_prot.2:66
10546 msgid ""
10547 "The protection map is specified in the buffer pointed to by I<map>.  The map "
10548 "has 2 bits per 4kB subpage; thus each 32-bit word specifies the protections "
10549 "of 16 4kB subpages inside a 64kB page (so, the number of 32-bit words "
10550 "pointed to by I<map> should equate to the number of 64-kB pages specified by "
10551 "I<len>).  Each 2-bit field in the protection map is either 0 to allow any "
10552 "access, 1 to prevent writes, or 2 or 3 to prevent all accesses."
10553 msgstr ""
10554
10555 #. type: Plain text
10556 #: build/C/man2/subpage_prot.2:71
10557 msgid ""
10558 "On success, B<subpage_prot>()  returns 0.  Otherwise, one of the error codes "
10559 "specified below is returned."
10560 msgstr ""
10561
10562 #. type: Plain text
10563 #: build/C/man2/subpage_prot.2:77
10564 msgid "The buffer referred to by I<map> is not accessible."
10565 msgstr ""
10566
10567 #. type: Plain text
10568 #: build/C/man2/subpage_prot.2:87
10569 msgid ""
10570 "The I<addr> or I<len> arguments are incorrect.  Both of these arguments must "
10571 "be aligned to a multiple of the system page size, and they must not refer to "
10572 "a region outside of the address space of the process or to a region that "
10573 "consists of huge pages."
10574 msgstr ""
10575
10576 #. type: Plain text
10577 #: build/C/man2/subpage_prot.2:90 build/C/man2/sync_file_range.2:166
10578 msgid "Out of memory."
10579 msgstr "メモリ不足である。"
10580
10581 #. type: Plain text
10582 #: build/C/man2/subpage_prot.2:96
10583 msgid ""
10584 "This system call is provided on the PowerPC architecture since Linux "
10585 "2.6.25.  The system call is provided only if the kernel is configured with "
10586 "B<CONFIG_PPC_64K_PAGES>.  No library support is provided."
10587 msgstr ""
10588
10589 #. type: Plain text
10590 #: build/C/man2/subpage_prot.2:101
10591 msgid ""
10592 "Glibc does not provide a wrapper for this system call; call it using "
10593 "B<syscall>(2)."
10594 msgstr ""
10595
10596 #. type: Plain text
10597 #: build/C/man2/subpage_prot.2:106
10598 msgid ""
10599 "Normal page protections (at the 64-kB page level) also apply; the subpage "
10600 "protection mechanism is an additional constraint, so putting 0 in a 2-bit "
10601 "field won't allow writes to a page that is otherwise write-protected."
10602 msgstr ""
10603
10604 #. type: SS
10605 #: build/C/man2/subpage_prot.2:106
10606 #, no-wrap
10607 msgid "Rationale"
10608 msgstr ""
10609
10610 #.  In the initial implementation, it was the case that:
10611 #.      In fact the whole process is switched to use 4k hardware pages when the
10612 #.      subpage_prot system call is used, but this could be improved in future
10613 #.      to switch only the affected segments.
10614 #.  But Paul Mackerass says (Oct 2010): I'm pretty sure we now only switch
10615 #.  the affected segment, not the whole process.
10616 #. type: Plain text
10617 #: build/C/man2/subpage_prot.2:128
10618 msgid ""
10619 "This system call is provided to assist writing emulators that operate using "
10620 "64-kB pages on PowerPC systems.  When emulating systems such as x86, which "
10621 "uses a smaller page size, the emulator can no longer use the memory-"
10622 "management unit (MMU)  and normal system calls for controlling page "
10623 "protections.  (The emulator could emulate the MMU by checking and possibly "
10624 "remapping the address for each memory access in software, but that is "
10625 "slow.)  The idea is that the emulator supplies an array of protection masks "
10626 "to apply to a specified range of virtual addresses.  These masks are applied "
10627 "at the level where hardware page-table entries (PTEs)  are inserted into the "
10628 "hardware page table based on the Linux PTEs, so the Linux PTEs are not "
10629 "affected.  Implicit in this is that the regions of the address space that "
10630 "are protected are switched to use 4-kB hardware pages rather than 64-kB "
10631 "hardware pages (on machines with hardware 64-kB page support)."
10632 msgstr ""
10633
10634 #. type: Plain text
10635 #: build/C/man2/subpage_prot.2:131
10636 msgid "B<mprotect>(2), B<syscall>(2)"
10637 msgstr "B<mprotect>(2), B<syscall>(2)"
10638
10639 #. type: Plain text
10640 #: build/C/man2/subpage_prot.2:134
10641 msgid "I<Documentation/vm/hugetlbpage.txt> in the Linux kernel source tree"
10642 msgstr "Linux カーネルソースの I<Documentation/vm/hugetlbpage.txt>"
10643
10644 #. type: TH
10645 #: build/C/man2/sync_file_range.2:30
10646 #, no-wrap
10647 msgid "SYNC_FILE_RANGE"
10648 msgstr "SYNC_FILE_RANGE"
10649
10650 #. type: Plain text
10651 #: build/C/man2/sync_file_range.2:33
10652 msgid "sync_file_range - sync a file segment with disk"
10653 msgstr "sync_file_range - ファイルセグメントをディスクと同期する"
10654
10655 #. type: Plain text
10656 #: build/C/man2/sync_file_range.2:37
10657 #, no-wrap
10658 msgid ""
10659 "B<#define _GNU_SOURCE>         /* See feature_test_macros(7) */\n"
10660 "B<#include E<lt>fcntl.hE<gt>>\n"
10661 msgstr ""
10662 "B<#define _GNU_SOURCE>         /* feature_test_macros(7) 参照 */\n"
10663 "B<#include E<lt>fcntl.hE<gt>>\n"
10664
10665 #. type: Plain text
10666 #: build/C/man2/sync_file_range.2:40
10667 #, no-wrap
10668 msgid ""
10669 "B<int sync_file_range(int >I<fd>B<, off64_t >I<offset>B<, off64_t >I<nbytes>B<,>\n"
10670 "B<                    unsigned int >I<flags>B<);>\n"
10671 msgstr ""
10672 "B<int sync_file_range(int >I<fd>B<, off64_t >I<offset>B<, off64_t >I<nbytes>B<,>\n"
10673 "B<                    unsigned int >I<flags>B<);>\n"
10674
10675 #. type: Plain text
10676 #: build/C/man2/sync_file_range.2:47
10677 msgid ""
10678 "B<sync_file_range>()  permits fine control when synchronizing the open file "
10679 "referred to by the file descriptor I<fd> with disk."
10680 msgstr ""
10681 "B<sync_file_range>()  を使うと、ファイルディスクリプタ I<fd> で参照されるオー"
10682 "プンされたファイルのディスクとの同期に関して、 きめ細かな制御が可能となる。"
10683
10684 #. type: Plain text
10685 #: build/C/man2/sync_file_range.2:61
10686 msgid ""
10687 "I<offset> is the starting byte of the file range to be synchronized.  "
10688 "I<nbytes> specifies the length of the range to be synchronized, in bytes; if "
10689 "I<nbytes> is zero, then all bytes from I<offset> through to the end of file "
10690 "are synchronized.  Synchronization is in units of the system page size: "
10691 "I<offset> is rounded down to a page boundary; I<(offset+nbytes-1)> is "
10692 "rounded up to a page boundary."
10693 msgstr ""
10694 "I<offset> は、同期を行うファイルの領域の開始バイトである。 I<nbytes> には同期"
10695 "を行う領域の長さをバイト単位で指定する。 I<nbytes> が 0 の場合は、 I<offset> "
10696 "からファイル末尾までの全バイトを同期する。 同期はシステムのページサイズの単位"
10697 "で行われる。 I<offset> はページ境界にあわせて切り下げられ、 I<(offset"
10698 "+nbytes-1)> はページ境界にあわせて切り上げられる。"
10699
10700 #. type: Plain text
10701 #: build/C/man2/sync_file_range.2:65
10702 msgid "The I<flags> bit-mask argument can include any of the following values:"
10703 msgstr "ビットマスク引き数 I<flags> には以下の値を指定することができる:"
10704
10705 #. type: TP
10706 #: build/C/man2/sync_file_range.2:65
10707 #, no-wrap
10708 msgid "B<SYNC_FILE_RANGE_WAIT_BEFORE>"
10709 msgstr "B<SYNC_FILE_RANGE_WAIT_BEFORE>"
10710
10711 #. type: Plain text
10712 #: build/C/man2/sync_file_range.2:70
10713 msgid ""
10714 "Wait upon write-out of all pages in the specified range that have already "
10715 "been submitted to the device driver for write-out before performing any "
10716 "write."
10717 msgstr ""
10718 "何らかの書き込みを行う前に、指定された領域のページで 書き出しを行うようにデバ"
10719 "イスドライバにすでに要求が発行されている ページの書き出しが全て完了するのを待"
10720 "つ。"
10721
10722 #. type: TP
10723 #: build/C/man2/sync_file_range.2:70 build/C/man2/sync_file_range.2:120
10724 #, no-wrap
10725 msgid "B<SYNC_FILE_RANGE_WRITE>"
10726 msgstr "B<SYNC_FILE_RANGE_WRITE>"
10727
10728 #. type: Plain text
10729 #: build/C/man2/sync_file_range.2:76
10730 msgid ""
10731 "Initiate write-out of all dirty pages in the specified range which are not "
10732 "presently submitted write-out.  Note that even this may block if you attempt "
10733 "to write more than request queue size."
10734 msgstr ""
10735 "指定された領域のページで、書き出し要求が発行されていない 全ての dirty (キャッ"
10736 "シュだけが変更されている) ページの 書き出しを開始する。 リクエストキューの大"
10737 "きさより多く書き込もうとした場合には、 この処理は停止 (block) する可能性があ"
10738 "る点に注意すること。"
10739
10740 #. type: TP
10741 #: build/C/man2/sync_file_range.2:76
10742 #, no-wrap
10743 msgid "B<SYNC_FILE_RANGE_WAIT_AFTER>"
10744 msgstr "B<SYNC_FILE_RANGE_WAIT_AFTER>"
10745
10746 #. type: Plain text
10747 #: build/C/man2/sync_file_range.2:80
10748 msgid ""
10749 "Wait upon write-out of all pages in the range after performing any write."
10750 msgstr ""
10751 "何らかの書き込み後に、指定された領域の全てのページの 書き出しが行われるのを待"
10752 "つ。"
10753
10754 #. type: Plain text
10755 #: build/C/man2/sync_file_range.2:84
10756 msgid "Specifying I<flags> as 0 is permitted, as a no-op."
10757 msgstr "I<flags> に 0 を指定した場合、何もしないことを表す。"
10758
10759 #. type: SS
10760 #: build/C/man2/sync_file_range.2:84
10761 #, no-wrap
10762 msgid "Warning"
10763 msgstr "警告"
10764
10765 #. type: Plain text
10766 #: build/C/man2/sync_file_range.2:100
10767 msgid ""
10768 "This system call is extremely dangerous and should not be used in portable "
10769 "programs.  None of these operations writes out the file's metadata.  "
10770 "Therefore, unless the application is strictly performing overwrites of "
10771 "already-instantiated disk blocks, there are no guarantees that the data will "
10772 "be available after a crash.  There is no user interface to know if a write "
10773 "is purely an overwrite.  On filesystems using copy-on-write semantics (e.g., "
10774 "I<btrfs>)  an overwrite of existing allocated blocks is impossible.  When "
10775 "writing into preallocated space, many filesystems also require calls into "
10776 "the block allocator, which this system call does not sync out to disk.  This "
10777 "system call does not flush disk write caches and thus does not provide any "
10778 "data integrity on systems with volatile disk write caches."
10779 msgstr ""
10780 "このシステムコールは非常に危険であり、 移植性が必要なプログラムで使用すべきで"
10781 "はない。 これらの操作ではどれもファイルのメタデータの書き出しを行わない。 し"
10782 "たがって、アプリケーションにより作成済みのディスクブロックの 上書きの実行が確"
10783 "実に行われない限り、クラッシュの後でもデータが 利用できる保証はない。 書き込"
10784 "みが上書きだけであるかを知るためのユーザインタフェースは存在しない。 "
10785 "(I<btrfs> などの) copy-on-write 動作を使ったファイルシステムでは、 既存の割り"
10786 "当て済みのブロックに対する上書き自体ができない。 前もって割り当てられた領域に"
10787 "書き込みを行う場合、 多くのファイルシステムでは block allocator への書き込み"
10788 "も必要となるが、 このシステムコールは block allocator のディスクへの同期を行"
10789 "わない。 このシステムコールはディスク書き込みキャッシュのフラッシュを 行わな"
10790 "いので、揮発性のディスク書き込みキャッシュを使ったシステムでは このシステム"
10791 "コールではデータの一貫性を確保できないことになる。"
10792
10793 #. type: SS
10794 #: build/C/man2/sync_file_range.2:100
10795 #, no-wrap
10796 msgid "Some details"
10797 msgstr "詳細"
10798
10799 #. type: Plain text
10800 #: build/C/man2/sync_file_range.2:108
10801 msgid ""
10802 "B<SYNC_FILE_RANGE_WAIT_BEFORE> and B<SYNC_FILE_RANGE_WAIT_AFTER> will detect "
10803 "any I/O errors or B<ENOSPC> conditions and will return these to the caller."
10804 msgstr ""
10805 "B<SYNC_FILE_RANGE_WAIT_BEFORE> と B<SYNC_FILE_RANGE_WAIT_AFTER> は I/O エラー"
10806 "や B<ENOSPC> 状態を検出し、呼び出し元にこれらの情報を返す。"
10807
10808 #. type: Plain text
10809 #: build/C/man2/sync_file_range.2:112
10810 msgid "Useful combinations of the I<flags> bits are:"
10811 msgstr "I<flags> の役に立つビットの組み合わせを以下に示す:"
10812
10813 #. type: TP
10814 #: build/C/man2/sync_file_range.2:112
10815 #, no-wrap
10816 msgid "B<SYNC_FILE_RANGE_WAIT_BEFORE | SYNC_FILE_RANGE_WRITE>"
10817 msgstr "B<SYNC_FILE_RANGE_WAIT_BEFORE | SYNC_FILE_RANGE_WRITE>"
10818
10819 #. type: Plain text
10820 #: build/C/man2/sync_file_range.2:120
10821 msgid ""
10822 "Ensures that all pages in the specified range which were dirty when "
10823 "B<sync_file_range>()  was called are placed under write-out.  This is a "
10824 "start-write-for-data-integrity operation."
10825 msgstr ""
10826 "指定された範囲内のページで、 B<sync_file_range>()  が呼び出された際に dirty "
10827 "であった全てのページが、 確実に書き出し対象となるようにする。 これは、start-"
10828 "write-for-data-integrity 操作 (データ完全性確保のための書き込み開始の操作) で"
10829 "ある。"
10830
10831 #. type: Plain text
10832 #: build/C/man2/sync_file_range.2:127
10833 msgid ""
10834 "Start write-out of all dirty pages in the specified range which are not "
10835 "presently under write-out.  This is an asynchronous flush-to-disk "
10836 "operation.  This is not suitable for data integrity operations."
10837 msgstr ""
10838 "指定された範囲内のページで、現在書き出し中でない全ての dirty ページの 書き出"
10839 "しを開始する。これは非同期のディスクへのフラッシュ (flush-to-disk)  操作であ"
10840 "る。データ完全性確保が必要な操作としては適切ではない。"
10841
10842 #. type: TP
10843 #: build/C/man2/sync_file_range.2:127
10844 #, no-wrap
10845 msgid "B<SYNC_FILE_RANGE_WAIT_BEFORE> (or B<SYNC_FILE_RANGE_WAIT_AFTER>)"
10846 msgstr "B<SYNC_FILE_RANGE_WAIT_BEFORE> (or B<SYNC_FILE_RANGE_WAIT_AFTER>)"
10847
10848 #. type: Plain text
10849 #: build/C/man2/sync_file_range.2:134
10850 msgid ""
10851 "Wait for completion of write-out of all pages in the specified range.  This "
10852 "can be used after an earlier B<SYNC_FILE_RANGE_WAIT_BEFORE | "
10853 "SYNC_FILE_RANGE_WRITE> operation to wait for completion of that operation, "
10854 "and obtain its result."
10855 msgstr ""
10856 "指定された範囲内の全てのページの書き出しの完了を待つ。 このフラグは、前に行わ"
10857 "れた操作 B<SYNC_FILE_RANGE_WAIT_BEFORE | SYNC_FILE_RANGE_WRITE> の後に使用で"
10858 "き、この操作の完了を待ち、結果を取得することができる。"
10859
10860 #. type: TP
10861 #: build/C/man2/sync_file_range.2:134
10862 #, no-wrap
10863 msgid "B<SYNC_FILE_RANGE_WAIT_BEFORE | SYNC_FILE_RANGE_WRITE | SYNC_FILE_RANGE_WAIT_AFTER>"
10864 msgstr "B<SYNC_FILE_RANGE_WAIT_BEFORE | SYNC_FILE_RANGE_WRITE | SYNC_FILE_RANGE_WAIT_AFTER>"
10865
10866 #. type: Plain text
10867 #: build/C/man2/sync_file_range.2:141
10868 msgid ""
10869 "This is a write-for-data-integrity operation that will ensure that all pages "
10870 "in the specified range which were dirty when B<sync_file_range>()  was "
10871 "called are committed to disk."
10872 msgstr ""
10873 "これは write-for-data-integrity 操作 (データ完全性確保のための書き込み) であ"
10874 "り、指定された範囲内の、 B<sync_file_range>()  が呼ばれた時点で dirty な全て"
10875 "のページが ディスクに格納されることが保証される。"
10876
10877 #. type: Plain text
10878 #: build/C/man2/sync_file_range.2:147
10879 msgid ""
10880 "On success, B<sync_file_range>()  returns 0; on failure -1 is returned and "
10881 "I<errno> is set to indicate the error."
10882 msgstr ""
10883 "成功の場合、 B<sync_file_range>()  は 0 を返す。失敗の場合、-1 を返し、 "
10884 "I<error> にエラーを示す値を設定する。"
10885
10886 #. type: Plain text
10887 #: build/C/man2/sync_file_range.2:152
10888 msgid "I<fd> is not a valid file descriptor."
10889 msgstr "I<fd> が有効なファイルディスクリプタではない。"
10890
10891 #. type: Plain text
10892 #: build/C/man2/sync_file_range.2:160
10893 msgid ""
10894 "I<flags> specifies an invalid bit; or I<offset> or I<nbytes> is invalid."
10895 msgstr ""
10896 "I<flags> に不正なビットが指定されている。または I<offset> か I<nbytes> が不正"
10897 "である。"
10898
10899 #. type: Plain text
10900 #: build/C/man2/sync_file_range.2:163
10901 msgid "I/O error."
10902 msgstr "I/O エラー。"
10903
10904 #. type: Plain text
10905 #: build/C/man2/sync_file_range.2:169
10906 msgid "Out of disk space."
10907 msgstr "ディスク領域不足である。"
10908
10909 #.  FIXME . (bug?) Actually, how can 'fd' refer to a symbolic link (S_ISLNK)?
10910 #.  (In user space at least) it isn't possible to obtain a file descriptor
10911 #.  for a symbolic link.
10912 #. type: Plain text
10913 #: build/C/man2/sync_file_range.2:177
10914 msgid ""
10915 "I<fd> refers to something other than a regular file, a block device, a "
10916 "directory, or a symbolic link."
10917 msgstr ""
10918 "I<fd> が、通常のファイル、ブロックデバイス、ディレクトリ、シンボリックリンク "
10919 "以外のものを指している。"
10920
10921 #. type: Plain text
10922 #: build/C/man2/sync_file_range.2:180
10923 msgid "B<sync_file_range>()  appeared on Linux in kernel 2.6.17."
10924 msgstr "B<sync_file_range>()  はカーネル 2.6.17 で Linux に登場した。"
10925
10926 #. type: Plain text
10927 #: build/C/man2/sync_file_range.2:183
10928 msgid ""
10929 "This system call is Linux-specific, and should be avoided in portable "
10930 "programs."
10931 msgstr ""
10932 "このシステムコールは Linux 独自であり、 移植性が必要なプログラムでは使用を避"
10933 "けるべきである。"
10934
10935 #.  See kernel commit edd5cd4a9424f22b0fa08bef5e299d41befd5622
10936 #. type: Plain text
10937 #: build/C/man2/sync_file_range.2:200
10938 msgid ""
10939 "Some architectures (e.g., PowerPC, ARM)  need 64-bit arguments to be aligned "
10940 "in a suitable pair of registers.  On such architectures, the call signature "
10941 "of B<sync_file_range>()  shown in the SYNOPSIS would force a register to be "
10942 "wasted as padding between the I<fd> and I<offset> arguments.  (See B<syscall>"
10943 "(2)  for details.)  Therefore, these architectures define a different system "
10944 "call that orders the arguments suitably:"
10945 msgstr ""
10946 "いくつかのアーキテクチャ (例えば、 PowerPC や ARM) では、 64 ビットの引き数は"
10947 "適切なレジスタの組に割り当てる必要がある。 このようなアーキテクチャでは、 "
10948 "「書式」に書かれている B<sync_file_range>() の呼び出しシグネチャーで、 引き"
10949 "数 I<fd> と I<offset> の間のパディング (詰めもの) でレジスタが一つ消費されて"
10950 "しまう (詳細は B<syscall>(2) 参照)。 そのため、 これらのアーキテクチャでは引"
10951 "き数が適切な順序になった別のシステムコールが定義されている。"
10952
10953 #. type: Plain text
10954 #: build/C/man2/sync_file_range.2:205
10955 #, no-wrap
10956 msgid ""
10957 "B<int sync_file_range2(int >I<fd>B<, unsigned int >I<flags>B<,>\n"
10958 "B<                     off64_t >I<offset>B<, off64_t >I<nbytes>B<);>\n"
10959 msgstr ""
10960 "B<int sync_file_range2(int >I<fd>B<, unsigned int >I<flags>B<,>\n"
10961 "B<                     off64_t >I<offset>B<, off64_t >I<nbytes>B<);>\n"
10962
10963 #. type: Plain text
10964 #: build/C/man2/sync_file_range.2:210
10965 msgid ""
10966 "The behavior of this system call is otherwise exactly the same as "
10967 "B<sync_file_range>()."
10968 msgstr ""
10969 "上記の点以外は、このシステムコールの動作は B<sync_file_range>() と\n"
10970 "全く同じである。このシステムコールに対するライブラリによるサポートは\n"
10971 "glibc では提供されていない。"
10972
10973 #. type: Plain text
10974 #: build/C/man2/sync_file_range.2:221
10975 msgid ""
10976 "A system call with this signature first appeared on the ARM architecture in "
10977 "Linux 2.6.20, with the name B<arm_sync_file_range>().  It was renamed in "
10978 "Linux 2.6.22, when the analogous system call was added for PowerPC.  On "
10979 "architectures where glibc support is provided, glibc transparently wraps "
10980 "B<sync_file_range2>()  under the name B<sync_file_range>()."
10981 msgstr ""
10982 "このバージョンのシステムコールは、Linux 2.6.20 で ARM アーキテクチャで\n"
10983 "初めて登場し、 B<arm_sync_file_range>() という名前であった。\n"
10984 "Linux 2.6.22 で、同様のシステムコールが PowerPC 用に追加された際に、\n"
10985 "システムコールの名前が変更された。\n"
10986 "glibc によるサポートが提供されているアーキテクチャでは、\n"
10987 "glibc のラッパー関数は B<sync_file_range>() という名前で\n"
10988 "B<sync_file_range2>() を適切に使用するようになっている。"
10989
10990 #. type: Plain text
10991 #: build/C/man2/sync_file_range.2:226
10992 msgid "B<fdatasync>(2), B<fsync>(2), B<msync>(2), B<sync>(2)"
10993 msgstr "B<fdatasync>(2), B<fsync>(2), B<msync>(2), B<sync>(2)"
10994
10995 #~ msgid "2014-01-24"
10996 #~ msgstr "2014-01-24"
10997
10998 #~ msgid "2012-04-28"
10999 #~ msgstr "2012-04-28"
11000
11001 #~ msgid "2011-09-14"
11002 #~ msgstr "2011-09-14"
11003
11004 #~ msgid ""
11005 #~ "Maximum size in bytes for a shared memory segment: policy dependent (on "
11006 #~ "Linux, this limit can be read and modified via I</proc/sys/kernel/"
11007 #~ "shmmax>)."
11008 #~ msgstr ""
11009 #~ "共有メモリ・セグメントのバイト単位の大きさの上限: 方針依存 (Linux では、こ"
11010 #~ "の上限値は I</proc/sys/kernel/shmmax> 経由で参照したり、変更したりでき"
11011 #~ "る)。"
11012
11013 #~ msgid ""
11014 #~ "System wide maximum number of shared memory segments: implementation "
11015 #~ "dependent (currently 4096, was 128 before Linux 2.3.99; on Linux, this "
11016 #~ "limit can be read and modified via I</proc/sys/kernel/shmmni>)."
11017 #~ msgstr ""
11018 #~ "システム全体の共有メモリーの数の上限: 実装依存 (現在は 4096。Linux 2.3.99 "
11019 #~ "より前では 128。 Linux では、この上限値は I</proc/sys/kernel/shmmni> 経由"
11020 #~ "で参照したり、変更したりできる)。"
11021
11022 #~ msgid "2013-05-12"
11023 #~ msgstr "2013-05-12"
11024
11025 #~ msgid "2012-04-16"
11026 #~ msgstr "2012-04-16"
11027
11028 #~ msgid "2012-08-14"
11029 #~ msgstr "2012-08-14"
11030
11031 #~ msgid "2012-03-23"
11032 #~ msgstr "2012-03-23"
11033
11034 #~ msgid "B<fallocate>()  returns zero on success, and -1 on failure."
11035 #~ msgstr "B<fallocate>()  は成功すると 0 を返し、エラーの場合は -1 を返す。"
11036
11037 #~ msgid "On success, B<malloc_info>()  returns 0; on error, it returns -1."
11038 #~ msgstr "B<malloc_info>() は成功すると 0 を返す。エラーの場合は -1 を返す。"
11039
11040 #~ msgid "2012-05-31"
11041 #~ msgstr "2012-05-31"
11042
11043 #~ msgid ""
11044 #~ "A valid segment identifier, I<shmid>, is returned on success, -1 on error."
11045 #~ msgstr ""
11046 #~ "成功した場合、有効なセグメント識別子 I<shmid> が返される。エラーの場合、 "
11047 #~ "-1 が返される。"
11048
11049 #~ msgid ""
11050 #~ "The ARM architecture needs 64-bit arguments to be aligned in a suitable "
11051 #~ "pair of registers.  On this architecture, the call signature of "
11052 #~ "B<posix_fadvise>()  is flawed, since it forces a register to be wasted as "
11053 #~ "padding between the I<fd> and I<len> arguments.  Therefore, since Linux "
11054 #~ "2.6.14, ARM defines a different system call that orders the arguments "
11055 #~ "suitably:"
11056 #~ msgstr ""
11057 #~ "ARM アーキテクチャでは、64 ビットの引き数は適切なレジスタの組に割り当て\n"
11058 #~ "る必要がある。このアーキテクチャでは、B<posix_fadvise>() の呼び出し方に\n"
11059 #~ "は欠陥があり、それはこのシステムコールでは引き数 I<fd> と I<len> の間の\n"
11060 #~ "パディング (詰めもの) でレジスタが一つ消費されてしまうというものである。\n"
11061 #~ "そのため、Linux 2.6.14 以降では、ARM では引き数が適切な順序になった別の\n"
11062 #~ "システムコールが定義されている。"
11063
11064 #~ msgid ""
11065 #~ "The behavior of this system call is otherwise exactly the same as "
11066 #~ "B<posix_fadvise>().  No library support is provided for this system call "
11067 #~ "in glibc."
11068 #~ msgstr ""
11069 #~ "上記の点以外は、このシステムコールの動作は B<posix_fadvise>() と全く\n"
11070 #~ "同じである。このシステムコールに対するライブラリによるサポートは glibc\n"
11071 #~ "では提供されていない。"
11072
11073 #~ msgid ""
11074 #~ "The I<mode> is not supported by the file system containing the file "
11075 #~ "referred to by I<fd>."
11076 #~ msgstr ""
11077 #~ "I<fd> が参照するファイルを含むファイルシステムが I<mode> をサポートしてい"
11078 #~ "ない。"
11079
11080 #~ msgid ""
11081 #~ "The function B<mtrace>()  installs handlers for B<malloc>(3), B<realloc>"
11082 #~ "(3)  and B<free>(3).  The function B<muntrace>()  disables these handlers."
11083 #~ msgstr ""
11084 #~ "関数 B<mtrace>()  は、 B<malloc>(3), B<realloc>(3), B<free>(3)  のハンドラ"
11085 #~ "を組み込む。 関数 B<muntrace>()  はこれらのハンドラを解除する。"
11086
11087 #~ msgid ""
11088 #~ "The environment variable B<MALLOC_TRACE> defines a file where B<mtrace>"
11089 #~ "()  writes its output.  This file must be writable to the user or "
11090 #~ "B<mtrace>()  will do nothing.  If the file is not empty it will be "
11091 #~ "truncated."
11092 #~ msgstr ""
11093 #~ "環境変数 B<MALLOC_TRACE> は B<mtrace>()  が出力を書き出すファイルを指定す"
11094 #~ "る。 ユーザが書き込み権限を持つファイルを指定しなければならない。 書き込み"
11095 #~ "権限がない場合、 B<mtrace>()  は何もしない。 ファイルが空でない場合、ファ"
11096 #~ "イルの元の内容を上書きする。"
11097
11098 #~ msgid ""
11099 #~ "The output of B<mtrace>()  will be ASCII but not in a friendly format.  "
11100 #~ "So glibc comes with a perl-script called mtrace to make sense of it."
11101 #~ msgstr ""
11102 #~ "B<mtrace>()  の出力は ASCII 形式だが、人が読みやすいフォーマットではな"
11103 #~ "い。 そこで、glibc には mtrace 出力を分かりやすい形式に変換する perl スク"
11104 #~ "リプトが付属している。"
11105
11106 #~ msgid ""
11107 #~ "This flag allocates and initializes to zero the disk space within the "
11108 #~ "range specified by I<offset> and I<len>.  After a successful call, "
11109 #~ "subsequent writes into this range are guaranteed not to fail because of "
11110 #~ "lack of disk space.  Preallocating zeroed blocks beyond the end of the "
11111 #~ "file is useful for optimizing append workloads.  Preallocating blocks "
11112 #~ "does not change the file size (as reported by B<stat>(2))  even if it is "
11113 #~ "less than I<offset>+I<len>."
11114 #~ msgstr ""
11115 #~ "このフラグは、 I<offset> と I<len> で指定された領域のディスク空間を割り当"
11116 #~ "て、その空間を 0 で初期化する。 呼び出しが成功すると、それに続いてこの領域"
11117 #~ "への書き込みが行われるが、 ディスク空間の不足による書き込み失敗が発生しな"
11118 #~ "いことが保証される。 ファイル末尾より後ろの領域について 0 で埋めたブロック"
11119 #~ "を前もって 割り当てておくことは、追記 (append) の作業負荷を最適化するのに "
11120 #~ "有用である。 ファイルサイズが I<offset>+I<len> よりも小さい場合であって"
11121 #~ "も、ブロックの前もっての割り当てにより (B<stat>(2)  が返す) ファイルサイズ"
11122 #~ "は変更されることはない。"
11123
11124 #~ msgid ""
11125 #~ "(Linux 2.6.9 and later) the caller was not privileged (B<CAP_IPC_LOCK>)  "
11126 #~ "and its B<RLIMIT_MEMLOCK> soft resource limit was 0."
11127 #~ msgstr ""
11128 #~ "(Linux 2.6.9 以降) 呼び出し元は特権 (B<CAP_IPC_LOCK>)  を持たず、ソフト資"
11129 #~ "源制限 B<RLIMIT_MEMLOCK> が 0 である。"
11130
11131 #~ msgid ""
11132 #~ "(Linux 2.6.8 and earlier)  The calling process has insufficient privilege "
11133 #~ "to call B<munlockall>().  Under Linux the B<CAP_IPC_LOCK> capability is "
11134 #~ "required."
11135 #~ msgstr ""
11136 #~ "(Linux 2.6.8 以前)  呼び出し元プロセスが B<munlockall>()  を呼び出すのに必"
11137 #~ "要な特権を所有していなかった。 Linux では、 B<CAP_IPC_LOCK> ケーパビリティ"
11138 #~ "が必要である。"
11139
11140 #~ msgid ""
11141 #~ "B<posix_fadvise>()  appeared in kernel 2.5.60.  Glibc support has been "
11142 #~ "provided since version 2.2."
11143 #~ msgstr ""
11144 #~ "B<posix_fadvise>()  はカーネル 2.5.60 で登場した。 glibc でのサポートは "
11145 #~ "glibc バージョン 2.2 以降で行われている。"