OSDN Git Service

(split) LDP: Snapshotis of ja.po.
[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: 2012-05-28 07:16+0900\n"
10 "PO-Revision-Date: 2012-05-31 00:33+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:24
32 #: build/C/man2/fallocate.2:8 build/C/man2/madvise.2:35
33 #: build/C/man3/mallinfo.3:24 build/C/man3/malloc_stats.3:24
34 #: build/C/man3/malloc_trim.3:24 build/C/man3/mallopt.3:24
35 #: build/C/man2/mlock.2:27 build/C/man2/mmap.2:40 build/C/man2/mmap2.2:29
36 #: build/C/man2/mprotect.2:32 build/C/man2/mremap.2:31 build/C/man2/msync.2:25
37 #: build/C/man2/posix_fadvise.2:27 build/C/man2/readahead.2:28
38 #: build/C/man2/remap_file_pages.2:26 build/C/man3/shm_open.3:26
39 #: build/C/man7/shm_overview.7:27 build/C/man2/shmctl.2:43
40 #: build/C/man2/shmget.2:36 build/C/man2/shmop.2:39
41 #: build/C/man2/subpage_prot.2:28 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:41
48 #: build/C/man2/cacheflush.2:24 build/C/man2/fallocate.2:8
49 #: build/C/man2/madvise.2:35 build/C/man3/mallinfo.3:24
50 #: build/C/man3/malloc_get_state.3:23 build/C/man3/malloc_hook.3:6
51 #: build/C/man3/malloc_info.3:23 build/C/man3/malloc_stats.3:24
52 #: build/C/man3/malloc_trim.3:24 build/C/man3/malloc_usable_size.3:23
53 #: build/C/man3/mallopt.3:24 build/C/man3/mcheck.3:23 build/C/man2/mlock.2:27
54 #: build/C/man2/mmap.2:40 build/C/man2/mmap2.2:29 build/C/man2/mprotect.2:32
55 #: build/C/man2/mremap.2:31 build/C/man2/msync.2:25 build/C/man3/mtrace.3:23
56 #: build/C/man2/posix_fadvise.2:27 build/C/man3/posix_fallocate.3:23
57 #: build/C/man3/posix_memalign.3:28 build/C/man2/readahead.2:28
58 #: build/C/man2/remap_file_pages.2:26 build/C/man3/shm_open.3:26
59 #: build/C/man7/shm_overview.7:27 build/C/man2/shmctl.2:43
60 #: build/C/man2/shmget.2:36 build/C/man2/shmop.2:39
61 #: build/C/man2/subpage_prot.2:28 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:42
68 #: build/C/man2/cacheflush.2:25 build/C/man2/fallocate.2:9
69 #: build/C/man2/madvise.2:36 build/C/man3/mallinfo.3:25
70 #: build/C/man3/malloc_get_state.3:24 build/C/man3/malloc_hook.3:7
71 #: build/C/man3/malloc_info.3:24 build/C/man3/malloc_stats.3:25
72 #: build/C/man3/malloc_trim.3:25 build/C/man3/malloc_usable_size.3:24
73 #: build/C/man3/mallopt.3:25 build/C/man3/mcheck.3:24 build/C/man2/mlock.2:28
74 #: build/C/man2/mmap.2:41 build/C/man2/mmap2.2:30 build/C/man2/mprotect.2:33
75 #: build/C/man2/mremap.2:32 build/C/man2/msync.2:26 build/C/man3/mtrace.3:24
76 #: build/C/man2/posix_fadvise.2:28 build/C/man3/posix_fallocate.3:24
77 #: build/C/man3/posix_memalign.3:29 build/C/man2/readahead.2:29
78 #: build/C/man2/remap_file_pages.2:27 build/C/man3/shm_open.3:27
79 #: build/C/man7/shm_overview.7:28 build/C/man2/shmctl.2:44
80 #: build/C/man2/shmget.2:37 build/C/man2/shmop.2:40
81 #: build/C/man2/subpage_prot.2:29 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:44
94 #: build/C/man2/cacheflush.2:27 build/C/man2/fallocate.2:11
95 #: build/C/man2/madvise.2:38 build/C/man3/mallinfo.3:27
96 #: build/C/man3/malloc_get_state.3:26 build/C/man3/malloc_hook.3:11
97 #: build/C/man3/malloc_info.3:26 build/C/man3/malloc_stats.3:27
98 #: build/C/man3/malloc_trim.3:27 build/C/man3/malloc_usable_size.3:26
99 #: build/C/man3/mallopt.3:27 build/C/man3/mcheck.3:26 build/C/man2/mlock.2:30
100 #: build/C/man2/mmap.2:43 build/C/man2/mmap2.2:32 build/C/man2/mprotect.2:35
101 #: build/C/man2/mremap.2:34 build/C/man2/msync.2:28 build/C/man3/mtrace.3:26
102 #: build/C/man2/posix_fadvise.2:30 build/C/man3/posix_fallocate.3:26
103 #: build/C/man3/posix_memalign.3:31 build/C/man2/readahead.2:31
104 #: build/C/man2/remap_file_pages.2:29 build/C/man3/shm_open.3:29
105 #: build/C/man2/shmctl.2:46 build/C/man2/shmget.2:39 build/C/man2/shmop.2:42
106 #: build/C/man2/subpage_prot.2:31 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:48
132 #: build/C/man2/cacheflush.2:33 build/C/man2/fallocate.2:19
133 #: build/C/man2/madvise.2:50 build/C/man3/mallinfo.3:31
134 #: build/C/man3/malloc_get_state.3:34 build/C/man3/malloc_hook.3:29
135 #: build/C/man3/malloc_info.3:32 build/C/man3/malloc_stats.3:31
136 #: build/C/man3/malloc_trim.3:31 build/C/man3/malloc_usable_size.3:30
137 #: build/C/man3/mallopt.3:31 build/C/man3/mcheck.3:39 build/C/man2/mlock.2:40
138 #: build/C/man2/mmap.2:52 build/C/man2/mmap2.2:39 build/C/man2/mprotect.2:41
139 #: build/C/man2/mremap.2:43 build/C/man2/msync.2:32 build/C/man3/mtrace.3:32
140 #: build/C/man2/posix_fadvise.2:49 build/C/man3/posix_fallocate.3:44
141 #: build/C/man3/posix_memalign.3:83 build/C/man2/readahead.2:38
142 #: build/C/man2/remap_file_pages.2:37 build/C/man3/shm_open.3:41
143 #: build/C/man7/shm_overview.7:30 build/C/man2/shmctl.2:54
144 #: build/C/man2/shmget.2:47 build/C/man2/shmop.2:51
145 #: build/C/man2/subpage_prot.2:36 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:58
239 #: build/C/man2/cacheflush.2:52 build/C/man2/fallocate.2:109
240 #: build/C/man2/madvise.2:268 build/C/man3/malloc_get_state.3:59
241 #: build/C/man3/malloc_info.3:46 build/C/man3/malloc_trim.3:49
242 #: build/C/man3/malloc_usable_size.3:38 build/C/man3/mallopt.3:377
243 #: build/C/man3/mcheck.3:128 build/C/man2/mlock.2:117 build/C/man2/mmap.2:373
244 #: build/C/man2/mmap2.2:54 build/C/man2/mprotect.2:72
245 #: build/C/man2/mremap.2:128 build/C/man2/msync.2:68
246 #: build/C/man2/posix_fadvise.2:86 build/C/man3/posix_fallocate.3:64
247 #: build/C/man3/posix_memalign.3:141 build/C/man2/readahead.2:65
248 #: build/C/man2/remap_file_pages.2:122 build/C/man3/shm_open.3:169
249 #: build/C/man2/shmctl.2:272 build/C/man2/shmget.2:178
250 #: build/C/man2/shmop.2:169 build/C/man2/subpage_prot.2:61
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:58
269 #: build/C/man2/fallocate.2:112 build/C/man2/madvise.2:275
270 #: build/C/man3/malloc_info.3:51 build/C/man3/malloc_trim.3:54
271 #: build/C/man3/mallopt.3:382 build/C/man2/mlock.2:123 build/C/man2/mmap.2:390
272 #: build/C/man2/mmap2.2:61 build/C/man2/mprotect.2:79
273 #: build/C/man2/mremap.2:136 build/C/man2/msync.2:73
274 #: build/C/man2/posix_fadvise.2:89 build/C/man3/posix_fallocate.3:70
275 #: build/C/man3/posix_memalign.3:155 build/C/man2/readahead.2:71
276 #: build/C/man2/remap_file_pages.2:129 build/C/man3/shm_open.3:178
277 #: build/C/man2/shmctl.2:294 build/C/man2/shmget.2:182
278 #: build/C/man2/shmop.2:183 build/C/man2/subpage_prot.2:66
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:151
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:63
323 #: build/C/man2/cacheflush.2:74 build/C/man2/fallocate.2:188
324 #: build/C/man2/madvise.2:325 build/C/man3/mallinfo.3:109
325 #: build/C/man3/malloc_get_state.3:84 build/C/man3/malloc_hook.3:76
326 #: build/C/man3/malloc_info.3:59 build/C/man3/malloc_stats.3:53
327 #: build/C/man3/malloc_trim.3:58 build/C/man3/malloc_usable_size.3:46
328 #: build/C/man3/mallopt.3:390 build/C/man3/mcheck.3:144
329 #: build/C/man2/mlock.2:187 build/C/man2/mmap.2:483 build/C/man2/mmap2.2:77
330 #: build/C/man2/mprotect.2:107 build/C/man2/mremap.2:186
331 #: build/C/man2/msync.2:96 build/C/man3/mtrace.3:76
332 #: build/C/man2/posix_fadvise.2:111 build/C/man3/posix_fallocate.3:101
333 #: build/C/man3/posix_memalign.3:180 build/C/man2/readahead.2:87
334 #: build/C/man2/remap_file_pages.2:151 build/C/man3/shm_open.3:249
335 #: build/C/man7/shm_overview.7:101 build/C/man2/shmctl.2:366
336 #: build/C/man2/shmget.2:229 build/C/man2/shmop.2:226
337 #: build/C/man2/subpage_prot.2:91 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:71
353 #: build/C/man2/madvise.2:346 build/C/man3/malloc_get_state.3:86
354 #: build/C/man3/malloc_hook.3:78 build/C/man3/malloc_info.3:61
355 #: build/C/man3/malloc_stats.3:55 build/C/man3/malloc_trim.3:60
356 #: build/C/man3/malloc_trim.3:72 build/C/man3/malloc_usable_size.3:48
357 #: build/C/man3/mcheck.3:146 build/C/man2/mlock.2:214 build/C/man2/mmap.2:501
358 #: build/C/man2/mmap2.2:79 build/C/man2/mprotect.2:116
359 #: build/C/man2/mremap.2:192 build/C/man3/mtrace.3:78
360 #: build/C/man2/posix_fadvise.2:120 build/C/man3/posix_memalign.3:219
361 #: build/C/man3/shm_open.3:255 build/C/man7/shm_overview.7:103
362 #: build/C/man2/shmctl.2:371 build/C/man2/shmget.2:235
363 #: build/C/man2/shmop.2:245 build/C/man2/subpage_prot.2:93
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 file system can be used instead.  Memory backed "
374 "by huge pages (if the CPU supports them) is obtained by using B<mmap>(2)  to "
375 "map files in this virtual file system."
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:153
392 #: build/C/man2/cacheflush.2:88 build/C/man2/fallocate.2:195
393 #: build/C/man2/madvise.2:379 build/C/man3/mallinfo.3:278
394 #: build/C/man3/malloc_get_state.3:112 build/C/man3/malloc_hook.3:138
395 #: build/C/man3/malloc_info.3:258 build/C/man3/malloc_stats.3:65
396 #: build/C/man3/malloc_trim.3:80 build/C/man3/malloc_usable_size.3:62
397 #: build/C/man3/mallopt.3:578 build/C/man3/mcheck.3:211
398 #: build/C/man2/mlock.2:337 build/C/man2/mmap.2:671 build/C/man2/mmap2.2:98
399 #: build/C/man2/mprotect.2:223 build/C/man2/mremap.2:214
400 #: build/C/man2/msync.2:122 build/C/man3/mtrace.3:170
401 #: build/C/man2/posix_fadvise.2:188 build/C/man3/posix_fallocate.3:130
402 #: build/C/man3/posix_memalign.3:275 build/C/man2/readahead.2:98
403 #: build/C/man2/remap_file_pages.2:162 build/C/man3/shm_open.3:280
404 #: build/C/man7/shm_overview.7:127 build/C/man2/shmctl.2:410
405 #: build/C/man2/shmget.2:298 build/C/man2/shmop.2:290
406 #: build/C/man2/subpage_prot.2:126 build/C/man2/sync_file_range.2:222
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:160
413 #: build/C/man2/cacheflush.2:95 build/C/man2/fallocate.2:202
414 #: build/C/man2/madvise.2:386 build/C/man3/mallinfo.3:285
415 #: build/C/man3/malloc_get_state.3:119 build/C/man3/malloc_hook.3:145
416 #: build/C/man3/malloc_info.3:265 build/C/man3/malloc_stats.3:72
417 #: build/C/man3/malloc_trim.3:87 build/C/man3/malloc_usable_size.3:69
418 #: build/C/man3/mallopt.3:585 build/C/man3/mcheck.3:218
419 #: build/C/man2/mlock.2:344 build/C/man2/mmap.2:678 build/C/man2/mmap2.2:105
420 #: build/C/man2/mprotect.2:230 build/C/man2/mremap.2:221
421 #: build/C/man2/msync.2:129 build/C/man3/mtrace.3:177
422 #: build/C/man2/posix_fadvise.2:195 build/C/man3/posix_fallocate.3:137
423 #: build/C/man3/posix_memalign.3:282 build/C/man2/readahead.2:105
424 #: build/C/man2/remap_file_pages.2:169 build/C/man3/shm_open.3:287
425 #: build/C/man7/shm_overview.7:134 build/C/man2/shmctl.2:417
426 #: build/C/man2/shmget.2:305 build/C/man2/shmop.2:297
427 #: build/C/man2/subpage_prot.2:133 build/C/man2/sync_file_range.2:229
428 msgid ""
429 "This page is part of release 3.41 of the Linux I<man-pages> project.  A "
430 "description of the project, and information about reporting bugs, can be "
431 "found at http://www.kernel.org/doc/man-pages/."
432 msgstr ""
433 "この man ページは Linux I<man-pages> プロジェクトのリリース 3.41 の一部\n"
434 "である。プロジェクトの説明とバグ報告に関する情報は\n"
435 "http://www.kernel.org/doc/man-pages/ に書かれている。"
436
437 #. type: TH
438 #: build/C/man3/alloca.3:41
439 #, no-wrap
440 msgid "ALLOCA"
441 msgstr "ALLOCA"
442
443 #. type: TH
444 #: build/C/man3/alloca.3:41
445 #, no-wrap
446 msgid "2008-01-24"
447 msgstr "2008-01-24"
448
449 #. type: TH
450 #: build/C/man3/alloca.3:41 build/C/man3/malloc_get_state.3:23
451 #: build/C/man3/malloc_hook.3:6 build/C/man3/malloc_info.3:23
452 #: build/C/man3/malloc_usable_size.3:23 build/C/man3/mcheck.3:23
453 #: build/C/man3/mtrace.3:23 build/C/man3/posix_fallocate.3:23
454 #: build/C/man3/posix_memalign.3:28
455 #, no-wrap
456 msgid "GNU"
457 msgstr "GNU"
458
459 #. type: Plain text
460 #: build/C/man3/alloca.3:44
461 msgid "alloca - allocate memory that is automatically freed"
462 msgstr "alloca - 自動的に解放されるメモリを割り当てる"
463
464 #. type: Plain text
465 #: build/C/man3/alloca.3:46
466 msgid "B<#include E<lt>alloca.hE<gt>>"
467 msgstr "B<#include E<lt>alloca.hE<gt>>"
468
469 #. type: Plain text
470 #: build/C/man3/alloca.3:48
471 msgid "B<void *alloca(size_t >I<size>B<);>"
472 msgstr "B<void *alloca(size_t >I<size>B<);>"
473
474 #. type: Plain text
475 #: build/C/man3/alloca.3:58
476 msgid ""
477 "The B<alloca>()  function allocates I<size> bytes of space in the stack "
478 "frame of the caller.  This temporary space is automatically freed when the "
479 "function that called B<alloca>()  returns to its caller."
480 msgstr ""
481 "B<alloca>()  関数は、 I<size> バイトの領域を呼出元のスタック・フレームに割り"
482 "付ける。 この一時的な領域は、 B<alloca>()  を呼び出した関数が呼出元に返るとき"
483 "に自動的に解放される。"
484
485 #. type: Plain text
486 #: build/C/man3/alloca.3:63
487 msgid ""
488 "The B<alloca>()  function returns a pointer to the beginning of the "
489 "allocated space.  If the allocation causes stack overflow, program behavior "
490 "is undefined."
491 msgstr ""
492 "B<alloca>()  関数は、割り付けた領域の始まりを指すポインタを返す。 割り付けに"
493 "よってスタックオーバーフローが起った場合の プログラムの動作は定義されていな"
494 "い。"
495
496 #. type: Plain text
497 #: build/C/man3/alloca.3:65
498 msgid "This function is not in POSIX.1-2001."
499 msgstr "この関数は POSIX.1-2001 にはない。"
500
501 #. type: Plain text
502 #: build/C/man3/alloca.3:71
503 msgid ""
504 "There is evidence that the B<alloca>()  function appeared in 32V, PWB, "
505 "PWB.2, 3BSD, and 4BSD.  There is a man page for it in 4.3BSD.  Linux uses "
506 "the GNU version."
507 msgstr ""
508 "32V, PWB, PWB.2, 3BSD, 4BSD に B<alloca>()  関数が登場した証拠がある。 "
509 "4.3BSD には、マニュアルページがある。 Linux は、GNU 版を使っている。 この関数"
510 "は POSIX.1-2001 にはない。"
511
512 #. type: Plain text
513 #: build/C/man3/alloca.3:86
514 msgid ""
515 "The B<alloca>()  function is machine- and compiler-dependent.  For certain "
516 "applications, its use can improve efficiency compared to the use of B<malloc>"
517 "(3)  plus B<free>(3).  In certain cases, it can also simplify memory "
518 "deallocation in applications that use B<longjmp>(3)  or B<siglongjmp>(3).  "
519 "Otherwise, its use is discouraged."
520 msgstr ""
521 "B<alloca>()  関数は、機種とコンパイラに依存する。 特定のアプリケーションで"
522 "は、この関数を使うと B<malloc>(3)  と B<free>(3)  を組み合わせて使った場合に"
523 "比べて効率を改善することができる。 特定の場合では、この関数を使うことで、 "
524 "B<longjmp>(3)  や B<siglongjmp>(3)  を使うアプリケーションでのメモリの開放を"
525 "簡単にすることができる。 それ以外の場合では、この関数の使用は推奨されない。"
526
527 #. type: Plain text
528 #: build/C/man3/alloca.3:95
529 msgid ""
530 "Because the space allocated by B<alloca>()  is allocated within the stack "
531 "frame, that space is automatically freed if the function return is jumped "
532 "over by a call to B<longjmp>(3)  or B<siglongjmp>(3)."
533 msgstr ""
534 "B<alloca>()  により割り当てられる空間はスタックフレームから割り当てらるの"
535 "で、 関数の戻り先が B<longjmp>(3)  や B<siglongjmp>(3)  の呼び出しによりジャ"
536 "ンプした場合には、 割り当てられた空間は自動的に解放される。"
537
538 #. type: Plain text
539 #: build/C/man3/alloca.3:100
540 msgid "Do not attempt to B<free>(3)  space allocated by B<alloca>()!"
541 msgstr ""
542 "B<alloca>()  で割り当てられた空間を B<free>(3)  しようとすることのないよう"
543 "に!"
544
545 #. type: SS
546 #: build/C/man3/alloca.3:100
547 #, no-wrap
548 msgid "Notes on the GNU Version"
549 msgstr "GNU 版についての注意"
550
551 #. type: Plain text
552 #: build/C/man3/alloca.3:122
553 msgid ""
554 "Normally, B<gcc>(1)  translates calls to B<alloca>()  with inlined code.  "
555 "This is not done when either the I<-ansi>, I<-std=c89>, I<-std=c99>, or the "
556 "I<-fno-builtin> option is given (and the header I<E<lt>alloca.hE<gt>> is not "
557 "included).  But beware! By default the glibc version of I<E<lt>stdlib."
558 "hE<gt>> includes I<E<lt>alloca.hE<gt>> and that contains the line:"
559 msgstr ""
560 "通常 B<gcc>(1)  は B<alloca>()  の呼び出しをインラインコードに変換する。 I<-"
561 "ansi>, I<-std=c89>, I<-std=c99>, I<-fno-builtin> のいずれかのオプションが指定"
562 "された場合、この変換は行われない (また I<E<lt>alloca.hE<gt>> のインクルードも"
563 "行われない)。 だだし、デフォルトでは glibc 版の I<E<lt>stdlib.hE<gt>> は "
564 "I<E<lt>alloca.hE<gt>> をインクルードしており、これには以下の行が含まれている"
565 "ので注意すること。"
566
567 #. type: Plain text
568 #: build/C/man3/alloca.3:125
569 #, no-wrap
570 msgid "    #define alloca(size)   __builtin_alloca (size)\n"
571 msgstr "    #define alloca(size)   __builtin_alloca (size)\n"
572
573 #. type: Plain text
574 #: build/C/man3/alloca.3:128
575 msgid "with messy consequences if one has a private version of this function."
576 msgstr "独自版の __builtin_alloca (size) 関数があると厄介な結果になる。"
577
578 #. type: Plain text
579 #: build/C/man3/alloca.3:132
580 msgid ""
581 "The fact that the code is inlined means that it is impossible to take the "
582 "address of this function, or to change its behavior by linking with a "
583 "different library."
584 msgstr ""
585 "このコードはインライン化されているので、 この関数のアドレスを取得したり、 他"
586 "のライブラリをリンクして動作を変更することはできない。"
587
588 #. type: Plain text
589 #: build/C/man3/alloca.3:136
590 msgid ""
591 "The inlined code often consists of a single instruction adjusting the stack "
592 "pointer, and does not check for stack overflow.  Thus, there is no NULL "
593 "error return."
594 msgstr ""
595 "通常このインラインコードはスタックポインタを移動する 1 つの命令 "
596 "(instruction) から構成されており、 スタックオーバーフローをチェックしない。 "
597 "よって NULL エラーが返されることはない。"
598
599 #. type: SH
600 #: build/C/man3/alloca.3:136 build/C/man2/cacheflush.2:81
601 #: build/C/man3/mallinfo.3:113 build/C/man3/mallopt.3:404
602 #: build/C/man2/mlock.2:305 build/C/man2/mmap.2:544 build/C/man3/mtrace.3:100
603 #: build/C/man2/posix_fadvise.2:177 build/C/man2/shmget.2:284
604 #, no-wrap
605 msgid "BUGS"
606 msgstr "バグ"
607
608 #. type: Plain text
609 #: build/C/man3/alloca.3:141
610 msgid ""
611 "There is no error indication if the stack frame cannot be extended.  "
612 "(However, after a failed allocation, the program is likely to receive a "
613 "B<SIGSEGV> signal if it attempts to access the unallocated space.)"
614 msgstr ""
615 "スタックフレームが拡張できなかった場合、エラー通知は行われない。 (しかしなが"
616 "ら、割り当てに失敗した後で、プログラムが割り当てられなかった 空間にアクセスし"
617 "ようとした場合に B<SIGSEGV> シグナルを受信することだろう。)"
618
619 #. type: Plain text
620 #: build/C/man3/alloca.3:149
621 msgid ""
622 "On many systems B<alloca>()  cannot be used inside the list of arguments of "
623 "a function call, because the stack space reserved by B<alloca>()  would "
624 "appear on the stack in the middle of the space for the function arguments."
625 msgstr ""
626 "多くのシステムにおいて、関数コールの引き数のリスト内では B<alloca>()  が使え"
627 "ない。 これは、 B<alloca>()  によって予約されるスタック領域が、 関数引き数に"
628 "使われるスタック領域の中に現れてしまうためである。"
629
630 #. type: SH
631 #: build/C/man3/alloca.3:149 build/C/man2/fallocate.2:191
632 #: build/C/man2/madvise.2:371 build/C/man3/mallinfo.3:269
633 #: build/C/man3/malloc_get_state.3:109 build/C/man3/malloc_hook.3:133
634 #: build/C/man3/malloc_info.3:252 build/C/man3/malloc_stats.3:59
635 #: build/C/man3/malloc_trim.3:76 build/C/man3/malloc_usable_size.3:60
636 #: build/C/man3/mallopt.3:564 build/C/man3/mcheck.3:204
637 #: build/C/man2/mlock.2:330 build/C/man2/mmap.2:653 build/C/man2/mmap2.2:92
638 #: build/C/man2/mprotect.2:220 build/C/man2/mremap.2:200
639 #: build/C/man2/msync.2:118 build/C/man3/mtrace.3:165
640 #: build/C/man2/posix_fadvise.2:182 build/C/man3/posix_fallocate.3:126
641 #: build/C/man3/posix_memalign.3:270 build/C/man2/readahead.2:92
642 #: build/C/man2/remap_file_pages.2:155 build/C/man3/shm_open.3:269
643 #: build/C/man7/shm_overview.7:114 build/C/man2/shmctl.2:403
644 #: build/C/man2/shmget.2:290 build/C/man2/shmop.2:282
645 #: build/C/man2/subpage_prot.2:120 build/C/man2/sync_file_range.2:217
646 #, no-wrap
647 msgid "SEE ALSO"
648 msgstr "関連項目"
649
650 #. type: Plain text
651 #: build/C/man3/alloca.3:153
652 msgid "B<brk>(2), B<longjmp>(3), B<malloc>(3)"
653 msgstr "B<brk>(2), B<longjmp>(3), B<malloc>(3)"
654
655 #. type: TH
656 #: build/C/man2/cacheflush.2:24
657 #, no-wrap
658 msgid "CACHEFLUSH"
659 msgstr "CACHEFLUSH"
660
661 #. type: TH
662 #: build/C/man2/cacheflush.2:24
663 #, no-wrap
664 msgid "2007-05-26"
665 msgstr "2007-05-26"
666
667 #. type: Plain text
668 #: build/C/man2/cacheflush.2:27
669 msgid "cacheflush - flush contents of instruction and/or data cache"
670 msgstr "cacheflush - 命令キャッシュやデータキャッシュの内容をフラッシュする"
671
672 #. type: Plain text
673 #: build/C/man2/cacheflush.2:30
674 #, no-wrap
675 msgid "B<#include E<lt>asm/cachectl.hE<gt>>\n"
676 msgstr "B<#include E<lt>asm/cachectl.hE<gt>>\n"
677
678 #. type: Plain text
679 #: build/C/man2/cacheflush.2:32
680 #, no-wrap
681 msgid "B<int cacheflush(char *>I<addr>B<, int >I<nbytes>B<, int >I<cache>B<);>\n"
682 msgstr "B<int cacheflush(char *>I<addr>B<, int >I<nbytes>B<, int >I<cache>B<);>\n"
683
684 #. type: Plain text
685 #: build/C/man2/cacheflush.2:42
686 msgid ""
687 "B<cacheflush>()  flushes the contents of the indicated cache(s) for the user "
688 "addresses in the range I<addr> to I<(addr+nbytes-1)>.  I<cache> may be one "
689 "of:"
690 msgstr ""
691 "B<cacheflush>()  は I<addr> から I<(addr+nbytes-1)> の範囲のユーザアドレスに"
692 "対応する 指定されたキャッシュをフラッシュする。 I<cache> には以下のいずれかを"
693 "指定する:"
694
695 #. type: TP
696 #: build/C/man2/cacheflush.2:42
697 #, no-wrap
698 msgid "B<ICACHE>"
699 msgstr "B<ICACHE>"
700
701 #. type: Plain text
702 #: build/C/man2/cacheflush.2:45
703 msgid "Flush the instruction cache."
704 msgstr "命令 (instruction) キャッシュをフラッシュする。"
705
706 #. type: TP
707 #: build/C/man2/cacheflush.2:45
708 #, no-wrap
709 msgid "B<DCACHE>"
710 msgstr "B<DCACHE>"
711
712 #. type: Plain text
713 #: build/C/man2/cacheflush.2:48
714 msgid "Write back to memory and invalidate the affected valid cache lines."
715 msgstr "変更があったキャッシュラインをメモリに書き戻し、無効にする。"
716
717 #. type: TP
718 #: build/C/man2/cacheflush.2:48
719 #, no-wrap
720 msgid "B<BCACHE>"
721 msgstr "B<BCACHE>"
722
723 #. type: Plain text
724 #: build/C/man2/cacheflush.2:52
725 msgid "Same as B<(ICACHE|DCACHE)>."
726 msgstr "B<(ICACHE|DCACHE)> と同じ。"
727
728 #. type: Plain text
729 #: build/C/man2/cacheflush.2:58
730 msgid ""
731 "B<cacheflush>()  returns 0 on success or -1 on error.  If errors are "
732 "detected, I<errno> will indicate the error."
733 msgstr ""
734 "B<cacheflush>()  は成功した場合は 0 を、失敗した場合は -1 を返す。エラーが検"
735 "出された場合は I<errno> にエラーが指示される。"
736
737 #. type: TP
738 #: build/C/man2/cacheflush.2:59 build/C/man2/mmap2.2:62
739 #: build/C/man2/mremap.2:143 build/C/man2/shmctl.2:303
740 #: build/C/man2/subpage_prot.2:67
741 #, no-wrap
742 msgid "B<EFAULT>"
743 msgstr "B<EFAULT>"
744
745 #. type: Plain text
746 #: build/C/man2/cacheflush.2:66
747 msgid ""
748 "Some or all of the address range I<addr> to I<(addr+nbytes-1)> is not "
749 "accessible."
750 msgstr ""
751 "I<addr> から I<(addr+nbytes-1)> の範囲のアドレスの全てまたは一部が アクセス可"
752 "能ではない。"
753
754 #. type: TP
755 #: build/C/man2/cacheflush.2:66 build/C/man2/fallocate.2:124
756 #: build/C/man2/madvise.2:282 build/C/man3/malloc_info.3:52
757 #: build/C/man2/mlock.2:158 build/C/man2/mlock.2:165 build/C/man2/mlock.2:177
758 #: build/C/man2/mmap.2:421 build/C/man2/mmap.2:429 build/C/man2/mmap.2:434
759 #: build/C/man2/mmap2.2:65 build/C/man2/mprotect.2:89
760 #: build/C/man2/mremap.2:152 build/C/man2/msync.2:80
761 #: build/C/man2/posix_fadvise.2:93 build/C/man3/posix_fallocate.3:79
762 #: build/C/man3/posix_memalign.3:156 build/C/man2/readahead.2:76
763 #: build/C/man2/remap_file_pages.2:130 build/C/man2/remap_file_pages.2:137
764 #: build/C/man3/shm_open.3:211 build/C/man2/shmctl.2:317
765 #: build/C/man2/shmget.2:196 build/C/man2/shmop.2:195 build/C/man2/shmop.2:218
766 #: build/C/man2/subpage_prot.2:72 build/C/man2/sync_file_range.2:152
767 #, no-wrap
768 msgid "B<EINVAL>"
769 msgstr "B<EINVAL>"
770
771 #. type: Plain text
772 #: build/C/man2/cacheflush.2:74
773 msgid "I<cache> is not one of B<ICACHE>, B<DCACHE>, or B<BCACHE>."
774 msgstr "I<cache> パラメータが B<ICACHE>, B<DCACHE>, B<BCACHE> のどれでもない。"
775
776 #.  FIXME This system call was only on MIPS back in 1.2 days, but
777 #.  by now it is on a number of other architectures (but not i386).
778 #.  Investigate the details and update this page.
779 #.  Irix 6.5 appears to have a cacheflush() syscall -- mtk
780 #. type: Plain text
781 #: build/C/man2/cacheflush.2:81
782 msgid ""
783 "This Linux-specific system call is only available on MIPS-based systems.  It "
784 "should not be used in programs intended to be portable."
785 msgstr ""
786 "この Linux 特有のシステムコールは MIPS ベースのシステムでのみ有効である。 移"
787 "植を意図したプログラムで使用すべきではない。"
788
789 #. type: Plain text
790 #: build/C/man2/cacheflush.2:88
791 msgid ""
792 "The current implementation ignores the I<addr> and I<nbytes> arguments.  "
793 "Therefore, the whole cache is always flushed."
794 msgstr ""
795 "現在の実装では、引き数 I<addr> と I<nbytes> は無視される。そのため、 常に全て"
796 "のキャッシュがフラッシュされる。"
797
798 #. type: TH
799 #: build/C/man2/fallocate.2:8
800 #, no-wrap
801 msgid "FALLOCATE"
802 msgstr "FALLOCATE"
803
804 #. type: TH
805 #: build/C/man2/fallocate.2:8
806 #, no-wrap
807 msgid "2012-04-23"
808 msgstr "2012-04-23"
809
810 #. type: Plain text
811 #: build/C/man2/fallocate.2:11
812 msgid "fallocate - manipulate file space"
813 msgstr "fallocate - ファイル空間の操作"
814
815 #. type: Plain text
816 #: build/C/man2/fallocate.2:15 build/C/man2/readahead.2:35
817 #, no-wrap
818 msgid ""
819 "B<#define _GNU_SOURCE>             /* See feature_test_macros(7) */\n"
820 "B<#include E<lt>fcntl.hE<gt>>\n"
821 msgstr ""
822 "B<#define _GNU_SOURCE>             /* feature_test_macros(7) 参照 */\n"
823 "B<#include E<lt>fcntl.hE<gt>>\n"
824
825 #. type: Plain text
826 #: build/C/man2/fallocate.2:18
827 #, no-wrap
828 msgid "B<int fallocate(int >I<fd>B<, int >I<mode>B<, off_t >I<offset>B<, off_t >I<len>B<);>\n"
829 msgstr "B<int fallocate(int >I<fd>B<, int >I<mode>B<, off_t >I<offset>B<, off_t >I<len>B<);>\n"
830
831 #. type: Plain text
832 #: build/C/man2/fallocate.2:24
833 msgid ""
834 "This is a nonportable, Linux-specific system call.  For the portable, "
835 "POSIX.1-specified method of ensuring that space is allocated for a file, see "
836 "B<posix_fallocate>(3)."
837 msgstr ""
838 "このシステムコールは、移植性のない、Linux 固有のシステムコールである。 移植性"
839 "が必要な場合は、ファイルに対してディスク空間を確実に確保するために、 POSIX.1 "
840 "で規定された方法である B<posix_fallocate>(3)  を使うこと。"
841
842 #. type: Plain text
843 #: build/C/man2/fallocate.2:34
844 msgid ""
845 "B<fallocate>()  allows the caller to directly manipulate the allocated disk "
846 "space for the file referred to by I<fd> for the byte range starting at "
847 "I<offset> and continuing for I<len> bytes."
848 msgstr ""
849 "B<fallocate>()  を使うと、 I<fd> が参照するファイルに割り当てられたディスク空"
850 "間を直接操作できる。 操作対象は、 I<offset> から始まる長さ I<len> バイトの領"
851 "域である。"
852
853 #. type: Plain text
854 #: build/C/man2/fallocate.2:39
855 msgid ""
856 "The I<mode> argument determines the operation to be performed on the given "
857 "range.  Details of the supported operations are given in the subsections "
858 "below."
859 msgstr ""
860 "I<mode> 引き数は、指定された領域に対して実行する操作を指定する。\n"
861 "サポートされている操作の詳細は以下のサブセクションで説明する。"
862
863 #. type: SS
864 #: build/C/man2/fallocate.2:39
865 #, no-wrap
866 msgid "Allocating disk space"
867 msgstr "ディスク領域の割り当て"
868
869 #. type: Plain text
870 #: build/C/man2/fallocate.2:58
871 msgid ""
872 "The default operation (i.e., I<mode> is zero) of B<fallocate>()  allocates "
873 "and initializes to zero the disk space within the range specified by "
874 "I<offset> and I<len>.  The file size (as reported by B<stat>(2))  will be "
875 "changed if I<offset>+I<len> is greater than the file size.  This default "
876 "behavior closely resembles the behavior of the B<posix_fallocate>(3)  "
877 "library function, and is intended as a method of optimally implementing that "
878 "function."
879 msgstr ""
880 "B<fallocate>() のデフォルトの動作 (つまり I<mode> が 0 の場合) は、\n"
881 "I<offset> と I<len> で指定された範囲のディスク領域の割り当てと初期化を行"
882 "う。\n"
883 "I<offset>+I<len> がファイルサイズよりも大きかった場合、\n"
884 "(B<stat>(2) で報告される) ファイルサイズが変更される。このデフォルトの動作"
885 "は、\n"
886 "ライブラリ関数 B<posix_fallocate>(3) の動作と非常に似ている。これは、\n"
887 "このシステムコールが B<posix_fallocate>(3) を最適に実装する手段を提供する\n"
888 "ことを目的としているからである。"
889
890 #. type: Plain text
891 #: build/C/man2/fallocate.2:64
892 msgid ""
893 "After a successful call, subsequent writes into the range specified by "
894 "I<offset> and I<len> are guaranteed not to fail because of lack of disk "
895 "space."
896 msgstr ""
897 "呼び出しが成功した場合、\n"
898 "I<offset> と I<len> で指定された範囲へのそれ以降の書き込みでは、\n"
899 "ディスクの領域不足での書き込み失敗が起こらないことが保証される。"
900
901 #. type: Plain text
902 #: build/C/man2/fallocate.2:75
903 msgid ""
904 "If the B<FALLOC_FL_KEEP_SIZE> flag is specified in I<mode>, the behavior of "
905 "the call is similar, but the file size will not be changed even if I<offset>"
906 "+I<len> is greater than the file size.  Preallocating zeroed blocks beyond "
907 "the end of the file in this manner is useful for optimizing append workloads."
908 msgstr ""
909 "B<FALLOC_FL_KEEP_SIZE> フラグが I<mode> に指定された場合、このシステムコー"
910 "ル\n"
911 "の動作は似ているが、 I<offset>+I<len> がファイルサイズよりも大きい場合で\n"
912 "あってもファイルサイズは変更されない点が異なる。この場合のファイルの末尾\n"
913 "よりも後ろの前もって割り当てられた 0 で埋められたブロックは、ファイルへの\n"
914 "追記を最適化したい場合に役に立つ。"
915
916 #. type: Plain text
917 #: build/C/man2/fallocate.2:79
918 msgid ""
919 "Because allocation is done in block size chunks, B<fallocate>()  may "
920 "allocate a larger range of disk space than was specified."
921 msgstr ""
922 "割り当てはブロックサイズ単位で行われるため、 B<fallocate>() は指定されたよ"
923 "り\n"
924 "も大きなディスク領域を割り当てることがある。"
925
926 #. type: SS
927 #: build/C/man2/fallocate.2:79
928 #, no-wrap
929 msgid "Deallocating file space"
930 msgstr "ファイル空間の割り当て解除"
931
932 #. type: Plain text
933 #: build/C/man2/fallocate.2:94
934 msgid ""
935 "Specifying the B<FALLOC_FL_PUNCH_HOLE> flag (available since Linux 2.6.38) "
936 "in I<mode> deallocates space (i.e., creates a hole)  in the byte range "
937 "starting at I<offset> and continuing for I<len> bytes.  Within the specified "
938 "range, partial file system blocks are zeroed, and whole file system blocks "
939 "are removed from the file.  After a successful call, subsequent reads from "
940 "this range will return zeroes."
941 msgstr ""
942
943 #. type: Plain text
944 #: build/C/man2/fallocate.2:105
945 msgid ""
946 "The B<FALLOC_FL_PUNCH_HOLE> flag must be ORed with B<FALLOC_FL_KEEP_SIZE> in "
947 "I<mode>; in other words, even when punching off the end of the file, the "
948 "file size (as reported by B<stat>(2))  does not change."
949 msgstr ""
950
951 #. type: Plain text
952 #: build/C/man2/fallocate.2:109
953 msgid ""
954 "Not all file systems support B<FALLOC_FL_PUNCH_HOLE>; if a file system "
955 "doesn't support the operation, an error is returned."
956 msgstr ""
957
958 #. type: Plain text
959 #: build/C/man2/fallocate.2:112
960 msgid "B<fallocate>()  returns zero on success, and -1 on failure."
961 msgstr "B<fallocate>()  は成功すると 0 を返し、エラーの場合は -1 を返す。"
962
963 #. type: TP
964 #: build/C/man2/fallocate.2:113 build/C/man2/madvise.2:279
965 #: build/C/man2/mmap.2:415 build/C/man2/posix_fadvise.2:90
966 #: build/C/man3/posix_fallocate.3:71 build/C/man2/readahead.2:72
967 #: build/C/man2/sync_file_range.2:148
968 #, no-wrap
969 msgid "B<EBADF>"
970 msgstr "B<EBADF>"
971
972 #. type: Plain text
973 #: build/C/man2/fallocate.2:117 build/C/man3/posix_fallocate.3:75
974 msgid "I<fd> is not a valid file descriptor, or is not opened for writing."
975 msgstr ""
976 "I<fd> が有効なファイルディスクリプタでないか、 書き込み用としてオープンされて"
977 "いない。"
978
979 #. type: TP
980 #: build/C/man2/fallocate.2:117 build/C/man3/posix_fallocate.3:75
981 #, no-wrap
982 msgid "B<EFBIG>"
983 msgstr "B<EFBIG>"
984
985 #. type: Plain text
986 #: build/C/man2/fallocate.2:121
987 msgid "I<offset>+I<len> exceeds the maximum file size."
988 msgstr "I<offset + len> がファイルサイズの最大値よりも大きい。"
989
990 #. type: TP
991 #: build/C/man2/fallocate.2:121
992 #, no-wrap
993 msgid "B<EINTR>"
994 msgstr "B<EINTR>"
995
996 #. type: Plain text
997 #: build/C/man2/fallocate.2:124
998 msgid "A signal was caught during execution."
999 msgstr "実行中にシグナルが捕捉された。"
1000
1001 #. type: Plain text
1002 #: build/C/man2/fallocate.2:136 build/C/man3/posix_fallocate.3:85
1003 msgid "I<offset> was less than 0, or I<len> was less than or equal to 0."
1004 msgstr "I<offset> が 0 未満だったか、 I<len> が 0 以下だった。"
1005
1006 #. type: TP
1007 #: build/C/man2/fallocate.2:136 build/C/man2/madvise.2:310
1008 #: build/C/man2/sync_file_range.2:160
1009 #, no-wrap
1010 msgid "B<EIO>"
1011 msgstr "B<EIO>"
1012
1013 #. type: Plain text
1014 #: build/C/man2/fallocate.2:139
1015 msgid "An I/O error occurred while reading from or writing to a file system."
1016 msgstr "ファイルシステムとの読み書き中に入出力エラーが発生した。"
1017
1018 #. type: TP
1019 #: build/C/man2/fallocate.2:139 build/C/man2/mmap.2:450
1020 #: build/C/man3/posix_fallocate.3:85
1021 #, no-wrap
1022 msgid "B<ENODEV>"
1023 msgstr "B<ENODEV>"
1024
1025 #. type: Plain text
1026 #: build/C/man2/fallocate.2:146
1027 msgid ""
1028 "I<fd> does not refer to a regular file or a directory.  (If I<fd> is a pipe "
1029 "or FIFO, a different error results.)"
1030 msgstr ""
1031 "I<fd> が通常のファイルかディレクトリを参照していない (I<fd> がパイプや FIFO "
1032 "を参照している場合、別のエラーが発生する)。"
1033
1034 #. type: TP
1035 #: build/C/man2/fallocate.2:146 build/C/man3/posix_fallocate.3:89
1036 #: build/C/man2/shmget.2:214 build/C/man2/sync_file_range.2:166
1037 #, no-wrap
1038 msgid "B<ENOSPC>"
1039 msgstr "B<ENOSPC>"
1040
1041 #. type: Plain text
1042 #: build/C/man2/fallocate.2:151 build/C/man3/posix_fallocate.3:94
1043 msgid ""
1044 "There is not enough space left on the device containing the file referred to "
1045 "by I<fd>."
1046 msgstr "I<fd> が参照するファイルを含むデバイスに十分な空き領域がない。"
1047
1048 #. type: Plain text
1049 #: build/C/man2/fallocate.2:155
1050 msgid "This kernel does not implement B<fallocate>()."
1051 msgstr "このカーネルでは B<fallocate>() は実装されていない。"
1052
1053 #. type: TP
1054 #: build/C/man2/fallocate.2:155
1055 #, no-wrap
1056 msgid "B<EOPNOTSUPP>"
1057 msgstr "B<EOPNOTSUPP>"
1058
1059 #. type: Plain text
1060 #: build/C/man2/fallocate.2:164
1061 msgid ""
1062 "The file system containing the file referred to by I<fd> does not support "
1063 "this operation; or the I<mode> is not supported by the file system "
1064 "containing the file referred to by I<fd>."
1065 msgstr ""
1066 "I<fd> が参照するファイルを含むファイルシステムが 指定された操作を\n"
1067 "サポートしていない。 I<fd> が参照するファイルを含むファイルシステムが\n"
1068 "I<mode> をサポートしていない。"
1069
1070 #. type: TP
1071 #: build/C/man2/fallocate.2:164 build/C/man2/mlock.2:144
1072 #: build/C/man2/mlock.2:183 build/C/man2/mmap.2:458 build/C/man2/shmctl.2:342
1073 #: build/C/man2/shmget.2:222
1074 #, no-wrap
1075 msgid "B<EPERM>"
1076 msgstr "B<EPERM>"
1077
1078 #. type: Plain text
1079 #: build/C/man2/fallocate.2:180
1080 msgid ""
1081 "The file referred to by I<fd> is marked immutable (see B<chattr>(1)).  Or: "
1082 "I<mode> specifies B<FALLOC_FL_PUNCH_HOLE> and the file referred to by I<fd> "
1083 "is marked append-only (see B<chattr>(1))."
1084 msgstr ""
1085
1086 #. type: TP
1087 #: build/C/man2/fallocate.2:180 build/C/man2/posix_fadvise.2:96
1088 #: build/C/man3/posix_fallocate.3:94 build/C/man2/sync_file_range.2:169
1089 #, no-wrap
1090 msgid "B<ESPIPE>"
1091 msgstr "B<ESPIPE>"
1092
1093 #. type: Plain text
1094 #: build/C/man2/fallocate.2:184
1095 msgid "I<fd> refers to a pipe or FIFO."
1096 msgstr "I<fd> がパイプか FIFO を参照している。"
1097
1098 #. type: SH
1099 #: build/C/man2/fallocate.2:184 build/C/man3/malloc_info.3:56
1100 #: build/C/man3/mcheck.3:133 build/C/man2/mmap2.2:74
1101 #: build/C/man2/posix_fadvise.2:103 build/C/man3/posix_fallocate.3:98
1102 #: build/C/man3/posix_memalign.3:165 build/C/man2/readahead.2:82
1103 #: build/C/man2/remap_file_pages.2:146 build/C/man3/shm_open.3:247
1104 #: build/C/man2/subpage_prot.2:85 build/C/man2/sync_file_range.2:177
1105 #, no-wrap
1106 msgid "VERSIONS"
1107 msgstr "バージョン"
1108
1109 #. type: Plain text
1110 #: build/C/man2/fallocate.2:188
1111 msgid ""
1112 "B<fallocate>()  is available on Linux since kernel 2.6.23.  Support is "
1113 "provided by glibc since version 2.10."
1114 msgstr ""
1115 "B<fallocate>()  はカーネル 2.6.23 以降の Linux で利用可能である。 glibc での"
1116 "対応はバージョン 3.10 以降で行われている。"
1117
1118 #. type: Plain text
1119 #: build/C/man2/fallocate.2:191
1120 msgid "B<fallocate>()  is Linux-specific."
1121 msgstr "B<fallocate>()  は Linux 固有である。"
1122
1123 #. type: Plain text
1124 #: build/C/man2/fallocate.2:195
1125 msgid "B<ftruncate>(2), B<posix_fadvise>(3), B<posix_fallocate>(3)"
1126 msgstr "B<ftruncate>(2), B<posix_fadvise>(3), B<posix_fallocate>(3)"
1127
1128 #. type: TH
1129 #: build/C/man2/madvise.2:35
1130 #, no-wrap
1131 msgid "MADVISE"
1132 msgstr "MADVISE"
1133
1134 #. type: TH
1135 #: build/C/man2/madvise.2:35 build/C/man3/malloc_info.3:23
1136 #, no-wrap
1137 msgid "2012-04-28"
1138 msgstr "2012-04-28"
1139
1140 #. type: Plain text
1141 #: build/C/man2/madvise.2:38
1142 msgid "madvise - give advice about use of memory"
1143 msgstr "madvise - メモリ利用に関するアドバイスを与える"
1144
1145 #. type: Plain text
1146 #: build/C/man2/madvise.2:40 build/C/man2/msync.2:30
1147 #: build/C/man3/shm_open.3:31
1148 msgid "B<#include E<lt>sys/mman.hE<gt>>"
1149 msgstr "B<#include E<lt>sys/mman.hE<gt>>"
1150
1151 #. type: Plain text
1152 #: build/C/man2/madvise.2:42
1153 msgid ""
1154 "B<int madvise(void *>I<addr>B<, size_t >I<length>B<, int >I<advice>B<);>"
1155 msgstr ""
1156 "B<int madvise(void *>I<addr>B<, size_t >I<length>B<, int >I<advice>B<);>"
1157
1158 #. type: Plain text
1159 #: build/C/man2/madvise.2:46 build/C/man2/posix_fadvise.2:42
1160 #: build/C/man3/posix_fallocate.3:37 build/C/man3/posix_memalign.3:48
1161 msgid ""
1162 "Feature Test Macro Requirements for glibc (see B<feature_test_macros>(7)):"
1163 msgstr "glibc 向けの機能検査マクロの要件 (B<feature_test_macros>(7)  参照):"
1164
1165 #. type: Plain text
1166 #: build/C/man2/madvise.2:50
1167 msgid "B<madvise>(): _BSD_SOURCE"
1168 msgstr "B<madvise>(): _BSD_SOURCE"
1169
1170 #. type: Plain text
1171 #: build/C/man2/madvise.2:68
1172 msgid ""
1173 "The B<madvise>()  system call advises the kernel about how to handle paging "
1174 "input/output in the address range beginning at address I<addr> and with size "
1175 "I<length> bytes.  It allows an application to tell the kernel how it expects "
1176 "to use some mapped or shared memory areas, so that the kernel can choose "
1177 "appropriate read-ahead and caching techniques.  This call does not influence "
1178 "the semantics of the application (except in the case of B<MADV_DONTNEED>), "
1179 "but may influence its performance.  The kernel is free to ignore the advice."
1180 msgstr ""
1181 "B<madvise>()  システムコールは、アドレス I<addr> からはじまる I<length> バイ"
1182 "トのメモリブロックのページング入出力をどう扱えば良いか、 カーネルにアドバイス"
1183 "する。 これを用いると、 アプリケーションからカーネルに、 マップされたメモリや"
1184 "共有メモリをどのように扱ってほしいか伝えることができ、 カーネルはそれに応じて"
1185 "先読みやキャッシュなどの適切な手法を選択できる。 このコールはアプリケーション"
1186 "の動作そのものには影響しない (B<MADV_DONTNEED> の場合は別) が、 性能には影響"
1187 "しうる。 なおこのアドバイスを受け入れるかどうかはカーネルに任される。"
1188
1189 #. type: Plain text
1190 #: build/C/man2/madvise.2:72
1191 msgid "The advice is indicated in the I<advice> argument which can be"
1192 msgstr ""
1193 "アドバイスは引き数 I<advice> によって与える。以下のいずれかを指定できる。"
1194
1195 #. type: TP
1196 #: build/C/man2/madvise.2:72
1197 #, no-wrap
1198 msgid "B<MADV_NORMAL>"
1199 msgstr "B<MADV_NORMAL>"
1200
1201 #. type: Plain text
1202 #: build/C/man2/madvise.2:76
1203 msgid "No special treatment.  This is the default."
1204 msgstr "特別な扱いは行わない。これがデフォルトである。"
1205
1206 #. type: TP
1207 #: build/C/man2/madvise.2:76
1208 #, no-wrap
1209 msgid "B<MADV_RANDOM>"
1210 msgstr "B<MADV_RANDOM>"
1211
1212 #. type: Plain text
1213 #: build/C/man2/madvise.2:80
1214 msgid ""
1215 "Expect page references in random order.  (Hence, read ahead may be less "
1216 "useful than normally.)"
1217 msgstr ""
1218 "ページ参照はランダムな順序で行われそうだ。 (したがって、先読みはあまり効果が"
1219 "なさそうだ。)"
1220
1221 #. type: TP
1222 #: build/C/man2/madvise.2:80
1223 #, no-wrap
1224 msgid "B<MADV_SEQUENTIAL>"
1225 msgstr "B<MADV_SEQUENTIAL>"
1226
1227 #. type: Plain text
1228 #: build/C/man2/madvise.2:85
1229 msgid ""
1230 "Expect page references in sequential order.  (Hence, pages in the given "
1231 "range can be aggressively read ahead, and may be freed soon after they are "
1232 "accessed.)"
1233 msgstr ""
1234 "ページ参照はシーケンシャルな順序で行われそうだ。 (したがって与えた範囲のペー"
1235 "ジは積極的に先読みしておくと良いだろう。 またアクセスが終わったら速やかに解放"
1236 "して良い。)"
1237
1238 #. type: TP
1239 #: build/C/man2/madvise.2:85
1240 #, no-wrap
1241 msgid "B<MADV_WILLNEED>"
1242 msgstr "B<MADV_WILLNEED>"
1243
1244 #. type: Plain text
1245 #: build/C/man2/madvise.2:89
1246 msgid ""
1247 "Expect access in the near future.  (Hence, it might be a good idea to read "
1248 "some pages ahead.)"
1249 msgstr ""
1250 "近い将来にアクセスされそうだ。 (したがってこれらのページを今のうちに先読みし"
1251 "ておくといいだろう。)"
1252
1253 #. type: TP
1254 #: build/C/man2/madvise.2:89
1255 #, no-wrap
1256 msgid "B<MADV_DONTNEED>"
1257 msgstr "B<MADV_DONTNEED>"
1258
1259 #. type: Plain text
1260 #: build/C/man2/madvise.2:100
1261 msgid ""
1262 "Do not expect access in the near future.  (For the time being, the "
1263 "application is finished with the given range, so the kernel can free "
1264 "resources associated with it.)  Subsequent accesses of pages in this range "
1265 "will succeed, but will result either in reloading of the memory contents "
1266 "from the underlying mapped file (see B<mmap>(2))  or zero-fill-on-demand "
1267 "pages for mappings without an underlying file."
1268 msgstr ""
1269 "しばらくアクセスはなさそうだ。 (現時点でアプリケーションは与えた範囲の処理を"
1270 "終えている。 したがってカーネルはこれに関連するリソースを解放して良い。)  こ"
1271 "れ以降この範囲のページへのアクセスがあると、 成功はするが、メモリの内容をマッ"
1272 "プ元のファイルからロードし直すことになる (B<mmap>(2)  を見よ) か、 または元"
1273 "ファイルがないマップページでは アクセスがあったときに 0 埋めが行われることに"
1274 "なる。"
1275
1276 #. type: TP
1277 #: build/C/man2/madvise.2:100
1278 #, no-wrap
1279 msgid "B<MADV_REMOVE> (Since Linux 2.6.16)"
1280 msgstr "B<MADV_REMOVE> (Linux 2.6.16 以降)"
1281
1282 #.  2.6.18-rc5
1283 #.  Databases want to use this feature to drop a section of their
1284 #.  bufferpool (shared memory segments) - without writing back to
1285 #.  disk/swap space.  This feature is also useful for supporting
1286 #.  hot-plug memory on UML.
1287 #. type: Plain text
1288 #: build/C/man2/madvise.2:113
1289 msgid ""
1290 "Free up a given range of pages and its associated backing store.  Currently, "
1291 "only shmfs/tmpfs supports this; other file systems return with the error "
1292 "B<ENOSYS>."
1293 msgstr ""
1294 "指定された範囲のページと関連するバッキングストアを解放する。 現在のところ、 "
1295 "shmfs/tmpfs だけがこれに対応している。 他のファイルシステムでは B<ENOSYS> が"
1296 "返される。"
1297
1298 #. type: TP
1299 #: build/C/man2/madvise.2:113
1300 #, no-wrap
1301 msgid "B<MADV_DONTFORK> (Since Linux 2.6.16)"
1302 msgstr "B<MADV_DONTFORK> (Linux 2.6.16 以降)"
1303
1304 #.  See http://lwn.net/Articles/171941/
1305 #.  [PATCH] madvise MADV_DONTFORK/MADV_DOFORK
1306 #.  Currently, copy-on-write may change the physical address of
1307 #.  a page even if the user requested that the page is pinned in
1308 #.  memory (either by mlock or by get_user_pages).  This happens
1309 #.  if the process forks meanwhile, and the parent writes to that
1310 #.  page.  As a result, the page is orphaned: in case of
1311 #.  get_user_pages, the application will never see any data hardware
1312 #.  DMA's into this page after the COW.  In case of mlock'd memory,
1313 #.  the parent is not getting the realtime/security benefits of mlock.
1314 #.  In particular, this affects the Infiniband modules which do DMA from
1315 #.  and into user pages all the time.
1316 #.  This patch adds madvise options to control whether memory range is
1317 #.  inherited across fork. Useful e.g. for when hardware is doing DMA
1318 #.  from/into these pages.  Could also be useful to an application
1319 #.  wanting to speed up its forks by cutting large areas out of
1320 #.  consideration.
1321 #.  SEE ALSO: http://lwn.net/Articles/171941/
1322 #.  "Tweaks to madvise() and posix_fadvise()", 14 Feb 2006
1323 #. type: Plain text
1324 #: build/C/man2/madvise.2:144
1325 msgid ""
1326 "Do not make the pages in this range available to the child after a B<fork>"
1327 "(2).  This is useful to prevent copy-on-write semantics from changing the "
1328 "physical location of a page(s) if the parent writes to it after a B<fork>"
1329 "(2).  (Such page relocations cause problems for hardware that DMAs into the "
1330 "page(s).)"
1331 msgstr ""
1332 "B<fork>(2)  が行われた後、指定された範囲のページを子プロセスが利用できないよ"
1333 "うにする。 この機能は、書き込み時コピー (copy-on-write) 方式で、 B<fork>(2)  "
1334 "の後で親プロセスがページに書き込みを行った場合に ページの物理位置が変化しない"
1335 "ようにするのに有効である (ページの再配置はハードウェアがそのページに DMA 転送"
1336 "を行うような場合に 問題を起こすことがある)。"
1337
1338 #. type: TP
1339 #: build/C/man2/madvise.2:144
1340 #, no-wrap
1341 msgid "B<MADV_DOFORK> (Since Linux 2.6.16)"
1342 msgstr "B<MADV_DOFORK> (Linux 2.6.16 以降)"
1343
1344 #. type: Plain text
1345 #: build/C/man2/madvise.2:150
1346 msgid ""
1347 "Undo the effect of B<MADV_DONTFORK>, restoring the default behavior, whereby "
1348 "a mapping is inherited across B<fork>(2)."
1349 msgstr ""
1350 "B<MADV_DONTFORK> の影響を取り消し、デフォルトの動作に戻す。 つまり、 B<fork>"
1351 "(2)  の前後でマッピングは継承されるようになる。"
1352
1353 #. type: TP
1354 #: build/C/man2/madvise.2:150
1355 #, no-wrap
1356 msgid "B<MADV_HWPOISON> (Since Linux 2.6.32)"
1357 msgstr "B<MADV_HWPOISON> (Linux 2.6.32 以降)"
1358
1359 #. type: Plain text
1360 #: build/C/man2/madvise.2:162
1361 msgid ""
1362 "Poison a page and handle it like a hardware memory corruption.  This "
1363 "operation is only available for privileged (B<CAP_SYS_ADMIN>)  processes.  "
1364 "This operation may result in the calling process receiving a B<SIGBUS> and "
1365 "the page being unmapped.  This feature is intended for testing of memory "
1366 "error-handling code; it is only available if the kernel was configured with "
1367 "B<CONFIG_MEMORY_FAILURE>."
1368 msgstr ""
1369
1370 #. type: TP
1371 #: build/C/man2/madvise.2:162
1372 #, no-wrap
1373 msgid "B<MADV_SOFT_OFFLINE> (Since Linux 2.6.33)"
1374 msgstr "B<MADV_SOFT_OFFLINE> (Linux 2.6.33 以降)"
1375
1376 #. type: Plain text
1377 #: build/C/man2/madvise.2:180
1378 msgid ""
1379 "Soft offline the pages in the range specified by I<addr> and I<length>.  The "
1380 "memory of each page in the specified range is preserved (i.e., when next "
1381 "accessed, the same content will be visible, but in a new physical page "
1382 "frame), and the original page is offlined (i.e., no longer used, and taken "
1383 "out of normal memory management).  The effect of the B<MADV_SOFT_OFFLINE> "
1384 "operation is invisible to (i.e., does not change the semantics of)  the "
1385 "calling process.  This feature is intended for testing of memory error-"
1386 "handling code; it is only available if the kernel was configured with "
1387 "B<CONFIG_MEMORY_FAILURE>."
1388 msgstr ""
1389
1390 #. type: TP
1391 #: build/C/man2/madvise.2:180
1392 #, no-wrap
1393 msgid "B<MADV_MERGEABLE> (since Linux 2.6.32)"
1394 msgstr "B<MADV_MERGEABLE> (Linux 2.6.32 以降)"
1395
1396 #. type: Plain text
1397 #: build/C/man2/madvise.2:205
1398 msgid ""
1399 "Enable Kernel Samepage Merging (KSM) for the pages in the range specified by "
1400 "I<addr> and I<length>.  The kernel regularly scans those areas of user "
1401 "memory that have been marked as mergeable, looking for pages with identical "
1402 "content.  These are replaced by a single write-protected page (which is "
1403 "automatically copied if a process later wants to update the content of the "
1404 "page).  KSM only merges private anonymous pages (see B<mmap>(2)).  The KSM "
1405 "feature is intended for applications that generate many instances of the "
1406 "same data (e.g., virtualization systems such as KVM).  It can consume a lot "
1407 "of processing power; use with care.  See the kernel source file "
1408 "I<Documentation/vm/ksm.txt> for more details.  The B<MADV_MERGEABLE> and "
1409 "B<MADV_UNMERGEABLE> operations are only available if the kernel was "
1410 "configured with B<CONFIG_KSM>."
1411 msgstr ""
1412
1413 #. type: TP
1414 #: build/C/man2/madvise.2:205
1415 #, no-wrap
1416 msgid "B<MADV_UNMERGEABLE> (since Linux 2.6.32)"
1417 msgstr "B<MADV_UNMERGEABLE> (Linux 2.6.32 以降)"
1418
1419 #. type: Plain text
1420 #: build/C/man2/madvise.2:214
1421 msgid ""
1422 "Undo the effect of an earlier B<MADV_MERGEABLE> operation on the specified "
1423 "address range; KSM unmerges whatever pages it had merged in the address "
1424 "range specified by I<addr> and I<length>."
1425 msgstr ""
1426
1427 #. type: TP
1428 #: build/C/man2/madvise.2:214
1429 #, no-wrap
1430 msgid "B<MADV_HUGEPAGE> (since Linux 2.6.38)"
1431 msgstr "B<MADV_HUGEPAGE> (Linux 2.6.38 以降)"
1432
1433 #.  http://lwn.net/Articles/358904/
1434 #.  https://lwn.net/Articles/423584/
1435 #. type: Plain text
1436 #: build/C/man2/madvise.2:243
1437 msgid ""
1438 "Enables Transparent Huge Pages (THP) for pages in the range specified by "
1439 "I<addr> and I<length>.  Currently, Transparent Huge Pages only work with "
1440 "private anonymous pages (see B<mmap>(2)).  The kernel will regularly scan "
1441 "the areas marked as huge page candidates to replace them with huge pages.  "
1442 "The kernel will also allocate huge pages directly when the region is "
1443 "naturally aligned to the huge page size (see B<posix_memalign>(2)).  This "
1444 "feature is primarily aimed at applications that use large mappings of data "
1445 "and access large regions of that memory at a time (e.g., virtualization "
1446 "systems such as QEMU).  It can very easily waste memory (e.g., a 2MB mapping "
1447 "that only ever accesses 1 byte will result in 2MB of wired memory instead of "
1448 "one 4KB page).  See the kernel source file I<Documentation/vm/transhuge.txt> "
1449 "for more details.  The B<MADV_HUGEPAGE> and B<MADV_NOHUGEPAGE> operations "
1450 "are only available if the kernel was configured with "
1451 "B<CONFIG_TRANSPARENT_HUGEPAGE>."
1452 msgstr ""
1453
1454 #. type: TP
1455 #: build/C/man2/madvise.2:243
1456 #, no-wrap
1457 msgid "B<MADV_NOHUGEPAGE> (since Linux 2.6.38)"
1458 msgstr "B<MADV_NOHUGEPAGE> (Linux 2.6.38 以降)"
1459
1460 #. type: Plain text
1461 #: build/C/man2/madvise.2:250
1462 msgid ""
1463 "Ensures that memory in the address range specified by I<addr> and I<length> "
1464 "will not be collapsed into huge pages."
1465 msgstr ""
1466
1467 #. type: TP
1468 #: build/C/man2/madvise.2:250
1469 #, no-wrap
1470 msgid "B<MADV_DONTDUMP> (since Linux 3.4)"
1471 msgstr "B<MADV_DONTDUMP> (Linux 3.4 以降)"
1472
1473 #. type: Plain text
1474 #: build/C/man2/madvise.2:264
1475 msgid ""
1476 "Exclude from a core dump those pages in the range specified by I<addr> and "
1477 "I<length>.  This is useful in applications that have large areas of memory "
1478 "that are known not to be useful in a core dump.  The effect of "
1479 "B<MADV_DONTDUMP> takes precedence over the bit mask that is set via the I</"
1480 "proc/PID/coredump_filter> file (see B<core>(5))."
1481 msgstr ""
1482
1483 #. type: TP
1484 #: build/C/man2/madvise.2:264
1485 #, no-wrap
1486 msgid "B<MADV_DODUMP> (since Linux 3.4)"
1487 msgstr "B<MADV_DODUMP> (Linux 3.4 以降)"
1488
1489 #. type: Plain text
1490 #: build/C/man2/madvise.2:268
1491 msgid "Undo the effect of an earlier B<MADV_DONTDUMP>."
1492 msgstr ""
1493
1494 #. type: Plain text
1495 #: build/C/man2/madvise.2:275
1496 msgid ""
1497 "On success B<madvise>()  returns zero.  On error, it returns -1 and I<errno> "
1498 "is set appropriately."
1499 msgstr ""
1500 "B<madvise>()  は成功すると 0 を返す。 エラーが起こると -1 を返し、 I<errno> "
1501 "を適切な値に設定する。"
1502
1503 #. type: TP
1504 #: build/C/man2/madvise.2:276 build/C/man2/mlock.2:155 build/C/man2/mmap.2:411
1505 #: build/C/man2/mremap.2:137
1506 #, no-wrap
1507 msgid "B<EAGAIN>"
1508 msgstr "B<EAGAIN>"
1509
1510 #. type: Plain text
1511 #: build/C/man2/madvise.2:279
1512 msgid "A kernel resource was temporarily unavailable."
1513 msgstr "何らかのカーネルリソースが一時的に利用できなかった。"
1514
1515 #. type: Plain text
1516 #: build/C/man2/madvise.2:282
1517 msgid "The map exists, but the area maps something that isn't a file."
1518 msgstr "指定したマップは存在するが、ファイルではないところをマップしている。"
1519
1520 #. type: Plain text
1521 #: build/C/man2/madvise.2:285
1522 msgid "This error can occur for the following reasons:"
1523 msgstr ""
1524
1525 #. type: IP
1526 #: build/C/man2/madvise.2:286 build/C/man2/madvise.2:292
1527 #: build/C/man2/madvise.2:295 build/C/man2/madvise.2:298
1528 #: build/C/man2/madvise.2:301 build/C/man3/mallopt.3:233
1529 #: build/C/man3/mallopt.3:239
1530 #, no-wrap
1531 msgid "*"
1532 msgstr "*"
1533
1534 #.  .I len
1535 #.  is zero,
1536 #. type: Plain text
1537 #: build/C/man2/madvise.2:292
1538 msgid "The value I<len> is negative."
1539 msgstr "I<len> が負の値である。"
1540
1541 #. type: Plain text
1542 #: build/C/man2/madvise.2:295
1543 msgid "I<addr> is not page-aligned."
1544 msgstr ""
1545
1546 #. type: Plain text
1547 #: build/C/man2/madvise.2:298
1548 msgid "I<advice> is not a valid value"
1549 msgstr "I<advice> が有効な値でない。"
1550
1551 #. type: Plain text
1552 #: build/C/man2/madvise.2:301
1553 msgid ""
1554 "The application is attempting to release locked or shared pages (with "
1555 "B<MADV_DONTNEED>)."
1556 msgstr ""
1557 "アプリケーションがロックされたページや共有ページを (B<MADV_DONTNEED> で) 解"
1558 "放\n"
1559 "しようとしている。"
1560
1561 #. type: Plain text
1562 #: build/C/man2/madvise.2:309
1563 msgid ""
1564 "B<MADV_MERGEABLE> or B<MADV_UNMERGEABLE> was specified in I<advice>, but the "
1565 "kernel was not configured with B<CONFIG_KSM>."
1566 msgstr ""
1567
1568 #. type: Plain text
1569 #: build/C/man2/madvise.2:316
1570 msgid ""
1571 "(for B<MADV_WILLNEED>)  Paging in this area would exceed the process's "
1572 "maximum resident set size."
1573 msgstr ""
1574 "(B<MADV_WILLNEED> の場合) この範囲のページングを行うと、 プロセスの RSS "
1575 "(resident set size) の最大値を越えてしまう。"
1576
1577 #. type: TP
1578 #: build/C/man2/madvise.2:316 build/C/man2/madvise.2:321
1579 #: build/C/man2/mlock.2:124 build/C/man2/mlock.2:132 build/C/man2/mlock.2:170
1580 #: build/C/man2/mmap.2:454 build/C/man2/mprotect.2:94
1581 #: build/C/man2/mprotect.2:97 build/C/man2/mremap.2:180
1582 #: build/C/man2/msync.2:93 build/C/man3/posix_memalign.3:162
1583 #: build/C/man2/shmctl.2:326 build/C/man2/shmget.2:211
1584 #: build/C/man2/shmop.2:209 build/C/man2/subpage_prot.2:82
1585 #: build/C/man2/sync_file_range.2:163
1586 #, no-wrap
1587 msgid "B<ENOMEM>"
1588 msgstr "B<ENOMEM>"
1589
1590 #. type: Plain text
1591 #: build/C/man2/madvise.2:321
1592 msgid "(for B<MADV_WILLNEED>)  Not enough memory: paging in failed."
1593 msgstr "(B<MADV_WILLNEED> の場合) メモリが足りず、ページングに失敗した。"
1594
1595 #. type: Plain text
1596 #: build/C/man2/madvise.2:325
1597 msgid ""
1598 "Addresses in the specified range are not currently mapped, or are outside "
1599 "the address space of the process."
1600 msgstr ""
1601 "指定した範囲のアドレスが、現在マップされていない。 あるいはプロセスのアドレス"
1602 "空間の内部にない。"
1603
1604 #.  FIXME . Write a posix_madvise(3) page.
1605 #. type: Plain text
1606 #: build/C/man2/madvise.2:337
1607 msgid ""
1608 "POSIX.1b.  POSIX.1-2001 describes B<posix_madvise>(3)  with constants "
1609 "B<POSIX_MADV_NORMAL>, etc., with a behavior close to that described here.  "
1610 "There is a similar B<posix_fadvise>(2)  for file access."
1611 msgstr ""
1612 "POSIX.1b.  POSIX.1-2001 では、 B<posix_madvise>(3)  を B<POSIX_MADV_NORMAL> "
1613 "などの定数とともに記述していた (それぞれの振る舞いはここで述べたものに近"
1614 "い)。 ファイルアクセスに対しても B<posix_fadvise>(2)  という類似の関数が存在"
1615 "する。"
1616
1617 #. type: Plain text
1618 #: build/C/man2/madvise.2:346
1619 msgid ""
1620 "B<MADV_REMOVE>, B<MADV_DONTFORK>, B<MADV_DOFORK>, B<MADV_HWPOISON>, "
1621 "B<MADV_MERGEABLE>, and B<MADV_UNMERGEABLE> are Linux-specific."
1622 msgstr ""
1623 "B<MADV_REMOVE>, B<MADV_DONTFORK>, B<MADV_DOFORK>, B<MADV_HWPOISON>,\n"
1624 "B<MADV_MERGEABLE>, B<MADV_UNMERGEABLE> は Linux 固有である。"
1625
1626 #. type: SS
1627 #: build/C/man2/madvise.2:347 build/C/man2/mlock.2:268
1628 #: build/C/man2/shmget.2:278
1629 #, no-wrap
1630 msgid "Linux Notes"
1631 msgstr "Linux での注意"
1632
1633 #. type: Plain text
1634 #: build/C/man2/madvise.2:355
1635 msgid ""
1636 "The current Linux implementation (2.4.0) views this system call more as a "
1637 "command than as advice and hence may return an error when it cannot do what "
1638 "it usually would do in response to this advice.  (See the ERRORS description "
1639 "above.)  This is nonstandard behavior."
1640 msgstr ""
1641 "現在の Linux の実装 (2.4.0) では、 このシステムコールをアドバイスというよりは"
1642 "命令と見ている。 したがってこのアドバイスに対して通常行われる動作が不可能な場"
1643 "合は、 エラーを返すことがある (上記の エラー の記述を参照)。 この振舞いは標準"
1644 "とは異なる。"
1645
1646 #.  .SH HISTORY
1647 #.  The
1648 #.  .BR madvise ()
1649 #.  function first appeared in 4.4BSD.
1650 #. type: Plain text
1651 #: build/C/man2/madvise.2:371
1652 msgid ""
1653 "The Linux implementation requires that the address I<addr> be page-aligned, "
1654 "and allows I<length> to be zero.  If there are some parts of the specified "
1655 "address range that are not mapped, the Linux version of B<madvise>()  "
1656 "ignores them and applies the call to the rest (but returns B<ENOMEM> from "
1657 "the system call, as it should)."
1658 msgstr ""
1659 "Linux の実装では I<addr> のアドレスはページ境界の値でなければならない。また "
1660 "I<length> は 0 であっても構わない。 また Linux 版の B<madvise>()  では、指定"
1661 "されたアドレス範囲にマップされていない部分があると、 これらを無視して残りの部"
1662 "分にアドバイスを適用する (しかしシステムコールに対してはちゃんと B<ENOMEM> を"
1663 "返す)。"
1664
1665 #. type: Plain text
1666 #: build/C/man2/madvise.2:379
1667 msgid ""
1668 "B<getrlimit>(2), B<mincore>(2), B<mmap>(2), B<mprotect>(2), B<msync>(2), "
1669 "B<munmap>(2), B<core>(5)"
1670 msgstr "B<getrlimit>(2), B<mincore>(2), B<mmap>(2), B<mprotect>(2), B<msync>(2), B<munmap>(2), B<core>(5)"
1671
1672 #. type: TH
1673 #: build/C/man3/mallinfo.3:24
1674 #, no-wrap
1675 msgid "MALLINFO"
1676 msgstr "MALLINFO"
1677
1678 #. type: TH
1679 #: build/C/man3/mallinfo.3:24 build/C/man3/malloc_stats.3:24
1680 #, no-wrap
1681 msgid "2012-05-06"
1682 msgstr "2012-05-06"
1683
1684 #. type: Plain text
1685 #: build/C/man3/mallinfo.3:27
1686 msgid "mallinfo - obtain memory allocation information"
1687 msgstr "mallinfo - メモリ割り当て情報を取得する"
1688
1689 #. type: Plain text
1690 #: build/C/man3/mallinfo.3:29 build/C/man3/malloc_stats.3:29
1691 #: build/C/man3/malloc_trim.3:29 build/C/man3/malloc_usable_size.3:28
1692 #: build/C/man3/mallopt.3:29
1693 msgid "B<#include E<lt>malloc.hE<gt>>"
1694 msgstr "B<#include E<lt>malloc.hE<gt>>"
1695
1696 #. type: Plain text
1697 #: build/C/man3/mallinfo.3:31
1698 msgid "B<struct mallinfo mallinfo(void);>"
1699 msgstr "B<struct mallinfo mallinfo(void);>"
1700
1701 #. type: Plain text
1702 #: build/C/man3/mallinfo.3:39
1703 msgid ""
1704 "The B<mallinfo>()  function returns a copy of a structure containing "
1705 "information about memory allocations performed by B<malloc>(3)  and related "
1706 "functions.  This structure is defined as follows:"
1707 msgstr ""
1708 "B<mallinfo>() 関数は、 B<malloc>(3) や一連の関数により実行されたメモリ\n"
1709 "割り当てに関する情報を格納した構造体のコピーを返す。\n"
1710 "この構造体は以下のように定義されている。"
1711
1712 #. type: Plain text
1713 #: build/C/man3/mallinfo.3:54
1714 #, no-wrap
1715 msgid ""
1716 "struct mallinfo {\n"
1717 "    int arena;     /* Non-mmapped space allocated (bytes) */\n"
1718 "    int ordblks;   /* Number of free chunks */\n"
1719 "    int smblks;    /* Number of free fastbin blocks */\n"
1720 "    int hblks;     /* Number of mmapped regions */\n"
1721 "    int hblkhd;    /* Space allocated in mmapped regions (bytes) */\n"
1722 "    int usmblks;   /* Maximum total allocated space (bytes) */\n"
1723 "    int fsmblks;   /* Space in freed fastbin blocks (bytes) */\n"
1724 "    int uordblks;  /* Total allocated space (bytes) */\n"
1725 "    int fordblks;  /* Total free space (bytes) */\n"
1726 "    int keepcost;  /* Top-most, releasable space (bytes) */\n"
1727 "};\n"
1728 msgstr ""
1729 "struct mallinfo {\n"
1730 "    int arena;     /* Non-mmapped space allocated (bytes) */\n"
1731 "    int ordblks;   /* Number of free chunks */\n"
1732 "    int smblks;    /* Number of free fastbin blocks */\n"
1733 "    int hblks;     /* Number of mmapped regions */\n"
1734 "    int hblkhd;    /* Space allocated in mmapped regions (bytes) */\n"
1735 "    int usmblks;   /* Maximum total allocated space (bytes) */\n"
1736 "    int fsmblks;   /* Space in freed fastbin blocks (bytes) */\n"
1737 "    int uordblks;  /* Total allocated space (bytes) */\n"
1738 "    int fordblks;  /* Total free space (bytes) */\n"
1739 "    int keepcost;  /* Top-most, releasable space (bytes) */\n"
1740 "};\n"
1741
1742 #. type: Plain text
1743 #: build/C/man3/mallinfo.3:60
1744 msgid ""
1745 "The fields of the I<mallinfo> structure contain the following information:"
1746 msgstr "I<mallinfo> 構造体の各フィールドには以下の情報が格納される。"
1747
1748 #. type: TP
1749 #: build/C/man3/mallinfo.3:61
1750 #, no-wrap
1751 msgid "I<arena>"
1752 msgstr "I<arena>"
1753
1754 #. type: Plain text
1755 #: build/C/man3/mallinfo.3:67
1756 msgid ""
1757 "The total amount of memory allocated by means other than B<mmap>(2)  (i.e., "
1758 "memory allocated on the heap).  This figure includes both in-use blocks and "
1759 "blocks on the free list."
1760 msgstr ""
1761
1762 #. type: TP
1763 #: build/C/man3/mallinfo.3:67
1764 #, no-wrap
1765 msgid "I<ordblks>"
1766 msgstr "I<ordblks>"
1767
1768 #. type: Plain text
1769 #: build/C/man3/mallinfo.3:70
1770 msgid "The number of ordinary (i.e., non-fastbin) free blocks."
1771 msgstr ""
1772
1773 #. type: TP
1774 #: build/C/man3/mallinfo.3:70
1775 #, no-wrap
1776 msgid "I<smblks>"
1777 msgstr "I<smblks>"
1778
1779 #. type: Plain text
1780 #: build/C/man3/mallinfo.3:74
1781 msgid "The number of fastbin free blocks (see B<mallopt>(3))."
1782 msgstr ""
1783
1784 #. type: TP
1785 #: build/C/man3/mallinfo.3:74
1786 #, no-wrap
1787 msgid "I<hblks>"
1788 msgstr "I<hblks>"
1789
1790 #. type: Plain text
1791 #: build/C/man3/mallinfo.3:82
1792 msgid ""
1793 "The number of blocks currently allocated using B<mmap>(2).  (See the "
1794 "discussion of B<M_MMAP_THRESHOLD> in B<mallopt>(3).)"
1795 msgstr ""
1796
1797 #. type: TP
1798 #: build/C/man3/mallinfo.3:82
1799 #, no-wrap
1800 msgid "I<hblkhd>"
1801 msgstr "I<hblkhd>"
1802
1803 #. type: Plain text
1804 #: build/C/man3/mallinfo.3:86
1805 msgid "The number of bytes in blocks currently allocated using B<mmap>(2)."
1806 msgstr ""
1807
1808 #. type: TP
1809 #: build/C/man3/mallinfo.3:86
1810 #, no-wrap
1811 msgid "I<usmblks>"
1812 msgstr "I<usmblks>"
1813
1814 #. type: Plain text
1815 #: build/C/man3/mallinfo.3:91
1816 msgid ""
1817 "The \"highwater mark\" for allocated space\\(emthat is, the maximum amount "
1818 "of space that was ever allocated.  This field is maintained only in "
1819 "nonthreading environments."
1820 msgstr ""
1821
1822 #. type: TP
1823 #: build/C/man3/mallinfo.3:91
1824 #, no-wrap
1825 msgid "I<fsmblks>"
1826 msgstr "I<fsmblks>"
1827
1828 #. type: Plain text
1829 #: build/C/man3/mallinfo.3:94
1830 msgid "The total number of bytes in fastbin free blocks."
1831 msgstr ""
1832
1833 #. type: TP
1834 #: build/C/man3/mallinfo.3:94
1835 #, no-wrap
1836 msgid "I<uordblks>"
1837 msgstr "I<uordblks>"
1838
1839 #. type: Plain text
1840 #: build/C/man3/mallinfo.3:97
1841 msgid "The total number of bytes used by in-use allocations."
1842 msgstr ""
1843
1844 #. type: TP
1845 #: build/C/man3/mallinfo.3:97
1846 #, no-wrap
1847 msgid "I<fordblks>"
1848 msgstr "I<fordblks>"
1849
1850 #. type: Plain text
1851 #: build/C/man3/mallinfo.3:100
1852 msgid "The total number of bytes in free blocks."
1853 msgstr ""
1854
1855 #. type: TP
1856 #: build/C/man3/mallinfo.3:100
1857 #, no-wrap
1858 msgid "I<keepcost>"
1859 msgstr "I<keepcost>"
1860
1861 #.  .SH VERSIONS
1862 #.  Available already in glibc 2.0, possibly earlier
1863 #. type: Plain text
1864 #: build/C/man3/mallinfo.3:109
1865 msgid ""
1866 "The total amount of releasable free space at the top of the heap.  This is "
1867 "the maximum number of bytes that could ideally (i.e., ignoring page "
1868 "alignment restrictions, and so on) be released by B<malloc_trim>(3)."
1869 msgstr ""
1870
1871 #. type: Plain text
1872 #: build/C/man3/mallinfo.3:113
1873 msgid ""
1874 "This function is not specified by POSIX or the C standards.  A similar "
1875 "function exists on many System V derivatives, and was specified in the SVID."
1876 msgstr ""
1877
1878 #.  FIXME http://sourceware.org/bugzilla/show_bug.cgi?id=208
1879 #.  See the 24 Aug 2011 mail by Paul Pluzhnikov:
1880 #.      "[patch] Fix mallinfo() to accumulate results for all arenas"
1881 #.  on libc-alpha@sourceware.org
1882 #. type: Plain text
1883 #: build/C/man3/mallinfo.3:125
1884 msgid ""
1885 "B<Information is returned for only the main memory allocation area.> "
1886 "Allocations in other arenas are excluded.  See B<malloc_stats>(3)  and "
1887 "B<malloc_info>(3)  for alternatives that include information about other "
1888 "arenas."
1889 msgstr ""
1890
1891 #. type: Plain text
1892 #: build/C/man3/mallinfo.3:133
1893 msgid ""
1894 "The fields of the I<mallinfo> structure are typed as I<int>.  However, "
1895 "because some internal bookkeeping values may be of type I<long>, the "
1896 "reported values may wrap around zero and thus be inaccurate."
1897 msgstr ""
1898
1899 #. type: SH
1900 #: build/C/man3/mallinfo.3:133 build/C/man3/malloc_hook.3:85
1901 #: build/C/man3/malloc_info.3:80 build/C/man3/mallopt.3:464
1902 #: build/C/man3/mcheck.3:159 build/C/man2/mmap.2:571
1903 #: build/C/man2/mprotect.2:142 build/C/man3/mtrace.3:106
1904 #, no-wrap
1905 msgid "EXAMPLE"
1906 msgstr "例"
1907
1908 #. type: Plain text
1909 #: build/C/man3/mallinfo.3:139
1910 msgid ""
1911 "The program below employs B<mallinfo>()  to retrieve memory allocation "
1912 "statistics before and after allocating and freeing some blocks of memory.  "
1913 "The statistics are displayed on standard output."
1914 msgstr ""
1915
1916 #. type: Plain text
1917 #: build/C/man3/mallinfo.3:143
1918 msgid ""
1919 "The first two command-line arguments specify the number and size of blocks "
1920 "to be allocated with B<malloc>(3)."
1921 msgstr ""
1922
1923 #. type: Plain text
1924 #: build/C/man3/mallinfo.3:157
1925 msgid ""
1926 "The remaining three arguments specify which of the allocated blocks should "
1927 "be freed with B<free>(3).  These three arguments are optional, and specify "
1928 "(in order): the step size to be used in the loop that frees blocks (the "
1929 "default is 1, meaning free all blocks in the range); the ordinal position of "
1930 "the first block to be freed (default 0, meaning the first allocated block); "
1931 "and a number one greater than the ordinal position of the last block to be "
1932 "freed (default is one greater than the maximum block number).  If these "
1933 "three arguments are omitted, then the defaults cause all allocated blocks to "
1934 "be freed."
1935 msgstr ""
1936
1937 #. type: Plain text
1938 #: build/C/man3/mallinfo.3:161
1939 msgid ""
1940 "In the following example run of the program, 1000 allocations of 100 bytes "
1941 "are performed, and then every second allocated block is freed:"
1942 msgstr ""
1943
1944 #. type: Plain text
1945 #: build/C/man3/mallinfo.3:176
1946 #, no-wrap
1947 msgid ""
1948 "$ B<./a.out 1000 100 2>\n"
1949 "============== Before allocating blocks ==============\n"
1950 "Total non-mmapped bytes (arena):       0\n"
1951 "# of free chunks (ordblks):            1\n"
1952 "# of free fastbin blocks (smblks):     0\n"
1953 "# of mapped regions (hblks):           0\n"
1954 "Bytes in mapped regions (hblkhd):      0\n"
1955 "Max. total allocated space (usmblks):  0\n"
1956 "Free bytes held in fastbins (fsmblks): 0\n"
1957 "Total allocated space (uordblks):      0\n"
1958 "Total free space (fordblks):           0\n"
1959 "Topmost releasable block (keepcost):   0\n"
1960 msgstr ""
1961 "$ B<./a.out 1000 100 2>\n"
1962 "============== Before allocating blocks ==============\n"
1963 "Total non-mmapped bytes (arena):       0\n"
1964 "# of free chunks (ordblks):            1\n"
1965 "# of free fastbin blocks (smblks):     0\n"
1966 "# of mapped regions (hblks):           0\n"
1967 "Bytes in mapped regions (hblkhd):      0\n"
1968 "Max. total allocated space (usmblks):  0\n"
1969 "Free bytes held in fastbins (fsmblks): 0\n"
1970 "Total allocated space (uordblks):      0\n"
1971 "Total free space (fordblks):           0\n"
1972 "Topmost releasable block (keepcost):   0\n"
1973
1974 #. type: Plain text
1975 #: build/C/man3/mallinfo.3:188
1976 #, no-wrap
1977 msgid ""
1978 "============== After allocating blocks ==============\n"
1979 "Total non-mmapped bytes (arena):       135168\n"
1980 "# of free chunks (ordblks):            1\n"
1981 "# of free fastbin blocks (smblks):     0\n"
1982 "# of mapped regions (hblks):           0\n"
1983 "Bytes in mapped regions (hblkhd):      0\n"
1984 "Max. total allocated space (usmblks):  0\n"
1985 "Free bytes held in fastbins (fsmblks): 0\n"
1986 "Total allocated space (uordblks):      104000\n"
1987 "Total free space (fordblks):           31168\n"
1988 "Topmost releasable block (keepcost):   31168\n"
1989 msgstr ""
1990 "============== After allocating blocks ==============\n"
1991 "Total non-mmapped bytes (arena):       135168\n"
1992 "# of free chunks (ordblks):            1\n"
1993 "# of free fastbin blocks (smblks):     0\n"
1994 "# of mapped regions (hblks):           0\n"
1995 "Bytes in mapped regions (hblkhd):      0\n"
1996 "Max. total allocated space (usmblks):  0\n"
1997 "Free bytes held in fastbins (fsmblks): 0\n"
1998 "Total allocated space (uordblks):      104000\n"
1999 "Total free space (fordblks):           31168\n"
2000 "Topmost releasable block (keepcost):   31168\n"
2001
2002 #. type: Plain text
2003 #: build/C/man3/mallinfo.3:200
2004 #, no-wrap
2005 msgid ""
2006 "============== After freeing blocks ==============\n"
2007 "Total non-mmapped bytes (arena):       135168\n"
2008 "# of free chunks (ordblks):            501\n"
2009 "# of free fastbin blocks (smblks):     0\n"
2010 "# of mapped regions (hblks):           0\n"
2011 "Bytes in mapped regions (hblkhd):      0\n"
2012 "Max. total allocated space (usmblks):  0\n"
2013 "Free bytes held in fastbins (fsmblks): 0\n"
2014 "Total allocated space (uordblks):      52000\n"
2015 "Total free space (fordblks):           83168\n"
2016 "Topmost releasable block (keepcost):   31168\n"
2017 msgstr ""
2018 "============== After freeing blocks ==============\n"
2019 "Total non-mmapped bytes (arena):       135168\n"
2020 "# of free chunks (ordblks):            501\n"
2021 "# of free fastbin blocks (smblks):     0\n"
2022 "# of mapped regions (hblks):           0\n"
2023 "Bytes in mapped regions (hblkhd):      0\n"
2024 "Max. total allocated space (usmblks):  0\n"
2025 "Free bytes held in fastbins (fsmblks): 0\n"
2026 "Total allocated space (uordblks):      52000\n"
2027 "Total free space (fordblks):           83168\n"
2028 "Topmost releasable block (keepcost):   31168\n"
2029
2030 #. type: SS
2031 #: build/C/man3/mallinfo.3:202 build/C/man3/malloc_info.3:163
2032 #: build/C/man3/mallopt.3:530 build/C/man3/mcheck.3:176
2033 #: build/C/man2/mprotect.2:159
2034 #, no-wrap
2035 msgid "Program source"
2036 msgstr "プログラムのソース"
2037
2038 #. type: Plain text
2039 #: build/C/man3/mallinfo.3:207
2040 #, no-wrap
2041 msgid ""
2042 "#include E<lt>malloc.hE<gt>\n"
2043 "#include \"tlpi_hdr.h\"\n"
2044 msgstr ""
2045 "#include E<lt>malloc.hE<gt>\n"
2046 "#include \"tlpi_hdr.h\"\n"
2047
2048 #. type: Plain text
2049 #: build/C/man3/mallinfo.3:212
2050 #, no-wrap
2051 msgid ""
2052 "static void\n"
2053 "display_mallinfo(void)\n"
2054 "{\n"
2055 "    struct mallinfo mi;\n"
2056 msgstr ""
2057 "static void\n"
2058 "display_mallinfo(void)\n"
2059 "{\n"
2060 "    struct mallinfo mi;\n"
2061
2062 #. type: Plain text
2063 #: build/C/man3/mallinfo.3:214
2064 #, no-wrap
2065 msgid "    mi = mallinfo();\n"
2066 msgstr "    mi = mallinfo();\n"
2067
2068 #. type: Plain text
2069 #: build/C/man3/mallinfo.3:226
2070 #, no-wrap
2071 msgid ""
2072 "    printf(\"Total non-mmapped bytes (arena):       %d\\en\", mi.arena);\n"
2073 "    printf(\"# of free chunks (ordblks):            %d\\en\", mi.ordblks);\n"
2074 "    printf(\"# of free fastbin blocks (smblks):     %d\\en\", mi.smblks);\n"
2075 "    printf(\"# of mapped regions (hblks):           %d\\en\", mi.hblks);\n"
2076 "    printf(\"Bytes in mapped regions (hblkhd):      %d\\en\", mi.hblkhd);\n"
2077 "    printf(\"Max. total allocated space (usmblks):  %d\\en\", mi.usmblks);\n"
2078 "    printf(\"Free bytes held in fastbins (fsmblks): %d\\en\", mi.fsmblks);\n"
2079 "    printf(\"Total allocated space (uordblks):      %d\\en\", mi.uordblks);\n"
2080 "    printf(\"Total free space (fordblks):           %d\\en\", mi.fordblks);\n"
2081 "    printf(\"Topmost releasable block (keepcost):   %d\\en\", mi.keepcost);\n"
2082 "}\n"
2083 msgstr ""
2084 "    printf(\"Total non-mmapped bytes (arena):       %d\\en\", mi.arena);\n"
2085 "    printf(\"# of free chunks (ordblks):            %d\\en\", mi.ordblks);\n"
2086 "    printf(\"# of free fastbin blocks (smblks):     %d\\en\", mi.smblks);\n"
2087 "    printf(\"# of mapped regions (hblks):           %d\\en\", mi.hblks);\n"
2088 "    printf(\"Bytes in mapped regions (hblkhd):      %d\\en\", mi.hblkhd);\n"
2089 "    printf(\"Max. total allocated space (usmblks):  %d\\en\", mi.usmblks);\n"
2090 "    printf(\"Free bytes held in fastbins (fsmblks): %d\\en\", mi.fsmblks);\n"
2091 "    printf(\"Total allocated space (uordblks):      %d\\en\", mi.uordblks);\n"
2092 "    printf(\"Total free space (fordblks):           %d\\en\", mi.fordblks);\n"
2093 "    printf(\"Topmost releasable block (keepcost):   %d\\en\", mi.keepcost);\n"
2094 "}\n"
2095
2096 #. type: Plain text
2097 #: build/C/man3/mallinfo.3:234
2098 #, no-wrap
2099 msgid ""
2100 "int\n"
2101 "main(int argc, char *argv[])\n"
2102 "{\n"
2103 "#define MAX_ALLOCS 2000000\n"
2104 "    char *alloc[MAX_ALLOCS];\n"
2105 "    int numBlocks, j, freeBegin, freeEnd, freeStep;\n"
2106 "    size_t blockSize;\n"
2107 msgstr ""
2108 "int\n"
2109 "main(int argc, char *argv[])\n"
2110 "{\n"
2111 "#define MAX_ALLOCS 2000000\n"
2112 "    char *alloc[MAX_ALLOCS];\n"
2113 "    int numBlocks, j, freeBegin, freeEnd, freeStep;\n"
2114 "    size_t blockSize;\n"
2115
2116 #. type: Plain text
2117 #: build/C/man3/mallinfo.3:238
2118 #, no-wrap
2119 msgid ""
2120 "    if (argc E<lt> 3 || strcmp(argv[1], \"--help\") == 0)\n"
2121 "        usageErr(\"%s num-blocks block-size [free-step [start-free \"\n"
2122 "                \"[end-free]]]\\en\", argv[0]);\n"
2123 msgstr ""
2124 "    if (argc E<lt> 3 || strcmp(argv[1], \"--help\") == 0)\n"
2125 "        usageErr(\"%s num-blocks block-size [free-step [start-free \"\n"
2126 "                \"[end-free]]]\\en\", argv[0]);\n"
2127
2128 #. type: Plain text
2129 #: build/C/man3/mallinfo.3:244
2130 #, no-wrap
2131 msgid ""
2132 "    numBlocks = atoi(argv[1]);\n"
2133 "    blockSize = atoi(argv[2]);\n"
2134 "    freeStep = (argc E<gt> 3) ? atoi(argv[3]) : 1;\n"
2135 "    freeBegin = (argc E<gt> 4) ? atoi(argv[4]) : 0;\n"
2136 "    freeEnd = (argc E<gt> 5) ? atoi(argv[5]) : numBlocks;\n"
2137 msgstr ""
2138 "    numBlocks = atoi(argv[1]);\n"
2139 "    blockSize = atoi(argv[2]);\n"
2140 "    freeStep = (argc E<gt> 3) ? atoi(argv[3]) : 1;\n"
2141 "    freeBegin = (argc E<gt> 4) ? atoi(argv[4]) : 0;\n"
2142 "    freeEnd = (argc E<gt> 5) ? atoi(argv[5]) : numBlocks;\n"
2143
2144 #. type: Plain text
2145 #: build/C/man3/mallinfo.3:247
2146 #, no-wrap
2147 msgid ""
2148 "    printf(\"============== Before allocating blocks ==============\\en\");\n"
2149 "    display_mallinfo();\n"
2150 msgstr ""
2151 "    printf(\"============== Before allocating blocks ==============\\en\");\n"
2152 "    display_mallinfo();\n"
2153
2154 #. type: Plain text
2155 #: build/C/man3/mallinfo.3:251
2156 #, no-wrap
2157 msgid ""
2158 "    for (j = 0; j E<lt> numBlocks; j++) {\n"
2159 "        if (numBlocks E<gt>= MAX_ALLOCS)\n"
2160 "            fatal(\"Too many allocations\");\n"
2161 msgstr ""
2162 "    for (j = 0; j E<lt> numBlocks; j++) {\n"
2163 "        if (numBlocks E<gt>= MAX_ALLOCS)\n"
2164 "            fatal(\"Too many allocations\");\n"
2165
2166 #. type: Plain text
2167 #: build/C/man3/mallinfo.3:256
2168 #, no-wrap
2169 msgid ""
2170 "        alloc[j] = malloc(blockSize);\n"
2171 "        if (alloc[j] == NULL)\n"
2172 "            errExit(\"malloc\");\n"
2173 "    }\n"
2174 msgstr ""
2175 "        alloc[j] = malloc(blockSize);\n"
2176 "        if (alloc[j] == NULL)\n"
2177 "            errExit(\"malloc\");\n"
2178 "    }\n"
2179
2180 #. type: Plain text
2181 #: build/C/man3/mallinfo.3:259
2182 #, no-wrap
2183 msgid ""
2184 "    printf(\"\\en============== After allocating blocks ==============\\en\");\n"
2185 "    display_mallinfo();\n"
2186 msgstr ""
2187 "    printf(\"\\en============== After allocating blocks ==============\\en\");\n"
2188 "    display_mallinfo();\n"
2189
2190 #. type: Plain text
2191 #: build/C/man3/mallinfo.3:262
2192 #, no-wrap
2193 msgid ""
2194 "    for (j = freeBegin; j E<lt> freeEnd; j += freeStep)\n"
2195 "        free(alloc[j]);\n"
2196 msgstr ""
2197 "    for (j = freeBegin; j E<lt> freeEnd; j += freeStep)\n"
2198 "        free(alloc[j]);\n"
2199
2200 #. type: Plain text
2201 #: build/C/man3/mallinfo.3:265
2202 #, no-wrap
2203 msgid ""
2204 "    printf(\"\\en============== After freeing blocks ==============\\en\");\n"
2205 "    display_mallinfo();\n"
2206 msgstr ""
2207 "    printf(\"\\en============== After freeing blocks ==============\\en\");\n"
2208 "    display_mallinfo();\n"
2209
2210 #. type: Plain text
2211 #: build/C/man3/mallinfo.3:268 build/C/man3/malloc_info.3:251
2212 #: build/C/man3/mallopt.3:563 build/C/man3/mcheck.3:203
2213 #: build/C/man2/mmap.2:652
2214 #, no-wrap
2215 msgid ""
2216 "    exit(EXIT_SUCCESS);\n"
2217 "}\n"
2218 msgstr ""
2219 "    exit(EXIT_SUCCESS);\n"
2220 "}\n"
2221
2222 #. type: Plain text
2223 #: build/C/man3/mallinfo.3:278
2224 msgid ""
2225 "B<mmap>(2), B<malloc>(3), B<malloc_info>(3), B<malloc_stats>(3), "
2226 "B<malloc_trim>(3), B<mallopt>(3)"
2227 msgstr "B<mmap>(2), B<malloc>(3), B<malloc_info>(3), B<malloc_stats>(3), B<malloc_trim>(3), B<mallopt>(3)"
2228
2229 #. type: TH
2230 #: build/C/man3/malloc_get_state.3:23
2231 #, no-wrap
2232 msgid "MALLOC_GET_STATE"
2233 msgstr "MALLOC_GET_STATE"
2234
2235 #. type: TH
2236 #: build/C/man3/malloc_get_state.3:23
2237 #, no-wrap
2238 msgid "2012-05-04"
2239 msgstr "2012-05-04"
2240
2241 #. type: Plain text
2242 #: build/C/man3/malloc_get_state.3:26
2243 msgid ""
2244 "malloc_get_state, malloc_set_state - record and restore state of malloc "
2245 "implementation"
2246 msgstr ""
2247
2248 #. type: Plain text
2249 #: build/C/man3/malloc_get_state.3:29 build/C/man3/posix_memalign.3:34
2250 #, no-wrap
2251 msgid "B<#include E<lt>stdlib.hE<gt>>\n"
2252 msgstr "B<#include E<lt>stdlib.hE<gt>>\n"
2253
2254 #. type: Plain text
2255 #: build/C/man3/malloc_get_state.3:31
2256 #, no-wrap
2257 msgid "B<void* malloc_get_state(void);>\n"
2258 msgstr "B<void* malloc_get_state(void);>\n"
2259
2260 #. type: Plain text
2261 #: build/C/man3/malloc_get_state.3:33
2262 #, no-wrap
2263 msgid "B<int malloc_set_state(void *>I<state>B<);>\n"
2264 msgstr "B<int malloc_set_state(void *>I<state>B<);>\n"
2265
2266 #. type: Plain text
2267 #: build/C/man3/malloc_get_state.3:51
2268 msgid ""
2269 "The B<malloc_get_state>()  function records the current state of all "
2270 "B<malloc>(3)  internal bookkeeping variables (but not the actual contents of "
2271 "the heap or the state of B<malloc_hook>(3)  functions pointers).  The state "
2272 "is recorded in a system-dependent opaque data structure dynamically "
2273 "allocated via B<malloc>(3), and a pointer to that data structure is returned "
2274 "as the function result.  (It is the caller's responsibility to B<free>(3)  "
2275 "this memory.)"
2276 msgstr ""
2277
2278 #. type: Plain text
2279 #: build/C/man3/malloc_get_state.3:59
2280 msgid ""
2281 "The B<malloc_set_state>()  function restores the state of all B<malloc>(3)  "
2282 "internal bookkeeping variables to the values recorded in the opaque data "
2283 "structure pointed to by I<state>."
2284 msgstr ""
2285
2286 #. type: Plain text
2287 #: build/C/man3/malloc_get_state.3:66
2288 msgid ""
2289 "On success, B<malloc_get_state>()  returns a pointer to a newly allocated "
2290 "opaque data structure.  On error (for example, memory could not be allocated "
2291 "for the data structure), B<malloc_get_state>()  returns NULL."
2292 msgstr ""
2293
2294 #.  if(ms->magic != MALLOC_STATE_MAGIC) return -1;
2295 #.  /* Must fail if the major version is too high. */
2296 #.  if((ms->version & ~0xffl) > (MALLOC_STATE_VERSION & ~0xffl)) return -2;
2297 #. type: Plain text
2298 #: build/C/man3/malloc_get_state.3:84
2299 msgid ""
2300 "On success, B<malloc_set_state>()  returns 0.  If the implementation detects "
2301 "that I<state> does not point to a correctly formed data structure, "
2302 "B<malloc_set_state>()  returns -1.  If the implementation detects that the "
2303 "version of the data structure referred to by I<state> is a more recent "
2304 "version than this implementation knows about, B<malloc_set_state>()  returns "
2305 "-2."
2306 msgstr ""
2307
2308 #. type: Plain text
2309 #: build/C/man3/malloc_get_state.3:86 build/C/man3/malloc_hook.3:78
2310 #: build/C/man3/mcheck.3:146 build/C/man3/mtrace.3:78
2311 msgid "These functions are GNU extensions."
2312 msgstr "これらの関数は GNU による拡張である。"
2313
2314 #. type: Plain text
2315 #: build/C/man3/malloc_get_state.3:92
2316 msgid ""
2317 "These functions are especially useful when using this B<malloc>(3)  "
2318 "implementation as part of a shared library, and the heap contents are saved/"
2319 "restored via some other method.  This technique is used by the GNU Emacs to "
2320 "implement its \"dumping\" function."
2321 msgstr ""
2322
2323 #.  i.e., calls __malloc_check_init()
2324 #.  i.e., malloc checking is not already in use
2325 #.  and the caller requested malloc checking
2326 #. type: Plain text
2327 #: build/C/man3/malloc_get_state.3:109
2328 msgid ""
2329 "Hook function pointers are never saved or restored by these functions, with "
2330 "two exceptions: if malloc checking (see B<mallopt>(3))  was in use when "
2331 "B<malloc_get_state>()  was called, then B<malloc_set_state>()  resets malloc "
2332 "checking hooks if possible; if malloc checking was not in use in the "
2333 "recorded state, but the caller has requested malloc checking, then the hooks "
2334 "are reset to 0."
2335 msgstr ""
2336
2337 #. type: Plain text
2338 #: build/C/man3/malloc_get_state.3:112
2339 msgid "B<malloc>(3), B<mallopt>(3)"
2340 msgstr "B<malloc>(3), B<mallopt>(3)"
2341
2342 #. type: TH
2343 #: build/C/man3/malloc_hook.3:6
2344 #, no-wrap
2345 msgid "MALLOC_HOOK"
2346 msgstr "MALLOC_HOOK"
2347
2348 #. type: TH
2349 #: build/C/man3/malloc_hook.3:6
2350 #, no-wrap
2351 msgid "2010-10-13"
2352 msgstr "2010-10-13"
2353
2354 #. type: Plain text
2355 #: build/C/man3/malloc_hook.3:11
2356 msgid ""
2357 "__malloc_hook, __malloc_initialize_hook, __memalign_hook, __free_hook, "
2358 "__realloc_hook, __after_morecore_hook - malloc debugging variables"
2359 msgstr ""
2360 "__malloc_hook, __malloc_initialize_hook, __memalign_hook, __free_hook, "
2361 "__realloc_hook, __after_morecore_hook - malloc デバッグ用の変数"
2362
2363 #. type: Plain text
2364 #: build/C/man3/malloc_hook.3:14 build/C/man3/malloc_info.3:29
2365 #: build/C/man3/posix_memalign.3:40
2366 #, no-wrap
2367 msgid "B<#include E<lt>malloc.hE<gt>>\n"
2368 msgstr "B<#include E<lt>malloc.hE<gt>>\n"
2369
2370 #. type: Plain text
2371 #: build/C/man3/malloc_hook.3:16
2372 #, no-wrap
2373 msgid "B<void *(*__malloc_hook)(size_t >I<size>B<, const void *>I<caller>B<);>\n"
2374 msgstr "B<void *(*__malloc_hook)(size_t >I<size>B<, const void *>I<caller>B<);>\n"
2375
2376 #. type: Plain text
2377 #: build/C/man3/malloc_hook.3:19
2378 #, no-wrap
2379 msgid "B<void *(*__realloc_hook)(void *>I<ptr>B<, size_t >I<size>B<, const void *>I<caller>B<);>\n"
2380 msgstr "B<void *(*__realloc_hook)(void *>I<ptr>B<, size_t >I<size>B<, const void *>I<caller>B<);>\n"
2381
2382 #. type: Plain text
2383 #: build/C/man3/malloc_hook.3:22
2384 #, no-wrap
2385 msgid ""
2386 "B<void *(*__memalign_hook)(size_t >I<alignment>B<, size_t >I<size>B<,>\n"
2387 "B<                         const void *>I<caller>B<);>\n"
2388 msgstr ""
2389 "B<void *(*__memalign_hook)(size_t >I<alignment>B<, size_t >I<size>B<,>\n"
2390 "B<                         const void *>I<caller>B<);>\n"
2391
2392 #. type: Plain text
2393 #: build/C/man3/malloc_hook.3:24
2394 #, no-wrap
2395 msgid "B<void (*__free_hook)(void *>I<ptr>B<, const void *>I<caller>B<);>\n"
2396 msgstr "B<void (*__free_hook)(void *>I<ptr>B<, const void *>I<caller>B<);>\n"
2397
2398 #. type: Plain text
2399 #: build/C/man3/malloc_hook.3:26
2400 #, no-wrap
2401 msgid "B<void (*__malloc_initialize_hook)(void);>\n"
2402 msgstr "B<void (*__malloc_initialize_hook)(void);>\n"
2403
2404 #. type: Plain text
2405 #: build/C/man3/malloc_hook.3:28
2406 #, no-wrap
2407 msgid "B<void (*__after_morecore_hook)(void);>\n"
2408 msgstr "B<void (*__after_morecore_hook)(void);>\n"
2409
2410 #. type: Plain text
2411 #: build/C/man3/malloc_hook.3:39
2412 msgid ""
2413 "The GNU C library lets you modify the behavior of B<malloc>(3), B<realloc>"
2414 "(3), and B<free>(3)  by specifying appropriate hook functions.  You can use "
2415 "these hooks to help you debug programs that use dynamic memory allocation, "
2416 "for example."
2417 msgstr ""
2418 "GNU C ライブラリでは、適切なフック関数 (hook function) を指定することで "
2419 "B<malloc>(3), B<realloc>(3), B<free>(3)  の動作を変更することができる。例え"
2420 "ば、動的にメモリ割り当てを行う プログラムのデバッグにこれらのフックを使うこと"
2421 "ができる。"
2422
2423 #. type: Plain text
2424 #: build/C/man3/malloc_hook.3:46
2425 msgid ""
2426 "The variable B<__malloc_initialize_hook> points at a function that is called "
2427 "once when the malloc implementation is initialized.  This is a weak "
2428 "variable, so it can be overridden in the application with a definition like "
2429 "the following:"
2430 msgstr ""
2431 "変数 B<__malloc_initialize_hook> は malloc の実装が初期化される際に一度だけ呼"
2432 "ばれる関数へのポインタである。 この変数は書き換え可能 (weak) であり、アプリ"
2433 "ケーション内で 以下のような定義で上書きできる:"
2434
2435 #. type: Plain text
2436 #: build/C/man3/malloc_hook.3:49
2437 #, no-wrap
2438 msgid "    void (*__malloc_initialize_hook)(void) = my_init_hook;\n"
2439 msgstr "    void (*__malloc_initialize_hook)(void) = my_init_hook;\n"
2440
2441 #. type: Plain text
2442 #: build/C/man3/malloc_hook.3:54
2443 msgid ""
2444 "Now the function I<my_init_hook>()  can do the initialization of all hooks."
2445 msgstr ""
2446 "なお、関数 I<my_init_hook>()  で全てのフックの初期化をすることができる。"
2447
2448 #. type: Plain text
2449 #: build/C/man3/malloc_hook.3:70
2450 msgid ""
2451 "The four functions pointed to by B<__malloc_hook>, B<__realloc_hook>, "
2452 "B<__memalign_hook>, B<__free_hook> have a prototype like the functions "
2453 "B<malloc>(3), B<realloc>(3), B<memalign>(3), B<free>(3), respectively, "
2454 "except that they have a final argument I<caller> that gives the address of "
2455 "the caller of B<malloc>(3), etc."
2456 msgstr ""
2457 "B<__malloc_hook>, B<__realloc_hook>, B<__memalign_hook>, B<__free_hook> で指"
2458 "される 4 つの関数は、各々 B<malloc>(3), B<realloc>(3), B<memalign>(3), "
2459 "B<free>(3)  とよく似たプロトタイプを持っているが、 一番最後の引き数 "
2460 "I<caller> をとる点が異なる。 引き数 I<caller> には、 B<malloc>(3)  などの呼び"
2461 "出し元 (caller) のアドレスが格納される。"
2462
2463 #. type: Plain text
2464 #: build/C/man3/malloc_hook.3:76
2465 msgid ""
2466 "The variable B<__after_morecore_hook> points at a function that is called "
2467 "each time after B<sbrk>(2)  was asked for more memory."
2468 msgstr ""
2469 "変数 B<__after_morecore_hook> は、領域の追加要求があり B<sbrk>(2)  が呼ばれた"
2470 "後で毎回呼び出される関数へのポインタである。"
2471
2472 #.  https://bugzilla.redhat.com/show_bug.cgi?id=450187
2473 #.  http://sourceware.org/bugzilla/show_bug.cgi?id=9957
2474 #. type: Plain text
2475 #: build/C/man3/malloc_hook.3:85
2476 msgid ""
2477 "The use of these hook functions is not safe in multithreaded programs, and "
2478 "they are now deprecated.  Programmers should instead preempt calls to the "
2479 "relevant functions by defining and exporting functions such as \"malloc\" "
2480 "and \"free\"."
2481 msgstr ""
2482
2483 #. type: Plain text
2484 #: build/C/man3/malloc_hook.3:87
2485 msgid "Here is a short example of how to use these variables."
2486 msgstr "これらの変数の使い方の簡単な例を以下に示す。"
2487
2488 #. type: Plain text
2489 #: build/C/man3/malloc_hook.3:91
2490 #, no-wrap
2491 msgid ""
2492 "#include E<lt>stdio.hE<gt>\n"
2493 "#include E<lt>malloc.hE<gt>\n"
2494 msgstr ""
2495 "#include E<lt>stdio.hE<gt>\n"
2496 "#include E<lt>malloc.hE<gt>\n"
2497
2498 #. type: Plain text
2499 #: build/C/man3/malloc_hook.3:95
2500 #, no-wrap
2501 msgid ""
2502 "/* Prototypes for our hooks.  */\n"
2503 "static void my_init_hook(void);\n"
2504 "static void *my_malloc_hook(size_t, const void *);\n"
2505 msgstr ""
2506 "/* 使おうとするフックのプロトタイプ宣言 */\n"
2507 "static void my_init_hook(void);\n"
2508 "static void *my_malloc_hook(size_t, const void *);\n"
2509
2510 #. type: Plain text
2511 #: build/C/man3/malloc_hook.3:98
2512 #, no-wrap
2513 msgid ""
2514 "/* Variables to save original hooks. */\n"
2515 "static void *(*old_malloc_hook)(size_t, const void *);\n"
2516 msgstr ""
2517 "/* 元々のフックを保存するための変数 */\n"
2518 "static void *(*old_malloc_hook)(size_t, const void *);\n"
2519
2520 #. type: Plain text
2521 #: build/C/man3/malloc_hook.3:101
2522 #, no-wrap
2523 msgid ""
2524 "/* Override initializing hook from the C library. */\n"
2525 "void (*__malloc_initialize_hook) (void) = my_init_hook;\n"
2526 msgstr ""
2527 "/* C ライブラリから呼ばれる初期化フックを上書きする */\n"
2528 "void (*__malloc_initialize_hook) (void) = my_init_hook;\n"
2529
2530 #. type: Plain text
2531 #: build/C/man3/malloc_hook.3:108
2532 #, no-wrap
2533 msgid ""
2534 "static void\n"
2535 "my_init_hook(void)\n"
2536 "{\n"
2537 "    old_malloc_hook = __malloc_hook;\n"
2538 "    __malloc_hook = my_malloc_hook;\n"
2539 "}\n"
2540 msgstr ""
2541 "static void\n"
2542 "my_init_hook(void)\n"
2543 "{\n"
2544 "    old_malloc_hook = __malloc_hook;\n"
2545 "    __malloc_hook = my_malloc_hook;\n"
2546 "}\n"
2547
2548 #. type: Plain text
2549 #: build/C/man3/malloc_hook.3:113
2550 #, no-wrap
2551 msgid ""
2552 "static void *\n"
2553 "my_malloc_hook(size_t size, const void *caller)\n"
2554 "{\n"
2555 "    void *result;\n"
2556 msgstr ""
2557 "static void *\n"
2558 "my_malloc_hook(size_t size, const void *caller)\n"
2559 "{\n"
2560 "    void *result;\n"
2561
2562 #. type: Plain text
2563 #: build/C/man3/malloc_hook.3:116
2564 #, no-wrap
2565 msgid ""
2566 "    /* Restore all old hooks */\n"
2567 "    __malloc_hook = old_malloc_hook;\n"
2568 msgstr ""
2569 "    /* 元々のフックを全て戻す */\n"
2570 "    __malloc_hook = old_malloc_hook;\n"
2571
2572 #. type: Plain text
2573 #: build/C/man3/malloc_hook.3:119
2574 #, no-wrap
2575 msgid ""
2576 "    /* Call recursively */\n"
2577 "    result = malloc(size);\n"
2578 msgstr ""
2579 "    /* malloc の再帰的呼び出し */\n"
2580 "    result = malloc(size);\n"
2581
2582 #. type: Plain text
2583 #: build/C/man3/malloc_hook.3:122
2584 #, no-wrap
2585 msgid ""
2586 "    /* Save underlying hooks */\n"
2587 "    old_malloc_hook = __malloc_hook;\n"
2588 msgstr ""
2589 "    /* 現在設定されているフック (underlying hook) を保存する */\n"
2590 "    old_malloc_hook = __malloc_hook;\n"
2591
2592 #. type: Plain text
2593 #: build/C/man3/malloc_hook.3:126
2594 #, no-wrap
2595 msgid ""
2596 "    /* printf() might call malloc(), so protect it too. */\n"
2597 "    printf(\"malloc(%u) called from %p returns %p\\en\",\n"
2598 "            (unsigned int) size, caller, result);\n"
2599 msgstr ""
2600 "    /* printf() は malloc() を呼び出す可能性があるので\n"
2601 "        ここでもガードを行う (元々のフックのままにしておく) */\n"
2602 "    printf(\"malloc(%u) called from %p returns %p\\en\",\n"
2603 "            (unsigned int) size, caller, result);\n"
2604
2605 #. type: Plain text
2606 #: build/C/man3/malloc_hook.3:129
2607 #, no-wrap
2608 msgid ""
2609 "    /* Restore our own hooks */\n"
2610 "    __malloc_hook = my_malloc_hook;\n"
2611 msgstr ""
2612 "    /* ユーザが使おうとするフックを再設定する */\n"
2613 "    __malloc_hook = my_malloc_hook;\n"
2614
2615 #. type: Plain text
2616 #: build/C/man3/malloc_hook.3:132
2617 #, no-wrap
2618 msgid ""
2619 "    return result;\n"
2620 "}\n"
2621 msgstr ""
2622 "    return result;\n"
2623 "}\n"
2624
2625 #. type: Plain text
2626 #: build/C/man3/malloc_hook.3:138
2627 msgid "B<mallinfo>(3), B<malloc>(3), B<mcheck>(3), B<mtrace>(3)"
2628 msgstr "B<mallinfo>(3), B<malloc>(3), B<mcheck>(3), B<mtrace>(3)"
2629
2630 #. type: TH
2631 #: build/C/man3/malloc_info.3:23
2632 #, no-wrap
2633 msgid "MALLOC_INFO"
2634 msgstr "MALLOC_INFO"
2635
2636 #. type: Plain text
2637 #: build/C/man3/malloc_info.3:26
2638 msgid "malloc_info - export malloc state to a stream"
2639 msgstr ""
2640
2641 #. type: Plain text
2642 #: build/C/man3/malloc_info.3:31
2643 #, no-wrap
2644 msgid "B<int malloc_info(int >I<options>B<, FILE *>I<fp>B<);>\n"
2645 msgstr "B<int malloc_info(int >I<options>B<, FILE *>I<fp>B<);>\n"
2646
2647 #. type: Plain text
2648 #: build/C/man3/malloc_info.3:42
2649 msgid ""
2650 "The B<malloc_info>()  function exports an XML string that describes the "
2651 "current state of the memory-allocation implementation in the caller.  The "
2652 "string is printed on the file stream I<fp>.  The exported string includes "
2653 "information about all arenas (see B<malloc>(3))."
2654 msgstr ""
2655
2656 #. type: Plain text
2657 #: build/C/man3/malloc_info.3:46
2658 msgid "As currently implemented, I<options> must be zero."
2659 msgstr ""
2660
2661 #. type: Plain text
2662 #: build/C/man3/malloc_info.3:51
2663 msgid "On success, B<malloc_info>()  returns 0; on error, it returns -1."
2664 msgstr "B<malloc_info>() は成功すると 0 を返す。エラーの場合は -1 を返す。"
2665
2666 #. type: Plain text
2667 #: build/C/man3/malloc_info.3:56
2668 msgid "I<options> was nonzero."
2669 msgstr ""
2670
2671 #. type: Plain text
2672 #: build/C/man3/malloc_info.3:59
2673 msgid "B<malloc_info>(3)  was added to glibc in version 2.10."
2674 msgstr "B<malloc_info>(3) は glibc バージョン 2.10 で追加された。"
2675
2676 #. type: Plain text
2677 #: build/C/man3/malloc_info.3:61 build/C/man3/malloc_stats.3:55
2678 #: build/C/man3/malloc_trim.3:60 build/C/man3/malloc_usable_size.3:48
2679 msgid "This function is a GNU extension."
2680 msgstr "この関数は GNU による拡張である。"
2681
2682 #. type: Plain text
2683 #: build/C/man3/malloc_info.3:67
2684 msgid ""
2685 "The memory-allocation information is provided as an XML string (rather than "
2686 "a C structure)  because the information may change over time (according to "
2687 "changes in the underlying implementation).  The output XML string includes a "
2688 "version field."
2689 msgstr ""
2690
2691 #. type: Plain text
2692 #: build/C/man3/malloc_info.3:73
2693 msgid ""
2694 "The B<open_memstream>(3)  function can be used to send the output of "
2695 "B<malloc_info>()  directly into a buffer in memory, rather than to a file."
2696 msgstr ""
2697
2698 #. type: Plain text
2699 #: build/C/man3/malloc_info.3:80
2700 msgid ""
2701 "The B<malloc_info>()  function is designed to address deficiencies in "
2702 "B<malloc_stats>(3)  and B<mallinfo>(3)."
2703 msgstr ""
2704
2705 #. type: Plain text
2706 #: build/C/man3/malloc_info.3:91
2707 msgid ""
2708 "The program below takes up to four command-line arguments, of which the "
2709 "first three are mandatory.  The first argument specifies the number of "
2710 "threads that the program should create.  All of the threads, including the "
2711 "main thread, allocate the number of blocks of memory specified by the second "
2712 "argument.  The third argument controls the size of the blocks to be "
2713 "allocated.  The main thread creates blocks of this size, the second thread "
2714 "created by the program allocates blocks of twice this size, the third thread "
2715 "allocates blocks of three times this size, and so on."
2716 msgstr ""
2717
2718 #. type: Plain text
2719 #: build/C/man3/malloc_info.3:98
2720 msgid ""
2721 "The program calls B<malloc_info>()  twice to display the memory-allocation "
2722 "state.  The first call takes place before any threads are created or memory "
2723 "allocated.  The second call is performed after all threads have allocated "
2724 "memory."
2725 msgstr ""
2726
2727 #. type: Plain text
2728 #: build/C/man3/malloc_info.3:106
2729 msgid ""
2730 "In the following example, the command-line arguments specify the creation of "
2731 "one additional thread, and both the main thread and the additional thread "
2732 "allocate 10000 blocks of memory.  After the blocks of memory have been "
2733 "allocated, B<malloc_info>()  shows the state of two allocation arenas."
2734 msgstr ""
2735
2736 #. type: Plain text
2737 #: build/C/man3/malloc_info.3:131
2738 #, no-wrap
2739 msgid ""
2740 "$ B<getconf GNU_LIBC_VERSION>\n"
2741 "glibc 2.13\n"
2742 "$ B<./a.out 1 10000 100>\n"
2743 "============ Before allocating blocks ============\n"
2744 "E<lt>malloc version=\"1\"E<gt>\n"
2745 "E<lt>heap nr=\"0\"E<gt>\n"
2746 "E<lt>sizesE<gt>\n"
2747 "E<lt>/sizesE<gt>\n"
2748 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
2749 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
2750 "E<lt>system type=\"current\" size=\"135168\"/E<gt>\n"
2751 "E<lt>system type=\"max\" size=\"135168\"/E<gt>\n"
2752 "E<lt>aspace type=\"total\" size=\"135168\"/E<gt>\n"
2753 "E<lt>aspace type=\"mprotect\" size=\"135168\"/E<gt>\n"
2754 "E<lt>/heapE<gt>\n"
2755 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
2756 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
2757 "E<lt>system type=\"current\" size=\"135168\"/E<gt>\n"
2758 "E<lt>system type=\"max\" size=\"135168\"/E<gt>\n"
2759 "E<lt>aspace type=\"total\" size=\"135168\"/E<gt>\n"
2760 "E<lt>aspace type=\"mprotect\" size=\"135168\"/E<gt>\n"
2761 "E<lt>/mallocE<gt>\n"
2762 msgstr ""
2763
2764 #. type: Plain text
2765 #: build/C/man3/malloc_info.3:161
2766 #, no-wrap
2767 msgid ""
2768 "============ After allocating blocks ============\n"
2769 "E<lt>malloc version=\"1\"E<gt>\n"
2770 "E<lt>heap nr=\"0\"E<gt>\n"
2771 "E<lt>sizesE<gt>\n"
2772 "E<lt>/sizesE<gt>\n"
2773 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
2774 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
2775 "E<lt>system type=\"current\" size=\"1081344\"/E<gt>\n"
2776 "E<lt>system type=\"max\" size=\"1081344\"/E<gt>\n"
2777 "E<lt>aspace type=\"total\" size=\"1081344\"/E<gt>\n"
2778 "E<lt>aspace type=\"mprotect\" size=\"1081344\"/E<gt>\n"
2779 "E<lt>/heapE<gt>\n"
2780 "E<lt>heap nr=\"1\"E<gt>\n"
2781 "E<lt>sizesE<gt>\n"
2782 "E<lt>/sizesE<gt>\n"
2783 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
2784 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
2785 "E<lt>system type=\"current\" size=\"1032192\"/E<gt>\n"
2786 "E<lt>system type=\"max\" size=\"1032192\"/E<gt>\n"
2787 "E<lt>aspace type=\"total\" size=\"1032192\"/E<gt>\n"
2788 "E<lt>aspace type=\"mprotect\" size=\"1032192\"/E<gt>\n"
2789 "E<lt>/heapE<gt>\n"
2790 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
2791 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
2792 "E<lt>system type=\"current\" size=\"2113536\"/E<gt>\n"
2793 "E<lt>system type=\"max\" size=\"2113536\"/E<gt>\n"
2794 "E<lt>aspace type=\"total\" size=\"2113536\"/E<gt>\n"
2795 "E<lt>aspace type=\"mprotect\" size=\"2113536\"/E<gt>\n"
2796 "E<lt>/mallocE<gt>\n"
2797 msgstr ""
2798
2799 #. type: Plain text
2800 #: build/C/man3/malloc_info.3:171
2801 #, no-wrap
2802 msgid ""
2803 "#include E<lt>unistd.hE<gt>\n"
2804 "#include E<lt>stdlib.hE<gt>\n"
2805 "#include E<lt>pthread.hE<gt>\n"
2806 "#include E<lt>malloc.hE<gt>\n"
2807 "#include E<lt>errno.hE<gt>\n"
2808 msgstr ""
2809 "#include E<lt>unistd.hE<gt>\n"
2810 "#include E<lt>stdlib.hE<gt>\n"
2811 "#include E<lt>pthread.hE<gt>\n"
2812 "#include E<lt>malloc.hE<gt>\n"
2813 "#include E<lt>errno.hE<gt>\n"
2814
2815 #. type: Plain text
2816 #: build/C/man3/malloc_info.3:174
2817 #, no-wrap
2818 msgid ""
2819 "static size_t blockSize;\n"
2820 "static int numThreads, numBlocks;\n"
2821 msgstr ""
2822
2823 #. type: Plain text
2824 #: build/C/man3/malloc_info.3:177
2825 #, no-wrap
2826 msgid ""
2827 "#define errExit(msg)    do { perror(msg); exit(EXIT_FAILURE); \\e\n"
2828 "                        } while (0)\n"
2829 msgstr ""
2830 "#define errExit(msg)    do { perror(msg); exit(EXIT_FAILURE); \\e\n"
2831 "                        } while (0)\n"
2832
2833 #. type: Plain text
2834 #: build/C/man3/malloc_info.3:183
2835 #, no-wrap
2836 msgid ""
2837 "static void *\n"
2838 "thread_func(void *arg)\n"
2839 "{\n"
2840 "    int j;\n"
2841 "    int tn = (int) arg;\n"
2842 msgstr ""
2843
2844 #. type: Plain text
2845 #: build/C/man3/malloc_info.3:186
2846 #, no-wrap
2847 msgid ""
2848 "    /* The multiplier \\(aq(2 + tn)\\(aq ensures that each thread (including\n"
2849 "       the main thread) allocates a different amount of memory */\n"
2850 msgstr ""
2851
2852 #. type: Plain text
2853 #: build/C/man3/malloc_info.3:190
2854 #, no-wrap
2855 msgid ""
2856 "    for (j = 0; j E<lt> numBlocks; j++)\n"
2857 "        if (malloc(blockSize * (2 + tn)) == NULL)\n"
2858 "            errExit(\"malloc-thread\");\n"
2859 msgstr ""
2860 "    for (j = 0; j E<lt> numBlocks; j++)\n"
2861 "        if (malloc(blockSize * (2 + tn)) == NULL)\n"
2862 "            errExit(\"malloc-thread\");\n"
2863
2864 #. type: Plain text
2865 #: build/C/man3/malloc_info.3:194
2866 #, no-wrap
2867 msgid ""
2868 "    sleep(100);         /* Sleep until main thread terminates */\n"
2869 "    return NULL;\n"
2870 "}\n"
2871 msgstr ""
2872
2873 #. type: Plain text
2874 #: build/C/man3/malloc_info.3:200
2875 #, no-wrap
2876 msgid ""
2877 "int\n"
2878 "main(int argc, char *argv[])\n"
2879 "{\n"
2880 "    int j, tn, sleepTime;\n"
2881 "    pthread_t *thr;\n"
2882 msgstr ""
2883 "int\n"
2884 "main(int argc, char *argv[])\n"
2885 "{\n"
2886 "    int j, tn, sleepTime;\n"
2887 "    pthread_t *thr;\n"
2888
2889 #. type: Plain text
2890 #: build/C/man3/malloc_info.3:207
2891 #, no-wrap
2892 msgid ""
2893 "    if (argc E<lt> 4) {\n"
2894 "        fprintf(stderr,\n"
2895 "                \"%s num-threads num-blocks block-size [sleep-time]\\en\",\n"
2896 "                argv[0]);\n"
2897 "        exit(EXIT_FAILURE);\n"
2898 "    }\n"
2899 msgstr ""
2900 "    if (argc E<lt> 4) {\n"
2901 "        fprintf(stderr,\n"
2902 "                \"%s num-threads num-blocks block-size [sleep-time]\\en\",\n"
2903 "                argv[0]);\n"
2904 "        exit(EXIT_FAILURE);\n"
2905 "    }\n"
2906
2907 #. type: Plain text
2908 #: build/C/man3/malloc_info.3:212
2909 #, no-wrap
2910 msgid ""
2911 "    numThreads = atoi(argv[1]);\n"
2912 "    numBlocks = atoi(argv[2]);\n"
2913 "    blockSize = atoi(argv[3]);\n"
2914 "    sleepTime = (argc E<gt> 4) ? atoi(argv[4]) : 0;\n"
2915 msgstr ""
2916
2917 #. type: Plain text
2918 #: build/C/man3/malloc_info.3:216
2919 #, no-wrap
2920 msgid ""
2921 "    thr = calloc(numThreads, sizeof(pthread_t));\n"
2922 "    if (thr == NULL)\n"
2923 "        errExit(\"calloc\");\n"
2924 msgstr ""
2925
2926 #. type: Plain text
2927 #: build/C/man3/malloc_info.3:219
2928 #, no-wrap
2929 msgid ""
2930 "    printf(\"============ Before allocating blocks ============\\en\");\n"
2931 "    malloc_info(0, stdout);\n"
2932 msgstr ""
2933
2934 #. type: Plain text
2935 #: build/C/man3/malloc_info.3:221
2936 #, no-wrap
2937 msgid "    /* Create threads that allocate different amounts of memory */\n"
2938 msgstr ""
2939
2940 #. type: Plain text
2941 #: build/C/man3/malloc_info.3:227
2942 #, no-wrap
2943 msgid ""
2944 "    for (tn = 0; tn E<lt> numThreads; tn++) {\n"
2945 "        errno = pthread_create(&thr[tn], NULL, thread_func,\n"
2946 "                               (void *) tn);\n"
2947 "        if (errno != 0)\n"
2948 "            errExit(\"pthread_create\");\n"
2949 msgstr ""
2950
2951 #. type: Plain text
2952 #: build/C/man3/malloc_info.3:232
2953 #, no-wrap
2954 msgid ""
2955 "        /* If we add a sleep interval after the start-up of each\n"
2956 "           thread, the threads likely won\\(aqt contend for malloc\n"
2957 "           mutexes, and therefore additional arenas won\\(aqt be\n"
2958 "           allocated (see malloc(3)). */\n"
2959 msgstr ""
2960
2961 #. type: Plain text
2962 #: build/C/man3/malloc_info.3:236
2963 #, no-wrap
2964 msgid ""
2965 "        if (sleepTime E<gt> 0)\n"
2966 "            sleep(sleepTime);\n"
2967 "    }\n"
2968 msgstr ""
2969
2970 #. type: Plain text
2971 #: build/C/man3/malloc_info.3:238
2972 #, no-wrap
2973 msgid "    /* The main thread also allocates some memory */\n"
2974 msgstr ""
2975
2976 #. type: Plain text
2977 #: build/C/man3/malloc_info.3:242
2978 #, no-wrap
2979 msgid ""
2980 "    for (j = 0; j E<lt> numBlocks; j++)\n"
2981 "        if (malloc(blockSize) == NULL)\n"
2982 "            errExit(\"malloc\");\n"
2983 msgstr ""
2984 "    for (j = 0; j E<lt> numBlocks; j++)\n"
2985 "        if (malloc(blockSize) == NULL)\n"
2986 "            errExit(\"malloc\");\n"
2987
2988 #. type: Plain text
2989 #: build/C/man3/malloc_info.3:245
2990 #, no-wrap
2991 msgid ""
2992 "    sleep(2);           /* Give all threads a chance to\n"
2993 "                           complete allocations */\n"
2994 msgstr ""
2995
2996 #. type: Plain text
2997 #: build/C/man3/malloc_info.3:248
2998 #, no-wrap
2999 msgid ""
3000 "    printf(\"\\en============ After allocating blocks ============\\en\");\n"
3001 "    malloc_info(0, stdout);\n"
3002 msgstr ""
3003
3004 #. type: Plain text
3005 #: build/C/man3/malloc_info.3:258
3006 msgid ""
3007 "B<mallinfo>(3), B<malloc>(3), B<malloc_stats>(3), B<mallopt>(3), "
3008 "B<open_memstream>(3)"
3009 msgstr "B<mallinfo>(3), B<malloc>(3), B<malloc_stats>(3), B<mallopt>(3), B<open_memstream>(3)"
3010
3011 #. type: TH
3012 #: build/C/man3/malloc_stats.3:24
3013 #, no-wrap
3014 msgid "MALLOC_STATS"
3015 msgstr "MALLOC_STATS"
3016
3017 #. type: Plain text
3018 #: build/C/man3/malloc_stats.3:27
3019 msgid "malloc_stats - print memory allocation statistics"
3020 msgstr "malloc_stats - メモリ割り当ての統計を表示する"
3021
3022 #. type: Plain text
3023 #: build/C/man3/malloc_stats.3:31
3024 msgid "B<void malloc_stats(void);>"
3025 msgstr "B<void malloc_stats(void);>"
3026
3027 #.  .SH VERSIONS
3028 #.  Available already in glibc 2.0, possibly earlier
3029 #. type: Plain text
3030 #: build/C/man3/malloc_stats.3:53
3031 msgid ""
3032 "The B<malloc_stats>()  function prints (on standard error) statistics about "
3033 "memory allocated by B<malloc>(3)  and related functions.  For each arena "
3034 "(allocation area), this function prints the total amount of memory allocated "
3035 "and the total number of bytes consumed by in-use allocations.  (These two "
3036 "values correspond to the I<arena> and I<uordblks> fields retrieved by "
3037 "B<mallinfo>(3).)  In addition, the function prints the sum of these two "
3038 "statistics for all arenas, and the maximum number of blocks and bytes that "
3039 "were ever simultaneously allocated using B<mmap>(2)."
3040 msgstr ""
3041
3042 #. type: Plain text
3043 #: build/C/man3/malloc_stats.3:59
3044 msgid ""
3045 "More detailed information about memory allocations in the main arena can be "
3046 "obtained using B<mallinfo>(3)."
3047 msgstr ""
3048
3049 #. type: Plain text
3050 #: build/C/man3/malloc_stats.3:65
3051 msgid ""
3052 "B<mmap>(2), B<mallinfo>(3), B<malloc>(3), B<malloc_info>(3), B<mallopt>(3)"
3053 msgstr "B<mmap>(2), B<mallinfo>(3), B<malloc>(3), B<malloc_info>(3), B<mallopt>(3)"
3054
3055 #. type: TH
3056 #: build/C/man3/malloc_trim.3:24
3057 #, no-wrap
3058 msgid "MALLOC_TRIM"
3059 msgstr "MALLOC_TRIM"
3060
3061 #. type: TH
3062 #: build/C/man3/malloc_trim.3:24 build/C/man3/malloc_usable_size.3:23
3063 #, no-wrap
3064 msgid "2012-03-29"
3065 msgstr "2012-03-29"
3066
3067 #. type: Plain text
3068 #: build/C/man3/malloc_trim.3:27
3069 msgid "malloc_trim - release free memory from the top of the heap"
3070 msgstr ""
3071
3072 #. type: Plain text
3073 #: build/C/man3/malloc_trim.3:31
3074 msgid "B<void malloc_trim(size_t >I<pad>B<);>"
3075 msgstr "B<void malloc_trim(size_t >I<pad>B<);>"
3076
3077 #. type: Plain text
3078 #: build/C/man3/malloc_trim.3:38
3079 msgid ""
3080 "The B<malloc_trim>()  function attempts to release free memory at the top of "
3081 "the heap (by calling B<sbrk>(2)  with a suitable argument)."
3082 msgstr ""
3083
3084 #. type: Plain text
3085 #: build/C/man3/malloc_trim.3:49
3086 msgid ""
3087 "The I<pad> argument specifies the amount of free space to leave untrimmed at "
3088 "the top of the heap.  If this argument is 0, only the minimum amount of "
3089 "memory is maintained at the top of the heap (i.e., one page or less).  A "
3090 "nonzero argument can be used to maintain some trailing space at the top of "
3091 "the heap in order to allow future allocations to be made without having to "
3092 "extend the heap with B<sbrk>(2)."
3093 msgstr ""
3094
3095 #. type: Plain text
3096 #: build/C/man3/malloc_trim.3:54
3097 msgid ""
3098 "The B<malloc_trim>()  function returns 1 if memory was actually released "
3099 "back to the system, or 0 if it was not possible to release any memory."
3100 msgstr ""
3101
3102 #.  .SH VERSIONS
3103 #.  Available already in glibc 2.0, possibly earlier
3104 #. type: Plain text
3105 #: build/C/man3/malloc_trim.3:58
3106 msgid "No errors are defined."
3107 msgstr ""
3108
3109 #. type: Plain text
3110 #: build/C/man3/malloc_trim.3:69
3111 msgid ""
3112 "This function is automatically called by B<free>(3)  in certain "
3113 "circumstances; see the discussion of B<M_TOP_PAD> and B<M_TRIM_THRESHOLD> in "
3114 "B<mallopt>(3)."
3115 msgstr ""
3116
3117 #. type: Plain text
3118 #: build/C/man3/malloc_trim.3:72
3119 msgid ""
3120 "This function cannot release free memory located at places other than the "
3121 "top of the heap."
3122 msgstr ""
3123
3124 #.  malloc/malloc.c::mTRIm():
3125 #.      return result | (av == &main_arena ? sYSTRIm (pad, av) : 0);
3126 #. type: Plain text
3127 #: build/C/man3/malloc_trim.3:76
3128 msgid "This function only releases memory in the main arena."
3129 msgstr ""
3130
3131 #. type: Plain text
3132 #: build/C/man3/malloc_trim.3:80
3133 msgid "B<sbrk>(2), B<malloc>(3), B<mallopt>(3)"
3134 msgstr "B<sbrk>(2), B<malloc>(3), B<mallopt>(3)"
3135
3136 #. type: TH
3137 #: build/C/man3/malloc_usable_size.3:23
3138 #, no-wrap
3139 msgid "MALLOC_USABLE_SIZE"
3140 msgstr "MALLOC_USABLE_SIZE"
3141
3142 #. type: Plain text
3143 #: build/C/man3/malloc_usable_size.3:26
3144 msgid "malloc_usable_size - obtain size of block of memory allocated from heap"
3145 msgstr ""
3146
3147 #. type: Plain text
3148 #: build/C/man3/malloc_usable_size.3:30
3149 msgid "B<size_t malloc_usable_size (void *>I<ptr>B<);>"
3150 msgstr "B<size_t malloc_usable_size (void *>I<ptr>B<);>"
3151
3152 #. type: Plain text
3153 #: build/C/man3/malloc_usable_size.3:38
3154 msgid ""
3155 "The B<malloc_usable_size>()  function returns the number of usable bytes in "
3156 "the block pointed to by I<ptr>, a pointer to a block of memory allocated by "
3157 "B<malloc>(3)  or a related function."
3158 msgstr ""
3159
3160 #. type: Plain text
3161 #: build/C/man3/malloc_usable_size.3:46
3162 msgid ""
3163 "B<malloc_usable_size>()  returns the number of usable bytes in the block of "
3164 "allocated memory pointed to by I<ptr>.  If I<ptr> is NULL, 0 is returned."
3165 msgstr ""
3166
3167 #. type: Plain text
3168 #: build/C/man3/malloc_usable_size.3:58
3169 msgid ""
3170 "The value returned by B<malloc_usable_size>()  may be greater than the "
3171 "requested size of the allocation because of alignment and minimum size "
3172 "constraints.  Although the excess bytes can be overwritten by the "
3173 "application without ill effects, this is not good programming practice: the "
3174 "number of excess bytes in an allocation depends on the underlying "
3175 "implementation."
3176 msgstr ""
3177
3178 #. type: Plain text
3179 #: build/C/man3/malloc_usable_size.3:60
3180 msgid "The main use of this function is for debugging and introspection."
3181 msgstr ""
3182
3183 #. type: Plain text
3184 #: build/C/man3/malloc_usable_size.3:62
3185 msgid "B<malloc>(3)"
3186 msgstr "B<malloc>(3)"
3187
3188 #. type: TH
3189 #: build/C/man3/mallopt.3:24
3190 #, no-wrap
3191 msgid "MALLOPT"
3192 msgstr "MALLOPT"
3193
3194 #. type: TH
3195 #: build/C/man3/mallopt.3:24
3196 #, no-wrap
3197 msgid "2012-04-30"
3198 msgstr "2012-04-30"
3199
3200 #. type: Plain text
3201 #: build/C/man3/mallopt.3:27
3202 msgid "mallopt - set memory allocation parameters"
3203 msgstr "mallopt - メモリ割り当てパラメータを設定する"
3204
3205 #. type: Plain text
3206 #: build/C/man3/mallopt.3:31
3207 msgid "B<int mallopt(int >I<param>B<, int >I<value>B<);>"
3208 msgstr "B<int mallopt(int >I<param>B<, int >I<value>B<);>"
3209
3210 #. type: Plain text
3211 #: build/C/man3/mallopt.3:42
3212 msgid ""
3213 "The B<mallopt>()  function adjusts parameters that control the behavior of "
3214 "the memory-allocation functions (see B<malloc>(3)).  The I<param> argument "
3215 "specifies the parameter to be modified, and I<value> specifies the new value "
3216 "for that parameter."
3217 msgstr ""
3218 "B<mallopt>() 関数は、メモリ割り当て関数 (B<malloc>(3) を参照) の動作を\n"
3219 "制御するパラメータの調整を行う。\n"
3220 "I<param> 引き数で変更するパラメータを指定し、\n"
3221 "I<value> 引き数でそのパラメータの新しい値を指定する。"
3222
3223 #. type: Plain text
3224 #: build/C/man3/mallopt.3:45
3225 msgid "The following values can be specified for I<param>:"
3226 msgstr "I<param> には以下の値を指定することができる。"
3227
3228 #. type: TP
3229 #: build/C/man3/mallopt.3:45
3230 #, no-wrap
3231 msgid "B<M_CHECK_ACTION>"
3232 msgstr "B<M_CHECK_ACTION>"
3233
3234 #. type: Plain text
3235 #: build/C/man3/mallopt.3:51
3236 msgid ""
3237 "Setting this parameter controls how glibc responds when various kinds of "
3238 "programming errors are detected (e.g., freeing the same pointer twice).  The "
3239 "3 least significant bits (2, 1, and 0) of the value assigned to this "
3240 "parameter determine the glibc behavior, as follows:"
3241 msgstr ""
3242
3243 #. type: TP
3244 #: build/C/man3/mallopt.3:52
3245 #, no-wrap
3246 msgid "Bit 0"
3247 msgstr "Bit 0"
3248
3249 #. type: Plain text
3250 #: build/C/man3/mallopt.3:62
3251 msgid ""
3252 "If this bit is set, then print a one-line message on I<stderr> that provides "
3253 "details about the error.  The message starts with the string \"***\\ glibc "
3254 "detected\\ ***\", followed by the program name, the name of the memory-"
3255 "allocation function in which the error was detected, a brief description of "
3256 "the error, and the memory address where the error was detected."
3257 msgstr ""
3258
3259 #. type: TP
3260 #: build/C/man3/mallopt.3:62
3261 #, no-wrap
3262 msgid "Bit 1"
3263 msgstr "Bit 1"
3264
3265 #. type: Plain text
3266 #: build/C/man3/mallopt.3:77
3267 msgid ""
3268 "If this bit is set, then, after printing any error message specified by bit "
3269 "0, the program is terminated by calling B<abort>(3).  In glibc versions "
3270 "since 2.4, if bit 0 is also set, then, between printing the error message "
3271 "and aborting, the program also prints a stack trace in the manner of "
3272 "B<backtrace>(3), and prints the process's memory mapping in the style of I</"
3273 "proc/[pid]/maps> (see B<proc>(5))."
3274 msgstr ""
3275
3276 #. type: TP
3277 #: build/C/man3/mallopt.3:77
3278 #, no-wrap
3279 msgid "Bit 2 (since glibc 2.4)"
3280 msgstr "Bit 2 (glibc 2.4 以降)"
3281
3282 #. type: Plain text
3283 #: build/C/man3/mallopt.3:84
3284 msgid ""
3285 "This bit has an effect only if bit 0 is also set.  If this bit is set, then "
3286 "the one-line message describing the error is simplified to contain just the "
3287 "name of the function where the error was detected and the brief description "
3288 "of the error."
3289 msgstr ""
3290
3291 #. type: Plain text
3292 #: build/C/man3/mallopt.3:89
3293 msgid "The remaining bits in I<value> are ignored."
3294 msgstr ""
3295
3296 #. type: Plain text
3297 #: build/C/man3/mallopt.3:93
3298 msgid ""
3299 "Combining the above details, the following numeric values are meaningful for "
3300 "B<M_CHECK_ACTION>:"
3301 msgstr ""
3302
3303 #. type: IP
3304 #: build/C/man3/mallopt.3:94
3305 #, no-wrap
3306 msgid "0"
3307 msgstr "0"
3308
3309 #. type: Plain text
3310 #: build/C/man3/mallopt.3:96
3311 msgid "Ignore error conditions; continue execution (with undefined results)."
3312 msgstr ""
3313
3314 #. type: IP
3315 #: build/C/man3/mallopt.3:96
3316 #, no-wrap
3317 msgid "1"
3318 msgstr "1"
3319
3320 #. type: Plain text
3321 #: build/C/man3/mallopt.3:98
3322 msgid "Print a detailed error message and continue execution."
3323 msgstr ""
3324
3325 #. type: IP
3326 #: build/C/man3/mallopt.3:98
3327 #, no-wrap
3328 msgid "2"
3329 msgstr "2"
3330
3331 #. type: Plain text
3332 #: build/C/man3/mallopt.3:100
3333 msgid "Abort the program."
3334 msgstr ""
3335
3336 #. type: IP
3337 #: build/C/man3/mallopt.3:100
3338 #, no-wrap
3339 msgid "3"
3340 msgstr "3"
3341
3342 #. type: Plain text
3343 #: build/C/man3/mallopt.3:103
3344 msgid ""
3345 "Print detailed error message, stack trace, and memory mappings, and abort "
3346 "the program."
3347 msgstr ""
3348
3349 #. type: IP
3350 #: build/C/man3/mallopt.3:103
3351 #, no-wrap
3352 msgid "5"
3353 msgstr "5"
3354
3355 #. type: Plain text
3356 #: build/C/man3/mallopt.3:105
3357 msgid "Print a simple error message and continue execution."
3358 msgstr ""
3359
3360 #. type: IP
3361 #: build/C/man3/mallopt.3:105
3362 #, no-wrap
3363 msgid "7"
3364 msgstr "7"
3365
3366 #. type: Plain text
3367 #: build/C/man3/mallopt.3:108
3368 msgid ""
3369 "Print simple error message, stack trace, and memory mappings, and abort the "
3370 "program."
3371 msgstr ""
3372
3373 #. type: Plain text
3374 #: build/C/man3/mallopt.3:114
3375 msgid ""
3376 "Since glibc 2.3.4, the default value for the B<M_CHECK_ACTION> parameter is "
3377 "3.  In glibc version 2.3.3 and earlier, the default value is 1."
3378 msgstr ""
3379
3380 #. type: Plain text
3381 #: build/C/man3/mallopt.3:119
3382 msgid ""
3383 "Using a nonzero B<M_CHECK_ACTION> value can be useful because otherwise a "
3384 "crash may happen much later, and the true cause of the problem is then very "
3385 "hard to track down."
3386 msgstr ""
3387
3388 #. type: TP
3389 #: build/C/man3/mallopt.3:119
3390 #, no-wrap
3391 msgid "B<M_MMAP_MAX>"
3392 msgstr "B<M_MMAP_MAX>"
3393
3394 #.  The following text adapted from comments in the glibc source:
3395 #. type: Plain text
3396 #: build/C/man3/mallopt.3:129
3397 msgid ""
3398 "This parameter specifies the maximum number of allocation requests that may "
3399 "be simultaneously serviced using B<mmap>(2).  This parameter exists because "
3400 "some systems have a limited number of internal tables for use by B<mmap>(2), "
3401 "and using more than a few of them may degrade performance."
3402 msgstr ""
3403
3404 #. type: Plain text
3405 #: build/C/man3/mallopt.3:136
3406 msgid ""
3407 "The default value is 65,536, a value which has no special significance and "
3408 "which servers only as a safeguard.  Setting this parameter to 0 disables the "
3409 "use of B<mmap>(2)  for servicing large allocation requests."
3410 msgstr ""
3411
3412 #. type: TP
3413 #: build/C/man3/mallopt.3:136
3414 #, no-wrap
3415 msgid "B<M_MMAP_THRESHOLD>"
3416 msgstr "B<M_MMAP_THRESHOLD>"
3417
3418 #. type: Plain text
3419 #: build/C/man3/mallopt.3:145
3420 msgid ""
3421 "For allocations greater than or equal to the limit specified (in bytes) by "
3422 "B<M_MMAP_THRESHOLD> that can't be satisfied from the free list, the memory-"
3423 "allocation functions employ B<mmap>(2)  instead of increasing the program "
3424 "break using B<sbrk>(2)."
3425 msgstr ""
3426
3427 #. type: Plain text
3428 #: build/C/man3/mallopt.3:165
3429 msgid ""
3430 "Allocating memory using B<mmap>(2)  has the significant advantage that the "
3431 "allocated memory blocks can always be independently released back to the "
3432 "system.  (By contrast, the heap can be trimmed only if memory is freed at "
3433 "the top end.)  On the other hand, there are some disadvantages to the use of "
3434 "B<mmap>(2): deallocated space is not placed on the free list for reuse by "
3435 "later allocations; memory may be wasted because B<mmap>(2)  allocations must "
3436 "be page-aligned; and the kernel must perform the expensive task of zeroing "
3437 "out memory allocated via B<mmap>(2).  Balancing these factors leads to a "
3438 "default setting of 128*1024 for the B<M_MMAP_THRESHOLD> parameter."
3439 msgstr ""
3440
3441 #. type: Plain text
3442 #: build/C/man3/mallopt.3:172
3443 msgid ""
3444 "The lower limit for this parameter is 0.  The upper limit is "
3445 "B<DEFAULT_MMAP_THRESHOLD_MAX>: 512*1024 on 32-bit systems or "
3446 "I<4*1024*1024*sizeof(long)> on 64-bit systems."
3447 msgstr ""
3448
3449 #. type: Plain text
3450 #: build/C/man3/mallopt.3:190
3451 msgid ""
3452 "I<Note:> Nowadays, glibc uses a dynamic mmap threshold by default.  The "
3453 "initial value of the threshold is 128*1024, but when blocks larger than the "
3454 "current threshold and less than or equal to B<DEFAULT_MMAP_THRESHOLD_MAX> "
3455 "are freed, the threshold is adjusted upwards to the size of the freed "
3456 "block.  When dynamic mmap thresholding is in effect, the threshold for "
3457 "trimming the heap is also dynamically adjusted to be twice the dynamic mmap "
3458 "threshold.  Dynamic adjustment of the mmap threshold is disabled if any of "
3459 "the B<M_TRIM_THRESHOLD>, B<M_TOP_PAD>, B<M_MMAP_THRESHOLD>, or B<M_MMAP_MAX> "
3460 "parameters is set."
3461 msgstr ""
3462
3463 #. type: TP
3464 #: build/C/man3/mallopt.3:190
3465 #, no-wrap
3466 msgid "B<M_MXFAST> (since glibc 2.3)"
3467 msgstr "B<M_MXFAST> (glibc 2.3 以降)"
3468
3469 #.  The following text adapted from comments in the glibc sources:
3470 #. type: Plain text
3471 #: build/C/man3/mallopt.3:210
3472 msgid ""
3473 "Set the upper limit for memory allocation requests that are satisfied using "
3474 "\"fastbins\".  (The measurement unit for this parameter is bytes.)  Fastbins "
3475 "are storage areas that hold deallocated blocks of memory of the same size "
3476 "without merging adjacent free blocks.  Subsequent reallocation of blocks of "
3477 "the same size can be handled very quickly by allocating from the fastbin, "
3478 "although memory fragmentation and the overall memory footprint of the "
3479 "program can increase.  The default value for this parameter is I<64*sizeof"
3480 "(size_t)/4> (i.e., 64 on 32-bit architectures).  The range for this "
3481 "parameter is 0 to I<80*sizeof(size_t)/4>.  Setting B<M_MXFAST> to 0 disables "
3482 "the use of fastbins."
3483 msgstr ""
3484
3485 #. type: TP
3486 #: build/C/man3/mallopt.3:210
3487 #, no-wrap
3488 msgid "B<M_PERTURB> (since glibc 2.4)"
3489 msgstr "B<M_PERTURB> (glibc 2.4 以降)"
3490
3491 #. type: Plain text
3492 #: build/C/man3/mallopt.3:225
3493 msgid ""
3494 "If this parameter is set to a nonzero value, then bytes of allocated memory "
3495 "(other than allocations via B<calloc>(3))  are initialized to the complement "
3496 "of the value in the least significant byte of I<value>, and when allocated "
3497 "memory is released using B<free>(3), the freed bytes are set to the least "
3498 "significant byte of I<value>.  This can be useful for detecting errors where "
3499 "programs incorrectly rely on allocated memory being initialized to zero, or "
3500 "reuse values in memory that has already been freed."
3501 msgstr ""
3502
3503 #. type: TP
3504 #: build/C/man3/mallopt.3:225
3505 #, no-wrap
3506 msgid "B<M_TOP_PAD>"
3507 msgstr "B<M_TOP_PAD>"
3508
3509 #. type: Plain text
3510 #: build/C/man3/mallopt.3:232
3511 msgid ""
3512 "This parameter defines the amount of padding to employ when calling B<sbrk>"
3513 "(2)  to modify the program break.  (The measurement unit for this parameter "
3514 "is bytes.)  This parameter has an effect in the following circumstances:"
3515 msgstr ""
3516
3517 #. type: Plain text
3518 #: build/C/man3/mallopt.3:239
3519 msgid ""
3520 "When the program break is increased, then B<M_TOP_PAD> bytes are added to "
3521 "the B<sbrk>(2)  request."
3522 msgstr ""
3523
3524 #. type: Plain text
3525 #: build/C/man3/mallopt.3:245
3526 msgid ""
3527 "When the heap is trimmed as a consequence of calling B<free>(3)  (see the "
3528 "discussion of B<M_TRIM_THRESHOLD>)  this much free space is preserved at the "
3529 "top of the heap."
3530 msgstr ""
3531
3532 #. type: Plain text
3533 #: build/C/man3/mallopt.3:249
3534 msgid ""
3535 "In either case, the amount of padding is always rounded to a system page "
3536 "boundary."
3537 msgstr ""
3538
3539 #. type: Plain text
3540 #: build/C/man3/mallopt.3:256
3541 msgid ""
3542 "Modifying B<M_TOP_PAD> is a trade-off between increasing the number of "
3543 "system calls (when the parameter is set low)  and wasting unused memory at "
3544 "the top of the heap (when the parameter is set high)."
3545 msgstr ""
3546
3547 #.  DEFAULT_TOP_PAD in glibc source
3548 #. type: Plain text
3549 #: build/C/man3/mallopt.3:259
3550 msgid "The default value for this parameter is 128*1024."
3551 msgstr ""
3552
3553 #. type: TP
3554 #: build/C/man3/mallopt.3:259
3555 #, no-wrap
3556 msgid "B<M_TRIM_THRESHOLD>"
3557 msgstr "B<M_TRIM_THRESHOLD>"
3558
3559 #. type: Plain text
3560 #: build/C/man3/mallopt.3:275
3561 msgid ""
3562 "When the amount of contiguous free memory at the top of the heap grows "
3563 "sufficiently large, B<free>(3)  employs B<sbrk>(2)  to release this memory "
3564 "back to the system.  (This can be useful in programs that continue to "
3565 "execute for a long period after freeing a significant amount of memory.)  "
3566 "The B<M_TRIM_THRESHOLD> parameter specifies the minimum size (in bytes) that "
3567 "this block of memory must reach before B<sbrk>(2)  is used to trim the heap."
3568 msgstr ""
3569
3570 #. type: Plain text
3571 #: build/C/man3/mallopt.3:280
3572 msgid ""
3573 "The default value for this parameter is 128*1024.  Setting "
3574 "B<M_TRIM_THRESHOLD> to -1 disables trimming completely."
3575 msgstr ""
3576
3577 #
3578 #
3579 #
3580 #.  FIXME Do the arena parameters need to be documented?
3581 #.  .TP
3582 #.  .BR M_ARENA_TEST " (since glibc 2.10)"
3583 #.  .TP
3584 #.  .BR M_ARENA_MAX " (since glibc 2.10)"
3585 #.  Environment variables
3586 #.      MALLOC_ARENA_MAX_
3587 #.      MALLOC_ARENA_TEST_
3588 #.  http://udrepper.livejournal.com/20948.html describes some details
3589 #.      of the MALLOC_ARENA_* environment variables.
3590 #.  These macros aren't enabled in production releases until 2.15?
3591 #.  (see glibc malloc/Makefile)
3592 #. type: Plain text
3593 #: build/C/man3/mallopt.3:303
3594 msgid ""
3595 "Modifying B<M_TRIM_THRESHOLD> is a trade-off between increasing the number "
3596 "of system calls (when the parameter is set low)  and wasting unused memory "
3597 "at the top of the heap (when the parameter is set high)."
3598 msgstr ""
3599
3600 #. type: SS
3601 #: build/C/man3/mallopt.3:303
3602 #, no-wrap
3603 msgid "Environment Variables"
3604 msgstr "環境変数"
3605
3606 #. type: Plain text
3607 #: build/C/man3/mallopt.3:318
3608 msgid ""
3609 "A number of environment variables can be defined to modify some of the same "
3610 "parameters as are controlled by B<mallopt>().  Using these variables has the "
3611 "advantage that the source code of the program need not be changed.  To be "
3612 "effective, these variables must be defined before the first call to a memory-"
3613 "allocation function.  (If the same parameters are adjusted via B<mallopt>()  "
3614 "then the B<mallopt>()  settings take precedence.)  For security reasons, "
3615 "these variables are ignored in set-user-ID and set-group-ID programs."
3616 msgstr ""
3617
3618 #. type: Plain text
3619 #: build/C/man3/mallopt.3:321
3620 msgid ""
3621 "The environment variables are as follows (note the trailing underscore at "
3622 "the end of the name of each variable):"
3623 msgstr ""
3624
3625 #. type: TP
3626 #: build/C/man3/mallopt.3:321
3627 #, no-wrap
3628 msgid "B<MALLOC_CHECK_>"
3629 msgstr "B<MALLOC_CHECK_>"
3630
3631 #.  On glibc 2.12/x86, a simple malloc()+free() loop is about 70% slower
3632 #.  when MALLOC_CHECK_ was set.
3633 #. type: Plain text
3634 #: build/C/man3/mallopt.3:338
3635 msgid ""
3636 "This environment variable controls the same parameter as B<mallopt>()  "
3637 "B<M_CHECK_ACTION>.  If this variable is set to a nonzero value, then a "
3638 "special implementation of the memory-allocation functions is used.  (This is "
3639 "accomplished using the B<malloc_hook>(3)  feature.)  This implementation "
3640 "performs additional error checking, but is slower than the standard set of "
3641 "memory-allocation functions.  (This implementation does not detect all "
3642 "possible errors; memory leaks can still occur.)"
3643 msgstr ""
3644
3645 #. type: Plain text
3646 #: build/C/man3/mallopt.3:343
3647 msgid ""
3648 "The value assigned to this environment variable should be a single digit, "
3649 "whose meaning is as described for B<M_CHECK_ACTION>.  Any characters beyond "
3650 "the initial digit are ignored."
3651 msgstr ""
3652
3653 #. type: Plain text
3654 #: build/C/man3/mallopt.3:352
3655 msgid ""
3656 "For security reasons, the effect of B<MALLOC_CHECK_> is disabled by default "
3657 "for set-user-ID and set-group-ID programs.  However, if the file I</etc/suid-"
3658 "debug> exists (the content of the file is irrelevant), then B<MALLOC_CHECK_> "
3659 "also has an effect for set-user-ID and set-group-ID programs."
3660 msgstr ""
3661
3662 #. type: TP
3663 #: build/C/man3/mallopt.3:352
3664 #, no-wrap
3665 msgid "B<MALLOC_MMAP_MAX_>"
3666 msgstr "B<MALLOC_MMAP_MAX_>"
3667
3668 #. type: Plain text
3669 #: build/C/man3/mallopt.3:357
3670 msgid "Controls the same parameter as B<mallopt>()  B<M_MMAP_MAX>."
3671 msgstr ""
3672
3673 #. type: TP
3674 #: build/C/man3/mallopt.3:357
3675 #, no-wrap
3676 msgid "B<MALLOC_MMAP_THRESHOLD_>"
3677 msgstr "B<MALLOC_MMAP_THRESHOLD_>"
3678
3679 #. type: Plain text
3680 #: build/C/man3/mallopt.3:362
3681 msgid "Controls the same parameter as B<mallopt>()  B<M_MMAP_THRESHOLD>."
3682 msgstr ""
3683
3684 #. type: TP
3685 #: build/C/man3/mallopt.3:362
3686 #, no-wrap
3687 msgid "B<MALLOC_PERTURB_>"
3688 msgstr "B<MALLOC_PERTURB_>"
3689
3690 #. type: Plain text
3691 #: build/C/man3/mallopt.3:367
3692 msgid "Controls the same parameter as B<mallopt>()  B<M_PERTURB>."
3693 msgstr ""
3694
3695 #. type: TP
3696 #: build/C/man3/mallopt.3:367
3697 #, no-wrap
3698 msgid "B<MALLOC_TRIM_THRESHOLD_>"
3699 msgstr "B<MALLOC_TRIM_THRESHOLD_>"
3700
3701 #. type: Plain text
3702 #: build/C/man3/mallopt.3:372
3703 msgid "Controls the same parameter as B<mallopt>()  B<M_TRIM_THRESHOLD>."
3704 msgstr ""
3705
3706 #. type: TP
3707 #: build/C/man3/mallopt.3:372
3708 #, no-wrap
3709 msgid "B<MALLOC_TOP_PAD_>"
3710 msgstr "B<MALLOC_TOP_PAD_>"
3711
3712 #. type: Plain text
3713 #: build/C/man3/mallopt.3:377
3714 msgid "Controls the same parameter as B<mallopt>()  B<M_TOP_PAD>."
3715 msgstr ""
3716
3717 #. type: Plain text
3718 #: build/C/man3/mallopt.3:382
3719 msgid "On success, B<mallopt>()  returns 1.  On error, it returns 0."
3720 msgstr "B<mallopt>()  は成功すると 1 を返す。エラーの場合は 0 を返す。"
3721
3722 #.  .SH VERSIONS
3723 #.  Available already in glibc 2.0, possibly earlier
3724 #. type: Plain text
3725 #: build/C/man3/mallopt.3:390
3726 msgid "On error, I<errno> is I<not> set."
3727 msgstr "エラーの場合、I<errno> は設定I<されない>。"
3728
3729 #.  .SH NOTES
3730 #. type: Plain text
3731 #: build/C/man3/mallopt.3:404
3732 msgid ""
3733 "This function is not specified by POSIX or the C standards.  A similar "
3734 "function exists on many System V derivatives, but the range of values for "
3735 "I<param> varies across systems.  The SVID defined options B<M_MXFAST>, "
3736 "B<M_NLBLKS>, B<M_GRAIN>, and B<M_KEEP>, but only the first of these is "
3737 "implemented in glibc."
3738 msgstr ""
3739
3740 #. type: Plain text
3741 #: build/C/man3/mallopt.3:408
3742 msgid "Specifying an invalid value for I<param> does not generate an error."
3743 msgstr ""
3744
3745 #.  FIXME This looks buggy:
3746 #.  setting the M_MXFAST limit rounds up:    (s + SIZE_SZ) & ~MALLOC_ALIGN_MASK)
3747 #.  malloc requests are rounded up:
3748 #.     (req) + SIZE_SZ + MALLOC_ALIGN_MASK) & ~MALLOC_ALIGN_MASK
3749 #.  http://sources.redhat.com/bugzilla/show_bug.cgi?id=12129
3750 #. type: Plain text
3751 #: build/C/man3/mallopt.3:416
3752 msgid ""
3753 "A calculation error within the glibc implementation means that a call of the "
3754 "form:"
3755 msgstr ""
3756
3757 #. type: Plain text
3758 #: build/C/man3/mallopt.3:419
3759 #, no-wrap
3760 msgid "    mallopt(M_MXFAST, n)\n"
3761 msgstr "    mallopt(M_MXFAST, n)\n"
3762
3763 #.  Bins are multiples of 2 * sizeof(size_t) + sizeof(size_t)
3764 #. type: Plain text
3765 #: build/C/man3/mallopt.3:431
3766 msgid ""
3767 "does not result in fastbins being employed for all allocations of size up to "
3768 "I<n>.  To ensure desired results, I<n> should be rounded up to the next "
3769 "multiple greater than or equal to I<(2k+1)*sizeof(size_t)>, where I<k> is an "
3770 "integer."
3771 msgstr ""
3772
3773 #.  FIXME MALLOC_MMAP_THRESHOLD_ and MALLOC_MMAP_MAX_
3774 #.  do have an effect for set-user-ID programs (but not
3775 #.  set-group-ID programs).
3776 #.  http://sources.redhat.com/bugzilla/show_bug.cgi?id=12155
3777 #. type: Plain text
3778 #: build/C/man3/mallopt.3:443
3779 msgid ""
3780 "The B<MALLOC_MMAP_THRESHOLD_> and B<MALLOC_MMAP_MAX_> variables are I<not> "
3781 "ignored in set-group-ID programs."
3782 msgstr ""
3783
3784 #.  FIXME http://sources.redhat.com/bugzilla/show_bug.cgi?id=12140
3785 #. type: Plain text
3786 #: build/C/man3/mallopt.3:464
3787 msgid ""
3788 "If B<mallopt>()  is used to set B<M_PERTURB>, then, as expected, the bytes "
3789 "of allocated memory are initialized to the complement of the byte in "
3790 "I<value>, and when that memory is freed, the bytes of the region are "
3791 "initialized to the byte specified in I<value>.  However, there is an off-by-"
3792 "I<sizeof(size_t)> error in the implementation: instead of initializing "
3793 "precisely the block of memory being freed by the call I<free(p)>, the block "
3794 "starting at I<p+sizeof(size_t)> is initialized."
3795 msgstr ""
3796
3797 #. type: Plain text
3798 #: build/C/man3/mallopt.3:473
3799 msgid ""
3800 "The program below demonstrates the use of B<M_CHECK_ACTION>.  If the program "
3801 "is supplied with an (integer) command-line argument, then that argument is "
3802 "used to set the B<M_CHECK_ACTION> parameter.  The program then allocates a "
3803 "block of memory, and frees it twice (an error)."
3804 msgstr ""
3805
3806 #. type: Plain text
3807 #: build/C/man3/mallopt.3:477
3808 msgid ""
3809 "The following shell session shows what happens when we run this program "
3810 "under glibc, with the default value for B<M_CHECK_ACTION>:"
3811 msgstr ""
3812
3813 #. type: Plain text
3814 #: build/C/man3/mallopt.3:497
3815 #, no-wrap
3816 msgid ""
3817 "$ B<./a.out>\n"
3818 "main(): returned from first free() call\n"
3819 "*** glibc detected *** ./a.out: double free or corruption (top): 0x09d30008 ***\n"
3820 "======= Backtrace: =========\n"
3821 "/lib/libc.so.6(+0x6c501)[0x523501]\n"
3822 "/lib/libc.so.6(+0x6dd70)[0x524d70]\n"
3823 "/lib/libc.so.6(cfree+0x6d)[0x527e5d]\n"
3824 "\\&./a.out[0x80485db]\n"
3825 "/lib/libc.so.6(__libc_start_main+0xe7)[0x4cdce7]\n"
3826 "\\&./a.out[0x8048471]\n"
3827 "======= Memory map: ========\n"
3828 "001e4000-001fe000 r-xp 00000000 08:06 1083555    /lib/libgcc_s.so.1\n"
3829 "001fe000-001ff000 r--p 00019000 08:06 1083555    /lib/libgcc_s.so.1\n"
3830 "[some lines omitted]\n"
3831 "b7814000-b7817000 rw-p 00000000 00:00 0\n"
3832 "bff53000-bff74000 rw-p 00000000 00:00 0          [stack]\n"
3833 "Aborted (core dumped)\n"
3834 msgstr ""
3835 "$ B<./a.out>\n"
3836 "main(): returned from first free() call\n"
3837 "*** glibc detected *** ./a.out: double free or corruption (top): 0x09d30008 ***\n"
3838 "======= Backtrace: =========\n"
3839 "/lib/libc.so.6(+0x6c501)[0x523501]\n"
3840 "/lib/libc.so.6(+0x6dd70)[0x524d70]\n"
3841 "/lib/libc.so.6(cfree+0x6d)[0x527e5d]\n"
3842 "\\&./a.out[0x80485db]\n"
3843 "/lib/libc.so.6(__libc_start_main+0xe7)[0x4cdce7]\n"
3844 "\\&./a.out[0x8048471]\n"
3845 "======= Memory map: ========\n"
3846 "001e4000-001fe000 r-xp 00000000 08:06 1083555    /lib/libgcc_s.so.1\n"
3847 "001fe000-001ff000 r--p 00019000 08:06 1083555    /lib/libgcc_s.so.1\n"
3848 "[some lines omitted]\n"
3849 "b7814000-b7817000 rw-p 00000000 00:00 0\n"
3850 "bff53000-bff74000 rw-p 00000000 00:00 0          [stack]\n"
3851 "Aborted (core dumped)\n"
3852
3853 #. type: Plain text
3854 #: build/C/man3/mallopt.3:502
3855 msgid ""
3856 "The following runs show the results when employing other values for "
3857 "B<M_CHECK_ACTION>:"
3858 msgstr ""
3859
3860 #. type: Plain text
3861 #: build/C/man3/mallopt.3:515
3862 #, no-wrap
3863 msgid ""
3864 "$ B<./a.out 1>             # Diagnose error and continue\n"
3865 "main(): returned from first free() call\n"
3866 "*** glibc detected *** ./a.out: double free or corruption (top): 0x09cbe008 ***\n"
3867 "main(): returned from second free() call\n"
3868 "$ B<./a.out 2>             # Abort without error message\n"
3869 "main(): returned from first free() call\n"
3870 "Aborted (core dumped)\n"
3871 "$ B<./a.out 0>             # Ignore error and continue\n"
3872 "main(): returned from first free() call\n"
3873 "main(): returned from second free() call\n"
3874 msgstr ""
3875 "$ B<./a.out 1>             # Diagnose error and continue\n"
3876 "main(): returned from first free() call\n"
3877 "*** glibc detected *** ./a.out: double free or corruption (top): 0x09cbe008 ***\n"
3878 "main(): returned from second free() call\n"
3879 "$ B<./a.out 2>             # Abort without error message\n"
3880 "main(): returned from first free() call\n"
3881 "Aborted (core dumped)\n"
3882 "$ B<./a.out 0>             # Ignore error and continue\n"
3883 "main(): returned from first free() call\n"
3884 "main(): returned from second free() call\n"
3885
3886 #. type: Plain text
3887 #: build/C/man3/mallopt.3:521
3888 msgid ""
3889 "The next run shows how to set the same parameter using the B<MALLOC_CHECK_> "
3890 "environment variable:"
3891 msgstr ""
3892
3893 #. type: Plain text
3894 #: build/C/man3/mallopt.3:528
3895 #, no-wrap
3896 msgid ""
3897 "$ B<MALLOC_CHECK_=1 ./a.out>\n"
3898 "main(): returned from first free() call\n"
3899 "*** glibc detected *** ./a.out: free(): invalid pointer: 0x092c2008 ***\n"
3900 "main(): returned from second free() call\n"
3901 msgstr ""
3902 "$ B<MALLOC_CHECK_=1 ./a.out>\n"
3903 "main(): returned from first free() call\n"
3904 "*** glibc detected *** ./a.out: free(): invalid pointer: 0x092c2008 ***\n"
3905 "main(): returned from second free() call\n"
3906
3907 #. type: Plain text
3908 #: build/C/man3/mallopt.3:536
3909 #, no-wrap
3910 msgid ""
3911 "#include E<lt>malloc.hE<gt>\n"
3912 "#include E<lt>stdio.hE<gt>\n"
3913 "#include E<lt>stdlib.hE<gt>\n"
3914 msgstr ""
3915 "#include E<lt>malloc.hE<gt>\n"
3916 "#include E<lt>stdio.hE<gt>\n"
3917 "#include E<lt>stdlib.hE<gt>\n"
3918
3919 #. type: Plain text
3920 #: build/C/man3/mallopt.3:541 build/C/man3/mcheck.3:187
3921 #, no-wrap
3922 msgid ""
3923 "int\n"
3924 "main(int argc, char *argv[])\n"
3925 "{\n"
3926 "    char *p;\n"
3927 msgstr ""
3928 "int\n"
3929 "main(int argc, char *argv[])\n"
3930 "{\n"
3931 "    char *p;\n"
3932
3933 #. type: Plain text
3934 #: build/C/man3/mallopt.3:548
3935 #, no-wrap
3936 msgid ""
3937 "    if (argc E<gt> 1) {\n"
3938 "        if (mallopt(M_CHECK_ACTION, atoi(argv[1])) != 1) {\n"
3939 "            fprintf(stderr, \"mallopt() failed\");\n"
3940 "            exit(EXIT_FAILURE);\n"
3941 "        }\n"
3942 "    }\n"
3943 msgstr ""
3944 "    if (argc E<gt> 1) {\n"
3945 "        if (mallopt(M_CHECK_ACTION, atoi(argv[1])) != 1) {\n"
3946 "            fprintf(stderr, \"mallopt() failed\");\n"
3947 "            exit(EXIT_FAILURE);\n"
3948 "        }\n"
3949 "    }\n"
3950
3951 #. type: Plain text
3952 #: build/C/man3/mallopt.3:554
3953 #, no-wrap
3954 msgid ""
3955 "    p = malloc(1000);\n"
3956 "    if (p == NULL) {\n"
3957 "        fprintf(stderr, \"malloc() failed\");\n"
3958 "        exit(EXIT_FAILURE);\n"
3959 "    }\n"
3960 msgstr ""
3961 "    p = malloc(1000);\n"
3962 "    if (p == NULL) {\n"
3963 "        fprintf(stderr, \"malloc() failed\");\n"
3964 "        exit(EXIT_FAILURE);\n"
3965 "    }\n"
3966
3967 #. type: Plain text
3968 #: build/C/man3/mallopt.3:557
3969 #, no-wrap
3970 msgid ""
3971 "    free(p);\n"
3972 "    printf(\"main(): returned from first free() call\\en\");\n"
3973 msgstr ""
3974 "    free(p);\n"
3975 "    printf(\"main(): returned from first free() call\\en\");\n"
3976
3977 #. type: Plain text
3978 #: build/C/man3/mallopt.3:560
3979 #, no-wrap
3980 msgid ""
3981 "    free(p);\n"
3982 "    printf(\"main(): returned from second free() call\\en\");\n"
3983 msgstr ""
3984 "    free(p);\n"
3985 "    printf(\"main(): returned from second free() call\\en\");\n"
3986
3987 #. type: Plain text
3988 #: build/C/man3/mallopt.3:578
3989 msgid ""
3990 "B<mmap>(2)  B<sbrk>(2), B<mallinfo>(3), B<malloc>(3), B<malloc_hook>(3), "
3991 "B<malloc_info>(3), B<malloc_stats>(3), B<malloc_trim>(3), B<mcheck>(3), "
3992 "B<mtrace>(3), B<posix_memalign>(3)"
3993 msgstr "B<mmap>(2)  B<sbrk>(2), B<mallinfo>(3), B<malloc>(3), B<malloc_hook>(3), B<malloc_info>(3), B<malloc_stats>(3), B<malloc_trim>(3), B<mcheck>(3), B<mtrace>(3), B<posix_memalign>(3)"
3994
3995 #. type: TH
3996 #: build/C/man3/mcheck.3:23
3997 #, no-wrap
3998 msgid "MCHECK"
3999 msgstr ""
4000
4001 #. type: TH
4002 #: build/C/man3/mcheck.3:23 build/C/man3/mtrace.3:23
4003 #, no-wrap
4004 msgid "2012-04-18"
4005 msgstr "2012-04-18"
4006
4007 #. type: Plain text
4008 #: build/C/man3/mcheck.3:26
4009 msgid ""
4010 "mcheck, mcheck_check_all, mcheck_pedantic, mprobe - heap consistency checking"
4011 msgstr ""
4012
4013 #. type: Plain text
4014 #: build/C/man3/mcheck.3:29
4015 #, no-wrap
4016 msgid "B<#include E<lt>mcheck.hE<gt>>\n"
4017 msgstr "B<#include E<lt>mcheck.hE<gt>>\n"
4018
4019 #. type: Plain text
4020 #: build/C/man3/mcheck.3:31
4021 #, no-wrap
4022 msgid "B<int mcheck(void (*>I<abortfunc>B<)(enum mcheck_status >I<mstatus>B<));>\n"
4023 msgstr ""
4024
4025 #. type: Plain text
4026 #: build/C/man3/mcheck.3:33
4027 #, no-wrap
4028 msgid "B<int mcheck_pedantic(void (*>I<abortfunc>B<)(enum mcheck_status >I<mstatus>B<));>\n"
4029 msgstr ""
4030
4031 #. type: Plain text
4032 #: build/C/man3/mcheck.3:35
4033 #, no-wrap
4034 msgid "B<void mcheck_check_all(void);>\n"
4035 msgstr "B<void mcheck_check_all(void);>\n"
4036
4037 #. type: Plain text
4038 #: build/C/man3/mcheck.3:37
4039 #, no-wrap
4040 msgid "B<enum mcheck_status mprobe(void *>I<ptr>B<);>\n"
4041 msgstr "B<enum mcheck_status mprobe(void *>I<ptr>B<);>\n"
4042
4043 #. type: Plain text
4044 #: build/C/man3/mcheck.3:50
4045 msgid ""
4046 "The B<mcheck>()  function installs a set of debugging hooks for the B<malloc>"
4047 "(3)  family of memory-allocation functions.  These hooks cause certain "
4048 "consistency checks to be performed on the state of the heap.  The checks can "
4049 "detect application errors such as freeing a block of memory more than once "
4050 "or corrupting the bookkeeping data structures that immediately precede a "
4051 "block of allocated memory."
4052 msgstr ""
4053
4054 #. type: Plain text
4055 #: build/C/man3/mcheck.3:62
4056 msgid ""
4057 "To be effective, the B<mcheck>()  function must be called before the first "
4058 "call to B<malloc>(3)  or a related function.  In cases where this is "
4059 "difficult to ensure, linking the program with I<-mcheck> inserts an implicit "
4060 "call to B<mcheck>()  (with a NULL argument)  before the first call to a "
4061 "memory-allocation function."
4062 msgstr ""
4063
4064 #. type: Plain text
4065 #: build/C/man3/mcheck.3:70
4066 msgid ""
4067 "The B<mcheck_pedantic>()  function is similar to B<mcheck>(), but performs "
4068 "checks on all allocated blocks whenever one of the memory-allocation "
4069 "functions is called.  This can be very slow!"
4070 msgstr ""
4071
4072 #. type: Plain text
4073 #: build/C/man3/mcheck.3:77
4074 msgid ""
4075 "The B<mcheck_check_all>()  function causes an immediate check on all "
4076 "allocated blocks.  This call is only effective if B<mcheck>()  is called "
4077 "beforehand."
4078 msgstr ""
4079
4080 #. type: Plain text
4081 #: build/C/man3/mcheck.3:90
4082 msgid ""
4083 "If the system detects an inconsistency in the heap, the caller-supplied "
4084 "function pointed to by I<abortfunc> is invoked with a single argument "
4085 "argument, I<mstatus>, that indicates what type of inconsistency was "
4086 "detected.  If I<abortfunc> is NULL, a default function prints an error "
4087 "message on I<stderr> and calls B<abort>(3)."
4088 msgstr ""
4089
4090 #. type: Plain text
4091 #: build/C/man3/mcheck.3:102
4092 msgid ""
4093 "The B<mprobe>()  function performs a consistency check on the block of "
4094 "allocated memory pointed to by I<ptr>.  The B<mcheck>()  function should be "
4095 "called beforehand (otherwise B<mprobe>()  returns B<MCHECK_DISABLED>)."
4096 msgstr ""
4097
4098 #. type: Plain text
4099 #: build/C/man3/mcheck.3:110
4100 msgid ""
4101 "The following list describes the values returned by B<mprobe>()  or passed "
4102 "as the I<mstatus> argument when I<abortfunc> is invoked:"
4103 msgstr ""
4104
4105 #. type: TP
4106 #: build/C/man3/mcheck.3:110
4107 #, no-wrap
4108 msgid "B<MCHECK_DISABLED> (B<mprobe>() only)"
4109 msgstr ""
4110
4111 #. type: Plain text
4112 #: build/C/man3/mcheck.3:115
4113 msgid ""
4114 "B<mcheck>()  was not called before the first memory allocation function was "
4115 "called.  Consistency checking is not possible."
4116 msgstr ""
4117
4118 #. type: TP
4119 #: build/C/man3/mcheck.3:115
4120 #, no-wrap
4121 msgid "B<MCHECK_OK> (B<mprobe>() only)"
4122 msgstr ""
4123
4124 #. type: Plain text
4125 #: build/C/man3/mcheck.3:118
4126 msgid "No inconsistency detected."
4127 msgstr ""
4128
4129 #. type: TP
4130 #: build/C/man3/mcheck.3:118
4131 #, no-wrap
4132 msgid "B<MCHECK_HEAD>"
4133 msgstr "B<MCHECK_HEAD>"
4134
4135 #. type: Plain text
4136 #: build/C/man3/mcheck.3:121
4137 msgid "Memory preceding an allocated block was clobbered."
4138 msgstr ""
4139
4140 #. type: TP
4141 #: build/C/man3/mcheck.3:121
4142 #, no-wrap
4143 msgid "B<MCHECK_TAIL>"
4144 msgstr "B<MCHECK_TAIL>"
4145
4146 #. type: Plain text
4147 #: build/C/man3/mcheck.3:124
4148 msgid "Memory following an allocated block was clobbered."
4149 msgstr ""
4150
4151 #. type: TP
4152 #: build/C/man3/mcheck.3:124
4153 #, no-wrap
4154 msgid "B<MCHECK_FREE>"
4155 msgstr "B<MCHECK_FREE>"
4156
4157 #. type: Plain text
4158 #: build/C/man3/mcheck.3:128
4159 msgid "A block of memory was freed twice."
4160 msgstr ""
4161
4162 #. type: Plain text
4163 #: build/C/man3/mcheck.3:133
4164 msgid ""
4165 "B<mcheck>()  and B<mcheck_pedantic>()  return 0 on success, or -1 on error."
4166 msgstr ""
4167
4168 #. type: Plain text
4169 #: build/C/man3/mcheck.3:144
4170 msgid ""
4171 "The B<mcheck_pedantic>()  and B<mcheck_check_all>()  functions are available "
4172 "since glibc 2.2.  The B<mcheck()> and B<mprobe()> functions are present "
4173 "since at least glibc 2.0"
4174 msgstr ""
4175
4176 #.  But is MALLOC_CHECK_ slower?
4177 #. type: Plain text
4178 #: build/C/man3/mcheck.3:158
4179 msgid ""
4180 "Linking a program with I<-lmcheck> and using the B<MALLOC_CHECK_> "
4181 "environment variable (described in B<mallopt>(3))  cause the same kinds of "
4182 "errors to be detected.  But, using B<MALLOC_CHECK_> does not require the "
4183 "application to be relinked."
4184 msgstr ""
4185
4186 #. type: Plain text
4187 #: build/C/man3/mcheck.3:165
4188 msgid ""
4189 "The program below calls B<mcheck>()  with a NULL argument and then frees the "
4190 "same block of memory twice.  The following shell session demonstrates what "
4191 "happens when running the program:"
4192 msgstr ""
4193
4194 #. type: Plain text
4195 #: build/C/man3/mcheck.3:170
4196 #, no-wrap
4197 msgid ""
4198 "$B< ./a.out>\n"
4199 "About to free\n"
4200 msgstr ""
4201
4202 #. type: Plain text
4203 #: build/C/man3/mcheck.3:174
4204 #, no-wrap
4205 msgid ""
4206 "About to free a second time\n"
4207 "block freed twice\n"
4208 "Aborted (core dumped)\n"
4209 msgstr ""
4210
4211 #. type: Plain text
4212 #: build/C/man3/mcheck.3:182
4213 #, no-wrap
4214 msgid ""
4215 "#include E<lt>stdlib.hE<gt>\n"
4216 "#include E<lt>stdio.hE<gt>\n"
4217 "#include E<lt>mcheck.hE<gt>\n"
4218 msgstr ""
4219 "#include E<lt>stdlib.hE<gt>\n"
4220 "#include E<lt>stdio.hE<gt>\n"
4221 "#include E<lt>mcheck.hE<gt>\n"
4222
4223 #. type: Plain text
4224 #: build/C/man3/mcheck.3:190
4225 #, no-wrap
4226 msgid ""
4227 "    if (mcheck(NULL) != 0) {\n"
4228 "        fprintf(stderr, \"mcheck() failed\\en\");\n"
4229 msgstr ""
4230
4231 #. type: Plain text
4232 #: build/C/man3/mcheck.3:193
4233 #, no-wrap
4234 msgid ""
4235 "        exit(EXIT_FAILURE);\n"
4236 "    }\n"
4237 msgstr ""
4238 "        exit(EXIT_FAILURE);\n"
4239 "    }\n"
4240
4241 #. type: Plain text
4242 #: build/C/man3/mcheck.3:195
4243 #, no-wrap
4244 msgid "    p = malloc(1000);\n"
4245 msgstr "    p = malloc(1000);\n"
4246
4247 #. type: Plain text
4248 #: build/C/man3/mcheck.3:200
4249 #, no-wrap
4250 msgid ""
4251 "    fprintf(stderr, \"About to free\\en\");\n"
4252 "    free(p);\n"
4253 "    fprintf(stderr, \"\\enAbout to free a second time\\en\");\n"
4254 "    free(p);\n"
4255 msgstr ""
4256
4257 #.  FIXME add SEE ALSO pointer from malloc(3) to here
4258 #.  FIXME add SEE ALSO pointer from mallopt(3) to here
4259 #.  FIXME add SEE ALSO pointer from mtrace(3) to here
4260 #. type: Plain text
4261 #: build/C/man3/mcheck.3:211
4262 msgid "B<malloc>(3), B<mallopt>(3), B<mtrace>(3)"
4263 msgstr "B<malloc>(3), B<mallopt>(3), B<mtrace>(3)"
4264
4265 #. type: TH
4266 #: build/C/man2/mlock.2:27
4267 #, no-wrap
4268 msgid "MLOCK"
4269 msgstr "MLOCK"
4270
4271 #. type: TH
4272 #: build/C/man2/mlock.2:27
4273 #, no-wrap
4274 msgid "2011-09-14"
4275 msgstr "2011-09-14"
4276
4277 #. type: Plain text
4278 #: build/C/man2/mlock.2:30
4279 msgid "mlock, munlock, mlockall, munlockall - lock and unlock memory"
4280 msgstr "mlock - メモリのロックとロック解除を行う"
4281
4282 #. type: Plain text
4283 #: build/C/man2/mlock.2:33 build/C/man2/mmap.2:46 build/C/man2/mmap2.2:35
4284 #: build/C/man2/mprotect.2:38 build/C/man2/mremap.2:39
4285 #, no-wrap
4286 msgid "B<#include E<lt>sys/mman.hE<gt>>\n"
4287 msgstr "B<#include E<lt>sys/mman.hE<gt>>\n"
4288
4289 #. type: Plain text
4290 #: build/C/man2/mlock.2:36
4291 #, no-wrap
4292 msgid ""
4293 "B<int mlock(const void *>I<addr>B<, size_t >I<len>B<);>\n"
4294 "B<int munlock(const void *>I<addr>B<, size_t >I<len>B<);>\n"
4295 msgstr ""
4296 "B<int mlock(const void *>I<addr>B<, size_t >I<len>B<);>\n"
4297 "B<int munlock(const void *>I<addr>B<, size_t >I<len>B<);>\n"
4298
4299 #. type: Plain text
4300 #: build/C/man2/mlock.2:39
4301 #, no-wrap
4302 msgid ""
4303 "B<int mlockall(int >I<flags>B<);>\n"
4304 "B<int munlockall(void);>\n"
4305 msgstr ""
4306 "B<int mlockall(int >I<flags>B<);>\n"
4307 "B<int munlockall(void);>\n"
4308
4309 #. type: Plain text
4310 #: build/C/man2/mlock.2:55
4311 msgid ""
4312 "B<mlock>()  and B<mlockall>()  respectively lock part or all of the calling "
4313 "process's virtual address space into RAM, preventing that memory from being "
4314 "paged to the swap area.  B<munlock>()  and B<munlockall>()  perform the "
4315 "converse operation, respectively unlocking part or all of the calling "
4316 "process's virtual address space, so that pages in the specified virtual "
4317 "address range may once more to be swapped out if required by the kernel "
4318 "memory manager.  Memory locking and unlocking are performed in units of "
4319 "whole pages."
4320 msgstr ""
4321 "B<mlock>()  と B<mlockall>()  はそれぞれ、呼び出し元プロセスの仮想アドレス空"
4322 "間の一部または全部を RAM 上にロックし、メモリがスワップエリアにページングされ"
4323 "るのを防ぐ。 B<munlock>()  と B<munlockall>()  は逆の操作で、それぞれ呼び出し"
4324 "元プロセスの仮想アドレス空間の一部または全部を ロック解除する。つまり、指定さ"
4325 "れた仮想アドレス範囲のページは カーネルメモリマネージャーから要求されればス"
4326 "ワップアウトするようになる。 メモリのロックとロック解除はページ単位で行われ"
4327 "る。"
4328
4329 #. type: SS
4330 #: build/C/man2/mlock.2:55
4331 #, no-wrap
4332 msgid "mlock() and munlock()"
4333 msgstr "mlock() と munlock()"
4334
4335 #. type: Plain text
4336 #: build/C/man2/mlock.2:65
4337 msgid ""
4338 "B<mlock>()  locks pages in the address range starting at I<addr> and "
4339 "continuing for I<len> bytes.  All pages that contain a part of the specified "
4340 "address range are guaranteed to be resident in RAM when the call returns "
4341 "successfully; the pages are guaranteed to stay in RAM until later unlocked."
4342 msgstr ""
4343 "B<mlock>()  は I<addr> から始まる長さ I<len> バイトのアドレス範囲のページを"
4344 "ロックする。 呼び出しが成功した場合には、 指定されたアドレス範囲を含む全ての"
4345 "ページは RAM に残り続けることが保証される。 これらのページは後でロック解除さ"
4346 "れるまで RAM に残り続けることが保証される。"
4347
4348 #. type: Plain text
4349 #: build/C/man2/mlock.2:74
4350 msgid ""
4351 "B<munlock>()  unlocks pages in the address range starting at I<addr> and "
4352 "continuing for I<len> bytes.  After this call, all pages that contain a part "
4353 "of the specified memory range can be moved to external swap space again by "
4354 "the kernel."
4355 msgstr ""
4356 "B<munlock>()  は、 I<addr> から始まる長さ I<len> バイトのアドレス範囲のページ"
4357 "のロックを解除する。 この呼び出しを行った後は、カーネルが、指定されたメモリ範"
4358 "囲を含む 全てのページを外部のスワップ空間に移動できるようになる。"
4359
4360 #. type: SS
4361 #: build/C/man2/mlock.2:74
4362 #, no-wrap
4363 msgid "mlockall() and munlockall()"
4364 msgstr "mlockall() と munlockall()"
4365
4366 #. type: Plain text
4367 #: build/C/man2/mlock.2:84
4368 msgid ""
4369 "B<mlockall>()  locks all pages mapped into the address space of the calling "
4370 "process.  This includes the pages of the code, data and stack segment, as "
4371 "well as shared libraries, user space kernel data, shared memory, and memory-"
4372 "mapped files.  All mapped pages are guaranteed to be resident in RAM when "
4373 "the call returns successfully; the pages are guaranteed to stay in RAM until "
4374 "later unlocked."
4375 msgstr ""
4376 "B<mlockall>()  は呼び出し元プロセスのアドレス空間にマップされている全てのペー"
4377 "ジを ロックする。これにはコード、データ、スタックの 各セグメント、共有ライブ"
4378 "ラリ、カーネルのユーザー空間データ、 共有メモリ、メモリ・マップされたファイル"
4379 "が含まれる。 システム・コールが成功した場合には全てのマップされたページは "
4380 "RAM に 残ることを保証される。 これらのページは後でロック解除されるまで RAM に"
4381 "残り続けることが保証される。"
4382
4383 #. type: Plain text
4384 #: build/C/man2/mlock.2:89
4385 msgid ""
4386 "The I<flags> argument is constructed as the bitwise OR of one or more of the "
4387 "following constants:"
4388 msgstr "I<flags> 引数は以下の内容の一つまたは複数のビット OR から構成される:"
4389
4390 #. type: TP
4391 #: build/C/man2/mlock.2:89
4392 #, no-wrap
4393 msgid "B<MCL_CURRENT>"
4394 msgstr "B<MCL_CURRENT>"
4395
4396 #. type: Plain text
4397 #: build/C/man2/mlock.2:93
4398 msgid ""
4399 "Lock all pages which are currently mapped into the address space of the "
4400 "process."
4401 msgstr ""
4402 "現在、プロセスのアドレス空間にマップされている全てのページをロックする。"
4403
4404 #. type: TP
4405 #: build/C/man2/mlock.2:93
4406 #, no-wrap
4407 msgid "B<MCL_FUTURE>"
4408 msgstr "B<MCL_FUTURE>"
4409
4410 #. type: Plain text
4411 #: build/C/man2/mlock.2:100
4412 msgid ""
4413 "Lock all pages which will become mapped into the address space of the "
4414 "process in the future.  These could be for instance new pages required by a "
4415 "growing heap and stack as well as new memory mapped files or shared memory "
4416 "regions."
4417 msgstr ""
4418 "将来、プロセスのアドレス空間にマップされる全てのページをロックする。 例えば、"
4419 "ヒープ (heap) やスタックの成長により新しく必要になったページだけで なく、新し"
4420 "くメモリマップされたファイルや共有メモリ領域もロックされる。"
4421
4422 #. type: Plain text
4423 #: build/C/man2/mlock.2:113
4424 msgid ""
4425 "If B<MCL_FUTURE> has been specified, then a later system call (e.g., B<mmap>"
4426 "(2), B<sbrk>(2), B<malloc>(3)), may fail if it would cause the number of "
4427 "locked bytes to exceed the permitted maximum (see below).  In the same "
4428 "circumstances, stack growth may likewise fail: the kernel will deny stack "
4429 "expansion and deliver a B<SIGSEGV> signal to the process."
4430 msgstr ""
4431 "B<MCL_FUTURE> が指定されていると、以後のシステムコール (例えば、 B<mmap>(2), "
4432 "B<sbrk>(2), B<malloc>(3))  は、ロックするバイト数が許可された最大値 (下記参"
4433 "照) を超えた場合に 失敗する可能性がある。 同様に、スタックの成長も失敗する可"
4434 "能性がある。 その場合、カーネルはスタックの拡張を拒否し、 B<SIGSEGV> をプロセ"
4435 "スに送る。"
4436
4437 #. type: Plain text
4438 #: build/C/man2/mlock.2:117
4439 msgid ""
4440 "B<munlockall>()  unlocks all pages mapped into the address space of the "
4441 "calling process."
4442 msgstr ""
4443 "B<munlockall>()  は、呼び出し元プロセスのアドレス空間にマッピングされている "
4444 "全てのページをロック解除する。"
4445
4446 #. type: Plain text
4447 #: build/C/man2/mlock.2:123
4448 msgid ""
4449 "On success these system calls return 0.  On error, -1 is returned, I<errno> "
4450 "is set appropriately, and no changes are made to any locks in the address "
4451 "space of the process."
4452 msgstr ""
4453 "成功した場合は、これらのシステムコールはゼロを返す。 エラーの場合は -1 が返さ"
4454 "れ、 I<errno> が適切に設定され、プロセスのアドレス空間におけるロックは変更さ"
4455 "れない。"
4456
4457 #. type: Plain text
4458 #: build/C/man2/mlock.2:132
4459 msgid ""
4460 "(Linux 2.6.9 and later) the caller had a nonzero B<RLIMIT_MEMLOCK> soft "
4461 "resource limit, but tried to lock more memory than the limit permitted.  "
4462 "This limit is not enforced if the process is privileged (B<CAP_IPC_LOCK>)."
4463 msgstr ""
4464 "(Linux 2.6.9 以降) 呼び出し元は非ゼロの ソフト資源制限 B<RLIMIT_MEMLOCK> を持"
4465 "つが、制限が許可している以上のメモリをロックしようとした。 この制限は、プロセ"
4466 "スが特権 (B<CAP_IPC_LOCK>)  を持っている場合は適用されない。"
4467
4468 #.  In the case of mlock(), this check is somewhat buggy: it doesn't
4469 #.  take into account whether the to-be-locked range overlaps with
4470 #.  already locked pages.  Thus, suppose we allocate
4471 #.  (num_physpages / 4 + 1) of memory, and lock those pages once using
4472 #.  mlock(), and then lock the *same* page range a second time.
4473 #.  In the case, the second mlock() call will fail, since the check
4474 #.  calculates that the process is trying to lock (num_physpages / 2 + 2)
4475 #.  pages, which of course is not true.  (MTK, Nov 04, kernel 2.4.28)
4476 #. type: Plain text
4477 #: build/C/man2/mlock.2:144
4478 msgid ""
4479 "(Linux 2.4 and earlier) the calling process tried to lock more than half of "
4480 "RAM."
4481 msgstr ""
4482 "(Linux 2.4 以前) 呼び出し元プロセスが RAM の半分以上をロックしようとした。"
4483
4484 #. SVr4 documents an additional EAGAIN error code.
4485 #. type: Plain text
4486 #: build/C/man2/mlock.2:150
4487 msgid ""
4488 "The caller is not privileged, but needs privilege (B<CAP_IPC_LOCK>)  to "
4489 "perform the requested operation."
4490 msgstr ""
4491 "呼び出し側が特権を持っていないが、\n"
4492 "要求された操作を実行するには特権 (B<CAP_IPC_LOCK>) が必要である。"
4493
4494 #. type: Plain text
4495 #: build/C/man2/mlock.2:155
4496 msgid "For B<mlock>()  and B<munlock>():"
4497 msgstr "B<mlock>()  と B<munlock>()  用として:"
4498
4499 #. type: Plain text
4500 #: build/C/man2/mlock.2:158
4501 msgid "Some or all of the specified address range could not be locked."
4502 msgstr "指定されたアドレス範囲の一部または全てをロックすることができなかった。"
4503
4504 #. type: Plain text
4505 #: build/C/man2/mlock.2:165
4506 msgid ""
4507 "The result of the addition I<start>+I<len> was less than I<start> (e.g., the "
4508 "addition may have resulted in an overflow)."
4509 msgstr ""
4510 "I<start>+I<len> の加算の結果が I<start> よりも小さかった\n"
4511 "(例えば、加算でオーバーフローが発生したなど)。"
4512
4513 #. type: Plain text
4514 #: build/C/man2/mlock.2:170
4515 msgid "(Not on Linux)  I<addr> was not a multiple of the page size."
4516 msgstr ""
4517 "(Linux ではこの意味で使われない)  I<addr> がページサイズの倍数ではない。"
4518
4519 #. type: Plain text
4520 #: build/C/man2/mlock.2:174
4521 msgid ""
4522 "Some of the specified address range does not correspond to mapped pages in "
4523 "the address space of the process."
4524 msgstr ""
4525 "指定されたアドレス範囲がプロセスのアドレス空間にマップされたページと 一致しな"
4526 "い。"
4527
4528 #. type: Plain text
4529 #: build/C/man2/mlock.2:177
4530 msgid "For B<mlockall>():"
4531 msgstr "B<mlockall>()  用として:"
4532
4533 #. type: Plain text
4534 #: build/C/man2/mlock.2:180
4535 msgid "Unknown I<flags> were specified."
4536 msgstr "未知の I<flags> が指定された。"
4537
4538 #. type: Plain text
4539 #: build/C/man2/mlock.2:183
4540 msgid "For B<munlockall>():"
4541 msgstr "B<munlockall>()  用として:"
4542
4543 #. type: Plain text
4544 #: build/C/man2/mlock.2:187
4545 msgid ""
4546 "(Linux 2.6.8 and earlier) The caller was not privileged (B<CAP_IPC_LOCK>)."
4547 msgstr ""
4548 "(Linux 2.6.8 以前) 呼び出し元が権限 (B<CAP_IPC_LOCK>)  を持っていない。"
4549
4550 #. type: Plain text
4551 #: build/C/man2/mlock.2:189
4552 msgid "POSIX.1-2001, SVr4."
4553 msgstr "POSIX.1-2001, SVr4."
4554
4555 #. type: SH
4556 #: build/C/man2/mlock.2:189 build/C/man2/mmap.2:487 build/C/man2/msync.2:105
4557 #, no-wrap
4558 msgid "AVAILABILITY"
4559 msgstr "可用性"
4560
4561 #. type: Plain text
4562 #: build/C/man2/mlock.2:201
4563 msgid ""
4564 "On POSIX systems on which B<mlock>()  and B<munlock>()  are available, "
4565 "B<_POSIX_MEMLOCK_RANGE> is defined in I<E<lt>unistd.hE<gt>> and the number "
4566 "of bytes in a page can be determined from the constant B<PAGESIZE> (if "
4567 "defined) in I<E<lt>limits.hE<gt>> or by calling I<sysconf(_SC_PAGESIZE)>."
4568 msgstr ""
4569 "B<mlock>()  と B<munlock>()  が使用可能な POSIX システムでは "
4570 "B<_POSIX_MEMLOCK_RANGE> が I<E<lt>unistd.hE<gt>> で定義されている。 また、"
4571 "ページあたりのバイト数は、 I<E<lt>limits.hE<gt>> で定義される定数 "
4572 "B<PAGESIZE> から (定義されている場合)、もしくは I<sysconf(_SC_PAGESIZE)> を呼"
4573 "び出すことで決定できる。"
4574
4575 #.  POSIX.1-2001: It shall be defined to -1 or 0 or 200112L.
4576 #.  -1: unavailable, 0: ask using sysconf().
4577 #.  glibc defines it to 1.
4578 #. type: Plain text
4579 #: build/C/man2/mlock.2:214
4580 msgid ""
4581 "On POSIX systems on which B<mlockall>()  and B<munlockall>()  are available, "
4582 "B<_POSIX_MEMLOCK> is defined in I<E<lt>unistd.hE<gt>> to a value greater "
4583 "than 0.  (See also B<sysconf>(3).)"
4584 msgstr ""
4585 "B<mlockall>()  と B<munlockall>()  が利用可能な POSIX システムでは、 "
4586 "B<_POSIX_MEMLOCK> は I<E<lt>unistd.hE<gt>> で 0 より大きい値に定義されている "
4587 "(B<sysconf>(3)  も参照のこと)。"
4588
4589 #. type: Plain text
4590 #: build/C/man2/mlock.2:232
4591 msgid ""
4592 "Memory locking has two main applications: real-time algorithms and high-"
4593 "security data processing.  Real-time applications require deterministic "
4594 "timing, and, like scheduling, paging is one major cause of unexpected "
4595 "program execution delays.  Real-time applications will usually also switch "
4596 "to a real-time scheduler with B<sched_setscheduler>(2).  Cryptographic "
4597 "security software often handles critical bytes like passwords or secret keys "
4598 "as data structures.  As a result of paging, these secrets could be "
4599 "transferred onto a persistent swap store medium, where they might be "
4600 "accessible to the enemy long after the security software has erased the "
4601 "secrets in RAM and terminated.  (But be aware that the suspend mode on "
4602 "laptops and some desktop computers will save a copy of the system's RAM to "
4603 "disk, regardless of memory locks.)"
4604 msgstr ""
4605 "メモリのロックの用途としては主に二つある: リアルタイム アルゴリズムと高いセ"
4606 "キュリティの必要なデータ処理である。リアルタイムの アプリケーションは決定的な"
4607 "タイミングやスケジューリングを必要とするが、 ページングは予期しないプログラム"
4608 "の実行遅延をもたらす主要な要因となる。 リアルタイムのアプリケーションはたいて"
4609 "いは B<sched_setscheduler>(2)  でリアルタイムスケジューラに変更される。 暗号"
4610 "やセキュリティのソフトウェアはしばしばパスワードや秘密鍵のデータの ような重要"
4611 "なバイト列を扱う。ページングの結果、これらの秘密が スワップ用の固定媒体に転送"
4612 "されるかもしれない。そして、セキュリティ・ ソフトウェアが RAM 上の秘密を削除"
4613 "して終了したずっと後になっても、 このスワップされたデータには敵がアクセスでき"
4614 "る可能性がある (しかし、ラップトップといくつかのデスクトップコンピュータの サ"
4615 "スペンドモードはシステムの RAM の内容をメモリのロックに関わらず ディスクに保"
4616 "存することに注意)。"
4617
4618 #. type: Plain text
4619 #: build/C/man2/mlock.2:245
4620 msgid ""
4621 "Real-time processes that are using B<mlockall>()  to prevent delays on page "
4622 "faults should reserve enough locked stack pages before entering the time-"
4623 "critical section, so that no page fault can be caused by function calls.  "
4624 "This can be achieved by calling a function that allocates a sufficiently "
4625 "large automatic variable (an array) and writes to the memory occupied by "
4626 "this array in order to touch these stack pages.  This way, enough pages will "
4627 "be mapped for the stack and can be locked into RAM.  The dummy writes ensure "
4628 "that not even copy-on-write page faults can occur in the critical section."
4629 msgstr ""
4630 "リアルタイムプロセスが B<mlockall>()  を使ってページフォールトによる遅延を防"
4631 "ごうとする場合、 関数呼び出しによってページフォールトが発生しないように、 時"
4632 "間制限の厳しい部分 (time-critical section) に入る前に 十分な量のロックされた"
4633 "スタックを確保しておく必要がある。 これを実現するには、十分な大きさの自動変"
4634 "数 (の配列) を確保し、 これらのスタック用のページがメモリ上に確保されるように"
4635 "この配列に 書き込みを行う関数を用意し、これを呼び出せばよい。こうすること"
4636 "で、 十分な量のページがスタックにマッピングされ、RAM にロックされる。 ダミー"
4637 "の書き込みを行うことによって、 時間制限の厳しい部分 (critical section) 内では"
4638 "書き込み時コピーによる ページフォールトさえも発生しないことが保証される。"
4639
4640 #. type: Plain text
4641 #: build/C/man2/mlock.2:251
4642 msgid ""
4643 "Memory locks are not inherited by a child created via B<fork>(2)  and are "
4644 "automatically removed (unlocked) during an B<execve>(2)  or when the process "
4645 "terminates."
4646 msgstr ""
4647 "メモリロックは B<fork>(2)  で作成された子プロセスには継承されず、 B<execve>"
4648 "(2)  が呼ばれたり、プロセスが終了した場合は 自動的に削除される (ロック解除さ"
4649 "れる)。"
4650
4651 #. type: Plain text
4652 #: build/C/man2/mlock.2:255
4653 msgid ""
4654 "The memory lock on an address range is automatically removed if the address "
4655 "range is unmapped via B<munmap>(2)."
4656 msgstr ""
4657 "あるアドレス範囲に対するメモリロックは、そのアドレス範囲が B<munmap>(2)  に"
4658 "よってアンマップされた場合は削除される。"
4659
4660 #. type: Plain text
4661 #: build/C/man2/mlock.2:268
4662 msgid ""
4663 "Memory locks do not stack, that is, pages which have been locked several "
4664 "times by calls to B<mlock>()  or B<mlockall>()  will be unlocked by a single "
4665 "call to B<munlock>()  for the corresponding range or by B<munlockall>().  "
4666 "Pages which are mapped to several locations or by several processes stay "
4667 "locked into RAM as long as they are locked at least at one location or by at "
4668 "least one process."
4669 msgstr ""
4670 "メモリのロックは累積しない。 すなわち複数回 B<mlock>()  や B<mlockall>()  を"
4671 "呼び出してロックされたページでも、 対応する範囲に対して B<munlock>()  を 1 回"
4672 "呼び出したり B<munlockall>()  を呼び出したりするだけでロック解除される。 複数"
4673 "の場所や複数のプロセスにマップされているページは、少なくとも一つの場所、 一つ"
4674 "のプロセスでロックされている限りは RAM に残り続ける。"
4675
4676 #. type: Plain text
4677 #: build/C/man2/mlock.2:279
4678 msgid ""
4679 "Under Linux, B<mlock>()  and B<munlock>()  automatically round I<addr> down "
4680 "to the nearest page boundary.  However, POSIX.1-2001 allows an "
4681 "implementation to require that I<addr> is page aligned, so portable "
4682 "applications should ensure this."
4683 msgstr ""
4684 "Linux では、 B<mlock>()  と B<munlock>()  は自動的に I<addr> を端数切り捨てに"
4685 "より一番近いページ境界へと丸める。 しかし POSIX.1-2001 は I<addr> がページ境"
4686 "界に合っていることを要求する実装も許している。 そのため移植性を意図したアプリ"
4687 "ケーションではきちんと境界に合わせた方が良い。"
4688
4689 #. type: Plain text
4690 #: build/C/man2/mlock.2:292
4691 msgid ""
4692 "The I<VmLck> field of the Linux-specific I</proc/PID/status> file shows how "
4693 "many kilobytes of memory the process with ID I<PID> has locked using B<mlock>"
4694 "(), B<mlockall>(), and B<mmap>(2)  B<MAP_LOCKED>."
4695 msgstr ""
4696 "Linux 固有の I</proc/PID/status> ファイルの I<VmLck> フィールドには、\n"
4697 "B<mlock>(), B<mlockall>() および B<mmap>(2) B<MAP_LOCKED> を使って、\n"
4698 "ID が I<PID> のプロセスがロックしているメモリ量 (キロバイト単位) が\n"
4699 "表示される。"
4700
4701 #. type: SS
4702 #: build/C/man2/mlock.2:292
4703 #, no-wrap
4704 msgid "Limits and permissions"
4705 msgstr "制限と権限"
4706
4707 #. type: Plain text
4708 #: build/C/man2/mlock.2:299
4709 msgid ""
4710 "In Linux 2.6.8 and earlier, a process must be privileged (B<CAP_IPC_LOCK>)  "
4711 "in order to lock memory and the B<RLIMIT_MEMLOCK> soft resource limit "
4712 "defines a limit on how much memory the process may lock."
4713 msgstr ""
4714 "Linux 2.6.8 以前では、メモリをロックするためには特権 (B<CAP_IPC_LOCK>)  が必"
4715 "要で、 ソフト資源制限 B<RLIMIT_MEMLOCK> はプロセスがどれだけのメモリをロック"
4716 "できるかの制限を定義する。"
4717
4718 #. type: Plain text
4719 #: build/C/man2/mlock.2:305
4720 msgid ""
4721 "Since Linux 2.6.9, no limits are placed on the amount of memory that a "
4722 "privileged process can lock and the B<RLIMIT_MEMLOCK> soft resource limit "
4723 "instead defines a limit on how much memory an unprivileged process may lock."
4724 msgstr ""
4725 "Linux 2.6.9 以降では、特権を持つプロセスがロックできるメモリ量は無制限とな"
4726 "り、 代わりにソフト資源制限 B<RLIMIT_MEMLOCK> は特権を持たないプロセスがロッ"
4727 "クできるメモリ量の制限を定義する。"
4728
4729 #. type: Plain text
4730 #: build/C/man2/mlock.2:313
4731 msgid ""
4732 "In the 2.4 series Linux kernels up to and including 2.4.17, a bug caused the "
4733 "B<mlockall>()  B<MCL_FUTURE> flag to be inherited across a B<fork>(2).  This "
4734 "was rectified in kernel 2.4.18."
4735 msgstr ""
4736 "2.4.17 までの 2.4 シリーズの Linux カーネルには、 B<mlockall>()  "
4737 "B<MCL_FUTURE> フラグが B<fork>(2)  で継承されると言うバグがある。 これはカー"
4738 "ネル 2.4.18 で修正された。"
4739
4740 #.  See the following LKML thread:
4741 #.  http://marc.theaimsgroup.com/?l=linux-kernel&m=113801392825023&w=2
4742 #.  "Rationale for RLIMIT_MEMLOCK"
4743 #.  23 Jan 2006
4744 #. type: Plain text
4745 #: build/C/man2/mlock.2:330
4746 msgid ""
4747 "Since kernel 2.6.9, if a privileged process calls I<mlockall(MCL_FUTURE)> "
4748 "and later drops privileges (loses the B<CAP_IPC_LOCK> capability by, for "
4749 "example, setting its effective UID to a nonzero value), then subsequent "
4750 "memory allocations (e.g., B<mmap>(2), B<brk>(2))  will fail if the "
4751 "B<RLIMIT_MEMLOCK> resource limit is encountered."
4752 msgstr ""
4753 "カーネル 2.6.9 以降では、特権を持ったプロセスが I<mlockall(MCL_FUTURE)> を呼"
4754 "び出した後で、特権をなくした場合 (例えば、 実効 UID を 0 以外の値に変更するな"
4755 "どにより、 B<CAP_IPC_LOCK> ケーパビリティを失った場合)、リソース上限 "
4756 "B<RLIMIT_MEMLOCK> に達すると、それ以降のメモリ割り当て (例えば B<mmap>(2), "
4757 "B<brk>(2))  は失敗する。"
4758
4759 #. type: Plain text
4760 #: build/C/man2/mlock.2:337
4761 msgid ""
4762 "B<mmap>(2), B<setrlimit>(2), B<shmctl>(2), B<sysconf>(3), B<proc>(5), "
4763 "B<capabilities>(7)"
4764 msgstr ""
4765 "B<mmap>(2), B<setrlimit>(2), B<shmctl>(2), B<sysconf>(3), B<proc>(5),\n"
4766 "B<capabilities>(7)"
4767
4768 #. type: TH
4769 #: build/C/man2/mmap.2:40
4770 #, no-wrap
4771 msgid "MMAP"
4772 msgstr "MMAP"
4773
4774 #. type: TH
4775 #: build/C/man2/mmap.2:40 build/C/man2/mmap2.2:29
4776 #, no-wrap
4777 msgid "2012-04-16"
4778 msgstr "2012-04-16"
4779
4780 #. type: Plain text
4781 #: build/C/man2/mmap.2:43
4782 msgid "mmap, munmap - map or unmap files or devices into memory"
4783 msgstr "mmap, munmap - ファイルやデバイスをメモリにマップ/アンマップする"
4784
4785 #. type: Plain text
4786 #: build/C/man2/mmap.2:51
4787 #, no-wrap
4788 msgid ""
4789 "B<void *mmap(void *>I<addr>B<, size_t >I<length>B<, int >I<prot>B<, int >I<flags>B<,>\n"
4790 "B<           int >I<fd>B<, off_t >I<offset>B<);>\n"
4791 "B<int munmap(void *>I<addr>B<, size_t >I<length>B<);>\n"
4792 msgstr ""
4793 "B<void *mmap(void *>I<addr>B<, size_t >I<length>B<, int >I<prot>B<, int >I<flags>B<,>\n"
4794 "B<           int >I<fd>B<, off_t >I<offset>B<);>\n"
4795 "B<int munmap(void *>I<addr>B<, size_t >I<length>B<);>\n"
4796
4797 #. type: Plain text
4798 #: build/C/man2/mmap.2:61
4799 msgid ""
4800 "B<mmap>()  creates a new mapping in the virtual address space of the calling "
4801 "process.  The starting address for the new mapping is specified in I<addr>.  "
4802 "The I<length> argument specifies the length of the mapping."
4803 msgstr ""
4804 "B<mmap>()  は、新しいマッピングを呼び出し元プロセスの仮想アドレス空間に作成す"
4805 "る。 新しいマッピングの開始アドレスは I<addr> で指定される。マッピングの長さ"
4806 "は I<length> 引き数で指定される。"
4807
4808 #.  Before Linux 2.6.24, the address was rounded up to the next page
4809 #.  boundary; since 2.6.24, it is rounded down!
4810 #. type: Plain text
4811 #: build/C/man2/mmap.2:75
4812 msgid ""
4813 "If I<addr> is NULL, then the kernel chooses the address at which to create "
4814 "the mapping; this is the most portable method of creating a new mapping.  If "
4815 "I<addr> is not NULL, then the kernel takes it as a hint about where to place "
4816 "the mapping; on Linux, the mapping will be created at a nearby page "
4817 "boundary.  The address of the new mapping is returned as the result of the "
4818 "call."
4819 msgstr ""
4820 "I<addr> が NULL の場合、カーネルがマッピングを作成するアドレスを選択する。 こ"
4821 "の方法は最も移植性のある新しいマッピングの作成方法である。 I<addr> が NULL で"
4822 "ない場合、カーネルはマッピングをどこに配置するかのヒントとして I<addr> を使用"
4823 "する。Linux では、マッピングはすぐ近くのページ境界に作成される。 新しいマッピ"
4824 "ングのアドレスは、呼び出しの返り値として返される。"
4825
4826 #. type: Plain text
4827 #: build/C/man2/mmap.2:87
4828 msgid ""
4829 "The contents of a file mapping (as opposed to an anonymous mapping; see "
4830 "B<MAP_ANONYMOUS> below), are initialized using I<length> bytes starting at "
4831 "offset I<offset> in the file (or other object) referred to by the file "
4832 "descriptor I<fd>.  I<offset> must be a multiple of the page size as returned "
4833 "by I<sysconf(_SC_PAGE_SIZE)>."
4834 msgstr ""
4835 "ファイルマッピングの内容は、 ファイルディスクリプタ I<fd> で参照されるファイ"
4836 "ル (もしくは他のオブジェクト) のオフセット I<offset> から開始される "
4837 "I<length> バイトのデータで初期化される (ファイルマッピングは無名マッピングの"
4838 "反対語である。 B<MAP_ANONYMOUS> を参照)。 I<offset> は I<sysconf"
4839 "(_SC_PAGE_SIZE)> が返すページサイズの倍数でなければならない。"
4840
4841 #. type: Plain text
4842 #: build/C/man2/mmap.2:95
4843 msgid ""
4844 "The I<prot> argument describes the desired memory protection of the mapping "
4845 "(and must not conflict with the open mode of the file).  It is either "
4846 "B<PROT_NONE> or the bitwise OR of one or more of the following flags:"
4847 msgstr ""
4848 "引き数 I<prot> には、マッピングのメモリ保護をどのように行なうかを指定する "
4849 "(ファイルのオープンモードと矛盾してはいけない)。 I<prot> には、 B<PROT_NONE> "
4850 "か、以下のフラグをひとつ以上ビット毎の論理和 (OR) をとったものを 指定できる。"
4851
4852 #. type: TP
4853 #: build/C/man2/mmap.2:95 build/C/man2/mprotect.2:67
4854 #, no-wrap
4855 msgid "B<PROT_EXEC>"
4856 msgstr "B<PROT_EXEC>"
4857
4858 #. type: Plain text
4859 #: build/C/man2/mmap.2:98
4860 msgid "Pages may be executed."
4861 msgstr "ページは実行可能である。"
4862
4863 #. type: TP
4864 #: build/C/man2/mmap.2:98 build/C/man2/mprotect.2:61
4865 #, no-wrap
4866 msgid "B<PROT_READ>"
4867 msgstr "B<PROT_READ>"
4868
4869 #. type: Plain text
4870 #: build/C/man2/mmap.2:101
4871 msgid "Pages may be read."
4872 msgstr "ページは読み込み可能である。"
4873
4874 #. type: TP
4875 #: build/C/man2/mmap.2:101 build/C/man2/mprotect.2:64
4876 #, no-wrap
4877 msgid "B<PROT_WRITE>"
4878 msgstr "B<PROT_WRITE>"
4879
4880 #. type: Plain text
4881 #: build/C/man2/mmap.2:104
4882 msgid "Pages may be written."
4883 msgstr "ページに書き込み可能である。"
4884
4885 #. type: TP
4886 #: build/C/man2/mmap.2:104 build/C/man2/mprotect.2:58
4887 #, no-wrap
4888 msgid "B<PROT_NONE>"
4889 msgstr "B<PROT_NONE>"
4890
4891 #. type: Plain text
4892 #: build/C/man2/mmap.2:107
4893 msgid "Pages may not be accessed."
4894 msgstr "ページにはアクセスできない。"
4895
4896 #. type: Plain text
4897 #: build/C/man2/mmap.2:116
4898 msgid ""
4899 "The I<flags> argument determines whether updates to the mapping are visible "
4900 "to other processes mapping the same region, and whether updates are carried "
4901 "through to the underlying file.  This behavior is determined by including "
4902 "exactly one of the following values in I<flags>:"
4903 msgstr ""
4904 "I<flags> 引き数により、マッピングに対する更新が同じ領域をマッピングしている "
4905 "他のプロセスに見えるか、更新がマッピング元のファイルを通じて 伝えられるか、が"
4906 "決定される。この動作は、以下の値のいずれか一つだけ (複数は指定できない) を "
4907 "I<flags> に含めることで指定する。"
4908
4909 #. type: TP
4910 #: build/C/man2/mmap.2:116
4911 #, no-wrap
4912 msgid "B<MAP_SHARED>"
4913 msgstr "B<MAP_SHARED>"
4914
4915 #. type: Plain text
4916 #: build/C/man2/mmap.2:126
4917 msgid ""
4918 "Share this mapping.  Updates to the mapping are visible to other processes "
4919 "that map this file, and are carried through to the underlying file.  The "
4920 "file may not actually be updated until B<msync>(2)  or B<munmap>()  is "
4921 "called."
4922 msgstr ""
4923 "このマッピングを共有する。 マッピングに対する更新はこのファイルをマッピングし"
4924 "ている他のプロセス から見える。更新はマッピング元のファイルを通じて伝えられ"
4925 "る。 ただし、ファイルの実際の更新は B<msync>(2)  または B<munmap>()  が呼ばれ"
4926 "るまで行われないこともある。"
4927
4928 #. type: TP
4929 #: build/C/man2/mmap.2:126
4930 #, no-wrap
4931 msgid "B<MAP_PRIVATE>"
4932 msgstr "B<MAP_PRIVATE>"
4933
4934 #. type: Plain text
4935 #: build/C/man2/mmap.2:135
4936 msgid ""
4937 "Create a private copy-on-write mapping.  Updates to the mapping are not "
4938 "visible to other processes mapping the same file, and are not carried "
4939 "through to the underlying file.  It is unspecified whether changes made to "
4940 "the file after the B<mmap>()  call are visible in the mapped region."
4941 msgstr ""
4942 "プライベートな copy-on-write (書き込み時コピー) マップを生成する。 マッピング"
4943 "に対する更新は同じファイルをマッピングしている他のプロセス には見えず、更新が"
4944 "マッピング元のファイルを通じて伝えられることもない。 B<mmap>()  の呼び出し後"
4945 "にマッピング元のファイルに対して行われた変更が、 マップ領域に反映されるかどう"
4946 "かは規定されていない。"
4947
4948 #. type: Plain text
4949 #: build/C/man2/mmap.2:137
4950 msgid "Both of these flags are described in POSIX.1-2001."
4951 msgstr "上記の二つのフラグは POSIX.1-2001 で規定されている。"
4952
4953 #. type: Plain text
4954 #: build/C/man2/mmap.2:140
4955 msgid ""
4956 "In addition, zero or more of the following values can be ORed in I<flags>:"
4957 msgstr ""
4958 "さらに、以下の値のうち 0 個以上をビット毎の論理和 (OR) で I<flags> に指定する"
4959 "ことができる。"
4960
4961 #. type: TP
4962 #: build/C/man2/mmap.2:140
4963 #, no-wrap
4964 msgid "B<MAP_32BIT> (since Linux 2.4.20, 2.6)"
4965 msgstr "B<MAP_32BIT> (Linux 2.4.20, 2.6 以降)"
4966
4967 #.  See http://lwn.net/Articles/294642 "Tangled up in threads", 19 Aug 08
4968 #. type: Plain text
4969 #: build/C/man2/mmap.2:156
4970 msgid ""
4971 "Put the mapping into the first 2 Gigabytes of the process address space.  "
4972 "This flag is only supported on x86-64, for 64-bit programs.  It was added to "
4973 "allow thread stacks to be allocated somewhere in the first 2GB of memory, so "
4974 "as to improve context-switch performance on some early 64-bit processors.  "
4975 "Modern x86-64 processors no longer have this performance problem, so use of "
4976 "this flag is not required on those systems.  The B<MAP_32BIT> flag is "
4977 "ignored when B<MAP_FIXED> is set."
4978 msgstr ""
4979 "マッピングをプロセスのアドレス空間の先頭 2 ギガバイト以内に配置する。 このフ"
4980 "ラグがサポートされているのは x86-64 アーキテクチャ上の 64 ビットプログラムの"
4981 "みである。 このフラグが追加されたのは、スレッドのスタックをメモリの先頭 2GB "
4982 "以内の どこかに割り当てることで、初期のいくつかの 64 ビットプロセッサにおけ"
4983 "る コンテキストスイッチの性能問題を改善するためである。 最近の x86-64 プロ"
4984 "セッサではこの性能問題はもはや存在せず、 そのようなシステムではこのフラグを使"
4985 "用する必要はない。 B<MAP_FIXED> がセットされている場合は、 B<MAP_32BIT> フラ"
4986 "グは無視される。"
4987
4988 #. type: TP
4989 #: build/C/man2/mmap.2:156
4990 #, no-wrap
4991 msgid "B<MAP_ANON>"
4992 msgstr "B<MAP_ANON>"
4993
4994 #. type: Plain text
4995 #: build/C/man2/mmap.2:161
4996 msgid "Synonym for B<MAP_ANONYMOUS>.  Deprecated."
4997 msgstr "B<MAP_ANONYMOUS> の同義語。非推奨。"
4998
4999 #. type: TP
5000 #: build/C/man2/mmap.2:161
5001 #, no-wrap
5002 msgid "B<MAP_ANONYMOUS>"
5003 msgstr "B<MAP_ANONYMOUS>"
5004
5005 #. type: Plain text
5006 #: build/C/man2/mmap.2:183
5007 msgid ""
5008 "The mapping is not backed by any file; its contents are initialized to "
5009 "zero.  The I<fd> and I<offset> arguments are ignored; however, some "
5010 "implementations require I<fd> to be -1 if B<MAP_ANONYMOUS> (or B<MAP_ANON>)  "
5011 "is specified, and portable applications should ensure this.  The use of "
5012 "B<MAP_ANONYMOUS> in conjunction with B<MAP_SHARED> is only supported on "
5013 "Linux since kernel 2.4."
5014 msgstr ""
5015 "マッピングはどのファイルとも関連付けされない。 マッピングの内容は 0 で初期化"
5016 "される。 引き数 I<fd> と I<offset> は無視される。 ただし、実装によっては "
5017 "B<MAP_ANONYMOUS> (もしくは B<MAP_ANON>)  が指定された場合、 I<fd> を -1 にす"
5018 "る必要があり、 移植性が必要なアプリケーションでは必ず I<fd> を -1 にすべきで"
5019 "ある。 B<MAP_ANONYMOUS> と B<MAP_SHARED> を組み合わせての利用は カーネル 2.4 "
5020 "以降の Linux でのみサポートされている。"
5021
5022 #. type: TP
5023 #: build/C/man2/mmap.2:183
5024 #, no-wrap
5025 msgid "B<MAP_DENYWRITE>"
5026 msgstr "B<MAP_DENYWRITE>"
5027
5028 #.  Introduced in 1.1.36, removed in 1.3.24.
5029 #. type: Plain text
5030 #: build/C/man2/mmap.2:191
5031 msgid ""
5032 "This flag is ignored.  (Long ago, it signaled that attempts to write to the "
5033 "underlying file should fail with B<ETXTBUSY>.  But this was a source of "
5034 "denial-of-service attacks.)"
5035 msgstr ""
5036 "このフラグは無視される (ずっと前は、マップ元のファイルへの書き込みを行おうと"
5037 "すると、エラー B<ETXTBUSY> で失敗するようにシグナルが設定されていたが、これ"
5038 "は denial-of-service (サービス拒否) 攻撃の原因となった)。"
5039
5040 #. type: TP
5041 #: build/C/man2/mmap.2:191
5042 #, no-wrap
5043 msgid "B<MAP_EXECUTABLE>"
5044 msgstr "B<MAP_EXECUTABLE>"
5045
5046 #.  Introduced in 1.1.38, removed in 1.3.24. Flag tested in proc_follow_link.
5047 #.  (Long ago, it signaled that the underlying file is an executable.
5048 #.  However, that information was not really used anywhere.)
5049 #.  Linus talked about DOS related to MAP_EXECUTABLE, but he was thinking of
5050 #.  MAP_DENYWRITE?
5051 #. type: Plain text
5052 #: build/C/man2/mmap.2:199
5053 msgid "This flag is ignored."
5054 msgstr "このフラグは無視される。"
5055
5056 #. type: TP
5057 #: build/C/man2/mmap.2:199
5058 #, no-wrap
5059 msgid "B<MAP_FILE>"
5060 msgstr "B<MAP_FILE>"
5061
5062 #.  On some systems, this was required as the opposite of
5063 #.  MAP_ANONYMOUS -- mtk, 1 May 2007
5064 #. type: Plain text
5065 #: build/C/man2/mmap.2:205
5066 msgid "Compatibility flag.  Ignored."
5067 msgstr "互換性のためのフラグ。無視される。"
5068
5069 #. type: TP
5070 #: build/C/man2/mmap.2:205
5071 #, no-wrap
5072 msgid "B<MAP_FIXED>"
5073 msgstr "B<MAP_FIXED>"
5074
5075 #. type: Plain text
5076 #: build/C/man2/mmap.2:223
5077 msgid ""
5078 "Don't interpret I<addr> as a hint: place the mapping at exactly that "
5079 "address.  I<addr> must be a multiple of the page size.  If the memory region "
5080 "specified by I<addr> and I<len> overlaps pages of any existing mapping(s), "
5081 "then the overlapped part of the existing mapping(s) will be discarded.  If "
5082 "the specified address cannot be used, B<mmap>()  will fail.  Because "
5083 "requiring a fixed address for a mapping is less portable, the use of this "
5084 "option is discouraged."
5085 msgstr ""
5086 "I<addr> をアドレスのヒントとして使用するのではなく、 I<addr> で指定されたアド"
5087 "レスをそのまま使用してマッピングを配置する。 I<addr> はページサイズの倍数でな"
5088 "ければならない。 I<addr> と I<len> で指定されたメモリ領域が既存のマッピングの"
5089 "ページと重なる場合、 既存のマッピングの重なった部分は捨てられる。 もし指定さ"
5090 "れたアドレスが使用できない場合、 B<mmap>()  は失敗する。 マッピングに対して固"
5091 "定アドレスを要求するのは移植性の面で劣るので、 このオプションは使用しないこと"
5092 "を推奨する。"
5093
5094 #. type: TP
5095 #: build/C/man2/mmap.2:223
5096 #, no-wrap
5097 msgid "B<MAP_GROWSDOWN>"
5098 msgstr "B<MAP_GROWSDOWN>"
5099
5100 #. type: Plain text
5101 #: build/C/man2/mmap.2:228
5102 msgid ""
5103 "Used for stacks.  Indicates to the kernel virtual memory system that the "
5104 "mapping should extend downward in memory."
5105 msgstr ""
5106 "スタック用に使用される。マッピングをメモリ内で逆向きに行うことを カーネル仮想"
5107 "メモリシステムに指示する。 (訳注:マッピングは通常はメモリ・アドレスが増加す"
5108 "る向きに行うが、 このオプションを指定すると逆向きにマッピングを行う)"
5109
5110 #. type: TP
5111 #: build/C/man2/mmap.2:228
5112 #, no-wrap
5113 msgid "B<MAP_HUGETLB> (since Linux 2.6.32)"
5114 msgstr "B<MAP_HUGETLB> (Linux 2.6.32 以降)"
5115
5116 #. type: Plain text
5117 #: build/C/man2/mmap.2:234
5118 msgid ""
5119 "Allocate the mapping using \"huge pages.\" See the kernel source file "
5120 "I<Documentation/vm/hugetlbpage.txt> for further information."
5121 msgstr ""
5122 "\"huge page\" を使ってマッピングを割り当てる。 詳しい情報は、カーネル・ソース"
5123 "の I<Documentation/vm/hugetlbpage.txt> を参照。"
5124
5125 #. type: TP
5126 #: build/C/man2/mmap.2:234
5127 #, no-wrap
5128 msgid "B<MAP_LOCKED> (since Linux 2.5.37)"
5129 msgstr "B<MAP_LOCKED> (Linux 2.5.37 以降)"
5130
5131 #.  If set, the mapped pages will not be swapped out.
5132 #. type: Plain text
5133 #: build/C/man2/mmap.2:240
5134 msgid ""
5135 "Lock the pages of the mapped region into memory in the manner of B<mlock>"
5136 "(2).  This flag is ignored in older kernels."
5137 msgstr ""
5138 "マップされた領域のページを B<mlock>(2)  の方法でメモリ内にロックする。 それ以"
5139 "前のカーネルでは、このフラグは無視される。"
5140
5141 #. type: TP
5142 #: build/C/man2/mmap.2:240
5143 #, no-wrap
5144 msgid "B<MAP_NONBLOCK> (since Linux 2.5.46)"
5145 msgstr "B<MAP_NONBLOCK> (Linux 2.5.46 以降)"
5146
5147 #. type: Plain text
5148 #: build/C/man2/mmap.2:255
5149 msgid ""
5150 "Only meaningful in conjunction with B<MAP_POPULATE>.  Don't perform read-"
5151 "ahead: only create page tables entries for pages that are already present in "
5152 "RAM.  Since Linux 2.6.23, this flag causes B<MAP_POPULATE> to do nothing.  "
5153 "One day the combination of B<MAP_POPULATE> and B<MAP_NONBLOCK> may be "
5154 "reimplemented."
5155 msgstr ""
5156 "B<MAP_POPULATE> と組み合わせた場合のみ意味を持つ。 read-ahead (前もって読み込"
5157 "むこと) を実行しない。 単に、すでに RAM 上に存在するページに対して ページテー"
5158 "ブルエントリを作成するだけである。 Linux 2.6.23 以降では、このフラグは "
5159 "B<MAP_POPULATE> に何の影響も与えない。 いつか B<MAP_POPULATE> と "
5160 "B<MAP_NONBLOCK> を組み合わせた場合の動作は実装し直されるかもしれない。"
5161
5162 #. type: TP
5163 #: build/C/man2/mmap.2:255
5164 #, no-wrap
5165 msgid "B<MAP_NORESERVE>"
5166 msgstr "B<MAP_NORESERVE>"
5167
5168 #. type: Plain text
5169 #: build/C/man2/mmap.2:270
5170 msgid ""
5171 "Do not reserve swap space for this mapping.  When swap space is reserved, "
5172 "one has the guarantee that it is possible to modify the mapping.  When swap "
5173 "space is not reserved one might get B<SIGSEGV> upon a write if no physical "
5174 "memory is available.  See also the discussion of the file I</proc/sys/vm/"
5175 "overcommit_memory> in B<proc>(5).  In kernels before 2.6, this flag only had "
5176 "effect for private writable mappings."
5177 msgstr ""
5178 "このマッピングに対するスワップ空間の予約を行わない。 スワップ空間を予約した場"
5179 "合は、このマッピングの変更が必ず可能なことが 保証される。予約を行わなかった場"
5180 "合、物理メモリに空きがないと 書き込み時に B<SIGSEGV> エラーを受け取ることがあ"
5181 "る。 B<proc>(5)  の I</proc/sys/vm/overcommit_memory> ファイルについての議論"
5182 "も参照。 バージョン 2.6 より前のカーネルでは、このフラグは書き込み可能な プラ"
5183 "イベート・マッピングについてのみ効果があった。"
5184
5185 #. type: TP
5186 #: build/C/man2/mmap.2:270
5187 #, no-wrap
5188 msgid "B<MAP_POPULATE> (since Linux 2.5.46)"
5189 msgstr "B<MAP_POPULATE> (Linux 2.5.46 以降)"
5190
5191 #. type: Plain text
5192 #: build/C/man2/mmap.2:277
5193 msgid ""
5194 "Populate (prefault) page tables for a mapping.  For a file mapping, this "
5195 "causes read-ahead on the file.  Later accesses to the mapping will not be "
5196 "blocked by page faults.  B<MAP_POPULATE> is only supported for private "
5197 "mappings since Linux 2.6.23."
5198 msgstr ""
5199 "マッピング用のページテーブルを配置 (populate) する ファイルマッピングの場合に"
5200 "は、これによりファイルが先読み (read-ahead)  が行われる。この以後は、マッピン"
5201 "グに対するアクセスがページフォールトで ブロックされることがなくなる。 "
5202 "B<MAP_POPULATE> は Linux 2.6.23 以降でプライベート・マッピングについてのみ サ"
5203 "ポートされている。"
5204
5205 #. type: TP
5206 #: build/C/man2/mmap.2:277
5207 #, no-wrap
5208 msgid "B<MAP_STACK> (since Linux 2.6.27)"
5209 msgstr "B<MAP_STACK> (Linux 2.6.27 以降)"
5210
5211 #.  See http://lwn.net/Articles/294642 "Tangled up in threads", 19 Aug 08
5212 #.  commit cd98a04a59e2f94fa64d5bf1e26498d27427d5e7
5213 #.  http://thread.gmane.org/gmane.linux.kernel/720412
5214 #.  "pthread_create() slow for many threads; also time to revisit 64b
5215 #.   context switch optimization?"
5216 #. type: Plain text
5217 #: build/C/man2/mmap.2:290
5218 msgid ""
5219 "Allocate the mapping at an address suitable for a process or thread stack.  "
5220 "This flag is currently a no-op, but is used in the glibc threading "
5221 "implementation so that if some architectures require special treatment for "
5222 "stack allocations, support can later be transparently implemented for glibc."
5223 msgstr ""
5224 "プロセスやスレッドのスタックに適したアドレスにマッピングを割り当てる。 現在の"
5225 "ところ、このフラグは何もしないが、 glibc のスレッド実装では使用されている。 "
5226 "これは、いくつかのアーキテクチャではスタックの割り当てに関して特別な扱い が必"
5227 "要な場合に、glibc にそのサポートを後で透過的に実装できるようにする ためであ"
5228 "る。"
5229
5230 #. type: TP
5231 #: build/C/man2/mmap.2:290
5232 #, no-wrap
5233 msgid "B<MAP_UNINITIALIZED> (since Linux 2.6.33)"
5234 msgstr "B<MAP_UNINITIALIZED> (Linux 2.6.33 以降)"
5235
5236 #. type: Plain text
5237 #: build/C/man2/mmap.2:300
5238 msgid ""
5239 "Don't clear anonymous pages.  This flag is intended to improve performance "
5240 "on embedded devices.  This flag is only honored if the kernel was configured "
5241 "with the B<CONFIG_MMAP_ALLOW_UNINITIALIZED> option.  Because of the security "
5242 "implications, that option is normally enabled only on embedded devices (i."
5243 "e., devices where one has complete control of the contents of user memory)."
5244 msgstr ""
5245 "無名ページ (anonymous page) のクリアを行わない。このフラグは組み込みデバイ"
5246 "ス\n"
5247 "での性能向上を目的に作られてものである。カーネルの設定で\n"
5248 "B<CONFIG_MMAP_ALLOW_UNINITIALIZED> オプションが有効になっている場合のみ、\n"
5249 "このフラグは効果を持つ。\n"
5250 "セキュリティ面の考慮から、このオプションは通常組み込みデバイス (すなわち、\n"
5251 "ユーザメモリの内容を完全に制御化におけるデバイス) においてのみ有効にされる。"
5252
5253 #. type: Plain text
5254 #: build/C/man2/mmap.2:308
5255 msgid ""
5256 "Of the above flags, only B<MAP_FIXED> is specified in POSIX.1-2001.  "
5257 "However, most systems also support B<MAP_ANONYMOUS> (or its synonym "
5258 "B<MAP_ANON>)."
5259 msgstr ""
5260 "上記のフラグの中では、 B<MAP_FIXED> だけが POSIX.1-2001 で規定されている。 し"
5261 "かしながら、ほとんどのシステムで B<MAP_ANONYMOUS> (またはその同義語である "
5262 "B<MAP_ANON>)  もサポートされている。"
5263
5264 #. type: Plain text
5265 #: build/C/man2/mmap.2:315
5266 msgid ""
5267 "Some systems document the additional flags B<MAP_AUTOGROW>, "
5268 "B<MAP_AUTORESRV>, B<MAP_COPY>, and B<MAP_LOCAL>."
5269 msgstr ""
5270 "いくつかのシステムでは、上記以外にフラグとして B<MAP_AUTOGROW>, "
5271 "B<MAP_AUTORESRV>, B<MAP_COPY>, B<MAP_LOCAL> が規定されている。"
5272
5273 #. type: Plain text
5274 #: build/C/man2/mmap.2:321
5275 msgid ""
5276 "Memory mapped by B<mmap>()  is preserved across B<fork>(2), with the same "
5277 "attributes."
5278 msgstr ""
5279 "B<mmap>()  によってマップされたメモリの属性は B<fork>(2)  の際に継承される。"
5280
5281 #. type: Plain text
5282 #: build/C/man2/mmap.2:329
5283 msgid ""
5284 "A file is mapped in multiples of the page size.  For a file that is not a "
5285 "multiple of the page size, the remaining memory is zeroed when mapped, and "
5286 "writes to that region are not written out to the file.  The effect of "
5287 "changing the size of the underlying file of a mapping on the pages that "
5288 "correspond to added or removed regions of the file is unspecified."
5289 msgstr ""
5290 "ファイルはページサイズの整数倍の領域にマップされる。サイズがページサイズの 整"
5291 "数倍でないファイルの場合、マップ時に残りの領域は 0 で埋められ、この領域へ 書"
5292 "きこみを行ってもファイルに書き出されることはない。マッピングを行った元 ファイ"
5293 "ルのサイズを変更した場合、元ファイルの追加されたり削除された領域に対応 する"
5294 "マップされたページに対してどのような影響があるかは規定されていない。"
5295
5296 #. type: SS
5297 #: build/C/man2/mmap.2:329
5298 #, no-wrap
5299 msgid "munmap()"
5300 msgstr "munmap()"
5301
5302 #. type: Plain text
5303 #: build/C/man2/mmap.2:339
5304 msgid ""
5305 "The B<munmap>()  system call deletes the mappings for the specified address "
5306 "range, and causes further references to addresses within the range to "
5307 "generate invalid memory references.  The region is also automatically "
5308 "unmapped when the process is terminated.  On the other hand, closing the "
5309 "file descriptor does not unmap the region."
5310 msgstr ""
5311 "システムコール B<munmap>()  は指定されたアドレス範囲のマップを消去し、 これ以"
5312 "降のその範囲内へのメモリ参照は不正となる。 この領域は、プロセスが終了したとき"
5313 "にも自動的にアンマップされる。 一方、ファイル記述子をクローズしても、この領域"
5314 "はアンマップされない。"
5315
5316 #. type: Plain text
5317 #: build/C/man2/mmap.2:349
5318 msgid ""
5319 "The address I<addr> must be a multiple of the page size.  All pages "
5320 "containing a part of the indicated range are unmapped, and subsequent "
5321 "references to these pages will generate B<SIGSEGV>.  It is not an error if "
5322 "the indicated range does not contain any mapped pages."
5323 msgstr ""
5324 "I<addr> アドレスはページサイズの整数倍でなければならない。指定された範囲の一"
5325 "部分を 含む全てのページはアンマップされ、これ以降にこれらのページへの参照があ"
5326 "ると B<SIGSEGV> が発生する。 指定した範囲内にマップされたページが一つも含まれ"
5327 "ていない場合でも エラーにならない。"
5328
5329 #. type: SS
5330 #: build/C/man2/mmap.2:349
5331 #, no-wrap
5332 msgid "Timestamps changes for file-backed mappings"
5333 msgstr "ファイルと関連付けられたマッピングに対するタイムスタンプの更新"
5334
5335 #. type: Plain text
5336 #: build/C/man2/mmap.2:356
5337 msgid ""
5338 "For file-backed mappings, the I<st_atime> field for the mapped file may be "
5339 "updated at any time between the B<mmap>()  and the corresponding unmapping; "
5340 "the first reference to a mapped page will update the field if it has not "
5341 "been already."
5342 msgstr ""
5343 "ファイルと関連付けられたマッピングの場合、マッピングされたファイルの "
5344 "I<st_atime> フィールドは、 B<mmap>()  されてからアンマップ (unmap) されるまで"
5345 "の間に更新されることがある。 それまでに更新が行われていなければ、マップされた"
5346 "ページへの最初の参照があった 際に更新される。"
5347
5348 #. type: Plain text
5349 #: build/C/man2/mmap.2:373
5350 msgid ""
5351 "The I<st_ctime> and I<st_mtime> field for a file mapped with B<PROT_WRITE> "
5352 "and B<MAP_SHARED> will be updated after a write to the mapped region, and "
5353 "before a subsequent B<msync>(2)  with the B<MS_SYNC> or B<MS_ASYNC> flag, if "
5354 "one occurs."
5355 msgstr ""
5356 "B<PROT_WRITE> と B<MAP_SHARED> の両方を指定してマップされたファイルの場合、書"
5357 "き込みがあると、 I<st_ctime> と I<st_mtime> の両フィールドは、マップされた領"
5358 "域への書き込みより後で、 B<MS_SYNC> または B<MS_ASYNC> フラグを指定して "
5359 "B<msync>(2)  が呼ばれる前までに更新される。"
5360
5361 #. type: Plain text
5362 #: build/C/man2/mmap.2:390
5363 msgid ""
5364 "On success, B<mmap>()  returns a pointer to the mapped area.  On error, the "
5365 "value B<MAP_FAILED> (that is, I<(void\\ *)\\ -1>)  is returned, and I<errno> "
5366 "is set appropriately.  On success, B<munmap>()  returns 0, on failure -1, "
5367 "and I<errno> is set (probably to B<EINVAL>)."
5368 msgstr ""
5369 "B<mmap>()  は成功するとマップされた領域へのポインタを返す。 失敗すると値 "
5370 "B<MAP_FAILED> (つまり I<(void\\ *)\\ -1>)  を返し、 I<errno> がエラーの内容に"
5371 "したがってセットされる。 B<munmap>()  は成功すると 0 を返す。失敗すると -1 を"
5372 "返し、 I<errno> がセットされる (多くの場合 B<EINVAL> になるだろう)。"
5373
5374 #. type: TP
5375 #: build/C/man2/mmap.2:391 build/C/man2/mprotect.2:80
5376 #: build/C/man3/shm_open.3:185 build/C/man3/shm_open.3:190
5377 #: build/C/man2/shmctl.2:295 build/C/man2/shmget.2:186
5378 #: build/C/man2/shmop.2:189
5379 #, no-wrap
5380 msgid "B<EACCES>"
5381 msgstr "B<EACCES>"
5382
5383 #. type: Plain text
5384 #: build/C/man2/mmap.2:411
5385 msgid ""
5386 "A file descriptor refers to a non-regular file.  Or B<MAP_PRIVATE> was "
5387 "requested, but I<fd> is not open for reading.  Or B<MAP_SHARED> was "
5388 "requested and B<PROT_WRITE> is set, but I<fd> is not open in read/write "
5389 "(B<O_RDWR>)  mode.  Or B<PROT_WRITE> is set, but the file is append-only."
5390 msgstr ""
5391 "以下のいずれかの場合。 ファイル記述子の参照先が通常のファイルではない (non-"
5392 "regular file) 。 B<MAP_PRIVATE> を要求したが I<fd> は読み込み用にオープンされ"
5393 "ていない。 B<MAP_SHARED> を要求して B<PROT_WRITE> をセットしたが I<fd> は読み"
5394 "書きモード (B<O_RDWR>)  でオープンされていない、 B<PROT_WRITE> をセットした"
5395 "が、ファイルは追加 (append) 専用である。"
5396
5397 #. type: Plain text
5398 #: build/C/man2/mmap.2:415
5399 msgid ""
5400 "The file has been locked, or too much memory has been locked (see "
5401 "B<setrlimit>(2))."
5402 msgstr ""
5403 "ファイルがロックされている。またはロックされているメモリが多すぎる "
5404 "(B<setrlimit>(2)  を参照)。"
5405
5406 #. type: Plain text
5407 #: build/C/man2/mmap.2:421
5408 msgid ""
5409 "I<fd> is not a valid file descriptor (and B<MAP_ANONYMOUS> was not set)."
5410 msgstr ""
5411 "I<fd> が有効なファイル記述子 (file descriptor) ではない (かつ "
5412 "B<MAP_ANONYMOUS> がセットされていない)。"
5413
5414 #. type: Plain text
5415 #: build/C/man2/mmap.2:429
5416 msgid ""
5417 "We don't like I<addr>, I<length>, or I<offset> (e.g., they are too large, or "
5418 "not aligned on a page boundary)."
5419 msgstr ""
5420 "I<addr> か I<length> か I<offset> が適切でない (例えば、大きすぎるとか、ペー"
5421 "ジ境界にアラインメントされていない)。"
5422
5423 #. type: Plain text
5424 #: build/C/man2/mmap.2:434
5425 msgid "(since Linux 2.6.12)  I<length> was 0."
5426 msgstr "(Linux 2.6.12 以降)  I<length> が 0 であった。"
5427
5428 #. type: Plain text
5429 #: build/C/man2/mmap.2:442
5430 msgid ""
5431 "I<flags> contained neither B<MAP_PRIVATE> or B<MAP_SHARED>, or contained "
5432 "both of these values."
5433 msgstr ""
5434 "I<flags> に B<MAP_PRIVATE> と B<MAP_SHARED> のどちらも含まれていなかった、も"
5435 "しくは その両方が含まれていた。"
5436
5437 #. type: TP
5438 #: build/C/man2/mmap.2:442 build/C/man3/shm_open.3:227
5439 #: build/C/man2/shmget.2:202
5440 #, no-wrap
5441 msgid "B<ENFILE>"
5442 msgstr "B<ENFILE>"
5443
5444 #.  [2.6.7] shmem_zero_setup()-->shmem_file_setup()-->get_empty_filp()
5445 #. type: Plain text
5446 #: build/C/man2/mmap.2:450 build/C/man2/shmget.2:206
5447 msgid "The system limit on the total number of open files has been reached."
5448 msgstr "システム全体でオープンされているファイルの総数が上限に達した。"
5449
5450 #. type: Plain text
5451 #: build/C/man2/mmap.2:454
5452 msgid ""
5453 "The underlying file system of the specified file does not support memory "
5454 "mapping."
5455 msgstr ""
5456 "指定されたファイルが置かれているファイルシステムがメモリマッピングをサポート "
5457 "していない。"
5458
5459 #. type: Plain text
5460 #: build/C/man2/mmap.2:458
5461 msgid ""
5462 "No memory is available, or the process's maximum number of mappings would "
5463 "have been exceeded."
5464 msgstr ""
5465 "メモリに空きがない、または処理中のプロセスのマッピング数が最大数を超過した。"
5466
5467 #.  (Since 2.4.25 / 2.6.0.)
5468 #. type: Plain text
5469 #: build/C/man2/mmap.2:467
5470 msgid ""
5471 "The I<prot> argument asks for B<PROT_EXEC> but the mapped area belongs to a "
5472 "file on a file system that was mounted no-exec."
5473 msgstr ""
5474 "I<prot> 引き数は B<PROT_EXEC> を行うように指定されているが、 no-exec でマウン"
5475 "トされたファイルシステム上のファイルに マップ領域が対応している。"
5476
5477 #. type: TP
5478 #: build/C/man2/mmap.2:467
5479 #, no-wrap
5480 msgid "B<ETXTBSY>"
5481 msgstr "B<ETXTBSY>"
5482
5483 #. type: Plain text
5484 #: build/C/man2/mmap.2:473
5485 msgid ""
5486 "B<MAP_DENYWRITE> was set but the object specified by I<fd> is open for "
5487 "writing."
5488 msgstr ""
5489 "B<MAP_DENYWRITE> がセットされているが I<fd> で指定されているオブジェクトは書"
5490 "き込み用に開かれている。"
5491
5492 #. type: Plain text
5493 #: build/C/man2/mmap.2:475
5494 msgid "Use of a mapped region can result in these signals:"
5495 msgstr "マップ領域を利用する際に、以下のシグナルが発生することがある:"
5496
5497 #. type: TP
5498 #: build/C/man2/mmap.2:475
5499 #, no-wrap
5500 msgid "B<SIGSEGV>"
5501 msgstr "B<SIGSEGV>"
5502
5503 #. type: Plain text
5504 #: build/C/man2/mmap.2:478
5505 msgid "Attempted write into a region mapped as read-only."
5506 msgstr "読み込み専用で mmap された領域へ書き込みを行おうとした。"
5507
5508 #. type: TP
5509 #: build/C/man2/mmap.2:478
5510 #, no-wrap
5511 msgid "B<SIGBUS>"
5512 msgstr "B<SIGBUS>"
5513
5514 #. type: Plain text
5515 #: build/C/man2/mmap.2:483
5516 msgid ""
5517 "Attempted access to a portion of the buffer that does not correspond to the "
5518 "file (for example, beyond the end of the file, including the case where "
5519 "another process has truncated the file)."
5520 msgstr ""
5521 "バッファのうち、ファイルに関連づけられていない部分 (例えばファイル末尾を越え"
5522 "た部分など。これには 他のプロセスがファイルを切り詰めた場合なども含まれる)  "
5523 "にアクセスしようとした。"
5524
5525 #.  SVr4 documents additional error codes ENXIO and ENODEV.
5526 #.  SUSv2 documents additional error codes EMFILE and EOVERFLOW.
5527 #. type: Plain text
5528 #: build/C/man2/mmap.2:487
5529 msgid "SVr4, 4.4BSD, POSIX.1-2001."
5530 msgstr "SVr4, 4.4BSD, POSIX.1-2001."
5531
5532 #.  POSIX.1-2001: It shall be defined to -1 or 0 or 200112L.
5533 #.  -1: unavailable, 0: ask using sysconf().
5534 #.  glibc defines it to 1.
5535 #. type: Plain text
5536 #: build/C/man2/mmap.2:501
5537 msgid ""
5538 "On POSIX systems on which B<mmap>(), B<msync>(2)  and B<munmap>()  are "
5539 "available, B<_POSIX_MAPPED_FILES> is defined in I<E<lt>unistd.hE<gt>> to a "
5540 "value greater than 0.  (See also B<sysconf>(3).)"
5541 msgstr ""
5542 "B<mmap>(), B<msync>(2)  B<munmap>()  が利用可能な POSIX システムでは、 "
5543 "B<_POSIX_MAPPED_FILES> は E<lt>unistd.hE<gt> で 0 より大きな値に定義される "
5544 "(B<sysconf>(3)  も参照のこと)。"
5545
5546 #.  Since around glibc 2.1/2.2, depending on the platform.
5547 #. type: Plain text
5548 #: build/C/man2/mmap.2:516
5549 msgid ""
5550 "This page describes the interface provided by the glibc B<mmap>()  wrapper "
5551 "function.  Originally, this function invoked a system call of the same "
5552 "name.  Since kernel 2.4, that system call has been superseded by B<mmap2>"
5553 "(2), and nowadays the glibc B<mmap>()  wrapper function invokes B<mmap2>(2)  "
5554 "with a suitably adjusted value for I<offset>."
5555 msgstr ""
5556 "このページでは glibc の B<mmap>() のラッパー関数が提供するインターフェース"
5557 "に\n"
5558 "ついて説明している。元々は、この関数は同じ名前のシステムコールを起動してい"
5559 "た。\n"
5560 "カーネル 2.4 以降、このシステムコールは B<mmap2>(2) に取って代わられ、現在\n"
5561 "では、 glibc の B<mmap>() のラッパー関数は I<offset> を適切に調整してから\n"
5562 "B<mmap2>(2) を起動する。"
5563
5564 #. type: Plain text
5565 #: build/C/man2/mmap.2:529
5566 msgid ""
5567 "On some hardware architectures (e.g., i386), B<PROT_WRITE> implies "
5568 "B<PROT_READ>.  It is architecture dependent whether B<PROT_READ> implies "
5569 "B<PROT_EXEC> or not.  Portable programs should always set B<PROT_EXEC> if "
5570 "they intend to execute code in the new mapping."
5571 msgstr ""
5572 "(i386 などの) いくつかのアーキテクチャでは、 B<PROT_WRITE> をセットすると、暗"
5573 "黙のうちに B<PROT_READ> がセットされる。 B<PROT_READ> をセットした際に暗黙の"
5574 "うちに B<PROT_EXEC> がセットされるかどうかは、アーキテクチャ依存である。 移植"
5575 "性を考慮したプログラムでは、 新規にマップした領域でコードを実行したい場合は、"
5576 "常に B<PROT_EXEC> をセットすべきである。"
5577
5578 #. type: Plain text
5579 #: build/C/man2/mmap.2:544
5580 msgid ""
5581 "The portable way to create a mapping is to specify I<addr> as 0 (NULL), and "
5582 "omit B<MAP_FIXED> from I<flags>.  In this case, the system chooses the "
5583 "address for the mapping; the address is chosen so as not to conflict with "
5584 "any existing mapping, and will not be 0.  If the B<MAP_FIXED> flag is "
5585 "specified, and I<addr> is 0 (NULL), then the mapped address will be 0 (NULL)."
5586 msgstr ""
5587 "マッピングを作成する移植性のある方法は、 I<addr> に 0 (NULL) を指定し、 "
5588 "I<flags> から B<MAP_FIXED> を外すことである。 この場合、システムがマッピング"
5589 "用のアドレスの選択を行う。 アドレスは既存のマッピングと衝突しないように、 か"
5590 "つ 0 にならないように選択される。 B<MAP_FIXED> フラグが指定され、かつ "
5591 "I<addr> が 0 (NULL)  の場合には、マップされるアドレスが 0 (NULL) になる。"
5592
5593 #. type: Plain text
5594 #: build/C/man2/mmap.2:549
5595 msgid ""
5596 "On Linux there are no guarantees like those suggested above under "
5597 "B<MAP_NORESERVE>.  By default, any process can be killed at any moment when "
5598 "the system runs out of memory."
5599 msgstr ""
5600 "Linux においては、上記の B<MAP_NORESERVE> で述べられているような保証はない。 "
5601 "デフォルトでは、システムがメモリを使い切った場合には、 どのプロセスがいつ強制"
5602 "終了されるか分からないからである。"
5603
5604 #. type: Plain text
5605 #: build/C/man2/mmap.2:556
5606 msgid ""
5607 "In kernels before 2.6.7, the B<MAP_POPULATE> flag only has effect if I<prot> "
5608 "is specified as B<PROT_NONE>."
5609 msgstr ""
5610 "2.6.7 より前のカーネルでは、 I<prot> に B<PROT_NONE> が指定された場合にの"
5611 "み、 B<MAP_POPULATE> フラグが効力を持つ。"
5612
5613 #. type: Plain text
5614 #: build/C/man2/mmap.2:571
5615 msgid ""
5616 "SUSv3 specifies that B<mmap>()  should fail if I<length> is 0.  However, in "
5617 "kernels before 2.6.12, B<mmap>()  succeeded in this case: no mapping was "
5618 "created and the call returned I<addr>.  Since kernel 2.6.12, B<mmap>()  "
5619 "fails with the error B<EINVAL> for this case."
5620 msgstr ""
5621 "SUSv3 では、 I<length> が 0 の場合、 B<mmap>()  は失敗すると規定されている。"
5622 "しかしながら、2.6.12 より前のカーネルでは、 この場合に B<mmap>()  は成功して"
5623 "いた (マッピングは作成されず、 I<addr> が返されていた)。 カーネル 2.6.12 以降"
5624 "では、 B<mmap>()  はエラー B<EINVAL> で失敗する。"
5625
5626 #. type: Plain text
5627 #: build/C/man2/mmap.2:583
5628 msgid ""
5629 "The following program prints part of the file specified in its first command-"
5630 "line argument to standard output.  The range of bytes to be printed is "
5631 "specified via offset and length values in the second and third command-line "
5632 "arguments.  The program creates a memory mapping of the required pages of "
5633 "the file and then uses B<write>(2)  to output the desired bytes."
5634 msgstr ""
5635 "以下のプログラムは、一番目のコマンドライン引き数で指定された ファイルの一部を"
5636 "標準出力に表示する。 表示する範囲は、二番目、三番目のコマンドライン引き数で渡"
5637 "される オフセットと長さで指定される。 このプログラムは、指定されたファイルの"
5638 "必要なページのメモリ・ マッピングを作成し、 B<write>(2)  を使って所望のバイト"
5639 "を出力する。"
5640
5641 #. type: Plain text
5642 #: build/C/man2/mmap.2:591
5643 #, no-wrap
5644 msgid ""
5645 "#include E<lt>sys/mman.hE<gt>\n"
5646 "#include E<lt>sys/stat.hE<gt>\n"
5647 "#include E<lt>fcntl.hE<gt>\n"
5648 "#include E<lt>stdio.hE<gt>\n"
5649 "#include E<lt>stdlib.hE<gt>\n"
5650 "#include E<lt>unistd.hE<gt>\n"
5651 msgstr ""
5652 "#include E<lt>sys/mman.hE<gt>\n"
5653 "#include E<lt>sys/stat.hE<gt>\n"
5654 "#include E<lt>fcntl.hE<gt>\n"
5655 "#include E<lt>stdio.hE<gt>\n"
5656 "#include E<lt>stdlib.hE<gt>\n"
5657 "#include E<lt>unistd.hE<gt>\n"
5658
5659 #. type: Plain text
5660 #: build/C/man2/mmap.2:594 build/C/man2/mprotect.2:172
5661 #, no-wrap
5662 msgid ""
5663 "#define handle_error(msg) \\e\n"
5664 "    do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
5665 msgstr ""
5666 "#define handle_error(msg) \\e\n"
5667 "    do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
5668
5669 #. type: Plain text
5670 #: build/C/man2/mmap.2:604
5671 #, no-wrap
5672 msgid ""
5673 "int\n"
5674 "main(int argc, char *argv[])\n"
5675 "{\n"
5676 "    char *addr;\n"
5677 "    int fd;\n"
5678 "    struct stat sb;\n"
5679 "    off_t offset, pa_offset;\n"
5680 "    size_t length;\n"
5681 "    ssize_t s;\n"
5682 msgstr ""
5683 "int\n"
5684 "main(int argc, char *argv[])\n"
5685 "{\n"
5686 "    char *addr;\n"
5687 "    int fd;\n"
5688 "    struct stat sb;\n"
5689 "    off_t offset, pa_offset;\n"
5690 "    size_t length;\n"
5691 "    ssize_t s;\n"
5692
5693 #. type: Plain text
5694 #: build/C/man2/mmap.2:609
5695 #, no-wrap
5696 msgid ""
5697 "    if (argc E<lt> 3 || argc E<gt> 4) {\n"
5698 "        fprintf(stderr, \"%s file offset [length]\\en\", argv[0]);\n"
5699 "        exit(EXIT_FAILURE);\n"
5700 "    }\n"
5701 msgstr ""
5702 "    if (argc E<lt> 3 || argc E<gt> 4) {\n"
5703 "        fprintf(stderr, \"%s file offset [length]\\en\", argv[0]);\n"
5704 "        exit(EXIT_FAILURE);\n"
5705 "    }\n"
5706
5707 #. type: Plain text
5708 #: build/C/man2/mmap.2:613
5709 #, no-wrap
5710 msgid ""
5711 "    fd = open(argv[1], O_RDONLY);\n"
5712 "    if (fd == -1)\n"
5713 "        handle_error(\"open\");\n"
5714 msgstr ""
5715 "    fd = open(argv[1], O_RDONLY);\n"
5716 "    if (fd == -1)\n"
5717 "        handle_error(\"open\");\n"
5718
5719 #. type: Plain text
5720 #: build/C/man2/mmap.2:616
5721 #, no-wrap
5722 msgid ""
5723 "    if (fstat(fd, &sb) == -1)           /* To obtain file size */\n"
5724 "        handle_error(\"fstat\");\n"
5725 msgstr ""
5726 "    if (fstat(fd, &sb) == -1)           /* To obtain file size */\n"
5727 "        handle_error(\"fstat\");\n"
5728
5729 #. type: Plain text
5730 #: build/C/man2/mmap.2:620
5731 #, no-wrap
5732 msgid ""
5733 "    offset = atoi(argv[2]);\n"
5734 "    pa_offset = offset & ~(sysconf(_SC_PAGE_SIZE) - 1);\n"
5735 "        /* offset for mmap() must be page aligned */\n"
5736 msgstr ""
5737 "    offset = atoi(argv[2]);\n"
5738 "    pa_offset = offset & ~(sysconf(_SC_PAGE_SIZE) - 1);\n"
5739 "        /* offset for mmap() must be page aligned */\n"
5740
5741 #. type: Plain text
5742 #: build/C/man2/mmap.2:625
5743 #, no-wrap
5744 msgid ""
5745 "    if (offset E<gt>= sb.st_size) {\n"
5746 "        fprintf(stderr, \"offset is past end of file\\en\");\n"
5747 "        exit(EXIT_FAILURE);\n"
5748 "    }\n"
5749 msgstr ""
5750 "    if (offset E<gt>= sb.st_size) {\n"
5751 "        fprintf(stderr, \"offset is past end of file\\en\");\n"
5752 "        exit(EXIT_FAILURE);\n"
5753 "    }\n"
5754
5755 #. type: Plain text
5756 #: build/C/man2/mmap.2:631
5757 #, no-wrap
5758 msgid ""
5759 "    if (argc == 4) {\n"
5760 "        length = atoi(argv[3]);\n"
5761 "        if (offset + length E<gt> sb.st_size)\n"
5762 "            length = sb.st_size - offset;\n"
5763 "                /* Can\\(aqt display bytes past end of file */\n"
5764 msgstr ""
5765 "    if (argc == 4) {\n"
5766 "        length = atoi(argv[3]);\n"
5767 "        if (offset + length E<gt> sb.st_size)\n"
5768 "            length = sb.st_size - offset;\n"
5769 "                /* Can\\(aqt display bytes past end of file */\n"
5770
5771 #. type: Plain text
5772 #: build/C/man2/mmap.2:635
5773 #, no-wrap
5774 msgid ""
5775 "    } else {    /* No length arg ==E<gt> display to end of file */\n"
5776 "        length = sb.st_size - offset;\n"
5777 "    }\n"
5778 msgstr ""
5779 "    } else {    /* No length arg ==E<gt> display to end of file */\n"
5780 "        length = sb.st_size - offset;\n"
5781 "    }\n"
5782
5783 #. type: Plain text
5784 #: build/C/man2/mmap.2:640
5785 #, no-wrap
5786 msgid ""
5787 "    addr = mmap(NULL, length + offset - pa_offset, PROT_READ,\n"
5788 "                MAP_PRIVATE, fd, pa_offset);\n"
5789 "    if (addr == MAP_FAILED)\n"
5790 "        handle_error(\"mmap\");\n"
5791 msgstr ""
5792 "    addr = mmap(NULL, length + offset - pa_offset, PROT_READ,\n"
5793 "                MAP_PRIVATE, fd, pa_offset);\n"
5794 "    if (addr == MAP_FAILED)\n"
5795 "        handle_error(\"mmap\");\n"
5796
5797 #. type: Plain text
5798 #: build/C/man2/mmap.2:645
5799 #, no-wrap
5800 msgid ""
5801 "    s = write(STDOUT_FILENO, addr + offset - pa_offset, length);\n"
5802 "    if (s != length) {\n"
5803 "        if (s == -1)\n"
5804 "            handle_error(\"write\");\n"
5805 msgstr ""
5806 "    s = write(STDOUT_FILENO, addr + offset - pa_offset, length);\n"
5807 "    if (s != length) {\n"
5808 "        if (s == -1)\n"
5809 "            handle_error(\"write\");\n"
5810
5811 #. type: Plain text
5812 #: build/C/man2/mmap.2:649
5813 #, no-wrap
5814 msgid ""
5815 "        fprintf(stderr, \"partial write\");\n"
5816 "        exit(EXIT_FAILURE);\n"
5817 "    }\n"
5818 msgstr ""
5819 "        fprintf(stderr, \"partial write\");\n"
5820 "        exit(EXIT_FAILURE);\n"
5821 "    }\n"
5822
5823 #. type: Plain text
5824 #: build/C/man2/mmap.2:666
5825 msgid ""
5826 "B<getpagesize>(2), B<mincore>(2), B<mlock>(2), B<mmap2>(2), B<mprotect>(2), "
5827 "B<mremap>(2), B<msync>(2), B<remap_file_pages>(2), B<setrlimit>(2), B<shmat>"
5828 "(2), B<shm_open>(3), B<shm_overview>(7)"
5829 msgstr ""
5830 "B<getpagesize>(2), B<mincore>(2), B<mlock>(2), B<mmap2>(2), B<mprotect>(2), "
5831 "B<mremap>(2), B<msync>(2), B<remap_file_pages>(2), B<setrlimit>(2), B<shmat>"
5832 "(2), B<shm_open>(3), B<shm_overview>(7)"
5833
5834 #. type: Plain text
5835 #: build/C/man2/mmap.2:671 build/C/man2/msync.2:122
5836 msgid "B.O. Gallmeister, POSIX.4, O'Reilly, pp. 128-129 and 389-391."
5837 msgstr "B.O. Gallmeister, POSIX.4, O'Reilly, pp. 128-129 and 389-391."
5838
5839 #. type: TH
5840 #: build/C/man2/mmap2.2:29
5841 #, no-wrap
5842 msgid "MMAP2"
5843 msgstr "MMAP2"
5844
5845 #. type: Plain text
5846 #: build/C/man2/mmap2.2:32
5847 msgid "mmap2 - map files or devices into memory"
5848 msgstr "mmap2 - ファイルやデバイスをメモリにマップする"
5849
5850 #. type: Plain text
5851 #: build/C/man2/mmap2.2:38
5852 #, no-wrap
5853 msgid ""
5854 "B<void *mmap2(void *>I<addr>B<, size_t >I<length>B<, int >I<prot>B<,>\n"
5855 "B<             int >I<flags>B<, int >I<fd>B<, off_t >I<pgoffset>B<);>\n"
5856 msgstr ""
5857 "B<void *mmap2(void *>I<addr>B<, size_t >I<length>B<, int >I<prot>B<,>\n"
5858 "B<            int >I<flags>B<, int >I<fd>B<, off_t >I<pgoffset>B<);>\n"
5859
5860 #. type: Plain text
5861 #: build/C/man2/mmap2.2:43
5862 msgid ""
5863 "This is probably not the system call you are interested; instead, see B<mmap>"
5864 "(2), which describes the glibc wrapper function that invokes this system "
5865 "call."
5866 msgstr ""
5867 "これはおそらくあなたが興味のあるシステムコールではないだろう。代わりに\n"
5868 "B<mmap>(2) を見るとよい。そのページにはこのシステムコールを起動する glibc "
5869 "の\n"
5870 "ラッパー関数についての説明がある。"
5871
5872 #. type: Plain text
5873 #: build/C/man2/mmap2.2:54
5874 msgid ""
5875 "The B<mmap2>()  system call provides the same interface as B<mmap>(2), "
5876 "except that the final argument specifies the offset into the file in 4096-"
5877 "byte units (instead of bytes, as is done by B<mmap>(2)).  This enables "
5878 "applications that use a 32-bit I<off_t> to map large files (up to 2^44 "
5879 "bytes)."
5880 msgstr ""
5881 "B<mmap2>() システムコールは B<mmap>(2) と同じインターフェースを提供する。た"
5882 "だ\n"
5883 "し、最後の引き数には、ファイルのオフセットを (B<mmap>(2) が行っている、バイ"
5884 "ト\n"
5885 "単位ではなく) 4096 バイトを単位として指定する。 これにより、32 ビットの\n"
5886 "I<off_t> を使うアプリケーションで (2^44 バイトまでの) 大きなファイルをマッ"
5887 "プ\n"
5888 "できるようになる。"
5889
5890 #. type: Plain text
5891 #: build/C/man2/mmap2.2:61
5892 msgid ""
5893 "On success, B<mmap2>()  returns a pointer to the mapped area.  On error -1 "
5894 "is returned and I<errno> is set appropriately."
5895 msgstr ""
5896 "成功した場合、 B<mmap2>()  はマップされた領域へのポインタを返す。 エラーの場"
5897 "合は -1 が返されて、 I<errno> が適切に設定される。"
5898
5899 #. type: Plain text
5900 #: build/C/man2/mmap2.2:65
5901 msgid "Problem with getting the data from userspace."
5902 msgstr "ユーザ空間からデータを取得するときに問題があった。"
5903
5904 #. type: Plain text
5905 #: build/C/man2/mmap2.2:70
5906 msgid ""
5907 "(Various platforms where the page size is not 4096 bytes.)  I<offset * 4096> "
5908 "is not a multiple of the system page size."
5909 msgstr ""
5910 "(ページサイズが 4096 バイトでないプラットフォームにおいて)  I<offset * 4096> "
5911 "がシステムのページサイズの倍数ではない。"
5912
5913 #. type: Plain text
5914 #: build/C/man2/mmap2.2:74
5915 msgid "B<mmap2>()  can also return any of the errors described in B<mmap>(2)."
5916 msgstr "B<mmap2>() は B<mmap>(2) に載っているエラーを返すこともある。"
5917
5918 #. type: Plain text
5919 #: build/C/man2/mmap2.2:77
5920 msgid "B<mmap2>()  is available since Linux 2.3.31."
5921 msgstr "B<mmap2>()  は、Linux 2.3.31 以降で使用可能である。"
5922
5923 #. type: Plain text
5924 #: build/C/man2/mmap2.2:79 build/C/man2/subpage_prot.2:93
5925 msgid "This system call is Linux-specific."
5926 msgstr "このシステムコールは Linux 独自である。"
5927
5928 #. type: Plain text
5929 #: build/C/man2/mmap2.2:85
5930 msgid ""
5931 "Nowadays, the glibc B<mmap>()  wrapper function invokes this system call "
5932 "rather than the B<mmap>(2)  system call."
5933 msgstr ""
5934 "現在では、glibc の B<mmap>()  のラッパー関数は、 B<mmap>(2)  システムコールで"
5935 "はなく、このシステムコール (B<mmap2>(2))  を起動する。"
5936
5937 #.  ia64 can have page sizes ranging from 4kB to 64kB.
5938 #.  On cris, it looks like the unit might also be the page size,
5939 #.  which is 8192 bytes. -- mtk, June 2007
5940 #. type: Plain text
5941 #: build/C/man2/mmap2.2:92
5942 msgid ""
5943 "On ia64, the unit for I<offset> is actually the system page size, rather "
5944 "than 4096 bytes."
5945 msgstr ""
5946 "ia64 では、 I<offset> の単位は、実際にはシステムのページサイズであり、 4096 "
5947 "バイトではない。"
5948
5949 #. type: Plain text
5950 #: build/C/man2/mmap2.2:98
5951 msgid ""
5952 "B<getpagesize>(2), B<mmap>(2), B<mremap>(2), B<msync>(2), B<shm_open>(3)"
5953 msgstr ""
5954 "B<getpagesize>(2), B<mmap>(2), B<mremap>(2), B<msync>(2), B<shm_open>(3)"
5955
5956 #. type: TH
5957 #: build/C/man2/mprotect.2:32
5958 #, no-wrap
5959 msgid "MPROTECT"
5960 msgstr "MPROTECT"
5961
5962 #. type: TH
5963 #: build/C/man2/mprotect.2:32
5964 #, no-wrap
5965 msgid "2011-09-08"
5966 msgstr "2011-09-08"
5967
5968 #. type: Plain text
5969 #: build/C/man2/mprotect.2:35
5970 msgid "mprotect - set protection on a region of memory"
5971 msgstr "mprotect - メモリ領域の保護を設定する"
5972
5973 #. type: Plain text
5974 #: build/C/man2/mprotect.2:40
5975 #, no-wrap
5976 msgid "B<int mprotect(const void *>I<addr>B<, size_t >I<len>B<, int >I<prot>B<);>\n"
5977 msgstr "B<int mprotect(const void *>I<addr>B<, size_t >I<len>B<, int >I<prot>B<);>\n"
5978
5979 #. type: Plain text
5980 #: build/C/man2/mprotect.2:48
5981 msgid ""
5982 "B<mprotect>()  changes protection for the calling process's memory page(s)  "
5983 "containing any part of the address range in the interval [I<addr>,\\ I<addr>"
5984 "+I<len>-1].  I<addr> must be aligned to a page boundary."
5985 msgstr ""
5986 "B<mprotect>()  は、区間 [I<addr>,\\ I<addr>+I<len>-1] のアドレス範囲を含む 呼"
5987 "び出し元のプロセスのメモリページのアクセス保護を変更する。 I<addr> はページ境"
5988 "界に一致していなければならない。"
5989
5990 #. type: Plain text
5991 #: build/C/man2/mprotect.2:53
5992 msgid ""
5993 "If the calling process tries to access memory in a manner that violates the "
5994 "protection, then the kernel generates a B<SIGSEGV> signal for the process."
5995 msgstr ""
5996 "呼び出し元のプロセスがアクセス保護に違反するようなメモリアクセスを 行おうとす"
5997 "ると、カーネルはシグナル B<SIGSEGV> をそのプロセスに対して生成する。"
5998
5999 #. type: Plain text
6000 #: build/C/man2/mprotect.2:58
6001 msgid ""
6002 "I<prot> is either B<PROT_NONE> or a bitwise-or of the other values in the "
6003 "following list:"
6004 msgstr ""
6005 "I<prot> には、 B<PROT_NONE> か、以下のリストの B<PROT_NONE> 以外の値をビット"
6006 "毎の論理和 (bitwize-or) で指定する:"
6007
6008 #. type: Plain text
6009 #: build/C/man2/mprotect.2:61
6010 msgid "The memory cannot be accessed at all."
6011 msgstr "そのメモリには全くアクセスできない。"
6012
6013 #. type: Plain text
6014 #: build/C/man2/mprotect.2:64
6015 msgid "The memory can be read."
6016 msgstr "そのメモリを読み取ることができる。"
6017
6018 #. type: Plain text
6019 #: build/C/man2/mprotect.2:67
6020 msgid "The memory can be modified."
6021 msgstr "そのメモリを変更できる。"
6022
6023 #.  FIXME
6024 #.  Document PROT_GROWSUP and PROT_GROWSDOWN
6025 #. type: Plain text
6026 #: build/C/man2/mprotect.2:72
6027 msgid "The memory can be executed."
6028 msgstr "そのメモリは実行可能である。"
6029
6030 #. type: Plain text
6031 #: build/C/man2/mprotect.2:79
6032 msgid ""
6033 "On success, B<mprotect>()  returns zero.  On error, -1 is returned, and "
6034 "I<errno> is set appropriately."
6035 msgstr ""
6036 "成功した場合、 B<mprotect>()  は 0 を返す。エラーの場合は -1 が返り、 "
6037 "I<errno> が適切に設定される。"
6038
6039 #. type: Plain text
6040 #: build/C/man2/mprotect.2:89
6041 msgid ""
6042 "The memory cannot be given the specified access.  This can happen, for "
6043 "example, if you B<mmap>(2)  a file to which you have read-only access, then "
6044 "ask B<mprotect>()  to mark it B<PROT_WRITE>."
6045 msgstr ""
6046 "指定されたアクセスをメモリに設定することができない。 これは、例えば ファイル"
6047 "を読み取り専用で B<mmap>(2)  しており、その領域に対して B<mprotect>()  を呼び"
6048 "出して B<PROT_WRITE> に設定しようとした場合に発生する。"
6049
6050 #.  Or: both PROT_GROWSUP and PROT_GROWSDOWN were specified in 'prot'.
6051 #. type: Plain text
6052 #: build/C/man2/mprotect.2:94
6053 msgid ""
6054 "I<addr> is not a valid pointer, or not a multiple of the system page size."
6055 msgstr ""
6056 "I<addr> が有効なポインタでないか、 システムのページサイズの倍数でない。"
6057
6058 #. type: Plain text
6059 #: build/C/man2/mprotect.2:97
6060 msgid "Internal kernel structures could not be allocated."
6061 msgstr "カーネル内部の構造体を割り当てることができなかった。"
6062
6063 #. type: Plain text
6064 #: build/C/man2/mprotect.2:107
6065 msgid ""
6066 "Addresses in the range [I<addr>, I<addr>+I<len>-1] are invalid for the "
6067 "address space of the process, or specify one or more pages that are not "
6068 "mapped.  (Before kernel 2.4.19, the error B<EFAULT> was incorrectly produced "
6069 "for these cases.)"
6070 msgstr ""
6071 "[I<addr>, I<addr>+I<len>-1] という範囲のアドレスがプロセスのアドレス空間とし"
6072 "て不正であるか、 その範囲のアドレスがマップされていない 1 つ以上のページを指"
6073 "している (カーネル 2.4.19 より前では、この状況でエラー B<EFAULT> が間違って生"
6074 "成されていた)。"
6075
6076 #.  SVr4 defines an additional error
6077 #.  code EAGAIN. The SVr4 error conditions don't map neatly onto Linux's.
6078 #. type: Plain text
6079 #: build/C/man2/mprotect.2:116
6080 msgid ""
6081 "SVr4, POSIX.1-2001.  POSIX says that the behavior of B<mprotect>()  is "
6082 "unspecified if it is applied to a region of memory that was not obtained via "
6083 "B<mmap>(2)."
6084 msgstr ""
6085 "SVr4, POSIX.1-2001.  POSIX では、 B<mmap>(2)  経由で獲得していないメモリ領域"
6086 "に対して B<mprotect>()  を行った場合の B<mprotect>()  の動作は未定義であると"
6087 "されている。"
6088
6089 #. type: Plain text
6090 #: build/C/man2/mprotect.2:123
6091 msgid ""
6092 "On Linux it is always permissible to call B<mprotect>()  on any address in a "
6093 "process's address space (except for the kernel vsyscall area).  In "
6094 "particular it can be used to change existing code mappings to be writable."
6095 msgstr ""
6096 "Linux では、(カーネル vsyscall 領域以外の)  任意のプロセスアドレス空間に対し"
6097 "て B<mprotect>()  を呼び出すことが、常に許されている。 これは特に既存のコード"
6098 "マッピングを書き込み可能にするために使われる。"
6099
6100 #. type: Plain text
6101 #: build/C/man2/mprotect.2:133
6102 msgid ""
6103 "Whether B<PROT_EXEC> has any effect different from B<PROT_READ> is "
6104 "architecture- and kernel version-dependent.  On some hardware architectures "
6105 "(e.g., i386), B<PROT_WRITE> implies B<PROT_READ>."
6106 msgstr ""
6107 "B<PROT_EXEC> が B<PROT_READ> と異なる影響を持つか否かは、アーキテクチャとカー"
6108 "ネルのバージョンに依存する。 (i386 などの) いくつかのアーキテクチャでは、 "
6109 "B<PROT_WRITE> をセットすると、暗黙のうちに B<PROT_READ> がセットされる。"
6110
6111 #. type: Plain text
6112 #: build/C/man2/mprotect.2:142
6113 msgid ""
6114 "POSIX.1-2001 says that an implementation may permit access other than that "
6115 "specified in I<prot>, but at a minimum can only allow write access if "
6116 "B<PROT_WRITE> has been set, and must not allow any access if B<PROT_NONE> "
6117 "has been set."
6118 msgstr ""
6119 "POSIX.1-2001 では、 I<prot> で指定されていないアクセスを許可する実装を認めて"
6120 "いる。 ただし、最低限、 B<PROT_WRITE> がセットされている場合にのみ書き込みア"
6121 "クセスが許可され、 B<PROT_NONE> がセットされている場合にはアクセスは許可され"
6122 "ない点だけは 満たす必要がある。"
6123
6124 #. type: Plain text
6125 #: build/C/man2/mprotect.2:148
6126 msgid ""
6127 "The program below allocates four pages of memory, makes the third of these "
6128 "pages read-only, and then executes a loop that walks upward through the "
6129 "allocated region modifying bytes."
6130 msgstr ""
6131 "以下のプログラムは、メモリページを 4つ確保し、そのうち 3番目のページを 読み込"
6132 "み専用に設定する。その後で、確保した領域のアドレスの小さい方から 大きな方に向"
6133 "かって順番にバイト値を変更するループを実行する。"
6134
6135 #. type: Plain text
6136 #: build/C/man2/mprotect.2:151
6137 msgid ""
6138 "An example of what we might see when running the program is the following:"
6139 msgstr "プログラムを実行した場合の一例を以下に示す。"
6140
6141 #. type: Plain text
6142 #: build/C/man2/mprotect.2:157
6143 #, no-wrap
6144 msgid ""
6145 "$B< ./a.out>\n"
6146 "Start of region:        0x804c000\n"
6147 "Got SIGSEGV at address: 0x804e000\n"
6148 msgstr ""
6149 "$B< ./a.out>\n"
6150 "Start of region:        0x804c000\n"
6151 "Got SIGSEGV at address: 0x804e000\n"
6152
6153 #. type: Plain text
6154 #: build/C/man2/mprotect.2:169
6155 #, no-wrap
6156 msgid ""
6157 "#include E<lt>unistd.hE<gt>\n"
6158 "#include E<lt>signal.hE<gt>\n"
6159 "#include E<lt>stdio.hE<gt>\n"
6160 "#include E<lt>malloc.hE<gt>\n"
6161 "#include E<lt>stdlib.hE<gt>\n"
6162 "#include E<lt>errno.hE<gt>\n"
6163 "#include E<lt>sys/mman.hE<gt>\n"
6164 msgstr ""
6165 "#include E<lt>unistd.hE<gt>\n"
6166 "#include E<lt>signal.hE<gt>\n"
6167 "#include E<lt>stdio.hE<gt>\n"
6168 "#include E<lt>malloc.hE<gt>\n"
6169 "#include E<lt>stdlib.hE<gt>\n"
6170 "#include E<lt>errno.hE<gt>\n"
6171 "#include E<lt>sys/mman.hE<gt>\n"
6172
6173 #. type: Plain text
6174 #: build/C/man2/mprotect.2:174
6175 #, no-wrap
6176 msgid "char *buffer;\n"
6177 msgstr "char *buffer;\n"
6178
6179 #. type: Plain text
6180 #: build/C/man2/mprotect.2:182
6181 #, no-wrap
6182 msgid ""
6183 "static void\n"
6184 "handler(int sig, siginfo_t *si, void *unused)\n"
6185 "{\n"
6186 "    printf(\"Got SIGSEGV at address: 0x%lx\\en\",\n"
6187 "            (long) si-E<gt>si_addr);\n"
6188 "    exit(EXIT_FAILURE);\n"
6189 "}\n"
6190 msgstr ""
6191 "static void\n"
6192 "handler(int sig, siginfo_t *si, void *unused)\n"
6193 "{\n"
6194 "    printf(\"Got SIGSEGV at address: 0x%lx\\en\",\n"
6195 "            (long) si-E<gt>si_addr);\n"
6196 "    exit(EXIT_FAILURE);\n"
6197 "}\n"
6198
6199 #. type: Plain text
6200 #: build/C/man2/mprotect.2:189
6201 #, no-wrap
6202 msgid ""
6203 "int\n"
6204 "main(int argc, char *argv[])\n"
6205 "{\n"
6206 "    char *p;\n"
6207 "    int pagesize;\n"
6208 "    struct sigaction sa;\n"
6209 msgstr ""
6210 "int\n"
6211 "main(void)\n"
6212 "{\n"
6213 "    char *p;\n"
6214 "    int pagesize;\n"
6215 "    struct sigaction sa;\n"
6216
6217 #. type: Plain text
6218 #: build/C/man2/mprotect.2:195
6219 #, no-wrap
6220 msgid ""
6221 "    sa.sa_flags = SA_SIGINFO;\n"
6222 "    sigemptyset(&sa.sa_mask);\n"
6223 "    sa.sa_sigaction = handler;\n"
6224 "    if (sigaction(SIGSEGV, &sa, NULL) == -1)\n"
6225 "        handle_error(\"sigaction\");\n"
6226 msgstr ""
6227 "    sa.sa_flags = SA_SIGINFO;\n"
6228 "    sigemptyset(&sa.sa_mask);\n"
6229 "    sa.sa_sigaction = handler;\n"
6230 "    if (sigaction(SIGSEGV, &sa, NULL) == -1)\n"
6231 "        handle_error(\"sigaction\");\n"
6232
6233 #. type: Plain text
6234 #: build/C/man2/mprotect.2:199
6235 #, no-wrap
6236 msgid ""
6237 "    pagesize = sysconf(_SC_PAGE_SIZE);\n"
6238 "    if (pagesize == -1)\n"
6239 "        handle_error(\"sysconf\");\n"
6240 msgstr ""
6241 "    pagesize = sysconf(_SC_PAGE_SIZE);\n"
6242 "    if (pagesize == -1)\n"
6243 "        handle_error(\"sysconf\");\n"
6244
6245 #. type: Plain text
6246 #: build/C/man2/mprotect.2:202
6247 #, no-wrap
6248 msgid ""
6249 "    /* Allocate a buffer aligned on a page boundary;\n"
6250 "       initial protection is PROT_READ | PROT_WRITE */\n"
6251 msgstr ""
6252 "    /* Allocate a buffer aligned on a page boundary;\n"
6253 "       initial protection is PROT_READ | PROT_WRITE */\n"
6254
6255 #. type: Plain text
6256 #: build/C/man2/mprotect.2:206
6257 #, no-wrap
6258 msgid ""
6259 "    buffer = memalign(pagesize, 4 * pagesize);\n"
6260 "    if (buffer == NULL)\n"
6261 "        handle_error(\"memalign\");\n"
6262 msgstr ""
6263 "    buffer = memalign(pagesize, 4 * pagesize);\n"
6264 "    if (buffer == NULL)\n"
6265 "        handle_error(\"memalign\");\n"
6266
6267 #. type: Plain text
6268 #: build/C/man2/mprotect.2:208
6269 #, no-wrap
6270 msgid "    printf(\"Start of region:        0x%lx\\en\", (long) buffer);\n"
6271 msgstr "    printf(\"Start of region:        0x%lx\\en\", (long) buffer);\n"
6272
6273 #. type: Plain text
6274 #: build/C/man2/mprotect.2:212
6275 #, no-wrap
6276 msgid ""
6277 "    if (mprotect(buffer + pagesize * 2, pagesize,\n"
6278 "                PROT_READ) == -1)\n"
6279 "        handle_error(\"mprotect\");\n"
6280 msgstr ""
6281 "    if (mprotect(buffer + pagesize * 2, pagesize,\n"
6282 "                PROT_READ) == -1)\n"
6283 "        handle_error(\"mprotect\");\n"
6284
6285 #. type: Plain text
6286 #: build/C/man2/mprotect.2:215
6287 #, no-wrap
6288 msgid ""
6289 "    for (p = buffer ; ; )\n"
6290 "        *(p++) = \\(aqa\\(aq;\n"
6291 msgstr ""
6292 "    for (p = buffer ; ; )\n"
6293 "        *(p++) = \\(aqa\\(aq;\n"
6294
6295 #. type: Plain text
6296 #: build/C/man2/mprotect.2:219
6297 #, no-wrap
6298 msgid ""
6299 "    printf(\"Loop completed\\en\");     /* Should never happen */\n"
6300 "    exit(EXIT_SUCCESS);\n"
6301 "}\n"
6302 msgstr ""
6303 "    printf(\"Loop completed\\en\");     /* Should never happen */\n"
6304 "    exit(EXIT_SUCCESS);\n"
6305 "}\n"
6306
6307 #. type: Plain text
6308 #: build/C/man2/mprotect.2:223
6309 msgid "B<mmap>(2), B<sysconf>(3)"
6310 msgstr "B<mmap>(2), B<sysconf>(3)"
6311
6312 #. type: TH
6313 #: build/C/man2/mremap.2:31
6314 #, no-wrap
6315 msgid "MREMAP"
6316 msgstr "MREMAP"
6317
6318 #. type: TH
6319 #: build/C/man2/mremap.2:31
6320 #, no-wrap
6321 msgid "2010-06-10"
6322 msgstr "2010-06-10"
6323
6324 #. type: Plain text
6325 #: build/C/man2/mremap.2:34
6326 msgid "mremap - remap a virtual memory address"
6327 msgstr "mremap - 仮想メモリ・アドレスを再マッピングする"
6328
6329 #. type: Plain text
6330 #: build/C/man2/mremap.2:37
6331 #, no-wrap
6332 msgid "B<#define _GNU_SOURCE>         /* See feature_test_macros(7) */\n"
6333 msgstr "B<#define _GNU_SOURCE>         /* feature_test_macros(7) 参照 */\n"
6334
6335 #. type: Plain text
6336 #: build/C/man2/mremap.2:42
6337 #, no-wrap
6338 msgid ""
6339 "B<void *mremap(void *>I<old_address>B<, size_t >I<old_size>B<,>\n"
6340 "B<             size_t >I<new_size>B<, int >I<flags>B<, ... /* void *>I<new_address>B< */);>\n"
6341 msgstr ""
6342 "B<void *mremap(void *>I<old_address>B<, size_t >I<old_size>B<,>\n"
6343 "B<             size_t >I<new_size>B<, int >I<flags>B<, ... /* void *>I<new_address>B< */);>\n"
6344
6345 #. type: Plain text
6346 #: build/C/man2/mremap.2:48
6347 msgid ""
6348 "B<mremap>()  expands (or shrinks) an existing memory mapping, potentially "
6349 "moving it at the same time (controlled by the I<flags> argument and the "
6350 "available virtual address space)."
6351 msgstr ""
6352 "B<mremap>()  は既存のメモリ・マッピングの拡張 (または縮小) を行う。 同時に移"
6353 "動されることもある (I<flags> 引き数と利用可能な仮想アドレス空間によって決ま"
6354 "る)。"
6355
6356 #. type: Plain text
6357 #: build/C/man2/mremap.2:62
6358 msgid ""
6359 "I<old_address> is the old address of the virtual memory block that you want "
6360 "to expand (or shrink).  Note that I<old_address> has to be page aligned.  "
6361 "I<old_size> is the old size of the virtual memory block.  I<new_size> is the "
6362 "requested size of the virtual memory block after the resize.  An optional "
6363 "fifth argument, I<new_address>, may be provided; see the description of "
6364 "B<MREMAP_FIXED> below."
6365 msgstr ""
6366 "I<old_address> は拡張 (または縮小) しようとする仮想メモリ・ブロック の元のア"
6367 "ドレスである。I<old_address> はページ境界に合っていなければ ならない点に注意"
6368 "すること。I<old_size> は元の仮想メモリ・ブロックの サイズである。 "
6369 "I<new_size> は要求する変更後の仮想メモリ・ブロックのサイズである。 5 番目の引"
6370 "き数として I<new_address> を指定することができる。下記の B<MREMAP_FIXED> の説"
6371 "明を参照のこと。"
6372
6373 #. type: Plain text
6374 #: build/C/man2/mremap.2:74
6375 msgid ""
6376 "In Linux the memory is divided into pages.  A user process has (one or)  "
6377 "several linear virtual memory segments.  Each virtual memory segment has one "
6378 "or more mappings to real memory pages (in the page table).  Each virtual "
6379 "memory segment has its own protection (access rights), which may cause a "
6380 "segmentation violation if the memory is accessed incorrectly (e.g., writing "
6381 "to a read-only segment).  Accessing virtual memory outside of the segments "
6382 "will also cause a segmentation violation."
6383 msgstr ""
6384 "Linux ではメモリはページに分割される。ユーザー・プロセスは (一つまたは)  複数"
6385 "のリニアな仮想メモリセグメントを持つ。 それぞれの仮想メモリセグメントは一つ以"
6386 "上の実メモリ・ページ にマッピングされている (マッピング情報はページ・テーブル"
6387 "で管理される)。 仮想メモリセグメントにはセグメント毎の保護 (アクセス権) が設"
6388 "定されており、 メモリが不正にアクセスされた場合 (例えば読み込み専用のセグメン"
6389 "トに 書き込んだ場合)、セグメンテーション侵害 (segmentation violation) を 引き"
6390 "起こす。また、セグメント外の仮想メモリにアクセスした場合にも セグメンテーショ"
6391 "ン侵害が発生する。"
6392
6393 #. type: Plain text
6394 #: build/C/man2/mremap.2:82
6395 msgid ""
6396 "B<mremap>()  uses the Linux page table scheme.  B<mremap>()  changes the "
6397 "mapping between virtual addresses and memory pages.  This can be used to "
6398 "implement a very efficient B<realloc>(3)."
6399 msgstr ""
6400 "B<mremap>()  は Linux のページ・テーブル方式を使用する。 B<mremap>()  は仮想"
6401 "アドレスとメモリ・ページのマッピングを変更する。これは非常に効率的な "
6402 "B<realloc>(3)  を実装するのに使用されている。"
6403
6404 #. type: Plain text
6405 #: build/C/man2/mremap.2:84
6406 msgid "The I<flags> bit-mask argument may be 0, or include the following flag:"
6407 msgstr "I<flags> ビットマスク引数は 0 または以下のフラグを含む:"
6408
6409 #. type: TP
6410 #: build/C/man2/mremap.2:84
6411 #, no-wrap
6412 msgid "B<MREMAP_MAYMOVE>"
6413 msgstr "B<MREMAP_MAYMOVE>"
6414
6415 #. type: Plain text
6416 #: build/C/man2/mremap.2:96
6417 msgid ""
6418 "By default, if there is not sufficient space to expand a mapping at its "
6419 "current location, then B<mremap>()  fails.  If this flag is specified, then "
6420 "the kernel is permitted to relocate the mapping to a new virtual address, if "
6421 "necessary.  If the mapping is relocated, then absolute pointers into the old "
6422 "mapping location become invalid (offsets relative to the starting address of "
6423 "the mapping should be employed)."
6424 msgstr ""
6425 "デフォルトでは、現在の位置にマッピングを拡張するための 十分な空きがなければ "
6426 "B<mremap>()  は失敗する。 このフラグが指定されると、カーネルは必要があれば"
6427 "マッピングを 新しい仮想アドレスに再配置することができる マッピングが再配置さ"
6428 "れると、古いマッピング位置への絶対ポインタは 無効になる (マッピングの開始アド"
6429 "レスからの相対オフセットは有効のままである)。"
6430
6431 #. type: TP
6432 #: build/C/man2/mremap.2:96
6433 #, no-wrap
6434 msgid "B<MREMAP_FIXED> (since Linux 2.3.31)"
6435 msgstr "B<MREMAP_FIXED> (Linux 2.3.31 以降)"
6436
6437 #. type: Plain text
6438 #: build/C/man2/mremap.2:118
6439 msgid ""
6440 "This flag serves a similar purpose to the B<MAP_FIXED> flag of B<mmap>(2).  "
6441 "If this flag is specified, then B<mremap>()  accepts a fifth argument, "
6442 "I<void *new_address>, which specifies a page-aligned address to which the "
6443 "mapping must be moved.  Any previous mapping at the address range specified "
6444 "by I<new_address> and I<new_size> is unmapped.  If B<MREMAP_FIXED> is "
6445 "specified, then B<MREMAP_MAYMOVE> must also be specified."
6446 msgstr ""
6447 "このフラグは B<mmap>(2)  の B<MAP_FIXED> フラグと似たような目的で用いられ"
6448 "る。 このフラグが指定されると、 B<mremap>()  は 5 番目の引き数 I<void "
6449 "*new_address> を受け取り、この引数はマッピングが移動されるべきアドレスを指定"
6450 "する。 このアドレスはページ境界に合っていなければならない。 I<new_address> "
6451 "と I<new_size> で指定されるアドレス範囲に過去のマッピングがあった場合、 その"
6452 "マッピングはアンマップされる (unmapped)。 B<MREMAP_FIXED> を指定した場合は、 "
6453 "B<MREMAP_MAYMOVE> も指定しなければならない。"
6454
6455 #. type: Plain text
6456 #: build/C/man2/mremap.2:128
6457 msgid ""
6458 "If the memory segment specified by I<old_address> and I<old_size> is locked "
6459 "(using B<mlock>(2)  or similar), then this lock is maintained when the "
6460 "segment is resized and/or relocated.  As a consequence, the amount of memory "
6461 "locked by the process may change."
6462 msgstr ""
6463 "I<old_address> と I<old_size> で指定されるメモリセグメントが (B<mlock>(2)  や"
6464 "同様のもので) ロックされている場合、セグメントのサイズが変わったり 再配置され"
6465 "たりした時にロックも維持される。 その結果、プロセスによってロックされるメモリ"
6466 "の量は変化する。"
6467
6468 #. type: Plain text
6469 #: build/C/man2/mremap.2:136
6470 msgid ""
6471 "On success B<mremap>()  returns a pointer to the new virtual memory area.  "
6472 "On error, the value B<MAP_FAILED> (that is, I<(void\\ *)\\ -1>) is returned, "
6473 "and I<errno> is set appropriately."
6474 msgstr ""
6475 "成功した場合は B<mremap>()  は新しい仮想メモリ領域へのポインタを返す。 エラー"
6476 "の場合は B<MAP_FAILED> (すなわち I<(void\\ *)\\ -1>) が返され、 I<errno> が適"
6477 "切に設定される。"
6478
6479 #. type: Plain text
6480 #: build/C/man2/mremap.2:143
6481 msgid ""
6482 "The caller tried to expand a memory segment that is locked, but this was not "
6483 "possible without exceeding the B<RLIMIT_MEMLOCK> resource limit."
6484 msgstr ""
6485 "呼び出し元がロックされているメモリセグメントを拡張しようとしたが、 "
6486 "B<RLIMIT_MEMLOCK> リソース制限を越えずにこれを行うことができない。"
6487
6488 #. type: Plain text
6489 #: build/C/man2/mremap.2:152
6490 msgid ""
6491 "\"Segmentation fault.\" Some address in the range I<old_address> to "
6492 "I<old_address>+I<old_size> is an invalid virtual memory address for this "
6493 "process.  You can also get B<EFAULT> even if there exist mappings that cover "
6494 "the whole address space requested, but those mappings are of different types."
6495 msgstr ""
6496 "「セグメンテーション違反(segmentation fault)」 I<old_address> から "
6497 "I<old_address>+I<old_size> の 範囲のアドレスのどれかがこのプロセスにおいて不"
6498 "正な仮想メモリ・アドレスである。 たとえ要求したアドレス空間全体を含むような"
6499 "マッピングがあったとしても、 それらのマッピングが異なった型ならば B<EFAULT> "
6500 "を受け取るだろう。"
6501
6502 #. type: Plain text
6503 #: build/C/man2/mremap.2:180
6504 msgid ""
6505 "An invalid argument was given.  Possible causes are: I<old_address> was not "
6506 "page aligned; a value other than B<MREMAP_MAYMOVE> or B<MREMAP_FIXED> was "
6507 "specified in I<flags>; I<new_size> was zero; I<new_size> or I<new_address> "
6508 "was invalid; or the new address range specified by I<new_address> and "
6509 "I<new_size> overlapped the old address range specified by I<old_address> and "
6510 "I<old_size>; or B<MREMAP_FIXED> was specified without also specifying "
6511 "B<MREMAP_MAYMOVE>."
6512 msgstr ""
6513 "不正な引き数が与えられた。 可能性のある原因は以下の通りである: たいていは "
6514 "I<old_address> がページ境界に 合ってない; I<flags> に B<MREMAP_MAYMOVE> また"
6515 "は B<MREMAP_FIXED> 以外の値が指定されている; I<new_size> がゼロ; I<new_size> "
6516 "または I<new_address> の値が不正; I<new_address> と I<new_size> で指定される"
6517 "新しいアドレス範囲が I<old_address> と I<old_size> で指定される古いアドレス範"
6518 "囲と重なっている; B<MREMAP_FIXED> が指定されているが B<MREMAP_MAYMOVE> が指定"
6519 "されていない。"
6520
6521 #. type: Plain text
6522 #: build/C/man2/mremap.2:186
6523 msgid ""
6524 "The memory area cannot be expanded at the current virtual address, and the "
6525 "B<MREMAP_MAYMOVE> flag is not set in I<flags>.  Or, there is not enough "
6526 "(virtual) memory available."
6527 msgstr ""
6528 "現在の仮想アドレスではメモリ領域が拡張できず、 B<MREMAP_MAYMOVE> フラグが "
6529 "I<flags> に設定されていない。 または十分な (仮想) メモリが存在しない。"
6530
6531 #.  4.2BSD had a (never actually implemented)
6532 #.  .BR mremap (2)
6533 #.  call with completely different semantics.
6534 #. type: Plain text
6535 #: build/C/man2/mremap.2:192
6536 msgid ""
6537 "This call is Linux-specific, and should not be used in programs intended to "
6538 "be portable."
6539 msgstr ""
6540 "このコールは Linux 特有であり、移植を意図したプログラムで 使用すべきではな"
6541 "い。"
6542
6543 #. type: Plain text
6544 #: build/C/man2/mremap.2:200
6545 msgid ""
6546 "Prior to version 2.4, glibc did not expose the definition of "
6547 "B<MREMAP_FIXED>, and the prototype for B<mremap>()  did not allow for the "
6548 "I<new_address> argument."
6549 msgstr ""
6550 "バージョン 2.4 より前の glibc では、 B<MREMAP_FIXED> の定義は公開されておら"
6551 "ず、 B<mremap>()  のプロトタイプは I<new_address> 引き数を取らなかった。"
6552
6553 #. type: Plain text
6554 #: build/C/man2/mremap.2:209
6555 msgid ""
6556 "B<brk>(2), B<getpagesize>(2), B<getrlimit>(2), B<mlock>(2), B<mmap>(2), "
6557 "B<sbrk>(2), B<malloc>(3), B<realloc>(3)"
6558 msgstr ""
6559 "B<brk>(2), B<getpagesize>(2), B<getrlimit>(2), B<mlock>(2), B<mmap>(2), "
6560 "B<sbrk>(2), B<realloc>(3), B<malloc>(3)"
6561
6562 #. type: Plain text
6563 #: build/C/man2/mremap.2:214
6564 msgid ""
6565 "Your favorite OS text book for more information on paged memory.  (I<Modern "
6566 "Operating Systems> by Andrew S. Tanenbaum, I<Inside Linux> by Randolf "
6567 "Bentson, I<The Design of the UNIX Operating System> by Maurice J. Bach.)"
6568 msgstr ""
6569 "ページ分割されたメモリについてもっと詳しく知りたいならば あなたの好みの OS "
6570 "の\n"
6571 "教科書を参照すること。 (I<Modern Operating Systems> by Andrew S. Tanenbaum,\n"
6572 "I<Inside Linux> by Randolf Bentson, I<The Design of the UNIX Operating\n"
6573 "System> by Maurice J. Bach.)"
6574
6575 #. type: TH
6576 #: build/C/man2/msync.2:25
6577 #, no-wrap
6578 msgid "MSYNC"
6579 msgstr "MSYNC"
6580
6581 #. type: TH
6582 #: build/C/man2/msync.2:25 build/C/man2/remap_file_pages.2:26
6583 #, no-wrap
6584 msgid "2008-04-22"
6585 msgstr "2008-04-22"
6586
6587 #. type: Plain text
6588 #: build/C/man2/msync.2:28
6589 msgid "msync - synchronize a file with a memory map"
6590 msgstr "msync - ファイルをマップしたメモリと同期させる"
6591
6592 #. type: Plain text
6593 #: build/C/man2/msync.2:32
6594 msgid "B<int msync(void *>I<addr>B<, size_t >I<length>B<, int >I<flags>B<);>"
6595 msgstr "B<int msync(void *>I<addr>B<, size_t >I<length>B<, int >I<flags>B<);>"
6596
6597 #. type: Plain text
6598 #: build/C/man2/msync.2:48
6599 msgid ""
6600 "B<msync>()  flushes changes made to the in-core copy of a file that was "
6601 "mapped into memory using B<mmap>(2)  back to disk.  Without use of this call "
6602 "there is no guarantee that changes are written back before B<munmap>(2)  is "
6603 "called.  To be more precise, the part of the file that corresponds to the "
6604 "memory area starting at I<addr> and having length I<length> is updated."
6605 msgstr ""
6606 "B<msync>()  は B<mmap>(2)  を使ってメモリにマップされたファイルの、 メモリ上"
6607 "のコピーになされた変更をディスクに反映させる。 この関数を使用しないと、 "
6608 "B<munmap>(2)  が呼び出されるまで変更が書き戻される保証はない。 より正確には、"
6609 "ファイルのうち I<addr> から始まり長さ I<length> のメモリ領域に対応する部分が"
6610 "更新される。"
6611
6612 #. type: Plain text
6613 #: build/C/man2/msync.2:68
6614 msgid ""
6615 "The I<flags> argument may have the bits B<MS_ASYNC>, B<MS_SYNC>, and "
6616 "B<MS_INVALIDATE> set, but not both B<MS_ASYNC> and B<MS_SYNC>.  B<MS_ASYNC> "
6617 "specifies that an update be scheduled, but the call returns immediately.  "
6618 "B<MS_SYNC> asks for an update and waits for it to complete.  "
6619 "B<MS_INVALIDATE> asks to invalidate other mappings of the same file (so that "
6620 "they can be updated with the fresh values just written)."
6621 msgstr ""
6622 "I<flags> 引数にはビット B<MS_ASYNC>, B<MS_SYNC>, B<MS_INVALIDATE> を設定する"
6623 "ことができるが、 B<MS_ASYNC> と B<MS_SYNC> を同時に指定することはできない。 "
6624 "B<MS_ASYNC> は更新を予定に組み込むことを表し、呼び出しは直ちに返る。 "
6625 "B<MS_SYNC> は更新を要求し、更新が完了するまで待つ。 B<MS_INVALIDATE> は(たっ"
6626 "た今書き込んだ新しい値でマッピングを更新することができるように)  同じファイル"
6627 "に対する他のマッピングを無効にすることを要求する。"
6628
6629 #. type: Plain text
6630 #: build/C/man2/msync.2:73
6631 msgid ""
6632 "On success, zero is returned.  On error, -1 is returned, and I<errno> is set "
6633 "appropriately."
6634 msgstr ""
6635 "成功した場合、 0 が返る。エラーの場合、 -1 が返り、 I<errno> が適切に設定され"
6636 "る。"
6637
6638 #. type: TP
6639 #: build/C/man2/msync.2:74
6640 #, no-wrap
6641 msgid "B<EBUSY>"
6642 msgstr "B<EBUSY>"
6643
6644 #. type: Plain text
6645 #: build/C/man2/msync.2:80
6646 msgid ""
6647 "B<MS_INVALIDATE> was specified in I<flags>, and a memory lock exists for the "
6648 "specified address range."
6649 msgstr ""
6650 "I flags に B<MS_INVALIDATE> が指定されたが、指定されたアドレス範囲にロックが"
6651 "存在する。"
6652
6653 #. type: Plain text
6654 #: build/C/man2/msync.2:93
6655 msgid ""
6656 "I<addr> is not a multiple of PAGESIZE; or any bit other than B<MS_ASYNC> | "
6657 "B<MS_INVALIDATE> | B<MS_SYNC> is set in I<flags>; or both B<MS_SYNC> and "
6658 "B<MS_ASYNC> are set in I<flags>."
6659 msgstr ""
6660 "I<addr> が PAGESIZE の倍数でない。または、 I<flags> に B<MS_ASYNC>、"
6661 "B<MS_INVALIDATE>、B<MS_SYNC> 以外のビットが設定された。 または、 I<flags> に "
6662 "B<MS_SYNC> と B<MS_ASYNC> の両方が設定された。"
6663
6664 #. type: Plain text
6665 #: build/C/man2/msync.2:96
6666 msgid "The indicated memory (or part of it) was not mapped."
6667 msgstr "指定されたメモリ (またはその一部) がマップされていない。"
6668
6669 #. type: Plain text
6670 #: build/C/man2/msync.2:98 build/C/man3/posix_fallocate.3:103
6671 #: build/C/man3/shm_open.3:251 build/C/man7/shm_overview.7:103
6672 msgid "POSIX.1-2001."
6673 msgstr "POSIX.1-2001."
6674
6675 #. type: Plain text
6676 #: build/C/man2/msync.2:105
6677 msgid ""
6678 "This call was introduced in Linux 1.3.21, and then used B<EFAULT> instead of "
6679 "B<ENOMEM>.  In Linux 2.4.19 this was changed to the POSIX value B<ENOMEM>."
6680 msgstr ""
6681 "この関数は Linux 1.3.21 で導入されたが、 B<ENOMEM> ではなく B<EFAULT> が使わ"
6682 "れていた。 これは Linux 2.4.19 で POSIX における値 B<ENOMEM> に変更された。"
6683
6684 #.  POSIX.1-2001: It shall be defined to -1 or 0 or 200112L.
6685 #.  -1: unavailable, 0: ask using sysconf().
6686 #.  glibc defines them to 1.
6687 #. type: Plain text
6688 #: build/C/man2/msync.2:118
6689 msgid ""
6690 "On POSIX systems on which B<msync>()  is available, both "
6691 "B<_POSIX_MAPPED_FILES> and B<_POSIX_SYNCHRONIZED_IO> are defined in "
6692 "I<E<lt>unistd.hE<gt>> to a value greater than 0.  (See also B<sysconf>(3).)"
6693 msgstr ""
6694 "B<msync>()  が使用可能な POSIX システムでは B<_POSIX_MAPPED_FILES> と "
6695 "B<_POSIX_SYNCHRONIZED_IO> の両方が I<E<lt>unistd.hE<gt>> で 0 より大きい値に"
6696 "定義される。 (B<sysconf>(3)  を参照すること。 )"
6697
6698 #. type: TP
6699 #: build/C/man2/msync.2:120 build/C/man7/shm_overview.7:46
6700 #, no-wrap
6701 msgid "B<mmap>(2)"
6702 msgstr "B<mmap>(2)"
6703
6704 #. type: TH
6705 #: build/C/man3/mtrace.3:23
6706 #, no-wrap
6707 msgid "MTRACE"
6708 msgstr "MTRACE"
6709
6710 #. type: Plain text
6711 #: build/C/man3/mtrace.3:26
6712 msgid "mtrace, muntrace - malloc tracing"
6713 msgstr "mtrace, muntrace - malloc のトレース"
6714
6715 #. type: Plain text
6716 #: build/C/man3/mtrace.3:28
6717 msgid "B<#include E<lt>mcheck.hE<gt>>"
6718 msgstr "B<#include E<lt>mcheck.hE<gt>>"
6719
6720 #. type: Plain text
6721 #: build/C/man3/mtrace.3:30
6722 msgid "B<void mtrace(void);>"
6723 msgstr "B<void mtrace(void);>"
6724
6725 #. type: Plain text
6726 #: build/C/man3/mtrace.3:32
6727 msgid "B<void muntrace(void);>"
6728 msgstr "B<void muntrace(void);>"
6729
6730 #. type: Plain text
6731 #: build/C/man3/mtrace.3:44
6732 msgid ""
6733 "The B<mtrace>()  function installs hook functions for the memory-allocation "
6734 "functions (B<malloc>(3), B<realloc>(3)  B<memalign>(3), B<free>(3)).  These "
6735 "hook functions record tracing information about memory allocation and "
6736 "deallocation.  The tracing information can be used to discover memory leaks "
6737 "and attempts to free nonallocated memory in a program."
6738 msgstr ""
6739
6740 #. type: Plain text
6741 #: build/C/man3/mtrace.3:55
6742 msgid ""
6743 "The B<muntrace>()  function disables the hook functions installed by "
6744 "B<mtrace>(), so that tracing information is no longer recorded for the "
6745 "memory-allocation functions.  If no hook functions were successfully "
6746 "installed by B<mtrace>(), B<muntrace>()  does nothing."
6747 msgstr ""
6748
6749 #. type: Plain text
6750 #: build/C/man3/mtrace.3:63
6751 msgid ""
6752 "When B<mtrace>(3)  is called, it checks the value of the environment "
6753 "variable B<MALLOC_TRACE>, which should contain the pathname of a file in "
6754 "which the tracing information is to be recorded.  If the pathname is "
6755 "successfully opened, it is truncated to zero length."
6756 msgstr ""
6757
6758 #. type: Plain text
6759 #: build/C/man3/mtrace.3:76
6760 msgid ""
6761 "If B<MALLOC_TRACE> is not set, or the pathname it specifies is invalid or "
6762 "not writable, then no hook functions are installed, and B<mtrace>()  has no "
6763 "effect.  In set-user-ID and set-group-ID programs, B<MALLOC_TRACE> is "
6764 "ignored, and B<mtrace>()  has no effect."
6765 msgstr ""
6766
6767 #. type: Plain text
6768 #: build/C/man3/mtrace.3:84
6769 msgid ""
6770 "In normal usage, B<mtrace>()  is called once at the start of execution of a "
6771 "program, and B<muntrace>()  is never called."
6772 msgstr ""
6773
6774 #. type: Plain text
6775 #: build/C/man3/mtrace.3:94
6776 msgid ""
6777 "The tracing output produced after a call to B<mtrace>()  is textual, but not "
6778 "designed to be human readable.  The GNU C library provides a Perl script, "
6779 "B<mtrace>(1), that interprets the trace log and produces human-readable "
6780 "output.  For best results, the traced program should be compiled with "
6781 "debugging enabled, so that line-number information is recorded in the "
6782 "executable."
6783 msgstr ""
6784
6785 #. type: Plain text
6786 #: build/C/man3/mtrace.3:100
6787 msgid ""
6788 "The tracing performed by B<mtrace>()  incurs a performance penalty (if "
6789 "B<MALLOC_TRACE> points to a valid, writable pathname)."
6790 msgstr ""
6791
6792 #. type: Plain text
6793 #: build/C/man3/mtrace.3:106
6794 msgid ""
6795 "The line-number information produced by B<mtrace>(1)  is not always precise: "
6796 "the line number references may refer to the previous or following (non-"
6797 "blank)  line of the source code."
6798 msgstr ""
6799
6800 #. type: Plain text
6801 #: build/C/man3/mtrace.3:113
6802 msgid ""
6803 "The shell session below demonstrates the use of the B<mtrace>()  function "
6804 "and the B<mtrace>(1)  command in a program that has memory leaks at two "
6805 "different locations.  The demonstration uses the following program:"
6806 msgstr ""
6807
6808 #. type: Plain text
6809 #: build/C/man3/mtrace.3:120
6810 #, no-wrap
6811 msgid ""
6812 "$ B<cat t_mtrace.c>\n"
6813 "#include E<lt>mcheck.hE<gt>\n"
6814 "#include E<lt>stdlib.hE<gt>\n"
6815 "#include E<lt>stdio.hE<gt>\n"
6816 msgstr ""
6817 "$ B<cat t_mtrace.c>\n"
6818 "#include E<lt>mcheck.hE<gt>\n"
6819 "#include E<lt>stdlib.hE<gt>\n"
6820 "#include E<lt>stdio.hE<gt>\n"
6821
6822 #. type: Plain text
6823 #: build/C/man3/mtrace.3:125
6824 #, no-wrap
6825 msgid ""
6826 "int\n"
6827 "main(int argc, char *argv[])\n"
6828 "{\n"
6829 "    int j;\n"
6830 msgstr ""
6831 "int\n"
6832 "main(int argc, char *argv[])\n"
6833 "{\n"
6834 "    int j;\n"
6835
6836 #. type: Plain text
6837 #: build/C/man3/mtrace.3:127
6838 #, no-wrap
6839 msgid "    mtrace();\n"
6840 msgstr "    mtrace();\n"
6841
6842 #. type: Plain text
6843 #: build/C/man3/mtrace.3:130
6844 #, no-wrap
6845 msgid ""
6846 "    for (j = 0; j E<lt> 2; j++)\n"
6847 "        malloc(100);            /* Never freed--a memory leak */\n"
6848 msgstr ""
6849 "    for (j = 0; j E<lt> 2; j++)\n"
6850 "        malloc(100);            /* Never freed--a memory leak */\n"
6851
6852 #. type: Plain text
6853 #: build/C/man3/mtrace.3:134
6854 #, no-wrap
6855 msgid ""
6856 "    calloc(16, 16);             /* Never freed--a memory leak */\n"
6857 "    exit(EXIT_SUCCESS);\n"
6858 "}\n"
6859 msgstr ""
6860 "    calloc(16, 16);             /* Never freed--a memory leak */\n"
6861 "    exit(EXIT_SUCCESS);\n"
6862 "}\n"
6863
6864 #. type: Plain text
6865 #: build/C/man3/mtrace.3:140
6866 msgid ""
6867 "When we run the program as follows, we see that B<mtrace>()  diagnosed "
6868 "memory leaks at two different locations in the program:"
6869 msgstr ""
6870
6871 #. type: Plain text
6872 #: build/C/man3/mtrace.3:153
6873 #, no-wrap
6874 msgid ""
6875 "$ B<cc -g t_mtrace.c -o t_mtrace>\n"
6876 "$ B<export MALLOC_TRACE=/tmp/t>\n"
6877 "$ B<./t_mtrace>\n"
6878 "$ B<mtrace ./t_mtrace $MALLOC_TRACE>\n"
6879 "Memory not freed:\n"
6880 "-----------------\n"
6881 "   Address     Size     Caller\n"
6882 "0x084c9378     0x64  at /home/cecilia/t_mtrace.c:12\n"
6883 "0x084c93e0     0x64  at /home/cecilia/t_mtrace.c:12\n"
6884 "0x084c9448    0x100  at /home/cecilia/t_mtrace.c:16\n"
6885 msgstr ""
6886 "$ B<cc -g t_mtrace.c -o t_mtrace>\n"
6887 "$ B<export MALLOC_TRACE=/tmp/t>\n"
6888 "$ B<./t_mtrace>\n"
6889 "$ B<mtrace ./t_mtrace $MALLOC_TRACE>\n"
6890 "Memory not freed:\n"
6891 "-----------------\n"
6892 "   Address     Size     Caller\n"
6893 "0x084c9378     0x64  at /home/cecilia/t_mtrace.c:12\n"
6894 "0x084c93e0     0x64  at /home/cecilia/t_mtrace.c:12\n"
6895 "0x084c9448    0x100  at /home/cecilia/t_mtrace.c:16\n"
6896
6897 #. type: Plain text
6898 #: build/C/man3/mtrace.3:165
6899 msgid ""
6900 "The first two messages about unfreed memory correspond to the two B<malloc>"
6901 "(3)  calls inside the I<for> loop.  The final message corresponds to the "
6902 "call to B<calloc>(3)  (which in turn calls B<malloc>(3))."
6903 msgstr ""
6904
6905 #. type: Plain text
6906 #: build/C/man3/mtrace.3:170
6907 msgid "B<mtrace>(1), B<malloc>(3), B<malloc_hook>(3), B<mcheck>(3)"
6908 msgstr "B<mtrace>(1), B<malloc>(3), B<malloc_hook>(3), B<mcheck>(3)"
6909
6910 #. type: TH
6911 #: build/C/man2/posix_fadvise.2:27
6912 #, no-wrap
6913 msgid "POSIX_FADVISE"
6914 msgstr "POSIX_FADVISE"
6915
6916 #. type: TH
6917 #: build/C/man2/posix_fadvise.2:27 build/C/man2/sync_file_range.2:30
6918 #, no-wrap
6919 msgid "2010-10-09"
6920 msgstr "2010-10-09"
6921
6922 #. type: Plain text
6923 #: build/C/man2/posix_fadvise.2:30
6924 msgid "posix_fadvise - predeclare an access pattern for file data"
6925 msgstr "posix_fadvise - ファイルデータのアクセスパターンをあらかじめ宣言する"
6926
6927 #. type: Plain text
6928 #: build/C/man2/posix_fadvise.2:33 build/C/man3/posix_fallocate.3:29
6929 #, no-wrap
6930 msgid "B<#include E<lt>fcntl.hE<gt>>\n"
6931 msgstr "B<#include E<lt>fcntl.hE<gt>>\n"
6932
6933 #. type: Plain text
6934 #: build/C/man2/posix_fadvise.2:36
6935 #, no-wrap
6936 msgid "B<int posix_fadvise(int >I<fd>B<, off_t >I<offset>B<, off_t >I<len>B<, int >I<advice>B<);>\n"
6937 msgstr "B<int posix_fadvise(int >I<fd>B<, off_t >I<offset>B<, off_t >I<len>B<, int >I<advice>B<);>\n"
6938
6939 #. type: Plain text
6940 #: build/C/man2/posix_fadvise.2:45
6941 msgid "B<posix_fadvise>():"
6942 msgstr "B<posix_fadvise>():"
6943
6944 #. type: Plain text
6945 #: build/C/man2/posix_fadvise.2:47 build/C/man3/posix_fallocate.3:42
6946 msgid "_XOPEN_SOURCE\\ E<gt>=\\ 600 || _POSIX_C_SOURCE\\ E<gt>=\\ 200112L"
6947 msgstr "_XOPEN_SOURCE\\ E<gt>=\\ 600 || _POSIX_C_SOURCE\\ E<gt>=\\ 200112L"
6948
6949 #. type: Plain text
6950 #: build/C/man2/posix_fadvise.2:55
6951 msgid ""
6952 "Programs can use B<posix_fadvise>()  to announce an intention to access file "
6953 "data in a specific pattern in the future, thus allowing the kernel to "
6954 "perform appropriate optimizations."
6955 msgstr ""
6956 "プログラムは、将来特定のパターンでファイルデータに アクセスする意思を伝えるた"
6957 "めに B<posix_fadvise>()  を使うことができる。 これにより、カーネルが適切な最"
6958 "適化を実行することが可能になる。"
6959
6960 #. type: Plain text
6961 #: build/C/man2/posix_fadvise.2:62
6962 msgid ""
6963 "The I<advice> applies to a (not necessarily existent) region starting at "
6964 "I<offset> and extending for I<len> bytes (or until the end of the file if "
6965 "I<len> is 0) within the file referred to by I<fd>.  The I<advice> is not "
6966 "binding; it merely constitutes an expectation on behalf of the application."
6967 msgstr ""
6968 "I<advice> は I<fd> が参照しているファイルの I<offset> から始まる I<len> バ"
6969 "イ\n"
6970 "トの範囲内 (I<len> が 0 の場合はファイルの終りまで) の (必ずしも存在しない)\n"
6971 "領域に適用される。 I<advice> は義務づけではない。 I<advice> は単にアプリ"
6972 "ケー\n"
6973 "ションのために可能性を構成するだけである。"
6974
6975 #. type: Plain text
6976 #: build/C/man2/posix_fadvise.2:64
6977 msgid "Permissible values for I<advice> include:"
6978 msgstr "I<advice> に許される値には、以下のものが含まれる:"
6979
6980 #. type: TP
6981 #: build/C/man2/posix_fadvise.2:64
6982 #, no-wrap
6983 msgid "B<POSIX_FADV_NORMAL>"
6984 msgstr "B<POSIX_FADV_NORMAL>"
6985
6986 #. type: Plain text
6987 #: build/C/man2/posix_fadvise.2:70
6988 msgid ""
6989 "Indicates that the application has no advice to give about its access "
6990 "pattern for the specified data.  If no advice is given for an open file, "
6991 "this is the default assumption."
6992 msgstr ""
6993 "指定されたデータのアクセスパターンを指示するアドバイスを アプリケーションが何"
6994 "も持っていないことを示す。 オープンされたファイルにアドバイスが指定されない場"
6995 "合、 これがデフォルトで仮定される。"
6996
6997 #. type: TP
6998 #: build/C/man2/posix_fadvise.2:70
6999 #, no-wrap
7000 msgid "B<POSIX_FADV_SEQUENTIAL>"
7001 msgstr "B<POSIX_FADV_SEQUENTIAL>"
7002
7003 #. type: Plain text
7004 #: build/C/man2/posix_fadvise.2:74
7005 msgid ""
7006 "The application expects to access the specified data sequentially (with "
7007 "lower offsets read before higher ones)."
7008 msgstr ""
7009 "アプリケーションは指定されたデータがシーケンシャルに (大きなオフセットの前に"
7010 "小さなオフセットのデータを読むように)  アクセスされることを期待する。"
7011
7012 #. type: TP
7013 #: build/C/man2/posix_fadvise.2:74
7014 #, no-wrap
7015 msgid "B<POSIX_FADV_RANDOM>"
7016 msgstr "B<POSIX_FADV_RANDOM>"
7017
7018 #. type: Plain text
7019 #: build/C/man2/posix_fadvise.2:77
7020 msgid "The specified data will be accessed in random order."
7021 msgstr "指定されたデータがランダムな順番でアクセスされる。"
7022
7023 #. type: TP
7024 #: build/C/man2/posix_fadvise.2:77
7025 #, no-wrap
7026 msgid "B<POSIX_FADV_NOREUSE>"
7027 msgstr "B<POSIX_FADV_NOREUSE>"
7028
7029 #. type: Plain text
7030 #: build/C/man2/posix_fadvise.2:80
7031 msgid "The specified data will be accessed only once."
7032 msgstr "指定されたデータは 1 度しかアクセスされない。"
7033
7034 #. type: TP
7035 #: build/C/man2/posix_fadvise.2:80
7036 #, no-wrap
7037 msgid "B<POSIX_FADV_WILLNEED>"
7038 msgstr "B<POSIX_FADV_WILLNEED>"
7039
7040 #. type: Plain text
7041 #: build/C/man2/posix_fadvise.2:83
7042 msgid "The specified data will be accessed in the near future."
7043 msgstr "指定されたデータは近い将来アクセスされる。"
7044
7045 #. type: TP
7046 #: build/C/man2/posix_fadvise.2:83
7047 #, no-wrap
7048 msgid "B<POSIX_FADV_DONTNEED>"
7049 msgstr "B<POSIX_FADV_DONTNEED>"
7050
7051 #. type: Plain text
7052 #: build/C/man2/posix_fadvise.2:86
7053 msgid "The specified data will not be accessed in the near future."
7054 msgstr "指定されたデータは近い将来アクセスされない。"
7055
7056 #. type: Plain text
7057 #: build/C/man2/posix_fadvise.2:89
7058 msgid "On success, zero is returned.  On error, an error number is returned."
7059 msgstr "成功した場合は 0 が返される。 失敗した場合はエラー番号が返される。"
7060
7061 #. type: Plain text
7062 #: build/C/man2/posix_fadvise.2:93
7063 msgid "The I<fd> argument was not a valid file descriptor."
7064 msgstr "I<fd> 引き数が有効なファイルディスクリプタでない。"
7065
7066 #. type: Plain text
7067 #: build/C/man2/posix_fadvise.2:96
7068 msgid "An invalid value was specified for I<advice>."
7069 msgstr "無効な値が I<advice> に指定された。"
7070
7071 #. type: Plain text
7072 #: build/C/man2/posix_fadvise.2:103
7073 msgid ""
7074 "The specified file descriptor refers to a pipe or FIFO.  (Linux actually "
7075 "returns B<EINVAL> in this case.)"
7076 msgstr ""
7077 "指定されたファイルディスクリプタがパイプまたは FIFO を参照している (この場"
7078 "合、Linux は実際には B<EINVAL> を返す)。"
7079
7080 #.  of fadvise64_64()
7081 #. type: Plain text
7082 #: build/C/man2/posix_fadvise.2:111
7083 msgid ""
7084 "Kernel support first appeared in Linux 2.5.60; the underlying system call is "
7085 "called B<fadvise64>().  Library support has been provided since glibc "
7086 "version 2.2, via the wrapper function B<posix_fadvise>()."
7087 msgstr ""
7088 "カーネルによるサポートは Linux 2.5.60 で最初に登場し、\n"
7089 "対応するシステムコールは B<fadvise64>() という名前である。\n"
7090 "ライブラリによるサポートは glibc バージョン 2.2 以降で提供されており、\n"
7091 "ラッパー関数は B<posix_fadvise>() という名前である。"
7092
7093 #. type: Plain text
7094 #: build/C/man2/posix_fadvise.2:120
7095 msgid ""
7096 "POSIX.1-2001.  Note that the type of the I<len> argument was changed from "
7097 "I<size_t> to I<off_t> in POSIX.1-2003 TC1."
7098 msgstr ""
7099 "POSIX.1-2001.  I<len> 引き数の型が POSIX.1-2003 TC1 において I<size_t> から "
7100 "I<off_t> に変更された点に注意すること。"
7101
7102 #. type: Plain text
7103 #: build/C/man2/posix_fadvise.2:126
7104 msgid ""
7105 "Under Linux, B<POSIX_FADV_NORMAL> sets the readahead window to the default "
7106 "size for the backing device; B<POSIX_FADV_SEQUENTIAL> doubles this size, and "
7107 "B<POSIX_FADV_RANDOM> disables file readahead entirely.  These changes affect "
7108 "the entire file, not just the specified region (but other open file handles "
7109 "to the same file are unaffected)."
7110 msgstr ""
7111 "Linux では、B<POSIX_FADV_NORMAL> はバッキングデバイスの デフォルトサイズに先"
7112 "読み (readahead) ウインドウを設定する。 B<POSIX_FADV_SEQUENTIAL> はこのサイズ"
7113 "を 2 倍し、 B<POSIX_FADV_RANDOM> は先読みを全く無効にする。 これらの変更は"
7114 "ファイル全体に影響し、指定された領域のみに影響するわけではない (しかし同じ"
7115 "ファイルに対する他のオープンファイルハンドルは影響を受けない)。"
7116
7117 #. type: Plain text
7118 #: build/C/man2/posix_fadvise.2:133
7119 msgid ""
7120 "B<POSIX_FADV_WILLNEED> initiates a nonblocking read of the specified region "
7121 "into the page cache.  The amount of data read may be decreased by the kernel "
7122 "depending on virtual memory load.  (A few megabytes will usually be fully "
7123 "satisfied, and more is rarely useful.)"
7124 msgstr ""
7125 "B<POSIX_FADV_WILLNEED> は、 ページキャッシュに指定領域のブロックされない読み"
7126 "込みを開始する。 読み込まれるデータの総量は、 仮想メモリの負荷に依ってカーネ"
7127 "ルが減らすかもしれない (数メガバイトであれば通常は全く十分であり、 それより多"
7128 "くてもめったに役に立たない)。"
7129
7130 #. type: Plain text
7131 #: build/C/man2/posix_fadvise.2:137
7132 msgid ""
7133 "In kernels before 2.6.18, B<POSIX_FADV_NOREUSE> had the same semantics as "
7134 "B<POSIX_FADV_WILLNEED>.  This was probably a bug; since kernel 2.6.18, this "
7135 "flag is a no-op."
7136 msgstr ""
7137 "2.6.18 より前のカーネルでは、B<POSIX_FADV_NOREUSE> は B<POSIX_FADV_WILLNEED> "
7138 "と同じ意味であった。 これは多分バグであった。 カーネル 2.6.18 以降では、この"
7139 "フラグは何も行わない。"
7140
7141 #. type: Plain text
7142 #: build/C/man2/posix_fadvise.2:145
7143 msgid ""
7144 "B<POSIX_FADV_DONTNEED> attempts to free cached pages associated with the "
7145 "specified region.  This is useful, for example, while streaming large "
7146 "files.  A program may periodically request the kernel to free cached data "
7147 "that has already been used, so that more useful cached pages are not "
7148 "discarded instead."
7149 msgstr ""
7150 "B<POSIX_FADV_DONTNEED> は指定された領域に関連付けられた キャッシュページを解"
7151 "放しようとする。 例えば、これは大きなファイルをストリーミングするときに役立"
7152 "つ。 プログラムは、使用済みのキャッシュされたデータを解放するように、 定期的"
7153 "にカーネルに要求するかもしれない。 そうすることにより、さらに有効なキャッシュ"
7154 "されたページが、 代わりに破棄されることはない。"
7155
7156 #. type: Plain text
7157 #: build/C/man2/posix_fadvise.2:153
7158 msgid ""
7159 "Pages that have not yet been written out will be unaffected, so if the "
7160 "application wishes to guarantee that pages will be released, it should call "
7161 "B<fsync>(2)  or B<fdatasync>(2)  first."
7162 msgstr ""
7163 "まだ書き出されていないページは影響を受けないので、 そのページの解放が保証され"
7164 "ることをアプリケーションが望んでいるなら、 最初に B<fsync>(2)  または "
7165 "B<fdatasync>(2)  を呼ぶべきである。"
7166
7167 #. type: SS
7168 #: build/C/man2/posix_fadvise.2:153
7169 #, no-wrap
7170 msgid "arm_fadvise()"
7171 msgstr "arm_fadvise()"
7172
7173 #. type: Plain text
7174 #: build/C/man2/posix_fadvise.2:165
7175 msgid ""
7176 "The ARM architecture needs 64-bit arguments to be aligned in a suitable pair "
7177 "of registers.  On this architecture, the call signature of B<posix_fadvise>"
7178 "()  is flawed, since it forces a register to be wasted as padding between "
7179 "the I<fd> and I<len> arguments.  Therefore, since Linux 2.6.14, ARM defines "
7180 "a different system call that orders the arguments suitably:"
7181 msgstr ""
7182 "ARM アーキテクチャでは、64 ビットの引き数は適切なレジスタの組に割り当て\n"
7183 "る必要がある。このアーキテクチャでは、B<posix_fadvise>() の呼び出し方に\n"
7184 "は欠陥があり、それはこのシステムコールでは引き数 I<fd> と I<len> の間の\n"
7185 "パディング (詰めもの) でレジスタが一つ消費されてしまうというものである。\n"
7186 "そのため、Linux 2.6.14 以降では、ARM では引き数が適切な順序になった別の\n"
7187 "システムコールが定義されている。"
7188
7189 #. type: Plain text
7190 #: build/C/man2/posix_fadvise.2:170
7191 #, no-wrap
7192 msgid ""
7193 "B<long arm_fadvise64_64(int >I<fd>B<, int >I<advice>B<,>\n"
7194 "B<                      loff_t >I<offset>B<, loff_t >I<len>B<);>\n"
7195 msgstr ""
7196 "B<long arm_fadvise64_64(int >I<fd>B<, int >I<advice>B<,>\n"
7197 "B<                      loff_t >I<offset>B<, loff_t >I<len>B<);>\n"
7198
7199 #.  No ARM support in glibc.
7200 #. type: Plain text
7201 #: build/C/man2/posix_fadvise.2:177
7202 msgid ""
7203 "The behavior of this system call is otherwise exactly the same as "
7204 "B<posix_fadvise>().  No library support is provided for this system call in "
7205 "glibc."
7206 msgstr ""
7207 "上記の点以外は、このシステムコールの動作は B<posix_fadvise>() と全く\n"
7208 "同じである。このシステムコールに対するライブラリによるサポートは glibc\n"
7209 "では提供されていない。"
7210
7211 #. type: Plain text
7212 #: build/C/man2/posix_fadvise.2:182
7213 msgid ""
7214 "In kernels before 2.6.6, if I<len> was specified as 0, then this was "
7215 "interpreted literally as \"zero bytes\", rather than as meaning \"all bytes "
7216 "through to the end of the file\"."
7217 msgstr ""
7218 "2.6.6 より前のカーネルでは、 I<len> に 0 が指定された場合、 「ファイルの終り"
7219 "までの全てのバイト」という意味ではなく、 文字通り「0 バイト」として解釈されて"
7220 "いた。"
7221
7222 #.  FIXME . Write a posix_fadvise(3) page.
7223 #. type: Plain text
7224 #: build/C/man2/posix_fadvise.2:188
7225 msgid ""
7226 "B<readahead>(2), B<sync_file_range>(2), B<posix_fallocate>(3), "
7227 "B<posix_madvise>(3)"
7228 msgstr ""
7229 "B<readahead>(2), B<sync_file_range>(2), B<posix_fallocate>(3),\n"
7230 "B<posix_madvise>(3)"
7231
7232 #. type: TH
7233 #: build/C/man3/posix_fallocate.3:23
7234 #, no-wrap
7235 msgid "POSIX_FALLOCATE"
7236 msgstr "POSIX_FALLOCATE"
7237
7238 #. type: TH
7239 #: build/C/man3/posix_fallocate.3:23
7240 #, no-wrap
7241 msgid "2010-09-20"
7242 msgstr "2010-09-20"
7243
7244 #. type: Plain text
7245 #: build/C/man3/posix_fallocate.3:26
7246 msgid "posix_fallocate - allocate file space"
7247 msgstr "posix_fallocate - ファイルのスペースを確保する"
7248
7249 #. type: Plain text
7250 #: build/C/man3/posix_fallocate.3:31
7251 #, no-wrap
7252 msgid "B<int posix_fallocate(int >I<fd>B<, off_t >I<offset>B<, off_t >I<len>B<);>\n"
7253 msgstr "B<int posix_fallocate(int >I<fd>B<, off_t >I<offset>B<, off_t >I<len>B<);>\n"
7254
7255 #. type: Plain text
7256 #: build/C/man3/posix_fallocate.3:40
7257 msgid "B<posix_fallocate>():"
7258 msgstr "B<posix_fallocate>():"
7259
7260 #. type: Plain text
7261 #: build/C/man3/posix_fallocate.3:59
7262 msgid ""
7263 "The function B<posix_fallocate>()  ensures that disk space is allocated for "
7264 "the file referred to by the descriptor I<fd> for the bytes in the range "
7265 "starting at I<offset> and continuing for I<len> bytes.  After a successful "
7266 "call to B<posix_fallocate>(), subsequent writes to bytes in the specified "
7267 "range are guaranteed not to fail because of lack of disk space."
7268 msgstr ""
7269 "関数 B<posix_fallocate>()  は、ディスクリプタ I<fd> で参照されるファイルに対"
7270 "して、ディスクスペースを確実に確保する。 ディスクスペースは I<offset> から始"
7271 "まる I<len> バイトの範囲のバイトである。 B<posix_fallocate>()  の呼び出しが成"
7272 "功した後、指定された範囲のバイトに対する書き込みは、 ディスクスペースの不足で"
7273 "失敗しないことが保証される。"
7274
7275 #. type: Plain text
7276 #: build/C/man3/posix_fallocate.3:64
7277 msgid ""
7278 "If the size of the file is less than I<offset>+I<len>, then the file is "
7279 "increased to this size; otherwise the file size is left unchanged."
7280 msgstr ""
7281 "ファイルのサイズが I<offset>+I<len> より小さい場合、ファイルはこのサイズにな"
7282 "るように拡大される。 それ以外の場合、ファイルサイズは変わらない。"
7283
7284 #. type: Plain text
7285 #: build/C/man3/posix_fallocate.3:70
7286 msgid ""
7287 "B<posix_fallocate>()  returns zero on success, or an error number on "
7288 "failure.  Note that I<errno> is not set."
7289 msgstr ""
7290 "B<posix_fallocate>()  は成功した場合、0 を返す。 失敗した場合、エラー番号を返"
7291 "す。 I<errno> が設定されない点に注意すること。"
7292
7293 #. type: Plain text
7294 #: build/C/man3/posix_fallocate.3:79
7295 msgid "I<offset+len> exceeds the maximum file size."
7296 msgstr "I<offset+len> が最大ファイルサイズを超えている。"
7297
7298 #. type: Plain text
7299 #: build/C/man3/posix_fallocate.3:89
7300 msgid "I<fd> does not refer to a regular file."
7301 msgstr "I<fd> が通常のファイルとして参照されていない。"
7302
7303 #. type: Plain text
7304 #: build/C/man3/posix_fallocate.3:98
7305 msgid "I<fd> refers to a pipe."
7306 msgstr "I<fd> がパイプを参照している。"
7307
7308 #. type: Plain text
7309 #: build/C/man3/posix_fallocate.3:101
7310 msgid "B<posix_fallocate>()  is available since glibc 2.1.94."
7311 msgstr "B<posix_fallocate>()  は glibc 2.1.94 以降で利用可能である。"
7312
7313 #. type: Plain text
7314 #: build/C/man3/posix_fallocate.3:126
7315 msgid ""
7316 "POSIX.1-2008 says that an implementation I<shall> give the B<EINVAL> error "
7317 "if I<len> was 0, or I<offset> was less than 0.  POSIX.1-2001 says that an "
7318 "implementation I<shall> give the B<EINVAL> error if I<len> is less than 0, "
7319 "or I<offset> was less than 0, and I<may> give the error if I<len> equals "
7320 "zero."
7321 msgstr ""
7322 "POSIX.1-2008 では、 I<len> が 0 の場合、もしくは I<offset> が 0 未満の場合、 "
7323 "B<EINVAL> エラーを返すものとされている。 POSIX.1-2001 では、 I<len> が 0 未満"
7324 "の場合、もしくは I<offset> が 0 未満の場合、 B<EINVAL> エラーを返すものとされ"
7325 "ている。また、 I<len> が 0 の場合、 B<EINVAL> エラーを返してもよいとされてい"
7326 "る。"
7327
7328 #. type: Plain text
7329 #: build/C/man3/posix_fallocate.3:130
7330 msgid "B<fallocate>(2), B<lseek>(2), B<posix_fadvise>(2)"
7331 msgstr "B<fallocate>(2), B<lseek>(2), B<posix_fadvise>(2)"
7332
7333 #. type: TH
7334 #: build/C/man3/posix_memalign.3:28
7335 #, no-wrap
7336 msgid "POSIX_MEMALIGN"
7337 msgstr "POSIX_MEMALIGN"
7338
7339 #. type: TH
7340 #: build/C/man3/posix_memalign.3:28
7341 #, no-wrap
7342 msgid "2012-03-23"
7343 msgstr "2012-03-23"
7344
7345 #. type: Plain text
7346 #: build/C/man3/posix_memalign.3:31
7347 msgid ""
7348 "posix_memalign, aligned_alloc, memalign, valloc, pvalloc - Allocate aligned "
7349 "memory"
7350 msgstr ""
7351 "posix_memalign, aligned_alloc, memalign, valloc, pvalloc - アラインメント\n"
7352 "されたメモリの割り当てを行う"
7353
7354 #. type: Plain text
7355 #: build/C/man3/posix_memalign.3:38
7356 #, no-wrap
7357 msgid ""
7358 "B<int posix_memalign(void **>I<memptr>B<, size_t >I<alignment>B<, size_t >I<size>B<);>\n"
7359 "B<void *aligned_alloc(size_t >I<alignment>B<, size_t >I<size>B<);>\n"
7360 "B<void *valloc(size_t >I<size>B<);>\n"
7361 msgstr ""
7362 "B<int posix_memalign(void **>I<memptr>B<, size_t >I<alignment>B<, size_t >I<size>B<);>\n"
7363 "B<void *aligned_alloc(size_t >I<alignment>B<, size_t >I<size>B<);>\n"
7364 "B<void *valloc(size_t >I<size>B<);>\n"
7365
7366 #. type: Plain text
7367 #: build/C/man3/posix_memalign.3:43
7368 #, no-wrap
7369 msgid ""
7370 "B<void *memalign(size_t >I<alignment>B<, size_t >I<size>B<);>\n"
7371 "B<void *pvalloc(size_t >I<size>B<);>\n"
7372 msgstr ""
7373 "B<void *memalign(size_t >I<alignment>B<, size_t >I<size>B<);>\n"
7374 "B<void *pvalloc(size_t >I<size>B<);>\n"
7375
7376 #. type: Plain text
7377 #: build/C/man3/posix_memalign.3:53
7378 msgid ""
7379 "B<posix_memalign>(): _POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ "
7380 "E<gt>=\\ 600"
7381 msgstr ""
7382 "B<posix_memalign>(): _POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ "
7383 "E<gt>=\\ 600"
7384
7385 #. type: Plain text
7386 #: build/C/man3/posix_memalign.3:56
7387 msgid "B<aligned_alloc>(): _ISOC11_SOURCE"
7388 msgstr "B<aligned_alloc>(): _ISOC11_SOURCE"
7389
7390 #. type: Plain text
7391 #: build/C/man3/posix_memalign.3:58
7392 msgid "B<valloc>():"
7393 msgstr "B<valloc>():"
7394
7395 #. type: TP
7396 #: build/C/man3/posix_memalign.3:61
7397 #, no-wrap
7398 msgid "Since glibc 2.12:"
7399 msgstr "glibc 2.12 以降:"
7400
7401 #. type: Plain text
7402 #: build/C/man3/posix_memalign.3:68
7403 #, no-wrap
7404 msgid ""
7405 "_BSD_SOURCE ||\n"
7406 "    (_XOPEN_SOURCE\\ E<gt>=\\ 500 ||\n"
7407 "        _XOPEN_SOURCE\\ &&\\ _XOPEN_SOURCE_EXTENDED) &&\n"
7408 "    !(_POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ E<gt>=\\ 600)\n"
7409 msgstr ""
7410 "_BSD_SOURCE ||\n"
7411 "    (_XOPEN_SOURCE\\ E<gt>=\\ 500 ||\n"
7412 "        _XOPEN_SOURCE\\ &&\\ _XOPEN_SOURCE_EXTENDED) &&\n"
7413 "    !(_POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ E<gt>=\\ 600)\n"
7414
7415 #. type: TP
7416 #: build/C/man3/posix_memalign.3:70
7417 #, no-wrap
7418 msgid "Before glibc 2.12:"
7419 msgstr "glibc 2.12 より前:"
7420
7421 #. type: Plain text
7422 #: build/C/man3/posix_memalign.3:74
7423 msgid ""
7424 "_BSD_SOURCE || _XOPEN_SOURCE\\ E<gt>=\\ 500 || _XOPEN_SOURCE\\ &&\\ "
7425 "_XOPEN_SOURCE_EXTENDED"
7426 msgstr ""
7427 "_BSD_SOURCE || _XOPEN_SOURCE\\ E<gt>=\\ 500 || _XOPEN_SOURCE\\ &&\\ "
7428 "_XOPEN_SOURCE_EXTENDED"
7429
7430 #. type: Plain text
7431 #: build/C/man3/posix_memalign.3:81
7432 msgid ""
7433 "(The (nonstandard) header file I<E<lt>malloc.hE<gt>> also exposes the "
7434 "declaration of B<valloc>(); no feature test macros are required.)"
7435 msgstr ""
7436 "((非標準の) ヘッダファイル I<E<lt>malloc.hE<gt>> も\n"
7437 "B<valloc>() の宣言も公開する。機能検査マクロは不要である。"
7438
7439 #.  glibc does this:
7440 #. type: Plain text
7441 #: build/C/man3/posix_memalign.3:102
7442 msgid ""
7443 "The function B<posix_memalign>()  allocates I<size> bytes and places the "
7444 "address of the allocated memory in I<*memptr>.  The address of the allocated "
7445 "memory will be a multiple of I<alignment>, which must be a power of two and "
7446 "a multiple of I<sizeof(void *)>.  If I<size> is 0, then B<posix_memalign>()  "
7447 "returns either NULL, or a unique pointer value that can later be "
7448 "successfully passed to B<free>(3)."
7449 msgstr ""
7450 "関数 B<posix_memalign>()  は、 I<size> バイトのメモリを割り当て、割り当てられ"
7451 "たメモリのアドレスを I<*memptr> に設定する。 割り当てられたメモリのアドレス"
7452 "は I<alignment> の倍数になっているはずである。 I<alignment> は 2 のべき乗で、"
7453 "かつ I<sizeof(void *)> の倍数でなければならない。 I<size> が 0 の場合、 "
7454 "B<posix_memalign>()  は NULL か一意なポインタ値を返す。 このポインタ値は、後"
7455 "で B<free>(3)  に問題なく渡すことができる。"
7456
7457 #.  The behavior of memalign() for size==0 is as for posix_memalign()
7458 #.  but no standards govern this.
7459 #. type: Plain text
7460 #: build/C/man3/posix_memalign.3:113
7461 msgid ""
7462 "The obsolete function B<memalign>()  allocates I<size> bytes and returns a "
7463 "pointer to the allocated memory.  The memory address will be a multiple of "
7464 "I<alignment>, which must be a power of two."
7465 msgstr ""
7466 "廃止された関数である B<memalign>() は、 I<size> バイトのメモリを割り当て、\n"
7467 "割り当てられたメモリへのポインタを返す。 メモリのアドレスは I<alignment> \n"
7468 "の倍数になっているはずである。 I<alignment> は 2 のべき乗でなければならない。"
7469
7470 #. type: Plain text
7471 #: build/C/man3/posix_memalign.3:122
7472 msgid ""
7473 "The function B<aligned_alloc>()  is the same as B<memalign>(), except for "
7474 "the added restriction that I<size> should be a multiple of I<alignment>."
7475 msgstr ""
7476 "関数 B<aligned_alloc>() は B<memalign>() と同じだが、I<size> が "
7477 "I<alignment>\n"
7478 "の倍数でなければならないという追加の制限がある点が異なる。"
7479
7480 #. type: Plain text
7481 #: build/C/man3/posix_memalign.3:132
7482 msgid ""
7483 "The obsolete function B<valloc>()  allocates I<size> bytes and returns a "
7484 "pointer to the allocated memory.  The memory address will be a multiple of "
7485 "the page size.  It is equivalent to I<memalign(sysconf(_SC_PAGESIZE),size)>."
7486 msgstr ""
7487 "廃止された関数である B<valloc>()  は I<size> バイトのメモリを割り当て、割り当"
7488 "てられたメモリへのポインタを返す。 メモリのアドレスはページサイズの倍数になっ"
7489 "ているはずである。 これは I<memalign(sysconf(_SC_PAGESIZE),size)> と等価であ"
7490 "る。"
7491
7492 #. type: Plain text
7493 #: build/C/man3/posix_memalign.3:139
7494 msgid ""
7495 "The obsolete function B<pvalloc>()  is similar to B<valloc>(), but rounds "
7496 "the size of the allocation up to the next multiple of the system page size."
7497 msgstr ""
7498 "廃止された関数 B<pvalloc>() は B<valloc>() と同様だが、\n"
7499 "割り当てられるサイズがシステムのページサイズの倍数に切り上げられる。"
7500
7501 #. type: Plain text
7502 #: build/C/man3/posix_memalign.3:141
7503 msgid "For all of these functions, the memory is not zeroed."
7504 msgstr "これらの関数はいずれもメモリのゼロクリアを行わない。"
7505
7506 #. type: Plain text
7507 #: build/C/man3/posix_memalign.3:148
7508 msgid ""
7509 "B<aligned_alloc>(), B<memalign>(), B<valloc>(), and B<pvalloc>()  return a "
7510 "pointer to the allocated memory, or NULL if the request fails."
7511 msgstr ""
7512 "B<aligned_alloc>(), B<memalign>(), B<valloc>(), B<pvalloc>() は割り当てられ"
7513 "た\n"
7514 "メモリへのポインタを返す。 割り当てに失敗した場合は NULL を返す。"
7515
7516 #. type: Plain text
7517 #: build/C/man3/posix_memalign.3:155
7518 msgid ""
7519 "B<posix_memalign>()  returns zero on success, or one of the error values "
7520 "listed in the next section on failure.  Note that I<errno> is not set."
7521 msgstr ""
7522 "B<posix_memalign>()  は成功した場合は 0 を返し、 失敗した場合は次のセクション"
7523 "に記載されたエラー値のいずれかを返す。 I<errno> はセットされないことに注意す"
7524 "ること。"
7525
7526 #. type: Plain text
7527 #: build/C/man3/posix_memalign.3:162
7528 msgid ""
7529 "The I<alignment> argument was not a power of two, or was not a multiple of "
7530 "I<sizeof(void *)>."
7531 msgstr ""
7532 "I<alignment> 引き数が 2 のべき乗でなかったか、 I<sizeof(void *)> の倍数でな"
7533 "かった。"
7534
7535 #. type: Plain text
7536 #: build/C/man3/posix_memalign.3:165
7537 msgid "There was insufficient memory to fulfill the allocation request."
7538 msgstr "割り当て要求を満たすのに十分なメモリがなかった。"
7539
7540 #. type: Plain text
7541 #: build/C/man3/posix_memalign.3:172
7542 msgid ""
7543 "The functions B<memalign>(), B<valloc>(), and B<pvalloc>()  have been "
7544 "available in all Linux libc libraries."
7545 msgstr ""
7546 "関数 B<memalign>(), B<valloc>(), B<pvalloc>() は\n"
7547 "すべての Linux libc ライブラリで使用可能である。"
7548
7549 #. type: Plain text
7550 #: build/C/man3/posix_memalign.3:176
7551 msgid "The function B<aligned_alloc>()  was added to glibc in version 2.16."
7552 msgstr "関数 B<aligned_alloc>() は glibc バージョン 2.16 で追加された。"
7553
7554 #. type: Plain text
7555 #: build/C/man3/posix_memalign.3:180
7556 msgid "The function B<posix_memalign>()  is available since glibc 2.1.91."
7557 msgstr "関数 B<posix_fallocate>() は glibc 2.1.91 以降で利用可能である。"
7558
7559 #. type: Plain text
7560 #: build/C/man3/posix_memalign.3:187
7561 msgid ""
7562 "The function B<valloc>()  appeared in 3.0BSD.  It is documented as being "
7563 "obsolete in 4.3BSD, and as legacy in SUSv2.  It does not appear in "
7564 "POSIX.1-2001."
7565 msgstr ""
7566 "関数 B<valloc>() は 3.0BSD で登場した。4.3BSD では廃止されたと記載されてお"
7567 "り、\n"
7568 "SUSv2 では過去の名残だと記載されている。 POSIX.1-2001 には存在しない。"
7569
7570 #. type: Plain text
7571 #: build/C/man3/posix_memalign.3:191
7572 msgid "The function B<pvalloc>()  is a GNU extension."
7573 msgstr "関数 B<pvalloc>() は GNU による拡張である。"
7574
7575 #. type: Plain text
7576 #: build/C/man3/posix_memalign.3:195
7577 msgid "The function B<memalign>()  appears in SunOS 4.1.3 but not in 4.4BSD."
7578 msgstr "関数 B<memalign>() は SunOS 4.1.3 で登場したが、4.4BSD にはない。"
7579
7580 #. type: Plain text
7581 #: build/C/man3/posix_memalign.3:199
7582 msgid "The function B<posix_memalign>()  comes from POSIX.1d."
7583 msgstr "関数 B<posix_memalign>() は POSIX.1d に由来する。"
7584
7585 #. type: Plain text
7586 #: build/C/man3/posix_memalign.3:204
7587 msgid "The function B<aligned_alloc>()  is specified in the C11 standard."
7588 msgstr "関数 I<aligned_alloc>() は C11 標準で規定されている。"
7589
7590 #. type: SS
7591 #: build/C/man3/posix_memalign.3:204
7592 #, no-wrap
7593 msgid "Headers"
7594 msgstr "ヘッダ"
7595
7596 #. type: Plain text
7597 #: build/C/man3/posix_memalign.3:208
7598 msgid ""
7599 "Everybody agrees that B<posix_memalign>()  is declared in I<E<lt>stdlib."
7600 "hE<gt>>."
7601 msgstr ""
7602 "B<posix_memalign>()  の宣言を I<E<lt>stdlib.hE<gt>> で行うことに関しては、 皆"
7603 "の意見が一致している。"
7604
7605 #. type: Plain text
7606 #: build/C/man3/posix_memalign.3:212
7607 msgid ""
7608 "On some systems B<memalign>()  is declared in I<E<lt>stdlib.hE<gt>> instead "
7609 "of I<E<lt>malloc.hE<gt>>."
7610 msgstr ""
7611 "いくつかのシステムでは、 B<memalign>()  は I<E<lt>malloc.hE<gt>> ではなく "
7612 "I<E<lt>stdlib.hE<gt>> で宣言されている。"
7613
7614 #. type: Plain text
7615 #: build/C/man3/posix_memalign.3:219
7616 msgid ""
7617 "According to SUSv2, B<valloc>()  is declared in I<E<lt>stdlib.hE<gt>>.  "
7618 "Libc4,5 and glibc declare it in I<E<lt>malloc.hE<gt>>, and also in "
7619 "I<E<lt>stdlib.hE<gt>> if suitable feature test macros are defined (see "
7620 "above)."
7621 msgstr ""
7622 "SUSv2 によると、 B<valloc>() は I<E<lt>stdlib.hE<gt>> で宣言される。 "
7623 "libc4,5\n"
7624 "や glibc では I<E<lt>malloc.hE<gt>> で宣言されており、 さらに適切な機能検査\n"
7625 "マクロが定義された場合には I<E<lt>stdlib.hE<gt>> でも宣言される(上記を参照)。"
7626
7627 #. type: Plain text
7628 #: build/C/man3/posix_memalign.3:228
7629 msgid ""
7630 "On many systems there are alignment restrictions, for example, on buffers "
7631 "used for direct block device I/O.  POSIX specifies the I<pathconf(path,"
7632 "_PC_REC_XFER_ALIGN)> call that tells what alignment is needed.  Now one can "
7633 "use B<posix_memalign>()  to satisfy this requirement."
7634 msgstr ""
7635 "多くのシステムでは、アラインメントに関して制限がある。例えば、 ブロックデバイ"
7636 "スに対するダイレクト I/O に使用するバッファには アラインメントに関する制限が"
7637 "ある。 POSIX では、どんなアラインメントが必要かを知るために I<pathconf(path,"
7638 "_PC_REC_XFER_ALIGN)> コールを規定している。ここで B<posix_memalign>()  を使う"
7639 "と、この必要条件を満たすことができる。"
7640
7641 #. type: Plain text
7642 #: build/C/man3/posix_memalign.3:237
7643 msgid ""
7644 "B<posix_memalign>()  verifies that I<alignment> matches the requirements "
7645 "detailed above.  B<memalign>()  may not check that the I<alignment> argument "
7646 "is correct."
7647 msgstr ""
7648 "B<posix_memalign>() は I<alignment> が上で詳細に述べた必要条件を満たすか\n"
7649 "どうかを確かめる。 B<memalign>() は I<alignment> 引き数が正しいかどうかの\n"
7650 "確認を行わないかもしれない。"
7651
7652 #.  Other systems allow passing the result of
7653 #.  .IR valloc ()
7654 #.  to
7655 #.  .IR free (3),
7656 #.  but not to
7657 #.  .IR realloc (3).
7658 #. type: Plain text
7659 #: build/C/man3/posix_memalign.3:265
7660 msgid ""
7661 "POSIX requires that memory obtained from B<posix_memalign>()  can be freed "
7662 "using B<free>(3).  Some systems provide no way to reclaim memory allocated "
7663 "with B<memalign>()  or B<valloc>()  (because one can only pass to B<free>"
7664 "(3)  a pointer gotten from B<malloc>(3), while, for example, B<memalign>()  "
7665 "would call B<malloc>(3)  and then align the obtained value).  The glibc "
7666 "implementation allows memory obtained from any of these functions to be "
7667 "reclaimed with B<free>(3)."
7668 msgstr ""
7669 "POSIX では B<posix_memalign>() によって獲得したメモリは B<free>(3) を\n"
7670 "使って解放することができる必要がある。 いくつかのシステムでは\n"
7671 "B<memalign>() やB<valloc>() で割り当てられたメモリを再利用する手段が\n"
7672 "提供されていない(なぜなら B<free>(3) に渡すことができるのは\n"
7673 "B<malloc>(3) から受け取ったポインタだけだが、例えば B<memalign>() は\n"
7674 "B<malloc>(3) を呼び出し、得た値をアラインメントしてしまうからである)。\n"
7675 "glibc の実装では、 ここに述べた関数のいずれで獲得したメモリも\n"
7676 "B<free>(3) で再利用することができる。"
7677
7678 #. type: Plain text
7679 #: build/C/man3/posix_memalign.3:270
7680 msgid ""
7681 "The glibc B<malloc>(3)  always returns 8-byte aligned memory addresses, so "
7682 "these functions are only needed if you require larger alignment values."
7683 msgstr ""
7684 "glibc の B<malloc>(3) は常に 8 バイトにアラインメントされたメモリアドレスを\n"
7685 "返すので、ここで述べた関数が必要になるのは 8 バイトよりも大きなアラインメン"
7686 "ト\n"
7687 "が必要な場合だけである。"
7688
7689 #. type: Plain text
7690 #: build/C/man3/posix_memalign.3:275
7691 msgid "B<brk>(2), B<getpagesize>(2), B<free>(3), B<malloc>(3)"
7692 msgstr "B<brk>(2), B<getpagesize>(2), B<free>(3), B<malloc>(3)"
7693
7694 #. type: TH
7695 #: build/C/man2/readahead.2:28
7696 #, no-wrap
7697 msgid "READAHEAD"
7698 msgstr "READAHEAD"
7699
7700 #. type: TH
7701 #: build/C/man2/readahead.2:28 build/C/man7/shm_overview.7:27
7702 #, no-wrap
7703 msgid "2010-09-10"
7704 msgstr "2010-09-10"
7705
7706 #. type: Plain text
7707 #: build/C/man2/readahead.2:31
7708 msgid "readahead - perform file readahead into page cache"
7709 msgstr "readahead - 前もってファイルをページ・キャッシュに読み込む"
7710
7711 #. type: Plain text
7712 #: build/C/man2/readahead.2:37
7713 #, no-wrap
7714 msgid "B<ssize_t readahead(int >I<fd>B<, off64_t >I<offset>B<, size_t >I<count>B<);>\n"
7715 msgstr "B<ssize_t readahead(int >I<fd>B<, off64_t >I<offset>B<, size_t >I<count>B<);>\n"
7716
7717 #. type: Plain text
7718 #: build/C/man2/readahead.2:65
7719 msgid ""
7720 "B<readahead>()  populates the page cache with data from a file so that "
7721 "subsequent reads from that file will not block on disk I/O.  The I<fd> "
7722 "argument is a file descriptor identifying the file which is to be read.  The "
7723 "I<offset> argument specifies the starting point from which data is to be "
7724 "read and I<count> specifies the number of bytes to be read.  I/O is "
7725 "performed in whole pages, so that I<offset> is effectively rounded down to a "
7726 "page boundary and bytes are read up to the next page boundary greater than "
7727 "or equal to I<(offset+count)>.  B<readahead>()  does not read beyond the end "
7728 "of the file.  B<readahead>()  blocks until the specified data has been "
7729 "read.  The current file offset of the open file referred to by I<fd> is left "
7730 "unchanged."
7731 msgstr ""
7732 "B<readahead>()  は、この後の同じファイルからのデータ読み込み時にディスク I/O "
7733 "で 動作が停止 (block) しないように、前もってファイルの内容を ページ・キャッ"
7734 "シュに読み込む。 I<fd> 引き数は読み込みを行うファイルを識別するファイル・ディ"
7735 "スクリプタである。 I<offset> 引き数はデータの読み込み開始位置を指定し、 "
7736 "I<count> は読み込むデータのバイト数を指定する。 ディスク I/O はページ単位で実"
7737 "行されるので、 実際には I<offset> はページ境界に切り下げられ、読み込みバイト"
7738 "数は I<(offset+count)> より小さくない次のページ境界まで切り上げられる。 "
7739 "B<readahead>()  はファイルの末尾を越えた範囲まで読み出しを行うことはない。ま"
7740 "た、 B<readahead>()  は指定したデータの読み込みが終わるまで停止 (block) す"
7741 "る。 I<fd> で参照されたオープン済のファイルのファイルオフセットの現在値は 変"
7742 "更されない。"
7743
7744 #. type: Plain text
7745 #: build/C/man2/readahead.2:71
7746 msgid ""
7747 "On success, B<readahead>()  returns 0; on failure, -1 is returned, with "
7748 "I<errno> set to indicate the cause of the error."
7749 msgstr ""
7750 "B<readahead>()  は成功すると 0 を返す。失敗した場合 -1 を返し、 I<errno> にエ"
7751 "ラーの原因を示す値を設定する。"
7752
7753 #. type: Plain text
7754 #: build/C/man2/readahead.2:76
7755 msgid "I<fd> is not a valid file descriptor or is not open for reading."
7756 msgstr ""
7757 "I<fd> が有効なファイル・ディスクリプタでない、または 読み込み用にオープンされ"
7758 "ていない。"
7759
7760 #. type: Plain text
7761 #: build/C/man2/readahead.2:82
7762 msgid ""
7763 "I<fd> does not refer to a file type to which B<readahead>()  can be applied."
7764 msgstr ""
7765 "I<fd> が参照しているファイルが、 B<readahead>()  を行うことができないタイプの"
7766 "ファイルであった。"
7767
7768 #. type: Plain text
7769 #: build/C/man2/readahead.2:87
7770 msgid ""
7771 "The B<readahead>()  system call appeared in Linux 2.4.13; glibc support has "
7772 "been provided since version 2.3."
7773 msgstr ""
7774 "B<readahead>()  システムコールは Linux 2.4.13 で登場した。 glibc でのサポート"
7775 "は glibc バージョン 2.3 以降で行われている。"
7776
7777 #. type: Plain text
7778 #: build/C/man2/readahead.2:92
7779 msgid ""
7780 "The B<readahead>()  system call is Linux-specific, and its use should be "
7781 "avoided in portable applications."
7782 msgstr ""
7783 "B<readahead>()  システムコールは Linux 固有であり、移植を考慮したプログラムで"
7784 "は 使用を避けるべきである。"
7785
7786 #. type: Plain text
7787 #: build/C/man2/readahead.2:98
7788 msgid "B<lseek>(2), B<madvise>(2), B<mmap>(2), B<posix_fadvise>(2), B<read>(2)"
7789 msgstr ""
7790 "B<lseek>(2), B<madvise>(2), B<mmap>(2), B<posix_fadvise>(2), B<read>(2)"
7791
7792 #. type: TH
7793 #: build/C/man2/remap_file_pages.2:26
7794 #, no-wrap
7795 msgid "REMAP_FILE_PAGES"
7796 msgstr "REMAP_FILE_PAGES"
7797
7798 #. type: Plain text
7799 #: build/C/man2/remap_file_pages.2:29
7800 msgid "remap_file_pages - create a nonlinear file mapping"
7801 msgstr "remap_file_pages - 非線形ファイルマッピングを作成する。"
7802
7803 #. type: Plain text
7804 #: build/C/man2/remap_file_pages.2:33
7805 #, no-wrap
7806 msgid ""
7807 "B<#define _GNU_SOURCE>         /* See feature_test_macros(7) */\n"
7808 "B<#include E<lt>sys/mman.hE<gt>>\n"
7809 msgstr ""
7810 "B<#define _GNU_SOURCE>         /* feature_test_macros(7) 参照 */\n"
7811 "B<#include E<lt>sys/mman.hE<gt>>\n"
7812
7813 #. type: Plain text
7814 #: build/C/man2/remap_file_pages.2:36
7815 #, no-wrap
7816 msgid ""
7817 "B<int remap_file_pages(void *>I<addr>B<, size_t >I<size>B<, int >I<prot>B<,>\n"
7818 "B<                     ssize_t >I<pgoff>B<, int >I<flags>B<);>\n"
7819 msgstr ""
7820 "B<int remap_file_pages(void *>I<addr>B<, size_t >I<size>B<, int >I<prot>B<,>\n"
7821 "B<                     ssize_t >I<pgoff>B<, int >I<flags>B<);>\n"
7822
7823 #. type: Plain text
7824 #: build/C/man2/remap_file_pages.2:49
7825 msgid ""
7826 "The B<remap_file_pages>()  system call is used to create a nonlinear "
7827 "mapping, that is, a mapping in which the pages of the file are mapped into a "
7828 "nonsequential order in memory.  The advantage of using B<remap_file_pages>"
7829 "()  over using repeated calls to B<mmap>(2)  is that the former approach "
7830 "does not require the kernel to create additional VMA (Virtual Memory Area) "
7831 "data structures."
7832 msgstr ""
7833 "B<remap_file_pages>()  システムコールは非線形なマッピング、 つまりファイルの"
7834 "ページがメモリ上で連続しない順番でマップされる マッピングを作成するために使わ"
7835 "れる。 B<remap_file_pages>()  を使う方が B<mmap>(2)  を繰り返して使うより優れ"
7836 "ている点は、 前者の方法ではカーネルが VMA (Virtual Memory Area, 仮想メモリ領"
7837 "域)  データ構造体を追加で作成する必要がないことである。"
7838
7839 #. type: Plain text
7840 #: build/C/man2/remap_file_pages.2:51
7841 msgid "To create a nonlinear mapping we perform the following steps:"
7842 msgstr "非線形マッピングを作成するためには、 以下のようなステップを実行する:"
7843
7844 #. type: TP
7845 #: build/C/man2/remap_file_pages.2:51
7846 #, no-wrap
7847 msgid "1."
7848 msgstr "1."
7849
7850 #. type: Plain text
7851 #: build/C/man2/remap_file_pages.2:59
7852 msgid ""
7853 "Use B<mmap>(2)  to create a mapping (which is initially linear).  This "
7854 "mapping must be created with the B<MAP_SHARED> flag."
7855 msgstr ""
7856 "B<mmap>(2)  を使い、マッピングを作成する (このマッピングは最初は線形であ"
7857 "る)。 このマッピングは B<MAP_SHARED> フラグを指定して作成されなければならな"
7858 "い。"
7859
7860 #. type: TP
7861 #: build/C/man2/remap_file_pages.2:59
7862 #, no-wrap
7863 msgid "2."
7864 msgstr "2."
7865
7866 #. type: Plain text
7867 #: build/C/man2/remap_file_pages.2:67
7868 msgid ""
7869 "Use one or more calls to B<remap_file_pages>()  to rearrange the "
7870 "correspondence between the pages of the mapping and the pages of the file.  "
7871 "It is possible to map the same page of a file into multiple locations within "
7872 "the mapped region."
7873 msgstr ""
7874 "B<remap_file_pages>()  を 1 回以上呼び出して、 マッピングのページとファイルの"
7875 "ページの対応関係を再構成する。 ファイルの同じページをマッピング領域の複数の場"
7876 "所に マップすることが可能である。"
7877
7878 #. type: Plain text
7879 #: build/C/man2/remap_file_pages.2:78
7880 msgid ""
7881 "The I<pgoff> and I<size> arguments specify the region of the file that is to "
7882 "be relocated within the mapping: I<pgoff> is a file offset in units of the "
7883 "system page size; I<size> is the length of the region in bytes."
7884 msgstr ""
7885 "I<pgoff> と I<size> 引き数は、マッピング内で再配置されるファイルの領域を指定"
7886 "する。 I<pgoff> はファイルオフセットであり、単位はシステムのページサイズであ"
7887 "る。 I<size> は領域の長さであり、単位はバイトである。"
7888
7889 #. type: Plain text
7890 #: build/C/man2/remap_file_pages.2:96
7891 msgid ""
7892 "The I<addr> argument serves two purposes.  First, it identifies the mapping "
7893 "whose pages we want to rearrange.  Thus, I<addr> must be an address that "
7894 "falls within a region previously mapped by a call to B<mmap>(2).  Second, "
7895 "I<addr> specifies the address at which the file pages identified by I<pgoff> "
7896 "and I<size> will be placed."
7897 msgstr ""
7898 "I<addr> 引き数は 2 つの目的で使われる。 第 1 の目的は、この引き数によって再編"
7899 "成したいページの マッピングを識別することである。 よって I<addr> は B<mmap>"
7900 "(2)  の呼び出しで過去にマップされた領域内のアドレスでなければならない。 第 2 "
7901 "の目的は、 I<pgoff> と I<size> で識別されるファイルページが置かれる予定のアド"
7902 "レスを、 I<addr> によって指定することである。"
7903
7904 #.  This rounding is weird, and not consistent with the treatment of
7905 #.  the analogous arguments for munmap()/mprotect() and for mlock().
7906 #.  MTK, 14 Sep 2005
7907 #. type: Plain text
7908 #: build/C/man2/remap_file_pages.2:110
7909 msgid ""
7910 "The values specified in I<addr> and I<size> should be multiples of the "
7911 "system page size.  If they are not, then the kernel rounds I<both> values "
7912 "I<down> to the nearest multiple of the page size."
7913 msgstr ""
7914 "I<addr> と I<size> に指定する値は、システムのページサイズの倍数とすべきであ"
7915 "る。 それ以外の場合、カーネルは「両方」の値を 最も近いページサイズの倍数へ"
7916 "「切り下げる」。"
7917
7918 #. type: Plain text
7919 #: build/C/man2/remap_file_pages.2:114
7920 msgid "The I<prot> argument must be specified as 0."
7921 msgstr "I<prot> 引き数は 0 に指定されなければならない。"
7922
7923 #. type: Plain text
7924 #: build/C/man2/remap_file_pages.2:122
7925 msgid ""
7926 "The I<flags> argument has the same meaning as for B<mmap>(2), but all flags "
7927 "other than B<MAP_NONBLOCK> are ignored."
7928 msgstr ""
7929 "I<flags> 引き数は B<mmap>(2)  のものと同じ意味であるが、 B<MAP_NONBLOCK> 以外"
7930 "の全てのフラグは無視される。"
7931
7932 #. type: Plain text
7933 #: build/C/man2/remap_file_pages.2:129
7934 msgid ""
7935 "On success, B<remap_file_pages>()  returns 0.  On error, -1 is returned, and "
7936 "I<errno> is set appropriately."
7937 msgstr ""
7938 "成功した場合、 B<remap_file_pages>()  は 0 を返す。 エラーの場合、-1 が返さ"
7939 "れ、 I<errno> が適切に設定される。"
7940
7941 #. type: Plain text
7942 #: build/C/man2/remap_file_pages.2:137
7943 msgid ""
7944 "I<addr> does not refer to a valid mapping created with the B<MAP_SHARED> "
7945 "flag."
7946 msgstr ""
7947 "I<addr> が B<MAP_SHARED> フラグを指定して作成された有効なマッピングを参照して"
7948 "いない。"
7949
7950 #.  And possibly others from vma->vm_ops->populate()
7951 #. type: Plain text
7952 #: build/C/man2/remap_file_pages.2:146
7953 msgid "I<addr>, I<size>, I<prot>, or I<pgoff> is invalid."
7954 msgstr "I<addr>, I<size>, I<prot>, I<pgoff> のいずれかが不正である。"
7955
7956 #. type: Plain text
7957 #: build/C/man2/remap_file_pages.2:151
7958 msgid ""
7959 "The B<remap_file_pages>()  system call appeared in Linux 2.5.46; glibc "
7960 "support was added in version 2.3.3."
7961 msgstr ""
7962 "B<remap_file_pages>()  システムコールは Linux 2.5.46 で登場した。 glibc での"
7963 "サポートは glibc バージョン 2.3.3 で追加された。"
7964
7965 #. type: Plain text
7966 #: build/C/man2/remap_file_pages.2:155
7967 msgid "The B<remap_file_pages>()  system call is Linux-specific."
7968 msgstr "B<remap_file_pages>()  システムコールは Linux 固有のものである。"
7969
7970 #. type: Plain text
7971 #: build/C/man2/remap_file_pages.2:162
7972 msgid ""
7973 "B<getpagesize>(2), B<mmap>(2), B<mmap2>(2), B<mprotect>(2), B<mremap>(2), "
7974 "B<msync>(2)"
7975 msgstr ""
7976 "B<getpagesize>(2), B<mmap>(2), B<mmap2>(2), B<mprotect>(2), B<mremap>(2), "
7977 "B<msync>(2)"
7978
7979 #. type: TH
7980 #: build/C/man3/shm_open.3:26
7981 #, no-wrap
7982 msgid "SHM_OPEN"
7983 msgstr "SHM_OPEN"
7984
7985 #. type: TH
7986 #: build/C/man3/shm_open.3:26
7987 #, no-wrap
7988 msgid "2009-02-25"
7989 msgstr "2009-02-25"
7990
7991 #. type: Plain text
7992 #: build/C/man3/shm_open.3:29
7993 msgid ""
7994 "shm_open, shm_unlink - Create/open or unlink POSIX shared memory objects"
7995 msgstr ""
7996 "shm_open, shm_unlink - POSIX 共有メモリ・オブジェクトの作成/オープン、 削除を"
7997 "行う"
7998
7999 #. type: Plain text
8000 #: build/C/man3/shm_open.3:33
8001 msgid "B<#include E<lt>sys/stat.hE<gt>> /* For mode constants */"
8002 msgstr "B<#include E<lt>sys/stat.hE<gt>> /* mode 定数用 */"
8003
8004 #. type: Plain text
8005 #: build/C/man3/shm_open.3:35
8006 msgid "B<#include E<lt>fcntl.hE<gt>> /* For O_* constants */"
8007 msgstr "B<#include E<lt>fcntl.hE<gt>> /* O_* 定数の定義用 */"
8008
8009 #. type: Plain text
8010 #: build/C/man3/shm_open.3:37
8011 msgid ""
8012 "B<int shm_open(const char *>I<name>B<, int >I<oflag>B<, mode_t >I<mode>B<);>"
8013 msgstr ""
8014 "B<void * shm_open(const char *>I<name>B<, int >I<oflag>B<, mode_t "
8015 ">I<mode>B<);>"
8016
8017 #. type: Plain text
8018 #: build/C/man3/shm_open.3:39
8019 msgid "B<int shm_unlink(const char *>I<name>B<);>"
8020 msgstr "B<int shm_unlink(const char *>I<name>B<);>"
8021
8022 #. type: Plain text
8023 #: build/C/man3/shm_open.3:41
8024 msgid "Link with I<-lrt>."
8025 msgstr "I<-lrt> でリンクする。"
8026
8027 #. type: Plain text
8028 #: build/C/man3/shm_open.3:53
8029 msgid ""
8030 "B<shm_open>()  creates and opens a new, or opens an existing, POSIX shared "
8031 "memory object.  A POSIX shared memory object is in effect a handle which can "
8032 "be used by unrelated processes to B<mmap>(2)  the same region of shared "
8033 "memory.  The B<shm_unlink>()  function performs the converse operation, "
8034 "removing an object previously created by B<shm_open>()."
8035 msgstr ""
8036 "B<shm_open>()  は、POSIX 共有メモリ・オブジェクトを新規に作成/オープンした"
8037 "り、 すでに存在するオブジェクトをオープンしたりする。 POSIX 共有メモリ・オブ"
8038 "ジェクトは、実際には、関係のないプロセスが 共有メモリの同じ領域を B<mmap>"
8039 "(2)  するために使用することができる手段である。 B<shm_unlink>()  は、逆の操"
8040 "作、つまり以前に B<shm_open>()  で作成されたオブジェクトの削除を行う。"
8041
8042 #.  glibc allows the initial slash to be omitted, and makes
8043 #.  multiple initial slashes equivalent to a single slash.
8044 #.  This differs from the implementation of POSIX message queues.
8045 #.  glibc allows subdirectory components in the name, in which
8046 #.  case the subdirectory must exist under /dev/shm, and allow the
8047 #.  required permissions if a user wants to create a shared memory
8048 #.  object in that subdirectory.
8049 #. type: Plain text
8050 #: build/C/man3/shm_open.3:74
8051 msgid ""
8052 "The operation of B<shm_open>()  is analogous to that of B<open>(2).  I<name> "
8053 "specifies the shared memory object to be created or opened.  For portable "
8054 "use, a shared memory object should be identified by a name of the form I</"
8055 "somename>; that is, a null-terminated string of up to B<NAME_MAX> (i.e., "
8056 "255) characters consisting of an initial slash, followed by one or more "
8057 "characters, none of which are slashes."
8058 msgstr ""
8059 "B<shm_open>()  の動作は B<open>(2)  とよく似ている。 I<name> で作成したりオー"
8060 "プンしたりする共有メモリ・オブジェクトを指定する。 移植性を持たせるためには、"
8061 "共有メモリ・オブジェクトは I</somename> という形式の名前で識別し、 その名前"
8062 "は、最大で B<NAME_MAX> (すなわち 255) 文字の NULL 終端された文字列で、 スラッ"
8063 "シュで始まり、スラッシュ以外の文字が 1 文字以上続く形式 にすべきである。"
8064
8065 #. type: Plain text
8066 #: build/C/man3/shm_open.3:81
8067 msgid ""
8068 "I<oflag> is a bit mask created by ORing together exactly one of B<O_RDONLY> "
8069 "or B<O_RDWR> and any of the other flags listed here:"
8070 msgstr ""
8071 "I<oflag> はビットマスクで、 B<O_RDONLY> と B<O_RDWR> のいずれか一方と、以下に"
8072 "述べる他のフラグの論理和をとったもの を指定する。"
8073
8074 #. type: TP
8075 #: build/C/man3/shm_open.3:81
8076 #, no-wrap
8077 msgid "B<O_RDONLY>"
8078 msgstr "B<O_RDONLY>"
8079
8080 #. type: Plain text
8081 #: build/C/man3/shm_open.3:87
8082 msgid ""
8083 "Open the object for read access.  A shared memory object opened in this way "
8084 "can only be B<mmap>(2)ed for read (B<PROT_READ>) access."
8085 msgstr ""
8086 "読み出しアクセス用にオブジェクトをオープンする。 このフラグを指定してオープン"
8087 "された共有メモリ・オブジェクトは、 読み出し (B<PROT_READ>) アクセスでのみ "
8088 "B<mmap>(2)  することができる。"
8089
8090 #. type: TP
8091 #: build/C/man3/shm_open.3:87
8092 #, no-wrap
8093 msgid "B<O_RDWR>"
8094 msgstr "B<O_RDWR>"
8095
8096 #. type: Plain text
8097 #: build/C/man3/shm_open.3:90
8098 msgid "Open the object for read-write access."
8099 msgstr "読み書きアクセス用にオブジェクトをオープンする。"
8100
8101 #. type: TP
8102 #: build/C/man3/shm_open.3:90
8103 #, no-wrap
8104 msgid "B<O_CREAT>"
8105 msgstr "B<O_CREAT>"
8106
8107 #.  In truth it is actually the file system IDs on Linux, but these
8108 #.  are nearly always the same as the effective IDs.  (MTK, Jul 05)
8109 #. type: Plain text
8110 #: build/C/man3/shm_open.3:110
8111 msgid ""
8112 "Create the shared memory object if it does not exist.  The user and group "
8113 "ownership of the object are taken from the corresponding effective IDs of "
8114 "the calling process, and the object's permission bits are set according to "
8115 "the low-order 9 bits of I<mode>, except that those bits set in the process "
8116 "file mode creation mask (see B<umask>(2))  are cleared for the new object.  "
8117 "A set of macro constants which can be used to define I<mode> is listed in "
8118 "B<open>(2).  (Symbolic definitions of these constants can be obtained by "
8119 "including I<E<lt>sys/stat.hE<gt>>.)"
8120 msgstr ""
8121 "存在しない場合、共有メモリ・オブジェクトを作成する。 オブジェクトのユーザとグ"
8122 "ループの所有権は、 呼び出し元プロセスの対応する実効 ID が使われ、 オブジェク"
8123 "トの許可ビットは I<mode> の下位 9 ビットに基づいて設定される。ただし、 ファイ"
8124 "ルモード作成マスク (B<umask>(2)  参照) に設定されている値は、新規オブジェクト"
8125 "に関してはクリアされる。 I<mode> を定義するために使用できるマクロ定数(群)は "
8126 "B<open>(2)  に記載されている (これらの定数のシンボル定義は I<E<lt>sys/stat."
8127 "hE<gt>> のインクルードにより得られる)。"
8128
8129 #. type: Plain text
8130 #: build/C/man3/shm_open.3:116
8131 msgid ""
8132 "A new shared memory object initially has zero length\\(emthe size of the "
8133 "object can be set using B<ftruncate>(2).  The newly allocated bytes of a "
8134 "shared memory object are automatically initialized to 0."
8135 msgstr ""
8136 "新規に作成された共有メモリ・オブジェクトは長さ 0 で初期化される。 オブジェク"
8137 "トの大きさは B<ftruncate>(2)  を使って設定できる。 共有メモリ・オブジェクトと"
8138 "して新規に確保されたバイトは自動的に 0 に初期化される。"
8139
8140 #. type: TP
8141 #: build/C/man3/shm_open.3:116
8142 #, no-wrap
8143 msgid "B<O_EXCL>"
8144 msgstr "B<O_EXCL>"
8145
8146 #. type: Plain text
8147 #: build/C/man3/shm_open.3:125
8148 msgid ""
8149 "If B<O_CREAT> was also specified, and a shared memory object with the given "
8150 "I<name> already exists, return an error.  The check for the existence of the "
8151 "object, and its creation if it does not exist, are performed atomically."
8152 msgstr ""
8153 "B<O_CREAT> が一緒に指定されており、 I<name> で指定された共有メモリ・オブジェ"
8154 "クトが既に存在した場合、 エラーを返す。 オブジェクトの存在確認と、存在しな"
8155 "かった場合のオブジェクト作成は、 必ず一連の操作として実行される (performed "
8156 "atomically)。"
8157
8158 #. type: TP
8159 #: build/C/man3/shm_open.3:125
8160 #, no-wrap
8161 msgid "B<O_TRUNC>"
8162 msgstr "B<O_TRUNC>"
8163
8164 #. type: Plain text
8165 #: build/C/man3/shm_open.3:128
8166 msgid "If the shared memory object already exists, truncate it to zero bytes."
8167 msgstr ""
8168 "共有メモリ・オブジェクトがすでに存在した場合、 そのオブジェクトを 0 バイトに"
8169 "切り詰める。"
8170
8171 #. type: Plain text
8172 #: build/C/man3/shm_open.3:131
8173 msgid ""
8174 "Definitions of these flag values can be obtained by including I<E<lt>fcntl."
8175 "hE<gt>>."
8176 msgstr ""
8177 "これらのフラグ値の定義は I<E<lt>fcntl.hE<gt>> のインクルードにより得られる。"
8178
8179 #. type: Plain text
8180 #: build/C/man3/shm_open.3:142
8181 msgid ""
8182 "On successful completion B<shm_open>()  returns a new file descriptor "
8183 "referring to the shared memory object.  This file descriptor is guaranteed "
8184 "to be the lowest-numbered file descriptor not previously opened within the "
8185 "process.  The B<FD_CLOEXEC> flag (see B<fcntl>(2))  is set for the file "
8186 "descriptor."
8187 msgstr ""
8188 "成功して完了した場合、 B<shm_open>()  は共有メモリ・オブジェクトを参照する新"
8189 "しいファイル・ディスクリプタを返す。 このファイル・ディスクリプタは、そのプロ"
8190 "セス内で過去にオープンされていない ファイル・ディスクリプタの中で最も小さな数"
8191 "になることが保証される。 B<FD_CLOEXEC> フラグ (B<fcntl>(2)  を参照) が、この"
8192 "ファイル・ディスクリプタに設定される。"
8193
8194 #. type: Plain text
8195 #: build/C/man3/shm_open.3:151
8196 msgid ""
8197 "The file descriptor is normally used in subsequent calls to B<ftruncate>(2)  "
8198 "(for a newly created object) and B<mmap>(2).  After a call to B<mmap>(2)  "
8199 "the file descriptor may be closed without affecting the memory mapping."
8200 msgstr ""
8201 "通常、これらのファイル・ディスクリプタは、この後続けて実行される B<ftruncate>"
8202 "(2)  (新規に作成されたオブジェクトの場合のみ) と B<mmap>(2)  の呼び出しに使用"
8203 "される。 B<mmap>(2)  を呼び出した後は、ファイル・ディスクリプタをクローズして"
8204 "もよく、 クローズしてもメモリ・マッピングに影響を与えることはない。"
8205
8206 #. type: Plain text
8207 #: build/C/man3/shm_open.3:169
8208 msgid ""
8209 "The operation of B<shm_unlink>()  is analogous to B<unlink>(2): it removes a "
8210 "shared memory object name, and, once all processes have unmapped the object, "
8211 "de-allocates and destroys the contents of the associated memory region.  "
8212 "After a successful B<shm_unlink>(), attempts to B<shm_open>()  an object "
8213 "with the same I<name> will fail (unless B<O_CREAT> was specified, in which "
8214 "case a new, distinct object is created)."
8215 msgstr ""
8216 "B<shm_unlink>()  の動作は B<unlink>(2)  とよく似ている: 共有メモリ・オブジェ"
8217 "クト名を削除し、すべてのプロセスが処理対象の オブジェクトをアンマップした時点"
8218 "でオブジェクトの割り当てを解除し、 対応するメモリ領域の内容を破棄する。 "
8219 "B<shm_unlink>()  が成功した後で、同じ I<name> を持つオブジェクトに対して "
8220 "B<shm_open>()  を行うと、 (B<O_CREAT> が指定されていない場合) 失敗する。 "
8221 "(B<O_CREAT> が指定されている場合、新しく別のオブジェクトが作成される)。"
8222
8223 #. type: Plain text
8224 #: build/C/man3/shm_open.3:178
8225 msgid ""
8226 "On success, B<shm_open>()  returns a nonnegative file descriptor.  On "
8227 "failure, B<shm_open>()  returns -1.  B<shm_unlink>()  returns 0 on success, "
8228 "or -1 on error."
8229 msgstr ""
8230 "成功した場合、 B<shm_open>()  は非負のファイル・ディスクリプタを返す。 失敗し"
8231 "た場合、 B<shm_open>()  は -1 を返す。 B<shm_unlink>()  は、成功した場合 0 "
8232 "を、エラーが起こった場合 -1 を返す。"
8233
8234 #. type: Plain text
8235 #: build/C/man3/shm_open.3:185
8236 msgid ""
8237 "On failure, I<errno> is set to indicate the cause of the error.  Values "
8238 "which may appear in I<errno> include the following:"
8239 msgstr ""
8240 "失敗した場合、エラーの原因を示すため I<errno> が設定される。 I<errno> に設定"
8241 "される値は以下の通りである:"
8242
8243 #. type: Plain text
8244 #: build/C/man3/shm_open.3:190
8245 msgid "Permission to B<shm_unlink>()  the shared memory object was denied."
8246 msgstr "共有メモリオブジェクトを B<shm_unlink>()  する権限がなかった。"
8247
8248 #. type: Plain text
8249 #: build/C/man3/shm_open.3:200
8250 msgid ""
8251 "Permission was denied to B<shm_open>()  I<name> in the specified I<mode>, or "
8252 "B<O_TRUNC> was specified and the caller does not have write permission on "
8253 "the object."
8254 msgstr ""
8255 "指定された I<mode> で I<name> を B<shm_open>()  する権限がなかった。もしく"
8256 "は、 B<O_TRUNC> が指定されたが、呼び出し元にはそのオブジェクトに対する書き込"
8257 "み権限が なかった。"
8258
8259 #. type: TP
8260 #: build/C/man3/shm_open.3:200 build/C/man2/shmget.2:192
8261 #, no-wrap
8262 msgid "B<EEXIST>"
8263 msgstr "B<EEXIST>"
8264
8265 #. type: Plain text
8266 #: build/C/man3/shm_open.3:211
8267 msgid ""
8268 "Both B<O_CREAT> and B<O_EXCL> were specified to B<shm_open>()  and the "
8269 "shared memory object specified by I<name> already exists."
8270 msgstr ""
8271 "B<O_CREAT> と B<O_EXCL> の両方が B<shm_open>()  に指定されたが、 I<name> で指"
8272 "定された共有メモリ・オブジェクトが既に存在した。"
8273
8274 #. type: Plain text
8275 #: build/C/man3/shm_open.3:218
8276 msgid "The I<name> argument to B<shm_open>()  was invalid."
8277 msgstr "B<shm_open>()  に与えられた I<name> 引き数が不正であった。"
8278
8279 #. type: TP
8280 #: build/C/man3/shm_open.3:218
8281 #, no-wrap
8282 msgid "B<EMFILE>"
8283 msgstr "B<EMFILE>"
8284
8285 #. type: Plain text
8286 #: build/C/man3/shm_open.3:221
8287 msgid "The process already has the maximum number of files open."
8288 msgstr "プロセスがオープン可能なファイル数の上限にすでに達していた。"
8289
8290 #. type: TP
8291 #: build/C/man3/shm_open.3:221
8292 #, no-wrap
8293 msgid "B<ENAMETOOLONG>"
8294 msgstr "B<ENAMETOOLONG>"
8295
8296 #. type: Plain text
8297 #: build/C/man3/shm_open.3:227
8298 msgid "The length of I<name> exceeds B<PATH_MAX>."
8299 msgstr "I<name> の長さが B<PATH_MAX> を越えている。"
8300
8301 #. type: Plain text
8302 #: build/C/man3/shm_open.3:231
8303 msgid ""
8304 "The limit on the total number of files open on the system has been reached."
8305 msgstr "ファイルシステムでオープンできるファイル数の上限に達した。"
8306
8307 #. type: TP
8308 #: build/C/man3/shm_open.3:231 build/C/man3/shm_open.3:240
8309 #: build/C/man2/shmget.2:206
8310 #, no-wrap
8311 msgid "B<ENOENT>"
8312 msgstr "B<ENOENT>"
8313
8314 #. type: Plain text
8315 #: build/C/man3/shm_open.3:240
8316 msgid ""
8317 "An attempt was made to B<shm_open>()  a I<name> that did not exist, and "
8318 "B<O_CREAT> was not specified."
8319 msgstr ""
8320 "存在していない I<name> のオブジェクトを B<shm_open>()  しようとしたが、 "
8321 "B<O_CREAT> が指定されていなかった。"
8322
8323 #. type: Plain text
8324 #: build/C/man3/shm_open.3:247
8325 msgid ""
8326 "An attempt was to made to B<shm_unlink>()  a I<name> that does not exist."
8327 msgstr "存在しない I<name> のオブジェクトを B<shm_unlink>()  しようとした。"
8328
8329 #. type: Plain text
8330 #: build/C/man3/shm_open.3:249
8331 msgid "These functions are provided in glibc 2.2 and later."
8332 msgstr "これらの関数は glibc 2.2 以降で提供されている。"
8333
8334 #. type: Plain text
8335 #: build/C/man3/shm_open.3:255
8336 msgid ""
8337 "POSIX.1-2001 says that the group ownership of a newly created shared memory "
8338 "object is set to either the calling process's effective group ID or \"a "
8339 "system default group ID\"."
8340 msgstr ""
8341 "POSIX.1-2001 には、新規に作成される共有メモリオブジェクトのグループ所有権"
8342 "は、 呼び出し元プロセスの実効グループ ID か 「システムのデフォルトのグループ "
8343 "ID」 のどちらかに設定される、と書かれている。"
8344
8345 #. type: Plain text
8346 #: build/C/man3/shm_open.3:264
8347 msgid ""
8348 "POSIX leaves the behavior of the combination of B<O_RDONLY> and B<O_TRUNC> "
8349 "unspecified.  On Linux, this will successfully truncate an existing shared "
8350 "memory object\\(emthis may not be so on other UNIX systems."
8351 msgstr ""
8352 "POSIX は B<O_RDONLY> と B<O_TRUNC> が一緒に指定された場合の動作を未定義にして"
8353 "いる。Linux では、 既存の共有メモリ・オブジェクトに対する切り詰め (truncate) "
8354 "は成功する。 しかし、他の UNIX システムでも同じであるとは限らない。"
8355
8356 #. type: Plain text
8357 #: build/C/man3/shm_open.3:269
8358 msgid ""
8359 "The POSIX shared memory object implementation on Linux 2.4 makes use of a "
8360 "dedicated file system, which is normally mounted under I</dev/shm>."
8361 msgstr ""
8362 "Linux 2.4 における POSIX 共有メモリ・オブジェクトの実装は 専用のファイルシス"
8363 "テムを使用する。そのファイルシステムは通常 I</dev/shm> にマウントされる。"
8364
8365 #. type: Plain text
8366 #: build/C/man3/shm_open.3:280
8367 msgid ""
8368 "B<close>(2), B<fchmod>(2), B<fchown>(2), B<fcntl>(2), B<fstat>(2), "
8369 "B<ftruncate>(2), B<mmap>(2), B<open>(2), B<umask>(2), B<shm_overview>(7)"
8370 msgstr ""
8371 "B<close>(2), B<fchmod>(2), B<fchown>(2), B<fcntl>(2), B<fstat>(2), "
8372 "B<ftruncate>(2), B<mmap>(2), B<open>(2), B<umask>(2), B<shm_overview>(7)"
8373
8374 #. type: TH
8375 #: build/C/man7/shm_overview.7:27
8376 #, no-wrap
8377 msgid "SHM_OVERVIEW"
8378 msgstr "SHM_OVERVIEW"
8379
8380 #. type: Plain text
8381 #: build/C/man7/shm_overview.7:30
8382 msgid "shm_overview - Overview of POSIX shared memory"
8383 msgstr "shm_overview - POSIX 共有メモリの概要"
8384
8385 #. type: Plain text
8386 #: build/C/man7/shm_overview.7:33
8387 msgid ""
8388 "The POSIX shared memory API allows processes to communicate information by "
8389 "sharing a region of memory."
8390 msgstr ""
8391 "POSIX 共有メモリ API を使用すると、メモリのある領域を共有して、 プロセス間で"
8392 "情報をやり取りすることができる。"
8393
8394 #. type: Plain text
8395 #: build/C/man7/shm_overview.7:35
8396 msgid "The interfaces employed in the API are:"
8397 msgstr "この API では以下のインターフェースが採用されている。"
8398
8399 #. type: TP
8400 #: build/C/man7/shm_overview.7:35
8401 #, no-wrap
8402 msgid "B<shm_open>(3)"
8403 msgstr "B<shm_open>(3)"
8404
8405 #. type: Plain text
8406 #: build/C/man7/shm_overview.7:42
8407 msgid ""
8408 "Create and open a new object, or open an existing object.  This is analogous "
8409 "to B<open>(2).  The call returns a file descriptor for use by the other "
8410 "interfaces listed below."
8411 msgstr ""
8412 "新しいオブジェクトを生成しオープンする、もしくは 既存のオブジェクトをオープン"
8413 "する。これは B<open>(2)  と同じである。下記にある他のインターフェースで使用す"
8414 "る ファイルディスクリプタを返す。"
8415
8416 #. type: TP
8417 #: build/C/man7/shm_overview.7:42
8418 #, no-wrap
8419 msgid "B<ftruncate>(2)"
8420 msgstr "B<ftruncate>(2)"
8421
8422 #. type: Plain text
8423 #: build/C/man7/shm_overview.7:46
8424 msgid ""
8425 "Set the size of the shared memory object.  (A newly created shared memory "
8426 "object has a length of zero.)"
8427 msgstr "共有メモリオブジェクトの大きさを設定する。"
8428
8429 #. type: Plain text
8430 #: build/C/man7/shm_overview.7:50
8431 msgid ""
8432 "Map the shared memory object into the virtual address space of the calling "
8433 "process."
8434 msgstr ""
8435 "呼び出したプロセスの仮想アドレス空間に共有メモリオブジェクトを マップする。"
8436
8437 #. type: TP
8438 #: build/C/man7/shm_overview.7:50
8439 #, no-wrap
8440 msgid "B<munmap>(2)"
8441 msgstr "B<munmap>(2)"
8442
8443 #. type: Plain text
8444 #: build/C/man7/shm_overview.7:54
8445 msgid ""
8446 "Unmap the shared memory object from the virtual address space of the calling "
8447 "process."
8448 msgstr ""
8449 "呼び出したプロセスの仮想アドレス空間から 共有メモリオブジェクトをアンマップす"
8450 "る。"
8451
8452 #. type: TP
8453 #: build/C/man7/shm_overview.7:54
8454 #, no-wrap
8455 msgid "B<shm_unlink>(3)"
8456 msgstr "B<shm_unlink>(3)"
8457
8458 #. type: Plain text
8459 #: build/C/man7/shm_overview.7:57
8460 msgid "Remove a shared memory object name."
8461 msgstr "共有メモリオブジェクト名を削除する。"
8462
8463 #. type: TP
8464 #: build/C/man7/shm_overview.7:57
8465 #, no-wrap
8466 msgid "B<close>(2)"
8467 msgstr "B<close>(2)"
8468
8469 #. type: Plain text
8470 #: build/C/man7/shm_overview.7:62
8471 msgid ""
8472 "Close the file descriptor allocated by B<shm_open>(3)  when it is no longer "
8473 "needed."
8474 msgstr ""
8475 "B<shm_open>(3)  で割り当てられたファイルディスクリプタが不要になった際に、 そ"
8476 "のファイルディスクリプタをクローズする。"
8477
8478 #. type: TP
8479 #: build/C/man7/shm_overview.7:62
8480 #, no-wrap
8481 msgid "B<fstat>(2)"
8482 msgstr "B<fstat>(2)"
8483
8484 #. type: Plain text
8485 #: build/C/man7/shm_overview.7:76
8486 msgid ""
8487 "Obtain a I<stat> structure that describes the shared memory object.  Among "
8488 "the information returned by this call are the object's size (I<st_size>), "
8489 "permissions (I<st_mode>), owner (I<st_uid>), and group (I<st_gid>)."
8490 msgstr ""
8491 "その共有メモリオブジェクトについての情報が入った I<stat> 構造体を取得する。 "
8492 "このシステムコールが返す情報には、オブジェクトのサイズ (I<st_size>)、 許可属"
8493 "性 (I<st_mode>)、 所有者 (I<st_uid>)、 グループ (I<st_gid>)  がある。"
8494
8495 #. type: TP
8496 #: build/C/man7/shm_overview.7:76
8497 #, no-wrap
8498 msgid "B<fchown>(2)"
8499 msgstr "B<fchown>(2)"
8500
8501 #. type: Plain text
8502 #: build/C/man7/shm_overview.7:79
8503 msgid "To change the ownership of a shared memory object."
8504 msgstr "共有メモリオブジェクトの所有権を変更する。"
8505
8506 #. type: TP
8507 #: build/C/man7/shm_overview.7:79
8508 #, no-wrap
8509 msgid "B<fchmod>(2)"
8510 msgstr "B<fchmod>(2)"
8511
8512 #. type: Plain text
8513 #: build/C/man7/shm_overview.7:82
8514 msgid "To change the permissions of a shared memory object."
8515 msgstr "共有メモリオブジェクトの許可属性を変更する。"
8516
8517 #. type: SS
8518 #: build/C/man7/shm_overview.7:82
8519 #, no-wrap
8520 msgid "Versions"
8521 msgstr "Versions"
8522
8523 #. type: Plain text
8524 #: build/C/man7/shm_overview.7:84
8525 msgid "POSIX shared memory is supported since Linux 2.4 and glibc 2.2."
8526 msgstr "POSIX 共有メモリは Linux 2.4 と glibc 2.2 以降でサポートされている。"
8527
8528 #. type: SS
8529 #: build/C/man7/shm_overview.7:84
8530 #, no-wrap
8531 msgid "Persistence"
8532 msgstr "持続性"
8533
8534 #. type: Plain text
8535 #: build/C/man7/shm_overview.7:89
8536 msgid ""
8537 "POSIX shared memory objects have kernel persistence: a shared memory object "
8538 "will exist until the system is shut down, or until all processes have "
8539 "unmapped the object and it has been deleted with B<shm_unlink>(3)"
8540 msgstr ""
8541 "POSIX 共有メモリオブジェクトはカーネル内で保持される。 共有メモリオブジェクト"
8542 "は、システムがシャットダウンされるか、 全てのプロセスがそのオブジェクトをアン"
8543 "マップし、 B<shm_unlink>(3)  で削除されるまで、存在し続ける。"
8544
8545 #. type: SS
8546 #: build/C/man7/shm_overview.7:89
8547 #, no-wrap
8548 msgid "Linking"
8549 msgstr "リンク"
8550
8551 #. type: Plain text
8552 #: build/C/man7/shm_overview.7:94
8553 msgid ""
8554 "Programs using the POSIX shared memory API must be compiled with I<cc -lrt> "
8555 "to link against the real-time library, I<librt>."
8556 msgstr ""
8557 "POSIX 共有メモリ API を使用したプログラムは I<cc -lrt> でコンパイルし、リアル"
8558 "タイムライブラリ I<librt> とリンクしなければならない。"
8559
8560 #. type: SS
8561 #: build/C/man7/shm_overview.7:94
8562 #, no-wrap
8563 msgid "Accessing shared memory objects via the file system"
8564 msgstr "ファイルシステム経由での共有メモリオブジェクトへのアクセス"
8565
8566 #. type: Plain text
8567 #: build/C/man7/shm_overview.7:101
8568 msgid ""
8569 "On Linux, shared memory objects are created in a (I<tmpfs>)  virtual file "
8570 "system, normally mounted under I</dev/shm>.  Since kernel 2.6.19, Linux "
8571 "supports the use of access control lists (ACLs)  to control the permissions "
8572 "of objects in the virtual file system."
8573 msgstr ""
8574 "Linux では、共有メモリオブジェクトは通常 I</dev/shm> 以下にマウントされる仮想"
8575 "ファイルシステム (I<tmpfs>)  内に作成される。 カーネル 2.6.19 以降の Linux で"
8576 "は、 仮想ファイルシステム内のオブジェクトの許可属性の制御に、 アクセス制御リ"
8577 "スト (ACL; access control lists) を使うことができる。"
8578
8579 #. type: Plain text
8580 #: build/C/man7/shm_overview.7:106
8581 msgid ""
8582 "Typically, processes must synchronize their access to a shared memory "
8583 "object, using, for example, POSIX semaphores."
8584 msgstr ""
8585 "通常は、共有メモリオブジェクトにアクセスするプロセスは、 POSIX セマフォなどを"
8586 "使ってプロセス間で同期をとらなければならない。"
8587
8588 #. type: Plain text
8589 #: build/C/man7/shm_overview.7:114
8590 msgid ""
8591 "System V shared memory (B<shmget>(2), B<shmop>(2), etc.) is an older shared "
8592 "memory API.  POSIX shared memory provides a simpler, and better designed "
8593 "interface; on the other hand POSIX shared memory is somewhat less widely "
8594 "available (especially on older systems) than System V shared memory."
8595 msgstr ""
8596 "System V 共有メモリ (B<shmget>(2), B<shmop>(2)  など) は古い共有メモリ API で"
8597 "ある。 POSIX 共有メモリは、より簡単で、うまく設計されたインタフェースを提供し"
8598 "ている。 一方で、POSIX 共有メモリは System V 共有メモリと比べると 利用できる"
8599 "システムが少ない (特に、古いシステムでは少ない)。"
8600
8601 #. type: Plain text
8602 #: build/C/man7/shm_overview.7:127
8603 msgid ""
8604 "B<fchmod>(2), B<fchown>(2), B<fstat>(2), B<ftruncate>(2), B<mmap>(2), "
8605 "B<mprotect>(2), B<munmap>(2), B<shmget>(2), B<shmop>(2), B<shm_open>(3), "
8606 "B<shm_unlink>(3), B<sem_overview>(7)"
8607 msgstr ""
8608 "B<fchmod>(2), B<fchown>(2), B<fstat>(2), B<ftruncate>(2), B<mmap>(2), "
8609 "B<mprotect>(2), B<munmap>(2), B<shmget>(2), B<shmop>(2), B<shm_open>(3), "
8610 "B<shm_unlink>(3), B<sem_overview>(7)"
8611
8612 #. type: TH
8613 #: build/C/man2/shmctl.2:43
8614 #, no-wrap
8615 msgid "SHMCTL"
8616 msgstr "SHMCTL"
8617
8618 #. type: TH
8619 #: build/C/man2/shmctl.2:43
8620 #, no-wrap
8621 msgid "2008-08-07"
8622 msgstr "2008-08-07"
8623
8624 #. type: Plain text
8625 #: build/C/man2/shmctl.2:46
8626 msgid "shmctl - shared memory control"
8627 msgstr "shmctl - 共有メモリ (shared memory) を制御する"
8628
8629 #. type: Plain text
8630 #: build/C/man2/shmctl.2:49 build/C/man2/shmget.2:42
8631 msgid "B<#include E<lt>sys/ipc.hE<gt>>"
8632 msgstr "B<#include E<lt>sys/ipc.hE<gt>>"
8633
8634 #. type: Plain text
8635 #: build/C/man2/shmctl.2:51 build/C/man2/shmget.2:44
8636 msgid "B<#include E<lt>sys/shm.hE<gt>>"
8637 msgstr "B<#include E<lt>sys/shm.hE<gt>>"
8638
8639 #. type: Plain text
8640 #: build/C/man2/shmctl.2:53
8641 msgid ""
8642 "B<int shmctl(int >I<shmid>B<, int >I<cmd>B<, struct shmid_ds *>I<buf>B<);>"
8643 msgstr ""
8644 "B<int shmctl(int >I<shmid>B<, int >I<cmd>B<, struct shmid_ds *>I<buf>B<);>"
8645
8646 #. type: Plain text
8647 #: build/C/man2/shmctl.2:60
8648 msgid ""
8649 "B<shmctl>()  performs the control operation specified by I<cmd> on the "
8650 "shared memory segment whose identifier is given in I<shmid>."
8651 msgstr ""
8652 "B<shmctl>()  は、識別子が I<shmid> の共有メモリ・セグメントに対して I<cmd> で"
8653 "指示した制御命令を実行する。"
8654
8655 #. type: Plain text
8656 #: build/C/man2/shmctl.2:65
8657 msgid ""
8658 "The I<buf> argument is a pointer to a I<shmid_ds> structure, defined in "
8659 "I<E<lt>sys/shm.hE<gt>> as follows:"
8660 msgstr ""
8661 "I<buf> 引き数は、 I<shmid_ds> 構造体へのポインタである。 この構造体は "
8662 "I<E<lt>sys/shm.hE<gt>> で以下のように定義されている"
8663
8664 #. type: Plain text
8665 #: build/C/man2/shmctl.2:79
8666 #, no-wrap
8667 msgid ""
8668 "struct shmid_ds {\n"
8669 "    struct ipc_perm shm_perm;    /* Ownership and permissions */\n"
8670 "    size_t          shm_segsz;   /* Size of segment (bytes) */\n"
8671 "    time_t          shm_atime;   /* Last attach time */\n"
8672 "    time_t          shm_dtime;   /* Last detach time */\n"
8673 "    time_t          shm_ctime;   /* Last change time */\n"
8674 "    pid_t           shm_cpid;    /* PID of creator */\n"
8675 "    pid_t           shm_lpid;    /* PID of last shmat(2)/shmdt(2) */\n"
8676 "    shmatt_t        shm_nattch;  /* No. of current attaches */\n"
8677 "    ...\n"
8678 "};\n"
8679 msgstr ""
8680 "struct shmid_ds {\n"
8681 "    struct ipc_perm shm_perm;    /* 所有権と許可 */\n"
8682 "    size_t          shm_segsz;   /* セグメントのサイズ (バイト) */\n"
8683 "    time_t          shm_atime;   /* 最後の付加 (attach) の時刻 */\n"
8684 "    time_t          shm_dtime;   /* 最後の分離 (detach) の時刻 */\n"
8685 "    time_t          shm_ctime;   /* 最後に変更が行われた時刻 */\n"
8686 "    pid_t           shm_cpid;    /* 作成者 (creator) の PID */\n"
8687 "    pid_t           shm_lpid;    /* 最後の shmat(2)/shmdt(2) の PID */\n"
8688 "    shmatt_t        shm_nattch;  /* 現在付加されている数 */\n"
8689 "    ...\n"
8690 "};\n"
8691
8692 #. type: Plain text
8693 #: build/C/man2/shmctl.2:87
8694 msgid ""
8695 "The I<ipc_perm> structure is defined in I<E<lt>sys/ipc.hE<gt>> as follows "
8696 "(the highlighted fields are settable using B<IPC_SET>):"
8697 msgstr ""
8698 "I<ipc_perm> 構造体は I<E<lt>sys/ipc.hE<gt>> で以下のように定義されている (強"
8699 "調されたフィールドは B<IPC_SET> を使って設定可能である):"
8700
8701 #. type: Plain text
8702 #: build/C/man2/shmctl.2:100
8703 #, no-wrap
8704 msgid ""
8705 "struct ipc_perm {\n"
8706 "    key_t          __key;    /* Key supplied to shmget(2) */\n"
8707 "    uid_t          B<uid>;      /* Effective UID of owner */\n"
8708 "    gid_t          B<gid>;      /* Effective GID of owner */\n"
8709 "    uid_t          cuid;     /* Effective UID of creator */\n"
8710 "    gid_t          cgid;     /* Effective GID of creator */\n"
8711 "    unsigned short B<mode>;     /* B<Permissions> + SHM_DEST and\n"
8712 "                                SHM_LOCKED flags */\n"
8713 "    unsigned short __seq;    /* Sequence number */\n"
8714 "};\n"
8715 msgstr ""
8716 "struct ipc_perm {\n"
8717 "    key_t          __key;    /* shmget(2) に与えられるキー */\n"
8718 "    uid_t          B<uid>;      /* 所有者の実効 UID */\n"
8719 "    gid_t          B<gid>;      /* 所有者の実効 GID */\n"
8720 "    uid_t          cuid;     /* 作成者の実効 UID */\n"
8721 "    gid_t          cgid;     /* 作成者の実効 GID */\n"
8722 "    unsigned short B<mode>;     /* B<許可> + SHM_DEST と\n"
8723 "                                SHM_LOCKED フラグ */\n"
8724 "    unsigned short __seq;    /* シーケンス番号 */\n"
8725 "};\n"
8726
8727 #. type: Plain text
8728 #: build/C/man2/shmctl.2:106
8729 msgid "Valid values for I<cmd> are:"
8730 msgstr "I<cmd> として有効な値は以下の通り:"
8731
8732 #. type: TP
8733 #: build/C/man2/shmctl.2:107
8734 #, no-wrap
8735 msgid "B<IPC_STAT>"
8736 msgstr "B<IPC_STAT>"
8737
8738 #. type: Plain text
8739 #: build/C/man2/shmctl.2:116
8740 msgid ""
8741 "Copy information from the kernel data structure associated with I<shmid> "
8742 "into the I<shmid_ds> structure pointed to by I<buf>.  The caller must have "
8743 "read permission on the shared memory segment."
8744 msgstr ""
8745 "I<shmid> に関連づけられたカーネルデータ構造体の情報を I<buf> で指された "
8746 "I<shmid_ds> 構造体にコピーする。 呼び出し元は共有メモリ・セグメントに対する "
8747 "読み込み許可を持たなければならない。"
8748
8749 #. type: TP
8750 #: build/C/man2/shmctl.2:116
8751 #, no-wrap
8752 msgid "B<IPC_SET>"
8753 msgstr "B<IPC_SET>"
8754
8755 #. type: Plain text
8756 #: build/C/man2/shmctl.2:134
8757 msgid ""
8758 "Write the values of some members of the I<shmid_ds> structure pointed to by "
8759 "I<buf> to the kernel data structure associated with this shared memory "
8760 "segment, updating also its I<shm_ctime> member.  The following fields can be "
8761 "changed: I<shm_perm.uid>, I<shm_perm.gid>, and (the least significant 9 bits "
8762 "of) I<shm_perm.mode>.  The effective UID of the calling process must match "
8763 "the owner (I<shm_perm.uid>)  or creator (I<shm_perm.cuid>)  of the shared "
8764 "memory segment, or the caller must be privileged."
8765 msgstr ""
8766 "I<buf> によって指される I<shmid_ds> 構造体のいくつかのメンバーの値を、 この共"
8767 "有メモリ・セグメントに関連づけられたカーネルデータ構造体に書き込み、 "
8768 "I<shm_ctime> メンバーも更新する。 以下のフィールドは変更できる。 I<shm_perm."
8769 "uid>, I<shm_perm.gid>, I<shm_perm.mode> (の最下位 9 ビット)。 呼び出したプロ"
8770 "セスの実効 UID が所有者 (I<shm_perm.uid>)  または作成者 (I<shm_perm.cuid>)  "
8771 "と一致するか、呼び出し元が特権を持たなければならない。"
8772
8773 #. type: TP
8774 #: build/C/man2/shmctl.2:134
8775 #, no-wrap
8776 msgid "B<IPC_RMID>"
8777 msgstr "B<IPC_RMID>"
8778
8779 #. type: Plain text
8780 #: build/C/man2/shmctl.2:151
8781 msgid ""
8782 "Mark the segment to be destroyed.  The segment will only actually be "
8783 "destroyed after the last process detaches it (i.e., when the I<shm_nattch> "
8784 "member of the associated structure I<shmid_ds> is zero).  The caller must be "
8785 "the owner or creator, or be privileged.  If a segment has been marked for "
8786 "destruction, then the (nonstandard)  B<SHM_DEST> flag of the I<shm_perm."
8787 "mode> field in the associated data structure retrieved by B<IPC_STAT> will "
8788 "be set."
8789 msgstr ""
8790 "セグメントに破棄済みのマークを付ける。 セグメントは、実際には最後プロセスがセ"
8791 "グメントを分離した (関連する I<shmid_ds> 構造体の I<shm_nattch> メンバーが 0 "
8792 "になった) 後でのみ破棄される。 呼び出し元は所有者か作成者であるか、特権を持た"
8793 "なければならない。 セグメントに破棄のマークが付けられると、 関連するデータ構"
8794 "造体において I<shm_perm.mode> フィールドの (標準ではない)  B<SHM_DEST> フラグ"
8795 "が設定される。 このデータ構造体は B<IPC_STAT> で取得される。"
8796
8797 #. type: Plain text
8798 #: build/C/man2/shmctl.2:154
8799 msgid ""
8800 "The caller I<must> ensure that a segment is eventually destroyed; otherwise "
8801 "its pages that were faulted in will remain in memory or swap."
8802 msgstr ""
8803 "呼び出し元は最終的にはセグメントを忘れずに破棄I<しなければならない>。 そうで"
8804 "なれば、フォールト (fault) されたページは メモリかスワップ (swap) に残り続け"
8805 "る。"
8806
8807 #. type: TP
8808 #: build/C/man2/shmctl.2:154
8809 #, no-wrap
8810 msgid "B<IPC_INFO> (Linux-specific)"
8811 msgstr "B<IPC_INFO> (Linux 固有)"
8812
8813 #. type: Plain text
8814 #: build/C/man2/shmctl.2:167
8815 msgid ""
8816 "Returns information about system-wide shared memory limits and parameters in "
8817 "the structure pointed to by I<buf>.  This structure is of type I<shminfo> "
8818 "(thus, a cast is required), defined in I<E<lt>sys/shm.hE<gt>> if the "
8819 "B<_GNU_SOURCE> feature test macro is defined:"
8820 msgstr ""
8821 "システム全体での共有メモリの制限とパラメータに関する情報を、 I<buf> が指す構"
8822 "造体に入れて返す。 この構造体は I<shminfo> 型である (そのためキャストが必要で"
8823 "ある)。 I<shminfo> は B<_GNU_SOURCE> 機能検査マクロが定義された場合に "
8824 "I<E<lt>sys/shm.hE<gt>> で以下のように定義される:"
8825
8826 #. type: Plain text
8827 #: build/C/man2/shmctl.2:181
8828 #, no-wrap
8829 msgid ""
8830 "struct  shminfo {\n"
8831 "    unsigned long shmmax; /* Maximum segment size */\n"
8832 "    unsigned long shmmin; /* Minimum segment size;\n"
8833 "                             always 1 */\n"
8834 "    unsigned long shmmni; /* Maximum number of segments */\n"
8835 "    unsigned long shmseg; /* Maximum number of segments\n"
8836 "                             that a process can attach;\n"
8837 "                             unused within kernel */\n"
8838 "    unsigned long shmall; /* Maximum number of pages of\n"
8839 "                             shared memory, system-wide */\n"
8840 "};\n"
8841 msgstr ""
8842 "struct  shminfo {\n"
8843 "    unsigned long shmmax; /* 最大セグメントサイズ */\n"
8844 "    unsigned long shmmin; /* 最小セグメントサイズ。\n"
8845 "                             常に 1 */\n"
8846 "    unsigned long shmmni; /* 最大セグメント数 */\n"
8847 "    unsigned long shmseg; /* プロセスが付加できる\n"
8848 "                             セグメントの最大数。\n"
8849 "                             カーネル内では未使用 */\n"
8850 "    unsigned long shmall; /* 共有メモリの最大ページ数。\n"
8851 "                             システム全体での値 */\n"
8852 "};\n"
8853
8854 #. type: Plain text
8855 #: build/C/man2/shmctl.2:194
8856 msgid ""
8857 "The I<shmmni>, I<shmmax>, and I<shmall> settings can be changed via I</proc> "
8858 "files of the same name; see B<proc>(5)  for details."
8859 msgstr ""
8860 "設定 I<shmmni>, I<shmmax>, I<shmall> は I</proc> にある同じ名前のファイル経由"
8861 "で変更可能である。 詳しくは B<proc>(5)  を参照。"
8862
8863 #. type: TP
8864 #: build/C/man2/shmctl.2:194
8865 #, no-wrap
8866 msgid "B<SHM_INFO> (Linux-specific)"
8867 msgstr "B<SHM_INFO> (Linux 固有)"
8868
8869 #. type: Plain text
8870 #: build/C/man2/shmctl.2:205
8871 msgid ""
8872 "Returns a I<shm_info> structure whose fields contain information about "
8873 "system resources consumed by shared memory.  This structure is defined in "
8874 "I<E<lt>sys/shm.hE<gt>> if the B<_GNU_SOURCE> feature test macro is defined:"
8875 msgstr ""
8876 "共有メモリが消費しているシステム資源に関する情報を 格納した I<shm_info> 構造"
8877 "体を返す。 この構造体は、 B<_GNU_SOURCE> 機能検査マクロが定義された場合に "
8878 "I<E<lt>sys/shm.hE<gt>> で以下のように定義される:"
8879
8880 #. type: Plain text
8881 #: build/C/man2/shmctl.2:222
8882 #, no-wrap
8883 msgid ""
8884 "struct shm_info {\n"
8885 "    int           used_ids; /* # of currently existing\n"
8886 "                               segments */\n"
8887 "    unsigned long shm_tot;  /* Total number of shared\n"
8888 "                               memory pages */\n"
8889 "    unsigned long shm_rss;  /* # of resident shared\n"
8890 "                               memory pages */\n"
8891 "    unsigned long shm_swp;  /* # of swapped shared\n"
8892 "                               memory pages */\n"
8893 "    unsigned long swap_attempts;\n"
8894 "                            /* Unused since Linux 2.4 */\n"
8895 "    unsigned long swap_successes;\n"
8896 "                            /* Unused since Linux 2.4 */\n"
8897 "};\n"
8898 msgstr ""
8899 "struct shm_info {\n"
8900 "    int           used_ids; /* 現在存在するセグメント数 */\n"
8901 "    unsigned long shm_tot;  /* 共有メモリのページ総数 */\n"
8902 "    unsigned long shm_rss;  /* メモリ上にある (スワップされて\n"
8903 "                               いない) 共有メモリページ数 */\n"
8904 "    unsigned long shm_swp;  /* スワップされている共有メモリ\n"
8905 "                               ページ数 */\n"
8906 "    unsigned long swap_attempts;\n"
8907 "                            /* Linux 2.4 以降では未使用 */\n"
8908 "    unsigned long swap_successes;\n"
8909 "                            /* Linux 2.4 以降では未使用 */\n"
8910 "};\n"
8911
8912 #. type: TP
8913 #: build/C/man2/shmctl.2:224
8914 #, no-wrap
8915 msgid "B<SHM_STAT> (Linux-specific)"
8916 msgstr "B<SHM_STAT> (Linux 固有)"
8917
8918 #. type: Plain text
8919 #: build/C/man2/shmctl.2:235
8920 msgid ""
8921 "Returns a I<shmid_ds> structure as for B<IPC_STAT>.  However, the I<shmid> "
8922 "argument is not a segment identifier, but instead an index into the kernel's "
8923 "internal array that maintains information about all shared memory segments "
8924 "on the system."
8925 msgstr ""
8926 "B<IPC_STAT> と同じく I<shmid_ds> 構造体を返す。 但し、 I<shmid> 引き数は、セ"
8927 "グメント識別子ではなく、システム上の全ての共有メモリ セグメントに関する情報を"
8928 "管理するカーネルの内部配列へのインデックス である。"
8929
8930 #. type: Plain text
8931 #: build/C/man2/shmctl.2:238
8932 msgid ""
8933 "The caller can prevent or allow swapping of a shared memory segment with the "
8934 "following I<cmd> values:"
8935 msgstr ""
8936 "呼び出し元は、I<cmd> に以下の値を指定することで、共有メモリ・セグメントが ス"
8937 "ワップされることを防止したり、許可したりできる:"
8938
8939 #. type: TP
8940 #: build/C/man2/shmctl.2:239
8941 #, no-wrap
8942 msgid "B<SHM_LOCK> (Linux-specific)"
8943 msgstr "B<SHM_LOCK> (Linux 固有)"
8944
8945 #. type: Plain text
8946 #: build/C/man2/shmctl.2:251
8947 msgid ""
8948 "Prevent swapping of the shared memory segment.  The caller must fault in any "
8949 "pages that are required to be present after locking is enabled.  If a "
8950 "segment has been locked, then the (nonstandard)  B<SHM_LOCKED> flag of the "
8951 "I<shm_perm.mode> field in the associated data structure retrieved by "
8952 "B<IPC_STAT> will be set."
8953 msgstr ""
8954 "共有メモリ・セグメントをスワップすることを防止する。 ロックが有効になった後、"
8955 "呼び出し元は、 存在することが要求された全てのページをフォールトさせなければな"
8956 "らない。 セグメントがロックされると、 関連するデータ構造体において "
8957 "I<shm_perm.mode> フィールドの (標準的ではない)  B<SHM_LOCKED> フラグが設定さ"
8958 "れる。 このデータ構造体は B<IPC_STAT> で取得される。"
8959
8960 #. type: TP
8961 #: build/C/man2/shmctl.2:251
8962 #, no-wrap
8963 msgid "B<SHM_UNLOCK> (Linux-specific)"
8964 msgstr "B<SHM_UNLOCK> (Linux 固有)"
8965
8966 #. type: Plain text
8967 #: build/C/man2/shmctl.2:254
8968 msgid "Unlock the segment, allowing it to be swapped out."
8969 msgstr "セグメントのロックを解除し、スワップ・アウトすることを可能にする。"
8970
8971 #.  There was some weirdness in 2.6.9: SHM_LOCK and SHM_UNLOCK could
8972 #.  be applied to a segment, regardless of ownership of the segment.
8973 #.  This was a botch-up in the move to RLIMIT_MEMLOCK, and was fixed
8974 #.  in 2.6.10.  MTK, May 2005
8975 #. type: Plain text
8976 #: build/C/man2/shmctl.2:272
8977 msgid ""
8978 "In kernels before 2.6.10, only a privileged process could employ B<SHM_LOCK> "
8979 "and B<SHM_UNLOCK>.  Since kernel 2.6.10, an unprivileged process can employ "
8980 "these operations if its effective UID matches the owner or creator UID of "
8981 "the segment, and (for B<SHM_LOCK>)  the amount of memory to be locked falls "
8982 "within the B<RLIMIT_MEMLOCK> resource limit (see B<setrlimit>(2))."
8983 msgstr ""
8984 "2.6.10 より前のカーネルでは、特権プロセスだけが B<SHM_LOCK> と B<SHM_UNLOCK> "
8985 "を利用することができた。 2.6.10 以降のカーネルでは、非特権プロセスであっても"
8986 "次の条件を満たせば これらの操作を利用することができる。その条件とは、プロセス"
8987 "の実効 UID がそのセグメントの所有者もしくは作成者の UID と一致し、 "
8988 "(B<SHM_LOCK> の場合には) ロックするメモリの合計が B<RLIMIT_MEMLOCK> リソース"
8989 "上限 (B<setrlimit>(2)  参照) の範囲内に入っていることである。"
8990
8991 #. type: Plain text
8992 #: build/C/man2/shmctl.2:290
8993 msgid ""
8994 "A successful B<IPC_INFO> or B<SHM_INFO> operation returns the index of the "
8995 "highest used entry in the kernel's internal array recording information "
8996 "about all shared memory segments.  (This information can be used with "
8997 "repeated B<SHM_STAT> operations to obtain information about all shared "
8998 "memory segments on the system.)  A successful B<SHM_STAT> operation returns "
8999 "the identifier of the shared memory segment whose index was given in "
9000 "I<shmid>.  Other operations return 0 on success."
9001 msgstr ""
9002 "B<IPC_INFO> と B<SHM_INFO> 操作は、成功すると、全ての共有メモリセグメントに関"
9003 "する情報を 管理しているカーネルの内部配列の使用中エントリのインデックスの う"
9004 "ち最大値を返す (この情報は、システムの全ての共有メモリセグメントに関する情報"
9005 "を 取得するために、 B<SHM_STAT> 操作を繰り返し実行する際に使用できる)。 "
9006 "B<SHM_STAT> 操作は、成功すると、 I<shmid> で指定されたインデックスを持つ共有"
9007 "メモリセグメントの識別子を返す。 他の操作は、成功の場合 0 を返す。"
9008
9009 #. type: Plain text
9010 #: build/C/man2/shmctl.2:294
9011 msgid "On error, -1 is returned, and I<errno> is set appropriately."
9012 msgstr "エラーの場合は -1 を返し、 I<errno> を適切に設定する。"
9013
9014 #. type: Plain text
9015 #: build/C/man2/shmctl.2:303
9016 msgid ""
9017 "B<IPC_STAT> or B<SHM_STAT> is requested and I<shm_perm.mode> does not allow "
9018 "read access for I<shmid>, and the calling process does not have the "
9019 "B<CAP_IPC_OWNER> capability."
9020 msgstr ""
9021 "B<IPC_STAT> または B<SHM_STAT> が要求され、 I<shm_perm.mode> が I<shmid> への"
9022 "読み込みアクセスを許しておらず、 かつ呼び出したプロセスが B<CAP_IPC_OWNER> "
9023 "ケーパビリティ (capability) を持っていない。"
9024
9025 #. type: Plain text
9026 #: build/C/man2/shmctl.2:314
9027 msgid ""
9028 "The argument I<cmd> has value B<IPC_SET> or B<IPC_STAT> but the address "
9029 "pointed to by I<buf> isn't accessible."
9030 msgstr ""
9031 "I<cmd> 引き数に B<IPC_SET> か B<IPC_STAT> が指定されたが I<buf> で指されてい"
9032 "るアドレスにアクセスできない。"
9033
9034 #. type: TP
9035 #: build/C/man2/shmctl.2:314
9036 #, no-wrap
9037 msgid "B<EIDRM>"
9038 msgstr "B<EIDRM>"
9039
9040 #. type: Plain text
9041 #: build/C/man2/shmctl.2:317
9042 msgid "I<shmid> points to a removed identifier."
9043 msgstr "I<shmid> が削除 (remove) された識別子 (identifier) を指している。"
9044
9045 #. type: Plain text
9046 #: build/C/man2/shmctl.2:326
9047 msgid ""
9048 "I<shmid> is not a valid identifier, or I<cmd> is not a valid command.  Or: "
9049 "for a B<SHM_STAT> operation, the index value specified in I<shmid> referred "
9050 "to an array slot that is currently unused."
9051 msgstr ""
9052 "I<shmid> が有効な識別子でないか、 I<cmd> が有効なコマンドでない。 もしくは、 "
9053 "B<SHM_STAT> 操作の場合に、 I<shmid> で指定されたインデックス値が現在未使用の"
9054 "配列のスロットを参照していた。"
9055
9056 #. type: Plain text
9057 #: build/C/man2/shmctl.2:337
9058 msgid ""
9059 "(In kernels since 2.6.9), B<SHM_LOCK> was specified and the size of the to-"
9060 "be-locked segment would mean that the total bytes in locked shared memory "
9061 "segments would exceed the limit for the real user ID of the calling "
9062 "process.  This limit is defined by the B<RLIMIT_MEMLOCK> soft resource limit "
9063 "(see B<setrlimit>(2))."
9064 msgstr ""
9065 "(2.6.9 以降のカーネルにおいて)  B<SHM_LOCK> が指定され、 ロックされる予定のセ"
9066 "グメントのサイズ (ロックされる共有メモリ・セグメントの合計バイト数) が、 呼び"
9067 "出したプロセスの実ユーザー ID についての制限を超えた。 この制限は "
9068 "B<RLIMIT_MEMLOCK> ソフト資源制限で定義される (B<setrlimit>(2)  を参照)。"
9069
9070 #. type: TP
9071 #: build/C/man2/shmctl.2:337
9072 #, no-wrap
9073 msgid "B<EOVERFLOW>"
9074 msgstr "B<EOVERFLOW>"
9075
9076 #. type: Plain text
9077 #: build/C/man2/shmctl.2:342
9078 msgid ""
9079 "B<IPC_STAT> is attempted, and the GID or UID value is too large to be stored "
9080 "in the structure pointed to by I<buf>."
9081 msgstr ""
9082 "B<IPC_STAT> が試みられ、GID や UID の値が I<buf> で指示される構造体に格納する"
9083 "には大き過ぎる。"
9084
9085 #. type: Plain text
9086 #: build/C/man2/shmctl.2:354
9087 msgid ""
9088 "B<IPC_SET> or B<IPC_RMID> is attempted, and the effective user ID of the "
9089 "calling process is not that of the creator (found in I<shm_perm.cuid>), or "
9090 "the owner (found in I<shm_perm.uid>), and the process was not privileged "
9091 "(Linux: did not have the B<CAP_SYS_ADMIN> capability)."
9092 msgstr ""
9093 "B<IPC_SET> か B<IPC_RMID> が試みられ、 呼び出したプロセスの実効ユーザー ID が"
9094 "作成者 (I<shm_perm.cuid>)  でも所有者 (I<shm_perm.uid>)  でもなく、プロセスが"
9095 "特権を持たない (Linux では B<CAP_SYS_ADMIN> ケーパビリティを持たない)。"
9096
9097 #. type: Plain text
9098 #: build/C/man2/shmctl.2:366
9099 msgid ""
9100 "Or (in kernels before 2.6.9), B<SHM_LOCK> or B<SHM_UNLOCK> was specified, "
9101 "but the process was not privileged (Linux: did not have the B<CAP_IPC_LOCK> "
9102 "capability).  (Since Linux 2.6.9, this error can also occur if the "
9103 "B<RLIMIT_MEMLOCK> is 0 and the caller is not privileged.)"
9104 msgstr ""
9105 "または (2.6.9 より前のカーネルで)  B<SHM_LOCK> または B<SHM_UNLOCK> が指定さ"
9106 "れているが、プロセスが特権を持たない (Linux では B<CAP_IPC_LOCK> ケーパビリ"
9107 "ティを持たない)。 (Linux 2.6.9 以降では、 B<RLIMIT_MEMLOCK> が 0 で呼び出し元"
9108 "が特権を持たない場合にも、このエラーが起こる。)"
9109
9110 #.  SVr4 documents an additional error condition EMFILE.
9111 #. type: Plain text
9112 #: build/C/man2/shmctl.2:371 build/C/man2/shmget.2:232
9113 #: build/C/man2/shmop.2:229
9114 msgid "SVr4, POSIX.1-2001."
9115 msgstr "SVr4, POSIX.1-2001."
9116
9117 #. type: Plain text
9118 #: build/C/man2/shmctl.2:382
9119 msgid ""
9120 "The B<IPC_INFO>, B<SHM_STAT> and B<SHM_INFO> operations are used by the "
9121 "B<ipcs>(1)  program to provide information on allocated resources.  In the "
9122 "future these may modified or moved to a /proc file system interface."
9123 msgstr ""
9124 "B<IPC_INFO>, B<SHM_STAT>, B<SHM_INFO> 操作は、 B<ipcs>(1)  プログラムで割り当"
9125 "て済の資源に関する情報を提供するために 使用されている。将来、これらの操作は変"
9126 "更されたり、 /proc ファイルシステムのインタフェースに移動されるかもしれない。"
9127
9128 #. type: Plain text
9129 #: build/C/man2/shmctl.2:390
9130 msgid ""
9131 "Linux permits a process to attach (B<shmat>(2))  a shared memory segment "
9132 "that has already been marked for deletion using I<shmctl(IPC_RMID)>.  This "
9133 "feature is not available on other UNIX implementations; portable "
9134 "applications should avoid relying on it."
9135 msgstr ""
9136 "Linux では、 I<shmctl(IPC_RMID)> を使ってすでに削除マークがつけられている共有"
9137 "メモリ・セグメントを あるプロセスが付加 (attach)  (B<shmat>(2))  することを許"
9138 "可している。 この機能は他の UNIX の実装では利用できない。 移植性を考慮したア"
9139 "プリケーションではこれに依存しないようにすべきである。"
9140
9141 #. type: Plain text
9142 #: build/C/man2/shmctl.2:403
9143 msgid ""
9144 "Various fields in a I<struct shmid_ds> were typed as I<short> under Linux "
9145 "2.2 and have become I<long> under Linux 2.4.  To take advantage of this, a "
9146 "recompilation under glibc-2.1.91 or later should suffice.  (The kernel "
9147 "distinguishes old and new calls by an B<IPC_64> flag in I<cmd>.)"
9148 msgstr ""
9149 "I<構造体 shmid_ds> 内の多くのフィールドは、 Linux 2.2 では I<short> 型だった"
9150 "が、Linux 2.4 では I<long> 型になった。 この利点を生かすには、glibc-2.1.91 以"
9151 "降の環境下で 再コンパイルすれば十分である。 カーネルは新しい形式の呼び出しと"
9152 "古い形式の呼び出しを I<cmd> 内の B<IPC_64> フラグで区別する。"
9153
9154 #. type: Plain text
9155 #: build/C/man2/shmctl.2:410
9156 msgid ""
9157 "B<mlock>(2), B<setrlimit>(2), B<shmget>(2), B<shmop>(2), B<capabilities>(7), "
9158 "B<svipc>(7)"
9159 msgstr ""
9160 "B<mlock>(2), B<setrlimit>(2), B<shmget>(2), B<shmop>(2), B<capabilities>(7), "
9161 "B<shm_overview>(7), B<svipc>(7)"
9162
9163 #. type: TH
9164 #: build/C/man2/shmget.2:36
9165 #, no-wrap
9166 msgid "SHMGET"
9167 msgstr "SHMGET"
9168
9169 #. type: TH
9170 #: build/C/man2/shmget.2:36
9171 #, no-wrap
9172 msgid "2006-05-02"
9173 msgstr "2006-05-02"
9174
9175 #. type: Plain text
9176 #: build/C/man2/shmget.2:39
9177 msgid "shmget - allocates a shared memory segment"
9178 msgstr "shmget - 共有メモリ・セグメントを割り当てる"
9179
9180 #. type: Plain text
9181 #: build/C/man2/shmget.2:46
9182 msgid "B<int shmget(key_t >I<key>B<, size_t >I<size>B<, int >I<shmflg>B<);>"
9183 msgstr "B<int shmget(key_t >I<key>B<, size_t >I<size>B<, int >I<shmflg>B<);>"
9184
9185 #. type: Plain text
9186 #: build/C/man2/shmget.2:70
9187 msgid ""
9188 "B<shmget>()  returns the identifier of the shared memory segment associated "
9189 "with the value of the argument I<key>.  A new shared memory segment, with "
9190 "size equal to the value of I<size> rounded up to a multiple of B<PAGE_SIZE>, "
9191 "is created if I<key> has the value B<IPC_PRIVATE> or I<key> isn't "
9192 "B<IPC_PRIVATE>, no shared memory segment corresponding to I<key> exists, and "
9193 "B<IPC_CREAT> is specified in I<shmflg>."
9194 msgstr ""
9195 "B<shmget>()  は I<key> 引き数に対応する共有メモリ・セグメントの識別子を返"
9196 "す。 I<key> の値が B<IPC_PRIVATE> の場合、もしくは I<key> に対応する共有メモ"
9197 "リ・セグメントが存在せず、 I<shmflg> に B<IPC_CREAT> が指定されていた場合、 "
9198 "新しい共有メモリ・セグメントを作成する。 作成される共有メモリ・セグメント"
9199 "は、 I<size> 引き数の値を B<PAGE_SIZE> の倍数へと切り上げた (round up) 大きさ"
9200 "となる。"
9201
9202 #. type: Plain text
9203 #: build/C/man2/shmget.2:89
9204 msgid ""
9205 "If I<shmflg> specifies both B<IPC_CREAT> and B<IPC_EXCL> and a shared memory "
9206 "segment already exists for I<key>, then B<shmget>()  fails with I<errno> set "
9207 "to B<EEXIST>.  (This is analogous to the effect of the combination B<O_CREAT "
9208 "| O_EXCL> for B<open>(2).)"
9209 msgstr ""
9210 "I<shmflg> に B<IPC_CREAT> と B<IPC_EXCL> の両方が指定された場合、 I<key> に対"
9211 "応する共有メモリ・セグメントが既に存在すると、 B<shmget>()  は失敗し、 "
9212 "I<errno> に B<EEXIST> が設定される (これは B<open>(2)  に B<O_CREAT | "
9213 "O_EXCL> を指定した場合の動作と同じである)。"
9214
9215 #. type: Plain text
9216 #: build/C/man2/shmget.2:93
9217 msgid "The value I<shmflg> is composed of:"
9218 msgstr "I<shmflg> は以下の内容から構成される:"
9219
9220 #. type: TP
9221 #: build/C/man2/shmget.2:93
9222 #, no-wrap
9223 msgid "B<IPC_CREAT>"
9224 msgstr "B<IPC_CREAT>"
9225
9226 #. type: Plain text
9227 #: build/C/man2/shmget.2:100
9228 msgid ""
9229 "to create a new segment.  If this flag is not used, then B<shmget>()  will "
9230 "find the segment associated with I<key> and check to see if the user has "
9231 "permission to access the segment."
9232 msgstr ""
9233 "新しいセグメントを作成する。このフラグが指定されなかった場合、 B<shmget>()  "
9234 "は I<key> に対応するセグメントを探し、 ユーザがそのセグメントにアクセスする許"
9235 "可があるかどうかをチェックする。"
9236
9237 #. type: TP
9238 #: build/C/man2/shmget.2:100
9239 #, no-wrap
9240 msgid "B<IPC_EXCL>"
9241 msgstr "B<IPC_EXCL>"
9242
9243 #. type: Plain text
9244 #: build/C/man2/shmget.2:103
9245 msgid "used with B<IPC_CREAT> to ensure failure if the segment already exists."
9246 msgstr ""
9247 "B<IPC_CREAT> と共に使用し、セグメントが既に存在した場合には 失敗することを保"
9248 "証する。"
9249
9250 #. type: TP
9251 #: build/C/man2/shmget.2:103
9252 #, no-wrap
9253 msgid "I<mode_flags>"
9254 msgstr "I<mode_flags>"
9255
9256 #. type: Plain text
9257 #: build/C/man2/shmget.2:113
9258 msgid ""
9259 "(least significant 9 bits)  specifying the permissions granted to the owner, "
9260 "group, and world.  These bits have the same format, and the same meaning, as "
9261 "the I<mode> argument of B<open>(2).  Presently, the execute permissions are "
9262 "not used by the system."
9263 msgstr ""
9264 "(下位 9 ビット)  所有者、グループ、他人 (world) への許可を指定する。 これらの"
9265 "ビットは B<open>(2)  の I<mode> 引き数と同じ形式で同じ意味を持つ。 今のとこ"
9266 "ろ、システムは実行 (execute) 許可を参照しない。"
9267
9268 #. type: TP
9269 #: build/C/man2/shmget.2:113
9270 #, no-wrap
9271 msgid "B<SHM_HUGETLB> (since Linux 2.6)"
9272 msgstr "B<SHM_HUGETLB> (Linux 2.6 以降)"
9273
9274 #. type: Plain text
9275 #: build/C/man2/shmget.2:119
9276 msgid ""
9277 "Allocate the segment using \"huge pages.\" See the kernel source file "
9278 "I<Documentation/vm/hugetlbpage.txt> for further information."
9279 msgstr ""
9280 "\"ヒュージページ (huge page)\" を使うセグメントを割り当てる。 詳細な情報は、"
9281 "カーネル・ソースのファイル I<Documentation/vm/hugetlbpage.txt> を参照。"
9282
9283 #. type: TP
9284 #: build/C/man2/shmget.2:119
9285 #, no-wrap
9286 msgid "B<SHM_NORESERVE> (since Linux 2.6.15)"
9287 msgstr "B<SHM_NORESERVE> (Linux 2.6.15 以降)"
9288
9289 #.  As at 2.6.17-rc2, this flag has no effect if SHM_HUGETLB was also
9290 #.  specified.
9291 #. type: Plain text
9292 #: build/C/man2/shmget.2:138
9293 msgid ""
9294 "This flag serves the same purpose as the B<mmap>(2)  B<MAP_NORESERVE> flag.  "
9295 "Do not reserve swap space for this segment.  When swap space is reserved, "
9296 "one has the guarantee that it is possible to modify the segment.  When swap "
9297 "space is not reserved one might get B<SIGSEGV> upon a write if no physical "
9298 "memory is available.  See also the discussion of the file I</proc/sys/vm/"
9299 "overcommit_memory> in B<proc>(5)."
9300 msgstr ""
9301 "このフラグは、 B<mmap>(2)  の B<MAP_NORESERVE> フラグと同じ役割を果たす。 こ"
9302 "のセグメントに対するスワップ空間の予約を行わない。 スワップ空間を予約した場合"
9303 "は、そのセグメントの変更が必ず成功することが 保証される。スワップ空間の予約を"
9304 "行わなかった場合は、物理メモリに空きが ないと書き込み時に B<SIGSEGV> を受け取"
9305 "る可能性がある。 B<proc>(5)  にある I</proc/sys/vm/overcommit_memory> ファイ"
9306 "ルに関する議論も参照のこと。"
9307
9308 #. type: Plain text
9309 #: build/C/man2/shmget.2:146
9310 msgid ""
9311 "When a new shared memory segment is created, its contents are initialized to "
9312 "zero values, and its associated data structure, I<shmid_ds> (see B<shmctl>"
9313 "(2)), is initialized as follows:"
9314 msgstr ""
9315 "共有メモリ・セグメントが新たに作成される際、 共有メモリ・セグメントの内容は "
9316 "0 で初期化され、 関連情報を保持するデータ構造体 I<shmid_ds> は以下のように初"
9317 "期化される。"
9318
9319 #. type: Plain text
9320 #: build/C/man2/shmget.2:151
9321 msgid ""
9322 "I<shm_perm.cuid> and I<shm_perm.uid> are set to the effective user ID of the "
9323 "calling process."
9324 msgstr ""
9325 "I<shm_perm.cuid> と I<shm_perm.uid> に呼び出し元プロセスの実効 (effective) "
9326 "ユーザーID を設定する。"
9327
9328 #. type: Plain text
9329 #: build/C/man2/shmget.2:156
9330 msgid ""
9331 "I<shm_perm.cgid> and I<shm_perm.gid> are set to the effective group ID of "
9332 "the calling process."
9333 msgstr ""
9334 "I<shm_perm.cgid> と I<shm_perm.gid> に呼び出し元プロセスの実効グループID を設"
9335 "定する。"
9336
9337 #. type: Plain text
9338 #: build/C/man2/shmget.2:161
9339 msgid ""
9340 "The least significant 9 bits of I<shm_perm.mode> are set to the least "
9341 "significant 9 bit of I<shmflg>."
9342 msgstr ""
9343 "I<shm_perm.mode> の下位 9 ビットに I<shmflg> の下位 9 ビットを設定する。"
9344
9345 #. type: Plain text
9346 #: build/C/man2/shmget.2:165
9347 msgid "I<shm_segsz> is set to the value of I<size>."
9348 msgstr "I<shm_segsz> に I<size> の値を設定する。"
9349
9350 #. type: Plain text
9351 #: build/C/man2/shmget.2:172
9352 msgid "I<shm_lpid>, I<shm_nattch>, I<shm_atime> and I<shm_dtime> are set to 0."
9353 msgstr ""
9354 "I<shm_lpid>, I<shm_nattch>, I<shm_atime>, I<shm_dtime> に 0 を設定する。"
9355
9356 #. type: Plain text
9357 #: build/C/man2/shmget.2:175
9358 msgid "I<shm_ctime> is set to the current time."
9359 msgstr "I<shm_ctime> に現在の時刻を設定する。"
9360
9361 #. type: Plain text
9362 #: build/C/man2/shmget.2:178
9363 msgid ""
9364 "If the shared memory segment already exists, the permissions are verified, "
9365 "and a check is made to see if it is marked for destruction."
9366 msgstr ""
9367 "共有メモリ・セグメントが既に存在する場合、アクセス許可の検査と、 破壊 "
9368 "(destruction) マークがつけられていないかのチェックが行われる。"
9369
9370 #. type: Plain text
9371 #: build/C/man2/shmget.2:182
9372 msgid ""
9373 "A valid segment identifier, I<shmid>, is returned on success, -1 on error."
9374 msgstr ""
9375 "成功した場合、有効なセグメント識別子 I<shmid> が返される。エラーの場合、 -1 "
9376 "が返される。"
9377
9378 #. type: Plain text
9379 #: build/C/man2/shmget.2:186
9380 msgid "On failure, I<errno> is set to one of the following:"
9381 msgstr "失敗した場合は I<errno> が以下のどれかに設定される:"
9382
9383 #. type: Plain text
9384 #: build/C/man2/shmget.2:192
9385 msgid ""
9386 "The user does not have permission to access the shared memory segment, and "
9387 "does not have the B<CAP_IPC_OWNER> capability."
9388 msgstr ""
9389 "ユーザーはその共有メモリ・セグメントへのアクセス許可を持たず、 "
9390 "B<CAP_IPC_OWNER> ケーパビリティも持っていない。"
9391
9392 #. type: Plain text
9393 #: build/C/man2/shmget.2:196
9394 msgid "B<IPC_CREAT | IPC_EXCL> was specified and the segment exists."
9395 msgstr ""
9396 "B<IPC_CREAT | IPC_EXCL> が指定されていたが、そのセグメントが既に存在する。"
9397
9398 #. type: Plain text
9399 #: build/C/man2/shmget.2:202
9400 msgid ""
9401 "A new segment was to be created and I<size> E<lt> B<SHMMIN> or I<size> E<gt> "
9402 "B<SHMMAX>, or no new segment was to be created, a segment with given key "
9403 "existed, but I<size> is greater than the size of that segment."
9404 msgstr ""
9405 "新しいセグメントを作成しようとした際に I<size> E<lt> B<SHMMIN> または "
9406 "I<size> E<gt> B<SHMMAX> であった。 もしくは、指定されたキーに対応するセグメン"
9407 "トが既に存在して、新しい セグメントを作成しようとはしなかったが、I<size> が存"
9408 "在するセグメントの サイズよりも大きかった。"
9409
9410 #. type: Plain text
9411 #: build/C/man2/shmget.2:211
9412 msgid ""
9413 "No segment exists for the given I<key>, and B<IPC_CREAT> was not specified."
9414 msgstr ""
9415 "指定された I<key> に対応するセグメントが存在せず、 B<IPC_CREAT> も指定されて"
9416 "いなかった。"
9417
9418 #. type: Plain text
9419 #: build/C/man2/shmget.2:214
9420 msgid "No memory could be allocated for segment overhead."
9421 msgstr "セグメントの管理情報 (overhead) に割り当てるメモリがなかった。"
9422
9423 #. type: Plain text
9424 #: build/C/man2/shmget.2:222
9425 msgid ""
9426 "All possible shared memory IDs have been taken (B<SHMMNI>), or allocating a "
9427 "segment of the requested I<size> would cause the system to exceed the system-"
9428 "wide limit on shared memory (B<SHMALL>)."
9429 msgstr ""
9430 "システム全体の共有メモリ・セグメント数の制限 (B<SHMMNI>)  に達した、または要"
9431 "求された I<size> のセグメントの割り当てが システム全体の共有メモリサイズの制"
9432 "限 (B<SHMALL>)  を超過した。"
9433
9434 #. type: Plain text
9435 #: build/C/man2/shmget.2:229
9436 msgid ""
9437 "The B<SHM_HUGETLB> flag was specified, but the caller was not privileged "
9438 "(did not have the B<CAP_IPC_LOCK> capability)."
9439 msgstr ""
9440 "B<SHM_HUGETLB> フラグが指定されたが、呼び出し元には権限がなかった "
9441 "(B<CAP_IPC_LOCK> ケーパビリティを持っていなかった)。"
9442
9443 #. type: Plain text
9444 #: build/C/man2/shmget.2:235
9445 msgid "B<SHM_HUGETLB> is a nonportable Linux extension."
9446 msgstr "B<SHM_HUGETLB> は Linux での拡張であり、移植性はない。"
9447
9448 #. type: Plain text
9449 #: build/C/man2/shmget.2:245
9450 msgid ""
9451 "B<IPC_PRIVATE> isn't a flag field but a I<key_t> type.  If this special "
9452 "value is used for I<key>, the system call ignores everything but the least "
9453 "significant 9 bits of I<shmflg> and creates a new shared memory segment (on "
9454 "success)."
9455 msgstr ""
9456 "B<IPC_PRIVATE> はフラグではなく I<key_t> 型である。 この特別な値が I<key> に"
9457 "使用された場合は、 B<shmget>()  は I<shmflg> の下位 9 ビットを除いた全てを無"
9458 "視し、 (成功すれば) 新しい共有メモリ・セグメントを作成する。"
9459
9460 #. type: Plain text
9461 #: build/C/man2/shmget.2:249
9462 msgid ""
9463 "The following limits on shared memory segment resources affect the B<shmget>"
9464 "()  call:"
9465 msgstr ""
9466 "B<shmget>()  コールに影響する共有メモリ・セグメント資源の制限は以下の通りであ"
9467 "る:"
9468
9469 #. type: TP
9470 #: build/C/man2/shmget.2:249
9471 #, no-wrap
9472 msgid "B<SHMALL>"
9473 msgstr "B<SHMALL>"
9474
9475 #. type: Plain text
9476 #: build/C/man2/shmget.2:254
9477 msgid ""
9478 "System wide maximum of shared memory pages (on Linux, this limit can be read "
9479 "and modified via I</proc/sys/kernel/shmall>)."
9480 msgstr ""
9481 "システム全体の共有メモリ・ページの最大数 (Linux では、この上限値は I</proc/"
9482 "sys/kernel/shmall> 経由で参照したり、変更したりできる)。"
9483
9484 #. type: TP
9485 #: build/C/man2/shmget.2:254
9486 #, no-wrap
9487 msgid "B<SHMMAX>"
9488 msgstr "B<SHMMAX>"
9489
9490 #. type: Plain text
9491 #: build/C/man2/shmget.2:259
9492 msgid ""
9493 "Maximum size in bytes for a shared memory segment: policy dependent (on "
9494 "Linux, this limit can be read and modified via I</proc/sys/kernel/shmmax>)."
9495 msgstr ""
9496 "共有メモリ・セグメントのバイト単位の大きさの上限: 方針依存 (Linux では、この"
9497 "上限値は I</proc/sys/kernel/shmmax> 経由で参照したり、変更したりできる)。"
9498
9499 #. type: TP
9500 #: build/C/man2/shmget.2:259
9501 #, no-wrap
9502 msgid "B<SHMMIN>"
9503 msgstr "B<SHMMIN>"
9504
9505 #. type: Plain text
9506 #: build/C/man2/shmget.2:265
9507 msgid ""
9508 "Minimum size in bytes for a shared memory segment: implementation dependent "
9509 "(currently 1 byte, though B<PAGE_SIZE> is the effective minimum size)."
9510 msgstr ""
9511 "共有メモリ・セグメントのバイト単位の大きさの下限: 実装依存 (現在は 1 バイトだ"
9512 "が、実質的な最小サイズは B<PAGE_SIZE> である)。"
9513
9514 #. type: TP
9515 #: build/C/man2/shmget.2:265
9516 #, no-wrap
9517 msgid "B<SHMMNI>"
9518 msgstr "B<SHMMNI>"
9519
9520 #.  Kernels between 2.4.x and 2.6.8 had an off-by-one error that meant
9521 #.  that we could create one more segment than SHMMNI -- MTK
9522 #.  This /proc file is not available in Linux 2.2 and earlier -- MTK
9523 #. type: Plain text
9524 #: build/C/man2/shmget.2:274
9525 msgid ""
9526 "System wide maximum number of shared memory segments: implementation "
9527 "dependent (currently 4096, was 128 before Linux 2.3.99; on Linux, this limit "
9528 "can be read and modified via I</proc/sys/kernel/shmmni>)."
9529 msgstr ""
9530 "システム全体の共有メモリーの数の上限: 実装依存 (現在は 4096。Linux 2.3.99 よ"
9531 "り前では 128。 Linux では、この上限値は I</proc/sys/kernel/shmmni> 経由で参照"
9532 "したり、変更したりできる)。"
9533
9534 #. type: Plain text
9535 #: build/C/man2/shmget.2:278
9536 msgid ""
9537 "The implementation has no specific limits for the per-process maximum number "
9538 "of shared memory segments (B<SHMSEG>)."
9539 msgstr ""
9540 "プロセス当りの共有メモリ・セグメントの個数の最大値 (B<SHMSEG>)  に関する実装"
9541 "上の制限はない。"
9542
9543 #. type: Plain text
9544 #: build/C/man2/shmget.2:284
9545 msgid ""
9546 "Until version 2.3.30 Linux would return B<EIDRM> for a B<shmget>()  on a "
9547 "shared memory segment scheduled for deletion."
9548 msgstr ""
9549 "バージョン 2.3.30 までは、Linux は 削除が予定されている共有メモリ・セグメント"
9550 "に対して B<shmget>()  が行われると B<EIDRM> を返していた。"
9551
9552 #. type: Plain text
9553 #: build/C/man2/shmget.2:290
9554 msgid ""
9555 "The name choice B<IPC_PRIVATE> was perhaps unfortunate, B<IPC_NEW> would "
9556 "more clearly show its function."
9557 msgstr ""
9558 "B<IPC_PRIVATE> という名前を選んだのはおそらく失敗であろう。 B<IPC_NEW> の方が"
9559 "より明確にその機能を表しているだろう。"
9560
9561 #. type: Plain text
9562 #: build/C/man2/shmget.2:298
9563 msgid ""
9564 "B<shmat>(2), B<shmctl>(2), B<shmdt>(2), B<ftok>(3), B<capabilities>(7), "
9565 "B<shm_overview>(7), B<svipc>(7)"
9566 msgstr ""
9567 "B<shmat>(2), B<shmctl>(2), B<shmdt>(2), B<ftok>(3), B<capabilities>(7), "
9568 "B<shm_overview>(7), B<svipc>(7)"
9569
9570 #. type: TH
9571 #: build/C/man2/shmop.2:39
9572 #, no-wrap
9573 msgid "SHMOP"
9574 msgstr "SHMOP"
9575
9576 #. type: TH
9577 #: build/C/man2/shmop.2:39
9578 #, no-wrap
9579 msgid "2008-06-03"
9580 msgstr "2008-06-03"
9581
9582 #. type: Plain text
9583 #: build/C/man2/shmop.2:42
9584 msgid "shmat, shmdt - shared memory operations"
9585 msgstr "shmat, shmdt - 共有メモリ (shared memory) の操作"
9586
9587 #. type: Plain text
9588 #: build/C/man2/shmop.2:46
9589 #, no-wrap
9590 msgid ""
9591 "B<#include E<lt>sys/types.hE<gt>>\n"
9592 "B<#include E<lt>sys/shm.hE<gt>>\n"
9593 msgstr ""
9594 "B<#include E<lt>sys/types.hE<gt>>\n"
9595 "B<#include E<lt>sys/shm.hE<gt>>\n"
9596
9597 #. type: Plain text
9598 #: build/C/man2/shmop.2:48
9599 #, no-wrap
9600 msgid "B<void *shmat(int >I<shmid>B<, const void *>I<shmaddr>B<, int >I<shmflg>B<);>\n"
9601 msgstr "B<void *shmat(int >I<shmid>B<, const void *>I<shmaddr>B<, int >I<shmflg>B<);>\n"
9602
9603 #. type: Plain text
9604 #: build/C/man2/shmop.2:50
9605 #, no-wrap
9606 msgid "B<int shmdt(const void *>I<shmaddr>B<);>\n"
9607 msgstr "B<int shmdt(const void *>I<shmaddr>B<);>\n"
9608
9609 #. type: Plain text
9610 #: build/C/man2/shmop.2:59
9611 msgid ""
9612 "B<shmat>()  attaches the shared memory segment identified by I<shmid> to the "
9613 "address space of the calling process.  The attaching address is specified by "
9614 "I<shmaddr> with one of the following criteria:"
9615 msgstr ""
9616 "B<shmat>()  は I<shmid> で指定された共有メモリ・セグメント (shared memory "
9617 "segment) を コールしたプロセスのアドレス空間に付加 (attach) する。 付加するア"
9618 "ドレスは I<shmaddr> に以下のどれかの形式で指定する:"
9619
9620 #. type: Plain text
9621 #: build/C/man2/shmop.2:65
9622 msgid ""
9623 "If I<shmaddr> is NULL, the system chooses a suitable (unused) address at "
9624 "which to attach the segment."
9625 msgstr ""
9626 "I<shmaddr> が NULL ならば、システムはセグメントを付加するための 適切な (使用"
9627 "されていない) アドレスを選択する。"
9628
9629 #. type: Plain text
9630 #: build/C/man2/shmop.2:80
9631 msgid ""
9632 "If I<shmaddr> isn't NULL and B<SHM_RND> is specified in I<shmflg>, the "
9633 "attach occurs at the address equal to I<shmaddr> rounded down to the nearest "
9634 "multiple of B<SHMLBA>.  Otherwise I<shmaddr> must be a page-aligned address "
9635 "at which the attach occurs."
9636 msgstr ""
9637 "I<shmaddr> が NULL でなく B<SHM_RND> が I<shmflg> に指定されている場合は、 "
9638 "I<shmaddr> を B<SHMLBA> の倍数へと切り捨てた (rounding down) のと等しいアドレ"
9639 "スへ付加する。 その他の場合は I<shmaddr> は付加を行なうアドレスで、ページ境界"
9640 "を指している必要がある。"
9641
9642 #. type: Plain text
9643 #: build/C/man2/shmop.2:90
9644 msgid ""
9645 "If B<SHM_RDONLY> is specified in I<shmflg>, the segment is attached for "
9646 "reading and the process must have read permission for the segment.  "
9647 "Otherwise the segment is attached for read and write and the process must "
9648 "have read and write permission for the segment.  There is no notion of a "
9649 "write-only shared memory segment."
9650 msgstr ""
9651 "B<SHM_RDONLY> が I<shmflg> に指定されていた場合は、 セグメントは読み込み専用"
9652 "に付加され、プロセスはそのセグメントへの 読み込み許可を持たなければならな"
9653 "い。 そうでなければそのセグメントは読み込みと書き込みのために付加され、 プロ"
9654 "セスはそのセグメントに読み込みと書き込みの許可を持つ必要がある。 書き込み専用"
9655 "の共有メモリ・セグメントという概念は存在しない。"
9656
9657 #. type: Plain text
9658 #: build/C/man2/shmop.2:105
9659 msgid ""
9660 "The (Linux-specific)  B<SHM_REMAP> flag may be specified in I<shmflg> to "
9661 "indicate that the mapping of the segment should replace any existing mapping "
9662 "in the range starting at I<shmaddr> and continuing for the size of the "
9663 "segment.  (Normally an B<EINVAL> error would result if a mapping already "
9664 "exists in this address range.)  In this case, I<shmaddr> must not be NULL."
9665 msgstr ""
9666 "(Linux 特有の)  B<SHM_REMAP> フラグが I<shmflg> に指定された場合は、 セグメン"
9667 "トのマッピングを既存のマッピングに置き換える。 マッピングの範囲は、 "
9668 "I<shmaddr> から始まりセグメントのサイズ分だけある (通常 B<EINVAL> エラーは、"
9669 "このアドレス範囲にマッピングが既に存在するために起る)。 このフラグを指定する"
9670 "場合は、 I<shmaddr> が NULL であってはならない。"
9671
9672 #. type: Plain text
9673 #: build/C/man2/shmop.2:112
9674 msgid ""
9675 "The B<brk>(2)  value of the calling process is not altered by the attach.  "
9676 "The segment will automatically be detached at process exit.  The same "
9677 "segment may be attached as a read and as a read-write one, and more than "
9678 "once, in the process's address space."
9679 msgstr ""
9680 "呼び出したプロセスの B<brk>(2)  の値は付加によって変化しない。 そのセグメント"
9681 "はプロセスが終了 (exit) したら自動的に分離 (detach) される。 同じセグメントを"
9682 "プロセスのアドレス空間に、読み込み専用および読み書き両用 として付加でき、また"
9683 "複数回付加することもできる。"
9684
9685 #. type: Plain text
9686 #: build/C/man2/shmop.2:120
9687 msgid ""
9688 "A successful B<shmat>()  call updates the members of the I<shmid_ds> "
9689 "structure (see B<shmctl>(2))  associated with the shared memory segment as "
9690 "follows:"
9691 msgstr ""
9692 "成功した B<shmat>()  コールは共有メモリ・セグメントに関連する I<shmid_ds> 構"
9693 "造体 (B<shmctl>(2)  を参照) のメンバーを以下のように更新する:"
9694
9695 #. type: Plain text
9696 #: build/C/man2/shmop.2:123
9697 msgid "I<shm_atime> is set to the current time."
9698 msgstr "I<shm_atime> には現在の時刻を設定する。"
9699
9700 #. type: Plain text
9701 #: build/C/man2/shmop.2:126 build/C/man2/shmop.2:152
9702 msgid "I<shm_lpid> is set to the process-ID of the calling process."
9703 msgstr "I<shm_lpid> には呼び出したプロセスのプロセス ID が設定される。"
9704
9705 #. type: Plain text
9706 #: build/C/man2/shmop.2:129
9707 msgid "I<shm_nattch> is incremented by one."
9708 msgstr "I<shm_nattch> を 1 増加させる。"
9709
9710 #. type: Plain text
9711 #: build/C/man2/shmop.2:140
9712 msgid ""
9713 "B<shmdt>()  detaches the shared memory segment located at the address "
9714 "specified by I<shmaddr> from the address space of the calling process.  The "
9715 "to-be-detached segment must be currently attached with I<shmaddr> equal to "
9716 "the value returned by the attaching B<shmat>()  call."
9717 msgstr ""
9718 "B<shmdt>()  は呼び出したプロセスのアドレス空間から I<shmaddr> で指定されたア"
9719 "ドレスに配置された共有メモリ・セグメントを分離 (detach) する。 分離する共有メ"
9720 "モリ・セグメントは、現在 I<shmaddr> に付加されているものでなければならない。 "
9721 "I<shmaddr> は、それを付加した時に B<shmat>()  が返した値に等しくなければなら"
9722 "ない。"
9723
9724 #. type: Plain text
9725 #: build/C/man2/shmop.2:146
9726 msgid ""
9727 "On a successful B<shmdt>()  call the system updates the members of the "
9728 "I<shmid_ds> structure associated with the shared memory segment as follows:"
9729 msgstr ""
9730 "成功した B<shmdt>()  コールはその共有メモリ・セグメントに関連する "
9731 "I<shmid_ds> 構造体のメンバーを以下のように更新する:"
9732
9733 #. type: Plain text
9734 #: build/C/man2/shmop.2:149
9735 msgid "I<shm_dtime> is set to the current time."
9736 msgstr "I<shm_dtime> には現在の時刻が設定される。"
9737
9738 #. type: Plain text
9739 #: build/C/man2/shmop.2:157
9740 msgid ""
9741 "I<shm_nattch> is decremented by one.  If it becomes 0 and the segment is "
9742 "marked for deletion, the segment is deleted."
9743 msgstr ""
9744 "I<shm_nattch> を 1 減少させる。 もし 0 になり、削除マークがあった場合は その"
9745 "セグメントは削除される。"
9746
9747 #. type: Plain text
9748 #: build/C/man2/shmop.2:161
9749 msgid ""
9750 "After a B<fork>(2)  the child inherits the attached shared memory segments."
9751 msgstr ""
9752 "B<fork>(2)  した後、子プロセスは付加された共有メモリ・セグメントを継承する。"
9753
9754 #. type: Plain text
9755 #: build/C/man2/shmop.2:165
9756 msgid ""
9757 "After an B<execve>(2)  all attached shared memory segments are detached from "
9758 "the process."
9759 msgstr ""
9760 "B<exec>(2)  した後、全ての付加された共有メモリ・セグメントはプロセスから分離"
9761 "される。"
9762
9763 #. type: Plain text
9764 #: build/C/man2/shmop.2:169
9765 msgid ""
9766 "Upon B<_exit>(2)  all attached shared memory segments are detached from the "
9767 "process."
9768 msgstr ""
9769 "B<exit>(2)  において、全ての付加された共有メモリ・セグメントはプロセスから分"
9770 "離される。"
9771
9772 #. type: Plain text
9773 #: build/C/man2/shmop.2:177
9774 msgid ""
9775 "On success B<shmat>()  returns the address of the attached shared memory "
9776 "segment; on error I<(void\\ *)\\ -1> is returned, and I<errno> is set to "
9777 "indicate the cause of the error."
9778 msgstr ""
9779 "B<shmat>()  は、成功した場合、 付加された共有メモリ・セグメントのアドレスを返"
9780 "す。 エラーの場合、 I<(void\\ *)\\ -1> を返し、 I<errno> にエラーの原因を示す"
9781 "値を設定する。"
9782
9783 #. type: Plain text
9784 #: build/C/man2/shmop.2:183
9785 msgid ""
9786 "On success B<shmdt>()  returns 0; on error -1 is returned, and I<errno> is "
9787 "set to indicate the cause of the error."
9788 msgstr ""
9789 "B<shmdt>()  は、成功すると 0 を返す。 エラーの場合、-1 を返し、 I<errno> にエ"
9790 "ラーの原因を示す値を設定する。"
9791
9792 #. type: Plain text
9793 #: build/C/man2/shmop.2:189
9794 msgid "When B<shmat>()  fails, I<errno> is set to one of the following:"
9795 msgstr ""
9796 "B<shmat>()  が失敗した場合、 I<errno> に以下の値のどれかを設定して返す:"
9797
9798 #. type: Plain text
9799 #: build/C/man2/shmop.2:195
9800 msgid ""
9801 "The calling process does not have the required permissions for the requested "
9802 "attach type, and does not have the B<CAP_IPC_OWNER> capability."
9803 msgstr ""
9804 "呼び出したプロセスに要求された種類の付加に必要な許可がなく、 "
9805 "B<CAP_IPC_OWNER> ケーパビリティ (capability) がない。"
9806
9807 #. type: Plain text
9808 #: build/C/man2/shmop.2:209
9809 msgid ""
9810 "Invalid I<shmid> value, unaligned (i.e., not page-aligned and B<SHM_RND> was "
9811 "not specified) or invalid I<shmaddr> value, or can't attach segment at "
9812 "I<shmaddr>, or B<SHM_REMAP> was specified and I<shmaddr> was NULL."
9813 msgstr ""
9814 "I<shmid> の値が不正である。 I<shmaddr> の値が境界違反 (unaligned) (つまり、"
9815 "ページ境界に合っておらず、 B<SHM_RND> が指定されていない) または が不正であ"
9816 "る。 I<shmaddr> へのセグメントの付加に失敗した。 または B<SHM_REMAP> が指定さ"
9817 "れているが、 I<shmaddr> が NULL であった。"
9818
9819 #. type: Plain text
9820 #: build/C/man2/shmop.2:212
9821 msgid "Could not allocate memory for the descriptor or for the page tables."
9822 msgstr ""
9823 "ディスクリプター (descriptor) やページ・テーブルのためのメモリを 割り当てるこ"
9824 "とができない。"
9825
9826 #. type: Plain text
9827 #: build/C/man2/shmop.2:218
9828 msgid "When B<shmdt>()  fails, I<errno> is set as follows:"
9829 msgstr "B<shmdt>()  が失敗した場合、 B<EINVAL> は以下のようにセットされる:"
9830
9831 #.  The following since 2.6.17-rc1:
9832 #. type: Plain text
9833 #: build/C/man2/shmop.2:226
9834 msgid ""
9835 "There is no shared memory segment attached at I<shmaddr>; or, I<shmaddr> is "
9836 "not aligned on a page boundary."
9837 msgstr ""
9838 "I<shmaddr> に付加された共有メモリ・セグメントが存在しない。 もしくは、 "
9839 "I<shmaddr> がページ境界に合っていない。"
9840
9841 #. type: Plain text
9842 #: build/C/man2/shmop.2:245
9843 msgid ""
9844 "In SVID 3 (or perhaps earlier)  the type of the I<shmaddr> argument was "
9845 "changed from I<char *> into I<const void *>, and the returned type of "
9846 "B<shmat>()  from I<char *> into I<void *>.  (Linux libc4 and libc5 have the "
9847 "I<char *> prototypes; glibc2 has I<void *>.)"
9848 msgstr ""
9849 "SVID 3 で (たぶんそれより前だと思うが)  I<shmaddr> 引き数の型は I<char *> か"
9850 "ら I<const void *> に、I<shmat>() の返り値の型は I<char *> から I<void *> に"
9851 "変更された (Linux では libc4 と libc5 のプロトタイプは I<char *> であり、"
9852 "glibc2 のプロトタイプは I<void *> である)。"
9853
9854 #. type: Plain text
9855 #: build/C/man2/shmop.2:257
9856 msgid ""
9857 "Using B<shmat>()  with I<shmaddr> equal to NULL is the preferred, portable "
9858 "way of attaching a shared memory segment.  Be aware that the shared memory "
9859 "segment attached in this way may be attached at different addresses in "
9860 "different processes.  Therefore, any pointers maintained within the shared "
9861 "memory must be made relative (typically to the starting address of the "
9862 "segment), rather than absolute."
9863 msgstr ""
9864 "共有メモリセグメントを付加する場合の移植性の高い方法としては、 I<shmaddr> を "
9865 "NULL にして B<shmat>()  を使用するのがよい。 このような方法で付加される共有メ"
9866 "モリセグメントは、 プロセスが異なれば別のアドレスに付加される、という点に注意"
9867 "すること。 よって共有メモリ内で管理されるポインタは、 絶対アドレスではなく、 "
9868 "(一般的にはセグメントの開始アドレスからの)  相対アドレスで作成するべきであ"
9869 "る。"
9870
9871 #. type: Plain text
9872 #: build/C/man2/shmop.2:262
9873 msgid ""
9874 "On Linux, it is possible to attach a shared memory segment even if it is "
9875 "already marked to be deleted.  However, POSIX.1-2001 does not specify this "
9876 "behavior and many other implementations do not support it."
9877 msgstr ""
9878 "Linux では共有メモリセグメントに既に削除マークが付けられていても、 その共有メ"
9879 "モリセグメントを付加することができる。 しかし POSIX.1-2001 ではこのような動作"
9880 "を指定しておらず、 他の多くの実装もこれをサポートしていない。"
9881
9882 #. type: Plain text
9883 #: build/C/man2/shmop.2:265
9884 msgid "The following system parameter affects B<shmat>():"
9885 msgstr "以下のシステム・パラメーターは、 B<shmat>()  に影響する:"
9886
9887 #.  FIXME A good explanation of the rationale for the existence
9888 #.  of SHMLBA would be useful here
9889 #. type: TP
9890 #: build/C/man2/shmop.2:265
9891 #, no-wrap
9892 msgid "B<SHMLBA>"
9893 msgstr "B<SHMLBA>"
9894
9895 #.  FIXME That last sentence isn't true for all Linux
9896 #.  architectures (i.e., SHMLBA != PAGE_SIZE for some architectures)
9897 #.  -- MTK, Nov 04
9898 #. type: Plain text
9899 #: build/C/man2/shmop.2:278
9900 msgid ""
9901 "Segment low boundary address multiple.  Must be page aligned.  For the "
9902 "current implementation the B<SHMLBA> value is B<PAGE_SIZE>."
9903 msgstr ""
9904 "セグメントの境界アドレスの最小倍数。ページ境界に合ってなければならない。 現在"
9905 "の実装では B<SHMLBA> の値は B<PAGE_SIZE> である。"
9906
9907 #. type: Plain text
9908 #: build/C/man2/shmop.2:282
9909 msgid ""
9910 "The implementation places no intrinsic limit on the per-process maximum "
9911 "number of shared memory segments (B<SHMSEG>)."
9912 msgstr ""
9913 "現在の実装では、プロセスごとの 共有メモリ・セグメントの最大数 (B<SHMSEG>)  に"
9914 "関する実装依存の制限はない。"
9915
9916 #. type: Plain text
9917 #: build/C/man2/shmop.2:290
9918 msgid ""
9919 "B<brk>(2), B<mmap>(2), B<shmctl>(2), B<shmget>(2), B<capabilities>(7), "
9920 "B<shm_overview>(7), B<svipc>(7)"
9921 msgstr ""
9922 "B<brk>(2), B<mmap>(2), B<shmctl>(2), B<shmget>(2), B<capabilities>(7), "
9923 "B<shm_overview>(7), B<svipc>(7)"
9924
9925 #. type: TH
9926 #: build/C/man2/subpage_prot.2:28
9927 #, no-wrap
9928 msgid "SUBPAGE_PROT"
9929 msgstr "SUBPAGE_PROT"
9930
9931 #. type: TH
9932 #: build/C/man2/subpage_prot.2:28
9933 #, no-wrap
9934 msgid "2010-10-30"
9935 msgstr "2010-10-30"
9936
9937 #. type: Plain text
9938 #: build/C/man2/subpage_prot.2:31
9939 msgid "subpage_prot - define a subpage protection for an address range"
9940 msgstr ""
9941
9942 #. type: Plain text
9943 #: build/C/man2/subpage_prot.2:35
9944 #, no-wrap
9945 msgid ""
9946 "B<long subpage_prot(unsigned long >I<addr>B<, unsigned long >I<len>B<,>\n"
9947 "B<                  uint32_t *>I<map>B<);>\n"
9948 msgstr ""
9949 "B<long subpage_prot(unsigned long >I<addr>B<, unsigned long >I<len>B<,>\n"
9950 "B<                  uint32_t *>I<map>B<);>\n"
9951
9952 #. type: Plain text
9953 #: build/C/man2/subpage_prot.2:42
9954 msgid ""
9955 "The PowerPC-specific B<subpage_prot>()  system call provides the facility to "
9956 "control the access permissions on individual 4kB subpages on systems "
9957 "configured with a page size of 64kB."
9958 msgstr ""
9959
9960 #. type: Plain text
9961 #: build/C/man2/subpage_prot.2:49
9962 msgid ""
9963 "The protection map is applied to the memory pages in the region starting at "
9964 "I<addr> and continuing for I<len> bytes.  Both of these arguments must be "
9965 "aligned to a 64-kB boundary."
9966 msgstr ""
9967
9968 #. type: Plain text
9969 #: build/C/man2/subpage_prot.2:61
9970 msgid ""
9971 "The protection map is specified in the buffer pointed to by I<map>.  The map "
9972 "has 2 bits per 4kB subpage; thus each 32-bit word specifies the protections "
9973 "of 16 4kB subpages inside a 64kB page (so, the number of 32-bit words "
9974 "pointed to by I<map> should equate to the number of 64-kB pages specified by "
9975 "I<len>).  Each 2-bit field in the protection map is either 0 to allow any "
9976 "access, 1 to prevent writes, or 2 or 3 to prevent all accesses."
9977 msgstr ""
9978
9979 #. type: Plain text
9980 #: build/C/man2/subpage_prot.2:66
9981 msgid ""
9982 "On success, B<subpage_prot>()  returns 0.  Otherwise, one of the error codes "
9983 "specified below is returned."
9984 msgstr ""
9985
9986 #. type: Plain text
9987 #: build/C/man2/subpage_prot.2:72
9988 msgid "The buffer referred to by I<map> is not accessible."
9989 msgstr ""
9990
9991 #. type: Plain text
9992 #: build/C/man2/subpage_prot.2:82
9993 msgid ""
9994 "The I<addr> or I<len> arguments are incorrect.  Both of these arguments must "
9995 "be aligned to a multiple of the system page size, and they must not refer to "
9996 "a region outside of the address space of the process or to a region that "
9997 "consists of huge pages."
9998 msgstr ""
9999
10000 #. type: Plain text
10001 #: build/C/man2/subpage_prot.2:85 build/C/man2/sync_file_range.2:166
10002 msgid "Out of memory."
10003 msgstr "メモリ不足である。"
10004
10005 #. type: Plain text
10006 #: build/C/man2/subpage_prot.2:91
10007 msgid ""
10008 "This system call is provided on the PowerPC architecture since Linux "
10009 "2.6.25.  The system call is provided only if the kernel is configured with "
10010 "B<CONFIG_PPC_64K_PAGES>.  No library support is provided."
10011 msgstr ""
10012
10013 #. type: Plain text
10014 #: build/C/man2/subpage_prot.2:98
10015 msgid ""
10016 "Normal page protections (at the 64-kB page level) also apply; the subpage "
10017 "protection mechanism is an additional constraint, so putting 0 in a 2-bit "
10018 "field won't allow writes to a page that is otherwise write-protected."
10019 msgstr ""
10020
10021 #. type: SS
10022 #: build/C/man2/subpage_prot.2:98
10023 #, no-wrap
10024 msgid "Rationale"
10025 msgstr ""
10026
10027 #.  In the initial implementation, it was the case that:
10028 #.      In fact the whole process is switched to use 4k hardware pages when the
10029 #.      subpage_prot system call is used, but this could be improved in future
10030 #.      to switch only the affected segments.
10031 #.  But Paul Mackerass says (Oct 2010): I'm pretty sure we now only switch
10032 #.  the affected segment, not the whole process.
10033 #. type: Plain text
10034 #: build/C/man2/subpage_prot.2:120
10035 msgid ""
10036 "This system call is provided to assist writing emulators that operate using "
10037 "64-kB pages on PowerPC systems.  When emulating systems such as x86, which "
10038 "uses a smaller page size, the emulator can no longer use the memory-"
10039 "management unit (MMU)  and normal system calls for controlling page "
10040 "protections.  (The emulator could emulate the MMU by checking and possibly "
10041 "remapping the address for each memory access in software, but that is "
10042 "slow.)  The idea is that the emulator supplies an array of protection masks "
10043 "to apply to a specified range of virtual addresses.  These masks are applied "
10044 "at the level where hardware page-table entries (PTEs)  are inserted into the "
10045 "hardware page table based on the Linux PTEs, so the Linux PTEs are not "
10046 "affected.  Implicit in this is that the regions of the address space that "
10047 "are protected are switched to use 4-kB hardware pages rather than 64-kB "
10048 "hardware pages (on machines with hardware 64-kB page support)."
10049 msgstr ""
10050
10051 #. type: Plain text
10052 #: build/C/man2/subpage_prot.2:123
10053 msgid "B<mprotect>(2), B<syscall>(2);"
10054 msgstr "B<mprotect>(2), B<syscall>(2);"
10055
10056 #. type: Plain text
10057 #: build/C/man2/subpage_prot.2:126
10058 msgid "the kernel source file I<Documentation/vm/hugetlbpage.txt>."
10059 msgstr "カーネルソースファイルの I<Documentation/vm/hugetlbpage.txt>"
10060
10061 #. type: TH
10062 #: build/C/man2/sync_file_range.2:30
10063 #, no-wrap
10064 msgid "SYNC_FILE_RANGE"
10065 msgstr "SYNC_FILE_RANGE"
10066
10067 #. type: Plain text
10068 #: build/C/man2/sync_file_range.2:33
10069 msgid "sync_file_range - sync a file segment with disk"
10070 msgstr "sync_file_range - ファイルセグメントをディスクと同期する"
10071
10072 #. type: Plain text
10073 #: build/C/man2/sync_file_range.2:37
10074 #, no-wrap
10075 msgid ""
10076 "B<#define _GNU_SOURCE>         /* See feature_test_macros(7) */\n"
10077 "B<#include E<lt>fcntl.hE<gt>>\n"
10078 msgstr ""
10079 "B<#define _GNU_SOURCE>         /* feature_test_macros(7) 参照 */\n"
10080 "B<#include E<lt>fcntl.hE<gt>>\n"
10081
10082 #. type: Plain text
10083 #: build/C/man2/sync_file_range.2:40
10084 #, no-wrap
10085 msgid ""
10086 "B<int sync_file_range(int >I<fd>B<, off64_t >I<offset>B<, off64_t >I<nbytes>B<,>\n"
10087 "B<                    unsigned int >I<flags>B<);>\n"
10088 msgstr ""
10089 "B<int sync_file_range(int >I<fd>B<, off64_t >I<offset>B<, off64_t >I<nbytes>B<,>\n"
10090 "B<                    unsigned int >I<flags>B<);>\n"
10091
10092 #. type: Plain text
10093 #: build/C/man2/sync_file_range.2:47
10094 msgid ""
10095 "B<sync_file_range>()  permits fine control when synchronizing the open file "
10096 "referred to by the file descriptor I<fd> with disk."
10097 msgstr ""
10098 "B<sync_file_range>()  を使うと、ファイルディスクリプタ I<fd> で参照されるオー"
10099 "プンされたファイルのディスクとの同期に関して、 きめ細かな制御が可能となる。"
10100
10101 #. type: Plain text
10102 #: build/C/man2/sync_file_range.2:61
10103 msgid ""
10104 "I<offset> is the starting byte of the file range to be synchronized.  "
10105 "I<nbytes> specifies the length of the range to be synchronized, in bytes; if "
10106 "I<nbytes> is zero, then all bytes from I<offset> through to the end of file "
10107 "are synchronized.  Synchronization is in units of the system page size: "
10108 "I<offset> is rounded down to a page boundary; I<(offset+nbytes-1)> is "
10109 "rounded up to a page boundary."
10110 msgstr ""
10111 "I<offset> は、同期を行うファイルの領域の開始バイトである。 I<nbytes> には同期"
10112 "を行う領域の長さをバイト単位で指定する。 I<nbytes> が 0 の場合は、 I<offset> "
10113 "からファイル末尾までの全バイトを同期する。 同期はシステムのページサイズの単位"
10114 "で行われる。 I<offset> はページ境界にあわせて切り下げられ、 I<(offset"
10115 "+nbytes-1)> はページ境界にあわせて切り上げられる。"
10116
10117 #. type: Plain text
10118 #: build/C/man2/sync_file_range.2:65
10119 msgid "The I<flags> bit-mask argument can include any of the following values:"
10120 msgstr "ビットマスク引き数 I<flags> には以下の値を指定することができる:"
10121
10122 #. type: TP
10123 #: build/C/man2/sync_file_range.2:65
10124 #, no-wrap
10125 msgid "B<SYNC_FILE_RANGE_WAIT_BEFORE>"
10126 msgstr "B<SYNC_FILE_RANGE_WAIT_BEFORE>"
10127
10128 #. type: Plain text
10129 #: build/C/man2/sync_file_range.2:70
10130 msgid ""
10131 "Wait upon write-out of all pages in the specified range that have already "
10132 "been submitted to the device driver for write-out before performing any "
10133 "write."
10134 msgstr ""
10135 "何らかの書き込みを行う前に、指定された領域のページで 書き出しを行うようにデバ"
10136 "イスドライバにすでに要求が発行されている ページの書き出しが全て完了するのを待"
10137 "つ。"
10138
10139 #. type: TP
10140 #: build/C/man2/sync_file_range.2:70 build/C/man2/sync_file_range.2:120
10141 #, no-wrap
10142 msgid "B<SYNC_FILE_RANGE_WRITE>"
10143 msgstr "B<SYNC_FILE_RANGE_WRITE>"
10144
10145 #. type: Plain text
10146 #: build/C/man2/sync_file_range.2:76
10147 msgid ""
10148 "Initiate write-out of all dirty pages in the specified range which are not "
10149 "presently submitted write-out.  Note that even this may block if you attempt "
10150 "to write more than request queue size."
10151 msgstr ""
10152 "指定された領域のページで、書き出し要求が発行されていない 全ての dirty (キャッ"
10153 "シュだけが変更されている) ページの 書き出しを開始する。 リクエストキューの大"
10154 "きさより多く書き込もうとした場合には、 この処理は停止 (block) する可能性があ"
10155 "る点に注意すること。"
10156
10157 #. type: TP
10158 #: build/C/man2/sync_file_range.2:76
10159 #, no-wrap
10160 msgid "B<SYNC_FILE_RANGE_WAIT_AFTER>"
10161 msgstr "B<SYNC_FILE_RANGE_WAIT_AFTER>"
10162
10163 #. type: Plain text
10164 #: build/C/man2/sync_file_range.2:80
10165 msgid ""
10166 "Wait upon write-out of all pages in the range after performing any write."
10167 msgstr ""
10168 "何らかの書き込み後に、指定された領域の全てのページの 書き出しが行われるのを待"
10169 "つ。"
10170
10171 #. type: Plain text
10172 #: build/C/man2/sync_file_range.2:84
10173 msgid "Specifying I<flags> as 0 is permitted, as a no-op."
10174 msgstr "I<flags> に 0 を指定した場合、何もしないことを表す。"
10175
10176 #. type: SS
10177 #: build/C/man2/sync_file_range.2:84
10178 #, no-wrap
10179 msgid "Warning"
10180 msgstr "警告"
10181
10182 #. type: Plain text
10183 #: build/C/man2/sync_file_range.2:100
10184 msgid ""
10185 "This system call is extremely dangerous and should not be used in portable "
10186 "programs.  None of these operations writes out the file's metadata.  "
10187 "Therefore, unless the application is strictly performing overwrites of "
10188 "already-instantiated disk blocks, there are no guarantees that the data will "
10189 "be available after a crash.  There is no user interface to know if a write "
10190 "is purely an overwrite.  On file systems using copy-on-write semantics (e."
10191 "g., I<btrfs>)  an overwrite of existing allocated blocks is impossible.  "
10192 "When writing into preallocated space, many file systems also require calls "
10193 "into the block allocator, which this system call does not sync out to disk.  "
10194 "This system call does not flush disk write caches and thus does not provide "
10195 "any data integrity on systems with volatile disk write caches."
10196 msgstr ""
10197 "このシステムコールは非常に危険であり、 移植性が必要なプログラムで使用すべきで"
10198 "はない。 これらの操作ではどれもファイルのメタデータの書き出しを行わない。 し"
10199 "たがって、アプリケーションにより作成済みのディスクブロックの 上書きの実行が確"
10200 "実に行われない限り、クラッシュの後でもデータが 利用できる保証はない。 書き込"
10201 "みが上書きだけであるかを知るためのユーザインタフェースは存在しない。 "
10202 "(I<btrfs> などの) copy-on-write 動作を使ったファイルシステムでは、 既存の割り"
10203 "当て済みのブロックに対する上書き自体ができない。 前もって割り当てられた領域に"
10204 "書き込みを行う場合、 多くのファイルシステムでは block allocator への書き込み"
10205 "も必要となるが、 このシステムコールは block allocator のディスクへの同期を行"
10206 "わない。 このシステムコールはディスク書き込みキャッシュのフラッシュを 行わな"
10207 "いので、揮発性のディスク書き込みキャッシュを使ったシステムでは このシステム"
10208 "コールではデータの一貫性を確保できないことになる。"
10209
10210 #. type: SS
10211 #: build/C/man2/sync_file_range.2:100
10212 #, no-wrap
10213 msgid "Some details"
10214 msgstr "詳細"
10215
10216 #. type: Plain text
10217 #: build/C/man2/sync_file_range.2:108
10218 msgid ""
10219 "B<SYNC_FILE_RANGE_WAIT_BEFORE> and B<SYNC_FILE_RANGE_WAIT_AFTER> will detect "
10220 "any I/O errors or B<ENOSPC> conditions and will return these to the caller."
10221 msgstr ""
10222 "B<SYNC_FILE_RANGE_WAIT_BEFORE> と B<SYNC_FILE_RANGE_WAIT_AFTER> は I/O エラー"
10223 "や B<ENOSPC> 状態を検出し、呼び出し元にこれらの情報を返す。"
10224
10225 #. type: Plain text
10226 #: build/C/man2/sync_file_range.2:112
10227 msgid "Useful combinations of the I<flags> bits are:"
10228 msgstr "I<flags> の役に立つビットの組み合わせを以下に示す:"
10229
10230 #. type: TP
10231 #: build/C/man2/sync_file_range.2:112
10232 #, no-wrap
10233 msgid "B<SYNC_FILE_RANGE_WAIT_BEFORE | SYNC_FILE_RANGE_WRITE>"
10234 msgstr "B<SYNC_FILE_RANGE_WAIT_BEFORE | SYNC_FILE_RANGE_WRITE>"
10235
10236 #. type: Plain text
10237 #: build/C/man2/sync_file_range.2:120
10238 msgid ""
10239 "Ensures that all pages in the specified range which were dirty when "
10240 "B<sync_file_range>()  was called are placed under write-out.  This is a "
10241 "start-write-for-data-integrity operation."
10242 msgstr ""
10243 "指定された範囲内のページで、 B<sync_file_range>()  が呼び出された際に dirty "
10244 "であった全てのページが、 確実に書き出し対象となるようにする。 これは、start-"
10245 "write-for-data-integrity 操作 (データ完全性確保のための書き込み開始の操作) で"
10246 "ある。"
10247
10248 #. type: Plain text
10249 #: build/C/man2/sync_file_range.2:127
10250 msgid ""
10251 "Start write-out of all dirty pages in the specified range which are not "
10252 "presently under write-out.  This is an asynchronous flush-to-disk "
10253 "operation.  This is not suitable for data integrity operations."
10254 msgstr ""
10255 "指定された範囲内のページで、現在書き出し中でない全ての dirty ページの 書き出"
10256 "しを開始する。これは非同期のディスクへのフラッシュ (flush-to-disk)  操作であ"
10257 "る。データ完全性確保が必要な操作としては適切ではない。"
10258
10259 #. type: TP
10260 #: build/C/man2/sync_file_range.2:127
10261 #, no-wrap
10262 msgid "B<SYNC_FILE_RANGE_WAIT_BEFORE> (or B<SYNC_FILE_RANGE_WAIT_AFTER>)"
10263 msgstr "B<SYNC_FILE_RANGE_WAIT_BEFORE> (or B<SYNC_FILE_RANGE_WAIT_AFTER>)"
10264
10265 #. type: Plain text
10266 #: build/C/man2/sync_file_range.2:134
10267 msgid ""
10268 "Wait for completion of write-out of all pages in the specified range.  This "
10269 "can be used after an earlier B<SYNC_FILE_RANGE_WAIT_BEFORE | "
10270 "SYNC_FILE_RANGE_WRITE> operation to wait for completion of that operation, "
10271 "and obtain its result."
10272 msgstr ""
10273 "指定された範囲内の全てのページの書き出しの完了を待つ。 このフラグは、前に行わ"
10274 "れた操作 B<SYNC_FILE_RANGE_WAIT_BEFORE | SYNC_FILE_RANGE_WRITE> の後に使用で"
10275 "き、この操作の完了を待ち、結果を取得することができる。"
10276
10277 #. type: TP
10278 #: build/C/man2/sync_file_range.2:134
10279 #, no-wrap
10280 msgid "B<SYNC_FILE_RANGE_WAIT_BEFORE | SYNC_FILE_RANGE_WRITE | SYNC_FILE_RANGE_WAIT_AFTER>"
10281 msgstr "B<SYNC_FILE_RANGE_WAIT_BEFORE | SYNC_FILE_RANGE_WRITE | SYNC_FILE_RANGE_WAIT_AFTER>"
10282
10283 #. type: Plain text
10284 #: build/C/man2/sync_file_range.2:141
10285 msgid ""
10286 "This is a write-for-data-integrity operation that will ensure that all pages "
10287 "in the specified range which were dirty when B<sync_file_range>()  was "
10288 "called are committed to disk."
10289 msgstr ""
10290 "これは write-for-data-integrity 操作 (データ完全性確保のための書き込み) であ"
10291 "り、指定された範囲内の、 B<sync_file_range>()  が呼ばれた時点で dirty な全て"
10292 "のページが ディスクに格納されることが保証される。"
10293
10294 #. type: Plain text
10295 #: build/C/man2/sync_file_range.2:147
10296 msgid ""
10297 "On success, B<sync_file_range>()  returns 0; on failure -1 is returned and "
10298 "I<errno> is set to indicate the error."
10299 msgstr ""
10300 "成功の場合、 B<sync_file_range>()  は 0 を返す。失敗の場合、-1 を返し、 "
10301 "I<error> にエラーを示す値を設定する。"
10302
10303 #. type: Plain text
10304 #: build/C/man2/sync_file_range.2:152
10305 msgid "I<fd> is not a valid file descriptor."
10306 msgstr "I<fd> が有効なファイルディスクリプタではない。"
10307
10308 #. type: Plain text
10309 #: build/C/man2/sync_file_range.2:160
10310 msgid ""
10311 "I<flags> specifies an invalid bit; or I<offset> or I<nbytes> is invalid."
10312 msgstr ""
10313 "I<flags> に不正なビットが指定されている。または I<offset> か I<nbytes> が不正"
10314 "である。"
10315
10316 #. type: Plain text
10317 #: build/C/man2/sync_file_range.2:163
10318 msgid "I/O error."
10319 msgstr "I/O エラー。"
10320
10321 #. type: Plain text
10322 #: build/C/man2/sync_file_range.2:169
10323 msgid "Out of disk space."
10324 msgstr "ディスク領域不足である。"
10325
10326 #.  FIXME . (bug?) Actually, how can 'fd' refer to a symbolic link (S_ISLNK)?
10327 #.  (In userspace at least) it isn't possible to obtain a file descriptor
10328 #.  for a symbolic link.
10329 #. type: Plain text
10330 #: build/C/man2/sync_file_range.2:177
10331 msgid ""
10332 "I<fd> refers to something other than a regular file, a block device, a "
10333 "directory, or a symbolic link."
10334 msgstr ""
10335 "I<fd> が、通常のファイル、ブロックデバイス、ディレクトリ、シンボリックリンク "
10336 "以外のものを指している。"
10337
10338 #. type: Plain text
10339 #: build/C/man2/sync_file_range.2:180
10340 msgid "B<sync_file_range>()  appeared on Linux in kernel 2.6.17."
10341 msgstr "B<sync_file_range>()  はカーネル 2.6.17 で Linux に登場した。"
10342
10343 #. type: Plain text
10344 #: build/C/man2/sync_file_range.2:183
10345 msgid ""
10346 "This system call is Linux-specific, and should be avoided in portable "
10347 "programs."
10348 msgstr ""
10349 "このシステムコールは Linux 独自であり、 移植性が必要なプログラムでは使用を避"
10350 "けるべきである。"
10351
10352 #.  See kernel commit edd5cd4a9424f22b0fa08bef5e299d41befd5622
10353 #. type: Plain text
10354 #: build/C/man2/sync_file_range.2:196
10355 msgid ""
10356 "Some architectures (e.g., PowerPC, ARM)  need 64-bit arguments to be aligned "
10357 "in a suitable pair of registers.  On such architectures, the call signature "
10358 "of B<sync_file_range>()  is flawed, since it forces a register to be wasted "
10359 "as padding between the I<fd> and I<offset> arguments.  Therefore, these "
10360 "architectures define a different system call that orders the arguments "
10361 "suitably:"
10362 msgstr ""
10363 "いくつかのアーキテクチャ (例えば、 PowerPC や ARM) では、 64 ビットの\n"
10364 "引き数は適切なレジスタの組に割り当てる必要がある。このようなアーキテク\n"
10365 "チャでは、 B<sync_file_range>() の呼び出し方には欠陥があり、それはこの\n"
10366 "システムコールでは引き数 I<fd> と I<offset> の間のパディング (詰めもの)\n"
10367 "でレジスタが一つ消費されてしまうというものである。そのため、これらの\n"
10368 "アーキテクチャでは引き数が適切な順序になった別のシステムコールが定義\n"
10369 "されている。"
10370
10371 #. type: Plain text
10372 #: build/C/man2/sync_file_range.2:201
10373 #, no-wrap
10374 msgid ""
10375 "B<int sync_file_range2(int >I<fd>B<, unsigned int >I<flags>B<,>\n"
10376 "B<                     off64_t >I<offset>B<, off64_t >I<nbytes>B<);>\n"
10377 msgstr ""
10378 "B<int sync_file_range2(int >I<fd>B<, unsigned int >I<flags>B<,>\n"
10379 "B<                     off64_t >I<offset>B<, off64_t >I<nbytes>B<);>\n"
10380
10381 #. type: Plain text
10382 #: build/C/man2/sync_file_range.2:206
10383 msgid ""
10384 "The behavior of this system call is otherwise exactly the same as "
10385 "B<sync_file_range>()."
10386 msgstr ""
10387 "上記の点以外は、このシステムコールの動作は B<sync_file_range>() と\n"
10388 "全く同じである。このシステムコールに対するライブラリによるサポートは\n"
10389 "glibc では提供されていない。"
10390
10391 #. type: Plain text
10392 #: build/C/man2/sync_file_range.2:217
10393 msgid ""
10394 "A system call with this signature first appeared on the ARM architecture in "
10395 "Linux 2.6.20, with the name B<arm_sync_file_range>().  It was renamed in "
10396 "Linux 2.6.22, when the analogous system call was added for PowerPC.  On "
10397 "architectures where glibc support is provided, glibc transparently wraps "
10398 "B<sync_file_range2>()  under the name B<sync_file_range>()."
10399 msgstr ""
10400 "このバージョンのシステムコールは、Linux 2.6.20 で ARM アーキテクチャで\n"
10401 "初めて登場し、 B<arm_sync_file_range>() という名前であった。\n"
10402 "Linux 2.6.22 で、同様のシステムコールが PowerPC 用に追加された際に、\n"
10403 "システムコールの名前が変更された。\n"
10404 "glibc によるサポートが提供されているアーキテクチャでは、\n"
10405 "glibc のラッパー関数は B<sync_file_range>() という名前で\n"
10406 "B<sync_file_range2>() を適切に使用するようになっている。"
10407
10408 #. type: Plain text
10409 #: build/C/man2/sync_file_range.2:222
10410 msgid "B<fdatasync>(2), B<fsync>(2), B<msync>(2), B<sync>(2)"
10411 msgstr "B<fdatasync>(2), B<fsync>(2), B<msync>(2), B<sync>(2)"
10412
10413 #~ msgid ""
10414 #~ "The I<mode> is not supported by the file system containing the file "
10415 #~ "referred to by I<fd>."
10416 #~ msgstr ""
10417 #~ "I<fd> が参照するファイルを含むファイルシステムが I<mode> をサポートしてい"
10418 #~ "ない。"
10419
10420 #~ msgid ""
10421 #~ "The function B<mtrace>()  installs handlers for B<malloc>(3), B<realloc>"
10422 #~ "(3)  and B<free>(3).  The function B<muntrace>()  disables these handlers."
10423 #~ msgstr ""
10424 #~ "関数 B<mtrace>()  は、 B<malloc>(3), B<realloc>(3), B<free>(3)  のハンドラ"
10425 #~ "を組み込む。 関数 B<muntrace>()  はこれらのハンドラを解除する。"
10426
10427 #~ msgid ""
10428 #~ "The environment variable B<MALLOC_TRACE> defines a file where B<mtrace>"
10429 #~ "()  writes its output.  This file must be writable to the user or "
10430 #~ "B<mtrace>()  will do nothing.  If the file is not empty it will be "
10431 #~ "truncated."
10432 #~ msgstr ""
10433 #~ "環境変数 B<MALLOC_TRACE> は B<mtrace>()  が出力を書き出すファイルを指定す"
10434 #~ "る。 ユーザが書き込み権限を持つファイルを指定しなければならない。 書き込み"
10435 #~ "権限がない場合、 B<mtrace>()  は何もしない。 ファイルが空でない場合、ファ"
10436 #~ "イルの元の内容を上書きする。"
10437
10438 #~ msgid "These are GNU extensions."
10439 #~ msgstr "この関数は GNU 拡張である。"
10440
10441 #~ msgid ""
10442 #~ "The output of B<mtrace>()  will be ASCII but not in a friendly format.  "
10443 #~ "So glibc comes with a perl-script called mtrace to make sense of it."
10444 #~ msgstr ""
10445 #~ "B<mtrace>()  の出力は ASCII 形式だが、人が読みやすいフォーマットではな"
10446 #~ "い。 そこで、glibc には mtrace 出力を分かりやすい形式に変換する perl スク"
10447 #~ "リプトが付属している。"
10448
10449 #~ msgid ""
10450 #~ "This flag allocates and initializes to zero the disk space within the "
10451 #~ "range specified by I<offset> and I<len>.  After a successful call, "
10452 #~ "subsequent writes into this range are guaranteed not to fail because of "
10453 #~ "lack of disk space.  Preallocating zeroed blocks beyond the end of the "
10454 #~ "file is useful for optimizing append workloads.  Preallocating blocks "
10455 #~ "does not change the file size (as reported by B<stat>(2))  even if it is "
10456 #~ "less than I<offset>+I<len>."
10457 #~ msgstr ""
10458 #~ "このフラグは、 I<offset> と I<len> で指定された領域のディスク空間を割り当"
10459 #~ "て、その空間を 0 で初期化する。 呼び出しが成功すると、それに続いてこの領域"
10460 #~ "への書き込みが行われるが、 ディスク空間の不足による書き込み失敗が発生しな"
10461 #~ "いことが保証される。 ファイル末尾より後ろの領域について 0 で埋めたブロック"
10462 #~ "を前もって 割り当てておくことは、追記 (append) の作業負荷を最適化するのに "
10463 #~ "有用である。 ファイルサイズが I<offset>+I<len> よりも小さい場合であって"
10464 #~ "も、ブロックの前もっての割り当てにより (B<stat>(2)  が返す) ファイルサイズ"
10465 #~ "は変更されることはない。"
10466
10467 #~ msgid ""
10468 #~ "(Linux 2.6.9 and later) the caller was not privileged (B<CAP_IPC_LOCK>)  "
10469 #~ "and its B<RLIMIT_MEMLOCK> soft resource limit was 0."
10470 #~ msgstr ""
10471 #~ "(Linux 2.6.9 以降) 呼び出し元は特権 (B<CAP_IPC_LOCK>)  を持たず、ソフト資"
10472 #~ "源制限 B<RLIMIT_MEMLOCK> が 0 である。"
10473
10474 #~ msgid ""
10475 #~ "(Linux 2.6.8 and earlier)  The calling process has insufficient privilege "
10476 #~ "to call B<munlockall>().  Under Linux the B<CAP_IPC_LOCK> capability is "
10477 #~ "required."
10478 #~ msgstr ""
10479 #~ "(Linux 2.6.8 以前)  呼び出し元プロセスが B<munlockall>()  を呼び出すのに必"
10480 #~ "要な特権を所有していなかった。 Linux では、 B<CAP_IPC_LOCK> ケーパビリティ"
10481 #~ "が必要である。"
10482
10483 #~ msgid ""
10484 #~ "B<posix_fadvise>()  appeared in kernel 2.5.60.  Glibc support has been "
10485 #~ "provided since version 2.2."
10486 #~ msgstr ""
10487 #~ "B<posix_fadvise>()  はカーネル 2.5.60 で登場した。 glibc でのサポートは "
10488 #~ "glibc バージョン 2.2 以降で行われている。"