OSDN Git Service

(split) LDP: Snapshotis of ja.po for v3.41.
[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-28 12:46+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 ""
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 ""
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
1709 #. type: Plain text
1710 #: build/C/man3/mallinfo.3:54
1711 #, no-wrap
1712 msgid ""
1713 "struct mallinfo {\n"
1714 "    int arena;     /* Non-mmapped space allocated (bytes) */\n"
1715 "    int ordblks;   /* Number of free chunks */\n"
1716 "    int smblks;    /* Number of free fastbin blocks */\n"
1717 "    int hblks;     /* Number of mmapped regions */\n"
1718 "    int hblkhd;    /* Space allocated in mmapped regions (bytes) */\n"
1719 "    int usmblks;   /* Maximum total allocated space (bytes) */\n"
1720 "    int fsmblks;   /* Space in freed fastbin blocks (bytes) */\n"
1721 "    int uordblks;  /* Total allocated space (bytes) */\n"
1722 "    int fordblks;  /* Total free space (bytes) */\n"
1723 "    int keepcost;  /* Top-most, releasable space (bytes) */\n"
1724 "};\n"
1725 msgstr ""
1726
1727 #. type: Plain text
1728 #: build/C/man3/mallinfo.3:60
1729 msgid ""
1730 "The fields of the I<mallinfo> structure contain the following information:"
1731 msgstr ""
1732
1733 #. type: TP
1734 #: build/C/man3/mallinfo.3:61
1735 #, no-wrap
1736 msgid "I<arena>"
1737 msgstr ""
1738
1739 #. type: Plain text
1740 #: build/C/man3/mallinfo.3:67
1741 msgid ""
1742 "The total amount of memory allocated by means other than B<mmap>(2)  (i.e., "
1743 "memory allocated on the heap).  This figure includes both in-use blocks and "
1744 "blocks on the free list."
1745 msgstr ""
1746
1747 #. type: TP
1748 #: build/C/man3/mallinfo.3:67
1749 #, no-wrap
1750 msgid "I<ordblks>"
1751 msgstr ""
1752
1753 #. type: Plain text
1754 #: build/C/man3/mallinfo.3:70
1755 msgid "The number of ordinary (i.e., non-fastbin) free blocks."
1756 msgstr ""
1757
1758 #. type: TP
1759 #: build/C/man3/mallinfo.3:70
1760 #, no-wrap
1761 msgid "I<smblks>"
1762 msgstr ""
1763
1764 #. type: Plain text
1765 #: build/C/man3/mallinfo.3:74
1766 msgid "The number of fastbin free blocks (see B<mallopt>(3))."
1767 msgstr ""
1768
1769 #. type: TP
1770 #: build/C/man3/mallinfo.3:74
1771 #, no-wrap
1772 msgid "I<hblks>"
1773 msgstr ""
1774
1775 #. type: Plain text
1776 #: build/C/man3/mallinfo.3:82
1777 msgid ""
1778 "The number of blocks currently allocated using B<mmap>(2).  (See the "
1779 "discussion of B<M_MMAP_THRESHOLD> in B<mallopt>(3).)"
1780 msgstr ""
1781
1782 #. type: TP
1783 #: build/C/man3/mallinfo.3:82
1784 #, no-wrap
1785 msgid "I<hblkhd>"
1786 msgstr ""
1787
1788 #. type: Plain text
1789 #: build/C/man3/mallinfo.3:86
1790 msgid "The number of bytes in blocks currently allocated using B<mmap>(2)."
1791 msgstr ""
1792
1793 #. type: TP
1794 #: build/C/man3/mallinfo.3:86
1795 #, no-wrap
1796 msgid "I<usmblks>"
1797 msgstr ""
1798
1799 #. type: Plain text
1800 #: build/C/man3/mallinfo.3:91
1801 msgid ""
1802 "The \"highwater mark\" for allocated space\\(emthat is, the maximum amount "
1803 "of space that was ever allocated.  This field is maintained only in "
1804 "nonthreading environments."
1805 msgstr ""
1806
1807 #. type: TP
1808 #: build/C/man3/mallinfo.3:91
1809 #, no-wrap
1810 msgid "I<fsmblks>"
1811 msgstr ""
1812
1813 #. type: Plain text
1814 #: build/C/man3/mallinfo.3:94
1815 msgid "The total number of bytes in fastbin free blocks."
1816 msgstr ""
1817
1818 #. type: TP
1819 #: build/C/man3/mallinfo.3:94
1820 #, no-wrap
1821 msgid "I<uordblks>"
1822 msgstr ""
1823
1824 #. type: Plain text
1825 #: build/C/man3/mallinfo.3:97
1826 msgid "The total number of bytes used by in-use allocations."
1827 msgstr ""
1828
1829 #. type: TP
1830 #: build/C/man3/mallinfo.3:97
1831 #, no-wrap
1832 msgid "I<fordblks>"
1833 msgstr ""
1834
1835 #. type: Plain text
1836 #: build/C/man3/mallinfo.3:100
1837 msgid "The total number of bytes in free blocks."
1838 msgstr ""
1839
1840 #. type: TP
1841 #: build/C/man3/mallinfo.3:100
1842 #, no-wrap
1843 msgid "I<keepcost>"
1844 msgstr ""
1845
1846 #.  .SH VERSIONS
1847 #.  Available already in glibc 2.0, possibly earlier
1848 #. type: Plain text
1849 #: build/C/man3/mallinfo.3:109
1850 msgid ""
1851 "The total amount of releasable free space at the top of the heap.  This is "
1852 "the maximum number of bytes that could ideally (i.e., ignoring page "
1853 "alignment restrictions, and so on) be released by B<malloc_trim>(3)."
1854 msgstr ""
1855
1856 #. type: Plain text
1857 #: build/C/man3/mallinfo.3:113
1858 msgid ""
1859 "This function is not specified by POSIX or the C standards.  A similar "
1860 "function exists on many System V derivatives, and was specified in the SVID."
1861 msgstr ""
1862
1863 #.  FIXME http://sourceware.org/bugzilla/show_bug.cgi?id=208
1864 #.  See the 24 Aug 2011 mail by Paul Pluzhnikov:
1865 #.      "[patch] Fix mallinfo() to accumulate results for all arenas"
1866 #.  on libc-alpha@sourceware.org
1867 #. type: Plain text
1868 #: build/C/man3/mallinfo.3:125
1869 msgid ""
1870 "B<Information is returned for only the main memory allocation area.> "
1871 "Allocations in other arenas are excluded.  See B<malloc_stats>(3)  and "
1872 "B<malloc_info>(3)  for alternatives that include information about other "
1873 "arenas."
1874 msgstr ""
1875
1876 #. type: Plain text
1877 #: build/C/man3/mallinfo.3:133
1878 msgid ""
1879 "The fields of the I<mallinfo> structure are typed as I<int>.  However, "
1880 "because some internal bookkeeping values may be of type I<long>, the "
1881 "reported values may wrap around zero and thus be inaccurate."
1882 msgstr ""
1883
1884 #. type: SH
1885 #: build/C/man3/mallinfo.3:133 build/C/man3/malloc_hook.3:85
1886 #: build/C/man3/malloc_info.3:80 build/C/man3/mallopt.3:464
1887 #: build/C/man3/mcheck.3:159 build/C/man2/mmap.2:571
1888 #: build/C/man2/mprotect.2:142 build/C/man3/mtrace.3:106
1889 #, no-wrap
1890 msgid "EXAMPLE"
1891 msgstr "例"
1892
1893 #. type: Plain text
1894 #: build/C/man3/mallinfo.3:139
1895 msgid ""
1896 "The program below employs B<mallinfo>()  to retrieve memory allocation "
1897 "statistics before and after allocating and freeing some blocks of memory.  "
1898 "The statistics are displayed on standard output."
1899 msgstr ""
1900
1901 #. type: Plain text
1902 #: build/C/man3/mallinfo.3:143
1903 msgid ""
1904 "The first two command-line arguments specify the number and size of blocks "
1905 "to be allocated with B<malloc>(3)."
1906 msgstr ""
1907
1908 #. type: Plain text
1909 #: build/C/man3/mallinfo.3:157
1910 msgid ""
1911 "The remaining three arguments specify which of the allocated blocks should "
1912 "be freed with B<free>(3).  These three arguments are optional, and specify "
1913 "(in order): the step size to be used in the loop that frees blocks (the "
1914 "default is 1, meaning free all blocks in the range); the ordinal position of "
1915 "the first block to be freed (default 0, meaning the first allocated block); "
1916 "and a number one greater than the ordinal position of the last block to be "
1917 "freed (default is one greater than the maximum block number).  If these "
1918 "three arguments are omitted, then the defaults cause all allocated blocks to "
1919 "be freed."
1920 msgstr ""
1921
1922 #. type: Plain text
1923 #: build/C/man3/mallinfo.3:161
1924 msgid ""
1925 "In the following example run of the program, 1000 allocations of 100 bytes "
1926 "are performed, and then every second allocated block is freed:"
1927 msgstr ""
1928
1929 #. type: Plain text
1930 #: build/C/man3/mallinfo.3:176
1931 #, no-wrap
1932 msgid ""
1933 "$ B<./a.out 1000 100 2>\n"
1934 "============== Before allocating blocks ==============\n"
1935 "Total non-mmapped bytes (arena):       0\n"
1936 "# of free chunks (ordblks):            1\n"
1937 "# of free fastbin blocks (smblks):     0\n"
1938 "# of mapped regions (hblks):           0\n"
1939 "Bytes in mapped regions (hblkhd):      0\n"
1940 "Max. total allocated space (usmblks):  0\n"
1941 "Free bytes held in fastbins (fsmblks): 0\n"
1942 "Total allocated space (uordblks):      0\n"
1943 "Total free space (fordblks):           0\n"
1944 "Topmost releasable block (keepcost):   0\n"
1945 msgstr ""
1946
1947 #. type: Plain text
1948 #: build/C/man3/mallinfo.3:188
1949 #, no-wrap
1950 msgid ""
1951 "============== After allocating blocks ==============\n"
1952 "Total non-mmapped bytes (arena):       135168\n"
1953 "# of free chunks (ordblks):            1\n"
1954 "# of free fastbin blocks (smblks):     0\n"
1955 "# of mapped regions (hblks):           0\n"
1956 "Bytes in mapped regions (hblkhd):      0\n"
1957 "Max. total allocated space (usmblks):  0\n"
1958 "Free bytes held in fastbins (fsmblks): 0\n"
1959 "Total allocated space (uordblks):      104000\n"
1960 "Total free space (fordblks):           31168\n"
1961 "Topmost releasable block (keepcost):   31168\n"
1962 msgstr ""
1963
1964 #. type: Plain text
1965 #: build/C/man3/mallinfo.3:200
1966 #, no-wrap
1967 msgid ""
1968 "============== After freeing blocks ==============\n"
1969 "Total non-mmapped bytes (arena):       135168\n"
1970 "# of free chunks (ordblks):            501\n"
1971 "# of free fastbin blocks (smblks):     0\n"
1972 "# of mapped regions (hblks):           0\n"
1973 "Bytes in mapped regions (hblkhd):      0\n"
1974 "Max. total allocated space (usmblks):  0\n"
1975 "Free bytes held in fastbins (fsmblks): 0\n"
1976 "Total allocated space (uordblks):      52000\n"
1977 "Total free space (fordblks):           83168\n"
1978 "Topmost releasable block (keepcost):   31168\n"
1979 msgstr ""
1980
1981 #. type: SS
1982 #: build/C/man3/mallinfo.3:202 build/C/man3/malloc_info.3:163
1983 #: build/C/man3/mallopt.3:530 build/C/man3/mcheck.3:176
1984 #: build/C/man2/mprotect.2:159
1985 #, no-wrap
1986 msgid "Program source"
1987 msgstr "プログラムのソース"
1988
1989 #. type: Plain text
1990 #: build/C/man3/mallinfo.3:207
1991 #, no-wrap
1992 msgid ""
1993 "#include E<lt>malloc.hE<gt>\n"
1994 "#include \"tlpi_hdr.h\"\n"
1995 msgstr ""
1996 "#include E<lt>malloc.hE<gt>\n"
1997 "#include \"tlpi_hdr.h\"\n"
1998
1999 #. type: Plain text
2000 #: build/C/man3/mallinfo.3:212
2001 #, no-wrap
2002 msgid ""
2003 "static void\n"
2004 "display_mallinfo(void)\n"
2005 "{\n"
2006 "    struct mallinfo mi;\n"
2007 msgstr ""
2008 "static void\n"
2009 "display_mallinfo(void)\n"
2010 "{\n"
2011 "    struct mallinfo mi;\n"
2012
2013 #. type: Plain text
2014 #: build/C/man3/mallinfo.3:214
2015 #, no-wrap
2016 msgid "    mi = mallinfo();\n"
2017 msgstr "    mi = mallinfo();\n"
2018
2019 #. type: Plain text
2020 #: build/C/man3/mallinfo.3:226
2021 #, no-wrap
2022 msgid ""
2023 "    printf(\"Total non-mmapped bytes (arena):       %d\\en\", mi.arena);\n"
2024 "    printf(\"# of free chunks (ordblks):            %d\\en\", mi.ordblks);\n"
2025 "    printf(\"# of free fastbin blocks (smblks):     %d\\en\", mi.smblks);\n"
2026 "    printf(\"# of mapped regions (hblks):           %d\\en\", mi.hblks);\n"
2027 "    printf(\"Bytes in mapped regions (hblkhd):      %d\\en\", mi.hblkhd);\n"
2028 "    printf(\"Max. total allocated space (usmblks):  %d\\en\", mi.usmblks);\n"
2029 "    printf(\"Free bytes held in fastbins (fsmblks): %d\\en\", mi.fsmblks);\n"
2030 "    printf(\"Total allocated space (uordblks):      %d\\en\", mi.uordblks);\n"
2031 "    printf(\"Total free space (fordblks):           %d\\en\", mi.fordblks);\n"
2032 "    printf(\"Topmost releasable block (keepcost):   %d\\en\", mi.keepcost);\n"
2033 "}\n"
2034 msgstr ""
2035
2036 #. type: Plain text
2037 #: build/C/man3/mallinfo.3:234
2038 #, no-wrap
2039 msgid ""
2040 "int\n"
2041 "main(int argc, char *argv[])\n"
2042 "{\n"
2043 "#define MAX_ALLOCS 2000000\n"
2044 "    char *alloc[MAX_ALLOCS];\n"
2045 "    int numBlocks, j, freeBegin, freeEnd, freeStep;\n"
2046 "    size_t blockSize;\n"
2047 msgstr ""
2048
2049 #. type: Plain text
2050 #: build/C/man3/mallinfo.3:238
2051 #, no-wrap
2052 msgid ""
2053 "    if (argc E<lt> 3 || strcmp(argv[1], \"--help\") == 0)\n"
2054 "        usageErr(\"%s num-blocks block-size [free-step [start-free \"\n"
2055 "                \"[end-free]]]\\en\", argv[0]);\n"
2056 msgstr ""
2057
2058 #. type: Plain text
2059 #: build/C/man3/mallinfo.3:244
2060 #, no-wrap
2061 msgid ""
2062 "    numBlocks = atoi(argv[1]);\n"
2063 "    blockSize = atoi(argv[2]);\n"
2064 "    freeStep = (argc E<gt> 3) ? atoi(argv[3]) : 1;\n"
2065 "    freeBegin = (argc E<gt> 4) ? atoi(argv[4]) : 0;\n"
2066 "    freeEnd = (argc E<gt> 5) ? atoi(argv[5]) : numBlocks;\n"
2067 msgstr ""
2068
2069 #. type: Plain text
2070 #: build/C/man3/mallinfo.3:247
2071 #, no-wrap
2072 msgid ""
2073 "    printf(\"============== Before allocating blocks ==============\\en\");\n"
2074 "    display_mallinfo();\n"
2075 msgstr ""
2076
2077 #. type: Plain text
2078 #: build/C/man3/mallinfo.3:251
2079 #, no-wrap
2080 msgid ""
2081 "    for (j = 0; j E<lt> numBlocks; j++) {\n"
2082 "        if (numBlocks E<gt>= MAX_ALLOCS)\n"
2083 "            fatal(\"Too many allocations\");\n"
2084 msgstr ""
2085
2086 #. type: Plain text
2087 #: build/C/man3/mallinfo.3:256
2088 #, no-wrap
2089 msgid ""
2090 "        alloc[j] = malloc(blockSize);\n"
2091 "        if (alloc[j] == NULL)\n"
2092 "            errExit(\"malloc\");\n"
2093 "    }\n"
2094 msgstr ""
2095
2096 #. type: Plain text
2097 #: build/C/man3/mallinfo.3:259
2098 #, no-wrap
2099 msgid ""
2100 "    printf(\"\\en============== After allocating blocks ==============\\en\");\n"
2101 "    display_mallinfo();\n"
2102 msgstr ""
2103
2104 #. type: Plain text
2105 #: build/C/man3/mallinfo.3:262
2106 #, no-wrap
2107 msgid ""
2108 "    for (j = freeBegin; j E<lt> freeEnd; j += freeStep)\n"
2109 "        free(alloc[j]);\n"
2110 msgstr ""
2111
2112 #. type: Plain text
2113 #: build/C/man3/mallinfo.3:265
2114 #, no-wrap
2115 msgid ""
2116 "    printf(\"\\en============== After freeing blocks ==============\\en\");\n"
2117 "    display_mallinfo();\n"
2118 msgstr ""
2119
2120 #. type: Plain text
2121 #: build/C/man3/mallinfo.3:268 build/C/man3/malloc_info.3:251
2122 #: build/C/man3/mallopt.3:563 build/C/man3/mcheck.3:203
2123 #: build/C/man2/mmap.2:652
2124 #, no-wrap
2125 msgid ""
2126 "    exit(EXIT_SUCCESS);\n"
2127 "}\n"
2128 msgstr ""
2129 "    exit(EXIT_SUCCESS);\n"
2130 "}\n"
2131
2132 #. type: Plain text
2133 #: build/C/man3/mallinfo.3:278
2134 msgid ""
2135 "B<mmap>(2), B<malloc>(3), B<malloc_info>(3), B<malloc_stats>(3), "
2136 "B<malloc_trim>(3), B<mallopt>(3)"
2137 msgstr "B<mmap>(2), B<malloc>(3), B<malloc_info>(3), B<malloc_stats>(3), B<malloc_trim>(3), B<mallopt>(3)"
2138
2139 #. type: TH
2140 #: build/C/man3/malloc_get_state.3:23
2141 #, no-wrap
2142 msgid "MALLOC_GET_STATE"
2143 msgstr "MALLOC_GET_STATE"
2144
2145 #. type: TH
2146 #: build/C/man3/malloc_get_state.3:23
2147 #, no-wrap
2148 msgid "2012-05-04"
2149 msgstr "2012-05-04"
2150
2151 #. type: Plain text
2152 #: build/C/man3/malloc_get_state.3:26
2153 msgid ""
2154 "malloc_get_state, malloc_set_state - record and restore state of malloc "
2155 "implementation"
2156 msgstr ""
2157
2158 #. type: Plain text
2159 #: build/C/man3/malloc_get_state.3:29 build/C/man3/posix_memalign.3:34
2160 #, no-wrap
2161 msgid "B<#include E<lt>stdlib.hE<gt>>\n"
2162 msgstr "B<#include E<lt>stdlib.hE<gt>>\n"
2163
2164 #. type: Plain text
2165 #: build/C/man3/malloc_get_state.3:31
2166 #, no-wrap
2167 msgid "B<void* malloc_get_state(void);>\n"
2168 msgstr "B<void* malloc_get_state(void);>\n"
2169
2170 #. type: Plain text
2171 #: build/C/man3/malloc_get_state.3:33
2172 #, no-wrap
2173 msgid "B<int malloc_set_state(void *>I<state>B<);>\n"
2174 msgstr "B<int malloc_set_state(void *>I<state>B<);>\n"
2175
2176 #. type: Plain text
2177 #: build/C/man3/malloc_get_state.3:51
2178 msgid ""
2179 "The B<malloc_get_state>()  function records the current state of all "
2180 "B<malloc>(3)  internal bookkeeping variables (but not the actual contents of "
2181 "the heap or the state of B<malloc_hook>(3)  functions pointers).  The state "
2182 "is recorded in a system-dependent opaque data structure dynamically "
2183 "allocated via B<malloc>(3), and a pointer to that data structure is returned "
2184 "as the function result.  (It is the caller's responsibility to B<free>(3)  "
2185 "this memory.)"
2186 msgstr ""
2187
2188 #. type: Plain text
2189 #: build/C/man3/malloc_get_state.3:59
2190 msgid ""
2191 "The B<malloc_set_state>()  function restores the state of all B<malloc>(3)  "
2192 "internal bookkeeping variables to the values recorded in the opaque data "
2193 "structure pointed to by I<state>."
2194 msgstr ""
2195
2196 #. type: Plain text
2197 #: build/C/man3/malloc_get_state.3:66
2198 msgid ""
2199 "On success, B<malloc_get_state>()  returns a pointer to a newly allocated "
2200 "opaque data structure.  On error (for example, memory could not be allocated "
2201 "for the data structure), B<malloc_get_state>()  returns NULL."
2202 msgstr ""
2203
2204 #.  if(ms->magic != MALLOC_STATE_MAGIC) return -1;
2205 #.  /* Must fail if the major version is too high. */
2206 #.  if((ms->version & ~0xffl) > (MALLOC_STATE_VERSION & ~0xffl)) return -2;
2207 #. type: Plain text
2208 #: build/C/man3/malloc_get_state.3:84
2209 msgid ""
2210 "On success, B<malloc_set_state>()  returns 0.  If the implementation detects "
2211 "that I<state> does not point to a correctly formed data structure, "
2212 "B<malloc_set_state>()  returns -1.  If the implementation detects that the "
2213 "version of the data structure referred to by I<state> is a more recent "
2214 "version than this implementation knows about, B<malloc_set_state>()  returns "
2215 "-2."
2216 msgstr ""
2217
2218 #. type: Plain text
2219 #: build/C/man3/malloc_get_state.3:86 build/C/man3/malloc_hook.3:78
2220 #: build/C/man3/mcheck.3:146 build/C/man3/mtrace.3:78
2221 msgid "These functions are GNU extensions."
2222 msgstr "これらの関数は GNU による拡張である。"
2223
2224 #. type: Plain text
2225 #: build/C/man3/malloc_get_state.3:92
2226 msgid ""
2227 "These functions are especially useful when using this B<malloc>(3)  "
2228 "implementation as part of a shared library, and the heap contents are saved/"
2229 "restored via some other method.  This technique is used by the GNU Emacs to "
2230 "implement its \"dumping\" function."
2231 msgstr ""
2232
2233 #.  i.e., calls __malloc_check_init()
2234 #.  i.e., malloc checking is not already in use
2235 #.  and the caller requested malloc checking
2236 #. type: Plain text
2237 #: build/C/man3/malloc_get_state.3:109
2238 msgid ""
2239 "Hook function pointers are never saved or restored by these functions, with "
2240 "two exceptions: if malloc checking (see B<mallopt>(3))  was in use when "
2241 "B<malloc_get_state>()  was called, then B<malloc_set_state>()  resets malloc "
2242 "checking hooks if possible; if malloc checking was not in use in the "
2243 "recorded state, but the caller has requested malloc checking, then the hooks "
2244 "are reset to 0."
2245 msgstr ""
2246
2247 #. type: Plain text
2248 #: build/C/man3/malloc_get_state.3:112
2249 msgid "B<malloc>(3), B<mallopt>(3)"
2250 msgstr "B<malloc>(3), B<mallopt>(3)"
2251
2252 #. type: TH
2253 #: build/C/man3/malloc_hook.3:6
2254 #, no-wrap
2255 msgid "MALLOC_HOOK"
2256 msgstr "MALLOC_HOOK"
2257
2258 #. type: TH
2259 #: build/C/man3/malloc_hook.3:6
2260 #, no-wrap
2261 msgid "2010-10-13"
2262 msgstr "2010-10-13"
2263
2264 #. type: Plain text
2265 #: build/C/man3/malloc_hook.3:11
2266 msgid ""
2267 "__malloc_hook, __malloc_initialize_hook, __memalign_hook, __free_hook, "
2268 "__realloc_hook, __after_morecore_hook - malloc debugging variables"
2269 msgstr ""
2270 "__malloc_hook, __malloc_initialize_hook, __memalign_hook, __free_hook, "
2271 "__realloc_hook, __after_morecore_hook - malloc デバッグ用の変数"
2272
2273 #. type: Plain text
2274 #: build/C/man3/malloc_hook.3:14 build/C/man3/malloc_info.3:29
2275 #: build/C/man3/posix_memalign.3:40
2276 #, no-wrap
2277 msgid "B<#include E<lt>malloc.hE<gt>>\n"
2278 msgstr "B<#include E<lt>malloc.hE<gt>>\n"
2279
2280 #. type: Plain text
2281 #: build/C/man3/malloc_hook.3:16
2282 #, no-wrap
2283 msgid "B<void *(*__malloc_hook)(size_t >I<size>B<, const void *>I<caller>B<);>\n"
2284 msgstr "B<void *(*__malloc_hook)(size_t >I<size>B<, const void *>I<caller>B<);>\n"
2285
2286 #. type: Plain text
2287 #: build/C/man3/malloc_hook.3:19
2288 #, no-wrap
2289 msgid "B<void *(*__realloc_hook)(void *>I<ptr>B<, size_t >I<size>B<, const void *>I<caller>B<);>\n"
2290 msgstr "B<void *(*__realloc_hook)(void *>I<ptr>B<, size_t >I<size>B<, const void *>I<caller>B<);>\n"
2291
2292 #. type: Plain text
2293 #: build/C/man3/malloc_hook.3:22
2294 #, no-wrap
2295 msgid ""
2296 "B<void *(*__memalign_hook)(size_t >I<alignment>B<, size_t >I<size>B<,>\n"
2297 "B<                         const void *>I<caller>B<);>\n"
2298 msgstr ""
2299 "B<void *(*__memalign_hook)(size_t >I<alignment>B<, size_t >I<size>B<,>\n"
2300 "B<                         const void *>I<caller>B<);>\n"
2301
2302 #. type: Plain text
2303 #: build/C/man3/malloc_hook.3:24
2304 #, no-wrap
2305 msgid "B<void (*__free_hook)(void *>I<ptr>B<, const void *>I<caller>B<);>\n"
2306 msgstr "B<void (*__free_hook)(void *>I<ptr>B<, const void *>I<caller>B<);>\n"
2307
2308 #. type: Plain text
2309 #: build/C/man3/malloc_hook.3:26
2310 #, no-wrap
2311 msgid "B<void (*__malloc_initialize_hook)(void);>\n"
2312 msgstr "B<void (*__malloc_initialize_hook)(void);>\n"
2313
2314 #. type: Plain text
2315 #: build/C/man3/malloc_hook.3:28
2316 #, no-wrap
2317 msgid "B<void (*__after_morecore_hook)(void);>\n"
2318 msgstr "B<void (*__after_morecore_hook)(void);>\n"
2319
2320 #. type: Plain text
2321 #: build/C/man3/malloc_hook.3:39
2322 msgid ""
2323 "The GNU C library lets you modify the behavior of B<malloc>(3), B<realloc>"
2324 "(3), and B<free>(3)  by specifying appropriate hook functions.  You can use "
2325 "these hooks to help you debug programs that use dynamic memory allocation, "
2326 "for example."
2327 msgstr ""
2328 "GNU C ライブラリでは、適切なフック関数 (hook function) を指定することで "
2329 "B<malloc>(3), B<realloc>(3), B<free>(3)  の動作を変更することができる。例え"
2330 "ば、動的にメモリ割り当てを行う プログラムのデバッグにこれらのフックを使うこと"
2331 "ができる。"
2332
2333 #. type: Plain text
2334 #: build/C/man3/malloc_hook.3:46
2335 msgid ""
2336 "The variable B<__malloc_initialize_hook> points at a function that is called "
2337 "once when the malloc implementation is initialized.  This is a weak "
2338 "variable, so it can be overridden in the application with a definition like "
2339 "the following:"
2340 msgstr ""
2341 "変数 B<__malloc_initialize_hook> は malloc の実装が初期化される際に一度だけ呼"
2342 "ばれる関数へのポインタである。 この変数は書き換え可能 (weak) であり、アプリ"
2343 "ケーション内で 以下のような定義で上書きできる:"
2344
2345 #. type: Plain text
2346 #: build/C/man3/malloc_hook.3:49
2347 #, no-wrap
2348 msgid "    void (*__malloc_initialize_hook)(void) = my_init_hook;\n"
2349 msgstr "    void (*__malloc_initialize_hook)(void) = my_init_hook;\n"
2350
2351 #. type: Plain text
2352 #: build/C/man3/malloc_hook.3:54
2353 msgid ""
2354 "Now the function I<my_init_hook>()  can do the initialization of all hooks."
2355 msgstr ""
2356 "なお、関数 I<my_init_hook>()  で全てのフックの初期化をすることができる。"
2357
2358 #. type: Plain text
2359 #: build/C/man3/malloc_hook.3:70
2360 msgid ""
2361 "The four functions pointed to by B<__malloc_hook>, B<__realloc_hook>, "
2362 "B<__memalign_hook>, B<__free_hook> have a prototype like the functions "
2363 "B<malloc>(3), B<realloc>(3), B<memalign>(3), B<free>(3), respectively, "
2364 "except that they have a final argument I<caller> that gives the address of "
2365 "the caller of B<malloc>(3), etc."
2366 msgstr ""
2367 "B<__malloc_hook>, B<__realloc_hook>, B<__memalign_hook>, B<__free_hook> で指"
2368 "される 4 つの関数は、各々 B<malloc>(3), B<realloc>(3), B<memalign>(3), "
2369 "B<free>(3)  とよく似たプロトタイプを持っているが、 一番最後の引き数 "
2370 "I<caller> をとる点が異なる。 引き数 I<caller> には、 B<malloc>(3)  などの呼び"
2371 "出し元 (caller) のアドレスが格納される。"
2372
2373 #. type: Plain text
2374 #: build/C/man3/malloc_hook.3:76
2375 msgid ""
2376 "The variable B<__after_morecore_hook> points at a function that is called "
2377 "each time after B<sbrk>(2)  was asked for more memory."
2378 msgstr ""
2379 "変数 B<__after_morecore_hook> は、領域の追加要求があり B<sbrk>(2)  が呼ばれた"
2380 "後で毎回呼び出される関数へのポインタである。"
2381
2382 #.  https://bugzilla.redhat.com/show_bug.cgi?id=450187
2383 #.  http://sourceware.org/bugzilla/show_bug.cgi?id=9957
2384 #. type: Plain text
2385 #: build/C/man3/malloc_hook.3:85
2386 msgid ""
2387 "The use of these hook functions is not safe in multithreaded programs, and "
2388 "they are now deprecated.  Programmers should instead preempt calls to the "
2389 "relevant functions by defining and exporting functions such as \"malloc\" "
2390 "and \"free\"."
2391 msgstr ""
2392
2393 #. type: Plain text
2394 #: build/C/man3/malloc_hook.3:87
2395 msgid "Here is a short example of how to use these variables."
2396 msgstr "これらの変数の使い方の簡単な例を以下に示す。"
2397
2398 #. type: Plain text
2399 #: build/C/man3/malloc_hook.3:91
2400 #, no-wrap
2401 msgid ""
2402 "#include E<lt>stdio.hE<gt>\n"
2403 "#include E<lt>malloc.hE<gt>\n"
2404 msgstr ""
2405 "#include E<lt>stdio.hE<gt>\n"
2406 "#include E<lt>malloc.hE<gt>\n"
2407
2408 #. type: Plain text
2409 #: build/C/man3/malloc_hook.3:95
2410 #, no-wrap
2411 msgid ""
2412 "/* Prototypes for our hooks.  */\n"
2413 "static void my_init_hook(void);\n"
2414 "static void *my_malloc_hook(size_t, const void *);\n"
2415 msgstr ""
2416 "/* 使おうとするフックのプロトタイプ宣言 */\n"
2417 "static void my_init_hook(void);\n"
2418 "static void *my_malloc_hook(size_t, const void *);\n"
2419
2420 #. type: Plain text
2421 #: build/C/man3/malloc_hook.3:98
2422 #, no-wrap
2423 msgid ""
2424 "/* Variables to save original hooks. */\n"
2425 "static void *(*old_malloc_hook)(size_t, const void *);\n"
2426 msgstr ""
2427 "/* 元々のフックを保存するための変数 */\n"
2428 "static void *(*old_malloc_hook)(size_t, const void *);\n"
2429
2430 #. type: Plain text
2431 #: build/C/man3/malloc_hook.3:101
2432 #, no-wrap
2433 msgid ""
2434 "/* Override initializing hook from the C library. */\n"
2435 "void (*__malloc_initialize_hook) (void) = my_init_hook;\n"
2436 msgstr ""
2437 "/* C ライブラリから呼ばれる初期化フックを上書きする */\n"
2438 "void (*__malloc_initialize_hook) (void) = my_init_hook;\n"
2439
2440 #. type: Plain text
2441 #: build/C/man3/malloc_hook.3:108
2442 #, no-wrap
2443 msgid ""
2444 "static void\n"
2445 "my_init_hook(void)\n"
2446 "{\n"
2447 "    old_malloc_hook = __malloc_hook;\n"
2448 "    __malloc_hook = my_malloc_hook;\n"
2449 "}\n"
2450 msgstr ""
2451 "static void\n"
2452 "my_init_hook(void)\n"
2453 "{\n"
2454 "    old_malloc_hook = __malloc_hook;\n"
2455 "    __malloc_hook = my_malloc_hook;\n"
2456 "}\n"
2457
2458 #. type: Plain text
2459 #: build/C/man3/malloc_hook.3:113
2460 #, no-wrap
2461 msgid ""
2462 "static void *\n"
2463 "my_malloc_hook(size_t size, const void *caller)\n"
2464 "{\n"
2465 "    void *result;\n"
2466 msgstr ""
2467 "static void *\n"
2468 "my_malloc_hook(size_t size, const void *caller)\n"
2469 "{\n"
2470 "    void *result;\n"
2471
2472 #. type: Plain text
2473 #: build/C/man3/malloc_hook.3:116
2474 #, no-wrap
2475 msgid ""
2476 "    /* Restore all old hooks */\n"
2477 "    __malloc_hook = old_malloc_hook;\n"
2478 msgstr ""
2479 "    /* 元々のフックを全て戻す */\n"
2480 "    __malloc_hook = old_malloc_hook;\n"
2481
2482 #. type: Plain text
2483 #: build/C/man3/malloc_hook.3:119
2484 #, no-wrap
2485 msgid ""
2486 "    /* Call recursively */\n"
2487 "    result = malloc(size);\n"
2488 msgstr ""
2489 "    /* malloc の再帰的呼び出し */\n"
2490 "    result = malloc(size);\n"
2491
2492 #. type: Plain text
2493 #: build/C/man3/malloc_hook.3:122
2494 #, no-wrap
2495 msgid ""
2496 "    /* Save underlying hooks */\n"
2497 "    old_malloc_hook = __malloc_hook;\n"
2498 msgstr ""
2499 "    /* 現在設定されているフック (underlying hook) を保存する */\n"
2500 "    old_malloc_hook = __malloc_hook;\n"
2501
2502 #. type: Plain text
2503 #: build/C/man3/malloc_hook.3:126
2504 #, no-wrap
2505 msgid ""
2506 "    /* printf() might call malloc(), so protect it too. */\n"
2507 "    printf(\"malloc(%u) called from %p returns %p\\en\",\n"
2508 "            (unsigned int) size, caller, result);\n"
2509 msgstr ""
2510 "    /* printf() は malloc() を呼び出す可能性があるので\n"
2511 "        ここでもガードを行う (元々のフックのままにしておく) */\n"
2512 "    printf(\"malloc(%u) called from %p returns %p\\en\",\n"
2513 "            (unsigned int) size, caller, result);\n"
2514
2515 #. type: Plain text
2516 #: build/C/man3/malloc_hook.3:129
2517 #, no-wrap
2518 msgid ""
2519 "    /* Restore our own hooks */\n"
2520 "    __malloc_hook = my_malloc_hook;\n"
2521 msgstr ""
2522 "    /* ユーザが使おうとするフックを再設定する */\n"
2523 "    __malloc_hook = my_malloc_hook;\n"
2524
2525 #. type: Plain text
2526 #: build/C/man3/malloc_hook.3:132
2527 #, no-wrap
2528 msgid ""
2529 "    return result;\n"
2530 "}\n"
2531 msgstr ""
2532 "    return result;\n"
2533 "}\n"
2534
2535 #. type: Plain text
2536 #: build/C/man3/malloc_hook.3:138
2537 msgid "B<mallinfo>(3), B<malloc>(3), B<mcheck>(3), B<mtrace>(3)"
2538 msgstr "B<mallinfo>(3), B<malloc>(3), B<mcheck>(3), B<mtrace>(3)"
2539
2540 #. type: TH
2541 #: build/C/man3/malloc_info.3:23
2542 #, no-wrap
2543 msgid "MALLOC_INFO"
2544 msgstr "MALLOC_INFO"
2545
2546 #. type: Plain text
2547 #: build/C/man3/malloc_info.3:26
2548 msgid "malloc_info - export malloc state to a stream"
2549 msgstr ""
2550
2551 #. type: Plain text
2552 #: build/C/man3/malloc_info.3:31
2553 #, no-wrap
2554 msgid "B<int malloc_info(int >I<options>B<, FILE *>I<fp>B<);>\n"
2555 msgstr "B<int malloc_info(int >I<options>B<, FILE *>I<fp>B<);>\n"
2556
2557 #. type: Plain text
2558 #: build/C/man3/malloc_info.3:42
2559 msgid ""
2560 "The B<malloc_info>()  function exports an XML string that describes the "
2561 "current state of the memory-allocation implementation in the caller.  The "
2562 "string is printed on the file stream I<fp>.  The exported string includes "
2563 "information about all arenas (see B<malloc>(3))."
2564 msgstr ""
2565
2566 #. type: Plain text
2567 #: build/C/man3/malloc_info.3:46
2568 msgid "As currently implemented, I<options> must be zero."
2569 msgstr ""
2570
2571 #. type: Plain text
2572 #: build/C/man3/malloc_info.3:51
2573 msgid "On success, B<malloc_info>()  returns 0; on error, it returns -1."
2574 msgstr "B<malloc_info>() は成功すると 0 を返す。エラーの場合は -1 を返す。"
2575
2576 #. type: Plain text
2577 #: build/C/man3/malloc_info.3:56
2578 msgid "I<options> was nonzero."
2579 msgstr ""
2580
2581 #. type: Plain text
2582 #: build/C/man3/malloc_info.3:59
2583 msgid "B<malloc_info>(3)  was added to glibc in version 2.10."
2584 msgstr "B<malloc_info>(3) は glibc バージョン 2.10 で追加された。"
2585
2586 #. type: Plain text
2587 #: build/C/man3/malloc_info.3:61 build/C/man3/malloc_stats.3:55
2588 #: build/C/man3/malloc_trim.3:60 build/C/man3/malloc_usable_size.3:48
2589 msgid "This function is a GNU extension."
2590 msgstr "この関数は GNU による拡張である。"
2591
2592 #. type: Plain text
2593 #: build/C/man3/malloc_info.3:67
2594 msgid ""
2595 "The memory-allocation information is provided as an XML string (rather than "
2596 "a C structure)  because the information may change over time (according to "
2597 "changes in the underlying implementation).  The output XML string includes a "
2598 "version field."
2599 msgstr ""
2600
2601 #. type: Plain text
2602 #: build/C/man3/malloc_info.3:73
2603 msgid ""
2604 "The B<open_memstream>(3)  function can be used to send the output of "
2605 "B<malloc_info>()  directly into a buffer in memory, rather than to a file."
2606 msgstr ""
2607
2608 #. type: Plain text
2609 #: build/C/man3/malloc_info.3:80
2610 msgid ""
2611 "The B<malloc_info>()  function is designed to address deficiencies in "
2612 "B<malloc_stats>(3)  and B<mallinfo>(3)."
2613 msgstr ""
2614
2615 #. type: Plain text
2616 #: build/C/man3/malloc_info.3:91
2617 msgid ""
2618 "The program below takes up to four command-line arguments, of which the "
2619 "first three are mandatory.  The first argument specifies the number of "
2620 "threads that the program should create.  All of the threads, including the "
2621 "main thread, allocate the number of blocks of memory specified by the second "
2622 "argument.  The third argument controls the size of the blocks to be "
2623 "allocated.  The main thread creates blocks of this size, the second thread "
2624 "created by the program allocates blocks of twice this size, the third thread "
2625 "allocates blocks of three times this size, and so on."
2626 msgstr ""
2627
2628 #. type: Plain text
2629 #: build/C/man3/malloc_info.3:98
2630 msgid ""
2631 "The program calls B<malloc_info>()  twice to display the memory-allocation "
2632 "state.  The first call takes place before any threads are created or memory "
2633 "allocated.  The second call is performed after all threads have allocated "
2634 "memory."
2635 msgstr ""
2636
2637 #. type: Plain text
2638 #: build/C/man3/malloc_info.3:106
2639 msgid ""
2640 "In the following example, the command-line arguments specify the creation of "
2641 "one additional thread, and both the main thread and the additional thread "
2642 "allocate 10000 blocks of memory.  After the blocks of memory have been "
2643 "allocated, B<malloc_info>()  shows the state of two allocation arenas."
2644 msgstr ""
2645
2646 #. type: Plain text
2647 #: build/C/man3/malloc_info.3:131
2648 #, no-wrap
2649 msgid ""
2650 "$ B<getconf GNU_LIBC_VERSION>\n"
2651 "glibc 2.13\n"
2652 "$ B<./a.out 1 10000 100>\n"
2653 "============ Before allocating blocks ============\n"
2654 "E<lt>malloc version=\"1\"E<gt>\n"
2655 "E<lt>heap nr=\"0\"E<gt>\n"
2656 "E<lt>sizesE<gt>\n"
2657 "E<lt>/sizesE<gt>\n"
2658 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
2659 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
2660 "E<lt>system type=\"current\" size=\"135168\"/E<gt>\n"
2661 "E<lt>system type=\"max\" size=\"135168\"/E<gt>\n"
2662 "E<lt>aspace type=\"total\" size=\"135168\"/E<gt>\n"
2663 "E<lt>aspace type=\"mprotect\" size=\"135168\"/E<gt>\n"
2664 "E<lt>/heapE<gt>\n"
2665 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
2666 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
2667 "E<lt>system type=\"current\" size=\"135168\"/E<gt>\n"
2668 "E<lt>system type=\"max\" size=\"135168\"/E<gt>\n"
2669 "E<lt>aspace type=\"total\" size=\"135168\"/E<gt>\n"
2670 "E<lt>aspace type=\"mprotect\" size=\"135168\"/E<gt>\n"
2671 "E<lt>/mallocE<gt>\n"
2672 msgstr ""
2673
2674 #. type: Plain text
2675 #: build/C/man3/malloc_info.3:161
2676 #, no-wrap
2677 msgid ""
2678 "============ After allocating blocks ============\n"
2679 "E<lt>malloc version=\"1\"E<gt>\n"
2680 "E<lt>heap nr=\"0\"E<gt>\n"
2681 "E<lt>sizesE<gt>\n"
2682 "E<lt>/sizesE<gt>\n"
2683 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
2684 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
2685 "E<lt>system type=\"current\" size=\"1081344\"/E<gt>\n"
2686 "E<lt>system type=\"max\" size=\"1081344\"/E<gt>\n"
2687 "E<lt>aspace type=\"total\" size=\"1081344\"/E<gt>\n"
2688 "E<lt>aspace type=\"mprotect\" size=\"1081344\"/E<gt>\n"
2689 "E<lt>/heapE<gt>\n"
2690 "E<lt>heap nr=\"1\"E<gt>\n"
2691 "E<lt>sizesE<gt>\n"
2692 "E<lt>/sizesE<gt>\n"
2693 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
2694 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
2695 "E<lt>system type=\"current\" size=\"1032192\"/E<gt>\n"
2696 "E<lt>system type=\"max\" size=\"1032192\"/E<gt>\n"
2697 "E<lt>aspace type=\"total\" size=\"1032192\"/E<gt>\n"
2698 "E<lt>aspace type=\"mprotect\" size=\"1032192\"/E<gt>\n"
2699 "E<lt>/heapE<gt>\n"
2700 "E<lt>total type=\"fast\" count=\"0\" size=\"0\"/E<gt>\n"
2701 "E<lt>total type=\"rest\" count=\"0\" size=\"0\"/E<gt>\n"
2702 "E<lt>system type=\"current\" size=\"2113536\"/E<gt>\n"
2703 "E<lt>system type=\"max\" size=\"2113536\"/E<gt>\n"
2704 "E<lt>aspace type=\"total\" size=\"2113536\"/E<gt>\n"
2705 "E<lt>aspace type=\"mprotect\" size=\"2113536\"/E<gt>\n"
2706 "E<lt>/mallocE<gt>\n"
2707 msgstr ""
2708
2709 #. type: Plain text
2710 #: build/C/man3/malloc_info.3:171
2711 #, no-wrap
2712 msgid ""
2713 "#include E<lt>unistd.hE<gt>\n"
2714 "#include E<lt>stdlib.hE<gt>\n"
2715 "#include E<lt>pthread.hE<gt>\n"
2716 "#include E<lt>malloc.hE<gt>\n"
2717 "#include E<lt>errno.hE<gt>\n"
2718 msgstr ""
2719 "#include E<lt>unistd.hE<gt>\n"
2720 "#include E<lt>stdlib.hE<gt>\n"
2721 "#include E<lt>pthread.hE<gt>\n"
2722 "#include E<lt>malloc.hE<gt>\n"
2723 "#include E<lt>errno.hE<gt>\n"
2724
2725 #. type: Plain text
2726 #: build/C/man3/malloc_info.3:174
2727 #, no-wrap
2728 msgid ""
2729 "static size_t blockSize;\n"
2730 "static int numThreads, numBlocks;\n"
2731 msgstr ""
2732
2733 #. type: Plain text
2734 #: build/C/man3/malloc_info.3:177
2735 #, no-wrap
2736 msgid ""
2737 "#define errExit(msg)    do { perror(msg); exit(EXIT_FAILURE); \\e\n"
2738 "                        } while (0)\n"
2739 msgstr ""
2740 "#define errExit(msg)    do { perror(msg); exit(EXIT_FAILURE); \\e\n"
2741 "                        } while (0)\n"
2742
2743 #. type: Plain text
2744 #: build/C/man3/malloc_info.3:183
2745 #, no-wrap
2746 msgid ""
2747 "static void *\n"
2748 "thread_func(void *arg)\n"
2749 "{\n"
2750 "    int j;\n"
2751 "    int tn = (int) arg;\n"
2752 msgstr ""
2753
2754 #. type: Plain text
2755 #: build/C/man3/malloc_info.3:186
2756 #, no-wrap
2757 msgid ""
2758 "    /* The multiplier \\(aq(2 + tn)\\(aq ensures that each thread (including\n"
2759 "       the main thread) allocates a different amount of memory */\n"
2760 msgstr ""
2761
2762 #. type: Plain text
2763 #: build/C/man3/malloc_info.3:190
2764 #, no-wrap
2765 msgid ""
2766 "    for (j = 0; j E<lt> numBlocks; j++)\n"
2767 "        if (malloc(blockSize * (2 + tn)) == NULL)\n"
2768 "            errExit(\"malloc-thread\");\n"
2769 msgstr ""
2770 "    for (j = 0; j E<lt> numBlocks; j++)\n"
2771 "        if (malloc(blockSize * (2 + tn)) == NULL)\n"
2772 "            errExit(\"malloc-thread\");\n"
2773
2774 #. type: Plain text
2775 #: build/C/man3/malloc_info.3:194
2776 #, no-wrap
2777 msgid ""
2778 "    sleep(100);         /* Sleep until main thread terminates */\n"
2779 "    return NULL;\n"
2780 "}\n"
2781 msgstr ""
2782
2783 #. type: Plain text
2784 #: build/C/man3/malloc_info.3:200
2785 #, no-wrap
2786 msgid ""
2787 "int\n"
2788 "main(int argc, char *argv[])\n"
2789 "{\n"
2790 "    int j, tn, sleepTime;\n"
2791 "    pthread_t *thr;\n"
2792 msgstr ""
2793 "int\n"
2794 "main(int argc, char *argv[])\n"
2795 "{\n"
2796 "    int j, tn, sleepTime;\n"
2797 "    pthread_t *thr;\n"
2798
2799 #. type: Plain text
2800 #: build/C/man3/malloc_info.3:207
2801 #, no-wrap
2802 msgid ""
2803 "    if (argc E<lt> 4) {\n"
2804 "        fprintf(stderr,\n"
2805 "                \"%s num-threads num-blocks block-size [sleep-time]\\en\",\n"
2806 "                argv[0]);\n"
2807 "        exit(EXIT_FAILURE);\n"
2808 "    }\n"
2809 msgstr ""
2810 "    if (argc E<lt> 4) {\n"
2811 "        fprintf(stderr,\n"
2812 "                \"%s num-threads num-blocks block-size [sleep-time]\\en\",\n"
2813 "                argv[0]);\n"
2814 "        exit(EXIT_FAILURE);\n"
2815 "    }\n"
2816
2817 #. type: Plain text
2818 #: build/C/man3/malloc_info.3:212
2819 #, no-wrap
2820 msgid ""
2821 "    numThreads = atoi(argv[1]);\n"
2822 "    numBlocks = atoi(argv[2]);\n"
2823 "    blockSize = atoi(argv[3]);\n"
2824 "    sleepTime = (argc E<gt> 4) ? atoi(argv[4]) : 0;\n"
2825 msgstr ""
2826
2827 #. type: Plain text
2828 #: build/C/man3/malloc_info.3:216
2829 #, no-wrap
2830 msgid ""
2831 "    thr = calloc(numThreads, sizeof(pthread_t));\n"
2832 "    if (thr == NULL)\n"
2833 "        errExit(\"calloc\");\n"
2834 msgstr ""
2835
2836 #. type: Plain text
2837 #: build/C/man3/malloc_info.3:219
2838 #, no-wrap
2839 msgid ""
2840 "    printf(\"============ Before allocating blocks ============\\en\");\n"
2841 "    malloc_info(0, stdout);\n"
2842 msgstr ""
2843
2844 #. type: Plain text
2845 #: build/C/man3/malloc_info.3:221
2846 #, no-wrap
2847 msgid "    /* Create threads that allocate different amounts of memory */\n"
2848 msgstr ""
2849
2850 #. type: Plain text
2851 #: build/C/man3/malloc_info.3:227
2852 #, no-wrap
2853 msgid ""
2854 "    for (tn = 0; tn E<lt> numThreads; tn++) {\n"
2855 "        errno = pthread_create(&thr[tn], NULL, thread_func,\n"
2856 "                               (void *) tn);\n"
2857 "        if (errno != 0)\n"
2858 "            errExit(\"pthread_create\");\n"
2859 msgstr ""
2860
2861 #. type: Plain text
2862 #: build/C/man3/malloc_info.3:232
2863 #, no-wrap
2864 msgid ""
2865 "        /* If we add a sleep interval after the start-up of each\n"
2866 "           thread, the threads likely won\\(aqt contend for malloc\n"
2867 "           mutexes, and therefore additional arenas won\\(aqt be\n"
2868 "           allocated (see malloc(3)). */\n"
2869 msgstr ""
2870
2871 #. type: Plain text
2872 #: build/C/man3/malloc_info.3:236
2873 #, no-wrap
2874 msgid ""
2875 "        if (sleepTime E<gt> 0)\n"
2876 "            sleep(sleepTime);\n"
2877 "    }\n"
2878 msgstr ""
2879
2880 #. type: Plain text
2881 #: build/C/man3/malloc_info.3:238
2882 #, no-wrap
2883 msgid "    /* The main thread also allocates some memory */\n"
2884 msgstr ""
2885
2886 #. type: Plain text
2887 #: build/C/man3/malloc_info.3:242
2888 #, no-wrap
2889 msgid ""
2890 "    for (j = 0; j E<lt> numBlocks; j++)\n"
2891 "        if (malloc(blockSize) == NULL)\n"
2892 "            errExit(\"malloc\");\n"
2893 msgstr ""
2894 "    for (j = 0; j E<lt> numBlocks; j++)\n"
2895 "        if (malloc(blockSize) == NULL)\n"
2896 "            errExit(\"malloc\");\n"
2897
2898 #. type: Plain text
2899 #: build/C/man3/malloc_info.3:245
2900 #, no-wrap
2901 msgid ""
2902 "    sleep(2);           /* Give all threads a chance to\n"
2903 "                           complete allocations */\n"
2904 msgstr ""
2905
2906 #. type: Plain text
2907 #: build/C/man3/malloc_info.3:248
2908 #, no-wrap
2909 msgid ""
2910 "    printf(\"\\en============ After allocating blocks ============\\en\");\n"
2911 "    malloc_info(0, stdout);\n"
2912 msgstr ""
2913
2914 #. type: Plain text
2915 #: build/C/man3/malloc_info.3:258
2916 msgid ""
2917 "B<mallinfo>(3), B<malloc>(3), B<malloc_stats>(3), B<mallopt>(3), "
2918 "B<open_memstream>(3)"
2919 msgstr "B<mallinfo>(3), B<malloc>(3), B<malloc_stats>(3), B<mallopt>(3), B<open_memstream>(3)"
2920
2921 #. type: TH
2922 #: build/C/man3/malloc_stats.3:24
2923 #, no-wrap
2924 msgid "MALLOC_STATS"
2925 msgstr "MALLOC_STATS"
2926
2927 #. type: Plain text
2928 #: build/C/man3/malloc_stats.3:27
2929 msgid "malloc_stats - print memory allocation statistics"
2930 msgstr ""
2931
2932 #. type: Plain text
2933 #: build/C/man3/malloc_stats.3:31
2934 msgid "B<void malloc_stats(void);>"
2935 msgstr "B<void malloc_stats(void);>"
2936
2937 #.  .SH VERSIONS
2938 #.  Available already in glibc 2.0, possibly earlier
2939 #. type: Plain text
2940 #: build/C/man3/malloc_stats.3:53
2941 msgid ""
2942 "The B<malloc_stats>()  function prints (on standard error) statistics about "
2943 "memory allocated by B<malloc>(3)  and related functions.  For each arena "
2944 "(allocation area), this function prints the total amount of memory allocated "
2945 "and the total number of bytes consumed by in-use allocations.  (These two "
2946 "values correspond to the I<arena> and I<uordblks> fields retrieved by "
2947 "B<mallinfo>(3).)  In addition, the function prints the sum of these two "
2948 "statistics for all arenas, and the maximum number of blocks and bytes that "
2949 "were ever simultaneously allocated using B<mmap>(2)."
2950 msgstr ""
2951
2952 #. type: Plain text
2953 #: build/C/man3/malloc_stats.3:59
2954 msgid ""
2955 "More detailed information about memory allocations in the main arena can be "
2956 "obtained using B<mallinfo>(3)."
2957 msgstr ""
2958
2959 #. type: Plain text
2960 #: build/C/man3/malloc_stats.3:65
2961 msgid ""
2962 "B<mmap>(2), B<mallinfo>(3), B<malloc>(3), B<malloc_info>(3), B<mallopt>(3)"
2963 msgstr "B<mmap>(2), B<mallinfo>(3), B<malloc>(3), B<malloc_info>(3), B<mallopt>(3)"
2964
2965 #. type: TH
2966 #: build/C/man3/malloc_trim.3:24
2967 #, no-wrap
2968 msgid "MALLOC_TRIM"
2969 msgstr "MALLOC_TRIM"
2970
2971 #. type: TH
2972 #: build/C/man3/malloc_trim.3:24 build/C/man3/malloc_usable_size.3:23
2973 #, no-wrap
2974 msgid "2012-03-29"
2975 msgstr "2012-03-29"
2976
2977 #. type: Plain text
2978 #: build/C/man3/malloc_trim.3:27
2979 msgid "malloc_trim - release free memory from the top of the heap"
2980 msgstr ""
2981
2982 #. type: Plain text
2983 #: build/C/man3/malloc_trim.3:31
2984 msgid "B<void malloc_trim(size_t >I<pad>B<);>"
2985 msgstr "B<void malloc_trim(size_t >I<pad>B<);>"
2986
2987 #. type: Plain text
2988 #: build/C/man3/malloc_trim.3:38
2989 msgid ""
2990 "The B<malloc_trim>()  function attempts to release free memory at the top of "
2991 "the heap (by calling B<sbrk>(2)  with a suitable argument)."
2992 msgstr ""
2993
2994 #. type: Plain text
2995 #: build/C/man3/malloc_trim.3:49
2996 msgid ""
2997 "The I<pad> argument specifies the amount of free space to leave untrimmed at "
2998 "the top of the heap.  If this argument is 0, only the minimum amount of "
2999 "memory is maintained at the top of the heap (i.e., one page or less).  A "
3000 "nonzero argument can be used to maintain some trailing space at the top of "
3001 "the heap in order to allow future allocations to be made without having to "
3002 "extend the heap with B<sbrk>(2)."
3003 msgstr ""
3004
3005 #. type: Plain text
3006 #: build/C/man3/malloc_trim.3:54
3007 msgid ""
3008 "The B<malloc_trim>()  function returns 1 if memory was actually released "
3009 "back to the system, or 0 if it was not possible to release any memory."
3010 msgstr ""
3011
3012 #.  .SH VERSIONS
3013 #.  Available already in glibc 2.0, possibly earlier
3014 #. type: Plain text
3015 #: build/C/man3/malloc_trim.3:58
3016 msgid "No errors are defined."
3017 msgstr ""
3018
3019 #. type: Plain text
3020 #: build/C/man3/malloc_trim.3:69
3021 msgid ""
3022 "This function is automatically called by B<free>(3)  in certain "
3023 "circumstances; see the discussion of B<M_TOP_PAD> and B<M_TRIM_THRESHOLD> in "
3024 "B<mallopt>(3)."
3025 msgstr ""
3026
3027 #. type: Plain text
3028 #: build/C/man3/malloc_trim.3:72
3029 msgid ""
3030 "This function cannot release free memory located at places other than the "
3031 "top of the heap."
3032 msgstr ""
3033
3034 #.  malloc/malloc.c::mTRIm():
3035 #.      return result | (av == &main_arena ? sYSTRIm (pad, av) : 0);
3036 #. type: Plain text
3037 #: build/C/man3/malloc_trim.3:76
3038 msgid "This function only releases memory in the main arena."
3039 msgstr ""
3040
3041 #. type: Plain text
3042 #: build/C/man3/malloc_trim.3:80
3043 msgid "B<sbrk>(2), B<malloc>(3), B<mallopt>(3)"
3044 msgstr "B<sbrk>(2), B<malloc>(3), B<mallopt>(3)"
3045
3046 #. type: TH
3047 #: build/C/man3/malloc_usable_size.3:23
3048 #, no-wrap
3049 msgid "MALLOC_USABLE_SIZE"
3050 msgstr "MALLOC_USABLE_SIZE"
3051
3052 #. type: Plain text
3053 #: build/C/man3/malloc_usable_size.3:26
3054 msgid "malloc_usable_size - obtain size of block of memory allocated from heap"
3055 msgstr ""
3056
3057 #. type: Plain text
3058 #: build/C/man3/malloc_usable_size.3:30
3059 msgid "B<size_t malloc_usable_size (void *>I<ptr>B<);>"
3060 msgstr "B<size_t malloc_usable_size (void *>I<ptr>B<);>"
3061
3062 #. type: Plain text
3063 #: build/C/man3/malloc_usable_size.3:38
3064 msgid ""
3065 "The B<malloc_usable_size>()  function returns the number of usable bytes in "
3066 "the block pointed to by I<ptr>, a pointer to a block of memory allocated by "
3067 "B<malloc>(3)  or a related function."
3068 msgstr ""
3069
3070 #. type: Plain text
3071 #: build/C/man3/malloc_usable_size.3:46
3072 msgid ""
3073 "B<malloc_usable_size>()  returns the number of usable bytes in the block of "
3074 "allocated memory pointed to by I<ptr>.  If I<ptr> is NULL, 0 is returned."
3075 msgstr ""
3076
3077 #. type: Plain text
3078 #: build/C/man3/malloc_usable_size.3:58
3079 msgid ""
3080 "The value returned by B<malloc_usable_size>()  may be greater than the "
3081 "requested size of the allocation because of alignment and minimum size "
3082 "constraints.  Although the excess bytes can be overwritten by the "
3083 "application without ill effects, this is not good programming practice: the "
3084 "number of excess bytes in an allocation depends on the underlying "
3085 "implementation."
3086 msgstr ""
3087
3088 #. type: Plain text
3089 #: build/C/man3/malloc_usable_size.3:60
3090 msgid "The main use of this function is for debugging and introspection."
3091 msgstr ""
3092
3093 #. type: Plain text
3094 #: build/C/man3/malloc_usable_size.3:62
3095 msgid "B<malloc>(3)"
3096 msgstr "B<malloc>(3)"
3097
3098 #. type: TH
3099 #: build/C/man3/mallopt.3:24
3100 #, no-wrap
3101 msgid "MALLOPT"
3102 msgstr "MALLOPT"
3103
3104 #. type: TH
3105 #: build/C/man3/mallopt.3:24
3106 #, no-wrap
3107 msgid "2012-04-30"
3108 msgstr "2012-04-30"
3109
3110 #. type: Plain text
3111 #: build/C/man3/mallopt.3:27
3112 msgid "mallopt - set memory allocation parameters"
3113 msgstr ""
3114
3115 #. type: Plain text
3116 #: build/C/man3/mallopt.3:31
3117 msgid "B<int mallopt(int >I<param>B<, int >I<value>B<);>"
3118 msgstr "B<int mallopt(int >I<param>B<, int >I<value>B<);>"
3119
3120 #. type: Plain text
3121 #: build/C/man3/mallopt.3:42
3122 msgid ""
3123 "The B<mallopt>()  function adjusts parameters that control the behavior of "
3124 "the memory-allocation functions (see B<malloc>(3)).  The I<param> argument "
3125 "specifies the parameter to be modified, and I<value> specifies the new value "
3126 "for that parameter."
3127 msgstr ""
3128
3129 #. type: Plain text
3130 #: build/C/man3/mallopt.3:45
3131 msgid "The following values can be specified for I<param>:"
3132 msgstr "I<param> には以下の値を指定することができる。"
3133
3134 #. type: TP
3135 #: build/C/man3/mallopt.3:45
3136 #, no-wrap
3137 msgid "B<M_CHECK_ACTION>"
3138 msgstr "B<M_CHECK_ACTION>"
3139
3140 #. type: Plain text
3141 #: build/C/man3/mallopt.3:51
3142 msgid ""
3143 "Setting this parameter controls how glibc responds when various kinds of "
3144 "programming errors are detected (e.g., freeing the same pointer twice).  The "
3145 "3 least significant bits (2, 1, and 0) of the value assigned to this "
3146 "parameter determine the glibc behavior, as follows:"
3147 msgstr ""
3148
3149 #. type: TP
3150 #: build/C/man3/mallopt.3:52
3151 #, no-wrap
3152 msgid "Bit 0"
3153 msgstr "Bit 0"
3154
3155 #. type: Plain text
3156 #: build/C/man3/mallopt.3:62
3157 msgid ""
3158 "If this bit is set, then print a one-line message on I<stderr> that provides "
3159 "details about the error.  The message starts with the string \"***\\ glibc "
3160 "detected\\ ***\", followed by the program name, the name of the memory-"
3161 "allocation function in which the error was detected, a brief description of "
3162 "the error, and the memory address where the error was detected."
3163 msgstr ""
3164
3165 #. type: TP
3166 #: build/C/man3/mallopt.3:62
3167 #, no-wrap
3168 msgid "Bit 1"
3169 msgstr "Bit 1"
3170
3171 #. type: Plain text
3172 #: build/C/man3/mallopt.3:77
3173 msgid ""
3174 "If this bit is set, then, after printing any error message specified by bit "
3175 "0, the program is terminated by calling B<abort>(3).  In glibc versions "
3176 "since 2.4, if bit 0 is also set, then, between printing the error message "
3177 "and aborting, the program also prints a stack trace in the manner of "
3178 "B<backtrace>(3), and prints the process's memory mapping in the style of I</"
3179 "proc/[pid]/maps> (see B<proc>(5))."
3180 msgstr ""
3181
3182 #. type: TP
3183 #: build/C/man3/mallopt.3:77
3184 #, no-wrap
3185 msgid "Bit 2 (since glibc 2.4)"
3186 msgstr "Bit 2 (glibc 2.4 以降)"
3187
3188 #. type: Plain text
3189 #: build/C/man3/mallopt.3:84
3190 msgid ""
3191 "This bit has an effect only if bit 0 is also set.  If this bit is set, then "
3192 "the one-line message describing the error is simplified to contain just the "
3193 "name of the function where the error was detected and the brief description "
3194 "of the error."
3195 msgstr ""
3196
3197 #. type: Plain text
3198 #: build/C/man3/mallopt.3:89
3199 msgid "The remaining bits in I<value> are ignored."
3200 msgstr ""
3201
3202 #. type: Plain text
3203 #: build/C/man3/mallopt.3:93
3204 msgid ""
3205 "Combining the above details, the following numeric values are meaningful for "
3206 "B<M_CHECK_ACTION>:"
3207 msgstr ""
3208
3209 #. type: IP
3210 #: build/C/man3/mallopt.3:94
3211 #, no-wrap
3212 msgid "0"
3213 msgstr ""
3214
3215 #. type: Plain text
3216 #: build/C/man3/mallopt.3:96
3217 msgid "Ignore error conditions; continue execution (with undefined results)."
3218 msgstr ""
3219
3220 #. type: IP
3221 #: build/C/man3/mallopt.3:96
3222 #, no-wrap
3223 msgid "1"
3224 msgstr "1"
3225
3226 #. type: Plain text
3227 #: build/C/man3/mallopt.3:98
3228 msgid "Print a detailed error message and continue execution."
3229 msgstr ""
3230
3231 #. type: IP
3232 #: build/C/man3/mallopt.3:98
3233 #, no-wrap
3234 msgid "2"
3235 msgstr "2"
3236
3237 #. type: Plain text
3238 #: build/C/man3/mallopt.3:100
3239 msgid "Abort the program."
3240 msgstr ""
3241
3242 #. type: IP
3243 #: build/C/man3/mallopt.3:100
3244 #, no-wrap
3245 msgid "3"
3246 msgstr ""
3247
3248 #. type: Plain text
3249 #: build/C/man3/mallopt.3:103
3250 msgid ""
3251 "Print detailed error message, stack trace, and memory mappings, and abort "
3252 "the program."
3253 msgstr ""
3254
3255 #. type: IP
3256 #: build/C/man3/mallopt.3:103
3257 #, no-wrap
3258 msgid "5"
3259 msgstr ""
3260
3261 #. type: Plain text
3262 #: build/C/man3/mallopt.3:105
3263 msgid "Print a simple error message and continue execution."
3264 msgstr ""
3265
3266 #. type: IP
3267 #: build/C/man3/mallopt.3:105
3268 #, no-wrap
3269 msgid "7"
3270 msgstr ""
3271
3272 #. type: Plain text
3273 #: build/C/man3/mallopt.3:108
3274 msgid ""
3275 "Print simple error message, stack trace, and memory mappings, and abort the "
3276 "program."
3277 msgstr ""
3278
3279 #. type: Plain text
3280 #: build/C/man3/mallopt.3:114
3281 msgid ""
3282 "Since glibc 2.3.4, the default value for the B<M_CHECK_ACTION> parameter is "
3283 "3.  In glibc version 2.3.3 and earlier, the default value is 1."
3284 msgstr ""
3285
3286 #. type: Plain text
3287 #: build/C/man3/mallopt.3:119
3288 msgid ""
3289 "Using a nonzero B<M_CHECK_ACTION> value can be useful because otherwise a "
3290 "crash may happen much later, and the true cause of the problem is then very "
3291 "hard to track down."
3292 msgstr ""
3293
3294 #. type: TP
3295 #: build/C/man3/mallopt.3:119
3296 #, no-wrap
3297 msgid "B<M_MMAP_MAX>"
3298 msgstr "B<M_MMAP_MAX>"
3299
3300 #.  The following text adapted from comments in the glibc source:
3301 #. type: Plain text
3302 #: build/C/man3/mallopt.3:129
3303 msgid ""
3304 "This parameter specifies the maximum number of allocation requests that may "
3305 "be simultaneously serviced using B<mmap>(2).  This parameter exists because "
3306 "some systems have a limited number of internal tables for use by B<mmap>(2), "
3307 "and using more than a few of them may degrade performance."
3308 msgstr ""
3309
3310 #. type: Plain text
3311 #: build/C/man3/mallopt.3:136
3312 msgid ""
3313 "The default value is 65,536, a value which has no special significance and "
3314 "which servers only as a safeguard.  Setting this parameter to 0 disables the "
3315 "use of B<mmap>(2)  for servicing large allocation requests."
3316 msgstr ""
3317
3318 #. type: TP
3319 #: build/C/man3/mallopt.3:136
3320 #, no-wrap
3321 msgid "B<M_MMAP_THRESHOLD>"
3322 msgstr "B<M_MMAP_THRESHOLD>"
3323
3324 #. type: Plain text
3325 #: build/C/man3/mallopt.3:145
3326 msgid ""
3327 "For allocations greater than or equal to the limit specified (in bytes) by "
3328 "B<M_MMAP_THRESHOLD> that can't be satisfied from the free list, the memory-"
3329 "allocation functions employ B<mmap>(2)  instead of increasing the program "
3330 "break using B<sbrk>(2)."
3331 msgstr ""
3332
3333 #. type: Plain text
3334 #: build/C/man3/mallopt.3:165
3335 msgid ""
3336 "Allocating memory using B<mmap>(2)  has the significant advantage that the "
3337 "allocated memory blocks can always be independently released back to the "
3338 "system.  (By contrast, the heap can be trimmed only if memory is freed at "
3339 "the top end.)  On the other hand, there are some disadvantages to the use of "
3340 "B<mmap>(2): deallocated space is not placed on the free list for reuse by "
3341 "later allocations; memory may be wasted because B<mmap>(2)  allocations must "
3342 "be page-aligned; and the kernel must perform the expensive task of zeroing "
3343 "out memory allocated via B<mmap>(2).  Balancing these factors leads to a "
3344 "default setting of 128*1024 for the B<M_MMAP_THRESHOLD> parameter."
3345 msgstr ""
3346
3347 #. type: Plain text
3348 #: build/C/man3/mallopt.3:172
3349 msgid ""
3350 "The lower limit for this parameter is 0.  The upper limit is "
3351 "B<DEFAULT_MMAP_THRESHOLD_MAX>: 512*1024 on 32-bit systems or "
3352 "I<4*1024*1024*sizeof(long)> on 64-bit systems."
3353 msgstr ""
3354
3355 #. type: Plain text
3356 #: build/C/man3/mallopt.3:190
3357 msgid ""
3358 "I<Note:> Nowadays, glibc uses a dynamic mmap threshold by default.  The "
3359 "initial value of the threshold is 128*1024, but when blocks larger than the "
3360 "current threshold and less than or equal to B<DEFAULT_MMAP_THRESHOLD_MAX> "
3361 "are freed, the threshold is adjusted upwards to the size of the freed "
3362 "block.  When dynamic mmap thresholding is in effect, the threshold for "
3363 "trimming the heap is also dynamically adjusted to be twice the dynamic mmap "
3364 "threshold.  Dynamic adjustment of the mmap threshold is disabled if any of "
3365 "the B<M_TRIM_THRESHOLD>, B<M_TOP_PAD>, B<M_MMAP_THRESHOLD>, or B<M_MMAP_MAX> "
3366 "parameters is set."
3367 msgstr ""
3368
3369 #. type: TP
3370 #: build/C/man3/mallopt.3:190
3371 #, no-wrap
3372 msgid "B<M_MXFAST> (since glibc 2.3)"
3373 msgstr "B<M_MXFAST> (glibc 2.3 以降)"
3374
3375 #.  The following text adapted from comments in the glibc sources:
3376 #. type: Plain text
3377 #: build/C/man3/mallopt.3:210
3378 msgid ""
3379 "Set the upper limit for memory allocation requests that are satisfied using "
3380 "\"fastbins\".  (The measurement unit for this parameter is bytes.)  Fastbins "
3381 "are storage areas that hold deallocated blocks of memory of the same size "
3382 "without merging adjacent free blocks.  Subsequent reallocation of blocks of "
3383 "the same size can be handled very quickly by allocating from the fastbin, "
3384 "although memory fragmentation and the overall memory footprint of the "
3385 "program can increase.  The default value for this parameter is I<64*sizeof"
3386 "(size_t)/4> (i.e., 64 on 32-bit architectures).  The range for this "
3387 "parameter is 0 to I<80*sizeof(size_t)/4>.  Setting B<M_MXFAST> to 0 disables "
3388 "the use of fastbins."
3389 msgstr ""
3390
3391 #. type: TP
3392 #: build/C/man3/mallopt.3:210
3393 #, no-wrap
3394 msgid "B<M_PERTURB> (since glibc 2.4)"
3395 msgstr "B<M_PERTURB> (glibc 2.4 以降)"
3396
3397 #. type: Plain text
3398 #: build/C/man3/mallopt.3:225
3399 msgid ""
3400 "If this parameter is set to a nonzero value, then bytes of allocated memory "
3401 "(other than allocations via B<calloc>(3))  are initialized to the complement "
3402 "of the value in the least significant byte of I<value>, and when allocated "
3403 "memory is released using B<free>(3), the freed bytes are set to the least "
3404 "significant byte of I<value>.  This can be useful for detecting errors where "
3405 "programs incorrectly rely on allocated memory being initialized to zero, or "
3406 "reuse values in memory that has already been freed."
3407 msgstr ""
3408
3409 #. type: TP
3410 #: build/C/man3/mallopt.3:225
3411 #, no-wrap
3412 msgid "B<M_TOP_PAD>"
3413 msgstr ""
3414
3415 #. type: Plain text
3416 #: build/C/man3/mallopt.3:232
3417 msgid ""
3418 "This parameter defines the amount of padding to employ when calling B<sbrk>"
3419 "(2)  to modify the program break.  (The measurement unit for this parameter "
3420 "is bytes.)  This parameter has an effect in the following circumstances:"
3421 msgstr ""
3422
3423 #. type: Plain text
3424 #: build/C/man3/mallopt.3:239
3425 msgid ""
3426 "When the program break is increased, then B<M_TOP_PAD> bytes are added to "
3427 "the B<sbrk>(2)  request."
3428 msgstr ""
3429
3430 #. type: Plain text
3431 #: build/C/man3/mallopt.3:245
3432 msgid ""
3433 "When the heap is trimmed as a consequence of calling B<free>(3)  (see the "
3434 "discussion of B<M_TRIM_THRESHOLD>)  this much free space is preserved at the "
3435 "top of the heap."
3436 msgstr ""
3437
3438 #. type: Plain text
3439 #: build/C/man3/mallopt.3:249
3440 msgid ""
3441 "In either case, the amount of padding is always rounded to a system page "
3442 "boundary."
3443 msgstr ""
3444
3445 #. type: Plain text
3446 #: build/C/man3/mallopt.3:256
3447 msgid ""
3448 "Modifying B<M_TOP_PAD> is a trade-off between increasing the number of "
3449 "system calls (when the parameter is set low)  and wasting unused memory at "
3450 "the top of the heap (when the parameter is set high)."
3451 msgstr ""
3452
3453 #.  DEFAULT_TOP_PAD in glibc source
3454 #. type: Plain text
3455 #: build/C/man3/mallopt.3:259
3456 msgid "The default value for this parameter is 128*1024."
3457 msgstr ""
3458
3459 #. type: TP
3460 #: build/C/man3/mallopt.3:259
3461 #, no-wrap
3462 msgid "B<M_TRIM_THRESHOLD>"
3463 msgstr ""
3464
3465 #. type: Plain text
3466 #: build/C/man3/mallopt.3:275
3467 msgid ""
3468 "When the amount of contiguous free memory at the top of the heap grows "
3469 "sufficiently large, B<free>(3)  employs B<sbrk>(2)  to release this memory "
3470 "back to the system.  (This can be useful in programs that continue to "
3471 "execute for a long period after freeing a significant amount of memory.)  "
3472 "The B<M_TRIM_THRESHOLD> parameter specifies the minimum size (in bytes) that "
3473 "this block of memory must reach before B<sbrk>(2)  is used to trim the heap."
3474 msgstr ""
3475
3476 #. type: Plain text
3477 #: build/C/man3/mallopt.3:280
3478 msgid ""
3479 "The default value for this parameter is 128*1024.  Setting "
3480 "B<M_TRIM_THRESHOLD> to -1 disables trimming completely."
3481 msgstr ""
3482
3483 #
3484 #
3485 #
3486 #.  FIXME Do the arena parameters need to be documented?
3487 #.  .TP
3488 #.  .BR M_ARENA_TEST " (since glibc 2.10)"
3489 #.  .TP
3490 #.  .BR M_ARENA_MAX " (since glibc 2.10)"
3491 #.  Environment variables
3492 #.      MALLOC_ARENA_MAX_
3493 #.      MALLOC_ARENA_TEST_
3494 #.  http://udrepper.livejournal.com/20948.html describes some details
3495 #.      of the MALLOC_ARENA_* environment variables.
3496 #.  These macros aren't enabled in production releases until 2.15?
3497 #.  (see glibc malloc/Makefile)
3498 #. type: Plain text
3499 #: build/C/man3/mallopt.3:303
3500 msgid ""
3501 "Modifying B<M_TRIM_THRESHOLD> is a trade-off between increasing the number "
3502 "of system calls (when the parameter is set low)  and wasting unused memory "
3503 "at the top of the heap (when the parameter is set high)."
3504 msgstr ""
3505
3506 #. type: SS
3507 #: build/C/man3/mallopt.3:303
3508 #, no-wrap
3509 msgid "Environment Variables"
3510 msgstr ""
3511
3512 #. type: Plain text
3513 #: build/C/man3/mallopt.3:318
3514 msgid ""
3515 "A number of environment variables can be defined to modify some of the same "
3516 "parameters as are controlled by B<mallopt>().  Using these variables has the "
3517 "advantage that the source code of the program need not be changed.  To be "
3518 "effective, these variables must be defined before the first call to a memory-"
3519 "allocation function.  (If the same parameters are adjusted via B<mallopt>()  "
3520 "then the B<mallopt>()  settings take precedence.)  For security reasons, "
3521 "these variables are ignored in set-user-ID and set-group-ID programs."
3522 msgstr ""
3523
3524 #. type: Plain text
3525 #: build/C/man3/mallopt.3:321
3526 msgid ""
3527 "The environment variables are as follows (note the trailing underscore at "
3528 "the end of the name of each variable):"
3529 msgstr ""
3530
3531 #. type: TP
3532 #: build/C/man3/mallopt.3:321
3533 #, no-wrap
3534 msgid "B<MALLOC_CHECK_>"
3535 msgstr "B<MALLOC_CHECK_>"
3536
3537 #.  On glibc 2.12/x86, a simple malloc()+free() loop is about 70% slower
3538 #.  when MALLOC_CHECK_ was set.
3539 #. type: Plain text
3540 #: build/C/man3/mallopt.3:338
3541 msgid ""
3542 "This environment variable controls the same parameter as B<mallopt>()  "
3543 "B<M_CHECK_ACTION>.  If this variable is set to a nonzero value, then a "
3544 "special implementation of the memory-allocation functions is used.  (This is "
3545 "accomplished using the B<malloc_hook>(3)  feature.)  This implementation "
3546 "performs additional error checking, but is slower than the standard set of "
3547 "memory-allocation functions.  (This implementation does not detect all "
3548 "possible errors; memory leaks can still occur.)"
3549 msgstr ""
3550
3551 #. type: Plain text
3552 #: build/C/man3/mallopt.3:343
3553 msgid ""
3554 "The value assigned to this environment variable should be a single digit, "
3555 "whose meaning is as described for B<M_CHECK_ACTION>.  Any characters beyond "
3556 "the initial digit are ignored."
3557 msgstr ""
3558
3559 #. type: Plain text
3560 #: build/C/man3/mallopt.3:352
3561 msgid ""
3562 "For security reasons, the effect of B<MALLOC_CHECK_> is disabled by default "
3563 "for set-user-ID and set-group-ID programs.  However, if the file I</etc/suid-"
3564 "debug> exists (the content of the file is irrelevant), then B<MALLOC_CHECK_> "
3565 "also has an effect for set-user-ID and set-group-ID programs."
3566 msgstr ""
3567
3568 #. type: TP
3569 #: build/C/man3/mallopt.3:352
3570 #, no-wrap
3571 msgid "B<MALLOC_MMAP_MAX_>"
3572 msgstr ""
3573
3574 #. type: Plain text
3575 #: build/C/man3/mallopt.3:357
3576 msgid "Controls the same parameter as B<mallopt>()  B<M_MMAP_MAX>."
3577 msgstr ""
3578
3579 #. type: TP
3580 #: build/C/man3/mallopt.3:357
3581 #, no-wrap
3582 msgid "B<MALLOC_MMAP_THRESHOLD_>"
3583 msgstr ""
3584
3585 #. type: Plain text
3586 #: build/C/man3/mallopt.3:362
3587 msgid "Controls the same parameter as B<mallopt>()  B<M_MMAP_THRESHOLD>."
3588 msgstr ""
3589
3590 #. type: TP
3591 #: build/C/man3/mallopt.3:362
3592 #, no-wrap
3593 msgid "B<MALLOC_PERTURB_>"
3594 msgstr ""
3595
3596 #. type: Plain text
3597 #: build/C/man3/mallopt.3:367
3598 msgid "Controls the same parameter as B<mallopt>()  B<M_PERTURB>."
3599 msgstr ""
3600
3601 #. type: TP
3602 #: build/C/man3/mallopt.3:367
3603 #, no-wrap
3604 msgid "B<MALLOC_TRIM_THRESHOLD_>"
3605 msgstr ""
3606
3607 #. type: Plain text
3608 #: build/C/man3/mallopt.3:372
3609 msgid "Controls the same parameter as B<mallopt>()  B<M_TRIM_THRESHOLD>."
3610 msgstr ""
3611
3612 #. type: TP
3613 #: build/C/man3/mallopt.3:372
3614 #, no-wrap
3615 msgid "B<MALLOC_TOP_PAD_>"
3616 msgstr "B<MALLOC_TOP_PAD_>"
3617
3618 #. type: Plain text
3619 #: build/C/man3/mallopt.3:377
3620 msgid "Controls the same parameter as B<mallopt>()  B<M_TOP_PAD>."
3621 msgstr ""
3622
3623 #. type: Plain text
3624 #: build/C/man3/mallopt.3:382
3625 msgid "On success, B<mallopt>()  returns 1.  On error, it returns 0."
3626 msgstr "B<mallopt>()  は成功すると 1 を返す。エラーの場合は 0 を返す。"
3627
3628 #.  .SH VERSIONS
3629 #.  Available already in glibc 2.0, possibly earlier
3630 #. type: Plain text
3631 #: build/C/man3/mallopt.3:390
3632 msgid "On error, I<errno> is I<not> set."
3633 msgstr "エラーの場合、I<errno> は設定I<されない>。"
3634
3635 #.  .SH NOTES
3636 #. type: Plain text
3637 #: build/C/man3/mallopt.3:404
3638 msgid ""
3639 "This function is not specified by POSIX or the C standards.  A similar "
3640 "function exists on many System V derivatives, but the range of values for "
3641 "I<param> varies across systems.  The SVID defined options B<M_MXFAST>, "
3642 "B<M_NLBLKS>, B<M_GRAIN>, and B<M_KEEP>, but only the first of these is "
3643 "implemented in glibc."
3644 msgstr ""
3645
3646 #. type: Plain text
3647 #: build/C/man3/mallopt.3:408
3648 msgid "Specifying an invalid value for I<param> does not generate an error."
3649 msgstr ""
3650
3651 #.  FIXME This looks buggy:
3652 #.  setting the M_MXFAST limit rounds up:    (s + SIZE_SZ) & ~MALLOC_ALIGN_MASK)
3653 #.  malloc requests are rounded up:
3654 #.     (req) + SIZE_SZ + MALLOC_ALIGN_MASK) & ~MALLOC_ALIGN_MASK
3655 #.  http://sources.redhat.com/bugzilla/show_bug.cgi?id=12129
3656 #. type: Plain text
3657 #: build/C/man3/mallopt.3:416
3658 msgid ""
3659 "A calculation error within the glibc implementation means that a call of the "
3660 "form:"
3661 msgstr ""
3662
3663 #. type: Plain text
3664 #: build/C/man3/mallopt.3:419
3665 #, no-wrap
3666 msgid "    mallopt(M_MXFAST, n)\n"
3667 msgstr ""
3668
3669 #.  Bins are multiples of 2 * sizeof(size_t) + sizeof(size_t)
3670 #. type: Plain text
3671 #: build/C/man3/mallopt.3:431
3672 msgid ""
3673 "does not result in fastbins being employed for all allocations of size up to "
3674 "I<n>.  To ensure desired results, I<n> should be rounded up to the next "
3675 "multiple greater than or equal to I<(2k+1)*sizeof(size_t)>, where I<k> is an "
3676 "integer."
3677 msgstr ""
3678
3679 #.  FIXME MALLOC_MMAP_THRESHOLD_ and MALLOC_MMAP_MAX_
3680 #.  do have an effect for set-user-ID programs (but not
3681 #.  set-group-ID programs).
3682 #.  http://sources.redhat.com/bugzilla/show_bug.cgi?id=12155
3683 #. type: Plain text
3684 #: build/C/man3/mallopt.3:443
3685 msgid ""
3686 "The B<MALLOC_MMAP_THRESHOLD_> and B<MALLOC_MMAP_MAX_> variables are I<not> "
3687 "ignored in set-group-ID programs."
3688 msgstr ""
3689
3690 #.  FIXME http://sources.redhat.com/bugzilla/show_bug.cgi?id=12140
3691 #. type: Plain text
3692 #: build/C/man3/mallopt.3:464
3693 msgid ""
3694 "If B<mallopt>()  is used to set B<M_PERTURB>, then, as expected, the bytes "
3695 "of allocated memory are initialized to the complement of the byte in "
3696 "I<value>, and when that memory is freed, the bytes of the region are "
3697 "initialized to the byte specified in I<value>.  However, there is an off-by-"
3698 "I<sizeof(size_t)> error in the implementation: instead of initializing "
3699 "precisely the block of memory being freed by the call I<free(p)>, the block "
3700 "starting at I<p+sizeof(size_t)> is initialized."
3701 msgstr ""
3702
3703 #. type: Plain text
3704 #: build/C/man3/mallopt.3:473
3705 msgid ""
3706 "The program below demonstrates the use of B<M_CHECK_ACTION>.  If the program "
3707 "is supplied with an (integer) command-line argument, then that argument is "
3708 "used to set the B<M_CHECK_ACTION> parameter.  The program then allocates a "
3709 "block of memory, and frees it twice (an error)."
3710 msgstr ""
3711
3712 #. type: Plain text
3713 #: build/C/man3/mallopt.3:477
3714 msgid ""
3715 "The following shell session shows what happens when we run this program "
3716 "under glibc, with the default value for B<M_CHECK_ACTION>:"
3717 msgstr ""
3718
3719 #. type: Plain text
3720 #: build/C/man3/mallopt.3:497
3721 #, no-wrap
3722 msgid ""
3723 "$ B<./a.out>\n"
3724 "main(): returned from first free() call\n"
3725 "*** glibc detected *** ./a.out: double free or corruption (top): 0x09d30008 ***\n"
3726 "======= Backtrace: =========\n"
3727 "/lib/libc.so.6(+0x6c501)[0x523501]\n"
3728 "/lib/libc.so.6(+0x6dd70)[0x524d70]\n"
3729 "/lib/libc.so.6(cfree+0x6d)[0x527e5d]\n"
3730 "\\&./a.out[0x80485db]\n"
3731 "/lib/libc.so.6(__libc_start_main+0xe7)[0x4cdce7]\n"
3732 "\\&./a.out[0x8048471]\n"
3733 "======= Memory map: ========\n"
3734 "001e4000-001fe000 r-xp 00000000 08:06 1083555    /lib/libgcc_s.so.1\n"
3735 "001fe000-001ff000 r--p 00019000 08:06 1083555    /lib/libgcc_s.so.1\n"
3736 "[some lines omitted]\n"
3737 "b7814000-b7817000 rw-p 00000000 00:00 0\n"
3738 "bff53000-bff74000 rw-p 00000000 00:00 0          [stack]\n"
3739 "Aborted (core dumped)\n"
3740 msgstr ""
3741
3742 #. type: Plain text
3743 #: build/C/man3/mallopt.3:502
3744 msgid ""
3745 "The following runs show the results when employing other values for "
3746 "B<M_CHECK_ACTION>:"
3747 msgstr ""
3748
3749 #. type: Plain text
3750 #: build/C/man3/mallopt.3:515
3751 #, no-wrap
3752 msgid ""
3753 "$ B<./a.out 1>             # Diagnose error and continue\n"
3754 "main(): returned from first free() call\n"
3755 "*** glibc detected *** ./a.out: double free or corruption (top): 0x09cbe008 ***\n"
3756 "main(): returned from second free() call\n"
3757 "$ B<./a.out 2>             # Abort without error message\n"
3758 "main(): returned from first free() call\n"
3759 "Aborted (core dumped)\n"
3760 "$ B<./a.out 0>             # Ignore error and continue\n"
3761 "main(): returned from first free() call\n"
3762 "main(): returned from second free() call\n"
3763 msgstr ""
3764
3765 #. type: Plain text
3766 #: build/C/man3/mallopt.3:521
3767 msgid ""
3768 "The next run shows how to set the same parameter using the B<MALLOC_CHECK_> "
3769 "environment variable:"
3770 msgstr ""
3771
3772 #. type: Plain text
3773 #: build/C/man3/mallopt.3:528
3774 #, no-wrap
3775 msgid ""
3776 "$ B<MALLOC_CHECK_=1 ./a.out>\n"
3777 "main(): returned from first free() call\n"
3778 "*** glibc detected *** ./a.out: free(): invalid pointer: 0x092c2008 ***\n"
3779 "main(): returned from second free() call\n"
3780 msgstr ""
3781
3782 #. type: Plain text
3783 #: build/C/man3/mallopt.3:536
3784 #, no-wrap
3785 msgid ""
3786 "#include E<lt>malloc.hE<gt>\n"
3787 "#include E<lt>stdio.hE<gt>\n"
3788 "#include E<lt>stdlib.hE<gt>\n"
3789 msgstr ""
3790 "#include E<lt>malloc.hE<gt>\n"
3791 "#include E<lt>stdio.hE<gt>\n"
3792 "#include E<lt>stdlib.hE<gt>\n"
3793
3794 #. type: Plain text
3795 #: build/C/man3/mallopt.3:541 build/C/man3/mcheck.3:187
3796 #, no-wrap
3797 msgid ""
3798 "int\n"
3799 "main(int argc, char *argv[])\n"
3800 "{\n"
3801 "    char *p;\n"
3802 msgstr ""
3803 "int\n"
3804 "main(int argc, char *argv[])\n"
3805 "{\n"
3806 "    char *p;\n"
3807
3808 #. type: Plain text
3809 #: build/C/man3/mallopt.3:548
3810 #, no-wrap
3811 msgid ""
3812 "    if (argc E<gt> 1) {\n"
3813 "        if (mallopt(M_CHECK_ACTION, atoi(argv[1])) != 1) {\n"
3814 "            fprintf(stderr, \"mallopt() failed\");\n"
3815 "            exit(EXIT_FAILURE);\n"
3816 "        }\n"
3817 "    }\n"
3818 msgstr ""
3819 "    if (argc E<gt> 1) {\n"
3820 "        if (mallopt(M_CHECK_ACTION, atoi(argv[1])) != 1) {\n"
3821 "            fprintf(stderr, \"mallopt() failed\");\n"
3822 "            exit(EXIT_FAILURE);\n"
3823 "        }\n"
3824 "    }\n"
3825
3826 #. type: Plain text
3827 #: build/C/man3/mallopt.3:554
3828 #, no-wrap
3829 msgid ""
3830 "    p = malloc(1000);\n"
3831 "    if (p == NULL) {\n"
3832 "        fprintf(stderr, \"malloc() failed\");\n"
3833 "        exit(EXIT_FAILURE);\n"
3834 "    }\n"
3835 msgstr ""
3836 "    p = malloc(1000);\n"
3837 "    if (p == NULL) {\n"
3838 "        fprintf(stderr, \"malloc() failed\");\n"
3839 "        exit(EXIT_FAILURE);\n"
3840 "    }\n"
3841
3842 #. type: Plain text
3843 #: build/C/man3/mallopt.3:557
3844 #, no-wrap
3845 msgid ""
3846 "    free(p);\n"
3847 "    printf(\"main(): returned from first free() call\\en\");\n"
3848 msgstr ""
3849 "    free(p);\n"
3850 "    printf(\"main(): returned from first free() call\\en\");\n"
3851
3852 #. type: Plain text
3853 #: build/C/man3/mallopt.3:560
3854 #, no-wrap
3855 msgid ""
3856 "    free(p);\n"
3857 "    printf(\"main(): returned from second free() call\\en\");\n"
3858 msgstr ""
3859 "    free(p);\n"
3860 "    printf(\"main(): returned from second free() call\\en\");\n"
3861
3862 #. type: Plain text
3863 #: build/C/man3/mallopt.3:578
3864 msgid ""
3865 "B<mmap>(2)  B<sbrk>(2), B<mallinfo>(3), B<malloc>(3), B<malloc_hook>(3), "
3866 "B<malloc_info>(3), B<malloc_stats>(3), B<malloc_trim>(3), B<mcheck>(3), "
3867 "B<mtrace>(3), B<posix_memalign>(3)"
3868 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)"
3869
3870 #. type: TH
3871 #: build/C/man3/mcheck.3:23
3872 #, no-wrap
3873 msgid "MCHECK"
3874 msgstr ""
3875
3876 #. type: TH
3877 #: build/C/man3/mcheck.3:23 build/C/man3/mtrace.3:23
3878 #, no-wrap
3879 msgid "2012-04-18"
3880 msgstr "2012-04-18"
3881
3882 #. type: Plain text
3883 #: build/C/man3/mcheck.3:26
3884 msgid ""
3885 "mcheck, mcheck_check_all, mcheck_pedantic, mprobe - heap consistency checking"
3886 msgstr ""
3887
3888 #. type: Plain text
3889 #: build/C/man3/mcheck.3:29
3890 #, no-wrap
3891 msgid "B<#include E<lt>mcheck.hE<gt>>\n"
3892 msgstr "B<#include E<lt>mcheck.hE<gt>>\n"
3893
3894 #. type: Plain text
3895 #: build/C/man3/mcheck.3:31
3896 #, no-wrap
3897 msgid "B<int mcheck(void (*>I<abortfunc>B<)(enum mcheck_status >I<mstatus>B<));>\n"
3898 msgstr ""
3899
3900 #. type: Plain text
3901 #: build/C/man3/mcheck.3:33
3902 #, no-wrap
3903 msgid "B<int mcheck_pedantic(void (*>I<abortfunc>B<)(enum mcheck_status >I<mstatus>B<));>\n"
3904 msgstr ""
3905
3906 #. type: Plain text
3907 #: build/C/man3/mcheck.3:35
3908 #, no-wrap
3909 msgid "B<void mcheck_check_all(void);>\n"
3910 msgstr "B<void mcheck_check_all(void);>\n"
3911
3912 #. type: Plain text
3913 #: build/C/man3/mcheck.3:37
3914 #, no-wrap
3915 msgid "B<enum mcheck_status mprobe(void *>I<ptr>B<);>\n"
3916 msgstr "B<enum mcheck_status mprobe(void *>I<ptr>B<);>\n"
3917
3918 #. type: Plain text
3919 #: build/C/man3/mcheck.3:50
3920 msgid ""
3921 "The B<mcheck>()  function installs a set of debugging hooks for the B<malloc>"
3922 "(3)  family of memory-allocation functions.  These hooks cause certain "
3923 "consistency checks to be performed on the state of the heap.  The checks can "
3924 "detect application errors such as freeing a block of memory more than once "
3925 "or corrupting the bookkeeping data structures that immediately precede a "
3926 "block of allocated memory."
3927 msgstr ""
3928
3929 #. type: Plain text
3930 #: build/C/man3/mcheck.3:62
3931 msgid ""
3932 "To be effective, the B<mcheck>()  function must be called before the first "
3933 "call to B<malloc>(3)  or a related function.  In cases where this is "
3934 "difficult to ensure, linking the program with I<-mcheck> inserts an implicit "
3935 "call to B<mcheck>()  (with a NULL argument)  before the first call to a "
3936 "memory-allocation function."
3937 msgstr ""
3938
3939 #. type: Plain text
3940 #: build/C/man3/mcheck.3:70
3941 msgid ""
3942 "The B<mcheck_pedantic>()  function is similar to B<mcheck>(), but performs "
3943 "checks on all allocated blocks whenever one of the memory-allocation "
3944 "functions is called.  This can be very slow!"
3945 msgstr ""
3946
3947 #. type: Plain text
3948 #: build/C/man3/mcheck.3:77
3949 msgid ""
3950 "The B<mcheck_check_all>()  function causes an immediate check on all "
3951 "allocated blocks.  This call is only effective if B<mcheck>()  is called "
3952 "beforehand."
3953 msgstr ""
3954
3955 #. type: Plain text
3956 #: build/C/man3/mcheck.3:90
3957 msgid ""
3958 "If the system detects an inconsistency in the heap, the caller-supplied "
3959 "function pointed to by I<abortfunc> is invoked with a single argument "
3960 "argument, I<mstatus>, that indicates what type of inconsistency was "
3961 "detected.  If I<abortfunc> is NULL, a default function prints an error "
3962 "message on I<stderr> and calls B<abort>(3)."
3963 msgstr ""
3964
3965 #. type: Plain text
3966 #: build/C/man3/mcheck.3:102
3967 msgid ""
3968 "The B<mprobe>()  function performs a consistency check on the block of "
3969 "allocated memory pointed to by I<ptr>.  The B<mcheck>()  function should be "
3970 "called beforehand (otherwise B<mprobe>()  returns B<MCHECK_DISABLED>)."
3971 msgstr ""
3972
3973 #. type: Plain text
3974 #: build/C/man3/mcheck.3:110
3975 msgid ""
3976 "The following list describes the values returned by B<mprobe>()  or passed "
3977 "as the I<mstatus> argument when I<abortfunc> is invoked:"
3978 msgstr ""
3979
3980 #. type: TP
3981 #: build/C/man3/mcheck.3:110
3982 #, no-wrap
3983 msgid "B<MCHECK_DISABLED> (B<mprobe>() only)"
3984 msgstr ""
3985
3986 #. type: Plain text
3987 #: build/C/man3/mcheck.3:115
3988 msgid ""
3989 "B<mcheck>()  was not called before the first memory allocation function was "
3990 "called.  Consistency checking is not possible."
3991 msgstr ""
3992
3993 #. type: TP
3994 #: build/C/man3/mcheck.3:115
3995 #, no-wrap
3996 msgid "B<MCHECK_OK> (B<mprobe>() only)"
3997 msgstr ""
3998
3999 #. type: Plain text
4000 #: build/C/man3/mcheck.3:118
4001 msgid "No inconsistency detected."
4002 msgstr ""
4003
4004 #. type: TP
4005 #: build/C/man3/mcheck.3:118
4006 #, no-wrap
4007 msgid "B<MCHECK_HEAD>"
4008 msgstr "B<MCHECK_HEAD>"
4009
4010 #. type: Plain text
4011 #: build/C/man3/mcheck.3:121
4012 msgid "Memory preceding an allocated block was clobbered."
4013 msgstr ""
4014
4015 #. type: TP
4016 #: build/C/man3/mcheck.3:121
4017 #, no-wrap
4018 msgid "B<MCHECK_TAIL>"
4019 msgstr "B<MCHECK_TAIL>"
4020
4021 #. type: Plain text
4022 #: build/C/man3/mcheck.3:124
4023 msgid "Memory following an allocated block was clobbered."
4024 msgstr ""
4025
4026 #. type: TP
4027 #: build/C/man3/mcheck.3:124
4028 #, no-wrap
4029 msgid "B<MCHECK_FREE>"
4030 msgstr "B<MCHECK_FREE>"
4031
4032 #. type: Plain text
4033 #: build/C/man3/mcheck.3:128
4034 msgid "A block of memory was freed twice."
4035 msgstr ""
4036
4037 #. type: Plain text
4038 #: build/C/man3/mcheck.3:133
4039 msgid ""
4040 "B<mcheck>()  and B<mcheck_pedantic>()  return 0 on success, or -1 on error."
4041 msgstr ""
4042
4043 #. type: Plain text
4044 #: build/C/man3/mcheck.3:144
4045 msgid ""
4046 "The B<mcheck_pedantic>()  and B<mcheck_check_all>()  functions are available "
4047 "since glibc 2.2.  The B<mcheck()> and B<mprobe()> functions are present "
4048 "since at least glibc 2.0"
4049 msgstr ""
4050
4051 #.  But is MALLOC_CHECK_ slower?
4052 #. type: Plain text
4053 #: build/C/man3/mcheck.3:158
4054 msgid ""
4055 "Linking a program with I<-lmcheck> and using the B<MALLOC_CHECK_> "
4056 "environment variable (described in B<mallopt>(3))  cause the same kinds of "
4057 "errors to be detected.  But, using B<MALLOC_CHECK_> does not require the "
4058 "application to be relinked."
4059 msgstr ""
4060
4061 #. type: Plain text
4062 #: build/C/man3/mcheck.3:165
4063 msgid ""
4064 "The program below calls B<mcheck>()  with a NULL argument and then frees the "
4065 "same block of memory twice.  The following shell session demonstrates what "
4066 "happens when running the program:"
4067 msgstr ""
4068
4069 #. type: Plain text
4070 #: build/C/man3/mcheck.3:170
4071 #, no-wrap
4072 msgid ""
4073 "$B< ./a.out>\n"
4074 "About to free\n"
4075 msgstr ""
4076
4077 #. type: Plain text
4078 #: build/C/man3/mcheck.3:174
4079 #, no-wrap
4080 msgid ""
4081 "About to free a second time\n"
4082 "block freed twice\n"
4083 "Aborted (core dumped)\n"
4084 msgstr ""
4085
4086 #. type: Plain text
4087 #: build/C/man3/mcheck.3:182
4088 #, no-wrap
4089 msgid ""
4090 "#include E<lt>stdlib.hE<gt>\n"
4091 "#include E<lt>stdio.hE<gt>\n"
4092 "#include E<lt>mcheck.hE<gt>\n"
4093 msgstr ""
4094 "#include E<lt>stdlib.hE<gt>\n"
4095 "#include E<lt>stdio.hE<gt>\n"
4096 "#include E<lt>mcheck.hE<gt>\n"
4097
4098 #. type: Plain text
4099 #: build/C/man3/mcheck.3:190
4100 #, no-wrap
4101 msgid ""
4102 "    if (mcheck(NULL) != 0) {\n"
4103 "        fprintf(stderr, \"mcheck() failed\\en\");\n"
4104 msgstr ""
4105
4106 #. type: Plain text
4107 #: build/C/man3/mcheck.3:193
4108 #, no-wrap
4109 msgid ""
4110 "        exit(EXIT_FAILURE);\n"
4111 "    }\n"
4112 msgstr ""
4113 "        exit(EXIT_FAILURE);\n"
4114 "    }\n"
4115
4116 #. type: Plain text
4117 #: build/C/man3/mcheck.3:195
4118 #, no-wrap
4119 msgid "    p = malloc(1000);\n"
4120 msgstr "    p = malloc(1000);\n"
4121
4122 #. type: Plain text
4123 #: build/C/man3/mcheck.3:200
4124 #, no-wrap
4125 msgid ""
4126 "    fprintf(stderr, \"About to free\\en\");\n"
4127 "    free(p);\n"
4128 "    fprintf(stderr, \"\\enAbout to free a second time\\en\");\n"
4129 "    free(p);\n"
4130 msgstr ""
4131
4132 #.  FIXME add SEE ALSO pointer from malloc(3) to here
4133 #.  FIXME add SEE ALSO pointer from mallopt(3) to here
4134 #.  FIXME add SEE ALSO pointer from mtrace(3) to here
4135 #. type: Plain text
4136 #: build/C/man3/mcheck.3:211
4137 msgid "B<malloc>(3), B<mallopt>(3), B<mtrace>(3)"
4138 msgstr "B<malloc>(3), B<mallopt>(3), B<mtrace>(3)"
4139
4140 #. type: TH
4141 #: build/C/man2/mlock.2:27
4142 #, no-wrap
4143 msgid "MLOCK"
4144 msgstr "MLOCK"
4145
4146 #. type: TH
4147 #: build/C/man2/mlock.2:27
4148 #, no-wrap
4149 msgid "2011-09-14"
4150 msgstr "2011-09-14"
4151
4152 #. type: Plain text
4153 #: build/C/man2/mlock.2:30
4154 msgid "mlock, munlock, mlockall, munlockall - lock and unlock memory"
4155 msgstr "mlock - メモリのロックとロック解除を行う"
4156
4157 #. type: Plain text
4158 #: build/C/man2/mlock.2:33 build/C/man2/mmap.2:46 build/C/man2/mmap2.2:35
4159 #: build/C/man2/mprotect.2:38 build/C/man2/mremap.2:39
4160 #, no-wrap
4161 msgid "B<#include E<lt>sys/mman.hE<gt>>\n"
4162 msgstr "B<#include E<lt>sys/mman.hE<gt>>\n"
4163
4164 #. type: Plain text
4165 #: build/C/man2/mlock.2:36
4166 #, no-wrap
4167 msgid ""
4168 "B<int mlock(const void *>I<addr>B<, size_t >I<len>B<);>\n"
4169 "B<int munlock(const void *>I<addr>B<, size_t >I<len>B<);>\n"
4170 msgstr ""
4171 "B<int mlock(const void *>I<addr>B<, size_t >I<len>B<);>\n"
4172 "B<int munlock(const void *>I<addr>B<, size_t >I<len>B<);>\n"
4173
4174 #. type: Plain text
4175 #: build/C/man2/mlock.2:39
4176 #, no-wrap
4177 msgid ""
4178 "B<int mlockall(int >I<flags>B<);>\n"
4179 "B<int munlockall(void);>\n"
4180 msgstr ""
4181 "B<int mlockall(int >I<flags>B<);>\n"
4182 "B<int munlockall(void);>\n"
4183
4184 #. type: Plain text
4185 #: build/C/man2/mlock.2:55
4186 msgid ""
4187 "B<mlock>()  and B<mlockall>()  respectively lock part or all of the calling "
4188 "process's virtual address space into RAM, preventing that memory from being "
4189 "paged to the swap area.  B<munlock>()  and B<munlockall>()  perform the "
4190 "converse operation, respectively unlocking part or all of the calling "
4191 "process's virtual address space, so that pages in the specified virtual "
4192 "address range may once more to be swapped out if required by the kernel "
4193 "memory manager.  Memory locking and unlocking are performed in units of "
4194 "whole pages."
4195 msgstr ""
4196 "B<mlock>()  と B<mlockall>()  はそれぞれ、呼び出し元プロセスの仮想アドレス空"
4197 "間の一部または全部を RAM 上にロックし、メモリがスワップエリアにページングされ"
4198 "るのを防ぐ。 B<munlock>()  と B<munlockall>()  は逆の操作で、それぞれ呼び出し"
4199 "元プロセスの仮想アドレス空間の一部または全部を ロック解除する。つまり、指定さ"
4200 "れた仮想アドレス範囲のページは カーネルメモリマネージャーから要求されればス"
4201 "ワップアウトするようになる。 メモリのロックとロック解除はページ単位で行われ"
4202 "る。"
4203
4204 #. type: SS
4205 #: build/C/man2/mlock.2:55
4206 #, no-wrap
4207 msgid "mlock() and munlock()"
4208 msgstr "mlock() と munlock()"
4209
4210 #. type: Plain text
4211 #: build/C/man2/mlock.2:65
4212 msgid ""
4213 "B<mlock>()  locks pages in the address range starting at I<addr> and "
4214 "continuing for I<len> bytes.  All pages that contain a part of the specified "
4215 "address range are guaranteed to be resident in RAM when the call returns "
4216 "successfully; the pages are guaranteed to stay in RAM until later unlocked."
4217 msgstr ""
4218 "B<mlock>()  は I<addr> から始まる長さ I<len> バイトのアドレス範囲のページを"
4219 "ロックする。 呼び出しが成功した場合には、 指定されたアドレス範囲を含む全ての"
4220 "ページは RAM に残り続けることが保証される。 これらのページは後でロック解除さ"
4221 "れるまで RAM に残り続けることが保証される。"
4222
4223 #. type: Plain text
4224 #: build/C/man2/mlock.2:74
4225 msgid ""
4226 "B<munlock>()  unlocks pages in the address range starting at I<addr> and "
4227 "continuing for I<len> bytes.  After this call, all pages that contain a part "
4228 "of the specified memory range can be moved to external swap space again by "
4229 "the kernel."
4230 msgstr ""
4231 "B<munlock>()  は、 I<addr> から始まる長さ I<len> バイトのアドレス範囲のページ"
4232 "のロックを解除する。 この呼び出しを行った後は、カーネルが、指定されたメモリ範"
4233 "囲を含む 全てのページを外部のスワップ空間に移動できるようになる。"
4234
4235 #. type: SS
4236 #: build/C/man2/mlock.2:74
4237 #, no-wrap
4238 msgid "mlockall() and munlockall()"
4239 msgstr "mlockall() と munlockall()"
4240
4241 #. type: Plain text
4242 #: build/C/man2/mlock.2:84
4243 msgid ""
4244 "B<mlockall>()  locks all pages mapped into the address space of the calling "
4245 "process.  This includes the pages of the code, data and stack segment, as "
4246 "well as shared libraries, user space kernel data, shared memory, and memory-"
4247 "mapped files.  All mapped pages are guaranteed to be resident in RAM when "
4248 "the call returns successfully; the pages are guaranteed to stay in RAM until "
4249 "later unlocked."
4250 msgstr ""
4251 "B<mlockall>()  は呼び出し元プロセスのアドレス空間にマップされている全てのペー"
4252 "ジを ロックする。これにはコード、データ、スタックの 各セグメント、共有ライブ"
4253 "ラリ、カーネルのユーザー空間データ、 共有メモリ、メモリ・マップされたファイル"
4254 "が含まれる。 システム・コールが成功した場合には全てのマップされたページは "
4255 "RAM に 残ることを保証される。 これらのページは後でロック解除されるまで RAM に"
4256 "残り続けることが保証される。"
4257
4258 #. type: Plain text
4259 #: build/C/man2/mlock.2:89
4260 msgid ""
4261 "The I<flags> argument is constructed as the bitwise OR of one or more of the "
4262 "following constants:"
4263 msgstr "I<flags> 引数は以下の内容の一つまたは複数のビット OR から構成される:"
4264
4265 #. type: TP
4266 #: build/C/man2/mlock.2:89
4267 #, no-wrap
4268 msgid "B<MCL_CURRENT>"
4269 msgstr "B<MCL_CURRENT>"
4270
4271 #. type: Plain text
4272 #: build/C/man2/mlock.2:93
4273 msgid ""
4274 "Lock all pages which are currently mapped into the address space of the "
4275 "process."
4276 msgstr ""
4277 "現在、プロセスのアドレス空間にマップされている全てのページをロックする。"
4278
4279 #. type: TP
4280 #: build/C/man2/mlock.2:93
4281 #, no-wrap
4282 msgid "B<MCL_FUTURE>"
4283 msgstr "B<MCL_FUTURE>"
4284
4285 #. type: Plain text
4286 #: build/C/man2/mlock.2:100
4287 msgid ""
4288 "Lock all pages which will become mapped into the address space of the "
4289 "process in the future.  These could be for instance new pages required by a "
4290 "growing heap and stack as well as new memory mapped files or shared memory "
4291 "regions."
4292 msgstr ""
4293 "将来、プロセスのアドレス空間にマップされる全てのページをロックする。 例えば、"
4294 "ヒープ (heap) やスタックの成長により新しく必要になったページだけで なく、新し"
4295 "くメモリマップされたファイルや共有メモリ領域もロックされる。"
4296
4297 #. type: Plain text
4298 #: build/C/man2/mlock.2:113
4299 msgid ""
4300 "If B<MCL_FUTURE> has been specified, then a later system call (e.g., B<mmap>"
4301 "(2), B<sbrk>(2), B<malloc>(3)), may fail if it would cause the number of "
4302 "locked bytes to exceed the permitted maximum (see below).  In the same "
4303 "circumstances, stack growth may likewise fail: the kernel will deny stack "
4304 "expansion and deliver a B<SIGSEGV> signal to the process."
4305 msgstr ""
4306 "B<MCL_FUTURE> が指定されていると、以後のシステムコール (例えば、 B<mmap>(2), "
4307 "B<sbrk>(2), B<malloc>(3))  は、ロックするバイト数が許可された最大値 (下記参"
4308 "照) を超えた場合に 失敗する可能性がある。 同様に、スタックの成長も失敗する可"
4309 "能性がある。 その場合、カーネルはスタックの拡張を拒否し、 B<SIGSEGV> をプロセ"
4310 "スに送る。"
4311
4312 #. type: Plain text
4313 #: build/C/man2/mlock.2:117
4314 msgid ""
4315 "B<munlockall>()  unlocks all pages mapped into the address space of the "
4316 "calling process."
4317 msgstr ""
4318 "B<munlockall>()  は、呼び出し元プロセスのアドレス空間にマッピングされている "
4319 "全てのページをロック解除する。"
4320
4321 #. type: Plain text
4322 #: build/C/man2/mlock.2:123
4323 msgid ""
4324 "On success these system calls return 0.  On error, -1 is returned, I<errno> "
4325 "is set appropriately, and no changes are made to any locks in the address "
4326 "space of the process."
4327 msgstr ""
4328 "成功した場合は、これらのシステムコールはゼロを返す。 エラーの場合は -1 が返さ"
4329 "れ、 I<errno> が適切に設定され、プロセスのアドレス空間におけるロックは変更さ"
4330 "れない。"
4331
4332 #. type: Plain text
4333 #: build/C/man2/mlock.2:132
4334 msgid ""
4335 "(Linux 2.6.9 and later) the caller had a nonzero B<RLIMIT_MEMLOCK> soft "
4336 "resource limit, but tried to lock more memory than the limit permitted.  "
4337 "This limit is not enforced if the process is privileged (B<CAP_IPC_LOCK>)."
4338 msgstr ""
4339 "(Linux 2.6.9 以降) 呼び出し元は非ゼロの ソフト資源制限 B<RLIMIT_MEMLOCK> を持"
4340 "つが、制限が許可している以上のメモリをロックしようとした。 この制限は、プロセ"
4341 "スが特権 (B<CAP_IPC_LOCK>)  を持っている場合は適用されない。"
4342
4343 #.  In the case of mlock(), this check is somewhat buggy: it doesn't
4344 #.  take into account whether the to-be-locked range overlaps with
4345 #.  already locked pages.  Thus, suppose we allocate
4346 #.  (num_physpages / 4 + 1) of memory, and lock those pages once using
4347 #.  mlock(), and then lock the *same* page range a second time.
4348 #.  In the case, the second mlock() call will fail, since the check
4349 #.  calculates that the process is trying to lock (num_physpages / 2 + 2)
4350 #.  pages, which of course is not true.  (MTK, Nov 04, kernel 2.4.28)
4351 #. type: Plain text
4352 #: build/C/man2/mlock.2:144
4353 msgid ""
4354 "(Linux 2.4 and earlier) the calling process tried to lock more than half of "
4355 "RAM."
4356 msgstr ""
4357 "(Linux 2.4 以前) 呼び出し元プロセスが RAM の半分以上をロックしようとした。"
4358
4359 #. SVr4 documents an additional EAGAIN error code.
4360 #. type: Plain text
4361 #: build/C/man2/mlock.2:150
4362 msgid ""
4363 "The caller is not privileged, but needs privilege (B<CAP_IPC_LOCK>)  to "
4364 "perform the requested operation."
4365 msgstr ""
4366 "呼び出し側が特権を持っていないが、\n"
4367 "要求された操作を実行するには特権 (B<CAP_IPC_LOCK>) が必要である。"
4368
4369 #. type: Plain text
4370 #: build/C/man2/mlock.2:155
4371 msgid "For B<mlock>()  and B<munlock>():"
4372 msgstr "B<mlock>()  と B<munlock>()  用として:"
4373
4374 #. type: Plain text
4375 #: build/C/man2/mlock.2:158
4376 msgid "Some or all of the specified address range could not be locked."
4377 msgstr "指定されたアドレス範囲の一部または全てをロックすることができなかった。"
4378
4379 #. type: Plain text
4380 #: build/C/man2/mlock.2:165
4381 msgid ""
4382 "The result of the addition I<start>+I<len> was less than I<start> (e.g., the "
4383 "addition may have resulted in an overflow)."
4384 msgstr ""
4385 "I<start>+I<len> の加算の結果が I<start> よりも小さかった\n"
4386 "(例えば、加算でオーバーフローが発生したなど)。"
4387
4388 #. type: Plain text
4389 #: build/C/man2/mlock.2:170
4390 msgid "(Not on Linux)  I<addr> was not a multiple of the page size."
4391 msgstr ""
4392 "(Linux ではこの意味で使われない)  I<addr> がページサイズの倍数ではない。"
4393
4394 #. type: Plain text
4395 #: build/C/man2/mlock.2:174
4396 msgid ""
4397 "Some of the specified address range does not correspond to mapped pages in "
4398 "the address space of the process."
4399 msgstr ""
4400 "指定されたアドレス範囲がプロセスのアドレス空間にマップされたページと 一致しな"
4401 "い。"
4402
4403 #. type: Plain text
4404 #: build/C/man2/mlock.2:177
4405 msgid "For B<mlockall>():"
4406 msgstr "B<mlockall>()  用として:"
4407
4408 #. type: Plain text
4409 #: build/C/man2/mlock.2:180
4410 msgid "Unknown I<flags> were specified."
4411 msgstr "未知の I<flags> が指定された。"
4412
4413 #. type: Plain text
4414 #: build/C/man2/mlock.2:183
4415 msgid "For B<munlockall>():"
4416 msgstr "B<munlockall>()  用として:"
4417
4418 #. type: Plain text
4419 #: build/C/man2/mlock.2:187
4420 msgid ""
4421 "(Linux 2.6.8 and earlier) The caller was not privileged (B<CAP_IPC_LOCK>)."
4422 msgstr ""
4423 "(Linux 2.6.8 以前) 呼び出し元が権限 (B<CAP_IPC_LOCK>)  を持っていない。"
4424
4425 #. type: Plain text
4426 #: build/C/man2/mlock.2:189
4427 msgid "POSIX.1-2001, SVr4."
4428 msgstr "POSIX.1-2001, SVr4."
4429
4430 #. type: SH
4431 #: build/C/man2/mlock.2:189 build/C/man2/mmap.2:487 build/C/man2/msync.2:105
4432 #, no-wrap
4433 msgid "AVAILABILITY"
4434 msgstr "可用性"
4435
4436 #. type: Plain text
4437 #: build/C/man2/mlock.2:201
4438 msgid ""
4439 "On POSIX systems on which B<mlock>()  and B<munlock>()  are available, "
4440 "B<_POSIX_MEMLOCK_RANGE> is defined in I<E<lt>unistd.hE<gt>> and the number "
4441 "of bytes in a page can be determined from the constant B<PAGESIZE> (if "
4442 "defined) in I<E<lt>limits.hE<gt>> or by calling I<sysconf(_SC_PAGESIZE)>."
4443 msgstr ""
4444 "B<mlock>()  と B<munlock>()  が使用可能な POSIX システムでは "
4445 "B<_POSIX_MEMLOCK_RANGE> が I<E<lt>unistd.hE<gt>> で定義されている。 また、"
4446 "ページあたりのバイト数は、 I<E<lt>limits.hE<gt>> で定義される定数 "
4447 "B<PAGESIZE> から (定義されている場合)、もしくは I<sysconf(_SC_PAGESIZE)> を呼"
4448 "び出すことで決定できる。"
4449
4450 #.  POSIX.1-2001: It shall be defined to -1 or 0 or 200112L.
4451 #.  -1: unavailable, 0: ask using sysconf().
4452 #.  glibc defines it to 1.
4453 #. type: Plain text
4454 #: build/C/man2/mlock.2:214
4455 msgid ""
4456 "On POSIX systems on which B<mlockall>()  and B<munlockall>()  are available, "
4457 "B<_POSIX_MEMLOCK> is defined in I<E<lt>unistd.hE<gt>> to a value greater "
4458 "than 0.  (See also B<sysconf>(3).)"
4459 msgstr ""
4460 "B<mlockall>()  と B<munlockall>()  が利用可能な POSIX システムでは、 "
4461 "B<_POSIX_MEMLOCK> は I<E<lt>unistd.hE<gt>> で 0 より大きい値に定義されている "
4462 "(B<sysconf>(3)  も参照のこと)。"
4463
4464 #. type: Plain text
4465 #: build/C/man2/mlock.2:232
4466 msgid ""
4467 "Memory locking has two main applications: real-time algorithms and high-"
4468 "security data processing.  Real-time applications require deterministic "
4469 "timing, and, like scheduling, paging is one major cause of unexpected "
4470 "program execution delays.  Real-time applications will usually also switch "
4471 "to a real-time scheduler with B<sched_setscheduler>(2).  Cryptographic "
4472 "security software often handles critical bytes like passwords or secret keys "
4473 "as data structures.  As a result of paging, these secrets could be "
4474 "transferred onto a persistent swap store medium, where they might be "
4475 "accessible to the enemy long after the security software has erased the "
4476 "secrets in RAM and terminated.  (But be aware that the suspend mode on "
4477 "laptops and some desktop computers will save a copy of the system's RAM to "
4478 "disk, regardless of memory locks.)"
4479 msgstr ""
4480 "メモリのロックの用途としては主に二つある: リアルタイム アルゴリズムと高いセ"
4481 "キュリティの必要なデータ処理である。リアルタイムの アプリケーションは決定的な"
4482 "タイミングやスケジューリングを必要とするが、 ページングは予期しないプログラム"
4483 "の実行遅延をもたらす主要な要因となる。 リアルタイムのアプリケーションはたいて"
4484 "いは B<sched_setscheduler>(2)  でリアルタイムスケジューラに変更される。 暗号"
4485 "やセキュリティのソフトウェアはしばしばパスワードや秘密鍵のデータの ような重要"
4486 "なバイト列を扱う。ページングの結果、これらの秘密が スワップ用の固定媒体に転送"
4487 "されるかもしれない。そして、セキュリティ・ ソフトウェアが RAM 上の秘密を削除"
4488 "して終了したずっと後になっても、 このスワップされたデータには敵がアクセスでき"
4489 "る可能性がある (しかし、ラップトップといくつかのデスクトップコンピュータの サ"
4490 "スペンドモードはシステムの RAM の内容をメモリのロックに関わらず ディスクに保"
4491 "存することに注意)。"
4492
4493 #. type: Plain text
4494 #: build/C/man2/mlock.2:245
4495 msgid ""
4496 "Real-time processes that are using B<mlockall>()  to prevent delays on page "
4497 "faults should reserve enough locked stack pages before entering the time-"
4498 "critical section, so that no page fault can be caused by function calls.  "
4499 "This can be achieved by calling a function that allocates a sufficiently "
4500 "large automatic variable (an array) and writes to the memory occupied by "
4501 "this array in order to touch these stack pages.  This way, enough pages will "
4502 "be mapped for the stack and can be locked into RAM.  The dummy writes ensure "
4503 "that not even copy-on-write page faults can occur in the critical section."
4504 msgstr ""
4505 "リアルタイムプロセスが B<mlockall>()  を使ってページフォールトによる遅延を防"
4506 "ごうとする場合、 関数呼び出しによってページフォールトが発生しないように、 時"
4507 "間制限の厳しい部分 (time-critical section) に入る前に 十分な量のロックされた"
4508 "スタックを確保しておく必要がある。 これを実現するには、十分な大きさの自動変"
4509 "数 (の配列) を確保し、 これらのスタック用のページがメモリ上に確保されるように"
4510 "この配列に 書き込みを行う関数を用意し、これを呼び出せばよい。こうすること"
4511 "で、 十分な量のページがスタックにマッピングされ、RAM にロックされる。 ダミー"
4512 "の書き込みを行うことによって、 時間制限の厳しい部分 (critical section) 内では"
4513 "書き込み時コピーによる ページフォールトさえも発生しないことが保証される。"
4514
4515 #. type: Plain text
4516 #: build/C/man2/mlock.2:251
4517 msgid ""
4518 "Memory locks are not inherited by a child created via B<fork>(2)  and are "
4519 "automatically removed (unlocked) during an B<execve>(2)  or when the process "
4520 "terminates."
4521 msgstr ""
4522 "メモリロックは B<fork>(2)  で作成された子プロセスには継承されず、 B<execve>"
4523 "(2)  が呼ばれたり、プロセスが終了した場合は 自動的に削除される (ロック解除さ"
4524 "れる)。"
4525
4526 #. type: Plain text
4527 #: build/C/man2/mlock.2:255
4528 msgid ""
4529 "The memory lock on an address range is automatically removed if the address "
4530 "range is unmapped via B<munmap>(2)."
4531 msgstr ""
4532 "あるアドレス範囲に対するメモリロックは、そのアドレス範囲が B<munmap>(2)  に"
4533 "よってアンマップされた場合は削除される。"
4534
4535 #. type: Plain text
4536 #: build/C/man2/mlock.2:268
4537 msgid ""
4538 "Memory locks do not stack, that is, pages which have been locked several "
4539 "times by calls to B<mlock>()  or B<mlockall>()  will be unlocked by a single "
4540 "call to B<munlock>()  for the corresponding range or by B<munlockall>().  "
4541 "Pages which are mapped to several locations or by several processes stay "
4542 "locked into RAM as long as they are locked at least at one location or by at "
4543 "least one process."
4544 msgstr ""
4545 "メモリのロックは累積しない。 すなわち複数回 B<mlock>()  や B<mlockall>()  を"
4546 "呼び出してロックされたページでも、 対応する範囲に対して B<munlock>()  を 1 回"
4547 "呼び出したり B<munlockall>()  を呼び出したりするだけでロック解除される。 複数"
4548 "の場所や複数のプロセスにマップされているページは、少なくとも一つの場所、 一つ"
4549 "のプロセスでロックされている限りは RAM に残り続ける。"
4550
4551 #. type: Plain text
4552 #: build/C/man2/mlock.2:279
4553 msgid ""
4554 "Under Linux, B<mlock>()  and B<munlock>()  automatically round I<addr> down "
4555 "to the nearest page boundary.  However, POSIX.1-2001 allows an "
4556 "implementation to require that I<addr> is page aligned, so portable "
4557 "applications should ensure this."
4558 msgstr ""
4559 "Linux では、 B<mlock>()  と B<munlock>()  は自動的に I<addr> を端数切り捨てに"
4560 "より一番近いページ境界へと丸める。 しかし POSIX.1-2001 は I<addr> がページ境"
4561 "界に合っていることを要求する実装も許している。 そのため移植性を意図したアプリ"
4562 "ケーションではきちんと境界に合わせた方が良い。"
4563
4564 #. type: Plain text
4565 #: build/C/man2/mlock.2:292
4566 msgid ""
4567 "The I<VmLck> field of the Linux-specific I</proc/PID/status> file shows how "
4568 "many kilobytes of memory the process with ID I<PID> has locked using B<mlock>"
4569 "(), B<mlockall>(), and B<mmap>(2)  B<MAP_LOCKED>."
4570 msgstr ""
4571 "Linux 固有の I</proc/PID/status> ファイルの I<VmLck> フィールドには、\n"
4572 "B<mlock>(), B<mlockall>() および B<mmap>(2) B<MAP_LOCKED> を使って、\n"
4573 "ID が I<PID> のプロセスがロックしているメモリ量 (キロバイト単位) が\n"
4574 "表示される。"
4575
4576 #. type: SS
4577 #: build/C/man2/mlock.2:292
4578 #, no-wrap
4579 msgid "Limits and permissions"
4580 msgstr "制限と権限"
4581
4582 #. type: Plain text
4583 #: build/C/man2/mlock.2:299
4584 msgid ""
4585 "In Linux 2.6.8 and earlier, a process must be privileged (B<CAP_IPC_LOCK>)  "
4586 "in order to lock memory and the B<RLIMIT_MEMLOCK> soft resource limit "
4587 "defines a limit on how much memory the process may lock."
4588 msgstr ""
4589 "Linux 2.6.8 以前では、メモリをロックするためには特権 (B<CAP_IPC_LOCK>)  が必"
4590 "要で、 ソフト資源制限 B<RLIMIT_MEMLOCK> はプロセスがどれだけのメモリをロック"
4591 "できるかの制限を定義する。"
4592
4593 #. type: Plain text
4594 #: build/C/man2/mlock.2:305
4595 msgid ""
4596 "Since Linux 2.6.9, no limits are placed on the amount of memory that a "
4597 "privileged process can lock and the B<RLIMIT_MEMLOCK> soft resource limit "
4598 "instead defines a limit on how much memory an unprivileged process may lock."
4599 msgstr ""
4600 "Linux 2.6.9 以降では、特権を持つプロセスがロックできるメモリ量は無制限とな"
4601 "り、 代わりにソフト資源制限 B<RLIMIT_MEMLOCK> は特権を持たないプロセスがロッ"
4602 "クできるメモリ量の制限を定義する。"
4603
4604 #. type: Plain text
4605 #: build/C/man2/mlock.2:313
4606 msgid ""
4607 "In the 2.4 series Linux kernels up to and including 2.4.17, a bug caused the "
4608 "B<mlockall>()  B<MCL_FUTURE> flag to be inherited across a B<fork>(2).  This "
4609 "was rectified in kernel 2.4.18."
4610 msgstr ""
4611 "2.4.17 までの 2.4 シリーズの Linux カーネルには、 B<mlockall>()  "
4612 "B<MCL_FUTURE> フラグが B<fork>(2)  で継承されると言うバグがある。 これはカー"
4613 "ネル 2.4.18 で修正された。"
4614
4615 #.  See the following LKML thread:
4616 #.  http://marc.theaimsgroup.com/?l=linux-kernel&m=113801392825023&w=2
4617 #.  "Rationale for RLIMIT_MEMLOCK"
4618 #.  23 Jan 2006
4619 #. type: Plain text
4620 #: build/C/man2/mlock.2:330
4621 msgid ""
4622 "Since kernel 2.6.9, if a privileged process calls I<mlockall(MCL_FUTURE)> "
4623 "and later drops privileges (loses the B<CAP_IPC_LOCK> capability by, for "
4624 "example, setting its effective UID to a nonzero value), then subsequent "
4625 "memory allocations (e.g., B<mmap>(2), B<brk>(2))  will fail if the "
4626 "B<RLIMIT_MEMLOCK> resource limit is encountered."
4627 msgstr ""
4628 "カーネル 2.6.9 以降では、特権を持ったプロセスが I<mlockall(MCL_FUTURE)> を呼"
4629 "び出した後で、特権をなくした場合 (例えば、 実効 UID を 0 以外の値に変更するな"
4630 "どにより、 B<CAP_IPC_LOCK> ケーパビリティを失った場合)、リソース上限 "
4631 "B<RLIMIT_MEMLOCK> に達すると、それ以降のメモリ割り当て (例えば B<mmap>(2), "
4632 "B<brk>(2))  は失敗する。"
4633
4634 #. type: Plain text
4635 #: build/C/man2/mlock.2:337
4636 msgid ""
4637 "B<mmap>(2), B<setrlimit>(2), B<shmctl>(2), B<sysconf>(3), B<proc>(5), "
4638 "B<capabilities>(7)"
4639 msgstr ""
4640 "B<mmap>(2), B<setrlimit>(2), B<shmctl>(2), B<sysconf>(3), B<proc>(5),\n"
4641 "B<capabilities>(7)"
4642
4643 #. type: TH
4644 #: build/C/man2/mmap.2:40
4645 #, no-wrap
4646 msgid "MMAP"
4647 msgstr "MMAP"
4648
4649 #. type: TH
4650 #: build/C/man2/mmap.2:40 build/C/man2/mmap2.2:29
4651 #, no-wrap
4652 msgid "2012-04-16"
4653 msgstr "2012-04-16"
4654
4655 #. type: Plain text
4656 #: build/C/man2/mmap.2:43
4657 msgid "mmap, munmap - map or unmap files or devices into memory"
4658 msgstr "mmap, munmap - ファイルやデバイスをメモリにマップ/アンマップする"
4659
4660 #. type: Plain text
4661 #: build/C/man2/mmap.2:51
4662 #, no-wrap
4663 msgid ""
4664 "B<void *mmap(void *>I<addr>B<, size_t >I<length>B<, int >I<prot>B<, int >I<flags>B<,>\n"
4665 "B<           int >I<fd>B<, off_t >I<offset>B<);>\n"
4666 "B<int munmap(void *>I<addr>B<, size_t >I<length>B<);>\n"
4667 msgstr ""
4668 "B<void *mmap(void *>I<addr>B<, size_t >I<length>B<, int >I<prot>B<, int >I<flags>B<,>\n"
4669 "B<           int >I<fd>B<, off_t >I<offset>B<);>\n"
4670 "B<int munmap(void *>I<addr>B<, size_t >I<length>B<);>\n"
4671
4672 #. type: Plain text
4673 #: build/C/man2/mmap.2:61
4674 msgid ""
4675 "B<mmap>()  creates a new mapping in the virtual address space of the calling "
4676 "process.  The starting address for the new mapping is specified in I<addr>.  "
4677 "The I<length> argument specifies the length of the mapping."
4678 msgstr ""
4679 "B<mmap>()  は、新しいマッピングを呼び出し元プロセスの仮想アドレス空間に作成す"
4680 "る。 新しいマッピングの開始アドレスは I<addr> で指定される。マッピングの長さ"
4681 "は I<length> 引き数で指定される。"
4682
4683 #.  Before Linux 2.6.24, the address was rounded up to the next page
4684 #.  boundary; since 2.6.24, it is rounded down!
4685 #. type: Plain text
4686 #: build/C/man2/mmap.2:75
4687 msgid ""
4688 "If I<addr> is NULL, then the kernel chooses the address at which to create "
4689 "the mapping; this is the most portable method of creating a new mapping.  If "
4690 "I<addr> is not NULL, then the kernel takes it as a hint about where to place "
4691 "the mapping; on Linux, the mapping will be created at a nearby page "
4692 "boundary.  The address of the new mapping is returned as the result of the "
4693 "call."
4694 msgstr ""
4695 "I<addr> が NULL の場合、カーネルがマッピングを作成するアドレスを選択する。 こ"
4696 "の方法は最も移植性のある新しいマッピングの作成方法である。 I<addr> が NULL で"
4697 "ない場合、カーネルはマッピングをどこに配置するかのヒントとして I<addr> を使用"
4698 "する。Linux では、マッピングはすぐ近くのページ境界に作成される。 新しいマッピ"
4699 "ングのアドレスは、呼び出しの返り値として返される。"
4700
4701 #. type: Plain text
4702 #: build/C/man2/mmap.2:87
4703 msgid ""
4704 "The contents of a file mapping (as opposed to an anonymous mapping; see "
4705 "B<MAP_ANONYMOUS> below), are initialized using I<length> bytes starting at "
4706 "offset I<offset> in the file (or other object) referred to by the file "
4707 "descriptor I<fd>.  I<offset> must be a multiple of the page size as returned "
4708 "by I<sysconf(_SC_PAGE_SIZE)>."
4709 msgstr ""
4710 "ファイルマッピングの内容は、 ファイルディスクリプタ I<fd> で参照されるファイ"
4711 "ル (もしくは他のオブジェクト) のオフセット I<offset> から開始される "
4712 "I<length> バイトのデータで初期化される (ファイルマッピングは無名マッピングの"
4713 "反対語である。 B<MAP_ANONYMOUS> を参照)。 I<offset> は I<sysconf"
4714 "(_SC_PAGE_SIZE)> が返すページサイズの倍数でなければならない。"
4715
4716 #. type: Plain text
4717 #: build/C/man2/mmap.2:95
4718 msgid ""
4719 "The I<prot> argument describes the desired memory protection of the mapping "
4720 "(and must not conflict with the open mode of the file).  It is either "
4721 "B<PROT_NONE> or the bitwise OR of one or more of the following flags:"
4722 msgstr ""
4723 "引き数 I<prot> には、マッピングのメモリ保護をどのように行なうかを指定する "
4724 "(ファイルのオープンモードと矛盾してはいけない)。 I<prot> には、 B<PROT_NONE> "
4725 "か、以下のフラグをひとつ以上ビット毎の論理和 (OR) をとったものを 指定できる。"
4726
4727 #. type: TP
4728 #: build/C/man2/mmap.2:95 build/C/man2/mprotect.2:67
4729 #, no-wrap
4730 msgid "B<PROT_EXEC>"
4731 msgstr "B<PROT_EXEC>"
4732
4733 #. type: Plain text
4734 #: build/C/man2/mmap.2:98
4735 msgid "Pages may be executed."
4736 msgstr "ページは実行可能である。"
4737
4738 #. type: TP
4739 #: build/C/man2/mmap.2:98 build/C/man2/mprotect.2:61
4740 #, no-wrap
4741 msgid "B<PROT_READ>"
4742 msgstr "B<PROT_READ>"
4743
4744 #. type: Plain text
4745 #: build/C/man2/mmap.2:101
4746 msgid "Pages may be read."
4747 msgstr "ページは読み込み可能である。"
4748
4749 #. type: TP
4750 #: build/C/man2/mmap.2:101 build/C/man2/mprotect.2:64
4751 #, no-wrap
4752 msgid "B<PROT_WRITE>"
4753 msgstr "B<PROT_WRITE>"
4754
4755 #. type: Plain text
4756 #: build/C/man2/mmap.2:104
4757 msgid "Pages may be written."
4758 msgstr "ページに書き込み可能である。"
4759
4760 #. type: TP
4761 #: build/C/man2/mmap.2:104 build/C/man2/mprotect.2:58
4762 #, no-wrap
4763 msgid "B<PROT_NONE>"
4764 msgstr "B<PROT_NONE>"
4765
4766 #. type: Plain text
4767 #: build/C/man2/mmap.2:107
4768 msgid "Pages may not be accessed."
4769 msgstr "ページにはアクセスできない。"
4770
4771 #. type: Plain text
4772 #: build/C/man2/mmap.2:116
4773 msgid ""
4774 "The I<flags> argument determines whether updates to the mapping are visible "
4775 "to other processes mapping the same region, and whether updates are carried "
4776 "through to the underlying file.  This behavior is determined by including "
4777 "exactly one of the following values in I<flags>:"
4778 msgstr ""
4779 "I<flags> 引き数により、マッピングに対する更新が同じ領域をマッピングしている "
4780 "他のプロセスに見えるか、更新がマッピング元のファイルを通じて 伝えられるか、が"
4781 "決定される。この動作は、以下の値のいずれか一つだけ (複数は指定できない) を "
4782 "I<flags> に含めることで指定する。"
4783
4784 #. type: TP
4785 #: build/C/man2/mmap.2:116
4786 #, no-wrap
4787 msgid "B<MAP_SHARED>"
4788 msgstr "B<MAP_SHARED>"
4789
4790 #. type: Plain text
4791 #: build/C/man2/mmap.2:126
4792 msgid ""
4793 "Share this mapping.  Updates to the mapping are visible to other processes "
4794 "that map this file, and are carried through to the underlying file.  The "
4795 "file may not actually be updated until B<msync>(2)  or B<munmap>()  is "
4796 "called."
4797 msgstr ""
4798 "このマッピングを共有する。 マッピングに対する更新はこのファイルをマッピングし"
4799 "ている他のプロセス から見える。更新はマッピング元のファイルを通じて伝えられ"
4800 "る。 ただし、ファイルの実際の更新は B<msync>(2)  または B<munmap>()  が呼ばれ"
4801 "るまで行われないこともある。"
4802
4803 #. type: TP
4804 #: build/C/man2/mmap.2:126
4805 #, no-wrap
4806 msgid "B<MAP_PRIVATE>"
4807 msgstr "B<MAP_PRIVATE>"
4808
4809 #. type: Plain text
4810 #: build/C/man2/mmap.2:135
4811 msgid ""
4812 "Create a private copy-on-write mapping.  Updates to the mapping are not "
4813 "visible to other processes mapping the same file, and are not carried "
4814 "through to the underlying file.  It is unspecified whether changes made to "
4815 "the file after the B<mmap>()  call are visible in the mapped region."
4816 msgstr ""
4817 "プライベートな copy-on-write (書き込み時コピー) マップを生成する。 マッピング"
4818 "に対する更新は同じファイルをマッピングしている他のプロセス には見えず、更新が"
4819 "マッピング元のファイルを通じて伝えられることもない。 B<mmap>()  の呼び出し後"
4820 "にマッピング元のファイルに対して行われた変更が、 マップ領域に反映されるかどう"
4821 "かは規定されていない。"
4822
4823 #. type: Plain text
4824 #: build/C/man2/mmap.2:137
4825 msgid "Both of these flags are described in POSIX.1-2001."
4826 msgstr "上記の二つのフラグは POSIX.1-2001 で規定されている。"
4827
4828 #. type: Plain text
4829 #: build/C/man2/mmap.2:140
4830 msgid ""
4831 "In addition, zero or more of the following values can be ORed in I<flags>:"
4832 msgstr ""
4833 "さらに、以下の値のうち 0 個以上をビット毎の論理和 (OR) で I<flags> に指定する"
4834 "ことができる。"
4835
4836 #. type: TP
4837 #: build/C/man2/mmap.2:140
4838 #, no-wrap
4839 msgid "B<MAP_32BIT> (since Linux 2.4.20, 2.6)"
4840 msgstr "B<MAP_32BIT> (Linux 2.4.20, 2.6 以降)"
4841
4842 #.  See http://lwn.net/Articles/294642 "Tangled up in threads", 19 Aug 08
4843 #. type: Plain text
4844 #: build/C/man2/mmap.2:156
4845 msgid ""
4846 "Put the mapping into the first 2 Gigabytes of the process address space.  "
4847 "This flag is only supported on x86-64, for 64-bit programs.  It was added to "
4848 "allow thread stacks to be allocated somewhere in the first 2GB of memory, so "
4849 "as to improve context-switch performance on some early 64-bit processors.  "
4850 "Modern x86-64 processors no longer have this performance problem, so use of "
4851 "this flag is not required on those systems.  The B<MAP_32BIT> flag is "
4852 "ignored when B<MAP_FIXED> is set."
4853 msgstr ""
4854 "マッピングをプロセスのアドレス空間の先頭 2 ギガバイト以内に配置する。 このフ"
4855 "ラグがサポートされているのは x86-64 アーキテクチャ上の 64 ビットプログラムの"
4856 "みである。 このフラグが追加されたのは、スレッドのスタックをメモリの先頭 2GB "
4857 "以内の どこかに割り当てることで、初期のいくつかの 64 ビットプロセッサにおけ"
4858 "る コンテキストスイッチの性能問題を改善するためである。 最近の x86-64 プロ"
4859 "セッサではこの性能問題はもはや存在せず、 そのようなシステムではこのフラグを使"
4860 "用する必要はない。 B<MAP_FIXED> がセットされている場合は、 B<MAP_32BIT> フラ"
4861 "グは無視される。"
4862
4863 #. type: TP
4864 #: build/C/man2/mmap.2:156
4865 #, no-wrap
4866 msgid "B<MAP_ANON>"
4867 msgstr "B<MAP_ANON>"
4868
4869 #. type: Plain text
4870 #: build/C/man2/mmap.2:161
4871 msgid "Synonym for B<MAP_ANONYMOUS>.  Deprecated."
4872 msgstr "B<MAP_ANONYMOUS> の同義語。非推奨。"
4873
4874 #. type: TP
4875 #: build/C/man2/mmap.2:161
4876 #, no-wrap
4877 msgid "B<MAP_ANONYMOUS>"
4878 msgstr "B<MAP_ANONYMOUS>"
4879
4880 #. type: Plain text
4881 #: build/C/man2/mmap.2:183
4882 msgid ""
4883 "The mapping is not backed by any file; its contents are initialized to "
4884 "zero.  The I<fd> and I<offset> arguments are ignored; however, some "
4885 "implementations require I<fd> to be -1 if B<MAP_ANONYMOUS> (or B<MAP_ANON>)  "
4886 "is specified, and portable applications should ensure this.  The use of "
4887 "B<MAP_ANONYMOUS> in conjunction with B<MAP_SHARED> is only supported on "
4888 "Linux since kernel 2.4."
4889 msgstr ""
4890 "マッピングはどのファイルとも関連付けされない。 マッピングの内容は 0 で初期化"
4891 "される。 引き数 I<fd> と I<offset> は無視される。 ただし、実装によっては "
4892 "B<MAP_ANONYMOUS> (もしくは B<MAP_ANON>)  が指定された場合、 I<fd> を -1 にす"
4893 "る必要があり、 移植性が必要なアプリケーションでは必ず I<fd> を -1 にすべきで"
4894 "ある。 B<MAP_ANONYMOUS> と B<MAP_SHARED> を組み合わせての利用は カーネル 2.4 "
4895 "以降の Linux でのみサポートされている。"
4896
4897 #. type: TP
4898 #: build/C/man2/mmap.2:183
4899 #, no-wrap
4900 msgid "B<MAP_DENYWRITE>"
4901 msgstr "B<MAP_DENYWRITE>"
4902
4903 #.  Introduced in 1.1.36, removed in 1.3.24.
4904 #. type: Plain text
4905 #: build/C/man2/mmap.2:191
4906 msgid ""
4907 "This flag is ignored.  (Long ago, it signaled that attempts to write to the "
4908 "underlying file should fail with B<ETXTBUSY>.  But this was a source of "
4909 "denial-of-service attacks.)"
4910 msgstr ""
4911 "このフラグは無視される (ずっと前は、マップ元のファイルへの書き込みを行おうと"
4912 "すると、エラー B<ETXTBUSY> で失敗するようにシグナルが設定されていたが、これ"
4913 "は denial-of-service (サービス拒否) 攻撃の原因となった)。"
4914
4915 #. type: TP
4916 #: build/C/man2/mmap.2:191
4917 #, no-wrap
4918 msgid "B<MAP_EXECUTABLE>"
4919 msgstr "B<MAP_EXECUTABLE>"
4920
4921 #.  Introduced in 1.1.38, removed in 1.3.24. Flag tested in proc_follow_link.
4922 #.  (Long ago, it signaled that the underlying file is an executable.
4923 #.  However, that information was not really used anywhere.)
4924 #.  Linus talked about DOS related to MAP_EXECUTABLE, but he was thinking of
4925 #.  MAP_DENYWRITE?
4926 #. type: Plain text
4927 #: build/C/man2/mmap.2:199
4928 msgid "This flag is ignored."
4929 msgstr "このフラグは無視される。"
4930
4931 #. type: TP
4932 #: build/C/man2/mmap.2:199
4933 #, no-wrap
4934 msgid "B<MAP_FILE>"
4935 msgstr "B<MAP_FILE>"
4936
4937 #.  On some systems, this was required as the opposite of
4938 #.  MAP_ANONYMOUS -- mtk, 1 May 2007
4939 #. type: Plain text
4940 #: build/C/man2/mmap.2:205
4941 msgid "Compatibility flag.  Ignored."
4942 msgstr "互換性のためのフラグ。無視される。"
4943
4944 #. type: TP
4945 #: build/C/man2/mmap.2:205
4946 #, no-wrap
4947 msgid "B<MAP_FIXED>"
4948 msgstr "B<MAP_FIXED>"
4949
4950 #. type: Plain text
4951 #: build/C/man2/mmap.2:223
4952 msgid ""
4953 "Don't interpret I<addr> as a hint: place the mapping at exactly that "
4954 "address.  I<addr> must be a multiple of the page size.  If the memory region "
4955 "specified by I<addr> and I<len> overlaps pages of any existing mapping(s), "
4956 "then the overlapped part of the existing mapping(s) will be discarded.  If "
4957 "the specified address cannot be used, B<mmap>()  will fail.  Because "
4958 "requiring a fixed address for a mapping is less portable, the use of this "
4959 "option is discouraged."
4960 msgstr ""
4961 "I<addr> をアドレスのヒントとして使用するのではなく、 I<addr> で指定されたアド"
4962 "レスをそのまま使用してマッピングを配置する。 I<addr> はページサイズの倍数でな"
4963 "ければならない。 I<addr> と I<len> で指定されたメモリ領域が既存のマッピングの"
4964 "ページと重なる場合、 既存のマッピングの重なった部分は捨てられる。 もし指定さ"
4965 "れたアドレスが使用できない場合、 B<mmap>()  は失敗する。 マッピングに対して固"
4966 "定アドレスを要求するのは移植性の面で劣るので、 このオプションは使用しないこと"
4967 "を推奨する。"
4968
4969 #. type: TP
4970 #: build/C/man2/mmap.2:223
4971 #, no-wrap
4972 msgid "B<MAP_GROWSDOWN>"
4973 msgstr "B<MAP_GROWSDOWN>"
4974
4975 #. type: Plain text
4976 #: build/C/man2/mmap.2:228
4977 msgid ""
4978 "Used for stacks.  Indicates to the kernel virtual memory system that the "
4979 "mapping should extend downward in memory."
4980 msgstr ""
4981 "スタック用に使用される。マッピングをメモリ内で逆向きに行うことを カーネル仮想"
4982 "メモリシステムに指示する。 (訳注:マッピングは通常はメモリ・アドレスが増加す"
4983 "る向きに行うが、 このオプションを指定すると逆向きにマッピングを行う)"
4984
4985 #. type: TP
4986 #: build/C/man2/mmap.2:228
4987 #, no-wrap
4988 msgid "B<MAP_HUGETLB> (since Linux 2.6.32)"
4989 msgstr "B<MAP_HUGETLB> (Linux 2.6.32 以降)"
4990
4991 #. type: Plain text
4992 #: build/C/man2/mmap.2:234
4993 msgid ""
4994 "Allocate the mapping using \"huge pages.\" See the kernel source file "
4995 "I<Documentation/vm/hugetlbpage.txt> for further information."
4996 msgstr ""
4997 "\"huge page\" を使ってマッピングを割り当てる。 詳しい情報は、カーネル・ソース"
4998 "の I<Documentation/vm/hugetlbpage.txt> を参照。"
4999
5000 #. type: TP
5001 #: build/C/man2/mmap.2:234
5002 #, no-wrap
5003 msgid "B<MAP_LOCKED> (since Linux 2.5.37)"
5004 msgstr "B<MAP_LOCKED> (Linux 2.5.37 以降)"
5005
5006 #.  If set, the mapped pages will not be swapped out.
5007 #. type: Plain text
5008 #: build/C/man2/mmap.2:240
5009 msgid ""
5010 "Lock the pages of the mapped region into memory in the manner of B<mlock>"
5011 "(2).  This flag is ignored in older kernels."
5012 msgstr ""
5013 "マップされた領域のページを B<mlock>(2)  の方法でメモリ内にロックする。 それ以"
5014 "前のカーネルでは、このフラグは無視される。"
5015
5016 #. type: TP
5017 #: build/C/man2/mmap.2:240
5018 #, no-wrap
5019 msgid "B<MAP_NONBLOCK> (since Linux 2.5.46)"
5020 msgstr "B<MAP_NONBLOCK> (Linux 2.5.46 以降)"
5021
5022 #. type: Plain text
5023 #: build/C/man2/mmap.2:255
5024 msgid ""
5025 "Only meaningful in conjunction with B<MAP_POPULATE>.  Don't perform read-"
5026 "ahead: only create page tables entries for pages that are already present in "
5027 "RAM.  Since Linux 2.6.23, this flag causes B<MAP_POPULATE> to do nothing.  "
5028 "One day the combination of B<MAP_POPULATE> and B<MAP_NONBLOCK> may be "
5029 "reimplemented."
5030 msgstr ""
5031 "B<MAP_POPULATE> と組み合わせた場合のみ意味を持つ。 read-ahead (前もって読み込"
5032 "むこと) を実行しない。 単に、すでに RAM 上に存在するページに対して ページテー"
5033 "ブルエントリを作成するだけである。 Linux 2.6.23 以降では、このフラグは "
5034 "B<MAP_POPULATE> に何の影響も与えない。 いつか B<MAP_POPULATE> と "
5035 "B<MAP_NONBLOCK> を組み合わせた場合の動作は実装し直されるかもしれない。"
5036
5037 #. type: TP
5038 #: build/C/man2/mmap.2:255
5039 #, no-wrap
5040 msgid "B<MAP_NORESERVE>"
5041 msgstr "B<MAP_NORESERVE>"
5042
5043 #. type: Plain text
5044 #: build/C/man2/mmap.2:270
5045 msgid ""
5046 "Do not reserve swap space for this mapping.  When swap space is reserved, "
5047 "one has the guarantee that it is possible to modify the mapping.  When swap "
5048 "space is not reserved one might get B<SIGSEGV> upon a write if no physical "
5049 "memory is available.  See also the discussion of the file I</proc/sys/vm/"
5050 "overcommit_memory> in B<proc>(5).  In kernels before 2.6, this flag only had "
5051 "effect for private writable mappings."
5052 msgstr ""
5053 "このマッピングに対するスワップ空間の予約を行わない。 スワップ空間を予約した場"
5054 "合は、このマッピングの変更が必ず可能なことが 保証される。予約を行わなかった場"
5055 "合、物理メモリに空きがないと 書き込み時に B<SIGSEGV> エラーを受け取ることがあ"
5056 "る。 B<proc>(5)  の I</proc/sys/vm/overcommit_memory> ファイルについての議論"
5057 "も参照。 バージョン 2.6 より前のカーネルでは、このフラグは書き込み可能な プラ"
5058 "イベート・マッピングについてのみ効果があった。"
5059
5060 #. type: TP
5061 #: build/C/man2/mmap.2:270
5062 #, no-wrap
5063 msgid "B<MAP_POPULATE> (since Linux 2.5.46)"
5064 msgstr "B<MAP_POPULATE> (Linux 2.5.46 以降)"
5065
5066 #. type: Plain text
5067 #: build/C/man2/mmap.2:277
5068 msgid ""
5069 "Populate (prefault) page tables for a mapping.  For a file mapping, this "
5070 "causes read-ahead on the file.  Later accesses to the mapping will not be "
5071 "blocked by page faults.  B<MAP_POPULATE> is only supported for private "
5072 "mappings since Linux 2.6.23."
5073 msgstr ""
5074 "マッピング用のページテーブルを配置 (populate) する ファイルマッピングの場合に"
5075 "は、これによりファイルが先読み (read-ahead)  が行われる。この以後は、マッピン"
5076 "グに対するアクセスがページフォールトで ブロックされることがなくなる。 "
5077 "B<MAP_POPULATE> は Linux 2.6.23 以降でプライベート・マッピングについてのみ サ"
5078 "ポートされている。"
5079
5080 #. type: TP
5081 #: build/C/man2/mmap.2:277
5082 #, no-wrap
5083 msgid "B<MAP_STACK> (since Linux 2.6.27)"
5084 msgstr "B<MAP_STACK> (Linux 2.6.27 以降)"
5085
5086 #.  See http://lwn.net/Articles/294642 "Tangled up in threads", 19 Aug 08
5087 #.  commit cd98a04a59e2f94fa64d5bf1e26498d27427d5e7
5088 #.  http://thread.gmane.org/gmane.linux.kernel/720412
5089 #.  "pthread_create() slow for many threads; also time to revisit 64b
5090 #.   context switch optimization?"
5091 #. type: Plain text
5092 #: build/C/man2/mmap.2:290
5093 msgid ""
5094 "Allocate the mapping at an address suitable for a process or thread stack.  "
5095 "This flag is currently a no-op, but is used in the glibc threading "
5096 "implementation so that if some architectures require special treatment for "
5097 "stack allocations, support can later be transparently implemented for glibc."
5098 msgstr ""
5099 "プロセスやスレッドのスタックに適したアドレスにマッピングを割り当てる。 現在の"
5100 "ところ、このフラグは何もしないが、 glibc のスレッド実装では使用されている。 "
5101 "これは、いくつかのアーキテクチャではスタックの割り当てに関して特別な扱い が必"
5102 "要な場合に、glibc にそのサポートを後で透過的に実装できるようにする ためであ"
5103 "る。"
5104
5105 #. type: TP
5106 #: build/C/man2/mmap.2:290
5107 #, no-wrap
5108 msgid "B<MAP_UNINITIALIZED> (since Linux 2.6.33)"
5109 msgstr "B<MAP_UNINITIALIZED> (Linux 2.6.33 以降)"
5110
5111 #. type: Plain text
5112 #: build/C/man2/mmap.2:300
5113 msgid ""
5114 "Don't clear anonymous pages.  This flag is intended to improve performance "
5115 "on embedded devices.  This flag is only honored if the kernel was configured "
5116 "with the B<CONFIG_MMAP_ALLOW_UNINITIALIZED> option.  Because of the security "
5117 "implications, that option is normally enabled only on embedded devices (i."
5118 "e., devices where one has complete control of the contents of user memory)."
5119 msgstr ""
5120 "無名ページ (anonymous page) のクリアを行わない。このフラグは組み込みデバイ"
5121 "ス\n"
5122 "での性能向上を目的に作られてものである。カーネルの設定で\n"
5123 "B<CONFIG_MMAP_ALLOW_UNINITIALIZED> オプションが有効になっている場合のみ、\n"
5124 "このフラグは効果を持つ。\n"
5125 "セキュリティ面の考慮から、このオプションは通常組み込みデバイス (すなわち、\n"
5126 "ユーザメモリの内容を完全に制御化におけるデバイス) においてのみ有効にされる。"
5127
5128 #. type: Plain text
5129 #: build/C/man2/mmap.2:308
5130 msgid ""
5131 "Of the above flags, only B<MAP_FIXED> is specified in POSIX.1-2001.  "
5132 "However, most systems also support B<MAP_ANONYMOUS> (or its synonym "
5133 "B<MAP_ANON>)."
5134 msgstr ""
5135 "上記のフラグの中では、 B<MAP_FIXED> だけが POSIX.1-2001 で規定されている。 し"
5136 "かしながら、ほとんどのシステムで B<MAP_ANONYMOUS> (またはその同義語である "
5137 "B<MAP_ANON>)  もサポートされている。"
5138
5139 #. type: Plain text
5140 #: build/C/man2/mmap.2:315
5141 msgid ""
5142 "Some systems document the additional flags B<MAP_AUTOGROW>, "
5143 "B<MAP_AUTORESRV>, B<MAP_COPY>, and B<MAP_LOCAL>."
5144 msgstr ""
5145 "いくつかのシステムでは、上記以外にフラグとして B<MAP_AUTOGROW>, "
5146 "B<MAP_AUTORESRV>, B<MAP_COPY>, B<MAP_LOCAL> が規定されている。"
5147
5148 #. type: Plain text
5149 #: build/C/man2/mmap.2:321
5150 msgid ""
5151 "Memory mapped by B<mmap>()  is preserved across B<fork>(2), with the same "
5152 "attributes."
5153 msgstr ""
5154 "B<mmap>()  によってマップされたメモリの属性は B<fork>(2)  の際に継承される。"
5155
5156 #. type: Plain text
5157 #: build/C/man2/mmap.2:329
5158 msgid ""
5159 "A file is mapped in multiples of the page size.  For a file that is not a "
5160 "multiple of the page size, the remaining memory is zeroed when mapped, and "
5161 "writes to that region are not written out to the file.  The effect of "
5162 "changing the size of the underlying file of a mapping on the pages that "
5163 "correspond to added or removed regions of the file is unspecified."
5164 msgstr ""
5165 "ファイルはページサイズの整数倍の領域にマップされる。サイズがページサイズの 整"
5166 "数倍でないファイルの場合、マップ時に残りの領域は 0 で埋められ、この領域へ 書"
5167 "きこみを行ってもファイルに書き出されることはない。マッピングを行った元 ファイ"
5168 "ルのサイズを変更した場合、元ファイルの追加されたり削除された領域に対応 する"
5169 "マップされたページに対してどのような影響があるかは規定されていない。"
5170
5171 #. type: SS
5172 #: build/C/man2/mmap.2:329
5173 #, no-wrap
5174 msgid "munmap()"
5175 msgstr "munmap()"
5176
5177 #. type: Plain text
5178 #: build/C/man2/mmap.2:339
5179 msgid ""
5180 "The B<munmap>()  system call deletes the mappings for the specified address "
5181 "range, and causes further references to addresses within the range to "
5182 "generate invalid memory references.  The region is also automatically "
5183 "unmapped when the process is terminated.  On the other hand, closing the "
5184 "file descriptor does not unmap the region."
5185 msgstr ""
5186 "システムコール B<munmap>()  は指定されたアドレス範囲のマップを消去し、 これ以"
5187 "降のその範囲内へのメモリ参照は不正となる。 この領域は、プロセスが終了したとき"
5188 "にも自動的にアンマップされる。 一方、ファイル記述子をクローズしても、この領域"
5189 "はアンマップされない。"
5190
5191 #. type: Plain text
5192 #: build/C/man2/mmap.2:349
5193 msgid ""
5194 "The address I<addr> must be a multiple of the page size.  All pages "
5195 "containing a part of the indicated range are unmapped, and subsequent "
5196 "references to these pages will generate B<SIGSEGV>.  It is not an error if "
5197 "the indicated range does not contain any mapped pages."
5198 msgstr ""
5199 "I<addr> アドレスはページサイズの整数倍でなければならない。指定された範囲の一"
5200 "部分を 含む全てのページはアンマップされ、これ以降にこれらのページへの参照があ"
5201 "ると B<SIGSEGV> が発生する。 指定した範囲内にマップされたページが一つも含まれ"
5202 "ていない場合でも エラーにならない。"
5203
5204 #. type: SS
5205 #: build/C/man2/mmap.2:349
5206 #, no-wrap
5207 msgid "Timestamps changes for file-backed mappings"
5208 msgstr "ファイルと関連付けられたマッピングに対するタイムスタンプの更新"
5209
5210 #. type: Plain text
5211 #: build/C/man2/mmap.2:356
5212 msgid ""
5213 "For file-backed mappings, the I<st_atime> field for the mapped file may be "
5214 "updated at any time between the B<mmap>()  and the corresponding unmapping; "
5215 "the first reference to a mapped page will update the field if it has not "
5216 "been already."
5217 msgstr ""
5218 "ファイルと関連付けられたマッピングの場合、マッピングされたファイルの "
5219 "I<st_atime> フィールドは、 B<mmap>()  されてからアンマップ (unmap) されるまで"
5220 "の間に更新されることがある。 それまでに更新が行われていなければ、マップされた"
5221 "ページへの最初の参照があった 際に更新される。"
5222
5223 #. type: Plain text
5224 #: build/C/man2/mmap.2:373
5225 msgid ""
5226 "The I<st_ctime> and I<st_mtime> field for a file mapped with B<PROT_WRITE> "
5227 "and B<MAP_SHARED> will be updated after a write to the mapped region, and "
5228 "before a subsequent B<msync>(2)  with the B<MS_SYNC> or B<MS_ASYNC> flag, if "
5229 "one occurs."
5230 msgstr ""
5231 "B<PROT_WRITE> と B<MAP_SHARED> の両方を指定してマップされたファイルの場合、書"
5232 "き込みがあると、 I<st_ctime> と I<st_mtime> の両フィールドは、マップされた領"
5233 "域への書き込みより後で、 B<MS_SYNC> または B<MS_ASYNC> フラグを指定して "
5234 "B<msync>(2)  が呼ばれる前までに更新される。"
5235
5236 #. type: Plain text
5237 #: build/C/man2/mmap.2:390
5238 msgid ""
5239 "On success, B<mmap>()  returns a pointer to the mapped area.  On error, the "
5240 "value B<MAP_FAILED> (that is, I<(void\\ *)\\ -1>)  is returned, and I<errno> "
5241 "is set appropriately.  On success, B<munmap>()  returns 0, on failure -1, "
5242 "and I<errno> is set (probably to B<EINVAL>)."
5243 msgstr ""
5244 "B<mmap>()  は成功するとマップされた領域へのポインタを返す。 失敗すると値 "
5245 "B<MAP_FAILED> (つまり I<(void\\ *)\\ -1>)  を返し、 I<errno> がエラーの内容に"
5246 "したがってセットされる。 B<munmap>()  は成功すると 0 を返す。失敗すると -1 を"
5247 "返し、 I<errno> がセットされる (多くの場合 B<EINVAL> になるだろう)。"
5248
5249 #. type: TP
5250 #: build/C/man2/mmap.2:391 build/C/man2/mprotect.2:80
5251 #: build/C/man3/shm_open.3:185 build/C/man3/shm_open.3:190
5252 #: build/C/man2/shmctl.2:295 build/C/man2/shmget.2:186
5253 #: build/C/man2/shmop.2:189
5254 #, no-wrap
5255 msgid "B<EACCES>"
5256 msgstr "B<EACCES>"
5257
5258 #. type: Plain text
5259 #: build/C/man2/mmap.2:411
5260 msgid ""
5261 "A file descriptor refers to a non-regular file.  Or B<MAP_PRIVATE> was "
5262 "requested, but I<fd> is not open for reading.  Or B<MAP_SHARED> was "
5263 "requested and B<PROT_WRITE> is set, but I<fd> is not open in read/write "
5264 "(B<O_RDWR>)  mode.  Or B<PROT_WRITE> is set, but the file is append-only."
5265 msgstr ""
5266 "以下のいずれかの場合。 ファイル記述子の参照先が通常のファイルではない (non-"
5267 "regular file) 。 B<MAP_PRIVATE> を要求したが I<fd> は読み込み用にオープンされ"
5268 "ていない。 B<MAP_SHARED> を要求して B<PROT_WRITE> をセットしたが I<fd> は読み"
5269 "書きモード (B<O_RDWR>)  でオープンされていない、 B<PROT_WRITE> をセットした"
5270 "が、ファイルは追加 (append) 専用である。"
5271
5272 #. type: Plain text
5273 #: build/C/man2/mmap.2:415
5274 msgid ""
5275 "The file has been locked, or too much memory has been locked (see "
5276 "B<setrlimit>(2))."
5277 msgstr ""
5278 "ファイルがロックされている。またはロックされているメモリが多すぎる "
5279 "(B<setrlimit>(2)  を参照)。"
5280
5281 #. type: Plain text
5282 #: build/C/man2/mmap.2:421
5283 msgid ""
5284 "I<fd> is not a valid file descriptor (and B<MAP_ANONYMOUS> was not set)."
5285 msgstr ""
5286 "I<fd> が有効なファイル記述子 (file descriptor) ではない (かつ "
5287 "B<MAP_ANONYMOUS> がセットされていない)。"
5288
5289 #. type: Plain text
5290 #: build/C/man2/mmap.2:429
5291 msgid ""
5292 "We don't like I<addr>, I<length>, or I<offset> (e.g., they are too large, or "
5293 "not aligned on a page boundary)."
5294 msgstr ""
5295 "I<addr> か I<length> か I<offset> が適切でない (例えば、大きすぎるとか、ペー"
5296 "ジ境界にアラインメントされていない)。"
5297
5298 #. type: Plain text
5299 #: build/C/man2/mmap.2:434
5300 msgid "(since Linux 2.6.12)  I<length> was 0."
5301 msgstr "(Linux 2.6.12 以降)  I<length> が 0 であった。"
5302
5303 #. type: Plain text
5304 #: build/C/man2/mmap.2:442
5305 msgid ""
5306 "I<flags> contained neither B<MAP_PRIVATE> or B<MAP_SHARED>, or contained "
5307 "both of these values."
5308 msgstr ""
5309 "I<flags> に B<MAP_PRIVATE> と B<MAP_SHARED> のどちらも含まれていなかった、も"
5310 "しくは その両方が含まれていた。"
5311
5312 #. type: TP
5313 #: build/C/man2/mmap.2:442 build/C/man3/shm_open.3:227
5314 #: build/C/man2/shmget.2:202
5315 #, no-wrap
5316 msgid "B<ENFILE>"
5317 msgstr "B<ENFILE>"
5318
5319 #.  [2.6.7] shmem_zero_setup()-->shmem_file_setup()-->get_empty_filp()
5320 #. type: Plain text
5321 #: build/C/man2/mmap.2:450 build/C/man2/shmget.2:206
5322 msgid "The system limit on the total number of open files has been reached."
5323 msgstr "システム全体でオープンされているファイルの総数が上限に達した。"
5324
5325 #. type: Plain text
5326 #: build/C/man2/mmap.2:454
5327 msgid ""
5328 "The underlying file system of the specified file does not support memory "
5329 "mapping."
5330 msgstr ""
5331 "指定されたファイルが置かれているファイルシステムがメモリマッピングをサポート "
5332 "していない。"
5333
5334 #. type: Plain text
5335 #: build/C/man2/mmap.2:458
5336 msgid ""
5337 "No memory is available, or the process's maximum number of mappings would "
5338 "have been exceeded."
5339 msgstr ""
5340 "メモリに空きがない、または処理中のプロセスのマッピング数が最大数を超過した。"
5341
5342 #.  (Since 2.4.25 / 2.6.0.)
5343 #. type: Plain text
5344 #: build/C/man2/mmap.2:467
5345 msgid ""
5346 "The I<prot> argument asks for B<PROT_EXEC> but the mapped area belongs to a "
5347 "file on a file system that was mounted no-exec."
5348 msgstr ""
5349 "I<prot> 引き数は B<PROT_EXEC> を行うように指定されているが、 no-exec でマウン"
5350 "トされたファイルシステム上のファイルに マップ領域が対応している。"
5351
5352 #. type: TP
5353 #: build/C/man2/mmap.2:467
5354 #, no-wrap
5355 msgid "B<ETXTBSY>"
5356 msgstr "B<ETXTBSY>"
5357
5358 #. type: Plain text
5359 #: build/C/man2/mmap.2:473
5360 msgid ""
5361 "B<MAP_DENYWRITE> was set but the object specified by I<fd> is open for "
5362 "writing."
5363 msgstr ""
5364 "B<MAP_DENYWRITE> がセットされているが I<fd> で指定されているオブジェクトは書"
5365 "き込み用に開かれている。"
5366
5367 #. type: Plain text
5368 #: build/C/man2/mmap.2:475
5369 msgid "Use of a mapped region can result in these signals:"
5370 msgstr "マップ領域を利用する際に、以下のシグナルが発生することがある:"
5371
5372 #. type: TP
5373 #: build/C/man2/mmap.2:475
5374 #, no-wrap
5375 msgid "B<SIGSEGV>"
5376 msgstr "B<SIGSEGV>"
5377
5378 #. type: Plain text
5379 #: build/C/man2/mmap.2:478
5380 msgid "Attempted write into a region mapped as read-only."
5381 msgstr "読み込み専用で mmap された領域へ書き込みを行おうとした。"
5382
5383 #. type: TP
5384 #: build/C/man2/mmap.2:478
5385 #, no-wrap
5386 msgid "B<SIGBUS>"
5387 msgstr "B<SIGBUS>"
5388
5389 #. type: Plain text
5390 #: build/C/man2/mmap.2:483
5391 msgid ""
5392 "Attempted access to a portion of the buffer that does not correspond to the "
5393 "file (for example, beyond the end of the file, including the case where "
5394 "another process has truncated the file)."
5395 msgstr ""
5396 "バッファのうち、ファイルに関連づけられていない部分 (例えばファイル末尾を越え"
5397 "た部分など。これには 他のプロセスがファイルを切り詰めた場合なども含まれる)  "
5398 "にアクセスしようとした。"
5399
5400 #.  SVr4 documents additional error codes ENXIO and ENODEV.
5401 #.  SUSv2 documents additional error codes EMFILE and EOVERFLOW.
5402 #. type: Plain text
5403 #: build/C/man2/mmap.2:487
5404 msgid "SVr4, 4.4BSD, POSIX.1-2001."
5405 msgstr "SVr4, 4.4BSD, POSIX.1-2001."
5406
5407 #.  POSIX.1-2001: It shall be defined to -1 or 0 or 200112L.
5408 #.  -1: unavailable, 0: ask using sysconf().
5409 #.  glibc defines it to 1.
5410 #. type: Plain text
5411 #: build/C/man2/mmap.2:501
5412 msgid ""
5413 "On POSIX systems on which B<mmap>(), B<msync>(2)  and B<munmap>()  are "
5414 "available, B<_POSIX_MAPPED_FILES> is defined in I<E<lt>unistd.hE<gt>> to a "
5415 "value greater than 0.  (See also B<sysconf>(3).)"
5416 msgstr ""
5417 "B<mmap>(), B<msync>(2)  B<munmap>()  が利用可能な POSIX システムでは、 "
5418 "B<_POSIX_MAPPED_FILES> は E<lt>unistd.hE<gt> で 0 より大きな値に定義される "
5419 "(B<sysconf>(3)  も参照のこと)。"
5420
5421 #.  Since around glibc 2.1/2.2, depending on the platform.
5422 #. type: Plain text
5423 #: build/C/man2/mmap.2:516
5424 msgid ""
5425 "This page describes the interface provided by the glibc B<mmap>()  wrapper "
5426 "function.  Originally, this function invoked a system call of the same "
5427 "name.  Since kernel 2.4, that system call has been superseded by B<mmap2>"
5428 "(2), and nowadays the glibc B<mmap>()  wrapper function invokes B<mmap2>(2)  "
5429 "with a suitably adjusted value for I<offset>."
5430 msgstr ""
5431 "このページでは glibc の B<mmap>() のラッパー関数が提供するインターフェース"
5432 "に\n"
5433 "ついて説明している。元々は、この関数は同じ名前のシステムコールを起動してい"
5434 "た。\n"
5435 "カーネル 2.4 以降、このシステムコールは B<mmap2>(2) に取って代わられ、現在\n"
5436 "では、 glibc の B<mmap>() のラッパー関数は I<offset> を適切に調整してから\n"
5437 "B<mmap2>(2) を起動する。"
5438
5439 #. type: Plain text
5440 #: build/C/man2/mmap.2:529
5441 msgid ""
5442 "On some hardware architectures (e.g., i386), B<PROT_WRITE> implies "
5443 "B<PROT_READ>.  It is architecture dependent whether B<PROT_READ> implies "
5444 "B<PROT_EXEC> or not.  Portable programs should always set B<PROT_EXEC> if "
5445 "they intend to execute code in the new mapping."
5446 msgstr ""
5447 "(i386 などの) いくつかのアーキテクチャでは、 B<PROT_WRITE> をセットすると、暗"
5448 "黙のうちに B<PROT_READ> がセットされる。 B<PROT_READ> をセットした際に暗黙の"
5449 "うちに B<PROT_EXEC> がセットされるかどうかは、アーキテクチャ依存である。 移植"
5450 "性を考慮したプログラムでは、 新規にマップした領域でコードを実行したい場合は、"
5451 "常に B<PROT_EXEC> をセットすべきである。"
5452
5453 #. type: Plain text
5454 #: build/C/man2/mmap.2:544
5455 msgid ""
5456 "The portable way to create a mapping is to specify I<addr> as 0 (NULL), and "
5457 "omit B<MAP_FIXED> from I<flags>.  In this case, the system chooses the "
5458 "address for the mapping; the address is chosen so as not to conflict with "
5459 "any existing mapping, and will not be 0.  If the B<MAP_FIXED> flag is "
5460 "specified, and I<addr> is 0 (NULL), then the mapped address will be 0 (NULL)."
5461 msgstr ""
5462 "マッピングを作成する移植性のある方法は、 I<addr> に 0 (NULL) を指定し、 "
5463 "I<flags> から B<MAP_FIXED> を外すことである。 この場合、システムがマッピング"
5464 "用のアドレスの選択を行う。 アドレスは既存のマッピングと衝突しないように、 か"
5465 "つ 0 にならないように選択される。 B<MAP_FIXED> フラグが指定され、かつ "
5466 "I<addr> が 0 (NULL)  の場合には、マップされるアドレスが 0 (NULL) になる。"
5467
5468 #. type: Plain text
5469 #: build/C/man2/mmap.2:549
5470 msgid ""
5471 "On Linux there are no guarantees like those suggested above under "
5472 "B<MAP_NORESERVE>.  By default, any process can be killed at any moment when "
5473 "the system runs out of memory."
5474 msgstr ""
5475 "Linux においては、上記の B<MAP_NORESERVE> で述べられているような保証はない。 "
5476 "デフォルトでは、システムがメモリを使い切った場合には、 どのプロセスがいつ強制"
5477 "終了されるか分からないからである。"
5478
5479 #. type: Plain text
5480 #: build/C/man2/mmap.2:556
5481 msgid ""
5482 "In kernels before 2.6.7, the B<MAP_POPULATE> flag only has effect if I<prot> "
5483 "is specified as B<PROT_NONE>."
5484 msgstr ""
5485 "2.6.7 より前のカーネルでは、 I<prot> に B<PROT_NONE> が指定された場合にの"
5486 "み、 B<MAP_POPULATE> フラグが効力を持つ。"
5487
5488 #. type: Plain text
5489 #: build/C/man2/mmap.2:571
5490 msgid ""
5491 "SUSv3 specifies that B<mmap>()  should fail if I<length> is 0.  However, in "
5492 "kernels before 2.6.12, B<mmap>()  succeeded in this case: no mapping was "
5493 "created and the call returned I<addr>.  Since kernel 2.6.12, B<mmap>()  "
5494 "fails with the error B<EINVAL> for this case."
5495 msgstr ""
5496 "SUSv3 では、 I<length> が 0 の場合、 B<mmap>()  は失敗すると規定されている。"
5497 "しかしながら、2.6.12 より前のカーネルでは、 この場合に B<mmap>()  は成功して"
5498 "いた (マッピングは作成されず、 I<addr> が返されていた)。 カーネル 2.6.12 以降"
5499 "では、 B<mmap>()  はエラー B<EINVAL> で失敗する。"
5500
5501 #. type: Plain text
5502 #: build/C/man2/mmap.2:583
5503 msgid ""
5504 "The following program prints part of the file specified in its first command-"
5505 "line argument to standard output.  The range of bytes to be printed is "
5506 "specified via offset and length values in the second and third command-line "
5507 "arguments.  The program creates a memory mapping of the required pages of "
5508 "the file and then uses B<write>(2)  to output the desired bytes."
5509 msgstr ""
5510 "以下のプログラムは、一番目のコマンドライン引き数で指定された ファイルの一部を"
5511 "標準出力に表示する。 表示する範囲は、二番目、三番目のコマンドライン引き数で渡"
5512 "される オフセットと長さで指定される。 このプログラムは、指定されたファイルの"
5513 "必要なページのメモリ・ マッピングを作成し、 B<write>(2)  を使って所望のバイト"
5514 "を出力する。"
5515
5516 #. type: Plain text
5517 #: build/C/man2/mmap.2:591
5518 #, no-wrap
5519 msgid ""
5520 "#include E<lt>sys/mman.hE<gt>\n"
5521 "#include E<lt>sys/stat.hE<gt>\n"
5522 "#include E<lt>fcntl.hE<gt>\n"
5523 "#include E<lt>stdio.hE<gt>\n"
5524 "#include E<lt>stdlib.hE<gt>\n"
5525 "#include E<lt>unistd.hE<gt>\n"
5526 msgstr ""
5527 "#include E<lt>sys/mman.hE<gt>\n"
5528 "#include E<lt>sys/stat.hE<gt>\n"
5529 "#include E<lt>fcntl.hE<gt>\n"
5530 "#include E<lt>stdio.hE<gt>\n"
5531 "#include E<lt>stdlib.hE<gt>\n"
5532 "#include E<lt>unistd.hE<gt>\n"
5533
5534 #. type: Plain text
5535 #: build/C/man2/mmap.2:594 build/C/man2/mprotect.2:172
5536 #, no-wrap
5537 msgid ""
5538 "#define handle_error(msg) \\e\n"
5539 "    do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
5540 msgstr ""
5541 "#define handle_error(msg) \\e\n"
5542 "    do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
5543
5544 #. type: Plain text
5545 #: build/C/man2/mmap.2:604
5546 #, no-wrap
5547 msgid ""
5548 "int\n"
5549 "main(int argc, char *argv[])\n"
5550 "{\n"
5551 "    char *addr;\n"
5552 "    int fd;\n"
5553 "    struct stat sb;\n"
5554 "    off_t offset, pa_offset;\n"
5555 "    size_t length;\n"
5556 "    ssize_t s;\n"
5557 msgstr ""
5558 "int\n"
5559 "main(int argc, char *argv[])\n"
5560 "{\n"
5561 "    char *addr;\n"
5562 "    int fd;\n"
5563 "    struct stat sb;\n"
5564 "    off_t offset, pa_offset;\n"
5565 "    size_t length;\n"
5566 "    ssize_t s;\n"
5567
5568 #. type: Plain text
5569 #: build/C/man2/mmap.2:609
5570 #, no-wrap
5571 msgid ""
5572 "    if (argc E<lt> 3 || argc E<gt> 4) {\n"
5573 "        fprintf(stderr, \"%s file offset [length]\\en\", argv[0]);\n"
5574 "        exit(EXIT_FAILURE);\n"
5575 "    }\n"
5576 msgstr ""
5577 "    if (argc E<lt> 3 || argc E<gt> 4) {\n"
5578 "        fprintf(stderr, \"%s file offset [length]\\en\", argv[0]);\n"
5579 "        exit(EXIT_FAILURE);\n"
5580 "    }\n"
5581
5582 #. type: Plain text
5583 #: build/C/man2/mmap.2:613
5584 #, no-wrap
5585 msgid ""
5586 "    fd = open(argv[1], O_RDONLY);\n"
5587 "    if (fd == -1)\n"
5588 "        handle_error(\"open\");\n"
5589 msgstr ""
5590 "    fd = open(argv[1], O_RDONLY);\n"
5591 "    if (fd == -1)\n"
5592 "        handle_error(\"open\");\n"
5593
5594 #. type: Plain text
5595 #: build/C/man2/mmap.2:616
5596 #, no-wrap
5597 msgid ""
5598 "    if (fstat(fd, &sb) == -1)           /* To obtain file size */\n"
5599 "        handle_error(\"fstat\");\n"
5600 msgstr ""
5601 "    if (fstat(fd, &sb) == -1)           /* To obtain file size */\n"
5602 "        handle_error(\"fstat\");\n"
5603
5604 #. type: Plain text
5605 #: build/C/man2/mmap.2:620
5606 #, no-wrap
5607 msgid ""
5608 "    offset = atoi(argv[2]);\n"
5609 "    pa_offset = offset & ~(sysconf(_SC_PAGE_SIZE) - 1);\n"
5610 "        /* offset for mmap() must be page aligned */\n"
5611 msgstr ""
5612 "    offset = atoi(argv[2]);\n"
5613 "    pa_offset = offset & ~(sysconf(_SC_PAGE_SIZE) - 1);\n"
5614 "        /* offset for mmap() must be page aligned */\n"
5615
5616 #. type: Plain text
5617 #: build/C/man2/mmap.2:625
5618 #, no-wrap
5619 msgid ""
5620 "    if (offset E<gt>= sb.st_size) {\n"
5621 "        fprintf(stderr, \"offset is past end of file\\en\");\n"
5622 "        exit(EXIT_FAILURE);\n"
5623 "    }\n"
5624 msgstr ""
5625 "    if (offset E<gt>= sb.st_size) {\n"
5626 "        fprintf(stderr, \"offset is past end of file\\en\");\n"
5627 "        exit(EXIT_FAILURE);\n"
5628 "    }\n"
5629
5630 #. type: Plain text
5631 #: build/C/man2/mmap.2:631
5632 #, no-wrap
5633 msgid ""
5634 "    if (argc == 4) {\n"
5635 "        length = atoi(argv[3]);\n"
5636 "        if (offset + length E<gt> sb.st_size)\n"
5637 "            length = sb.st_size - offset;\n"
5638 "                /* Can\\(aqt display bytes past end of file */\n"
5639 msgstr ""
5640 "    if (argc == 4) {\n"
5641 "        length = atoi(argv[3]);\n"
5642 "        if (offset + length E<gt> sb.st_size)\n"
5643 "            length = sb.st_size - offset;\n"
5644 "                /* Can\\(aqt display bytes past end of file */\n"
5645
5646 #. type: Plain text
5647 #: build/C/man2/mmap.2:635
5648 #, no-wrap
5649 msgid ""
5650 "    } else {    /* No length arg ==E<gt> display to end of file */\n"
5651 "        length = sb.st_size - offset;\n"
5652 "    }\n"
5653 msgstr ""
5654 "    } else {    /* No length arg ==E<gt> display to end of file */\n"
5655 "        length = sb.st_size - offset;\n"
5656 "    }\n"
5657
5658 #. type: Plain text
5659 #: build/C/man2/mmap.2:640
5660 #, no-wrap
5661 msgid ""
5662 "    addr = mmap(NULL, length + offset - pa_offset, PROT_READ,\n"
5663 "                MAP_PRIVATE, fd, pa_offset);\n"
5664 "    if (addr == MAP_FAILED)\n"
5665 "        handle_error(\"mmap\");\n"
5666 msgstr ""
5667 "    addr = mmap(NULL, length + offset - pa_offset, PROT_READ,\n"
5668 "                MAP_PRIVATE, fd, pa_offset);\n"
5669 "    if (addr == MAP_FAILED)\n"
5670 "        handle_error(\"mmap\");\n"
5671
5672 #. type: Plain text
5673 #: build/C/man2/mmap.2:645
5674 #, no-wrap
5675 msgid ""
5676 "    s = write(STDOUT_FILENO, addr + offset - pa_offset, length);\n"
5677 "    if (s != length) {\n"
5678 "        if (s == -1)\n"
5679 "            handle_error(\"write\");\n"
5680 msgstr ""
5681 "    s = write(STDOUT_FILENO, addr + offset - pa_offset, length);\n"
5682 "    if (s != length) {\n"
5683 "        if (s == -1)\n"
5684 "            handle_error(\"write\");\n"
5685
5686 #. type: Plain text
5687 #: build/C/man2/mmap.2:649
5688 #, no-wrap
5689 msgid ""
5690 "        fprintf(stderr, \"partial write\");\n"
5691 "        exit(EXIT_FAILURE);\n"
5692 "    }\n"
5693 msgstr ""
5694 "        fprintf(stderr, \"partial write\");\n"
5695 "        exit(EXIT_FAILURE);\n"
5696 "    }\n"
5697
5698 #. type: Plain text
5699 #: build/C/man2/mmap.2:666
5700 msgid ""
5701 "B<getpagesize>(2), B<mincore>(2), B<mlock>(2), B<mmap2>(2), B<mprotect>(2), "
5702 "B<mremap>(2), B<msync>(2), B<remap_file_pages>(2), B<setrlimit>(2), B<shmat>"
5703 "(2), B<shm_open>(3), B<shm_overview>(7)"
5704 msgstr ""
5705 "B<getpagesize>(2), B<mincore>(2), B<mlock>(2), B<mmap2>(2), B<mprotect>(2), "
5706 "B<mremap>(2), B<msync>(2), B<remap_file_pages>(2), B<setrlimit>(2), B<shmat>"
5707 "(2), B<shm_open>(3), B<shm_overview>(7)"
5708
5709 #. type: Plain text
5710 #: build/C/man2/mmap.2:671 build/C/man2/msync.2:122
5711 msgid "B.O. Gallmeister, POSIX.4, O'Reilly, pp. 128-129 and 389-391."
5712 msgstr "B.O. Gallmeister, POSIX.4, O'Reilly, pp. 128-129 and 389-391."
5713
5714 #. type: TH
5715 #: build/C/man2/mmap2.2:29
5716 #, no-wrap
5717 msgid "MMAP2"
5718 msgstr "MMAP2"
5719
5720 #. type: Plain text
5721 #: build/C/man2/mmap2.2:32
5722 msgid "mmap2 - map files or devices into memory"
5723 msgstr "mmap2 - ファイルやデバイスをメモリにマップする"
5724
5725 #. type: Plain text
5726 #: build/C/man2/mmap2.2:38
5727 #, no-wrap
5728 msgid ""
5729 "B<void *mmap2(void *>I<addr>B<, size_t >I<length>B<, int >I<prot>B<,>\n"
5730 "B<             int >I<flags>B<, int >I<fd>B<, off_t >I<pgoffset>B<);>\n"
5731 msgstr ""
5732 "B<void *mmap2(void *>I<addr>B<, size_t >I<length>B<, int >I<prot>B<,>\n"
5733 "B<            int >I<flags>B<, int >I<fd>B<, off_t >I<pgoffset>B<);>\n"
5734
5735 #. type: Plain text
5736 #: build/C/man2/mmap2.2:43
5737 msgid ""
5738 "This is probably not the system call you are interested; instead, see B<mmap>"
5739 "(2), which describes the glibc wrapper function that invokes this system "
5740 "call."
5741 msgstr ""
5742 "これはおそらくあなたが興味のあるシステムコールではないだろう。代わりに\n"
5743 "B<mmap>(2) を見るとよい。そのページにはこのシステムコールを起動する glibc "
5744 "の\n"
5745 "ラッパー関数についての説明がある。"
5746
5747 #. type: Plain text
5748 #: build/C/man2/mmap2.2:54
5749 msgid ""
5750 "The B<mmap2>()  system call provides the same interface as B<mmap>(2), "
5751 "except that the final argument specifies the offset into the file in 4096-"
5752 "byte units (instead of bytes, as is done by B<mmap>(2)).  This enables "
5753 "applications that use a 32-bit I<off_t> to map large files (up to 2^44 "
5754 "bytes)."
5755 msgstr ""
5756 "B<mmap2>() システムコールは B<mmap>(2) と同じインターフェースを提供する。た"
5757 "だ\n"
5758 "し、最後の引き数には、ファイルのオフセットを (B<mmap>(2) が行っている、バイ"
5759 "ト\n"
5760 "単位ではなく) 4096 バイトを単位として指定する。 これにより、32 ビットの\n"
5761 "I<off_t> を使うアプリケーションで (2^44 バイトまでの) 大きなファイルをマッ"
5762 "プ\n"
5763 "できるようになる。"
5764
5765 #. type: Plain text
5766 #: build/C/man2/mmap2.2:61
5767 msgid ""
5768 "On success, B<mmap2>()  returns a pointer to the mapped area.  On error -1 "
5769 "is returned and I<errno> is set appropriately."
5770 msgstr ""
5771 "成功した場合、 B<mmap2>()  はマップされた領域へのポインタを返す。 エラーの場"
5772 "合は -1 が返されて、 I<errno> が適切に設定される。"
5773
5774 #. type: Plain text
5775 #: build/C/man2/mmap2.2:65
5776 msgid "Problem with getting the data from userspace."
5777 msgstr "ユーザ空間からデータを取得するときに問題があった。"
5778
5779 #. type: Plain text
5780 #: build/C/man2/mmap2.2:70
5781 msgid ""
5782 "(Various platforms where the page size is not 4096 bytes.)  I<offset * 4096> "
5783 "is not a multiple of the system page size."
5784 msgstr ""
5785 "(ページサイズが 4096 バイトでないプラットフォームにおいて)  I<offset * 4096> "
5786 "がシステムのページサイズの倍数ではない。"
5787
5788 #. type: Plain text
5789 #: build/C/man2/mmap2.2:74
5790 msgid "B<mmap2>()  can also return any of the errors described in B<mmap>(2)."
5791 msgstr "B<mmap2>() は B<mmap>(2) に載っているエラーを返すこともある。"
5792
5793 #. type: Plain text
5794 #: build/C/man2/mmap2.2:77
5795 msgid "B<mmap2>()  is available since Linux 2.3.31."
5796 msgstr "B<mmap2>()  は、Linux 2.3.31 以降で使用可能である。"
5797
5798 #. type: Plain text
5799 #: build/C/man2/mmap2.2:79 build/C/man2/subpage_prot.2:93
5800 msgid "This system call is Linux-specific."
5801 msgstr "このシステムコールは Linux 独自である。"
5802
5803 #. type: Plain text
5804 #: build/C/man2/mmap2.2:85
5805 msgid ""
5806 "Nowadays, the glibc B<mmap>()  wrapper function invokes this system call "
5807 "rather than the B<mmap>(2)  system call."
5808 msgstr ""
5809 "現在では、glibc の B<mmap>()  のラッパー関数は、 B<mmap>(2)  システムコールで"
5810 "はなく、このシステムコール (B<mmap2>(2))  を起動する。"
5811
5812 #.  ia64 can have page sizes ranging from 4kB to 64kB.
5813 #.  On cris, it looks like the unit might also be the page size,
5814 #.  which is 8192 bytes. -- mtk, June 2007
5815 #. type: Plain text
5816 #: build/C/man2/mmap2.2:92
5817 msgid ""
5818 "On ia64, the unit for I<offset> is actually the system page size, rather "
5819 "than 4096 bytes."
5820 msgstr ""
5821 "ia64 では、 I<offset> の単位は、実際にはシステムのページサイズであり、 4096 "
5822 "バイトではない。"
5823
5824 #. type: Plain text
5825 #: build/C/man2/mmap2.2:98
5826 msgid ""
5827 "B<getpagesize>(2), B<mmap>(2), B<mremap>(2), B<msync>(2), B<shm_open>(3)"
5828 msgstr ""
5829 "B<getpagesize>(2), B<mmap>(2), B<mremap>(2), B<msync>(2), B<shm_open>(3)"
5830
5831 #. type: TH
5832 #: build/C/man2/mprotect.2:32
5833 #, no-wrap
5834 msgid "MPROTECT"
5835 msgstr "MPROTECT"
5836
5837 #. type: TH
5838 #: build/C/man2/mprotect.2:32
5839 #, no-wrap
5840 msgid "2011-09-08"
5841 msgstr "2011-09-08"
5842
5843 #. type: Plain text
5844 #: build/C/man2/mprotect.2:35
5845 msgid "mprotect - set protection on a region of memory"
5846 msgstr "mprotect - メモリ領域の保護を設定する"
5847
5848 #. type: Plain text
5849 #: build/C/man2/mprotect.2:40
5850 #, no-wrap
5851 msgid "B<int mprotect(const void *>I<addr>B<, size_t >I<len>B<, int >I<prot>B<);>\n"
5852 msgstr "B<int mprotect(const void *>I<addr>B<, size_t >I<len>B<, int >I<prot>B<);>\n"
5853
5854 #. type: Plain text
5855 #: build/C/man2/mprotect.2:48
5856 msgid ""
5857 "B<mprotect>()  changes protection for the calling process's memory page(s)  "
5858 "containing any part of the address range in the interval [I<addr>,\\ I<addr>"
5859 "+I<len>-1].  I<addr> must be aligned to a page boundary."
5860 msgstr ""
5861 "B<mprotect>()  は、区間 [I<addr>,\\ I<addr>+I<len>-1] のアドレス範囲を含む 呼"
5862 "び出し元のプロセスのメモリページのアクセス保護を変更する。 I<addr> はページ境"
5863 "界に一致していなければならない。"
5864
5865 #. type: Plain text
5866 #: build/C/man2/mprotect.2:53
5867 msgid ""
5868 "If the calling process tries to access memory in a manner that violates the "
5869 "protection, then the kernel generates a B<SIGSEGV> signal for the process."
5870 msgstr ""
5871 "呼び出し元のプロセスがアクセス保護に違反するようなメモリアクセスを 行おうとす"
5872 "ると、カーネルはシグナル B<SIGSEGV> をそのプロセスに対して生成する。"
5873
5874 #. type: Plain text
5875 #: build/C/man2/mprotect.2:58
5876 msgid ""
5877 "I<prot> is either B<PROT_NONE> or a bitwise-or of the other values in the "
5878 "following list:"
5879 msgstr ""
5880 "I<prot> には、 B<PROT_NONE> か、以下のリストの B<PROT_NONE> 以外の値をビット"
5881 "毎の論理和 (bitwize-or) で指定する:"
5882
5883 #. type: Plain text
5884 #: build/C/man2/mprotect.2:61
5885 msgid "The memory cannot be accessed at all."
5886 msgstr "そのメモリには全くアクセスできない。"
5887
5888 #. type: Plain text
5889 #: build/C/man2/mprotect.2:64
5890 msgid "The memory can be read."
5891 msgstr "そのメモリを読み取ることができる。"
5892
5893 #. type: Plain text
5894 #: build/C/man2/mprotect.2:67
5895 msgid "The memory can be modified."
5896 msgstr "そのメモリを変更できる。"
5897
5898 #.  FIXME
5899 #.  Document PROT_GROWSUP and PROT_GROWSDOWN
5900 #. type: Plain text
5901 #: build/C/man2/mprotect.2:72
5902 msgid "The memory can be executed."
5903 msgstr "そのメモリは実行可能である。"
5904
5905 #. type: Plain text
5906 #: build/C/man2/mprotect.2:79
5907 msgid ""
5908 "On success, B<mprotect>()  returns zero.  On error, -1 is returned, and "
5909 "I<errno> is set appropriately."
5910 msgstr ""
5911 "成功した場合、 B<mprotect>()  は 0 を返す。エラーの場合は -1 が返り、 "
5912 "I<errno> が適切に設定される。"
5913
5914 #. type: Plain text
5915 #: build/C/man2/mprotect.2:89
5916 msgid ""
5917 "The memory cannot be given the specified access.  This can happen, for "
5918 "example, if you B<mmap>(2)  a file to which you have read-only access, then "
5919 "ask B<mprotect>()  to mark it B<PROT_WRITE>."
5920 msgstr ""
5921 "指定されたアクセスをメモリに設定することができない。 これは、例えば ファイル"
5922 "を読み取り専用で B<mmap>(2)  しており、その領域に対して B<mprotect>()  を呼び"
5923 "出して B<PROT_WRITE> に設定しようとした場合に発生する。"
5924
5925 #.  Or: both PROT_GROWSUP and PROT_GROWSDOWN were specified in 'prot'.
5926 #. type: Plain text
5927 #: build/C/man2/mprotect.2:94
5928 msgid ""
5929 "I<addr> is not a valid pointer, or not a multiple of the system page size."
5930 msgstr ""
5931 "I<addr> が有効なポインタでないか、 システムのページサイズの倍数でない。"
5932
5933 #. type: Plain text
5934 #: build/C/man2/mprotect.2:97
5935 msgid "Internal kernel structures could not be allocated."
5936 msgstr "カーネル内部の構造体を割り当てることができなかった。"
5937
5938 #. type: Plain text
5939 #: build/C/man2/mprotect.2:107
5940 msgid ""
5941 "Addresses in the range [I<addr>, I<addr>+I<len>-1] are invalid for the "
5942 "address space of the process, or specify one or more pages that are not "
5943 "mapped.  (Before kernel 2.4.19, the error B<EFAULT> was incorrectly produced "
5944 "for these cases.)"
5945 msgstr ""
5946 "[I<addr>, I<addr>+I<len>-1] という範囲のアドレスがプロセスのアドレス空間とし"
5947 "て不正であるか、 その範囲のアドレスがマップされていない 1 つ以上のページを指"
5948 "している (カーネル 2.4.19 より前では、この状況でエラー B<EFAULT> が間違って生"
5949 "成されていた)。"
5950
5951 #.  SVr4 defines an additional error
5952 #.  code EAGAIN. The SVr4 error conditions don't map neatly onto Linux's.
5953 #. type: Plain text
5954 #: build/C/man2/mprotect.2:116
5955 msgid ""
5956 "SVr4, POSIX.1-2001.  POSIX says that the behavior of B<mprotect>()  is "
5957 "unspecified if it is applied to a region of memory that was not obtained via "
5958 "B<mmap>(2)."
5959 msgstr ""
5960 "SVr4, POSIX.1-2001.  POSIX では、 B<mmap>(2)  経由で獲得していないメモリ領域"
5961 "に対して B<mprotect>()  を行った場合の B<mprotect>()  の動作は未定義であると"
5962 "されている。"
5963
5964 #. type: Plain text
5965 #: build/C/man2/mprotect.2:123
5966 msgid ""
5967 "On Linux it is always permissible to call B<mprotect>()  on any address in a "
5968 "process's address space (except for the kernel vsyscall area).  In "
5969 "particular it can be used to change existing code mappings to be writable."
5970 msgstr ""
5971 "Linux では、(カーネル vsyscall 領域以外の)  任意のプロセスアドレス空間に対し"
5972 "て B<mprotect>()  を呼び出すことが、常に許されている。 これは特に既存のコード"
5973 "マッピングを書き込み可能にするために使われる。"
5974
5975 #. type: Plain text
5976 #: build/C/man2/mprotect.2:133
5977 msgid ""
5978 "Whether B<PROT_EXEC> has any effect different from B<PROT_READ> is "
5979 "architecture- and kernel version-dependent.  On some hardware architectures "
5980 "(e.g., i386), B<PROT_WRITE> implies B<PROT_READ>."
5981 msgstr ""
5982 "B<PROT_EXEC> が B<PROT_READ> と異なる影響を持つか否かは、アーキテクチャとカー"
5983 "ネルのバージョンに依存する。 (i386 などの) いくつかのアーキテクチャでは、 "
5984 "B<PROT_WRITE> をセットすると、暗黙のうちに B<PROT_READ> がセットされる。"
5985
5986 #. type: Plain text
5987 #: build/C/man2/mprotect.2:142
5988 msgid ""
5989 "POSIX.1-2001 says that an implementation may permit access other than that "
5990 "specified in I<prot>, but at a minimum can only allow write access if "
5991 "B<PROT_WRITE> has been set, and must not allow any access if B<PROT_NONE> "
5992 "has been set."
5993 msgstr ""
5994 "POSIX.1-2001 では、 I<prot> で指定されていないアクセスを許可する実装を認めて"
5995 "いる。 ただし、最低限、 B<PROT_WRITE> がセットされている場合にのみ書き込みア"
5996 "クセスが許可され、 B<PROT_NONE> がセットされている場合にはアクセスは許可され"
5997 "ない点だけは 満たす必要がある。"
5998
5999 #. type: Plain text
6000 #: build/C/man2/mprotect.2:148
6001 msgid ""
6002 "The program below allocates four pages of memory, makes the third of these "
6003 "pages read-only, and then executes a loop that walks upward through the "
6004 "allocated region modifying bytes."
6005 msgstr ""
6006 "以下のプログラムは、メモリページを 4つ確保し、そのうち 3番目のページを 読み込"
6007 "み専用に設定する。その後で、確保した領域のアドレスの小さい方から 大きな方に向"
6008 "かって順番にバイト値を変更するループを実行する。"
6009
6010 #. type: Plain text
6011 #: build/C/man2/mprotect.2:151
6012 msgid ""
6013 "An example of what we might see when running the program is the following:"
6014 msgstr "プログラムを実行した場合の一例を以下に示す。"
6015
6016 #. type: Plain text
6017 #: build/C/man2/mprotect.2:157
6018 #, no-wrap
6019 msgid ""
6020 "$B< ./a.out>\n"
6021 "Start of region:        0x804c000\n"
6022 "Got SIGSEGV at address: 0x804e000\n"
6023 msgstr ""
6024 "$B< ./a.out>\n"
6025 "Start of region:        0x804c000\n"
6026 "Got SIGSEGV at address: 0x804e000\n"
6027
6028 #. type: Plain text
6029 #: build/C/man2/mprotect.2:169
6030 #, no-wrap
6031 msgid ""
6032 "#include E<lt>unistd.hE<gt>\n"
6033 "#include E<lt>signal.hE<gt>\n"
6034 "#include E<lt>stdio.hE<gt>\n"
6035 "#include E<lt>malloc.hE<gt>\n"
6036 "#include E<lt>stdlib.hE<gt>\n"
6037 "#include E<lt>errno.hE<gt>\n"
6038 "#include E<lt>sys/mman.hE<gt>\n"
6039 msgstr ""
6040 "#include E<lt>unistd.hE<gt>\n"
6041 "#include E<lt>signal.hE<gt>\n"
6042 "#include E<lt>stdio.hE<gt>\n"
6043 "#include E<lt>malloc.hE<gt>\n"
6044 "#include E<lt>stdlib.hE<gt>\n"
6045 "#include E<lt>errno.hE<gt>\n"
6046 "#include E<lt>sys/mman.hE<gt>\n"
6047
6048 #. type: Plain text
6049 #: build/C/man2/mprotect.2:174
6050 #, no-wrap
6051 msgid "char *buffer;\n"
6052 msgstr "char *buffer;\n"
6053
6054 #. type: Plain text
6055 #: build/C/man2/mprotect.2:182
6056 #, no-wrap
6057 msgid ""
6058 "static void\n"
6059 "handler(int sig, siginfo_t *si, void *unused)\n"
6060 "{\n"
6061 "    printf(\"Got SIGSEGV at address: 0x%lx\\en\",\n"
6062 "            (long) si-E<gt>si_addr);\n"
6063 "    exit(EXIT_FAILURE);\n"
6064 "}\n"
6065 msgstr ""
6066 "static void\n"
6067 "handler(int sig, siginfo_t *si, void *unused)\n"
6068 "{\n"
6069 "    printf(\"Got SIGSEGV at address: 0x%lx\\en\",\n"
6070 "            (long) si-E<gt>si_addr);\n"
6071 "    exit(EXIT_FAILURE);\n"
6072 "}\n"
6073
6074 #. type: Plain text
6075 #: build/C/man2/mprotect.2:189
6076 #, no-wrap
6077 msgid ""
6078 "int\n"
6079 "main(int argc, char *argv[])\n"
6080 "{\n"
6081 "    char *p;\n"
6082 "    int pagesize;\n"
6083 "    struct sigaction sa;\n"
6084 msgstr ""
6085 "int\n"
6086 "main(void)\n"
6087 "{\n"
6088 "    char *p;\n"
6089 "    int pagesize;\n"
6090 "    struct sigaction sa;\n"
6091
6092 #. type: Plain text
6093 #: build/C/man2/mprotect.2:195
6094 #, no-wrap
6095 msgid ""
6096 "    sa.sa_flags = SA_SIGINFO;\n"
6097 "    sigemptyset(&sa.sa_mask);\n"
6098 "    sa.sa_sigaction = handler;\n"
6099 "    if (sigaction(SIGSEGV, &sa, NULL) == -1)\n"
6100 "        handle_error(\"sigaction\");\n"
6101 msgstr ""
6102 "    sa.sa_flags = SA_SIGINFO;\n"
6103 "    sigemptyset(&sa.sa_mask);\n"
6104 "    sa.sa_sigaction = handler;\n"
6105 "    if (sigaction(SIGSEGV, &sa, NULL) == -1)\n"
6106 "        handle_error(\"sigaction\");\n"
6107
6108 #. type: Plain text
6109 #: build/C/man2/mprotect.2:199
6110 #, no-wrap
6111 msgid ""
6112 "    pagesize = sysconf(_SC_PAGE_SIZE);\n"
6113 "    if (pagesize == -1)\n"
6114 "        handle_error(\"sysconf\");\n"
6115 msgstr ""
6116 "    pagesize = sysconf(_SC_PAGE_SIZE);\n"
6117 "    if (pagesize == -1)\n"
6118 "        handle_error(\"sysconf\");\n"
6119
6120 #. type: Plain text
6121 #: build/C/man2/mprotect.2:202
6122 #, no-wrap
6123 msgid ""
6124 "    /* Allocate a buffer aligned on a page boundary;\n"
6125 "       initial protection is PROT_READ | PROT_WRITE */\n"
6126 msgstr ""
6127 "    /* Allocate a buffer aligned on a page boundary;\n"
6128 "       initial protection is PROT_READ | PROT_WRITE */\n"
6129
6130 #. type: Plain text
6131 #: build/C/man2/mprotect.2:206
6132 #, no-wrap
6133 msgid ""
6134 "    buffer = memalign(pagesize, 4 * pagesize);\n"
6135 "    if (buffer == NULL)\n"
6136 "        handle_error(\"memalign\");\n"
6137 msgstr ""
6138 "    buffer = memalign(pagesize, 4 * pagesize);\n"
6139 "    if (buffer == NULL)\n"
6140 "        handle_error(\"memalign\");\n"
6141
6142 #. type: Plain text
6143 #: build/C/man2/mprotect.2:208
6144 #, no-wrap
6145 msgid "    printf(\"Start of region:        0x%lx\\en\", (long) buffer);\n"
6146 msgstr "    printf(\"Start of region:        0x%lx\\en\", (long) buffer);\n"
6147
6148 #. type: Plain text
6149 #: build/C/man2/mprotect.2:212
6150 #, no-wrap
6151 msgid ""
6152 "    if (mprotect(buffer + pagesize * 2, pagesize,\n"
6153 "                PROT_READ) == -1)\n"
6154 "        handle_error(\"mprotect\");\n"
6155 msgstr ""
6156 "    if (mprotect(buffer + pagesize * 2, pagesize,\n"
6157 "                PROT_READ) == -1)\n"
6158 "        handle_error(\"mprotect\");\n"
6159
6160 #. type: Plain text
6161 #: build/C/man2/mprotect.2:215
6162 #, no-wrap
6163 msgid ""
6164 "    for (p = buffer ; ; )\n"
6165 "        *(p++) = \\(aqa\\(aq;\n"
6166 msgstr ""
6167 "    for (p = buffer ; ; )\n"
6168 "        *(p++) = \\(aqa\\(aq;\n"
6169
6170 #. type: Plain text
6171 #: build/C/man2/mprotect.2:219
6172 #, no-wrap
6173 msgid ""
6174 "    printf(\"Loop completed\\en\");     /* Should never happen */\n"
6175 "    exit(EXIT_SUCCESS);\n"
6176 "}\n"
6177 msgstr ""
6178 "    printf(\"Loop completed\\en\");     /* Should never happen */\n"
6179 "    exit(EXIT_SUCCESS);\n"
6180 "}\n"
6181
6182 #. type: Plain text
6183 #: build/C/man2/mprotect.2:223
6184 msgid "B<mmap>(2), B<sysconf>(3)"
6185 msgstr "B<mmap>(2), B<sysconf>(3)"
6186
6187 #. type: TH
6188 #: build/C/man2/mremap.2:31
6189 #, no-wrap
6190 msgid "MREMAP"
6191 msgstr "MREMAP"
6192
6193 #. type: TH
6194 #: build/C/man2/mremap.2:31
6195 #, no-wrap
6196 msgid "2010-06-10"
6197 msgstr "2010-06-10"
6198
6199 #. type: Plain text
6200 #: build/C/man2/mremap.2:34
6201 msgid "mremap - remap a virtual memory address"
6202 msgstr "mremap - 仮想メモリ・アドレスを再マッピングする"
6203
6204 #. type: Plain text
6205 #: build/C/man2/mremap.2:37
6206 #, no-wrap
6207 msgid "B<#define _GNU_SOURCE>         /* See feature_test_macros(7) */\n"
6208 msgstr "B<#define _GNU_SOURCE>         /* feature_test_macros(7) 参照 */\n"
6209
6210 #. type: Plain text
6211 #: build/C/man2/mremap.2:42
6212 #, no-wrap
6213 msgid ""
6214 "B<void *mremap(void *>I<old_address>B<, size_t >I<old_size>B<,>\n"
6215 "B<             size_t >I<new_size>B<, int >I<flags>B<, ... /* void *>I<new_address>B< */);>\n"
6216 msgstr ""
6217 "B<void *mremap(void *>I<old_address>B<, size_t >I<old_size>B<,>\n"
6218 "B<             size_t >I<new_size>B<, int >I<flags>B<, ... /* void *>I<new_address>B< */);>\n"
6219
6220 #. type: Plain text
6221 #: build/C/man2/mremap.2:48
6222 msgid ""
6223 "B<mremap>()  expands (or shrinks) an existing memory mapping, potentially "
6224 "moving it at the same time (controlled by the I<flags> argument and the "
6225 "available virtual address space)."
6226 msgstr ""
6227 "B<mremap>()  は既存のメモリ・マッピングの拡張 (または縮小) を行う。 同時に移"
6228 "動されることもある (I<flags> 引き数と利用可能な仮想アドレス空間によって決ま"
6229 "る)。"
6230
6231 #. type: Plain text
6232 #: build/C/man2/mremap.2:62
6233 msgid ""
6234 "I<old_address> is the old address of the virtual memory block that you want "
6235 "to expand (or shrink).  Note that I<old_address> has to be page aligned.  "
6236 "I<old_size> is the old size of the virtual memory block.  I<new_size> is the "
6237 "requested size of the virtual memory block after the resize.  An optional "
6238 "fifth argument, I<new_address>, may be provided; see the description of "
6239 "B<MREMAP_FIXED> below."
6240 msgstr ""
6241 "I<old_address> は拡張 (または縮小) しようとする仮想メモリ・ブロック の元のア"
6242 "ドレスである。I<old_address> はページ境界に合っていなければ ならない点に注意"
6243 "すること。I<old_size> は元の仮想メモリ・ブロックの サイズである。 "
6244 "I<new_size> は要求する変更後の仮想メモリ・ブロックのサイズである。 5 番目の引"
6245 "き数として I<new_address> を指定することができる。下記の B<MREMAP_FIXED> の説"
6246 "明を参照のこと。"
6247
6248 #. type: Plain text
6249 #: build/C/man2/mremap.2:74
6250 msgid ""
6251 "In Linux the memory is divided into pages.  A user process has (one or)  "
6252 "several linear virtual memory segments.  Each virtual memory segment has one "
6253 "or more mappings to real memory pages (in the page table).  Each virtual "
6254 "memory segment has its own protection (access rights), which may cause a "
6255 "segmentation violation if the memory is accessed incorrectly (e.g., writing "
6256 "to a read-only segment).  Accessing virtual memory outside of the segments "
6257 "will also cause a segmentation violation."
6258 msgstr ""
6259 "Linux ではメモリはページに分割される。ユーザー・プロセスは (一つまたは)  複数"
6260 "のリニアな仮想メモリセグメントを持つ。 それぞれの仮想メモリセグメントは一つ以"
6261 "上の実メモリ・ページ にマッピングされている (マッピング情報はページ・テーブル"
6262 "で管理される)。 仮想メモリセグメントにはセグメント毎の保護 (アクセス権) が設"
6263 "定されており、 メモリが不正にアクセスされた場合 (例えば読み込み専用のセグメン"
6264 "トに 書き込んだ場合)、セグメンテーション侵害 (segmentation violation) を 引き"
6265 "起こす。また、セグメント外の仮想メモリにアクセスした場合にも セグメンテーショ"
6266 "ン侵害が発生する。"
6267
6268 #. type: Plain text
6269 #: build/C/man2/mremap.2:82
6270 msgid ""
6271 "B<mremap>()  uses the Linux page table scheme.  B<mremap>()  changes the "
6272 "mapping between virtual addresses and memory pages.  This can be used to "
6273 "implement a very efficient B<realloc>(3)."
6274 msgstr ""
6275 "B<mremap>()  は Linux のページ・テーブル方式を使用する。 B<mremap>()  は仮想"
6276 "アドレスとメモリ・ページのマッピングを変更する。これは非常に効率的な "
6277 "B<realloc>(3)  を実装するのに使用されている。"
6278
6279 #. type: Plain text
6280 #: build/C/man2/mremap.2:84
6281 msgid "The I<flags> bit-mask argument may be 0, or include the following flag:"
6282 msgstr "I<flags> ビットマスク引数は 0 または以下のフラグを含む:"
6283
6284 #. type: TP
6285 #: build/C/man2/mremap.2:84
6286 #, no-wrap
6287 msgid "B<MREMAP_MAYMOVE>"
6288 msgstr "B<MREMAP_MAYMOVE>"
6289
6290 #. type: Plain text
6291 #: build/C/man2/mremap.2:96
6292 msgid ""
6293 "By default, if there is not sufficient space to expand a mapping at its "
6294 "current location, then B<mremap>()  fails.  If this flag is specified, then "
6295 "the kernel is permitted to relocate the mapping to a new virtual address, if "
6296 "necessary.  If the mapping is relocated, then absolute pointers into the old "
6297 "mapping location become invalid (offsets relative to the starting address of "
6298 "the mapping should be employed)."
6299 msgstr ""
6300 "デフォルトでは、現在の位置にマッピングを拡張するための 十分な空きがなければ "
6301 "B<mremap>()  は失敗する。 このフラグが指定されると、カーネルは必要があれば"
6302 "マッピングを 新しい仮想アドレスに再配置することができる マッピングが再配置さ"
6303 "れると、古いマッピング位置への絶対ポインタは 無効になる (マッピングの開始アド"
6304 "レスからの相対オフセットは有効のままである)。"
6305
6306 #. type: TP
6307 #: build/C/man2/mremap.2:96
6308 #, no-wrap
6309 msgid "B<MREMAP_FIXED> (since Linux 2.3.31)"
6310 msgstr "B<MREMAP_FIXED> (Linux 2.3.31 以降)"
6311
6312 #. type: Plain text
6313 #: build/C/man2/mremap.2:118
6314 msgid ""
6315 "This flag serves a similar purpose to the B<MAP_FIXED> flag of B<mmap>(2).  "
6316 "If this flag is specified, then B<mremap>()  accepts a fifth argument, "
6317 "I<void *new_address>, which specifies a page-aligned address to which the "
6318 "mapping must be moved.  Any previous mapping at the address range specified "
6319 "by I<new_address> and I<new_size> is unmapped.  If B<MREMAP_FIXED> is "
6320 "specified, then B<MREMAP_MAYMOVE> must also be specified."
6321 msgstr ""
6322 "このフラグは B<mmap>(2)  の B<MAP_FIXED> フラグと似たような目的で用いられ"
6323 "る。 このフラグが指定されると、 B<mremap>()  は 5 番目の引き数 I<void "
6324 "*new_address> を受け取り、この引数はマッピングが移動されるべきアドレスを指定"
6325 "する。 このアドレスはページ境界に合っていなければならない。 I<new_address> "
6326 "と I<new_size> で指定されるアドレス範囲に過去のマッピングがあった場合、 その"
6327 "マッピングはアンマップされる (unmapped)。 B<MREMAP_FIXED> を指定した場合は、 "
6328 "B<MREMAP_MAYMOVE> も指定しなければならない。"
6329
6330 #. type: Plain text
6331 #: build/C/man2/mremap.2:128
6332 msgid ""
6333 "If the memory segment specified by I<old_address> and I<old_size> is locked "
6334 "(using B<mlock>(2)  or similar), then this lock is maintained when the "
6335 "segment is resized and/or relocated.  As a consequence, the amount of memory "
6336 "locked by the process may change."
6337 msgstr ""
6338 "I<old_address> と I<old_size> で指定されるメモリセグメントが (B<mlock>(2)  や"
6339 "同様のもので) ロックされている場合、セグメントのサイズが変わったり 再配置され"
6340 "たりした時にロックも維持される。 その結果、プロセスによってロックされるメモリ"
6341 "の量は変化する。"
6342
6343 #. type: Plain text
6344 #: build/C/man2/mremap.2:136
6345 msgid ""
6346 "On success B<mremap>()  returns a pointer to the new virtual memory area.  "
6347 "On error, the value B<MAP_FAILED> (that is, I<(void\\ *)\\ -1>) is returned, "
6348 "and I<errno> is set appropriately."
6349 msgstr ""
6350 "成功した場合は B<mremap>()  は新しい仮想メモリ領域へのポインタを返す。 エラー"
6351 "の場合は B<MAP_FAILED> (すなわち I<(void\\ *)\\ -1>) が返され、 I<errno> が適"
6352 "切に設定される。"
6353
6354 #. type: Plain text
6355 #: build/C/man2/mremap.2:143
6356 msgid ""
6357 "The caller tried to expand a memory segment that is locked, but this was not "
6358 "possible without exceeding the B<RLIMIT_MEMLOCK> resource limit."
6359 msgstr ""
6360 "呼び出し元がロックされているメモリセグメントを拡張しようとしたが、 "
6361 "B<RLIMIT_MEMLOCK> リソース制限を越えずにこれを行うことができない。"
6362
6363 #. type: Plain text
6364 #: build/C/man2/mremap.2:152
6365 msgid ""
6366 "\"Segmentation fault.\" Some address in the range I<old_address> to "
6367 "I<old_address>+I<old_size> is an invalid virtual memory address for this "
6368 "process.  You can also get B<EFAULT> even if there exist mappings that cover "
6369 "the whole address space requested, but those mappings are of different types."
6370 msgstr ""
6371 "「セグメンテーション違反(segmentation fault)」 I<old_address> から "
6372 "I<old_address>+I<old_size> の 範囲のアドレスのどれかがこのプロセスにおいて不"
6373 "正な仮想メモリ・アドレスである。 たとえ要求したアドレス空間全体を含むような"
6374 "マッピングがあったとしても、 それらのマッピングが異なった型ならば B<EFAULT> "
6375 "を受け取るだろう。"
6376
6377 #. type: Plain text
6378 #: build/C/man2/mremap.2:180
6379 msgid ""
6380 "An invalid argument was given.  Possible causes are: I<old_address> was not "
6381 "page aligned; a value other than B<MREMAP_MAYMOVE> or B<MREMAP_FIXED> was "
6382 "specified in I<flags>; I<new_size> was zero; I<new_size> or I<new_address> "
6383 "was invalid; or the new address range specified by I<new_address> and "
6384 "I<new_size> overlapped the old address range specified by I<old_address> and "
6385 "I<old_size>; or B<MREMAP_FIXED> was specified without also specifying "
6386 "B<MREMAP_MAYMOVE>."
6387 msgstr ""
6388 "不正な引き数が与えられた。 可能性のある原因は以下の通りである: たいていは "
6389 "I<old_address> がページ境界に 合ってない; I<flags> に B<MREMAP_MAYMOVE> また"
6390 "は B<MREMAP_FIXED> 以外の値が指定されている; I<new_size> がゼロ; I<new_size> "
6391 "または I<new_address> の値が不正; I<new_address> と I<new_size> で指定される"
6392 "新しいアドレス範囲が I<old_address> と I<old_size> で指定される古いアドレス範"
6393 "囲と重なっている; B<MREMAP_FIXED> が指定されているが B<MREMAP_MAYMOVE> が指定"
6394 "されていない。"
6395
6396 #. type: Plain text
6397 #: build/C/man2/mremap.2:186
6398 msgid ""
6399 "The memory area cannot be expanded at the current virtual address, and the "
6400 "B<MREMAP_MAYMOVE> flag is not set in I<flags>.  Or, there is not enough "
6401 "(virtual) memory available."
6402 msgstr ""
6403 "現在の仮想アドレスではメモリ領域が拡張できず、 B<MREMAP_MAYMOVE> フラグが "
6404 "I<flags> に設定されていない。 または十分な (仮想) メモリが存在しない。"
6405
6406 #.  4.2BSD had a (never actually implemented)
6407 #.  .BR mremap (2)
6408 #.  call with completely different semantics.
6409 #. type: Plain text
6410 #: build/C/man2/mremap.2:192
6411 msgid ""
6412 "This call is Linux-specific, and should not be used in programs intended to "
6413 "be portable."
6414 msgstr ""
6415 "このコールは Linux 特有であり、移植を意図したプログラムで 使用すべきではな"
6416 "い。"
6417
6418 #. type: Plain text
6419 #: build/C/man2/mremap.2:200
6420 msgid ""
6421 "Prior to version 2.4, glibc did not expose the definition of "
6422 "B<MREMAP_FIXED>, and the prototype for B<mremap>()  did not allow for the "
6423 "I<new_address> argument."
6424 msgstr ""
6425 "バージョン 2.4 より前の glibc では、 B<MREMAP_FIXED> の定義は公開されておら"
6426 "ず、 B<mremap>()  のプロトタイプは I<new_address> 引き数を取らなかった。"
6427
6428 #. type: Plain text
6429 #: build/C/man2/mremap.2:209
6430 msgid ""
6431 "B<brk>(2), B<getpagesize>(2), B<getrlimit>(2), B<mlock>(2), B<mmap>(2), "
6432 "B<sbrk>(2), B<malloc>(3), B<realloc>(3)"
6433 msgstr ""
6434 "B<brk>(2), B<getpagesize>(2), B<getrlimit>(2), B<mlock>(2), B<mmap>(2), "
6435 "B<sbrk>(2), B<realloc>(3), B<malloc>(3)"
6436
6437 #. type: Plain text
6438 #: build/C/man2/mremap.2:214
6439 msgid ""
6440 "Your favorite OS text book for more information on paged memory.  (I<Modern "
6441 "Operating Systems> by Andrew S. Tanenbaum, I<Inside Linux> by Randolf "
6442 "Bentson, I<The Design of the UNIX Operating System> by Maurice J. Bach.)"
6443 msgstr ""
6444 "ページ分割されたメモリについてもっと詳しく知りたいならば あなたの好みの OS "
6445 "の\n"
6446 "教科書を参照すること。 (I<Modern Operating Systems> by Andrew S. Tanenbaum,\n"
6447 "I<Inside Linux> by Randolf Bentson, I<The Design of the UNIX Operating\n"
6448 "System> by Maurice J. Bach.)"
6449
6450 #. type: TH
6451 #: build/C/man2/msync.2:25
6452 #, no-wrap
6453 msgid "MSYNC"
6454 msgstr "MSYNC"
6455
6456 #. type: TH
6457 #: build/C/man2/msync.2:25 build/C/man2/remap_file_pages.2:26
6458 #, no-wrap
6459 msgid "2008-04-22"
6460 msgstr "2008-04-22"
6461
6462 #. type: Plain text
6463 #: build/C/man2/msync.2:28
6464 msgid "msync - synchronize a file with a memory map"
6465 msgstr "msync - ファイルをマップしたメモリと同期させる"
6466
6467 #. type: Plain text
6468 #: build/C/man2/msync.2:32
6469 msgid "B<int msync(void *>I<addr>B<, size_t >I<length>B<, int >I<flags>B<);>"
6470 msgstr "B<int msync(void *>I<addr>B<, size_t >I<length>B<, int >I<flags>B<);>"
6471
6472 #. type: Plain text
6473 #: build/C/man2/msync.2:48
6474 msgid ""
6475 "B<msync>()  flushes changes made to the in-core copy of a file that was "
6476 "mapped into memory using B<mmap>(2)  back to disk.  Without use of this call "
6477 "there is no guarantee that changes are written back before B<munmap>(2)  is "
6478 "called.  To be more precise, the part of the file that corresponds to the "
6479 "memory area starting at I<addr> and having length I<length> is updated."
6480 msgstr ""
6481 "B<msync>()  は B<mmap>(2)  を使ってメモリにマップされたファイルの、 メモリ上"
6482 "のコピーになされた変更をディスクに反映させる。 この関数を使用しないと、 "
6483 "B<munmap>(2)  が呼び出されるまで変更が書き戻される保証はない。 より正確には、"
6484 "ファイルのうち I<addr> から始まり長さ I<length> のメモリ領域に対応する部分が"
6485 "更新される。"
6486
6487 #. type: Plain text
6488 #: build/C/man2/msync.2:68
6489 msgid ""
6490 "The I<flags> argument may have the bits B<MS_ASYNC>, B<MS_SYNC>, and "
6491 "B<MS_INVALIDATE> set, but not both B<MS_ASYNC> and B<MS_SYNC>.  B<MS_ASYNC> "
6492 "specifies that an update be scheduled, but the call returns immediately.  "
6493 "B<MS_SYNC> asks for an update and waits for it to complete.  "
6494 "B<MS_INVALIDATE> asks to invalidate other mappings of the same file (so that "
6495 "they can be updated with the fresh values just written)."
6496 msgstr ""
6497 "I<flags> 引数にはビット B<MS_ASYNC>, B<MS_SYNC>, B<MS_INVALIDATE> を設定する"
6498 "ことができるが、 B<MS_ASYNC> と B<MS_SYNC> を同時に指定することはできない。 "
6499 "B<MS_ASYNC> は更新を予定に組み込むことを表し、呼び出しは直ちに返る。 "
6500 "B<MS_SYNC> は更新を要求し、更新が完了するまで待つ。 B<MS_INVALIDATE> は(たっ"
6501 "た今書き込んだ新しい値でマッピングを更新することができるように)  同じファイル"
6502 "に対する他のマッピングを無効にすることを要求する。"
6503
6504 #. type: Plain text
6505 #: build/C/man2/msync.2:73
6506 msgid ""
6507 "On success, zero is returned.  On error, -1 is returned, and I<errno> is set "
6508 "appropriately."
6509 msgstr ""
6510 "成功した場合、 0 が返る。エラーの場合、 -1 が返り、 I<errno> が適切に設定され"
6511 "る。"
6512
6513 #. type: TP
6514 #: build/C/man2/msync.2:74
6515 #, no-wrap
6516 msgid "B<EBUSY>"
6517 msgstr "B<EBUSY>"
6518
6519 #. type: Plain text
6520 #: build/C/man2/msync.2:80
6521 msgid ""
6522 "B<MS_INVALIDATE> was specified in I<flags>, and a memory lock exists for the "
6523 "specified address range."
6524 msgstr ""
6525 "I flags に B<MS_INVALIDATE> が指定されたが、指定されたアドレス範囲にロックが"
6526 "存在する。"
6527
6528 #. type: Plain text
6529 #: build/C/man2/msync.2:93
6530 msgid ""
6531 "I<addr> is not a multiple of PAGESIZE; or any bit other than B<MS_ASYNC> | "
6532 "B<MS_INVALIDATE> | B<MS_SYNC> is set in I<flags>; or both B<MS_SYNC> and "
6533 "B<MS_ASYNC> are set in I<flags>."
6534 msgstr ""
6535 "I<addr> が PAGESIZE の倍数でない。または、 I<flags> に B<MS_ASYNC>、"
6536 "B<MS_INVALIDATE>、B<MS_SYNC> 以外のビットが設定された。 または、 I<flags> に "
6537 "B<MS_SYNC> と B<MS_ASYNC> の両方が設定された。"
6538
6539 #. type: Plain text
6540 #: build/C/man2/msync.2:96
6541 msgid "The indicated memory (or part of it) was not mapped."
6542 msgstr "指定されたメモリ (またはその一部) がマップされていない。"
6543
6544 #. type: Plain text
6545 #: build/C/man2/msync.2:98 build/C/man3/posix_fallocate.3:103
6546 #: build/C/man3/shm_open.3:251 build/C/man7/shm_overview.7:103
6547 msgid "POSIX.1-2001."
6548 msgstr "POSIX.1-2001."
6549
6550 #. type: Plain text
6551 #: build/C/man2/msync.2:105
6552 msgid ""
6553 "This call was introduced in Linux 1.3.21, and then used B<EFAULT> instead of "
6554 "B<ENOMEM>.  In Linux 2.4.19 this was changed to the POSIX value B<ENOMEM>."
6555 msgstr ""
6556 "この関数は Linux 1.3.21 で導入されたが、 B<ENOMEM> ではなく B<EFAULT> が使わ"
6557 "れていた。 これは Linux 2.4.19 で POSIX における値 B<ENOMEM> に変更された。"
6558
6559 #.  POSIX.1-2001: It shall be defined to -1 or 0 or 200112L.
6560 #.  -1: unavailable, 0: ask using sysconf().
6561 #.  glibc defines them to 1.
6562 #. type: Plain text
6563 #: build/C/man2/msync.2:118
6564 msgid ""
6565 "On POSIX systems on which B<msync>()  is available, both "
6566 "B<_POSIX_MAPPED_FILES> and B<_POSIX_SYNCHRONIZED_IO> are defined in "
6567 "I<E<lt>unistd.hE<gt>> to a value greater than 0.  (See also B<sysconf>(3).)"
6568 msgstr ""
6569 "B<msync>()  が使用可能な POSIX システムでは B<_POSIX_MAPPED_FILES> と "
6570 "B<_POSIX_SYNCHRONIZED_IO> の両方が I<E<lt>unistd.hE<gt>> で 0 より大きい値に"
6571 "定義される。 (B<sysconf>(3)  を参照すること。 )"
6572
6573 #. type: TP
6574 #: build/C/man2/msync.2:120 build/C/man7/shm_overview.7:46
6575 #, no-wrap
6576 msgid "B<mmap>(2)"
6577 msgstr "B<mmap>(2)"
6578
6579 #. type: TH
6580 #: build/C/man3/mtrace.3:23
6581 #, no-wrap
6582 msgid "MTRACE"
6583 msgstr "MTRACE"
6584
6585 #. type: Plain text
6586 #: build/C/man3/mtrace.3:26
6587 msgid "mtrace, muntrace - malloc tracing"
6588 msgstr "mtrace, muntrace - malloc のトレース"
6589
6590 #. type: Plain text
6591 #: build/C/man3/mtrace.3:28
6592 msgid "B<#include E<lt>mcheck.hE<gt>>"
6593 msgstr "B<#include E<lt>mcheck.hE<gt>>"
6594
6595 #. type: Plain text
6596 #: build/C/man3/mtrace.3:30
6597 msgid "B<void mtrace(void);>"
6598 msgstr "B<void mtrace(void);>"
6599
6600 #. type: Plain text
6601 #: build/C/man3/mtrace.3:32
6602 msgid "B<void muntrace(void);>"
6603 msgstr "B<void muntrace(void);>"
6604
6605 #. type: Plain text
6606 #: build/C/man3/mtrace.3:44
6607 msgid ""
6608 "The B<mtrace>()  function installs hook functions for the memory-allocation "
6609 "functions (B<malloc>(3), B<realloc>(3)  B<memalign>(3), B<free>(3)).  These "
6610 "hook functions record tracing information about memory allocation and "
6611 "deallocation.  The tracing information can be used to discover memory leaks "
6612 "and attempts to free nonallocated memory in a program."
6613 msgstr ""
6614
6615 #. type: Plain text
6616 #: build/C/man3/mtrace.3:55
6617 msgid ""
6618 "The B<muntrace>()  function disables the hook functions installed by "
6619 "B<mtrace>(), so that tracing information is no longer recorded for the "
6620 "memory-allocation functions.  If no hook functions were successfully "
6621 "installed by B<mtrace>(), B<muntrace>()  does nothing."
6622 msgstr ""
6623
6624 #. type: Plain text
6625 #: build/C/man3/mtrace.3:63
6626 msgid ""
6627 "When B<mtrace>(3)  is called, it checks the value of the environment "
6628 "variable B<MALLOC_TRACE>, which should contain the pathname of a file in "
6629 "which the tracing information is to be recorded.  If the pathname is "
6630 "successfully opened, it is truncated to zero length."
6631 msgstr ""
6632
6633 #. type: Plain text
6634 #: build/C/man3/mtrace.3:76
6635 msgid ""
6636 "If B<MALLOC_TRACE> is not set, or the pathname it specifies is invalid or "
6637 "not writable, then no hook functions are installed, and B<mtrace>()  has no "
6638 "effect.  In set-user-ID and set-group-ID programs, B<MALLOC_TRACE> is "
6639 "ignored, and B<mtrace>()  has no effect."
6640 msgstr ""
6641
6642 #. type: Plain text
6643 #: build/C/man3/mtrace.3:84
6644 msgid ""
6645 "In normal usage, B<mtrace>()  is called once at the start of execution of a "
6646 "program, and B<muntrace>()  is never called."
6647 msgstr ""
6648
6649 #. type: Plain text
6650 #: build/C/man3/mtrace.3:94
6651 msgid ""
6652 "The tracing output produced after a call to B<mtrace>()  is textual, but not "
6653 "designed to be human readable.  The GNU C library provides a Perl script, "
6654 "B<mtrace>(1), that interprets the trace log and produces human-readable "
6655 "output.  For best results, the traced program should be compiled with "
6656 "debugging enabled, so that line-number information is recorded in the "
6657 "executable."
6658 msgstr ""
6659
6660 #. type: Plain text
6661 #: build/C/man3/mtrace.3:100
6662 msgid ""
6663 "The tracing performed by B<mtrace>()  incurs a performance penalty (if "
6664 "B<MALLOC_TRACE> points to a valid, writable pathname)."
6665 msgstr ""
6666
6667 #. type: Plain text
6668 #: build/C/man3/mtrace.3:106
6669 msgid ""
6670 "The line-number information produced by B<mtrace>(1)  is not always precise: "
6671 "the line number references may refer to the previous or following (non-"
6672 "blank)  line of the source code."
6673 msgstr ""
6674
6675 #. type: Plain text
6676 #: build/C/man3/mtrace.3:113
6677 msgid ""
6678 "The shell session below demonstrates the use of the B<mtrace>()  function "
6679 "and the B<mtrace>(1)  command in a program that has memory leaks at two "
6680 "different locations.  The demonstration uses the following program:"
6681 msgstr ""
6682
6683 #. type: Plain text
6684 #: build/C/man3/mtrace.3:120
6685 #, no-wrap
6686 msgid ""
6687 "$ B<cat t_mtrace.c>\n"
6688 "#include E<lt>mcheck.hE<gt>\n"
6689 "#include E<lt>stdlib.hE<gt>\n"
6690 "#include E<lt>stdio.hE<gt>\n"
6691 msgstr ""
6692 "$ B<cat t_mtrace.c>\n"
6693 "#include E<lt>mcheck.hE<gt>\n"
6694 "#include E<lt>stdlib.hE<gt>\n"
6695 "#include E<lt>stdio.hE<gt>\n"
6696
6697 #. type: Plain text
6698 #: build/C/man3/mtrace.3:125
6699 #, no-wrap
6700 msgid ""
6701 "int\n"
6702 "main(int argc, char *argv[])\n"
6703 "{\n"
6704 "    int j;\n"
6705 msgstr ""
6706 "int\n"
6707 "main(int argc, char *argv[])\n"
6708 "{\n"
6709 "    int j;\n"
6710
6711 #. type: Plain text
6712 #: build/C/man3/mtrace.3:127
6713 #, no-wrap
6714 msgid "    mtrace();\n"
6715 msgstr "    mtrace();\n"
6716
6717 #. type: Plain text
6718 #: build/C/man3/mtrace.3:130
6719 #, no-wrap
6720 msgid ""
6721 "    for (j = 0; j E<lt> 2; j++)\n"
6722 "        malloc(100);            /* Never freed--a memory leak */\n"
6723 msgstr ""
6724 "    for (j = 0; j E<lt> 2; j++)\n"
6725 "        malloc(100);            /* Never freed--a memory leak */\n"
6726
6727 #. type: Plain text
6728 #: build/C/man3/mtrace.3:134
6729 #, no-wrap
6730 msgid ""
6731 "    calloc(16, 16);             /* Never freed--a memory leak */\n"
6732 "    exit(EXIT_SUCCESS);\n"
6733 "}\n"
6734 msgstr ""
6735 "    calloc(16, 16);             /* Never freed--a memory leak */\n"
6736 "    exit(EXIT_SUCCESS);\n"
6737 "}\n"
6738
6739 #. type: Plain text
6740 #: build/C/man3/mtrace.3:140
6741 msgid ""
6742 "When we run the program as follows, we see that B<mtrace>()  diagnosed "
6743 "memory leaks at two different locations in the program:"
6744 msgstr ""
6745
6746 #. type: Plain text
6747 #: build/C/man3/mtrace.3:153
6748 #, no-wrap
6749 msgid ""
6750 "$ B<cc -g t_mtrace.c -o t_mtrace>\n"
6751 "$ B<export MALLOC_TRACE=/tmp/t>\n"
6752 "$ B<./t_mtrace>\n"
6753 "$ B<mtrace ./t_mtrace $MALLOC_TRACE>\n"
6754 "Memory not freed:\n"
6755 "-----------------\n"
6756 "   Address     Size     Caller\n"
6757 "0x084c9378     0x64  at /home/cecilia/t_mtrace.c:12\n"
6758 "0x084c93e0     0x64  at /home/cecilia/t_mtrace.c:12\n"
6759 "0x084c9448    0x100  at /home/cecilia/t_mtrace.c:16\n"
6760 msgstr ""
6761 "$ B<cc -g t_mtrace.c -o t_mtrace>\n"
6762 "$ B<export MALLOC_TRACE=/tmp/t>\n"
6763 "$ B<./t_mtrace>\n"
6764 "$ B<mtrace ./t_mtrace $MALLOC_TRACE>\n"
6765 "Memory not freed:\n"
6766 "-----------------\n"
6767 "   Address     Size     Caller\n"
6768 "0x084c9378     0x64  at /home/cecilia/t_mtrace.c:12\n"
6769 "0x084c93e0     0x64  at /home/cecilia/t_mtrace.c:12\n"
6770 "0x084c9448    0x100  at /home/cecilia/t_mtrace.c:16\n"
6771
6772 #. type: Plain text
6773 #: build/C/man3/mtrace.3:165
6774 msgid ""
6775 "The first two messages about unfreed memory correspond to the two B<malloc>"
6776 "(3)  calls inside the I<for> loop.  The final message corresponds to the "
6777 "call to B<calloc>(3)  (which in turn calls B<malloc>(3))."
6778 msgstr ""
6779
6780 #. type: Plain text
6781 #: build/C/man3/mtrace.3:170
6782 msgid "B<mtrace>(1), B<malloc>(3), B<malloc_hook>(3), B<mcheck>(3)"
6783 msgstr "B<mtrace>(1), B<malloc>(3), B<malloc_hook>(3), B<mcheck>(3)"
6784
6785 #. type: TH
6786 #: build/C/man2/posix_fadvise.2:27
6787 #, no-wrap
6788 msgid "POSIX_FADVISE"
6789 msgstr "POSIX_FADVISE"
6790
6791 #. type: TH
6792 #: build/C/man2/posix_fadvise.2:27 build/C/man2/sync_file_range.2:30
6793 #, no-wrap
6794 msgid "2010-10-09"
6795 msgstr "2010-10-09"
6796
6797 #. type: Plain text
6798 #: build/C/man2/posix_fadvise.2:30
6799 msgid "posix_fadvise - predeclare an access pattern for file data"
6800 msgstr "posix_fadvise - ファイルデータのアクセスパターンをあらかじめ宣言する"
6801
6802 #. type: Plain text
6803 #: build/C/man2/posix_fadvise.2:33 build/C/man3/posix_fallocate.3:29
6804 #, no-wrap
6805 msgid "B<#include E<lt>fcntl.hE<gt>>\n"
6806 msgstr "B<#include E<lt>fcntl.hE<gt>>\n"
6807
6808 #. type: Plain text
6809 #: build/C/man2/posix_fadvise.2:36
6810 #, no-wrap
6811 msgid "B<int posix_fadvise(int >I<fd>B<, off_t >I<offset>B<, off_t >I<len>B<, int >I<advice>B<);>\n"
6812 msgstr "B<int posix_fadvise(int >I<fd>B<, off_t >I<offset>B<, off_t >I<len>B<, int >I<advice>B<);>\n"
6813
6814 #. type: Plain text
6815 #: build/C/man2/posix_fadvise.2:45
6816 msgid "B<posix_fadvise>():"
6817 msgstr "B<posix_fadvise>():"
6818
6819 #. type: Plain text
6820 #: build/C/man2/posix_fadvise.2:47 build/C/man3/posix_fallocate.3:42
6821 msgid "_XOPEN_SOURCE\\ E<gt>=\\ 600 || _POSIX_C_SOURCE\\ E<gt>=\\ 200112L"
6822 msgstr "_XOPEN_SOURCE\\ E<gt>=\\ 600 || _POSIX_C_SOURCE\\ E<gt>=\\ 200112L"
6823
6824 #. type: Plain text
6825 #: build/C/man2/posix_fadvise.2:55
6826 msgid ""
6827 "Programs can use B<posix_fadvise>()  to announce an intention to access file "
6828 "data in a specific pattern in the future, thus allowing the kernel to "
6829 "perform appropriate optimizations."
6830 msgstr ""
6831 "プログラムは、将来特定のパターンでファイルデータに アクセスする意思を伝えるた"
6832 "めに B<posix_fadvise>()  を使うことができる。 これにより、カーネルが適切な最"
6833 "適化を実行することが可能になる。"
6834
6835 #. type: Plain text
6836 #: build/C/man2/posix_fadvise.2:62
6837 msgid ""
6838 "The I<advice> applies to a (not necessarily existent) region starting at "
6839 "I<offset> and extending for I<len> bytes (or until the end of the file if "
6840 "I<len> is 0) within the file referred to by I<fd>.  The I<advice> is not "
6841 "binding; it merely constitutes an expectation on behalf of the application."
6842 msgstr ""
6843 "I<advice> は I<fd> が参照しているファイルの I<offset> から始まる I<len> バ"
6844 "イ\n"
6845 "トの範囲内 (I<len> が 0 の場合はファイルの終りまで) の (必ずしも存在しない)\n"
6846 "領域に適用される。 I<advice> は義務づけではない。 I<advice> は単にアプリ"
6847 "ケー\n"
6848 "ションのために可能性を構成するだけである。"
6849
6850 #. type: Plain text
6851 #: build/C/man2/posix_fadvise.2:64
6852 msgid "Permissible values for I<advice> include:"
6853 msgstr "I<advice> に許される値には、以下のものが含まれる:"
6854
6855 #. type: TP
6856 #: build/C/man2/posix_fadvise.2:64
6857 #, no-wrap
6858 msgid "B<POSIX_FADV_NORMAL>"
6859 msgstr "B<POSIX_FADV_NORMAL>"
6860
6861 #. type: Plain text
6862 #: build/C/man2/posix_fadvise.2:70
6863 msgid ""
6864 "Indicates that the application has no advice to give about its access "
6865 "pattern for the specified data.  If no advice is given for an open file, "
6866 "this is the default assumption."
6867 msgstr ""
6868 "指定されたデータのアクセスパターンを指示するアドバイスを アプリケーションが何"
6869 "も持っていないことを示す。 オープンされたファイルにアドバイスが指定されない場"
6870 "合、 これがデフォルトで仮定される。"
6871
6872 #. type: TP
6873 #: build/C/man2/posix_fadvise.2:70
6874 #, no-wrap
6875 msgid "B<POSIX_FADV_SEQUENTIAL>"
6876 msgstr "B<POSIX_FADV_SEQUENTIAL>"
6877
6878 #. type: Plain text
6879 #: build/C/man2/posix_fadvise.2:74
6880 msgid ""
6881 "The application expects to access the specified data sequentially (with "
6882 "lower offsets read before higher ones)."
6883 msgstr ""
6884 "アプリケーションは指定されたデータがシーケンシャルに (大きなオフセットの前に"
6885 "小さなオフセットのデータを読むように)  アクセスされることを期待する。"
6886
6887 #. type: TP
6888 #: build/C/man2/posix_fadvise.2:74
6889 #, no-wrap
6890 msgid "B<POSIX_FADV_RANDOM>"
6891 msgstr "B<POSIX_FADV_RANDOM>"
6892
6893 #. type: Plain text
6894 #: build/C/man2/posix_fadvise.2:77
6895 msgid "The specified data will be accessed in random order."
6896 msgstr "指定されたデータがランダムな順番でアクセスされる。"
6897
6898 #. type: TP
6899 #: build/C/man2/posix_fadvise.2:77
6900 #, no-wrap
6901 msgid "B<POSIX_FADV_NOREUSE>"
6902 msgstr "B<POSIX_FADV_NOREUSE>"
6903
6904 #. type: Plain text
6905 #: build/C/man2/posix_fadvise.2:80
6906 msgid "The specified data will be accessed only once."
6907 msgstr "指定されたデータは 1 度しかアクセスされない。"
6908
6909 #. type: TP
6910 #: build/C/man2/posix_fadvise.2:80
6911 #, no-wrap
6912 msgid "B<POSIX_FADV_WILLNEED>"
6913 msgstr "B<POSIX_FADV_WILLNEED>"
6914
6915 #. type: Plain text
6916 #: build/C/man2/posix_fadvise.2:83
6917 msgid "The specified data will be accessed in the near future."
6918 msgstr "指定されたデータは近い将来アクセスされる。"
6919
6920 #. type: TP
6921 #: build/C/man2/posix_fadvise.2:83
6922 #, no-wrap
6923 msgid "B<POSIX_FADV_DONTNEED>"
6924 msgstr "B<POSIX_FADV_DONTNEED>"
6925
6926 #. type: Plain text
6927 #: build/C/man2/posix_fadvise.2:86
6928 msgid "The specified data will not be accessed in the near future."
6929 msgstr "指定されたデータは近い将来アクセスされない。"
6930
6931 #. type: Plain text
6932 #: build/C/man2/posix_fadvise.2:89
6933 msgid "On success, zero is returned.  On error, an error number is returned."
6934 msgstr "成功した場合は 0 が返される。 失敗した場合はエラー番号が返される。"
6935
6936 #. type: Plain text
6937 #: build/C/man2/posix_fadvise.2:93
6938 msgid "The I<fd> argument was not a valid file descriptor."
6939 msgstr "I<fd> 引き数が有効なファイルディスクリプタでない。"
6940
6941 #. type: Plain text
6942 #: build/C/man2/posix_fadvise.2:96
6943 msgid "An invalid value was specified for I<advice>."
6944 msgstr "無効な値が I<advice> に指定された。"
6945
6946 #. type: Plain text
6947 #: build/C/man2/posix_fadvise.2:103
6948 msgid ""
6949 "The specified file descriptor refers to a pipe or FIFO.  (Linux actually "
6950 "returns B<EINVAL> in this case.)"
6951 msgstr ""
6952 "指定されたファイルディスクリプタがパイプまたは FIFO を参照している (この場"
6953 "合、Linux は実際には B<EINVAL> を返す)。"
6954
6955 #.  of fadvise64_64()
6956 #. type: Plain text
6957 #: build/C/man2/posix_fadvise.2:111
6958 msgid ""
6959 "Kernel support first appeared in Linux 2.5.60; the underlying system call is "
6960 "called B<fadvise64>().  Library support has been provided since glibc "
6961 "version 2.2, via the wrapper function B<posix_fadvise>()."
6962 msgstr ""
6963 "カーネルによるサポートは Linux 2.5.60 で最初に登場し、\n"
6964 "対応するシステムコールは B<fadvise64>() という名前である。\n"
6965 "ライブラリによるサポートは glibc バージョン 2.2 以降で提供されており、\n"
6966 "ラッパー関数は B<posix_fadvise>() という名前である。"
6967
6968 #. type: Plain text
6969 #: build/C/man2/posix_fadvise.2:120
6970 msgid ""
6971 "POSIX.1-2001.  Note that the type of the I<len> argument was changed from "
6972 "I<size_t> to I<off_t> in POSIX.1-2003 TC1."
6973 msgstr ""
6974 "POSIX.1-2001.  I<len> 引き数の型が POSIX.1-2003 TC1 において I<size_t> から "
6975 "I<off_t> に変更された点に注意すること。"
6976
6977 #. type: Plain text
6978 #: build/C/man2/posix_fadvise.2:126
6979 msgid ""
6980 "Under Linux, B<POSIX_FADV_NORMAL> sets the readahead window to the default "
6981 "size for the backing device; B<POSIX_FADV_SEQUENTIAL> doubles this size, and "
6982 "B<POSIX_FADV_RANDOM> disables file readahead entirely.  These changes affect "
6983 "the entire file, not just the specified region (but other open file handles "
6984 "to the same file are unaffected)."
6985 msgstr ""
6986 "Linux では、B<POSIX_FADV_NORMAL> はバッキングデバイスの デフォルトサイズに先"
6987 "読み (readahead) ウインドウを設定する。 B<POSIX_FADV_SEQUENTIAL> はこのサイズ"
6988 "を 2 倍し、 B<POSIX_FADV_RANDOM> は先読みを全く無効にする。 これらの変更は"
6989 "ファイル全体に影響し、指定された領域のみに影響するわけではない (しかし同じ"
6990 "ファイルに対する他のオープンファイルハンドルは影響を受けない)。"
6991
6992 #. type: Plain text
6993 #: build/C/man2/posix_fadvise.2:133
6994 msgid ""
6995 "B<POSIX_FADV_WILLNEED> initiates a nonblocking read of the specified region "
6996 "into the page cache.  The amount of data read may be decreased by the kernel "
6997 "depending on virtual memory load.  (A few megabytes will usually be fully "
6998 "satisfied, and more is rarely useful.)"
6999 msgstr ""
7000 "B<POSIX_FADV_WILLNEED> は、 ページキャッシュに指定領域のブロックされない読み"
7001 "込みを開始する。 読み込まれるデータの総量は、 仮想メモリの負荷に依ってカーネ"
7002 "ルが減らすかもしれない (数メガバイトであれば通常は全く十分であり、 それより多"
7003 "くてもめったに役に立たない)。"
7004
7005 #. type: Plain text
7006 #: build/C/man2/posix_fadvise.2:137
7007 msgid ""
7008 "In kernels before 2.6.18, B<POSIX_FADV_NOREUSE> had the same semantics as "
7009 "B<POSIX_FADV_WILLNEED>.  This was probably a bug; since kernel 2.6.18, this "
7010 "flag is a no-op."
7011 msgstr ""
7012 "2.6.18 より前のカーネルでは、B<POSIX_FADV_NOREUSE> は B<POSIX_FADV_WILLNEED> "
7013 "と同じ意味であった。 これは多分バグであった。 カーネル 2.6.18 以降では、この"
7014 "フラグは何も行わない。"
7015
7016 #. type: Plain text
7017 #: build/C/man2/posix_fadvise.2:145
7018 msgid ""
7019 "B<POSIX_FADV_DONTNEED> attempts to free cached pages associated with the "
7020 "specified region.  This is useful, for example, while streaming large "
7021 "files.  A program may periodically request the kernel to free cached data "
7022 "that has already been used, so that more useful cached pages are not "
7023 "discarded instead."
7024 msgstr ""
7025 "B<POSIX_FADV_DONTNEED> は指定された領域に関連付けられた キャッシュページを解"
7026 "放しようとする。 例えば、これは大きなファイルをストリーミングするときに役立"
7027 "つ。 プログラムは、使用済みのキャッシュされたデータを解放するように、 定期的"
7028 "にカーネルに要求するかもしれない。 そうすることにより、さらに有効なキャッシュ"
7029 "されたページが、 代わりに破棄されることはない。"
7030
7031 #. type: Plain text
7032 #: build/C/man2/posix_fadvise.2:153
7033 msgid ""
7034 "Pages that have not yet been written out will be unaffected, so if the "
7035 "application wishes to guarantee that pages will be released, it should call "
7036 "B<fsync>(2)  or B<fdatasync>(2)  first."
7037 msgstr ""
7038 "まだ書き出されていないページは影響を受けないので、 そのページの解放が保証され"
7039 "ることをアプリケーションが望んでいるなら、 最初に B<fsync>(2)  または "
7040 "B<fdatasync>(2)  を呼ぶべきである。"
7041
7042 #. type: SS
7043 #: build/C/man2/posix_fadvise.2:153
7044 #, no-wrap
7045 msgid "arm_fadvise()"
7046 msgstr "arm_fadvise()"
7047
7048 #. type: Plain text
7049 #: build/C/man2/posix_fadvise.2:165
7050 msgid ""
7051 "The ARM architecture needs 64-bit arguments to be aligned in a suitable pair "
7052 "of registers.  On this architecture, the call signature of B<posix_fadvise>"
7053 "()  is flawed, since it forces a register to be wasted as padding between "
7054 "the I<fd> and I<len> arguments.  Therefore, since Linux 2.6.14, ARM defines "
7055 "a different system call that orders the arguments suitably:"
7056 msgstr ""
7057
7058 #. type: Plain text
7059 #: build/C/man2/posix_fadvise.2:170
7060 #, no-wrap
7061 msgid ""
7062 "B<long arm_fadvise64_64(int >I<fd>B<, int >I<advice>B<,>\n"
7063 "B<                      loff_t >I<offset>B<, loff_t >I<len>B<);>\n"
7064 msgstr ""
7065 "B<long arm_fadvise64_64(int >I<fd>B<, int >I<advice>B<,>\n"
7066 "B<                      loff_t >I<offset>B<, loff_t >I<len>B<);>\n"
7067
7068 #.  No ARM support in glibc.
7069 #. type: Plain text
7070 #: build/C/man2/posix_fadvise.2:177
7071 msgid ""
7072 "The behavior of this system call is otherwise exactly the same as "
7073 "B<posix_fadvise>().  No library support is provided for this system call in "
7074 "glibc."
7075 msgstr ""
7076
7077 #. type: Plain text
7078 #: build/C/man2/posix_fadvise.2:182
7079 msgid ""
7080 "In kernels before 2.6.6, if I<len> was specified as 0, then this was "
7081 "interpreted literally as \"zero bytes\", rather than as meaning \"all bytes "
7082 "through to the end of the file\"."
7083 msgstr ""
7084 "2.6.6 より前のカーネルでは、 I<len> に 0 が指定された場合、 「ファイルの終り"
7085 "までの全てのバイト」という意味ではなく、 文字通り「0 バイト」として解釈されて"
7086 "いた。"
7087
7088 #.  FIXME . Write a posix_fadvise(3) page.
7089 #. type: Plain text
7090 #: build/C/man2/posix_fadvise.2:188
7091 msgid ""
7092 "B<readahead>(2), B<sync_file_range>(2), B<posix_fallocate>(3), "
7093 "B<posix_madvise>(3)"
7094 msgstr ""
7095 "B<readahead>(2), B<sync_file_range>(2), B<posix_fallocate>(3),\n"
7096 "B<posix_madvise>(3)"
7097
7098 #. type: TH
7099 #: build/C/man3/posix_fallocate.3:23
7100 #, no-wrap
7101 msgid "POSIX_FALLOCATE"
7102 msgstr "POSIX_FALLOCATE"
7103
7104 #. type: TH
7105 #: build/C/man3/posix_fallocate.3:23
7106 #, no-wrap
7107 msgid "2010-09-20"
7108 msgstr "2010-09-20"
7109
7110 #. type: Plain text
7111 #: build/C/man3/posix_fallocate.3:26
7112 msgid "posix_fallocate - allocate file space"
7113 msgstr "posix_fallocate - ファイルのスペースを確保する"
7114
7115 #. type: Plain text
7116 #: build/C/man3/posix_fallocate.3:31
7117 #, no-wrap
7118 msgid "B<int posix_fallocate(int >I<fd>B<, off_t >I<offset>B<, off_t >I<len>B<);>\n"
7119 msgstr "B<int posix_fallocate(int >I<fd>B<, off_t >I<offset>B<, off_t >I<len>B<);>\n"
7120
7121 #. type: Plain text
7122 #: build/C/man3/posix_fallocate.3:40
7123 msgid "B<posix_fallocate>():"
7124 msgstr "B<posix_fallocate>():"
7125
7126 #. type: Plain text
7127 #: build/C/man3/posix_fallocate.3:59
7128 msgid ""
7129 "The function B<posix_fallocate>()  ensures that disk space is allocated for "
7130 "the file referred to by the descriptor I<fd> for the bytes in the range "
7131 "starting at I<offset> and continuing for I<len> bytes.  After a successful "
7132 "call to B<posix_fallocate>(), subsequent writes to bytes in the specified "
7133 "range are guaranteed not to fail because of lack of disk space."
7134 msgstr ""
7135 "関数 B<posix_fallocate>()  は、ディスクリプタ I<fd> で参照されるファイルに対"
7136 "して、ディスクスペースを確実に確保する。 ディスクスペースは I<offset> から始"
7137 "まる I<len> バイトの範囲のバイトである。 B<posix_fallocate>()  の呼び出しが成"
7138 "功した後、指定された範囲のバイトに対する書き込みは、 ディスクスペースの不足で"
7139 "失敗しないことが保証される。"
7140
7141 #. type: Plain text
7142 #: build/C/man3/posix_fallocate.3:64
7143 msgid ""
7144 "If the size of the file is less than I<offset>+I<len>, then the file is "
7145 "increased to this size; otherwise the file size is left unchanged."
7146 msgstr ""
7147 "ファイルのサイズが I<offset>+I<len> より小さい場合、ファイルはこのサイズにな"
7148 "るように拡大される。 それ以外の場合、ファイルサイズは変わらない。"
7149
7150 #. type: Plain text
7151 #: build/C/man3/posix_fallocate.3:70
7152 msgid ""
7153 "B<posix_fallocate>()  returns zero on success, or an error number on "
7154 "failure.  Note that I<errno> is not set."
7155 msgstr ""
7156 "B<posix_fallocate>()  は成功した場合、0 を返す。 失敗した場合、エラー番号を返"
7157 "す。 I<errno> が設定されない点に注意すること。"
7158
7159 #. type: Plain text
7160 #: build/C/man3/posix_fallocate.3:79
7161 msgid "I<offset+len> exceeds the maximum file size."
7162 msgstr "I<offset+len> が最大ファイルサイズを超えている。"
7163
7164 #. type: Plain text
7165 #: build/C/man3/posix_fallocate.3:89
7166 msgid "I<fd> does not refer to a regular file."
7167 msgstr "I<fd> が通常のファイルとして参照されていない。"
7168
7169 #. type: Plain text
7170 #: build/C/man3/posix_fallocate.3:98
7171 msgid "I<fd> refers to a pipe."
7172 msgstr "I<fd> がパイプを参照している。"
7173
7174 #. type: Plain text
7175 #: build/C/man3/posix_fallocate.3:101
7176 msgid "B<posix_fallocate>()  is available since glibc 2.1.94."
7177 msgstr "B<posix_fallocate>()  は glibc 2.1.94 以降で利用可能である。"
7178
7179 #. type: Plain text
7180 #: build/C/man3/posix_fallocate.3:126
7181 msgid ""
7182 "POSIX.1-2008 says that an implementation I<shall> give the B<EINVAL> error "
7183 "if I<len> was 0, or I<offset> was less than 0.  POSIX.1-2001 says that an "
7184 "implementation I<shall> give the B<EINVAL> error if I<len> is less than 0, "
7185 "or I<offset> was less than 0, and I<may> give the error if I<len> equals "
7186 "zero."
7187 msgstr ""
7188 "POSIX.1-2008 では、 I<len> が 0 の場合、もしくは I<offset> が 0 未満の場合、 "
7189 "B<EINVAL> エラーを返すものとされている。 POSIX.1-2001 では、 I<len> が 0 未満"
7190 "の場合、もしくは I<offset> が 0 未満の場合、 B<EINVAL> エラーを返すものとされ"
7191 "ている。また、 I<len> が 0 の場合、 B<EINVAL> エラーを返してもよいとされてい"
7192 "る。"
7193
7194 #. type: Plain text
7195 #: build/C/man3/posix_fallocate.3:130
7196 msgid "B<fallocate>(2), B<lseek>(2), B<posix_fadvise>(2)"
7197 msgstr "B<fallocate>(2), B<lseek>(2), B<posix_fadvise>(2)"
7198
7199 #. type: TH
7200 #: build/C/man3/posix_memalign.3:28
7201 #, no-wrap
7202 msgid "POSIX_MEMALIGN"
7203 msgstr "POSIX_MEMALIGN"
7204
7205 #. type: TH
7206 #: build/C/man3/posix_memalign.3:28
7207 #, no-wrap
7208 msgid "2012-03-23"
7209 msgstr "2012-03-23"
7210
7211 #. type: Plain text
7212 #: build/C/man3/posix_memalign.3:31
7213 msgid ""
7214 "posix_memalign, aligned_alloc, memalign, valloc, pvalloc - Allocate aligned "
7215 "memory"
7216 msgstr ""
7217 "posix_memalign, aligned_alloc, memalign, valloc, pvalloc - アラインメント\n"
7218 "されたメモリの割り当てを行う"
7219
7220 #. type: Plain text
7221 #: build/C/man3/posix_memalign.3:38
7222 #, no-wrap
7223 msgid ""
7224 "B<int posix_memalign(void **>I<memptr>B<, size_t >I<alignment>B<, size_t >I<size>B<);>\n"
7225 "B<void *aligned_alloc(size_t >I<alignment>B<, size_t >I<size>B<);>\n"
7226 "B<void *valloc(size_t >I<size>B<);>\n"
7227 msgstr ""
7228 "B<int posix_memalign(void **>I<memptr>B<, size_t >I<alignment>B<, size_t >I<size>B<);>\n"
7229 "B<void *aligned_alloc(size_t >I<alignment>B<, size_t >I<size>B<);>\n"
7230 "B<void *valloc(size_t >I<size>B<);>\n"
7231
7232 #. type: Plain text
7233 #: build/C/man3/posix_memalign.3:43
7234 #, no-wrap
7235 msgid ""
7236 "B<void *memalign(size_t >I<alignment>B<, size_t >I<size>B<);>\n"
7237 "B<void *pvalloc(size_t >I<size>B<);>\n"
7238 msgstr ""
7239 "B<void *memalign(size_t >I<alignment>B<, size_t >I<size>B<);>\n"
7240 "B<void *pvalloc(size_t >I<size>B<);>\n"
7241
7242 #. type: Plain text
7243 #: build/C/man3/posix_memalign.3:53
7244 msgid ""
7245 "B<posix_memalign>(): _POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ "
7246 "E<gt>=\\ 600"
7247 msgstr ""
7248 "B<posix_memalign>(): _POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ "
7249 "E<gt>=\\ 600"
7250
7251 #. type: Plain text
7252 #: build/C/man3/posix_memalign.3:56
7253 msgid "B<aligned_alloc>(): _ISOC11_SOURCE"
7254 msgstr "B<aligned_alloc>(): _ISOC11_SOURCE"
7255
7256 #. type: Plain text
7257 #: build/C/man3/posix_memalign.3:58
7258 msgid "B<valloc>():"
7259 msgstr "B<valloc>():"
7260
7261 #. type: TP
7262 #: build/C/man3/posix_memalign.3:61
7263 #, no-wrap
7264 msgid "Since glibc 2.12:"
7265 msgstr "glibc 2.12 以降:"
7266
7267 #. type: Plain text
7268 #: build/C/man3/posix_memalign.3:68
7269 #, no-wrap
7270 msgid ""
7271 "_BSD_SOURCE ||\n"
7272 "    (_XOPEN_SOURCE\\ E<gt>=\\ 500 ||\n"
7273 "        _XOPEN_SOURCE\\ &&\\ _XOPEN_SOURCE_EXTENDED) &&\n"
7274 "    !(_POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ E<gt>=\\ 600)\n"
7275 msgstr ""
7276 "_BSD_SOURCE ||\n"
7277 "    (_XOPEN_SOURCE\\ E<gt>=\\ 500 ||\n"
7278 "        _XOPEN_SOURCE\\ &&\\ _XOPEN_SOURCE_EXTENDED) &&\n"
7279 "    !(_POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ E<gt>=\\ 600)\n"
7280
7281 #. type: TP
7282 #: build/C/man3/posix_memalign.3:70
7283 #, no-wrap
7284 msgid "Before glibc 2.12:"
7285 msgstr "glibc 2.12 より前:"
7286
7287 #. type: Plain text
7288 #: build/C/man3/posix_memalign.3:74
7289 msgid ""
7290 "_BSD_SOURCE || _XOPEN_SOURCE\\ E<gt>=\\ 500 || _XOPEN_SOURCE\\ &&\\ "
7291 "_XOPEN_SOURCE_EXTENDED"
7292 msgstr ""
7293 "_BSD_SOURCE || _XOPEN_SOURCE\\ E<gt>=\\ 500 || _XOPEN_SOURCE\\ &&\\ "
7294 "_XOPEN_SOURCE_EXTENDED"
7295
7296 #. type: Plain text
7297 #: build/C/man3/posix_memalign.3:81
7298 msgid ""
7299 "(The (nonstandard) header file I<E<lt>malloc.hE<gt>> also exposes the "
7300 "declaration of B<valloc>(); no feature test macros are required.)"
7301 msgstr ""
7302 "((非標準の) ヘッダファイル I<E<lt>malloc.hE<gt>> も\n"
7303 "B<valloc>() の宣言も公開する。機能検査マクロは不要である。"
7304
7305 #.  glibc does this:
7306 #. type: Plain text
7307 #: build/C/man3/posix_memalign.3:102
7308 msgid ""
7309 "The function B<posix_memalign>()  allocates I<size> bytes and places the "
7310 "address of the allocated memory in I<*memptr>.  The address of the allocated "
7311 "memory will be a multiple of I<alignment>, which must be a power of two and "
7312 "a multiple of I<sizeof(void *)>.  If I<size> is 0, then B<posix_memalign>()  "
7313 "returns either NULL, or a unique pointer value that can later be "
7314 "successfully passed to B<free>(3)."
7315 msgstr ""
7316 "関数 B<posix_memalign>()  は、 I<size> バイトのメモリを割り当て、割り当てられ"
7317 "たメモリのアドレスを I<*memptr> に設定する。 割り当てられたメモリのアドレス"
7318 "は I<alignment> の倍数になっているはずである。 I<alignment> は 2 のべき乗で、"
7319 "かつ I<sizeof(void *)> の倍数でなければならない。 I<size> が 0 の場合、 "
7320 "B<posix_memalign>()  は NULL か一意なポインタ値を返す。 このポインタ値は、後"
7321 "で B<free>(3)  に問題なく渡すことができる。"
7322
7323 #.  The behavior of memalign() for size==0 is as for posix_memalign()
7324 #.  but no standards govern this.
7325 #. type: Plain text
7326 #: build/C/man3/posix_memalign.3:113
7327 msgid ""
7328 "The obsolete function B<memalign>()  allocates I<size> bytes and returns a "
7329 "pointer to the allocated memory.  The memory address will be a multiple of "
7330 "I<alignment>, which must be a power of two."
7331 msgstr ""
7332 "廃止された関数である B<memalign>() は、 I<size> バイトのメモリを割り当て、\n"
7333 "割り当てられたメモリへのポインタを返す。 メモリのアドレスは I<alignment> \n"
7334 "の倍数になっているはずである。 I<alignment> は 2 のべき乗でなければならない。"
7335
7336 #. type: Plain text
7337 #: build/C/man3/posix_memalign.3:122
7338 msgid ""
7339 "The function B<aligned_alloc>()  is the same as B<memalign>(), except for "
7340 "the added restriction that I<size> should be a multiple of I<alignment>."
7341 msgstr ""
7342 "関数 B<aligned_alloc>() は B<memalign>() と同じだが、I<size> が "
7343 "I<alignment>\n"
7344 "の倍数でなければならないという追加の制限がある点が異なる。"
7345
7346 #. type: Plain text
7347 #: build/C/man3/posix_memalign.3:132
7348 msgid ""
7349 "The obsolete function B<valloc>()  allocates I<size> bytes and returns a "
7350 "pointer to the allocated memory.  The memory address will be a multiple of "
7351 "the page size.  It is equivalent to I<memalign(sysconf(_SC_PAGESIZE),size)>."
7352 msgstr ""
7353 "廃止された関数である B<valloc>()  は I<size> バイトのメモリを割り当て、割り当"
7354 "てられたメモリへのポインタを返す。 メモリのアドレスはページサイズの倍数になっ"
7355 "ているはずである。 これは I<memalign(sysconf(_SC_PAGESIZE),size)> と等価であ"
7356 "る。"
7357
7358 #. type: Plain text
7359 #: build/C/man3/posix_memalign.3:139
7360 msgid ""
7361 "The obsolete function B<pvalloc>()  is similar to B<valloc>(), but rounds "
7362 "the size of the allocation up to the next multiple of the system page size."
7363 msgstr ""
7364 "廃止された関数 B<pvalloc>() は B<valloc>() と同様だが、\n"
7365 "割り当てられるサイズがシステムのページサイズの倍数に切り上げられる。"
7366
7367 #. type: Plain text
7368 #: build/C/man3/posix_memalign.3:141
7369 msgid "For all of these functions, the memory is not zeroed."
7370 msgstr "これらの関数はいずれもメモリのゼロクリアを行わない。"
7371
7372 #. type: Plain text
7373 #: build/C/man3/posix_memalign.3:148
7374 msgid ""
7375 "B<aligned_alloc>(), B<memalign>(), B<valloc>(), and B<pvalloc>()  return a "
7376 "pointer to the allocated memory, or NULL if the request fails."
7377 msgstr ""
7378 "B<aligned_alloc>(), B<memalign>(), B<valloc>(), B<pvalloc>() は割り当てられ"
7379 "た\n"
7380 "メモリへのポインタを返す。 割り当てに失敗した場合は NULL を返す。"
7381
7382 #. type: Plain text
7383 #: build/C/man3/posix_memalign.3:155
7384 msgid ""
7385 "B<posix_memalign>()  returns zero on success, or one of the error values "
7386 "listed in the next section on failure.  Note that I<errno> is not set."
7387 msgstr ""
7388 "B<posix_memalign>()  は成功した場合は 0 を返し、 失敗した場合は次のセクション"
7389 "に記載されたエラー値のいずれかを返す。 I<errno> はセットされないことに注意す"
7390 "ること。"
7391
7392 #. type: Plain text
7393 #: build/C/man3/posix_memalign.3:162
7394 msgid ""
7395 "The I<alignment> argument was not a power of two, or was not a multiple of "
7396 "I<sizeof(void *)>."
7397 msgstr ""
7398 "I<alignment> 引き数が 2 のべき乗でなかったか、 I<sizeof(void *)> の倍数でな"
7399 "かった。"
7400
7401 #. type: Plain text
7402 #: build/C/man3/posix_memalign.3:165
7403 msgid "There was insufficient memory to fulfill the allocation request."
7404 msgstr "割り当て要求を満たすのに十分なメモリがなかった。"
7405
7406 #. type: Plain text
7407 #: build/C/man3/posix_memalign.3:172
7408 msgid ""
7409 "The functions B<memalign>(), B<valloc>(), and B<pvalloc>()  have been "
7410 "available in all Linux libc libraries."
7411 msgstr ""
7412 "関数 B<memalign>(), B<valloc>(), B<pvalloc>() は\n"
7413 "すべての Linux libc ライブラリで使用可能である。"
7414
7415 #. type: Plain text
7416 #: build/C/man3/posix_memalign.3:176
7417 msgid "The function B<aligned_alloc>()  was added to glibc in version 2.16."
7418 msgstr "関数 B<aligned_alloc>() は glibc バージョン 2.16 で追加された。"
7419
7420 #. type: Plain text
7421 #: build/C/man3/posix_memalign.3:180
7422 msgid "The function B<posix_memalign>()  is available since glibc 2.1.91."
7423 msgstr "関数 B<posix_fallocate>() は glibc 2.1.91 以降で利用可能である。"
7424
7425 #. type: Plain text
7426 #: build/C/man3/posix_memalign.3:187
7427 msgid ""
7428 "The function B<valloc>()  appeared in 3.0BSD.  It is documented as being "
7429 "obsolete in 4.3BSD, and as legacy in SUSv2.  It does not appear in "
7430 "POSIX.1-2001."
7431 msgstr ""
7432 "関数 B<valloc>() は 3.0BSD で登場した。4.3BSD では廃止されたと記載されてお"
7433 "り、\n"
7434 "SUSv2 では過去の名残だと記載されている。 POSIX.1-2001 には存在しない。"
7435
7436 #. type: Plain text
7437 #: build/C/man3/posix_memalign.3:191
7438 msgid "The function B<pvalloc>()  is a GNU extension."
7439 msgstr "関数 B<pvalloc>() は GNU による拡張である。"
7440
7441 #. type: Plain text
7442 #: build/C/man3/posix_memalign.3:195
7443 msgid "The function B<memalign>()  appears in SunOS 4.1.3 but not in 4.4BSD."
7444 msgstr "関数 B<memalign>() は SunOS 4.1.3 で登場したが、4.4BSD にはない。"
7445
7446 #. type: Plain text
7447 #: build/C/man3/posix_memalign.3:199
7448 msgid "The function B<posix_memalign>()  comes from POSIX.1d."
7449 msgstr "関数 B<posix_memalign>() は POSIX.1d に由来する。"
7450
7451 #. type: Plain text
7452 #: build/C/man3/posix_memalign.3:204
7453 msgid "The function B<aligned_alloc>()  is specified in the C11 standard."
7454 msgstr "関数 I<aligned_alloc>() は C11 標準で規定されている。"
7455
7456 #. type: SS
7457 #: build/C/man3/posix_memalign.3:204
7458 #, no-wrap
7459 msgid "Headers"
7460 msgstr "ヘッダ"
7461
7462 #. type: Plain text
7463 #: build/C/man3/posix_memalign.3:208
7464 msgid ""
7465 "Everybody agrees that B<posix_memalign>()  is declared in I<E<lt>stdlib."
7466 "hE<gt>>."
7467 msgstr ""
7468 "B<posix_memalign>()  の宣言を I<E<lt>stdlib.hE<gt>> で行うことに関しては、 皆"
7469 "の意見が一致している。"
7470
7471 #. type: Plain text
7472 #: build/C/man3/posix_memalign.3:212
7473 msgid ""
7474 "On some systems B<memalign>()  is declared in I<E<lt>stdlib.hE<gt>> instead "
7475 "of I<E<lt>malloc.hE<gt>>."
7476 msgstr ""
7477 "いくつかのシステムでは、 B<memalign>()  は I<E<lt>malloc.hE<gt>> ではなく "
7478 "I<E<lt>stdlib.hE<gt>> で宣言されている。"
7479
7480 #. type: Plain text
7481 #: build/C/man3/posix_memalign.3:219
7482 msgid ""
7483 "According to SUSv2, B<valloc>()  is declared in I<E<lt>stdlib.hE<gt>>.  "
7484 "Libc4,5 and glibc declare it in I<E<lt>malloc.hE<gt>>, and also in "
7485 "I<E<lt>stdlib.hE<gt>> if suitable feature test macros are defined (see "
7486 "above)."
7487 msgstr ""
7488 "SUSv2 によると、 B<valloc>() は I<E<lt>stdlib.hE<gt>> で宣言される。 "
7489 "libc4,5\n"
7490 "や glibc では I<E<lt>malloc.hE<gt>> で宣言されており、 さらに適切な機能検査\n"
7491 "マクロが定義された場合には I<E<lt>stdlib.hE<gt>> でも宣言される(上記を参照)。"
7492
7493 #. type: Plain text
7494 #: build/C/man3/posix_memalign.3:228
7495 msgid ""
7496 "On many systems there are alignment restrictions, for example, on buffers "
7497 "used for direct block device I/O.  POSIX specifies the I<pathconf(path,"
7498 "_PC_REC_XFER_ALIGN)> call that tells what alignment is needed.  Now one can "
7499 "use B<posix_memalign>()  to satisfy this requirement."
7500 msgstr ""
7501 "多くのシステムでは、アラインメントに関して制限がある。例えば、 ブロックデバイ"
7502 "スに対するダイレクト I/O に使用するバッファには アラインメントに関する制限が"
7503 "ある。 POSIX では、どんなアラインメントが必要かを知るために I<pathconf(path,"
7504 "_PC_REC_XFER_ALIGN)> コールを規定している。ここで B<posix_memalign>()  を使う"
7505 "と、この必要条件を満たすことができる。"
7506
7507 #. type: Plain text
7508 #: build/C/man3/posix_memalign.3:237
7509 msgid ""
7510 "B<posix_memalign>()  verifies that I<alignment> matches the requirements "
7511 "detailed above.  B<memalign>()  may not check that the I<alignment> argument "
7512 "is correct."
7513 msgstr ""
7514 "B<posix_memalign>() は I<alignment> が上で詳細に述べた必要条件を満たすか\n"
7515 "どうかを確かめる。 B<memalign>() は I<alignment> 引き数が正しいかどうかの\n"
7516 "確認を行わないかもしれない。"
7517
7518 #.  Other systems allow passing the result of
7519 #.  .IR valloc ()
7520 #.  to
7521 #.  .IR free (3),
7522 #.  but not to
7523 #.  .IR realloc (3).
7524 #. type: Plain text
7525 #: build/C/man3/posix_memalign.3:265
7526 msgid ""
7527 "POSIX requires that memory obtained from B<posix_memalign>()  can be freed "
7528 "using B<free>(3).  Some systems provide no way to reclaim memory allocated "
7529 "with B<memalign>()  or B<valloc>()  (because one can only pass to B<free>"
7530 "(3)  a pointer gotten from B<malloc>(3), while, for example, B<memalign>()  "
7531 "would call B<malloc>(3)  and then align the obtained value).  The glibc "
7532 "implementation allows memory obtained from any of these functions to be "
7533 "reclaimed with B<free>(3)."
7534 msgstr ""
7535 "POSIX では B<posix_memalign>() によって獲得したメモリは B<free>(3) を\n"
7536 "使って解放することができる必要がある。 いくつかのシステムでは\n"
7537 "B<memalign>() やB<valloc>() で割り当てられたメモリを再利用する手段が\n"
7538 "提供されていない(なぜなら B<free>(3) に渡すことができるのは\n"
7539 "B<malloc>(3) から受け取ったポインタだけだが、例えば B<memalign>() は\n"
7540 "B<malloc>(3) を呼び出し、得た値をアラインメントしてしまうからである)。\n"
7541 "glibc の実装では、 ここに述べた関数のいずれで獲得したメモリも\n"
7542 "B<free>(3) で再利用することができる。"
7543
7544 #. type: Plain text
7545 #: build/C/man3/posix_memalign.3:270
7546 msgid ""
7547 "The glibc B<malloc>(3)  always returns 8-byte aligned memory addresses, so "
7548 "these functions are only needed if you require larger alignment values."
7549 msgstr ""
7550 "glibc の B<malloc>(3) は常に 8 バイトにアラインメントされたメモリアドレスを\n"
7551 "返すので、ここで述べた関数が必要になるのは 8 バイトよりも大きなアラインメン"
7552 "ト\n"
7553 "が必要な場合だけである。"
7554
7555 #. type: Plain text
7556 #: build/C/man3/posix_memalign.3:275
7557 msgid "B<brk>(2), B<getpagesize>(2), B<free>(3), B<malloc>(3)"
7558 msgstr "B<brk>(2), B<getpagesize>(2), B<free>(3), B<malloc>(3)"
7559
7560 #. type: TH
7561 #: build/C/man2/readahead.2:28
7562 #, no-wrap
7563 msgid "READAHEAD"
7564 msgstr "READAHEAD"
7565
7566 #. type: TH
7567 #: build/C/man2/readahead.2:28 build/C/man7/shm_overview.7:27
7568 #, no-wrap
7569 msgid "2010-09-10"
7570 msgstr "2010-09-10"
7571
7572 #. type: Plain text
7573 #: build/C/man2/readahead.2:31
7574 msgid "readahead - perform file readahead into page cache"
7575 msgstr "readahead - 前もってファイルをページ・キャッシュに読み込む"
7576
7577 #. type: Plain text
7578 #: build/C/man2/readahead.2:37
7579 #, no-wrap
7580 msgid "B<ssize_t readahead(int >I<fd>B<, off64_t >I<offset>B<, size_t >I<count>B<);>\n"
7581 msgstr "B<ssize_t readahead(int >I<fd>B<, off64_t >I<offset>B<, size_t >I<count>B<);>\n"
7582
7583 #. type: Plain text
7584 #: build/C/man2/readahead.2:65
7585 msgid ""
7586 "B<readahead>()  populates the page cache with data from a file so that "
7587 "subsequent reads from that file will not block on disk I/O.  The I<fd> "
7588 "argument is a file descriptor identifying the file which is to be read.  The "
7589 "I<offset> argument specifies the starting point from which data is to be "
7590 "read and I<count> specifies the number of bytes to be read.  I/O is "
7591 "performed in whole pages, so that I<offset> is effectively rounded down to a "
7592 "page boundary and bytes are read up to the next page boundary greater than "
7593 "or equal to I<(offset+count)>.  B<readahead>()  does not read beyond the end "
7594 "of the file.  B<readahead>()  blocks until the specified data has been "
7595 "read.  The current file offset of the open file referred to by I<fd> is left "
7596 "unchanged."
7597 msgstr ""
7598 "B<readahead>()  は、この後の同じファイルからのデータ読み込み時にディスク I/O "
7599 "で 動作が停止 (block) しないように、前もってファイルの内容を ページ・キャッ"
7600 "シュに読み込む。 I<fd> 引き数は読み込みを行うファイルを識別するファイル・ディ"
7601 "スクリプタである。 I<offset> 引き数はデータの読み込み開始位置を指定し、 "
7602 "I<count> は読み込むデータのバイト数を指定する。 ディスク I/O はページ単位で実"
7603 "行されるので、 実際には I<offset> はページ境界に切り下げられ、読み込みバイト"
7604 "数は I<(offset+count)> より小さくない次のページ境界まで切り上げられる。 "
7605 "B<readahead>()  はファイルの末尾を越えた範囲まで読み出しを行うことはない。ま"
7606 "た、 B<readahead>()  は指定したデータの読み込みが終わるまで停止 (block) す"
7607 "る。 I<fd> で参照されたオープン済のファイルのファイルオフセットの現在値は 変"
7608 "更されない。"
7609
7610 #. type: Plain text
7611 #: build/C/man2/readahead.2:71
7612 msgid ""
7613 "On success, B<readahead>()  returns 0; on failure, -1 is returned, with "
7614 "I<errno> set to indicate the cause of the error."
7615 msgstr ""
7616 "B<readahead>()  は成功すると 0 を返す。失敗した場合 -1 を返し、 I<errno> にエ"
7617 "ラーの原因を示す値を設定する。"
7618
7619 #. type: Plain text
7620 #: build/C/man2/readahead.2:76
7621 msgid "I<fd> is not a valid file descriptor or is not open for reading."
7622 msgstr ""
7623 "I<fd> が有効なファイル・ディスクリプタでない、または 読み込み用にオープンされ"
7624 "ていない。"
7625
7626 #. type: Plain text
7627 #: build/C/man2/readahead.2:82
7628 msgid ""
7629 "I<fd> does not refer to a file type to which B<readahead>()  can be applied."
7630 msgstr ""
7631 "I<fd> が参照しているファイルが、 B<readahead>()  を行うことができないタイプの"
7632 "ファイルであった。"
7633
7634 #. type: Plain text
7635 #: build/C/man2/readahead.2:87
7636 msgid ""
7637 "The B<readahead>()  system call appeared in Linux 2.4.13; glibc support has "
7638 "been provided since version 2.3."
7639 msgstr ""
7640 "B<readahead>()  システムコールは Linux 2.4.13 で登場した。 glibc でのサポート"
7641 "は glibc バージョン 2.3 以降で行われている。"
7642
7643 #. type: Plain text
7644 #: build/C/man2/readahead.2:92
7645 msgid ""
7646 "The B<readahead>()  system call is Linux-specific, and its use should be "
7647 "avoided in portable applications."
7648 msgstr ""
7649 "B<readahead>()  システムコールは Linux 固有であり、移植を考慮したプログラムで"
7650 "は 使用を避けるべきである。"
7651
7652 #. type: Plain text
7653 #: build/C/man2/readahead.2:98
7654 msgid "B<lseek>(2), B<madvise>(2), B<mmap>(2), B<posix_fadvise>(2), B<read>(2)"
7655 msgstr ""
7656 "B<lseek>(2), B<madvise>(2), B<mmap>(2), B<posix_fadvise>(2), B<read>(2)"
7657
7658 #. type: TH
7659 #: build/C/man2/remap_file_pages.2:26
7660 #, no-wrap
7661 msgid "REMAP_FILE_PAGES"
7662 msgstr "REMAP_FILE_PAGES"
7663
7664 #. type: Plain text
7665 #: build/C/man2/remap_file_pages.2:29
7666 msgid "remap_file_pages - create a nonlinear file mapping"
7667 msgstr "remap_file_pages - 非線形ファイルマッピングを作成する。"
7668
7669 #. type: Plain text
7670 #: build/C/man2/remap_file_pages.2:33
7671 #, no-wrap
7672 msgid ""
7673 "B<#define _GNU_SOURCE>         /* See feature_test_macros(7) */\n"
7674 "B<#include E<lt>sys/mman.hE<gt>>\n"
7675 msgstr ""
7676 "B<#define _GNU_SOURCE>         /* feature_test_macros(7) 参照 */\n"
7677 "B<#include E<lt>sys/mman.hE<gt>>\n"
7678
7679 #. type: Plain text
7680 #: build/C/man2/remap_file_pages.2:36
7681 #, no-wrap
7682 msgid ""
7683 "B<int remap_file_pages(void *>I<addr>B<, size_t >I<size>B<, int >I<prot>B<,>\n"
7684 "B<                     ssize_t >I<pgoff>B<, int >I<flags>B<);>\n"
7685 msgstr ""
7686 "B<int remap_file_pages(void *>I<addr>B<, size_t >I<size>B<, int >I<prot>B<,>\n"
7687 "B<                     ssize_t >I<pgoff>B<, int >I<flags>B<);>\n"
7688
7689 #. type: Plain text
7690 #: build/C/man2/remap_file_pages.2:49
7691 msgid ""
7692 "The B<remap_file_pages>()  system call is used to create a nonlinear "
7693 "mapping, that is, a mapping in which the pages of the file are mapped into a "
7694 "nonsequential order in memory.  The advantage of using B<remap_file_pages>"
7695 "()  over using repeated calls to B<mmap>(2)  is that the former approach "
7696 "does not require the kernel to create additional VMA (Virtual Memory Area) "
7697 "data structures."
7698 msgstr ""
7699 "B<remap_file_pages>()  システムコールは非線形なマッピング、 つまりファイルの"
7700 "ページがメモリ上で連続しない順番でマップされる マッピングを作成するために使わ"
7701 "れる。 B<remap_file_pages>()  を使う方が B<mmap>(2)  を繰り返して使うより優れ"
7702 "ている点は、 前者の方法ではカーネルが VMA (Virtual Memory Area, 仮想メモリ領"
7703 "域)  データ構造体を追加で作成する必要がないことである。"
7704
7705 #. type: Plain text
7706 #: build/C/man2/remap_file_pages.2:51
7707 msgid "To create a nonlinear mapping we perform the following steps:"
7708 msgstr "非線形マッピングを作成するためには、 以下のようなステップを実行する:"
7709
7710 #. type: TP
7711 #: build/C/man2/remap_file_pages.2:51
7712 #, no-wrap
7713 msgid "1."
7714 msgstr "1."
7715
7716 #. type: Plain text
7717 #: build/C/man2/remap_file_pages.2:59
7718 msgid ""
7719 "Use B<mmap>(2)  to create a mapping (which is initially linear).  This "
7720 "mapping must be created with the B<MAP_SHARED> flag."
7721 msgstr ""
7722 "B<mmap>(2)  を使い、マッピングを作成する (このマッピングは最初は線形であ"
7723 "る)。 このマッピングは B<MAP_SHARED> フラグを指定して作成されなければならな"
7724 "い。"
7725
7726 #. type: TP
7727 #: build/C/man2/remap_file_pages.2:59
7728 #, no-wrap
7729 msgid "2."
7730 msgstr "2."
7731
7732 #. type: Plain text
7733 #: build/C/man2/remap_file_pages.2:67
7734 msgid ""
7735 "Use one or more calls to B<remap_file_pages>()  to rearrange the "
7736 "correspondence between the pages of the mapping and the pages of the file.  "
7737 "It is possible to map the same page of a file into multiple locations within "
7738 "the mapped region."
7739 msgstr ""
7740 "B<remap_file_pages>()  を 1 回以上呼び出して、 マッピングのページとファイルの"
7741 "ページの対応関係を再構成する。 ファイルの同じページをマッピング領域の複数の場"
7742 "所に マップすることが可能である。"
7743
7744 #. type: Plain text
7745 #: build/C/man2/remap_file_pages.2:78
7746 msgid ""
7747 "The I<pgoff> and I<size> arguments specify the region of the file that is to "
7748 "be relocated within the mapping: I<pgoff> is a file offset in units of the "
7749 "system page size; I<size> is the length of the region in bytes."
7750 msgstr ""
7751 "I<pgoff> と I<size> 引き数は、マッピング内で再配置されるファイルの領域を指定"
7752 "する。 I<pgoff> はファイルオフセットであり、単位はシステムのページサイズであ"
7753 "る。 I<size> は領域の長さであり、単位はバイトである。"
7754
7755 #. type: Plain text
7756 #: build/C/man2/remap_file_pages.2:96
7757 msgid ""
7758 "The I<addr> argument serves two purposes.  First, it identifies the mapping "
7759 "whose pages we want to rearrange.  Thus, I<addr> must be an address that "
7760 "falls within a region previously mapped by a call to B<mmap>(2).  Second, "
7761 "I<addr> specifies the address at which the file pages identified by I<pgoff> "
7762 "and I<size> will be placed."
7763 msgstr ""
7764 "I<addr> 引き数は 2 つの目的で使われる。 第 1 の目的は、この引き数によって再編"
7765 "成したいページの マッピングを識別することである。 よって I<addr> は B<mmap>"
7766 "(2)  の呼び出しで過去にマップされた領域内のアドレスでなければならない。 第 2 "
7767 "の目的は、 I<pgoff> と I<size> で識別されるファイルページが置かれる予定のアド"
7768 "レスを、 I<addr> によって指定することである。"
7769
7770 #.  This rounding is weird, and not consistent with the treatment of
7771 #.  the analogous arguments for munmap()/mprotect() and for mlock().
7772 #.  MTK, 14 Sep 2005
7773 #. type: Plain text
7774 #: build/C/man2/remap_file_pages.2:110
7775 msgid ""
7776 "The values specified in I<addr> and I<size> should be multiples of the "
7777 "system page size.  If they are not, then the kernel rounds I<both> values "
7778 "I<down> to the nearest multiple of the page size."
7779 msgstr ""
7780 "I<addr> と I<size> に指定する値は、システムのページサイズの倍数とすべきであ"
7781 "る。 それ以外の場合、カーネルは「両方」の値を 最も近いページサイズの倍数へ"
7782 "「切り下げる」。"
7783
7784 #. type: Plain text
7785 #: build/C/man2/remap_file_pages.2:114
7786 msgid "The I<prot> argument must be specified as 0."
7787 msgstr "I<prot> 引き数は 0 に指定されなければならない。"
7788
7789 #. type: Plain text
7790 #: build/C/man2/remap_file_pages.2:122
7791 msgid ""
7792 "The I<flags> argument has the same meaning as for B<mmap>(2), but all flags "
7793 "other than B<MAP_NONBLOCK> are ignored."
7794 msgstr ""
7795 "I<flags> 引き数は B<mmap>(2)  のものと同じ意味であるが、 B<MAP_NONBLOCK> 以外"
7796 "の全てのフラグは無視される。"
7797
7798 #. type: Plain text
7799 #: build/C/man2/remap_file_pages.2:129
7800 msgid ""
7801 "On success, B<remap_file_pages>()  returns 0.  On error, -1 is returned, and "
7802 "I<errno> is set appropriately."
7803 msgstr ""
7804 "成功した場合、 B<remap_file_pages>()  は 0 を返す。 エラーの場合、-1 が返さ"
7805 "れ、 I<errno> が適切に設定される。"
7806
7807 #. type: Plain text
7808 #: build/C/man2/remap_file_pages.2:137
7809 msgid ""
7810 "I<addr> does not refer to a valid mapping created with the B<MAP_SHARED> "
7811 "flag."
7812 msgstr ""
7813 "I<addr> が B<MAP_SHARED> フラグを指定して作成された有効なマッピングを参照して"
7814 "いない。"
7815
7816 #.  And possibly others from vma->vm_ops->populate()
7817 #. type: Plain text
7818 #: build/C/man2/remap_file_pages.2:146
7819 msgid "I<addr>, I<size>, I<prot>, or I<pgoff> is invalid."
7820 msgstr "I<addr>, I<size>, I<prot>, I<pgoff> のいずれかが不正である。"
7821
7822 #. type: Plain text
7823 #: build/C/man2/remap_file_pages.2:151
7824 msgid ""
7825 "The B<remap_file_pages>()  system call appeared in Linux 2.5.46; glibc "
7826 "support was added in version 2.3.3."
7827 msgstr ""
7828 "B<remap_file_pages>()  システムコールは Linux 2.5.46 で登場した。 glibc での"
7829 "サポートは glibc バージョン 2.3.3 で追加された。"
7830
7831 #. type: Plain text
7832 #: build/C/man2/remap_file_pages.2:155
7833 msgid "The B<remap_file_pages>()  system call is Linux-specific."
7834 msgstr "B<remap_file_pages>()  システムコールは Linux 固有のものである。"
7835
7836 #. type: Plain text
7837 #: build/C/man2/remap_file_pages.2:162
7838 msgid ""
7839 "B<getpagesize>(2), B<mmap>(2), B<mmap2>(2), B<mprotect>(2), B<mremap>(2), "
7840 "B<msync>(2)"
7841 msgstr ""
7842 "B<getpagesize>(2), B<mmap>(2), B<mmap2>(2), B<mprotect>(2), B<mremap>(2), "
7843 "B<msync>(2)"
7844
7845 #. type: TH
7846 #: build/C/man3/shm_open.3:26
7847 #, no-wrap
7848 msgid "SHM_OPEN"
7849 msgstr "SHM_OPEN"
7850
7851 #. type: TH
7852 #: build/C/man3/shm_open.3:26
7853 #, no-wrap
7854 msgid "2009-02-25"
7855 msgstr "2009-02-25"
7856
7857 #. type: Plain text
7858 #: build/C/man3/shm_open.3:29
7859 msgid ""
7860 "shm_open, shm_unlink - Create/open or unlink POSIX shared memory objects"
7861 msgstr ""
7862 "shm_open, shm_unlink - POSIX 共有メモリ・オブジェクトの作成/オープン、 削除を"
7863 "行う"
7864
7865 #. type: Plain text
7866 #: build/C/man3/shm_open.3:33
7867 msgid "B<#include E<lt>sys/stat.hE<gt>> /* For mode constants */"
7868 msgstr "B<#include E<lt>sys/stat.hE<gt>> /* mode 定数用 */"
7869
7870 #. type: Plain text
7871 #: build/C/man3/shm_open.3:35
7872 msgid "B<#include E<lt>fcntl.hE<gt>> /* For O_* constants */"
7873 msgstr "B<#include E<lt>fcntl.hE<gt>> /* O_* 定数の定義用 */"
7874
7875 #. type: Plain text
7876 #: build/C/man3/shm_open.3:37
7877 msgid ""
7878 "B<int shm_open(const char *>I<name>B<, int >I<oflag>B<, mode_t >I<mode>B<);>"
7879 msgstr ""
7880 "B<void * shm_open(const char *>I<name>B<, int >I<oflag>B<, mode_t "
7881 ">I<mode>B<);>"
7882
7883 #. type: Plain text
7884 #: build/C/man3/shm_open.3:39
7885 msgid "B<int shm_unlink(const char *>I<name>B<);>"
7886 msgstr "B<int shm_unlink(const char *>I<name>B<);>"
7887
7888 #. type: Plain text
7889 #: build/C/man3/shm_open.3:41
7890 msgid "Link with I<-lrt>."
7891 msgstr "I<-lrt> でリンクする。"
7892
7893 #. type: Plain text
7894 #: build/C/man3/shm_open.3:53
7895 msgid ""
7896 "B<shm_open>()  creates and opens a new, or opens an existing, POSIX shared "
7897 "memory object.  A POSIX shared memory object is in effect a handle which can "
7898 "be used by unrelated processes to B<mmap>(2)  the same region of shared "
7899 "memory.  The B<shm_unlink>()  function performs the converse operation, "
7900 "removing an object previously created by B<shm_open>()."
7901 msgstr ""
7902 "B<shm_open>()  は、POSIX 共有メモリ・オブジェクトを新規に作成/オープンした"
7903 "り、 すでに存在するオブジェクトをオープンしたりする。 POSIX 共有メモリ・オブ"
7904 "ジェクトは、実際には、関係のないプロセスが 共有メモリの同じ領域を B<mmap>"
7905 "(2)  するために使用することができる手段である。 B<shm_unlink>()  は、逆の操"
7906 "作、つまり以前に B<shm_open>()  で作成されたオブジェクトの削除を行う。"
7907
7908 #.  glibc allows the initial slash to be omitted, and makes
7909 #.  multiple initial slashes equivalent to a single slash.
7910 #.  This differs from the implementation of POSIX message queues.
7911 #.  glibc allows subdirectory components in the name, in which
7912 #.  case the subdirectory must exist under /dev/shm, and allow the
7913 #.  required permissions if a user wants to create a shared memory
7914 #.  object in that subdirectory.
7915 #. type: Plain text
7916 #: build/C/man3/shm_open.3:74
7917 msgid ""
7918 "The operation of B<shm_open>()  is analogous to that of B<open>(2).  I<name> "
7919 "specifies the shared memory object to be created or opened.  For portable "
7920 "use, a shared memory object should be identified by a name of the form I</"
7921 "somename>; that is, a null-terminated string of up to B<NAME_MAX> (i.e., "
7922 "255) characters consisting of an initial slash, followed by one or more "
7923 "characters, none of which are slashes."
7924 msgstr ""
7925 "B<shm_open>()  の動作は B<open>(2)  とよく似ている。 I<name> で作成したりオー"
7926 "プンしたりする共有メモリ・オブジェクトを指定する。 移植性を持たせるためには、"
7927 "共有メモリ・オブジェクトは I</somename> という形式の名前で識別し、 その名前"
7928 "は、最大で B<NAME_MAX> (すなわち 255) 文字の NULL 終端された文字列で、 スラッ"
7929 "シュで始まり、スラッシュ以外の文字が 1 文字以上続く形式 にすべきである。"
7930
7931 #. type: Plain text
7932 #: build/C/man3/shm_open.3:81
7933 msgid ""
7934 "I<oflag> is a bit mask created by ORing together exactly one of B<O_RDONLY> "
7935 "or B<O_RDWR> and any of the other flags listed here:"
7936 msgstr ""
7937 "I<oflag> はビットマスクで、 B<O_RDONLY> と B<O_RDWR> のいずれか一方と、以下に"
7938 "述べる他のフラグの論理和をとったもの を指定する。"
7939
7940 #. type: TP
7941 #: build/C/man3/shm_open.3:81
7942 #, no-wrap
7943 msgid "B<O_RDONLY>"
7944 msgstr "B<O_RDONLY>"
7945
7946 #. type: Plain text
7947 #: build/C/man3/shm_open.3:87
7948 msgid ""
7949 "Open the object for read access.  A shared memory object opened in this way "
7950 "can only be B<mmap>(2)ed for read (B<PROT_READ>) access."
7951 msgstr ""
7952 "読み出しアクセス用にオブジェクトをオープンする。 このフラグを指定してオープン"
7953 "された共有メモリ・オブジェクトは、 読み出し (B<PROT_READ>) アクセスでのみ "
7954 "B<mmap>(2)  することができる。"
7955
7956 #. type: TP
7957 #: build/C/man3/shm_open.3:87
7958 #, no-wrap
7959 msgid "B<O_RDWR>"
7960 msgstr "B<O_RDWR>"
7961
7962 #. type: Plain text
7963 #: build/C/man3/shm_open.3:90
7964 msgid "Open the object for read-write access."
7965 msgstr "読み書きアクセス用にオブジェクトをオープンする。"
7966
7967 #. type: TP
7968 #: build/C/man3/shm_open.3:90
7969 #, no-wrap
7970 msgid "B<O_CREAT>"
7971 msgstr "B<O_CREAT>"
7972
7973 #.  In truth it is actually the file system IDs on Linux, but these
7974 #.  are nearly always the same as the effective IDs.  (MTK, Jul 05)
7975 #. type: Plain text
7976 #: build/C/man3/shm_open.3:110
7977 msgid ""
7978 "Create the shared memory object if it does not exist.  The user and group "
7979 "ownership of the object are taken from the corresponding effective IDs of "
7980 "the calling process, and the object's permission bits are set according to "
7981 "the low-order 9 bits of I<mode>, except that those bits set in the process "
7982 "file mode creation mask (see B<umask>(2))  are cleared for the new object.  "
7983 "A set of macro constants which can be used to define I<mode> is listed in "
7984 "B<open>(2).  (Symbolic definitions of these constants can be obtained by "
7985 "including I<E<lt>sys/stat.hE<gt>>.)"
7986 msgstr ""
7987 "存在しない場合、共有メモリ・オブジェクトを作成する。 オブジェクトのユーザとグ"
7988 "ループの所有権は、 呼び出し元プロセスの対応する実効 ID が使われ、 オブジェク"
7989 "トの許可ビットは I<mode> の下位 9 ビットに基づいて設定される。ただし、 ファイ"
7990 "ルモード作成マスク (B<umask>(2)  参照) に設定されている値は、新規オブジェクト"
7991 "に関してはクリアされる。 I<mode> を定義するために使用できるマクロ定数(群)は "
7992 "B<open>(2)  に記載されている (これらの定数のシンボル定義は I<E<lt>sys/stat."
7993 "hE<gt>> のインクルードにより得られる)。"
7994
7995 #. type: Plain text
7996 #: build/C/man3/shm_open.3:116
7997 msgid ""
7998 "A new shared memory object initially has zero length\\(emthe size of the "
7999 "object can be set using B<ftruncate>(2).  The newly allocated bytes of a "
8000 "shared memory object are automatically initialized to 0."
8001 msgstr ""
8002 "新規に作成された共有メモリ・オブジェクトは長さ 0 で初期化される。 オブジェク"
8003 "トの大きさは B<ftruncate>(2)  を使って設定できる。 共有メモリ・オブジェクトと"
8004 "して新規に確保されたバイトは自動的に 0 に初期化される。"
8005
8006 #. type: TP
8007 #: build/C/man3/shm_open.3:116
8008 #, no-wrap
8009 msgid "B<O_EXCL>"
8010 msgstr "B<O_EXCL>"
8011
8012 #. type: Plain text
8013 #: build/C/man3/shm_open.3:125
8014 msgid ""
8015 "If B<O_CREAT> was also specified, and a shared memory object with the given "
8016 "I<name> already exists, return an error.  The check for the existence of the "
8017 "object, and its creation if it does not exist, are performed atomically."
8018 msgstr ""
8019 "B<O_CREAT> が一緒に指定されており、 I<name> で指定された共有メモリ・オブジェ"
8020 "クトが既に存在した場合、 エラーを返す。 オブジェクトの存在確認と、存在しな"
8021 "かった場合のオブジェクト作成は、 必ず一連の操作として実行される (performed "
8022 "atomically)。"
8023
8024 #. type: TP
8025 #: build/C/man3/shm_open.3:125
8026 #, no-wrap
8027 msgid "B<O_TRUNC>"
8028 msgstr "B<O_TRUNC>"
8029
8030 #. type: Plain text
8031 #: build/C/man3/shm_open.3:128
8032 msgid "If the shared memory object already exists, truncate it to zero bytes."
8033 msgstr ""
8034 "共有メモリ・オブジェクトがすでに存在した場合、 そのオブジェクトを 0 バイトに"
8035 "切り詰める。"
8036
8037 #. type: Plain text
8038 #: build/C/man3/shm_open.3:131
8039 msgid ""
8040 "Definitions of these flag values can be obtained by including I<E<lt>fcntl."
8041 "hE<gt>>."
8042 msgstr ""
8043 "これらのフラグ値の定義は I<E<lt>fcntl.hE<gt>> のインクルードにより得られる。"
8044
8045 #. type: Plain text
8046 #: build/C/man3/shm_open.3:142
8047 msgid ""
8048 "On successful completion B<shm_open>()  returns a new file descriptor "
8049 "referring to the shared memory object.  This file descriptor is guaranteed "
8050 "to be the lowest-numbered file descriptor not previously opened within the "
8051 "process.  The B<FD_CLOEXEC> flag (see B<fcntl>(2))  is set for the file "
8052 "descriptor."
8053 msgstr ""
8054 "成功して完了した場合、 B<shm_open>()  は共有メモリ・オブジェクトを参照する新"
8055 "しいファイル・ディスクリプタを返す。 このファイル・ディスクリプタは、そのプロ"
8056 "セス内で過去にオープンされていない ファイル・ディスクリプタの中で最も小さな数"
8057 "になることが保証される。 B<FD_CLOEXEC> フラグ (B<fcntl>(2)  を参照) が、この"
8058 "ファイル・ディスクリプタに設定される。"
8059
8060 #. type: Plain text
8061 #: build/C/man3/shm_open.3:151
8062 msgid ""
8063 "The file descriptor is normally used in subsequent calls to B<ftruncate>(2)  "
8064 "(for a newly created object) and B<mmap>(2).  After a call to B<mmap>(2)  "
8065 "the file descriptor may be closed without affecting the memory mapping."
8066 msgstr ""
8067 "通常、これらのファイル・ディスクリプタは、この後続けて実行される B<ftruncate>"
8068 "(2)  (新規に作成されたオブジェクトの場合のみ) と B<mmap>(2)  の呼び出しに使用"
8069 "される。 B<mmap>(2)  を呼び出した後は、ファイル・ディスクリプタをクローズして"
8070 "もよく、 クローズしてもメモリ・マッピングに影響を与えることはない。"
8071
8072 #. type: Plain text
8073 #: build/C/man3/shm_open.3:169
8074 msgid ""
8075 "The operation of B<shm_unlink>()  is analogous to B<unlink>(2): it removes a "
8076 "shared memory object name, and, once all processes have unmapped the object, "
8077 "de-allocates and destroys the contents of the associated memory region.  "
8078 "After a successful B<shm_unlink>(), attempts to B<shm_open>()  an object "
8079 "with the same I<name> will fail (unless B<O_CREAT> was specified, in which "
8080 "case a new, distinct object is created)."
8081 msgstr ""
8082 "B<shm_unlink>()  の動作は B<unlink>(2)  とよく似ている: 共有メモリ・オブジェ"
8083 "クト名を削除し、すべてのプロセスが処理対象の オブジェクトをアンマップした時点"
8084 "でオブジェクトの割り当てを解除し、 対応するメモリ領域の内容を破棄する。 "
8085 "B<shm_unlink>()  が成功した後で、同じ I<name> を持つオブジェクトに対して "
8086 "B<shm_open>()  を行うと、 (B<O_CREAT> が指定されていない場合) 失敗する。 "
8087 "(B<O_CREAT> が指定されている場合、新しく別のオブジェクトが作成される)。"
8088
8089 #. type: Plain text
8090 #: build/C/man3/shm_open.3:178
8091 msgid ""
8092 "On success, B<shm_open>()  returns a nonnegative file descriptor.  On "
8093 "failure, B<shm_open>()  returns -1.  B<shm_unlink>()  returns 0 on success, "
8094 "or -1 on error."
8095 msgstr ""
8096 "成功した場合、 B<shm_open>()  は非負のファイル・ディスクリプタを返す。 失敗し"
8097 "た場合、 B<shm_open>()  は -1 を返す。 B<shm_unlink>()  は、成功した場合 0 "
8098 "を、エラーが起こった場合 -1 を返す。"
8099
8100 #. type: Plain text
8101 #: build/C/man3/shm_open.3:185
8102 msgid ""
8103 "On failure, I<errno> is set to indicate the cause of the error.  Values "
8104 "which may appear in I<errno> include the following:"
8105 msgstr ""
8106 "失敗した場合、エラーの原因を示すため I<errno> が設定される。 I<errno> に設定"
8107 "される値は以下の通りである:"
8108
8109 #. type: Plain text
8110 #: build/C/man3/shm_open.3:190
8111 msgid "Permission to B<shm_unlink>()  the shared memory object was denied."
8112 msgstr "共有メモリオブジェクトを B<shm_unlink>()  する権限がなかった。"
8113
8114 #. type: Plain text
8115 #: build/C/man3/shm_open.3:200
8116 msgid ""
8117 "Permission was denied to B<shm_open>()  I<name> in the specified I<mode>, or "
8118 "B<O_TRUNC> was specified and the caller does not have write permission on "
8119 "the object."
8120 msgstr ""
8121 "指定された I<mode> で I<name> を B<shm_open>()  する権限がなかった。もしく"
8122 "は、 B<O_TRUNC> が指定されたが、呼び出し元にはそのオブジェクトに対する書き込"
8123 "み権限が なかった。"
8124
8125 #. type: TP
8126 #: build/C/man3/shm_open.3:200 build/C/man2/shmget.2:192
8127 #, no-wrap
8128 msgid "B<EEXIST>"
8129 msgstr "B<EEXIST>"
8130
8131 #. type: Plain text
8132 #: build/C/man3/shm_open.3:211
8133 msgid ""
8134 "Both B<O_CREAT> and B<O_EXCL> were specified to B<shm_open>()  and the "
8135 "shared memory object specified by I<name> already exists."
8136 msgstr ""
8137 "B<O_CREAT> と B<O_EXCL> の両方が B<shm_open>()  に指定されたが、 I<name> で指"
8138 "定された共有メモリ・オブジェクトが既に存在した。"
8139
8140 #. type: Plain text
8141 #: build/C/man3/shm_open.3:218
8142 msgid "The I<name> argument to B<shm_open>()  was invalid."
8143 msgstr "B<shm_open>()  に与えられた I<name> 引き数が不正であった。"
8144
8145 #. type: TP
8146 #: build/C/man3/shm_open.3:218
8147 #, no-wrap
8148 msgid "B<EMFILE>"
8149 msgstr "B<EMFILE>"
8150
8151 #. type: Plain text
8152 #: build/C/man3/shm_open.3:221
8153 msgid "The process already has the maximum number of files open."
8154 msgstr "プロセスがオープン可能なファイル数の上限にすでに達していた。"
8155
8156 #. type: TP
8157 #: build/C/man3/shm_open.3:221
8158 #, no-wrap
8159 msgid "B<ENAMETOOLONG>"
8160 msgstr "B<ENAMETOOLONG>"
8161
8162 #. type: Plain text
8163 #: build/C/man3/shm_open.3:227
8164 msgid "The length of I<name> exceeds B<PATH_MAX>."
8165 msgstr "I<name> の長さが B<PATH_MAX> を越えている。"
8166
8167 #. type: Plain text
8168 #: build/C/man3/shm_open.3:231
8169 msgid ""
8170 "The limit on the total number of files open on the system has been reached."
8171 msgstr "ファイルシステムでオープンできるファイル数の上限に達した。"
8172
8173 #. type: TP
8174 #: build/C/man3/shm_open.3:231 build/C/man3/shm_open.3:240
8175 #: build/C/man2/shmget.2:206
8176 #, no-wrap
8177 msgid "B<ENOENT>"
8178 msgstr "B<ENOENT>"
8179
8180 #. type: Plain text
8181 #: build/C/man3/shm_open.3:240
8182 msgid ""
8183 "An attempt was made to B<shm_open>()  a I<name> that did not exist, and "
8184 "B<O_CREAT> was not specified."
8185 msgstr ""
8186 "存在していない I<name> のオブジェクトを B<shm_open>()  しようとしたが、 "
8187 "B<O_CREAT> が指定されていなかった。"
8188
8189 #. type: Plain text
8190 #: build/C/man3/shm_open.3:247
8191 msgid ""
8192 "An attempt was to made to B<shm_unlink>()  a I<name> that does not exist."
8193 msgstr "存在しない I<name> のオブジェクトを B<shm_unlink>()  しようとした。"
8194
8195 #. type: Plain text
8196 #: build/C/man3/shm_open.3:249
8197 msgid "These functions are provided in glibc 2.2 and later."
8198 msgstr "これらの関数は glibc 2.2 以降で提供されている。"
8199
8200 #. type: Plain text
8201 #: build/C/man3/shm_open.3:255
8202 msgid ""
8203 "POSIX.1-2001 says that the group ownership of a newly created shared memory "
8204 "object is set to either the calling process's effective group ID or \"a "
8205 "system default group ID\"."
8206 msgstr ""
8207 "POSIX.1-2001 には、新規に作成される共有メモリオブジェクトのグループ所有権"
8208 "は、 呼び出し元プロセスの実効グループ ID か 「システムのデフォルトのグループ "
8209 "ID」 のどちらかに設定される、と書かれている。"
8210
8211 #. type: Plain text
8212 #: build/C/man3/shm_open.3:264
8213 msgid ""
8214 "POSIX leaves the behavior of the combination of B<O_RDONLY> and B<O_TRUNC> "
8215 "unspecified.  On Linux, this will successfully truncate an existing shared "
8216 "memory object\\(emthis may not be so on other UNIX systems."
8217 msgstr ""
8218 "POSIX は B<O_RDONLY> と B<O_TRUNC> が一緒に指定された場合の動作を未定義にして"
8219 "いる。Linux では、 既存の共有メモリ・オブジェクトに対する切り詰め (truncate) "
8220 "は成功する。 しかし、他の UNIX システムでも同じであるとは限らない。"
8221
8222 #. type: Plain text
8223 #: build/C/man3/shm_open.3:269
8224 msgid ""
8225 "The POSIX shared memory object implementation on Linux 2.4 makes use of a "
8226 "dedicated file system, which is normally mounted under I</dev/shm>."
8227 msgstr ""
8228 "Linux 2.4 における POSIX 共有メモリ・オブジェクトの実装は 専用のファイルシス"
8229 "テムを使用する。そのファイルシステムは通常 I</dev/shm> にマウントされる。"
8230
8231 #. type: Plain text
8232 #: build/C/man3/shm_open.3:280
8233 msgid ""
8234 "B<close>(2), B<fchmod>(2), B<fchown>(2), B<fcntl>(2), B<fstat>(2), "
8235 "B<ftruncate>(2), B<mmap>(2), B<open>(2), B<umask>(2), B<shm_overview>(7)"
8236 msgstr ""
8237 "B<close>(2), B<fchmod>(2), B<fchown>(2), B<fcntl>(2), B<fstat>(2), "
8238 "B<ftruncate>(2), B<mmap>(2), B<open>(2), B<umask>(2), B<shm_overview>(7)"
8239
8240 #. type: TH
8241 #: build/C/man7/shm_overview.7:27
8242 #, no-wrap
8243 msgid "SHM_OVERVIEW"
8244 msgstr "SHM_OVERVIEW"
8245
8246 #. type: Plain text
8247 #: build/C/man7/shm_overview.7:30
8248 msgid "shm_overview - Overview of POSIX shared memory"
8249 msgstr "shm_overview - POSIX 共有メモリの概要"
8250
8251 #. type: Plain text
8252 #: build/C/man7/shm_overview.7:33
8253 msgid ""
8254 "The POSIX shared memory API allows processes to communicate information by "
8255 "sharing a region of memory."
8256 msgstr ""
8257 "POSIX 共有メモリ API を使用すると、メモリのある領域を共有して、 プロセス間で"
8258 "情報をやり取りすることができる。"
8259
8260 #. type: Plain text
8261 #: build/C/man7/shm_overview.7:35
8262 msgid "The interfaces employed in the API are:"
8263 msgstr "この API では以下のインターフェースが採用されている。"
8264
8265 #. type: TP
8266 #: build/C/man7/shm_overview.7:35
8267 #, no-wrap
8268 msgid "B<shm_open>(3)"
8269 msgstr "B<shm_open>(3)"
8270
8271 #. type: Plain text
8272 #: build/C/man7/shm_overview.7:42
8273 msgid ""
8274 "Create and open a new object, or open an existing object.  This is analogous "
8275 "to B<open>(2).  The call returns a file descriptor for use by the other "
8276 "interfaces listed below."
8277 msgstr ""
8278 "新しいオブジェクトを生成しオープンする、もしくは 既存のオブジェクトをオープン"
8279 "する。これは B<open>(2)  と同じである。下記にある他のインターフェースで使用す"
8280 "る ファイルディスクリプタを返す。"
8281
8282 #. type: TP
8283 #: build/C/man7/shm_overview.7:42
8284 #, no-wrap
8285 msgid "B<ftruncate>(2)"
8286 msgstr "B<ftruncate>(2)"
8287
8288 #. type: Plain text
8289 #: build/C/man7/shm_overview.7:46
8290 msgid ""
8291 "Set the size of the shared memory object.  (A newly created shared memory "
8292 "object has a length of zero.)"
8293 msgstr "共有メモリオブジェクトの大きさを設定する。"
8294
8295 #. type: Plain text
8296 #: build/C/man7/shm_overview.7:50
8297 msgid ""
8298 "Map the shared memory object into the virtual address space of the calling "
8299 "process."
8300 msgstr ""
8301 "呼び出したプロセスの仮想アドレス空間に共有メモリオブジェクトを マップする。"
8302
8303 #. type: TP
8304 #: build/C/man7/shm_overview.7:50
8305 #, no-wrap
8306 msgid "B<munmap>(2)"
8307 msgstr "B<munmap>(2)"
8308
8309 #. type: Plain text
8310 #: build/C/man7/shm_overview.7:54
8311 msgid ""
8312 "Unmap the shared memory object from the virtual address space of the calling "
8313 "process."
8314 msgstr ""
8315 "呼び出したプロセスの仮想アドレス空間から 共有メモリオブジェクトをアンマップす"
8316 "る。"
8317
8318 #. type: TP
8319 #: build/C/man7/shm_overview.7:54
8320 #, no-wrap
8321 msgid "B<shm_unlink>(3)"
8322 msgstr "B<shm_unlink>(3)"
8323
8324 #. type: Plain text
8325 #: build/C/man7/shm_overview.7:57
8326 msgid "Remove a shared memory object name."
8327 msgstr "共有メモリオブジェクト名を削除する。"
8328
8329 #. type: TP
8330 #: build/C/man7/shm_overview.7:57
8331 #, no-wrap
8332 msgid "B<close>(2)"
8333 msgstr "B<close>(2)"
8334
8335 #. type: Plain text
8336 #: build/C/man7/shm_overview.7:62
8337 msgid ""
8338 "Close the file descriptor allocated by B<shm_open>(3)  when it is no longer "
8339 "needed."
8340 msgstr ""
8341 "B<shm_open>(3)  で割り当てられたファイルディスクリプタが不要になった際に、 そ"
8342 "のファイルディスクリプタをクローズする。"
8343
8344 #. type: TP
8345 #: build/C/man7/shm_overview.7:62
8346 #, no-wrap
8347 msgid "B<fstat>(2)"
8348 msgstr "B<fstat>(2)"
8349
8350 #. type: Plain text
8351 #: build/C/man7/shm_overview.7:76
8352 msgid ""
8353 "Obtain a I<stat> structure that describes the shared memory object.  Among "
8354 "the information returned by this call are the object's size (I<st_size>), "
8355 "permissions (I<st_mode>), owner (I<st_uid>), and group (I<st_gid>)."
8356 msgstr ""
8357 "その共有メモリオブジェクトについての情報が入った I<stat> 構造体を取得する。 "
8358 "このシステムコールが返す情報には、オブジェクトのサイズ (I<st_size>)、 許可属"
8359 "性 (I<st_mode>)、 所有者 (I<st_uid>)、 グループ (I<st_gid>)  がある。"
8360
8361 #. type: TP
8362 #: build/C/man7/shm_overview.7:76
8363 #, no-wrap
8364 msgid "B<fchown>(2)"
8365 msgstr "B<fchown>(2)"
8366
8367 #. type: Plain text
8368 #: build/C/man7/shm_overview.7:79
8369 msgid "To change the ownership of a shared memory object."
8370 msgstr "共有メモリオブジェクトの所有権を変更する。"
8371
8372 #. type: TP
8373 #: build/C/man7/shm_overview.7:79
8374 #, no-wrap
8375 msgid "B<fchmod>(2)"
8376 msgstr "B<fchmod>(2)"
8377
8378 #. type: Plain text
8379 #: build/C/man7/shm_overview.7:82
8380 msgid "To change the permissions of a shared memory object."
8381 msgstr "共有メモリオブジェクトの許可属性を変更する。"
8382
8383 #. type: SS
8384 #: build/C/man7/shm_overview.7:82
8385 #, no-wrap
8386 msgid "Versions"
8387 msgstr "Versions"
8388
8389 #. type: Plain text
8390 #: build/C/man7/shm_overview.7:84
8391 msgid "POSIX shared memory is supported since Linux 2.4 and glibc 2.2."
8392 msgstr "POSIX 共有メモリは Linux 2.4 と glibc 2.2 以降でサポートされている。"
8393
8394 #. type: SS
8395 #: build/C/man7/shm_overview.7:84
8396 #, no-wrap
8397 msgid "Persistence"
8398 msgstr "持続性"
8399
8400 #. type: Plain text
8401 #: build/C/man7/shm_overview.7:89
8402 msgid ""
8403 "POSIX shared memory objects have kernel persistence: a shared memory object "
8404 "will exist until the system is shut down, or until all processes have "
8405 "unmapped the object and it has been deleted with B<shm_unlink>(3)"
8406 msgstr ""
8407 "POSIX 共有メモリオブジェクトはカーネル内で保持される。 共有メモリオブジェクト"
8408 "は、システムがシャットダウンされるか、 全てのプロセスがそのオブジェクトをアン"
8409 "マップし、 B<shm_unlink>(3)  で削除されるまで、存在し続ける。"
8410
8411 #. type: SS
8412 #: build/C/man7/shm_overview.7:89
8413 #, no-wrap
8414 msgid "Linking"
8415 msgstr "リンク"
8416
8417 #. type: Plain text
8418 #: build/C/man7/shm_overview.7:94
8419 msgid ""
8420 "Programs using the POSIX shared memory API must be compiled with I<cc -lrt> "
8421 "to link against the real-time library, I<librt>."
8422 msgstr ""
8423 "POSIX 共有メモリ API を使用したプログラムは I<cc -lrt> でコンパイルし、リアル"
8424 "タイムライブラリ I<librt> とリンクしなければならない。"
8425
8426 #. type: SS
8427 #: build/C/man7/shm_overview.7:94
8428 #, no-wrap
8429 msgid "Accessing shared memory objects via the file system"
8430 msgstr "ファイルシステム経由での共有メモリオブジェクトへのアクセス"
8431
8432 #. type: Plain text
8433 #: build/C/man7/shm_overview.7:101
8434 msgid ""
8435 "On Linux, shared memory objects are created in a (I<tmpfs>)  virtual file "
8436 "system, normally mounted under I</dev/shm>.  Since kernel 2.6.19, Linux "
8437 "supports the use of access control lists (ACLs)  to control the permissions "
8438 "of objects in the virtual file system."
8439 msgstr ""
8440 "Linux では、共有メモリオブジェクトは通常 I</dev/shm> 以下にマウントされる仮想"
8441 "ファイルシステム (I<tmpfs>)  内に作成される。 カーネル 2.6.19 以降の Linux で"
8442 "は、 仮想ファイルシステム内のオブジェクトの許可属性の制御に、 アクセス制御リ"
8443 "スト (ACL; access control lists) を使うことができる。"
8444
8445 #. type: Plain text
8446 #: build/C/man7/shm_overview.7:106
8447 msgid ""
8448 "Typically, processes must synchronize their access to a shared memory "
8449 "object, using, for example, POSIX semaphores."
8450 msgstr ""
8451 "通常は、共有メモリオブジェクトにアクセスするプロセスは、 POSIX セマフォなどを"
8452 "使ってプロセス間で同期をとらなければならない。"
8453
8454 #. type: Plain text
8455 #: build/C/man7/shm_overview.7:114
8456 msgid ""
8457 "System V shared memory (B<shmget>(2), B<shmop>(2), etc.) is an older shared "
8458 "memory API.  POSIX shared memory provides a simpler, and better designed "
8459 "interface; on the other hand POSIX shared memory is somewhat less widely "
8460 "available (especially on older systems) than System V shared memory."
8461 msgstr ""
8462 "System V 共有メモリ (B<shmget>(2), B<shmop>(2)  など) は古い共有メモリ API で"
8463 "ある。 POSIX 共有メモリは、より簡単で、うまく設計されたインタフェースを提供し"
8464 "ている。 一方で、POSIX 共有メモリは System V 共有メモリと比べると 利用できる"
8465 "システムが少ない (特に、古いシステムでは少ない)。"
8466
8467 #. type: Plain text
8468 #: build/C/man7/shm_overview.7:127
8469 msgid ""
8470 "B<fchmod>(2), B<fchown>(2), B<fstat>(2), B<ftruncate>(2), B<mmap>(2), "
8471 "B<mprotect>(2), B<munmap>(2), B<shmget>(2), B<shmop>(2), B<shm_open>(3), "
8472 "B<shm_unlink>(3), B<sem_overview>(7)"
8473 msgstr ""
8474 "B<fchmod>(2), B<fchown>(2), B<fstat>(2), B<ftruncate>(2), B<mmap>(2), "
8475 "B<mprotect>(2), B<munmap>(2), B<shmget>(2), B<shmop>(2), B<shm_open>(3), "
8476 "B<shm_unlink>(3), B<sem_overview>(7)"
8477
8478 #. type: TH
8479 #: build/C/man2/shmctl.2:43
8480 #, no-wrap
8481 msgid "SHMCTL"
8482 msgstr "SHMCTL"
8483
8484 #. type: TH
8485 #: build/C/man2/shmctl.2:43
8486 #, no-wrap
8487 msgid "2008-08-07"
8488 msgstr "2008-08-07"
8489
8490 #. type: Plain text
8491 #: build/C/man2/shmctl.2:46
8492 msgid "shmctl - shared memory control"
8493 msgstr "shmctl - 共有メモリ (shared memory) を制御する"
8494
8495 #. type: Plain text
8496 #: build/C/man2/shmctl.2:49 build/C/man2/shmget.2:42
8497 msgid "B<#include E<lt>sys/ipc.hE<gt>>"
8498 msgstr "B<#include E<lt>sys/ipc.hE<gt>>"
8499
8500 #. type: Plain text
8501 #: build/C/man2/shmctl.2:51 build/C/man2/shmget.2:44
8502 msgid "B<#include E<lt>sys/shm.hE<gt>>"
8503 msgstr "B<#include E<lt>sys/shm.hE<gt>>"
8504
8505 #. type: Plain text
8506 #: build/C/man2/shmctl.2:53
8507 msgid ""
8508 "B<int shmctl(int >I<shmid>B<, int >I<cmd>B<, struct shmid_ds *>I<buf>B<);>"
8509 msgstr ""
8510 "B<int shmctl(int >I<shmid>B<, int >I<cmd>B<, struct shmid_ds *>I<buf>B<);>"
8511
8512 #. type: Plain text
8513 #: build/C/man2/shmctl.2:60
8514 msgid ""
8515 "B<shmctl>()  performs the control operation specified by I<cmd> on the "
8516 "shared memory segment whose identifier is given in I<shmid>."
8517 msgstr ""
8518 "B<shmctl>()  は、識別子が I<shmid> の共有メモリ・セグメントに対して I<cmd> で"
8519 "指示した制御命令を実行する。"
8520
8521 #. type: Plain text
8522 #: build/C/man2/shmctl.2:65
8523 msgid ""
8524 "The I<buf> argument is a pointer to a I<shmid_ds> structure, defined in "
8525 "I<E<lt>sys/shm.hE<gt>> as follows:"
8526 msgstr ""
8527 "I<buf> 引き数は、 I<shmid_ds> 構造体へのポインタである。 この構造体は "
8528 "I<E<lt>sys/shm.hE<gt>> で以下のように定義されている"
8529
8530 #. type: Plain text
8531 #: build/C/man2/shmctl.2:79
8532 #, no-wrap
8533 msgid ""
8534 "struct shmid_ds {\n"
8535 "    struct ipc_perm shm_perm;    /* Ownership and permissions */\n"
8536 "    size_t          shm_segsz;   /* Size of segment (bytes) */\n"
8537 "    time_t          shm_atime;   /* Last attach time */\n"
8538 "    time_t          shm_dtime;   /* Last detach time */\n"
8539 "    time_t          shm_ctime;   /* Last change time */\n"
8540 "    pid_t           shm_cpid;    /* PID of creator */\n"
8541 "    pid_t           shm_lpid;    /* PID of last shmat(2)/shmdt(2) */\n"
8542 "    shmatt_t        shm_nattch;  /* No. of current attaches */\n"
8543 "    ...\n"
8544 "};\n"
8545 msgstr ""
8546 "struct shmid_ds {\n"
8547 "    struct ipc_perm shm_perm;    /* 所有権と許可 */\n"
8548 "    size_t          shm_segsz;   /* セグメントのサイズ (バイト) */\n"
8549 "    time_t          shm_atime;   /* 最後の付加 (attach) の時刻 */\n"
8550 "    time_t          shm_dtime;   /* 最後の分離 (detach) の時刻 */\n"
8551 "    time_t          shm_ctime;   /* 最後に変更が行われた時刻 */\n"
8552 "    pid_t           shm_cpid;    /* 作成者 (creator) の PID */\n"
8553 "    pid_t           shm_lpid;    /* 最後の shmat(2)/shmdt(2) の PID */\n"
8554 "    shmatt_t        shm_nattch;  /* 現在付加されている数 */\n"
8555 "    ...\n"
8556 "};\n"
8557
8558 #. type: Plain text
8559 #: build/C/man2/shmctl.2:87
8560 msgid ""
8561 "The I<ipc_perm> structure is defined in I<E<lt>sys/ipc.hE<gt>> as follows "
8562 "(the highlighted fields are settable using B<IPC_SET>):"
8563 msgstr ""
8564 "I<ipc_perm> 構造体は I<E<lt>sys/ipc.hE<gt>> で以下のように定義されている (強"
8565 "調されたフィールドは B<IPC_SET> を使って設定可能である):"
8566
8567 #. type: Plain text
8568 #: build/C/man2/shmctl.2:100
8569 #, no-wrap
8570 msgid ""
8571 "struct ipc_perm {\n"
8572 "    key_t          __key;    /* Key supplied to shmget(2) */\n"
8573 "    uid_t          B<uid>;      /* Effective UID of owner */\n"
8574 "    gid_t          B<gid>;      /* Effective GID of owner */\n"
8575 "    uid_t          cuid;     /* Effective UID of creator */\n"
8576 "    gid_t          cgid;     /* Effective GID of creator */\n"
8577 "    unsigned short B<mode>;     /* B<Permissions> + SHM_DEST and\n"
8578 "                                SHM_LOCKED flags */\n"
8579 "    unsigned short __seq;    /* Sequence number */\n"
8580 "};\n"
8581 msgstr ""
8582 "struct ipc_perm {\n"
8583 "    key_t          __key;    /* shmget(2) に与えられるキー */\n"
8584 "    uid_t          B<uid>;      /* 所有者の実効 UID */\n"
8585 "    gid_t          B<gid>;      /* 所有者の実効 GID */\n"
8586 "    uid_t          cuid;     /* 作成者の実効 UID */\n"
8587 "    gid_t          cgid;     /* 作成者の実効 GID */\n"
8588 "    unsigned short B<mode>;     /* B<許可> + SHM_DEST と\n"
8589 "                                SHM_LOCKED フラグ */\n"
8590 "    unsigned short __seq;    /* シーケンス番号 */\n"
8591 "};\n"
8592
8593 #. type: Plain text
8594 #: build/C/man2/shmctl.2:106
8595 msgid "Valid values for I<cmd> are:"
8596 msgstr "I<cmd> として有効な値は以下の通り:"
8597
8598 #. type: TP
8599 #: build/C/man2/shmctl.2:107
8600 #, no-wrap
8601 msgid "B<IPC_STAT>"
8602 msgstr "B<IPC_STAT>"
8603
8604 #. type: Plain text
8605 #: build/C/man2/shmctl.2:116
8606 msgid ""
8607 "Copy information from the kernel data structure associated with I<shmid> "
8608 "into the I<shmid_ds> structure pointed to by I<buf>.  The caller must have "
8609 "read permission on the shared memory segment."
8610 msgstr ""
8611 "I<shmid> に関連づけられたカーネルデータ構造体の情報を I<buf> で指された "
8612 "I<shmid_ds> 構造体にコピーする。 呼び出し元は共有メモリ・セグメントに対する "
8613 "読み込み許可を持たなければならない。"
8614
8615 #. type: TP
8616 #: build/C/man2/shmctl.2:116
8617 #, no-wrap
8618 msgid "B<IPC_SET>"
8619 msgstr "B<IPC_SET>"
8620
8621 #. type: Plain text
8622 #: build/C/man2/shmctl.2:134
8623 msgid ""
8624 "Write the values of some members of the I<shmid_ds> structure pointed to by "
8625 "I<buf> to the kernel data structure associated with this shared memory "
8626 "segment, updating also its I<shm_ctime> member.  The following fields can be "
8627 "changed: I<shm_perm.uid>, I<shm_perm.gid>, and (the least significant 9 bits "
8628 "of) I<shm_perm.mode>.  The effective UID of the calling process must match "
8629 "the owner (I<shm_perm.uid>)  or creator (I<shm_perm.cuid>)  of the shared "
8630 "memory segment, or the caller must be privileged."
8631 msgstr ""
8632 "I<buf> によって指される I<shmid_ds> 構造体のいくつかのメンバーの値を、 この共"
8633 "有メモリ・セグメントに関連づけられたカーネルデータ構造体に書き込み、 "
8634 "I<shm_ctime> メンバーも更新する。 以下のフィールドは変更できる。 I<shm_perm."
8635 "uid>, I<shm_perm.gid>, I<shm_perm.mode> (の最下位 9 ビット)。 呼び出したプロ"
8636 "セスの実効 UID が所有者 (I<shm_perm.uid>)  または作成者 (I<shm_perm.cuid>)  "
8637 "と一致するか、呼び出し元が特権を持たなければならない。"
8638
8639 #. type: TP
8640 #: build/C/man2/shmctl.2:134
8641 #, no-wrap
8642 msgid "B<IPC_RMID>"
8643 msgstr "B<IPC_RMID>"
8644
8645 #. type: Plain text
8646 #: build/C/man2/shmctl.2:151
8647 msgid ""
8648 "Mark the segment to be destroyed.  The segment will only actually be "
8649 "destroyed after the last process detaches it (i.e., when the I<shm_nattch> "
8650 "member of the associated structure I<shmid_ds> is zero).  The caller must be "
8651 "the owner or creator, or be privileged.  If a segment has been marked for "
8652 "destruction, then the (nonstandard)  B<SHM_DEST> flag of the I<shm_perm."
8653 "mode> field in the associated data structure retrieved by B<IPC_STAT> will "
8654 "be set."
8655 msgstr ""
8656 "セグメントに破棄済みのマークを付ける。 セグメントは、実際には最後プロセスがセ"
8657 "グメントを分離した (関連する I<shmid_ds> 構造体の I<shm_nattch> メンバーが 0 "
8658 "になった) 後でのみ破棄される。 呼び出し元は所有者か作成者であるか、特権を持た"
8659 "なければならない。 セグメントに破棄のマークが付けられると、 関連するデータ構"
8660 "造体において I<shm_perm.mode> フィールドの (標準ではない)  B<SHM_DEST> フラグ"
8661 "が設定される。 このデータ構造体は B<IPC_STAT> で取得される。"
8662
8663 #. type: Plain text
8664 #: build/C/man2/shmctl.2:154
8665 msgid ""
8666 "The caller I<must> ensure that a segment is eventually destroyed; otherwise "
8667 "its pages that were faulted in will remain in memory or swap."
8668 msgstr ""
8669 "呼び出し元は最終的にはセグメントを忘れずに破棄I<しなければならない>。 そうで"
8670 "なれば、フォールト (fault) されたページは メモリかスワップ (swap) に残り続け"
8671 "る。"
8672
8673 #. type: TP
8674 #: build/C/man2/shmctl.2:154
8675 #, no-wrap
8676 msgid "B<IPC_INFO> (Linux-specific)"
8677 msgstr "B<IPC_INFO> (Linux 固有)"
8678
8679 #. type: Plain text
8680 #: build/C/man2/shmctl.2:167
8681 msgid ""
8682 "Returns information about system-wide shared memory limits and parameters in "
8683 "the structure pointed to by I<buf>.  This structure is of type I<shminfo> "
8684 "(thus, a cast is required), defined in I<E<lt>sys/shm.hE<gt>> if the "
8685 "B<_GNU_SOURCE> feature test macro is defined:"
8686 msgstr ""
8687 "システム全体での共有メモリの制限とパラメータに関する情報を、 I<buf> が指す構"
8688 "造体に入れて返す。 この構造体は I<shminfo> 型である (そのためキャストが必要で"
8689 "ある)。 I<shminfo> は B<_GNU_SOURCE> 機能検査マクロが定義された場合に "
8690 "I<E<lt>sys/shm.hE<gt>> で以下のように定義される:"
8691
8692 #. type: Plain text
8693 #: build/C/man2/shmctl.2:181
8694 #, no-wrap
8695 msgid ""
8696 "struct  shminfo {\n"
8697 "    unsigned long shmmax; /* Maximum segment size */\n"
8698 "    unsigned long shmmin; /* Minimum segment size;\n"
8699 "                             always 1 */\n"
8700 "    unsigned long shmmni; /* Maximum number of segments */\n"
8701 "    unsigned long shmseg; /* Maximum number of segments\n"
8702 "                             that a process can attach;\n"
8703 "                             unused within kernel */\n"
8704 "    unsigned long shmall; /* Maximum number of pages of\n"
8705 "                             shared memory, system-wide */\n"
8706 "};\n"
8707 msgstr ""
8708 "struct  shminfo {\n"
8709 "    unsigned long shmmax; /* 最大セグメントサイズ */\n"
8710 "    unsigned long shmmin; /* 最小セグメントサイズ。\n"
8711 "                             常に 1 */\n"
8712 "    unsigned long shmmni; /* 最大セグメント数 */\n"
8713 "    unsigned long shmseg; /* プロセスが付加できる\n"
8714 "                             セグメントの最大数。\n"
8715 "                             カーネル内では未使用 */\n"
8716 "    unsigned long shmall; /* 共有メモリの最大ページ数。\n"
8717 "                             システム全体での値 */\n"
8718 "};\n"
8719
8720 #. type: Plain text
8721 #: build/C/man2/shmctl.2:194
8722 msgid ""
8723 "The I<shmmni>, I<shmmax>, and I<shmall> settings can be changed via I</proc> "
8724 "files of the same name; see B<proc>(5)  for details."
8725 msgstr ""
8726 "設定 I<shmmni>, I<shmmax>, I<shmall> は I</proc> にある同じ名前のファイル経由"
8727 "で変更可能である。 詳しくは B<proc>(5)  を参照。"
8728
8729 #. type: TP
8730 #: build/C/man2/shmctl.2:194
8731 #, no-wrap
8732 msgid "B<SHM_INFO> (Linux-specific)"
8733 msgstr "B<SHM_INFO> (Linux 固有)"
8734
8735 #. type: Plain text
8736 #: build/C/man2/shmctl.2:205
8737 msgid ""
8738 "Returns a I<shm_info> structure whose fields contain information about "
8739 "system resources consumed by shared memory.  This structure is defined in "
8740 "I<E<lt>sys/shm.hE<gt>> if the B<_GNU_SOURCE> feature test macro is defined:"
8741 msgstr ""
8742 "共有メモリが消費しているシステム資源に関する情報を 格納した I<shm_info> 構造"
8743 "体を返す。 この構造体は、 B<_GNU_SOURCE> 機能検査マクロが定義された場合に "
8744 "I<E<lt>sys/shm.hE<gt>> で以下のように定義される:"
8745
8746 #. type: Plain text
8747 #: build/C/man2/shmctl.2:222
8748 #, no-wrap
8749 msgid ""
8750 "struct shm_info {\n"
8751 "    int           used_ids; /* # of currently existing\n"
8752 "                               segments */\n"
8753 "    unsigned long shm_tot;  /* Total number of shared\n"
8754 "                               memory pages */\n"
8755 "    unsigned long shm_rss;  /* # of resident shared\n"
8756 "                               memory pages */\n"
8757 "    unsigned long shm_swp;  /* # of swapped shared\n"
8758 "                               memory pages */\n"
8759 "    unsigned long swap_attempts;\n"
8760 "                            /* Unused since Linux 2.4 */\n"
8761 "    unsigned long swap_successes;\n"
8762 "                            /* Unused since Linux 2.4 */\n"
8763 "};\n"
8764 msgstr ""
8765 "struct shm_info {\n"
8766 "    int           used_ids; /* 現在存在するセグメント数 */\n"
8767 "    unsigned long shm_tot;  /* 共有メモリのページ総数 */\n"
8768 "    unsigned long shm_rss;  /* メモリ上にある (スワップされて\n"
8769 "                               いない) 共有メモリページ数 */\n"
8770 "    unsigned long shm_swp;  /* スワップされている共有メモリ\n"
8771 "                               ページ数 */\n"
8772 "    unsigned long swap_attempts;\n"
8773 "                            /* Linux 2.4 以降では未使用 */\n"
8774 "    unsigned long swap_successes;\n"
8775 "                            /* Linux 2.4 以降では未使用 */\n"
8776 "};\n"
8777
8778 #. type: TP
8779 #: build/C/man2/shmctl.2:224
8780 #, no-wrap
8781 msgid "B<SHM_STAT> (Linux-specific)"
8782 msgstr "B<SHM_STAT> (Linux 固有)"
8783
8784 #. type: Plain text
8785 #: build/C/man2/shmctl.2:235
8786 msgid ""
8787 "Returns a I<shmid_ds> structure as for B<IPC_STAT>.  However, the I<shmid> "
8788 "argument is not a segment identifier, but instead an index into the kernel's "
8789 "internal array that maintains information about all shared memory segments "
8790 "on the system."
8791 msgstr ""
8792 "B<IPC_STAT> と同じく I<shmid_ds> 構造体を返す。 但し、 I<shmid> 引き数は、セ"
8793 "グメント識別子ではなく、システム上の全ての共有メモリ セグメントに関する情報を"
8794 "管理するカーネルの内部配列へのインデックス である。"
8795
8796 #. type: Plain text
8797 #: build/C/man2/shmctl.2:238
8798 msgid ""
8799 "The caller can prevent or allow swapping of a shared memory segment with the "
8800 "following I<cmd> values:"
8801 msgstr ""
8802 "呼び出し元は、I<cmd> に以下の値を指定することで、共有メモリ・セグメントが ス"
8803 "ワップされることを防止したり、許可したりできる:"
8804
8805 #. type: TP
8806 #: build/C/man2/shmctl.2:239
8807 #, no-wrap
8808 msgid "B<SHM_LOCK> (Linux-specific)"
8809 msgstr "B<SHM_LOCK> (Linux 固有)"
8810
8811 #. type: Plain text
8812 #: build/C/man2/shmctl.2:251
8813 msgid ""
8814 "Prevent swapping of the shared memory segment.  The caller must fault in any "
8815 "pages that are required to be present after locking is enabled.  If a "
8816 "segment has been locked, then the (nonstandard)  B<SHM_LOCKED> flag of the "
8817 "I<shm_perm.mode> field in the associated data structure retrieved by "
8818 "B<IPC_STAT> will be set."
8819 msgstr ""
8820 "共有メモリ・セグメントをスワップすることを防止する。 ロックが有効になった後、"
8821 "呼び出し元は、 存在することが要求された全てのページをフォールトさせなければな"
8822 "らない。 セグメントがロックされると、 関連するデータ構造体において "
8823 "I<shm_perm.mode> フィールドの (標準的ではない)  B<SHM_LOCKED> フラグが設定さ"
8824 "れる。 このデータ構造体は B<IPC_STAT> で取得される。"
8825
8826 #. type: TP
8827 #: build/C/man2/shmctl.2:251
8828 #, no-wrap
8829 msgid "B<SHM_UNLOCK> (Linux-specific)"
8830 msgstr "B<SHM_UNLOCK> (Linux 固有)"
8831
8832 #. type: Plain text
8833 #: build/C/man2/shmctl.2:254
8834 msgid "Unlock the segment, allowing it to be swapped out."
8835 msgstr "セグメントのロックを解除し、スワップ・アウトすることを可能にする。"
8836
8837 #.  There was some weirdness in 2.6.9: SHM_LOCK and SHM_UNLOCK could
8838 #.  be applied to a segment, regardless of ownership of the segment.
8839 #.  This was a botch-up in the move to RLIMIT_MEMLOCK, and was fixed
8840 #.  in 2.6.10.  MTK, May 2005
8841 #. type: Plain text
8842 #: build/C/man2/shmctl.2:272
8843 msgid ""
8844 "In kernels before 2.6.10, only a privileged process could employ B<SHM_LOCK> "
8845 "and B<SHM_UNLOCK>.  Since kernel 2.6.10, an unprivileged process can employ "
8846 "these operations if its effective UID matches the owner or creator UID of "
8847 "the segment, and (for B<SHM_LOCK>)  the amount of memory to be locked falls "
8848 "within the B<RLIMIT_MEMLOCK> resource limit (see B<setrlimit>(2))."
8849 msgstr ""
8850 "2.6.10 より前のカーネルでは、特権プロセスだけが B<SHM_LOCK> と B<SHM_UNLOCK> "
8851 "を利用することができた。 2.6.10 以降のカーネルでは、非特権プロセスであっても"
8852 "次の条件を満たせば これらの操作を利用することができる。その条件とは、プロセス"
8853 "の実効 UID がそのセグメントの所有者もしくは作成者の UID と一致し、 "
8854 "(B<SHM_LOCK> の場合には) ロックするメモリの合計が B<RLIMIT_MEMLOCK> リソース"
8855 "上限 (B<setrlimit>(2)  参照) の範囲内に入っていることである。"
8856
8857 #. type: Plain text
8858 #: build/C/man2/shmctl.2:290
8859 msgid ""
8860 "A successful B<IPC_INFO> or B<SHM_INFO> operation returns the index of the "
8861 "highest used entry in the kernel's internal array recording information "
8862 "about all shared memory segments.  (This information can be used with "
8863 "repeated B<SHM_STAT> operations to obtain information about all shared "
8864 "memory segments on the system.)  A successful B<SHM_STAT> operation returns "
8865 "the identifier of the shared memory segment whose index was given in "
8866 "I<shmid>.  Other operations return 0 on success."
8867 msgstr ""
8868 "B<IPC_INFO> と B<SHM_INFO> 操作は、成功すると、全ての共有メモリセグメントに関"
8869 "する情報を 管理しているカーネルの内部配列の使用中エントリのインデックスの う"
8870 "ち最大値を返す (この情報は、システムの全ての共有メモリセグメントに関する情報"
8871 "を 取得するために、 B<SHM_STAT> 操作を繰り返し実行する際に使用できる)。 "
8872 "B<SHM_STAT> 操作は、成功すると、 I<shmid> で指定されたインデックスを持つ共有"
8873 "メモリセグメントの識別子を返す。 他の操作は、成功の場合 0 を返す。"
8874
8875 #. type: Plain text
8876 #: build/C/man2/shmctl.2:294
8877 msgid "On error, -1 is returned, and I<errno> is set appropriately."
8878 msgstr "エラーの場合は -1 を返し、 I<errno> を適切に設定する。"
8879
8880 #. type: Plain text
8881 #: build/C/man2/shmctl.2:303
8882 msgid ""
8883 "B<IPC_STAT> or B<SHM_STAT> is requested and I<shm_perm.mode> does not allow "
8884 "read access for I<shmid>, and the calling process does not have the "
8885 "B<CAP_IPC_OWNER> capability."
8886 msgstr ""
8887 "B<IPC_STAT> または B<SHM_STAT> が要求され、 I<shm_perm.mode> が I<shmid> への"
8888 "読み込みアクセスを許しておらず、 かつ呼び出したプロセスが B<CAP_IPC_OWNER> "
8889 "ケーパビリティ (capability) を持っていない。"
8890
8891 #. type: Plain text
8892 #: build/C/man2/shmctl.2:314
8893 msgid ""
8894 "The argument I<cmd> has value B<IPC_SET> or B<IPC_STAT> but the address "
8895 "pointed to by I<buf> isn't accessible."
8896 msgstr ""
8897 "I<cmd> 引き数に B<IPC_SET> か B<IPC_STAT> が指定されたが I<buf> で指されてい"
8898 "るアドレスにアクセスできない。"
8899
8900 #. type: TP
8901 #: build/C/man2/shmctl.2:314
8902 #, no-wrap
8903 msgid "B<EIDRM>"
8904 msgstr "B<EIDRM>"
8905
8906 #. type: Plain text
8907 #: build/C/man2/shmctl.2:317
8908 msgid "I<shmid> points to a removed identifier."
8909 msgstr "I<shmid> が削除 (remove) された識別子 (identifier) を指している。"
8910
8911 #. type: Plain text
8912 #: build/C/man2/shmctl.2:326
8913 msgid ""
8914 "I<shmid> is not a valid identifier, or I<cmd> is not a valid command.  Or: "
8915 "for a B<SHM_STAT> operation, the index value specified in I<shmid> referred "
8916 "to an array slot that is currently unused."
8917 msgstr ""
8918 "I<shmid> が有効な識別子でないか、 I<cmd> が有効なコマンドでない。 もしくは、 "
8919 "B<SHM_STAT> 操作の場合に、 I<shmid> で指定されたインデックス値が現在未使用の"
8920 "配列のスロットを参照していた。"
8921
8922 #. type: Plain text
8923 #: build/C/man2/shmctl.2:337
8924 msgid ""
8925 "(In kernels since 2.6.9), B<SHM_LOCK> was specified and the size of the to-"
8926 "be-locked segment would mean that the total bytes in locked shared memory "
8927 "segments would exceed the limit for the real user ID of the calling "
8928 "process.  This limit is defined by the B<RLIMIT_MEMLOCK> soft resource limit "
8929 "(see B<setrlimit>(2))."
8930 msgstr ""
8931 "(2.6.9 以降のカーネルにおいて)  B<SHM_LOCK> が指定され、 ロックされる予定のセ"
8932 "グメントのサイズ (ロックされる共有メモリ・セグメントの合計バイト数) が、 呼び"
8933 "出したプロセスの実ユーザー ID についての制限を超えた。 この制限は "
8934 "B<RLIMIT_MEMLOCK> ソフト資源制限で定義される (B<setrlimit>(2)  を参照)。"
8935
8936 #. type: TP
8937 #: build/C/man2/shmctl.2:337
8938 #, no-wrap
8939 msgid "B<EOVERFLOW>"
8940 msgstr "B<EOVERFLOW>"
8941
8942 #. type: Plain text
8943 #: build/C/man2/shmctl.2:342
8944 msgid ""
8945 "B<IPC_STAT> is attempted, and the GID or UID value is too large to be stored "
8946 "in the structure pointed to by I<buf>."
8947 msgstr ""
8948 "B<IPC_STAT> が試みられ、GID や UID の値が I<buf> で指示される構造体に格納する"
8949 "には大き過ぎる。"
8950
8951 #. type: Plain text
8952 #: build/C/man2/shmctl.2:354
8953 msgid ""
8954 "B<IPC_SET> or B<IPC_RMID> is attempted, and the effective user ID of the "
8955 "calling process is not that of the creator (found in I<shm_perm.cuid>), or "
8956 "the owner (found in I<shm_perm.uid>), and the process was not privileged "
8957 "(Linux: did not have the B<CAP_SYS_ADMIN> capability)."
8958 msgstr ""
8959 "B<IPC_SET> か B<IPC_RMID> が試みられ、 呼び出したプロセスの実効ユーザー ID が"
8960 "作成者 (I<shm_perm.cuid>)  でも所有者 (I<shm_perm.uid>)  でもなく、プロセスが"
8961 "特権を持たない (Linux では B<CAP_SYS_ADMIN> ケーパビリティを持たない)。"
8962
8963 #. type: Plain text
8964 #: build/C/man2/shmctl.2:366
8965 msgid ""
8966 "Or (in kernels before 2.6.9), B<SHM_LOCK> or B<SHM_UNLOCK> was specified, "
8967 "but the process was not privileged (Linux: did not have the B<CAP_IPC_LOCK> "
8968 "capability).  (Since Linux 2.6.9, this error can also occur if the "
8969 "B<RLIMIT_MEMLOCK> is 0 and the caller is not privileged.)"
8970 msgstr ""
8971 "または (2.6.9 より前のカーネルで)  B<SHM_LOCK> または B<SHM_UNLOCK> が指定さ"
8972 "れているが、プロセスが特権を持たない (Linux では B<CAP_IPC_LOCK> ケーパビリ"
8973 "ティを持たない)。 (Linux 2.6.9 以降では、 B<RLIMIT_MEMLOCK> が 0 で呼び出し元"
8974 "が特権を持たない場合にも、このエラーが起こる。)"
8975
8976 #.  SVr4 documents an additional error condition EMFILE.
8977 #. type: Plain text
8978 #: build/C/man2/shmctl.2:371 build/C/man2/shmget.2:232
8979 #: build/C/man2/shmop.2:229
8980 msgid "SVr4, POSIX.1-2001."
8981 msgstr "SVr4, POSIX.1-2001."
8982
8983 #. type: Plain text
8984 #: build/C/man2/shmctl.2:382
8985 msgid ""
8986 "The B<IPC_INFO>, B<SHM_STAT> and B<SHM_INFO> operations are used by the "
8987 "B<ipcs>(1)  program to provide information on allocated resources.  In the "
8988 "future these may modified or moved to a /proc file system interface."
8989 msgstr ""
8990 "B<IPC_INFO>, B<SHM_STAT>, B<SHM_INFO> 操作は、 B<ipcs>(1)  プログラムで割り当"
8991 "て済の資源に関する情報を提供するために 使用されている。将来、これらの操作は変"
8992 "更されたり、 /proc ファイルシステムのインタフェースに移動されるかもしれない。"
8993
8994 #. type: Plain text
8995 #: build/C/man2/shmctl.2:390
8996 msgid ""
8997 "Linux permits a process to attach (B<shmat>(2))  a shared memory segment "
8998 "that has already been marked for deletion using I<shmctl(IPC_RMID)>.  This "
8999 "feature is not available on other UNIX implementations; portable "
9000 "applications should avoid relying on it."
9001 msgstr ""
9002 "Linux では、 I<shmctl(IPC_RMID)> を使ってすでに削除マークがつけられている共有"
9003 "メモリ・セグメントを あるプロセスが付加 (attach)  (B<shmat>(2))  することを許"
9004 "可している。 この機能は他の UNIX の実装では利用できない。 移植性を考慮したア"
9005 "プリケーションではこれに依存しないようにすべきである。"
9006
9007 #. type: Plain text
9008 #: build/C/man2/shmctl.2:403
9009 msgid ""
9010 "Various fields in a I<struct shmid_ds> were typed as I<short> under Linux "
9011 "2.2 and have become I<long> under Linux 2.4.  To take advantage of this, a "
9012 "recompilation under glibc-2.1.91 or later should suffice.  (The kernel "
9013 "distinguishes old and new calls by an B<IPC_64> flag in I<cmd>.)"
9014 msgstr ""
9015 "I<構造体 shmid_ds> 内の多くのフィールドは、 Linux 2.2 では I<short> 型だった"
9016 "が、Linux 2.4 では I<long> 型になった。 この利点を生かすには、glibc-2.1.91 以"
9017 "降の環境下で 再コンパイルすれば十分である。 カーネルは新しい形式の呼び出しと"
9018 "古い形式の呼び出しを I<cmd> 内の B<IPC_64> フラグで区別する。"
9019
9020 #. type: Plain text
9021 #: build/C/man2/shmctl.2:410
9022 msgid ""
9023 "B<mlock>(2), B<setrlimit>(2), B<shmget>(2), B<shmop>(2), B<capabilities>(7), "
9024 "B<svipc>(7)"
9025 msgstr ""
9026 "B<mlock>(2), B<setrlimit>(2), B<shmget>(2), B<shmop>(2), B<capabilities>(7), "
9027 "B<shm_overview>(7), B<svipc>(7)"
9028
9029 #. type: TH
9030 #: build/C/man2/shmget.2:36
9031 #, no-wrap
9032 msgid "SHMGET"
9033 msgstr "SHMGET"
9034
9035 #. type: TH
9036 #: build/C/man2/shmget.2:36
9037 #, no-wrap
9038 msgid "2006-05-02"
9039 msgstr "2006-05-02"
9040
9041 #. type: Plain text
9042 #: build/C/man2/shmget.2:39
9043 msgid "shmget - allocates a shared memory segment"
9044 msgstr "shmget - 共有メモリ・セグメントを割り当てる"
9045
9046 #. type: Plain text
9047 #: build/C/man2/shmget.2:46
9048 msgid "B<int shmget(key_t >I<key>B<, size_t >I<size>B<, int >I<shmflg>B<);>"
9049 msgstr "B<int shmget(key_t >I<key>B<, size_t >I<size>B<, int >I<shmflg>B<);>"
9050
9051 #. type: Plain text
9052 #: build/C/man2/shmget.2:70
9053 msgid ""
9054 "B<shmget>()  returns the identifier of the shared memory segment associated "
9055 "with the value of the argument I<key>.  A new shared memory segment, with "
9056 "size equal to the value of I<size> rounded up to a multiple of B<PAGE_SIZE>, "
9057 "is created if I<key> has the value B<IPC_PRIVATE> or I<key> isn't "
9058 "B<IPC_PRIVATE>, no shared memory segment corresponding to I<key> exists, and "
9059 "B<IPC_CREAT> is specified in I<shmflg>."
9060 msgstr ""
9061 "B<shmget>()  は I<key> 引き数に対応する共有メモリ・セグメントの識別子を返"
9062 "す。 I<key> の値が B<IPC_PRIVATE> の場合、もしくは I<key> に対応する共有メモ"
9063 "リ・セグメントが存在せず、 I<shmflg> に B<IPC_CREAT> が指定されていた場合、 "
9064 "新しい共有メモリ・セグメントを作成する。 作成される共有メモリ・セグメント"
9065 "は、 I<size> 引き数の値を B<PAGE_SIZE> の倍数へと切り上げた (round up) 大きさ"
9066 "となる。"
9067
9068 #. type: Plain text
9069 #: build/C/man2/shmget.2:89
9070 msgid ""
9071 "If I<shmflg> specifies both B<IPC_CREAT> and B<IPC_EXCL> and a shared memory "
9072 "segment already exists for I<key>, then B<shmget>()  fails with I<errno> set "
9073 "to B<EEXIST>.  (This is analogous to the effect of the combination B<O_CREAT "
9074 "| O_EXCL> for B<open>(2).)"
9075 msgstr ""
9076 "I<shmflg> に B<IPC_CREAT> と B<IPC_EXCL> の両方が指定された場合、 I<key> に対"
9077 "応する共有メモリ・セグメントが既に存在すると、 B<shmget>()  は失敗し、 "
9078 "I<errno> に B<EEXIST> が設定される (これは B<open>(2)  に B<O_CREAT | "
9079 "O_EXCL> を指定した場合の動作と同じである)。"
9080
9081 #. type: Plain text
9082 #: build/C/man2/shmget.2:93
9083 msgid "The value I<shmflg> is composed of:"
9084 msgstr "I<shmflg> は以下の内容から構成される:"
9085
9086 #. type: TP
9087 #: build/C/man2/shmget.2:93
9088 #, no-wrap
9089 msgid "B<IPC_CREAT>"
9090 msgstr "B<IPC_CREAT>"
9091
9092 #. type: Plain text
9093 #: build/C/man2/shmget.2:100
9094 msgid ""
9095 "to create a new segment.  If this flag is not used, then B<shmget>()  will "
9096 "find the segment associated with I<key> and check to see if the user has "
9097 "permission to access the segment."
9098 msgstr ""
9099 "新しいセグメントを作成する。このフラグが指定されなかった場合、 B<shmget>()  "
9100 "は I<key> に対応するセグメントを探し、 ユーザがそのセグメントにアクセスする許"
9101 "可があるかどうかをチェックする。"
9102
9103 #. type: TP
9104 #: build/C/man2/shmget.2:100
9105 #, no-wrap
9106 msgid "B<IPC_EXCL>"
9107 msgstr "B<IPC_EXCL>"
9108
9109 #. type: Plain text
9110 #: build/C/man2/shmget.2:103
9111 msgid "used with B<IPC_CREAT> to ensure failure if the segment already exists."
9112 msgstr ""
9113 "B<IPC_CREAT> と共に使用し、セグメントが既に存在した場合には 失敗することを保"
9114 "証する。"
9115
9116 #. type: TP
9117 #: build/C/man2/shmget.2:103
9118 #, no-wrap
9119 msgid "I<mode_flags>"
9120 msgstr "I<mode_flags>"
9121
9122 #. type: Plain text
9123 #: build/C/man2/shmget.2:113
9124 msgid ""
9125 "(least significant 9 bits)  specifying the permissions granted to the owner, "
9126 "group, and world.  These bits have the same format, and the same meaning, as "
9127 "the I<mode> argument of B<open>(2).  Presently, the execute permissions are "
9128 "not used by the system."
9129 msgstr ""
9130 "(下位 9 ビット)  所有者、グループ、他人 (world) への許可を指定する。 これらの"
9131 "ビットは B<open>(2)  の I<mode> 引き数と同じ形式で同じ意味を持つ。 今のとこ"
9132 "ろ、システムは実行 (execute) 許可を参照しない。"
9133
9134 #. type: TP
9135 #: build/C/man2/shmget.2:113
9136 #, no-wrap
9137 msgid "B<SHM_HUGETLB> (since Linux 2.6)"
9138 msgstr "B<SHM_HUGETLB> (Linux 2.6 以降)"
9139
9140 #. type: Plain text
9141 #: build/C/man2/shmget.2:119
9142 msgid ""
9143 "Allocate the segment using \"huge pages.\" See the kernel source file "
9144 "I<Documentation/vm/hugetlbpage.txt> for further information."
9145 msgstr ""
9146 "\"ヒュージページ (huge page)\" を使うセグメントを割り当てる。 詳細な情報は、"
9147 "カーネル・ソースのファイル I<Documentation/vm/hugetlbpage.txt> を参照。"
9148
9149 #. type: TP
9150 #: build/C/man2/shmget.2:119
9151 #, no-wrap
9152 msgid "B<SHM_NORESERVE> (since Linux 2.6.15)"
9153 msgstr "B<SHM_NORESERVE> (Linux 2.6.15 以降)"
9154
9155 #.  As at 2.6.17-rc2, this flag has no effect if SHM_HUGETLB was also
9156 #.  specified.
9157 #. type: Plain text
9158 #: build/C/man2/shmget.2:138
9159 msgid ""
9160 "This flag serves the same purpose as the B<mmap>(2)  B<MAP_NORESERVE> flag.  "
9161 "Do not reserve swap space for this segment.  When swap space is reserved, "
9162 "one has the guarantee that it is possible to modify the segment.  When swap "
9163 "space is not reserved one might get B<SIGSEGV> upon a write if no physical "
9164 "memory is available.  See also the discussion of the file I</proc/sys/vm/"
9165 "overcommit_memory> in B<proc>(5)."
9166 msgstr ""
9167 "このフラグは、 B<mmap>(2)  の B<MAP_NORESERVE> フラグと同じ役割を果たす。 こ"
9168 "のセグメントに対するスワップ空間の予約を行わない。 スワップ空間を予約した場合"
9169 "は、そのセグメントの変更が必ず成功することが 保証される。スワップ空間の予約を"
9170 "行わなかった場合は、物理メモリに空きが ないと書き込み時に B<SIGSEGV> を受け取"
9171 "る可能性がある。 B<proc>(5)  にある I</proc/sys/vm/overcommit_memory> ファイ"
9172 "ルに関する議論も参照のこと。"
9173
9174 #. type: Plain text
9175 #: build/C/man2/shmget.2:146
9176 msgid ""
9177 "When a new shared memory segment is created, its contents are initialized to "
9178 "zero values, and its associated data structure, I<shmid_ds> (see B<shmctl>"
9179 "(2)), is initialized as follows:"
9180 msgstr ""
9181 "共有メモリ・セグメントが新たに作成される際、 共有メモリ・セグメントの内容は "
9182 "0 で初期化され、 関連情報を保持するデータ構造体 I<shmid_ds> は以下のように初"
9183 "期化される。"
9184
9185 #. type: Plain text
9186 #: build/C/man2/shmget.2:151
9187 msgid ""
9188 "I<shm_perm.cuid> and I<shm_perm.uid> are set to the effective user ID of the "
9189 "calling process."
9190 msgstr ""
9191 "I<shm_perm.cuid> と I<shm_perm.uid> に呼び出し元プロセスの実効 (effective) "
9192 "ユーザーID を設定する。"
9193
9194 #. type: Plain text
9195 #: build/C/man2/shmget.2:156
9196 msgid ""
9197 "I<shm_perm.cgid> and I<shm_perm.gid> are set to the effective group ID of "
9198 "the calling process."
9199 msgstr ""
9200 "I<shm_perm.cgid> と I<shm_perm.gid> に呼び出し元プロセスの実効グループID を設"
9201 "定する。"
9202
9203 #. type: Plain text
9204 #: build/C/man2/shmget.2:161
9205 msgid ""
9206 "The least significant 9 bits of I<shm_perm.mode> are set to the least "
9207 "significant 9 bit of I<shmflg>."
9208 msgstr ""
9209 "I<shm_perm.mode> の下位 9 ビットに I<shmflg> の下位 9 ビットを設定する。"
9210
9211 #. type: Plain text
9212 #: build/C/man2/shmget.2:165
9213 msgid "I<shm_segsz> is set to the value of I<size>."
9214 msgstr "I<shm_segsz> に I<size> の値を設定する。"
9215
9216 #. type: Plain text
9217 #: build/C/man2/shmget.2:172
9218 msgid "I<shm_lpid>, I<shm_nattch>, I<shm_atime> and I<shm_dtime> are set to 0."
9219 msgstr ""
9220 "I<shm_lpid>, I<shm_nattch>, I<shm_atime>, I<shm_dtime> に 0 を設定する。"
9221
9222 #. type: Plain text
9223 #: build/C/man2/shmget.2:175
9224 msgid "I<shm_ctime> is set to the current time."
9225 msgstr "I<shm_ctime> に現在の時刻を設定する。"
9226
9227 #. type: Plain text
9228 #: build/C/man2/shmget.2:178
9229 msgid ""
9230 "If the shared memory segment already exists, the permissions are verified, "
9231 "and a check is made to see if it is marked for destruction."
9232 msgstr ""
9233 "共有メモリ・セグメントが既に存在する場合、アクセス許可の検査と、 破壊 "
9234 "(destruction) マークがつけられていないかのチェックが行われる。"
9235
9236 #. type: Plain text
9237 #: build/C/man2/shmget.2:182
9238 msgid ""
9239 "A valid segment identifier, I<shmid>, is returned on success, -1 on error."
9240 msgstr ""
9241 "成功した場合、有効なセグメント識別子 I<shmid> が返される。エラーの場合、 -1 "
9242 "が返される。"
9243
9244 #. type: Plain text
9245 #: build/C/man2/shmget.2:186
9246 msgid "On failure, I<errno> is set to one of the following:"
9247 msgstr "失敗した場合は I<errno> が以下のどれかに設定される:"
9248
9249 #. type: Plain text
9250 #: build/C/man2/shmget.2:192
9251 msgid ""
9252 "The user does not have permission to access the shared memory segment, and "
9253 "does not have the B<CAP_IPC_OWNER> capability."
9254 msgstr ""
9255 "ユーザーはその共有メモリ・セグメントへのアクセス許可を持たず、 "
9256 "B<CAP_IPC_OWNER> ケーパビリティも持っていない。"
9257
9258 #. type: Plain text
9259 #: build/C/man2/shmget.2:196
9260 msgid "B<IPC_CREAT | IPC_EXCL> was specified and the segment exists."
9261 msgstr ""
9262 "B<IPC_CREAT | IPC_EXCL> が指定されていたが、そのセグメントが既に存在する。"
9263
9264 #. type: Plain text
9265 #: build/C/man2/shmget.2:202
9266 msgid ""
9267 "A new segment was to be created and I<size> E<lt> B<SHMMIN> or I<size> E<gt> "
9268 "B<SHMMAX>, or no new segment was to be created, a segment with given key "
9269 "existed, but I<size> is greater than the size of that segment."
9270 msgstr ""
9271 "新しいセグメントを作成しようとした際に I<size> E<lt> B<SHMMIN> または "
9272 "I<size> E<gt> B<SHMMAX> であった。 もしくは、指定されたキーに対応するセグメン"
9273 "トが既に存在して、新しい セグメントを作成しようとはしなかったが、I<size> が存"
9274 "在するセグメントの サイズよりも大きかった。"
9275
9276 #. type: Plain text
9277 #: build/C/man2/shmget.2:211
9278 msgid ""
9279 "No segment exists for the given I<key>, and B<IPC_CREAT> was not specified."
9280 msgstr ""
9281 "指定された I<key> に対応するセグメントが存在せず、 B<IPC_CREAT> も指定されて"
9282 "いなかった。"
9283
9284 #. type: Plain text
9285 #: build/C/man2/shmget.2:214
9286 msgid "No memory could be allocated for segment overhead."
9287 msgstr "セグメントの管理情報 (overhead) に割り当てるメモリがなかった。"
9288
9289 #. type: Plain text
9290 #: build/C/man2/shmget.2:222
9291 msgid ""
9292 "All possible shared memory IDs have been taken (B<SHMMNI>), or allocating a "
9293 "segment of the requested I<size> would cause the system to exceed the system-"
9294 "wide limit on shared memory (B<SHMALL>)."
9295 msgstr ""
9296 "システム全体の共有メモリ・セグメント数の制限 (B<SHMMNI>)  に達した、または要"
9297 "求された I<size> のセグメントの割り当てが システム全体の共有メモリサイズの制"
9298 "限 (B<SHMALL>)  を超過した。"
9299
9300 #. type: Plain text
9301 #: build/C/man2/shmget.2:229
9302 msgid ""
9303 "The B<SHM_HUGETLB> flag was specified, but the caller was not privileged "
9304 "(did not have the B<CAP_IPC_LOCK> capability)."
9305 msgstr ""
9306 "B<SHM_HUGETLB> フラグが指定されたが、呼び出し元には権限がなかった "
9307 "(B<CAP_IPC_LOCK> ケーパビリティを持っていなかった)。"
9308
9309 #. type: Plain text
9310 #: build/C/man2/shmget.2:235
9311 msgid "B<SHM_HUGETLB> is a nonportable Linux extension."
9312 msgstr "B<SHM_HUGETLB> は Linux での拡張であり、移植性はない。"
9313
9314 #. type: Plain text
9315 #: build/C/man2/shmget.2:245
9316 msgid ""
9317 "B<IPC_PRIVATE> isn't a flag field but a I<key_t> type.  If this special "
9318 "value is used for I<key>, the system call ignores everything but the least "
9319 "significant 9 bits of I<shmflg> and creates a new shared memory segment (on "
9320 "success)."
9321 msgstr ""
9322 "B<IPC_PRIVATE> はフラグではなく I<key_t> 型である。 この特別な値が I<key> に"
9323 "使用された場合は、 B<shmget>()  は I<shmflg> の下位 9 ビットを除いた全てを無"
9324 "視し、 (成功すれば) 新しい共有メモリ・セグメントを作成する。"
9325
9326 #. type: Plain text
9327 #: build/C/man2/shmget.2:249
9328 msgid ""
9329 "The following limits on shared memory segment resources affect the B<shmget>"
9330 "()  call:"
9331 msgstr ""
9332 "B<shmget>()  コールに影響する共有メモリ・セグメント資源の制限は以下の通りであ"
9333 "る:"
9334
9335 #. type: TP
9336 #: build/C/man2/shmget.2:249
9337 #, no-wrap
9338 msgid "B<SHMALL>"
9339 msgstr "B<SHMALL>"
9340
9341 #. type: Plain text
9342 #: build/C/man2/shmget.2:254
9343 msgid ""
9344 "System wide maximum of shared memory pages (on Linux, this limit can be read "
9345 "and modified via I</proc/sys/kernel/shmall>)."
9346 msgstr ""
9347 "システム全体の共有メモリ・ページの最大数 (Linux では、この上限値は I</proc/"
9348 "sys/kernel/shmall> 経由で参照したり、変更したりできる)。"
9349
9350 #. type: TP
9351 #: build/C/man2/shmget.2:254
9352 #, no-wrap
9353 msgid "B<SHMMAX>"
9354 msgstr "B<SHMMAX>"
9355
9356 #. type: Plain text
9357 #: build/C/man2/shmget.2:259
9358 msgid ""
9359 "Maximum size in bytes for a shared memory segment: policy dependent (on "
9360 "Linux, this limit can be read and modified via I</proc/sys/kernel/shmmax>)."
9361 msgstr ""
9362 "共有メモリ・セグメントのバイト単位の大きさの上限: 方針依存 (Linux では、この"
9363 "上限値は I</proc/sys/kernel/shmmax> 経由で参照したり、変更したりできる)。"
9364
9365 #. type: TP
9366 #: build/C/man2/shmget.2:259
9367 #, no-wrap
9368 msgid "B<SHMMIN>"
9369 msgstr "B<SHMMIN>"
9370
9371 #. type: Plain text
9372 #: build/C/man2/shmget.2:265
9373 msgid ""
9374 "Minimum size in bytes for a shared memory segment: implementation dependent "
9375 "(currently 1 byte, though B<PAGE_SIZE> is the effective minimum size)."
9376 msgstr ""
9377 "共有メモリ・セグメントのバイト単位の大きさの下限: 実装依存 (現在は 1 バイトだ"
9378 "が、実質的な最小サイズは B<PAGE_SIZE> である)。"
9379
9380 #. type: TP
9381 #: build/C/man2/shmget.2:265
9382 #, no-wrap
9383 msgid "B<SHMMNI>"
9384 msgstr "B<SHMMNI>"
9385
9386 #.  Kernels between 2.4.x and 2.6.8 had an off-by-one error that meant
9387 #.  that we could create one more segment than SHMMNI -- MTK
9388 #.  This /proc file is not available in Linux 2.2 and earlier -- MTK
9389 #. type: Plain text
9390 #: build/C/man2/shmget.2:274
9391 msgid ""
9392 "System wide maximum number of shared memory segments: implementation "
9393 "dependent (currently 4096, was 128 before Linux 2.3.99; on Linux, this limit "
9394 "can be read and modified via I</proc/sys/kernel/shmmni>)."
9395 msgstr ""
9396 "システム全体の共有メモリーの数の上限: 実装依存 (現在は 4096。Linux 2.3.99 よ"
9397 "り前では 128。 Linux では、この上限値は I</proc/sys/kernel/shmmni> 経由で参照"
9398 "したり、変更したりできる)。"
9399
9400 #. type: Plain text
9401 #: build/C/man2/shmget.2:278
9402 msgid ""
9403 "The implementation has no specific limits for the per-process maximum number "
9404 "of shared memory segments (B<SHMSEG>)."
9405 msgstr ""
9406 "プロセス当りの共有メモリ・セグメントの個数の最大値 (B<SHMSEG>)  に関する実装"
9407 "上の制限はない。"
9408
9409 #. type: Plain text
9410 #: build/C/man2/shmget.2:284
9411 msgid ""
9412 "Until version 2.3.30 Linux would return B<EIDRM> for a B<shmget>()  on a "
9413 "shared memory segment scheduled for deletion."
9414 msgstr ""
9415 "バージョン 2.3.30 までは、Linux は 削除が予定されている共有メモリ・セグメント"
9416 "に対して B<shmget>()  が行われると B<EIDRM> を返していた。"
9417
9418 #. type: Plain text
9419 #: build/C/man2/shmget.2:290
9420 msgid ""
9421 "The name choice B<IPC_PRIVATE> was perhaps unfortunate, B<IPC_NEW> would "
9422 "more clearly show its function."
9423 msgstr ""
9424 "B<IPC_PRIVATE> という名前を選んだのはおそらく失敗であろう。 B<IPC_NEW> の方が"
9425 "より明確にその機能を表しているだろう。"
9426
9427 #. type: Plain text
9428 #: build/C/man2/shmget.2:298
9429 msgid ""
9430 "B<shmat>(2), B<shmctl>(2), B<shmdt>(2), B<ftok>(3), B<capabilities>(7), "
9431 "B<shm_overview>(7), B<svipc>(7)"
9432 msgstr ""
9433 "B<shmat>(2), B<shmctl>(2), B<shmdt>(2), B<ftok>(3), B<capabilities>(7), "
9434 "B<shm_overview>(7), B<svipc>(7)"
9435
9436 #. type: TH
9437 #: build/C/man2/shmop.2:39
9438 #, no-wrap
9439 msgid "SHMOP"
9440 msgstr "SHMOP"
9441
9442 #. type: TH
9443 #: build/C/man2/shmop.2:39
9444 #, no-wrap
9445 msgid "2008-06-03"
9446 msgstr "2008-06-03"
9447
9448 #. type: Plain text
9449 #: build/C/man2/shmop.2:42
9450 msgid "shmat, shmdt - shared memory operations"
9451 msgstr "shmat, shmdt - 共有メモリ (shared memory) の操作"
9452
9453 #. type: Plain text
9454 #: build/C/man2/shmop.2:46
9455 #, no-wrap
9456 msgid ""
9457 "B<#include E<lt>sys/types.hE<gt>>\n"
9458 "B<#include E<lt>sys/shm.hE<gt>>\n"
9459 msgstr ""
9460 "B<#include E<lt>sys/types.hE<gt>>\n"
9461 "B<#include E<lt>sys/shm.hE<gt>>\n"
9462
9463 #. type: Plain text
9464 #: build/C/man2/shmop.2:48
9465 #, no-wrap
9466 msgid "B<void *shmat(int >I<shmid>B<, const void *>I<shmaddr>B<, int >I<shmflg>B<);>\n"
9467 msgstr "B<void *shmat(int >I<shmid>B<, const void *>I<shmaddr>B<, int >I<shmflg>B<);>\n"
9468
9469 #. type: Plain text
9470 #: build/C/man2/shmop.2:50
9471 #, no-wrap
9472 msgid "B<int shmdt(const void *>I<shmaddr>B<);>\n"
9473 msgstr "B<int shmdt(const void *>I<shmaddr>B<);>\n"
9474
9475 #. type: Plain text
9476 #: build/C/man2/shmop.2:59
9477 msgid ""
9478 "B<shmat>()  attaches the shared memory segment identified by I<shmid> to the "
9479 "address space of the calling process.  The attaching address is specified by "
9480 "I<shmaddr> with one of the following criteria:"
9481 msgstr ""
9482 "B<shmat>()  は I<shmid> で指定された共有メモリ・セグメント (shared memory "
9483 "segment) を コールしたプロセスのアドレス空間に付加 (attach) する。 付加するア"
9484 "ドレスは I<shmaddr> に以下のどれかの形式で指定する:"
9485
9486 #. type: Plain text
9487 #: build/C/man2/shmop.2:65
9488 msgid ""
9489 "If I<shmaddr> is NULL, the system chooses a suitable (unused) address at "
9490 "which to attach the segment."
9491 msgstr ""
9492 "I<shmaddr> が NULL ならば、システムはセグメントを付加するための 適切な (使用"
9493 "されていない) アドレスを選択する。"
9494
9495 #. type: Plain text
9496 #: build/C/man2/shmop.2:80
9497 msgid ""
9498 "If I<shmaddr> isn't NULL and B<SHM_RND> is specified in I<shmflg>, the "
9499 "attach occurs at the address equal to I<shmaddr> rounded down to the nearest "
9500 "multiple of B<SHMLBA>.  Otherwise I<shmaddr> must be a page-aligned address "
9501 "at which the attach occurs."
9502 msgstr ""
9503 "I<shmaddr> が NULL でなく B<SHM_RND> が I<shmflg> に指定されている場合は、 "
9504 "I<shmaddr> を B<SHMLBA> の倍数へと切り捨てた (rounding down) のと等しいアドレ"
9505 "スへ付加する。 その他の場合は I<shmaddr> は付加を行なうアドレスで、ページ境界"
9506 "を指している必要がある。"
9507
9508 #. type: Plain text
9509 #: build/C/man2/shmop.2:90
9510 msgid ""
9511 "If B<SHM_RDONLY> is specified in I<shmflg>, the segment is attached for "
9512 "reading and the process must have read permission for the segment.  "
9513 "Otherwise the segment is attached for read and write and the process must "
9514 "have read and write permission for the segment.  There is no notion of a "
9515 "write-only shared memory segment."
9516 msgstr ""
9517 "B<SHM_RDONLY> が I<shmflg> に指定されていた場合は、 セグメントは読み込み専用"
9518 "に付加され、プロセスはそのセグメントへの 読み込み許可を持たなければならな"
9519 "い。 そうでなければそのセグメントは読み込みと書き込みのために付加され、 プロ"
9520 "セスはそのセグメントに読み込みと書き込みの許可を持つ必要がある。 書き込み専用"
9521 "の共有メモリ・セグメントという概念は存在しない。"
9522
9523 #. type: Plain text
9524 #: build/C/man2/shmop.2:105
9525 msgid ""
9526 "The (Linux-specific)  B<SHM_REMAP> flag may be specified in I<shmflg> to "
9527 "indicate that the mapping of the segment should replace any existing mapping "
9528 "in the range starting at I<shmaddr> and continuing for the size of the "
9529 "segment.  (Normally an B<EINVAL> error would result if a mapping already "
9530 "exists in this address range.)  In this case, I<shmaddr> must not be NULL."
9531 msgstr ""
9532 "(Linux 特有の)  B<SHM_REMAP> フラグが I<shmflg> に指定された場合は、 セグメン"
9533 "トのマッピングを既存のマッピングに置き換える。 マッピングの範囲は、 "
9534 "I<shmaddr> から始まりセグメントのサイズ分だけある (通常 B<EINVAL> エラーは、"
9535 "このアドレス範囲にマッピングが既に存在するために起る)。 このフラグを指定する"
9536 "場合は、 I<shmaddr> が NULL であってはならない。"
9537
9538 #. type: Plain text
9539 #: build/C/man2/shmop.2:112
9540 msgid ""
9541 "The B<brk>(2)  value of the calling process is not altered by the attach.  "
9542 "The segment will automatically be detached at process exit.  The same "
9543 "segment may be attached as a read and as a read-write one, and more than "
9544 "once, in the process's address space."
9545 msgstr ""
9546 "呼び出したプロセスの B<brk>(2)  の値は付加によって変化しない。 そのセグメント"
9547 "はプロセスが終了 (exit) したら自動的に分離 (detach) される。 同じセグメントを"
9548 "プロセスのアドレス空間に、読み込み専用および読み書き両用 として付加でき、また"
9549 "複数回付加することもできる。"
9550
9551 #. type: Plain text
9552 #: build/C/man2/shmop.2:120
9553 msgid ""
9554 "A successful B<shmat>()  call updates the members of the I<shmid_ds> "
9555 "structure (see B<shmctl>(2))  associated with the shared memory segment as "
9556 "follows:"
9557 msgstr ""
9558 "成功した B<shmat>()  コールは共有メモリ・セグメントに関連する I<shmid_ds> 構"
9559 "造体 (B<shmctl>(2)  を参照) のメンバーを以下のように更新する:"
9560
9561 #. type: Plain text
9562 #: build/C/man2/shmop.2:123
9563 msgid "I<shm_atime> is set to the current time."
9564 msgstr "I<shm_atime> には現在の時刻を設定する。"
9565
9566 #. type: Plain text
9567 #: build/C/man2/shmop.2:126 build/C/man2/shmop.2:152
9568 msgid "I<shm_lpid> is set to the process-ID of the calling process."
9569 msgstr "I<shm_lpid> には呼び出したプロセスのプロセス ID が設定される。"
9570
9571 #. type: Plain text
9572 #: build/C/man2/shmop.2:129
9573 msgid "I<shm_nattch> is incremented by one."
9574 msgstr "I<shm_nattch> を 1 増加させる。"
9575
9576 #. type: Plain text
9577 #: build/C/man2/shmop.2:140
9578 msgid ""
9579 "B<shmdt>()  detaches the shared memory segment located at the address "
9580 "specified by I<shmaddr> from the address space of the calling process.  The "
9581 "to-be-detached segment must be currently attached with I<shmaddr> equal to "
9582 "the value returned by the attaching B<shmat>()  call."
9583 msgstr ""
9584 "B<shmdt>()  は呼び出したプロセスのアドレス空間から I<shmaddr> で指定されたア"
9585 "ドレスに配置された共有メモリ・セグメントを分離 (detach) する。 分離する共有メ"
9586 "モリ・セグメントは、現在 I<shmaddr> に付加されているものでなければならない。 "
9587 "I<shmaddr> は、それを付加した時に B<shmat>()  が返した値に等しくなければなら"
9588 "ない。"
9589
9590 #. type: Plain text
9591 #: build/C/man2/shmop.2:146
9592 msgid ""
9593 "On a successful B<shmdt>()  call the system updates the members of the "
9594 "I<shmid_ds> structure associated with the shared memory segment as follows:"
9595 msgstr ""
9596 "成功した B<shmdt>()  コールはその共有メモリ・セグメントに関連する "
9597 "I<shmid_ds> 構造体のメンバーを以下のように更新する:"
9598
9599 #. type: Plain text
9600 #: build/C/man2/shmop.2:149
9601 msgid "I<shm_dtime> is set to the current time."
9602 msgstr "I<shm_dtime> には現在の時刻が設定される。"
9603
9604 #. type: Plain text
9605 #: build/C/man2/shmop.2:157
9606 msgid ""
9607 "I<shm_nattch> is decremented by one.  If it becomes 0 and the segment is "
9608 "marked for deletion, the segment is deleted."
9609 msgstr ""
9610 "I<shm_nattch> を 1 減少させる。 もし 0 になり、削除マークがあった場合は その"
9611 "セグメントは削除される。"
9612
9613 #. type: Plain text
9614 #: build/C/man2/shmop.2:161
9615 msgid ""
9616 "After a B<fork>(2)  the child inherits the attached shared memory segments."
9617 msgstr ""
9618 "B<fork>(2)  した後、子プロセスは付加された共有メモリ・セグメントを継承する。"
9619
9620 #. type: Plain text
9621 #: build/C/man2/shmop.2:165
9622 msgid ""
9623 "After an B<execve>(2)  all attached shared memory segments are detached from "
9624 "the process."
9625 msgstr ""
9626 "B<exec>(2)  した後、全ての付加された共有メモリ・セグメントはプロセスから分離"
9627 "される。"
9628
9629 #. type: Plain text
9630 #: build/C/man2/shmop.2:169
9631 msgid ""
9632 "Upon B<_exit>(2)  all attached shared memory segments are detached from the "
9633 "process."
9634 msgstr ""
9635 "B<exit>(2)  において、全ての付加された共有メモリ・セグメントはプロセスから分"
9636 "離される。"
9637
9638 #. type: Plain text
9639 #: build/C/man2/shmop.2:177
9640 msgid ""
9641 "On success B<shmat>()  returns the address of the attached shared memory "
9642 "segment; on error I<(void\\ *)\\ -1> is returned, and I<errno> is set to "
9643 "indicate the cause of the error."
9644 msgstr ""
9645 "B<shmat>()  は、成功した場合、 付加された共有メモリ・セグメントのアドレスを返"
9646 "す。 エラーの場合、 I<(void\\ *)\\ -1> を返し、 I<errno> にエラーの原因を示す"
9647 "値を設定する。"
9648
9649 #. type: Plain text
9650 #: build/C/man2/shmop.2:183
9651 msgid ""
9652 "On success B<shmdt>()  returns 0; on error -1 is returned, and I<errno> is "
9653 "set to indicate the cause of the error."
9654 msgstr ""
9655 "B<shmdt>()  は、成功すると 0 を返す。 エラーの場合、-1 を返し、 I<errno> にエ"
9656 "ラーの原因を示す値を設定する。"
9657
9658 #. type: Plain text
9659 #: build/C/man2/shmop.2:189
9660 msgid "When B<shmat>()  fails, I<errno> is set to one of the following:"
9661 msgstr ""
9662 "B<shmat>()  が失敗した場合、 I<errno> に以下の値のどれかを設定して返す:"
9663
9664 #. type: Plain text
9665 #: build/C/man2/shmop.2:195
9666 msgid ""
9667 "The calling process does not have the required permissions for the requested "
9668 "attach type, and does not have the B<CAP_IPC_OWNER> capability."
9669 msgstr ""
9670 "呼び出したプロセスに要求された種類の付加に必要な許可がなく、 "
9671 "B<CAP_IPC_OWNER> ケーパビリティ (capability) がない。"
9672
9673 #. type: Plain text
9674 #: build/C/man2/shmop.2:209
9675 msgid ""
9676 "Invalid I<shmid> value, unaligned (i.e., not page-aligned and B<SHM_RND> was "
9677 "not specified) or invalid I<shmaddr> value, or can't attach segment at "
9678 "I<shmaddr>, or B<SHM_REMAP> was specified and I<shmaddr> was NULL."
9679 msgstr ""
9680 "I<shmid> の値が不正である。 I<shmaddr> の値が境界違反 (unaligned) (つまり、"
9681 "ページ境界に合っておらず、 B<SHM_RND> が指定されていない) または が不正であ"
9682 "る。 I<shmaddr> へのセグメントの付加に失敗した。 または B<SHM_REMAP> が指定さ"
9683 "れているが、 I<shmaddr> が NULL であった。"
9684
9685 #. type: Plain text
9686 #: build/C/man2/shmop.2:212
9687 msgid "Could not allocate memory for the descriptor or for the page tables."
9688 msgstr ""
9689 "ディスクリプター (descriptor) やページ・テーブルのためのメモリを 割り当てるこ"
9690 "とができない。"
9691
9692 #. type: Plain text
9693 #: build/C/man2/shmop.2:218
9694 msgid "When B<shmdt>()  fails, I<errno> is set as follows:"
9695 msgstr "B<shmdt>()  が失敗した場合、 B<EINVAL> は以下のようにセットされる:"
9696
9697 #.  The following since 2.6.17-rc1:
9698 #. type: Plain text
9699 #: build/C/man2/shmop.2:226
9700 msgid ""
9701 "There is no shared memory segment attached at I<shmaddr>; or, I<shmaddr> is "
9702 "not aligned on a page boundary."
9703 msgstr ""
9704 "I<shmaddr> に付加された共有メモリ・セグメントが存在しない。 もしくは、 "
9705 "I<shmaddr> がページ境界に合っていない。"
9706
9707 #. type: Plain text
9708 #: build/C/man2/shmop.2:245
9709 msgid ""
9710 "In SVID 3 (or perhaps earlier)  the type of the I<shmaddr> argument was "
9711 "changed from I<char *> into I<const void *>, and the returned type of "
9712 "B<shmat>()  from I<char *> into I<void *>.  (Linux libc4 and libc5 have the "
9713 "I<char *> prototypes; glibc2 has I<void *>.)"
9714 msgstr ""
9715 "SVID 3 で (たぶんそれより前だと思うが)  I<shmaddr> 引き数の型は I<char *> か"
9716 "ら I<const void *> に、I<shmat>() の返り値の型は I<char *> から I<void *> に"
9717 "変更された (Linux では libc4 と libc5 のプロトタイプは I<char *> であり、"
9718 "glibc2 のプロトタイプは I<void *> である)。"
9719
9720 #. type: Plain text
9721 #: build/C/man2/shmop.2:257
9722 msgid ""
9723 "Using B<shmat>()  with I<shmaddr> equal to NULL is the preferred, portable "
9724 "way of attaching a shared memory segment.  Be aware that the shared memory "
9725 "segment attached in this way may be attached at different addresses in "
9726 "different processes.  Therefore, any pointers maintained within the shared "
9727 "memory must be made relative (typically to the starting address of the "
9728 "segment), rather than absolute."
9729 msgstr ""
9730 "共有メモリセグメントを付加する場合の移植性の高い方法としては、 I<shmaddr> を "
9731 "NULL にして B<shmat>()  を使用するのがよい。 このような方法で付加される共有メ"
9732 "モリセグメントは、 プロセスが異なれば別のアドレスに付加される、という点に注意"
9733 "すること。 よって共有メモリ内で管理されるポインタは、 絶対アドレスではなく、 "
9734 "(一般的にはセグメントの開始アドレスからの)  相対アドレスで作成するべきであ"
9735 "る。"
9736
9737 #. type: Plain text
9738 #: build/C/man2/shmop.2:262
9739 msgid ""
9740 "On Linux, it is possible to attach a shared memory segment even if it is "
9741 "already marked to be deleted.  However, POSIX.1-2001 does not specify this "
9742 "behavior and many other implementations do not support it."
9743 msgstr ""
9744 "Linux では共有メモリセグメントに既に削除マークが付けられていても、 その共有メ"
9745 "モリセグメントを付加することができる。 しかし POSIX.1-2001 ではこのような動作"
9746 "を指定しておらず、 他の多くの実装もこれをサポートしていない。"
9747
9748 #. type: Plain text
9749 #: build/C/man2/shmop.2:265
9750 msgid "The following system parameter affects B<shmat>():"
9751 msgstr "以下のシステム・パラメーターは、 B<shmat>()  に影響する:"
9752
9753 #.  FIXME A good explanation of the rationale for the existence
9754 #.  of SHMLBA would be useful here
9755 #. type: TP
9756 #: build/C/man2/shmop.2:265
9757 #, no-wrap
9758 msgid "B<SHMLBA>"
9759 msgstr "B<SHMLBA>"
9760
9761 #.  FIXME That last sentence isn't true for all Linux
9762 #.  architectures (i.e., SHMLBA != PAGE_SIZE for some architectures)
9763 #.  -- MTK, Nov 04
9764 #. type: Plain text
9765 #: build/C/man2/shmop.2:278
9766 msgid ""
9767 "Segment low boundary address multiple.  Must be page aligned.  For the "
9768 "current implementation the B<SHMLBA> value is B<PAGE_SIZE>."
9769 msgstr ""
9770 "セグメントの境界アドレスの最小倍数。ページ境界に合ってなければならない。 現在"
9771 "の実装では B<SHMLBA> の値は B<PAGE_SIZE> である。"
9772
9773 #. type: Plain text
9774 #: build/C/man2/shmop.2:282
9775 msgid ""
9776 "The implementation places no intrinsic limit on the per-process maximum "
9777 "number of shared memory segments (B<SHMSEG>)."
9778 msgstr ""
9779 "現在の実装では、プロセスごとの 共有メモリ・セグメントの最大数 (B<SHMSEG>)  に"
9780 "関する実装依存の制限はない。"
9781
9782 #. type: Plain text
9783 #: build/C/man2/shmop.2:290
9784 msgid ""
9785 "B<brk>(2), B<mmap>(2), B<shmctl>(2), B<shmget>(2), B<capabilities>(7), "
9786 "B<shm_overview>(7), B<svipc>(7)"
9787 msgstr ""
9788 "B<brk>(2), B<mmap>(2), B<shmctl>(2), B<shmget>(2), B<capabilities>(7), "
9789 "B<shm_overview>(7), B<svipc>(7)"
9790
9791 #. type: TH
9792 #: build/C/man2/subpage_prot.2:28
9793 #, no-wrap
9794 msgid "SUBPAGE_PROT"
9795 msgstr "SUBPAGE_PROT"
9796
9797 #. type: TH
9798 #: build/C/man2/subpage_prot.2:28
9799 #, no-wrap
9800 msgid "2010-10-30"
9801 msgstr "2010-10-30"
9802
9803 #. type: Plain text
9804 #: build/C/man2/subpage_prot.2:31
9805 msgid "subpage_prot - define a subpage protection for an address range"
9806 msgstr ""
9807
9808 #. type: Plain text
9809 #: build/C/man2/subpage_prot.2:35
9810 #, no-wrap
9811 msgid ""
9812 "B<long subpage_prot(unsigned long >I<addr>B<, unsigned long >I<len>B<,>\n"
9813 "B<                  uint32_t *>I<map>B<);>\n"
9814 msgstr ""
9815 "B<long subpage_prot(unsigned long >I<addr>B<, unsigned long >I<len>B<,>\n"
9816 "B<                  uint32_t *>I<map>B<);>\n"
9817
9818 #. type: Plain text
9819 #: build/C/man2/subpage_prot.2:42
9820 msgid ""
9821 "The PowerPC-specific B<subpage_prot>()  system call provides the facility to "
9822 "control the access permissions on individual 4kB subpages on systems "
9823 "configured with a page size of 64kB."
9824 msgstr ""
9825
9826 #. type: Plain text
9827 #: build/C/man2/subpage_prot.2:49
9828 msgid ""
9829 "The protection map is applied to the memory pages in the region starting at "
9830 "I<addr> and continuing for I<len> bytes.  Both of these arguments must be "
9831 "aligned to a 64-kB boundary."
9832 msgstr ""
9833
9834 #. type: Plain text
9835 #: build/C/man2/subpage_prot.2:61
9836 msgid ""
9837 "The protection map is specified in the buffer pointed to by I<map>.  The map "
9838 "has 2 bits per 4kB subpage; thus each 32-bit word specifies the protections "
9839 "of 16 4kB subpages inside a 64kB page (so, the number of 32-bit words "
9840 "pointed to by I<map> should equate to the number of 64-kB pages specified by "
9841 "I<len>).  Each 2-bit field in the protection map is either 0 to allow any "
9842 "access, 1 to prevent writes, or 2 or 3 to prevent all accesses."
9843 msgstr ""
9844
9845 #. type: Plain text
9846 #: build/C/man2/subpage_prot.2:66
9847 msgid ""
9848 "On success, B<subpage_prot>()  returns 0.  Otherwise, one of the error codes "
9849 "specified below is returned."
9850 msgstr ""
9851
9852 #. type: Plain text
9853 #: build/C/man2/subpage_prot.2:72
9854 msgid "The buffer referred to by I<map> is not accessible."
9855 msgstr ""
9856
9857 #. type: Plain text
9858 #: build/C/man2/subpage_prot.2:82
9859 msgid ""
9860 "The I<addr> or I<len> arguments are incorrect.  Both of these arguments must "
9861 "be aligned to a multiple of the system page size, and they must not refer to "
9862 "a region outside of the address space of the process or to a region that "
9863 "consists of huge pages."
9864 msgstr ""
9865
9866 #. type: Plain text
9867 #: build/C/man2/subpage_prot.2:85 build/C/man2/sync_file_range.2:166
9868 msgid "Out of memory."
9869 msgstr "メモリ不足である。"
9870
9871 #. type: Plain text
9872 #: build/C/man2/subpage_prot.2:91
9873 msgid ""
9874 "This system call is provided on the PowerPC architecture since Linux "
9875 "2.6.25.  The system call is provided only if the kernel is configured with "
9876 "B<CONFIG_PPC_64K_PAGES>.  No library support is provided."
9877 msgstr ""
9878
9879 #. type: Plain text
9880 #: build/C/man2/subpage_prot.2:98
9881 msgid ""
9882 "Normal page protections (at the 64-kB page level) also apply; the subpage "
9883 "protection mechanism is an additional constraint, so putting 0 in a 2-bit "
9884 "field won't allow writes to a page that is otherwise write-protected."
9885 msgstr ""
9886
9887 #. type: SS
9888 #: build/C/man2/subpage_prot.2:98
9889 #, no-wrap
9890 msgid "Rationale"
9891 msgstr ""
9892
9893 #.  In the initial implementation, it was the case that:
9894 #.      In fact the whole process is switched to use 4k hardware pages when the
9895 #.      subpage_prot system call is used, but this could be improved in future
9896 #.      to switch only the affected segments.
9897 #.  But Paul Mackerass says (Oct 2010): I'm pretty sure we now only switch
9898 #.  the affected segment, not the whole process.
9899 #. type: Plain text
9900 #: build/C/man2/subpage_prot.2:120
9901 msgid ""
9902 "This system call is provided to assist writing emulators that operate using "
9903 "64-kB pages on PowerPC systems.  When emulating systems such as x86, which "
9904 "uses a smaller page size, the emulator can no longer use the memory-"
9905 "management unit (MMU)  and normal system calls for controlling page "
9906 "protections.  (The emulator could emulate the MMU by checking and possibly "
9907 "remapping the address for each memory access in software, but that is "
9908 "slow.)  The idea is that the emulator supplies an array of protection masks "
9909 "to apply to a specified range of virtual addresses.  These masks are applied "
9910 "at the level where hardware page-table entries (PTEs)  are inserted into the "
9911 "hardware page table based on the Linux PTEs, so the Linux PTEs are not "
9912 "affected.  Implicit in this is that the regions of the address space that "
9913 "are protected are switched to use 4-kB hardware pages rather than 64-kB "
9914 "hardware pages (on machines with hardware 64-kB page support)."
9915 msgstr ""
9916
9917 #. type: Plain text
9918 #: build/C/man2/subpage_prot.2:123
9919 msgid "B<mprotect>(2), B<syscall>(2);"
9920 msgstr ""
9921
9922 #. type: Plain text
9923 #: build/C/man2/subpage_prot.2:126
9924 msgid "the kernel source file I<Documentation/vm/hugetlbpage.txt>."
9925 msgstr ""
9926
9927 #. type: TH
9928 #: build/C/man2/sync_file_range.2:30
9929 #, no-wrap
9930 msgid "SYNC_FILE_RANGE"
9931 msgstr "SYNC_FILE_RANGE"
9932
9933 #. type: Plain text
9934 #: build/C/man2/sync_file_range.2:33
9935 msgid "sync_file_range - sync a file segment with disk"
9936 msgstr "sync_file_range - ファイルセグメントをディスクと同期する"
9937
9938 #. type: Plain text
9939 #: build/C/man2/sync_file_range.2:37
9940 #, no-wrap
9941 msgid ""
9942 "B<#define _GNU_SOURCE>         /* See feature_test_macros(7) */\n"
9943 "B<#include E<lt>fcntl.hE<gt>>\n"
9944 msgstr ""
9945 "B<#define _GNU_SOURCE>         /* feature_test_macros(7) 参照 */\n"
9946 "B<#include E<lt>fcntl.hE<gt>>\n"
9947
9948 #. type: Plain text
9949 #: build/C/man2/sync_file_range.2:40
9950 #, no-wrap
9951 msgid ""
9952 "B<int sync_file_range(int >I<fd>B<, off64_t >I<offset>B<, off64_t >I<nbytes>B<,>\n"
9953 "B<                    unsigned int >I<flags>B<);>\n"
9954 msgstr ""
9955 "B<int sync_file_range(int >I<fd>B<, off64_t >I<offset>B<, off64_t >I<nbytes>B<,>\n"
9956 "B<                    unsigned int >I<flags>B<);>\n"
9957
9958 #. type: Plain text
9959 #: build/C/man2/sync_file_range.2:47
9960 msgid ""
9961 "B<sync_file_range>()  permits fine control when synchronizing the open file "
9962 "referred to by the file descriptor I<fd> with disk."
9963 msgstr ""
9964 "B<sync_file_range>()  を使うと、ファイルディスクリプタ I<fd> で参照されるオー"
9965 "プンされたファイルのディスクとの同期に関して、 きめ細かな制御が可能となる。"
9966
9967 #. type: Plain text
9968 #: build/C/man2/sync_file_range.2:61
9969 msgid ""
9970 "I<offset> is the starting byte of the file range to be synchronized.  "
9971 "I<nbytes> specifies the length of the range to be synchronized, in bytes; if "
9972 "I<nbytes> is zero, then all bytes from I<offset> through to the end of file "
9973 "are synchronized.  Synchronization is in units of the system page size: "
9974 "I<offset> is rounded down to a page boundary; I<(offset+nbytes-1)> is "
9975 "rounded up to a page boundary."
9976 msgstr ""
9977 "I<offset> は、同期を行うファイルの領域の開始バイトである。 I<nbytes> には同期"
9978 "を行う領域の長さをバイト単位で指定する。 I<nbytes> が 0 の場合は、 I<offset> "
9979 "からファイル末尾までの全バイトを同期する。 同期はシステムのページサイズの単位"
9980 "で行われる。 I<offset> はページ境界にあわせて切り下げられ、 I<(offset"
9981 "+nbytes-1)> はページ境界にあわせて切り上げられる。"
9982
9983 #. type: Plain text
9984 #: build/C/man2/sync_file_range.2:65
9985 msgid "The I<flags> bit-mask argument can include any of the following values:"
9986 msgstr "ビットマスク引き数 I<flags> には以下の値を指定することができる:"
9987
9988 #. type: TP
9989 #: build/C/man2/sync_file_range.2:65
9990 #, no-wrap
9991 msgid "B<SYNC_FILE_RANGE_WAIT_BEFORE>"
9992 msgstr "B<SYNC_FILE_RANGE_WAIT_BEFORE>"
9993
9994 #. type: Plain text
9995 #: build/C/man2/sync_file_range.2:70
9996 msgid ""
9997 "Wait upon write-out of all pages in the specified range that have already "
9998 "been submitted to the device driver for write-out before performing any "
9999 "write."
10000 msgstr ""
10001 "何らかの書き込みを行う前に、指定された領域のページで 書き出しを行うようにデバ"
10002 "イスドライバにすでに要求が発行されている ページの書き出しが全て完了するのを待"
10003 "つ。"
10004
10005 #. type: TP
10006 #: build/C/man2/sync_file_range.2:70 build/C/man2/sync_file_range.2:120
10007 #, no-wrap
10008 msgid "B<SYNC_FILE_RANGE_WRITE>"
10009 msgstr "B<SYNC_FILE_RANGE_WRITE>"
10010
10011 #. type: Plain text
10012 #: build/C/man2/sync_file_range.2:76
10013 msgid ""
10014 "Initiate write-out of all dirty pages in the specified range which are not "
10015 "presently submitted write-out.  Note that even this may block if you attempt "
10016 "to write more than request queue size."
10017 msgstr ""
10018 "指定された領域のページで、書き出し要求が発行されていない 全ての dirty (キャッ"
10019 "シュだけが変更されている) ページの 書き出しを開始する。 リクエストキューの大"
10020 "きさより多く書き込もうとした場合には、 この処理は停止 (block) する可能性があ"
10021 "る点に注意すること。"
10022
10023 #. type: TP
10024 #: build/C/man2/sync_file_range.2:76
10025 #, no-wrap
10026 msgid "B<SYNC_FILE_RANGE_WAIT_AFTER>"
10027 msgstr "B<SYNC_FILE_RANGE_WAIT_AFTER>"
10028
10029 #. type: Plain text
10030 #: build/C/man2/sync_file_range.2:80
10031 msgid ""
10032 "Wait upon write-out of all pages in the range after performing any write."
10033 msgstr ""
10034 "何らかの書き込み後に、指定された領域の全てのページの 書き出しが行われるのを待"
10035 "つ。"
10036
10037 #. type: Plain text
10038 #: build/C/man2/sync_file_range.2:84
10039 msgid "Specifying I<flags> as 0 is permitted, as a no-op."
10040 msgstr "I<flags> に 0 を指定した場合、何もしないことを表す。"
10041
10042 #. type: SS
10043 #: build/C/man2/sync_file_range.2:84
10044 #, no-wrap
10045 msgid "Warning"
10046 msgstr "警告"
10047
10048 #. type: Plain text
10049 #: build/C/man2/sync_file_range.2:100
10050 msgid ""
10051 "This system call is extremely dangerous and should not be used in portable "
10052 "programs.  None of these operations writes out the file's metadata.  "
10053 "Therefore, unless the application is strictly performing overwrites of "
10054 "already-instantiated disk blocks, there are no guarantees that the data will "
10055 "be available after a crash.  There is no user interface to know if a write "
10056 "is purely an overwrite.  On file systems using copy-on-write semantics (e."
10057 "g., I<btrfs>)  an overwrite of existing allocated blocks is impossible.  "
10058 "When writing into preallocated space, many file systems also require calls "
10059 "into the block allocator, which this system call does not sync out to disk.  "
10060 "This system call does not flush disk write caches and thus does not provide "
10061 "any data integrity on systems with volatile disk write caches."
10062 msgstr ""
10063 "このシステムコールは非常に危険であり、 移植性が必要なプログラムで使用すべきで"
10064 "はない。 これらの操作ではどれもファイルのメタデータの書き出しを行わない。 し"
10065 "たがって、アプリケーションにより作成済みのディスクブロックの 上書きの実行が確"
10066 "実に行われない限り、クラッシュの後でもデータが 利用できる保証はない。 書き込"
10067 "みが上書きだけであるかを知るためのユーザインタフェースは存在しない。 "
10068 "(I<btrfs> などの) copy-on-write 動作を使ったファイルシステムでは、 既存の割り"
10069 "当て済みのブロックに対する上書き自体ができない。 前もって割り当てられた領域に"
10070 "書き込みを行う場合、 多くのファイルシステムでは block allocator への書き込み"
10071 "も必要となるが、 このシステムコールは block allocator のディスクへの同期を行"
10072 "わない。 このシステムコールはディスク書き込みキャッシュのフラッシュを 行わな"
10073 "いので、揮発性のディスク書き込みキャッシュを使ったシステムでは このシステム"
10074 "コールではデータの一貫性を確保できないことになる。"
10075
10076 #. type: SS
10077 #: build/C/man2/sync_file_range.2:100
10078 #, no-wrap
10079 msgid "Some details"
10080 msgstr "詳細"
10081
10082 #. type: Plain text
10083 #: build/C/man2/sync_file_range.2:108
10084 msgid ""
10085 "B<SYNC_FILE_RANGE_WAIT_BEFORE> and B<SYNC_FILE_RANGE_WAIT_AFTER> will detect "
10086 "any I/O errors or B<ENOSPC> conditions and will return these to the caller."
10087 msgstr ""
10088 "B<SYNC_FILE_RANGE_WAIT_BEFORE> と B<SYNC_FILE_RANGE_WAIT_AFTER> は I/O エラー"
10089 "や B<ENOSPC> 状態を検出し、呼び出し元にこれらの情報を返す。"
10090
10091 #. type: Plain text
10092 #: build/C/man2/sync_file_range.2:112
10093 msgid "Useful combinations of the I<flags> bits are:"
10094 msgstr "I<flags> の役に立つビットの組み合わせを以下に示す:"
10095
10096 #. type: TP
10097 #: build/C/man2/sync_file_range.2:112
10098 #, no-wrap
10099 msgid "B<SYNC_FILE_RANGE_WAIT_BEFORE | SYNC_FILE_RANGE_WRITE>"
10100 msgstr "B<SYNC_FILE_RANGE_WAIT_BEFORE | SYNC_FILE_RANGE_WRITE>"
10101
10102 #. type: Plain text
10103 #: build/C/man2/sync_file_range.2:120
10104 msgid ""
10105 "Ensures that all pages in the specified range which were dirty when "
10106 "B<sync_file_range>()  was called are placed under write-out.  This is a "
10107 "start-write-for-data-integrity operation."
10108 msgstr ""
10109 "指定された範囲内のページで、 B<sync_file_range>()  が呼び出された際に dirty "
10110 "であった全てのページが、 確実に書き出し対象となるようにする。 これは、start-"
10111 "write-for-data-integrity 操作 (データ完全性確保のための書き込み開始の操作) で"
10112 "ある。"
10113
10114 #. type: Plain text
10115 #: build/C/man2/sync_file_range.2:127
10116 msgid ""
10117 "Start write-out of all dirty pages in the specified range which are not "
10118 "presently under write-out.  This is an asynchronous flush-to-disk "
10119 "operation.  This is not suitable for data integrity operations."
10120 msgstr ""
10121 "指定された範囲内のページで、現在書き出し中でない全ての dirty ページの 書き出"
10122 "しを開始する。これは非同期のディスクへのフラッシュ (flush-to-disk)  操作であ"
10123 "る。データ完全性確保が必要な操作としては適切ではない。"
10124
10125 #. type: TP
10126 #: build/C/man2/sync_file_range.2:127
10127 #, no-wrap
10128 msgid "B<SYNC_FILE_RANGE_WAIT_BEFORE> (or B<SYNC_FILE_RANGE_WAIT_AFTER>)"
10129 msgstr "B<SYNC_FILE_RANGE_WAIT_BEFORE> (or B<SYNC_FILE_RANGE_WAIT_AFTER>)"
10130
10131 #. type: Plain text
10132 #: build/C/man2/sync_file_range.2:134
10133 msgid ""
10134 "Wait for completion of write-out of all pages in the specified range.  This "
10135 "can be used after an earlier B<SYNC_FILE_RANGE_WAIT_BEFORE | "
10136 "SYNC_FILE_RANGE_WRITE> operation to wait for completion of that operation, "
10137 "and obtain its result."
10138 msgstr ""
10139 "指定された範囲内の全てのページの書き出しの完了を待つ。 このフラグは、前に行わ"
10140 "れた操作 B<SYNC_FILE_RANGE_WAIT_BEFORE | SYNC_FILE_RANGE_WRITE> の後に使用で"
10141 "き、この操作の完了を待ち、結果を取得することができる。"
10142
10143 #. type: TP
10144 #: build/C/man2/sync_file_range.2:134
10145 #, no-wrap
10146 msgid "B<SYNC_FILE_RANGE_WAIT_BEFORE | SYNC_FILE_RANGE_WRITE | SYNC_FILE_RANGE_WAIT_AFTER>"
10147 msgstr "B<SYNC_FILE_RANGE_WAIT_BEFORE | SYNC_FILE_RANGE_WRITE | SYNC_FILE_RANGE_WAIT_AFTER>"
10148
10149 #. type: Plain text
10150 #: build/C/man2/sync_file_range.2:141
10151 msgid ""
10152 "This is a write-for-data-integrity operation that will ensure that all pages "
10153 "in the specified range which were dirty when B<sync_file_range>()  was "
10154 "called are committed to disk."
10155 msgstr ""
10156 "これは write-for-data-integrity 操作 (データ完全性確保のための書き込み) であ"
10157 "り、指定された範囲内の、 B<sync_file_range>()  が呼ばれた時点で dirty な全て"
10158 "のページが ディスクに格納されることが保証される。"
10159
10160 #. type: Plain text
10161 #: build/C/man2/sync_file_range.2:147
10162 msgid ""
10163 "On success, B<sync_file_range>()  returns 0; on failure -1 is returned and "
10164 "I<errno> is set to indicate the error."
10165 msgstr ""
10166 "成功の場合、 B<sync_file_range>()  は 0 を返す。失敗の場合、-1 を返し、 "
10167 "I<error> にエラーを示す値を設定する。"
10168
10169 #. type: Plain text
10170 #: build/C/man2/sync_file_range.2:152
10171 msgid "I<fd> is not a valid file descriptor."
10172 msgstr "I<fd> が有効なファイルディスクリプタではない。"
10173
10174 #. type: Plain text
10175 #: build/C/man2/sync_file_range.2:160
10176 msgid ""
10177 "I<flags> specifies an invalid bit; or I<offset> or I<nbytes> is invalid."
10178 msgstr ""
10179 "I<flags> に不正なビットが指定されている。または I<offset> か I<nbytes> が不正"
10180 "である。"
10181
10182 #. type: Plain text
10183 #: build/C/man2/sync_file_range.2:163
10184 msgid "I/O error."
10185 msgstr "I/O エラー。"
10186
10187 #. type: Plain text
10188 #: build/C/man2/sync_file_range.2:169
10189 msgid "Out of disk space."
10190 msgstr "ディスク領域不足である。"
10191
10192 #.  FIXME . (bug?) Actually, how can 'fd' refer to a symbolic link (S_ISLNK)?
10193 #.  (In userspace at least) it isn't possible to obtain a file descriptor
10194 #.  for a symbolic link.
10195 #. type: Plain text
10196 #: build/C/man2/sync_file_range.2:177
10197 msgid ""
10198 "I<fd> refers to something other than a regular file, a block device, a "
10199 "directory, or a symbolic link."
10200 msgstr ""
10201 "I<fd> が、通常のファイル、ブロックデバイス、ディレクトリ、シンボリックリンク "
10202 "以外のものを指している。"
10203
10204 #. type: Plain text
10205 #: build/C/man2/sync_file_range.2:180
10206 msgid "B<sync_file_range>()  appeared on Linux in kernel 2.6.17."
10207 msgstr "B<sync_file_range>()  はカーネル 2.6.17 で Linux に登場した。"
10208
10209 #. type: Plain text
10210 #: build/C/man2/sync_file_range.2:183
10211 msgid ""
10212 "This system call is Linux-specific, and should be avoided in portable "
10213 "programs."
10214 msgstr ""
10215 "このシステムコールは Linux 独自であり、 移植性が必要なプログラムでは使用を避"
10216 "けるべきである。"
10217
10218 #.  See kernel commit edd5cd4a9424f22b0fa08bef5e299d41befd5622
10219 #. type: Plain text
10220 #: build/C/man2/sync_file_range.2:196
10221 msgid ""
10222 "Some architectures (e.g., PowerPC, ARM)  need 64-bit arguments to be aligned "
10223 "in a suitable pair of registers.  On such architectures, the call signature "
10224 "of B<sync_file_range>()  is flawed, since it forces a register to be wasted "
10225 "as padding between the I<fd> and I<offset> arguments.  Therefore, these "
10226 "architectures define a different system call that orders the arguments "
10227 "suitably:"
10228 msgstr ""
10229
10230 #. type: Plain text
10231 #: build/C/man2/sync_file_range.2:201
10232 #, no-wrap
10233 msgid ""
10234 "B<int sync_file_range2(int >I<fd>B<, unsigned int >I<flags>B<,>\n"
10235 "B<                     off64_t >I<offset>B<, off64_t >I<nbytes>B<);>\n"
10236 msgstr ""
10237 "B<int sync_file_range2(int >I<fd>B<, unsigned int >I<flags>B<,>\n"
10238 "B<                     off64_t >I<offset>B<, off64_t >I<nbytes>B<);>\n"
10239
10240 #. type: Plain text
10241 #: build/C/man2/sync_file_range.2:206
10242 msgid ""
10243 "The behavior of this system call is otherwise exactly the same as "
10244 "B<sync_file_range>()."
10245 msgstr ""
10246
10247 #. type: Plain text
10248 #: build/C/man2/sync_file_range.2:217
10249 msgid ""
10250 "A system call with this signature first appeared on the ARM architecture in "
10251 "Linux 2.6.20, with the name B<arm_sync_file_range>().  It was renamed in "
10252 "Linux 2.6.22, when the analogous system call was added for PowerPC.  On "
10253 "architectures where glibc support is provided, glibc transparently wraps "
10254 "B<sync_file_range2>()  under the name B<sync_file_range>()."
10255 msgstr ""
10256
10257 #. type: Plain text
10258 #: build/C/man2/sync_file_range.2:222
10259 msgid "B<fdatasync>(2), B<fsync>(2), B<msync>(2), B<sync>(2)"
10260 msgstr "B<fdatasync>(2), B<fsync>(2), B<msync>(2), B<sync>(2)"
10261
10262 #~ msgid "2011-09-18"
10263 #~ msgstr "2011-09-18"
10264
10265 #~ msgid ""
10266 #~ "    if (argc E<gt> 1) {\n"
10267 #~ "        if (argc != 2) {\n"
10268 #~ "            fprintf(stderr, \"%s E<lt>M_CHECK_ACTION-valueE<gt>\\en\", argv[0]);\n"
10269 #~ "            exit(EXIT_FAILURE);\n"
10270 #~ "        }\n"
10271 #~ "    }\n"
10272 #~ msgstr ""
10273 #~ "    if (argc E<gt> 1) {\n"
10274 #~ "        if (argc != 2) {\n"
10275 #~ "            fprintf(stderr, \"%s E<lt>M_CHECK_ACTION-valueE<gt>\\en\", argv[0]);\n"
10276 #~ "            exit(EXIT_FAILURE);\n"
10277 #~ "        }\n"
10278 #~ "    }\n"
10279
10280 #~ msgid ""
10281 #~ "The I<mode> is not supported by the file system containing the file "
10282 #~ "referred to by I<fd>."
10283 #~ msgstr ""
10284 #~ "I<fd> が参照するファイルを含むファイルシステムが I<mode> をサポートしてい"
10285 #~ "ない。"
10286
10287 #~ msgid ""
10288 #~ "The function B<mtrace>()  installs handlers for B<malloc>(3), B<realloc>"
10289 #~ "(3)  and B<free>(3).  The function B<muntrace>()  disables these handlers."
10290 #~ msgstr ""
10291 #~ "関数 B<mtrace>()  は、 B<malloc>(3), B<realloc>(3), B<free>(3)  のハンドラ"
10292 #~ "を組み込む。 関数 B<muntrace>()  はこれらのハンドラを解除する。"
10293
10294 #~ msgid ""
10295 #~ "The environment variable B<MALLOC_TRACE> defines a file where B<mtrace>"
10296 #~ "()  writes its output.  This file must be writable to the user or "
10297 #~ "B<mtrace>()  will do nothing.  If the file is not empty it will be "
10298 #~ "truncated."
10299 #~ msgstr ""
10300 #~ "環境変数 B<MALLOC_TRACE> は B<mtrace>()  が出力を書き出すファイルを指定す"
10301 #~ "る。 ユーザが書き込み権限を持つファイルを指定しなければならない。 書き込み"
10302 #~ "権限がない場合、 B<mtrace>()  は何もしない。 ファイルが空でない場合、ファ"
10303 #~ "イルの元の内容を上書きする。"
10304
10305 #~ msgid "These are GNU extensions."
10306 #~ msgstr "この関数は GNU 拡張である。"
10307
10308 #~ msgid ""
10309 #~ "The output of B<mtrace>()  will be ASCII but not in a friendly format.  "
10310 #~ "So glibc comes with a perl-script called mtrace to make sense of it."
10311 #~ msgstr ""
10312 #~ "B<mtrace>()  の出力は ASCII 形式だが、人が読みやすいフォーマットではな"
10313 #~ "い。 そこで、glibc には mtrace 出力を分かりやすい形式に変換する perl スク"
10314 #~ "リプトが付属している。"
10315
10316 #~ msgid ""
10317 #~ "This flag allocates and initializes to zero the disk space within the "
10318 #~ "range specified by I<offset> and I<len>.  After a successful call, "
10319 #~ "subsequent writes into this range are guaranteed not to fail because of "
10320 #~ "lack of disk space.  Preallocating zeroed blocks beyond the end of the "
10321 #~ "file is useful for optimizing append workloads.  Preallocating blocks "
10322 #~ "does not change the file size (as reported by B<stat>(2))  even if it is "
10323 #~ "less than I<offset>+I<len>."
10324 #~ msgstr ""
10325 #~ "このフラグは、 I<offset> と I<len> で指定された領域のディスク空間を割り当"
10326 #~ "て、その空間を 0 で初期化する。 呼び出しが成功すると、それに続いてこの領域"
10327 #~ "への書き込みが行われるが、 ディスク空間の不足による書き込み失敗が発生しな"
10328 #~ "いことが保証される。 ファイル末尾より後ろの領域について 0 で埋めたブロック"
10329 #~ "を前もって 割り当てておくことは、追記 (append) の作業負荷を最適化するのに "
10330 #~ "有用である。 ファイルサイズが I<offset>+I<len> よりも小さい場合であって"
10331 #~ "も、ブロックの前もっての割り当てにより (B<stat>(2)  が返す) ファイルサイズ"
10332 #~ "は変更されることはない。"
10333
10334 #~ msgid ""
10335 #~ "(Linux 2.6.9 and later) the caller was not privileged (B<CAP_IPC_LOCK>)  "
10336 #~ "and its B<RLIMIT_MEMLOCK> soft resource limit was 0."
10337 #~ msgstr ""
10338 #~ "(Linux 2.6.9 以降) 呼び出し元は特権 (B<CAP_IPC_LOCK>)  を持たず、ソフト資"
10339 #~ "源制限 B<RLIMIT_MEMLOCK> が 0 である。"
10340
10341 #~ msgid ""
10342 #~ "(Linux 2.6.8 and earlier)  The calling process has insufficient privilege "
10343 #~ "to call B<munlockall>().  Under Linux the B<CAP_IPC_LOCK> capability is "
10344 #~ "required."
10345 #~ msgstr ""
10346 #~ "(Linux 2.6.8 以前)  呼び出し元プロセスが B<munlockall>()  を呼び出すのに必"
10347 #~ "要な特権を所有していなかった。 Linux では、 B<CAP_IPC_LOCK> ケーパビリティ"
10348 #~ "が必要である。"
10349
10350 #~ msgid ""
10351 #~ "B<posix_fadvise>()  appeared in kernel 2.5.60.  Glibc support has been "
10352 #~ "provided since version 2.2."
10353 #~ msgstr ""
10354 #~ "B<posix_fadvise>()  はカーネル 2.5.60 で登場した。 glibc でのサポートは "
10355 #~ "glibc バージョン 2.2 以降で行われている。"