OSDN Git Service

(split) LDP: Update POT and ja.po to LDP v3.64
[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-17 13:14+0900\n"
10 "PO-Revision-Date: 2014-04-14 02:53+0900\n"
11 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
12 "Language-Team: LANGUAGE <LL@li.org>\n"
13 "Language: \n"
14 "MIME-Version: 1.0\n"
15 "Content-Type: text/plain; charset=UTF-8\n"
16 "Content-Transfer-Encoding: 8bit\n"
17
18 #. type: TH
19 #: build/C/man2/alloc_hugepages.2:25
20 #, no-wrap
21 msgid "ALLOC_HUGEPAGES"
22 msgstr "ALLOC_HUGEPAGES"
23
24 #. type: TH
25 #: build/C/man2/alloc_hugepages.2:25
26 #, no-wrap
27 msgid "2007-05-31"
28 msgstr "2007-05-31"
29
30 #. type: TH
31 #: build/C/man2/alloc_hugepages.2:25 build/C/man2/cacheflush.2:25
32 #: build/C/man2/fallocate.2:11 build/C/man2/madvise.2:35
33 #: build/C/man3/mallinfo.3:26 build/C/man3/malloc_stats.3:26
34 #: build/C/man3/malloc_trim.3:26 build/C/man3/mallopt.3:26
35 #: build/C/man2/mlock.2:26 build/C/man2/mmap.2:40 build/C/man2/mmap2.2:29
36 #: build/C/man2/mprotect.2:38 build/C/man2/mremap.2:30 build/C/man2/msync.2:25
37 #: build/C/man2/posix_fadvise.2:28 build/C/man2/readahead.2:28
38 #: build/C/man2/remap_file_pages.2:28 build/C/man3/shm_open.3:26
39 #: build/C/man7/shm_overview.7:27 build/C/man2/shmctl.2:45
40 #: build/C/man2/shmget.2:38 build/C/man2/shmop.2:41
41 #: build/C/man2/subpage_prot.2:30 build/C/man2/sync_file_range.2:30
42 #, no-wrap
43 msgid "Linux"
44 msgstr "Linux"
45
46 #. type: TH
47 #: build/C/man2/alloc_hugepages.2:25 build/C/man3/alloca.3:43
48 #: build/C/man2/cacheflush.2:25 build/C/man2/fallocate.2:11
49 #: build/C/man2/madvise.2:35 build/C/man3/mallinfo.3:26
50 #: build/C/man3/malloc_get_state.3:25 build/C/man3/malloc_hook.3:10
51 #: build/C/man3/malloc_info.3:25 build/C/man3/malloc_stats.3:26
52 #: build/C/man3/malloc_trim.3:26 build/C/man3/malloc_usable_size.3:25
53 #: build/C/man3/mallopt.3:26 build/C/man3/mcheck.3:25 build/C/man2/mlock.2:26
54 #: build/C/man2/mmap.2:40 build/C/man2/mmap2.2:29 build/C/man2/mprotect.2:38
55 #: build/C/man2/mremap.2:30 build/C/man2/msync.2:25 build/C/man3/mtrace.3:25
56 #: build/C/man2/posix_fadvise.2:28 build/C/man3/posix_fallocate.3:25
57 #: build/C/man3/posix_memalign.3:29 build/C/man2/readahead.2:28
58 #: build/C/man2/remap_file_pages.2:28 build/C/man3/shm_open.3:26
59 #: build/C/man7/shm_overview.7:27 build/C/man2/shmctl.2:45
60 #: build/C/man2/shmget.2:38 build/C/man2/shmop.2:41
61 #: build/C/man2/subpage_prot.2:30 build/C/man2/sync_file_range.2:30
62 #, no-wrap
63 msgid "Linux Programmer's Manual"
64 msgstr "Linux Programmer's Manual"
65
66 #. type: SH
67 #: build/C/man2/alloc_hugepages.2:26 build/C/man3/alloca.3:44
68 #: build/C/man2/cacheflush.2:26 build/C/man2/fallocate.2:12
69 #: build/C/man2/madvise.2:36 build/C/man3/mallinfo.3:27
70 #: build/C/man3/malloc_get_state.3:26 build/C/man3/malloc_hook.3:11
71 #: build/C/man3/malloc_info.3:26 build/C/man3/malloc_stats.3:27
72 #: build/C/man3/malloc_trim.3:27 build/C/man3/malloc_usable_size.3:26
73 #: build/C/man3/mallopt.3:27 build/C/man3/mcheck.3:26 build/C/man2/mlock.2:27
74 #: build/C/man2/mmap.2:41 build/C/man2/mmap2.2:30 build/C/man2/mprotect.2:39
75 #: build/C/man2/mremap.2:31 build/C/man2/msync.2:26 build/C/man3/mtrace.3:26
76 #: build/C/man2/posix_fadvise.2:29 build/C/man3/posix_fallocate.3:26
77 #: build/C/man3/posix_memalign.3:30 build/C/man2/readahead.2:29
78 #: build/C/man2/remap_file_pages.2:29 build/C/man3/shm_open.3:27
79 #: build/C/man7/shm_overview.7:28 build/C/man2/shmctl.2:46
80 #: build/C/man2/shmget.2:39 build/C/man2/shmop.2:42
81 #: build/C/man2/subpage_prot.2:31 build/C/man2/sync_file_range.2:31
82 #, no-wrap
83 msgid "NAME"
84 msgstr "名前"
85
86 #. type: Plain text
87 #: build/C/man2/alloc_hugepages.2:28
88 msgid "alloc_hugepages, free_hugepages - allocate or free huge pages"
89 msgstr ""
90 "alloc_hugepages, free_hugepages - 大きなサイズのページの割り当てと解放を行う"
91
92 #. type: SH
93 #: build/C/man2/alloc_hugepages.2:28 build/C/man3/alloca.3:46
94 #: build/C/man2/cacheflush.2:28 build/C/man2/fallocate.2:14
95 #: build/C/man2/madvise.2:38 build/C/man3/mallinfo.3:29
96 #: build/C/man3/malloc_get_state.3:28 build/C/man3/malloc_hook.3:15
97 #: build/C/man3/malloc_info.3:28 build/C/man3/malloc_stats.3:29
98 #: build/C/man3/malloc_trim.3:29 build/C/man3/malloc_usable_size.3:28
99 #: build/C/man3/mallopt.3:29 build/C/man3/mcheck.3:28 build/C/man2/mlock.2:29
100 #: build/C/man2/mmap.2:43 build/C/man2/mmap2.2:32 build/C/man2/mprotect.2:41
101 #: build/C/man2/mremap.2:33 build/C/man2/msync.2:28 build/C/man3/mtrace.3:28
102 #: build/C/man2/posix_fadvise.2:31 build/C/man3/posix_fallocate.3:28
103 #: build/C/man3/posix_memalign.3:32 build/C/man2/readahead.2:31
104 #: build/C/man2/remap_file_pages.2:31 build/C/man3/shm_open.3:29
105 #: build/C/man2/shmctl.2:48 build/C/man2/shmget.2:41 build/C/man2/shmop.2:44
106 #: build/C/man2/subpage_prot.2:33 build/C/man2/sync_file_range.2:33
107 #, no-wrap
108 msgid "SYNOPSIS"
109 msgstr "書式"
110
111 #.  asmlinkage unsigned long sys_alloc_hugepages(int key, unsigned long addr,
112 #.  unsigned long len, int prot, int flag);
113 #. type: Plain text
114 #: build/C/man2/alloc_hugepages.2:34
115 #, no-wrap
116 msgid ""
117 "B<void *alloc_hugepages(int >I<key>B<, void *>I<addr>B<, size_t >I<len>B<,>\n"
118 "B<                      int >I<prot>B<, int >I<flag>B<);>\n"
119 msgstr ""
120 "B<void *alloc_hugepages(int >I<key>B<, void *>I<addr>B<, size_t >I<len>B<,>\n"
121 "B<                      int >I<prot>B<, int >I<flag>B<);>\n"
122
123 #.  asmlinkage int sys_free_hugepages(unsigned long addr);
124 #. type: Plain text
125 #: build/C/man2/alloc_hugepages.2:37
126 #, no-wrap
127 msgid "B<int free_hugepages(void *>I<addr>B<);>\n"
128 msgstr "B<int free_hugepages(void *>I<addr>B<);>\n"
129
130 #. type: SH
131 #: build/C/man2/alloc_hugepages.2:38 build/C/man3/alloca.3:50
132 #: build/C/man2/cacheflush.2:34 build/C/man2/fallocate.2:22
133 #: build/C/man2/madvise.2:50 build/C/man3/mallinfo.3:33
134 #: build/C/man3/malloc_get_state.3:36 build/C/man3/malloc_hook.3:33
135 #: build/C/man3/malloc_info.3:34 build/C/man3/malloc_stats.3:33
136 #: build/C/man3/malloc_trim.3:33 build/C/man3/malloc_usable_size.3:32
137 #: build/C/man3/mallopt.3:33 build/C/man3/mcheck.3:40 build/C/man2/mlock.2:39
138 #: build/C/man2/mmap.2:54 build/C/man2/mmap2.2:39 build/C/man2/mprotect.2:47
139 #: build/C/man2/mremap.2:42 build/C/man2/msync.2:32 build/C/man3/mtrace.3:34
140 #: build/C/man2/posix_fadvise.2:50 build/C/man3/posix_fallocate.3:46
141 #: build/C/man3/posix_memalign.3:84 build/C/man2/readahead.2:38
142 #: build/C/man2/remap_file_pages.2:39 build/C/man3/shm_open.3:41
143 #: build/C/man7/shm_overview.7:30 build/C/man2/shmctl.2:56
144 #: build/C/man2/shmget.2:49 build/C/man2/shmop.2:53
145 #: build/C/man2/subpage_prot.2:41 build/C/man2/sync_file_range.2:41
146 #, no-wrap
147 msgid "DESCRIPTION"
148 msgstr "説明"
149
150 #. type: Plain text
151 #: build/C/man2/alloc_hugepages.2:49
152 msgid ""
153 "The system calls B<alloc_hugepages>()  and B<free_hugepages>()  were "
154 "introduced in Linux 2.5.36 and removed again in 2.5.54.  They existed only "
155 "on i386 and ia64 (when built with B<CONFIG_HUGETLB_PAGE>).  In Linux 2.4.20 "
156 "the syscall numbers exist, but the calls fail with the error B<ENOSYS>."
157 msgstr ""
158 "システムコール B<alloc_hugepages>()  と B<free_hugepages>()  は Linux 2.5.36 "
159 "で導入され、2.5.54 で再び削除された。 これらのシステムコールは i386 と ia64 "
160 "のみで (かつ B<CONFIG_HUGETLB_PAGE> を指定してビルドされた場合に) 存在する。 "
161 "Linux 2.4.20 では syscall 番号が存在するが、 呼び出すとエラー B<ENOSYS> で失"
162 "敗する。"
163
164 #. type: Plain text
165 #: build/C/man2/alloc_hugepages.2:57
166 msgid ""
167 "On i386 the memory management hardware knows about ordinary pages (4 KiB)  "
168 "and huge pages (2 or 4 MiB).  Similarly ia64 knows about huge pages of "
169 "several sizes.  These system calls serve to map huge pages into the "
170 "process's memory or to free them again.  Huge pages are locked into memory, "
171 "and are not swapped."
172 msgstr ""
173 "i386 では、メモリ管理ハードウェアは通常のページ (4 KiB) と 大きなサイズのペー"
174 "ジ (以下、ヒュージページ; 2MiB または 4 MiB) を 扱うことができる。 同様に、"
175 "ia64 もいくつかのサイズのヒュージページを扱うことができる。 これらのシステム"
176 "コールは、ヒュージページをプロセスのメモリにマップしたり、 再び解放したりす"
177 "る。 ヒュージページはメモリ内にロックされ、スワップされない。"
178
179 #. type: Plain text
180 #: build/C/man2/alloc_hugepages.2:66
181 msgid ""
182 "The I<key> argument is an identifier.  When zero the pages are private, and "
183 "not inherited by children.  When positive the pages are shared with other "
184 "applications using the same I<key>, and inherited by child processes."
185 msgstr ""
186 "I<key> 引き数は識別子である。 0 の場合、ページは非公開になり、子プロセスに継"
187 "承されない。 正の場合、ページは同じ I<key> を使う他のアプリケーションと共有さ"
188 "れ、子プロセスに継承される。"
189
190 #. type: Plain text
191 #: build/C/man2/alloc_hugepages.2:81
192 msgid ""
193 "The I<addr> argument of B<free_hugepages>()  tells which page is being "
194 "freed: it was the return value of a call to B<alloc_hugepages>().  (The "
195 "memory is first actually freed when all users have released it.)  The "
196 "I<addr> argument of B<alloc_hugepages>()  is a hint, that the kernel may or "
197 "may not follow.  Addresses must be properly aligned."
198 msgstr ""
199 "B<free_hugepages>()  の I<addr> 引き数は、どのページを解放するかを指定する: "
200 "I<addr> は B<alloc_hugepages>()  の呼び出しの返り値である (全てのユーザがメモ"
201 "リを解放したときに、 そのメモリは初めて実際に解放される)。 B<alloc_hugepages>"
202 "()  の I<addr> 引き数はヒントであり、カーネルはそれに従うかもしれないし、 従"
203 "わないかもしれない。 アドレスは正しく配置されなければならない。"
204
205 #. type: Plain text
206 #: build/C/man2/alloc_hugepages.2:86
207 msgid ""
208 "The I<len> argument is the length of the required segment.  It must be a "
209 "multiple of the huge page size."
210 msgstr ""
211 "I<len> 引き数は要求されたセグメントの長さである。 これはヒュージページのサイ"
212 "ズの倍数にしなければならない。"
213
214 #. type: Plain text
215 #: build/C/man2/alloc_hugepages.2:94
216 msgid ""
217 "The I<prot> argument specifies the memory protection of the segment.  It is "
218 "one of B<PROT_READ>, B<PROT_WRITE>, B<PROT_EXEC>."
219 msgstr ""
220 "I<prot> 引き数はセグメントのメモリ保護を指定する。 これは B<PROT_READ>, "
221 "B<PROT_WRITE>, B<PROT_EXEC> のいずれかである。"
222
223 #. type: Plain text
224 #: build/C/man2/alloc_hugepages.2:109
225 msgid ""
226 "The I<flag> argument is ignored, unless I<key> is positive.  In that case, "
227 "if I<flag> is B<IPC_CREAT>, then a new huge page segment is created when "
228 "none with the given key existed.  If this flag is not set, then B<ENOENT> is "
229 "returned when no segment with the given key exists."
230 msgstr ""
231 "I<key> が正でない限り、 I<flag> 引き数は無視される。 I<key> が正で、かつ "
232 "I<flag> が B<IPC_CREAT> であり、かつ指定された I<key> で (セグメントが) 何も"
233 "存在しない場合、 新しいヒュージページセグメントが作成される。 I<flag> が設定"
234 "されておらず、かつ指定された I<key> のセグメントが存在しない場合、 B<ENOENT> "
235 "が返される。"
236
237 #. type: SH
238 #: build/C/man2/alloc_hugepages.2:109 build/C/man3/alloca.3:60
239 #: build/C/man2/cacheflush.2:53 build/C/man2/fallocate.2:127
240 #: build/C/man2/madvise.2:268 build/C/man3/malloc_get_state.3:61
241 #: build/C/man3/malloc_info.3:48 build/C/man3/malloc_trim.3:51
242 #: build/C/man3/malloc_usable_size.3:40 build/C/man3/mallopt.3:379
243 #: build/C/man3/mcheck.3:129 build/C/man2/mlock.2:116 build/C/man2/mmap.2:375
244 #: build/C/man2/mmap2.2:54 build/C/man2/mprotect.2:78
245 #: build/C/man2/mremap.2:127 build/C/man2/msync.2:68
246 #: build/C/man2/posix_fadvise.2:87 build/C/man3/posix_fallocate.3:66
247 #: build/C/man3/posix_memalign.3:142 build/C/man2/readahead.2:66
248 #: build/C/man2/remap_file_pages.2:124 build/C/man3/shm_open.3:171
249 #: build/C/man2/shmctl.2:283 build/C/man2/shmget.2:180
250 #: build/C/man2/shmop.2:171 build/C/man2/subpage_prot.2:66
251 #: build/C/man2/sync_file_range.2:141
252 #, no-wrap
253 msgid "RETURN VALUE"
254 msgstr "返り値"
255
256 #. type: Plain text
257 #: build/C/man2/alloc_hugepages.2:118
258 msgid ""
259 "On success, B<alloc_hugepages>()  returns the allocated virtual address, and "
260 "B<free_hugepages>()  returns zero.  On error, -1 is returned, and I<errno> "
261 "is set appropriately."
262 msgstr ""
263 "成功した場合、 B<alloc_hugepages>()  は割り当てられた仮想アドレスを返し、 "
264 "B<free_hugepages>()  は 0 を返す。 失敗した場合、-1 を返し、 I<errno> が適切"
265 "に設定される。"
266
267 #. type: SH
268 #: build/C/man2/alloc_hugepages.2:118 build/C/man2/cacheflush.2:59
269 #: build/C/man2/fallocate.2:134 build/C/man2/madvise.2:275
270 #: build/C/man3/malloc_info.3:55 build/C/man3/malloc_trim.3:56
271 #: build/C/man3/mallopt.3:384 build/C/man2/mlock.2:122 build/C/man2/mmap.2:392
272 #: build/C/man2/mmap2.2:61 build/C/man2/mprotect.2:85
273 #: build/C/man2/mremap.2:135 build/C/man2/msync.2:73
274 #: build/C/man2/posix_fadvise.2:90 build/C/man3/posix_fallocate.3:72
275 #: build/C/man3/posix_memalign.3:157 build/C/man2/readahead.2:72
276 #: build/C/man2/remap_file_pages.2:131 build/C/man3/shm_open.3:180
277 #: build/C/man2/shmctl.2:305 build/C/man2/shmget.2:185
278 #: build/C/man2/shmop.2:185 build/C/man2/subpage_prot.2:71
279 #: build/C/man2/sync_file_range.2:147
280 #, no-wrap
281 msgid "ERRORS"
282 msgstr "エラー"
283
284 #. type: TP
285 #: build/C/man2/alloc_hugepages.2:119 build/C/man2/fallocate.2:173
286 #, no-wrap
287 msgid "B<ENOSYS>"
288 msgstr "B<ENOSYS>"
289
290 #. type: Plain text
291 #: build/C/man2/alloc_hugepages.2:122
292 msgid "The system call is not supported on this kernel."
293 msgstr "このシステムコールはカーネルでサポートされていない。"
294
295 #. type: SH
296 #: build/C/man2/alloc_hugepages.2:122
297 #, no-wrap
298 msgid "FILES"
299 msgstr "ファイル"
300
301 #. type: Plain text
302 #: build/C/man2/alloc_hugepages.2:126
303 msgid ""
304 "I</proc/sys/vm/nr_hugepages> Number of configured hugetlb pages.  This can "
305 "be read and written."
306 msgstr ""
307 "I</proc/sys/vm/nr_hugepages> 設定された hugetlb ページの数。 このファイルは読"
308 "み書きできる。"
309
310 #. type: Plain text
311 #: build/C/man2/alloc_hugepages.2:130
312 msgid ""
313 "I</proc/meminfo> Gives info on the number of configured hugetlb pages and on "
314 "their size in the three variables HugePages_Total, HugePages_Free, "
315 "Hugepagesize."
316 msgstr ""
317 "I</proc/meminfo> 設定された hugetlb ページの数と、 3 つの変数 "
318 "HugePages_Total, HugePages_Free, Hugepagesize の サイズについての情報を提供す"
319 "る。"
320
321 #. type: SH
322 #: build/C/man2/alloc_hugepages.2:130 build/C/man3/alloca.3:70
323 #: build/C/man2/cacheflush.2:75 build/C/man2/fallocate.2:214
324 #: build/C/man2/madvise.2:325 build/C/man3/mallinfo.3:110
325 #: build/C/man3/malloc_get_state.3:86 build/C/man3/malloc_hook.3:80
326 #: build/C/man3/malloc_info.3:63 build/C/man3/malloc_stats.3:55
327 #: build/C/man3/malloc_trim.3:60 build/C/man3/malloc_usable_size.3:48
328 #: build/C/man3/mallopt.3:392 build/C/man3/mcheck.3:145
329 #: build/C/man2/mlock.2:186 build/C/man2/mmap.2: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/man3/mtrace.3:80 build/C/man2/posix_fadvise.2:121
360 #: build/C/man3/posix_memalign.3:221 build/C/man2/readahead.2:93
361 #: build/C/man3/shm_open.3:257 build/C/man7/shm_overview.7:103
362 #: build/C/man2/shmctl.2:382 build/C/man2/shmget.2:238
363 #: build/C/man2/shmop.2:250 build/C/man2/subpage_prot.2:98
364 #: build/C/man2/sync_file_range.2:183
365 #, no-wrap
366 msgid "NOTES"
367 msgstr "注意"
368
369 #. type: Plain text
370 #: build/C/man2/alloc_hugepages.2:141
371 msgid ""
372 "These system calls are gone; they existed only in Linux 2.5.36 through to "
373 "2.5.54.  Now the hugetlbfs filesystem can be used instead.  Memory backed by "
374 "huge pages (if the CPU supports them) is obtained by using B<mmap>(2)  to "
375 "map files in this virtual filesystem."
376 msgstr ""
377 "これらのシステムコールはなくなった。 これらは Linux 2.5.36 から 2.5.54 にのみ"
378 "存在する。 代わりに今は hugetlbfs ファイルシステムを使うことができる。 (CPU "
379 "がサポートしている場合) ヒュージページを持つメモリは、 B<mmap>(2)  を使ってこ"
380 "の仮想ファイルシステムでファイルをマップすることで取得できる。"
381
382 #. type: Plain text
383 #: build/C/man2/alloc_hugepages.2:145
384 msgid ""
385 "The maximal number of huge pages can be specified using the B<hugepages=> "
386 "boot parameter."
387 msgstr ""
388 "ヒュージページの最大数は、 B<hugepages=> 起動パラメータを使って指定できる。"
389
390 #. type: SH
391 #: build/C/man2/alloc_hugepages.2:150 build/C/man3/alloca.3:162
392 #: build/C/man2/cacheflush.2:89 build/C/man2/fallocate.2:222
393 #: build/C/man2/madvise.2:380 build/C/man3/mallinfo.3:279
394 #: build/C/man3/malloc_get_state.3:114 build/C/man3/malloc_hook.3:142
395 #: build/C/man3/malloc_info.3:262 build/C/man3/malloc_stats.3:67
396 #: build/C/man3/malloc_trim.3:82 build/C/man3/malloc_usable_size.3:64
397 #: build/C/man3/mallopt.3:580 build/C/man3/mcheck.3:208
398 #: build/C/man2/mlock.2:336 build/C/man2/mmap.2: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:124 build/C/man3/mtrace.3:172
401 #: build/C/man2/posix_fadvise.2:197 build/C/man3/posix_fallocate.3:133
402 #: build/C/man3/posix_memalign.3:277 build/C/man2/readahead.2:113
403 #: build/C/man2/remap_file_pages.2:164 build/C/man3/shm_open.3:282
404 #: build/C/man7/shm_overview.7:127 build/C/man2/shmctl.2:435
405 #: build/C/man2/shmget.2:314 build/C/man2/shmop.2:295
406 #: build/C/man2/subpage_prot.2:134 build/C/man2/sync_file_range.2:226
407 #, no-wrap
408 msgid "COLOPHON"
409 msgstr "この文書について"
410
411 #. type: Plain text
412 #: build/C/man2/alloc_hugepages.2:157 build/C/man3/alloca.3:169
413 #: build/C/man2/cacheflush.2:96 build/C/man2/fallocate.2:229
414 #: build/C/man2/madvise.2:387 build/C/man3/mallinfo.3:286
415 #: build/C/man3/malloc_get_state.3:121 build/C/man3/malloc_hook.3:149
416 #: build/C/man3/malloc_info.3:269 build/C/man3/malloc_stats.3:74
417 #: build/C/man3/malloc_trim.3:89 build/C/man3/malloc_usable_size.3:71
418 #: build/C/man3/mallopt.3:587 build/C/man3/mcheck.3:215
419 #: build/C/man2/mlock.2:343 build/C/man2/mmap.2: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:131 build/C/man3/mtrace.3:179
422 #: build/C/man2/posix_fadvise.2:204 build/C/man3/posix_fallocate.3:140
423 #: build/C/man3/posix_memalign.3:284 build/C/man2/readahead.2:120
424 #: build/C/man2/remap_file_pages.2:171 build/C/man3/shm_open.3:289
425 #: build/C/man7/shm_overview.7:134 build/C/man2/shmctl.2:442
426 #: build/C/man2/shmget.2:321 build/C/man2/shmop.2:302
427 #: build/C/man2/subpage_prot.2:141 build/C/man2/sync_file_range.2:233
428 #, fuzzy
429 #| msgid ""
430 #| "This page is part of release 3.63 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.64 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.63 の一部\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:304 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:300
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:217
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:329 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:120 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:306 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:146
786 #: build/C/man2/madvise.2:282 build/C/man3/malloc_info.3:56
787 #: build/C/man2/mlock.2:157 build/C/man2/mlock.2:164 build/C/man2/mlock.2:176
788 #: build/C/man2/mmap.2:421 build/C/man2/mmap.2:429 build/C/man2/mmap.2:434
789 #: build/C/man2/mmap2.2:65 build/C/man2/mprotect.2:95
790 #: build/C/man2/mremap.2:151 build/C/man2/msync.2:80
791 #: build/C/man2/posix_fadvise.2:94 build/C/man3/posix_fallocate.3:81
792 #: build/C/man3/posix_memalign.3:158 build/C/man2/readahead.2:77
793 #: build/C/man2/remap_file_pages.2:132 build/C/man2/remap_file_pages.2:139
794 #: build/C/man3/shm_open.3:213 build/C/man2/shmctl.2:328
795 #: build/C/man2/shmget.2:199 build/C/man2/shmop.2:200 build/C/man2/shmop.2:223
796 #: build/C/man2/subpage_prot.2:77 build/C/man2/sync_file_range.2:152
797 #, no-wrap
798 msgid "B<EINVAL>"
799 msgstr "B<EINVAL>"
800
801 #. type: Plain text
802 #: build/C/man2/cacheflush.2:75
803 msgid "I<cache> is not one of B<ICACHE>, B<DCACHE>, or B<BCACHE>."
804 msgstr "I<cache> パラメータが B<ICACHE>, B<DCACHE>, B<BCACHE> のどれでもない。"
805
806 #.  FIXME This system call was only on MIPS back in 1.2 days, but
807 #.  by now it is on a number of other architectures (but not i386).
808 #.  Investigate the details and update this page.
809 #.  Irix 6.5 appears to have a cacheflush() syscall -- mtk
810 #. type: Plain text
811 #: build/C/man2/cacheflush.2:82
812 msgid ""
813 "This Linux-specific system call is available only on MIPS-based systems.  It "
814 "should not be used in programs intended to be portable."
815 msgstr ""
816 "この Linux 特有のシステムコールは MIPS ベースのシステムでのみ有効である。 移"
817 "植を意図したプログラムで使用すべきではない。"
818
819 #. type: Plain text
820 #: build/C/man2/cacheflush.2:89
821 msgid ""
822 "The current implementation ignores the I<addr> and I<nbytes> arguments.  "
823 "Therefore, the whole cache is always flushed."
824 msgstr ""
825 "現在の実装では、引き数 I<addr> と I<nbytes> は無視される。そのため、 常に全て"
826 "のキャッシュがフラッシュされる。"
827
828 #. type: TH
829 #: build/C/man2/fallocate.2:11
830 #, no-wrap
831 msgid "FALLOCATE"
832 msgstr "FALLOCATE"
833
834 #. type: TH
835 #: build/C/man2/fallocate.2:11
836 #, no-wrap
837 msgid "2014-01-24"
838 msgstr "2014-01-24"
839
840 #. type: Plain text
841 #: build/C/man2/fallocate.2:14
842 msgid "fallocate - manipulate file space"
843 msgstr "fallocate - ファイル空間の操作"
844
845 #. type: Plain text
846 #: build/C/man2/fallocate.2:18 build/C/man2/readahead.2:35
847 #, no-wrap
848 msgid ""
849 "B<#define _GNU_SOURCE>             /* See feature_test_macros(7) */\n"
850 "B<#include E<lt>fcntl.hE<gt>>\n"
851 msgstr ""
852 "B<#define _GNU_SOURCE>             /* feature_test_macros(7) 参照 */\n"
853 "B<#include E<lt>fcntl.hE<gt>>\n"
854
855 #. type: Plain text
856 #: build/C/man2/fallocate.2:21
857 #, no-wrap
858 msgid "B<int fallocate(int >I<fd>B<, int >I<mode>B<, off_t >I<offset>B<, off_t >I<len>B<);>\n"
859 msgstr "B<int fallocate(int >I<fd>B<, int >I<mode>B<, off_t >I<offset>B<, off_t >I<len>B<);>\n"
860
861 #. type: Plain text
862 #: build/C/man2/fallocate.2:27
863 msgid ""
864 "This is a nonportable, Linux-specific system call.  For the portable, "
865 "POSIX.1-specified method of ensuring that space is allocated for a file, see "
866 "B<posix_fallocate>(3)."
867 msgstr ""
868 "このシステムコールは、移植性のない、Linux 固有のシステムコールである。 移植性"
869 "が必要な場合は、ファイルに対してディスク空間を確実に確保するために、 POSIX.1 "
870 "で規定された方法である B<posix_fallocate>(3)  を使うこと。"
871
872 #. type: Plain text
873 #: build/C/man2/fallocate.2:37
874 msgid ""
875 "B<fallocate>()  allows the caller to directly manipulate the allocated disk "
876 "space for the file referred to by I<fd> for the byte range starting at "
877 "I<offset> and continuing for I<len> bytes."
878 msgstr ""
879 "B<fallocate>()  を使うと、 I<fd> が参照するファイルに割り当てられたディスク空"
880 "間を直接操作できる。 操作対象は、 I<offset> から始まる長さ I<len> バイトの領"
881 "域である。"
882
883 #. type: Plain text
884 #: build/C/man2/fallocate.2:42
885 msgid ""
886 "The I<mode> argument determines the operation to be performed on the given "
887 "range.  Details of the supported operations are given in the subsections "
888 "below."
889 msgstr ""
890 "I<mode> 引き数は、指定された領域に対して実行する操作を指定する。\n"
891 "サポートされている操作の詳細は以下のサブセクションで説明する。"
892
893 #. type: SS
894 #: build/C/man2/fallocate.2:42
895 #, no-wrap
896 msgid "Allocating disk space"
897 msgstr "ディスク領域の割り当て"
898
899 #. type: Plain text
900 #: build/C/man2/fallocate.2:65
901 #, fuzzy
902 #| msgid ""
903 #| "The default operation (i.e., I<mode> is zero) of B<fallocate>()  "
904 #| "allocates and initializes to zero the disk space within the range "
905 #| "specified by I<offset> and I<len>.  The file size (as reported by B<stat>"
906 #| "(2))  will be changed if I<offset>+I<len> is greater than the file size.  "
907 #| "This default behavior closely resembles the behavior of the "
908 #| "B<posix_fallocate>(3)  library function, and is intended as a method of "
909 #| "optimally implementing that function."
910 msgid ""
911 "The default operation (i.e., I<mode> is zero) of B<fallocate>()  allocates "
912 "the disk space within the range specified by I<offset> and I<len>.  The file "
913 "size (as reported by B<stat>(2))  will be changed if I<offset>+I<len> is "
914 "greater than the file size.  Any subregion within the range specified by "
915 "I<offset> and I<len> that did not contain data before the call will be "
916 "initialized to zero.  This default behavior closely resembles the behavior "
917 "of the B<posix_fallocate>(3)  library function, and is intended as a method "
918 "of optimally implementing that function."
919 msgstr ""
920 "B<fallocate>() のデフォルトの動作 (つまり I<mode> が 0 の場合) は、\n"
921 "I<offset> と I<len> で指定された範囲のディスク領域の割り当てと初期化を行"
922 "う。\n"
923 "I<offset>+I<len> がファイルサイズよりも大きかった場合、\n"
924 "(B<stat>(2) で報告される) ファイルサイズが変更される。このデフォルトの動作"
925 "は、\n"
926 "ライブラリ関数 B<posix_fallocate>(3) の動作と非常に似ている。これは、\n"
927 "このシステムコールが B<posix_fallocate>(3) を最適に実装する手段を提供する\n"
928 "ことを目的としているからである。"
929
930 #. type: Plain text
931 #: build/C/man2/fallocate.2:71
932 msgid ""
933 "After a successful call, subsequent writes into the range specified by "
934 "I<offset> and I<len> are guaranteed not to fail because of lack of disk "
935 "space."
936 msgstr ""
937 "呼び出しが成功した場合、\n"
938 "I<offset> と I<len> で指定された範囲へのそれ以降の書き込みでは、\n"
939 "ディスクの領域不足での書き込み失敗が起こらないことが保証される。"
940
941 #. type: Plain text
942 #: build/C/man2/fallocate.2:82
943 msgid ""
944 "If the B<FALLOC_FL_KEEP_SIZE> flag is specified in I<mode>, the behavior of "
945 "the call is similar, but the file size will not be changed even if I<offset>"
946 "+I<len> is greater than the file size.  Preallocating zeroed blocks beyond "
947 "the end of the file in this manner is useful for optimizing append workloads."
948 msgstr ""
949 "B<FALLOC_FL_KEEP_SIZE> フラグが I<mode> に指定された場合、このシステムコー"
950 "ル\n"
951 "の動作は似ているが、 I<offset>+I<len> がファイルサイズよりも大きい場合で\n"
952 "あってもファイルサイズは変更されない点が異なる。この場合のファイルの末尾\n"
953 "よりも後ろの前もって割り当てられた 0 で埋められたブロックは、ファイルへの\n"
954 "追記を最適化したい場合に役に立つ。"
955
956 #. type: Plain text
957 #: build/C/man2/fallocate.2:86
958 msgid ""
959 "Because allocation is done in block size chunks, B<fallocate>()  may "
960 "allocate a larger range of disk space than was specified."
961 msgstr ""
962 "割り当てはブロックサイズ単位で行われるため、 B<fallocate>() は指定されたよ"
963 "り\n"
964 "も大きなディスク領域を割り当てることがある。"
965
966 #. type: SS
967 #: build/C/man2/fallocate.2:86
968 #, no-wrap
969 msgid "Deallocating file space"
970 msgstr "ファイル空間の割り当て解除"
971
972 #. type: Plain text
973 #: build/C/man2/fallocate.2:101
974 msgid ""
975 "Specifying the B<FALLOC_FL_PUNCH_HOLE> flag (available since Linux 2.6.38) "
976 "in I<mode> deallocates space (i.e., creates a hole)  in the byte range "
977 "starting at I<offset> and continuing for I<len> bytes.  Within the specified "
978 "range, partial filesystem blocks are zeroed, and whole filesystem blocks are "
979 "removed from the file.  After a successful call, subsequent reads from this "
980 "range will return zeroes."
981 msgstr ""
982 "B<FALLOC_FL_PUNCH_HOLE> フラグ (Linux 2.6.38 以降で利用可能) を I<mode> に指"
983 "定すると、 I<offset> で始まる I<len> バイトの領域の空間を解放する (ホールを作"
984 "成する)。 指定された範囲のうち、 部分的に使用しているファイルシステムブロック"
985 "は 0 で埋められ、 全体を使用しているファイルシステムブロックはそのファイルか"
986 "ら削除される。 呼び出しが成功すると、 これ以降のこの範囲からの読み出しでは 0 "
987 "を返す。"
988
989 #. type: Plain text
990 #: build/C/man2/fallocate.2:112
991 msgid ""
992 "The B<FALLOC_FL_PUNCH_HOLE> flag must be ORed with B<FALLOC_FL_KEEP_SIZE> in "
993 "I<mode>; in other words, even when punching off the end of the file, the "
994 "file size (as reported by B<stat>(2))  does not change."
995 msgstr ""
996 "B<FALLOC_FL_PUNCH_HOLE> フラグは B<FALLOC_FL_KEEP_SIZE> と論理和 (OR) をとっ"
997 "て I<mode> に指定しなければならない。 つまり、 ファイル末尾の punch off を"
998 "行った場合でも、 (B<stat>(2) で報告される) ファイルサイズが変化しない。"
999
1000 #. type: Plain text
1001 #: build/C/man2/fallocate.2:117
1002 #, fuzzy
1003 #| msgid ""
1004 #| "Not all filesystems support B<FALLOC_FL_PUNCH_HOLE>; if a filesystem "
1005 #| "doesn't support the operation, an error is returned."
1006 msgid ""
1007 "Not all filesystems support B<FALLOC_FL_PUNCH_HOLE>; if a filesystem doesn't "
1008 "support the operation, an error is returned.  The operation is supported on "
1009 "at least the following filesystems"
1010 msgstr ""
1011 "すべてのファイルシステムで B<FALLOC_FL_PUNCH_HOLE> がサポートされているわけで"
1012 "はない。 ファイルシステムがこの操作をサポートしていない場合は、 エラーが返"
1013 "る。"
1014
1015 #. type: IP
1016 #: build/C/man2/fallocate.2:117 build/C/man2/fallocate.2:119
1017 #: build/C/man2/fallocate.2:122 build/C/man2/fallocate.2:124
1018 #: build/C/man2/madvise.2:286 build/C/man2/madvise.2:292
1019 #: build/C/man2/madvise.2:295 build/C/man2/madvise.2:298
1020 #: build/C/man2/madvise.2:301 build/C/man3/mallopt.3:235
1021 #: build/C/man3/mallopt.3:241
1022 #, no-wrap
1023 msgid "*"
1024 msgstr "*"
1025
1026 #. type: Plain text
1027 #: build/C/man2/fallocate.2:119
1028 msgid "XFS (since Linux 2.6.38)"
1029 msgstr "XFS (Linux 2.6.38 以降)"
1030
1031 #.  commit a4bb6b64e39abc0e41ca077725f2a72c868e7622
1032 #. type: Plain text
1033 #: build/C/man2/fallocate.2:122
1034 msgid "ext4 (since Linux 3.0)"
1035 msgstr "ext4 (Linux 3.0 以降)"
1036
1037 #. type: Plain text
1038 #: build/C/man2/fallocate.2:124
1039 msgid "Btrfs (since Linux 3.7)"
1040 msgstr "Btrfs (Linux 3.7 以降)"
1041
1042 #.  commit 83e4fa9c16e4af7122e31be3eca5d57881d236fe
1043 #. type: Plain text
1044 #: build/C/man2/fallocate.2:127
1045 msgid "tmpfs (since Linux 3.5)"
1046 msgstr "tmpfs (Linux 3.5 以降)"
1047
1048 #. type: Plain text
1049 #: build/C/man2/fallocate.2:134
1050 msgid ""
1051 "On success, B<fallocate>()  returns zero.  On error, -1 is returned and "
1052 "I<errno> is set to indicate the error."
1053 msgstr ""
1054 "成功の場合、 B<fallocate>() は 0 を返す。 エラーの場合、-1 を返し、 I<error> "
1055 "にエラーを示す値を設定する。"
1056
1057 #. type: TP
1058 #: build/C/man2/fallocate.2:135 build/C/man2/madvise.2:279
1059 #: build/C/man2/mmap.2:415 build/C/man2/posix_fadvise.2:91
1060 #: build/C/man3/posix_fallocate.3:73 build/C/man2/readahead.2:73
1061 #: build/C/man2/sync_file_range.2:148
1062 #, no-wrap
1063 msgid "B<EBADF>"
1064 msgstr "B<EBADF>"
1065
1066 #. type: Plain text
1067 #: build/C/man2/fallocate.2:139 build/C/man3/posix_fallocate.3:77
1068 msgid "I<fd> is not a valid file descriptor, or is not opened for writing."
1069 msgstr ""
1070 "I<fd> が有効なファイルディスクリプタでないか、 書き込み用としてオープンされて"
1071 "いない。"
1072
1073 #. type: TP
1074 #: build/C/man2/fallocate.2:139 build/C/man3/posix_fallocate.3:77
1075 #, no-wrap
1076 msgid "B<EFBIG>"
1077 msgstr "B<EFBIG>"
1078
1079 #. type: Plain text
1080 #: build/C/man2/fallocate.2:143
1081 msgid "I<offset>+I<len> exceeds the maximum file size."
1082 msgstr "I<offset + len> がファイルサイズの最大値よりも大きい。"
1083
1084 #. type: TP
1085 #: build/C/man2/fallocate.2:143
1086 #, no-wrap
1087 msgid "B<EINTR>"
1088 msgstr "B<EINTR>"
1089
1090 #. type: Plain text
1091 #: build/C/man2/fallocate.2:146
1092 msgid "A signal was caught during execution."
1093 msgstr "実行中にシグナルが捕捉された。"
1094
1095 #. type: Plain text
1096 #: build/C/man2/fallocate.2:158 build/C/man3/posix_fallocate.3:87
1097 msgid "I<offset> was less than 0, or I<len> was less than or equal to 0."
1098 msgstr "I<offset> が 0 未満だったか、 I<len> が 0 以下だった。"
1099
1100 #. type: TP
1101 #: build/C/man2/fallocate.2:158 build/C/man2/madvise.2:310
1102 #: build/C/man2/sync_file_range.2:160
1103 #, no-wrap
1104 msgid "B<EIO>"
1105 msgstr "B<EIO>"
1106
1107 #. type: Plain text
1108 #: build/C/man2/fallocate.2:161
1109 msgid "An I/O error occurred while reading from or writing to a filesystem."
1110 msgstr "ファイルシステムとの読み書き中に入出力エラーが発生した。"
1111
1112 #. type: TP
1113 #: build/C/man2/fallocate.2:161 build/C/man2/mmap.2:450
1114 #: build/C/man3/posix_fallocate.3:87
1115 #, no-wrap
1116 msgid "B<ENODEV>"
1117 msgstr "B<ENODEV>"
1118
1119 #. type: Plain text
1120 #: build/C/man2/fallocate.2:168
1121 msgid ""
1122 "I<fd> does not refer to a regular file or a directory.  (If I<fd> is a pipe "
1123 "or FIFO, a different error results.)"
1124 msgstr ""
1125 "I<fd> が通常のファイルかディレクトリを参照していない (I<fd> がパイプや FIFO "
1126 "を参照している場合、別のエラーが発生する)。"
1127
1128 #. type: TP
1129 #: build/C/man2/fallocate.2:168 build/C/man3/posix_fallocate.3:91
1130 #: build/C/man2/shmget.2:217 build/C/man2/sync_file_range.2:166
1131 #, no-wrap
1132 msgid "B<ENOSPC>"
1133 msgstr "B<ENOSPC>"
1134
1135 #. type: Plain text
1136 #: build/C/man2/fallocate.2:173 build/C/man3/posix_fallocate.3:96
1137 msgid ""
1138 "There is not enough space left on the device containing the file referred to "
1139 "by I<fd>."
1140 msgstr "I<fd> が参照するファイルを含むデバイスに十分な空き領域がない。"
1141
1142 #. type: Plain text
1143 #: build/C/man2/fallocate.2:177
1144 msgid "This kernel does not implement B<fallocate>()."
1145 msgstr "このカーネルでは B<fallocate>() は実装されていない。"
1146
1147 #. type: TP
1148 #: build/C/man2/fallocate.2:177
1149 #, no-wrap
1150 msgid "B<EOPNOTSUPP>"
1151 msgstr "B<EOPNOTSUPP>"
1152
1153 #. type: Plain text
1154 #: build/C/man2/fallocate.2:186
1155 msgid ""
1156 "The filesystem containing the file referred to by I<fd> does not support "
1157 "this operation; or the I<mode> is not supported by the filesystem containing "
1158 "the file referred to by I<fd>."
1159 msgstr ""
1160 "I<fd> が参照するファイルを含むファイルシステムが 指定された操作を\n"
1161 "サポートしていない。 I<fd> が参照するファイルを含むファイルシステムが\n"
1162 "I<mode> をサポートしていない。"
1163
1164 #. type: TP
1165 #: build/C/man2/fallocate.2:186 build/C/man2/mlock.2:143
1166 #: build/C/man2/mlock.2:182 build/C/man2/mmap.2:458 build/C/man2/shmctl.2:353
1167 #: build/C/man2/shmget.2:225
1168 #, no-wrap
1169 msgid "B<EPERM>"
1170 msgstr "B<EPERM>"
1171
1172 #. type: Plain text
1173 #: build/C/man2/fallocate.2:202
1174 msgid ""
1175 "The file referred to by I<fd> is marked immutable (see B<chattr>(1)).  Or: "
1176 "I<mode> specifies B<FALLOC_FL_PUNCH_HOLE> and the file referred to by I<fd> "
1177 "is marked append-only (see B<chattr>(1))."
1178 msgstr ""
1179 "I<fd> が参照するファイルに変更不可 (immutable) の属性が付いている (B<chattr>"
1180 "(1) 参照)。 I<mode> に B<FALLOC_FL_PUNCH_HOLE> が指定されたが、 I<fd> が参照"
1181 "するファイルに追加のみ (append-only) の属性が付いている (B<chattr>(1) 参照)。"
1182
1183 #. type: TP
1184 #: build/C/man2/fallocate.2:202 build/C/man2/posix_fadvise.2:97
1185 #: build/C/man3/posix_fallocate.3:96 build/C/man2/sync_file_range.2:169
1186 #, no-wrap
1187 msgid "B<ESPIPE>"
1188 msgstr "B<ESPIPE>"
1189
1190 #. type: Plain text
1191 #: build/C/man2/fallocate.2:206
1192 msgid "I<fd> refers to a pipe or FIFO."
1193 msgstr "I<fd> がパイプか FIFO を参照している。"
1194
1195 #. type: SH
1196 #: build/C/man2/fallocate.2:206 build/C/man3/malloc_info.3:60
1197 #: build/C/man3/mcheck.3:134 build/C/man2/mmap2.2:74
1198 #: build/C/man2/posix_fadvise.2:104 build/C/man3/posix_fallocate.3:100
1199 #: build/C/man3/posix_memalign.3:167 build/C/man2/readahead.2:83
1200 #: build/C/man2/remap_file_pages.2:148 build/C/man3/shm_open.3:249
1201 #: build/C/man2/subpage_prot.2:90 build/C/man2/sync_file_range.2:177
1202 #, no-wrap
1203 msgid "VERSIONS"
1204 msgstr "バージョン"
1205
1206 #.  See http://sourceware.org/bugzilla/show_bug.cgi?id=14964
1207 #. type: Plain text
1208 #: build/C/man2/fallocate.2:214
1209 msgid ""
1210 "B<fallocate>()  is available on Linux since kernel 2.6.23.  Support is "
1211 "provided by glibc since version 2.10.  The B<FALLOC_FL_*> flags are defined "
1212 "in glibc headers only since version 2.18."
1213 msgstr ""
1214 "B<fallocate>()  はカーネル 2.6.23 以降の Linux で利用可能である。 glibc での"
1215 "対応はバージョン 3.10 以降で行われている。 B<FALLOC_FL_*> が glibc のヘッダ"
1216 "ファイルで定義されているのは、バージョン 2.18 以降のみである。"
1217
1218 #. type: Plain text
1219 #: build/C/man2/fallocate.2:217
1220 msgid "B<fallocate>()  is Linux-specific."
1221 msgstr "B<fallocate>()  は Linux 固有である。"
1222
1223 #. type: Plain text
1224 #: build/C/man2/fallocate.2:222
1225 msgid ""
1226 "B<fallocate>(1), B<ftruncate>(2), B<posix_fadvise>(3), B<posix_fallocate>(3)"
1227 msgstr ""
1228 "B<fallocate>(1), B<ftruncate>(2), B<posix_fadvise>(3), B<posix_fallocate>(3)"
1229
1230 #. type: TH
1231 #: build/C/man2/madvise.2:35
1232 #, no-wrap
1233 msgid "MADVISE"
1234 msgstr "MADVISE"
1235
1236 #. type: TH
1237 #: build/C/man2/madvise.2:35
1238 #, no-wrap
1239 msgid "2012-04-28"
1240 msgstr "2012-04-28"
1241
1242 #. type: Plain text
1243 #: build/C/man2/madvise.2:38
1244 msgid "madvise - give advice about use of memory"
1245 msgstr "madvise - メモリ利用に関するアドバイスを与える"
1246
1247 #. type: Plain text
1248 #: build/C/man2/madvise.2:40 build/C/man2/msync.2:30
1249 #: build/C/man3/shm_open.3:31
1250 msgid "B<#include E<lt>sys/mman.hE<gt>>"
1251 msgstr "B<#include E<lt>sys/mman.hE<gt>>"
1252
1253 #. type: Plain text
1254 #: build/C/man2/madvise.2:42
1255 msgid ""
1256 "B<int madvise(void *>I<addr>B<, size_t >I<length>B<, int >I<advice>B<);>"
1257 msgstr ""
1258 "B<int madvise(void *>I<addr>B<, size_t >I<length>B<, int >I<advice>B<);>"
1259
1260 #. type: Plain text
1261 #: build/C/man2/madvise.2:46 build/C/man2/posix_fadvise.2:43
1262 #: build/C/man3/posix_fallocate.3:39 build/C/man3/posix_memalign.3:49
1263 msgid ""
1264 "Feature Test Macro Requirements for glibc (see B<feature_test_macros>(7)):"
1265 msgstr "glibc 向けの機能検査マクロの要件 (B<feature_test_macros>(7)  参照):"
1266
1267 #. type: Plain text
1268 #: build/C/man2/madvise.2:50
1269 msgid "B<madvise>(): _BSD_SOURCE"
1270 msgstr "B<madvise>(): _BSD_SOURCE"
1271
1272 #. type: Plain text
1273 #: build/C/man2/madvise.2:68
1274 msgid ""
1275 "The B<madvise>()  system call advises the kernel about how to handle paging "
1276 "input/output in the address range beginning at address I<addr> and with size "
1277 "I<length> bytes.  It allows an application to tell the kernel how it expects "
1278 "to use some mapped or shared memory areas, so that the kernel can choose "
1279 "appropriate read-ahead and caching techniques.  This call does not influence "
1280 "the semantics of the application (except in the case of B<MADV_DONTNEED>), "
1281 "but may influence its performance.  The kernel is free to ignore the advice."
1282 msgstr ""
1283 "B<madvise>()  システムコールは、アドレス I<addr> からはじまる I<length> バイ"
1284 "トのメモリブロックのページング入出力をどう扱えば良いか、 カーネルにアドバイス"
1285 "する。 これを用いると、 アプリケーションからカーネルに、 マップされたメモリや"
1286 "共有メモリをどのように扱ってほしいか伝えることができ、 カーネルはそれに応じて"
1287 "先読みやキャッシュなどの適切な手法を選択できる。 このコールはアプリケーション"
1288 "の動作そのものには影響しない (B<MADV_DONTNEED> の場合は別) が、 性能には影響"
1289 "しうる。 なおこのアドバイスを受け入れるかどうかはカーネルに任される。"
1290
1291 #. type: Plain text
1292 #: build/C/man2/madvise.2:72
1293 msgid "The advice is indicated in the I<advice> argument which can be"
1294 msgstr ""
1295 "アドバイスは引き数 I<advice> によって与える。以下のいずれかを指定できる。"
1296
1297 #. type: TP
1298 #: build/C/man2/madvise.2:72
1299 #, no-wrap
1300 msgid "B<MADV_NORMAL>"
1301 msgstr "B<MADV_NORMAL>"
1302
1303 #. type: Plain text
1304 #: build/C/man2/madvise.2:76
1305 msgid "No special treatment.  This is the default."
1306 msgstr "特別な扱いは行わない。これがデフォルトである。"
1307
1308 #. type: TP
1309 #: build/C/man2/madvise.2:76
1310 #, no-wrap
1311 msgid "B<MADV_RANDOM>"
1312 msgstr "B<MADV_RANDOM>"
1313
1314 #. type: Plain text
1315 #: build/C/man2/madvise.2:80
1316 msgid ""
1317 "Expect page references in random order.  (Hence, read ahead may be less "
1318 "useful than normally.)"
1319 msgstr ""
1320 "ページ参照はランダムな順序で行われそうだ。 (したがって、先読みはあまり効果が"
1321 "なさそうだ。)"
1322
1323 #. type: TP
1324 #: build/C/man2/madvise.2:80
1325 #, no-wrap
1326 msgid "B<MADV_SEQUENTIAL>"
1327 msgstr "B<MADV_SEQUENTIAL>"
1328
1329 #. type: Plain text
1330 #: build/C/man2/madvise.2:85
1331 msgid ""
1332 "Expect page references in sequential order.  (Hence, pages in the given "
1333 "range can be aggressively read ahead, and may be freed soon after they are "
1334 "accessed.)"
1335 msgstr ""
1336 "ページ参照はシーケンシャルな順序で行われそうだ。 (したがって与えた範囲のペー"
1337 "ジは積極的に先読みしておくと良いだろう。 またアクセスが終わったら速やかに解放"
1338 "して良い。)"
1339
1340 #. type: TP
1341 #: build/C/man2/madvise.2:85
1342 #, no-wrap
1343 msgid "B<MADV_WILLNEED>"
1344 msgstr "B<MADV_WILLNEED>"
1345
1346 #. type: Plain text
1347 #: build/C/man2/madvise.2:89
1348 msgid ""
1349 "Expect access in the near future.  (Hence, it might be a good idea to read "
1350 "some pages ahead.)"
1351 msgstr ""
1352 "近い将来にアクセスされそうだ。 (したがってこれらのページを今のうちに先読みし"
1353 "ておくといいだろう。)"
1354
1355 #. type: TP
1356 #: build/C/man2/madvise.2:89
1357 #, no-wrap
1358 msgid "B<MADV_DONTNEED>"
1359 msgstr "B<MADV_DONTNEED>"
1360
1361 #. type: Plain text
1362 #: build/C/man2/madvise.2:100
1363 msgid ""
1364 "Do not expect access in the near future.  (For the time being, the "
1365 "application is finished with the given range, so the kernel can free "
1366 "resources associated with it.)  Subsequent accesses of pages in this range "
1367 "will succeed, but will result either in reloading of the memory contents "
1368 "from the underlying mapped file (see B<mmap>(2))  or zero-fill-on-demand "
1369 "pages for mappings without an underlying file."
1370 msgstr ""
1371 "しばらくアクセスはなさそうだ。 (現時点でアプリケーションは与えた範囲の処理を"
1372 "終えている。 したがってカーネルはこれに関連するリソースを解放して良い。)  こ"
1373 "れ以降この範囲のページへのアクセスがあると、 成功はするが、メモリの内容をマッ"
1374 "プ元のファイルからロードし直すことになる (B<mmap>(2)  を見よ) か、 または元"
1375 "ファイルがないマップページでは アクセスがあったときに 0 埋めが行われることに"
1376 "なる。"
1377
1378 #. type: TP
1379 #: build/C/man2/madvise.2:100
1380 #, no-wrap
1381 msgid "B<MADV_REMOVE> (since Linux 2.6.16)"
1382 msgstr "B<MADV_REMOVE> (Linux 2.6.16 以降)"
1383
1384 #.  2.6.18-rc5
1385 #.  Databases want to use this feature to drop a section of their
1386 #.  bufferpool (shared memory segments) - without writing back to
1387 #.  disk/swap space.  This feature is also useful for supporting
1388 #.  hot-plug memory on UML.
1389 #. type: Plain text
1390 #: build/C/man2/madvise.2:113
1391 msgid ""
1392 "Free up a given range of pages and its associated backing store.  Currently, "
1393 "only shmfs/tmpfs supports this; other filesystems return with the error "
1394 "B<ENOSYS>."
1395 msgstr ""
1396 "指定された範囲のページと関連するバッキングストアを解放する。 現在のところ、 "
1397 "shmfs/tmpfs だけがこれに対応している。 他のファイルシステムでは B<ENOSYS> が"
1398 "返される。"
1399
1400 #. type: TP
1401 #: build/C/man2/madvise.2:113
1402 #, no-wrap
1403 msgid "B<MADV_DONTFORK> (since Linux 2.6.16)"
1404 msgstr "B<MADV_DONTFORK> (Linux 2.6.16 以降)"
1405
1406 #.  See http://lwn.net/Articles/171941/
1407 #.  [PATCH] madvise MADV_DONTFORK/MADV_DOFORK
1408 #.  Currently, copy-on-write may change the physical address of
1409 #.  a page even if the user requested that the page is pinned in
1410 #.  memory (either by mlock or by get_user_pages).  This happens
1411 #.  if the process forks meanwhile, and the parent writes to that
1412 #.  page.  As a result, the page is orphaned: in case of
1413 #.  get_user_pages, the application will never see any data hardware
1414 #.  DMA's into this page after the COW.  In case of mlock'd memory,
1415 #.  the parent is not getting the realtime/security benefits of mlock.
1416 #.  In particular, this affects the Infiniband modules which do DMA from
1417 #.  and into user pages all the time.
1418 #.  This patch adds madvise options to control whether memory range is
1419 #.  inherited across fork. Useful e.g. for when hardware is doing DMA
1420 #.  from/into these pages.  Could also be useful to an application
1421 #.  wanting to speed up its forks by cutting large areas out of
1422 #.  consideration.
1423 #.  SEE ALSO: http://lwn.net/Articles/171941/
1424 #.  "Tweaks to madvise() and posix_fadvise()", 14 Feb 2006
1425 #. type: Plain text
1426 #: build/C/man2/madvise.2:144
1427 msgid ""
1428 "Do not make the pages in this range available to the child after a B<fork>"
1429 "(2).  This is useful to prevent copy-on-write semantics from changing the "
1430 "physical location of a page(s) if the parent writes to it after a B<fork>"
1431 "(2).  (Such page relocations cause problems for hardware that DMAs into the "
1432 "page(s).)"
1433 msgstr ""
1434 "B<fork>(2)  が行われた後、指定された範囲のページを子プロセスが利用できないよ"
1435 "うにする。 この機能は、書き込み時コピー (copy-on-write) 方式で、 B<fork>(2)  "
1436 "の後で親プロセスがページに書き込みを行った場合に ページの物理位置が変化しない"
1437 "ようにするのに有効である (ページの再配置はハードウェアがそのページに DMA 転送"
1438 "を行うような場合に 問題を起こすことがある)。"
1439
1440 #. type: TP
1441 #: build/C/man2/madvise.2:144
1442 #, no-wrap
1443 msgid "B<MADV_DOFORK> (since Linux 2.6.16)"
1444 msgstr "B<MADV_DOFORK> (Linux 2.6.16 以降)"
1445
1446 #. type: Plain text
1447 #: build/C/man2/madvise.2:150
1448 msgid ""
1449 "Undo the effect of B<MADV_DONTFORK>, restoring the default behavior, whereby "
1450 "a mapping is inherited across B<fork>(2)."
1451 msgstr ""
1452 "B<MADV_DONTFORK> の影響を取り消し、デフォルトの動作に戻す。 つまり、 B<fork>"
1453 "(2)  の前後でマッピングは継承されるようになる。"
1454
1455 #. type: TP
1456 #: build/C/man2/madvise.2:150
1457 #, no-wrap
1458 msgid "B<MADV_HWPOISON> (since Linux 2.6.32)"
1459 msgstr "B<MADV_HWPOISON> (Linux 2.6.32 以降)"
1460
1461 #. type: Plain text
1462 #: build/C/man2/madvise.2:162
1463 msgid ""
1464 "Poison a page and handle it like a hardware memory corruption.  This "
1465 "operation is available only for privileged (B<CAP_SYS_ADMIN>)  processes.  "
1466 "This operation may result in the calling process receiving a B<SIGBUS> and "
1467 "the page being unmapped.  This feature is intended for testing of memory "
1468 "error-handling code; it is available only if the kernel was configured with "
1469 "B<CONFIG_MEMORY_FAILURE>."
1470 msgstr ""
1471
1472 #. type: TP
1473 #: build/C/man2/madvise.2:162
1474 #, no-wrap
1475 msgid "B<MADV_SOFT_OFFLINE> (since Linux 2.6.33)"
1476 msgstr "B<MADV_SOFT_OFFLINE> (Linux 2.6.33 以降)"
1477
1478 #. type: Plain text
1479 #: build/C/man2/madvise.2:180
1480 msgid ""
1481 "Soft offline the pages in the range specified by I<addr> and I<length>.  The "
1482 "memory of each page in the specified range is preserved (i.e., when next "
1483 "accessed, the same content will be visible, but in a new physical page "
1484 "frame), and the original page is offlined (i.e., no longer used, and taken "
1485 "out of normal memory management).  The effect of the B<MADV_SOFT_OFFLINE> "
1486 "operation is invisible to (i.e., does not change the semantics of)  the "
1487 "calling process.  This feature is intended for testing of memory error-"
1488 "handling code; it is available only if the kernel was configured with "
1489 "B<CONFIG_MEMORY_FAILURE>."
1490 msgstr ""
1491
1492 #. type: TP
1493 #: build/C/man2/madvise.2:180
1494 #, no-wrap
1495 msgid "B<MADV_MERGEABLE> (since Linux 2.6.32)"
1496 msgstr "B<MADV_MERGEABLE> (Linux 2.6.32 以降)"
1497
1498 #. type: Plain text
1499 #: build/C/man2/madvise.2:205
1500 msgid ""
1501 "Enable Kernel Samepage Merging (KSM) for the pages in the range specified by "
1502 "I<addr> and I<length>.  The kernel regularly scans those areas of user "
1503 "memory that have been marked as mergeable, looking for pages with identical "
1504 "content.  These are replaced by a single write-protected page (which is "
1505 "automatically copied if a process later wants to update the content of the "
1506 "page).  KSM merges only private anonymous pages (see B<mmap>(2)).  The KSM "
1507 "feature is intended for applications that generate many instances of the "
1508 "same data (e.g., virtualization systems such as KVM).  It can consume a lot "
1509 "of processing power; use with care.  See the Linux kernel source file "
1510 "I<Documentation/vm/ksm.txt> for more details.  The B<MADV_MERGEABLE> and "
1511 "B<MADV_UNMERGEABLE> operations are available only if the kernel was "
1512 "configured with B<CONFIG_KSM>."
1513 msgstr ""
1514
1515 #. type: TP
1516 #: build/C/man2/madvise.2:205
1517 #, no-wrap
1518 msgid "B<MADV_UNMERGEABLE> (since Linux 2.6.32)"
1519 msgstr "B<MADV_UNMERGEABLE> (Linux 2.6.32 以降)"
1520
1521 #. type: Plain text
1522 #: build/C/man2/madvise.2:214
1523 msgid ""
1524 "Undo the effect of an earlier B<MADV_MERGEABLE> operation on the specified "
1525 "address range; KSM unmerges whatever pages it had merged in the address "
1526 "range specified by I<addr> and I<length>."
1527 msgstr ""
1528
1529 #. type: TP
1530 #: build/C/man2/madvise.2:214
1531 #, no-wrap
1532 msgid "B<MADV_HUGEPAGE> (since Linux 2.6.38)"
1533 msgstr "B<MADV_HUGEPAGE> (Linux 2.6.38 以降)"
1534
1535 #.  http://lwn.net/Articles/358904/
1536 #.  https://lwn.net/Articles/423584/
1537 #. type: Plain text
1538 #: build/C/man2/madvise.2:243
1539 msgid ""
1540 "Enables Transparent Huge Pages (THP) for pages in the range specified by "
1541 "I<addr> and I<length>.  Currently, Transparent Huge Pages work only with "
1542 "private anonymous pages (see B<mmap>(2)).  The kernel will regularly scan "
1543 "the areas marked as huge page candidates to replace them with huge pages.  "
1544 "The kernel will also allocate huge pages directly when the region is "
1545 "naturally aligned to the huge page size (see B<posix_memalign>(2)).  This "
1546 "feature is primarily aimed at applications that use large mappings of data "
1547 "and access large regions of that memory at a time (e.g., virtualization "
1548 "systems such as QEMU).  It can very easily waste memory (e.g., a 2MB mapping "
1549 "that only ever accesses 1 byte will result in 2MB of wired memory instead of "
1550 "one 4KB page).  See the Linux kernel source file I<Documentation/vm/"
1551 "transhuge.txt> for more details.  The B<MADV_HUGEPAGE> and "
1552 "B<MADV_NOHUGEPAGE> operations are available only if the kernel was "
1553 "configured with B<CONFIG_TRANSPARENT_HUGEPAGE>."
1554 msgstr ""
1555
1556 #. type: TP
1557 #: build/C/man2/madvise.2:243
1558 #, no-wrap
1559 msgid "B<MADV_NOHUGEPAGE> (since Linux 2.6.38)"
1560 msgstr "B<MADV_NOHUGEPAGE> (Linux 2.6.38 以降)"
1561
1562 #. type: Plain text
1563 #: build/C/man2/madvise.2:250
1564 msgid ""
1565 "Ensures that memory in the address range specified by I<addr> and I<length> "
1566 "will not be collapsed into huge pages."
1567 msgstr ""
1568
1569 #. type: TP
1570 #: build/C/man2/madvise.2:250
1571 #, no-wrap
1572 msgid "B<MADV_DONTDUMP> (since Linux 3.4)"
1573 msgstr "B<MADV_DONTDUMP> (Linux 3.4 以降)"
1574
1575 #. type: Plain text
1576 #: build/C/man2/madvise.2:264
1577 msgid ""
1578 "Exclude from a core dump those pages in the range specified by I<addr> and "
1579 "I<length>.  This is useful in applications that have large areas of memory "
1580 "that are known not to be useful in a core dump.  The effect of "
1581 "B<MADV_DONTDUMP> takes precedence over the bit mask that is set via the I</"
1582 "proc/PID/coredump_filter> file (see B<core>(5))."
1583 msgstr ""
1584
1585 #. type: TP
1586 #: build/C/man2/madvise.2:264
1587 #, no-wrap
1588 msgid "B<MADV_DODUMP> (since Linux 3.4)"
1589 msgstr "B<MADV_DODUMP> (Linux 3.4 以降)"
1590
1591 #. type: Plain text
1592 #: build/C/man2/madvise.2:268
1593 msgid "Undo the effect of an earlier B<MADV_DONTDUMP>."
1594 msgstr ""
1595
1596 #. type: Plain text
1597 #: build/C/man2/madvise.2:275
1598 msgid ""
1599 "On success B<madvise>()  returns zero.  On error, it returns -1 and I<errno> "
1600 "is set appropriately."
1601 msgstr ""
1602 "B<madvise>()  は成功すると 0 を返す。 エラーが起こると -1 を返し、 I<errno> "
1603 "を適切な値に設定する。"
1604
1605 #. type: TP
1606 #: build/C/man2/madvise.2:276 build/C/man2/mlock.2:154 build/C/man2/mmap.2:411
1607 #: build/C/man2/mremap.2:136
1608 #, no-wrap
1609 msgid "B<EAGAIN>"
1610 msgstr "B<EAGAIN>"
1611
1612 #. type: Plain text
1613 #: build/C/man2/madvise.2:279
1614 msgid "A kernel resource was temporarily unavailable."
1615 msgstr "何らかのカーネルリソースが一時的に利用できなかった。"
1616
1617 #. type: Plain text
1618 #: build/C/man2/madvise.2:282
1619 msgid "The map exists, but the area maps something that isn't a file."
1620 msgstr "指定したマップは存在するが、ファイルではないところをマップしている。"
1621
1622 #. type: Plain text
1623 #: build/C/man2/madvise.2:285
1624 msgid "This error can occur for the following reasons:"
1625 msgstr "このエラーは以下の理由で発生する。"
1626
1627 #.  .I len
1628 #.  is zero,
1629 #. type: Plain text
1630 #: build/C/man2/madvise.2:292
1631 msgid "The value I<len> is negative."
1632 msgstr "I<len> が負の値である。"
1633
1634 #. type: Plain text
1635 #: build/C/man2/madvise.2:295
1636 msgid "I<addr> is not page-aligned."
1637 msgstr "I<addr> がページ境界ではない。"
1638
1639 #. type: Plain text
1640 #: build/C/man2/madvise.2:298
1641 msgid "I<advice> is not a valid value"
1642 msgstr "I<advice> が有効な値でない。"
1643
1644 #. type: Plain text
1645 #: build/C/man2/madvise.2:301
1646 msgid ""
1647 "The application is attempting to release locked or shared pages (with "
1648 "B<MADV_DONTNEED>)."
1649 msgstr ""
1650 "アプリケーションがロックされたページや共有ページを (B<MADV_DONTNEED> で) 解"
1651 "放\n"
1652 "しようとしている。"
1653
1654 #. type: Plain text
1655 #: build/C/man2/madvise.2:309
1656 msgid ""
1657 "B<MADV_MERGEABLE> or B<MADV_UNMERGEABLE> was specified in I<advice>, but the "
1658 "kernel was not configured with B<CONFIG_KSM>."
1659 msgstr ""
1660 "I<advice> に B<MADV_MERGEABLE> か B<MADV_UNMERGEABLE> が指定されたが、 カーネ"
1661 "ルの設定が B<CONFIG_KSM> が有効になっていなかった。"
1662
1663 #. type: Plain text
1664 #: build/C/man2/madvise.2:316
1665 msgid ""
1666 "(for B<MADV_WILLNEED>)  Paging in this area would exceed the process's "
1667 "maximum resident set size."
1668 msgstr ""
1669 "(B<MADV_WILLNEED> の場合) この範囲のページングを行うと、 プロセスの RSS "
1670 "(resident set size) の最大値を越えてしまう。"
1671
1672 #. type: TP
1673 #: build/C/man2/madvise.2:316 build/C/man2/madvise.2:321
1674 #: build/C/man2/mlock.2:123 build/C/man2/mlock.2:131 build/C/man2/mlock.2:169
1675 #: build/C/man2/mmap.2:454 build/C/man2/mprotect.2:100
1676 #: build/C/man2/mprotect.2:103 build/C/man2/mremap.2:179
1677 #: build/C/man2/msync.2:93 build/C/man3/posix_memalign.3:164
1678 #: build/C/man2/shmctl.2:337 build/C/man2/shmget.2:214
1679 #: build/C/man2/shmop.2:214 build/C/man2/subpage_prot.2:87
1680 #: build/C/man2/sync_file_range.2:163
1681 #, no-wrap
1682 msgid "B<ENOMEM>"
1683 msgstr "B<ENOMEM>"
1684
1685 #. type: Plain text
1686 #: build/C/man2/madvise.2:321
1687 msgid "(for B<MADV_WILLNEED>)  Not enough memory: paging in failed."
1688 msgstr "(B<MADV_WILLNEED> の場合) メモリが足りず、ページングに失敗した。"
1689
1690 #. type: Plain text
1691 #: build/C/man2/madvise.2:325
1692 msgid ""
1693 "Addresses in the specified range are not currently mapped, or are outside "
1694 "the address space of the process."
1695 msgstr ""
1696 "指定した範囲のアドレスが、現在マップされていない。 あるいはプロセスのアドレス"
1697 "空間の内部にない。"
1698
1699 #.  FIXME . Write a posix_madvise(3) page.
1700 #. type: Plain text
1701 #: build/C/man2/madvise.2:338
1702 msgid ""
1703 "POSIX.1b.  POSIX.1-2001 describes B<posix_madvise>(3)  with constants "
1704 "B<POSIX_MADV_NORMAL>, B<POSIX_MADV_RANDOM>, and so on, with a behavior close "
1705 "to that described here.  There is a similar B<posix_fadvise>(2)  for file "
1706 "access."
1707 msgstr ""
1708 "POSIX.1b.  POSIX.1-2001 では、 B<posix_madvise>(3)  を B<POSIX_MADV_NORMAL>, "
1709 "B<POSIX_MADV_RANDOM> などの定数とともに記述していた (それぞれの振る舞いはここ"
1710 "で述べたものに近い)。 ファイルアクセスに対しても B<posix_fadvise>(2)  という"
1711 "類似の関数が存在する。"
1712
1713 #. type: Plain text
1714 #: build/C/man2/madvise.2:347
1715 msgid ""
1716 "B<MADV_REMOVE>, B<MADV_DONTFORK>, B<MADV_DOFORK>, B<MADV_HWPOISON>, "
1717 "B<MADV_MERGEABLE>, and B<MADV_UNMERGEABLE> are Linux-specific."
1718 msgstr ""
1719 "B<MADV_REMOVE>, B<MADV_DONTFORK>, B<MADV_DOFORK>, B<MADV_HWPOISON>,\n"
1720 "B<MADV_MERGEABLE>, B<MADV_UNMERGEABLE> は Linux 固有である。"
1721
1722 #. type: SS
1723 #: build/C/man2/madvise.2:348 build/C/man2/mlock.2:267
1724 #: build/C/man2/shmget.2:294
1725 #, no-wrap
1726 msgid "Linux notes"
1727 msgstr "Linux での注意"
1728
1729 #. type: Plain text
1730 #: build/C/man2/madvise.2:356
1731 msgid ""
1732 "The current Linux implementation (2.4.0) views this system call more as a "
1733 "command than as advice and hence may return an error when it cannot do what "
1734 "it usually would do in response to this advice.  (See the ERRORS description "
1735 "above.)  This is nonstandard behavior."
1736 msgstr ""
1737 "現在の Linux の実装 (2.4.0) では、 このシステムコールをアドバイスというよりは"
1738 "命令と見ている。 したがってこのアドバイスに対して通常行われる動作が不可能な場"
1739 "合は、 エラーを返すことがある (上記の エラー の記述を参照)。 この振舞いは標準"
1740 "とは異なる。"
1741
1742 #.  .SH HISTORY
1743 #.  The
1744 #.  .BR madvise ()
1745 #.  function first appeared in 4.4BSD.
1746 #. type: Plain text
1747 #: build/C/man2/madvise.2:372
1748 msgid ""
1749 "The Linux implementation requires that the address I<addr> be page-aligned, "
1750 "and allows I<length> to be zero.  If there are some parts of the specified "
1751 "address range that are not mapped, the Linux version of B<madvise>()  "
1752 "ignores them and applies the call to the rest (but returns B<ENOMEM> from "
1753 "the system call, as it should)."
1754 msgstr ""
1755 "Linux の実装では I<addr> のアドレスはページ境界の値でなければならない。また "
1756 "I<length> は 0 であっても構わない。 また Linux 版の B<madvise>()  では、指定"
1757 "されたアドレス範囲にマップされていない部分があると、 これらを無視して残りの部"
1758 "分にアドバイスを適用する (しかしシステムコールに対してはちゃんと B<ENOMEM> を"
1759 "返す)。"
1760
1761 #. type: Plain text
1762 #: build/C/man2/madvise.2:380
1763 msgid ""
1764 "B<getrlimit>(2), B<mincore>(2), B<mmap>(2), B<mprotect>(2), B<msync>(2), "
1765 "B<munmap>(2), B<core>(5)"
1766 msgstr ""
1767 "B<getrlimit>(2), B<mincore>(2), B<mmap>(2), B<mprotect>(2), B<msync>(2), "
1768 "B<munmap>(2), B<core>(5)"
1769
1770 #. type: TH
1771 #: build/C/man3/mallinfo.3:26
1772 #, no-wrap
1773 msgid "MALLINFO"
1774 msgstr "MALLINFO"
1775
1776 #. type: TH
1777 #: build/C/man3/mallinfo.3:26 build/C/man3/malloc_stats.3:26
1778 #, no-wrap
1779 msgid "2012-05-06"
1780 msgstr "2012-05-06"
1781
1782 #. type: Plain text
1783 #: build/C/man3/mallinfo.3:29
1784 msgid "mallinfo - obtain memory allocation information"
1785 msgstr "mallinfo - メモリ割り当て情報を取得する"
1786
1787 #. type: Plain text
1788 #: build/C/man3/mallinfo.3:31 build/C/man3/malloc_stats.3:31
1789 #: build/C/man3/malloc_trim.3:31 build/C/man3/malloc_usable_size.3:30
1790 #: build/C/man3/mallopt.3:31
1791 msgid "B<#include E<lt>malloc.hE<gt>>"
1792 msgstr "B<#include E<lt>malloc.hE<gt>>"
1793
1794 #. type: Plain text
1795 #: build/C/man3/mallinfo.3:33
1796 msgid "B<struct mallinfo mallinfo(void);>"
1797 msgstr "B<struct mallinfo mallinfo(void);>"
1798
1799 #. type: Plain text
1800 #: build/C/man3/mallinfo.3:41
1801 msgid ""
1802 "The B<mallinfo>()  function returns a copy of a structure containing "
1803 "information about memory allocations performed by B<malloc>(3)  and related "
1804 "functions.  This structure is defined as follows:"
1805 msgstr ""
1806 "B<mallinfo>() 関数は、 B<malloc>(3) や一連の関数により実行されたメモリ\n"
1807 "割り当てに関する情報を格納した構造体のコピーを返す。\n"
1808 "この構造体は以下のように定義されている。"
1809
1810 #. type: Plain text
1811 #: build/C/man3/mallinfo.3:56
1812 #, no-wrap
1813 msgid ""
1814 "struct mallinfo {\n"
1815 "    int arena;     /* Non-mmapped space allocated (bytes) */\n"
1816 "    int ordblks;   /* Number of free chunks */\n"
1817 "    int smblks;    /* Number of free fastbin blocks */\n"
1818 "    int hblks;     /* Number of mmapped regions */\n"
1819 "    int hblkhd;    /* Space allocated in mmapped regions (bytes) */\n"
1820 "    int usmblks;   /* Maximum total allocated space (bytes) */\n"
1821 "    int fsmblks;   /* Space in freed fastbin blocks (bytes) */\n"
1822 "    int uordblks;  /* Total allocated space (bytes) */\n"
1823 "    int fordblks;  /* Total free space (bytes) */\n"
1824 "    int keepcost;  /* Top-most, releasable space (bytes) */\n"
1825 "};\n"
1826 msgstr ""
1827 "struct mallinfo {\n"
1828 "    int arena;     /* Non-mmapped space allocated (bytes) */\n"
1829 "    int ordblks;   /* Number of free chunks */\n"
1830 "    int smblks;    /* Number of free fastbin blocks */\n"
1831 "    int hblks;     /* Number of mmapped regions */\n"
1832 "    int hblkhd;    /* Space allocated in mmapped regions (bytes) */\n"
1833 "    int usmblks;   /* Maximum total allocated space (bytes) */\n"
1834 "    int fsmblks;   /* Space in freed fastbin blocks (bytes) */\n"
1835 "    int uordblks;  /* Total allocated space (bytes) */\n"
1836 "    int fordblks;  /* Total free space (bytes) */\n"
1837 "    int keepcost;  /* Top-most, releasable space (bytes) */\n"
1838 "};\n"
1839
1840 #. type: Plain text
1841 #: build/C/man3/mallinfo.3:62
1842 msgid ""
1843 "The fields of the I<mallinfo> structure contain the following information:"
1844 msgstr "I<mallinfo> 構造体の各フィールドには以下の情報が格納される。"
1845
1846 #. type: TP
1847 #: build/C/man3/mallinfo.3:62
1848 #, no-wrap
1849 msgid "I<arena>"
1850 msgstr "I<arena>"
1851
1852 #. type: Plain text
1853 #: build/C/man3/mallinfo.3:68
1854 msgid ""
1855 "The total amount of memory allocated by means other than B<mmap>(2)  (i.e., "
1856 "memory allocated on the heap).  This figure includes both in-use blocks and "
1857 "blocks on the free list."
1858 msgstr ""
1859
1860 #. type: TP
1861 #: build/C/man3/mallinfo.3:68
1862 #, no-wrap
1863 msgid "I<ordblks>"
1864 msgstr "I<ordblks>"
1865
1866 #. type: Plain text
1867 #: build/C/man3/mallinfo.3:71
1868 msgid "The number of ordinary (i.e., non-fastbin) free blocks."
1869 msgstr ""
1870
1871 #. type: TP
1872 #: build/C/man3/mallinfo.3:71
1873 #, no-wrap
1874 msgid "I<smblks>"
1875 msgstr "I<smblks>"
1876
1877 #. type: Plain text
1878 #: build/C/man3/mallinfo.3:75
1879 msgid "The number of fastbin free blocks (see B<mallopt>(3))."
1880 msgstr ""
1881
1882 #. type: TP
1883 #: build/C/man3/mallinfo.3:75
1884 #, no-wrap
1885 msgid "I<hblks>"
1886 msgstr "I<hblks>"
1887
1888 #. type: Plain text
1889 #: build/C/man3/mallinfo.3:83
1890 msgid ""
1891 "The number of blocks currently allocated using B<mmap>(2).  (See the "
1892 "discussion of B<M_MMAP_THRESHOLD> in B<mallopt>(3).)"
1893 msgstr ""
1894
1895 #. type: TP
1896 #: build/C/man3/mallinfo.3:83
1897 #, no-wrap
1898 msgid "I<hblkhd>"
1899 msgstr "I<hblkhd>"
1900
1901 #. type: Plain text
1902 #: build/C/man3/mallinfo.3:87
1903 msgid "The number of bytes in blocks currently allocated using B<mmap>(2)."
1904 msgstr ""
1905
1906 #. type: TP
1907 #: build/C/man3/mallinfo.3:87
1908 #, no-wrap
1909 msgid "I<usmblks>"
1910 msgstr "I<usmblks>"
1911
1912 #. type: Plain text
1913 #: build/C/man3/mallinfo.3:92
1914 msgid ""
1915 "The \"highwater mark\" for allocated space\\(emthat is, the maximum amount "
1916 "of space that was ever allocated.  This field is maintained only in "
1917 "nonthreading environments."
1918 msgstr ""
1919
1920 #. type: TP
1921 #: build/C/man3/mallinfo.3:92
1922 #, no-wrap
1923 msgid "I<fsmblks>"
1924 msgstr "I<fsmblks>"
1925
1926 #. type: Plain text
1927 #: build/C/man3/mallinfo.3:95
1928 msgid "The total number of bytes in fastbin free blocks."
1929 msgstr ""
1930
1931 #. type: TP
1932 #: build/C/man3/mallinfo.3:95
1933 #, no-wrap
1934 msgid "I<uordblks>"
1935 msgstr "I<uordblks>"
1936
1937 #. type: Plain text
1938 #: build/C/man3/mallinfo.3:98
1939 msgid "The total number of bytes used by in-use allocations."
1940 msgstr ""
1941
1942 #. type: TP
1943 #: build/C/man3/mallinfo.3:98
1944 #, no-wrap
1945 msgid "I<fordblks>"
1946 msgstr "I<fordblks>"
1947
1948 #. type: Plain text
1949 #: build/C/man3/mallinfo.3:101
1950 msgid "The total number of bytes in free blocks."
1951 msgstr ""
1952
1953 #. type: TP
1954 #: build/C/man3/mallinfo.3:101
1955 #, no-wrap
1956 msgid "I<keepcost>"
1957 msgstr "I<keepcost>"
1958
1959 #.  .SH VERSIONS
1960 #.  Available already in glibc 2.0, possibly earlier
1961 #. type: Plain text
1962 #: build/C/man3/mallinfo.3:110
1963 msgid ""
1964 "The total amount of releasable free space at the top of the heap.  This is "
1965 "the maximum number of bytes that could ideally (i.e., ignoring page "
1966 "alignment restrictions, and so on) be released by B<malloc_trim>(3)."
1967 msgstr ""
1968
1969 #. type: Plain text
1970 #: build/C/man3/mallinfo.3:114
1971 msgid ""
1972 "This function is not specified by POSIX or the C standards.  A similar "
1973 "function exists on many System V derivatives, and was specified in the SVID."
1974 msgstr ""
1975
1976 #.  FIXME http://sourceware.org/bugzilla/show_bug.cgi?id=208
1977 #.  See the 24 Aug 2011 mail by Paul Pluzhnikov:
1978 #.      "[patch] Fix mallinfo() to accumulate results for all arenas"
1979 #.  on libc-alpha@sourceware.org
1980 #. type: Plain text
1981 #: build/C/man3/mallinfo.3:126
1982 msgid ""
1983 "B<Information is returned for only the main memory allocation area.> "
1984 "Allocations in other arenas are excluded.  See B<malloc_stats>(3)  and "
1985 "B<malloc_info>(3)  for alternatives that include information about other "
1986 "arenas."
1987 msgstr ""
1988
1989 #. type: Plain text
1990 #: build/C/man3/mallinfo.3:134
1991 msgid ""
1992 "The fields of the I<mallinfo> structure are typed as I<int>.  However, "
1993 "because some internal bookkeeping values may be of type I<long>, the "
1994 "reported values may wrap around zero and thus be inaccurate."
1995 msgstr ""
1996
1997 #. type: SH
1998 #: build/C/man3/mallinfo.3:134 build/C/man3/malloc_hook.3:89
1999 #: build/C/man3/malloc_info.3:84 build/C/man3/mallopt.3:466
2000 #: build/C/man3/mcheck.3:159 build/C/man2/mmap.2:628
2001 #: build/C/man2/mprotect.2:148 build/C/man3/mtrace.3:108
2002 #, no-wrap
2003 msgid "EXAMPLE"
2004 msgstr "例"
2005
2006 #. type: Plain text
2007 #: build/C/man3/mallinfo.3:140
2008 msgid ""
2009 "The program below employs B<mallinfo>()  to retrieve memory allocation "
2010 "statistics before and after allocating and freeing some blocks of memory.  "
2011 "The statistics are displayed on standard output."
2012 msgstr ""
2013
2014 #. type: Plain text
2015 #: build/C/man3/mallinfo.3:144
2016 msgid ""
2017 "The first two command-line arguments specify the number and size of blocks "
2018 "to be allocated with B<malloc>(3)."
2019 msgstr ""
2020
2021 #. type: Plain text
2022 #: build/C/man3/mallinfo.3:158
2023 msgid ""
2024 "The remaining three arguments specify which of the allocated blocks should "
2025 "be freed with B<free>(3).  These three arguments are optional, and specify "
2026 "(in order): the step size to be used in the loop that frees blocks (the "
2027 "default is 1, meaning free all blocks in the range); the ordinal position of "
2028 "the first block to be freed (default 0, meaning the first allocated block); "
2029 "and a number one greater than the ordinal position of the last block to be "
2030 "freed (default is one greater than the maximum block number).  If these "
2031 "three arguments are omitted, then the defaults cause all allocated blocks to "
2032 "be freed."
2033 msgstr ""
2034
2035 #. type: Plain text
2036 #: build/C/man3/mallinfo.3:162
2037 msgid ""
2038 "In the following example run of the program, 1000 allocations of 100 bytes "
2039 "are performed, and then every second allocated block is freed:"
2040 msgstr ""
2041
2042 #. type: Plain text
2043 #: build/C/man3/mallinfo.3:177
2044 #, no-wrap
2045 msgid ""
2046 "$ B<./a.out 1000 100 2>\n"
2047 "============== Before allocating blocks ==============\n"
2048 "Total non-mmapped bytes (arena):       0\n"
2049 "# of free chunks (ordblks):            1\n"
2050 "# of free fastbin blocks (smblks):     0\n"
2051 "# of mapped regions (hblks):           0\n"
2052 "Bytes in mapped regions (hblkhd):      0\n"
2053 "Max. total allocated space (usmblks):  0\n"
2054 "Free bytes held in fastbins (fsmblks): 0\n"
2055 "Total allocated space (uordblks):      0\n"
2056 "Total free space (fordblks):           0\n"
2057 "Topmost releasable block (keepcost):   0\n"
2058 msgstr ""
2059 "$ B<./a.out 1000 100 2>\n"
2060 "============== Before allocating blocks ==============\n"
2061 "Total non-mmapped bytes (arena):       0\n"
2062 "# of free chunks (ordblks):            1\n"
2063 "# of free fastbin blocks (smblks):     0\n"
2064 "# of mapped regions (hblks):           0\n"
2065 "Bytes in mapped regions (hblkhd):      0\n"
2066 "Max. total allocated space (usmblks):  0\n"
2067 "Free bytes held in fastbins (fsmblks): 0\n"
2068 "Total allocated space (uordblks):      0\n"
2069 "Total free space (fordblks):           0\n"
2070 "Topmost releasable block (keepcost):   0\n"
2071
2072 #. type: Plain text
2073 #: build/C/man3/mallinfo.3:189
2074 #, no-wrap
2075 msgid ""
2076 "============== After allocating blocks ==============\n"
2077 "Total non-mmapped bytes (arena):       135168\n"
2078 "# of free chunks (ordblks):            1\n"
2079 "# of free fastbin blocks (smblks):     0\n"
2080 "# of mapped regions (hblks):           0\n"
2081 "Bytes in mapped regions (hblkhd):      0\n"
2082 "Max. total allocated space (usmblks):  0\n"
2083 "Free bytes held in fastbins (fsmblks): 0\n"
2084 "Total allocated space (uordblks):      104000\n"
2085 "Total free space (fordblks):           31168\n"
2086 "Topmost releasable block (keepcost):   31168\n"
2087 msgstr ""
2088 "============== After allocating blocks ==============\n"
2089 "Total non-mmapped bytes (arena):       135168\n"
2090 "# of free chunks (ordblks):            1\n"
2091 "# of free fastbin blocks (smblks):     0\n"
2092 "# of mapped regions (hblks):           0\n"
2093 "Bytes in mapped regions (hblkhd):      0\n"
2094 "Max. total allocated space (usmblks):  0\n"
2095 "Free bytes held in fastbins (fsmblks): 0\n"
2096 "Total allocated space (uordblks):      104000\n"
2097 "Total free space (fordblks):           31168\n"
2098 "Topmost releasable block (keepcost):   31168\n"
2099
2100 #. type: Plain text
2101 #: build/C/man3/mallinfo.3:201
2102 #, no-wrap
2103 msgid ""
2104 "============== After freeing blocks ==============\n"
2105 "Total non-mmapped bytes (arena):       135168\n"
2106 "# of free chunks (ordblks):            501\n"
2107 "# of free fastbin blocks (smblks):     0\n"
2108 "# of mapped regions (hblks):           0\n"
2109 "Bytes in mapped regions (hblkhd):      0\n"
2110 "Max. total allocated space (usmblks):  0\n"
2111 "Free bytes held in fastbins (fsmblks): 0\n"
2112 "Total allocated space (uordblks):      52000\n"
2113 "Total free space (fordblks):           83168\n"
2114 "Topmost releasable block (keepcost):   31168\n"
2115 msgstr ""
2116 "============== After freeing blocks ==============\n"
2117 "Total non-mmapped bytes (arena):       135168\n"
2118 "# of free chunks (ordblks):            501\n"
2119 "# of free fastbin blocks (smblks):     0\n"
2120 "# of mapped regions (hblks):           0\n"
2121 "Bytes in mapped regions (hblkhd):      0\n"
2122 "Max. total allocated space (usmblks):  0\n"
2123 "Free bytes held in fastbins (fsmblks): 0\n"
2124 "Total allocated space (uordblks):      52000\n"
2125 "Total free space (fordblks):           83168\n"
2126 "Topmost releasable block (keepcost):   31168\n"
2127
2128 #. type: SS
2129 #: build/C/man3/mallinfo.3:203 build/C/man3/malloc_info.3:167
2130 #: build/C/man3/mallopt.3:532 build/C/man3/mcheck.3:176
2131 #: build/C/man2/mmap.2:640 build/C/man2/mprotect.2:165
2132 #, no-wrap
2133 msgid "Program source"
2134 msgstr "プログラムのソース"
2135
2136 #. type: Plain text
2137 #: build/C/man3/mallinfo.3:208
2138 #, no-wrap
2139 msgid ""
2140 "#include E<lt>malloc.hE<gt>\n"
2141 "#include \"tlpi_hdr.h\"\n"
2142 msgstr ""
2143 "#include E<lt>malloc.hE<gt>\n"
2144 "#include \"tlpi_hdr.h\"\n"
2145
2146 #. type: Plain text
2147 #: build/C/man3/mallinfo.3:213
2148 #, no-wrap
2149 msgid ""
2150 "static void\n"
2151 "display_mallinfo(void)\n"
2152 "{\n"
2153 "    struct mallinfo mi;\n"
2154 msgstr ""
2155 "static void\n"
2156 "display_mallinfo(void)\n"
2157 "{\n"
2158 "    struct mallinfo mi;\n"
2159
2160 #. type: Plain text
2161 #: build/C/man3/mallinfo.3:215
2162 #, no-wrap
2163 msgid "    mi = mallinfo();\n"
2164 msgstr "    mi = mallinfo();\n"
2165
2166 #. type: Plain text
2167 #: build/C/man3/mallinfo.3:227
2168 #, no-wrap
2169 msgid ""
2170 "    printf(\"Total non-mmapped bytes (arena):       %d\\en\", mi.arena);\n"
2171 "    printf(\"# of free chunks (ordblks):            %d\\en\", mi.ordblks);\n"
2172 "    printf(\"# of free fastbin blocks (smblks):     %d\\en\", mi.smblks);\n"
2173 "    printf(\"# of mapped regions (hblks):           %d\\en\", mi.hblks);\n"
2174 "    printf(\"Bytes in mapped regions (hblkhd):      %d\\en\", mi.hblkhd);\n"
2175 "    printf(\"Max. total allocated space (usmblks):  %d\\en\", mi.usmblks);\n"
2176 "    printf(\"Free bytes held in fastbins (fsmblks): %d\\en\", mi.fsmblks);\n"
2177 "    printf(\"Total allocated space (uordblks):      %d\\en\", mi.uordblks);\n"
2178 "    printf(\"Total free space (fordblks):           %d\\en\", mi.fordblks);\n"
2179 "    printf(\"Topmost releasable block (keepcost):   %d\\en\", mi.keepcost);\n"
2180 "}\n"
2181 msgstr ""
2182 "    printf(\"Total non-mmapped bytes (arena):       %d\\en\", mi.arena);\n"
2183 "    printf(\"# of free chunks (ordblks):            %d\\en\", mi.ordblks);\n"
2184 "    printf(\"# of free fastbin blocks (smblks):     %d\\en\", mi.smblks);\n"
2185 "    printf(\"# of mapped regions (hblks):           %d\\en\", mi.hblks);\n"
2186 "    printf(\"Bytes in mapped regions (hblkhd):      %d\\en\", mi.hblkhd);\n"
2187 "    printf(\"Max. total allocated space (usmblks):  %d\\en\", mi.usmblks);\n"
2188 "    printf(\"Free bytes held in fastbins (fsmblks): %d\\en\", mi.fsmblks);\n"
2189 "    printf(\"Total allocated space (uordblks):      %d\\en\", mi.uordblks);\n"
2190 "    printf(\"Total free space (fordblks):           %d\\en\", mi.fordblks);\n"
2191 "    printf(\"Topmost releasable block (keepcost):   %d\\en\", mi.keepcost);\n"
2192 "}\n"
2193
2194 #. type: Plain text
2195 #: build/C/man3/mallinfo.3:235
2196 #, no-wrap
2197 msgid ""
2198 "int\n"
2199 "main(int argc, char *argv[])\n"
2200 "{\n"
2201 "#define MAX_ALLOCS 2000000\n"
2202 "    char *alloc[MAX_ALLOCS];\n"
2203 "    int numBlocks, j, freeBegin, freeEnd, freeStep;\n"
2204 "    size_t blockSize;\n"
2205 msgstr ""
2206 "int\n"
2207 "main(int argc, char *argv[])\n"
2208 "{\n"
2209 "#define MAX_ALLOCS 2000000\n"
2210 "    char *alloc[MAX_ALLOCS];\n"
2211 "    int numBlocks, j, freeBegin, freeEnd, freeStep;\n"
2212 "    size_t blockSize;\n"
2213
2214 #. type: Plain text
2215 #: build/C/man3/mallinfo.3:239
2216 #, no-wrap
2217 msgid ""
2218 "    if (argc E<lt> 3 || strcmp(argv[1], \"--help\") == 0)\n"
2219 "        usageErr(\"%s num-blocks block-size [free-step [start-free \"\n"
2220 "                \"[end-free]]]\\en\", argv[0]);\n"
2221 msgstr ""
2222 "    if (argc E<lt> 3 || strcmp(argv[1], \"--help\") == 0)\n"
2223 "        usageErr(\"%s num-blocks block-size [free-step [start-free \"\n"
2224 "                \"[end-free]]]\\en\", argv[0]);\n"
2225
2226 #. type: Plain text
2227 #: build/C/man3/mallinfo.3:245
2228 #, no-wrap
2229 msgid ""
2230 "    numBlocks = atoi(argv[1]);\n"
2231 "    blockSize = atoi(argv[2]);\n"
2232 "    freeStep = (argc E<gt> 3) ? atoi(argv[3]) : 1;\n"
2233 "    freeBegin = (argc E<gt> 4) ? atoi(argv[4]) : 0;\n"
2234 "    freeEnd = (argc E<gt> 5) ? atoi(argv[5]) : numBlocks;\n"
2235 msgstr ""
2236 "    numBlocks = atoi(argv[1]);\n"
2237 "    blockSize = atoi(argv[2]);\n"
2238 "    freeStep = (argc E<gt> 3) ? atoi(argv[3]) : 1;\n"
2239 "    freeBegin = (argc E<gt> 4) ? atoi(argv[4]) : 0;\n"
2240 "    freeEnd = (argc E<gt> 5) ? atoi(argv[5]) : numBlocks;\n"
2241
2242 #. type: Plain text
2243 #: build/C/man3/mallinfo.3:248
2244 #, no-wrap
2245 msgid ""
2246 "    printf(\"============== Before allocating blocks ==============\\en\");\n"
2247 "    display_mallinfo();\n"
2248 msgstr ""
2249 "    printf(\"============== Before allocating blocks ==============\\en\");\n"
2250 "    display_mallinfo();\n"
2251
2252 #. type: Plain text
2253 #: build/C/man3/mallinfo.3:252
2254 #, no-wrap
2255 msgid ""
2256 "    for (j = 0; j E<lt> numBlocks; j++) {\n"
2257 "        if (numBlocks E<gt>= MAX_ALLOCS)\n"
2258 "            fatal(\"Too many allocations\");\n"
2259 msgstr ""
2260 "    for (j = 0; j E<lt> numBlocks; j++) {\n"
2261 "        if (numBlocks E<gt>= MAX_ALLOCS)\n"
2262 "            fatal(\"Too many allocations\");\n"
2263
2264 #. type: Plain text
2265 #: build/C/man3/mallinfo.3:257
2266 #, no-wrap
2267 msgid ""
2268 "        alloc[j] = malloc(blockSize);\n"
2269 "        if (alloc[j] == NULL)\n"
2270 "            errExit(\"malloc\");\n"
2271 "    }\n"
2272 msgstr ""
2273 "        alloc[j] = malloc(blockSize);\n"
2274 "        if (alloc[j] == NULL)\n"
2275 "            errExit(\"malloc\");\n"
2276 "    }\n"
2277
2278 #. type: Plain text
2279 #: build/C/man3/mallinfo.3:260
2280 #, no-wrap
2281 msgid ""
2282 "    printf(\"\\en============== After allocating blocks ==============\\en\");\n"
2283 "    display_mallinfo();\n"
2284 msgstr ""
2285 "    printf(\"\\en============== After allocating blocks ==============\\en\");\n"
2286 "    display_mallinfo();\n"
2287
2288 #. type: Plain text
2289 #: build/C/man3/mallinfo.3:263
2290 #, no-wrap
2291 msgid ""
2292 "    for (j = freeBegin; j E<lt> freeEnd; j += freeStep)\n"
2293 "        free(alloc[j]);\n"
2294 msgstr ""
2295 "    for (j = freeBegin; j E<lt> freeEnd; j += freeStep)\n"
2296 "        free(alloc[j]);\n"
2297
2298 #. type: Plain text
2299 #: build/C/man3/mallinfo.3:266
2300 #, no-wrap
2301 msgid ""
2302 "    printf(\"\\en============== After freeing blocks ==============\\en\");\n"
2303 "    display_mallinfo();\n"
2304 msgstr ""
2305 "    printf(\"\\en============== After freeing blocks ==============\\en\");\n"
2306 "    display_mallinfo();\n"
2307
2308 #. type: Plain text
2309 #: build/C/man3/mallinfo.3:269 build/C/man3/malloc_info.3:255
2310 #: build/C/man3/mallopt.3:565 build/C/man3/mcheck.3:203
2311 #: build/C/man2/mmap.2:709
2312 #, no-wrap
2313 msgid ""
2314 "    exit(EXIT_SUCCESS);\n"
2315 "}\n"
2316 msgstr ""
2317 "    exit(EXIT_SUCCESS);\n"
2318 "}\n"
2319
2320 #. type: Plain text
2321 #: build/C/man3/mallinfo.3:279
2322 msgid ""
2323 "B<mmap>(2), B<malloc>(3), B<malloc_info>(3), B<malloc_stats>(3), "
2324 "B<malloc_trim>(3), B<mallopt>(3)"
2325 msgstr ""
2326 "B<mmap>(2), B<malloc>(3), B<malloc_info>(3), B<malloc_stats>(3), "
2327 "B<malloc_trim>(3), B<mallopt>(3)"
2328
2329 #. type: TH
2330 #: build/C/man3/malloc_get_state.3:25
2331 #, no-wrap
2332 msgid "MALLOC_GET_STATE"
2333 msgstr "MALLOC_GET_STATE"
2334
2335 #. type: TH
2336 #: build/C/man3/malloc_get_state.3:25
2337 #, no-wrap
2338 msgid "2012-05-04"
2339 msgstr "2012-05-04"
2340
2341 #. type: Plain text
2342 #: build/C/man3/malloc_get_state.3:28
2343 msgid ""
2344 "malloc_get_state, malloc_set_state - record and restore state of malloc "
2345 "implementation"
2346 msgstr ""
2347
2348 #. type: Plain text
2349 #: build/C/man3/malloc_get_state.3:31 build/C/man3/posix_memalign.3:35
2350 #, no-wrap
2351 msgid "B<#include E<lt>stdlib.hE<gt>>\n"
2352 msgstr "B<#include E<lt>stdlib.hE<gt>>\n"
2353
2354 #. type: Plain text
2355 #: build/C/man3/malloc_get_state.3:33
2356 #, no-wrap
2357 msgid "B<void* malloc_get_state(void);>\n"
2358 msgstr "B<void* malloc_get_state(void);>\n"
2359
2360 #. type: Plain text
2361 #: build/C/man3/malloc_get_state.3:35
2362 #, no-wrap
2363 msgid "B<int malloc_set_state(void *>I<state>B<);>\n"
2364 msgstr "B<int malloc_set_state(void *>I<state>B<);>\n"
2365
2366 #. type: Plain text
2367 #: build/C/man3/malloc_get_state.3:53
2368 msgid ""
2369 "The B<malloc_get_state>()  function records the current state of all "
2370 "B<malloc>(3)  internal bookkeeping variables (but not the actual contents of "
2371 "the heap or the state of B<malloc_hook>(3)  functions pointers).  The state "
2372 "is recorded in a system-dependent opaque data structure dynamically "
2373 "allocated via B<malloc>(3), and a pointer to that data structure is returned "
2374 "as the function result.  (It is the caller's responsibility to B<free>(3)  "
2375 "this memory.)"
2376 msgstr ""
2377
2378 #. type: Plain text
2379 #: build/C/man3/malloc_get_state.3:61
2380 msgid ""
2381 "The B<malloc_set_state>()  function restores the state of all B<malloc>(3)  "
2382 "internal bookkeeping variables to the values recorded in the opaque data "
2383 "structure pointed to by I<state>."
2384 msgstr ""
2385
2386 #. type: Plain text
2387 #: build/C/man3/malloc_get_state.3:68
2388 msgid ""
2389 "On success, B<malloc_get_state>()  returns a pointer to a newly allocated "
2390 "opaque data structure.  On error (for example, memory could not be allocated "
2391 "for the data structure), B<malloc_get_state>()  returns NULL."
2392 msgstr ""
2393
2394 #.  if(ms->magic != MALLOC_STATE_MAGIC) return -1;
2395 #.  /* Must fail if the major version is too high. */
2396 #.  if((ms->version & ~0xffl) > (MALLOC_STATE_VERSION & ~0xffl)) return -2;
2397 #. type: Plain text
2398 #: build/C/man3/malloc_get_state.3:86
2399 msgid ""
2400 "On success, B<malloc_set_state>()  returns 0.  If the implementation detects "
2401 "that I<state> does not point to a correctly formed data structure, "
2402 "B<malloc_set_state>()  returns -1.  If the implementation detects that the "
2403 "version of the data structure referred to by I<state> is a more recent "
2404 "version than this implementation knows about, B<malloc_set_state>()  returns "
2405 "-2."
2406 msgstr ""
2407
2408 #. type: Plain text
2409 #: build/C/man3/malloc_get_state.3:88 build/C/man3/malloc_hook.3:82
2410 #: build/C/man3/mcheck.3:147 build/C/man3/mtrace.3:80
2411 msgid "These functions are GNU extensions."
2412 msgstr "これらの関数は GNU による拡張である。"
2413
2414 #. type: Plain text
2415 #: build/C/man3/malloc_get_state.3:94
2416 msgid ""
2417 "These functions are especially useful when using this B<malloc>(3)  "
2418 "implementation as part of a shared library, and the heap contents are saved/"
2419 "restored via some other method.  This technique is used by the GNU Emacs to "
2420 "implement its \"dumping\" function."
2421 msgstr ""
2422
2423 #.  i.e., calls __malloc_check_init()
2424 #.  i.e., malloc checking is not already in use
2425 #.  and the caller requested malloc checking
2426 #. type: Plain text
2427 #: build/C/man3/malloc_get_state.3:111
2428 msgid ""
2429 "Hook function pointers are never saved or restored by these functions, with "
2430 "two exceptions: if malloc checking (see B<mallopt>(3))  was in use when "
2431 "B<malloc_get_state>()  was called, then B<malloc_set_state>()  resets malloc "
2432 "checking hooks if possible; if malloc checking was not in use in the "
2433 "recorded state, but the caller has requested malloc checking, then the hooks "
2434 "are reset to 0."
2435 msgstr ""
2436
2437 #. type: Plain text
2438 #: build/C/man3/malloc_get_state.3:114
2439 msgid "B<malloc>(3), B<mallopt>(3)"
2440 msgstr "B<malloc>(3), B<mallopt>(3)"
2441
2442 #. type: TH
2443 #: build/C/man3/malloc_hook.3:10
2444 #, no-wrap
2445 msgid "MALLOC_HOOK"
2446 msgstr "MALLOC_HOOK"
2447
2448 #. type: TH
2449 #: build/C/man3/malloc_hook.3:10
2450 #, no-wrap
2451 msgid "2010-10-13"
2452 msgstr "2010-10-13"
2453
2454 #. type: Plain text
2455 #: build/C/man3/malloc_hook.3:15
2456 msgid ""
2457 "__malloc_hook, __malloc_initialize_hook, __memalign_hook, __free_hook, "
2458 "__realloc_hook, __after_morecore_hook - malloc debugging variables"
2459 msgstr ""
2460 "__malloc_hook, __malloc_initialize_hook, __memalign_hook, __free_hook, "
2461 "__realloc_hook, __after_morecore_hook - malloc デバッグ用の変数"
2462
2463 #. type: Plain text
2464 #: build/C/man3/malloc_hook.3:18 build/C/man3/malloc_info.3:31
2465 #: build/C/man3/posix_memalign.3:41
2466 #, no-wrap
2467 msgid "B<#include E<lt>malloc.hE<gt>>\n"
2468 msgstr "B<#include E<lt>malloc.hE<gt>>\n"
2469
2470 #. type: Plain text
2471 #: build/C/man3/malloc_hook.3:20
2472 #, no-wrap
2473 msgid "B<void *(*__malloc_hook)(size_t >I<size>B<, const void *>I<caller>B<);>\n"
2474 msgstr "B<void *(*__malloc_hook)(size_t >I<size>B<, const void *>I<caller>B<);>\n"
2475
2476 #. type: Plain text
2477 #: build/C/man3/malloc_hook.3:23
2478 #, no-wrap
2479 msgid "B<void *(*__realloc_hook)(void *>I<ptr>B<, size_t >I<size>B<, const void *>I<caller>B<);>\n"
2480 msgstr "B<void *(*__realloc_hook)(void *>I<ptr>B<, size_t >I<size>B<, const void *>I<caller>B<);>\n"
2481
2482 #. type: Plain text
2483 #: build/C/man3/malloc_hook.3:26
2484 #, no-wrap
2485 msgid ""
2486 "B<void *(*__memalign_hook)(size_t >I<alignment>B<, size_t >I<size>B<,>\n"
2487 "B<                         const void *>I<caller>B<);>\n"
2488 msgstr ""
2489 "B<void *(*__memalign_hook)(size_t >I<alignment>B<, size_t >I<size>B<,>\n"
2490 "B<                         const void *>I<caller>B<);>\n"
2491
2492 #. type: Plain text
2493 #: build/C/man3/malloc_hook.3:28
2494 #, no-wrap
2495 msgid "B<void (*__free_hook)(void *>I<ptr>B<, const void *>I<caller>B<);>\n"
2496 msgstr "B<void (*__free_hook)(void *>I<ptr>B<, const void *>I<caller>B<);>\n"
2497
2498 #. type: Plain text
2499 #: build/C/man3/malloc_hook.3:30
2500 #, no-wrap
2501 msgid "B<void (*__malloc_initialize_hook)(void);>\n"
2502 msgstr "B<void (*__malloc_initialize_hook)(void);>\n"
2503
2504 #. type: Plain text
2505 #: build/C/man3/malloc_hook.3:32
2506 #, no-wrap
2507 msgid "B<void (*__after_morecore_hook)(void);>\n"
2508 msgstr "B<void (*__after_morecore_hook)(void);>\n"
2509
2510 #. type: Plain text
2511 #: build/C/man3/malloc_hook.3:43
2512 msgid ""
2513 "The GNU C library lets you modify the behavior of B<malloc>(3), B<realloc>"
2514 "(3), and B<free>(3)  by specifying appropriate hook functions.  You can use "
2515 "these hooks to help you debug programs that use dynamic memory allocation, "
2516 "for example."
2517 msgstr ""
2518 "GNU C ライブラリでは、適切なフック関数 (hook function) を指定することで "
2519 "B<malloc>(3), B<realloc>(3), B<free>(3)  の動作を変更することができる。例え"
2520 "ば、動的にメモリ割り当てを行う プログラムのデバッグにこれらのフックを使うこと"
2521 "ができる。"
2522
2523 #. type: Plain text
2524 #: build/C/man3/malloc_hook.3:50
2525 msgid ""
2526 "The variable B<__malloc_initialize_hook> points at a function that is called "
2527 "once when the malloc implementation is initialized.  This is a weak "
2528 "variable, so it can be overridden in the application with a definition like "
2529 "the following:"
2530 msgstr ""
2531 "変数 B<__malloc_initialize_hook> は malloc の実装が初期化される際に一度だけ呼"
2532 "ばれる関数へのポインタである。 この変数は書き換え可能 (weak) であり、アプリ"
2533 "ケーション内で 以下のような定義で上書きできる:"
2534
2535 #. type: Plain text
2536 #: build/C/man3/malloc_hook.3:53
2537 #, no-wrap
2538 msgid "    void (*__malloc_initialize_hook)(void) = my_init_hook;\n"
2539 msgstr "    void (*__malloc_initialize_hook)(void) = my_init_hook;\n"
2540
2541 #. type: Plain text
2542 #: build/C/man3/malloc_hook.3:58
2543 msgid ""
2544 "Now the function I<my_init_hook>()  can do the initialization of all hooks."
2545 msgstr ""
2546 "なお、関数 I<my_init_hook>()  で全てのフックの初期化をすることができる。"
2547
2548 #. type: Plain text
2549 #: build/C/man3/malloc_hook.3:74
2550 msgid ""
2551 "The four functions pointed to by B<__malloc_hook>, B<__realloc_hook>, "
2552 "B<__memalign_hook>, B<__free_hook> have a prototype like the functions "
2553 "B<malloc>(3), B<realloc>(3), B<memalign>(3), B<free>(3), respectively, "
2554 "except that they have a final argument I<caller> that gives the address of "
2555 "the caller of B<malloc>(3), etc."
2556 msgstr ""
2557 "B<__malloc_hook>, B<__realloc_hook>, B<__memalign_hook>, B<__free_hook> で指"
2558 "される 4 つの関数は、各々 B<malloc>(3), B<realloc>(3), B<memalign>(3), "
2559 "B<free>(3)  とよく似たプロトタイプを持っているが、 一番最後の引き数 "
2560 "I<caller> をとる点が異なる。 引き数 I<caller> には、 B<malloc>(3)  などの呼び"
2561 "出し元 (caller) のアドレスが格納される。"
2562
2563 #. type: Plain text
2564 #: build/C/man3/malloc_hook.3:80
2565 msgid ""
2566 "The variable B<__after_morecore_hook> points at a function that is called "
2567 "each time after B<sbrk>(2)  was asked for more memory."
2568 msgstr ""
2569 "変数 B<__after_morecore_hook> は、領域の追加要求があり B<sbrk>(2)  が呼ばれた"
2570 "後で毎回呼び出される関数へのポインタである。"
2571
2572 #.  https://bugzilla.redhat.com/show_bug.cgi?id=450187
2573 #.  http://sourceware.org/bugzilla/show_bug.cgi?id=9957
2574 #. type: Plain text
2575 #: build/C/man3/malloc_hook.3:89
2576 msgid ""
2577 "The use of these hook functions is not safe in multithreaded programs, and "
2578 "they are now deprecated.  Programmers should instead preempt calls to the "
2579 "relevant functions by defining and exporting functions such as \"malloc\" "
2580 "and \"free\"."
2581 msgstr ""
2582 "マルチスレッドプログラムでは、 これらのフック関数の使用は安全ではなく、 今で"
2583 "は非推奨である。 プログラマは、 \"malloc\" や \"free\" のような関数を定義して"
2584 "公開して、 関連する関数を呼び出すようにすべきである。"
2585
2586 #. type: Plain text
2587 #: build/C/man3/malloc_hook.3:91
2588 msgid "Here is a short example of how to use these variables."
2589 msgstr "これらの変数の使い方の簡単な例を以下に示す。"
2590
2591 #. type: Plain text
2592 #: build/C/man3/malloc_hook.3:95
2593 #, no-wrap
2594 msgid ""
2595 "#include E<lt>stdio.hE<gt>\n"
2596 "#include E<lt>malloc.hE<gt>\n"
2597 msgstr ""
2598 "#include E<lt>stdio.hE<gt>\n"
2599 "#include E<lt>malloc.hE<gt>\n"
2600
2601 #. type: Plain text
2602 #: build/C/man3/malloc_hook.3:99
2603 #, no-wrap
2604 msgid ""
2605 "/* Prototypes for our hooks.  */\n"
2606 "static void my_init_hook(void);\n"
2607 "static void *my_malloc_hook(size_t, const void *);\n"
2608 msgstr ""
2609 "/* 使おうとするフックのプロトタイプ宣言 */\n"
2610 "static void my_init_hook(void);\n"
2611 "static void *my_malloc_hook(size_t, const void *);\n"
2612
2613 #. type: Plain text
2614 #: build/C/man3/malloc_hook.3:102
2615 #, no-wrap
2616 msgid ""
2617 "/* Variables to save original hooks. */\n"
2618 "static void *(*old_malloc_hook)(size_t, const void *);\n"
2619 msgstr ""
2620 "/* 元々のフックを保存するための変数 */\n"
2621 "static void *(*old_malloc_hook)(size_t, const void *);\n"
2622
2623 #. type: Plain text
2624 #: build/C/man3/malloc_hook.3:105
2625 #, no-wrap
2626 msgid ""
2627 "/* Override initializing hook from the C library. */\n"
2628 "void (*__malloc_initialize_hook) (void) = my_init_hook;\n"
2629 msgstr ""
2630 "/* C ライブラリから呼ばれる初期化フックを上書きする */\n"
2631 "void (*__malloc_initialize_hook) (void) = my_init_hook;\n"
2632
2633 #. type: Plain text
2634 #: build/C/man3/malloc_hook.3:112
2635 #, no-wrap
2636 msgid ""
2637 "static void\n"
2638 "my_init_hook(void)\n"
2639 "{\n"
2640 "    old_malloc_hook = __malloc_hook;\n"
2641 "    __malloc_hook = my_malloc_hook;\n"
2642 "}\n"
2643 msgstr ""
2644 "static void\n"
2645 "my_init_hook(void)\n"
2646 "{\n"
2647 "    old_malloc_hook = __malloc_hook;\n"
2648 "    __malloc_hook = my_malloc_hook;\n"
2649 "}\n"
2650
2651 #. type: Plain text
2652 #: build/C/man3/malloc_hook.3:117
2653 #, no-wrap
2654 msgid ""
2655 "static void *\n"
2656 "my_malloc_hook(size_t size, const void *caller)\n"
2657 "{\n"
2658 "    void *result;\n"
2659 msgstr ""
2660 "static void *\n"
2661 "my_malloc_hook(size_t size, const void *caller)\n"
2662 "{\n"
2663 "    void *result;\n"
2664
2665 #. type: Plain text
2666 #: build/C/man3/malloc_hook.3:120
2667 #, no-wrap
2668 msgid ""
2669 "    /* Restore all old hooks */\n"
2670 "    __malloc_hook = old_malloc_hook;\n"
2671 msgstr ""
2672 "    /* 元々のフックを全て戻す */\n"
2673 "    __malloc_hook = old_malloc_hook;\n"
2674
2675 #. type: Plain text
2676 #: build/C/man3/malloc_hook.3:123
2677 #, no-wrap
2678 msgid ""
2679 "    /* Call recursively */\n"
2680 "    result = malloc(size);\n"
2681 msgstr ""
2682 "    /* malloc の再帰的呼び出し */\n"
2683 "    result = malloc(size);\n"
2684
2685 #. type: Plain text
2686 #: build/C/man3/malloc_hook.3:126
2687 #, no-wrap
2688 msgid ""
2689 "    /* Save underlying hooks */\n"
2690 "    old_malloc_hook = __malloc_hook;\n"
2691 msgstr ""
2692 "    /* 現在設定されているフック (underlying hook) を保存する */\n"
2693 "    old_malloc_hook = __malloc_hook;\n"
2694
2695 #. type: Plain text
2696 #: build/C/man3/malloc_hook.3:130
2697 #, no-wrap
2698 msgid ""
2699 "    /* printf() might call malloc(), so protect it too. */\n"
2700 "    printf(\"malloc(%u) called from %p returns %p\\en\",\n"
2701 "            (unsigned int) size, caller, result);\n"
2702 msgstr ""
2703 "    /* printf() は malloc() を呼び出す可能性があるので\n"
2704 "        ここでもガードを行う (元々のフックのままにしておく) */\n"
2705 "    printf(\"malloc(%u) called from %p returns %p\\en\",\n"
2706 "            (unsigned int) size, caller, result);\n"
2707
2708 #. type: Plain text
2709 #: build/C/man3/malloc_hook.3:133
2710 #, no-wrap
2711 msgid ""
2712 "    /* Restore our own hooks */\n"
2713 "    __malloc_hook = my_malloc_hook;\n"
2714 msgstr ""
2715 "    /* ユーザが使おうとするフックを再設定する */\n"
2716 "    __malloc_hook = my_malloc_hook;\n"
2717
2718 #. type: Plain text
2719 #: build/C/man3/malloc_hook.3:136
2720 #, no-wrap
2721 msgid ""
2722 "    return result;\n"
2723 "}\n"
2724 msgstr ""
2725 "    return result;\n"
2726 "}\n"
2727
2728 #. type: Plain text
2729 #: build/C/man3/malloc_hook.3:142
2730 msgid "B<mallinfo>(3), B<malloc>(3), B<mcheck>(3), B<mtrace>(3)"
2731 msgstr "B<mallinfo>(3), B<malloc>(3), B<mcheck>(3), B<mtrace>(3)"
2732
2733 #. type: TH
2734 #: build/C/man3/malloc_info.3:25
2735 #, no-wrap
2736 msgid "MALLOC_INFO"
2737 msgstr "MALLOC_INFO"
2738
2739 #. type: TH
2740 #: build/C/man3/malloc_info.3:25 build/C/man2/shmget.2:38
2741 #, no-wrap
2742 msgid "2013-04-19"
2743 msgstr "2013-04-19"
2744
2745 #. type: Plain text
2746 #: build/C/man3/malloc_info.3:28
2747 msgid "malloc_info - export malloc state to a stream"
2748 msgstr "malloc_info - malloc の状態をストリームに出力する"
2749
2750 #. type: Plain text
2751 #: build/C/man3/malloc_info.3:33
2752 #, no-wrap
2753 msgid "B<int malloc_info(int >I<options>B<, FILE *>I<fp>B<);>\n"
2754 msgstr "B<int malloc_info(int >I<options>B<, FILE *>I<fp>B<);>\n"
2755
2756 #. type: Plain text
2757 #: build/C/man3/malloc_info.3:44
2758 msgid ""
2759 "The B<malloc_info>()  function exports an XML string that describes the "
2760 "current state of the memory-allocation implementation in the caller.  The "
2761 "string is printed on the file stream I<fp>.  The exported string includes "
2762 "information about all arenas (see B<malloc>(3))."
2763 msgstr ""
2764 "B<malloc_info>() 関数は、 呼び出し元のメモリ割り当て実装の現在の状態を表す "
2765 "XML 文字列を出力する。 文字列は、 ファイルストリーム I<fp> に出力される。 出"
2766 "力された文字列には、 全ての割り当て領域の情報が含まれる (B<malloc>(3) 参照)。"
2767
2768 #. type: Plain text
2769 #: build/C/man3/malloc_info.3:48
2770 msgid "As currently implemented, I<options> must be zero."
2771 msgstr "現在の実装では、 I<options> は 0 でなければならない。"
2772
2773 #. type: Plain text
2774 #: build/C/man3/malloc_info.3:55
2775 msgid ""
2776 "On success, B<malloc_info>()  returns 0; on error, it returns -1, with "
2777 "I<errno> set to indicate the cause."
2778 msgstr ""
2779 "B<malloc_info>() は、成功すると 0 を返す。 エラーの場合、-1 を返し、 "
2780 "I<errno> にエラーの原因を示す値を設定する。"
2781
2782 #. type: Plain text
2783 #: build/C/man3/malloc_info.3:60
2784 msgid "I<options> was nonzero."
2785 msgstr "I<options> が 0 でなかった。"
2786
2787 #. type: Plain text
2788 #: build/C/man3/malloc_info.3:63
2789 msgid "B<malloc_info>()  was added to glibc in version 2.10."
2790 msgstr "B<malloc_info>() は glibc バージョン 2.10 で追加された。"
2791
2792 #. type: Plain text
2793 #: build/C/man3/malloc_info.3:65 build/C/man3/malloc_stats.3:57
2794 #: build/C/man3/malloc_trim.3:62 build/C/man3/malloc_usable_size.3:50
2795 msgid "This function is a GNU extension."
2796 msgstr "この関数は GNU による拡張である。"
2797
2798 #. type: Plain text
2799 #: build/C/man3/malloc_info.3:71
2800 msgid ""
2801 "The memory-allocation information is provided as an XML string (rather than "
2802 "a C structure)  because the information may change over time (according to "
2803 "changes in the underlying implementation).  The output XML string includes a "
2804 "version field."
2805 msgstr ""
2806 "メモリ割り当て情報は (C の構造体ではなく) XML 文字列として提供される。 これ"
2807 "は、 この情報は時間をたつと (内部で使用している実装によって) 変わる可能性があ"
2808 "るからである。 出力される XML 文字列にはバージョンフィールドが付いている。"
2809
2810 #. type: Plain text
2811 #: build/C/man3/malloc_info.3:77
2812 msgid ""
2813 "The B<open_memstream>(3)  function can be used to send the output of "
2814 "B<malloc_info>()  directly into a buffer in memory, rather than to a file."
2815 msgstr ""
2816 "B<open_memstream>(3) 関数を使うと、 B<malloc_info>() の出力を、 ファイルでは"
2817 "なくメモリ内のバッファに直接送ることができる。"
2818
2819 #. type: Plain text
2820 #: build/C/man3/malloc_info.3:84
2821 msgid ""
2822 "The B<malloc_info>()  function is designed to address deficiencies in "
2823 "B<malloc_stats>(3)  and B<mallinfo>(3)."
2824 msgstr ""
2825 "B<malloc_info>() 関数は、 B<malloc_stats>(3) と B<mallinfo>(3) の不備を解決す"
2826 "るために設定された。"
2827
2828 #. type: Plain text
2829 #: build/C/man3/malloc_info.3:95
2830 msgid ""
2831 "The program below takes up to four command-line arguments, of which the "
2832 "first three are mandatory.  The first argument specifies the number of "
2833 "threads that the program should create.  All of the threads, including the "
2834 "main thread, allocate the number of blocks of memory specified by the second "
2835 "argument.  The third argument controls the size of the blocks to be "
2836 "allocated.  The main thread creates blocks of this size, the second thread "
2837 "created by the program allocates blocks of twice this size, the third thread "
2838 "allocates blocks of three times this size, and so on."
2839 msgstr ""
2840 "以下のプログラムは最大で 4 つのコマンドライン引数を取り、 最初の 3 つは必須で"
2841 "ある。 最初の引数は、このプログラムが生成するスレッド数を指定する。 メインス"
2842 "レッドを含む全てのスレッドが第 2 引数で指定した数のメモリブロックの割り当てを"
2843 "行う。 第 3 引数は割り当てるブロックのサイズを制御する。 メインスレッドはこの"
2844 "サイズのブロックを作成し、 このプログラムが生成する 2 番目のスレッドはこのサ"
2845 "イズの 2 倍のサイズのブロックを、 3 番目のスレッドはこのサイズの 3 倍のサイズ"
2846 "のブロックを割り当て、 以下同様である。"
2847
2848 #. type: Plain text
2849 #: build/C/man3/malloc_info.3:102
2850 msgid ""
2851 "The program calls B<malloc_info>()  twice to display the memory-allocation "
2852 "state.  The first call takes place before any threads are created or memory "
2853 "allocated.  The second call is performed after all threads have allocated "
2854 "memory."
2855 msgstr ""
2856 "このプログラムは B<malloc_info>() を 2 回呼び出し、メモリ割り当て状態を表示す"
2857 "る。 最初の呼び出しはスレッドの生成もメモリの割り当ても行われる前に実行され"
2858 "る。 2 回目の呼び出しは全てのスレッドがメモリ割り当てを行った後に実行される。"
2859
2860 #. type: Plain text
2861 #: build/C/man3/malloc_info.3:110
2862 msgid ""
2863 "In the following example, the command-line arguments specify the creation of "
2864 "one additional thread, and both the main thread and the additional thread "
2865 "allocate 10000 blocks of memory.  After the blocks of memory have been "
2866 "allocated, B<malloc_info>()  shows the state of two allocation arenas."
2867 msgstr ""
2868 "以下の例では、 コマンドライン引数で、 追加でスレッドを一つ生成し、メインス"
2869 "レッドと追加のスレッドの両方が 10000 個のメモリブロックを割り当てるように指定"
2870 "している。 メモリブロックの割り当て後の B<malloc_info>() では、 2 つの割り当"
2871 "て領域の状態が表示されている。"
2872
2873 #. type: Plain text
2874 #: build/C/man3/malloc_info.3:135
2875 #, no-wrap
2876 msgid ""
2877 "$ B<getconf GNU_LIBC_VERSION>\n"
2878 "glibc 2.13\n"
2879 "$ B<./a.out 1 10000 100>\n"
2880 "============ Before allocating blocks ============\n"
2881 "E<lt>malloc version=\"1\"E<gt>\n"
2882 "E<lt>heap nr=\"0\"E<gt>\n"
2883 "E<lt>sizesE<gt>\n"
2884 "E<lt>/sizesE<gt>\n"
2885 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
2886 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
2887 "E<lt>system type=\"current\" size=\"135168\"/E<gt>\n"
2888 "E<lt>system type=\"max\" size=\"135168\"/E<gt>\n"
2889 "E<lt>aspace type=\"total\" size=\"135168\"/E<gt>\n"
2890 "E<lt>aspace type=\"mprotect\" size=\"135168\"/E<gt>\n"
2891 "E<lt>/heapE<gt>\n"
2892 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
2893 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
2894 "E<lt>system type=\"current\" size=\"135168\"/E<gt>\n"
2895 "E<lt>system type=\"max\" size=\"135168\"/E<gt>\n"
2896 "E<lt>aspace type=\"total\" size=\"135168\"/E<gt>\n"
2897 "E<lt>aspace type=\"mprotect\" size=\"135168\"/E<gt>\n"
2898 "E<lt>/mallocE<gt>\n"
2899 msgstr ""
2900 "$ B<getconf GNU_LIBC_VERSION>\n"
2901 "glibc 2.13\n"
2902 "$ B<./a.out 1 10000 100>\n"
2903 "============ Before allocating blocks ============\n"
2904 "E<lt>malloc version=\"1\"E<gt>\n"
2905 "E<lt>heap nr=\"0\"E<gt>\n"
2906 "E<lt>sizesE<gt>\n"
2907 "E<lt>/sizesE<gt>\n"
2908 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
2909 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
2910 "E<lt>system type=\"current\" size=\"135168\"/E<gt>\n"
2911 "E<lt>system type=\"max\" size=\"135168\"/E<gt>\n"
2912 "E<lt>aspace type=\"total\" size=\"135168\"/E<gt>\n"
2913 "E<lt>aspace type=\"mprotect\" size=\"135168\"/E<gt>\n"
2914 "E<lt>/heapE<gt>\n"
2915 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
2916 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
2917 "E<lt>system type=\"current\" size=\"135168\"/E<gt>\n"
2918 "E<lt>system type=\"max\" size=\"135168\"/E<gt>\n"
2919 "E<lt>aspace type=\"total\" size=\"135168\"/E<gt>\n"
2920 "E<lt>aspace type=\"mprotect\" size=\"135168\"/E<gt>\n"
2921 "E<lt>/mallocE<gt>\n"
2922
2923 #. type: Plain text
2924 #: build/C/man3/malloc_info.3:165
2925 #, no-wrap
2926 msgid ""
2927 "============ After allocating blocks ============\n"
2928 "E<lt>malloc version=\"1\"E<gt>\n"
2929 "E<lt>heap nr=\"0\"E<gt>\n"
2930 "E<lt>sizesE<gt>\n"
2931 "E<lt>/sizesE<gt>\n"
2932 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
2933 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
2934 "E<lt>system type=\"current\" size=\"1081344\"/E<gt>\n"
2935 "E<lt>system type=\"max\" size=\"1081344\"/E<gt>\n"
2936 "E<lt>aspace type=\"total\" size=\"1081344\"/E<gt>\n"
2937 "E<lt>aspace type=\"mprotect\" size=\"1081344\"/E<gt>\n"
2938 "E<lt>/heapE<gt>\n"
2939 "E<lt>heap nr=\"1\"E<gt>\n"
2940 "E<lt>sizesE<gt>\n"
2941 "E<lt>/sizesE<gt>\n"
2942 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
2943 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
2944 "E<lt>system type=\"current\" size=\"1032192\"/E<gt>\n"
2945 "E<lt>system type=\"max\" size=\"1032192\"/E<gt>\n"
2946 "E<lt>aspace type=\"total\" size=\"1032192\"/E<gt>\n"
2947 "E<lt>aspace type=\"mprotect\" size=\"1032192\"/E<gt>\n"
2948 "E<lt>/heapE<gt>\n"
2949 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
2950 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
2951 "E<lt>system type=\"current\" size=\"2113536\"/E<gt>\n"
2952 "E<lt>system type=\"max\" size=\"2113536\"/E<gt>\n"
2953 "E<lt>aspace type=\"total\" size=\"2113536\"/E<gt>\n"
2954 "E<lt>aspace type=\"mprotect\" size=\"2113536\"/E<gt>\n"
2955 "E<lt>/mallocE<gt>\n"
2956 msgstr ""
2957 "============ After allocating blocks ============\n"
2958 "E<lt>malloc version=\"1\"E<gt>\n"
2959 "E<lt>heap nr=\"0\"E<gt>\n"
2960 "E<lt>sizesE<gt>\n"
2961 "E<lt>/sizesE<gt>\n"
2962 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
2963 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
2964 "E<lt>system type=\"current\" size=\"1081344\"/E<gt>\n"
2965 "E<lt>system type=\"max\" size=\"1081344\"/E<gt>\n"
2966 "E<lt>aspace type=\"total\" size=\"1081344\"/E<gt>\n"
2967 "E<lt>aspace type=\"mprotect\" size=\"1081344\"/E<gt>\n"
2968 "E<lt>/heapE<gt>\n"
2969 "E<lt>heap nr=\"1\"E<gt>\n"
2970 "E<lt>sizesE<gt>\n"
2971 "E<lt>/sizesE<gt>\n"
2972 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
2973 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
2974 "E<lt>system type=\"current\" size=\"1032192\"/E<gt>\n"
2975 "E<lt>system type=\"max\" size=\"1032192\"/E<gt>\n"
2976 "E<lt>aspace type=\"total\" size=\"1032192\"/E<gt>\n"
2977 "E<lt>aspace type=\"mprotect\" size=\"1032192\"/E<gt>\n"
2978 "E<lt>/heapE<gt>\n"
2979 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
2980 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
2981 "E<lt>system type=\"current\" size=\"2113536\"/E<gt>\n"
2982 "E<lt>system type=\"max\" size=\"2113536\"/E<gt>\n"
2983 "E<lt>aspace type=\"total\" size=\"2113536\"/E<gt>\n"
2984 "E<lt>aspace type=\"mprotect\" size=\"2113536\"/E<gt>\n"
2985 "E<lt>/mallocE<gt>\n"
2986
2987 #. type: Plain text
2988 #: build/C/man3/malloc_info.3:175
2989 #, no-wrap
2990 msgid ""
2991 "#include E<lt>unistd.hE<gt>\n"
2992 "#include E<lt>stdlib.hE<gt>\n"
2993 "#include E<lt>pthread.hE<gt>\n"
2994 "#include E<lt>malloc.hE<gt>\n"
2995 "#include E<lt>errno.hE<gt>\n"
2996 msgstr ""
2997 "#include E<lt>unistd.hE<gt>\n"
2998 "#include E<lt>stdlib.hE<gt>\n"
2999 "#include E<lt>pthread.hE<gt>\n"
3000 "#include E<lt>malloc.hE<gt>\n"
3001 "#include E<lt>errno.hE<gt>\n"
3002
3003 #. type: Plain text
3004 #: build/C/man3/malloc_info.3:178
3005 #, no-wrap
3006 msgid ""
3007 "static size_t blockSize;\n"
3008 "static int numThreads, numBlocks;\n"
3009 msgstr ""
3010 "static size_t blockSize;\n"
3011 "static int numThreads, numBlocks;\n"
3012
3013 #. type: Plain text
3014 #: build/C/man3/malloc_info.3:181
3015 #, no-wrap
3016 msgid ""
3017 "#define errExit(msg)    do { perror(msg); exit(EXIT_FAILURE); \\e\n"
3018 "                        } while (0)\n"
3019 msgstr ""
3020 "#define errExit(msg)    do { perror(msg); exit(EXIT_FAILURE); \\e\n"
3021 "                        } while (0)\n"
3022
3023 #. type: Plain text
3024 #: build/C/man3/malloc_info.3:187
3025 #, no-wrap
3026 msgid ""
3027 "static void *\n"
3028 "thread_func(void *arg)\n"
3029 "{\n"
3030 "    int j;\n"
3031 "    int tn = (int) arg;\n"
3032 msgstr ""
3033 "static void *\n"
3034 "thread_func(void *arg)\n"
3035 "{\n"
3036 "    int j;\n"
3037 "    int tn = (int) arg;\n"
3038
3039 #. type: Plain text
3040 #: build/C/man3/malloc_info.3:190
3041 #, no-wrap
3042 msgid ""
3043 "    /* The multiplier \\(aq(2 + tn)\\(aq ensures that each thread (including\n"
3044 "       the main thread) allocates a different amount of memory */\n"
3045 msgstr ""
3046 "    /* The multiplier \\(aq(2 + tn)\\(aq ensures that each thread (including\n"
3047 "       the main thread) allocates a different amount of memory */\n"
3048
3049 #. type: Plain text
3050 #: build/C/man3/malloc_info.3:194
3051 #, no-wrap
3052 msgid ""
3053 "    for (j = 0; j E<lt> numBlocks; j++)\n"
3054 "        if (malloc(blockSize * (2 + tn)) == NULL)\n"
3055 "            errExit(\"malloc-thread\");\n"
3056 msgstr ""
3057 "    for (j = 0; j E<lt> numBlocks; j++)\n"
3058 "        if (malloc(blockSize * (2 + tn)) == NULL)\n"
3059 "            errExit(\"malloc-thread\");\n"
3060
3061 #. type: Plain text
3062 #: build/C/man3/malloc_info.3:198
3063 #, no-wrap
3064 msgid ""
3065 "    sleep(100);         /* Sleep until main thread terminates */\n"
3066 "    return NULL;\n"
3067 "}\n"
3068 msgstr ""
3069 "    sleep(100);         /* Sleep until main thread terminates */\n"
3070 "    return NULL;\n"
3071 "}\n"
3072
3073 #. type: Plain text
3074 #: build/C/man3/malloc_info.3:204
3075 #, no-wrap
3076 msgid ""
3077 "int\n"
3078 "main(int argc, char *argv[])\n"
3079 "{\n"
3080 "    int j, tn, sleepTime;\n"
3081 "    pthread_t *thr;\n"
3082 msgstr ""
3083 "int\n"
3084 "main(int argc, char *argv[])\n"
3085 "{\n"
3086 "    int j, tn, sleepTime;\n"
3087 "    pthread_t *thr;\n"
3088
3089 #. type: Plain text
3090 #: build/C/man3/malloc_info.3:211
3091 #, no-wrap
3092 msgid ""
3093 "    if (argc E<lt> 4) {\n"
3094 "        fprintf(stderr,\n"
3095 "                \"%s num-threads num-blocks block-size [sleep-time]\\en\",\n"
3096 "                argv[0]);\n"
3097 "        exit(EXIT_FAILURE);\n"
3098 "    }\n"
3099 msgstr ""
3100 "    if (argc E<lt> 4) {\n"
3101 "        fprintf(stderr,\n"
3102 "                \"%s num-threads num-blocks block-size [sleep-time]\\en\",\n"
3103 "                argv[0]);\n"
3104 "        exit(EXIT_FAILURE);\n"
3105 "    }\n"
3106
3107 #. type: Plain text
3108 #: build/C/man3/malloc_info.3:216
3109 #, no-wrap
3110 msgid ""
3111 "    numThreads = atoi(argv[1]);\n"
3112 "    numBlocks = atoi(argv[2]);\n"
3113 "    blockSize = atoi(argv[3]);\n"
3114 "    sleepTime = (argc E<gt> 4) ? atoi(argv[4]) : 0;\n"
3115 msgstr ""
3116 "    numThreads = atoi(argv[1]);\n"
3117 "    numBlocks = atoi(argv[2]);\n"
3118 "    blockSize = atoi(argv[3]);\n"
3119 "    sleepTime = (argc E<gt> 4) ? atoi(argv[4]) : 0;\n"
3120
3121 #. type: Plain text
3122 #: build/C/man3/malloc_info.3:220
3123 #, no-wrap
3124 msgid ""
3125 "    thr = calloc(numThreads, sizeof(pthread_t));\n"
3126 "    if (thr == NULL)\n"
3127 "        errExit(\"calloc\");\n"
3128 msgstr ""
3129 "    thr = calloc(numThreads, sizeof(pthread_t));\n"
3130 "    if (thr == NULL)\n"
3131 "        errExit(\"calloc\");\n"
3132
3133 #. type: Plain text
3134 #: build/C/man3/malloc_info.3:223
3135 #, no-wrap
3136 msgid ""
3137 "    printf(\"============ Before allocating blocks ============\\en\");\n"
3138 "    malloc_info(0, stdout);\n"
3139 msgstr ""
3140 "    printf(\"============ Before allocating blocks ============\\en\");\n"
3141 "    malloc_info(0, stdout);\n"
3142
3143 #. type: Plain text
3144 #: build/C/man3/malloc_info.3:225
3145 #, no-wrap
3146 msgid "    /* Create threads that allocate different amounts of memory */\n"
3147 msgstr "    /* Create threads that allocate different amounts of memory */\n"
3148
3149 #. type: Plain text
3150 #: build/C/man3/malloc_info.3:231
3151 #, no-wrap
3152 msgid ""
3153 "    for (tn = 0; tn E<lt> numThreads; tn++) {\n"
3154 "        errno = pthread_create(&thr[tn], NULL, thread_func,\n"
3155 "                               (void *) tn);\n"
3156 "        if (errno != 0)\n"
3157 "            errExit(\"pthread_create\");\n"
3158 msgstr ""
3159 "    for (tn = 0; tn E<lt> numThreads; tn++) {\n"
3160 "        errno = pthread_create(&thr[tn], NULL, thread_func,\n"
3161 "                               (void *) tn);\n"
3162 "        if (errno != 0)\n"
3163 "            errExit(\"pthread_create\");\n"
3164
3165 #. type: Plain text
3166 #: build/C/man3/malloc_info.3:236
3167 #, no-wrap
3168 msgid ""
3169 "        /* If we add a sleep interval after the start-up of each\n"
3170 "           thread, the threads likely won\\(aqt contend for malloc\n"
3171 "           mutexes, and therefore additional arenas won\\(aqt be\n"
3172 "           allocated (see malloc(3)). */\n"
3173 msgstr ""
3174 "        /* If we add a sleep interval after the start-up of each\n"
3175 "           thread, the threads likely won\\(aqt contend for malloc\n"
3176 "           mutexes, and therefore additional arenas won\\(aqt be\n"
3177 "           allocated (see malloc(3)). */\n"
3178
3179 #. type: Plain text
3180 #: build/C/man3/malloc_info.3:240
3181 #, no-wrap
3182 msgid ""
3183 "        if (sleepTime E<gt> 0)\n"
3184 "            sleep(sleepTime);\n"
3185 "    }\n"
3186 msgstr ""
3187 "        if (sleepTime E<gt> 0)\n"
3188 "            sleep(sleepTime);\n"
3189 "    }\n"
3190
3191 #. type: Plain text
3192 #: build/C/man3/malloc_info.3:242
3193 #, no-wrap
3194 msgid "    /* The main thread also allocates some memory */\n"
3195 msgstr "    /* The main thread also allocates some memory */\n"
3196
3197 #. type: Plain text
3198 #: build/C/man3/malloc_info.3:246
3199 #, no-wrap
3200 msgid ""
3201 "    for (j = 0; j E<lt> numBlocks; j++)\n"
3202 "        if (malloc(blockSize) == NULL)\n"
3203 "            errExit(\"malloc\");\n"
3204 msgstr ""
3205 "    for (j = 0; j E<lt> numBlocks; j++)\n"
3206 "        if (malloc(blockSize) == NULL)\n"
3207 "            errExit(\"malloc\");\n"
3208
3209 #. type: Plain text
3210 #: build/C/man3/malloc_info.3:249
3211 #, no-wrap
3212 msgid ""
3213 "    sleep(2);           /* Give all threads a chance to\n"
3214 "                           complete allocations */\n"
3215 msgstr ""
3216 "    sleep(2);           /* Give all threads a chance to\n"
3217 "                           complete allocations */\n"
3218
3219 #. type: Plain text
3220 #: build/C/man3/malloc_info.3:252
3221 #, no-wrap
3222 msgid ""
3223 "    printf(\"\\en============ After allocating blocks ============\\en\");\n"
3224 "    malloc_info(0, stdout);\n"
3225 msgstr ""
3226 "    printf(\"\\en============ After allocating blocks ============\\en\");\n"
3227 "    malloc_info(0, stdout);\n"
3228
3229 #. type: Plain text
3230 #: build/C/man3/malloc_info.3:262
3231 msgid ""
3232 "B<mallinfo>(3), B<malloc>(3), B<malloc_stats>(3), B<mallopt>(3), "
3233 "B<open_memstream>(3)"
3234 msgstr ""
3235 "B<mallinfo>(3), B<malloc>(3), B<malloc_stats>(3), B<mallopt>(3), "
3236 "B<open_memstream>(3)"
3237
3238 #. type: TH
3239 #: build/C/man3/malloc_stats.3:26
3240 #, no-wrap
3241 msgid "MALLOC_STATS"
3242 msgstr "MALLOC_STATS"
3243
3244 #. type: Plain text
3245 #: build/C/man3/malloc_stats.3:29
3246 msgid "malloc_stats - print memory allocation statistics"
3247 msgstr "malloc_stats - メモリ割り当ての統計を表示する"
3248
3249 #. type: Plain text
3250 #: build/C/man3/malloc_stats.3:33
3251 msgid "B<void malloc_stats(void);>"
3252 msgstr "B<void malloc_stats(void);>"
3253
3254 #.  .SH VERSIONS
3255 #.  Available already in glibc 2.0, possibly earlier
3256 #. type: Plain text
3257 #: build/C/man3/malloc_stats.3:55
3258 msgid ""
3259 "The B<malloc_stats>()  function prints (on standard error) statistics about "
3260 "memory allocated by B<malloc>(3)  and related functions.  For each arena "
3261 "(allocation area), this function prints the total amount of memory allocated "
3262 "and the total number of bytes consumed by in-use allocations.  (These two "
3263 "values correspond to the I<arena> and I<uordblks> fields retrieved by "
3264 "B<mallinfo>(3).)  In addition, the function prints the sum of these two "
3265 "statistics for all arenas, and the maximum number of blocks and bytes that "
3266 "were ever simultaneously allocated using B<mmap>(2)."
3267 msgstr ""
3268 "B<malloc_stats>() 関数は B<malloc>(3) や関連する関数により割り当てられたメモ"
3269 "リに関する統計を (標準エラーに) 出力する。 各領域 (割り当てエリア) につい"
3270 "て、 この関数は割り当てられているメモリの総量と現在の割り当てが使用している総"
3271 "バイト数を出力する (これらの二つの値は B<mallinfo>(3) で取得できる I<arena> "
3272 "と I<uordblks> フィールドに対応している)。 また、この関数は、 すべての領域の"
3273 "これら二つの統計情報の合計値と、 B<mmap>(2) を使って同時に割り当てられたブ"
3274 "ロック数とバイト数の最大値を表示する。"
3275
3276 #. type: Plain text
3277 #: build/C/man3/malloc_stats.3:61
3278 msgid ""
3279 "More detailed information about memory allocations in the main arena can be "
3280 "obtained using B<mallinfo>(3)."
3281 msgstr ""
3282 "B<mallinfo>(3) を使用すると、 メイン領域のメモリ割り当てに関するより詳細な情"
3283 "報を取得できる。"
3284
3285 #. type: Plain text
3286 #: build/C/man3/malloc_stats.3:67
3287 msgid ""
3288 "B<mmap>(2), B<mallinfo>(3), B<malloc>(3), B<malloc_info>(3), B<mallopt>(3)"
3289 msgstr ""
3290 "B<mmap>(2), B<mallinfo>(3), B<malloc>(3), B<malloc_info>(3), B<mallopt>(3)"
3291
3292 #. type: TH
3293 #: build/C/man3/malloc_trim.3:26
3294 #, no-wrap
3295 msgid "MALLOC_TRIM"
3296 msgstr "MALLOC_TRIM"
3297
3298 #. type: TH
3299 #: build/C/man3/malloc_trim.3:26 build/C/man3/malloc_usable_size.3:25
3300 #, no-wrap
3301 msgid "2012-03-29"
3302 msgstr "2012-03-29"
3303
3304 #. type: Plain text
3305 #: build/C/man3/malloc_trim.3:29
3306 msgid "malloc_trim - release free memory from the top of the heap"
3307 msgstr ""
3308
3309 #. type: Plain text
3310 #: build/C/man3/malloc_trim.3:33
3311 msgid "B<void malloc_trim(size_t >I<pad>B<);>"
3312 msgstr "B<void malloc_trim(size_t >I<pad>B<);>"
3313
3314 #. type: Plain text
3315 #: build/C/man3/malloc_trim.3:40
3316 msgid ""
3317 "The B<malloc_trim>()  function attempts to release free memory at the top of "
3318 "the heap (by calling B<sbrk>(2)  with a suitable argument)."
3319 msgstr ""
3320
3321 #. type: Plain text
3322 #: build/C/man3/malloc_trim.3:51
3323 msgid ""
3324 "The I<pad> argument specifies the amount of free space to leave untrimmed at "
3325 "the top of the heap.  If this argument is 0, only the minimum amount of "
3326 "memory is maintained at the top of the heap (i.e., one page or less).  A "
3327 "nonzero argument can be used to maintain some trailing space at the top of "
3328 "the heap in order to allow future allocations to be made without having to "
3329 "extend the heap with B<sbrk>(2)."
3330 msgstr ""
3331
3332 #. type: Plain text
3333 #: build/C/man3/malloc_trim.3:56
3334 msgid ""
3335 "The B<malloc_trim>()  function returns 1 if memory was actually released "
3336 "back to the system, or 0 if it was not possible to release any memory."
3337 msgstr ""
3338
3339 #.  .SH VERSIONS
3340 #.  Available already in glibc 2.0, possibly earlier
3341 #. type: Plain text
3342 #: build/C/man3/malloc_trim.3:60
3343 msgid "No errors are defined."
3344 msgstr ""
3345
3346 #. type: Plain text
3347 #: build/C/man3/malloc_trim.3:71
3348 msgid ""
3349 "This function is automatically called by B<free>(3)  in certain "
3350 "circumstances; see the discussion of B<M_TOP_PAD> and B<M_TRIM_THRESHOLD> in "
3351 "B<mallopt>(3)."
3352 msgstr ""
3353
3354 #. type: Plain text
3355 #: build/C/man3/malloc_trim.3:74
3356 msgid ""
3357 "This function cannot release free memory located at places other than the "
3358 "top of the heap."
3359 msgstr ""
3360
3361 #.  malloc/malloc.c::mTRIm():
3362 #.      return result | (av == &main_arena ? sYSTRIm (pad, av) : 0);
3363 #. type: Plain text
3364 #: build/C/man3/malloc_trim.3:78
3365 msgid "This function releases only memory in the main arena."
3366 msgstr ""
3367
3368 #. type: Plain text
3369 #: build/C/man3/malloc_trim.3:82
3370 msgid "B<sbrk>(2), B<malloc>(3), B<mallopt>(3)"
3371 msgstr "B<sbrk>(2), B<malloc>(3), B<mallopt>(3)"
3372
3373 #. type: TH
3374 #: build/C/man3/malloc_usable_size.3:25
3375 #, no-wrap
3376 msgid "MALLOC_USABLE_SIZE"
3377 msgstr "MALLOC_USABLE_SIZE"
3378
3379 #. type: Plain text
3380 #: build/C/man3/malloc_usable_size.3:28
3381 msgid "malloc_usable_size - obtain size of block of memory allocated from heap"
3382 msgstr ""
3383
3384 #. type: Plain text
3385 #: build/C/man3/malloc_usable_size.3:32
3386 msgid "B<size_t malloc_usable_size (void *>I<ptr>B<);>"
3387 msgstr "B<size_t malloc_usable_size (void *>I<ptr>B<);>"
3388
3389 #. type: Plain text
3390 #: build/C/man3/malloc_usable_size.3:40
3391 msgid ""
3392 "The B<malloc_usable_size>()  function returns the number of usable bytes in "
3393 "the block pointed to by I<ptr>, a pointer to a block of memory allocated by "
3394 "B<malloc>(3)  or a related function."
3395 msgstr ""
3396
3397 #. type: Plain text
3398 #: build/C/man3/malloc_usable_size.3:48
3399 msgid ""
3400 "B<malloc_usable_size>()  returns the number of usable bytes in the block of "
3401 "allocated memory pointed to by I<ptr>.  If I<ptr> is NULL, 0 is returned."
3402 msgstr ""
3403
3404 #. type: Plain text
3405 #: build/C/man3/malloc_usable_size.3:60
3406 msgid ""
3407 "The value returned by B<malloc_usable_size>()  may be greater than the "
3408 "requested size of the allocation because of alignment and minimum size "
3409 "constraints.  Although the excess bytes can be overwritten by the "
3410 "application without ill effects, this is not good programming practice: the "
3411 "number of excess bytes in an allocation depends on the underlying "
3412 "implementation."
3413 msgstr ""
3414
3415 #. type: Plain text
3416 #: build/C/man3/malloc_usable_size.3:62
3417 msgid "The main use of this function is for debugging and introspection."
3418 msgstr ""
3419
3420 #. type: Plain text
3421 #: build/C/man3/malloc_usable_size.3:64
3422 msgid "B<malloc>(3)"
3423 msgstr "B<malloc>(3)"
3424
3425 #. type: TH
3426 #: build/C/man3/mallopt.3:26
3427 #, no-wrap
3428 msgid "MALLOPT"
3429 msgstr "MALLOPT"
3430
3431 #. type: TH
3432 #: build/C/man3/mallopt.3:26
3433 #, no-wrap
3434 msgid "2012-04-30"
3435 msgstr "2012-04-30"
3436
3437 #. type: Plain text
3438 #: build/C/man3/mallopt.3:29
3439 msgid "mallopt - set memory allocation parameters"
3440 msgstr "mallopt - メモリ割り当てパラメータを設定する"
3441
3442 #. type: Plain text
3443 #: build/C/man3/mallopt.3:33
3444 msgid "B<int mallopt(int >I<param>B<, int >I<value>B<);>"
3445 msgstr "B<int mallopt(int >I<param>B<, int >I<value>B<);>"
3446
3447 #. type: Plain text
3448 #: build/C/man3/mallopt.3:44
3449 msgid ""
3450 "The B<mallopt>()  function adjusts parameters that control the behavior of "
3451 "the memory-allocation functions (see B<malloc>(3)).  The I<param> argument "
3452 "specifies the parameter to be modified, and I<value> specifies the new value "
3453 "for that parameter."
3454 msgstr ""
3455 "B<mallopt>() 関数は、メモリ割り当て関数 (B<malloc>(3) を参照) の動作を\n"
3456 "制御するパラメータの調整を行う。\n"
3457 "I<param> 引き数で変更するパラメータを指定し、\n"
3458 "I<value> 引き数でそのパラメータの新しい値を指定する。"
3459
3460 #. type: Plain text
3461 #: build/C/man3/mallopt.3:47
3462 msgid "The following values can be specified for I<param>:"
3463 msgstr "I<param> には以下の値を指定することができる。"
3464
3465 #. type: TP
3466 #: build/C/man3/mallopt.3:47
3467 #, no-wrap
3468 msgid "B<M_CHECK_ACTION>"
3469 msgstr "B<M_CHECK_ACTION>"
3470
3471 #. type: Plain text
3472 #: build/C/man3/mallopt.3:53
3473 msgid ""
3474 "Setting this parameter controls how glibc responds when various kinds of "
3475 "programming errors are detected (e.g., freeing the same pointer twice).  The "
3476 "3 least significant bits (2, 1, and 0) of the value assigned to this "
3477 "parameter determine the glibc behavior, as follows:"
3478 msgstr ""
3479
3480 #. type: TP
3481 #: build/C/man3/mallopt.3:54
3482 #, no-wrap
3483 msgid "Bit 0"
3484 msgstr "Bit 0"
3485
3486 #. type: Plain text
3487 #: build/C/man3/mallopt.3:64
3488 msgid ""
3489 "If this bit is set, then print a one-line message on I<stderr> that provides "
3490 "details about the error.  The message starts with the string \"***\\ glibc "
3491 "detected\\ ***\", followed by the program name, the name of the memory-"
3492 "allocation function in which the error was detected, a brief description of "
3493 "the error, and the memory address where the error was detected."
3494 msgstr ""
3495
3496 #. type: TP
3497 #: build/C/man3/mallopt.3:64
3498 #, no-wrap
3499 msgid "Bit 1"
3500 msgstr "Bit 1"
3501
3502 #. type: Plain text
3503 #: build/C/man3/mallopt.3:79
3504 msgid ""
3505 "If this bit is set, then, after printing any error message specified by bit "
3506 "0, the program is terminated by calling B<abort>(3).  In glibc versions "
3507 "since 2.4, if bit 0 is also set, then, between printing the error message "
3508 "and aborting, the program also prints a stack trace in the manner of "
3509 "B<backtrace>(3), and prints the process's memory mapping in the style of I</"
3510 "proc/[pid]/maps> (see B<proc>(5))."
3511 msgstr ""
3512
3513 #. type: TP
3514 #: build/C/man3/mallopt.3:79
3515 #, no-wrap
3516 msgid "Bit 2 (since glibc 2.4)"
3517 msgstr "Bit 2 (glibc 2.4 以降)"
3518
3519 #. type: Plain text
3520 #: build/C/man3/mallopt.3:86
3521 msgid ""
3522 "This bit has an effect only if bit 0 is also set.  If this bit is set, then "
3523 "the one-line message describing the error is simplified to contain just the "
3524 "name of the function where the error was detected and the brief description "
3525 "of the error."
3526 msgstr ""
3527
3528 #. type: Plain text
3529 #: build/C/man3/mallopt.3:91
3530 msgid "The remaining bits in I<value> are ignored."
3531 msgstr ""
3532
3533 #. type: Plain text
3534 #: build/C/man3/mallopt.3:95
3535 msgid ""
3536 "Combining the above details, the following numeric values are meaningful for "
3537 "B<M_CHECK_ACTION>:"
3538 msgstr ""
3539
3540 #. type: IP
3541 #: build/C/man3/mallopt.3:96
3542 #, no-wrap
3543 msgid "0"
3544 msgstr "0"
3545
3546 #. type: Plain text
3547 #: build/C/man3/mallopt.3:98
3548 msgid "Ignore error conditions; continue execution (with undefined results)."
3549 msgstr ""
3550
3551 #. type: IP
3552 #: build/C/man3/mallopt.3:98
3553 #, no-wrap
3554 msgid "1"
3555 msgstr "1"
3556
3557 #. type: Plain text
3558 #: build/C/man3/mallopt.3:100
3559 msgid "Print a detailed error message and continue execution."
3560 msgstr ""
3561
3562 #. type: IP
3563 #: build/C/man3/mallopt.3:100
3564 #, no-wrap
3565 msgid "2"
3566 msgstr "2"
3567
3568 #. type: Plain text
3569 #: build/C/man3/mallopt.3:102
3570 msgid "Abort the program."
3571 msgstr ""
3572
3573 #. type: IP
3574 #: build/C/man3/mallopt.3:102
3575 #, no-wrap
3576 msgid "3"
3577 msgstr "3"
3578
3579 #. type: Plain text
3580 #: build/C/man3/mallopt.3:105
3581 msgid ""
3582 "Print detailed error message, stack trace, and memory mappings, and abort "
3583 "the program."
3584 msgstr ""
3585
3586 #. type: IP
3587 #: build/C/man3/mallopt.3:105
3588 #, no-wrap
3589 msgid "5"
3590 msgstr "5"
3591
3592 #. type: Plain text
3593 #: build/C/man3/mallopt.3:107
3594 msgid "Print a simple error message and continue execution."
3595 msgstr ""
3596
3597 #. type: IP
3598 #: build/C/man3/mallopt.3:107
3599 #, no-wrap
3600 msgid "7"
3601 msgstr "7"
3602
3603 #. type: Plain text
3604 #: build/C/man3/mallopt.3:110
3605 msgid ""
3606 "Print simple error message, stack trace, and memory mappings, and abort the "
3607 "program."
3608 msgstr ""
3609
3610 #. type: Plain text
3611 #: build/C/man3/mallopt.3:116
3612 msgid ""
3613 "Since glibc 2.3.4, the default value for the B<M_CHECK_ACTION> parameter is "
3614 "3.  In glibc version 2.3.3 and earlier, the default value is 1."
3615 msgstr ""
3616
3617 #. type: Plain text
3618 #: build/C/man3/mallopt.3:121
3619 msgid ""
3620 "Using a nonzero B<M_CHECK_ACTION> value can be useful because otherwise a "
3621 "crash may happen much later, and the true cause of the problem is then very "
3622 "hard to track down."
3623 msgstr ""
3624
3625 #. type: TP
3626 #: build/C/man3/mallopt.3:121
3627 #, no-wrap
3628 msgid "B<M_MMAP_MAX>"
3629 msgstr "B<M_MMAP_MAX>"
3630
3631 #.  The following text adapted from comments in the glibc source:
3632 #. type: Plain text
3633 #: build/C/man3/mallopt.3:131
3634 msgid ""
3635 "This parameter specifies the maximum number of allocation requests that may "
3636 "be simultaneously serviced using B<mmap>(2).  This parameter exists because "
3637 "some systems have a limited number of internal tables for use by B<mmap>(2), "
3638 "and using more than a few of them may degrade performance."
3639 msgstr ""
3640
3641 #. type: Plain text
3642 #: build/C/man3/mallopt.3:138
3643 msgid ""
3644 "The default value is 65,536, a value which has no special significance and "
3645 "which servers only as a safeguard.  Setting this parameter to 0 disables the "
3646 "use of B<mmap>(2)  for servicing large allocation requests."
3647 msgstr ""
3648
3649 #. type: TP
3650 #: build/C/man3/mallopt.3:138
3651 #, no-wrap
3652 msgid "B<M_MMAP_THRESHOLD>"
3653 msgstr "B<M_MMAP_THRESHOLD>"
3654
3655 #. type: Plain text
3656 #: build/C/man3/mallopt.3:147
3657 msgid ""
3658 "For allocations greater than or equal to the limit specified (in bytes) by "
3659 "B<M_MMAP_THRESHOLD> that can't be satisfied from the free list, the memory-"
3660 "allocation functions employ B<mmap>(2)  instead of increasing the program "
3661 "break using B<sbrk>(2)."
3662 msgstr ""
3663
3664 #. type: Plain text
3665 #: build/C/man3/mallopt.3:167
3666 msgid ""
3667 "Allocating memory using B<mmap>(2)  has the significant advantage that the "
3668 "allocated memory blocks can always be independently released back to the "
3669 "system.  (By contrast, the heap can be trimmed only if memory is freed at "
3670 "the top end.)  On the other hand, there are some disadvantages to the use of "
3671 "B<mmap>(2): deallocated space is not placed on the free list for reuse by "
3672 "later allocations; memory may be wasted because B<mmap>(2)  allocations must "
3673 "be page-aligned; and the kernel must perform the expensive task of zeroing "
3674 "out memory allocated via B<mmap>(2).  Balancing these factors leads to a "
3675 "default setting of 128*1024 for the B<M_MMAP_THRESHOLD> parameter."
3676 msgstr ""
3677
3678 #. type: Plain text
3679 #: build/C/man3/mallopt.3:174
3680 msgid ""
3681 "The lower limit for this parameter is 0.  The upper limit is "
3682 "B<DEFAULT_MMAP_THRESHOLD_MAX>: 512*1024 on 32-bit systems or "
3683 "I<4*1024*1024*sizeof(long)> on 64-bit systems."
3684 msgstr ""
3685
3686 #. type: Plain text
3687 #: build/C/man3/mallopt.3:192
3688 msgid ""
3689 "I<Note:> Nowadays, glibc uses a dynamic mmap threshold by default.  The "
3690 "initial value of the threshold is 128*1024, but when blocks larger than the "
3691 "current threshold and less than or equal to B<DEFAULT_MMAP_THRESHOLD_MAX> "
3692 "are freed, the threshold is adjusted upward to the size of the freed block.  "
3693 "When dynamic mmap thresholding is in effect, the threshold for trimming the "
3694 "heap is also dynamically adjusted to be twice the dynamic mmap threshold.  "
3695 "Dynamic adjustment of the mmap threshold is disabled if any of the "
3696 "B<M_TRIM_THRESHOLD>, B<M_TOP_PAD>, B<M_MMAP_THRESHOLD>, or B<M_MMAP_MAX> "
3697 "parameters is set."
3698 msgstr ""
3699
3700 #. type: TP
3701 #: build/C/man3/mallopt.3:192
3702 #, no-wrap
3703 msgid "B<M_MXFAST> (since glibc 2.3)"
3704 msgstr "B<M_MXFAST> (glibc 2.3 以降)"
3705
3706 #.  The following text adapted from comments in the glibc sources:
3707 #. type: Plain text
3708 #: build/C/man3/mallopt.3:212
3709 msgid ""
3710 "Set the upper limit for memory allocation requests that are satisfied using "
3711 "\"fastbins\".  (The measurement unit for this parameter is bytes.)  Fastbins "
3712 "are storage areas that hold deallocated blocks of memory of the same size "
3713 "without merging adjacent free blocks.  Subsequent reallocation of blocks of "
3714 "the same size can be handled very quickly by allocating from the fastbin, "
3715 "although memory fragmentation and the overall memory footprint of the "
3716 "program can increase.  The default value for this parameter is I<64*sizeof"
3717 "(size_t)/4> (i.e., 64 on 32-bit architectures).  The range for this "
3718 "parameter is 0 to I<80*sizeof(size_t)/4>.  Setting B<M_MXFAST> to 0 disables "
3719 "the use of fastbins."
3720 msgstr ""
3721
3722 #. type: TP
3723 #: build/C/man3/mallopt.3:212
3724 #, no-wrap
3725 msgid "B<M_PERTURB> (since glibc 2.4)"
3726 msgstr "B<M_PERTURB> (glibc 2.4 以降)"
3727
3728 #. type: Plain text
3729 #: build/C/man3/mallopt.3:227
3730 msgid ""
3731 "If this parameter is set to a nonzero value, then bytes of allocated memory "
3732 "(other than allocations via B<calloc>(3))  are initialized to the complement "
3733 "of the value in the least significant byte of I<value>, and when allocated "
3734 "memory is released using B<free>(3), the freed bytes are set to the least "
3735 "significant byte of I<value>.  This can be useful for detecting errors where "
3736 "programs incorrectly rely on allocated memory being initialized to zero, or "
3737 "reuse values in memory that has already been freed."
3738 msgstr ""
3739
3740 #. type: TP
3741 #: build/C/man3/mallopt.3:227
3742 #, no-wrap
3743 msgid "B<M_TOP_PAD>"
3744 msgstr "B<M_TOP_PAD>"
3745
3746 #. type: Plain text
3747 #: build/C/man3/mallopt.3:234
3748 msgid ""
3749 "This parameter defines the amount of padding to employ when calling B<sbrk>"
3750 "(2)  to modify the program break.  (The measurement unit for this parameter "
3751 "is bytes.)  This parameter has an effect in the following circumstances:"
3752 msgstr ""
3753
3754 #. type: Plain text
3755 #: build/C/man3/mallopt.3:241
3756 msgid ""
3757 "When the program break is increased, then B<M_TOP_PAD> bytes are added to "
3758 "the B<sbrk>(2)  request."
3759 msgstr ""
3760
3761 #. type: Plain text
3762 #: build/C/man3/mallopt.3:247
3763 msgid ""
3764 "When the heap is trimmed as a consequence of calling B<free>(3)  (see the "
3765 "discussion of B<M_TRIM_THRESHOLD>)  this much free space is preserved at the "
3766 "top of the heap."
3767 msgstr ""
3768
3769 #. type: Plain text
3770 #: build/C/man3/mallopt.3:251
3771 msgid ""
3772 "In either case, the amount of padding is always rounded to a system page "
3773 "boundary."
3774 msgstr ""
3775
3776 #. type: Plain text
3777 #: build/C/man3/mallopt.3:258
3778 msgid ""
3779 "Modifying B<M_TOP_PAD> is a trade-off between increasing the number of "
3780 "system calls (when the parameter is set low)  and wasting unused memory at "
3781 "the top of the heap (when the parameter is set high)."
3782 msgstr ""
3783
3784 #.  DEFAULT_TOP_PAD in glibc source
3785 #. type: Plain text
3786 #: build/C/man3/mallopt.3:261
3787 msgid "The default value for this parameter is 128*1024."
3788 msgstr ""
3789
3790 #. type: TP
3791 #: build/C/man3/mallopt.3:261
3792 #, no-wrap
3793 msgid "B<M_TRIM_THRESHOLD>"
3794 msgstr "B<M_TRIM_THRESHOLD>"
3795
3796 #. type: Plain text
3797 #: build/C/man3/mallopt.3:277
3798 msgid ""
3799 "When the amount of contiguous free memory at the top of the heap grows "
3800 "sufficiently large, B<free>(3)  employs B<sbrk>(2)  to release this memory "
3801 "back to the system.  (This can be useful in programs that continue to "
3802 "execute for a long period after freeing a significant amount of memory.)  "
3803 "The B<M_TRIM_THRESHOLD> parameter specifies the minimum size (in bytes) that "
3804 "this block of memory must reach before B<sbrk>(2)  is used to trim the heap."
3805 msgstr ""
3806
3807 #. type: Plain text
3808 #: build/C/man3/mallopt.3:282
3809 msgid ""
3810 "The default value for this parameter is 128*1024.  Setting "
3811 "B<M_TRIM_THRESHOLD> to -1 disables trimming completely."
3812 msgstr ""
3813
3814 #
3815 #
3816 #
3817 #.  FIXME Do the arena parameters need to be documented?
3818 #.  .TP
3819 #.  .BR M_ARENA_TEST " (since glibc 2.10)"
3820 #.  .TP
3821 #.  .BR M_ARENA_MAX " (since glibc 2.10)"
3822 #.  Environment variables
3823 #.      MALLOC_ARENA_MAX_
3824 #.      MALLOC_ARENA_TEST_
3825 #.  http://udrepper.livejournal.com/20948.html describes some details
3826 #.      of the MALLOC_ARENA_* environment variables.
3827 #.  These macros aren't enabled in production releases until 2.15?
3828 #.  (see glibc malloc/Makefile)
3829 #. type: Plain text
3830 #: build/C/man3/mallopt.3:305
3831 msgid ""
3832 "Modifying B<M_TRIM_THRESHOLD> is a trade-off between increasing the number "
3833 "of system calls (when the parameter is set low)  and wasting unused memory "
3834 "at the top of the heap (when the parameter is set high)."
3835 msgstr ""
3836
3837 #. type: SS
3838 #: build/C/man3/mallopt.3:305
3839 #, no-wrap
3840 msgid "Environment variables"
3841 msgstr "環境変数"
3842
3843 #. type: Plain text
3844 #: build/C/man3/mallopt.3:320
3845 msgid ""
3846 "A number of environment variables can be defined to modify some of the same "
3847 "parameters as are controlled by B<mallopt>().  Using these variables has the "
3848 "advantage that the source code of the program need not be changed.  To be "
3849 "effective, these variables must be defined before the first call to a memory-"
3850 "allocation function.  (If the same parameters are adjusted via B<mallopt>(), "
3851 "then the B<mallopt>()  settings take precedence.)  For security reasons, "
3852 "these variables are ignored in set-user-ID and set-group-ID programs."
3853 msgstr ""
3854
3855 #. type: Plain text
3856 #: build/C/man3/mallopt.3:323
3857 msgid ""
3858 "The environment variables are as follows (note the trailing underscore at "
3859 "the end of the name of each variable):"
3860 msgstr ""
3861
3862 #. type: TP
3863 #: build/C/man3/mallopt.3:323
3864 #, no-wrap
3865 msgid "B<MALLOC_CHECK_>"
3866 msgstr "B<MALLOC_CHECK_>"
3867
3868 #.  On glibc 2.12/x86, a simple malloc()+free() loop is about 70% slower
3869 #.  when MALLOC_CHECK_ was set.
3870 #. type: Plain text
3871 #: build/C/man3/mallopt.3:340
3872 msgid ""
3873 "This environment variable controls the same parameter as B<mallopt>()  "
3874 "B<M_CHECK_ACTION>.  If this variable is set to a nonzero value, then a "
3875 "special implementation of the memory-allocation functions is used.  (This is "
3876 "accomplished using the B<malloc_hook>(3)  feature.)  This implementation "
3877 "performs additional error checking, but is slower than the standard set of "
3878 "memory-allocation functions.  (This implementation does not detect all "
3879 "possible errors; memory leaks can still occur.)"
3880 msgstr ""
3881
3882 #. type: Plain text
3883 #: build/C/man3/mallopt.3:345
3884 msgid ""
3885 "The value assigned to this environment variable should be a single digit, "
3886 "whose meaning is as described for B<M_CHECK_ACTION>.  Any characters beyond "
3887 "the initial digit are ignored."
3888 msgstr ""
3889
3890 #. type: Plain text
3891 #: build/C/man3/mallopt.3:354
3892 msgid ""
3893 "For security reasons, the effect of B<MALLOC_CHECK_> is disabled by default "
3894 "for set-user-ID and set-group-ID programs.  However, if the file I</etc/suid-"
3895 "debug> exists (the content of the file is irrelevant), then B<MALLOC_CHECK_> "
3896 "also has an effect for set-user-ID and set-group-ID programs."
3897 msgstr ""
3898
3899 #. type: TP
3900 #: build/C/man3/mallopt.3:354
3901 #, no-wrap
3902 msgid "B<MALLOC_MMAP_MAX_>"
3903 msgstr "B<MALLOC_MMAP_MAX_>"
3904
3905 #. type: Plain text
3906 #: build/C/man3/mallopt.3:359
3907 msgid "Controls the same parameter as B<mallopt>()  B<M_MMAP_MAX>."
3908 msgstr ""
3909
3910 #. type: TP
3911 #: build/C/man3/mallopt.3:359
3912 #, no-wrap
3913 msgid "B<MALLOC_MMAP_THRESHOLD_>"
3914 msgstr "B<MALLOC_MMAP_THRESHOLD_>"
3915
3916 #. type: Plain text
3917 #: build/C/man3/mallopt.3:364
3918 msgid "Controls the same parameter as B<mallopt>()  B<M_MMAP_THRESHOLD>."
3919 msgstr ""
3920
3921 #. type: TP
3922 #: build/C/man3/mallopt.3:364
3923 #, no-wrap
3924 msgid "B<MALLOC_PERTURB_>"
3925 msgstr "B<MALLOC_PERTURB_>"
3926
3927 #. type: Plain text
3928 #: build/C/man3/mallopt.3:369
3929 msgid "Controls the same parameter as B<mallopt>()  B<M_PERTURB>."
3930 msgstr ""
3931
3932 #. type: TP
3933 #: build/C/man3/mallopt.3:369
3934 #, no-wrap
3935 msgid "B<MALLOC_TRIM_THRESHOLD_>"
3936 msgstr "B<MALLOC_TRIM_THRESHOLD_>"
3937
3938 #. type: Plain text
3939 #: build/C/man3/mallopt.3:374
3940 msgid "Controls the same parameter as B<mallopt>()  B<M_TRIM_THRESHOLD>."
3941 msgstr ""
3942
3943 #. type: TP
3944 #: build/C/man3/mallopt.3:374
3945 #, no-wrap
3946 msgid "B<MALLOC_TOP_PAD_>"
3947 msgstr "B<MALLOC_TOP_PAD_>"
3948
3949 #. type: Plain text
3950 #: build/C/man3/mallopt.3:379
3951 msgid "Controls the same parameter as B<mallopt>()  B<M_TOP_PAD>."
3952 msgstr ""
3953
3954 #. type: Plain text
3955 #: build/C/man3/mallopt.3:384
3956 msgid "On success, B<mallopt>()  returns 1.  On error, it returns 0."
3957 msgstr "B<mallopt>()  は成功すると 1 を返す。エラーの場合は 0 を返す。"
3958
3959 #.  .SH VERSIONS
3960 #.  Available already in glibc 2.0, possibly earlier
3961 #. type: Plain text
3962 #: build/C/man3/mallopt.3:392
3963 msgid "On error, I<errno> is I<not> set."
3964 msgstr "エラーの場合、I<errno> は設定I<されない>。"
3965
3966 #.  .SH NOTES
3967 #. type: Plain text
3968 #: build/C/man3/mallopt.3:406
3969 msgid ""
3970 "This function is not specified by POSIX or the C standards.  A similar "
3971 "function exists on many System V derivatives, but the range of values for "
3972 "I<param> varies across systems.  The SVID defined options B<M_MXFAST>, "
3973 "B<M_NLBLKS>, B<M_GRAIN>, and B<M_KEEP>, but only the first of these is "
3974 "implemented in glibc."
3975 msgstr ""
3976
3977 #. type: Plain text
3978 #: build/C/man3/mallopt.3:410
3979 msgid "Specifying an invalid value for I<param> does not generate an error."
3980 msgstr ""
3981
3982 #.  FIXME This looks buggy:
3983 #.  setting the M_MXFAST limit rounds up:    (s + SIZE_SZ) & ~MALLOC_ALIGN_MASK)
3984 #.  malloc requests are rounded up:
3985 #.     (req) + SIZE_SZ + MALLOC_ALIGN_MASK) & ~MALLOC_ALIGN_MASK
3986 #.  http://sources.redhat.com/bugzilla/show_bug.cgi?id=12129
3987 #. type: Plain text
3988 #: build/C/man3/mallopt.3:418
3989 msgid ""
3990 "A calculation error within the glibc implementation means that a call of the "
3991 "form:"
3992 msgstr ""
3993
3994 #. type: Plain text
3995 #: build/C/man3/mallopt.3:421
3996 #, no-wrap
3997 msgid "    mallopt(M_MXFAST, n)\n"
3998 msgstr "    mallopt(M_MXFAST, n)\n"
3999
4000 #.  Bins are multiples of 2 * sizeof(size_t) + sizeof(size_t)
4001 #. type: Plain text
4002 #: build/C/man3/mallopt.3:433
4003 msgid ""
4004 "does not result in fastbins being employed for all allocations of size up to "
4005 "I<n>.  To ensure desired results, I<n> should be rounded up to the next "
4006 "multiple greater than or equal to I<(2k+1)*sizeof(size_t)>, where I<k> is an "
4007 "integer."
4008 msgstr ""
4009
4010 #.  FIXME MALLOC_MMAP_THRESHOLD_ and MALLOC_MMAP_MAX_
4011 #.  do have an effect for set-user-ID programs (but not
4012 #.  set-group-ID programs).
4013 #.  http://sources.redhat.com/bugzilla/show_bug.cgi?id=12155
4014 #. type: Plain text
4015 #: build/C/man3/mallopt.3:445
4016 msgid ""
4017 "The B<MALLOC_MMAP_THRESHOLD_> and B<MALLOC_MMAP_MAX_> variables are I<not> "
4018 "ignored in set-group-ID programs."
4019 msgstr ""
4020
4021 #.  FIXME http://sources.redhat.com/bugzilla/show_bug.cgi?id=12140
4022 #. type: Plain text
4023 #: build/C/man3/mallopt.3:466
4024 msgid ""
4025 "If B<mallopt>()  is used to set B<M_PERTURB>, then, as expected, the bytes "
4026 "of allocated memory are initialized to the complement of the byte in "
4027 "I<value>, and when that memory is freed, the bytes of the region are "
4028 "initialized to the byte specified in I<value>.  However, there is an off-by-"
4029 "I<sizeof(size_t)> error in the implementation: instead of initializing "
4030 "precisely the block of memory being freed by the call I<free(p)>, the block "
4031 "starting at I<p+sizeof(size_t)> is initialized."
4032 msgstr ""
4033
4034 #. type: Plain text
4035 #: build/C/man3/mallopt.3:475
4036 msgid ""
4037 "The program below demonstrates the use of B<M_CHECK_ACTION>.  If the program "
4038 "is supplied with an (integer) command-line argument, then that argument is "
4039 "used to set the B<M_CHECK_ACTION> parameter.  The program then allocates a "
4040 "block of memory, and frees it twice (an error)."
4041 msgstr ""
4042
4043 #. type: Plain text
4044 #: build/C/man3/mallopt.3:479
4045 msgid ""
4046 "The following shell session shows what happens when we run this program "
4047 "under glibc, with the default value for B<M_CHECK_ACTION>:"
4048 msgstr ""
4049
4050 #. type: Plain text
4051 #: build/C/man3/mallopt.3:499
4052 #, no-wrap
4053 msgid ""
4054 "$ B<./a.out>\n"
4055 "main(): returned from first free() call\n"
4056 "*** glibc detected *** ./a.out: double free or corruption (top): 0x09d30008 ***\n"
4057 "======= Backtrace: =========\n"
4058 "/lib/libc.so.6(+0x6c501)[0x523501]\n"
4059 "/lib/libc.so.6(+0x6dd70)[0x524d70]\n"
4060 "/lib/libc.so.6(cfree+0x6d)[0x527e5d]\n"
4061 "\\&./a.out[0x80485db]\n"
4062 "/lib/libc.so.6(__libc_start_main+0xe7)[0x4cdce7]\n"
4063 "\\&./a.out[0x8048471]\n"
4064 "======= Memory map: ========\n"
4065 "001e4000-001fe000 r-xp 00000000 08:06 1083555    /lib/libgcc_s.so.1\n"
4066 "001fe000-001ff000 r--p 00019000 08:06 1083555    /lib/libgcc_s.so.1\n"
4067 "[some lines omitted]\n"
4068 "b7814000-b7817000 rw-p 00000000 00:00 0\n"
4069 "bff53000-bff74000 rw-p 00000000 00:00 0          [stack]\n"
4070 "Aborted (core dumped)\n"
4071 msgstr ""
4072 "$ B<./a.out>\n"
4073 "main(): returned from first free() call\n"
4074 "*** glibc detected *** ./a.out: double free or corruption (top): 0x09d30008 ***\n"
4075 "======= Backtrace: =========\n"
4076 "/lib/libc.so.6(+0x6c501)[0x523501]\n"
4077 "/lib/libc.so.6(+0x6dd70)[0x524d70]\n"
4078 "/lib/libc.so.6(cfree+0x6d)[0x527e5d]\n"
4079 "\\&./a.out[0x80485db]\n"
4080 "/lib/libc.so.6(__libc_start_main+0xe7)[0x4cdce7]\n"
4081 "\\&./a.out[0x8048471]\n"
4082 "======= Memory map: ========\n"
4083 "001e4000-001fe000 r-xp 00000000 08:06 1083555    /lib/libgcc_s.so.1\n"
4084 "001fe000-001ff000 r--p 00019000 08:06 1083555    /lib/libgcc_s.so.1\n"
4085 "[some lines omitted]\n"
4086 "b7814000-b7817000 rw-p 00000000 00:00 0\n"
4087 "bff53000-bff74000 rw-p 00000000 00:00 0          [stack]\n"
4088 "Aborted (core dumped)\n"
4089
4090 #. type: Plain text
4091 #: build/C/man3/mallopt.3:504
4092 msgid ""
4093 "The following runs show the results when employing other values for "
4094 "B<M_CHECK_ACTION>:"
4095 msgstr ""
4096
4097 #. type: Plain text
4098 #: build/C/man3/mallopt.3:517
4099 #, no-wrap
4100 msgid ""
4101 "$ B<./a.out 1>             # Diagnose error and continue\n"
4102 "main(): returned from first free() call\n"
4103 "*** glibc detected *** ./a.out: double free or corruption (top): 0x09cbe008 ***\n"
4104 "main(): returned from second free() call\n"
4105 "$ B<./a.out 2>             # Abort without error message\n"
4106 "main(): returned from first free() call\n"
4107 "Aborted (core dumped)\n"
4108 "$ B<./a.out 0>             # Ignore error and continue\n"
4109 "main(): returned from first free() call\n"
4110 "main(): returned from second free() call\n"
4111 msgstr ""
4112 "$ B<./a.out 1>             # Diagnose error and continue\n"
4113 "main(): returned from first free() call\n"
4114 "*** glibc detected *** ./a.out: double free or corruption (top): 0x09cbe008 ***\n"
4115 "main(): returned from second free() call\n"
4116 "$ B<./a.out 2>             # Abort without error message\n"
4117 "main(): returned from first free() call\n"
4118 "Aborted (core dumped)\n"
4119 "$ B<./a.out 0>             # Ignore error and continue\n"
4120 "main(): returned from first free() call\n"
4121 "main(): returned from second free() call\n"
4122
4123 #. type: Plain text
4124 #: build/C/man3/mallopt.3:523
4125 msgid ""
4126 "The next run shows how to set the same parameter using the B<MALLOC_CHECK_> "
4127 "environment variable:"
4128 msgstr ""
4129
4130 #. type: Plain text
4131 #: build/C/man3/mallopt.3:530
4132 #, no-wrap
4133 msgid ""
4134 "$ B<MALLOC_CHECK_=1 ./a.out>\n"
4135 "main(): returned from first free() call\n"
4136 "*** glibc detected *** ./a.out: free(): invalid pointer: 0x092c2008 ***\n"
4137 "main(): returned from second free() call\n"
4138 msgstr ""
4139 "$ B<MALLOC_CHECK_=1 ./a.out>\n"
4140 "main(): returned from first free() call\n"
4141 "*** glibc detected *** ./a.out: free(): invalid pointer: 0x092c2008 ***\n"
4142 "main(): returned from second free() call\n"
4143
4144 #. type: Plain text
4145 #: build/C/man3/mallopt.3:538
4146 #, no-wrap
4147 msgid ""
4148 "#include E<lt>malloc.hE<gt>\n"
4149 "#include E<lt>stdio.hE<gt>\n"
4150 "#include E<lt>stdlib.hE<gt>\n"
4151 msgstr ""
4152 "#include E<lt>malloc.hE<gt>\n"
4153 "#include E<lt>stdio.hE<gt>\n"
4154 "#include E<lt>stdlib.hE<gt>\n"
4155
4156 #. type: Plain text
4157 #: build/C/man3/mallopt.3:543 build/C/man3/mcheck.3:187
4158 #, no-wrap
4159 msgid ""
4160 "int\n"
4161 "main(int argc, char *argv[])\n"
4162 "{\n"
4163 "    char *p;\n"
4164 msgstr ""
4165 "int\n"
4166 "main(int argc, char *argv[])\n"
4167 "{\n"
4168 "    char *p;\n"
4169
4170 #. type: Plain text
4171 #: build/C/man3/mallopt.3:550
4172 #, no-wrap
4173 msgid ""
4174 "    if (argc E<gt> 1) {\n"
4175 "        if (mallopt(M_CHECK_ACTION, atoi(argv[1])) != 1) {\n"
4176 "            fprintf(stderr, \"mallopt() failed\");\n"
4177 "            exit(EXIT_FAILURE);\n"
4178 "        }\n"
4179 "    }\n"
4180 msgstr ""
4181 "    if (argc E<gt> 1) {\n"
4182 "        if (mallopt(M_CHECK_ACTION, atoi(argv[1])) != 1) {\n"
4183 "            fprintf(stderr, \"mallopt() failed\");\n"
4184 "            exit(EXIT_FAILURE);\n"
4185 "        }\n"
4186 "    }\n"
4187
4188 #. type: Plain text
4189 #: build/C/man3/mallopt.3:556
4190 #, no-wrap
4191 msgid ""
4192 "    p = malloc(1000);\n"
4193 "    if (p == NULL) {\n"
4194 "        fprintf(stderr, \"malloc() failed\");\n"
4195 "        exit(EXIT_FAILURE);\n"
4196 "    }\n"
4197 msgstr ""
4198 "    p = malloc(1000);\n"
4199 "    if (p == NULL) {\n"
4200 "        fprintf(stderr, \"malloc() failed\");\n"
4201 "        exit(EXIT_FAILURE);\n"
4202 "    }\n"
4203
4204 #. type: Plain text
4205 #: build/C/man3/mallopt.3:559
4206 #, no-wrap
4207 msgid ""
4208 "    free(p);\n"
4209 "    printf(\"main(): returned from first free() call\\en\");\n"
4210 msgstr ""
4211 "    free(p);\n"
4212 "    printf(\"main(): returned from first free() call\\en\");\n"
4213
4214 #. type: Plain text
4215 #: build/C/man3/mallopt.3:562
4216 #, no-wrap
4217 msgid ""
4218 "    free(p);\n"
4219 "    printf(\"main(): returned from second free() call\\en\");\n"
4220 msgstr ""
4221 "    free(p);\n"
4222 "    printf(\"main(): returned from second free() call\\en\");\n"
4223
4224 #. type: Plain text
4225 #: build/C/man3/mallopt.3:580
4226 msgid ""
4227 "B<mmap>(2), B<sbrk>(2), B<mallinfo>(3), B<malloc>(3), B<malloc_hook>(3), "
4228 "B<malloc_info>(3), B<malloc_stats>(3), B<malloc_trim>(3), B<mcheck>(3), "
4229 "B<mtrace>(3), B<posix_memalign>(3)"
4230 msgstr ""
4231 "B<mmap>(2), B<sbrk>(2), B<mallinfo>(3), B<malloc>(3), B<malloc_hook>(3), "
4232 "B<malloc_info>(3), B<malloc_stats>(3), B<malloc_trim>(3), B<mcheck>(3), "
4233 "B<mtrace>(3), B<posix_memalign>(3)"
4234
4235 #. type: TH
4236 #: build/C/man3/mcheck.3:25
4237 #, no-wrap
4238 msgid "MCHECK"
4239 msgstr "MCHECK"
4240
4241 #. type: TH
4242 #: build/C/man3/mcheck.3:25
4243 #, no-wrap
4244 msgid "2014-01-11"
4245 msgstr "2014-01-11"
4246
4247 #. type: Plain text
4248 #: build/C/man3/mcheck.3:28
4249 msgid ""
4250 "mcheck, mcheck_check_all, mcheck_pedantic, mprobe - heap consistency checking"
4251 msgstr ""
4252
4253 #. type: Plain text
4254 #: build/C/man3/mcheck.3:31
4255 #, no-wrap
4256 msgid "B<#include E<lt>mcheck.hE<gt>>\n"
4257 msgstr "B<#include E<lt>mcheck.hE<gt>>\n"
4258
4259 #. type: Plain text
4260 #: build/C/man3/mcheck.3:33
4261 #, no-wrap
4262 msgid "B<int mcheck(void (*>I<abortfunc>B<)(enum mcheck_status >I<mstatus>B<));>\n"
4263 msgstr ""
4264
4265 #. type: Plain text
4266 #: build/C/man3/mcheck.3:35
4267 #, no-wrap
4268 msgid "B<int mcheck_pedantic(void (*>I<abortfunc>B<)(enum mcheck_status >I<mstatus>B<));>\n"
4269 msgstr ""
4270
4271 #. type: Plain text
4272 #: build/C/man3/mcheck.3:37
4273 #, no-wrap
4274 msgid "B<void mcheck_check_all(void);>\n"
4275 msgstr "B<void mcheck_check_all(void);>\n"
4276
4277 #. type: Plain text
4278 #: build/C/man3/mcheck.3:39
4279 #, no-wrap
4280 msgid "B<enum mcheck_status mprobe(void *>I<ptr>B<);>\n"
4281 msgstr "B<enum mcheck_status mprobe(void *>I<ptr>B<);>\n"
4282
4283 #. type: Plain text
4284 #: build/C/man3/mcheck.3:51
4285 msgid ""
4286 "The B<mcheck>()  function installs a set of debugging hooks for the B<malloc>"
4287 "(3)  family of memory-allocation functions.  These hooks cause certain "
4288 "consistency checks to be performed on the state of the heap.  The checks can "
4289 "detect application errors such as freeing a block of memory more than once "
4290 "or corrupting the bookkeeping data structures that immediately precede a "
4291 "block of allocated memory."
4292 msgstr ""
4293
4294 #. type: Plain text
4295 #: build/C/man3/mcheck.3:63
4296 msgid ""
4297 "To be effective, the B<mcheck>()  function must be called before the first "
4298 "call to B<malloc>(3)  or a related function.  In cases where this is "
4299 "difficult to ensure, linking the program with I<-lmcheck> inserts an "
4300 "implicit call to B<mcheck>()  (with a NULL argument)  before the first call "
4301 "to a memory-allocation function."
4302 msgstr ""
4303
4304 #. type: Plain text
4305 #: build/C/man3/mcheck.3:71
4306 msgid ""
4307 "The B<mcheck_pedantic>()  function is similar to B<mcheck>(), but performs "
4308 "checks on all allocated blocks whenever one of the memory-allocation "
4309 "functions is called.  This can be very slow!"
4310 msgstr ""
4311
4312 #. type: Plain text
4313 #: build/C/man3/mcheck.3:78
4314 msgid ""
4315 "The B<mcheck_check_all>()  function causes an immediate check on all "
4316 "allocated blocks.  This call is effective only if B<mcheck>()  is called "
4317 "beforehand."
4318 msgstr ""
4319
4320 #. type: Plain text
4321 #: build/C/man3/mcheck.3:91
4322 msgid ""
4323 "If the system detects an inconsistency in the heap, the caller-supplied "
4324 "function pointed to by I<abortfunc> is invoked with a single argument "
4325 "argument, I<mstatus>, that indicates what type of inconsistency was "
4326 "detected.  If I<abortfunc> is NULL, a default function prints an error "
4327 "message on I<stderr> and calls B<abort>(3)."
4328 msgstr ""
4329
4330 #. type: Plain text
4331 #: build/C/man3/mcheck.3:103
4332 msgid ""
4333 "The B<mprobe>()  function performs a consistency check on the block of "
4334 "allocated memory pointed to by I<ptr>.  The B<mcheck>()  function should be "
4335 "called beforehand (otherwise B<mprobe>()  returns B<MCHECK_DISABLED>)."
4336 msgstr ""
4337
4338 #. type: Plain text
4339 #: build/C/man3/mcheck.3:111
4340 msgid ""
4341 "The following list describes the values returned by B<mprobe>()  or passed "
4342 "as the I<mstatus> argument when I<abortfunc> is invoked:"
4343 msgstr ""
4344
4345 #. type: TP
4346 #: build/C/man3/mcheck.3:111
4347 #, no-wrap
4348 msgid "B<MCHECK_DISABLED> (B<mprobe>() only)"
4349 msgstr ""
4350
4351 #. type: Plain text
4352 #: build/C/man3/mcheck.3:116
4353 msgid ""
4354 "B<mcheck>()  was not called before the first memory allocation function was "
4355 "called.  Consistency checking is not possible."
4356 msgstr ""
4357
4358 #. type: TP
4359 #: build/C/man3/mcheck.3:116
4360 #, no-wrap
4361 msgid "B<MCHECK_OK> (B<mprobe>() only)"
4362 msgstr ""
4363
4364 #. type: Plain text
4365 #: build/C/man3/mcheck.3:119
4366 msgid "No inconsistency detected."
4367 msgstr ""
4368
4369 #. type: TP
4370 #: build/C/man3/mcheck.3:119
4371 #, no-wrap
4372 msgid "B<MCHECK_HEAD>"
4373 msgstr "B<MCHECK_HEAD>"
4374
4375 #. type: Plain text
4376 #: build/C/man3/mcheck.3:122
4377 msgid "Memory preceding an allocated block was clobbered."
4378 msgstr ""
4379
4380 #. type: TP
4381 #: build/C/man3/mcheck.3:122
4382 #, no-wrap
4383 msgid "B<MCHECK_TAIL>"
4384 msgstr "B<MCHECK_TAIL>"
4385
4386 #. type: Plain text
4387 #: build/C/man3/mcheck.3:125
4388 msgid "Memory following an allocated block was clobbered."
4389 msgstr ""
4390
4391 #. type: TP
4392 #: build/C/man3/mcheck.3:125
4393 #, no-wrap
4394 msgid "B<MCHECK_FREE>"
4395 msgstr "B<MCHECK_FREE>"
4396
4397 #. type: Plain text
4398 #: build/C/man3/mcheck.3:129
4399 msgid "A block of memory was freed twice."
4400 msgstr ""
4401
4402 #. type: Plain text
4403 #: build/C/man3/mcheck.3:134
4404 msgid ""
4405 "B<mcheck>()  and B<mcheck_pedantic>()  return 0 on success, or -1 on error."
4406 msgstr ""
4407
4408 #. type: Plain text
4409 #: build/C/man3/mcheck.3:145
4410 msgid ""
4411 "The B<mcheck_pedantic>()  and B<mcheck_check_all>()  functions are available "
4412 "since glibc 2.2.  The B<mcheck>()  and B<mprobe>()  functions are present "
4413 "since at least glibc 2.0"
4414 msgstr ""
4415
4416 #.  But is MALLOC_CHECK_ slower?
4417 #. type: Plain text
4418 #: build/C/man3/mcheck.3:159
4419 msgid ""
4420 "Linking a program with I<-lmcheck> and using the B<MALLOC_CHECK_> "
4421 "environment variable (described in B<mallopt>(3))  cause the same kinds of "
4422 "errors to be detected.  But, using B<MALLOC_CHECK_> does not require the "
4423 "application to be relinked."
4424 msgstr ""
4425
4426 #. type: Plain text
4427 #: build/C/man3/mcheck.3:165
4428 msgid ""
4429 "The program below calls B<mcheck>()  with a NULL argument and then frees the "
4430 "same block of memory twice.  The following shell session demonstrates what "
4431 "happens when running the program:"
4432 msgstr ""
4433
4434 #. type: Plain text
4435 #: build/C/man3/mcheck.3:170
4436 #, no-wrap
4437 msgid ""
4438 "$B< ./a.out>\n"
4439 "About to free\n"
4440 msgstr ""
4441
4442 #. type: Plain text
4443 #: build/C/man3/mcheck.3:174
4444 #, no-wrap
4445 msgid ""
4446 "About to free a second time\n"
4447 "block freed twice\n"
4448 "Aborted (core dumped)\n"
4449 msgstr ""
4450
4451 #. type: Plain text
4452 #: build/C/man3/mcheck.3:182
4453 #, no-wrap
4454 msgid ""
4455 "#include E<lt>stdlib.hE<gt>\n"
4456 "#include E<lt>stdio.hE<gt>\n"
4457 "#include E<lt>mcheck.hE<gt>\n"
4458 msgstr ""
4459 "#include E<lt>stdlib.hE<gt>\n"
4460 "#include E<lt>stdio.hE<gt>\n"
4461 "#include E<lt>mcheck.hE<gt>\n"
4462
4463 #. type: Plain text
4464 #: build/C/man3/mcheck.3:190
4465 #, no-wrap
4466 msgid ""
4467 "    if (mcheck(NULL) != 0) {\n"
4468 "        fprintf(stderr, \"mcheck() failed\\en\");\n"
4469 msgstr ""
4470
4471 #. type: Plain text
4472 #: build/C/man3/mcheck.3:193
4473 #, no-wrap
4474 msgid ""
4475 "        exit(EXIT_FAILURE);\n"
4476 "    }\n"
4477 msgstr ""
4478 "        exit(EXIT_FAILURE);\n"
4479 "    }\n"
4480
4481 #. type: Plain text
4482 #: build/C/man3/mcheck.3:195
4483 #, no-wrap
4484 msgid "    p = malloc(1000);\n"
4485 msgstr "    p = malloc(1000);\n"
4486
4487 #. type: Plain text
4488 #: build/C/man3/mcheck.3:200
4489 #, no-wrap
4490 msgid ""
4491 "    fprintf(stderr, \"About to free\\en\");\n"
4492 "    free(p);\n"
4493 "    fprintf(stderr, \"\\enAbout to free a second time\\en\");\n"
4494 "    free(p);\n"
4495 msgstr ""
4496
4497 #. type: Plain text
4498 #: build/C/man3/mcheck.3:208
4499 msgid "B<malloc>(3), B<mallopt>(3), B<mtrace>(3)"
4500 msgstr "B<malloc>(3), B<mallopt>(3), B<mtrace>(3)"
4501
4502 #. type: TH
4503 #: build/C/man2/mlock.2:26
4504 #, no-wrap
4505 msgid "MLOCK"
4506 msgstr "MLOCK"
4507
4508 #. type: TH
4509 #: build/C/man2/mlock.2:26
4510 #, no-wrap
4511 msgid "2011-09-14"
4512 msgstr "2011-09-14"
4513
4514 #. type: Plain text
4515 #: build/C/man2/mlock.2:29
4516 msgid "mlock, munlock, mlockall, munlockall - lock and unlock memory"
4517 msgstr "mlock - メモリのロックとロック解除を行う"
4518
4519 #. type: Plain text
4520 #: build/C/man2/mlock.2:32 build/C/man2/mmap.2:46 build/C/man2/mmap2.2:35
4521 #: build/C/man2/mprotect.2:44 build/C/man2/mremap.2:38
4522 #, no-wrap
4523 msgid "B<#include E<lt>sys/mman.hE<gt>>\n"
4524 msgstr "B<#include E<lt>sys/mman.hE<gt>>\n"
4525
4526 #. type: Plain text
4527 #: build/C/man2/mlock.2:35
4528 #, no-wrap
4529 msgid ""
4530 "B<int mlock(const void *>I<addr>B<, size_t >I<len>B<);>\n"
4531 "B<int munlock(const void *>I<addr>B<, size_t >I<len>B<);>\n"
4532 msgstr ""
4533 "B<int mlock(const void *>I<addr>B<, size_t >I<len>B<);>\n"
4534 "B<int munlock(const void *>I<addr>B<, size_t >I<len>B<);>\n"
4535
4536 #. type: Plain text
4537 #: build/C/man2/mlock.2:38
4538 #, no-wrap
4539 msgid ""
4540 "B<int mlockall(int >I<flags>B<);>\n"
4541 "B<int munlockall(void);>\n"
4542 msgstr ""
4543 "B<int mlockall(int >I<flags>B<);>\n"
4544 "B<int munlockall(void);>\n"
4545
4546 #. type: Plain text
4547 #: build/C/man2/mlock.2:54
4548 msgid ""
4549 "B<mlock>()  and B<mlockall>()  respectively lock part or all of the calling "
4550 "process's virtual address space into RAM, preventing that memory from being "
4551 "paged to the swap area.  B<munlock>()  and B<munlockall>()  perform the "
4552 "converse operation, respectively unlocking part or all of the calling "
4553 "process's virtual address space, so that pages in the specified virtual "
4554 "address range may once more to be swapped out if required by the kernel "
4555 "memory manager.  Memory locking and unlocking are performed in units of "
4556 "whole pages."
4557 msgstr ""
4558 "B<mlock>()  と B<mlockall>()  はそれぞれ、呼び出し元プロセスの仮想アドレス空"
4559 "間の一部または全部を RAM 上にロックし、メモリがスワップエリアにページングされ"
4560 "るのを防ぐ。 B<munlock>()  と B<munlockall>()  は逆の操作で、それぞれ呼び出し"
4561 "元プロセスの仮想アドレス空間の一部または全部を ロック解除する。つまり、指定さ"
4562 "れた仮想アドレス範囲のページは カーネルメモリマネージャーから要求されればス"
4563 "ワップアウトするようになる。 メモリのロックとロック解除はページ単位で行われ"
4564 "る。"
4565
4566 #. type: SS
4567 #: build/C/man2/mlock.2:54
4568 #, no-wrap
4569 msgid "mlock() and munlock()"
4570 msgstr "mlock() と munlock()"
4571
4572 #. type: Plain text
4573 #: build/C/man2/mlock.2:64
4574 msgid ""
4575 "B<mlock>()  locks pages in the address range starting at I<addr> and "
4576 "continuing for I<len> bytes.  All pages that contain a part of the specified "
4577 "address range are guaranteed to be resident in RAM when the call returns "
4578 "successfully; the pages are guaranteed to stay in RAM until later unlocked."
4579 msgstr ""
4580 "B<mlock>()  は I<addr> から始まる長さ I<len> バイトのアドレス範囲のページを"
4581 "ロックする。 呼び出しが成功した場合には、 指定されたアドレス範囲を含む全ての"
4582 "ページは RAM に残り続けることが保証される。 これらのページは後でロック解除さ"
4583 "れるまで RAM に残り続けることが保証される。"
4584
4585 #. type: Plain text
4586 #: build/C/man2/mlock.2:73
4587 msgid ""
4588 "B<munlock>()  unlocks pages in the address range starting at I<addr> and "
4589 "continuing for I<len> bytes.  After this call, all pages that contain a part "
4590 "of the specified memory range can be moved to external swap space again by "
4591 "the kernel."
4592 msgstr ""
4593 "B<munlock>()  は、 I<addr> から始まる長さ I<len> バイトのアドレス範囲のページ"
4594 "のロックを解除する。 この呼び出しを行った後は、カーネルが、指定されたメモリ範"
4595 "囲を含む 全てのページを外部のスワップ空間に移動できるようになる。"
4596
4597 #. type: SS
4598 #: build/C/man2/mlock.2:73
4599 #, no-wrap
4600 msgid "mlockall() and munlockall()"
4601 msgstr "mlockall() と munlockall()"
4602
4603 #. type: Plain text
4604 #: build/C/man2/mlock.2:83
4605 msgid ""
4606 "B<mlockall>()  locks all pages mapped into the address space of the calling "
4607 "process.  This includes the pages of the code, data and stack segment, as "
4608 "well as shared libraries, user space kernel data, shared memory, and memory-"
4609 "mapped files.  All mapped pages are guaranteed to be resident in RAM when "
4610 "the call returns successfully; the pages are guaranteed to stay in RAM until "
4611 "later unlocked."
4612 msgstr ""
4613 "B<mlockall>()  は呼び出し元プロセスのアドレス空間にマップされている全てのペー"
4614 "ジを ロックする。これにはコード、データ、スタックの 各セグメント、共有ライブ"
4615 "ラリ、カーネルのユーザー空間データ、 共有メモリ、メモリ・マップされたファイル"
4616 "が含まれる。 システム・コールが成功した場合には全てのマップされたページは "
4617 "RAM に 残ることを保証される。 これらのページは後でロック解除されるまで RAM に"
4618 "残り続けることが保証される。"
4619
4620 #. type: Plain text
4621 #: build/C/man2/mlock.2:88
4622 msgid ""
4623 "The I<flags> argument is constructed as the bitwise OR of one or more of the "
4624 "following constants:"
4625 msgstr "I<flags> 引数は以下の内容の一つまたは複数のビット OR から構成される:"
4626
4627 #. type: TP
4628 #: build/C/man2/mlock.2:88
4629 #, no-wrap
4630 msgid "B<MCL_CURRENT>"
4631 msgstr "B<MCL_CURRENT>"
4632
4633 #. type: Plain text
4634 #: build/C/man2/mlock.2:92
4635 msgid ""
4636 "Lock all pages which are currently mapped into the address space of the "
4637 "process."
4638 msgstr ""
4639 "現在、プロセスのアドレス空間にマップされている全てのページをロックする。"
4640
4641 #. type: TP
4642 #: build/C/man2/mlock.2:92
4643 #, no-wrap
4644 msgid "B<MCL_FUTURE>"
4645 msgstr "B<MCL_FUTURE>"
4646
4647 #. type: Plain text
4648 #: build/C/man2/mlock.2:99
4649 msgid ""
4650 "Lock all pages which will become mapped into the address space of the "
4651 "process in the future.  These could be for instance new pages required by a "
4652 "growing heap and stack as well as new memory-mapped files or shared memory "
4653 "regions."
4654 msgstr ""
4655 "将来、プロセスのアドレス空間にマップされる全てのページをロックする。 例えば、"
4656 "ヒープ (heap) やスタックの成長により新しく必要になったページだけで なく、新し"
4657 "くメモリマップされたファイルや共有メモリ領域もロックされる。"
4658
4659 #. type: Plain text
4660 #: build/C/man2/mlock.2:112
4661 msgid ""
4662 "If B<MCL_FUTURE> has been specified, then a later system call (e.g., B<mmap>"
4663 "(2), B<sbrk>(2), B<malloc>(3)), may fail if it would cause the number of "
4664 "locked bytes to exceed the permitted maximum (see below).  In the same "
4665 "circumstances, stack growth may likewise fail: the kernel will deny stack "
4666 "expansion and deliver a B<SIGSEGV> signal to the process."
4667 msgstr ""
4668 "B<MCL_FUTURE> が指定されていると、以後のシステムコール (例えば、 B<mmap>(2), "
4669 "B<sbrk>(2), B<malloc>(3))  は、ロックするバイト数が許可された最大値 (下記参"
4670 "照) を超えた場合に 失敗する可能性がある。 同様に、スタックの成長も失敗する可"
4671 "能性がある。 その場合、カーネルはスタックの拡張を拒否し、 B<SIGSEGV> をプロセ"
4672 "スに送る。"
4673
4674 #. type: Plain text
4675 #: build/C/man2/mlock.2:116
4676 msgid ""
4677 "B<munlockall>()  unlocks all pages mapped into the address space of the "
4678 "calling process."
4679 msgstr ""
4680 "B<munlockall>()  は、呼び出し元プロセスのアドレス空間にマッピングされている "
4681 "全てのページをロック解除する。"
4682
4683 #. type: Plain text
4684 #: build/C/man2/mlock.2:122
4685 msgid ""
4686 "On success these system calls return 0.  On error, -1 is returned, I<errno> "
4687 "is set appropriately, and no changes are made to any locks in the address "
4688 "space of the process."
4689 msgstr ""
4690 "成功した場合は、これらのシステムコールはゼロを返す。 エラーの場合は -1 が返さ"
4691 "れ、 I<errno> が適切に設定され、プロセスのアドレス空間におけるロックは変更さ"
4692 "れない。"
4693
4694 #. type: Plain text
4695 #: build/C/man2/mlock.2:131
4696 msgid ""
4697 "(Linux 2.6.9 and later) the caller had a nonzero B<RLIMIT_MEMLOCK> soft "
4698 "resource limit, but tried to lock more memory than the limit permitted.  "
4699 "This limit is not enforced if the process is privileged (B<CAP_IPC_LOCK>)."
4700 msgstr ""
4701 "(Linux 2.6.9 以降) 呼び出し元は非ゼロの ソフト資源制限 B<RLIMIT_MEMLOCK> を持"
4702 "つが、制限が許可している以上のメモリをロックしようとした。 この制限は、プロセ"
4703 "スが特権 (B<CAP_IPC_LOCK>)  を持っている場合は適用されない。"
4704
4705 #.  In the case of mlock(), this check is somewhat buggy: it doesn't
4706 #.  take into account whether the to-be-locked range overlaps with
4707 #.  already locked pages.  Thus, suppose we allocate
4708 #.  (num_physpages / 4 + 1) of memory, and lock those pages once using
4709 #.  mlock(), and then lock the *same* page range a second time.
4710 #.  In the case, the second mlock() call will fail, since the check
4711 #.  calculates that the process is trying to lock (num_physpages / 2 + 2)
4712 #.  pages, which of course is not true.  (MTK, Nov 04, kernel 2.4.28)
4713 #. type: Plain text
4714 #: build/C/man2/mlock.2:143
4715 msgid ""
4716 "(Linux 2.4 and earlier) the calling process tried to lock more than half of "
4717 "RAM."
4718 msgstr ""
4719 "(Linux 2.4 以前) 呼び出し元プロセスが RAM の半分以上をロックしようとした。"
4720
4721 #. SVr4 documents an additional EAGAIN error code.
4722 #. type: Plain text
4723 #: build/C/man2/mlock.2:149
4724 msgid ""
4725 "The caller is not privileged, but needs privilege (B<CAP_IPC_LOCK>)  to "
4726 "perform the requested operation."
4727 msgstr ""
4728 "呼び出し側が特権を持っていないが、\n"
4729 "要求された操作を実行するには特権 (B<CAP_IPC_LOCK>) が必要である。"
4730
4731 #. type: Plain text
4732 #: build/C/man2/mlock.2:154
4733 msgid "For B<mlock>()  and B<munlock>():"
4734 msgstr "B<mlock>()  と B<munlock>()  用として:"
4735
4736 #. type: Plain text
4737 #: build/C/man2/mlock.2:157
4738 msgid "Some or all of the specified address range could not be locked."
4739 msgstr "指定されたアドレス範囲の一部または全てをロックすることができなかった。"
4740
4741 #. type: Plain text
4742 #: build/C/man2/mlock.2:164
4743 msgid ""
4744 "The result of the addition I<start>+I<len> was less than I<start> (e.g., the "
4745 "addition may have resulted in an overflow)."
4746 msgstr ""
4747 "I<start>+I<len> の加算の結果が I<start> よりも小さかった\n"
4748 "(例えば、加算でオーバーフローが発生したなど)。"
4749
4750 #. type: Plain text
4751 #: build/C/man2/mlock.2:169
4752 msgid "(Not on Linux)  I<addr> was not a multiple of the page size."
4753 msgstr ""
4754 "(Linux ではこの意味で使われない)  I<addr> がページサイズの倍数ではない。"
4755
4756 #. type: Plain text
4757 #: build/C/man2/mlock.2:173
4758 msgid ""
4759 "Some of the specified address range does not correspond to mapped pages in "
4760 "the address space of the process."
4761 msgstr ""
4762 "指定されたアドレス範囲がプロセスのアドレス空間にマップされたページと 一致しな"
4763 "い。"
4764
4765 #. type: Plain text
4766 #: build/C/man2/mlock.2:176
4767 msgid "For B<mlockall>():"
4768 msgstr "B<mlockall>()  用として:"
4769
4770 #. type: Plain text
4771 #: build/C/man2/mlock.2:179
4772 msgid "Unknown I<flags> were specified."
4773 msgstr "未知の I<flags> が指定された。"
4774
4775 #. type: Plain text
4776 #: build/C/man2/mlock.2:182
4777 msgid "For B<munlockall>():"
4778 msgstr "B<munlockall>()  用として:"
4779
4780 #. type: Plain text
4781 #: build/C/man2/mlock.2:186
4782 msgid ""
4783 "(Linux 2.6.8 and earlier) The caller was not privileged (B<CAP_IPC_LOCK>)."
4784 msgstr ""
4785 "(Linux 2.6.8 以前) 呼び出し元が権限 (B<CAP_IPC_LOCK>)  を持っていない。"
4786
4787 #. type: Plain text
4788 #: build/C/man2/mlock.2:188
4789 msgid "POSIX.1-2001, SVr4."
4790 msgstr "POSIX.1-2001, SVr4."
4791
4792 #. type: SH
4793 #: build/C/man2/mlock.2:188 build/C/man2/mmap.2:499 build/C/man2/msync.2:105
4794 #, no-wrap
4795 msgid "AVAILABILITY"
4796 msgstr "可用性"
4797
4798 #. type: Plain text
4799 #: build/C/man2/mlock.2:200
4800 msgid ""
4801 "On POSIX systems on which B<mlock>()  and B<munlock>()  are available, "
4802 "B<_POSIX_MEMLOCK_RANGE> is defined in I<E<lt>unistd.hE<gt>> and the number "
4803 "of bytes in a page can be determined from the constant B<PAGESIZE> (if "
4804 "defined) in I<E<lt>limits.hE<gt>> or by calling I<sysconf(_SC_PAGESIZE)>."
4805 msgstr ""
4806 "B<mlock>()  と B<munlock>()  が使用可能な POSIX システムでは "
4807 "B<_POSIX_MEMLOCK_RANGE> が I<E<lt>unistd.hE<gt>> で定義されている。 また、"
4808 "ページあたりのバイト数は、 I<E<lt>limits.hE<gt>> で定義される定数 "
4809 "B<PAGESIZE> から (定義されている場合)、もしくは I<sysconf(_SC_PAGESIZE)> を呼"
4810 "び出すことで決定できる。"
4811
4812 #.  POSIX.1-2001: It shall be defined to -1 or 0 or 200112L.
4813 #.  -1: unavailable, 0: ask using sysconf().
4814 #.  glibc defines it to 1.
4815 #. type: Plain text
4816 #: build/C/man2/mlock.2:213
4817 msgid ""
4818 "On POSIX systems on which B<mlockall>()  and B<munlockall>()  are available, "
4819 "B<_POSIX_MEMLOCK> is defined in I<E<lt>unistd.hE<gt>> to a value greater "
4820 "than 0.  (See also B<sysconf>(3).)"
4821 msgstr ""
4822 "B<mlockall>()  と B<munlockall>()  が利用可能な POSIX システムでは、 "
4823 "B<_POSIX_MEMLOCK> は I<E<lt>unistd.hE<gt>> で 0 より大きい値に定義されている "
4824 "(B<sysconf>(3)  も参照のこと)。"
4825
4826 #. type: Plain text
4827 #: build/C/man2/mlock.2:231
4828 msgid ""
4829 "Memory locking has two main applications: real-time algorithms and high-"
4830 "security data processing.  Real-time applications require deterministic "
4831 "timing, and, like scheduling, paging is one major cause of unexpected "
4832 "program execution delays.  Real-time applications will usually also switch "
4833 "to a real-time scheduler with B<sched_setscheduler>(2).  Cryptographic "
4834 "security software often handles critical bytes like passwords or secret keys "
4835 "as data structures.  As a result of paging, these secrets could be "
4836 "transferred onto a persistent swap store medium, where they might be "
4837 "accessible to the enemy long after the security software has erased the "
4838 "secrets in RAM and terminated.  (But be aware that the suspend mode on "
4839 "laptops and some desktop computers will save a copy of the system's RAM to "
4840 "disk, regardless of memory locks.)"
4841 msgstr ""
4842 "メモリのロックの用途としては主に二つある: リアルタイム アルゴリズムと高いセ"
4843 "キュリティの必要なデータ処理である。リアルタイムの アプリケーションは決定的な"
4844 "タイミングやスケジューリングを必要とするが、 ページングは予期しないプログラム"
4845 "の実行遅延をもたらす主要な要因となる。 リアルタイムのアプリケーションはたいて"
4846 "いは B<sched_setscheduler>(2)  でリアルタイムスケジューラに変更される。 暗号"
4847 "やセキュリティのソフトウェアはしばしばパスワードや秘密鍵のデータの ような重要"
4848 "なバイト列を扱う。ページングの結果、これらの秘密が スワップ用の固定媒体に転送"
4849 "されるかもしれない。そして、セキュリティ・ ソフトウェアが RAM 上の秘密を削除"
4850 "して終了したずっと後になっても、 このスワップされたデータには敵がアクセスでき"
4851 "る可能性がある (しかし、ラップトップといくつかのデスクトップコンピュータの サ"
4852 "スペンドモードはシステムの RAM の内容をメモリのロックに関わらず ディスクに保"
4853 "存することに注意)。"
4854
4855 #. type: Plain text
4856 #: build/C/man2/mlock.2:244
4857 msgid ""
4858 "Real-time processes that are using B<mlockall>()  to prevent delays on page "
4859 "faults should reserve enough locked stack pages before entering the time-"
4860 "critical section, so that no page fault can be caused by function calls.  "
4861 "This can be achieved by calling a function that allocates a sufficiently "
4862 "large automatic variable (an array) and writes to the memory occupied by "
4863 "this array in order to touch these stack pages.  This way, enough pages will "
4864 "be mapped for the stack and can be locked into RAM.  The dummy writes ensure "
4865 "that not even copy-on-write page faults can occur in the critical section."
4866 msgstr ""
4867 "リアルタイムプロセスが B<mlockall>()  を使ってページフォールトによる遅延を防"
4868 "ごうとする場合、 関数呼び出しによってページフォールトが発生しないように、 時"
4869 "間制限の厳しい部分 (time-critical section) に入る前に 十分な量のロックされた"
4870 "スタックを確保しておく必要がある。 これを実現するには、十分な大きさの自動変"
4871 "数 (の配列) を確保し、 これらのスタック用のページがメモリ上に確保されるように"
4872 "この配列に 書き込みを行う関数を用意し、これを呼び出せばよい。こうすること"
4873 "で、 十分な量のページがスタックにマッピングされ、RAM にロックされる。 ダミー"
4874 "の書き込みを行うことによって、 時間制限の厳しい部分 (critical section) 内では"
4875 "書き込み時コピーによる ページフォールトさえも発生しないことが保証される。"
4876
4877 #. type: Plain text
4878 #: build/C/man2/mlock.2:250
4879 msgid ""
4880 "Memory locks are not inherited by a child created via B<fork>(2)  and are "
4881 "automatically removed (unlocked) during an B<execve>(2)  or when the process "
4882 "terminates."
4883 msgstr ""
4884 "メモリロックは B<fork>(2)  で作成された子プロセスには継承されず、 B<execve>"
4885 "(2)  が呼ばれたり、プロセスが終了した場合は 自動的に削除される (ロック解除さ"
4886 "れる)。"
4887
4888 #. type: Plain text
4889 #: build/C/man2/mlock.2:254
4890 msgid ""
4891 "The memory lock on an address range is automatically removed if the address "
4892 "range is unmapped via B<munmap>(2)."
4893 msgstr ""
4894 "あるアドレス範囲に対するメモリロックは、そのアドレス範囲が B<munmap>(2)  に"
4895 "よってアンマップされた場合は削除される。"
4896
4897 #. type: Plain text
4898 #: build/C/man2/mlock.2:267
4899 msgid ""
4900 "Memory locks do not stack, that is, pages which have been locked several "
4901 "times by calls to B<mlock>()  or B<mlockall>()  will be unlocked by a single "
4902 "call to B<munlock>()  for the corresponding range or by B<munlockall>().  "
4903 "Pages which are mapped to several locations or by several processes stay "
4904 "locked into RAM as long as they are locked at least at one location or by at "
4905 "least one process."
4906 msgstr ""
4907 "メモリのロックは累積しない。 すなわち複数回 B<mlock>()  や B<mlockall>()  を"
4908 "呼び出してロックされたページでも、 対応する範囲に対して B<munlock>()  を 1 回"
4909 "呼び出したり B<munlockall>()  を呼び出したりするだけでロック解除される。 複数"
4910 "の場所や複数のプロセスにマップされているページは、少なくとも一つの場所、 一つ"
4911 "のプロセスでロックされている限りは RAM に残り続ける。"
4912
4913 #. type: Plain text
4914 #: build/C/man2/mlock.2:278
4915 msgid ""
4916 "Under Linux, B<mlock>()  and B<munlock>()  automatically round I<addr> down "
4917 "to the nearest page boundary.  However, POSIX.1-2001 allows an "
4918 "implementation to require that I<addr> is page aligned, so portable "
4919 "applications should ensure this."
4920 msgstr ""
4921 "Linux では、 B<mlock>()  と B<munlock>()  は自動的に I<addr> を端数切り捨てに"
4922 "より一番近いページ境界へと丸める。 しかし POSIX.1-2001 は I<addr> がページ境"
4923 "界に合っていることを要求する実装も許している。 そのため移植性を意図したアプリ"
4924 "ケーションではきちんと境界に合わせた方が良い。"
4925
4926 #. type: Plain text
4927 #: build/C/man2/mlock.2:291
4928 msgid ""
4929 "The I<VmLck> field of the Linux-specific I</proc/PID/status> file shows how "
4930 "many kilobytes of memory the process with ID I<PID> has locked using B<mlock>"
4931 "(), B<mlockall>(), and B<mmap>(2)  B<MAP_LOCKED>."
4932 msgstr ""
4933 "Linux 固有の I</proc/PID/status> ファイルの I<VmLck> フィールドには、\n"
4934 "B<mlock>(), B<mlockall>() および B<mmap>(2) B<MAP_LOCKED> を使って、\n"
4935 "ID が I<PID> のプロセスがロックしているメモリ量 (キロバイト単位) が\n"
4936 "表示される。"
4937
4938 #. type: SS
4939 #: build/C/man2/mlock.2:291
4940 #, no-wrap
4941 msgid "Limits and permissions"
4942 msgstr "制限と権限"
4943
4944 #. type: Plain text
4945 #: build/C/man2/mlock.2:298
4946 msgid ""
4947 "In Linux 2.6.8 and earlier, a process must be privileged (B<CAP_IPC_LOCK>)  "
4948 "in order to lock memory and the B<RLIMIT_MEMLOCK> soft resource limit "
4949 "defines a limit on how much memory the process may lock."
4950 msgstr ""
4951 "Linux 2.6.8 以前では、メモリをロックするためには特権 (B<CAP_IPC_LOCK>)  が必"
4952 "要で、 ソフト資源制限 B<RLIMIT_MEMLOCK> はプロセスがどれだけのメモリをロック"
4953 "できるかの制限を定義する。"
4954
4955 #. type: Plain text
4956 #: build/C/man2/mlock.2:304
4957 msgid ""
4958 "Since Linux 2.6.9, no limits are placed on the amount of memory that a "
4959 "privileged process can lock and the B<RLIMIT_MEMLOCK> soft resource limit "
4960 "instead defines a limit on how much memory an unprivileged process may lock."
4961 msgstr ""
4962 "Linux 2.6.9 以降では、特権を持つプロセスがロックできるメモリ量は無制限とな"
4963 "り、 代わりにソフト資源制限 B<RLIMIT_MEMLOCK> は特権を持たないプロセスがロッ"
4964 "クできるメモリ量の制限を定義する。"
4965
4966 #. type: Plain text
4967 #: build/C/man2/mlock.2:312
4968 msgid ""
4969 "In the 2.4 series Linux kernels up to and including 2.4.17, a bug caused the "
4970 "B<mlockall>()  B<MCL_FUTURE> flag to be inherited across a B<fork>(2).  This "
4971 "was rectified in kernel 2.4.18."
4972 msgstr ""
4973 "2.4.17 までの 2.4 シリーズの Linux カーネルには、 B<mlockall>()  "
4974 "B<MCL_FUTURE> フラグが B<fork>(2)  で継承されると言うバグがある。 これはカー"
4975 "ネル 2.4.18 で修正された。"
4976
4977 #.  See the following LKML thread:
4978 #.  http://marc.theaimsgroup.com/?l=linux-kernel&m=113801392825023&w=2
4979 #.  "Rationale for RLIMIT_MEMLOCK"
4980 #.  23 Jan 2006
4981 #. type: Plain text
4982 #: build/C/man2/mlock.2:329
4983 msgid ""
4984 "Since kernel 2.6.9, if a privileged process calls I<mlockall(MCL_FUTURE)> "
4985 "and later drops privileges (loses the B<CAP_IPC_LOCK> capability by, for "
4986 "example, setting its effective UID to a nonzero value), then subsequent "
4987 "memory allocations (e.g., B<mmap>(2), B<brk>(2))  will fail if the "
4988 "B<RLIMIT_MEMLOCK> resource limit is encountered."
4989 msgstr ""
4990 "カーネル 2.6.9 以降では、特権を持ったプロセスが I<mlockall(MCL_FUTURE)> を呼"
4991 "び出した後で、特権をなくした場合 (例えば、 実効 UID を 0 以外の値に変更するな"
4992 "どにより、 B<CAP_IPC_LOCK> ケーパビリティを失った場合)、リソース上限 "
4993 "B<RLIMIT_MEMLOCK> に達すると、それ以降のメモリ割り当て (例えば B<mmap>(2), "
4994 "B<brk>(2))  は失敗する。"
4995
4996 #. type: Plain text
4997 #: build/C/man2/mlock.2:336
4998 msgid ""
4999 "B<mmap>(2), B<setrlimit>(2), B<shmctl>(2), B<sysconf>(3), B<proc>(5), "
5000 "B<capabilities>(7)"
5001 msgstr ""
5002 "B<mmap>(2), B<setrlimit>(2), B<shmctl>(2), B<sysconf>(3), B<proc>(5),\n"
5003 "B<capabilities>(7)"
5004
5005 #. type: TH
5006 #: build/C/man2/mmap.2:40
5007 #, no-wrap
5008 msgid "MMAP"
5009 msgstr "MMAP"
5010
5011 #. type: TH
5012 #: build/C/man2/mmap.2:40
5013 #, fuzzy, no-wrap
5014 #| msgid "2014-01-05"
5015 msgid "2014-04-06"
5016 msgstr "2014-01-05"
5017
5018 #. type: Plain text
5019 #: build/C/man2/mmap.2:43
5020 msgid "mmap, munmap - map or unmap files or devices into memory"
5021 msgstr "mmap, munmap - ファイルやデバイスをメモリにマップ/アンマップする"
5022
5023 #. type: Plain text
5024 #: build/C/man2/mmap.2:51
5025 #, no-wrap
5026 msgid ""
5027 "B<void *mmap(void *>I<addr>B<, size_t >I<length>B<, int >I<prot>B<, int >I<flags>B<,>\n"
5028 "B<           int >I<fd>B<, off_t >I<offset>B<);>\n"
5029 "B<int munmap(void *>I<addr>B<, size_t >I<length>B<);>\n"
5030 msgstr ""
5031 "B<void *mmap(void *>I<addr>B<, size_t >I<length>B<, int >I<prot>B<, int >I<flags>B<,>\n"
5032 "B<           int >I<fd>B<, off_t >I<offset>B<);>\n"
5033 "B<int munmap(void *>I<addr>B<, size_t >I<length>B<);>\n"
5034
5035 #. type: Plain text
5036 #: build/C/man2/mmap.2:54
5037 msgid "See NOTES for information on feature test macro requirements."
5038 msgstr "機能検査マクロの要件に関する情報は「注意」の節を参照。"
5039
5040 #. type: Plain text
5041 #: build/C/man2/mmap.2:63
5042 msgid ""
5043 "B<mmap>()  creates a new mapping in the virtual address space of the calling "
5044 "process.  The starting address for the new mapping is specified in I<addr>.  "
5045 "The I<length> argument specifies the length of the mapping."
5046 msgstr ""
5047 "B<mmap>()  は、新しいマッピングを呼び出し元プロセスの仮想アドレス空間に作成す"
5048 "る。 新しいマッピングの開始アドレスは I<addr> で指定される。マッピングの長さ"
5049 "は I<length> 引き数で指定される。"
5050
5051 #.  Before Linux 2.6.24, the address was rounded up to the next page
5052 #.  boundary; since 2.6.24, it is rounded down!
5053 #. type: Plain text
5054 #: build/C/man2/mmap.2:77
5055 msgid ""
5056 "If I<addr> is NULL, then the kernel chooses the address at which to create "
5057 "the mapping; this is the most portable method of creating a new mapping.  If "
5058 "I<addr> is not NULL, then the kernel takes it as a hint about where to place "
5059 "the mapping; on Linux, the mapping will be created at a nearby page "
5060 "boundary.  The address of the new mapping is returned as the result of the "
5061 "call."
5062 msgstr ""
5063 "I<addr> が NULL の場合、カーネルがマッピングを作成するアドレスを選択する。 こ"
5064 "の方法は最も移植性のある新しいマッピングの作成方法である。 I<addr> が NULL で"
5065 "ない場合、カーネルはマッピングをどこに配置するかのヒントとして I<addr> を使用"
5066 "する。Linux では、マッピングはすぐ近くのページ境界に作成される。 新しいマッピ"
5067 "ングのアドレスは、呼び出しの返り値として返される。"
5068
5069 #. type: Plain text
5070 #: build/C/man2/mmap.2:89
5071 msgid ""
5072 "The contents of a file mapping (as opposed to an anonymous mapping; see "
5073 "B<MAP_ANONYMOUS> below), are initialized using I<length> bytes starting at "
5074 "offset I<offset> in the file (or other object) referred to by the file "
5075 "descriptor I<fd>.  I<offset> must be a multiple of the page size as returned "
5076 "by I<sysconf(_SC_PAGE_SIZE)>."
5077 msgstr ""
5078 "ファイルマッピングの内容は、 ファイルディスクリプタ I<fd> で参照されるファイ"
5079 "ル (もしくは他のオブジェクト) のオフセット I<offset> から開始される "
5080 "I<length> バイトのデータで初期化される (ファイルマッピングは無名マッピングの"
5081 "反対語である。 B<MAP_ANONYMOUS> を参照)。 I<offset> は I<sysconf"
5082 "(_SC_PAGE_SIZE)> が返すページサイズの倍数でなければならない。"
5083
5084 #. type: Plain text
5085 #: build/C/man2/mmap.2:97
5086 msgid ""
5087 "The I<prot> argument describes the desired memory protection of the mapping "
5088 "(and must not conflict with the open mode of the file).  It is either "
5089 "B<PROT_NONE> or the bitwise OR of one or more of the following flags:"
5090 msgstr ""
5091 "引き数 I<prot> には、マッピングのメモリ保護をどのように行なうかを指定する "
5092 "(ファイルのオープンモードと矛盾してはいけない)。 I<prot> には、 B<PROT_NONE> "
5093 "か、以下のフラグをひとつ以上ビット毎の論理和 (OR) をとったものを 指定できる。"
5094
5095 #. type: TP
5096 #: build/C/man2/mmap.2:97 build/C/man2/mprotect.2:73
5097 #, no-wrap
5098 msgid "B<PROT_EXEC>"
5099 msgstr "B<PROT_EXEC>"
5100
5101 #. type: Plain text
5102 #: build/C/man2/mmap.2:100
5103 msgid "Pages may be executed."
5104 msgstr "ページは実行可能である。"
5105
5106 #. type: TP
5107 #: build/C/man2/mmap.2:100 build/C/man2/mprotect.2:67
5108 #, no-wrap
5109 msgid "B<PROT_READ>"
5110 msgstr "B<PROT_READ>"
5111
5112 #. type: Plain text
5113 #: build/C/man2/mmap.2:103
5114 msgid "Pages may be read."
5115 msgstr "ページは読み込み可能である。"
5116
5117 #. type: TP
5118 #: build/C/man2/mmap.2:103 build/C/man2/mprotect.2:70
5119 #, no-wrap
5120 msgid "B<PROT_WRITE>"
5121 msgstr "B<PROT_WRITE>"
5122
5123 #. type: Plain text
5124 #: build/C/man2/mmap.2:106
5125 msgid "Pages may be written."
5126 msgstr "ページに書き込み可能である。"
5127
5128 #. type: TP
5129 #: build/C/man2/mmap.2:106 build/C/man2/mprotect.2:64
5130 #, no-wrap
5131 msgid "B<PROT_NONE>"
5132 msgstr "B<PROT_NONE>"
5133
5134 #. type: Plain text
5135 #: build/C/man2/mmap.2:109
5136 msgid "Pages may not be accessed."
5137 msgstr "ページにはアクセスできない。"
5138
5139 #. type: Plain text
5140 #: build/C/man2/mmap.2:118
5141 msgid ""
5142 "The I<flags> argument determines whether updates to the mapping are visible "
5143 "to other processes mapping the same region, and whether updates are carried "
5144 "through to the underlying file.  This behavior is determined by including "
5145 "exactly one of the following values in I<flags>:"
5146 msgstr ""
5147 "I<flags> 引き数により、マッピングに対する更新が同じ領域をマッピングしている "
5148 "他のプロセスに見えるか、更新がマッピング元のファイルを通じて 伝えられるか、が"
5149 "決定される。この動作は、以下の値のいずれか一つだけ (複数は指定できない) を "
5150 "I<flags> に含めることで指定する。"
5151
5152 #. type: TP
5153 #: build/C/man2/mmap.2:118
5154 #, no-wrap
5155 msgid "B<MAP_SHARED>"
5156 msgstr "B<MAP_SHARED>"
5157
5158 #. type: Plain text
5159 #: build/C/man2/mmap.2:128
5160 msgid ""
5161 "Share this mapping.  Updates to the mapping are visible to other processes "
5162 "that map this file, and are carried through to the underlying file.  The "
5163 "file may not actually be updated until B<msync>(2)  or B<munmap>()  is "
5164 "called."
5165 msgstr ""
5166 "このマッピングを共有する。 マッピングに対する更新はこのファイルをマッピングし"
5167 "ている他のプロセス から見える。更新はマッピング元のファイルを通じて伝えられ"
5168 "る。 ただし、ファイルの実際の更新は B<msync>(2)  または B<munmap>()  が呼ばれ"
5169 "るまで行われないこともある。"
5170
5171 #. type: TP
5172 #: build/C/man2/mmap.2:128
5173 #, no-wrap
5174 msgid "B<MAP_PRIVATE>"
5175 msgstr "B<MAP_PRIVATE>"
5176
5177 #. type: Plain text
5178 #: build/C/man2/mmap.2:137
5179 msgid ""
5180 "Create a private copy-on-write mapping.  Updates to the mapping are not "
5181 "visible to other processes mapping the same file, and are not carried "
5182 "through to the underlying file.  It is unspecified whether changes made to "
5183 "the file after the B<mmap>()  call are visible in the mapped region."
5184 msgstr ""
5185 "プライベートな copy-on-write (書き込み時コピー) マップを生成する。 マッピング"
5186 "に対する更新は同じファイルをマッピングしている他のプロセス には見えず、更新が"
5187 "マッピング元のファイルを通じて伝えられることもない。 B<mmap>()  の呼び出し後"
5188 "にマッピング元のファイルに対して行われた変更が、 マップ領域に反映されるかどう"
5189 "かは規定されていない。"
5190
5191 #. type: Plain text
5192 #: build/C/man2/mmap.2:139
5193 msgid "Both of these flags are described in POSIX.1-2001."
5194 msgstr "上記の二つのフラグは POSIX.1-2001 で規定されている。"
5195
5196 #. type: Plain text
5197 #: build/C/man2/mmap.2:142
5198 msgid ""
5199 "In addition, zero or more of the following values can be ORed in I<flags>:"
5200 msgstr ""
5201 "さらに、以下の値のうち 0 個以上をビット毎の論理和 (OR) で I<flags> に指定する"
5202 "ことができる。"
5203
5204 #. type: TP
5205 #: build/C/man2/mmap.2:142
5206 #, no-wrap
5207 msgid "B<MAP_32BIT> (since Linux 2.4.20, 2.6)"
5208 msgstr "B<MAP_32BIT> (Linux 2.4.20, 2.6 以降)"
5209
5210 #.  See http://lwn.net/Articles/294642 "Tangled up in threads", 19 Aug 08
5211 #. type: Plain text
5212 #: build/C/man2/mmap.2:158
5213 msgid ""
5214 "Put the mapping into the first 2 Gigabytes of the process address space.  "
5215 "This flag is supported only on x86-64, for 64-bit programs.  It was added to "
5216 "allow thread stacks to be allocated somewhere in the first 2GB of memory, so "
5217 "as to improve context-switch performance on some early 64-bit processors.  "
5218 "Modern x86-64 processors no longer have this performance problem, so use of "
5219 "this flag is not required on those systems.  The B<MAP_32BIT> flag is "
5220 "ignored when B<MAP_FIXED> is set."
5221 msgstr ""
5222 "マッピングをプロセスのアドレス空間の先頭 2 ギガバイト以内に配置する。 このフ"
5223 "ラグがサポートされているのは x86-64 アーキテクチャ上の 64 ビットプログラムの"
5224 "みである。 このフラグが追加されたのは、スレッドのスタックをメモリの先頭 2GB "
5225 "以内の どこかに割り当てることで、初期のいくつかの 64 ビットプロセッサにおけ"
5226 "る コンテキストスイッチの性能問題を改善するためである。 最近の x86-64 プロ"
5227 "セッサではこの性能問題はもはや存在せず、 そのようなシステムではこのフラグを使"
5228 "用する必要はない。 B<MAP_FIXED> がセットされている場合は、 B<MAP_32BIT> フラ"
5229 "グは無視される。"
5230
5231 #. type: TP
5232 #: build/C/man2/mmap.2:158
5233 #, no-wrap
5234 msgid "B<MAP_ANON>"
5235 msgstr "B<MAP_ANON>"
5236
5237 #. type: Plain text
5238 #: build/C/man2/mmap.2:163
5239 msgid "Synonym for B<MAP_ANONYMOUS>.  Deprecated."
5240 msgstr "B<MAP_ANONYMOUS> の同義語。非推奨。"
5241
5242 #. type: TP
5243 #: build/C/man2/mmap.2:163
5244 #, no-wrap
5245 msgid "B<MAP_ANONYMOUS>"
5246 msgstr "B<MAP_ANONYMOUS>"
5247
5248 #. type: Plain text
5249 #: build/C/man2/mmap.2:185
5250 msgid ""
5251 "The mapping is not backed by any file; its contents are initialized to "
5252 "zero.  The I<fd> and I<offset> arguments are ignored; however, some "
5253 "implementations require I<fd> to be -1 if B<MAP_ANONYMOUS> (or B<MAP_ANON>)  "
5254 "is specified, and portable applications should ensure this.  The use of "
5255 "B<MAP_ANONYMOUS> in conjunction with B<MAP_SHARED> is supported on Linux "
5256 "only since kernel 2.4."
5257 msgstr ""
5258 "マッピングはどのファイルとも関連付けされない。 マッピングの内容は 0 で初期化"
5259 "される。 引き数 I<fd> と I<offset> は無視される。 ただし、実装によっては "
5260 "B<MAP_ANONYMOUS> (もしくは B<MAP_ANON>)  が指定された場合、 I<fd> を -1 にす"
5261 "る必要があり、 移植性が必要なアプリケーションでは必ず I<fd> を -1 にすべきで"
5262 "ある。 B<MAP_ANONYMOUS> と B<MAP_SHARED> を組み合わせての利用は カーネル 2.4 "
5263 "以降の Linux でのみサポートされている。"
5264
5265 #. type: TP
5266 #: build/C/man2/mmap.2:185
5267 #, no-wrap
5268 msgid "B<MAP_DENYWRITE>"
5269 msgstr "B<MAP_DENYWRITE>"
5270
5271 #.  Introduced in 1.1.36, removed in 1.3.24.
5272 #. type: Plain text
5273 #: build/C/man2/mmap.2:193
5274 msgid ""
5275 "This flag is ignored.  (Long ago, it signaled that attempts to write to the "
5276 "underlying file should fail with B<ETXTBUSY>.  But this was a source of "
5277 "denial-of-service attacks.)"
5278 msgstr ""
5279 "このフラグは無視される (ずっと前は、マップ元のファイルへの書き込みを行おうと"
5280 "すると、エラー B<ETXTBUSY> で失敗するようにシグナルが設定されていたが、これ"
5281 "は denial-of-service (サービス拒否) 攻撃の原因となった)。"
5282
5283 #. type: TP
5284 #: build/C/man2/mmap.2:193
5285 #, no-wrap
5286 msgid "B<MAP_EXECUTABLE>"
5287 msgstr "B<MAP_EXECUTABLE>"
5288
5289 #.  Introduced in 1.1.38, removed in 1.3.24. Flag tested in proc_follow_link.
5290 #.  (Long ago, it signaled that the underlying file is an executable.
5291 #.  However, that information was not really used anywhere.)
5292 #.  Linus talked about DOS related to MAP_EXECUTABLE, but he was thinking of
5293 #.  MAP_DENYWRITE?
5294 #. type: Plain text
5295 #: build/C/man2/mmap.2:201
5296 msgid "This flag is ignored."
5297 msgstr "このフラグは無視される。"
5298
5299 #. type: TP
5300 #: build/C/man2/mmap.2:201
5301 #, no-wrap
5302 msgid "B<MAP_FILE>"
5303 msgstr "B<MAP_FILE>"
5304
5305 #.  On some systems, this was required as the opposite of
5306 #.  MAP_ANONYMOUS -- mtk, 1 May 2007
5307 #. type: Plain text
5308 #: build/C/man2/mmap.2:207
5309 msgid "Compatibility flag.  Ignored."
5310 msgstr "互換性のためのフラグ。無視される。"
5311
5312 #. type: TP
5313 #: build/C/man2/mmap.2:207
5314 #, no-wrap
5315 msgid "B<MAP_FIXED>"
5316 msgstr "B<MAP_FIXED>"
5317
5318 #. type: Plain text
5319 #: build/C/man2/mmap.2:225
5320 msgid ""
5321 "Don't interpret I<addr> as a hint: place the mapping at exactly that "
5322 "address.  I<addr> must be a multiple of the page size.  If the memory region "
5323 "specified by I<addr> and I<len> overlaps pages of any existing mapping(s), "
5324 "then the overlapped part of the existing mapping(s) will be discarded.  If "
5325 "the specified address cannot be used, B<mmap>()  will fail.  Because "
5326 "requiring a fixed address for a mapping is less portable, the use of this "
5327 "option is discouraged."
5328 msgstr ""
5329 "I<addr> をアドレスのヒントとして使用するのではなく、 I<addr> で指定されたアド"
5330 "レスをそのまま使用してマッピングを配置する。 I<addr> はページサイズの倍数でな"
5331 "ければならない。 I<addr> と I<len> で指定されたメモリ領域が既存のマッピングの"
5332 "ページと重なる場合、 既存のマッピングの重なった部分は捨てられる。 もし指定さ"
5333 "れたアドレスが使用できない場合、 B<mmap>()  は失敗する。 マッピングに対して固"
5334 "定アドレスを要求するのは移植性の面で劣るので、 このオプションは使用しないこと"
5335 "を推奨する。"
5336
5337 #. type: TP
5338 #: build/C/man2/mmap.2:225
5339 #, no-wrap
5340 msgid "B<MAP_GROWSDOWN>"
5341 msgstr "B<MAP_GROWSDOWN>"
5342
5343 #. type: Plain text
5344 #: build/C/man2/mmap.2:230
5345 msgid ""
5346 "Used for stacks.  Indicates to the kernel virtual memory system that the "
5347 "mapping should extend downward in memory."
5348 msgstr ""
5349 "スタック用に使用される。マッピングをメモリ内で逆向きに行うことを カーネル仮想"
5350 "メモリシステムに指示する。 (訳注:マッピングは通常はメモリ・アドレスが増加す"
5351 "る向きに行うが、 このオプションを指定すると逆向きにマッピングを行う)"
5352
5353 #. type: TP
5354 #: build/C/man2/mmap.2:230
5355 #, no-wrap
5356 msgid "B<MAP_HUGETLB> (since Linux 2.6.32)"
5357 msgstr "B<MAP_HUGETLB> (Linux 2.6.32 以降)"
5358
5359 #. type: Plain text
5360 #: build/C/man2/mmap.2:236
5361 msgid ""
5362 "Allocate the mapping using \"huge pages.\" See the Linux kernel source file "
5363 "I<Documentation/vm/hugetlbpage.txt> for further information."
5364 msgstr ""
5365 "\"huge page\" を使ってマッピングを割り当てる。詳しい情報は、Linux カーネル"
5366 "ソースの I<Documentation/vm/hugetlbpage.txt> を参照。"
5367
5368 #. type: TP
5369 #: build/C/man2/mmap.2:236
5370 #, no-wrap
5371 msgid "B<MAP_LOCKED> (since Linux 2.5.37)"
5372 msgstr "B<MAP_LOCKED> (Linux 2.5.37 以降)"
5373
5374 #.  If set, the mapped pages will not be swapped out.
5375 #. type: Plain text
5376 #: build/C/man2/mmap.2:242
5377 msgid ""
5378 "Lock the pages of the mapped region into memory in the manner of B<mlock>"
5379 "(2).  This flag is ignored in older kernels."
5380 msgstr ""
5381 "マップされた領域のページを B<mlock>(2)  の方法でメモリ内にロックする。 それ以"
5382 "前のカーネルでは、このフラグは無視される。"
5383
5384 #. type: TP
5385 #: build/C/man2/mmap.2:242
5386 #, no-wrap
5387 msgid "B<MAP_NONBLOCK> (since Linux 2.5.46)"
5388 msgstr "B<MAP_NONBLOCK> (Linux 2.5.46 以降)"
5389
5390 #. type: Plain text
5391 #: build/C/man2/mmap.2:257
5392 msgid ""
5393 "Only meaningful in conjunction with B<MAP_POPULATE>.  Don't perform read-"
5394 "ahead: create page tables entries only for pages that are already present in "
5395 "RAM.  Since Linux 2.6.23, this flag causes B<MAP_POPULATE> to do nothing.  "
5396 "One day the combination of B<MAP_POPULATE> and B<MAP_NONBLOCK> may be "
5397 "reimplemented."
5398 msgstr ""
5399 "B<MAP_POPULATE> と組み合わせた場合のみ意味を持つ。 read-ahead (前もって読み込"
5400 "むこと) を実行しない。 単に、すでに RAM 上に存在するページに対してのみページ"
5401 "テーブルエントリを作成する。 Linux 2.6.23 以降では、このフラグは "
5402 "B<MAP_POPULATE> に何の影響も与えない。 いつか B<MAP_POPULATE> と "
5403 "B<MAP_NONBLOCK> を組み合わせた場合の動作は実装し直されるかもしれない。"
5404
5405 #. type: TP
5406 #: build/C/man2/mmap.2:257
5407 #, no-wrap
5408 msgid "B<MAP_NORESERVE>"
5409 msgstr "B<MAP_NORESERVE>"
5410
5411 #. type: Plain text
5412 #: build/C/man2/mmap.2:272
5413 msgid ""
5414 "Do not reserve swap space for this mapping.  When swap space is reserved, "
5415 "one has the guarantee that it is possible to modify the mapping.  When swap "
5416 "space is not reserved one might get B<SIGSEGV> upon a write if no physical "
5417 "memory is available.  See also the discussion of the file I</proc/sys/vm/"
5418 "overcommit_memory> in B<proc>(5).  In kernels before 2.6, this flag had "
5419 "effect only for private writable mappings."
5420 msgstr ""
5421 "このマッピングに対するスワップ空間の予約を行わない。 スワップ空間を予約した場"
5422 "合は、このマッピングの変更が必ず可能なことが 保証される。予約を行わなかった場"
5423 "合、物理メモリに空きがないと 書き込み時に B<SIGSEGV> エラーを受け取ることがあ"
5424 "る。 B<proc>(5)  の I</proc/sys/vm/overcommit_memory> ファイルについての議論"
5425 "も参照。 バージョン 2.6 より前のカーネルでは、このフラグは書き込み可能な プラ"
5426 "イベート・マッピングについてのみ効果があった。"
5427
5428 #. type: TP
5429 #: build/C/man2/mmap.2:272
5430 #, no-wrap
5431 msgid "B<MAP_POPULATE> (since Linux 2.5.46)"
5432 msgstr "B<MAP_POPULATE> (Linux 2.5.46 以降)"
5433
5434 #. type: Plain text
5435 #: build/C/man2/mmap.2:279
5436 msgid ""
5437 "Populate (prefault) page tables for a mapping.  For a file mapping, this "
5438 "causes read-ahead on the file.  Later accesses to the mapping will not be "
5439 "blocked by page faults.  B<MAP_POPULATE> is supported for private mappings "
5440 "only since Linux 2.6.23."
5441 msgstr ""
5442 "マッピング用のページテーブルを配置 (populate) する ファイルマッピングの場合に"
5443 "は、これによりファイルが先読み (read-ahead)  が行われる。この以後は、マッピン"
5444 "グに対するアクセスがページフォールトで ブロックされることがなくなる。 Linux "
5445 "2.6.23 以降でのみプライベート・マッピングについて B<MAP_POPULATE> がサポート"
5446 "されている。"
5447
5448 #. type: TP
5449 #: build/C/man2/mmap.2:279
5450 #, no-wrap
5451 msgid "B<MAP_STACK> (since Linux 2.6.27)"
5452 msgstr "B<MAP_STACK> (Linux 2.6.27 以降)"
5453
5454 #.  See http://lwn.net/Articles/294642 "Tangled up in threads", 19 Aug 08
5455 #.  commit cd98a04a59e2f94fa64d5bf1e26498d27427d5e7
5456 #.  http://thread.gmane.org/gmane.linux.kernel/720412
5457 #.  "pthread_create() slow for many threads; also time to revisit 64b
5458 #.   context switch optimization?"
5459 #. type: Plain text
5460 #: build/C/man2/mmap.2:292
5461 msgid ""
5462 "Allocate the mapping at an address suitable for a process or thread stack.  "
5463 "This flag is currently a no-op, but is used in the glibc threading "
5464 "implementation so that if some architectures require special treatment for "
5465 "stack allocations, support can later be transparently implemented for glibc."
5466 msgstr ""
5467 "プロセスやスレッドのスタックに適したアドレスにマッピングを割り当てる。 現在の"
5468 "ところ、このフラグは何もしないが、 glibc のスレッド実装では使用されている。 "
5469 "これは、いくつかのアーキテクチャではスタックの割り当てに関して特別な扱い が必"
5470 "要な場合に、glibc にそのサポートを後で透過的に実装できるようにする ためであ"
5471 "る。"
5472
5473 #. type: TP
5474 #: build/C/man2/mmap.2:292
5475 #, no-wrap
5476 msgid "B<MAP_UNINITIALIZED> (since Linux 2.6.33)"
5477 msgstr "B<MAP_UNINITIALIZED> (Linux 2.6.33 以降)"
5478
5479 #. type: Plain text
5480 #: build/C/man2/mmap.2:302
5481 msgid ""
5482 "Don't clear anonymous pages.  This flag is intended to improve performance "
5483 "on embedded devices.  This flag is honored only if the kernel was configured "
5484 "with the B<CONFIG_MMAP_ALLOW_UNINITIALIZED> option.  Because of the security "
5485 "implications, that option is normally enabled only on embedded devices (i."
5486 "e., devices where one has complete control of the contents of user memory)."
5487 msgstr ""
5488 "無名ページ (anonymous page) のクリアを行わない。このフラグは組み込みデバイ"
5489 "ス\n"
5490 "での性能向上を目的に作られてものである。カーネルの設定で\n"
5491 "B<CONFIG_MMAP_ALLOW_UNINITIALIZED> オプションが有効になっている場合のみ、\n"
5492 "このフラグは効果を持つ。\n"
5493 "セキュリティ面の考慮から、このオプションは通常組み込みデバイス (すなわち、\n"
5494 "ユーザメモリの内容を完全に制御化におけるデバイス) においてのみ有効にされる。"
5495
5496 #. type: Plain text
5497 #: build/C/man2/mmap.2:310
5498 msgid ""
5499 "Of the above flags, only B<MAP_FIXED> is specified in POSIX.1-2001.  "
5500 "However, most systems also support B<MAP_ANONYMOUS> (or its synonym "
5501 "B<MAP_ANON>)."
5502 msgstr ""
5503 "上記のフラグの中では、 B<MAP_FIXED> だけが POSIX.1-2001 で規定されている。 し"
5504 "かしながら、ほとんどのシステムで B<MAP_ANONYMOUS> (またはその同義語である "
5505 "B<MAP_ANON>)  もサポートされている。"
5506
5507 #. type: Plain text
5508 #: build/C/man2/mmap.2:317
5509 msgid ""
5510 "Some systems document the additional flags B<MAP_AUTOGROW>, "
5511 "B<MAP_AUTORESRV>, B<MAP_COPY>, and B<MAP_LOCAL>."
5512 msgstr ""
5513 "いくつかのシステムでは、上記以外にフラグとして B<MAP_AUTOGROW>, "
5514 "B<MAP_AUTORESRV>, B<MAP_COPY>, B<MAP_LOCAL> が規定されている。"
5515
5516 #. type: Plain text
5517 #: build/C/man2/mmap.2:323
5518 msgid ""
5519 "Memory mapped by B<mmap>()  is preserved across B<fork>(2), with the same "
5520 "attributes."
5521 msgstr ""
5522 "B<mmap>()  によってマップされたメモリの属性は B<fork>(2)  の際に継承される。"
5523
5524 #. type: Plain text
5525 #: build/C/man2/mmap.2:331
5526 msgid ""
5527 "A file is mapped in multiples of the page size.  For a file that is not a "
5528 "multiple of the page size, the remaining memory is zeroed when mapped, and "
5529 "writes to that region are not written out to the file.  The effect of "
5530 "changing the size of the underlying file of a mapping on the pages that "
5531 "correspond to added or removed regions of the file is unspecified."
5532 msgstr ""
5533 "ファイルはページサイズの整数倍の領域にマップされる。サイズがページサイズの 整"
5534 "数倍でないファイルの場合、マップ時に残りの領域は 0 で埋められ、この領域へ 書"
5535 "きこみを行ってもファイルに書き出されることはない。マッピングを行った元 ファイ"
5536 "ルのサイズを変更した場合、元ファイルの追加されたり削除された領域に対応 する"
5537 "マップされたページに対してどのような影響があるかは規定されていない。"
5538
5539 #. type: SS
5540 #: build/C/man2/mmap.2:331
5541 #, no-wrap
5542 msgid "munmap()"
5543 msgstr "munmap()"
5544
5545 #. type: Plain text
5546 #: build/C/man2/mmap.2:341
5547 msgid ""
5548 "The B<munmap>()  system call deletes the mappings for the specified address "
5549 "range, and causes further references to addresses within the range to "
5550 "generate invalid memory references.  The region is also automatically "
5551 "unmapped when the process is terminated.  On the other hand, closing the "
5552 "file descriptor does not unmap the region."
5553 msgstr ""
5554 "システムコール B<munmap>()  は指定されたアドレス範囲のマップを消去し、 これ以"
5555 "降のその範囲内へのメモリ参照は不正となる。 この領域は、プロセスが終了したとき"
5556 "にも自動的にアンマップされる。 一方、ファイル記述子をクローズしても、この領域"
5557 "はアンマップされない。"
5558
5559 #. type: Plain text
5560 #: build/C/man2/mmap.2:351
5561 msgid ""
5562 "The address I<addr> must be a multiple of the page size.  All pages "
5563 "containing a part of the indicated range are unmapped, and subsequent "
5564 "references to these pages will generate B<SIGSEGV>.  It is not an error if "
5565 "the indicated range does not contain any mapped pages."
5566 msgstr ""
5567 "I<addr> アドレスはページサイズの整数倍でなければならない。指定された範囲の一"
5568 "部分を 含む全てのページはアンマップされ、これ以降にこれらのページへの参照があ"
5569 "ると B<SIGSEGV> が発生する。 指定した範囲内にマップされたページが一つも含まれ"
5570 "ていない場合でも エラーにならない。"
5571
5572 #. type: SS
5573 #: build/C/man2/mmap.2:351
5574 #, no-wrap
5575 msgid "Timestamps changes for file-backed mappings"
5576 msgstr "ファイルと関連付けられたマッピングに対するタイムスタンプの更新"
5577
5578 #. type: Plain text
5579 #: build/C/man2/mmap.2:358
5580 msgid ""
5581 "For file-backed mappings, the I<st_atime> field for the mapped file may be "
5582 "updated at any time between the B<mmap>()  and the corresponding unmapping; "
5583 "the first reference to a mapped page will update the field if it has not "
5584 "been already."
5585 msgstr ""
5586 "ファイルと関連付けられたマッピングの場合、マッピングされたファイルの "
5587 "I<st_atime> フィールドは、 B<mmap>()  されてからアンマップ (unmap) されるまで"
5588 "の間に更新されることがある。 それまでに更新が行われていなければ、マップされた"
5589 "ページへの最初の参照があった 際に更新される。"
5590
5591 #. type: Plain text
5592 #: build/C/man2/mmap.2:375
5593 msgid ""
5594 "The I<st_ctime> and I<st_mtime> field for a file mapped with B<PROT_WRITE> "
5595 "and B<MAP_SHARED> will be updated after a write to the mapped region, and "
5596 "before a subsequent B<msync>(2)  with the B<MS_SYNC> or B<MS_ASYNC> flag, if "
5597 "one occurs."
5598 msgstr ""
5599 "B<PROT_WRITE> と B<MAP_SHARED> の両方を指定してマップされたファイルの場合、書"
5600 "き込みがあると、 I<st_ctime> と I<st_mtime> の両フィールドは、マップされた領"
5601 "域への書き込みより後で、 B<MS_SYNC> または B<MS_ASYNC> フラグを指定して "
5602 "B<msync>(2)  が呼ばれる前までに更新される。"
5603
5604 #. type: Plain text
5605 #: build/C/man2/mmap.2:392
5606 msgid ""
5607 "On success, B<mmap>()  returns a pointer to the mapped area.  On error, the "
5608 "value B<MAP_FAILED> (that is, I<(void\\ *)\\ -1>)  is returned, and I<errno> "
5609 "is set appropriately.  On success, B<munmap>()  returns 0, on failure -1, "
5610 "and I<errno> is set (probably to B<EINVAL>)."
5611 msgstr ""
5612 "B<mmap>()  は成功するとマップされた領域へのポインタを返す。 失敗すると値 "
5613 "B<MAP_FAILED> (つまり I<(void\\ *)\\ -1>)  を返し、 I<errno> がエラーの内容に"
5614 "したがってセットされる。 B<munmap>()  は成功すると 0 を返す。失敗すると -1 を"
5615 "返し、 I<errno> がセットされる (多くの場合 B<EINVAL> になるだろう)。"
5616
5617 #. type: TP
5618 #: build/C/man2/mmap.2:393 build/C/man2/mprotect.2:86
5619 #: build/C/man3/shm_open.3:187 build/C/man3/shm_open.3:192
5620 #: build/C/man2/shmctl.2:306 build/C/man2/shmget.2:189
5621 #: build/C/man2/shmop.2:191
5622 #, no-wrap
5623 msgid "B<EACCES>"
5624 msgstr "B<EACCES>"
5625
5626 #. type: Plain text
5627 #: build/C/man2/mmap.2:411
5628 #, fuzzy
5629 #| msgid ""
5630 #| "A file descriptor refers to a non-regular file.  Or B<MAP_PRIVATE> was "
5631 #| "requested, but I<fd> is not open for reading.  Or B<MAP_SHARED> was "
5632 #| "requested and B<PROT_WRITE> is set, but I<fd> is not open in read/write "
5633 #| "(B<O_RDWR>)  mode.  Or B<PROT_WRITE> is set, but the file is append-only."
5634 msgid ""
5635 "A file descriptor refers to a non-regular file.  Or a file mapping was "
5636 "requested, but I<fd> is not open for reading.  Or B<MAP_SHARED> was "
5637 "requested and B<PROT_WRITE> is set, but I<fd> is not open in read/write "
5638 "(B<O_RDWR>)  mode.  Or B<PROT_WRITE> is set, but the file is append-only."
5639 msgstr ""
5640 "以下のいずれかの場合。 ファイル記述子の参照先が通常のファイルではない (non-"
5641 "regular file) 。 B<MAP_PRIVATE> を要求したが I<fd> は読み込み用にオープンされ"
5642 "ていない。 B<MAP_SHARED> を要求して B<PROT_WRITE> をセットしたが I<fd> は読み"
5643 "書きモード (B<O_RDWR>)  でオープンされていない、 B<PROT_WRITE> をセットした"
5644 "が、ファイルは追加 (append) 専用である。"
5645
5646 #. type: Plain text
5647 #: build/C/man2/mmap.2:415
5648 msgid ""
5649 "The file has been locked, or too much memory has been locked (see "
5650 "B<setrlimit>(2))."
5651 msgstr ""
5652 "ファイルがロックされている。またはロックされているメモリが多すぎる "
5653 "(B<setrlimit>(2)  を参照)。"
5654
5655 #. type: Plain text
5656 #: build/C/man2/mmap.2:421
5657 msgid ""
5658 "I<fd> is not a valid file descriptor (and B<MAP_ANONYMOUS> was not set)."
5659 msgstr ""
5660 "I<fd> が有効なファイル記述子 (file descriptor) ではない (かつ "
5661 "B<MAP_ANONYMOUS> がセットされていない)。"
5662
5663 #. type: Plain text
5664 #: build/C/man2/mmap.2:429
5665 msgid ""
5666 "We don't like I<addr>, I<length>, or I<offset> (e.g., they are too large, or "
5667 "not aligned on a page boundary)."
5668 msgstr ""
5669 "I<addr> か I<length> か I<offset> が適切でない (例えば、大きすぎるとか、ペー"
5670 "ジ境界にアラインメントされていない)。"
5671
5672 #. type: Plain text
5673 #: build/C/man2/mmap.2:434
5674 msgid "(since Linux 2.6.12)  I<length> was 0."
5675 msgstr "(Linux 2.6.12 以降)  I<length> が 0 であった。"
5676
5677 #. type: Plain text
5678 #: build/C/man2/mmap.2:442
5679 msgid ""
5680 "I<flags> contained neither B<MAP_PRIVATE> or B<MAP_SHARED>, or contained "
5681 "both of these values."
5682 msgstr ""
5683 "I<flags> に B<MAP_PRIVATE> と B<MAP_SHARED> のどちらも含まれていなかった、も"
5684 "しくは その両方が含まれていた。"
5685
5686 #. type: TP
5687 #: build/C/man2/mmap.2:442 build/C/man3/shm_open.3:229
5688 #: build/C/man2/shmget.2:205
5689 #, no-wrap
5690 msgid "B<ENFILE>"
5691 msgstr "B<ENFILE>"
5692
5693 #.  [2.6.7] shmem_zero_setup()-->shmem_file_setup()-->get_empty_filp()
5694 #. type: Plain text
5695 #: build/C/man2/mmap.2:450 build/C/man2/shmget.2:209
5696 msgid "The system limit on the total number of open files has been reached."
5697 msgstr "システム全体でオープンされているファイルの総数が上限に達した。"
5698
5699 #. type: Plain text
5700 #: build/C/man2/mmap.2:454
5701 msgid ""
5702 "The underlying filesystem of the specified file does not support memory "
5703 "mapping."
5704 msgstr ""
5705 "指定されたファイルが置かれているファイルシステムがメモリマッピングをサポート "
5706 "していない。"
5707
5708 #. type: Plain text
5709 #: build/C/man2/mmap.2:458
5710 msgid ""
5711 "No memory is available, or the process's maximum number of mappings would "
5712 "have been exceeded."
5713 msgstr ""
5714 "メモリに空きがない、または処理中のプロセスのマッピング数が最大数を超過した。"
5715
5716 #.  (Since 2.4.25 / 2.6.0.)
5717 #. type: Plain text
5718 #: build/C/man2/mmap.2:467
5719 msgid ""
5720 "The I<prot> argument asks for B<PROT_EXEC> but the mapped area belongs to a "
5721 "file on a filesystem that was mounted no-exec."
5722 msgstr ""
5723 "I<prot> 引き数は B<PROT_EXEC> を行うように指定されているが、 no-exec でマウン"
5724 "トされたファイルシステム上のファイルに マップ領域が対応している。"
5725
5726 #. type: TP
5727 #: build/C/man2/mmap.2:467
5728 #, no-wrap
5729 msgid "B<ETXTBSY>"
5730 msgstr "B<ETXTBSY>"
5731
5732 #. type: Plain text
5733 #: build/C/man2/mmap.2:473
5734 msgid ""
5735 "B<MAP_DENYWRITE> was set but the object specified by I<fd> is open for "
5736 "writing."
5737 msgstr ""
5738 "B<MAP_DENYWRITE> がセットされているが I<fd> で指定されているオブジェクトは書"
5739 "き込み用に開かれている。"
5740
5741 #. type: TP
5742 #: build/C/man2/mmap.2:473 build/C/man2/shmctl.2:348
5743 #, no-wrap
5744 msgid "B<EOVERFLOW>"
5745 msgstr "B<EOVERFLOW>"
5746
5747 #. type: Plain text
5748 #: build/C/man2/mmap.2:485
5749 msgid ""
5750 "On 32-bit architecture together with the large file extension (i.e., using "
5751 "64-bit I<off_t>): the number of pages used for I<length> plus number of "
5752 "pages used for I<offset> would overflow I<unsigned long> (32 bits)."
5753 msgstr ""
5754 "32 ビットアーキテクチャで large file 拡張を使っている場合 (つまり 64 ビット"
5755 "の I<off_t> を使う場合)、 I<length> で使うページ数と I<offset> で使うページ数"
5756 "を足した値は I<unsigned long> (32 ビット) を超えてしまう (オーバーフローして"
5757 "しまう) 場合がある。"
5758
5759 #. type: Plain text
5760 #: build/C/man2/mmap.2:487
5761 msgid "Use of a mapped region can result in these signals:"
5762 msgstr "マップ領域を利用する際に、以下のシグナルが発生することがある:"
5763
5764 #. type: TP
5765 #: build/C/man2/mmap.2:487
5766 #, no-wrap
5767 msgid "B<SIGSEGV>"
5768 msgstr "B<SIGSEGV>"
5769
5770 #. type: Plain text
5771 #: build/C/man2/mmap.2:490
5772 msgid "Attempted write into a region mapped as read-only."
5773 msgstr "読み込み専用で mmap された領域へ書き込みを行おうとした。"
5774
5775 #. type: TP
5776 #: build/C/man2/mmap.2:490
5777 #, no-wrap
5778 msgid "B<SIGBUS>"
5779 msgstr "B<SIGBUS>"
5780
5781 #. type: Plain text
5782 #: build/C/man2/mmap.2:495
5783 msgid ""
5784 "Attempted access to a portion of the buffer that does not correspond to the "
5785 "file (for example, beyond the end of the file, including the case where "
5786 "another process has truncated the file)."
5787 msgstr ""
5788 "バッファのうち、ファイルに関連づけられていない部分 (例えばファイル末尾を越え"
5789 "た部分など。これには 他のプロセスがファイルを切り詰めた場合なども含まれる)  "
5790 "にアクセスしようとした。"
5791
5792 #.  SVr4 documents additional error codes ENXIO and ENODEV.
5793 #.  SUSv2 documents additional error codes EMFILE and EOVERFLOW.
5794 #. type: Plain text
5795 #: build/C/man2/mmap.2:499
5796 msgid "SVr4, 4.4BSD, POSIX.1-2001."
5797 msgstr "SVr4, 4.4BSD, POSIX.1-2001."
5798
5799 #.  POSIX.1-2001: It shall be defined to -1 or 0 or 200112L.
5800 #.  -1: unavailable, 0: ask using sysconf().
5801 #.  glibc defines it to 1.
5802 #. type: Plain text
5803 #: build/C/man2/mmap.2:513
5804 msgid ""
5805 "On POSIX systems on which B<mmap>(), B<msync>(2)  and B<munmap>()  are "
5806 "available, B<_POSIX_MAPPED_FILES> is defined in I<E<lt>unistd.hE<gt>> to a "
5807 "value greater than 0.  (See also B<sysconf>(3).)"
5808 msgstr ""
5809 "B<mmap>(), B<msync>(2)  B<munmap>()  が利用可能な POSIX システムでは、 "
5810 "B<_POSIX_MAPPED_FILES> は E<lt>unistd.hE<gt> で 0 より大きな値に定義される "
5811 "(B<sysconf>(3)  も参照のこと)。"
5812
5813 #.  Since around glibc 2.1/2.2, depending on the platform.
5814 #. type: Plain text
5815 #: build/C/man2/mmap.2:528
5816 msgid ""
5817 "This page describes the interface provided by the glibc B<mmap>()  wrapper "
5818 "function.  Originally, this function invoked a system call of the same "
5819 "name.  Since kernel 2.4, that system call has been superseded by B<mmap2>"
5820 "(2), and nowadays the glibc B<mmap>()  wrapper function invokes B<mmap2>(2)  "
5821 "with a suitably adjusted value for I<offset>."
5822 msgstr ""
5823 "このページでは glibc の B<mmap>() のラッパー関数が提供するインターフェース"
5824 "に\n"
5825 "ついて説明している。元々は、この関数は同じ名前のシステムコールを起動してい"
5826 "た。\n"
5827 "カーネル 2.4 以降、このシステムコールは B<mmap2>(2) に取って代わられ、現在\n"
5828 "では、 glibc の B<mmap>() のラッパー関数は I<offset> を適切に調整してから\n"
5829 "B<mmap2>(2) を起動する。"
5830
5831 #. type: Plain text
5832 #: build/C/man2/mmap.2:541
5833 msgid ""
5834 "On some hardware architectures (e.g., i386), B<PROT_WRITE> implies "
5835 "B<PROT_READ>.  It is architecture dependent whether B<PROT_READ> implies "
5836 "B<PROT_EXEC> or not.  Portable programs should always set B<PROT_EXEC> if "
5837 "they intend to execute code in the new mapping."
5838 msgstr ""
5839 "(i386 などの) いくつかのアーキテクチャでは、 B<PROT_WRITE> をセットすると、暗"
5840 "黙のうちに B<PROT_READ> がセットされる。 B<PROT_READ> をセットした際に暗黙の"
5841 "うちに B<PROT_EXEC> がセットされるかどうかは、アーキテクチャ依存である。 移植"
5842 "性を考慮したプログラムでは、 新規にマップした領域でコードを実行したい場合は、"
5843 "常に B<PROT_EXEC> をセットすべきである。"
5844
5845 #. type: Plain text
5846 #: build/C/man2/mmap.2:556
5847 msgid ""
5848 "The portable way to create a mapping is to specify I<addr> as 0 (NULL), and "
5849 "omit B<MAP_FIXED> from I<flags>.  In this case, the system chooses the "
5850 "address for the mapping; the address is chosen so as not to conflict with "
5851 "any existing mapping, and will not be 0.  If the B<MAP_FIXED> flag is "
5852 "specified, and I<addr> is 0 (NULL), then the mapped address will be 0 (NULL)."
5853 msgstr ""
5854 "マッピングを作成する移植性のある方法は、 I<addr> に 0 (NULL) を指定し、 "
5855 "I<flags> から B<MAP_FIXED> を外すことである。 この場合、システムがマッピング"
5856 "用のアドレスの選択を行う。 アドレスは既存のマッピングと衝突しないように、 か"
5857 "つ 0 にならないように選択される。 B<MAP_FIXED> フラグが指定され、かつ "
5858 "I<addr> が 0 (NULL)  の場合には、マップされるアドレスが 0 (NULL) になる。"
5859
5860 #. type: Plain text
5861 #: build/C/man2/mmap.2:585
5862 msgid ""
5863 "Certain I<flags> constants are defined only if either B<_BSD_SOURCE> or "
5864 "B<_SVID_SOURCE> is defined.  (Requiring B<_GNU_SOURCE> also suffices, and "
5865 "requiring that macro specifically would have been more logical, since these "
5866 "flags are all Linux-specific.)  The relevant flags are: B<MAP_32BIT>, "
5867 "B<MAP_ANONYMOUS> (and the synonym B<MAP_ANON>), B<MAP_DENYWRITE>, "
5868 "B<MAP_EXECUTABLE>, B<MAP_FILE>, B<MAP_GROWSDOWN>, B<MAP_HUGETLB>, "
5869 "B<MAP_LOCKED>, B<MAP_NONBLOCK>, B<MAP_NORESERVE>, B<MAP_POPULATE>, and "
5870 "B<MAP_STACK>."
5871 msgstr ""
5872 "特定の I<flags> 定数は B<_BSD_SOURCE> か B<_SVID_SOURCE> のいずれかが定義され"
5873 "た場合にのみ定義される。 (B<_GNU_SOURCE> も定義されている必要がある。これらの"
5874 "フラグはすべて Linux 固有のものなので、 特に B<_GNU_SOURCE> を必要とする点は"
5875 "もっと論理的に決められるべきであった。) 関係するフラグは B<MAP_32BIT>, "
5876 "B<MAP_ANONYMOUS> (とその同義語の B<MAP_ANON>), B<MAP_DENYWRITE>, "
5877 "B<MAP_EXECUTABLE>, B<MAP_FILE>, B<MAP_GROWSDOWN>, B<MAP_HUGETLB>, "
5878 "B<MAP_LOCKED>, B<MAP_NONBLOCK>, B<MAP_NORESERVE>, B<MAP_POPULATE>, "
5879 "B<MAP_STACK> である。"
5880
5881 #. type: Plain text
5882 #: build/C/man2/mmap.2:590
5883 msgid ""
5884 "On Linux there are no guarantees like those suggested above under "
5885 "B<MAP_NORESERVE>.  By default, any process can be killed at any moment when "
5886 "the system runs out of memory."
5887 msgstr ""
5888 "Linux においては、上記の B<MAP_NORESERVE> で述べられているような保証はない。 "
5889 "デフォルトでは、システムがメモリを使い切った場合には、 どのプロセスがいつ強制"
5890 "終了されるか分からないからである。"
5891
5892 #. type: Plain text
5893 #: build/C/man2/mmap.2:597
5894 msgid ""
5895 "In kernels before 2.6.7, the B<MAP_POPULATE> flag has effect only if I<prot> "
5896 "is specified as B<PROT_NONE>."
5897 msgstr ""
5898 "2.6.7 より前のカーネルでは、 I<prot> に B<PROT_NONE> が指定された場合にの"
5899 "み、 B<MAP_POPULATE> フラグが効力を持つ。"
5900
5901 #. type: Plain text
5902 #: build/C/man2/mmap.2:612
5903 msgid ""
5904 "SUSv3 specifies that B<mmap>()  should fail if I<length> is 0.  However, in "
5905 "kernels before 2.6.12, B<mmap>()  succeeded in this case: no mapping was "
5906 "created and the call returned I<addr>.  Since kernel 2.6.12, B<mmap>()  "
5907 "fails with the error B<EINVAL> for this case."
5908 msgstr ""
5909 "SUSv3 では、 I<length> が 0 の場合、 B<mmap>()  は失敗すると規定されている。"
5910 "しかしながら、2.6.12 より前のカーネルでは、 この場合に B<mmap>()  は成功して"
5911 "いた (マッピングは作成されず、 I<addr> が返されていた)。 カーネル 2.6.12 以降"
5912 "では、 B<mmap>()  はエラー B<EINVAL> で失敗する。"
5913
5914 #. type: Plain text
5915 #: build/C/man2/mmap.2:628
5916 msgid ""
5917 "POSIX specifies that the system shall always zero fill any partial page at "
5918 "the end of the object and that system will never write any modification of "
5919 "the object beyond its end.  On Linux, when you write data to such partial "
5920 "page after the end of the object, the data stays in the page cache even "
5921 "after the file is closed and unmapped and even though the data is never "
5922 "written to the file itself, subsequent mappings may see the modified "
5923 "content.  In some cases, this could be fixed by calling B<msync>(2)  before "
5924 "the unmap takes place; however, this doesn't work on tmpfs (for example, "
5925 "when using POSIX shared memory interface documented in B<shm_overview>(7))."
5926 msgstr ""
5927 "POSIX では、 システムはオブジェクト末尾の部分ページを常に 0 で埋め、 末尾より"
5928 "後ろのオブジェクトを決して変更してはならない、と規定している。 Linux では、 "
5929 "オブジェクト末尾より後ろの部分ページにデータを書き込んだ場合、 そのファイルを"
5930 "クローズしてアンマップした後であってもページキャッシュにデータが残り続け、 "
5931 "データがファイル自体に書き込まれていなくても、 それ以降のマッピングで変更され"
5932 "た内容が見える可能性がある。 いくつかの場合では、 アンマップを行う前に "
5933 "B<msync>(2) を呼び出すことで、 この状況を修正することができる。 しかし、 これ"
5934 "は tmpfs では機能しない (例えば、 B<shm_overview>(7) で説明されている POSIX "
5935 "共有メモリインターフェースを使った場合)。"
5936
5937 #. type: Plain text
5938 #: build/C/man2/mmap.2:640
5939 msgid ""
5940 "The following program prints part of the file specified in its first command-"
5941 "line argument to standard output.  The range of bytes to be printed is "
5942 "specified via offset and length values in the second and third command-line "
5943 "arguments.  The program creates a memory mapping of the required pages of "
5944 "the file and then uses B<write>(2)  to output the desired bytes."
5945 msgstr ""
5946 "以下のプログラムは、一番目のコマンドライン引き数で指定された ファイルの一部を"
5947 "標準出力に表示する。 表示する範囲は、二番目、三番目のコマンドライン引き数で渡"
5948 "される オフセットと長さで指定される。 このプログラムは、指定されたファイルの"
5949 "必要なページのメモリ・ マッピングを作成し、 B<write>(2)  を使って所望のバイト"
5950 "を出力する。"
5951
5952 #. type: Plain text
5953 #: build/C/man2/mmap.2:648
5954 #, no-wrap
5955 msgid ""
5956 "#include E<lt>sys/mman.hE<gt>\n"
5957 "#include E<lt>sys/stat.hE<gt>\n"
5958 "#include E<lt>fcntl.hE<gt>\n"
5959 "#include E<lt>stdio.hE<gt>\n"
5960 "#include E<lt>stdlib.hE<gt>\n"
5961 "#include E<lt>unistd.hE<gt>\n"
5962 msgstr ""
5963 "#include E<lt>sys/mman.hE<gt>\n"
5964 "#include E<lt>sys/stat.hE<gt>\n"
5965 "#include E<lt>fcntl.hE<gt>\n"
5966 "#include E<lt>stdio.hE<gt>\n"
5967 "#include E<lt>stdlib.hE<gt>\n"
5968 "#include E<lt>unistd.hE<gt>\n"
5969
5970 #. type: Plain text
5971 #: build/C/man2/mmap.2:651 build/C/man2/mprotect.2:178
5972 #, no-wrap
5973 msgid ""
5974 "#define handle_error(msg) \\e\n"
5975 "    do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
5976 msgstr ""
5977 "#define handle_error(msg) \\e\n"
5978 "    do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
5979
5980 #. type: Plain text
5981 #: build/C/man2/mmap.2:661
5982 #, no-wrap
5983 msgid ""
5984 "int\n"
5985 "main(int argc, char *argv[])\n"
5986 "{\n"
5987 "    char *addr;\n"
5988 "    int fd;\n"
5989 "    struct stat sb;\n"
5990 "    off_t offset, pa_offset;\n"
5991 "    size_t length;\n"
5992 "    ssize_t s;\n"
5993 msgstr ""
5994 "int\n"
5995 "main(int argc, char *argv[])\n"
5996 "{\n"
5997 "    char *addr;\n"
5998 "    int fd;\n"
5999 "    struct stat sb;\n"
6000 "    off_t offset, pa_offset;\n"
6001 "    size_t length;\n"
6002 "    ssize_t s;\n"
6003
6004 #. type: Plain text
6005 #: build/C/man2/mmap.2:666
6006 #, no-wrap
6007 msgid ""
6008 "    if (argc E<lt> 3 || argc E<gt> 4) {\n"
6009 "        fprintf(stderr, \"%s file offset [length]\\en\", argv[0]);\n"
6010 "        exit(EXIT_FAILURE);\n"
6011 "    }\n"
6012 msgstr ""
6013 "    if (argc E<lt> 3 || argc E<gt> 4) {\n"
6014 "        fprintf(stderr, \"%s file offset [length]\\en\", argv[0]);\n"
6015 "        exit(EXIT_FAILURE);\n"
6016 "    }\n"
6017
6018 #. type: Plain text
6019 #: build/C/man2/mmap.2:670
6020 #, no-wrap
6021 msgid ""
6022 "    fd = open(argv[1], O_RDONLY);\n"
6023 "    if (fd == -1)\n"
6024 "        handle_error(\"open\");\n"
6025 msgstr ""
6026 "    fd = open(argv[1], O_RDONLY);\n"
6027 "    if (fd == -1)\n"
6028 "        handle_error(\"open\");\n"
6029
6030 #. type: Plain text
6031 #: build/C/man2/mmap.2:673
6032 #, no-wrap
6033 msgid ""
6034 "    if (fstat(fd, &sb) == -1)           /* To obtain file size */\n"
6035 "        handle_error(\"fstat\");\n"
6036 msgstr ""
6037 "    if (fstat(fd, &sb) == -1)           /* To obtain file size */\n"
6038 "        handle_error(\"fstat\");\n"
6039
6040 #. type: Plain text
6041 #: build/C/man2/mmap.2:677
6042 #, no-wrap
6043 msgid ""
6044 "    offset = atoi(argv[2]);\n"
6045 "    pa_offset = offset & ~(sysconf(_SC_PAGE_SIZE) - 1);\n"
6046 "        /* offset for mmap() must be page aligned */\n"
6047 msgstr ""
6048 "    offset = atoi(argv[2]);\n"
6049 "    pa_offset = offset & ~(sysconf(_SC_PAGE_SIZE) - 1);\n"
6050 "        /* offset for mmap() must be page aligned */\n"
6051
6052 #. type: Plain text
6053 #: build/C/man2/mmap.2:682
6054 #, no-wrap
6055 msgid ""
6056 "    if (offset E<gt>= sb.st_size) {\n"
6057 "        fprintf(stderr, \"offset is past end of file\\en\");\n"
6058 "        exit(EXIT_FAILURE);\n"
6059 "    }\n"
6060 msgstr ""
6061 "    if (offset E<gt>= sb.st_size) {\n"
6062 "        fprintf(stderr, \"offset is past end of file\\en\");\n"
6063 "        exit(EXIT_FAILURE);\n"
6064 "    }\n"
6065
6066 #. type: Plain text
6067 #: build/C/man2/mmap.2:688
6068 #, no-wrap
6069 msgid ""
6070 "    if (argc == 4) {\n"
6071 "        length = atoi(argv[3]);\n"
6072 "        if (offset + length E<gt> sb.st_size)\n"
6073 "            length = sb.st_size - offset;\n"
6074 "                /* Can\\(aqt display bytes past end of file */\n"
6075 msgstr ""
6076 "    if (argc == 4) {\n"
6077 "        length = atoi(argv[3]);\n"
6078 "        if (offset + length E<gt> sb.st_size)\n"
6079 "            length = sb.st_size - offset;\n"
6080 "                /* Can\\(aqt display bytes past end of file */\n"
6081
6082 #. type: Plain text
6083 #: build/C/man2/mmap.2:692
6084 #, no-wrap
6085 msgid ""
6086 "    } else {    /* No length arg ==E<gt> display to end of file */\n"
6087 "        length = sb.st_size - offset;\n"
6088 "    }\n"
6089 msgstr ""
6090 "    } else {    /* No length arg ==E<gt> display to end of file */\n"
6091 "        length = sb.st_size - offset;\n"
6092 "    }\n"
6093
6094 #. type: Plain text
6095 #: build/C/man2/mmap.2:697
6096 #, no-wrap
6097 msgid ""
6098 "    addr = mmap(NULL, length + offset - pa_offset, PROT_READ,\n"
6099 "                MAP_PRIVATE, fd, pa_offset);\n"
6100 "    if (addr == MAP_FAILED)\n"
6101 "        handle_error(\"mmap\");\n"
6102 msgstr ""
6103 "    addr = mmap(NULL, length + offset - pa_offset, PROT_READ,\n"
6104 "                MAP_PRIVATE, fd, pa_offset);\n"
6105 "    if (addr == MAP_FAILED)\n"
6106 "        handle_error(\"mmap\");\n"
6107
6108 #. type: Plain text
6109 #: build/C/man2/mmap.2:702
6110 #, no-wrap
6111 msgid ""
6112 "    s = write(STDOUT_FILENO, addr + offset - pa_offset, length);\n"
6113 "    if (s != length) {\n"
6114 "        if (s == -1)\n"
6115 "            handle_error(\"write\");\n"
6116 msgstr ""
6117 "    s = write(STDOUT_FILENO, addr + offset - pa_offset, length);\n"
6118 "    if (s != length) {\n"
6119 "        if (s == -1)\n"
6120 "            handle_error(\"write\");\n"
6121
6122 #. type: Plain text
6123 #: build/C/man2/mmap.2:706
6124 #, no-wrap
6125 msgid ""
6126 "        fprintf(stderr, \"partial write\");\n"
6127 "        exit(EXIT_FAILURE);\n"
6128 "    }\n"
6129 msgstr ""
6130 "        fprintf(stderr, \"partial write\");\n"
6131 "        exit(EXIT_FAILURE);\n"
6132 "    }\n"
6133
6134 #. type: Plain text
6135 #: build/C/man2/mmap.2:723
6136 msgid ""
6137 "B<getpagesize>(2), B<mincore>(2), B<mlock>(2), B<mmap2>(2), B<mprotect>(2), "
6138 "B<mremap>(2), B<msync>(2), B<remap_file_pages>(2), B<setrlimit>(2), B<shmat>"
6139 "(2), B<shm_open>(3), B<shm_overview>(7)"
6140 msgstr ""
6141 "B<getpagesize>(2), B<mincore>(2), B<mlock>(2), B<mmap2>(2), B<mprotect>(2), "
6142 "B<mremap>(2), B<msync>(2), B<remap_file_pages>(2), B<setrlimit>(2), B<shmat>"
6143 "(2), B<shm_open>(3), B<shm_overview>(7)"
6144
6145 #. type: Plain text
6146 #: build/C/man2/mmap.2:730
6147 msgid ""
6148 "The descriptions of the following files in B<proc>(5): I</proc/[pid]/maps>, "
6149 "I</proc/[pid]/map_files>, and I</proc/[pid]/smaps>."
6150 msgstr ""
6151 "B<proc>(5) の I</proc/[pid]/maps>, I</proc/[pid]/map_files>, I</proc/[pid]/"
6152 "smaps> の説明。"
6153
6154 #. type: Plain text
6155 #: build/C/man2/mmap.2:735 build/C/man2/msync.2:124
6156 msgid "B.O. Gallmeister, POSIX.4, O'Reilly, pp. 128-129 and 389-391."
6157 msgstr "B.O. Gallmeister, POSIX.4, O'Reilly, pp. 128-129 and 389-391."
6158
6159 #. type: TH
6160 #: build/C/man2/mmap2.2:29
6161 #, no-wrap
6162 msgid "MMAP2"
6163 msgstr "MMAP2"
6164
6165 #. type: TH
6166 #: build/C/man2/mmap2.2:29
6167 #, no-wrap
6168 msgid "2014-02-25"
6169 msgstr "2014-02-25"
6170
6171 #. type: Plain text
6172 #: build/C/man2/mmap2.2:32
6173 msgid "mmap2 - map files or devices into memory"
6174 msgstr "mmap2 - ファイルやデバイスをメモリにマップする"
6175
6176 #. type: Plain text
6177 #: build/C/man2/mmap2.2:38
6178 #, no-wrap
6179 msgid ""
6180 "B<void *mmap2(void *>I<addr>B<, size_t >I<length>B<, int >I<prot>B<,>\n"
6181 "B<             int >I<flags>B<, int >I<fd>B<, off_t >I<pgoffset>B<);>\n"
6182 msgstr ""
6183 "B<void *mmap2(void *>I<addr>B<, size_t >I<length>B<, int >I<prot>B<,>\n"
6184 "B<            int >I<flags>B<, int >I<fd>B<, off_t >I<pgoffset>B<);>\n"
6185
6186 #. type: Plain text
6187 #: build/C/man2/mmap2.2:43
6188 msgid ""
6189 "This is probably not the system call that you are interested in; instead, "
6190 "see B<mmap>(2), which describes the glibc wrapper function that invokes this "
6191 "system call."
6192 msgstr ""
6193 "これはおそらくあなたが興味のあるシステムコールではないだろう。代わりに\n"
6194 "B<mmap>(2) を見るとよい。そのページにはこのシステムコールを起動する glibc "
6195 "の\n"
6196 "ラッパー関数についての説明がある。"
6197
6198 #. type: Plain text
6199 #: build/C/man2/mmap2.2:54
6200 msgid ""
6201 "The B<mmap2>()  system call provides the same interface as B<mmap>(2), "
6202 "except that the final argument specifies the offset into the file in 4096-"
6203 "byte units (instead of bytes, as is done by B<mmap>(2)).  This enables "
6204 "applications that use a 32-bit I<off_t> to map large files (up to 2^44 "
6205 "bytes)."
6206 msgstr ""
6207 "B<mmap2>() システムコールは B<mmap>(2) と同じインターフェースを提供する。た"
6208 "だ\n"
6209 "し、最後の引き数には、ファイルのオフセットを (B<mmap>(2) が行っている、バイ"
6210 "ト\n"
6211 "単位ではなく) 4096 バイトを単位として指定する。 これにより、32 ビットの\n"
6212 "I<off_t> を使うアプリケーションで (2^44 バイトまでの) 大きなファイルをマッ"
6213 "プ\n"
6214 "できるようになる。"
6215
6216 #. type: Plain text
6217 #: build/C/man2/mmap2.2:61
6218 msgid ""
6219 "On success, B<mmap2>()  returns a pointer to the mapped area.  On error, -1 "
6220 "is returned and I<errno> is set appropriately."
6221 msgstr ""
6222 "成功した場合、 B<mmap2>()  はマップされた領域へのポインタを返す。 エラーの場"
6223 "合は -1 が返されて、 I<errno> が適切に設定される。"
6224
6225 #. type: Plain text
6226 #: build/C/man2/mmap2.2:65
6227 msgid "Problem with getting the data from user space."
6228 msgstr "ユーザ空間からデータを取得するときに問題があった。"
6229
6230 #. type: Plain text
6231 #: build/C/man2/mmap2.2:70
6232 msgid ""
6233 "(Various platforms where the page size is not 4096 bytes.)  I<offset\\ *\\ "
6234 "4096> is not a multiple of the system page size."
6235 msgstr ""
6236 "(ページサイズが 4096 バイトでないプラットフォームにおいて)  I<offset\\ *\\ "
6237 "4096> がシステムのページサイズの倍数ではない。"
6238
6239 #. type: Plain text
6240 #: build/C/man2/mmap2.2:74
6241 msgid "B<mmap2>()  can also return any of the errors described in B<mmap>(2)."
6242 msgstr "B<mmap2>() は B<mmap>(2) に載っているエラーを返すこともある。"
6243
6244 #. type: Plain text
6245 #: build/C/man2/mmap2.2:77
6246 msgid "B<mmap2>()  is available since Linux 2.3.31."
6247 msgstr "B<mmap2>()  は、Linux 2.3.31 以降で使用可能である。"
6248
6249 #. type: Plain text
6250 #: build/C/man2/mmap2.2:79 build/C/man2/subpage_prot.2:98
6251 msgid "This system call is Linux-specific."
6252 msgstr "このシステムコールは Linux 独自である。"
6253
6254 #. type: Plain text
6255 #: build/C/man2/mmap2.2:86
6256 msgid ""
6257 "On architectures where this system call is present, the glibc B<mmap>()  "
6258 "wrapper function invokes this system call rather than the B<mmap>(2)  system "
6259 "call."
6260 msgstr ""
6261 "このシステムコールが存在するアーキテクチャーでは、glibc の B<mmap>()  のラッ"
6262 "パー関数は、 B<mmap>(2)  システムコールではなく、このシステムコール (B<mmap2>"
6263 "(2))  を起動する。"
6264
6265 #. type: Plain text
6266 #: build/C/man2/mmap2.2:88
6267 msgid "This system call does not exist on x86-64."
6268 msgstr "このシステムコールは x86-64 には存在しない。"
6269
6270 #.  ia64 can have page sizes ranging from 4kB to 64kB.
6271 #.  On cris, it looks like the unit might also be the page size,
6272 #.  which is 8192 bytes. -- mtk, June 2007
6273 #. type: Plain text
6274 #: build/C/man2/mmap2.2:95
6275 msgid ""
6276 "On ia64, the unit for I<offset> is actually the system page size, rather "
6277 "than 4096 bytes."
6278 msgstr ""
6279 "ia64 では、 I<offset> の単位は、実際にはシステムのページサイズであり、 4096 "
6280 "バイトではない。"
6281
6282 #. type: Plain text
6283 #: build/C/man2/mmap2.2:101
6284 msgid ""
6285 "B<getpagesize>(2), B<mmap>(2), B<mremap>(2), B<msync>(2), B<shm_open>(3)"
6286 msgstr ""
6287 "B<getpagesize>(2), B<mmap>(2), B<mremap>(2), B<msync>(2), B<shm_open>(3)"
6288
6289 #. type: TH
6290 #: build/C/man2/mprotect.2:38
6291 #, no-wrap
6292 msgid "MPROTECT"
6293 msgstr "MPROTECT"
6294
6295 #. type: TH
6296 #: build/C/man2/mprotect.2:38
6297 #, no-wrap
6298 msgid "2014-01-05"
6299 msgstr "2014-01-05"
6300
6301 #. type: Plain text
6302 #: build/C/man2/mprotect.2:41
6303 msgid "mprotect - set protection on a region of memory"
6304 msgstr "mprotect - メモリ領域の保護を設定する"
6305
6306 #. type: Plain text
6307 #: build/C/man2/mprotect.2:46
6308 #, no-wrap
6309 msgid "B<int mprotect(void *>I<addr>B<, size_t >I<len>B<, int >I<prot>B<);>\n"
6310 msgstr "B<int mprotect(void *>I<addr>B<, size_t >I<len>B<, int >I<prot>B<);>\n"
6311
6312 #. type: Plain text
6313 #: build/C/man2/mprotect.2:54
6314 msgid ""
6315 "B<mprotect>()  changes protection for the calling process's memory page(s)  "
6316 "containing any part of the address range in the interval [I<addr>,\\ I<addr>"
6317 "+I<len>-1].  I<addr> must be aligned to a page boundary."
6318 msgstr ""
6319 "B<mprotect>()  は、区間 [I<addr>,\\ I<addr>+I<len>-1] のアドレス範囲を含む 呼"
6320 "び出し元のプロセスのメモリページのアクセス保護を変更する。 I<addr> はページ境"
6321 "界に一致していなければならない。"
6322
6323 #. type: Plain text
6324 #: build/C/man2/mprotect.2:59
6325 msgid ""
6326 "If the calling process tries to access memory in a manner that violates the "
6327 "protection, then the kernel generates a B<SIGSEGV> signal for the process."
6328 msgstr ""
6329 "呼び出し元のプロセスがアクセス保護に違反するようなメモリアクセスを 行おうとす"
6330 "ると、カーネルはシグナル B<SIGSEGV> をそのプロセスに対して生成する。"
6331
6332 #. type: Plain text
6333 #: build/C/man2/mprotect.2:64
6334 msgid ""
6335 "I<prot> is either B<PROT_NONE> or a bitwise-or of the other values in the "
6336 "following list:"
6337 msgstr ""
6338 "I<prot> には、 B<PROT_NONE> か、以下のリストの B<PROT_NONE> 以外の値をビット"
6339 "毎の論理和 (bitwize-or) で指定する:"
6340
6341 #. type: Plain text
6342 #: build/C/man2/mprotect.2:67
6343 msgid "The memory cannot be accessed at all."
6344 msgstr "そのメモリには全くアクセスできない。"
6345
6346 #. type: Plain text
6347 #: build/C/man2/mprotect.2:70
6348 msgid "The memory can be read."
6349 msgstr "そのメモリを読み取ることができる。"
6350
6351 #. type: Plain text
6352 #: build/C/man2/mprotect.2:73
6353 msgid "The memory can be modified."
6354 msgstr "そのメモリを変更できる。"
6355
6356 #.  FIXME
6357 #.  Document PROT_GROWSUP and PROT_GROWSDOWN
6358 #. type: Plain text
6359 #: build/C/man2/mprotect.2:78
6360 msgid "The memory can be executed."
6361 msgstr "そのメモリは実行可能である。"
6362
6363 #. type: Plain text
6364 #: build/C/man2/mprotect.2:85
6365 msgid ""
6366 "On success, B<mprotect>()  returns zero.  On error, -1 is returned, and "
6367 "I<errno> is set appropriately."
6368 msgstr ""
6369 "成功した場合、 B<mprotect>()  は 0 を返す。エラーの場合は -1 が返り、 "
6370 "I<errno> が適切に設定される。"
6371
6372 #. type: Plain text
6373 #: build/C/man2/mprotect.2:95
6374 msgid ""
6375 "The memory cannot be given the specified access.  This can happen, for "
6376 "example, if you B<mmap>(2)  a file to which you have read-only access, then "
6377 "ask B<mprotect>()  to mark it B<PROT_WRITE>."
6378 msgstr ""
6379 "指定されたアクセスをメモリに設定することができない。 これは、例えば ファイル"
6380 "を読み取り専用で B<mmap>(2)  しており、その領域に対して B<mprotect>()  を呼び"
6381 "出して B<PROT_WRITE> に設定しようとした場合に発生する。"
6382
6383 #.  Or: both PROT_GROWSUP and PROT_GROWSDOWN were specified in 'prot'.
6384 #. type: Plain text
6385 #: build/C/man2/mprotect.2:100
6386 msgid ""
6387 "I<addr> is not a valid pointer, or not a multiple of the system page size."
6388 msgstr ""
6389 "I<addr> が有効なポインタでないか、 システムのページサイズの倍数でない。"
6390
6391 #. type: Plain text
6392 #: build/C/man2/mprotect.2:103
6393 msgid "Internal kernel structures could not be allocated."
6394 msgstr "カーネル内部の構造体を割り当てることができなかった。"
6395
6396 #. type: Plain text
6397 #: build/C/man2/mprotect.2:113
6398 msgid ""
6399 "Addresses in the range [I<addr>, I<addr>+I<len>-1] are invalid for the "
6400 "address space of the process, or specify one or more pages that are not "
6401 "mapped.  (Before kernel 2.4.19, the error B<EFAULT> was incorrectly produced "
6402 "for these cases.)"
6403 msgstr ""
6404 "[I<addr>, I<addr>+I<len>-1] という範囲のアドレスがプロセスのアドレス空間とし"
6405 "て不正であるか、 その範囲のアドレスがマップされていない 1 つ以上のページを指"
6406 "している (カーネル 2.4.19 より前では、この状況でエラー B<EFAULT> が間違って生"
6407 "成されていた)。"
6408
6409 #.  SVr4 defines an additional error
6410 #.  code EAGAIN. The SVr4 error conditions don't map neatly onto Linux's.
6411 #. type: Plain text
6412 #: build/C/man2/mprotect.2:122
6413 msgid ""
6414 "SVr4, POSIX.1-2001.  POSIX says that the behavior of B<mprotect>()  is "
6415 "unspecified if it is applied to a region of memory that was not obtained via "
6416 "B<mmap>(2)."
6417 msgstr ""
6418 "SVr4, POSIX.1-2001.  POSIX では、 B<mmap>(2)  経由で獲得していないメモリ領域"
6419 "に対して B<mprotect>()  を行った場合の B<mprotect>()  の動作は未定義であると"
6420 "されている。"
6421
6422 #. type: Plain text
6423 #: build/C/man2/mprotect.2:129
6424 msgid ""
6425 "On Linux it is always permissible to call B<mprotect>()  on any address in a "
6426 "process's address space (except for the kernel vsyscall area).  In "
6427 "particular it can be used to change existing code mappings to be writable."
6428 msgstr ""
6429 "Linux では、(カーネル vsyscall 領域以外の)  任意のプロセスアドレス空間に対し"
6430 "て B<mprotect>()  を呼び出すことが、常に許されている。 これは特に既存のコード"
6431 "マッピングを書き込み可能にするために使われる。"
6432
6433 #. type: Plain text
6434 #: build/C/man2/mprotect.2:139
6435 msgid ""
6436 "Whether B<PROT_EXEC> has any effect different from B<PROT_READ> is "
6437 "architecture- and kernel version-dependent.  On some hardware architectures "
6438 "(e.g., i386), B<PROT_WRITE> implies B<PROT_READ>."
6439 msgstr ""
6440 "B<PROT_EXEC> が B<PROT_READ> と異なる影響を持つか否かは、アーキテクチャとカー"
6441 "ネルのバージョンに依存する。 (i386 などの) いくつかのアーキテクチャでは、 "
6442 "B<PROT_WRITE> をセットすると、暗黙のうちに B<PROT_READ> がセットされる。"
6443
6444 #. type: Plain text
6445 #: build/C/man2/mprotect.2:148
6446 msgid ""
6447 "POSIX.1-2001 says that an implementation may permit access other than that "
6448 "specified in I<prot>, but at a minimum can allow write access only if "
6449 "B<PROT_WRITE> has been set, and must not allow any access if B<PROT_NONE> "
6450 "has been set."
6451 msgstr ""
6452 "POSIX.1-2001 では、 I<prot> で指定されていないアクセスを許可する実装を認めて"
6453 "いる。 ただし、最低限、 B<PROT_WRITE> がセットされている場合にのみ書き込みア"
6454 "クセスが許可され、 B<PROT_NONE> がセットされている場合にはアクセスは許可され"
6455 "ない点だけは 満たす必要がある。"
6456
6457 #. type: Plain text
6458 #: build/C/man2/mprotect.2:154
6459 msgid ""
6460 "The program below allocates four pages of memory, makes the third of these "
6461 "pages read-only, and then executes a loop that walks upward through the "
6462 "allocated region modifying bytes."
6463 msgstr ""
6464 "以下のプログラムは、メモリページを 4つ確保し、そのうち 3番目のページを 読み込"
6465 "み専用に設定する。その後で、確保した領域のアドレスの小さい方から 大きな方に向"
6466 "かって順番にバイト値を変更するループを実行する。"
6467
6468 #. type: Plain text
6469 #: build/C/man2/mprotect.2:157
6470 msgid ""
6471 "An example of what we might see when running the program is the following:"
6472 msgstr "プログラムを実行した場合の一例を以下に示す。"
6473
6474 #. type: Plain text
6475 #: build/C/man2/mprotect.2:163
6476 #, no-wrap
6477 msgid ""
6478 "$B< ./a.out>\n"
6479 "Start of region:        0x804c000\n"
6480 "Got SIGSEGV at address: 0x804e000\n"
6481 msgstr ""
6482 "$B< ./a.out>\n"
6483 "Start of region:        0x804c000\n"
6484 "Got SIGSEGV at address: 0x804e000\n"
6485
6486 #. type: Plain text
6487 #: build/C/man2/mprotect.2:175
6488 #, no-wrap
6489 msgid ""
6490 "#include E<lt>unistd.hE<gt>\n"
6491 "#include E<lt>signal.hE<gt>\n"
6492 "#include E<lt>stdio.hE<gt>\n"
6493 "#include E<lt>malloc.hE<gt>\n"
6494 "#include E<lt>stdlib.hE<gt>\n"
6495 "#include E<lt>errno.hE<gt>\n"
6496 "#include E<lt>sys/mman.hE<gt>\n"
6497 msgstr ""
6498 "#include E<lt>unistd.hE<gt>\n"
6499 "#include E<lt>signal.hE<gt>\n"
6500 "#include E<lt>stdio.hE<gt>\n"
6501 "#include E<lt>malloc.hE<gt>\n"
6502 "#include E<lt>stdlib.hE<gt>\n"
6503 "#include E<lt>errno.hE<gt>\n"
6504 "#include E<lt>sys/mman.hE<gt>\n"
6505
6506 #. type: Plain text
6507 #: build/C/man2/mprotect.2:180
6508 #, no-wrap
6509 msgid "static char *buffer;\n"
6510 msgstr "static char *buffer;\n"
6511
6512 #. type: Plain text
6513 #: build/C/man2/mprotect.2:188
6514 #, no-wrap
6515 msgid ""
6516 "static void\n"
6517 "handler(int sig, siginfo_t *si, void *unused)\n"
6518 "{\n"
6519 "    printf(\"Got SIGSEGV at address: 0x%lx\\en\",\n"
6520 "            (long) si-E<gt>si_addr);\n"
6521 "    exit(EXIT_FAILURE);\n"
6522 "}\n"
6523 msgstr ""
6524 "static void\n"
6525 "handler(int sig, siginfo_t *si, void *unused)\n"
6526 "{\n"
6527 "    printf(\"Got SIGSEGV at address: 0x%lx\\en\",\n"
6528 "            (long) si-E<gt>si_addr);\n"
6529 "    exit(EXIT_FAILURE);\n"
6530 "}\n"
6531
6532 #. type: Plain text
6533 #: build/C/man2/mprotect.2:195
6534 #, no-wrap
6535 msgid ""
6536 "int\n"
6537 "main(int argc, char *argv[])\n"
6538 "{\n"
6539 "    char *p;\n"
6540 "    int pagesize;\n"
6541 "    struct sigaction sa;\n"
6542 msgstr ""
6543 "int\n"
6544 "main(void)\n"
6545 "{\n"
6546 "    char *p;\n"
6547 "    int pagesize;\n"
6548 "    struct sigaction sa;\n"
6549
6550 #. type: Plain text
6551 #: build/C/man2/mprotect.2:201
6552 #, no-wrap
6553 msgid ""
6554 "    sa.sa_flags = SA_SIGINFO;\n"
6555 "    sigemptyset(&sa.sa_mask);\n"
6556 "    sa.sa_sigaction = handler;\n"
6557 "    if (sigaction(SIGSEGV, &sa, NULL) == -1)\n"
6558 "        handle_error(\"sigaction\");\n"
6559 msgstr ""
6560 "    sa.sa_flags = SA_SIGINFO;\n"
6561 "    sigemptyset(&sa.sa_mask);\n"
6562 "    sa.sa_sigaction = handler;\n"
6563 "    if (sigaction(SIGSEGV, &sa, NULL) == -1)\n"
6564 "        handle_error(\"sigaction\");\n"
6565
6566 #. type: Plain text
6567 #: build/C/man2/mprotect.2:205
6568 #, no-wrap
6569 msgid ""
6570 "    pagesize = sysconf(_SC_PAGE_SIZE);\n"
6571 "    if (pagesize == -1)\n"
6572 "        handle_error(\"sysconf\");\n"
6573 msgstr ""
6574 "    pagesize = sysconf(_SC_PAGE_SIZE);\n"
6575 "    if (pagesize == -1)\n"
6576 "        handle_error(\"sysconf\");\n"
6577
6578 #. type: Plain text
6579 #: build/C/man2/mprotect.2:208
6580 #, no-wrap
6581 msgid ""
6582 "    /* Allocate a buffer aligned on a page boundary;\n"
6583 "       initial protection is PROT_READ | PROT_WRITE */\n"
6584 msgstr ""
6585 "    /* Allocate a buffer aligned on a page boundary;\n"
6586 "       initial protection is PROT_READ | PROT_WRITE */\n"
6587
6588 #. type: Plain text
6589 #: build/C/man2/mprotect.2:212
6590 #, no-wrap
6591 msgid ""
6592 "    buffer = memalign(pagesize, 4 * pagesize);\n"
6593 "    if (buffer == NULL)\n"
6594 "        handle_error(\"memalign\");\n"
6595 msgstr ""
6596 "    buffer = memalign(pagesize, 4 * pagesize);\n"
6597 "    if (buffer == NULL)\n"
6598 "        handle_error(\"memalign\");\n"
6599
6600 #. type: Plain text
6601 #: build/C/man2/mprotect.2:214
6602 #, no-wrap
6603 msgid "    printf(\"Start of region:        0x%lx\\en\", (long) buffer);\n"
6604 msgstr "    printf(\"Start of region:        0x%lx\\en\", (long) buffer);\n"
6605
6606 #. type: Plain text
6607 #: build/C/man2/mprotect.2:218
6608 #, no-wrap
6609 msgid ""
6610 "    if (mprotect(buffer + pagesize * 2, pagesize,\n"
6611 "                PROT_READ) == -1)\n"
6612 "        handle_error(\"mprotect\");\n"
6613 msgstr ""
6614 "    if (mprotect(buffer + pagesize * 2, pagesize,\n"
6615 "                PROT_READ) == -1)\n"
6616 "        handle_error(\"mprotect\");\n"
6617
6618 #. type: Plain text
6619 #: build/C/man2/mprotect.2:221
6620 #, no-wrap
6621 msgid ""
6622 "    for (p = buffer ; ; )\n"
6623 "        *(p++) = \\(aqa\\(aq;\n"
6624 msgstr ""
6625 "    for (p = buffer ; ; )\n"
6626 "        *(p++) = \\(aqa\\(aq;\n"
6627
6628 #. type: Plain text
6629 #: build/C/man2/mprotect.2:225
6630 #, no-wrap
6631 msgid ""
6632 "    printf(\"Loop completed\\en\");     /* Should never happen */\n"
6633 "    exit(EXIT_SUCCESS);\n"
6634 "}\n"
6635 msgstr ""
6636 "    printf(\"Loop completed\\en\");     /* Should never happen */\n"
6637 "    exit(EXIT_SUCCESS);\n"
6638 "}\n"
6639
6640 #. type: Plain text
6641 #: build/C/man2/mprotect.2:229
6642 msgid "B<mmap>(2), B<sysconf>(3)"
6643 msgstr "B<mmap>(2), B<sysconf>(3)"
6644
6645 #. type: TH
6646 #: build/C/man2/mremap.2:30
6647 #, no-wrap
6648 msgid "MREMAP"
6649 msgstr "MREMAP"
6650
6651 #. type: TH
6652 #: build/C/man2/mremap.2:30
6653 #, no-wrap
6654 msgid "2010-06-10"
6655 msgstr "2010-06-10"
6656
6657 #. type: Plain text
6658 #: build/C/man2/mremap.2:33
6659 msgid "mremap - remap a virtual memory address"
6660 msgstr "mremap - 仮想メモリ・アドレスを再マッピングする"
6661
6662 #. type: Plain text
6663 #: build/C/man2/mremap.2:36
6664 #, no-wrap
6665 msgid "B<#define _GNU_SOURCE>         /* See feature_test_macros(7) */\n"
6666 msgstr "B<#define _GNU_SOURCE>         /* feature_test_macros(7) 参照 */\n"
6667
6668 #. type: Plain text
6669 #: build/C/man2/mremap.2:41
6670 #, no-wrap
6671 msgid ""
6672 "B<void *mremap(void *>I<old_address>B<, size_t >I<old_size>B<,>\n"
6673 "B<             size_t >I<new_size>B<, int >I<flags>B<, ... /* void *>I<new_address>B< */);>\n"
6674 msgstr ""
6675 "B<void *mremap(void *>I<old_address>B<, size_t >I<old_size>B<,>\n"
6676 "B<             size_t >I<new_size>B<, int >I<flags>B<, ... /* void *>I<new_address>B< */);>\n"
6677
6678 #. type: Plain text
6679 #: build/C/man2/mremap.2:47
6680 msgid ""
6681 "B<mremap>()  expands (or shrinks) an existing memory mapping, potentially "
6682 "moving it at the same time (controlled by the I<flags> argument and the "
6683 "available virtual address space)."
6684 msgstr ""
6685 "B<mremap>()  は既存のメモリ・マッピングの拡張 (または縮小) を行う。 同時に移"
6686 "動されることもある (I<flags> 引き数と利用可能な仮想アドレス空間によって決ま"
6687 "る)。"
6688
6689 #. type: Plain text
6690 #: build/C/man2/mremap.2:61
6691 msgid ""
6692 "I<old_address> is the old address of the virtual memory block that you want "
6693 "to expand (or shrink).  Note that I<old_address> has to be page aligned.  "
6694 "I<old_size> is the old size of the virtual memory block.  I<new_size> is the "
6695 "requested size of the virtual memory block after the resize.  An optional "
6696 "fifth argument, I<new_address>, may be provided; see the description of "
6697 "B<MREMAP_FIXED> below."
6698 msgstr ""
6699 "I<old_address> は拡張 (または縮小) しようとする仮想メモリ・ブロック の元のア"
6700 "ドレスである。I<old_address> はページ境界に合っていなければ ならない点に注意"
6701 "すること。I<old_size> は元の仮想メモリ・ブロックの サイズである。 "
6702 "I<new_size> は要求する変更後の仮想メモリ・ブロックのサイズである。 5 番目の引"
6703 "き数として I<new_address> を指定することができる。下記の B<MREMAP_FIXED> の説"
6704 "明を参照のこと。"
6705
6706 #. type: Plain text
6707 #: build/C/man2/mremap.2:73
6708 msgid ""
6709 "In Linux the memory is divided into pages.  A user process has (one or)  "
6710 "several linear virtual memory segments.  Each virtual memory segment has one "
6711 "or more mappings to real memory pages (in the page table).  Each virtual "
6712 "memory segment has its own protection (access rights), which may cause a "
6713 "segmentation violation if the memory is accessed incorrectly (e.g., writing "
6714 "to a read-only segment).  Accessing virtual memory outside of the segments "
6715 "will also cause a segmentation violation."
6716 msgstr ""
6717 "Linux ではメモリはページに分割される。ユーザー・プロセスは (一つまたは)  複数"
6718 "のリニアな仮想メモリセグメントを持つ。 それぞれの仮想メモリセグメントは一つ以"
6719 "上の実メモリ・ページ にマッピングされている (マッピング情報はページ・テーブル"
6720 "で管理される)。 仮想メモリセグメントにはセグメント毎の保護 (アクセス権) が設"
6721 "定されており、 メモリが不正にアクセスされた場合 (例えば読み込み専用のセグメン"
6722 "トに 書き込んだ場合)、セグメンテーション侵害 (segmentation violation) を 引き"
6723 "起こす。また、セグメント外の仮想メモリにアクセスした場合にも セグメンテーショ"
6724 "ン侵害が発生する。"
6725
6726 #. type: Plain text
6727 #: build/C/man2/mremap.2:81
6728 msgid ""
6729 "B<mremap>()  uses the Linux page table scheme.  B<mremap>()  changes the "
6730 "mapping between virtual addresses and memory pages.  This can be used to "
6731 "implement a very efficient B<realloc>(3)."
6732 msgstr ""
6733 "B<mremap>()  は Linux のページ・テーブル方式を使用する。 B<mremap>()  は仮想"
6734 "アドレスとメモリ・ページのマッピングを変更する。これは非常に効率的な "
6735 "B<realloc>(3)  を実装するのに使用されている。"
6736
6737 #. type: Plain text
6738 #: build/C/man2/mremap.2:83
6739 msgid "The I<flags> bit-mask argument may be 0, or include the following flag:"
6740 msgstr "I<flags> ビットマスク引数は 0 または以下のフラグを含む:"
6741
6742 #. type: TP
6743 #: build/C/man2/mremap.2:83
6744 #, no-wrap
6745 msgid "B<MREMAP_MAYMOVE>"
6746 msgstr "B<MREMAP_MAYMOVE>"
6747
6748 #. type: Plain text
6749 #: build/C/man2/mremap.2:95
6750 msgid ""
6751 "By default, if there is not sufficient space to expand a mapping at its "
6752 "current location, then B<mremap>()  fails.  If this flag is specified, then "
6753 "the kernel is permitted to relocate the mapping to a new virtual address, if "
6754 "necessary.  If the mapping is relocated, then absolute pointers into the old "
6755 "mapping location become invalid (offsets relative to the starting address of "
6756 "the mapping should be employed)."
6757 msgstr ""
6758 "デフォルトでは、現在の位置にマッピングを拡張するための 十分な空きがなければ "
6759 "B<mremap>()  は失敗する。 このフラグが指定されると、カーネルは必要があれば"
6760 "マッピングを 新しい仮想アドレスに再配置することができる マッピングが再配置さ"
6761 "れると、古いマッピング位置への絶対ポインタは 無効になる (マッピングの開始アド"
6762 "レスからの相対オフセットは有効のままである)。"
6763
6764 #. type: TP
6765 #: build/C/man2/mremap.2:95
6766 #, no-wrap
6767 msgid "B<MREMAP_FIXED> (since Linux 2.3.31)"
6768 msgstr "B<MREMAP_FIXED> (Linux 2.3.31 以降)"
6769
6770 #. type: Plain text
6771 #: build/C/man2/mremap.2:117
6772 msgid ""
6773 "This flag serves a similar purpose to the B<MAP_FIXED> flag of B<mmap>(2).  "
6774 "If this flag is specified, then B<mremap>()  accepts a fifth argument, I<void"
6775 "\\ *new_address>, which specifies a page-aligned address to which the "
6776 "mapping must be moved.  Any previous mapping at the address range specified "
6777 "by I<new_address> and I<new_size> is unmapped.  If B<MREMAP_FIXED> is "
6778 "specified, then B<MREMAP_MAYMOVE> must also be specified."
6779 msgstr ""
6780 "このフラグは B<mmap>(2)  の B<MAP_FIXED> フラグと似たような目的で用いられ"
6781 "る。 このフラグが指定されると、 B<mremap>()  は 5 番目の引き数 I<void\\ "
6782 "*new_address> を受け取り、この引数はマッピングが移動されるべきアドレスを指定"
6783 "する。 このアドレスはページ境界に合っていなければならない。 I<new_address> "
6784 "と I<new_size> で指定されるアドレス範囲に過去のマッピングがあった場合、 その"
6785 "マッピングはアンマップされる (unmapped)。 B<MREMAP_FIXED> を指定した場合は、 "
6786 "B<MREMAP_MAYMOVE> も指定しなければならない。"
6787
6788 #. type: Plain text
6789 #: build/C/man2/mremap.2:127
6790 msgid ""
6791 "If the memory segment specified by I<old_address> and I<old_size> is locked "
6792 "(using B<mlock>(2)  or similar), then this lock is maintained when the "
6793 "segment is resized and/or relocated.  As a consequence, the amount of memory "
6794 "locked by the process may change."
6795 msgstr ""
6796 "I<old_address> と I<old_size> で指定されるメモリセグメントが (B<mlock>(2)  や"
6797 "同様のもので) ロックされている場合、セグメントのサイズが変わったり 再配置され"
6798 "たりした時にロックも維持される。 その結果、プロセスによってロックされるメモリ"
6799 "の量は変化する。"
6800
6801 #. type: Plain text
6802 #: build/C/man2/mremap.2:135
6803 msgid ""
6804 "On success B<mremap>()  returns a pointer to the new virtual memory area.  "
6805 "On error, the value B<MAP_FAILED> (that is, I<(void\\ *)\\ -1>) is returned, "
6806 "and I<errno> is set appropriately."
6807 msgstr ""
6808 "成功した場合は B<mremap>()  は新しい仮想メモリ領域へのポインタを返す。 エラー"
6809 "の場合は B<MAP_FAILED> (すなわち I<(void\\ *)\\ -1>) が返され、 I<errno> が適"
6810 "切に設定される。"
6811
6812 #. type: Plain text
6813 #: build/C/man2/mremap.2:142
6814 msgid ""
6815 "The caller tried to expand a memory segment that is locked, but this was not "
6816 "possible without exceeding the B<RLIMIT_MEMLOCK> resource limit."
6817 msgstr ""
6818 "呼び出し元がロックされているメモリセグメントを拡張しようとしたが、 "
6819 "B<RLIMIT_MEMLOCK> リソース制限を越えずにこれを行うことができない。"
6820
6821 #. type: Plain text
6822 #: build/C/man2/mremap.2:151
6823 msgid ""
6824 "\"Segmentation fault.\" Some address in the range I<old_address> to "
6825 "I<old_address>+I<old_size> is an invalid virtual memory address for this "
6826 "process.  You can also get B<EFAULT> even if there exist mappings that cover "
6827 "the whole address space requested, but those mappings are of different types."
6828 msgstr ""
6829 "「セグメンテーション違反(segmentation fault)」 I<old_address> から "
6830 "I<old_address>+I<old_size> の 範囲のアドレスのどれかがこのプロセスにおいて不"
6831 "正な仮想メモリ・アドレスである。 たとえ要求したアドレス空間全体を含むような"
6832 "マッピングがあったとしても、 それらのマッピングが異なった型ならば B<EFAULT> "
6833 "を受け取るだろう。"
6834
6835 #. type: Plain text
6836 #: build/C/man2/mremap.2:179
6837 msgid ""
6838 "An invalid argument was given.  Possible causes are: I<old_address> was not "
6839 "page aligned; a value other than B<MREMAP_MAYMOVE> or B<MREMAP_FIXED> was "
6840 "specified in I<flags>; I<new_size> was zero; I<new_size> or I<new_address> "
6841 "was invalid; or the new address range specified by I<new_address> and "
6842 "I<new_size> overlapped the old address range specified by I<old_address> and "
6843 "I<old_size>; or B<MREMAP_FIXED> was specified without also specifying "
6844 "B<MREMAP_MAYMOVE>."
6845 msgstr ""
6846 "不正な引き数が与えられた。 可能性のある原因は以下の通りである: たいていは "
6847 "I<old_address> がページ境界に 合ってない; I<flags> に B<MREMAP_MAYMOVE> また"
6848 "は B<MREMAP_FIXED> 以外の値が指定されている; I<new_size> がゼロ; I<new_size> "
6849 "または I<new_address> の値が不正; I<new_address> と I<new_size> で指定される"
6850 "新しいアドレス範囲が I<old_address> と I<old_size> で指定される古いアドレス範"
6851 "囲と重なっている; B<MREMAP_FIXED> が指定されているが B<MREMAP_MAYMOVE> が指定"
6852 "されていない。"
6853
6854 #. type: Plain text
6855 #: build/C/man2/mremap.2:185
6856 msgid ""
6857 "The memory area cannot be expanded at the current virtual address, and the "
6858 "B<MREMAP_MAYMOVE> flag is not set in I<flags>.  Or, there is not enough "
6859 "(virtual) memory available."
6860 msgstr ""
6861 "現在の仮想アドレスではメモリ領域が拡張できず、 B<MREMAP_MAYMOVE> フラグが "
6862 "I<flags> に設定されていない。 または十分な (仮想) メモリが存在しない。"
6863
6864 #.  4.2BSD had a (never actually implemented)
6865 #.  .BR mremap (2)
6866 #.  call with completely different semantics.
6867 #. type: Plain text
6868 #: build/C/man2/mremap.2:191
6869 msgid ""
6870 "This call is Linux-specific, and should not be used in programs intended to "
6871 "be portable."
6872 msgstr ""
6873 "このコールは Linux 特有であり、移植を意図したプログラムで 使用すべきではな"
6874 "い。"
6875
6876 #. type: Plain text
6877 #: build/C/man2/mremap.2:199
6878 msgid ""
6879 "Prior to version 2.4, glibc did not expose the definition of "
6880 "B<MREMAP_FIXED>, and the prototype for B<mremap>()  did not allow for the "
6881 "I<new_address> argument."
6882 msgstr ""
6883 "バージョン 2.4 より前の glibc では、 B<MREMAP_FIXED> の定義は公開されておら"
6884 "ず、 B<mremap>()  のプロトタイプは I<new_address> 引き数を取らなかった。"
6885
6886 #. type: Plain text
6887 #: build/C/man2/mremap.2:208
6888 msgid ""
6889 "B<brk>(2), B<getpagesize>(2), B<getrlimit>(2), B<mlock>(2), B<mmap>(2), "
6890 "B<sbrk>(2), B<malloc>(3), B<realloc>(3)"
6891 msgstr ""
6892 "B<brk>(2), B<getpagesize>(2), B<getrlimit>(2), B<mlock>(2), B<mmap>(2), "
6893 "B<sbrk>(2), B<realloc>(3), B<malloc>(3)"
6894
6895 #. type: Plain text
6896 #: build/C/man2/mremap.2:214
6897 msgid ""
6898 "Your favorite text book on operating systems for more information on paged "
6899 "memory (e.g., I<Modern Operating Systems> by Andrew S. Tanenbaum, I<Inside "
6900 "Linux> by Randolf Bentson, I<The Design of the UNIX Operating System> by "
6901 "Maurice J. Bach)"
6902 msgstr ""
6903 "ページ分割されたメモリについてもっと詳しく知りたいならば、あなたのお気に入り"
6904 "のオペレーティングシステムの教科書を参照してほしい (例えば、 I<Modern "
6905 "Operating Systems> by Andrew S. Tanenbaum, I<Inside Linux> by Randolf "
6906 "Bentson, I<The Design of the UNIX Operating System> by Maurice J. Bach.)"
6907
6908 #. type: TH
6909 #: build/C/man2/msync.2:25
6910 #, no-wrap
6911 msgid "MSYNC"
6912 msgstr "MSYNC"
6913
6914 #. type: TH
6915 #: build/C/man2/msync.2:25 build/C/man2/remap_file_pages.2:28
6916 #, no-wrap
6917 msgid "2008-04-22"
6918 msgstr "2008-04-22"
6919
6920 #. type: Plain text
6921 #: build/C/man2/msync.2:28
6922 msgid "msync - synchronize a file with a memory map"
6923 msgstr "msync - ファイルをマップしたメモリと同期させる"
6924
6925 #. type: Plain text
6926 #: build/C/man2/msync.2:32
6927 msgid "B<int msync(void *>I<addr>B<, size_t >I<length>B<, int >I<flags>B<);>"
6928 msgstr "B<int msync(void *>I<addr>B<, size_t >I<length>B<, int >I<flags>B<);>"
6929
6930 #. type: Plain text
6931 #: build/C/man2/msync.2:48
6932 msgid ""
6933 "B<msync>()  flushes changes made to the in-core copy of a file that was "
6934 "mapped into memory using B<mmap>(2)  back to disk.  Without use of this call "
6935 "there is no guarantee that changes are written back before B<munmap>(2)  is "
6936 "called.  To be more precise, the part of the file that corresponds to the "
6937 "memory area starting at I<addr> and having length I<length> is updated."
6938 msgstr ""
6939 "B<msync>()  は B<mmap>(2)  を使ってメモリにマップされたファイルの、 メモリ上"
6940 "のコピーになされた変更をディスクに反映させる。 この関数を使用しないと、 "
6941 "B<munmap>(2)  が呼び出されるまで変更が書き戻される保証はない。 より正確には、"
6942 "ファイルのうち I<addr> から始まり長さ I<length> のメモリ領域に対応する部分が"
6943 "更新される。"
6944
6945 #. type: Plain text
6946 #: build/C/man2/msync.2:68
6947 msgid ""
6948 "The I<flags> argument may have the bits B<MS_ASYNC>, B<MS_SYNC>, and "
6949 "B<MS_INVALIDATE> set, but not both B<MS_ASYNC> and B<MS_SYNC>.  B<MS_ASYNC> "
6950 "specifies that an update be scheduled, but the call returns immediately.  "
6951 "B<MS_SYNC> asks for an update and waits for it to complete.  "
6952 "B<MS_INVALIDATE> asks to invalidate other mappings of the same file (so that "
6953 "they can be updated with the fresh values just written)."
6954 msgstr ""
6955 "I<flags> 引数にはビット B<MS_ASYNC>, B<MS_SYNC>, B<MS_INVALIDATE> を設定する"
6956 "ことができるが、 B<MS_ASYNC> と B<MS_SYNC> を同時に指定することはできない。 "
6957 "B<MS_ASYNC> は更新を予定に組み込むことを表し、呼び出しは直ちに返る。 "
6958 "B<MS_SYNC> は更新を要求し、更新が完了するまで待つ。 B<MS_INVALIDATE> は(たっ"
6959 "た今書き込んだ新しい値でマッピングを更新することができるように)  同じファイル"
6960 "に対する他のマッピングを無効にすることを要求する。"
6961
6962 #. type: Plain text
6963 #: build/C/man2/msync.2:73
6964 msgid ""
6965 "On success, zero is returned.  On error, -1 is returned, and I<errno> is set "
6966 "appropriately."
6967 msgstr ""
6968 "成功した場合、 0 が返る。エラーの場合、 -1 が返り、 I<errno> が適切に設定され"
6969 "る。"
6970
6971 #. type: TP
6972 #: build/C/man2/msync.2:74
6973 #, no-wrap
6974 msgid "B<EBUSY>"
6975 msgstr "B<EBUSY>"
6976
6977 #. type: Plain text
6978 #: build/C/man2/msync.2:80
6979 msgid ""
6980 "B<MS_INVALIDATE> was specified in I<flags>, and a memory lock exists for the "
6981 "specified address range."
6982 msgstr ""
6983 "I flags に B<MS_INVALIDATE> が指定されたが、指定されたアドレス範囲にロックが"
6984 "存在する。"
6985
6986 #. type: Plain text
6987 #: build/C/man2/msync.2:93
6988 msgid ""
6989 "I<addr> is not a multiple of PAGESIZE; or any bit other than B<MS_ASYNC> | "
6990 "B<MS_INVALIDATE> | B<MS_SYNC> is set in I<flags>; or both B<MS_SYNC> and "
6991 "B<MS_ASYNC> are set in I<flags>."
6992 msgstr ""
6993 "I<addr> が PAGESIZE の倍数でない。または、 I<flags> に B<MS_ASYNC>、"
6994 "B<MS_INVALIDATE>、B<MS_SYNC> 以外のビットが設定された。 または、 I<flags> に "
6995 "B<MS_SYNC> と B<MS_ASYNC> の両方が設定された。"
6996
6997 #. type: Plain text
6998 #: build/C/man2/msync.2:96
6999 msgid "The indicated memory (or part of it) was not mapped."
7000 msgstr "指定されたメモリ (またはその一部) がマップされていない。"
7001
7002 #. type: Plain text
7003 #: build/C/man2/msync.2:98 build/C/man3/posix_fallocate.3:105
7004 #: build/C/man3/shm_open.3:253 build/C/man7/shm_overview.7:103
7005 msgid "POSIX.1-2001."
7006 msgstr "POSIX.1-2001."
7007
7008 #. type: Plain text
7009 #: build/C/man2/msync.2:105
7010 msgid ""
7011 "This call was introduced in Linux 1.3.21, and then used B<EFAULT> instead of "
7012 "B<ENOMEM>.  In Linux 2.4.19 this was changed to the POSIX value B<ENOMEM>."
7013 msgstr ""
7014 "この関数は Linux 1.3.21 で導入されたが、 B<ENOMEM> ではなく B<EFAULT> が使わ"
7015 "れていた。 これは Linux 2.4.19 で POSIX における値 B<ENOMEM> に変更された。"
7016
7017 #.  POSIX.1-2001: It shall be defined to -1 or 0 or 200112L.
7018 #.  -1: unavailable, 0: ask using sysconf().
7019 #.  glibc defines them to 1.
7020 #. type: Plain text
7021 #: build/C/man2/msync.2:120
7022 msgid ""
7023 "On POSIX systems on which B<msync>()  is available, both "
7024 "B<_POSIX_MAPPED_FILES> and B<_POSIX_SYNCHRONIZED_IO> are defined in "
7025 "I<E<lt>unistd.hE<gt>> to a value greater than 0.  (See also B<sysconf>(3).)"
7026 msgstr ""
7027 "B<msync>()  が使用可能な POSIX システムでは B<_POSIX_MAPPED_FILES> と "
7028 "B<_POSIX_SYNCHRONIZED_IO> の両方が I<E<lt>unistd.hE<gt>> で 0 より大きい値に"
7029 "定義される。 (B<sysconf>(3)  を参照すること。 )"
7030
7031 #. type: TP
7032 #: build/C/man2/msync.2:122 build/C/man7/shm_overview.7:46
7033 #, no-wrap
7034 msgid "B<mmap>(2)"
7035 msgstr "B<mmap>(2)"
7036
7037 #. type: TH
7038 #: build/C/man3/mtrace.3:25
7039 #, no-wrap
7040 msgid "MTRACE"
7041 msgstr "MTRACE"
7042
7043 #. type: TH
7044 #: build/C/man3/mtrace.3:25
7045 #, no-wrap
7046 msgid "2012-04-18"
7047 msgstr "2012-04-18"
7048
7049 #. type: Plain text
7050 #: build/C/man3/mtrace.3:28
7051 msgid "mtrace, muntrace - malloc tracing"
7052 msgstr "mtrace, muntrace - malloc のトレース"
7053
7054 #. type: Plain text
7055 #: build/C/man3/mtrace.3:30
7056 msgid "B<#include E<lt>mcheck.hE<gt>>"
7057 msgstr "B<#include E<lt>mcheck.hE<gt>>"
7058
7059 #. type: Plain text
7060 #: build/C/man3/mtrace.3:32
7061 msgid "B<void mtrace(void);>"
7062 msgstr "B<void mtrace(void);>"
7063
7064 #. type: Plain text
7065 #: build/C/man3/mtrace.3:34
7066 msgid "B<void muntrace(void);>"
7067 msgstr "B<void muntrace(void);>"
7068
7069 #. type: Plain text
7070 #: build/C/man3/mtrace.3:46
7071 msgid ""
7072 "The B<mtrace>()  function installs hook functions for the memory-allocation "
7073 "functions (B<malloc>(3), B<realloc>(3)  B<memalign>(3), B<free>(3)).  These "
7074 "hook functions record tracing information about memory allocation and "
7075 "deallocation.  The tracing information can be used to discover memory leaks "
7076 "and attempts to free nonallocated memory in a program."
7077 msgstr ""
7078
7079 #. type: Plain text
7080 #: build/C/man3/mtrace.3:57
7081 msgid ""
7082 "The B<muntrace>()  function disables the hook functions installed by "
7083 "B<mtrace>(), so that tracing information is no longer recorded for the "
7084 "memory-allocation functions.  If no hook functions were successfully "
7085 "installed by B<mtrace>(), B<muntrace>()  does nothing."
7086 msgstr ""
7087
7088 #. type: Plain text
7089 #: build/C/man3/mtrace.3:65
7090 msgid ""
7091 "When B<mtrace>()  is called, it checks the value of the environment variable "
7092 "B<MALLOC_TRACE>, which should contain the pathname of a file in which the "
7093 "tracing information is to be recorded.  If the pathname is successfully "
7094 "opened, it is truncated to zero length."
7095 msgstr ""
7096
7097 #. type: Plain text
7098 #: build/C/man3/mtrace.3:78
7099 msgid ""
7100 "If B<MALLOC_TRACE> is not set, or the pathname it specifies is invalid or "
7101 "not writable, then no hook functions are installed, and B<mtrace>()  has no "
7102 "effect.  In set-user-ID and set-group-ID programs, B<MALLOC_TRACE> is "
7103 "ignored, and B<mtrace>()  has no effect."
7104 msgstr ""
7105
7106 #. type: Plain text
7107 #: build/C/man3/mtrace.3:86
7108 msgid ""
7109 "In normal usage, B<mtrace>()  is called once at the start of execution of a "
7110 "program, and B<muntrace>()  is never called."
7111 msgstr ""
7112
7113 #. type: Plain text
7114 #: build/C/man3/mtrace.3:96
7115 msgid ""
7116 "The tracing output produced after a call to B<mtrace>()  is textual, but not "
7117 "designed to be human readable.  The GNU C library provides a Perl script, "
7118 "B<mtrace>(1), that interprets the trace log and produces human-readable "
7119 "output.  For best results, the traced program should be compiled with "
7120 "debugging enabled, so that line-number information is recorded in the "
7121 "executable."
7122 msgstr ""
7123
7124 #. type: Plain text
7125 #: build/C/man3/mtrace.3:102
7126 msgid ""
7127 "The tracing performed by B<mtrace>()  incurs a performance penalty (if "
7128 "B<MALLOC_TRACE> points to a valid, writable pathname)."
7129 msgstr ""
7130
7131 #. type: Plain text
7132 #: build/C/man3/mtrace.3:108
7133 msgid ""
7134 "The line-number information produced by B<mtrace>(1)  is not always precise: "
7135 "the line number references may refer to the previous or following "
7136 "(nonblank)  line of the source code."
7137 msgstr ""
7138
7139 #. type: Plain text
7140 #: build/C/man3/mtrace.3:115
7141 msgid ""
7142 "The shell session below demonstrates the use of the B<mtrace>()  function "
7143 "and the B<mtrace>(1)  command in a program that has memory leaks at two "
7144 "different locations.  The demonstration uses the following program:"
7145 msgstr ""
7146
7147 #. type: Plain text
7148 #: build/C/man3/mtrace.3:122
7149 #, no-wrap
7150 msgid ""
7151 "$ B<cat t_mtrace.c>\n"
7152 "#include E<lt>mcheck.hE<gt>\n"
7153 "#include E<lt>stdlib.hE<gt>\n"
7154 "#include E<lt>stdio.hE<gt>\n"
7155 msgstr ""
7156 "$ B<cat t_mtrace.c>\n"
7157 "#include E<lt>mcheck.hE<gt>\n"
7158 "#include E<lt>stdlib.hE<gt>\n"
7159 "#include E<lt>stdio.hE<gt>\n"
7160
7161 #. type: Plain text
7162 #: build/C/man3/mtrace.3:127
7163 #, no-wrap
7164 msgid ""
7165 "int\n"
7166 "main(int argc, char *argv[])\n"
7167 "{\n"
7168 "    int j;\n"
7169 msgstr ""
7170 "int\n"
7171 "main(int argc, char *argv[])\n"
7172 "{\n"
7173 "    int j;\n"
7174
7175 #. type: Plain text
7176 #: build/C/man3/mtrace.3:129
7177 #, no-wrap
7178 msgid "    mtrace();\n"
7179 msgstr "    mtrace();\n"
7180
7181 #. type: Plain text
7182 #: build/C/man3/mtrace.3:132
7183 #, no-wrap
7184 msgid ""
7185 "    for (j = 0; j E<lt> 2; j++)\n"
7186 "        malloc(100);            /* Never freed--a memory leak */\n"
7187 msgstr ""
7188 "    for (j = 0; j E<lt> 2; j++)\n"
7189 "        malloc(100);            /* Never freed--a memory leak */\n"
7190
7191 #. type: Plain text
7192 #: build/C/man3/mtrace.3:136
7193 #, no-wrap
7194 msgid ""
7195 "    calloc(16, 16);             /* Never freed--a memory leak */\n"
7196 "    exit(EXIT_SUCCESS);\n"
7197 "}\n"
7198 msgstr ""
7199 "    calloc(16, 16);             /* Never freed--a memory leak */\n"
7200 "    exit(EXIT_SUCCESS);\n"
7201 "}\n"
7202
7203 #. type: Plain text
7204 #: build/C/man3/mtrace.3:142
7205 msgid ""
7206 "When we run the program as follows, we see that B<mtrace>()  diagnosed "
7207 "memory leaks at two different locations in the program:"
7208 msgstr ""
7209
7210 #. type: Plain text
7211 #: build/C/man3/mtrace.3:155
7212 #, no-wrap
7213 msgid ""
7214 "$ B<cc -g t_mtrace.c -o t_mtrace>\n"
7215 "$ B<export MALLOC_TRACE=/tmp/t>\n"
7216 "$ B<./t_mtrace>\n"
7217 "$ B<mtrace ./t_mtrace $MALLOC_TRACE>\n"
7218 "Memory not freed:\n"
7219 "-----------------\n"
7220 "   Address     Size     Caller\n"
7221 "0x084c9378     0x64  at /home/cecilia/t_mtrace.c:12\n"
7222 "0x084c93e0     0x64  at /home/cecilia/t_mtrace.c:12\n"
7223 "0x084c9448    0x100  at /home/cecilia/t_mtrace.c:16\n"
7224 msgstr ""
7225 "$ B<cc -g t_mtrace.c -o t_mtrace>\n"
7226 "$ B<export MALLOC_TRACE=/tmp/t>\n"
7227 "$ B<./t_mtrace>\n"
7228 "$ B<mtrace ./t_mtrace $MALLOC_TRACE>\n"
7229 "Memory not freed:\n"
7230 "-----------------\n"
7231 "   Address     Size     Caller\n"
7232 "0x084c9378     0x64  at /home/cecilia/t_mtrace.c:12\n"
7233 "0x084c93e0     0x64  at /home/cecilia/t_mtrace.c:12\n"
7234 "0x084c9448    0x100  at /home/cecilia/t_mtrace.c:16\n"
7235
7236 #. type: Plain text
7237 #: build/C/man3/mtrace.3:167
7238 msgid ""
7239 "The first two messages about unfreed memory correspond to the two B<malloc>"
7240 "(3)  calls inside the I<for> loop.  The final message corresponds to the "
7241 "call to B<calloc>(3)  (which in turn calls B<malloc>(3))."
7242 msgstr ""
7243
7244 #. type: Plain text
7245 #: build/C/man3/mtrace.3:172
7246 msgid "B<mtrace>(1), B<malloc>(3), B<malloc_hook>(3), B<mcheck>(3)"
7247 msgstr "B<mtrace>(1), B<malloc>(3), B<malloc_hook>(3), B<mcheck>(3)"
7248
7249 #. type: TH
7250 #: build/C/man2/posix_fadvise.2:28
7251 #, no-wrap
7252 msgid "POSIX_FADVISE"
7253 msgstr "POSIX_FADVISE"
7254
7255 #. type: TH
7256 #: build/C/man2/posix_fadvise.2:28 build/C/man2/sync_file_range.2:30
7257 #, no-wrap
7258 msgid "2013-04-01"
7259 msgstr "2013-04-01"
7260
7261 #. type: Plain text
7262 #: build/C/man2/posix_fadvise.2:31
7263 msgid "posix_fadvise - predeclare an access pattern for file data"
7264 msgstr "posix_fadvise - ファイルデータのアクセスパターンをあらかじめ宣言する"
7265
7266 #. type: Plain text
7267 #: build/C/man2/posix_fadvise.2:34 build/C/man3/posix_fallocate.3:31
7268 #, no-wrap
7269 msgid "B<#include E<lt>fcntl.hE<gt>>\n"
7270 msgstr "B<#include E<lt>fcntl.hE<gt>>\n"
7271
7272 #. type: Plain text
7273 #: build/C/man2/posix_fadvise.2:37
7274 #, no-wrap
7275 msgid "B<int posix_fadvise(int >I<fd>B<, off_t >I<offset>B<, off_t >I<len>B<, int >I<advice>B<);>\n"
7276 msgstr "B<int posix_fadvise(int >I<fd>B<, off_t >I<offset>B<, off_t >I<len>B<, int >I<advice>B<);>\n"
7277
7278 #. type: Plain text
7279 #: build/C/man2/posix_fadvise.2:46
7280 msgid "B<posix_fadvise>():"
7281 msgstr "B<posix_fadvise>():"
7282
7283 #. type: Plain text
7284 #: build/C/man2/posix_fadvise.2:48 build/C/man3/posix_fallocate.3:44
7285 msgid "_XOPEN_SOURCE\\ E<gt>=\\ 600 || _POSIX_C_SOURCE\\ E<gt>=\\ 200112L"
7286 msgstr "_XOPEN_SOURCE\\ E<gt>=\\ 600 || _POSIX_C_SOURCE\\ E<gt>=\\ 200112L"
7287
7288 #. type: Plain text
7289 #: build/C/man2/posix_fadvise.2:56
7290 msgid ""
7291 "Programs can use B<posix_fadvise>()  to announce an intention to access file "
7292 "data in a specific pattern in the future, thus allowing the kernel to "
7293 "perform appropriate optimizations."
7294 msgstr ""
7295 "プログラムは、将来特定のパターンでファイルデータに アクセスする意思を伝えるた"
7296 "めに B<posix_fadvise>()  を使うことができる。 これにより、カーネルが適切な最"
7297 "適化を実行することが可能になる。"
7298
7299 #. type: Plain text
7300 #: build/C/man2/posix_fadvise.2:63
7301 msgid ""
7302 "The I<advice> applies to a (not necessarily existent) region starting at "
7303 "I<offset> and extending for I<len> bytes (or until the end of the file if "
7304 "I<len> is 0) within the file referred to by I<fd>.  The I<advice> is not "
7305 "binding; it merely constitutes an expectation on behalf of the application."
7306 msgstr ""
7307 "I<advice> は I<fd> が参照しているファイルの I<offset> から始まる I<len> バ"
7308 "イ\n"
7309 "トの範囲内 (I<len> が 0 の場合はファイルの終りまで) の (必ずしも存在しない)\n"
7310 "領域に適用される。 I<advice> は義務づけではない。 I<advice> は単にアプリ"
7311 "ケー\n"
7312 "ションのために可能性を構成するだけである。"
7313
7314 #. type: Plain text
7315 #: build/C/man2/posix_fadvise.2:65
7316 msgid "Permissible values for I<advice> include:"
7317 msgstr "I<advice> に許される値には、以下のものが含まれる:"
7318
7319 #. type: TP
7320 #: build/C/man2/posix_fadvise.2:65
7321 #, no-wrap
7322 msgid "B<POSIX_FADV_NORMAL>"
7323 msgstr "B<POSIX_FADV_NORMAL>"
7324
7325 #. type: Plain text
7326 #: build/C/man2/posix_fadvise.2:71
7327 msgid ""
7328 "Indicates that the application has no advice to give about its access "
7329 "pattern for the specified data.  If no advice is given for an open file, "
7330 "this is the default assumption."
7331 msgstr ""
7332 "指定されたデータのアクセスパターンを指示するアドバイスを アプリケーションが何"
7333 "も持っていないことを示す。 オープンされたファイルにアドバイスが指定されない場"
7334 "合、 これがデフォルトで仮定される。"
7335
7336 #. type: TP
7337 #: build/C/man2/posix_fadvise.2:71
7338 #, no-wrap
7339 msgid "B<POSIX_FADV_SEQUENTIAL>"
7340 msgstr "B<POSIX_FADV_SEQUENTIAL>"
7341
7342 #. type: Plain text
7343 #: build/C/man2/posix_fadvise.2:75
7344 msgid ""
7345 "The application expects to access the specified data sequentially (with "
7346 "lower offsets read before higher ones)."
7347 msgstr ""
7348 "アプリケーションは指定されたデータがシーケンシャルに (大きなオフセットの前に"
7349 "小さなオフセットのデータを読むように)  アクセスされることを期待する。"
7350
7351 #. type: TP
7352 #: build/C/man2/posix_fadvise.2:75
7353 #, no-wrap
7354 msgid "B<POSIX_FADV_RANDOM>"
7355 msgstr "B<POSIX_FADV_RANDOM>"
7356
7357 #. type: Plain text
7358 #: build/C/man2/posix_fadvise.2:78
7359 msgid "The specified data will be accessed in random order."
7360 msgstr "指定されたデータがランダムな順番でアクセスされる。"
7361
7362 #. type: TP
7363 #: build/C/man2/posix_fadvise.2:78
7364 #, no-wrap
7365 msgid "B<POSIX_FADV_NOREUSE>"
7366 msgstr "B<POSIX_FADV_NOREUSE>"
7367
7368 #. type: Plain text
7369 #: build/C/man2/posix_fadvise.2:81
7370 msgid "The specified data will be accessed only once."
7371 msgstr "指定されたデータは 1 度しかアクセスされない。"
7372
7373 #. type: TP
7374 #: build/C/man2/posix_fadvise.2:81
7375 #, no-wrap
7376 msgid "B<POSIX_FADV_WILLNEED>"
7377 msgstr "B<POSIX_FADV_WILLNEED>"
7378
7379 #. type: Plain text
7380 #: build/C/man2/posix_fadvise.2:84
7381 msgid "The specified data will be accessed in the near future."
7382 msgstr "指定されたデータは近い将来アクセスされる。"
7383
7384 #. type: TP
7385 #: build/C/man2/posix_fadvise.2:84
7386 #, no-wrap
7387 msgid "B<POSIX_FADV_DONTNEED>"
7388 msgstr "B<POSIX_FADV_DONTNEED>"
7389
7390 #. type: Plain text
7391 #: build/C/man2/posix_fadvise.2:87
7392 msgid "The specified data will not be accessed in the near future."
7393 msgstr "指定されたデータは近い将来アクセスされない。"
7394
7395 #. type: Plain text
7396 #: build/C/man2/posix_fadvise.2:90
7397 msgid "On success, zero is returned.  On error, an error number is returned."
7398 msgstr "成功した場合は 0 が返される。 失敗した場合はエラー番号が返される。"
7399
7400 #. type: Plain text
7401 #: build/C/man2/posix_fadvise.2:94
7402 msgid "The I<fd> argument was not a valid file descriptor."
7403 msgstr "I<fd> 引き数が有効なファイルディスクリプタでない。"
7404
7405 #. type: Plain text
7406 #: build/C/man2/posix_fadvise.2:97
7407 msgid "An invalid value was specified for I<advice>."
7408 msgstr "無効な値が I<advice> に指定された。"
7409
7410 #. type: Plain text
7411 #: build/C/man2/posix_fadvise.2:104
7412 msgid ""
7413 "The specified file descriptor refers to a pipe or FIFO.  (Linux actually "
7414 "returns B<EINVAL> in this case.)"
7415 msgstr ""
7416 "指定されたファイルディスクリプタがパイプまたは FIFO を参照している (この場"
7417 "合、Linux は実際には B<EINVAL> を返す)。"
7418
7419 #.  of fadvise64_64()
7420 #. type: Plain text
7421 #: build/C/man2/posix_fadvise.2:112
7422 msgid ""
7423 "Kernel support first appeared in Linux 2.5.60; the underlying system call is "
7424 "called B<fadvise64>().  Library support has been provided since glibc "
7425 "version 2.2, via the wrapper function B<posix_fadvise>()."
7426 msgstr ""
7427 "カーネルによるサポートは Linux 2.5.60 で最初に登場し、\n"
7428 "対応するシステムコールは B<fadvise64>() という名前である。\n"
7429 "ライブラリによるサポートは glibc バージョン 2.2 以降で提供されており、\n"
7430 "ラッパー関数は B<posix_fadvise>() という名前である。"
7431
7432 #. type: Plain text
7433 #: build/C/man2/posix_fadvise.2:121
7434 msgid ""
7435 "POSIX.1-2001.  Note that the type of the I<len> argument was changed from "
7436 "I<size_t> to I<off_t> in POSIX.1-2003 TC1."
7437 msgstr ""
7438 "POSIX.1-2001.  I<len> 引き数の型が POSIX.1-2003 TC1 において I<size_t> から "
7439 "I<off_t> に変更された点に注意すること。"
7440
7441 #. type: Plain text
7442 #: build/C/man2/posix_fadvise.2:127
7443 msgid ""
7444 "Under Linux, B<POSIX_FADV_NORMAL> sets the readahead window to the default "
7445 "size for the backing device; B<POSIX_FADV_SEQUENTIAL> doubles this size, and "
7446 "B<POSIX_FADV_RANDOM> disables file readahead entirely.  These changes affect "
7447 "the entire file, not just the specified region (but other open file handles "
7448 "to the same file are unaffected)."
7449 msgstr ""
7450 "Linux では、B<POSIX_FADV_NORMAL> はバッキングデバイスの デフォルトサイズに先"
7451 "読み (readahead) ウインドウを設定する。 B<POSIX_FADV_SEQUENTIAL> はこのサイズ"
7452 "を 2 倍し、 B<POSIX_FADV_RANDOM> は先読みを全く無効にする。 これらの変更は"
7453 "ファイル全体に影響し、指定された領域のみに影響するわけではない (しかし同じ"
7454 "ファイルに対する他のオープンファイルハンドルは影響を受けない)。"
7455
7456 #. type: Plain text
7457 #: build/C/man2/posix_fadvise.2:134
7458 msgid ""
7459 "B<POSIX_FADV_WILLNEED> initiates a nonblocking read of the specified region "
7460 "into the page cache.  The amount of data read may be decreased by the kernel "
7461 "depending on virtual memory load.  (A few megabytes will usually be fully "
7462 "satisfied, and more is rarely useful.)"
7463 msgstr ""
7464 "B<POSIX_FADV_WILLNEED> は、 ページキャッシュに指定領域のブロックされない読み"
7465 "込みを開始する。 読み込まれるデータの総量は、 仮想メモリの負荷に依ってカーネ"
7466 "ルが減らすかもしれない (数メガバイトであれば通常は全く十分であり、 それより多"
7467 "くてもめったに役に立たない)。"
7468
7469 #. type: Plain text
7470 #: build/C/man2/posix_fadvise.2:138
7471 msgid ""
7472 "In kernels before 2.6.18, B<POSIX_FADV_NOREUSE> had the same semantics as "
7473 "B<POSIX_FADV_WILLNEED>.  This was probably a bug; since kernel 2.6.18, this "
7474 "flag is a no-op."
7475 msgstr ""
7476 "2.6.18 より前のカーネルでは、B<POSIX_FADV_NOREUSE> は B<POSIX_FADV_WILLNEED> "
7477 "と同じ意味であった。 これは多分バグであった。 カーネル 2.6.18 以降では、この"
7478 "フラグは何も行わない。"
7479
7480 #. type: Plain text
7481 #: build/C/man2/posix_fadvise.2:146
7482 msgid ""
7483 "B<POSIX_FADV_DONTNEED> attempts to free cached pages associated with the "
7484 "specified region.  This is useful, for example, while streaming large "
7485 "files.  A program may periodically request the kernel to free cached data "
7486 "that has already been used, so that more useful cached pages are not "
7487 "discarded instead."
7488 msgstr ""
7489 "B<POSIX_FADV_DONTNEED> は指定された領域に関連付けられた キャッシュページを解"
7490 "放しようとする。 例えば、これは大きなファイルをストリーミングするときに役立"
7491 "つ。 プログラムは、使用済みのキャッシュされたデータを解放するように、 定期的"
7492 "にカーネルに要求するかもしれない。 そうすることにより、さらに有効なキャッシュ"
7493 "されたページが、 代わりに破棄されることはない。"
7494
7495 #. type: Plain text
7496 #: build/C/man2/posix_fadvise.2:154
7497 msgid ""
7498 "Pages that have not yet been written out will be unaffected, so if the "
7499 "application wishes to guarantee that pages will be released, it should call "
7500 "B<fsync>(2)  or B<fdatasync>(2)  first."
7501 msgstr ""
7502 "まだ書き出されていないページは影響を受けないので、 そのページの解放が保証され"
7503 "ることをアプリケーションが望んでいるなら、 最初に B<fsync>(2)  または "
7504 "B<fdatasync>(2)  を呼ぶべきである。"
7505
7506 #. type: SS
7507 #: build/C/man2/posix_fadvise.2:154
7508 #, no-wrap
7509 msgid "Architecture-specific variants"
7510 msgstr "アーキテクチャ固有の派生バージョン"
7511
7512 #. type: Plain text
7513 #: build/C/man2/posix_fadvise.2:171
7514 msgid ""
7515 "Some architectures require 64-bit arguments to be aligned in a suitable pair "
7516 "of registers (see B<syscall>(2)  for further detail).  On such "
7517 "architectures, the call signature of B<posix_fadvise>()  shown in the "
7518 "SYNOPSIS would force a register to be wasted as padding between the I<fd> "
7519 "and I<len> arguments.  Therefore, these architectures define a version of "
7520 "the system call that orders the arguments suitably, but otherwise is "
7521 "otherwise exactly the same as B<posix_fadvise>()."
7522 msgstr ""
7523 "いくつかのアーキテクチャでは、 64 ビットの引き数は適切なレジスタの組に割り当"
7524 "てる必要がある (B<syscall>(2) 参照)。 このようなアーキテクチャでは、 「書式」"
7525 "に書かれている  B<posix_fadvise>() の呼び出しシグネチャーで、 引き数 I<fd> "
7526 "と I<offset> の間のパディング (詰めもの) でレジスタが一つ消費されてしまう。 "
7527 "そのため、 これらのアーキテクチャでは引き数が適切な順序になった別のシステム"
7528 "コールが定義されているが、 それ以外は B<posix_fadvise>() と全く同じである。"
7529
7530 #. type: Plain text
7531 #: build/C/man2/posix_fadvise.2:173
7532 msgid "For example, since Linux 2.6.14, ARM has the following system call:"
7533 msgstr ""
7534 "例えば、 Linux 2.6.14 以降では、 ARM には以下のシステムコールが存在する。"
7535
7536 #. type: Plain text
7537 #: build/C/man2/posix_fadvise.2:178
7538 #, no-wrap
7539 msgid ""
7540 "B<long arm_fadvise64_64(int >I<fd>B<, int >I<advice>B<,>\n"
7541 "B<                      loff_t >I<offset>B<, loff_t >I<len>B<);>\n"
7542 msgstr ""
7543 "B<long arm_fadvise64_64(int >I<fd>B<, int >I<advice>B<,>\n"
7544 "B<                      loff_t >I<offset>B<, loff_t >I<len>B<);>\n"
7545
7546 #. type: Plain text
7547 #: build/C/man2/posix_fadvise.2:186
7548 msgid ""
7549 "These architecture-specific details are generally hidden from applications "
7550 "by the glibc B<posix_fadvise>()  wrapper function, which invokes the "
7551 "appropriate architecture-specific system call."
7552 msgstr ""
7553 "通常、 glibc の B<posix_fadvise>() ラッパー関数により、 これらのアーキテク"
7554 "チャ固有の詳細はアプリケーションには見えない。 glibc のラッパー関数では、適切"
7555 "なアーキテクチャ固有のシステムコールが呼び出される。"
7556
7557 #. type: Plain text
7558 #: build/C/man2/posix_fadvise.2:191
7559 msgid ""
7560 "In kernels before 2.6.6, if I<len> was specified as 0, then this was "
7561 "interpreted literally as \"zero bytes\", rather than as meaning \"all bytes "
7562 "through to the end of the file\"."
7563 msgstr ""
7564 "2.6.6 より前のカーネルでは、 I<len> に 0 が指定された場合、 「ファイルの終り"
7565 "までの全てのバイト」という意味ではなく、 文字通り「0 バイト」として解釈されて"
7566 "いた。"
7567
7568 #.  FIXME . Write a posix_fadvise(3) page.
7569 #. type: Plain text
7570 #: build/C/man2/posix_fadvise.2:197
7571 msgid ""
7572 "B<readahead>(2), B<sync_file_range>(2), B<posix_fallocate>(3), "
7573 "B<posix_madvise>(3)"
7574 msgstr ""
7575 "B<readahead>(2), B<sync_file_range>(2), B<posix_fallocate>(3),\n"
7576 "B<posix_madvise>(3)"
7577
7578 #. type: TH
7579 #: build/C/man3/posix_fallocate.3:25
7580 #, no-wrap
7581 msgid "POSIX_FALLOCATE"
7582 msgstr "POSIX_FALLOCATE"
7583
7584 #. type: TH
7585 #: build/C/man3/posix_fallocate.3:25 build/C/man2/shmop.2:41
7586 #, no-wrap
7587 msgid "2013-02-12"
7588 msgstr "2013-02-12"
7589
7590 #. type: Plain text
7591 #: build/C/man3/posix_fallocate.3:28
7592 msgid "posix_fallocate - allocate file space"
7593 msgstr "posix_fallocate - ファイルのスペースを確保する"
7594
7595 #. type: Plain text
7596 #: build/C/man3/posix_fallocate.3:33
7597 #, no-wrap
7598 msgid "B<int posix_fallocate(int >I<fd>B<, off_t >I<offset>B<, off_t >I<len>B<);>\n"
7599 msgstr "B<int posix_fallocate(int >I<fd>B<, off_t >I<offset>B<, off_t >I<len>B<);>\n"
7600
7601 #. type: Plain text
7602 #: build/C/man3/posix_fallocate.3:42
7603 msgid "B<posix_fallocate>():"
7604 msgstr "B<posix_fallocate>():"
7605
7606 #. type: Plain text
7607 #: build/C/man3/posix_fallocate.3:61
7608 msgid ""
7609 "The function B<posix_fallocate>()  ensures that disk space is allocated for "
7610 "the file referred to by the descriptor I<fd> for the bytes in the range "
7611 "starting at I<offset> and continuing for I<len> bytes.  After a successful "
7612 "call to B<posix_fallocate>(), subsequent writes to bytes in the specified "
7613 "range are guaranteed not to fail because of lack of disk space."
7614 msgstr ""
7615 "関数 B<posix_fallocate>()  は、ディスクリプタ I<fd> で参照されるファイルに対"
7616 "して、ディスクスペースを確実に確保する。 ディスクスペースは I<offset> から始"
7617 "まる I<len> バイトの範囲のバイトである。 B<posix_fallocate>()  の呼び出しが成"
7618 "功した後、指定された範囲のバイトに対する書き込みは、 ディスクスペースの不足で"
7619 "失敗しないことが保証される。"
7620
7621 #. type: Plain text
7622 #: build/C/man3/posix_fallocate.3:66
7623 msgid ""
7624 "If the size of the file is less than I<offset>+I<len>, then the file is "
7625 "increased to this size; otherwise the file size is left unchanged."
7626 msgstr ""
7627 "ファイルのサイズが I<offset>+I<len> より小さい場合、ファイルはこのサイズにな"
7628 "るように拡大される。 それ以外の場合、ファイルサイズは変わらない。"
7629
7630 #. type: Plain text
7631 #: build/C/man3/posix_fallocate.3:72
7632 msgid ""
7633 "B<posix_fallocate>()  returns zero on success, or an error number on "
7634 "failure.  Note that I<errno> is not set."
7635 msgstr ""
7636 "B<posix_fallocate>()  は成功した場合、0 を返す。 失敗した場合、エラー番号を返"
7637 "す。 I<errno> が設定されない点に注意すること。"
7638
7639 #. type: Plain text
7640 #: build/C/man3/posix_fallocate.3:81
7641 msgid "I<offset+len> exceeds the maximum file size."
7642 msgstr "I<offset+len> が最大ファイルサイズを超えている。"
7643
7644 #. type: Plain text
7645 #: build/C/man3/posix_fallocate.3:91
7646 msgid "I<fd> does not refer to a regular file."
7647 msgstr "I<fd> が通常のファイルとして参照されていない。"
7648
7649 #. type: Plain text
7650 #: build/C/man3/posix_fallocate.3:100
7651 msgid "I<fd> refers to a pipe."
7652 msgstr "I<fd> がパイプを参照している。"
7653
7654 #. type: Plain text
7655 #: build/C/man3/posix_fallocate.3:103
7656 msgid "B<posix_fallocate>()  is available since glibc 2.1.94."
7657 msgstr "B<posix_fallocate>()  は glibc 2.1.94 以降で利用可能である。"
7658
7659 #. type: Plain text
7660 #: build/C/man3/posix_fallocate.3:128
7661 msgid ""
7662 "POSIX.1-2008 says that an implementation I<shall> give the B<EINVAL> error "
7663 "if I<len> was 0, or I<offset> was less than 0.  POSIX.1-2001 says that an "
7664 "implementation I<shall> give the B<EINVAL> error if I<len> is less than 0, "
7665 "or I<offset> was less than 0, and I<may> give the error if I<len> equals "
7666 "zero."
7667 msgstr ""
7668 "POSIX.1-2008 では、 I<len> が 0 の場合、もしくは I<offset> が 0 未満の場合、 "
7669 "B<EINVAL> エラーを返すものとされている。 POSIX.1-2001 では、 I<len> が 0 未満"
7670 "の場合、もしくは I<offset> が 0 未満の場合、 B<EINVAL> エラーを返すものとされ"
7671 "ている。また、 I<len> が 0 の場合、 B<EINVAL> エラーを返してもよいとされてい"
7672 "る。"
7673
7674 #. type: Plain text
7675 #: build/C/man3/posix_fallocate.3:133
7676 msgid "B<fallocate>(1), B<fallocate>(2), B<lseek>(2), B<posix_fadvise>(2)"
7677 msgstr "B<fallocate>(1), B<fallocate>(2), B<lseek>(2), B<posix_fadvise>(2)"
7678
7679 #. type: TH
7680 #: build/C/man3/posix_memalign.3:29
7681 #, no-wrap
7682 msgid "POSIX_MEMALIGN"
7683 msgstr "POSIX_MEMALIGN"
7684
7685 #. type: TH
7686 #: build/C/man3/posix_memalign.3:29
7687 #, no-wrap
7688 msgid "2013-09-02"
7689 msgstr "2013-09-02"
7690
7691 #. type: Plain text
7692 #: build/C/man3/posix_memalign.3:32
7693 msgid ""
7694 "posix_memalign, aligned_alloc, memalign, valloc, pvalloc - allocate aligned "
7695 "memory"
7696 msgstr ""
7697 "posix_memalign, aligned_alloc, memalign, valloc, pvalloc - アラインメント\n"
7698 "されたメモリの割り当てを行う"
7699
7700 #. type: Plain text
7701 #: build/C/man3/posix_memalign.3:39
7702 #, no-wrap
7703 msgid ""
7704 "B<int posix_memalign(void **>I<memptr>B<, size_t >I<alignment>B<, size_t >I<size>B<);>\n"
7705 "B<void *aligned_alloc(size_t >I<alignment>B<, size_t >I<size>B<);>\n"
7706 "B<void *valloc(size_t >I<size>B<);>\n"
7707 msgstr ""
7708 "B<int posix_memalign(void **>I<memptr>B<, size_t >I<alignment>B<, size_t >I<size>B<);>\n"
7709 "B<void *aligned_alloc(size_t >I<alignment>B<, size_t >I<size>B<);>\n"
7710 "B<void *valloc(size_t >I<size>B<);>\n"
7711
7712 #. type: Plain text
7713 #: build/C/man3/posix_memalign.3:44
7714 #, no-wrap
7715 msgid ""
7716 "B<void *memalign(size_t >I<alignment>B<, size_t >I<size>B<);>\n"
7717 "B<void *pvalloc(size_t >I<size>B<);>\n"
7718 msgstr ""
7719 "B<void *memalign(size_t >I<alignment>B<, size_t >I<size>B<);>\n"
7720 "B<void *pvalloc(size_t >I<size>B<);>\n"
7721
7722 #. type: Plain text
7723 #: build/C/man3/posix_memalign.3:54
7724 msgid ""
7725 "B<posix_memalign>(): _POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ "
7726 "E<gt>=\\ 600"
7727 msgstr ""
7728 "B<posix_memalign>(): _POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ "
7729 "E<gt>=\\ 600"
7730
7731 #. type: Plain text
7732 #: build/C/man3/posix_memalign.3:57
7733 msgid "B<aligned_alloc>(): _ISOC11_SOURCE"
7734 msgstr "B<aligned_alloc>(): _ISOC11_SOURCE"
7735
7736 #. type: Plain text
7737 #: build/C/man3/posix_memalign.3:59
7738 msgid "B<valloc>():"
7739 msgstr "B<valloc>():"
7740
7741 #. type: TP
7742 #: build/C/man3/posix_memalign.3:62
7743 #, no-wrap
7744 msgid "Since glibc 2.12:"
7745 msgstr "glibc 2.12 以降:"
7746
7747 #. type: Plain text
7748 #: build/C/man3/posix_memalign.3:69
7749 #, no-wrap
7750 msgid ""
7751 "_BSD_SOURCE ||\n"
7752 "    (_XOPEN_SOURCE\\ E<gt>=\\ 500 ||\n"
7753 "        _XOPEN_SOURCE\\ &&\\ _XOPEN_SOURCE_EXTENDED) &&\n"
7754 "    !(_POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ E<gt>=\\ 600)\n"
7755 msgstr ""
7756 "_BSD_SOURCE ||\n"
7757 "    (_XOPEN_SOURCE\\ E<gt>=\\ 500 ||\n"
7758 "        _XOPEN_SOURCE\\ &&\\ _XOPEN_SOURCE_EXTENDED) &&\n"
7759 "    !(_POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ E<gt>=\\ 600)\n"
7760
7761 #. type: TP
7762 #: build/C/man3/posix_memalign.3:71
7763 #, no-wrap
7764 msgid "Before glibc 2.12:"
7765 msgstr "glibc 2.12 より前:"
7766
7767 #. type: Plain text
7768 #: build/C/man3/posix_memalign.3:75
7769 msgid ""
7770 "_BSD_SOURCE || _XOPEN_SOURCE\\ E<gt>=\\ 500 || _XOPEN_SOURCE\\ &&\\ "
7771 "_XOPEN_SOURCE_EXTENDED"
7772 msgstr ""
7773 "_BSD_SOURCE || _XOPEN_SOURCE\\ E<gt>=\\ 500 || _XOPEN_SOURCE\\ &&\\ "
7774 "_XOPEN_SOURCE_EXTENDED"
7775
7776 #. type: Plain text
7777 #: build/C/man3/posix_memalign.3:82
7778 msgid ""
7779 "(The (nonstandard) header file I<E<lt>malloc.hE<gt>> also exposes the "
7780 "declaration of B<valloc>(); no feature test macros are required.)"
7781 msgstr ""
7782 "((非標準の) ヘッダファイル I<E<lt>malloc.hE<gt>> も\n"
7783 "B<valloc>() の宣言も公開する。機能検査マクロは不要である。"
7784
7785 #.  glibc does this:
7786 #. type: Plain text
7787 #: build/C/man3/posix_memalign.3:104
7788 msgid ""
7789 "The function B<posix_memalign>()  allocates I<size> bytes and places the "
7790 "address of the allocated memory in I<*memptr>.  The address of the allocated "
7791 "memory will be a multiple of I<alignment>, which must be a power of two and "
7792 "a multiple of I<sizeof(void\\ *)>.  If I<size> is 0, then the value placed "
7793 "in I<*memptr> is either NULL, or a unique pointer value that can later be "
7794 "successfully passed to B<free>(3)."
7795 msgstr ""
7796 "関数 B<posix_memalign>()  は、 I<size> バイトのメモリを割り当て、割り当てられ"
7797 "たメモリのアドレスを I<*memptr> に設定する。 割り当てられたメモリのアドレス"
7798 "は I<alignment> の倍数になっているはずである。 I<alignment> は 2 のべき乗で、"
7799 "かつ I<sizeof(void\\ *)> の倍数でなければならない。 I<size> が 0 の場合、 "
7800 "I<*memptr> には NULL か一意なポインタ値が書かれる。 このポインタ値は、後で "
7801 "B<free>(3)  に問題なく渡すことができる。"
7802
7803 #.  The behavior of memalign() for size==0 is as for posix_memalign()
7804 #.  but no standards govern this.
7805 #. type: Plain text
7806 #: build/C/man3/posix_memalign.3:115
7807 msgid ""
7808 "The obsolete function B<memalign>()  allocates I<size> bytes and returns a "
7809 "pointer to the allocated memory.  The memory address will be a multiple of "
7810 "I<alignment>, which must be a power of two."
7811 msgstr ""
7812 "廃止された関数である B<memalign>() は、 I<size> バイトのメモリを割り当て、\n"
7813 "割り当てられたメモリへのポインタを返す。 メモリのアドレスは I<alignment> \n"
7814 "の倍数になっているはずである。 I<alignment> は 2 のべき乗でなければならない。"
7815
7816 #. type: Plain text
7817 #: build/C/man3/posix_memalign.3:124
7818 msgid ""
7819 "The function B<aligned_alloc>()  is the same as B<memalign>(), except for "
7820 "the added restriction that I<size> should be a multiple of I<alignment>."
7821 msgstr ""
7822 "関数 B<aligned_alloc>() は B<memalign>() と同じだが、I<size> が "
7823 "I<alignment>\n"
7824 "の倍数でなければならないという追加の制限がある点が異なる。"
7825
7826 #. type: Plain text
7827 #: build/C/man3/posix_memalign.3:133
7828 msgid ""
7829 "The obsolete function B<valloc>()  allocates I<size> bytes and returns a "
7830 "pointer to the allocated memory.  The memory address will be a multiple of "
7831 "the page size.  It is equivalent to I<memalign(sysconf(_SC_PAGESIZE),size)>."
7832 msgstr ""
7833 "廃止された関数である B<valloc>()  は I<size> バイトのメモリを割り当て、割り当"
7834 "てられたメモリへのポインタを返す。 メモリのアドレスはページサイズの倍数になっ"
7835 "ているはずである。 これは I<memalign(sysconf(_SC_PAGESIZE),size)> と等価であ"
7836 "る。"
7837
7838 #. type: Plain text
7839 #: build/C/man3/posix_memalign.3:140
7840 msgid ""
7841 "The obsolete function B<pvalloc>()  is similar to B<valloc>(), but rounds "
7842 "the size of the allocation up to the next multiple of the system page size."
7843 msgstr ""
7844 "廃止された関数 B<pvalloc>() は B<valloc>() と同様だが、\n"
7845 "割り当てられるサイズがシステムのページサイズの倍数に切り上げられる。"
7846
7847 #. type: Plain text
7848 #: build/C/man3/posix_memalign.3:142
7849 msgid "For all of these functions, the memory is not zeroed."
7850 msgstr "これらの関数はいずれもメモリのゼロクリアを行わない。"
7851
7852 #. type: Plain text
7853 #: build/C/man3/posix_memalign.3:149
7854 msgid ""
7855 "B<aligned_alloc>(), B<memalign>(), B<valloc>(), and B<pvalloc>()  return a "
7856 "pointer to the allocated memory, or NULL if the request fails."
7857 msgstr ""
7858 "B<aligned_alloc>(), B<memalign>(), B<valloc>(), B<pvalloc>() は割り当てられ"
7859 "た\n"
7860 "メモリへのポインタを返す。 割り当てに失敗した場合は NULL を返す。"
7861
7862 #. type: Plain text
7863 #: build/C/man3/posix_memalign.3:157
7864 msgid ""
7865 "B<posix_memalign>()  returns zero on success, or one of the error values "
7866 "listed in the next section on failure.  The value of I<errno> is "
7867 "indeterminate after a call to B<posix_memalign>()."
7868 msgstr ""
7869 "B<posix_memalign>()  は成功した場合は 0 を返し、 失敗した場合は次のセクション"
7870 "に記載されたエラー値のいずれかを返す。 B<posix_memalign>() の呼び出し後は "
7871 "I<errno> の値は不定である。"
7872
7873 #. type: Plain text
7874 #: build/C/man3/posix_memalign.3:164
7875 msgid ""
7876 "The I<alignment> argument was not a power of two, or was not a multiple of "
7877 "I<sizeof(void\\ *)>."
7878 msgstr ""
7879 "I<alignment> 引き数が 2 のべき乗でなかったか、 I<sizeof(void\\ *)> の倍数でな"
7880 "かった。"
7881
7882 #. type: Plain text
7883 #: build/C/man3/posix_memalign.3:167
7884 msgid "There was insufficient memory to fulfill the allocation request."
7885 msgstr "割り当て要求を満たすのに十分なメモリがなかった。"
7886
7887 #. type: Plain text
7888 #: build/C/man3/posix_memalign.3:174
7889 msgid ""
7890 "The functions B<memalign>(), B<valloc>(), and B<pvalloc>()  have been "
7891 "available in all Linux libc libraries."
7892 msgstr ""
7893 "関数 B<memalign>(), B<valloc>(), B<pvalloc>() は\n"
7894 "すべての Linux libc ライブラリで使用可能である。"
7895
7896 #. type: Plain text
7897 #: build/C/man3/posix_memalign.3:178
7898 msgid "The function B<aligned_alloc>()  was added to glibc in version 2.16."
7899 msgstr "関数 B<aligned_alloc>() は glibc バージョン 2.16 で追加された。"
7900
7901 #. type: Plain text
7902 #: build/C/man3/posix_memalign.3:182
7903 msgid "The function B<posix_memalign>()  is available since glibc 2.1.91."
7904 msgstr "関数 B<posix_fallocate>() は glibc 2.1.91 以降で利用可能である。"
7905
7906 #. type: Plain text
7907 #: build/C/man3/posix_memalign.3:189
7908 msgid ""
7909 "The function B<valloc>()  appeared in 3.0BSD.  It is documented as being "
7910 "obsolete in 4.3BSD, and as legacy in SUSv2.  It does not appear in "
7911 "POSIX.1-2001."
7912 msgstr ""
7913 "関数 B<valloc>() は 3.0BSD で登場した。4.3BSD では廃止されたと記載されてお"
7914 "り、\n"
7915 "SUSv2 では過去の名残だと記載されている。 POSIX.1-2001 には存在しない。"
7916
7917 #. type: Plain text
7918 #: build/C/man3/posix_memalign.3:193
7919 msgid "The function B<pvalloc>()  is a GNU extension."
7920 msgstr "関数 B<pvalloc>() は GNU による拡張である。"
7921
7922 #. type: Plain text
7923 #: build/C/man3/posix_memalign.3:197
7924 msgid "The function B<memalign>()  appears in SunOS 4.1.3 but not in 4.4BSD."
7925 msgstr "関数 B<memalign>() は SunOS 4.1.3 で登場したが、4.4BSD にはない。"
7926
7927 #. type: Plain text
7928 #: build/C/man3/posix_memalign.3:201
7929 msgid "The function B<posix_memalign>()  comes from POSIX.1d."
7930 msgstr "関数 B<posix_memalign>() は POSIX.1d に由来する。"
7931
7932 #. type: Plain text
7933 #: build/C/man3/posix_memalign.3:206
7934 msgid "The function B<aligned_alloc>()  is specified in the C11 standard."
7935 msgstr "関数 I<aligned_alloc>() は C11 標準で規定されている。"
7936
7937 #. type: SS
7938 #: build/C/man3/posix_memalign.3:206
7939 #, no-wrap
7940 msgid "Headers"
7941 msgstr "ヘッダ"
7942
7943 #. type: Plain text
7944 #: build/C/man3/posix_memalign.3:210
7945 msgid ""
7946 "Everybody agrees that B<posix_memalign>()  is declared in I<E<lt>stdlib."
7947 "hE<gt>>."
7948 msgstr ""
7949 "B<posix_memalign>()  の宣言を I<E<lt>stdlib.hE<gt>> で行うことに関しては、 皆"
7950 "の意見が一致している。"
7951
7952 #. type: Plain text
7953 #: build/C/man3/posix_memalign.3:214
7954 msgid ""
7955 "On some systems B<memalign>()  is declared in I<E<lt>stdlib.hE<gt>> instead "
7956 "of I<E<lt>malloc.hE<gt>>."
7957 msgstr ""
7958 "いくつかのシステムでは、 B<memalign>()  は I<E<lt>malloc.hE<gt>> ではなく "
7959 "I<E<lt>stdlib.hE<gt>> で宣言されている。"
7960
7961 #. type: Plain text
7962 #: build/C/man3/posix_memalign.3:221
7963 msgid ""
7964 "According to SUSv2, B<valloc>()  is declared in I<E<lt>stdlib.hE<gt>>.  "
7965 "Libc4,5 and glibc declare it in I<E<lt>malloc.hE<gt>>, and also in "
7966 "I<E<lt>stdlib.hE<gt>> if suitable feature test macros are defined (see "
7967 "above)."
7968 msgstr ""
7969 "SUSv2 によると、 B<valloc>() は I<E<lt>stdlib.hE<gt>> で宣言される。 "
7970 "libc4,5\n"
7971 "や glibc では I<E<lt>malloc.hE<gt>> で宣言されており、 さらに適切な機能検査\n"
7972 "マクロが定義された場合には I<E<lt>stdlib.hE<gt>> でも宣言される(上記を参照)。"
7973
7974 #. type: Plain text
7975 #: build/C/man3/posix_memalign.3:230
7976 msgid ""
7977 "On many systems there are alignment restrictions, for example, on buffers "
7978 "used for direct block device I/O.  POSIX specifies the I<pathconf(path,"
7979 "_PC_REC_XFER_ALIGN)> call that tells what alignment is needed.  Now one can "
7980 "use B<posix_memalign>()  to satisfy this requirement."
7981 msgstr ""
7982 "多くのシステムでは、アラインメントに関して制限がある。例えば、 ブロックデバイ"
7983 "スに対するダイレクト I/O に使用するバッファには アラインメントに関する制限が"
7984 "ある。 POSIX では、どんなアラインメントが必要かを知るために I<pathconf(path,"
7985 "_PC_REC_XFER_ALIGN)> コールを規定している。ここで B<posix_memalign>()  を使う"
7986 "と、この必要条件を満たすことができる。"
7987
7988 #. type: Plain text
7989 #: build/C/man3/posix_memalign.3:239
7990 msgid ""
7991 "B<posix_memalign>()  verifies that I<alignment> matches the requirements "
7992 "detailed above.  B<memalign>()  may not check that the I<alignment> argument "
7993 "is correct."
7994 msgstr ""
7995 "B<posix_memalign>() は I<alignment> が上で詳細に述べた必要条件を満たすか\n"
7996 "どうかを確かめる。 B<memalign>() は I<alignment> 引き数が正しいかどうかの\n"
7997 "確認を行わないかもしれない。"
7998
7999 #.  Other systems allow passing the result of
8000 #.  .IR valloc ()
8001 #.  to
8002 #.  .IR free (3),
8003 #.  but not to
8004 #.  .IR realloc (3).
8005 #. type: Plain text
8006 #: build/C/man3/posix_memalign.3:267
8007 msgid ""
8008 "POSIX requires that memory obtained from B<posix_memalign>()  can be freed "
8009 "using B<free>(3).  Some systems provide no way to reclaim memory allocated "
8010 "with B<memalign>()  or B<valloc>()  (because one can pass to B<free>(3)  "
8011 "only a pointer obtained from B<malloc>(3), while, for example, B<memalign>"
8012 "()  would call B<malloc>(3)  and then align the obtained value).  The glibc "
8013 "implementation allows memory obtained from any of these functions to be "
8014 "reclaimed with B<free>(3)."
8015 msgstr ""
8016 "POSIX では B<posix_memalign>() によって獲得したメモリは B<free>(3) を\n"
8017 "使って解放することができる必要がある。 いくつかのシステムでは\n"
8018 "B<memalign>() やB<valloc>() で割り当てられたメモリを再利用する手段が\n"
8019 "提供されていない(なぜなら B<free>(3) に渡すことができるのは\n"
8020 "B<malloc>(3) から受け取ったポインタだけだが、例えば B<memalign>() は\n"
8021 "B<malloc>(3) を呼び出し、得た値をアラインメントしてしまうからである)。\n"
8022 "glibc の実装では、 ここに述べた関数のいずれで獲得したメモリも\n"
8023 "B<free>(3) で再利用することができる。"
8024
8025 #. type: Plain text
8026 #: build/C/man3/posix_memalign.3:272
8027 msgid ""
8028 "The glibc B<malloc>(3)  always returns 8-byte aligned memory addresses, so "
8029 "these functions are needed only if you require larger alignment values."
8030 msgstr ""
8031 "glibc の B<malloc>(3) は常に 8 バイトにアラインメントされたメモリアドレスを\n"
8032 "返すので、ここで述べた関数が必要になるのは 8 バイトよりも大きなアラインメン"
8033 "ト\n"
8034 "が必要な場合だけである。"
8035
8036 #. type: Plain text
8037 #: build/C/man3/posix_memalign.3:277
8038 msgid "B<brk>(2), B<getpagesize>(2), B<free>(3), B<malloc>(3)"
8039 msgstr "B<brk>(2), B<getpagesize>(2), B<free>(3), B<malloc>(3)"
8040
8041 #. type: TH
8042 #: build/C/man2/readahead.2:28
8043 #, no-wrap
8044 msgid "READAHEAD"
8045 msgstr "READAHEAD"
8046
8047 #. type: TH
8048 #: build/C/man2/readahead.2:28
8049 #, no-wrap
8050 msgid "2014-03-15"
8051 msgstr "2014-03-15"
8052
8053 #. type: Plain text
8054 #: build/C/man2/readahead.2:31
8055 msgid "readahead - initiate file readahead into page cache"
8056 msgstr "readahead - 前もってファイルをページ・キャッシュに読み込む"
8057
8058 #. type: Plain text
8059 #: build/C/man2/readahead.2:37
8060 #, no-wrap
8061 msgid "B<ssize_t readahead(int >I<fd>B<, off64_t >I<offset>B<, size_t >I<count>B<);>\n"
8062 msgstr "B<ssize_t readahead(int >I<fd>B<, off64_t >I<offset>B<, size_t >I<count>B<);>\n"
8063
8064 #. type: Plain text
8065 #: build/C/man2/readahead.2:44
8066 msgid ""
8067 "B<readahead>()  initiates readahead on a file so that subsequent reads from "
8068 "that file will be satisfied from the cache, and not block on disk I/O "
8069 "(assuming the readahead was initiated early enough and that other activity "
8070 "on the system did not in the meantime flush pages from the cache)."
8071 msgstr ""
8072
8073 #. type: Plain text
8074 #: build/C/man2/readahead.2:66
8075 msgid ""
8076 "The I<fd> argument is a file descriptor identifying the file which is to be "
8077 "read.  The I<offset> argument specifies the starting point from which data "
8078 "is to be read and I<count> specifies the number of bytes to be read.  I/O is "
8079 "performed in whole pages, so that I<offset> is effectively rounded down to a "
8080 "page boundary and bytes are read up to the next page boundary greater than "
8081 "or equal to I<(offset+count)>.  B<readahead>()  does not read beyond the end "
8082 "of the file.  The current file offset of the open file referred to by I<fd> "
8083 "is left unchanged."
8084 msgstr ""
8085 "I<fd> 引き数は読み込みを行うファイルを識別するファイル・ディスクリプタであ"
8086 "る。 I<offset> 引き数はデータの読み込み開始位置を指定し、 I<count> は読み込む"
8087 "データのバイト数を指定する。 ディスク I/O はページ単位で実行されるので、 実際"
8088 "には I<offset> はページ境界に切り下げられ、読み込みバイト数は I<(offset"
8089 "+count)> より小さくない次のページ境界まで切り上げられる。 B<readahead>()  は"
8090 "ファイルの末尾を越えた範囲まで読み出しを行うことはない。 I<fd> で参照された"
8091 "オープン済のファイルのファイルオフセットの現在値は 変更されない。"
8092
8093 #. type: Plain text
8094 #: build/C/man2/readahead.2:72
8095 msgid ""
8096 "On success, B<readahead>()  returns 0; on failure, -1 is returned, with "
8097 "I<errno> set to indicate the cause of the error."
8098 msgstr ""
8099 "B<readahead>()  は成功すると 0 を返す。失敗した場合 -1 を返し、 I<errno> にエ"
8100 "ラーの原因を示す値を設定する。"
8101
8102 #. type: Plain text
8103 #: build/C/man2/readahead.2:77
8104 msgid "I<fd> is not a valid file descriptor or is not open for reading."
8105 msgstr ""
8106 "I<fd> が有効なファイル・ディスクリプタでない、または 読み込み用にオープンされ"
8107 "ていない。"
8108
8109 #. type: Plain text
8110 #: build/C/man2/readahead.2:83
8111 msgid ""
8112 "I<fd> does not refer to a file type to which B<readahead>()  can be applied."
8113 msgstr ""
8114 "I<fd> が参照しているファイルが、 B<readahead>()  を行うことができないタイプの"
8115 "ファイルであった。"
8116
8117 #. type: Plain text
8118 #: build/C/man2/readahead.2:88
8119 msgid ""
8120 "The B<readahead>()  system call appeared in Linux 2.4.13; glibc support has "
8121 "been provided since version 2.3."
8122 msgstr ""
8123 "B<readahead>()  システムコールは Linux 2.4.13 で登場した。 glibc でのサポート"
8124 "は glibc バージョン 2.3 以降で行われている。"
8125
8126 #. type: Plain text
8127 #: build/C/man2/readahead.2:93
8128 msgid ""
8129 "The B<readahead>()  system call is Linux-specific, and its use should be "
8130 "avoided in portable applications."
8131 msgstr ""
8132 "B<readahead>()  システムコールは Linux 固有であり、移植を考慮したプログラムで"
8133 "は 使用を避けるべきである。"
8134
8135 #. type: Plain text
8136 #: build/C/man2/readahead.2:98
8137 msgid ""
8138 "On some 32-bit architectures, the calling signature for this system call "
8139 "differs, for the reasons described in B<syscall>(2)."
8140 msgstr ""
8141 "いくつかの 32 ビットアーキテクチャでは、このシステムコールの呼び出しシグネ"
8142 "チャーが違っている。 理由は B<syscall>(2) で説明されている。"
8143
8144 #. type: Plain text
8145 #: build/C/man2/readahead.2:107
8146 msgid ""
8147 "B<readahead>()  attempts to schedule the reads in the background and return "
8148 "immediately.  However, it may block while it reads the filesystem metadata "
8149 "needed to locate the requested blocks.  This occurs frequently with ext[234] "
8150 "on large files using indirect blocks instead of extents, giving the "
8151 "appearance that the call blocks until the requested data has been read."
8152 msgstr ""
8153
8154 #. type: Plain text
8155 #: build/C/man2/readahead.2:113
8156 msgid "B<lseek>(2), B<madvise>(2), B<mmap>(2), B<posix_fadvise>(2), B<read>(2)"
8157 msgstr ""
8158 "B<lseek>(2), B<madvise>(2), B<mmap>(2), B<posix_fadvise>(2), B<read>(2)"
8159
8160 #. type: TH
8161 #: build/C/man2/remap_file_pages.2:28
8162 #, no-wrap
8163 msgid "REMAP_FILE_PAGES"
8164 msgstr "REMAP_FILE_PAGES"
8165
8166 #. type: Plain text
8167 #: build/C/man2/remap_file_pages.2:31
8168 msgid "remap_file_pages - create a nonlinear file mapping"
8169 msgstr "remap_file_pages - 非線形ファイルマッピングを作成する。"
8170
8171 #. type: Plain text
8172 #: build/C/man2/remap_file_pages.2:35
8173 #, no-wrap
8174 msgid ""
8175 "B<#define _GNU_SOURCE>         /* See feature_test_macros(7) */\n"
8176 "B<#include E<lt>sys/mman.hE<gt>>\n"
8177 msgstr ""
8178 "B<#define _GNU_SOURCE>         /* feature_test_macros(7) 参照 */\n"
8179 "B<#include E<lt>sys/mman.hE<gt>>\n"
8180
8181 #. type: Plain text
8182 #: build/C/man2/remap_file_pages.2:38
8183 #, no-wrap
8184 msgid ""
8185 "B<int remap_file_pages(void *>I<addr>B<, size_t >I<size>B<, int >I<prot>B<,>\n"
8186 "B<                     ssize_t >I<pgoff>B<, int >I<flags>B<);>\n"
8187 msgstr ""
8188 "B<int remap_file_pages(void *>I<addr>B<, size_t >I<size>B<, int >I<prot>B<,>\n"
8189 "B<                     ssize_t >I<pgoff>B<, int >I<flags>B<);>\n"
8190
8191 #. type: Plain text
8192 #: build/C/man2/remap_file_pages.2:51
8193 msgid ""
8194 "The B<remap_file_pages>()  system call is used to create a nonlinear "
8195 "mapping, that is, a mapping in which the pages of the file are mapped into a "
8196 "nonsequential order in memory.  The advantage of using B<remap_file_pages>"
8197 "()  over using repeated calls to B<mmap>(2)  is that the former approach "
8198 "does not require the kernel to create additional VMA (Virtual Memory Area) "
8199 "data structures."
8200 msgstr ""
8201 "B<remap_file_pages>()  システムコールは非線形なマッピング、 つまりファイルの"
8202 "ページがメモリ上で連続しない順番でマップされる マッピングを作成するために使わ"
8203 "れる。 B<remap_file_pages>()  を使う方が B<mmap>(2)  を繰り返して使うより優れ"
8204 "ている点は、 前者の方法ではカーネルが VMA (Virtual Memory Area, 仮想メモリ領"
8205 "域)  データ構造体を追加で作成する必要がないことである。"
8206
8207 #. type: Plain text
8208 #: build/C/man2/remap_file_pages.2:53
8209 msgid "To create a nonlinear mapping we perform the following steps:"
8210 msgstr "非線形マッピングを作成するためには、 以下のようなステップを実行する:"
8211
8212 #. type: TP
8213 #: build/C/man2/remap_file_pages.2:53
8214 #, no-wrap
8215 msgid "1."
8216 msgstr "1."
8217
8218 #. type: Plain text
8219 #: build/C/man2/remap_file_pages.2:61
8220 msgid ""
8221 "Use B<mmap>(2)  to create a mapping (which is initially linear).  This "
8222 "mapping must be created with the B<MAP_SHARED> flag."
8223 msgstr ""
8224 "B<mmap>(2)  を使い、マッピングを作成する (このマッピングは最初は線形であ"
8225 "る)。 このマッピングは B<MAP_SHARED> フラグを指定して作成されなければならな"
8226 "い。"
8227
8228 #. type: TP
8229 #: build/C/man2/remap_file_pages.2:61
8230 #, no-wrap
8231 msgid "2."
8232 msgstr "2."
8233
8234 #. type: Plain text
8235 #: build/C/man2/remap_file_pages.2:69
8236 msgid ""
8237 "Use one or more calls to B<remap_file_pages>()  to rearrange the "
8238 "correspondence between the pages of the mapping and the pages of the file.  "
8239 "It is possible to map the same page of a file into multiple locations within "
8240 "the mapped region."
8241 msgstr ""
8242 "B<remap_file_pages>()  を 1 回以上呼び出して、 マッピングのページとファイルの"
8243 "ページの対応関係を再構成する。 ファイルの同じページをマッピング領域の複数の場"
8244 "所に マップすることが可能である。"
8245
8246 #. type: Plain text
8247 #: build/C/man2/remap_file_pages.2:80
8248 msgid ""
8249 "The I<pgoff> and I<size> arguments specify the region of the file that is to "
8250 "be relocated within the mapping: I<pgoff> is a file offset in units of the "
8251 "system page size; I<size> is the length of the region in bytes."
8252 msgstr ""
8253 "I<pgoff> と I<size> 引き数は、マッピング内で再配置されるファイルの領域を指定"
8254 "する。 I<pgoff> はファイルオフセットであり、単位はシステムのページサイズであ"
8255 "る。 I<size> は領域の長さであり、単位はバイトである。"
8256
8257 #. type: Plain text
8258 #: build/C/man2/remap_file_pages.2:98
8259 msgid ""
8260 "The I<addr> argument serves two purposes.  First, it identifies the mapping "
8261 "whose pages we want to rearrange.  Thus, I<addr> must be an address that "
8262 "falls within a region previously mapped by a call to B<mmap>(2).  Second, "
8263 "I<addr> specifies the address at which the file pages identified by I<pgoff> "
8264 "and I<size> will be placed."
8265 msgstr ""
8266 "I<addr> 引き数は 2 つの目的で使われる。 第 1 の目的は、この引き数によって再編"
8267 "成したいページの マッピングを識別することである。 よって I<addr> は B<mmap>"
8268 "(2)  の呼び出しで過去にマップされた領域内のアドレスでなければならない。 第 2 "
8269 "の目的は、 I<pgoff> と I<size> で識別されるファイルページが置かれる予定のアド"
8270 "レスを、 I<addr> によって指定することである。"
8271
8272 #.  This rounding is weird, and not consistent with the treatment of
8273 #.  the analogous arguments for munmap()/mprotect() and for mlock().
8274 #.  MTK, 14 Sep 2005
8275 #. type: Plain text
8276 #: build/C/man2/remap_file_pages.2:112
8277 msgid ""
8278 "The values specified in I<addr> and I<size> should be multiples of the "
8279 "system page size.  If they are not, then the kernel rounds I<both> values "
8280 "I<down> to the nearest multiple of the page size."
8281 msgstr ""
8282 "I<addr> と I<size> に指定する値は、システムのページサイズの倍数とすべきであ"
8283 "る。 それ以外の場合、カーネルは「両方」の値を 最も近いページサイズの倍数へ"
8284 "「切り下げる」。"
8285
8286 #. type: Plain text
8287 #: build/C/man2/remap_file_pages.2:116
8288 msgid "The I<prot> argument must be specified as 0."
8289 msgstr "I<prot> 引き数は 0 に指定されなければならない。"
8290
8291 #. type: Plain text
8292 #: build/C/man2/remap_file_pages.2:124
8293 msgid ""
8294 "The I<flags> argument has the same meaning as for B<mmap>(2), but all flags "
8295 "other than B<MAP_NONBLOCK> are ignored."
8296 msgstr ""
8297 "I<flags> 引き数は B<mmap>(2)  のものと同じ意味であるが、 B<MAP_NONBLOCK> 以外"
8298 "の全てのフラグは無視される。"
8299
8300 #. type: Plain text
8301 #: build/C/man2/remap_file_pages.2:131
8302 msgid ""
8303 "On success, B<remap_file_pages>()  returns 0.  On error, -1 is returned, and "
8304 "I<errno> is set appropriately."
8305 msgstr ""
8306 "成功した場合、 B<remap_file_pages>()  は 0 を返す。 エラーの場合、-1 が返さ"
8307 "れ、 I<errno> が適切に設定される。"
8308
8309 #. type: Plain text
8310 #: build/C/man2/remap_file_pages.2:139
8311 msgid ""
8312 "I<addr> does not refer to a valid mapping created with the B<MAP_SHARED> "
8313 "flag."
8314 msgstr ""
8315 "I<addr> が B<MAP_SHARED> フラグを指定して作成された有効なマッピングを参照して"
8316 "いない。"
8317
8318 #.  And possibly others from vma->vm_ops->populate()
8319 #. type: Plain text
8320 #: build/C/man2/remap_file_pages.2:148
8321 msgid "I<addr>, I<size>, I<prot>, or I<pgoff> is invalid."
8322 msgstr "I<addr>, I<size>, I<prot>, I<pgoff> のいずれかが不正である。"
8323
8324 #. type: Plain text
8325 #: build/C/man2/remap_file_pages.2:153
8326 msgid ""
8327 "The B<remap_file_pages>()  system call appeared in Linux 2.5.46; glibc "
8328 "support was added in version 2.3.3."
8329 msgstr ""
8330 "B<remap_file_pages>()  システムコールは Linux 2.5.46 で登場した。 glibc での"
8331 "サポートは glibc バージョン 2.3.3 で追加された。"
8332
8333 #. type: Plain text
8334 #: build/C/man2/remap_file_pages.2:157
8335 msgid "The B<remap_file_pages>()  system call is Linux-specific."
8336 msgstr "B<remap_file_pages>()  システムコールは Linux 固有のものである。"
8337
8338 #. type: Plain text
8339 #: build/C/man2/remap_file_pages.2:164
8340 msgid ""
8341 "B<getpagesize>(2), B<mmap>(2), B<mmap2>(2), B<mprotect>(2), B<mremap>(2), "
8342 "B<msync>(2)"
8343 msgstr ""
8344 "B<getpagesize>(2), B<mmap>(2), B<mmap2>(2), B<mprotect>(2), B<mremap>(2), "
8345 "B<msync>(2)"
8346
8347 #. type: TH
8348 #: build/C/man3/shm_open.3:26
8349 #, no-wrap
8350 msgid "SHM_OPEN"
8351 msgstr "SHM_OPEN"
8352
8353 #. type: TH
8354 #: build/C/man3/shm_open.3:26
8355 #, no-wrap
8356 msgid "2009-02-25"
8357 msgstr "2009-02-25"
8358
8359 #. type: Plain text
8360 #: build/C/man3/shm_open.3:29
8361 msgid ""
8362 "shm_open, shm_unlink - create/open or unlink POSIX shared memory objects"
8363 msgstr ""
8364 "shm_open, shm_unlink - POSIX 共有メモリ・オブジェクトの作成/オープン/削除を行"
8365 "う"
8366
8367 #. type: Plain text
8368 #: build/C/man3/shm_open.3:33
8369 msgid "B<#include E<lt>sys/stat.hE<gt>> /* For mode constants */"
8370 msgstr "B<#include E<lt>sys/stat.hE<gt>> /* mode 定数用 */"
8371
8372 #. type: Plain text
8373 #: build/C/man3/shm_open.3:35
8374 msgid "B<#include E<lt>fcntl.hE<gt>> /* For O_* constants */"
8375 msgstr "B<#include E<lt>fcntl.hE<gt>> /* O_* 定数の定義用 */"
8376
8377 #. type: Plain text
8378 #: build/C/man3/shm_open.3:37
8379 msgid ""
8380 "B<int shm_open(const char *>I<name>B<, int >I<oflag>B<, mode_t >I<mode>B<);>"
8381 msgstr ""
8382 "B<int shm_open(const char *>I<name>B<, int >I<oflag>B<, mode_t >I<mode>B<);>"
8383
8384 #. type: Plain text
8385 #: build/C/man3/shm_open.3:39
8386 msgid "B<int shm_unlink(const char *>I<name>B<);>"
8387 msgstr "B<int shm_unlink(const char *>I<name>B<);>"
8388
8389 #. type: Plain text
8390 #: build/C/man3/shm_open.3:41
8391 msgid "Link with I<-lrt>."
8392 msgstr "I<-lrt> でリンクする。"
8393
8394 #. type: Plain text
8395 #: build/C/man3/shm_open.3:53
8396 msgid ""
8397 "B<shm_open>()  creates and opens a new, or opens an existing, POSIX shared "
8398 "memory object.  A POSIX shared memory object is in effect a handle which can "
8399 "be used by unrelated processes to B<mmap>(2)  the same region of shared "
8400 "memory.  The B<shm_unlink>()  function performs the converse operation, "
8401 "removing an object previously created by B<shm_open>()."
8402 msgstr ""
8403 "B<shm_open>()  は、POSIX 共有メモリ・オブジェクトを新規に作成/オープンした"
8404 "り、 すでに存在するオブジェクトをオープンしたりする。 POSIX 共有メモリ・オブ"
8405 "ジェクトは、実際には、関係のないプロセスが 共有メモリの同じ領域を B<mmap>"
8406 "(2)  するために使用することができる手段である。 B<shm_unlink>()  は、逆の操"
8407 "作、つまり以前に B<shm_open>()  で作成されたオブジェクトの削除を行う。"
8408
8409 #.  glibc allows the initial slash to be omitted, and makes
8410 #.  multiple initial slashes equivalent to a single slash.
8411 #.  This differs from the implementation of POSIX message queues.
8412 #.  glibc allows subdirectory components in the name, in which
8413 #.  case the subdirectory must exist under /dev/shm, and allow the
8414 #.  required permissions if a user wants to create a shared memory
8415 #.  object in that subdirectory.
8416 #. type: Plain text
8417 #: build/C/man3/shm_open.3:74
8418 msgid ""
8419 "The operation of B<shm_open>()  is analogous to that of B<open>(2).  I<name> "
8420 "specifies the shared memory object to be created or opened.  For portable "
8421 "use, a shared memory object should be identified by a name of the form I</"
8422 "somename>; that is, a null-terminated string of up to B<NAME_MAX> (i.e., "
8423 "255) characters consisting of an initial slash, followed by one or more "
8424 "characters, none of which are slashes."
8425 msgstr ""
8426 "B<shm_open>()  の動作は B<open>(2)  とよく似ている。 I<name> で作成したりオー"
8427 "プンしたりする共有メモリ・オブジェクトを指定する。 移植性を持たせるためには、"
8428 "共有メモリ・オブジェクトは I</somename> という形式の名前で識別し、 その名前"
8429 "は、最大で B<NAME_MAX> (すなわち 255) 文字の NULL 終端された文字列で、 スラッ"
8430 "シュで始まり、スラッシュ以外の文字が 1 文字以上続く形式 にすべきである。"
8431
8432 #. type: Plain text
8433 #: build/C/man3/shm_open.3:81
8434 msgid ""
8435 "I<oflag> is a bit mask created by ORing together exactly one of B<O_RDONLY> "
8436 "or B<O_RDWR> and any of the other flags listed here:"
8437 msgstr ""
8438 "I<oflag> はビットマスクで、 B<O_RDONLY> と B<O_RDWR> のいずれか一方と、以下に"
8439 "述べる他のフラグの論理和をとったもの を指定する。"
8440
8441 #. type: TP
8442 #: build/C/man3/shm_open.3:81
8443 #, no-wrap
8444 msgid "B<O_RDONLY>"
8445 msgstr "B<O_RDONLY>"
8446
8447 #. type: Plain text
8448 #: build/C/man3/shm_open.3:89
8449 msgid ""
8450 "Open the object for read access.  A shared memory object opened in this way "
8451 "can be B<mmap>(2)ed only for read (B<PROT_READ>)  access."
8452 msgstr ""
8453 "読み出しアクセス用にオブジェクトをオープンする。 このフラグを指定してオープン"
8454 "された共有メモリ・オブジェクトは、 読み出し (B<PROT_READ>) アクセスでのみ "
8455 "B<mmap>(2)  することができる。"
8456
8457 #. type: TP
8458 #: build/C/man3/shm_open.3:89
8459 #, no-wrap
8460 msgid "B<O_RDWR>"
8461 msgstr "B<O_RDWR>"
8462
8463 #. type: Plain text
8464 #: build/C/man3/shm_open.3:92
8465 msgid "Open the object for read-write access."
8466 msgstr "読み書きアクセス用にオブジェクトをオープンする。"
8467
8468 #. type: TP
8469 #: build/C/man3/shm_open.3:92
8470 #, no-wrap
8471 msgid "B<O_CREAT>"
8472 msgstr "B<O_CREAT>"
8473
8474 #.  In truth it is actually the filesystem IDs on Linux, but these
8475 #.  are nearly always the same as the effective IDs.  (MTK, Jul 05)
8476 #. type: Plain text
8477 #: build/C/man3/shm_open.3:112
8478 msgid ""
8479 "Create the shared memory object if it does not exist.  The user and group "
8480 "ownership of the object are taken from the corresponding effective IDs of "
8481 "the calling process, and the object's permission bits are set according to "
8482 "the low-order 9 bits of I<mode>, except that those bits set in the process "
8483 "file mode creation mask (see B<umask>(2))  are cleared for the new object.  "
8484 "A set of macro constants which can be used to define I<mode> is listed in "
8485 "B<open>(2).  (Symbolic definitions of these constants can be obtained by "
8486 "including I<E<lt>sys/stat.hE<gt>>.)"
8487 msgstr ""
8488 "存在しない場合、共有メモリ・オブジェクトを作成する。 オブジェクトのユーザとグ"
8489 "ループの所有権は、 呼び出し元プロセスの対応する実効 ID が使われ、 オブジェク"
8490 "トの許可ビットは I<mode> の下位 9 ビットに基づいて設定される。ただし、 ファイ"
8491 "ルモード作成マスク (B<umask>(2)  参照) に設定されている値は、新規オブジェクト"
8492 "に関してはクリアされる。 I<mode> を定義するために使用できるマクロ定数(群)は "
8493 "B<open>(2)  に記載されている (これらの定数のシンボル定義は I<E<lt>sys/stat."
8494 "hE<gt>> のインクルードにより得られる)。"
8495
8496 #. type: Plain text
8497 #: build/C/man3/shm_open.3:118
8498 msgid ""
8499 "A new shared memory object initially has zero length\\(emthe size of the "
8500 "object can be set using B<ftruncate>(2).  The newly allocated bytes of a "
8501 "shared memory object are automatically initialized to 0."
8502 msgstr ""
8503 "新規に作成された共有メモリ・オブジェクトは長さ 0 で初期化される。 オブジェク"
8504 "トの大きさは B<ftruncate>(2)  を使って設定できる。 共有メモリ・オブジェクトと"
8505 "して新規に確保されたバイトは自動的に 0 に初期化される。"
8506
8507 #. type: TP
8508 #: build/C/man3/shm_open.3:118
8509 #, no-wrap
8510 msgid "B<O_EXCL>"
8511 msgstr "B<O_EXCL>"
8512
8513 #. type: Plain text
8514 #: build/C/man3/shm_open.3:127
8515 msgid ""
8516 "If B<O_CREAT> was also specified, and a shared memory object with the given "
8517 "I<name> already exists, return an error.  The check for the existence of the "
8518 "object, and its creation if it does not exist, are performed atomically."
8519 msgstr ""
8520 "B<O_CREAT> が一緒に指定されており、 I<name> で指定された共有メモリ・オブジェ"
8521 "クトが既に存在した場合、 エラーを返す。 オブジェクトの存在確認と、存在しな"
8522 "かった場合のオブジェクト作成は、 必ず一連の操作として実行される (performed "
8523 "atomically)。"
8524
8525 #. type: TP
8526 #: build/C/man3/shm_open.3:127
8527 #, no-wrap
8528 msgid "B<O_TRUNC>"
8529 msgstr "B<O_TRUNC>"
8530
8531 #. type: Plain text
8532 #: build/C/man3/shm_open.3:130
8533 msgid "If the shared memory object already exists, truncate it to zero bytes."
8534 msgstr ""
8535 "共有メモリ・オブジェクトがすでに存在した場合、 そのオブジェクトを 0 バイトに"
8536 "切り詰める。"
8537
8538 #. type: Plain text
8539 #: build/C/man3/shm_open.3:133
8540 msgid ""
8541 "Definitions of these flag values can be obtained by including I<E<lt>fcntl."
8542 "hE<gt>>."
8543 msgstr ""
8544 "これらのフラグ値の定義は I<E<lt>fcntl.hE<gt>> のインクルードにより得られる。"
8545
8546 #. type: Plain text
8547 #: build/C/man3/shm_open.3:144
8548 msgid ""
8549 "On successful completion B<shm_open>()  returns a new file descriptor "
8550 "referring to the shared memory object.  This file descriptor is guaranteed "
8551 "to be the lowest-numbered file descriptor not previously opened within the "
8552 "process.  The B<FD_CLOEXEC> flag (see B<fcntl>(2))  is set for the file "
8553 "descriptor."
8554 msgstr ""
8555 "成功して完了した場合、 B<shm_open>()  は共有メモリ・オブジェクトを参照する新"
8556 "しいファイル・ディスクリプタを返す。 このファイル・ディスクリプタは、そのプロ"
8557 "セス内で過去にオープンされていない ファイル・ディスクリプタの中で最も小さな数"
8558 "になることが保証される。 B<FD_CLOEXEC> フラグ (B<fcntl>(2)  を参照) が、この"
8559 "ファイル・ディスクリプタに設定される。"
8560
8561 #. type: Plain text
8562 #: build/C/man3/shm_open.3:153
8563 msgid ""
8564 "The file descriptor is normally used in subsequent calls to B<ftruncate>(2)  "
8565 "(for a newly created object) and B<mmap>(2).  After a call to B<mmap>(2)  "
8566 "the file descriptor may be closed without affecting the memory mapping."
8567 msgstr ""
8568 "通常、これらのファイル・ディスクリプタは、この後続けて実行される B<ftruncate>"
8569 "(2)  (新規に作成されたオブジェクトの場合のみ) と B<mmap>(2)  の呼び出しに使用"
8570 "される。 B<mmap>(2)  を呼び出した後は、ファイル・ディスクリプタをクローズして"
8571 "もよく、 クローズしてもメモリ・マッピングに影響を与えることはない。"
8572
8573 #. type: Plain text
8574 #: build/C/man3/shm_open.3:171
8575 msgid ""
8576 "The operation of B<shm_unlink>()  is analogous to B<unlink>(2): it removes a "
8577 "shared memory object name, and, once all processes have unmapped the object, "
8578 "de-allocates and destroys the contents of the associated memory region.  "
8579 "After a successful B<shm_unlink>(), attempts to B<shm_open>()  an object "
8580 "with the same I<name> will fail (unless B<O_CREAT> was specified, in which "
8581 "case a new, distinct object is created)."
8582 msgstr ""
8583 "B<shm_unlink>()  の動作は B<unlink>(2)  とよく似ている: 共有メモリ・オブジェ"
8584 "クト名を削除し、すべてのプロセスが処理対象の オブジェクトをアンマップした時点"
8585 "でオブジェクトの割り当てを解除し、 対応するメモリ領域の内容を破棄する。 "
8586 "B<shm_unlink>()  が成功した後で、同じ I<name> を持つオブジェクトに対して "
8587 "B<shm_open>()  を行うと、 (B<O_CREAT> が指定されていない場合) 失敗する。 "
8588 "(B<O_CREAT> が指定されている場合、新しく別のオブジェクトが作成される)。"
8589
8590 #. type: Plain text
8591 #: build/C/man3/shm_open.3:180
8592 msgid ""
8593 "On success, B<shm_open>()  returns a nonnegative file descriptor.  On "
8594 "failure, B<shm_open>()  returns -1.  B<shm_unlink>()  returns 0 on success, "
8595 "or -1 on error."
8596 msgstr ""
8597 "成功した場合、 B<shm_open>()  は非負のファイル・ディスクリプタを返す。 失敗し"
8598 "た場合、 B<shm_open>()  は -1 を返す。 B<shm_unlink>()  は、成功した場合 0 "
8599 "を、エラーが起こった場合 -1 を返す。"
8600
8601 #. type: Plain text
8602 #: build/C/man3/shm_open.3:187
8603 msgid ""
8604 "On failure, I<errno> is set to indicate the cause of the error.  Values "
8605 "which may appear in I<errno> include the following:"
8606 msgstr ""
8607 "失敗した場合、エラーの原因を示すため I<errno> が設定される。 I<errno> に設定"
8608 "される値は以下の通りである:"
8609
8610 #. type: Plain text
8611 #: build/C/man3/shm_open.3:192
8612 msgid "Permission to B<shm_unlink>()  the shared memory object was denied."
8613 msgstr "共有メモリオブジェクトを B<shm_unlink>()  する権限がなかった。"
8614
8615 #. type: Plain text
8616 #: build/C/man3/shm_open.3:202
8617 msgid ""
8618 "Permission was denied to B<shm_open>()  I<name> in the specified I<mode>, or "
8619 "B<O_TRUNC> was specified and the caller does not have write permission on "
8620 "the object."
8621 msgstr ""
8622 "指定された I<mode> で I<name> を B<shm_open>()  する権限がなかった。もしく"
8623 "は、 B<O_TRUNC> が指定されたが、呼び出し元にはそのオブジェクトに対する書き込"
8624 "み権限が なかった。"
8625
8626 #. type: TP
8627 #: build/C/man3/shm_open.3:202 build/C/man2/shmget.2:195
8628 #, no-wrap
8629 msgid "B<EEXIST>"
8630 msgstr "B<EEXIST>"
8631
8632 #. type: Plain text
8633 #: build/C/man3/shm_open.3:213
8634 msgid ""
8635 "Both B<O_CREAT> and B<O_EXCL> were specified to B<shm_open>()  and the "
8636 "shared memory object specified by I<name> already exists."
8637 msgstr ""
8638 "B<O_CREAT> と B<O_EXCL> の両方が B<shm_open>()  に指定されたが、 I<name> で指"
8639 "定された共有メモリ・オブジェクトが既に存在した。"
8640
8641 #. type: Plain text
8642 #: build/C/man3/shm_open.3:220
8643 msgid "The I<name> argument to B<shm_open>()  was invalid."
8644 msgstr "B<shm_open>()  に与えられた I<name> 引き数が不正であった。"
8645
8646 #. type: TP
8647 #: build/C/man3/shm_open.3:220
8648 #, no-wrap
8649 msgid "B<EMFILE>"
8650 msgstr "B<EMFILE>"
8651
8652 #. type: Plain text
8653 #: build/C/man3/shm_open.3:223
8654 msgid "The process already has the maximum number of files open."
8655 msgstr "プロセスがオープン可能なファイル数の上限にすでに達していた。"
8656
8657 #. type: TP
8658 #: build/C/man3/shm_open.3:223
8659 #, no-wrap
8660 msgid "B<ENAMETOOLONG>"
8661 msgstr "B<ENAMETOOLONG>"
8662
8663 #. type: Plain text
8664 #: build/C/man3/shm_open.3:229
8665 msgid "The length of I<name> exceeds B<PATH_MAX>."
8666 msgstr "I<name> の長さが B<PATH_MAX> を越えている。"
8667
8668 #. type: Plain text
8669 #: build/C/man3/shm_open.3:233
8670 msgid ""
8671 "The limit on the total number of files open on the system has been reached."
8672 msgstr "ファイルシステムでオープンできるファイル数の上限に達した。"
8673
8674 #. type: TP
8675 #: build/C/man3/shm_open.3:233 build/C/man3/shm_open.3:242
8676 #: build/C/man2/shmget.2:209
8677 #, no-wrap
8678 msgid "B<ENOENT>"
8679 msgstr "B<ENOENT>"
8680
8681 #. type: Plain text
8682 #: build/C/man3/shm_open.3:242
8683 msgid ""
8684 "An attempt was made to B<shm_open>()  a I<name> that did not exist, and "
8685 "B<O_CREAT> was not specified."
8686 msgstr ""
8687 "存在していない I<name> のオブジェクトを B<shm_open>()  しようとしたが、 "
8688 "B<O_CREAT> が指定されていなかった。"
8689
8690 #. type: Plain text
8691 #: build/C/man3/shm_open.3:249
8692 msgid ""
8693 "An attempt was to made to B<shm_unlink>()  a I<name> that does not exist."
8694 msgstr "存在しない I<name> のオブジェクトを B<shm_unlink>()  しようとした。"
8695
8696 #. type: Plain text
8697 #: build/C/man3/shm_open.3:251
8698 msgid "These functions are provided in glibc 2.2 and later."
8699 msgstr "これらの関数は glibc 2.2 以降で提供されている。"
8700
8701 #. type: Plain text
8702 #: build/C/man3/shm_open.3:257
8703 msgid ""
8704 "POSIX.1-2001 says that the group ownership of a newly created shared memory "
8705 "object is set to either the calling process's effective group ID or \"a "
8706 "system default group ID\"."
8707 msgstr ""
8708 "POSIX.1-2001 には、新規に作成される共有メモリオブジェクトのグループ所有権"
8709 "は、 呼び出し元プロセスの実効グループ ID か 「システムのデフォルトのグループ "
8710 "ID」 のどちらかに設定される、と書かれている。"
8711
8712 #. type: Plain text
8713 #: build/C/man3/shm_open.3:266
8714 msgid ""
8715 "POSIX leaves the behavior of the combination of B<O_RDONLY> and B<O_TRUNC> "
8716 "unspecified.  On Linux, this will successfully truncate an existing shared "
8717 "memory object\\(emthis may not be so on other UNIX systems."
8718 msgstr ""
8719 "POSIX は B<O_RDONLY> と B<O_TRUNC> が一緒に指定された場合の動作を未定義にして"
8720 "いる。Linux では、 既存の共有メモリ・オブジェクトに対する切り詰め (truncate) "
8721 "は成功する。 しかし、他の UNIX システムでも同じであるとは限らない。"
8722
8723 #. type: Plain text
8724 #: build/C/man3/shm_open.3:271
8725 msgid ""
8726 "The POSIX shared memory object implementation on Linux 2.4 makes use of a "
8727 "dedicated filesystem, which is normally mounted under I</dev/shm>."
8728 msgstr ""
8729 "Linux 2.4 における POSIX 共有メモリ・オブジェクトの実装は 専用のファイルシス"
8730 "テムを使用する。そのファイルシステムは通常 I</dev/shm> にマウントされる。"
8731
8732 #. type: Plain text
8733 #: build/C/man3/shm_open.3:282
8734 msgid ""
8735 "B<close>(2), B<fchmod>(2), B<fchown>(2), B<fcntl>(2), B<fstat>(2), "
8736 "B<ftruncate>(2), B<mmap>(2), B<open>(2), B<umask>(2), B<shm_overview>(7)"
8737 msgstr ""
8738 "B<close>(2), B<fchmod>(2), B<fchown>(2), B<fcntl>(2), B<fstat>(2), "
8739 "B<ftruncate>(2), B<mmap>(2), B<open>(2), B<umask>(2), B<shm_overview>(7)"
8740
8741 #. type: TH
8742 #: build/C/man7/shm_overview.7:27
8743 #, no-wrap
8744 msgid "SHM_OVERVIEW"
8745 msgstr "SHM_OVERVIEW"
8746
8747 #. type: TH
8748 #: build/C/man7/shm_overview.7:27
8749 #, no-wrap
8750 msgid "2010-09-10"
8751 msgstr "2010-09-10"
8752
8753 #. type: Plain text
8754 #: build/C/man7/shm_overview.7:30
8755 msgid "shm_overview - overview of POSIX shared memory"
8756 msgstr "shm_overview - POSIX 共有メモリの概要"
8757
8758 #. type: Plain text
8759 #: build/C/man7/shm_overview.7:33
8760 msgid ""
8761 "The POSIX shared memory API allows processes to communicate information by "
8762 "sharing a region of memory."
8763 msgstr ""
8764 "POSIX 共有メモリ API を使用すると、メモリのある領域を共有して、 プロセス間で"
8765 "情報をやり取りすることができる。"
8766
8767 #. type: Plain text
8768 #: build/C/man7/shm_overview.7:35
8769 msgid "The interfaces employed in the API are:"
8770 msgstr "この API では以下のインターフェースが採用されている。"
8771
8772 #. type: TP
8773 #: build/C/man7/shm_overview.7:35
8774 #, no-wrap
8775 msgid "B<shm_open>(3)"
8776 msgstr "B<shm_open>(3)"
8777
8778 #. type: Plain text
8779 #: build/C/man7/shm_overview.7:42
8780 msgid ""
8781 "Create and open a new object, or open an existing object.  This is analogous "
8782 "to B<open>(2).  The call returns a file descriptor for use by the other "
8783 "interfaces listed below."
8784 msgstr ""
8785 "新しいオブジェクトを生成しオープンする、もしくは 既存のオブジェクトをオープン"
8786 "する。これは B<open>(2)  と同じである。下記にある他のインターフェースで使用す"
8787 "る ファイルディスクリプタを返す。"
8788
8789 #. type: TP
8790 #: build/C/man7/shm_overview.7:42
8791 #, no-wrap
8792 msgid "B<ftruncate>(2)"
8793 msgstr "B<ftruncate>(2)"
8794
8795 #. type: Plain text
8796 #: build/C/man7/shm_overview.7:46
8797 msgid ""
8798 "Set the size of the shared memory object.  (A newly created shared memory "
8799 "object has a length of zero.)"
8800 msgstr "共有メモリオブジェクトの大きさを設定する。"
8801
8802 #. type: Plain text
8803 #: build/C/man7/shm_overview.7:50
8804 msgid ""
8805 "Map the shared memory object into the virtual address space of the calling "
8806 "process."
8807 msgstr ""
8808 "呼び出したプロセスの仮想アドレス空間に共有メモリオブジェクトを マップする。"
8809
8810 #. type: TP
8811 #: build/C/man7/shm_overview.7:50
8812 #, no-wrap
8813 msgid "B<munmap>(2)"
8814 msgstr "B<munmap>(2)"
8815
8816 #. type: Plain text
8817 #: build/C/man7/shm_overview.7:54
8818 msgid ""
8819 "Unmap the shared memory object from the virtual address space of the calling "
8820 "process."
8821 msgstr ""
8822 "呼び出したプロセスの仮想アドレス空間から 共有メモリオブジェクトをアンマップす"
8823 "る。"
8824
8825 #. type: TP
8826 #: build/C/man7/shm_overview.7:54
8827 #, no-wrap
8828 msgid "B<shm_unlink>(3)"
8829 msgstr "B<shm_unlink>(3)"
8830
8831 #. type: Plain text
8832 #: build/C/man7/shm_overview.7:57
8833 msgid "Remove a shared memory object name."
8834 msgstr "共有メモリオブジェクト名を削除する。"
8835
8836 #. type: TP
8837 #: build/C/man7/shm_overview.7:57
8838 #, no-wrap
8839 msgid "B<close>(2)"
8840 msgstr "B<close>(2)"
8841
8842 #. type: Plain text
8843 #: build/C/man7/shm_overview.7:62
8844 msgid ""
8845 "Close the file descriptor allocated by B<shm_open>(3)  when it is no longer "
8846 "needed."
8847 msgstr ""
8848 "B<shm_open>(3)  で割り当てられたファイルディスクリプタが不要になった際に、 そ"
8849 "のファイルディスクリプタをクローズする。"
8850
8851 #. type: TP
8852 #: build/C/man7/shm_overview.7:62
8853 #, no-wrap
8854 msgid "B<fstat>(2)"
8855 msgstr "B<fstat>(2)"
8856
8857 #. type: Plain text
8858 #: build/C/man7/shm_overview.7:76
8859 msgid ""
8860 "Obtain a I<stat> structure that describes the shared memory object.  Among "
8861 "the information returned by this call are the object's size (I<st_size>), "
8862 "permissions (I<st_mode>), owner (I<st_uid>), and group (I<st_gid>)."
8863 msgstr ""
8864 "その共有メモリオブジェクトについての情報が入った I<stat> 構造体を取得する。 "
8865 "このシステムコールが返す情報には、オブジェクトのサイズ (I<st_size>)、 許可属"
8866 "性 (I<st_mode>)、 所有者 (I<st_uid>)、 グループ (I<st_gid>)  がある。"
8867
8868 #. type: TP
8869 #: build/C/man7/shm_overview.7:76
8870 #, no-wrap
8871 msgid "B<fchown>(2)"
8872 msgstr "B<fchown>(2)"
8873
8874 #. type: Plain text
8875 #: build/C/man7/shm_overview.7:79
8876 msgid "To change the ownership of a shared memory object."
8877 msgstr "共有メモリオブジェクトの所有権を変更する。"
8878
8879 #. type: TP
8880 #: build/C/man7/shm_overview.7:79
8881 #, no-wrap
8882 msgid "B<fchmod>(2)"
8883 msgstr "B<fchmod>(2)"
8884
8885 #. type: Plain text
8886 #: build/C/man7/shm_overview.7:82
8887 msgid "To change the permissions of a shared memory object."
8888 msgstr "共有メモリオブジェクトの許可属性を変更する。"
8889
8890 #. type: SS
8891 #: build/C/man7/shm_overview.7:82
8892 #, no-wrap
8893 msgid "Versions"
8894 msgstr "Versions"
8895
8896 #. type: Plain text
8897 #: build/C/man7/shm_overview.7:84
8898 msgid "POSIX shared memory is supported since Linux 2.4 and glibc 2.2."
8899 msgstr "POSIX 共有メモリは Linux 2.4 と glibc 2.2 以降でサポートされている。"
8900
8901 #. type: SS
8902 #: build/C/man7/shm_overview.7:84
8903 #, no-wrap
8904 msgid "Persistence"
8905 msgstr "持続性"
8906
8907 #. type: Plain text
8908 #: build/C/man7/shm_overview.7:89
8909 msgid ""
8910 "POSIX shared memory objects have kernel persistence: a shared memory object "
8911 "will exist until the system is shut down, or until all processes have "
8912 "unmapped the object and it has been deleted with B<shm_unlink>(3)"
8913 msgstr ""
8914 "POSIX 共有メモリオブジェクトはカーネル内で保持される。 共有メモリオブジェクト"
8915 "は、システムがシャットダウンされるか、 全てのプロセスがそのオブジェクトをアン"
8916 "マップし、 B<shm_unlink>(3)  で削除されるまで、存在し続ける。"
8917
8918 #. type: SS
8919 #: build/C/man7/shm_overview.7:89
8920 #, no-wrap
8921 msgid "Linking"
8922 msgstr "リンク"
8923
8924 #. type: Plain text
8925 #: build/C/man7/shm_overview.7:94
8926 msgid ""
8927 "Programs using the POSIX shared memory API must be compiled with I<cc -lrt> "
8928 "to link against the real-time library, I<librt>."
8929 msgstr ""
8930 "POSIX 共有メモリ API を使用したプログラムは I<cc -lrt> でコンパイルし、リアル"
8931 "タイムライブラリ I<librt> とリンクしなければならない。"
8932
8933 #. type: SS
8934 #: build/C/man7/shm_overview.7:94
8935 #, no-wrap
8936 msgid "Accessing shared memory objects via the filesystem"
8937 msgstr "ファイルシステム経由での共有メモリオブジェクトへのアクセス"
8938
8939 #. type: Plain text
8940 #: build/C/man7/shm_overview.7:101
8941 msgid ""
8942 "On Linux, shared memory objects are created in a (I<tmpfs>)  virtual "
8943 "filesystem, normally mounted under I</dev/shm>.  Since kernel 2.6.19, Linux "
8944 "supports the use of access control lists (ACLs)  to control the permissions "
8945 "of objects in the virtual filesystem."
8946 msgstr ""
8947 "Linux では、共有メモリオブジェクトは通常 I</dev/shm> 以下にマウントされる仮想"
8948 "ファイルシステム (I<tmpfs>)  内に作成される。 カーネル 2.6.19 以降の Linux で"
8949 "は、 仮想ファイルシステム内のオブジェクトの許可属性の制御に、 アクセス制御リ"
8950 "スト (ACL; access control lists) を使うことができる。"
8951
8952 #. type: Plain text
8953 #: build/C/man7/shm_overview.7:106
8954 msgid ""
8955 "Typically, processes must synchronize their access to a shared memory "
8956 "object, using, for example, POSIX semaphores."
8957 msgstr ""
8958 "通常は、共有メモリオブジェクトにアクセスするプロセスは、 POSIX セマフォなどを"
8959 "使ってプロセス間で同期をとらなければならない。"
8960
8961 #. type: Plain text
8962 #: build/C/man7/shm_overview.7:114
8963 msgid ""
8964 "System V shared memory (B<shmget>(2), B<shmop>(2), etc.) is an older shared "
8965 "memory API.  POSIX shared memory provides a simpler, and better designed "
8966 "interface; on the other hand POSIX shared memory is somewhat less widely "
8967 "available (especially on older systems) than System V shared memory."
8968 msgstr ""
8969 "System V 共有メモリ (B<shmget>(2), B<shmop>(2)  など) は古い共有メモリ API で"
8970 "ある。 POSIX 共有メモリは、より簡単で、うまく設計されたインタフェースを提供し"
8971 "ている。 一方で、POSIX 共有メモリは System V 共有メモリと比べると 利用できる"
8972 "システムが少ない (特に、古いシステムでは少ない)。"
8973
8974 #. type: Plain text
8975 #: build/C/man7/shm_overview.7:127
8976 msgid ""
8977 "B<fchmod>(2), B<fchown>(2), B<fstat>(2), B<ftruncate>(2), B<mmap>(2), "
8978 "B<mprotect>(2), B<munmap>(2), B<shmget>(2), B<shmop>(2), B<shm_open>(3), "
8979 "B<shm_unlink>(3), B<sem_overview>(7)"
8980 msgstr ""
8981 "B<fchmod>(2), B<fchown>(2), B<fstat>(2), B<ftruncate>(2), B<mmap>(2), "
8982 "B<mprotect>(2), B<munmap>(2), B<shmget>(2), B<shmop>(2), B<shm_open>(3), "
8983 "B<shm_unlink>(3), B<sem_overview>(7)"
8984
8985 #. type: TH
8986 #: build/C/man2/shmctl.2:45
8987 #, no-wrap
8988 msgid "SHMCTL"
8989 msgstr "SHMCTL"
8990
8991 #. type: TH
8992 #: build/C/man2/shmctl.2:45
8993 #, no-wrap
8994 msgid "2014-02-07"
8995 msgstr "2014-02-07"
8996
8997 #. type: Plain text
8998 #: build/C/man2/shmctl.2:48
8999 msgid "shmctl - System V shared memory control"
9000 msgstr "shmctl - System V 共有メモリ (shared memory) を制御する"
9001
9002 #. type: Plain text
9003 #: build/C/man2/shmctl.2:51 build/C/man2/shmget.2:44
9004 msgid "B<#include E<lt>sys/ipc.hE<gt>>"
9005 msgstr "B<#include E<lt>sys/ipc.hE<gt>>"
9006
9007 #. type: Plain text
9008 #: build/C/man2/shmctl.2:53 build/C/man2/shmget.2:46
9009 msgid "B<#include E<lt>sys/shm.hE<gt>>"
9010 msgstr "B<#include E<lt>sys/shm.hE<gt>>"
9011
9012 #. type: Plain text
9013 #: build/C/man2/shmctl.2:55
9014 msgid ""
9015 "B<int shmctl(int >I<shmid>B<, int >I<cmd>B<, struct shmid_ds *>I<buf>B<);>"
9016 msgstr ""
9017 "B<int shmctl(int >I<shmid>B<, int >I<cmd>B<, struct shmid_ds *>I<buf>B<);>"
9018
9019 #. type: Plain text
9020 #: build/C/man2/shmctl.2:62
9021 msgid ""
9022 "B<shmctl>()  performs the control operation specified by I<cmd> on the "
9023 "System V shared memory segment whose identifier is given in I<shmid>."
9024 msgstr ""
9025 "B<shmctl>()  は、識別子が I<shmid> の System V 共有メモリ・セグメントに対し"
9026 "て I<cmd> で指示した制御命令を実行する。"
9027
9028 #. type: Plain text
9029 #: build/C/man2/shmctl.2:67
9030 msgid ""
9031 "The I<buf> argument is a pointer to a I<shmid_ds> structure, defined in "
9032 "I<E<lt>sys/shm.hE<gt>> as follows:"
9033 msgstr ""
9034 "I<buf> 引き数は、 I<shmid_ds> 構造体へのポインタである。 この構造体は "
9035 "I<E<lt>sys/shm.hE<gt>> で以下のように定義されている"
9036
9037 #. type: Plain text
9038 #: build/C/man2/shmctl.2:81
9039 #, no-wrap
9040 msgid ""
9041 "struct shmid_ds {\n"
9042 "    struct ipc_perm shm_perm;    /* Ownership and permissions */\n"
9043 "    size_t          shm_segsz;   /* Size of segment (bytes) */\n"
9044 "    time_t          shm_atime;   /* Last attach time */\n"
9045 "    time_t          shm_dtime;   /* Last detach time */\n"
9046 "    time_t          shm_ctime;   /* Last change time */\n"
9047 "    pid_t           shm_cpid;    /* PID of creator */\n"
9048 "    pid_t           shm_lpid;    /* PID of last shmat(2)/shmdt(2) */\n"
9049 "    shmatt_t        shm_nattch;  /* No. of current attaches */\n"
9050 "    ...\n"
9051 "};\n"
9052 msgstr ""
9053 "struct shmid_ds {\n"
9054 "    struct ipc_perm shm_perm;    /* 所有権と許可 */\n"
9055 "    size_t          shm_segsz;   /* セグメントのサイズ (バイト) */\n"
9056 "    time_t          shm_atime;   /* 最後の付加 (attach) の時刻 */\n"
9057 "    time_t          shm_dtime;   /* 最後の分離 (detach) の時刻 */\n"
9058 "    time_t          shm_ctime;   /* 最後に変更が行われた時刻 */\n"
9059 "    pid_t           shm_cpid;    /* 作成者 (creator) の PID */\n"
9060 "    pid_t           shm_lpid;    /* 最後の shmat(2)/shmdt(2) の PID */\n"
9061 "    shmatt_t        shm_nattch;  /* 現在付加されている数 */\n"
9062 "    ...\n"
9063 "};\n"
9064
9065 #. type: Plain text
9066 #: build/C/man2/shmctl.2:89
9067 msgid ""
9068 "The I<ipc_perm> structure is defined as follows (the highlighted fields are "
9069 "settable using B<IPC_SET>):"
9070 msgstr ""
9071 "I<ipc_perm> 構造体は以下のように定義されている (強調されたフィールドは "
9072 "B<IPC_SET> を使って設定可能である):"
9073
9074 #. type: Plain text
9075 #: build/C/man2/shmctl.2:102
9076 #, no-wrap
9077 msgid ""
9078 "struct ipc_perm {\n"
9079 "    key_t          __key;    /* Key supplied to shmget(2) */\n"
9080 "    uid_t          B<uid>;      /* Effective UID of owner */\n"
9081 "    gid_t          B<gid>;      /* Effective GID of owner */\n"
9082 "    uid_t          cuid;     /* Effective UID of creator */\n"
9083 "    gid_t          cgid;     /* Effective GID of creator */\n"
9084 "    unsigned short B<mode>;     /* B<Permissions> + SHM_DEST and\n"
9085 "                                SHM_LOCKED flags */\n"
9086 "    unsigned short __seq;    /* Sequence number */\n"
9087 "};\n"
9088 msgstr ""
9089 "struct ipc_perm {\n"
9090 "    key_t          __key;    /* shmget(2) に与えられるキー */\n"
9091 "    uid_t          B<uid>;      /* 所有者の実効 UID */\n"
9092 "    gid_t          B<gid>;      /* 所有者の実効 GID */\n"
9093 "    uid_t          cuid;     /* 作成者の実効 UID */\n"
9094 "    gid_t          cgid;     /* 作成者の実効 GID */\n"
9095 "    unsigned short B<mode>;     /* B<許可> + SHM_DEST と\n"
9096 "                                SHM_LOCKED フラグ */\n"
9097 "    unsigned short __seq;    /* シーケンス番号 */\n"
9098 "};\n"
9099
9100 #. type: Plain text
9101 #: build/C/man2/shmctl.2:108
9102 msgid "Valid values for I<cmd> are:"
9103 msgstr "I<cmd> として有効な値は以下の通り:"
9104
9105 #. type: TP
9106 #: build/C/man2/shmctl.2:109
9107 #, no-wrap
9108 msgid "B<IPC_STAT>"
9109 msgstr "B<IPC_STAT>"
9110
9111 #. type: Plain text
9112 #: build/C/man2/shmctl.2:118
9113 msgid ""
9114 "Copy information from the kernel data structure associated with I<shmid> "
9115 "into the I<shmid_ds> structure pointed to by I<buf>.  The caller must have "
9116 "read permission on the shared memory segment."
9117 msgstr ""
9118 "I<shmid> に関連づけられたカーネルデータ構造体の情報を I<buf> で指された "
9119 "I<shmid_ds> 構造体にコピーする。 呼び出し元は共有メモリ・セグメントに対する "
9120 "読み込み許可を持たなければならない。"
9121
9122 #. type: TP
9123 #: build/C/man2/shmctl.2:118
9124 #, no-wrap
9125 msgid "B<IPC_SET>"
9126 msgstr "B<IPC_SET>"
9127
9128 #. type: Plain text
9129 #: build/C/man2/shmctl.2:136
9130 msgid ""
9131 "Write the values of some members of the I<shmid_ds> structure pointed to by "
9132 "I<buf> to the kernel data structure associated with this shared memory "
9133 "segment, updating also its I<shm_ctime> member.  The following fields can be "
9134 "changed: I<shm_perm.uid>, I<shm_perm.gid>, and (the least significant 9 bits "
9135 "of) I<shm_perm.mode>.  The effective UID of the calling process must match "
9136 "the owner (I<shm_perm.uid>)  or creator (I<shm_perm.cuid>)  of the shared "
9137 "memory segment, or the caller must be privileged."
9138 msgstr ""
9139 "I<buf> によって指される I<shmid_ds> 構造体のいくつかのメンバーの値を、 この共"
9140 "有メモリ・セグメントに関連づけられたカーネルデータ構造体に書き込み、 "
9141 "I<shm_ctime> メンバーも更新する。 以下のフィールドは変更できる。 I<shm_perm."
9142 "uid>, I<shm_perm.gid>, I<shm_perm.mode> (の最下位 9 ビット)。 呼び出したプロ"
9143 "セスの実効 UID が所有者 (I<shm_perm.uid>)  または作成者 (I<shm_perm.cuid>)  "
9144 "と一致するか、呼び出し元が特権を持たなければならない。"
9145
9146 #. type: TP
9147 #: build/C/man2/shmctl.2:136
9148 #, no-wrap
9149 msgid "B<IPC_RMID>"
9150 msgstr "B<IPC_RMID>"
9151
9152 #. type: Plain text
9153 #: build/C/man2/shmctl.2:149
9154 #, fuzzy
9155 #| msgid ""
9156 #| "Mark the segment to be destroyed.  The segment will only actually be "
9157 #| "destroyed after the last process detaches it (i.e., when the "
9158 #| "I<shm_nattch> member of the associated structure I<shmid_ds> is zero).  "
9159 #| "The caller must be the owner or creator, or be privileged.  If a segment "
9160 #| "has been marked for destruction, then the (nonstandard)  B<SHM_DEST> flag "
9161 #| "of the I<shm_perm.mode> field in the associated data structure retrieved "
9162 #| "by B<IPC_STAT> will be set."
9163 msgid ""
9164 "Mark the segment to be destroyed.  The segment will only actually be "
9165 "destroyed after the last process detaches it (i.e., when the I<shm_nattch> "
9166 "member of the associated structure I<shmid_ds> is zero).  The caller must be "
9167 "the owner or creator of the segment, or be privileged.  The I<buf> argument "
9168 "is ignored."
9169 msgstr ""
9170 "セグメントに破棄済みのマークを付ける。 セグメントは、実際には最後プロセスがセ"
9171 "グメントを分離した (関連する I<shmid_ds> 構造体の I<shm_nattch> メンバーが 0 "
9172 "になった) 後でのみ破棄される。 呼び出し元は所有者か作成者であるか、特権を持た"
9173 "なければならない。 セグメントに破棄のマークが付けられると、 関連するデータ構"
9174 "造体において I<shm_perm.mode> フィールドの (標準ではない)  B<SHM_DEST> フラグ"
9175 "が設定される。 このデータ構造体は B<IPC_STAT> で取得される。"
9176
9177 #. type: Plain text
9178 #: build/C/man2/shmctl.2:157
9179 #, fuzzy
9180 #| msgid ""
9181 #| "Prevent swapping of the shared memory segment.  The caller must fault in "
9182 #| "any pages that are required to be present after locking is enabled.  If a "
9183 #| "segment has been locked, then the (nonstandard)  B<SHM_LOCKED> flag of "
9184 #| "the I<shm_perm.mode> field in the associated data structure retrieved by "
9185 #| "B<IPC_STAT> will be set."
9186 msgid ""
9187 "If a segment has been marked for destruction, then the (nonstandard)  "
9188 "B<SHM_DEST> flag of the I<shm_perm.mode> field in the associated data "
9189 "structure retrieved by B<IPC_STAT> will be set."
9190 msgstr ""
9191 "共有メモリ・セグメントをスワップすることを防止する。 ロックが有効になった後、"
9192 "呼び出し元は、 存在することが要求された全てのページをフォールトさせなければな"
9193 "らない。 セグメントがロックされると、 関連するデータ構造体において "
9194 "I<shm_perm.mode> フィールドの (標準的ではない)  B<SHM_LOCKED> フラグが設定さ"
9195 "れる。 このデータ構造体は B<IPC_STAT> で取得される。"
9196
9197 #. type: Plain text
9198 #: build/C/man2/shmctl.2:160
9199 msgid ""
9200 "The caller I<must> ensure that a segment is eventually destroyed; otherwise "
9201 "its pages that were faulted in will remain in memory or swap."
9202 msgstr ""
9203 "呼び出し元は最終的にはセグメントを忘れずに破棄I<しなければならない>。 そうで"
9204 "なれば、フォールト (fault) されたページは メモリかスワップ (swap) に残り続け"
9205 "る。"
9206
9207 #. type: Plain text
9208 #: build/C/man2/shmctl.2:165
9209 msgid ""
9210 "See also the description of I</proc/sys/kernel/shm_rmid_forced> in B<proc>"
9211 "(5)."
9212 msgstr "B<proc>(5) の I</proc/sys/kernel/shm_rmid_forced> の説明も参照のこと。"
9213
9214 #. type: TP
9215 #: build/C/man2/shmctl.2:165
9216 #, no-wrap
9217 msgid "B<IPC_INFO> (Linux-specific)"
9218 msgstr "B<IPC_INFO> (Linux 固有)"
9219
9220 #. type: Plain text
9221 #: build/C/man2/shmctl.2:178
9222 msgid ""
9223 "Returns information about system-wide shared memory limits and parameters in "
9224 "the structure pointed to by I<buf>.  This structure is of type I<shminfo> "
9225 "(thus, a cast is required), defined in I<E<lt>sys/shm.hE<gt>> if the "
9226 "B<_GNU_SOURCE> feature test macro is defined:"
9227 msgstr ""
9228 "システム全体での共有メモリの制限とパラメータに関する情報を、 I<buf> が指す構"
9229 "造体に入れて返す。 この構造体は I<shminfo> 型である (そのためキャストが必要で"
9230 "ある)。 I<shminfo> は B<_GNU_SOURCE> 機能検査マクロが定義された場合に "
9231 "I<E<lt>sys/shm.hE<gt>> で以下のように定義される:"
9232
9233 #. type: Plain text
9234 #: build/C/man2/shmctl.2:192
9235 #, no-wrap
9236 msgid ""
9237 "struct  shminfo {\n"
9238 "    unsigned long shmmax; /* Maximum segment size */\n"
9239 "    unsigned long shmmin; /* Minimum segment size;\n"
9240 "                             always 1 */\n"
9241 "    unsigned long shmmni; /* Maximum number of segments */\n"
9242 "    unsigned long shmseg; /* Maximum number of segments\n"
9243 "                             that a process can attach;\n"
9244 "                             unused within kernel */\n"
9245 "    unsigned long shmall; /* Maximum number of pages of\n"
9246 "                             shared memory, system-wide */\n"
9247 "};\n"
9248 msgstr ""
9249 "struct  shminfo {\n"
9250 "    unsigned long shmmax; /* 最大セグメントサイズ */\n"
9251 "    unsigned long shmmin; /* 最小セグメントサイズ。\n"
9252 "                             常に 1 */\n"
9253 "    unsigned long shmmni; /* 最大セグメント数 */\n"
9254 "    unsigned long shmseg; /* プロセスが付加できる\n"
9255 "                             セグメントの最大数。\n"
9256 "                             カーネル内では未使用 */\n"
9257 "    unsigned long shmall; /* 共有メモリの最大ページ数。\n"
9258 "                             システム全体での値 */\n"
9259 "};\n"
9260
9261 #. type: Plain text
9262 #: build/C/man2/shmctl.2:205
9263 msgid ""
9264 "The I<shmmni>, I<shmmax>, and I<shmall> settings can be changed via I</proc> "
9265 "files of the same name; see B<proc>(5)  for details."
9266 msgstr ""
9267 "設定 I<shmmni>, I<shmmax>, I<shmall> は I</proc> にある同じ名前のファイル経由"
9268 "で変更可能である。 詳しくは B<proc>(5)  を参照。"
9269
9270 #. type: TP
9271 #: build/C/man2/shmctl.2:205
9272 #, no-wrap
9273 msgid "B<SHM_INFO> (Linux-specific)"
9274 msgstr "B<SHM_INFO> (Linux 固有)"
9275
9276 #. type: Plain text
9277 #: build/C/man2/shmctl.2:216
9278 msgid ""
9279 "Returns a I<shm_info> structure whose fields contain information about "
9280 "system resources consumed by shared memory.  This structure is defined in "
9281 "I<E<lt>sys/shm.hE<gt>> if the B<_GNU_SOURCE> feature test macro is defined:"
9282 msgstr ""
9283 "共有メモリが消費しているシステム資源に関する情報を 格納した I<shm_info> 構造"
9284 "体を返す。 この構造体は、 B<_GNU_SOURCE> 機能検査マクロが定義された場合に "
9285 "I<E<lt>sys/shm.hE<gt>> で以下のように定義される:"
9286
9287 #. type: Plain text
9288 #: build/C/man2/shmctl.2:233
9289 #, no-wrap
9290 msgid ""
9291 "struct shm_info {\n"
9292 "    int           used_ids; /* # of currently existing\n"
9293 "                               segments */\n"
9294 "    unsigned long shm_tot;  /* Total number of shared\n"
9295 "                               memory pages */\n"
9296 "    unsigned long shm_rss;  /* # of resident shared\n"
9297 "                               memory pages */\n"
9298 "    unsigned long shm_swp;  /* # of swapped shared\n"
9299 "                               memory pages */\n"
9300 "    unsigned long swap_attempts;\n"
9301 "                            /* Unused since Linux 2.4 */\n"
9302 "    unsigned long swap_successes;\n"
9303 "                            /* Unused since Linux 2.4 */\n"
9304 "};\n"
9305 msgstr ""
9306 "struct shm_info {\n"
9307 "    int           used_ids; /* 現在存在するセグメント数 */\n"
9308 "    unsigned long shm_tot;  /* 共有メモリのページ総数 */\n"
9309 "    unsigned long shm_rss;  /* メモリ上にある (スワップされて\n"
9310 "                               いない) 共有メモリページ数 */\n"
9311 "    unsigned long shm_swp;  /* スワップされている共有メモリ\n"
9312 "                               ページ数 */\n"
9313 "    unsigned long swap_attempts;\n"
9314 "                            /* Linux 2.4 以降では未使用 */\n"
9315 "    unsigned long swap_successes;\n"
9316 "                            /* Linux 2.4 以降では未使用 */\n"
9317 "};\n"
9318
9319 #. type: TP
9320 #: build/C/man2/shmctl.2:235
9321 #, no-wrap
9322 msgid "B<SHM_STAT> (Linux-specific)"
9323 msgstr "B<SHM_STAT> (Linux 固有)"
9324
9325 #. type: Plain text
9326 #: build/C/man2/shmctl.2:246
9327 msgid ""
9328 "Returns a I<shmid_ds> structure as for B<IPC_STAT>.  However, the I<shmid> "
9329 "argument is not a segment identifier, but instead an index into the kernel's "
9330 "internal array that maintains information about all shared memory segments "
9331 "on the system."
9332 msgstr ""
9333 "B<IPC_STAT> と同じく I<shmid_ds> 構造体を返す。 但し、 I<shmid> 引き数は、セ"
9334 "グメント識別子ではなく、システム上の全ての共有メモリ セグメントに関する情報を"
9335 "管理するカーネルの内部配列へのインデックス である。"
9336
9337 #. type: Plain text
9338 #: build/C/man2/shmctl.2:249
9339 msgid ""
9340 "The caller can prevent or allow swapping of a shared memory segment with the "
9341 "following I<cmd> values:"
9342 msgstr ""
9343 "呼び出し元は、I<cmd> に以下の値を指定することで、共有メモリ・セグメントが ス"
9344 "ワップされることを防止したり、許可したりできる:"
9345
9346 #. type: TP
9347 #: build/C/man2/shmctl.2:250
9348 #, no-wrap
9349 msgid "B<SHM_LOCK> (Linux-specific)"
9350 msgstr "B<SHM_LOCK> (Linux 固有)"
9351
9352 #. type: Plain text
9353 #: build/C/man2/shmctl.2:262
9354 msgid ""
9355 "Prevent swapping of the shared memory segment.  The caller must fault in any "
9356 "pages that are required to be present after locking is enabled.  If a "
9357 "segment has been locked, then the (nonstandard)  B<SHM_LOCKED> flag of the "
9358 "I<shm_perm.mode> field in the associated data structure retrieved by "
9359 "B<IPC_STAT> will be set."
9360 msgstr ""
9361 "共有メモリ・セグメントをスワップすることを防止する。 ロックが有効になった後、"
9362 "呼び出し元は、 存在することが要求された全てのページをフォールトさせなければな"
9363 "らない。 セグメントがロックされると、 関連するデータ構造体において "
9364 "I<shm_perm.mode> フィールドの (標準的ではない)  B<SHM_LOCKED> フラグが設定さ"
9365 "れる。 このデータ構造体は B<IPC_STAT> で取得される。"
9366
9367 #. type: TP
9368 #: build/C/man2/shmctl.2:262
9369 #, no-wrap
9370 msgid "B<SHM_UNLOCK> (Linux-specific)"
9371 msgstr "B<SHM_UNLOCK> (Linux 固有)"
9372
9373 #. type: Plain text
9374 #: build/C/man2/shmctl.2:265
9375 msgid "Unlock the segment, allowing it to be swapped out."
9376 msgstr "セグメントのロックを解除し、スワップ・アウトすることを可能にする。"
9377
9378 #.  There was some weirdness in 2.6.9: SHM_LOCK and SHM_UNLOCK could
9379 #.  be applied to a segment, regardless of ownership of the segment.
9380 #.  This was a botch-up in the move to RLIMIT_MEMLOCK, and was fixed
9381 #.  in 2.6.10.  MTK, May 2005
9382 #. type: Plain text
9383 #: build/C/man2/shmctl.2:283
9384 msgid ""
9385 "In kernels before 2.6.10, only a privileged process could employ B<SHM_LOCK> "
9386 "and B<SHM_UNLOCK>.  Since kernel 2.6.10, an unprivileged process can employ "
9387 "these operations if its effective UID matches the owner or creator UID of "
9388 "the segment, and (for B<SHM_LOCK>)  the amount of memory to be locked falls "
9389 "within the B<RLIMIT_MEMLOCK> resource limit (see B<setrlimit>(2))."
9390 msgstr ""
9391 "2.6.10 より前のカーネルでは、特権プロセスだけが B<SHM_LOCK> と B<SHM_UNLOCK> "
9392 "を利用することができた。 2.6.10 以降のカーネルでは、非特権プロセスであっても"
9393 "次の条件を満たせば これらの操作を利用することができる。その条件とは、プロセス"
9394 "の実効 UID がそのセグメントの所有者もしくは作成者の UID と一致し、 "
9395 "(B<SHM_LOCK> の場合には) ロックするメモリの合計が B<RLIMIT_MEMLOCK> リソース"
9396 "上限 (B<setrlimit>(2)  参照) の範囲内に入っていることである。"
9397
9398 #. type: Plain text
9399 #: build/C/man2/shmctl.2:301
9400 msgid ""
9401 "A successful B<IPC_INFO> or B<SHM_INFO> operation returns the index of the "
9402 "highest used entry in the kernel's internal array recording information "
9403 "about all shared memory segments.  (This information can be used with "
9404 "repeated B<SHM_STAT> operations to obtain information about all shared "
9405 "memory segments on the system.)  A successful B<SHM_STAT> operation returns "
9406 "the identifier of the shared memory segment whose index was given in "
9407 "I<shmid>.  Other operations return 0 on success."
9408 msgstr ""
9409 "B<IPC_INFO> と B<SHM_INFO> 操作は、成功すると、全ての共有メモリセグメントに関"
9410 "する情報を 管理しているカーネルの内部配列の使用中エントリのインデックスの う"
9411 "ち最大値を返す (この情報は、システムの全ての共有メモリセグメントに関する情報"
9412 "を 取得するために、 B<SHM_STAT> 操作を繰り返し実行する際に使用できる)。 "
9413 "B<SHM_STAT> 操作は、成功すると、 I<shmid> で指定されたインデックスを持つ共有"
9414 "メモリセグメントの識別子を返す。 他の操作は、成功の場合 0 を返す。"
9415
9416 #. type: Plain text
9417 #: build/C/man2/shmctl.2:305
9418 msgid "On error, -1 is returned, and I<errno> is set appropriately."
9419 msgstr "エラーの場合は -1 を返し、 I<errno> を適切に設定する。"
9420
9421 #. type: Plain text
9422 #: build/C/man2/shmctl.2:314
9423 msgid ""
9424 "B<IPC_STAT> or B<SHM_STAT> is requested and I<shm_perm.mode> does not allow "
9425 "read access for I<shmid>, and the calling process does not have the "
9426 "B<CAP_IPC_OWNER> capability."
9427 msgstr ""
9428 "B<IPC_STAT> または B<SHM_STAT> が要求され、 I<shm_perm.mode> が I<shmid> への"
9429 "読み込みアクセスを許しておらず、 かつ呼び出したプロセスが B<CAP_IPC_OWNER> "
9430 "ケーパビリティ (capability) を持っていない。"
9431
9432 #. type: Plain text
9433 #: build/C/man2/shmctl.2:325
9434 msgid ""
9435 "The argument I<cmd> has value B<IPC_SET> or B<IPC_STAT> but the address "
9436 "pointed to by I<buf> isn't accessible."
9437 msgstr ""
9438 "I<cmd> 引き数に B<IPC_SET> か B<IPC_STAT> が指定されたが I<buf> で指されてい"
9439 "るアドレスにアクセスできない。"
9440
9441 #. type: TP
9442 #: build/C/man2/shmctl.2:325 build/C/man2/shmop.2:197
9443 #, no-wrap
9444 msgid "B<EIDRM>"
9445 msgstr "B<EIDRM>"
9446
9447 #. type: Plain text
9448 #: build/C/man2/shmctl.2:328 build/C/man2/shmop.2:200
9449 msgid "I<shmid> points to a removed identifier."
9450 msgstr "I<shmid> が削除 (remove) された識別子 (identifier) を指している。"
9451
9452 #. type: Plain text
9453 #: build/C/man2/shmctl.2:337
9454 msgid ""
9455 "I<shmid> is not a valid identifier, or I<cmd> is not a valid command.  Or: "
9456 "for a B<SHM_STAT> operation, the index value specified in I<shmid> referred "
9457 "to an array slot that is currently unused."
9458 msgstr ""
9459 "I<shmid> が有効な識別子でないか、 I<cmd> が有効なコマンドでない。 もしくは、 "
9460 "B<SHM_STAT> 操作の場合に、 I<shmid> で指定されたインデックス値が現在未使用の"
9461 "配列のスロットを参照していた。"
9462
9463 #. type: Plain text
9464 #: build/C/man2/shmctl.2:348
9465 msgid ""
9466 "(In kernels since 2.6.9), B<SHM_LOCK> was specified and the size of the to-"
9467 "be-locked segment would mean that the total bytes in locked shared memory "
9468 "segments would exceed the limit for the real user ID of the calling "
9469 "process.  This limit is defined by the B<RLIMIT_MEMLOCK> soft resource limit "
9470 "(see B<setrlimit>(2))."
9471 msgstr ""
9472 "(2.6.9 以降のカーネルにおいて)  B<SHM_LOCK> が指定され、 ロックされる予定のセ"
9473 "グメントのサイズ (ロックされる共有メモリ・セグメントの合計バイト数) が、 呼び"
9474 "出したプロセスの実ユーザー ID についての制限を超えた。 この制限は "
9475 "B<RLIMIT_MEMLOCK> ソフト資源制限で定義される (B<setrlimit>(2)  を参照)。"
9476
9477 #. type: Plain text
9478 #: build/C/man2/shmctl.2:353
9479 msgid ""
9480 "B<IPC_STAT> is attempted, and the GID or UID value is too large to be stored "
9481 "in the structure pointed to by I<buf>."
9482 msgstr ""
9483 "B<IPC_STAT> が試みられ、GID や UID の値が I<buf> で指示される構造体に格納する"
9484 "には大き過ぎる。"
9485
9486 #. type: Plain text
9487 #: build/C/man2/shmctl.2:365
9488 msgid ""
9489 "B<IPC_SET> or B<IPC_RMID> is attempted, and the effective user ID of the "
9490 "calling process is not that of the creator (found in I<shm_perm.cuid>), or "
9491 "the owner (found in I<shm_perm.uid>), and the process was not privileged "
9492 "(Linux: did not have the B<CAP_SYS_ADMIN> capability)."
9493 msgstr ""
9494 "B<IPC_SET> か B<IPC_RMID> が試みられ、 呼び出したプロセスの実効ユーザー ID が"
9495 "作成者 (I<shm_perm.cuid>)  でも所有者 (I<shm_perm.uid>)  でもなく、プロセスが"
9496 "特権を持たない (Linux では B<CAP_SYS_ADMIN> ケーパビリティを持たない)。"
9497
9498 #. type: Plain text
9499 #: build/C/man2/shmctl.2:377
9500 msgid ""
9501 "Or (in kernels before 2.6.9), B<SHM_LOCK> or B<SHM_UNLOCK> was specified, "
9502 "but the process was not privileged (Linux: did not have the B<CAP_IPC_LOCK> "
9503 "capability).  (Since Linux 2.6.9, this error can also occur if the "
9504 "B<RLIMIT_MEMLOCK> is 0 and the caller is not privileged.)"
9505 msgstr ""
9506 "または (2.6.9 より前のカーネルで)  B<SHM_LOCK> または B<SHM_UNLOCK> が指定さ"
9507 "れているが、プロセスが特権を持たない (Linux では B<CAP_IPC_LOCK> ケーパビリ"
9508 "ティを持たない)。 (Linux 2.6.9 以降では、 B<RLIMIT_MEMLOCK> が 0 で呼び出し元"
9509 "が特権を持たない場合にも、このエラーが起こる。)"
9510
9511 #.  SVr4 documents an additional error condition EMFILE.
9512 #. type: Plain text
9513 #: build/C/man2/shmctl.2:382 build/C/man2/shmget.2:235
9514 #: build/C/man2/shmop.2:234
9515 msgid "SVr4, POSIX.1-2001."
9516 msgstr "SVr4, POSIX.1-2001."
9517
9518 #.  Like Linux, the FreeBSD man pages still document
9519 #.  the inclusion of these header files.
9520 #. type: Plain text
9521 #: build/C/man2/shmctl.2:395 build/C/man2/shmget.2:251
9522 msgid ""
9523 "The inclusion of I<E<lt>sys/types.hE<gt>> and I<E<lt>sys/ipc.hE<gt>> isn't "
9524 "required on Linux or by any version of POSIX.  However, some old "
9525 "implementations required the inclusion of these header files, and the SVID "
9526 "also documented their inclusion.  Applications intended to be portable to "
9527 "such old systems may need to include these header files."
9528 msgstr ""
9529 "Linux や POSIX の全てのバージョンでは、 I<E<lt>sys/types.hE<gt>> と "
9530 "I<E<lt>sys/ipc.hE<gt>> のインクルードは必要ない。しかしながら、いくつかの古い"
9531 "実装ではこれらのヘッダファイルのインクルードが必要であり、 SVID でもこれらの"
9532 "インクルードをするように記載されている。このような古いシステムへの移植性を意"
9533 "図したアプリケーションではこれらのファイルをインクルードする必要があるかもし"
9534 "れない。"
9535
9536 #. type: Plain text
9537 #: build/C/man2/shmctl.2:407
9538 msgid ""
9539 "The B<IPC_INFO>, B<SHM_STAT> and B<SHM_INFO> operations are used by the "
9540 "B<ipcs>(1)  program to provide information on allocated resources.  In the "
9541 "future these may modified or moved to a I</proc> filesystem interface."
9542 msgstr ""
9543 "B<IPC_INFO>, B<SHM_STAT>, B<SHM_INFO> 操作は、 B<ipcs>(1)  プログラムで割り当"
9544 "て済の資源に関する情報を提供するために 使用されている。将来、これらの操作は変"
9545 "更されたり、 I</proc> ファイルシステムのインタフェースに移動されるかもしれな"
9546 "い。"
9547
9548 #. type: Plain text
9549 #: build/C/man2/shmctl.2:415
9550 msgid ""
9551 "Linux permits a process to attach (B<shmat>(2))  a shared memory segment "
9552 "that has already been marked for deletion using I<shmctl(IPC_RMID)>.  This "
9553 "feature is not available on other UNIX implementations; portable "
9554 "applications should avoid relying on it."
9555 msgstr ""
9556 "Linux では、 I<shmctl(IPC_RMID)> を使ってすでに削除マークがつけられている共有"
9557 "メモリ・セグメントを あるプロセスが付加 (attach)  (B<shmat>(2))  することを許"
9558 "可している。 この機能は他の UNIX の実装では利用できない。 移植性を考慮したア"
9559 "プリケーションではこれに依存しないようにすべきである。"
9560
9561 #. type: Plain text
9562 #: build/C/man2/shmctl.2:428
9563 msgid ""
9564 "Various fields in a I<struct shmid_ds> were typed as I<short> under Linux "
9565 "2.2 and have become I<long> under Linux 2.4.  To take advantage of this, a "
9566 "recompilation under glibc-2.1.91 or later should suffice.  (The kernel "
9567 "distinguishes old and new calls by an B<IPC_64> flag in I<cmd>.)"
9568 msgstr ""
9569 "I<構造体 shmid_ds> 内の多くのフィールドは、 Linux 2.2 では I<short> 型だった"
9570 "が、Linux 2.4 では I<long> 型になった。 この利点を生かすには、glibc-2.1.91 以"
9571 "降の環境下で 再コンパイルすれば十分である。 カーネルは新しい形式の呼び出しと"
9572 "古い形式の呼び出しを I<cmd> 内の B<IPC_64> フラグで区別する。"
9573
9574 #. type: Plain text
9575 #: build/C/man2/shmctl.2:435
9576 msgid ""
9577 "B<mlock>(2), B<setrlimit>(2), B<shmget>(2), B<shmop>(2), B<capabilities>(7), "
9578 "B<svipc>(7)"
9579 msgstr ""
9580 "B<mlock>(2), B<setrlimit>(2), B<shmget>(2), B<shmop>(2), B<capabilities>(7), "
9581 "B<shm_overview>(7), B<svipc>(7)"
9582
9583 #. type: TH
9584 #: build/C/man2/shmget.2:38
9585 #, no-wrap
9586 msgid "SHMGET"
9587 msgstr "SHMGET"
9588
9589 #. type: Plain text
9590 #: build/C/man2/shmget.2:41
9591 msgid "shmget - allocates a System V shared memory segment"
9592 msgstr "shmget - System V 共有メモリ・セグメントを割り当てる"
9593
9594 #. type: Plain text
9595 #: build/C/man2/shmget.2:48
9596 msgid "B<int shmget(key_t >I<key>B<, size_t >I<size>B<, int >I<shmflg>B<);>"
9597 msgstr "B<int shmget(key_t >I<key>B<, size_t >I<size>B<, int >I<shmflg>B<);>"
9598
9599 #. type: Plain text
9600 #: build/C/man2/shmget.2:72
9601 msgid ""
9602 "B<shmget>()  returns the identifier of the System V shared memory segment "
9603 "associated with the value of the argument I<key>.  A new shared memory "
9604 "segment, with size equal to the value of I<size> rounded up to a multiple of "
9605 "B<PAGE_SIZE>, is created if I<key> has the value B<IPC_PRIVATE> or I<key> "
9606 "isn't B<IPC_PRIVATE>, no shared memory segment corresponding to I<key> "
9607 "exists, and B<IPC_CREAT> is specified in I<shmflg>."
9608 msgstr ""
9609 "B<shmget>()  は I<key> 引き数に対応する System V 共有メモリ・セグメントの識別"
9610 "子を返す。 I<key> の値が B<IPC_PRIVATE> の場合、もしくは I<key> に対応する共"
9611 "有メモリ・セグメントが存在せず、 I<shmflg> に B<IPC_CREAT> が指定されていた場"
9612 "合、 新しい共有メモリ・セグメントを作成する。 作成される共有メモリ・セグメン"
9613 "トは、 I<size> 引き数の値を B<PAGE_SIZE> の倍数へと切り上げた (round up) 大き"
9614 "さとなる。"
9615
9616 #. type: Plain text
9617 #: build/C/man2/shmget.2:91
9618 msgid ""
9619 "If I<shmflg> specifies both B<IPC_CREAT> and B<IPC_EXCL> and a shared memory "
9620 "segment already exists for I<key>, then B<shmget>()  fails with I<errno> set "
9621 "to B<EEXIST>.  (This is analogous to the effect of the combination B<O_CREAT "
9622 "| O_EXCL> for B<open>(2).)"
9623 msgstr ""
9624 "I<shmflg> に B<IPC_CREAT> と B<IPC_EXCL> の両方が指定された場合、 I<key> に対"
9625 "応する共有メモリ・セグメントが既に存在すると、 B<shmget>()  は失敗し、 "
9626 "I<errno> に B<EEXIST> が設定される (これは B<open>(2)  に B<O_CREAT | "
9627 "O_EXCL> を指定した場合の動作と同じである)。"
9628
9629 #. type: Plain text
9630 #: build/C/man2/shmget.2:95
9631 msgid "The value I<shmflg> is composed of:"
9632 msgstr "I<shmflg> は以下の内容から構成される:"
9633
9634 #. type: TP
9635 #: build/C/man2/shmget.2:95
9636 #, no-wrap
9637 msgid "B<IPC_CREAT>"
9638 msgstr "B<IPC_CREAT>"
9639
9640 #. type: Plain text
9641 #: build/C/man2/shmget.2:102
9642 msgid ""
9643 "to create a new segment.  If this flag is not used, then B<shmget>()  will "
9644 "find the segment associated with I<key> and check to see if the user has "
9645 "permission to access the segment."
9646 msgstr ""
9647 "新しいセグメントを作成する。このフラグが指定されなかった場合、 B<shmget>()  "
9648 "は I<key> に対応するセグメントを探し、 ユーザがそのセグメントにアクセスする許"
9649 "可があるかどうかをチェックする。"
9650
9651 #. type: TP
9652 #: build/C/man2/shmget.2:102
9653 #, no-wrap
9654 msgid "B<IPC_EXCL>"
9655 msgstr "B<IPC_EXCL>"
9656
9657 #. type: Plain text
9658 #: build/C/man2/shmget.2:105
9659 msgid "used with B<IPC_CREAT> to ensure failure if the segment already exists."
9660 msgstr ""
9661 "B<IPC_CREAT> と共に使用し、セグメントが既に存在した場合には 失敗することを保"
9662 "証する。"
9663
9664 #. type: TP
9665 #: build/C/man2/shmget.2:105
9666 #, no-wrap
9667 msgid "I<mode_flags>"
9668 msgstr "I<mode_flags>"
9669
9670 #. type: Plain text
9671 #: build/C/man2/shmget.2:115
9672 msgid ""
9673 "(least significant 9 bits)  specifying the permissions granted to the owner, "
9674 "group, and world.  These bits have the same format, and the same meaning, as "
9675 "the I<mode> argument of B<open>(2).  Presently, the execute permissions are "
9676 "not used by the system."
9677 msgstr ""
9678 "(下位 9 ビット)  所有者、グループ、他人 (world) への許可を指定する。 これらの"
9679 "ビットは B<open>(2)  の I<mode> 引き数と同じ形式で同じ意味を持つ。 今のとこ"
9680 "ろ、システムは実行 (execute) 許可を参照しない。"
9681
9682 #. type: TP
9683 #: build/C/man2/shmget.2:115
9684 #, no-wrap
9685 msgid "B<SHM_HUGETLB> (since Linux 2.6)"
9686 msgstr "B<SHM_HUGETLB> (Linux 2.6 以降)"
9687
9688 #. type: Plain text
9689 #: build/C/man2/shmget.2:121
9690 msgid ""
9691 "Allocate the segment using \"huge pages.\" See the Linux kernel source file "
9692 "I<Documentation/vm/hugetlbpage.txt> for further information."
9693 msgstr ""
9694 "\"ヒュージページ (huge page)\" を使うセグメントを割り当てる。詳細な情報は、"
9695 "Linux カーネルソースのファイル I<Documentation/vm/hugetlbpage.txt> を参照。"
9696
9697 #. type: TP
9698 #: build/C/man2/shmget.2:121
9699 #, no-wrap
9700 msgid "B<SHM_NORESERVE> (since Linux 2.6.15)"
9701 msgstr "B<SHM_NORESERVE> (Linux 2.6.15 以降)"
9702
9703 #.  As at 2.6.17-rc2, this flag has no effect if SHM_HUGETLB was also
9704 #.  specified.
9705 #. type: Plain text
9706 #: build/C/man2/shmget.2:140
9707 msgid ""
9708 "This flag serves the same purpose as the B<mmap>(2)  B<MAP_NORESERVE> flag.  "
9709 "Do not reserve swap space for this segment.  When swap space is reserved, "
9710 "one has the guarantee that it is possible to modify the segment.  When swap "
9711 "space is not reserved one might get B<SIGSEGV> upon a write if no physical "
9712 "memory is available.  See also the discussion of the file I</proc/sys/vm/"
9713 "overcommit_memory> in B<proc>(5)."
9714 msgstr ""
9715 "このフラグは、 B<mmap>(2)  の B<MAP_NORESERVE> フラグと同じ役割を果たす。 こ"
9716 "のセグメントに対するスワップ空間の予約を行わない。 スワップ空間を予約した場合"
9717 "は、そのセグメントの変更が必ず成功することが 保証される。スワップ空間の予約を"
9718 "行わなかった場合は、物理メモリに空きが ないと書き込み時に B<SIGSEGV> を受け取"
9719 "る可能性がある。 B<proc>(5)  にある I</proc/sys/vm/overcommit_memory> ファイ"
9720 "ルに関する議論も参照のこと。"
9721
9722 #. type: Plain text
9723 #: build/C/man2/shmget.2:148
9724 msgid ""
9725 "When a new shared memory segment is created, its contents are initialized to "
9726 "zero values, and its associated data structure, I<shmid_ds> (see B<shmctl>"
9727 "(2)), is initialized as follows:"
9728 msgstr ""
9729 "共有メモリ・セグメントが新たに作成される際、 共有メモリ・セグメントの内容は "
9730 "0 で初期化され、 関連情報を保持するデータ構造体 I<shmid_ds> は以下のように初"
9731 "期化される。"
9732
9733 #. type: Plain text
9734 #: build/C/man2/shmget.2:153
9735 msgid ""
9736 "I<shm_perm.cuid> and I<shm_perm.uid> are set to the effective user ID of the "
9737 "calling process."
9738 msgstr ""
9739 "I<shm_perm.cuid> と I<shm_perm.uid> に呼び出し元プロセスの実効 (effective) "
9740 "ユーザーID を設定する。"
9741
9742 #. type: Plain text
9743 #: build/C/man2/shmget.2:158
9744 msgid ""
9745 "I<shm_perm.cgid> and I<shm_perm.gid> are set to the effective group ID of "
9746 "the calling process."
9747 msgstr ""
9748 "I<shm_perm.cgid> と I<shm_perm.gid> に呼び出し元プロセスの実効グループID を設"
9749 "定する。"
9750
9751 #. type: Plain text
9752 #: build/C/man2/shmget.2:163
9753 msgid ""
9754 "The least significant 9 bits of I<shm_perm.mode> are set to the least "
9755 "significant 9 bit of I<shmflg>."
9756 msgstr ""
9757 "I<shm_perm.mode> の下位 9 ビットに I<shmflg> の下位 9 ビットを設定する。"
9758
9759 #. type: Plain text
9760 #: build/C/man2/shmget.2:167
9761 msgid "I<shm_segsz> is set to the value of I<size>."
9762 msgstr "I<shm_segsz> に I<size> の値を設定する。"
9763
9764 #. type: Plain text
9765 #: build/C/man2/shmget.2:174
9766 msgid ""
9767 "I<shm_lpid>, I<shm_nattch>, I<shm_atime>, and I<shm_dtime> are set to 0."
9768 msgstr ""
9769 "I<shm_lpid>, I<shm_nattch>, I<shm_atime>, I<shm_dtime> に 0 を設定する。"
9770
9771 #. type: Plain text
9772 #: build/C/man2/shmget.2:177
9773 msgid "I<shm_ctime> is set to the current time."
9774 msgstr "I<shm_ctime> に現在の時刻を設定する。"
9775
9776 #. type: Plain text
9777 #: build/C/man2/shmget.2:180
9778 msgid ""
9779 "If the shared memory segment already exists, the permissions are verified, "
9780 "and a check is made to see if it is marked for destruction."
9781 msgstr ""
9782 "共有メモリ・セグメントが既に存在する場合、アクセス許可の検査と、 破壊 "
9783 "(destruction) マークがつけられていないかのチェックが行われる。"
9784
9785 #. type: Plain text
9786 #: build/C/man2/shmget.2:185
9787 msgid ""
9788 "On success, a valid shared memory identifier is returned.  On error, -1 is "
9789 "returned, and I<errno> is set to indicate the error."
9790 msgstr ""
9791 "成功の場合、有効な共有メモリ・セグメントの識別子が返される。 エラーの場合、 "
9792 "-1 が返り、 I<error> にエラーを示す値が設定される。"
9793
9794 #. type: Plain text
9795 #: build/C/man2/shmget.2:189
9796 msgid "On failure, I<errno> is set to one of the following:"
9797 msgstr "失敗した場合は I<errno> が以下のどれかに設定される:"
9798
9799 #. type: Plain text
9800 #: build/C/man2/shmget.2:195
9801 msgid ""
9802 "The user does not have permission to access the shared memory segment, and "
9803 "does not have the B<CAP_IPC_OWNER> capability."
9804 msgstr ""
9805 "ユーザーはその共有メモリ・セグメントへのアクセス許可を持たず、 "
9806 "B<CAP_IPC_OWNER> ケーパビリティも持っていない。"
9807
9808 #. type: Plain text
9809 #: build/C/man2/shmget.2:199
9810 msgid "B<IPC_CREAT | IPC_EXCL> was specified and the segment exists."
9811 msgstr ""
9812 "B<IPC_CREAT | IPC_EXCL> が指定されていたが、そのセグメントが既に存在する。"
9813
9814 #. type: Plain text
9815 #: build/C/man2/shmget.2:205
9816 msgid ""
9817 "A new segment was to be created and I<size> E<lt> B<SHMMIN> or I<size> E<gt> "
9818 "B<SHMMAX>, or no new segment was to be created, a segment with given key "
9819 "existed, but I<size> is greater than the size of that segment."
9820 msgstr ""
9821 "新しいセグメントを作成しようとした際に I<size> E<lt> B<SHMMIN> または "
9822 "I<size> E<gt> B<SHMMAX> であった。 もしくは、指定されたキーに対応するセグメン"
9823 "トが既に存在して、新しい セグメントを作成しようとはしなかったが、I<size> が存"
9824 "在するセグメントの サイズよりも大きかった。"
9825
9826 #. type: Plain text
9827 #: build/C/man2/shmget.2:214
9828 msgid ""
9829 "No segment exists for the given I<key>, and B<IPC_CREAT> was not specified."
9830 msgstr ""
9831 "指定された I<key> に対応するセグメントが存在せず、 B<IPC_CREAT> も指定されて"
9832 "いなかった。"
9833
9834 #. type: Plain text
9835 #: build/C/man2/shmget.2:217
9836 msgid "No memory could be allocated for segment overhead."
9837 msgstr "セグメントの管理情報 (overhead) に割り当てるメモリがなかった。"
9838
9839 #. type: Plain text
9840 #: build/C/man2/shmget.2:225
9841 msgid ""
9842 "All possible shared memory IDs have been taken (B<SHMMNI>), or allocating a "
9843 "segment of the requested I<size> would cause the system to exceed the system-"
9844 "wide limit on shared memory (B<SHMALL>)."
9845 msgstr ""
9846 "システム全体の共有メモリ・セグメント数の制限 (B<SHMMNI>)  に達した、または要"
9847 "求された I<size> のセグメントの割り当てが システム全体の共有メモリサイズの制"
9848 "限 (B<SHMALL>)  を超過した。"
9849
9850 #. type: Plain text
9851 #: build/C/man2/shmget.2:232
9852 msgid ""
9853 "The B<SHM_HUGETLB> flag was specified, but the caller was not privileged "
9854 "(did not have the B<CAP_IPC_LOCK> capability)."
9855 msgstr ""
9856 "B<SHM_HUGETLB> フラグが指定されたが、呼び出し元には権限がなかった "
9857 "(B<CAP_IPC_LOCK> ケーパビリティを持っていなかった)。"
9858
9859 #. type: Plain text
9860 #: build/C/man2/shmget.2:238
9861 msgid "B<SHM_HUGETLB> is a nonportable Linux extension."
9862 msgstr "B<SHM_HUGETLB> は Linux での拡張であり、移植性はない。"
9863
9864 #. type: Plain text
9865 #: build/C/man2/shmget.2:261
9866 msgid ""
9867 "B<IPC_PRIVATE> isn't a flag field but a I<key_t> type.  If this special "
9868 "value is used for I<key>, the system call ignores everything but the least "
9869 "significant 9 bits of I<shmflg> and creates a new shared memory segment (on "
9870 "success)."
9871 msgstr ""
9872 "B<IPC_PRIVATE> はフラグではなく I<key_t> 型である。 この特別な値が I<key> に"
9873 "使用された場合は、 B<shmget>()  は I<shmflg> の下位 9 ビットを除いた全てを無"
9874 "視し、 (成功すれば) 新しい共有メモリ・セグメントを作成する。"
9875
9876 #. type: Plain text
9877 #: build/C/man2/shmget.2:265
9878 msgid ""
9879 "The following limits on shared memory segment resources affect the B<shmget>"
9880 "()  call:"
9881 msgstr ""
9882 "B<shmget>()  コールに影響する共有メモリ・セグメント資源の制限は以下の通りであ"
9883 "る:"
9884
9885 #. type: TP
9886 #: build/C/man2/shmget.2:265
9887 #, no-wrap
9888 msgid "B<SHMALL>"
9889 msgstr "B<SHMALL>"
9890
9891 #. type: Plain text
9892 #: build/C/man2/shmget.2:270
9893 msgid ""
9894 "System wide maximum of shared memory pages (on Linux, this limit can be read "
9895 "and modified via I</proc/sys/kernel/shmall>)."
9896 msgstr ""
9897 "システム全体の共有メモリ・ページの最大数 (Linux では、この上限値は I</proc/"
9898 "sys/kernel/shmall> 経由で参照したり、変更したりできる)。"
9899
9900 #. type: TP
9901 #: build/C/man2/shmget.2:270
9902 #, no-wrap
9903 msgid "B<SHMMAX>"
9904 msgstr "B<SHMMAX>"
9905
9906 #. type: Plain text
9907 #: build/C/man2/shmget.2:275
9908 msgid ""
9909 "Maximum size in bytes for a shared memory segment: policy dependent (on "
9910 "Linux, this limit can be read and modified via I</proc/sys/kernel/shmmax>)."
9911 msgstr ""
9912 "共有メモリ・セグメントのバイト単位の大きさの上限: 方針依存 (Linux では、この"
9913 "上限値は I</proc/sys/kernel/shmmax> 経由で参照したり、変更したりできる)。"
9914
9915 #. type: TP
9916 #: build/C/man2/shmget.2:275
9917 #, no-wrap
9918 msgid "B<SHMMIN>"
9919 msgstr "B<SHMMIN>"
9920
9921 #. type: Plain text
9922 #: build/C/man2/shmget.2:281
9923 msgid ""
9924 "Minimum size in bytes for a shared memory segment: implementation dependent "
9925 "(currently 1 byte, though B<PAGE_SIZE> is the effective minimum size)."
9926 msgstr ""
9927 "共有メモリ・セグメントのバイト単位の大きさの下限: 実装依存 (現在は 1 バイトだ"
9928 "が、実質的な最小サイズは B<PAGE_SIZE> である)。"
9929
9930 #. type: TP
9931 #: build/C/man2/shmget.2:281
9932 #, no-wrap
9933 msgid "B<SHMMNI>"
9934 msgstr "B<SHMMNI>"
9935
9936 #.  Kernels between 2.4.x and 2.6.8 had an off-by-one error that meant
9937 #.  that we could create one more segment than SHMMNI -- MTK
9938 #.  This /proc file is not available in Linux 2.2 and earlier -- MTK
9939 #. type: Plain text
9940 #: build/C/man2/shmget.2:290
9941 msgid ""
9942 "System wide maximum number of shared memory segments: implementation "
9943 "dependent (currently 4096, was 128 before Linux 2.3.99; on Linux, this limit "
9944 "can be read and modified via I</proc/sys/kernel/shmmni>)."
9945 msgstr ""
9946 "システム全体の共有メモリーの数の上限: 実装依存 (現在は 4096。Linux 2.3.99 よ"
9947 "り前では 128。 Linux では、この上限値は I</proc/sys/kernel/shmmni> 経由で参照"
9948 "したり、変更したりできる)。"
9949
9950 #. type: Plain text
9951 #: build/C/man2/shmget.2:294
9952 msgid ""
9953 "The implementation has no specific limits for the per-process maximum number "
9954 "of shared memory segments (B<SHMSEG>)."
9955 msgstr ""
9956 "プロセス当りの共有メモリ・セグメントの個数の最大値 (B<SHMSEG>)  に関する実装"
9957 "上の制限はない。"
9958
9959 #. type: Plain text
9960 #: build/C/man2/shmget.2:300
9961 msgid ""
9962 "Until version 2.3.30 Linux would return B<EIDRM> for a B<shmget>()  on a "
9963 "shared memory segment scheduled for deletion."
9964 msgstr ""
9965 "バージョン 2.3.30 までは、Linux は 削除が予定されている共有メモリ・セグメント"
9966 "に対して B<shmget>()  が行われると B<EIDRM> を返していた。"
9967
9968 #. type: Plain text
9969 #: build/C/man2/shmget.2:306
9970 msgid ""
9971 "The name choice B<IPC_PRIVATE> was perhaps unfortunate, B<IPC_NEW> would "
9972 "more clearly show its function."
9973 msgstr ""
9974 "B<IPC_PRIVATE> という名前を選んだのはおそらく失敗であろう。 B<IPC_NEW> の方が"
9975 "より明確にその機能を表しているだろう。"
9976
9977 #. type: Plain text
9978 #: build/C/man2/shmget.2:314
9979 msgid ""
9980 "B<shmat>(2), B<shmctl>(2), B<shmdt>(2), B<ftok>(3), B<capabilities>(7), "
9981 "B<shm_overview>(7), B<svipc>(7)"
9982 msgstr ""
9983 "B<shmat>(2), B<shmctl>(2), B<shmdt>(2), B<ftok>(3), B<capabilities>(7), "
9984 "B<shm_overview>(7), B<svipc>(7)"
9985
9986 #. type: TH
9987 #: build/C/man2/shmop.2:41
9988 #, no-wrap
9989 msgid "SHMOP"
9990 msgstr "SHMOP"
9991
9992 #. type: Plain text
9993 #: build/C/man2/shmop.2:44
9994 msgid "shmat, shmdt - System V shared memory operations"
9995 msgstr "shmat, shmdt - System V 共有メモリ (shared memory) の操作"
9996
9997 #. type: Plain text
9998 #: build/C/man2/shmop.2:48
9999 #, no-wrap
10000 msgid ""
10001 "B<#include E<lt>sys/types.hE<gt>>\n"
10002 "B<#include E<lt>sys/shm.hE<gt>>\n"
10003 msgstr ""
10004 "B<#include E<lt>sys/types.hE<gt>>\n"
10005 "B<#include E<lt>sys/shm.hE<gt>>\n"
10006
10007 #. type: Plain text
10008 #: build/C/man2/shmop.2:50
10009 #, no-wrap
10010 msgid "B<void *shmat(int >I<shmid>B<, const void *>I<shmaddr>B<, int >I<shmflg>B<);>\n"
10011 msgstr "B<void *shmat(int >I<shmid>B<, const void *>I<shmaddr>B<, int >I<shmflg>B<);>\n"
10012
10013 #. type: Plain text
10014 #: build/C/man2/shmop.2:52
10015 #, no-wrap
10016 msgid "B<int shmdt(const void *>I<shmaddr>B<);>\n"
10017 msgstr "B<int shmdt(const void *>I<shmaddr>B<);>\n"
10018
10019 #. type: Plain text
10020 #: build/C/man2/shmop.2:61
10021 msgid ""
10022 "B<shmat>()  attaches the System V shared memory segment identified by "
10023 "I<shmid> to the address space of the calling process.  The attaching address "
10024 "is specified by I<shmaddr> with one of the following criteria:"
10025 msgstr ""
10026 "B<shmat>()  は I<shmid> で指定された System V 共有メモリ・セグメント (shared "
10027 "memory segment) を コールしたプロセスのアドレス空間に付加 (attach) する。 付"
10028 "加するアドレスは I<shmaddr> に以下のどれかの形式で指定する:"
10029
10030 #. type: Plain text
10031 #: build/C/man2/shmop.2:67
10032 msgid ""
10033 "If I<shmaddr> is NULL, the system chooses a suitable (unused) address at "
10034 "which to attach the segment."
10035 msgstr ""
10036 "I<shmaddr> が NULL ならば、システムはセグメントを付加するための 適切な (使用"
10037 "されていない) アドレスを選択する。"
10038
10039 #. type: Plain text
10040 #: build/C/man2/shmop.2:82
10041 msgid ""
10042 "If I<shmaddr> isn't NULL and B<SHM_RND> is specified in I<shmflg>, the "
10043 "attach occurs at the address equal to I<shmaddr> rounded down to the nearest "
10044 "multiple of B<SHMLBA>.  Otherwise I<shmaddr> must be a page-aligned address "
10045 "at which the attach occurs."
10046 msgstr ""
10047 "I<shmaddr> が NULL でなく B<SHM_RND> が I<shmflg> に指定されている場合は、 "
10048 "I<shmaddr> を B<SHMLBA> の倍数へと切り捨てた (rounding down) のと等しいアドレ"
10049 "スへ付加する。 その他の場合は I<shmaddr> は付加を行なうアドレスで、ページ境界"
10050 "を指している必要がある。"
10051
10052 #. type: Plain text
10053 #: build/C/man2/shmop.2:92
10054 msgid ""
10055 "If B<SHM_RDONLY> is specified in I<shmflg>, the segment is attached for "
10056 "reading and the process must have read permission for the segment.  "
10057 "Otherwise the segment is attached for read and write and the process must "
10058 "have read and write permission for the segment.  There is no notion of a "
10059 "write-only shared memory segment."
10060 msgstr ""
10061 "B<SHM_RDONLY> が I<shmflg> に指定されていた場合は、 セグメントは読み込み専用"
10062 "に付加され、プロセスはそのセグメントへの 読み込み許可を持たなければならな"
10063 "い。 そうでなければそのセグメントは読み込みと書き込みのために付加され、 プロ"
10064 "セスはそのセグメントに読み込みと書き込みの許可を持つ必要がある。 書き込み専用"
10065 "の共有メモリ・セグメントという概念は存在しない。"
10066
10067 #. type: Plain text
10068 #: build/C/man2/shmop.2:107
10069 msgid ""
10070 "The (Linux-specific)  B<SHM_REMAP> flag may be specified in I<shmflg> to "
10071 "indicate that the mapping of the segment should replace any existing mapping "
10072 "in the range starting at I<shmaddr> and continuing for the size of the "
10073 "segment.  (Normally an B<EINVAL> error would result if a mapping already "
10074 "exists in this address range.)  In this case, I<shmaddr> must not be NULL."
10075 msgstr ""
10076 "(Linux 特有の)  B<SHM_REMAP> フラグが I<shmflg> に指定された場合は、 セグメン"
10077 "トのマッピングを既存のマッピングに置き換える。 マッピングの範囲は、 "
10078 "I<shmaddr> から始まりセグメントのサイズ分だけある (通常 B<EINVAL> エラーは、"
10079 "このアドレス範囲にマッピングが既に存在するために起る)。 このフラグを指定する"
10080 "場合は、 I<shmaddr> が NULL であってはならない。"
10081
10082 #. type: Plain text
10083 #: build/C/man2/shmop.2:114
10084 msgid ""
10085 "The B<brk>(2)  value of the calling process is not altered by the attach.  "
10086 "The segment will automatically be detached at process exit.  The same "
10087 "segment may be attached as a read and as a read-write one, and more than "
10088 "once, in the process's address space."
10089 msgstr ""
10090 "呼び出したプロセスの B<brk>(2)  の値は付加によって変化しない。 そのセグメント"
10091 "はプロセスが終了 (exit) したら自動的に分離 (detach) される。 同じセグメントを"
10092 "プロセスのアドレス空間に、読み込み専用および読み書き両用 として付加でき、また"
10093 "複数回付加することもできる。"
10094
10095 #. type: Plain text
10096 #: build/C/man2/shmop.2:122
10097 msgid ""
10098 "A successful B<shmat>()  call updates the members of the I<shmid_ds> "
10099 "structure (see B<shmctl>(2))  associated with the shared memory segment as "
10100 "follows:"
10101 msgstr ""
10102 "成功した B<shmat>()  コールは共有メモリ・セグメントに関連する I<shmid_ds> 構"
10103 "造体 (B<shmctl>(2)  を参照) のメンバーを以下のように更新する:"
10104
10105 #. type: Plain text
10106 #: build/C/man2/shmop.2:125
10107 msgid "I<shm_atime> is set to the current time."
10108 msgstr "I<shm_atime> には現在の時刻を設定する。"
10109
10110 #. type: Plain text
10111 #: build/C/man2/shmop.2:128 build/C/man2/shmop.2:154
10112 msgid "I<shm_lpid> is set to the process-ID of the calling process."
10113 msgstr "I<shm_lpid> には呼び出したプロセスのプロセス ID が設定される。"
10114
10115 #. type: Plain text
10116 #: build/C/man2/shmop.2:131
10117 msgid "I<shm_nattch> is incremented by one."
10118 msgstr "I<shm_nattch> を 1 増加させる。"
10119
10120 #. type: Plain text
10121 #: build/C/man2/shmop.2:142
10122 msgid ""
10123 "B<shmdt>()  detaches the shared memory segment located at the address "
10124 "specified by I<shmaddr> from the address space of the calling process.  The "
10125 "to-be-detached segment must be currently attached with I<shmaddr> equal to "
10126 "the value returned by the attaching B<shmat>()  call."
10127 msgstr ""
10128 "B<shmdt>()  は呼び出したプロセスのアドレス空間から I<shmaddr> で指定されたア"
10129 "ドレスに配置された共有メモリ・セグメントを分離 (detach) する。 分離する共有メ"
10130 "モリ・セグメントは、現在 I<shmaddr> に付加されているものでなければならない。 "
10131 "I<shmaddr> は、それを付加した時に B<shmat>()  が返した値に等しくなければなら"
10132 "ない。"
10133
10134 #. type: Plain text
10135 #: build/C/man2/shmop.2:148
10136 msgid ""
10137 "On a successful B<shmdt>()  call the system updates the members of the "
10138 "I<shmid_ds> structure associated with the shared memory segment as follows:"
10139 msgstr ""
10140 "成功した B<shmdt>()  コールはその共有メモリ・セグメントに関連する "
10141 "I<shmid_ds> 構造体のメンバーを以下のように更新する:"
10142
10143 #. type: Plain text
10144 #: build/C/man2/shmop.2:151
10145 msgid "I<shm_dtime> is set to the current time."
10146 msgstr "I<shm_dtime> には現在の時刻が設定される。"
10147
10148 #. type: Plain text
10149 #: build/C/man2/shmop.2:159
10150 msgid ""
10151 "I<shm_nattch> is decremented by one.  If it becomes 0 and the segment is "
10152 "marked for deletion, the segment is deleted."
10153 msgstr ""
10154 "I<shm_nattch> を 1 減少させる。 もし 0 になり、削除マークがあった場合は その"
10155 "セグメントは削除される。"
10156
10157 #. type: Plain text
10158 #: build/C/man2/shmop.2:163
10159 msgid ""
10160 "After a B<fork>(2)  the child inherits the attached shared memory segments."
10161 msgstr ""
10162 "B<fork>(2)  した後、子プロセスは付加された共有メモリ・セグメントを継承する。"
10163
10164 #. type: Plain text
10165 #: build/C/man2/shmop.2:167
10166 msgid ""
10167 "After an B<execve>(2)  all attached shared memory segments are detached from "
10168 "the process."
10169 msgstr ""
10170 "B<exec>(2)  した後、全ての付加された共有メモリ・セグメントはプロセスから分離"
10171 "される。"
10172
10173 #. type: Plain text
10174 #: build/C/man2/shmop.2:171
10175 msgid ""
10176 "Upon B<_exit>(2)  all attached shared memory segments are detached from the "
10177 "process."
10178 msgstr ""
10179 "B<exit>(2)  において、全ての付加された共有メモリ・セグメントはプロセスから分"
10180 "離される。"
10181
10182 #. type: Plain text
10183 #: build/C/man2/shmop.2:179
10184 msgid ""
10185 "On success B<shmat>()  returns the address of the attached shared memory "
10186 "segment; on error I<(void\\ *)\\ -1> is returned, and I<errno> is set to "
10187 "indicate the cause of the error."
10188 msgstr ""
10189 "B<shmat>()  は、成功した場合、 付加された共有メモリ・セグメントのアドレスを返"
10190 "す。 エラーの場合、 I<(void\\ *)\\ -1> を返し、 I<errno> にエラーの原因を示す"
10191 "値を設定する。"
10192
10193 #. type: Plain text
10194 #: build/C/man2/shmop.2:185
10195 msgid ""
10196 "On success B<shmdt>()  returns 0; on error -1 is returned, and I<errno> is "
10197 "set to indicate the cause of the error."
10198 msgstr ""
10199 "B<shmdt>()  は、成功すると 0 を返す。 エラーの場合、-1 を返し、 I<errno> にエ"
10200 "ラーの原因を示す値を設定する。"
10201
10202 #. type: Plain text
10203 #: build/C/man2/shmop.2:191
10204 msgid "When B<shmat>()  fails, I<errno> is set to one of the following:"
10205 msgstr ""
10206 "B<shmat>()  が失敗した場合、 I<errno> に以下の値のどれかを設定して返す:"
10207
10208 #. type: Plain text
10209 #: build/C/man2/shmop.2:197
10210 msgid ""
10211 "The calling process does not have the required permissions for the requested "
10212 "attach type, and does not have the B<CAP_IPC_OWNER> capability."
10213 msgstr ""
10214 "呼び出したプロセスに要求された種類の付加に必要な許可がなく、 "
10215 "B<CAP_IPC_OWNER> ケーパビリティ (capability) がない。"
10216
10217 #. type: Plain text
10218 #: build/C/man2/shmop.2:214
10219 msgid ""
10220 "Invalid I<shmid> value, unaligned (i.e., not page-aligned and B<SHM_RND> was "
10221 "not specified) or invalid I<shmaddr> value, or can't attach segment at "
10222 "I<shmaddr>, or B<SHM_REMAP> was specified and I<shmaddr> was NULL."
10223 msgstr ""
10224 "I<shmid> の値が不正である。 I<shmaddr> の値が境界違反 (unaligned) (つまり、"
10225 "ページ境界に合っておらず、 B<SHM_RND> が指定されていない) または が不正であ"
10226 "る。 I<shmaddr> へのセグメントの付加に失敗した。 または B<SHM_REMAP> が指定さ"
10227 "れているが、 I<shmaddr> が NULL であった。"
10228
10229 #. type: Plain text
10230 #: build/C/man2/shmop.2:217
10231 msgid "Could not allocate memory for the descriptor or for the page tables."
10232 msgstr ""
10233 "ディスクリプター (descriptor) やページ・テーブルのためのメモリを 割り当てるこ"
10234 "とができない。"
10235
10236 #. type: Plain text
10237 #: build/C/man2/shmop.2:223
10238 msgid "When B<shmdt>()  fails, I<errno> is set as follows:"
10239 msgstr "B<shmdt>()  が失敗した場合、 B<EINVAL> は以下のようにセットされる:"
10240
10241 #.  The following since 2.6.17-rc1:
10242 #. type: Plain text
10243 #: build/C/man2/shmop.2:231
10244 msgid ""
10245 "There is no shared memory segment attached at I<shmaddr>; or, I<shmaddr> is "
10246 "not aligned on a page boundary."
10247 msgstr ""
10248 "I<shmaddr> に付加された共有メモリ・セグメントが存在しない。 もしくは、 "
10249 "I<shmaddr> がページ境界に合っていない。"
10250
10251 #. type: Plain text
10252 #: build/C/man2/shmop.2:250
10253 msgid ""
10254 "In SVID 3 (or perhaps earlier)  the type of the I<shmaddr> argument was "
10255 "changed from I<char\\ *> into I<const void\\ *>, and the returned type of "
10256 "B<shmat>()  from I<char\\ *> into I<void\\ *>.  (Linux libc4 and libc5 have "
10257 "the I<char\\ *> prototypes; glibc2 has I<void\\ *>.)"
10258 msgstr ""
10259 "SVID 3 で (たぶんそれより前だと思うが)  I<shmaddr> 引き数の型は I<char\\ *> "
10260 "から I<const void\\ *> に、I<shmat>() の返り値の型は I<char\\ *> から I<void"
10261 "\\ *> に変更された (Linux では libc4 と libc5 のプロトタイプは I<char\\ *> で"
10262 "あり、glibc2 のプロトタイプは I<void\\ *> である)。"
10263
10264 #. type: Plain text
10265 #: build/C/man2/shmop.2:262
10266 msgid ""
10267 "Using B<shmat>()  with I<shmaddr> equal to NULL is the preferred, portable "
10268 "way of attaching a shared memory segment.  Be aware that the shared memory "
10269 "segment attached in this way may be attached at different addresses in "
10270 "different processes.  Therefore, any pointers maintained within the shared "
10271 "memory must be made relative (typically to the starting address of the "
10272 "segment), rather than absolute."
10273 msgstr ""
10274 "共有メモリセグメントを付加する場合の移植性の高い方法としては、 I<shmaddr> を "
10275 "NULL にして B<shmat>()  を使用するのがよい。 このような方法で付加される共有メ"
10276 "モリセグメントは、 プロセスが異なれば別のアドレスに付加される、という点に注意"
10277 "すること。 よって共有メモリ内で管理されるポインタは、 絶対アドレスではなく、 "
10278 "(一般的にはセグメントの開始アドレスからの)  相対アドレスで作成するべきであ"
10279 "る。"
10280
10281 #. type: Plain text
10282 #: build/C/man2/shmop.2:267
10283 msgid ""
10284 "On Linux, it is possible to attach a shared memory segment even if it is "
10285 "already marked to be deleted.  However, POSIX.1-2001 does not specify this "
10286 "behavior and many other implementations do not support it."
10287 msgstr ""
10288 "Linux では共有メモリセグメントに既に削除マークが付けられていても、 その共有メ"
10289 "モリセグメントを付加することができる。 しかし POSIX.1-2001 ではこのような動作"
10290 "を指定しておらず、 他の多くの実装もこれをサポートしていない。"
10291
10292 #. type: Plain text
10293 #: build/C/man2/shmop.2:270
10294 msgid "The following system parameter affects B<shmat>():"
10295 msgstr "以下のシステム・パラメーターは、 B<shmat>()  に影響する:"
10296
10297 #.  FIXME A good explanation of the rationale for the existence
10298 #.  of SHMLBA would be useful here
10299 #. type: TP
10300 #: build/C/man2/shmop.2:270
10301 #, no-wrap
10302 msgid "B<SHMLBA>"
10303 msgstr "B<SHMLBA>"
10304
10305 #.  FIXME That last sentence isn't true for all Linux
10306 #.  architectures (i.e., SHMLBA != PAGE_SIZE for some architectures)
10307 #.  -- MTK, Nov 04
10308 #. type: Plain text
10309 #: build/C/man2/shmop.2:283
10310 msgid ""
10311 "Segment low boundary address multiple.  Must be page aligned.  For the "
10312 "current implementation the B<SHMLBA> value is B<PAGE_SIZE>."
10313 msgstr ""
10314 "セグメントの境界アドレスの最小倍数。ページ境界に合ってなければならない。 現在"
10315 "の実装では B<SHMLBA> の値は B<PAGE_SIZE> である。"
10316
10317 #. type: Plain text
10318 #: build/C/man2/shmop.2:287
10319 msgid ""
10320 "The implementation places no intrinsic limit on the per-process maximum "
10321 "number of shared memory segments (B<SHMSEG>)."
10322 msgstr ""
10323 "現在の実装では、プロセスごとの 共有メモリ・セグメントの最大数 (B<SHMSEG>)  に"
10324 "関する実装依存の制限はない。"
10325
10326 #. type: Plain text
10327 #: build/C/man2/shmop.2:295
10328 msgid ""
10329 "B<brk>(2), B<mmap>(2), B<shmctl>(2), B<shmget>(2), B<capabilities>(7), "
10330 "B<shm_overview>(7), B<svipc>(7)"
10331 msgstr ""
10332 "B<brk>(2), B<mmap>(2), B<shmctl>(2), B<shmget>(2), B<capabilities>(7), "
10333 "B<shm_overview>(7), B<svipc>(7)"
10334
10335 #. type: TH
10336 #: build/C/man2/subpage_prot.2:30
10337 #, no-wrap
10338 msgid "SUBPAGE_PROT"
10339 msgstr "SUBPAGE_PROT"
10340
10341 #. type: TH
10342 #: build/C/man2/subpage_prot.2:30
10343 #, no-wrap
10344 msgid "2012-07-13"
10345 msgstr "2012-07-13"
10346
10347 #. type: Plain text
10348 #: build/C/man2/subpage_prot.2:33
10349 msgid "subpage_prot - define a subpage protection for an address range"
10350 msgstr ""
10351
10352 #. type: Plain text
10353 #: build/C/man2/subpage_prot.2:37
10354 #, no-wrap
10355 msgid ""
10356 "B<long subpage_prot(unsigned long >I<addr>B<, unsigned long >I<len>B<,>\n"
10357 "B<                  uint32_t *>I<map>B<);>\n"
10358 msgstr ""
10359 "B<long subpage_prot(unsigned long >I<addr>B<, unsigned long >I<len>B<,>\n"
10360 "B<                  uint32_t *>I<map>B<);>\n"
10361
10362 #. type: Plain text
10363 #: build/C/man2/subpage_prot.2:41
10364 msgid "I<Note>: There is no glibc wrapper for this system call; see NOTES."
10365 msgstr ""
10366 "I<注>: このシステムコールには glibc のラッパー関数は存在しない。「注意」の節"
10367 "を参照。"
10368
10369 #. type: Plain text
10370 #: build/C/man2/subpage_prot.2:47
10371 msgid ""
10372 "The PowerPC-specific B<subpage_prot>()  system call provides the facility to "
10373 "control the access permissions on individual 4kB subpages on systems "
10374 "configured with a page size of 64kB."
10375 msgstr ""
10376
10377 #. type: Plain text
10378 #: build/C/man2/subpage_prot.2:54
10379 msgid ""
10380 "The protection map is applied to the memory pages in the region starting at "
10381 "I<addr> and continuing for I<len> bytes.  Both of these arguments must be "
10382 "aligned to a 64-kB boundary."
10383 msgstr ""
10384
10385 #. type: Plain text
10386 #: build/C/man2/subpage_prot.2:66
10387 msgid ""
10388 "The protection map is specified in the buffer pointed to by I<map>.  The map "
10389 "has 2 bits per 4kB subpage; thus each 32-bit word specifies the protections "
10390 "of 16 4kB subpages inside a 64kB page (so, the number of 32-bit words "
10391 "pointed to by I<map> should equate to the number of 64-kB pages specified by "
10392 "I<len>).  Each 2-bit field in the protection map is either 0 to allow any "
10393 "access, 1 to prevent writes, or 2 or 3 to prevent all accesses."
10394 msgstr ""
10395
10396 #. type: Plain text
10397 #: build/C/man2/subpage_prot.2:71
10398 msgid ""
10399 "On success, B<subpage_prot>()  returns 0.  Otherwise, one of the error codes "
10400 "specified below is returned."
10401 msgstr ""
10402
10403 #. type: Plain text
10404 #: build/C/man2/subpage_prot.2:77
10405 msgid "The buffer referred to by I<map> is not accessible."
10406 msgstr ""
10407
10408 #. type: Plain text
10409 #: build/C/man2/subpage_prot.2:87
10410 msgid ""
10411 "The I<addr> or I<len> arguments are incorrect.  Both of these arguments must "
10412 "be aligned to a multiple of the system page size, and they must not refer to "
10413 "a region outside of the address space of the process or to a region that "
10414 "consists of huge pages."
10415 msgstr ""
10416
10417 #. type: Plain text
10418 #: build/C/man2/subpage_prot.2:90 build/C/man2/sync_file_range.2:166
10419 msgid "Out of memory."
10420 msgstr "メモリ不足である。"
10421
10422 #. type: Plain text
10423 #: build/C/man2/subpage_prot.2:96
10424 msgid ""
10425 "This system call is provided on the PowerPC architecture since Linux "
10426 "2.6.25.  The system call is provided only if the kernel is configured with "
10427 "B<CONFIG_PPC_64K_PAGES>.  No library support is provided."
10428 msgstr ""
10429
10430 #. type: Plain text
10431 #: build/C/man2/subpage_prot.2:101
10432 msgid ""
10433 "Glibc does not provide a wrapper for this system call; call it using "
10434 "B<syscall>(2)."
10435 msgstr ""
10436
10437 #. type: Plain text
10438 #: build/C/man2/subpage_prot.2:106
10439 msgid ""
10440 "Normal page protections (at the 64-kB page level) also apply; the subpage "
10441 "protection mechanism is an additional constraint, so putting 0 in a 2-bit "
10442 "field won't allow writes to a page that is otherwise write-protected."
10443 msgstr ""
10444
10445 #. type: SS
10446 #: build/C/man2/subpage_prot.2:106
10447 #, no-wrap
10448 msgid "Rationale"
10449 msgstr ""
10450
10451 #.  In the initial implementation, it was the case that:
10452 #.      In fact the whole process is switched to use 4k hardware pages when the
10453 #.      subpage_prot system call is used, but this could be improved in future
10454 #.      to switch only the affected segments.
10455 #.  But Paul Mackerass says (Oct 2010): I'm pretty sure we now only switch
10456 #.  the affected segment, not the whole process.
10457 #. type: Plain text
10458 #: build/C/man2/subpage_prot.2:128
10459 msgid ""
10460 "This system call is provided to assist writing emulators that operate using "
10461 "64-kB pages on PowerPC systems.  When emulating systems such as x86, which "
10462 "uses a smaller page size, the emulator can no longer use the memory-"
10463 "management unit (MMU)  and normal system calls for controlling page "
10464 "protections.  (The emulator could emulate the MMU by checking and possibly "
10465 "remapping the address for each memory access in software, but that is "
10466 "slow.)  The idea is that the emulator supplies an array of protection masks "
10467 "to apply to a specified range of virtual addresses.  These masks are applied "
10468 "at the level where hardware page-table entries (PTEs)  are inserted into the "
10469 "hardware page table based on the Linux PTEs, so the Linux PTEs are not "
10470 "affected.  Implicit in this is that the regions of the address space that "
10471 "are protected are switched to use 4-kB hardware pages rather than 64-kB "
10472 "hardware pages (on machines with hardware 64-kB page support)."
10473 msgstr ""
10474
10475 #. type: Plain text
10476 #: build/C/man2/subpage_prot.2:131
10477 msgid "B<mprotect>(2), B<syscall>(2)"
10478 msgstr "B<mprotect>(2), B<syscall>(2)"
10479
10480 #. type: Plain text
10481 #: build/C/man2/subpage_prot.2:134
10482 msgid "I<Documentation/vm/hugetlbpage.txt> in the Linux kernel source tree"
10483 msgstr "Linux カーネルソースの I<Documentation/vm/hugetlbpage.txt>"
10484
10485 #. type: TH
10486 #: build/C/man2/sync_file_range.2:30
10487 #, no-wrap
10488 msgid "SYNC_FILE_RANGE"
10489 msgstr "SYNC_FILE_RANGE"
10490
10491 #. type: Plain text
10492 #: build/C/man2/sync_file_range.2:33
10493 msgid "sync_file_range - sync a file segment with disk"
10494 msgstr "sync_file_range - ファイルセグメントをディスクと同期する"
10495
10496 #. type: Plain text
10497 #: build/C/man2/sync_file_range.2:37
10498 #, no-wrap
10499 msgid ""
10500 "B<#define _GNU_SOURCE>         /* See feature_test_macros(7) */\n"
10501 "B<#include E<lt>fcntl.hE<gt>>\n"
10502 msgstr ""
10503 "B<#define _GNU_SOURCE>         /* feature_test_macros(7) 参照 */\n"
10504 "B<#include E<lt>fcntl.hE<gt>>\n"
10505
10506 #. type: Plain text
10507 #: build/C/man2/sync_file_range.2:40
10508 #, no-wrap
10509 msgid ""
10510 "B<int sync_file_range(int >I<fd>B<, off64_t >I<offset>B<, off64_t >I<nbytes>B<,>\n"
10511 "B<                    unsigned int >I<flags>B<);>\n"
10512 msgstr ""
10513 "B<int sync_file_range(int >I<fd>B<, off64_t >I<offset>B<, off64_t >I<nbytes>B<,>\n"
10514 "B<                    unsigned int >I<flags>B<);>\n"
10515
10516 #. type: Plain text
10517 #: build/C/man2/sync_file_range.2:47
10518 msgid ""
10519 "B<sync_file_range>()  permits fine control when synchronizing the open file "
10520 "referred to by the file descriptor I<fd> with disk."
10521 msgstr ""
10522 "B<sync_file_range>()  を使うと、ファイルディスクリプタ I<fd> で参照されるオー"
10523 "プンされたファイルのディスクとの同期に関して、 きめ細かな制御が可能となる。"
10524
10525 #. type: Plain text
10526 #: build/C/man2/sync_file_range.2:61
10527 msgid ""
10528 "I<offset> is the starting byte of the file range to be synchronized.  "
10529 "I<nbytes> specifies the length of the range to be synchronized, in bytes; if "
10530 "I<nbytes> is zero, then all bytes from I<offset> through to the end of file "
10531 "are synchronized.  Synchronization is in units of the system page size: "
10532 "I<offset> is rounded down to a page boundary; I<(offset+nbytes-1)> is "
10533 "rounded up to a page boundary."
10534 msgstr ""
10535 "I<offset> は、同期を行うファイルの領域の開始バイトである。 I<nbytes> には同期"
10536 "を行う領域の長さをバイト単位で指定する。 I<nbytes> が 0 の場合は、 I<offset> "
10537 "からファイル末尾までの全バイトを同期する。 同期はシステムのページサイズの単位"
10538 "で行われる。 I<offset> はページ境界にあわせて切り下げられ、 I<(offset"
10539 "+nbytes-1)> はページ境界にあわせて切り上げられる。"
10540
10541 #. type: Plain text
10542 #: build/C/man2/sync_file_range.2:65
10543 msgid "The I<flags> bit-mask argument can include any of the following values:"
10544 msgstr "ビットマスク引き数 I<flags> には以下の値を指定することができる:"
10545
10546 #. type: TP
10547 #: build/C/man2/sync_file_range.2:65
10548 #, no-wrap
10549 msgid "B<SYNC_FILE_RANGE_WAIT_BEFORE>"
10550 msgstr "B<SYNC_FILE_RANGE_WAIT_BEFORE>"
10551
10552 #. type: Plain text
10553 #: build/C/man2/sync_file_range.2:70
10554 msgid ""
10555 "Wait upon write-out of all pages in the specified range that have already "
10556 "been submitted to the device driver for write-out before performing any "
10557 "write."
10558 msgstr ""
10559 "何らかの書き込みを行う前に、指定された領域のページで 書き出しを行うようにデバ"
10560 "イスドライバにすでに要求が発行されている ページの書き出しが全て完了するのを待"
10561 "つ。"
10562
10563 #. type: TP
10564 #: build/C/man2/sync_file_range.2:70 build/C/man2/sync_file_range.2:120
10565 #, no-wrap
10566 msgid "B<SYNC_FILE_RANGE_WRITE>"
10567 msgstr "B<SYNC_FILE_RANGE_WRITE>"
10568
10569 #. type: Plain text
10570 #: build/C/man2/sync_file_range.2:76
10571 msgid ""
10572 "Initiate write-out of all dirty pages in the specified range which are not "
10573 "presently submitted write-out.  Note that even this may block if you attempt "
10574 "to write more than request queue size."
10575 msgstr ""
10576 "指定された領域のページで、書き出し要求が発行されていない 全ての dirty (キャッ"
10577 "シュだけが変更されている) ページの 書き出しを開始する。 リクエストキューの大"
10578 "きさより多く書き込もうとした場合には、 この処理は停止 (block) する可能性があ"
10579 "る点に注意すること。"
10580
10581 #. type: TP
10582 #: build/C/man2/sync_file_range.2:76
10583 #, no-wrap
10584 msgid "B<SYNC_FILE_RANGE_WAIT_AFTER>"
10585 msgstr "B<SYNC_FILE_RANGE_WAIT_AFTER>"
10586
10587 #. type: Plain text
10588 #: build/C/man2/sync_file_range.2:80
10589 msgid ""
10590 "Wait upon write-out of all pages in the range after performing any write."
10591 msgstr ""
10592 "何らかの書き込み後に、指定された領域の全てのページの 書き出しが行われるのを待"
10593 "つ。"
10594
10595 #. type: Plain text
10596 #: build/C/man2/sync_file_range.2:84
10597 msgid "Specifying I<flags> as 0 is permitted, as a no-op."
10598 msgstr "I<flags> に 0 を指定した場合、何もしないことを表す。"
10599
10600 #. type: SS
10601 #: build/C/man2/sync_file_range.2:84
10602 #, no-wrap
10603 msgid "Warning"
10604 msgstr "警告"
10605
10606 #. type: Plain text
10607 #: build/C/man2/sync_file_range.2:100
10608 msgid ""
10609 "This system call is extremely dangerous and should not be used in portable "
10610 "programs.  None of these operations writes out the file's metadata.  "
10611 "Therefore, unless the application is strictly performing overwrites of "
10612 "already-instantiated disk blocks, there are no guarantees that the data will "
10613 "be available after a crash.  There is no user interface to know if a write "
10614 "is purely an overwrite.  On filesystems using copy-on-write semantics (e.g., "
10615 "I<btrfs>)  an overwrite of existing allocated blocks is impossible.  When "
10616 "writing into preallocated space, many filesystems also require calls into "
10617 "the block allocator, which this system call does not sync out to disk.  This "
10618 "system call does not flush disk write caches and thus does not provide any "
10619 "data integrity on systems with volatile disk write caches."
10620 msgstr ""
10621 "このシステムコールは非常に危険であり、 移植性が必要なプログラムで使用すべきで"
10622 "はない。 これらの操作ではどれもファイルのメタデータの書き出しを行わない。 し"
10623 "たがって、アプリケーションにより作成済みのディスクブロックの 上書きの実行が確"
10624 "実に行われない限り、クラッシュの後でもデータが 利用できる保証はない。 書き込"
10625 "みが上書きだけであるかを知るためのユーザインタフェースは存在しない。 "
10626 "(I<btrfs> などの) copy-on-write 動作を使ったファイルシステムでは、 既存の割り"
10627 "当て済みのブロックに対する上書き自体ができない。 前もって割り当てられた領域に"
10628 "書き込みを行う場合、 多くのファイルシステムでは block allocator への書き込み"
10629 "も必要となるが、 このシステムコールは block allocator のディスクへの同期を行"
10630 "わない。 このシステムコールはディスク書き込みキャッシュのフラッシュを 行わな"
10631 "いので、揮発性のディスク書き込みキャッシュを使ったシステムでは このシステム"
10632 "コールではデータの一貫性を確保できないことになる。"
10633
10634 #. type: SS
10635 #: build/C/man2/sync_file_range.2:100
10636 #, no-wrap
10637 msgid "Some details"
10638 msgstr "詳細"
10639
10640 #. type: Plain text
10641 #: build/C/man2/sync_file_range.2:108
10642 msgid ""
10643 "B<SYNC_FILE_RANGE_WAIT_BEFORE> and B<SYNC_FILE_RANGE_WAIT_AFTER> will detect "
10644 "any I/O errors or B<ENOSPC> conditions and will return these to the caller."
10645 msgstr ""
10646 "B<SYNC_FILE_RANGE_WAIT_BEFORE> と B<SYNC_FILE_RANGE_WAIT_AFTER> は I/O エラー"
10647 "や B<ENOSPC> 状態を検出し、呼び出し元にこれらの情報を返す。"
10648
10649 #. type: Plain text
10650 #: build/C/man2/sync_file_range.2:112
10651 msgid "Useful combinations of the I<flags> bits are:"
10652 msgstr "I<flags> の役に立つビットの組み合わせを以下に示す:"
10653
10654 #. type: TP
10655 #: build/C/man2/sync_file_range.2:112
10656 #, no-wrap
10657 msgid "B<SYNC_FILE_RANGE_WAIT_BEFORE | SYNC_FILE_RANGE_WRITE>"
10658 msgstr "B<SYNC_FILE_RANGE_WAIT_BEFORE | SYNC_FILE_RANGE_WRITE>"
10659
10660 #. type: Plain text
10661 #: build/C/man2/sync_file_range.2:120
10662 msgid ""
10663 "Ensures that all pages in the specified range which were dirty when "
10664 "B<sync_file_range>()  was called are placed under write-out.  This is a "
10665 "start-write-for-data-integrity operation."
10666 msgstr ""
10667 "指定された範囲内のページで、 B<sync_file_range>()  が呼び出された際に dirty "
10668 "であった全てのページが、 確実に書き出し対象となるようにする。 これは、start-"
10669 "write-for-data-integrity 操作 (データ完全性確保のための書き込み開始の操作) で"
10670 "ある。"
10671
10672 #. type: Plain text
10673 #: build/C/man2/sync_file_range.2:127
10674 msgid ""
10675 "Start write-out of all dirty pages in the specified range which are not "
10676 "presently under write-out.  This is an asynchronous flush-to-disk "
10677 "operation.  This is not suitable for data integrity operations."
10678 msgstr ""
10679 "指定された範囲内のページで、現在書き出し中でない全ての dirty ページの 書き出"
10680 "しを開始する。これは非同期のディスクへのフラッシュ (flush-to-disk)  操作であ"
10681 "る。データ完全性確保が必要な操作としては適切ではない。"
10682
10683 #. type: TP
10684 #: build/C/man2/sync_file_range.2:127
10685 #, no-wrap
10686 msgid "B<SYNC_FILE_RANGE_WAIT_BEFORE> (or B<SYNC_FILE_RANGE_WAIT_AFTER>)"
10687 msgstr "B<SYNC_FILE_RANGE_WAIT_BEFORE> (or B<SYNC_FILE_RANGE_WAIT_AFTER>)"
10688
10689 #. type: Plain text
10690 #: build/C/man2/sync_file_range.2:134
10691 msgid ""
10692 "Wait for completion of write-out of all pages in the specified range.  This "
10693 "can be used after an earlier B<SYNC_FILE_RANGE_WAIT_BEFORE | "
10694 "SYNC_FILE_RANGE_WRITE> operation to wait for completion of that operation, "
10695 "and obtain its result."
10696 msgstr ""
10697 "指定された範囲内の全てのページの書き出しの完了を待つ。 このフラグは、前に行わ"
10698 "れた操作 B<SYNC_FILE_RANGE_WAIT_BEFORE | SYNC_FILE_RANGE_WRITE> の後に使用で"
10699 "き、この操作の完了を待ち、結果を取得することができる。"
10700
10701 #. type: TP
10702 #: build/C/man2/sync_file_range.2:134
10703 #, no-wrap
10704 msgid "B<SYNC_FILE_RANGE_WAIT_BEFORE | SYNC_FILE_RANGE_WRITE | SYNC_FILE_RANGE_WAIT_AFTER>"
10705 msgstr "B<SYNC_FILE_RANGE_WAIT_BEFORE | SYNC_FILE_RANGE_WRITE | SYNC_FILE_RANGE_WAIT_AFTER>"
10706
10707 #. type: Plain text
10708 #: build/C/man2/sync_file_range.2:141
10709 msgid ""
10710 "This is a write-for-data-integrity operation that will ensure that all pages "
10711 "in the specified range which were dirty when B<sync_file_range>()  was "
10712 "called are committed to disk."
10713 msgstr ""
10714 "これは write-for-data-integrity 操作 (データ完全性確保のための書き込み) であ"
10715 "り、指定された範囲内の、 B<sync_file_range>()  が呼ばれた時点で dirty な全て"
10716 "のページが ディスクに格納されることが保証される。"
10717
10718 #. type: Plain text
10719 #: build/C/man2/sync_file_range.2:147
10720 msgid ""
10721 "On success, B<sync_file_range>()  returns 0; on failure -1 is returned and "
10722 "I<errno> is set to indicate the error."
10723 msgstr ""
10724 "成功の場合、 B<sync_file_range>()  は 0 を返す。失敗の場合、-1 を返し、 "
10725 "I<error> にエラーを示す値を設定する。"
10726
10727 #. type: Plain text
10728 #: build/C/man2/sync_file_range.2:152
10729 msgid "I<fd> is not a valid file descriptor."
10730 msgstr "I<fd> が有効なファイルディスクリプタではない。"
10731
10732 #. type: Plain text
10733 #: build/C/man2/sync_file_range.2:160
10734 msgid ""
10735 "I<flags> specifies an invalid bit; or I<offset> or I<nbytes> is invalid."
10736 msgstr ""
10737 "I<flags> に不正なビットが指定されている。または I<offset> か I<nbytes> が不正"
10738 "である。"
10739
10740 #. type: Plain text
10741 #: build/C/man2/sync_file_range.2:163
10742 msgid "I/O error."
10743 msgstr "I/O エラー。"
10744
10745 #. type: Plain text
10746 #: build/C/man2/sync_file_range.2:169
10747 msgid "Out of disk space."
10748 msgstr "ディスク領域不足である。"
10749
10750 #.  FIXME . (bug?) Actually, how can 'fd' refer to a symbolic link (S_ISLNK)?
10751 #.  (In user space at least) it isn't possible to obtain a file descriptor
10752 #.  for a symbolic link.
10753 #. type: Plain text
10754 #: build/C/man2/sync_file_range.2:177
10755 msgid ""
10756 "I<fd> refers to something other than a regular file, a block device, a "
10757 "directory, or a symbolic link."
10758 msgstr ""
10759 "I<fd> が、通常のファイル、ブロックデバイス、ディレクトリ、シンボリックリンク "
10760 "以外のものを指している。"
10761
10762 #. type: Plain text
10763 #: build/C/man2/sync_file_range.2:180
10764 msgid "B<sync_file_range>()  appeared on Linux in kernel 2.6.17."
10765 msgstr "B<sync_file_range>()  はカーネル 2.6.17 で Linux に登場した。"
10766
10767 #. type: Plain text
10768 #: build/C/man2/sync_file_range.2:183
10769 msgid ""
10770 "This system call is Linux-specific, and should be avoided in portable "
10771 "programs."
10772 msgstr ""
10773 "このシステムコールは Linux 独自であり、 移植性が必要なプログラムでは使用を避"
10774 "けるべきである。"
10775
10776 #.  See kernel commit edd5cd4a9424f22b0fa08bef5e299d41befd5622
10777 #. type: Plain text
10778 #: build/C/man2/sync_file_range.2:200
10779 msgid ""
10780 "Some architectures (e.g., PowerPC, ARM)  need 64-bit arguments to be aligned "
10781 "in a suitable pair of registers.  On such architectures, the call signature "
10782 "of B<sync_file_range>()  shown in the SYNOPSIS would force a register to be "
10783 "wasted as padding between the I<fd> and I<offset> arguments.  (See B<syscall>"
10784 "(2)  for details.)  Therefore, these architectures define a different system "
10785 "call that orders the arguments suitably:"
10786 msgstr ""
10787 "いくつかのアーキテクチャ (例えば、 PowerPC や ARM) では、 64 ビットの引き数は"
10788 "適切なレジスタの組に割り当てる必要がある。 このようなアーキテクチャでは、 "
10789 "「書式」に書かれている B<sync_file_range>() の呼び出しシグネチャーで、 引き"
10790 "数 I<fd> と I<offset> の間のパディング (詰めもの) でレジスタが一つ消費されて"
10791 "しまう (詳細は B<syscall>(2) 参照)。 そのため、 これらのアーキテクチャでは引"
10792 "き数が適切な順序になった別のシステムコールが定義されている。"
10793
10794 #. type: Plain text
10795 #: build/C/man2/sync_file_range.2:205
10796 #, no-wrap
10797 msgid ""
10798 "B<int sync_file_range2(int >I<fd>B<, unsigned int >I<flags>B<,>\n"
10799 "B<                     off64_t >I<offset>B<, off64_t >I<nbytes>B<);>\n"
10800 msgstr ""
10801 "B<int sync_file_range2(int >I<fd>B<, unsigned int >I<flags>B<,>\n"
10802 "B<                     off64_t >I<offset>B<, off64_t >I<nbytes>B<);>\n"
10803
10804 #. type: Plain text
10805 #: build/C/man2/sync_file_range.2:210
10806 msgid ""
10807 "The behavior of this system call is otherwise exactly the same as "
10808 "B<sync_file_range>()."
10809 msgstr ""
10810 "上記の点以外は、このシステムコールの動作は B<sync_file_range>() と\n"
10811 "全く同じである。このシステムコールに対するライブラリによるサポートは\n"
10812 "glibc では提供されていない。"
10813
10814 #. type: Plain text
10815 #: build/C/man2/sync_file_range.2:221
10816 msgid ""
10817 "A system call with this signature first appeared on the ARM architecture in "
10818 "Linux 2.6.20, with the name B<arm_sync_file_range>().  It was renamed in "
10819 "Linux 2.6.22, when the analogous system call was added for PowerPC.  On "
10820 "architectures where glibc support is provided, glibc transparently wraps "
10821 "B<sync_file_range2>()  under the name B<sync_file_range>()."
10822 msgstr ""
10823 "このバージョンのシステムコールは、Linux 2.6.20 で ARM アーキテクチャで\n"
10824 "初めて登場し、 B<arm_sync_file_range>() という名前であった。\n"
10825 "Linux 2.6.22 で、同様のシステムコールが PowerPC 用に追加された際に、\n"
10826 "システムコールの名前が変更された。\n"
10827 "glibc によるサポートが提供されているアーキテクチャでは、\n"
10828 "glibc のラッパー関数は B<sync_file_range>() という名前で\n"
10829 "B<sync_file_range2>() を適切に使用するようになっている。"
10830
10831 #. type: Plain text
10832 #: build/C/man2/sync_file_range.2:226
10833 msgid "B<fdatasync>(2), B<fsync>(2), B<msync>(2), B<sync>(2)"
10834 msgstr "B<fdatasync>(2), B<fsync>(2), B<msync>(2), B<sync>(2)"
10835
10836 #~ msgid "2013-05-12"
10837 #~ msgstr "2013-05-12"
10838
10839 #~ msgid "2013-04-17"
10840 #~ msgstr "2013-04-17"
10841
10842 #~ msgid "2012-04-16"
10843 #~ msgstr "2012-04-16"
10844
10845 #~ msgid "2012-08-14"
10846 #~ msgstr "2012-08-14"
10847
10848 #~ msgid "2012-03-23"
10849 #~ msgstr "2012-03-23"
10850
10851 #~ msgid "B<fallocate>()  returns zero on success, and -1 on failure."
10852 #~ msgstr "B<fallocate>()  は成功すると 0 を返し、エラーの場合は -1 を返す。"
10853
10854 #~ msgid "On success, B<malloc_info>()  returns 0; on error, it returns -1."
10855 #~ msgstr "B<malloc_info>() は成功すると 0 を返す。エラーの場合は -1 を返す。"
10856
10857 #~ msgid "2012-05-31"
10858 #~ msgstr "2012-05-31"
10859
10860 #~ msgid ""
10861 #~ "A valid segment identifier, I<shmid>, is returned on success, -1 on error."
10862 #~ msgstr ""
10863 #~ "成功した場合、有効なセグメント識別子 I<shmid> が返される。エラーの場合、 "
10864 #~ "-1 が返される。"
10865
10866 #~ msgid ""
10867 #~ "The ARM architecture needs 64-bit arguments to be aligned in a suitable "
10868 #~ "pair of registers.  On this architecture, the call signature of "
10869 #~ "B<posix_fadvise>()  is flawed, since it forces a register to be wasted as "
10870 #~ "padding between the I<fd> and I<len> arguments.  Therefore, since Linux "
10871 #~ "2.6.14, ARM defines a different system call that orders the arguments "
10872 #~ "suitably:"
10873 #~ msgstr ""
10874 #~ "ARM アーキテクチャでは、64 ビットの引き数は適切なレジスタの組に割り当て\n"
10875 #~ "る必要がある。このアーキテクチャでは、B<posix_fadvise>() の呼び出し方に\n"
10876 #~ "は欠陥があり、それはこのシステムコールでは引き数 I<fd> と I<len> の間の\n"
10877 #~ "パディング (詰めもの) でレジスタが一つ消費されてしまうというものである。\n"
10878 #~ "そのため、Linux 2.6.14 以降では、ARM では引き数が適切な順序になった別の\n"
10879 #~ "システムコールが定義されている。"
10880
10881 #~ msgid ""
10882 #~ "The behavior of this system call is otherwise exactly the same as "
10883 #~ "B<posix_fadvise>().  No library support is provided for this system call "
10884 #~ "in glibc."
10885 #~ msgstr ""
10886 #~ "上記の点以外は、このシステムコールの動作は B<posix_fadvise>() と全く\n"
10887 #~ "同じである。このシステムコールに対するライブラリによるサポートは glibc\n"
10888 #~ "では提供されていない。"
10889
10890 #~ msgid ""
10891 #~ "The I<mode> is not supported by the file system containing the file "
10892 #~ "referred to by I<fd>."
10893 #~ msgstr ""
10894 #~ "I<fd> が参照するファイルを含むファイルシステムが I<mode> をサポートしてい"
10895 #~ "ない。"
10896
10897 #~ msgid ""
10898 #~ "The function B<mtrace>()  installs handlers for B<malloc>(3), B<realloc>"
10899 #~ "(3)  and B<free>(3).  The function B<muntrace>()  disables these handlers."
10900 #~ msgstr ""
10901 #~ "関数 B<mtrace>()  は、 B<malloc>(3), B<realloc>(3), B<free>(3)  のハンドラ"
10902 #~ "を組み込む。 関数 B<muntrace>()  はこれらのハンドラを解除する。"
10903
10904 #~ msgid ""
10905 #~ "The environment variable B<MALLOC_TRACE> defines a file where B<mtrace>"
10906 #~ "()  writes its output.  This file must be writable to the user or "
10907 #~ "B<mtrace>()  will do nothing.  If the file is not empty it will be "
10908 #~ "truncated."
10909 #~ msgstr ""
10910 #~ "環境変数 B<MALLOC_TRACE> は B<mtrace>()  が出力を書き出すファイルを指定す"
10911 #~ "る。 ユーザが書き込み権限を持つファイルを指定しなければならない。 書き込み"
10912 #~ "権限がない場合、 B<mtrace>()  は何もしない。 ファイルが空でない場合、ファ"
10913 #~ "イルの元の内容を上書きする。"
10914
10915 #~ msgid ""
10916 #~ "The output of B<mtrace>()  will be ASCII but not in a friendly format.  "
10917 #~ "So glibc comes with a perl-script called mtrace to make sense of it."
10918 #~ msgstr ""
10919 #~ "B<mtrace>()  の出力は ASCII 形式だが、人が読みやすいフォーマットではな"
10920 #~ "い。 そこで、glibc には mtrace 出力を分かりやすい形式に変換する perl スク"
10921 #~ "リプトが付属している。"
10922
10923 #~ msgid ""
10924 #~ "This flag allocates and initializes to zero the disk space within the "
10925 #~ "range specified by I<offset> and I<len>.  After a successful call, "
10926 #~ "subsequent writes into this range are guaranteed not to fail because of "
10927 #~ "lack of disk space.  Preallocating zeroed blocks beyond the end of the "
10928 #~ "file is useful for optimizing append workloads.  Preallocating blocks "
10929 #~ "does not change the file size (as reported by B<stat>(2))  even if it is "
10930 #~ "less than I<offset>+I<len>."
10931 #~ msgstr ""
10932 #~ "このフラグは、 I<offset> と I<len> で指定された領域のディスク空間を割り当"
10933 #~ "て、その空間を 0 で初期化する。 呼び出しが成功すると、それに続いてこの領域"
10934 #~ "への書き込みが行われるが、 ディスク空間の不足による書き込み失敗が発生しな"
10935 #~ "いことが保証される。 ファイル末尾より後ろの領域について 0 で埋めたブロック"
10936 #~ "を前もって 割り当てておくことは、追記 (append) の作業負荷を最適化するのに "
10937 #~ "有用である。 ファイルサイズが I<offset>+I<len> よりも小さい場合であって"
10938 #~ "も、ブロックの前もっての割り当てにより (B<stat>(2)  が返す) ファイルサイズ"
10939 #~ "は変更されることはない。"
10940
10941 #~ msgid ""
10942 #~ "(Linux 2.6.9 and later) the caller was not privileged (B<CAP_IPC_LOCK>)  "
10943 #~ "and its B<RLIMIT_MEMLOCK> soft resource limit was 0."
10944 #~ msgstr ""
10945 #~ "(Linux 2.6.9 以降) 呼び出し元は特権 (B<CAP_IPC_LOCK>)  を持たず、ソフト資"
10946 #~ "源制限 B<RLIMIT_MEMLOCK> が 0 である。"
10947
10948 #~ msgid ""
10949 #~ "(Linux 2.6.8 and earlier)  The calling process has insufficient privilege "
10950 #~ "to call B<munlockall>().  Under Linux the B<CAP_IPC_LOCK> capability is "
10951 #~ "required."
10952 #~ msgstr ""
10953 #~ "(Linux 2.6.8 以前)  呼び出し元プロセスが B<munlockall>()  を呼び出すのに必"
10954 #~ "要な特権を所有していなかった。 Linux では、 B<CAP_IPC_LOCK> ケーパビリティ"
10955 #~ "が必要である。"
10956
10957 #~ msgid ""
10958 #~ "B<posix_fadvise>()  appeared in kernel 2.5.60.  Glibc support has been "
10959 #~ "provided since version 2.2."
10960 #~ msgstr ""
10961 #~ "B<posix_fadvise>()  はカーネル 2.5.60 で登場した。 glibc でのサポートは "
10962 #~ "glibc バージョン 2.2 以降で行われている。"